Page 1 of 1
Login image not working
Posted: 2020-05-08 21:59
by kanklovitch
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
Re: Login image not working
Posted: 2020-05-09 07:07
by jsetzer
this code
Which code? Please share some insights

Re: Login image not working
Posted: 2020-05-09 11:49
by kanklovitch
<?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
Posted: 2020-05-10 08:47
by jsetzer
Hi,
I'm wondering about the strange quotation marks you have pasted:
Code: Select all
$j(’#benefits’).appendTo(’#login_splash’);
Usually we can use single quotes ' or double quotes " in javascript. So you should try with this line:
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?
Best,
Jan
Re: Login image not working
Posted: 2020-05-10 11:31
by kanklovitch
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)
Re: Login image not working
Posted: 2020-05-10 17:32
by jsetzer
Super Hero

Thanks!
You're welcome.
Sometimes a second pair of eyes helps.