Our FamilyForum

FamilyForum Documentation & Help => FamilyForum Features & Guidelines => Code & Stuff => Topic started by: Ken on June 09, 2007, 01:57:52 PM

Title: Monthly Calendar pictures
Post by: Ken on June 09, 2007, 01:57:52 PM
Add the code below to your theme's Calendar.template.php where you want the pictures to appear.  I put the code right below the following line: global $context, $settings, $options, $txt, $scripturl, $modSettings, $months, $months_short, $days;

The code places a center aligned image right above the calendar table.  Then all you have to do is upload the pictures you want to use to the specified image directory.  Make sure the images are named after the month you want them to appear for. Example: January, February, etc.

With the code above all pictures must be jpg format. 

--------------------------------------

I would use:

echo '<div align="center"><img src="http://yourdomain.com/images/calendar/month', $context['current_month'], '.jpg" border="1" alt="" /></div>';

Because it's more valid xhtml, and it's more internationalizable.  Note that you have to use numbers now, for example month10.jpg.

-[Unknown]

http://www.simplemachines.org/community/index.php?topic=16959.0