Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 02-17-2003, 04:31 PM
pifemaster pifemaster is offline
 
Join Date: Feb 2003
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Looking For Birthday Hack

Hello,

I am very new to this, so please bear with me if my questions seem foolish.

I am a disc jockey & I am setting up a new bulletin board (Vbulletin 2.3.0) which will be a wedding information forum.

I would like to Replace the "birthday" Section of the "edit Profile" page to reflect a "Wedding Date". I can not find where to change the following text in the "edit profile" page:

Birthdate:
If you select your birthday then other forum members will be able to see your birthday on the forum calendar and in your profile. Adding your year of birth is also optional.

I have located & changed the text to display on the Forum home page & the calendar page to show the words "Today's Wedding" instead of "Today's Birthdays" but I'm not sure where else I may need to make these changes.

Any help would be appriciated.

Thank you,
Robert Pfeifer
Reply With Quote
  #2  
Old 02-17-2003, 04:54 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, the easiest way is to use the searchengine for templates in the cp, just search for birthday and change where needed.

Be sure just to change the text birthday, not any variable names...
Reply With Quote
  #3  
Old 02-17-2003, 04:55 PM
pifemaster pifemaster is offline
 
Join Date: Feb 2003
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for the quick response,

I will give that a try.

Robert Pfeifer
Reply With Quote
  #4  
Old 02-17-2003, 06:22 PM
pifemaster pifemaster is offline
 
Join Date: Feb 2003
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Xenon,

The tip you gave worked out great. I was able to change all occurances of the word "birthday" to reflect "Wedding".

However, (and you almost had to know there would be a "however" involved, Ha Ha) When I enter an upcoming wedding date (which would be in the future) and I view the user profile, the year is left out (apparently since it is in the future) I would like to change this so it will indicate the year even if in the future. It does show the month & day entered and as long as I enter a date prior to todays date, it does then show the year.

Can you help?
Reply With Quote
  #5  
Old 02-17-2003, 07:20 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you're welcome

and yes i know what you mean and i think i can help you

open member.php
find:
PHP Code:
        if (date("Y")>$birthday[0] && $birthday[0]!='0000')
           
$year $birthday[0]; 
and change it to:
PHP Code:
        if ($birthday[0]!='0000')
           
$year $birthday[0]; 
Reply With Quote
  #6  
Old 02-17-2003, 07:52 PM
pifemaster pifemaster is offline
 
Join Date: Feb 2003
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Xenon,

That worked great for when I go in to view my own profile I now see the year "2004" I entered. However when I click to view another members profile. I still only see the Day & Month and not the 2004.

I would like the 2004 to show up when any member views another members profile so the know if they are getting married in 2004, 2005 Etc.

I do like the results of what you gave me so far, because I was not happy that after you saved a date in your profile, the year disappeared.

Would you know what I would need to edit to view the "Future" year in someone elses public profile.

Thank you very much!!
Robert Pfeifer
Reply With Quote
  #7  
Old 02-17-2003, 08:01 PM
pifemaster pifemaster is offline
 
Join Date: Feb 2003
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Xenon,

I did a little looking in the member.php file that I just changed. I think I might have stumbled on something. I know next to nothing about programing code so I could be in left field but, does the below code possibly affect my situation?

// Birthday Stuff...
if ($calbirthday == 1) {
if ( ($day == -1 and $month != -1) or ($day !=-1 and $month == -1) ) {
eval("standarderror(\"".gettemplate("error_birthda yfield")."\");");
exit;
}
if (($day == -1) and ($month==-1)) {
$birthday = 0;
} else {
if (($year>1901) and ($year<date("Y")))
$birthday = $year . "-" . $month . "-" . $day;
else
$birthday = "0000" . "-" . $month . "-" . $day;
}
} else {
$birthday = 0;

Thank again,
Robert Pfeifer
Reply With Quote
  #8  
Old 02-17-2003, 08:10 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

change this:
PHP Code:
if (($year>1901) and ($year<date("Y"))) 
into this:
PHP Code:
if ($year>1901
Reply With Quote
  #9  
Old 02-17-2003, 08:32 PM
pifemaster pifemaster is offline
 
Join Date: Feb 2003
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Xenon,

Hate to bother you again, but that did not correct the issue. I did also locate the floowing in the member.php file. This is under the "getinfo" section:

// Set birthday fields right here!
if ($userinfo[birthday] == '0000-00-00') {
$birthday = "N/A";
} else {
$bday = explode("-",$userinfo[birthday]);
if (date("Y")>$bday[0] and $bday[0]>1901 && $bday[0]!='0000') {
$birthday = @date($calformat2,mktime(0,0,0,$bday[1],$bday[2],1993)) . ', ' . $bday[0];
} else {
// lets send a valid year as some PHP3 don't like year to be 0
// $calformat2 should not contania year identifier so the year doesn't matter
$birthday = @date($calformat2,mktime(0,0,0,$bday[1],$bday[2],1993));
}
if ($birthday=="") {
$birthday="$bday[1]-$bday[2]-$bday[0]";
}
}
eval("\$birthday = \"".gettemplate("getinfo_birthday")."\";");
} else {
$birthday = '';
}

Thank you,
Robert Pfeifer
Reply With Quote
  #10  
Old 02-18-2003, 12:13 PM
pifemaster pifemaster is offline
 
Join Date: Feb 2003
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Xenon,

I played around last night & changed:

if (date("Y")>$bday[0] and $bday[0]>1901 && $bday[0]!='0000')

To this:

if ($bday[0]!='0000')

and it seems to be working great. However, (there's that darn however again) the only other thing I noticed is, when I enter a date in my profile such as "October 16, 2004" it will show up on the calendar under October 16 for every year (as a birthday normally would) I would like to change this to show up on the calendar for 2004 only (or what ever year is entered on their profile). Also, when it shows up on the forum home page under what used to be "Todays Birthdays" I would like it to only show up when the Month, Day & YEAR entered in the profile is = todays date.

I hope you can understand this.

Thanks again,
Robert Pfeifer
Reply With Quote
Reply

Thread Tools
Display Modes

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 08:55 AM.


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.05519 seconds
  • Memory Usage 2,252KB
  • 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
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete