vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Looking For Birthday Hack (https://vborg.vbsupport.ru/showthread.php?t=49030)

Xenon 02-18-2003 12:57 PM

hmm try this.
open admin/functions.php
find:
PHP Code:

// ##################### Save birthdays into template ###################
function getbirthdays() {
  global 
$timeoffset$DB_site;

  
$btoday date("Y-m-d",time()+(-12-$timeoffset)*3600) . '|||';
  
$btoday .= date("Y-m-d",time()+(12-$timeoffset)*3600) . '|||';

  
$todayneggmt date("m-d",time()+(-12-$timeoffset)*3600);
  
$todayposgmt date("m-d",time()+(12-$timeoffset)*3600);

  
$bdays $DB_site->query("SELECT username,userid,birthday
                            FROM user
                            WHERE birthday LIKE '%-
$todayneggmt'
                              OR birthday LIKE '%-
$todayposgmt'"); 

and change to:
PHP Code:

// ##################### Save birthdays into template ###################
function getbirthdays() {
  global 
$timeoffset$DB_site;

  
$btoday date("Y-m-d",time()+(-12-$timeoffset)*3600) . '|||';
  
$btoday .= date("Y-m-d",time()+(12-$timeoffset)*3600) . '|||';

  
$todayneggmt date("Y-m-d",time()+(-12-$timeoffset)*3600);
  
$todayposgmt date("Y-m-d",time()+(12-$timeoffset)*3600);

  
$bdays $DB_site->query("SELECT username,userid,birthday
                            FROM user
                            WHERE birthday = '
$todayneggmt'
                              OR birthday = '
$todayposgmt'"); 


pifemaster 02-18-2003 01:55 PM

Xenon,

I made the change, when I went to my calendar the date still shows up under "each year". When I went to my profile & attempted to change my date to "February 18, 2003" it gave me the following error message:

Database error in vBulletin 2.3.0:

Invalid SQL: SELECT username,userid,birthday
FROM user
WHERE birthday = 2003-02-17'
OR birthday = 2003-02-18'
mysql error: You have an error in your SQL syntax near ''
OR birthday = 2003-02-18'' at line 3

mysql error number: 1064

Any ideas.

Thank you,
Robert Pfeifer

pifemaster 02-18-2003 02:09 PM

Xenon,

I reinstalled the "original" backup I made of "admin/functions.php" and the error goes away. But date shows up on home page of forum & on calendar for every year.

Thank you,
Robert Pfeifer

Xenon 02-18-2003 06:41 PM

you've made an mistake and deletete the single ' in front of the $today...

pifemaster 02-18-2003 07:08 PM

Xenon,

You were very correct. I did screw up & miss the '

I uploaded the new file & now the birthdate does not show up on the home page at all (even if the year is current) & still shows up on the calendar for each year.

Thank you,
Robert Pfeifer

Xenon 02-18-2003 07:11 PM

hmm weird...

don't have any further ideas..


All times are GMT. The time now is 05:28 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.01509 seconds
  • Memory Usage 1,742KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete