Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Automatic Birthday Thread Details »»
Automatic Birthday Thread
Version: 1.00, by ChurchMedia ChurchMedia is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 03-17-2004 Last Update: Never Installs: 115
 
No support by the author.

This hack is inspired by the Birthday Hack for vB2 by Logician. It will automatically create a Happy Birthday thread in a specified forum, listing the people with birthdays for that day. Then other members can post their happy birthday wishes in the thread.

I had the original hack installed on my VB2 board and when I upgraded to VB3 my members missed it. Luckily, it's really easy to implement.

--------------------------------------
Files to modify: /includes/cron/birthday.php
--------------------------------------

Instructions are in the attached text file. The mod should take about 5 minutes.

Be sure to change the variables that say // CHANGE ME

You can customize the message in the $birthday_greeting_thread variable. You could also ad IMG tags with an image of some kind, like in my screenshot.

Note that you MUST turn on BB CODE in you birthday forum in order for this to work properly.
--------------------------------------
Enjoy (and thanks for the inspiration, Logician!)
--------------------------------------

New in Version 2.0:

Bug fixes:
> More accurate age calculation. Sometimes it was a year off.
> The correct thread shows up in the last thread post on the forum home page.
> HTML is not required to be turned on in the birthday forum.
> Most of the code is completely rewritten to vB3 standards.

New features:
> Improved look
> Birthday line now says: (User) was born on (date), (AGE: xx)
> If the year is not given, it says "Not telling! " for age.
> The admin is emailed a list of the birthdays with links to their profiles and a link to the happy birthday thread.
> If you use the uShop/uCash hack, you can give birthday points to the users

Upgrading:

Since the code has changed so drastically, I suggest starting with a fresh copy of birthday.php and following the instructions for a new install.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #102  
Old 09-16-2004, 07:10 AM
bspiller82's Avatar
bspiller82 bspiller82 is offline
 
Join Date: Jul 2002
Location: McHenry, Illinois
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works good now. Is there a way to force it to tell the age so it doesn't say
(Age: Not telling! )?
Reply With Quote
  #103  
Old 09-16-2004, 02:49 PM
ChurchMedia's Avatar
ChurchMedia ChurchMedia is offline
 
Join Date: Dec 2002
Location: Las Cruces, NM
Posts: 473
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bspiller82
Works good now. Is there a way to force it to tell the age so it doesn't say
(Age: Not telling! )?
Not if they didn't give their birth year -- there's no way to calculate it. You can change the "not telling" message to something else if you want. Just search the script for "Not telling!" and change it to "Year not given" or whatever.

Enjoy,
Reply With Quote
  #104  
Old 09-24-2004, 08:25 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a small problem. The email, the thread states the correct date but in the posts it shows as

Here are today's birthdays:

was born on November 30 (Age: Not telling! )

missing the username, the age. Sometimes the age states 30 when it should have been 40
Reply With Quote
  #105  
Old 09-24-2004, 11:00 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am using 3.01 and all I am getting for username is a blank and date is way off. Age does not display, even though the year is specified.
Reply With Quote
  #106  
Old 09-24-2004, 11:55 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, works for me now. I was placing code before {

also the instructions are missing
$bday_title .= $username.", ";
that I found in one of the post

Great hack, thanks.
Reply With Quote
  #107  
Old 09-25-2004, 01:18 AM
MysticMoon's Avatar
MysticMoon MysticMoon is offline
 
Join Date: Aug 2004
Location: Michigan, USA
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack & had no problems with it.

I was wondering though, is it possible to change the post icon?
Right now it's using the standard icon1.gif & I'd like it to use a cupcake
one I have instead.

Thanks
Reply With Quote
  #108  
Old 09-29-2004, 06:05 PM
KW802's Avatar
KW802 KW802 is offline
 
Join Date: Jul 2003
Location: A galaxy far, far away...
Posts: 1,450
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lionel
ok, works for me now. I was placing code before {

also the instructions are missing
$bday_title .= $username.", ";
that I found in one of the post

Great hack, thanks.
ChurchMedia,

Thanks for the hack! You may want to fix the first post to have the above correction though. It threw me off also.

Kevin
Reply With Quote
  #109  
Old 10-07-2004, 01:33 PM
KW802's Avatar
KW802 KW802 is offline
 
Join Date: Jul 2003
Location: A galaxy far, far away...
Posts: 1,450
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MysticMoon
Great hack & had no problems with it.

I was wondering though, is it possible to change the post icon?
Right now it's using the standard icon1.gif & I'd like it to use a cupcake
one I have instead.

Thanks
MysticMoon,

In the /includes/cron/birthday.php file find.....
Quote:
// Creating Thread
$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "thread(title, lastpost, forumid, open, replycount, postusername, postuserid, lastposter, dateline,iconid, visible)
VALUES
('" . addslashes(htmlspecialchars($title3)) . "', " . TIMENOW . ", $greetings_forum,
1, 0, '". addslashes($greeter_name) ."', $greeter,
'". addslashes($greeter_name) ."', " . TIMENOW . ", 0, 1)");
$threadinfo['threadid'] = $DB_site->insert_id();

// Creating Post
$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "post(threadid, parentid, title, username, userid, dateline, pagetext, allowsmilie,
showsignature, ipaddress, iconid, visible)
VALUES
($threadinfo[threadid], 0, '" . addslashes(htmlspecialchars($title3)) . "',
'" . addslashes($greeter_name) . "', $greeter, " . TIMENOW . ",
'" . addslashes($birthday_greeting_thread) . "', 1, 1, 0, 0, 1)");
$post['postid'] = $DB_site->insert_id();
.... and change the two zeros that are highlighted to instead be the iconid of the new icon you want to use.
Reply With Quote
  #110  
Old 10-07-2004, 03:11 PM
ChurchMedia's Avatar
ChurchMedia ChurchMedia is offline
 
Join Date: Dec 2002
Location: Las Cruces, NM
Posts: 473
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lionel
also the instructions are missing
$bday_title .= $username.", ";
that I found in one of the post
I fixed it in the instructions. Sorry about that!
Reply With Quote
  #111  
Old 10-07-2004, 05:44 PM
Megareus Rex's Avatar
Megareus Rex Megareus Rex is offline
 
Join Date: Feb 2004
Location: Pennsylvania, USA
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see the creator of the hack has 3.0 Gold. Any plans to modify the hack to work on 3.0.3? (The code for birthday.php has changed some, so I'm not sure how to do it now.)
Reply With Quote
Reply

Thread Tools

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 05:15 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.04534 seconds
  • Memory Usage 2,306KB
  • Queries Executed 25 (?)
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
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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