Designing and Development > SMF Support - Simple Machine Forums

SMF and CSS/PHP Help

(1/1)

Smythe:
Greetings,

     I am using the PremiumMGC template for my SMF Forum, with TinyPortal add-on, and I have a general question regarding ONE, CSS change...lol been searching the internet like crazy and figured that this might be the best place to ask.

     I want to change the background of the theme monthly using css. I have looked on the net and found a way to make the background image change each time the page is refreshed however I would like it to select a SPECIFIC image based on the current month...server side or user side whichever is easier. I have tried many options however I can't get it to work. I am no coding guru, everything I have learned is self taught.

     I would greatly appreciate any assistance that could be offered with this query.

Smythe

Edit:.... add code that I am trying


--- Code: ---<?php


 // Image File Ext.
 
$extList = array();
$extList['gif'] = 'image/gif';
$extList['jpg'] = 'image/jpeg';
$extList['jpeg'] = 'image/jpeg';
$extList['png'] = 'image/png';

//today and Image to use per today

$month = date('m');
printf('$month');

if ($month == 01) {
$image = "01.jpg";
}
elseif ($month == 02) {
$image = "02.jpg";
}
elseif ($month == 03) {
$image = "03.jpg";
}
elseif ($month == 04) {
$image = "04.jpg";
}
elseif ($month == 05) {
$image = "05.jpg";
}
elseif ($month == 06) 
{$image = "06.jpg";
}
elseif ($month == 07) {
$image = "07.jpg";
}
elseif ($month == 08) {
$image = "08.jpg";
}
elseif ($month == 09) {
$image = "09.jpg";
}
elseif ($month == 10) {
$image = "10.jpg";
}
elseif ($month == 11) {
$image = "11.jpg";
}
elseif ($month == 12) {
$image = "12.jpg";
}

?>
--- End code ---

Navigation

[0] Message Index

Go to full version