Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Themes
Author Message
spasticdonkey
RavenNuke(tm) Development Team



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

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

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 www.clan-themes.co.uk" /></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 Visit poster's website
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

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

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

RavensScripts
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Themes

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©