MyBB Community Forums

Full Version: is there?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
wait, i meant the bk.jpg
(2016-09-10, 02:14 PM)shattered Wrote: [ -> ]wait, i meant the bk.jpg

bk.jpg What do you mean?
(2016-09-10, 02:16 PM)Phillip. Wrote: [ -> ]
(2016-09-10, 02:14 PM)shattered Wrote: [ -> ]wait, i meant the bk.jpg

bk.jpg What do you mean?

I'm using the project theme, right? There is an image behind the logo that is called bk.jpg. I want to change the link of that within the source to logo.php
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.
(2016-09-10, 12:02 PM)SentoWeb Wrote: [ -> ]
(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.
I set the background to logo image to the logo.php link and i got this


[Image: 33bdb880f8944d2096c629774fc341ec.png]

Bump plz
How would i apply this to admincp?

Login and dashboard

bumpp
bumpp
Pages: 1 2 3