PHP Web Host - Quality Web Hosting For All PHP Applications Clan Themes! We make clans look good!!
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1253
Location: Texas, USA

PostPosted: Mon Dec 29, 2008 6:26 pm Reply with quote Back to top

Was playing around with the CT_RN Theme a found a way to load a different header image for each day of the week as well as custom header images by module... Not sure if it's coded correctly and/or efficiently but it works without errors and it's kinda fun so i thought I'd share Smile

Sorry no working online model ATM but here it is for those interested.

Create header images for each day of the week and name them Monday.jpg, Tuesday.jpg, etc and place them in the themes/CT_RN/images directory. If you want custom header images for any specific modules create them and save as their module name (not custom module name), for example Forums.jpg, Clan_Roster.jpg, etc... Also upload to them to the themes/CT_RN/images directory.


Find in Theme.php (CT_RN)
Code:
      echo '</div>
      <div id="themecontainer">
      <!-- Banner -->
      <h1>
      <a href="./"><img src="themes/CT_RN/images/mainbanner.jpg" alt="A Free Theme By
Only registered users can see links on this board!
Get registered or login to the forums!
/></a>
      </h1>
      <!-- Spotlight Section -->
      <div id="spotlight">
      <span><span>&nbsp;</span>
      </span>
      <img src="themes/CT_RN/images/small_spotlight.gif" alt="Spotlight" class="overlay" />';


Replace With
Code:
// Change to the location of the folder containing the images, images must be named Monday.jpg, Tuesday.jpg, Forums.jpg, etc
$image_folder = 'themes/CT_RN/images';
if (file_exists($image_folder.'/'.$module_name.'.jpg')) {
  echo '</div>
      <div id="themecontainer">
      <!-- Banner -->
      <h1>
      <a href="./"><img src="'.$image_folder.'/'.$module_name.'.jpg" alt="'.$sitename.'" /></a>
      </h1>
      <!-- Spotlight Section -->
      <div id="spotlight">
      <span><span>&nbsp;</span>
      </span>
      <img src="themes/CT_RN/images/small_spotlight.gif" alt="Spotlight" class="overlay" />';
}
else {
$today = date('l');
  if (file_exists($image_folder.'/'.$today.'.jpg')) {
  echo '</div>
      <div id="themecontainer">
      <!-- Banner -->
      <h1>
      <a href="./"><img src="'.$image_folder.'/'.$today.'.jpg" alt="'.$sitename.'" /></a>
      </h1>
      <!-- Spotlight Section -->
      <div id="spotlight">
      <span><span>&nbsp;</span>
      </span>
      <img src="themes/CT_RN/images/small_spotlight.gif" alt="Spotlight" class="overlay" />';
}
}
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16976
Location: Kansas

PostPosted: Tue Dec 30, 2008 12:10 am Reply with quote Back to top

As always, thank you for giving back to the Community, especially the RavenNuke(tm) part Wink

RavensScripts
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum