News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Background Image/Color Changer

Started by - = Orfeo = -, October 27, 2009, 05:06:08 PM

Previous topic - Next topic

Yahmez

Nice job tintin16!  :D That's such a simple solution that even I can understand it.

- = Orfeo = -


Arantor

Good solution, though you'll have to modify that for each theme you want.

NB the solution I was pushing for would be theme independent and also less likely to interfere with other mods that you may install.

- = Orfeo = -

Mmmmmm........Arantor, if you can see this post, do you can help me?

I have a trouble, i don't know how to make a consult with the month or gender:

   $hour_block = date('H', forum_time());
         if ($hour_block < 6)


But with questions like whether a month is like to ... or if the user's sex equals to ......

Arantor

Checking against month is just a different letter in the first bit of date - date('n', forum_time()) will get you the current month.

Gender is much more complex. Off hand I'm not even sure it's loaded normally.

- = Orfeo = -

Quote from: Arantor on November 01, 2009, 03:03:51 PM
Checking against month is just a different letter in the first bit of date - date('n', forum_time()) will get you the current month.

Gender is much more complex. Off hand I'm not even sure it's loaded normally.

Thanks Arantor!!! but still i can't get the solution:

        if ($hour_block < 6)

How can i ask if the current month is "october" for example?  :(

Gender is no matter now  :P

Arantor

date('n', forum_time()) will give you a number from 1 to 12 which is the month, e.g. 10 for October.

So:
$month = date('n', forum_time());
if($month == 10) {

}

- = Orfeo = -

Quote from: Arantor on November 01, 2009, 04:26:29 PM
date('n', forum_time()) will give you a number from 1 to 12 which is the month, e.g. 10 for October.

So:
$month = date('n', forum_time());
if($month == 10) {

}


OOOOH THANKS THANKS THANKS ARANTOR! YOU'RE AWESOME!!  :D

Advertisement: