Login image not working

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Login image not working

Post by kanklovitch » 2020-05-08 21:59

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

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1944
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Login image not working

Post by jsetzer » 2020-05-09 07:07

this code
Which code? Please share some insights ;)
Kind regards,
<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 readability

AppGini 25.10 + all AppGini Helper tools

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Login image not working

Post by kanklovitch » 2020-05-09 11:49

<?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
}
?>

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1944
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Login image not working

Post by jsetzer » 2020-05-10 08:47

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
Kind regards,
<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 readability

AppGini 25.10 + all AppGini Helper tools

kanklovitch
Veteran Member
Posts: 159
Joined: 2019-02-03 17:26

Re: Login image not working

Post by kanklovitch » 2020-05-10 11:31

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)

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1944
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Login image not working

Post by jsetzer » 2020-05-10 17:32

Super Hero
:D Thanks!

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 [code]...[/code] blocks for better readability

AppGini 25.10 + all AppGini Helper tools

Post Reply