Hi ZexTasy,
I want display winget in forum block. I have complet step 1,2 and 4. At step 4 I config:
Title: Today's Birthdays
Active: Yes
Content type: PHP
Content:
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;
default:
$birthdaysarray = array();
}
// memory saving
unset($birthdaystore);
$birthdaybits = array();
foreach ($birthdaysarray AS $birthday)
{
$templater = vB_Template::create('forumhome_birthdaybit');
$templater->register('birthday', $birthday);
$birthdaybits[] = $templater->render();
}
$birthdays = implode('', $birthdaybits);
$show['birthdays'] = iif ($birthdays, true, false);
}
else
{
$show['birthdays'] = false;
}
$birthdaysarray = array('birthdays' => $birthdays,
'show' => $show,
);
vB_Template::preRegister('vbcms_widget_execphp_birthdays', $birthdaysarray);
and other field is default.
After complete these step then nothing is happen. I do not know any mistake in these step.