The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Birthdays = Array?
Hi,
I'm currently running vB 3.7.3. On the bottom of my forum index, birthdays show up as "Array" instead of listing the birthdays of the forum members. Looks like this: Below is my site's birthday.php Code:
$tdate = vbdate('Y-m-d', TIMENOW, false, false); if (!is_array($vbulletin->birthdaycache) OR ($tdate != $vbulletin->birthdaycache['day1'] AND $tdate != $vbulletin->birthdaycache['day2'])) { include_once('./includes/functions_databuild.php'); $vbulletin->birthdaycache = build_birthdays(); } switch($tdate) { case $vbulletin->birthdaycache['day1']: $birthdays =& $vbulletin->birthdaycache['users1']; break; case $vbulletin->birthdaycache['day2']; $birthdays =& $vbulletin->birthdaycache['users2']; break; } $show['tablerow'] = true; $birthdays_str = ''; // Birthdays change from a string to array in vB 3.7 RC3 if (is_array($birthdays)) { if (empty($birthdays)) { $birthdays_str = $vbphrase['none']; } else { foreach ($birthdays AS $birthkey => $birthinfo) { $birthdays_str .= '<a href="' . $vbulletin->options['bburl'] . '/member.php?' . $vbulletin->session->vars['sessionurl'] . 'u=' . $birthinfo['userid'] . '">' . $birthinfo['username'] . '</a>' . iif($birthinfo['age'], ' (' . $birthinfo['age'] . ')') . '<br />'; } } } else if ($birthdays) { $birthdays_str = str_replace(array('member.php', ','), array($vbulletin->options['bburl'] . '/member.php', '<br />'), $birthdays); } else { $birthdays_str = $vbphrase['none']; } ($hook = vBulletinHook::fetch_hook('vba_cmps_module_birthdays')) ? eval($hook) : false; $home[$mods['modid']]['content'] = $birthdays_str; |
#2
|
||||
|
||||
The only place I have birthday.php is in my includes/cron folder and it looks nothing like your birthday.php file- is this from some sort of mod?
|
#3
|
||||
|
||||
Sorry about that, I posted the wrong one.
Code:
// ######################################################################## // ######################### START MAIN SCRIPT ############################ // ######################################################################## $today = date('m-d', TIMENOW); $ids = '0'; foreach($vbulletin->usergroupcache AS $usergroupid => $usergroup) { if ($usergroup['genericoptions'] & $vbulletin->bf_ugp_genericoptions['showbirthday'] AND !in_array($usergroup['usergroupid'], array(1, 3, 4))) { $ids .= ",$usergroupid"; } } $birthdays = $vbulletin->db->query_read(" SELECT username, email, languageid FROM " . TABLE_PREFIX . "user WHERE birthday LIKE '$today-%' AND (options & " . $vbulletin->bf_misc_useroptions['adminemail'] . ") AND usergroupid IN ($ids) "); vbmail_start(); while ($userinfo = $vbulletin->db->fetch_array($birthdays)) { $username = unhtmlspecialchars($userinfo['username']); eval(fetch_email_phrases('birthday', $userinfo['languageid'])); vbmail($userinfo['email'], $subject, $message); $emails .= iif($emails, ', '); $emails .= $userinfo['username']; } vbmail_end(); if ($emails) { log_cron_action($emails, $nextitem, 1); } |
#4
|
||||
|
||||
My file is identical except the first if statement for me is:
Code:
if ($usergroup['genericoptions'] & $vbulletin->bf_ugp_genericoptions['showbirthday'] AND $usergroup['genericoptions'] & $vbulletin->bf_ugp_genericoptions['isnotbannedgroup'] AND !in_array($usergroup['usergroupid'], array(1, 3, 4))) |
#5
|
||||
|
||||
I tried changing the first if-statement with the one you had and reuploading it, but the birthdays are still showing up as "Array" on the forum index.
|
#6
|
||||
|
||||
did you run the birthday scheduled task manually after making the change?
|
#7
|
|||
|
|||
Did you verify that you forumhome & forumhome_birthdaybit templates are correct and not missing any closing </if> statements?
Backup your forumhome & forumhome_birthdaybit templates and then revert them. |
#8
|
|||
|
|||
If you are looking at the forum index, you should be looking at index.php and I don't think the snippet you provided is from there - it looks like cron file to send out emails.
|
#9
|
|||
|
|||
Make sure your index.php is the default file for the version you are using.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|