Widget - Today's Birthdays
First I want to thank Lynne for giving me a good startup for both code and this post from her Widget - Online Users mod.
This is a widget for your CMS pages to show Today's Birthdays. You will need to Create a new Template (vbcms_widget_execphp_birthdays), Cache the template, Create a new Widget (Today's Birthdays), Configure the Widget, and then finally add the Widget to your Layout (I am not including instructions for that, you should know how to add Widgets to Layouts). 1.0 2010-12-10: First version (4.0.8) INSTALL INSTRUCTIONS: 1) Create a new Template Styles & Templates > select style (I like to do this in the MASTER STYLE, but you will need to reinput it after every upgrade) > Add Template Title - vbcms_widget_execphp_birthdays Template code - HTML Code:
<vb:if condition="$show['birthdays']"> <div class="cms_widget category_widget"> <div class="block"> <div class="cms_widget_header"> <h3><img src="{vb:stylevar imgdir_misc}/birthday.png" alt="{vb:rawphrase todays_birthdays}" /> {vb:rawphrase todays_birthdays}</h3> </div> <div class="cms_widget_content widget_content"> <div> <ol class="commalist"> {vb:raw birthdays} </ol> </div> </div> </div> </div> </vb:if> 2) Create a new Plugin Plugins & Products > Add New Plugin > leave everything default except: Hook Location - cache_templates Title - Cache template for Today's Birthdays Widget Plugin PHP code - PHP Code:
if (THIS_SCRIPT == 'vbcms')
3) Create a new Widget vBulletin CMS > Widgets > Create New Widget Widget Type - PHP Direct Execution Title - Today's Birthdays SAVE 4) Configure the Widget Now go to vBulletin CMS > Widgets > Today's Birthdays > Configure Change the Template Name to - vbcms_widget_execphp_birthdays Add the following code - PHP Code:
$today = vbdate('Y-m-d', TIMENOW, false, false);
Download
widget-birthdays 1.0.txt (3.2 KB, 190 downloads) Screenshots |
Similar Mods
Mini Mods Number of Today's Birthdays on FORUMHOME | Modification Graveyard |