Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

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
  #62  
Old 07-20-2004, 05:19 AM
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 jluerken
Hi there,

the post is done very well in my 3.0.3er Version but the Thread does not get a title on the forumhome.

Take a look at my screen and you will see!

Hmmmm.... I'm running vB 3.0.0 and not having that problem. Double-check the code. See my screenshot from today.


(Edit)
Oh -- you said you're running 3.0.3 (you might want to update your profile). I'm not sure -- maybe that's the problem. I won't know until I upgrade to 3.0.3, which won't be for a couple of months....
Reply With Quote
  #63  
Old 07-20-2004, 05:48 AM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I checked the code (its not so much ) and this is looking like yours!
Reply With Quote
  #64  
Old 07-20-2004, 05:52 AM
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 jluerken
I checked the code (its not so much ) and this is looking like yours!

Hmmmm..... I'm just not sure what the problem is, unless 3.0.3 handles something differently. Maybe someone familiar with 3.0.3 could help by looking at my code. Sorry!
Reply With Quote
  #65  
Old 07-20-2004, 08:37 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ChurchMedia
Hmmmm..... I'm just not sure what the problem is, unless 3.0.3 handles something differently. Maybe someone familiar with 3.0.3 could help by looking at my code. Sorry!
It's not updating the thread title or the link to the birthday thread with the last post icon. It is updating the last poster name fine, but not the other 2. It is pulling the infor from the last post made before the birthday cron job ran. Any idea what might be causing this?
Reply With Quote
  #66  
Old 07-20-2004, 02:31 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 Boofo
It's not updating the thread title or the link to the birthday thread with the last post icon. It is updating the last poster name fine, but not the other 2. It is pulling the infor from the last post made before the birthday cron job ran. Any idea what might be causing this?
That's strange. I never noticed it before, but you're right. For instance, last night it created a new birthday thread, but the title and link that shows up on the forum-home is for yesterday's birthday thread. Weird. Let me look into it and try to figure it out.

It seems to have the right title and link for new posts.... ???
Reply With Quote
  #67  
Old 07-20-2004, 06:55 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ChurchMedia
That's strange. I never noticed it before, but you're right. For instance, last night it created a new birthday thread, but the title and link that shows up on the forum-home is for yesterday's birthday thread. Weird. Let me look into it and try to figure it out.

It seems to have the right title and link for new posts.... ???
Yessir. Otherwise, it is normal. Just when it makes a birthday thread. Maybe the post query should be run before the thread query?
Reply With Quote
  #68  
Old 07-20-2004, 07:35 PM
Pitman's Avatar
Pitman Pitman is offline
 
Join Date: Dec 2001
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
Yessir. Otherwise, it is normal. Just when it makes a birthday thread. Maybe the post query should be run before the thread query?
Yeah I noticed that when I first installed it, but it didn't really bother me because it usually doesn't stay the last post for long. But it changes the last poster's username but not the title ;x

Would be cool to get a fix to that though, thanks
Reply With Quote
  #69  
Old 07-20-2004, 10:47 PM
ChurchMedia's Avatar
ChurchMedia ChurchMedia is offline
 
Join Date: Dec 2002
Location: Las Cruces, NM
Posts: 473
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I tried switching the post and thread creation and it just creates an empty thread. I think the problem is with this line:

$log_threadid=$DB_site->insert_id();

I think the insert_id() function is no longer valid in vB3, so it enters a thread id that is NULL. So, it doesn't show up until the next day. Make sense?

Anyone know what the function insert_id() was replaced with?
Reply With Quote
  #70  
Old 08-01-2004, 10:53 AM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ChurchMedia
Well, I tried switching the post and thread creation and it just creates an empty thread. I think the problem is with this line:

$log_threadid=$DB_site->insert_id();

I think the insert_id() function is no longer valid in vB3, so it enters a thread id that is NULL. So, it doesn't show up until the next day. Make sense?

Anyone know what the function insert_id() was replaced with?
Any solutions so far?
Reply With Quote
  #71  
Old 08-01-2004, 06:00 PM
ChurchMedia's Avatar
ChurchMedia ChurchMedia is offline
 
Join Date: Dec 2002
Location: Las Cruces, NM
Posts: 473
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I've looked some code in newthread.php and I think I could re-write this hack to work correctly and streamline it a bit. I won't have time for a while, though (I've having surgery on Tuesday and will be out for a few weeks). I'll look back into it as soon as I can.

Thanks,
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 02:42 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.05471 seconds
  • Memory Usage 2,316KB
  • 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
  • (7)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
  • (1)pagenav_pagelinkrel
  • (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