Version: 1.00, by ChurchMedia
Developer Last Online: Jun 2013
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.
I have it installed and working, but I am seeing all of the HTML code surrounding the birthday people. Does HTML have to be enabled in the forum for this to work properly?
Also, what do I need to do to change the subject of the thread. I have LOTS of members and having all of the user names in the subject line is way too much clutter.
I have it installed and working, but I am seeing all of the HTML code surrounding the birthday people. Does HTML have to be enabled in the forum for this to work properly?
I guess so. The other option is to take out the HTML and forgo the links to their profiles. I think you could use /n for line breaks (???).
Quote:
Originally Posted by Rick
Also, what do I need to do to change the subject of the thread. I have LOTS of members and having all of the user names in the subject line is way too much clutter.
Thank you.
Rick
The easiest thing to do is replace:
$title3.= $bday_title;
with:
$title3.= "our members";
That would make the subject "Happy Birthday to our members on whateverdate".
You can change the "1" in the code above to whatever you want the minium posts for birthday threads to be
Find:
Code:
// End Create Birthday Thread Hack
Above it add:
Code:
}
If you also want to limit the birthday threads & emails to users who have visited the site within the time set in your admin panel for showing birthdays on forum home do this:
(options & $_USEROPTIONS[adminemail]) AND
usergroupid IN ($ids)
");
Replace it with:
Code:
(options & $_USEROPTIONS[adminemail]) AND
usergroupid IN ($ids) $activitycut
");
This doesn't work for me.
If only users with zero posts has birthday on a day this addition works, but if other users with more than zero post has also birthday a greating thread is generated and also the zero posters are greated !
I fixed the problem with the following database query:
PHP Code:
$birthdays = $DB_site->query("
SELECT username, email, languageid, posts, userid, birthday
FROM " . TABLE_PREFIX . "user
WHERE birthday LIKE '$today-%' AND
(options & $_USEROPTIONS[adminemail]) AND
usergroupid IN ($ids) AND posts >20
");
iam having problems i have done the hack as in the download and today this was made as a post not as the screenie shows.
Also a side effect has happened, in my admin panel in forums and moderator the options in the controls ie edit, delete have disappeared but when i delete the post the options have reappeared.
this is how the post was displayed.
Dear Forum,<br><br>Here are today's birthdays!<br><br><a href="member.php?u=124">RUGGY</a>, born 06-28-1938
<a href="member.php?u=54">RONNIEBI</a>, born 06-28-1941