Show todays Birthdays Mod
Posted by JuergenHansen
December 05, 2006 05:28PM |
Admin Registered: 18 years ago Posts: 8,532 |
No, I guess he means that at max 20 days of the year would show a birthday, which makes it "idle" the rest of the year.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Maurice Makaay
Phorum Development Team



Re: Hack for Show todays Birthdays Mod December 06, 2006 02:10AM |
Registered: 18 years ago Posts: 3 |
Re: Show todays Birthdays Mod September 23, 2007 10:13PM |
Registered: 16 years ago Posts: 16 |
Hi,
I had this installed in version 5.1.19 and while checking on why my error logs are huge I discovered thousands of the following error:
PHP Notice: Undefined index: birthday in /usr/local/phorum5/mods/ShowTodaysBirthdays/ShowTodaysBirthdays.php on line 215, referer: [myforum.mysite.com]
Would like some help on being able to stop the error, if possible.
Thanks !
I had this installed in version 5.1.19 and while checking on why my error logs are huge I discovered thousands of the following error:
PHP Notice: Undefined index: birthday in /usr/local/phorum5/mods/ShowTodaysBirthdays/ShowTodaysBirthdays.php on line 215, referer: [myforum.mysite.com]
Would like some help on being able to stop the error, if possible.
Thanks !
September 24, 2007 02:57AM |
Admin Registered: 18 years ago Posts: 8,532 |
Edit that script and add the green line from the code below:
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
214 foreach($userlist as $user) {
215 if (empty($user["birthday"])) continue;
216 $birthday = getdate($user["birthday"]);
Maurice Makaay
Phorum Development Team



Re: Show todays Birthdays Mod September 24, 2007 02:40PM |
Registered: 16 years ago Posts: 16 |
Re: Show todays Birthdays Mod September 24, 2007 08:05PM |
Registered: 16 years ago Posts: 16 |
One additional error showed up, most likely because I have the birthday data as part of the registration page. Again, it is likely just missing either an empty or isset. I really wish I was php-literate enough to correct these on my own :(
PHP Notice: Undefined index: PROFILE in /usr/local/phorum5/mods/ShowTodaysBirthdays/ShowTodaysBirthdays.php on line 45, referer: myphorum.mysite.com/register.php?1
45 $birthday = getDate($PHORUM["DATA"]["PROFILE"]["birthday"]);
PHP Notice: Undefined index: PROFILE in /usr/local/phorum5/mods/ShowTodaysBirthdays/ShowTodaysBirthdays.php on line 45, referer: myphorum.mysite.com/register.php?1
45 $birthday = getDate($PHORUM["DATA"]["PROFILE"]["birthday"]);
September 24, 2007 08:14PM |
Admin Registered: 18 years ago Posts: 8,532 |
I think:
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
$birthday = empty($PHORUM["DATA"]["PROFILE"]["birthday"]) ? '' : getDate($PHORUM["DATA"]["PROFILE"]["birthday"]);
Maurice Makaay
Phorum Development Team



Re: Show todays Birthdays Mod September 24, 2007 09:06PM |
Registered: 16 years ago Posts: 16 |
That resolved on problem and then generated 24 others !
Now I get:
PHP Notice: Uninitialized string offset: 0 in /usr/local/phorum5/mods/ShowTodaysBirthdays/ShowTodaysBirthdays.php on line 47, referer: [forum5.gayedmonton.com]
This also shows for line 48, 49 and 51, then the entire section is repeated two additional times on the page at lines 73,74,75 and 77 and then again at lines 110, 111, 112 and 114. The same string is located at all. And it also reports all the same errors for the login.php?1 at the same time, thus 24 errors in one call.
Here is the entire string with the change you suggested above:
45 $birthday = empty($PHORUM["DATA"]["PROFILE"]["birthday"])
46 ? '' : getDate($PHORUM["DATA"]["PROFILE"]["birthday"]);
47 $tag = $birthday["mday"];
48 $monat = $birthday["mon"];
49 $jahr = $birthday["year"];
50
51 if($birthday["seconds"] ==0) {
52 $tag = -1;
53 }
Now I get:
PHP Notice: Uninitialized string offset: 0 in /usr/local/phorum5/mods/ShowTodaysBirthdays/ShowTodaysBirthdays.php on line 47, referer: [forum5.gayedmonton.com]
This also shows for line 48, 49 and 51, then the entire section is repeated two additional times on the page at lines 73,74,75 and 77 and then again at lines 110, 111, 112 and 114. The same string is located at all. And it also reports all the same errors for the login.php?1 at the same time, thus 24 errors in one call.
Here is the entire string with the change you suggested above:
45 $birthday = empty($PHORUM["DATA"]["PROFILE"]["birthday"])
46 ? '' : getDate($PHORUM["DATA"]["PROFILE"]["birthday"]);
47 $tag = $birthday["mday"];
48 $monat = $birthday["mon"];
49 $jahr = $birthday["year"];
50
51 if($birthday["seconds"] ==0) {
52 $tag = -1;
53 }
September 25, 2007 02:33AM |
Admin Registered: 18 years ago Posts: 8,532 |
Hmm... looks like the coder didn't really care about warnings. They were probably turned off when developing this code. Well, here's another try:
I really don't know if this would work in its bigger context of the full script. If this gives you more problems, then maybe you should try contacting the author of the script. I'm very low on time to go over the code myself currently I'm afraid.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
$birthday = empty($PHORUM["DATA"]["PROFILE"]["birthday"]) ? '' : getDate($PHORUM["DATA"]["PROFILE"]["birthday"]); if(empty($birthday)) { $tag = -1; $monat = 0; $jahr = 0; } else { $tag = $birthday["mday"]; $monat = $birthday["mon"]; $jahr = $birthday["year"]; }
I really don't know if this would work in its bigger context of the full script. If this gives you more problems, then maybe you should try contacting the author of the script. I'm very low on time to go over the code myself currently I'm afraid.
Maurice Makaay
Phorum Development Team



Re: Show todays Birthdays Mod September 25, 2007 10:29AM |
Registered: 21 years ago Posts: 1,076 |
Sorry, only registered users may post in this forum.