vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Add seasonal images to your forum (https://vborg.vbsupport.ru/showthread.php?t=103454)

tgmorris 12-20-2005 10:00 PM

Add seasonal images to your forum
 
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.

Feckie (Roger) 12-21-2005 05:34 PM

Hmmm

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

But Nothing

tgmorris 12-21-2005 06:13 PM

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.

Azhrialilu 12-21-2005 06:34 PM

Would we need to change the date format to 2512, for example, in the UK as our dates are the opposite way around?

tgmorris 12-21-2005 06:59 PM

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.

Feckie (Roger) 12-21-2005 07:05 PM

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

tgmorris 12-21-2005 07:27 PM

Well, you might try removing the conditional just to make sure the image shows correctly.

Feckie (Roger) 12-21-2005 07:40 PM

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

Feckie (Roger) 12-21-2005 07:47 PM

Ok I Got that sorted to

Learning fast he he

GuaRRand 12-22-2005 12:44 PM

screenshots?


All times are GMT. The time now is 10:24 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.01069 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete