Hi Guys
I am stumped why this code won't work to load a back ground image to the login page. The test text shows up and there are no errors but no image after refreshing the browser and clearing the cache.
Thank you
Ken
Login image not working
Re: Login image not working
Which code? Please share some insightsthis code

Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 25.10 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 25.10 + all AppGini Helper tools
-
- Veteran Member
- Posts: 159
- Joined: 2019-02-03 17:26
Re: Login image not working
<?php
$script_name = basename($_SERVER['PHP_SELF']);
if($script_name == 'index.php' && isset($_GET ['signIn'])){
?>
<style>
body{
background: url("images/callkenny.jpg") no-repeat fixed center center / cover;
}
</style>
<div class = “alert alert=success†id=â€benefitsâ€>
callKenny is amazing:
<ul>
<li>Towns
<li> Businesses
</ul>
</div>
<script>
$j(function(){
$j(’#benefits’).appendTo(’#login_splash’);
})
</script>
<?php
}
?>
$script_name = basename($_SERVER['PHP_SELF']);
if($script_name == 'index.php' && isset($_GET ['signIn'])){
?>
<style>
body{
background: url("images/callkenny.jpg") no-repeat fixed center center / cover;
}
</style>
<div class = “alert alert=success†id=â€benefitsâ€>
callKenny is amazing:
<ul>
<li>Towns
<li> Businesses
</ul>
</div>
<script>
$j(function(){
$j(’#benefits’).appendTo(’#login_splash’);
})
</script>
<?php
}
?>
Re: Login image not working
Hi,
I'm wondering about the strange quotation marks you have pasted:
Usually we can use single quotes ' or double quotes " in javascript. So you should try with this line:
If this does not help:
I don't know where you have put that code. If I put it in hooks/footer-extras.php and paste an existing image into images folter, it works without any problems.
Jan
I'm wondering about the strange quotation marks you have pasted:
Code: Select all
$j(’#benefits’).appendTo(’#login_splash’);
Code: Select all
$j('#benefits').appendTo('#login_splash');
If this does not help:
I don't know where you have put that code. If I put it in hooks/footer-extras.php and paste an existing image into images folter, it works without any problems.
- Are you using correct quotes in javascript?
- Did you put that code in footer-extras.php?
- Does the image exist (lowercase filename) in images directory?
- Is there any other style definition for body / background?
Jan
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 25.10 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 25.10 + all AppGini Helper tools
-
- Veteran Member
- Posts: 159
- Joined: 2019-02-03 17:26
Re: Login image not working
YES - that is exactly what the problem was. I make a lot of simple mistakes sometimes, I typed the code from Corel Draw, my design program because I am efficient with it, and pasted it into my code editor, I didn't realize the quotes didn't translate properly.
Thanks very much Jan (Super Hero)
Thanks very much Jan (Super Hero)
Re: Login image not working
Super Hero

You're welcome.
Sometimes a second pair of eyes helps.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 25.10 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 25.10 + all AppGini Helper tools