UBB.Dev
Posted By: JoshPet [6.2] Profile Birthdays 1.5 - 12/26/2002 12:38 PM
Mod Name / Version - Profile Birthdays 1.5
    ver 1.1 fixes a bug where the "Happy Birthday" message repeated with each category.
            Lists the usernames in alphabetical order for a neater look.
    ver 1.2 update to work with UBB.Threads 6.2, adds the year and age calculation as an option
    ver 1.3 updates the age calculation function and fixes a bug.
    ver 1.4 fixes a bug where the date of the birthday wasn't displaying
    ver 1.5 fixes the age calculation bug. Thanks to Dimopoulos and JustDave for help in nailing that down.

Description - This modification will allow users to enter their birthdays into their profile and display birthday info.

Working Under - UBB.Threads 6.2

Features -
  • Birthday will Display in their Profile.
  • Age will appear in their Profile if they have entered the year of their Birth. (Thanks Dimopoulos)
  • Bottom of Main Index Will Display "Today's Birthdays" and "This
  • Months Birthdays" if there are any.
  • Birthday Names will link to the users profiles.
  • Top of Main Index will wish the User a Happy Birthday if It's their
  • Birthday.
  • Bottom of Main Index will offer a link to update their profile if the profile does not contain the Birthday Info
  • If they have completed their whole birthday, an accurate age will be calculated.
  • If they have only filled in their birthyear, an aprox. age will be calculated.


Pre-requisites - none

Author - JoshPet - www.joshuapettit.com

Credits - PamW of www.thesoulelement.com for requesting it. Thanks to Dimopoulos for adding the year to the code. Thanks to Dave_L for help with the age calculation.

Files Altered - editbasic.tmpl, editbasic.php, changebasic.php, ubbthreads.php, ubbthreads.tmpl, showprofile.php, showprofile.tmpl

Database Altered - Three Fields added to the w3t_Users table (U_BirthMonth, U_BirthDay, U_BirthYear).

New Files - none

Other Info - Backup your database and your files before modifing!!!!!

Add On Available - A birthday Cron addon is available here. It automatically can send PMs or Make Posts for people's birthdays.


Attached File
62525-ProfileBirthday1.5.txt  (311 downloads)
Posted By: sportbikes Re: [6.2] Profile Birthdays 1.2 - 12/26/2002 9:50 PM
I'm using the 1.1 mod on threads 6.1.1 and love it. Although it seems that as more of my members add their info (probably a couple thousand of my 18,000 members) the page loads slower. I think there was talk about cache this info ( I would be happy with a once a day look up ).

Q. - Is the additonal lookup time insignificant and I should forget it?

Q. - Should drop it from my Main Index page which is re-loaded many times and just leave the info in a PAL box on IIP?

Thanks... just looking to keep things running smoothly.
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.2 - 12/26/2002 10:12 PM
It would have to check and load the info each time the Main Index is loaded. That can slow things down I imagine.

I am working on an Updated Pal Box for the next version of IIP which will Cache the info. (Thanks to JustDave!) Next step will be figuring out if we can have the bottom of the index page pull the cached info from IIP. That would be best for sure. Let IIP update it however often it does when it loads, and just have the Main Index use the info.
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.2 - 12/27/2002 5:05 AM
I've got this all worked out and up and running. Thanks to some great IIP groundwork by JustDave, it was easy.

I've got the BirthdayPal box for IIP 5.2 ready to go. It will cache the birthdays however many minutes you want. You can define it in the IIP config file.

Then, I tweaked the mod for the main index. The only thing the main index will check for, is if it's that users Birthday (so they get a birthday greeting) or if their birthday is empty (so they get the link to fill in their profile).
All the big list of names (today's bdays and this months bdays) is pulled from the IIP cache. I figure it's sufficient for the IIP to update that info however often. So the Main Index won't do any pulling of that info.

So I guess you'll have to load IIP at least once so that there's info to read. But if your site is busy, IIP will get loaded at least once a day easily.

That should cut down on the load, caching the bulk of the info.
Posted By: Storm_dup1 Re: [6.2] Profile Birthdays 1.2 - 12/27/2002 6:23 AM
Adding all my hacks to 6.2 test board........... hehe Or ummmmm all of your hacks I guess I should say?? *LMAO* Good Work!! Thanks!
Posted By: sportbikes Re: [6.2] Profile Birthdays 1.2 - 12/27/2002 10:19 AM


THANKS!
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.2 - 12/28/2002 9:38 AM
I modified my directions in the attachment above.

NOTE: If you are upgrading from the old birthday Mod, you'll already have U_BirthMonth and U_BirthDay, but you'll need to
add U_BirthYear, as that was added in this version.

To add U_BirthYear run this:

ALTER TABLE w3t_Users ADD U_BirthYear INT (4) NULL

Otherwise, as Storm discovered, you'll get errors on the show profile page.


Posted By: sportbikes Re: [6.2] Profile Birthdays 1.2 - 12/29/2002 11:58 PM
Josh,

You referenced a new palbox that would cache the birthdays... was that released?
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.2 - 12/30/2002 12:06 AM
No didn't have a chance yet. Here's the PalBox for IIP 5.2. It's named custombox1pal.php

Put it in your pals directory and adjust it's location using the IIP admin editor. It's called Custom Box 1.

Adjust the Cache time for Custom Box 1 in the IIP Admin Interface.

Enjoy!


Updated with new tablewrapers to work with IIP 5.3

Updated with a tablewrapper tweak.

Attached File
62888-birthdaypal.zip  (61 downloads)
Posted By: sportbikes Re: [6.2] Profile Birthdays 1.2 - 12/30/2002 12:39 AM
Thanks Again!

It Works.
Posted By: Storm_dup1 Re: [6.2] Profile Birthdays 1.2 - 12/30/2002 4:40 AM
Works great on my site Josh! Thanks once again!!

[]https://www.ubbdev.com/images/panels/9936-14259.png[/] <~~~Me wants this hack
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.2 - 12/30/2002 8:56 AM
If you are using the Pal Box.... and Caching the results.... you can pull that Cached info to the Main Index.... rather than pulling it each time the Main index Loads.

You must be using the Pal Box, and Caching the results.

I've attached instructions to this post.



Attached File
Posted By: sportbikes Re: [6.2] Profile Birthdays 1.2 - 12/30/2002 9:06 AM
works like a charm
Posted By: Ian_W Re: [6.2] Profile Birthdays 1.2 - 12/31/2002 7:24 PM
Thanks Josh,

In editbasic.php you say find...

if (!$debug) {
include("$thispath/templates/$tempstyle/editbasic.tmpl");
}

but that code does not exist

Thanks.
Posted By: caymuc Re: [6.2] Profile Birthdays 1.2 - 12/31/2002 9:18 PM
Hi Josh,
jsut a quick not on the previous version (1.1). There is maybe a bug with the calendar entries. It might not be fixed with the 1.2 version :
If a user changes the date, say the month from april to may, a new may entry is added to the calendar. and the april entry stays. Looks like a bug to me.

Greetings and a happy new year to you all!
Posted By: caymuc Re: [6.2] Profile Birthdays 1.1 - 01/02/2003 2:57 PM
Josh,
another thing the users pointed me at:
How do I DELETE birthday information (calender and profile)?

Greetings
Posted By: dimopoulos Re: [6.2] Profile Birthdays 1.1 - 01/02/2003 3:45 PM
Hi Carl,

What you are seeing is quite weird. In my 6.1.1 board I went and changed my birthday from April to January. Immediately in my calendar board the entry from April disappeared and appeared in January.

What the calendar modification on the profile birtdays does is it queries the users table for birthdays on a particular month and while the script runs to display the data in the calendar it also displays the birthday. The w3t_events table is never used for birthdays.

Very weird that your users see the events.... Did you or your users manually entered events on the calendar board? To check this, see the color of the three little arrows in front of the person's name on the particular date. If they are blue, it was generated by this modification if Red then it was manually entered in the w3t_events table as a new event.

Any chance of having a sample to have a look at the behavior?

Warm regards

Nikos
Posted By: msula Re: [6.2] Profile Birthdays 1.1 - 01/02/2003 6:28 PM
I found a bug I found a bug!

I tested it with my own birthday, and it lists me as a year older than I really am. Unless I forgot how old I was already? lol

My birthday is march 5th, 1980. I entered that into my profile. But it is showing me as 23, when infact I won't be 23 until March 5th of this year.
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.1 - 01/02/2003 6:55 PM
I have an update that I'll post this evening. I noticed that and with Dave_L's help, I got this worked out.
Posted By: dimopoulos Re: [6.2] Profile Birthdays 1.1 - 01/02/2003 7:04 PM
[]My birthday is march 5th, 1980. [/]
Baby



Nice one Jeremy, thanks for spotting that. I was wondering why one of my users insisted he was 52....

Warm regards

Nikos
Posted By: msula Re: [6.2] Profile Birthdays 1.1 - 01/02/2003 7:05 PM
Excellent. But nice hack, I already have people using it. They have been begging for quite a while
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.1 - 01/02/2003 7:11 PM
What I had done was just use the year to calculate age. Duh.... everyone's a year older come the first of the year.

What I did was convert the bday to epoch time, and subtract from current date, then calculate the age. Then I have it where they have selected the age, but not a birthday or month, it will say "aporx. age" and just figure the difference in the years.

Will write up what I changed and repost tonight.
Posted By: caymuc Re: [6.2] Profile Birthdays 1.1 - 01/03/2003 1:57 AM
Maybe you like this variant of the YEAR calculation in showprofile.php
(This spares the extra "age"-lines on the showprofile.tmpl)

// --------------------
// Figure out how old they are
if ($BirthYear) {
$age = date("Y") - $BirthYear -1;
//(modifiziert!)
$birthday .= " $BirthYear  ($age)";
}

Greetings
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.3 - 01/03/2003 4:30 AM
Updated main post to version 1.3. Fixed the bug in age calculation... thanks to Dave_L for the assistance.

If you've previously installed this mod, check my revised instructions for showprofile.php and showprofile.tmpl file.
Posted By: caymuc Re: [6.2] Profile Birthdays 1.1 - 01/04/2003 1:10 AM
Hi Nikos,
I tried to put your "Show Birthdays in Calendar" in the new Calendar 6.2 Hack version. Can you help me where to integrate your fabulous hack inside the calendar hack? - Could not get it running there was a problem with the UBirthDays = $d mysql request at the place it was before.

(By the way, Gardener, it is confusing to me, that there are two open threads on calendars now: a 3.0 and a 6.2. - I use the 6.2 version.)

Thanks a lot
Posted By: Ian_W Re: [6.2] Profile Birthdays 1.3 - 01/04/2003 5:38 PM
Thanks - works fine - I like the direct link if they have not yet entered their Birthday - a great way to encourage people to fill in the little boxes - who kows they might even update some of the other boxes there as well LOL
Posted By: msula Re: [6.2] Profile Birthdays 1.3 - 01/07/2003 9:38 PM
Another bug...

Have a lot of people adding b-days to their profiles now, but people older than 33 are showing up as 33. So we have a lot of people 33 years old
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.3 - 01/08/2003 4:37 AM
Hmmm... .check through my code from the begining, and make sure you've got it all.

The years are showing up correctly on my site. I got lots of people in their 50s and 60s on my site.
Posted By: Dslam Re: [6.2] Profile Birthdays 1.3 - 01/08/2003 5:36 AM
in show profile.php

I looked at my birthdate and
it shows the month (Birthday January )I was born but no date ,it should look like this correct(Birthday January 13)

then it shows my age as 35
I'm still 34 not 35 till the 13th

did i miss something or did you not include the date like on the older hack ?
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.3 - 01/08/2003 5:46 AM
Did you add the update to version 1.3 that I posted just after the first of the year.

First I was just going by year, but when the year changed, everyone ended up a year off.

Grab the latest file from the first post in this thread and make the adjustments to the showprofile.php script. I also fixed the bit with the day not showing. Had a typo in a variable or something.
Posted By: omegatron Re: [6.2] Profile Birthdays 1.3 - 01/08/2003 5:50 AM
I grabbed the file from the first post as well and mine displays Birthday April Age 36

I take it the day and year should be there
Posted By: Dslam Re: [6.2] Profile Birthdays 1.3 - 01/08/2003 5:53 AM
showprofile.tmpl
Code
<td class="darktable"><br />Birthday<br /></td><br /><td><br />$birthday &nbsp; $BirthDay<br />


added the $BirthDay to the end now it's showing
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.3 - 01/08/2003 5:58 AM
OK - guess I never posted the fix to the date not appearing. It's a misplaced bracket that screws that up.

I'm going to update the file to version 1.4... but this is how to fix the missing day.

Code
In showprofile.php my original instructions had this:<br /><br />	if ($BithhDay == "0") { $BirthDay = "";<br />	$birthday .= " $BirthDay"; }<br /><br /><br />Change that to this:<br /><br />	if ($BithhDay == "0") { $BirthDay = ""; }<br />	if ($BirthMonth) { $birthday .= " $BirthDay"; }<br />


That'll do it.
Posted By: omegatron Re: [6.2] Profile Birthdays 1.3 - 01/08/2003 6:01 AM
Have you figured out how to integrate Dave's grab birthday fields into yours to fill it automatically?
Posted By: Dslam Re: [6.2] Profile Birthdays 1.3 - 01/08/2003 6:10 AM
ok that did it thanks
removed my quick date addon lol

woops forgot to say
Thank you nice hack & thanks for the fix
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.3 - 01/08/2003 6:13 AM
Yours would have worked.... but I remember why I did what I did.... so it doesn't show the day if they don't have a month.

It's flexible, as people sometimes don't want to give all the info.

If they only give the year, it'll say "aprox. age". If they give the Month, it'll only show the month, and at least show them in "this month's birthdays". If they give all 3, then it'll give accurate age, and a birthday greeting.
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.3 - 01/08/2003 6:14 AM
[]Have you figured out how to integrate Dave's grab birthday fields into yours to fill it automatically? [/]

No I haven't. It kinda confused me. I need to ask Dave to simplify for me, and let me grab the month, day and year, as separate fields. So we can add them in. But I would like to do that.

I just had a hard time following what was happening.
Posted By: Dslam Re: [6.2] Profile Birthdays 1.3 - 01/08/2003 6:22 AM
any idea what the age is advanced ?
I mean only by a year
I'm 34 right now on the 13th I'll be 35 but it's already telling me I'm 35
unless I'v been a year off on my birthday LOL you never know with me

1-13,1968
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.3 - 01/08/2003 6:43 AM
Because initially (in the earlier version) it just took the current year minus the birth year. That caused it to advnace on the switch to 2003. The latest version uses the whole birthday (month, day and year) to calculate the birthday.

I just wasn't thinking when I did it first..... I just figured the difference in the years was the age, but that changed when the year advanced by 1. Everyone got a year older.

If you update the code to the latest version, it'll figure the exact age, if you've filled in all three fields.
Posted By: Dslam Re: [6.2] Profile Birthdays 1.3 - 01/08/2003 7:06 AM
ok got ya thanks ..
Posted By: Dslam Re: [6.2] Profile Birthdays 1.3 - 01/08/2003 7:08 AM
oh hold on I used version 1.3 . just installed this thing tonight
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.3 - 01/08/2003 7:12 AM
Lemme check it. The change above didn't get in and I thought it was. Might have the instructions not updated like I thought they were. I'll look at it.
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.3 - 01/08/2003 7:15 AM
Yeah, the one that is posted fixes that and uses the whole date.

Make sure you properly updated your showprofile.php file to have this bit in it:

Code
<br />if (($Birthmonth) && ($BirthDay) && ($BirthYear)) {<br />	$epochbday = mktime (0,0,0,$Birthmonth,$BirthDay,$BirthYear);<br />	$currentday = time();<br />	$epochage = $currentday - $epochbday;<br />	$age = intval($epochage / 31536000);<br />	$ageoutput = "<br />	<tr><br />	<td class=\"darktable\"><br />	Age<br />	</td><br />	<td><br />	$age &nbsp;<br />	</td><br />	</tr><br />	";<br />}<br />else if ($BirthYear) {<br />		$age = date("Y") - $BirthYear;<br />	$ageoutput = "<br />	<tr><br />	<td class=\"darktable\"><br />	Aprox. Age<br />	</td><br />	<td><br />	$age &nbsp;<br />	</td><br />	</tr><br />	";<br /><br />}<br />else {<br />	$age = "";<br />	$ageoutput = "";<br />}	<br />


Posted By: JoshPet Re: [6.2] Profile Birthdays 1.3 - 01/08/2003 7:18 AM
Then also be sure to remove the HTML bits from the showprofile.tmpl file, that earlier version had you add. It's all be replced with an $ageoutput variable. As you see I moved all the HTML into showprofile.php.

For the accurate age to be calculated, you have to fill in month, day and year. If all 3 arent' filled out, then it'll say "Aprox. Age"..... and it simply does the differnce in years.... which might be a year off depending on what month your bday falls in.

Hope that makes sense. But double check the instructions for showprofile.php AND showprofile.tmpl file. Make sure "$ageoutput" is in the showprofile.tmpl file. This wasn't used in earlier versions.

Posted By: Dave_L_dup1 Re: [6.2] Profile Birthdays 1.3 - 01/08/2003 11:50 AM
[]... Dave's grab birthday fields ... grab the month, day and year, as separate fields ...[/]

In the changes to adduser.php in Grab Birthdate 1.0.0:

Code
// Store birthdate (part 3 of 2). <br />   ... <br />   @list($dob, $dob_crc) = explode('-', $dob_with_crc); <br />   if (!$dob or ...) { <br />      $html -> not_right('dob invalid', $Cat); <br />   } <br />   [:"red"]$year  = substr($dob, 0, 4); <br />   $month = substr($dob, 4, 2); <br />   $day   = substr($dob, 6, 2); <br />   if (!checkdate($month, $day, $year)) { <br />      $html -> not_right('dob invalid (2)', $Cat); <br />   }[/] <br /> <br />// ---------------------------------- <br />// Insert this user into the database <br />   $query = " <br />      INSERT INTO {$config['tbprefix']}Users (...) <br />      VALUES (...) <br />   "; <br />   $dbh -> do_query($query);


The above is untested, but should work.

The added call to checkdate() is not essential, since the date has already been checked, but might be worthwhile in the event that some of the other code for this hack were to get changed.

The INSERT INTO would also have to be modified to insert $year, $month and $day instead of, or in addition to, $dob.

I was going to stick a delimiter into the DOB query string parameter so that explode() could be used, rather than substr(), but I'm already using "-", and I couldn't think of a different one.
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.4 - 01/15/2003 10:03 AM
These instructions will work for 6.2.1
Posted By: Ian_W Re: [6.2] Profile Birthdays 1.4 - 01/15/2003 2:36 PM
Have I missed something here - is 6.2.1 out?

Ian
Posted By: Gardener Re: [6.2] Profile Birthdays 1.4 - 01/15/2003 4:45 PM
No, it is still in non-public beta, but will be released when it's deemed stable enough I guess.
Posted By: Dave_L_dup1 Re: [6.2] Profile Birthdays 1.4 - 01/15/2003 4:53 PM
Or maybe even earlier.
Posted By: Gardener Re: [6.2] Profile Birthdays 1.4 - 01/15/2003 5:03 PM
LOL, could be. Let's hope not though. =]
Posted By: dimopoulos Re: [6.2] Profile Birthdays 1.4 - 01/15/2003 5:39 PM
I was wondering the same thing Gardener when I saw Josh's posts. I even checked the members area at infopop to make sure...

Warm regards

Nikos
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.4 - 01/15/2003 7:13 PM
Yeah, sorry.... at first I didn't really realize it wasn't in the member area yet. (I'm a bit slow on the uptake sometimes. ) But Navaho says it'll be out soon.
Any hacks I played with, I just thought I'd verify for people that I tested and it worked.
Posted By: dimopoulos Re: [6.2] Profile Birthdays 1.4 - 01/15/2003 7:17 PM
Mr Bug has spoken!

weee aaarrree nooottt woooorrrtthhhyyy....
(voice from the croud bowing)



Warm regards

Nikos
Posted By: junhyok Please Help me.... - 01/16/2003 7:59 AM
I'm having trouble to use this hack.
When user update birthday setting in user cp, it cannot write the birthday information at DB.
it write down emty and 0 only.

Here's the screenshot of my User DB:

[]http://www.doobic.co.kr/birthday.gif[/]

What did I wrong?
Please help me....

Junhyok
Posted By: JoshPet Re: Please Help me.... - 01/16/2003 8:44 AM
Are you getting any sql errors.

Check the steps for changebasic.php. Thats where the fields are written. Make sure the changes are in there, and the modified file has been uploaded to your server.
Posted By: junhyok Re: Please Help me.... - 01/16/2003 11:35 AM
Okay I'll check all...But I'm already did it over thousand times...T_T!

Is there anything that you can expect?

Thanks

Junhyok
Posted By: dimopoulos Re: Please Help me.... - 01/16/2003 1:11 PM
Junhyok,

Make sure your variables are all with the same name in all changed files (editbasic.php, editbasic.tmpl, changebasic.php). $Birthday is not the same as $BirthDay. This will cause a problem and will output empty or 0 values in your database. From what I see the update query works.

Warm regards

Nikos
Posted By: junhyok Re: Please Help me.... - 01/16/2003 4:24 PM
Thanks a lot...I'm working on it now.

Junhyok
Posted By: junhyok Re: Please Help me.... - 01/16/2003 4:33 PM
Sorry it doesn't work.....

Junhyok
Posted By: dimopoulos Re: Please Help me.... - 01/16/2003 5:09 PM
Hmmm... Weird.

I will send you a PM with my email address, if you don't mind, send me the files and I will compare them with my own and see what is wrong.

Warm regards

Nikos
Posted By: junhyok Re: Please Help me.... - 01/16/2003 8:04 PM
Thank you so much Nikos!
You are the man!

Best regards
Junhyok
Posted By: JoshPet Re: Please Help me.... - 01/16/2003 9:24 PM
Yes, thanks Nikos. I've been soooo busy lately, I haven't been keeping up here as much as usual.
Posted By: dimopoulos Re: Please Help me.... - 01/17/2003 12:09 AM
Josh,

It was mainly some typo errors. Nothing too serious. However I will try and rewrite the instructions more clearly so that it becomes a copy and paste job

Warm regards

Nikos
Posted By: Mudpuppy Re: [6.2] Profile Birthdays 1.4 - 01/17/2003 5:27 AM
I installed this hack and it seems to work fine. However, now my Users List isn't working correctly. It used to be multiple pages, but now it's cut off about a third of the way through the list. Did I edit a file incorrectly?

(It's just the display that isn't working -- all the users are still in the database and visible if you browse via letter rather than trying to browse the entire list).
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.4 - 01/17/2003 8:06 AM
Hmmm.....

This mod doesn't affect the showmembers.php file. Not sure why it could affect that.

There was a bug in 6.2 that passed the page number variable in the members list incorrectly. This has been fixed in 6.2.1.

On a page that it seems you aren't seeing everybody, check the url and make sure it's got page=1 and not page = something else.

Posted By: Mudpuppy Re: [6.2] Profile Birthdays 1.4 - 01/17/2003 8:14 AM
Prior to reading your post, I decided I'd just systematically redo the hack by editing all the files again. I figured I could upload them one by one and try to find the problem. Oddly enough, after I'd re-edited and uploaded the first file, editbasic.php, the complete members list was back.

Oh well... perhaps it was that 6.2 bug affecting it. It *is* working now.

Next hack for me to tackle -- spellcheck!
Posted By: Storm_dup1 Re: [6.2] Profile Birthdays 1.4 - 01/19/2003 5:24 PM
Hey Josh... Just upgraded to IIP 5.3 from 5.2 and things are still working.... However, there is no box for the birthday listings on the index.php page. They are there, just no box for them so it kind of looks outta place.... Any ideas on this??
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.4 - 01/19/2003 10:14 PM
Oh yeah, the table wrapper things have changed.

I update my attachment of the pal on the first page of this post with the new table wrappers. Download that pal box, and you should be all set.
Posted By: Storm_dup1 Re: [6.2] Profile Birthdays 1.4 - 01/20/2003 12:49 AM
Hiya Josh, Thanks! I did have to add a bit of code down near the bottom to get it to display right.... My users love this hack... I think they change their birthdays just so they can see their names up there... *LOL*

echo "</td></tr><tr><td align="left" valign="top" class="lighttable">"; // Close Header and Open Content
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.4 - 01/20/2003 4:55 AM
Glad it worked for ya and that your users like it.
Posted By: pootlecat Re: [6.2] Profile Birthdays 1.4 - 01/27/2003 9:46 PM
I just tried to install this mod and all looks fine except that it doesn't seem to remember my settings when I go back to edit my profile. I tried setting my birthday to today as well but got the 'No Birthdays This Month' message on the main index.

Any help gratefully received
Posted By: dimopoulos Re: [6.2] Profile Birthdays 1.4 - 01/28/2003 1:33 AM
Alison,

You have two areas where you can have a look at:

1. The actual loading of the data in the editbasic.php script - which then is displayed on screen. Try to access your database and using a tool like phpMyAdmin find your record in the w3t_Users table and edit it. Change the BirthYear for instance and put something like 2003. Open your My Home/Personal Information and have a look whether the 2003 is up there. If yes then your editbasic.php does its job properly. You might want to repeat the test by putting Jan for the BirthMonth and 27 for the day just in case.

2. The changebasic.php file and the query it runs. Two areas to check in this script: First at the top to see whether the variables are passed correctly in the script and last if the SQL statement is constructed properly.

What I usually do is put some small print statements which I remove after to see whether a variable has the correct value.

In the changebasic.php at the end you have
Code
<br />// ---------------------------------------------------<br />// Send them to their start page with the confirmation<br />   $html -> start_page($Cat);<br />

Temporarily change it to
Code
<br />print "$query";<br />// ---------------------------------------------------<br />// Send them to their start page with the confirmation<br />//   $html -> start_page($Cat);<br />


and go and change your birthdate. You should see that the query will be printed on screen and it will be something like
Code
<br />UPDATE w3t_Users SET ........ U_BirthDay='27', U_BirthMonth='Jan', U_BirthYear='2003' WHERE ....<br />


If this is not the case then you have something wrong and you should check the instructions again.

NOTE: Remember to change the
Code
<br />print "$query";<br />// ---------------------------------------------------<br />// Send them to their start page with the confirmation<br />//   $html -> start_page($Cat);<br />

to
Code
<br />// ---------------------------------------------------<br />// Send them to their start page with the confirmation<br />   $html -> start_page($Cat);<br />

after you finish

I hoipe this helps

Warm regards

Nikos
Posted By: pootlecat Re: [6.2] Profile Birthdays 1.4 - 01/28/2003 2:03 AM
Thanks Nikos but unfortunately it still doesn't work.

The result from the print "$query"; is as follows:

U_BirthMonth = '', U_BirthDay = '', U_BirthYear = ''

I completely redid all the instructions from scratch just in case

Could this be related to the problems i have been having with the other mods? Josh has had to keep making additions for me. I am using 6.2.1.
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.4 - 01/28/2003 2:10 AM
Yes... I think when register globals are on.... we need to add the get_input statment for each variable in use. Give me a bit and I'll post the update.
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.4 - 01/28/2003 2:15 AM
OK near the top of changebasic.php - you'll see all the get_input statements.... add these to them:
Code
<br />	$Birthmonth     = get_input("Birthmonth","post");<br />	$Birthday       = get_input("Birthday","post");<br />	$Birthyear      = get_input("Birthyear","post");<br />


I think that'll fix it for you.

I will update the attachment here shortly.
Posted By: pootlecat Re: [6.2] Profile Birthdays 1.4 - 01/28/2003 2:20 AM
Worked like a charm - as always
Thanks!
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.4 - 01/28/2003 2:25 AM
He he.... we are on to something with you. Some of these old mods didn't have this new get_input function worked in when they were updated.

It works for some, but if you have Register Globals on, it won't work without it.
Posted By: dimopoulos Re: [6.2] Profile Birthdays 1.4 - 01/28/2003 11:04 AM
True Josh,

We have to make provisions to put the get_input functions to grab the variables for all mods just in case.

I recently installed Zend studio and they recommended that I turn the globals off so most of my mods didn't work...

Alison: Nice that you got it working in the end.

Warm regards

Nikos
Posted By: Mudpuppy Re: [6.2] Profile Birthdays 1.4 - 01/30/2003 3:23 AM
Is there a way to display a small animated gif or other icon (like a birthday cake, fireworks, or similar) next to the birthday greeting?
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.4 - 01/30/2003 3:37 AM
Yeah... in the part that the birthday boy / or girl sees on their birthday:

Code
<br />		$BirthdayGreeting = "<div align=\"center\"><b><font size=\"+2\">Happy Birthday $Username!!</font></b></div>";<br />


You could add some HTML in there for an image, like this:

Code
		$BirthdayGreeting = "<div align=\"center\"><b><font size=\"+2\">Happy Birthday $Username!!</font></b><img src=\"http://www.yourdomain.com/images/bdaygraphic.gif\" alt=\"bday\" border=\"0\"></div>";<br />


Just be sure to put the \ before each quote in the HTML you insert into the string.... or it'll break.
Posted By: Mudpuppy Re: [6.2] Profile Birthdays 1.4 - 01/30/2003 10:02 AM
Okay -- I added a cute little graphic and also changed the font colour, as my page background is black and the greeting wasn't showing up otherwise.

Two other questions, if you don't mind --

1. I use the table wrappers mod, and the birthday announcement "sits" on top of the wrapper (there's no space between the table and the greeting). How can I put a line of space below the greeting to improve the look?

2. Can this hack be modified so I can display birthday information to *every* user (so a birthday is announced to everyone on the board)? I have a small private community of just a few users, so I need to make individual birthday announcements regardless. Having the hack make the announcement for me would sure save me some time.
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.4 - 01/30/2003 5:36 PM
Yeah, I've modified that like that at thesoulelement.com

I'll put the code together tonight.
Posted By: Mudpuppy Re: [6.2] Profile Birthdays 1.4 - 01/30/2003 8:17 PM
[]Yeah, I've modified that like that at thesoulelement.com

I'll put the code together tonight. [/]

Yay! No free time for Josh when I'm around
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.4 - 01/31/2003 8:49 AM
He he... yeah, you got lots of little projects for me.

OK - change the bottom bit of the bday mod in ubbthreads.php to this:

Code
<br />Yikes.  That sucks. :p<br />Your site here is so pretty.  Really.<br />Very sharp with the boraders and the black background<br />And the cool red logo. ;)<br /><br />OK - change the bday mod code in ubbthreads.php to this:<br />[code]<br />		if ($Today != 0) {<br />			$todaybday .= "<br />";<br />		}	<br />	}<br />   list($tbopen,$tbclose) = $html -> table_wrapper();<br />	if (($UserBirthDay == $today) && ($UserBirthMonth == $thismonth)) {<br />		$BirthdayGreeting = "$tbopen <tr><td class=\"lighttable\"><div align=\"center\"><b><font size=\"+2\">Happy Birthday $Username!!</font></b></div></td></tr>$tbclose";<br />	}<br />	if (($Username) && ((!$UserBirthDay) || (!$UserBirthMonth))) {<br />		$BirthdayWarning = "<div align=\"center\"><b><a href=\"{$config['phpurl']}/editbasic.php?Cat=$Cat\">Click Here</a> to Update your Birtday Information in Your Profile!</b></div>";<br />	}<br />	if ($Today) {<br />		$TodayTopBday = "$tbopen <tr><td class=\"lighttable\"><div align=\"center\"><b>$TodayIntro</b> $todaybday</div></td></tr>$tbclose";<br />	}<br /><br />// ------End of Profile Birthday Hack



Then add this:

$TodayTopBday

into the ubbthreads.tmpl file... at the top.. above or below the $BirthdayGreeting

$BirthdayGreeting will be the greeting that the user gets on their birthday. You could customize it with images etc....

$TodayTopBday will be a box at the top, listing "today's birthdays".

Hope that helps.
Posted By: Liahona_dup1 Re: [6.2] Profile Birthdays 1.4 - 02/01/2003 5:26 PM
Hi Nikos

I have a prob with the birhtdays in the profile page.

This is what happens..........

When I insert the bithday in the profile and click submit,
the bithday goes in the calendar okay but if I return to
the profile page it is missing, nothing drastic I suppose
just annoying.

What I have done.................

1. Checked for
$Birthmonth = get_input("Birthmonth","post");
$Birthday = get_input("Birthday","post");
$Birthyear = get_input("Birthyear","post");


These lines are present.

2. Placed this
print "$query";
in the changebasic.php

Print shows everything Okay dates are in place
U_BirthMonth = '5', U_BirthDay = '5', U_BirthYear = '1955'

So apart from them not showing in the profile all looks okay.

Any ideas?

Thanks
Posted By: dimopoulos Re: [6.2] Profile Birthdays 1.4 - 02/01/2003 6:57 PM
I can see a potential problem there without checking anything else. The U_BirthMonth stores data as text and not numbers. So in your example it should have been
U_BirthMonth='May',.... and not
U_BirthMonth='5'

Can you please check that part? If you are stuck email me and we can have a look at the code closely.

Warm regards

Nikos
Posted By: Liahona_dup1 Re: [6.2] Profile Birthdays 1.4 - 02/01/2003 9:22 PM
Hi Nikos

Sorry, my mistake, to much of a rush.....

Here is the line....

U_BirthMonth = 'Jun', U_BirthDay = '5', U_BirthYear = '1953' WHERE U_Number = '2'

Sorry
Posted By: dimopoulos Re: [6.2] Profile Birthdays 1.4 - 02/03/2003 2:42 AM
I will check your forum tomorrow morning George and let you know via pm.

Nikos
Posted By: caymuc Re: [6.2] Profile Birthdays 1.4 - 02/08/2003 12:15 PM
Actually: storing months as Numbers would not be such a bad idea:
That would open new possibilities to easily add language files with month names in individual languages....
Posted By: Astaran Re: [6.2] Profile Birthdays 1.4 - 02/08/2003 12:31 PM
I'd suggest to store the birthday in a mysql date-field.
YYYY-MM-DD is the format.
Advantages:
- 1 field instead of 3
- language independend
- mysql can perform calculations with dates
- to get all today's birthday you could simply perform a Select * from table where U_Birthday like '2003-02-".$today';
- i do it that way
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.4 - 02/08/2003 8:15 PM
I agree... what I wasn't sure at the time, was how to extract just birthday's from a particular month.

You see... some of my users didn't mind giving the whole birthday (month, day & year).... others just gave month and day, and some would only give Month.

I know alot more now, from when I originally made this, so it's probably due for a rewrite using a date field.
Posted By: Astaran Re: [6.2] Profile Birthdays 1.4 - 02/09/2003 4:58 AM
Yes, you are right. Some users don't want their age to be displayed.
I created an optional field where they can choose, weather day & month or day & month & year should be displayed.

Sure, a rewrite would improve the data handling. But your idea was really great, i must say.
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.4 - 02/09/2003 6:37 AM
It's pretty popular... and it's funny.... it's popped up on several Boards I visisted.... and it works.... I got lots of PMs on my birthday on various boards.
Posted By: dimopoulos Re: [6.2] Profile Birthdays 1.4 - 02/10/2003 12:53 AM
I think we can get rid of the problem with the year, by setting it to the first year that the epoch time allows or something like 1900. I don't think that if I were 103 I would post in any forum....
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.2 - 02/11/2003 7:14 AM
I have updated this post with a new birthday pal box. I noticed at a few sites I visited, that there's been a bit of a tablewrapper change and it wasn't looking right everywhere.

Coy7 - you should replace yours. This will make the lighttable/darktable thing work right.

Posted By: dimopoulos Re: [6.2] Profile Birthdays 1.4 - 02/20/2003 2:04 AM
I don't know if anyone has seen this or it has been mentioned on this thread (heck I am really tired now) but for some users I kept on getting a mktime error at the top of the showprofile screen. The reason was the epoch time and the users inputting their year of birth to numbers less than 1970. A simple workaround will sort this.

Open showprofile.php
Find:
Code
<br />	if (($Birthmonth) && ($BirthDay) && ($BirthYear)) <br />	{<br />		$epochbday = mktime (0,0,0,$Birthmonth,$BirthDay,$BirthYear);<br />		$currentday = time();<br />		$epochage = $currentday - $epochbday;<br />		$age = intval($epochage / 31536000);<br />

and change it to this:
Code
<br />	if (($Birthmonth) && ($BirthDay) && ($BirthYear)) <br />	{<br />		if ( $BirthYear < 1970 )<br />		{<br />			$DatePlus	=	1970 - $BirthYear;<br />			$BirthYear	=	1970;<br />		}<br />		else <br />		{<br />			$DatePlus	=	0;<br />		}<br />		<br />		$epochbday = mktime (0,0,0,$Birthmonth,$BirthDay,$BirthYear);<br />		$currentday = time();<br />		$epochage = $currentday - $epochbday;<br />		$age = intval($epochage / 31536000) + $DatePlus;<br />
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.4 - 02/20/2003 2:39 AM
Ack... does that make the age work right.

JustDave worked forever on a fix which I haven't posted here yet.... getting the the age calculation to be accurate on dates before 1970.
Posted By: dimopoulos Re: [6.2] Profile Birthdays 1.4 - 02/20/2003 11:40 AM
That one works like a charm. Basically if the date is earlier than 1970 it keeps the difference in years and sets it to 1970. The following calculations will sort out how old you are with the epoch day and all you have to do then is add how many years you have between the actual year and 1970.

This actually started showing an Argentinian friend of mine 33 years old whereas he was 38. Needless to say that none of the girls in the forum complained about this....

Posted By: JoshPet Re: [6.2] Profile Birthdays 1.4 - 02/20/2003 7:17 PM
Doah..... that looks a lot easier than the route JustDave helped me figure out.

Thanks for the fix... I'll update these zips one of these evenings.
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.5 - 02/22/2003 8:28 AM
I've updated the main post of this thread to version 1.5.

Ver. 1.5 is a bug fix for the showprofile age calculation bug. Thanks to Dimopoulos and JustDave for help in tracking this down.

Posted By: JoshPet Re: [6.2] Profile Birthdays 1.5 - 02/22/2003 11:53 PM
he he

There's a bunch of women at one of my sites very mad at me for fixing thier ages. They "LOVED" being 33 again.

She writes:
[]JOSH my CyberDaddy!! For gawds sake! Who gave you the brite idea that I wanted to be more than 33? I got a b-d coming up. It won't belong long before I'll be twice the glitch. But Man I can still climb the rocks and hills. I still really enjoy life though.[/]
Posted By: dimopoulos Re: [6.2] Profile Birthdays 1.5 - 02/24/2003 12:55 AM
LMAO Josh! CyberDaddy???? LOL LOL
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.5 - 02/24/2003 4:15 AM
LOL
That's what they call me there.
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.5 CRON ADDON - 03/22/2003 8:30 PM
Birthday Cron

OK - This is an AddOn if you are using the Birthday Mod.
It can do two things. It can send people a PM on their birthday, and it can make a post in a forum of your choice announcing "today's birthdays". This gives your members a place to reply with their well wishes.
It is fully configurable. You can choose to have it just do the PMs, or Just make the posts, or both. You can control what user number the PMs or Posts come from. You can also edit the content of the PMs and Post.

Commissioned by Coy7.

Instructions: Drop this script into your threads directory, and set up a cron job to run it once a day. Edit the variables at the top of the file to customize the options. Enjoy!

Edit: Updated so that it doesn't make a post when there are no birthdays. Thanks Racantaeur

Attached File
73911-birthdaycron.zip  (38 downloads)
Posted By: Mudpuppy Re: [6.2] Profile Birthdays 1.5 CRON ADDON - 03/23/2003 8:27 AM
I asked Josh to design this mod for me because I run a forum mainly inhabited by teenagers, and they love little features that make them feel special, (like the original birthday mod). I'd developed a sense of obligation over the birthday mod, though -- every day on my board I'd see half a dozen users having a birthday, and I felt like I should send them all a personalized greeting from "the board Mom". This new Cron Addon of Josh's alleviates my guilt entirely. I write a generic birthday greeting, put a cute little icon in the message, and it's automatically sent to every birthday guy or gal from my username. It makes me seem like a nice person but lets me be lazy about it, too. Great work Josh!
Posted By: AllenAyres Re: [6.2] Profile Birthdays 1.5 CRON ADDON - 03/23/2003 9:33 AM
yeah, great idea and nice work Josh thumbsup
Posted By: jluerken Re: [6.2] Profile Birthdays 1.5 - 04/07/2003 10:26 PM
Hi Josh,

I think I found a small cosmetic bug.
The user is able to set his birthday in his profile but an admin is not.

I tried to do it for someone cause he was to stupid to find the entries but I can't see it also. The I used the 'become this user' option to become him and set it.

Try yourself. Search for a user and click on 'edit profile' and you will not see the field to enter his birthday.

How can I also add it to the admin view?
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.5 - 04/07/2003 11:25 PM
Yeah, I never included that just to minimize the number of scripts modified and make upgrades easier.

You'd have to also modify /admin/showoneuser.php and /admin/dochangeuser.php

But I figured the admin would never normally need to enter this info... as they wouldn't normally know a users birthday. For the occational eejit who can't figure it out... you could become this user or do it very quickly with an SQL command.

The client who paid me to write it didn't care about the admin's ability to edit birthdays. But if you want... feel free.
Posted By: jluerken Re: [6.2] Profile Birthdays 1.5 CRON ADDON - 04/09/2003 10:03 AM
[]JoshPet said:
Birthday Cron

OK - This is an AddOn if you are using the Birthday Mod.
It can do two things. It can send people a PM on their birthday, and it can make a post in a forum of your choice announcing "today's birthdays". This gives your members a place to reply with their well wishes.
It is fully configurable. You can choose to have it just do the PMs, or Just make the posts, or both. You can control what user number the PMs or Posts come from. You can also edit the content of the PMs and Post.

Commissioned by Coy7.

Instructions: Drop this script into your threads directory, and set up a cron job to run it once a day. Edit the variables at the top of the file to customize the options. Enjoy! [/]

One thing Josh. I am using the cron to write a PM AND a forum entry. Its working fine with one exception.
Its making also a forum entry if there is no one who has birthday.

Can you change the script in this way that its not posting a thread if they are no birthdays?
Hi Coy7,

Would you mind posting your cron job??? Is it PHP or Perl? I have never done this before and am curious. Looked at the doexpire.php and subscriptions.php scripts, which make some sense, but am not sure how they are getting invoked and what sorts of return values are expected.

I think I misread Josh's post... is it true that I just need to have my host setup a cron job that points to the birthdaycron.php script and it will fire off??

Cheers,

Chris
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.5 CRON ADDON - 04/09/2003 3:35 PM
Yes, most likely if you are on shared hosting, ask your host to set up a cron job to fire it off once a day.
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.5 CRON ADDON - 04/09/2003 3:35 PM
he he

Just finally had a a day without a bday on my board and discovered that. I'll tune that up shortly.
Posted By: Mudpuppy Re: [6.2] Profile Birthdays 1.5 CRON ADDON - 04/09/2003 5:07 PM
[]Raconteur said:
Hi Coy7,

Would you mind posting your cron job??? Is it PHP or Perl? I have never done this before and am curious. Looked at the doexpire.php and subscriptions.php scripts, which make some sense, but am not sure how they are getting invoked and what sorts of return values are expected.

I think I misread Josh's post... is it true that I just need to have my host setup a cron job that points to the birthdaycron.php script and it will fire off??

Cheers,

Chris [/]

I'll freely admit that Josh set up my cron tasks for me because I'd looked at them and felt out of my league. He also provided the wording for sending to my hosting company (I posted about that it this thread: https://ubbdev.com/threads/php/...view=collapsed&sb=5&o=&vc=1)

So, I guess I'll leave Josh to answer exactly which files need to be modified because I'm not sure, and cuz he's up and no one else is here so maybe he's bored
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.5 CRON ADDON - 04/09/2003 5:13 PM
he he

Yeah, your host didn't allow us access to do that on our own. They had to set it up. But basically we sent them the paths to the scripts that needed to run.

On my server, I have a webmin control panel... and I schedule the task like this:

/usr/bin/php /home/measurection/htdocs/forums/birthdaycron.php


Some info on setting up cron jobs can be found here;
http://www.ubbcentral.com/resources/cron.html
Cool. Thanks.

Josh, I have the fix for that bug if you want it.
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.5 CRON ADDON - 04/09/2003 9:22 PM
Sure... I haven't had a chance to look at it. If you post it, I'll update the file.
Here it is. Simple add of an if statement at line 169.

Not sure if it works correctly since I have not gotten the cron task setup... but it looks pretty straightforward.

I also reformatted. You had your CR/LFs set to Mac and the file was getting hammered on upload.

Attached File
75139-birthdaycron.zip  (19 downloads)
Posted By: omegatron Re: [6.2] Profile Birthdays 1.5 CRON ADDON - 04/10/2003 2:28 AM
Raconteur this inserted in the cron file will run it at 2 am every morning replace with your path of course


0 2 * * * /usr/local/apache/htdocs/ubbthreads/cron/php/birthdaycron.php
Thanks, Chuck, but I do not have access to it... the host is setting it up.
Posted By: omegatron Re: [6.2] Profile Birthdays 1.5 CRON ADDON - 04/10/2003 11:51 AM
Yeah and they is two telnet command to load the file.

I am glad to do my own as when I had a server that they did it it took ages( a few days ). Since then I have been working on patience.
They added it... will know if it works on the 12th!
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.5 CRON ADDON - 04/11/2003 7:07 AM
Worked.... finally had a day with no bdays. I updated the inital post too... so people dont' download the wrong thing.
Posted By: jluerken Re: [6.2] Profile Birthdays 1.5 CRON ADDON - 04/11/2003 4:27 PM
Thanks Josh, its working fine for me. It gives a message SENDING MAIL TO .

Hopefully it had not send any mail
For the posting its definetly working...
Was that the update I sent you, Josh?
Yeah! Our host is in Oz so they are a day ahead. Our April 12th b-day showed up as expected, and logging to the admin log happened (I added this instead of standard output, Josh).
Posted By: JoshPet Re: [6.2] Profile Birthdays 1.5 CRON ADDON - 04/11/2003 8:16 PM
Yes, cool. Thank you.
Hey Josh,

Our servers are hosted in Oz... so I had to write a bit of code to accomodate the time diff. If you replace the first two lines of the mod to UBBTHREADS.PHP:

Code
<br />$thismonth = date("M");<br />$today = date("d");<br />


with this:
Code
<br />$currtime = time ();<br />$currtime = $currtime+($user['U_TimeOffset']*3600);<br /><br />$date = date("d", $currtime);<br />$thismonth = date("M", $currtime);<br />


It will generate the correct date for the query provided the user has filled in their TimeOffset.
$currtime = time ();
$currtime = $currtime+($user['U_TimeOffset']*3600);

could be simplified to

$currtime = time() + $user['U_TimeOffset'] * 3600;
Thanks, Dave.

This also needs to be added:
Code
<br />$currtime = time()+($user['U_TimeOffset']*3600);<br />$whatistoday = date("F jS",$currtime);<br />


below the lines:
Code
<br />// Require the threads library<br />require ("main.inc.php");<br />$userob = new user;<br />$user = $userob -> authenticate("U_TimeOffset");<br />


in BIRTHDAYCRON.PHP

Don't forget to remove the setting of $whatistoday up in the variables section.

Posted By: JoshPet Re: [6.2] Profile Birthdays 1.5 - 04/28/2003 10:13 AM
This works for 6.2 and 6.3. It has been reposted here. Discussions continued there.
© UBB.Developers