форум vBSupport.ru > vBulletin > Вопрос — Ответ > Помогите найти!
  • »
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
 
 
 
 
Yurets
Простоузер
 
Yurets's Avatar
Default "Сегодня проставляются" или "Выводим ДР куда угодно".
0

Привествую всех форумчан!

Расковыряв calendar.php (vB 3.7.0) выдрал оттуда и немного модифицировал вывод именинников куда угодно (естественно при уже созданном подключении к БД форума).

PHP Code:
<?php // BIRTHDAY

                
$forumdir "http://mysite.by/forum";
                
                
$day date('d');
                
$month date('m');
                
$year date('Y');
                
                
            foreach(
$vbulletin->usergroupcache AS $usergroupid => $usergroup)
                {
                    if (
$usergroup['genericoptions'] & $vbulletin->bf_ugp_genericoptions['showbirthday'])
                        {
                            
$ids .= ",$usergroupid";
                        }
                }

            
$birthday $db->query_read_slave("SELECT birthday, username, userid, showbirthday
                                                FROM " 
TABLE_PREFIX "user
                                                WHERE birthday LIKE '
$month-$day-%' AND
                                                usergroupid IN (0
$ids) AND
                                                showbirthday IN (2,3)"
);
            
$total mysql_num_rows($birthday);
            
            echo 
"Сегодня проставляются (".$total."): ";
            
            while (
$birthdays $db->fetch_array($birthday))
                {    
                    
$userday explode('-'$birthdays['birthday']);
                    
$username $birthdays['username'];
                    
$userid $birthdays['userid'];
                    
$age '(' . ($year $userday[2]) . ')';
                    
$total $total 1;
                        if (
$total <> 0) {
                                
$comma ',';
                            }
                        else {
                                
$comma '.';
                            }
                    echo 
"<a href=\"$forumdir/member.php?u=$userid\" title=\"" $username "\">" $username "</a> " $age $comma;
                }
            
?>
Буду рад, если кому ещё пригодится.
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT +4. The time now is 06:54 AM.


Powered by vBulletin® Version Nulled Edition
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Loading...