Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Add seasonal images to your forum Details »»
Add seasonal images to your forum
Version: 1.00, by tgmorris tgmorris is offline
Developer Last Online: Oct 2013 Show Printable Version Email this Page

Version: 3.5.2 Rating:
Released: 12-20-2005 Last Update: 12-21-2005 Installs: 7
Uses Plugins Template Edits
 
No support by the author.

This is a simple plugin and header template modification which can be added to any template where it made sense if desired.

What this does is use a plugin to determine the month and day and creates a variable that may then be used in templates to decide what, if any, images should be shown. The format of the returned date is 'mmdd'. At the moment I'm using it in my header template to display Christmas and New Years stuff but it can easily be augmented with any holiday images you wish.

Installation

1. Install the attached plugin.
2. Add the following to whatever template you desire and modify it accordingly based on the location of your special images.

HTML Code:
<!-- Holiday stuff -->
<if condition="$header_date_check >= '1220' AND $header_date_check <= '1225'">
        <tr>
          <td style="vertical-align: middle; background: #FFFFFF url(/Images/blinking_lights.gif) right no-repeat" height="18"><img src="$vboptions[cleargifurl]" width="760" height="1" alt="" />
          </td>
        </tr>
</if>
<if condition="$header_date_check == '1231' OR $header_date_check == '0101'">
        <tr>
          <td style="vertical-align: middle; background: #FFFFFF url(/Images/newyear.gif) center no-repeat" height="57"><img src="$vboptions[cleargifurl]" width="760" height="1" alt="" />
          </td>
        </tr>
</if>
<!-- / Holiday stuff -->
Notes

The way the template is currently written it's designed to fit within a table (I have mine under the navbar) but it can easily be modified to work in all situations.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 12-21-2005, 05:34 PM
Feckie (Roger)'s Avatar
Feckie (Roger) Feckie (Roger) is offline
 
Join Date: May 2005
Location: Dublin Eire
Posts: 392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm

Doesn't seem to show up
added to header
installed plugin
uploaded images and location changed

But Nothing
Reply With Quote
  #3  
Old 12-21-2005, 06:13 PM
tgmorris tgmorris is offline
 
Join Date: Nov 2003
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Feckie (Roger)
Hmmm

Doesn't seem to show up
added to header
installed plugin
uploaded images and location changed

But Nothing
I know it's obvious, did you make sure the plugin was set to "active"? It should be by default but one never knows.
Reply With Quote
  #4  
Old 12-21-2005, 06:34 PM
Azhrialilu's Avatar
Azhrialilu Azhrialilu is offline
 
Join Date: Aug 2003
Location: Stretton, Derbyshire
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would we need to change the date format to 2512, for example, in the UK as our dates are the opposite way around?
Reply With Quote
  #5  
Old 12-21-2005, 06:59 PM
tgmorris tgmorris is offline
 
Join Date: Nov 2003
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Azhrialilu
Would we need to change the date format to 2512, for example, in the UK as our dates are the opposite way around?
You shouldn't as the plugin converts the date using the 'md' format which should force it to the put it into how the template expects it to be. However feel free to modify the plugin format as well as the template if it makes it easier for you to work with that order.
Reply With Quote
  #6  
Old 12-21-2005, 07:05 PM
Feckie (Roger)'s Avatar
Feckie (Roger) Feckie (Roger) is offline
 
Join Date: May 2005
Location: Dublin Eire
Posts: 392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tgmorris
I know it's obvious, did you make sure the plugin was set to "active"? It should be by default but one never knows.
Yep it is set to active
Reply With Quote
  #7  
Old 12-21-2005, 07:27 PM
tgmorris tgmorris is offline
 
Join Date: Nov 2003
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, you might try removing the conditional just to make sure the image shows correctly.
Reply With Quote
  #8  
Old 12-21-2005, 07:40 PM
Feckie (Roger)'s Avatar
Feckie (Roger) Feckie (Roger) is offline
 
Join Date: May 2005
Location: Dublin Eire
Posts: 392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok I got it to work

Just put it inside Table Tags and bingo

Would like to have it centered oBut no matter what I do
It is always left aligned

Any Idea's
Reply With Quote
  #9  
Old 12-21-2005, 07:47 PM
Feckie (Roger)'s Avatar
Feckie (Roger) Feckie (Roger) is offline
 
Join Date: May 2005
Location: Dublin Eire
Posts: 392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok I Got that sorted to

Learning fast he he
Reply With Quote
  #10  
Old 12-22-2005, 12:44 PM
GuaRRand GuaRRand is offline
 
Join Date: Oct 2005
Posts: 337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

screenshots?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:15 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06622 seconds
  • Memory Usage 2,295KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_html
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete