vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Birthdays = Array? (https://vborg.vbsupport.ru/showthread.php?t=246113)

ElfenLied1337 07-08-2010 01:25 AM

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:

https://vborg.vbsupport.ru/external/2010/07/30.png

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;

How can I make it so it lists the birthdays instead of it displaying "Array" for each day? Any help is appreciated... thanks.

ElfenLied1337 07-09-2010 05:40 AM

er... bump?

ElfenLied1337 07-11-2010 02:27 PM

No one can help?

snakes1100 07-11-2010 02:49 PM

Well, you should post this in the vb3 programming forum, not in the general suggestion forum, i believe you will get more help there.

ElfenLied1337 07-11-2010 02:55 PM

Ok I'll try there, thanks.


All times are GMT. The time now is 02:34 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.01026 seconds
  • Memory Usage 1,720KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete