Version: 1.00, by ZexTasy
Developer Last Online: Feb 2011
Category: vBulletin CMS Widgets -
Version: 4.0.8
Rating:
Released: 12-09-2010
Last Update: 12-09-2010
Installs: 49
Uses Plugins Template Edits
Translations
No support by the author.
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 -
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')
{
$cache[] = 'forumhome_birthdaybit';
}
Plugin is Active - Yes
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);
// ### TODAY'S BIRTHDAYS #################################################
if (vB::$vbulletin->options['showbirthdays'])
{
if (!is_array(vB::$vbulletin->birthdaycache)
OR ($today != vB::$vbulletin->birthdaycache['day1'] AND $today != vB::$vbulletin->birthdaycache['day2'])
OR !is_array(vB::$vbulletin->birthdaycache['users1'])
)
{
// Need to update!
require_once(DIR . '/includes/functions_databuild.php');
$birthdaystore = build_birthdays();
DEVDEBUG('Updated Birthdays');
}
else
{
$birthdaystore = $vbulletin->birthdaycache;
}
switch ($today)
{
case $birthdaystore['day1']:
$birthdaysarray = $birthdaystore['users1'];
break;
case $birthdaystore['day2']:
$birthdaysarray = $birthdaystore['users2'];
break;
I'm on 4.1.5 and I cant get this widget to display. Even before when I was on 4.1.2 it didn't work.
I have followed the instructions to the letter, even removed it and reinstalled several times to be sure I didn't miss anything.
I can see some post here that people only see it after clearing CMS cache but not even that helps in my case.
What can I do to help you help me?
I have checked that birthdays are activated in the settings as well, both under general settings and under usergroup settings.
Uninstalled on 4.2.1 (widget block shows but does not display birthday despite test user birthday. It's not a cache clearing issue. The mod simply doesn't work.