Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-19-2007, 07:01 PM
BecomeUnbroken BecomeUnbroken is offline
 
Join Date: Jun 2007
Location: Miami, FL
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default This month's birthdays / Upcoming Birthdays

I've been searching the forums for about 30min now and can't find anything..

I want to create a section in 'What's going on'.. that shows "This month's birthdays" and list all the birthdays for the current month..

or maybe even better an "Upcoming Birthdays" section which shows birthdays in the next XX days..

It seems like a simple idea.. I will try to figure it out.. but a little help from you "pros" would be appreciated..

Regards,
Reply With Quote
  #2  
Old 09-21-2007, 04:47 PM
BecomeUnbroken BecomeUnbroken is offline
 
Join Date: Jun 2007
Location: Miami, FL
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've been trying to figure out a way but i am stuck... I think I might try to make a VBadvanced module instead of moding the What's going on section...

Can anyone help?
Reply With Quote
  #3  
Old 09-21-2007, 05:09 PM
WhaLberg's Avatar
WhaLberg WhaLberg is offline
 
Join Date: Nov 2006
Location: Dersaadet
Posts: 569
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is the phpcode you need. Edit it for your own need.

PHP Code:
$month date("m");
$find $db->query_read("SELECT userid,username,birthday FROM " TABLE_PREFIX "user WHERE birthday LIKE '$month-%'");
while (
$user $db->fetch_array($find)) 
{
    
$userid $user['userid'];
    
$username $user['username'];
    
$birthday $user['birthday'];
    
$birthday explode("-"$birthday);
    
$birthmonth $birthday[0];
    if (
$birthmonth $month
    {
        echo 
"<a href='member.php?u=$userid'>$username</a>,&nbsp;";
    }
    

Reply With Quote
  #4  
Old 09-21-2007, 05:22 PM
BecomeUnbroken BecomeUnbroken is offline
 
Join Date: Jun 2007
Location: Miami, FL
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WhaLberg View Post
Here is the phpcode you need. Edit it for your own need.

PHP Code:
$month date("m");
$find $db->query_read("SELECT userid,username,birthday FROM " TABLE_PREFIX "user WHERE birthday LIKE '$month-%'");
while (
$user $db->fetch_array($find)) 
{
    
$userid $user['userid'];
    
$username $user['username'];
    
$birthday $user['birthday'];
    
$birthday explode("-"$birthday);
    
$birthmonth $birthday[0];
    if (
$birthmonth $month
    {
        echo 
"<a href='member.php?u=$userid'>$username</a>,&nbsp;";
    }
    


I love you.. I will try it when i got out of work this afternoon!! :up::up:
Reply With Quote
  #5  
Old 12-27-2007, 12:36 PM
riverplate.com riverplate.com is offline
 
Join Date: Nov 2007
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, I have this code in Todays Birthdays module in FORMUDISPLAY template... where I have to insert that phpcode??:

<!-- today's birthdays -->
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_birthdays')"><img id="collapseimg_forumhome_birthdays" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_birthdays].gif" alt="" border="0" /></a>
$vbphrase[todays_birthdays]
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_birthdays" style="$vbcollapse[collapseobj_forumhome_birthdays]">
<tr>
<td class="alt2" align="center"><a href="calendar.php?$session[sessionurl]do=getday&amp;day=$today&amp;sb=1"><img src="$stylevar[imgdir_misc]/birthday.gif" alt="$vbphrase[view_birthdays]" border="0" /></a></td>
<td class="alt1" width="100%"><div class="smallfont">$birthdays</div></td>
</tr>
</tbody>
<!-- end today's birthdays -->

Thank you very much!

Federico
www.riverplate.com
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 01:23 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03658 seconds
  • Memory Usage 2,217KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete