2016-09-10, 02:14 PM
2016-09-10, 02:16 PM
(2016-09-10, 02:14 PM)shattered Wrote: [ -> ]wait, i meant the bk.jpg
bk.jpg What do you mean?
2016-09-10, 02:18 PM
2016-09-10, 02:21 PM
Go to the new.css in the project theme section. Look for topbar and you will see ../../../images/project/hbg.jpg you want it to be ../../../images/project/bk.jpg
http://crystalforums.cf/forums/images/project/hbg.jpg
Is what you have as the background for the logo right now...I would suggest changing that first and then go back to the other code.
http://crystalforums.cf/forums/images/project/hbg.jpg
Is what you have as the background for the logo right now...I would suggest changing that first and then go back to the other code.
2016-09-10, 02:33 PM
(2016-09-10, 12:02 PM)SentoWeb Wrote: [ -> ]I set the background to logo image to the logo.php link and i got this(2016-09-10, 09:06 AM)shattered Wrote: [ -> ](2016-09-10, 08:50 AM)SentoWeb Wrote: [ -> ]jQuery(document).ready(function($){ var dt = new Date(); var currentHour = dt.getHours(); $("#logo img").attr('src', 'http://crystalforums.cf/logo/logo_' + currentHour + '.png'); $('body').css('background', '#FFF url(http://crystalforums.cf/bk/bg_'+currentHour+'.png) no-repeat center center fixed'); $('body').css('background-size', 'cover'); });
Fixed it for you, you needed to swap the "," with a ";" between the two variable declarations. With multiple declarations you don't have to repeat "var" for every variables, I still prefer simple declarations.
THANK YOU, JUST ONE FINAL THING. How would i update the bk.png? I got the logo and background but there is that image behind the logo called bk.jpg and i want to update that every 24hrs as well. I'm using the latest version of the Project theme.'.
I assume you want to update that before it is shown to the user. You could create a simple PHP file to redirect all your requests to your desired logo URL:
/logo.php
$logo = "images/bk_".date("j").".jpg"; header('Location: http://yourforum.com/'.$logo);
Then you can set the logo url to yourforum.com/logo.php. Not the most elegant solution but you can perform even more advanced checks and decide which logo to show.
An alternative is to create a MyBB plugin which sets the value of $myLogo using the same logic, then you can swap $theme['logo'] with that variable, saving you a HTTP request.
Bump plz
2016-09-18, 02:07 AM
How would i apply this to admincp?
Login and dashboard
bumpp
Login and dashboard
bumpp
2016-09-24, 12:04 AM
bumpp