[MODDB] Upcoming Birthday list 1.0.0a

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
Locked
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: [BETA] Upcoming Birthday list

Post by lefty74 »

Kingster wrote:Installed mod and works good is there suppose to be anything in the acp for this mod?
yes, have a look at teh screenshots ;)
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.
dinger
Registered User
Posts: 12
Joined: Mon Aug 13, 2007 8:37 pm

Re: [BETA] Upcoming Birthday list

Post by dinger »

question?.. is the download in post#1 the most recent version???
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: [BETA] Upcoming Birthday list

Post by lefty74 »

yes, you would need to make one change once you have installed it though.
see here: http://www.phpbb.com/community/viewtopi ... 5#p3560365

i am currently busy with my announcement centre mod and then i will be working my way towards my other mods so its up to you to install this now or wait a bit. :)
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.
dinger
Registered User
Posts: 12
Joined: Mon Aug 13, 2007 8:37 pm

Re: [BETA] Upcoming Birthday list

Post by dinger »

ill wait a bit no hurry... im not so good at modding... :oops:
PaoDoc
Registered User
Posts: 30
Joined: Tue Dec 25, 2007 9:12 pm

Re: [BETA] Upcoming Birthday list

Post by PaoDoc »

Hi! Great mod! Installed and went well! Just a thing (I don't know if someone said this before) if I chose 365 days for the number of days to be used to show the list of the upcoming birthdays, I only see the birthdays of year 2008.
This means that when we will be in 25 of december 2008 and I chose 7 days (as parameter), someone who has the birthday on 1st January 2009 will not be shown in the list!

Is it a bug? Did you already know?

bye :)
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: [BETA] Upcoming Birthday list

Post by lefty74 »

thanks,
yes, i think this
http://www.phpbb.com/community/viewtopi ... 5#p3560365

should fix it for now until the new version.
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.
PaoDoc
Registered User
Posts: 30
Joined: Tue Dec 25, 2007 9:12 pm

Re: [BETA] Upcoming Birthday list

Post by PaoDoc »

Thanks! ;) I hadn't read all the post!
PaoDoc
Registered User
Posts: 30
Joined: Tue Dec 25, 2007 9:12 pm

Re: [BETA] Upcoming Birthday list

Post by PaoDoc »

I did the changes, but now if a set 365 days (to see if the problem of the changing from 2008 and 2009 is fixed) there are all my users in the list, also those who had not specified their birthdate!
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: [BETA] Upcoming Birthday list

Post by lefty74 »

PaoDoc wrote:I did the changes, but now if a set 365 days (to see if the problem of the changing from 2008 and 2009 is fixed) there are all my users in the list, also those who had not specified their birthdate!
aha, you found a bug! thanks very much :D

try this
FIND

Code: Select all

		WHERE user_birthday <> ''
REPLACE WITH

Code: Select all

		WHERE user_birthday NOT LIKE '%- 0-%'
			AND user_birthday NOT LIKE '0-%'
				AND	user_birthday NOT LIKE '0- 0-%'
					AND	user_birthday NOT LIKE ''
please let me know if this works.

i will also limit the upcoming days to 365 in the next version as anything after that won't show anyway.
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.
PaoDoc
Registered User
Posts: 30
Joined: Tue Dec 25, 2007 9:12 pm

Re: [BETA] Upcoming Birthday list

Post by PaoDoc »

I'll try later and I'll let you know! ;)
PaoDoc
Registered User
Posts: 30
Joined: Tue Dec 25, 2007 9:12 pm

Re: [BETA] Upcoming Birthday list

Post by PaoDoc »

Perfect! Now it works fine also if I chose 365 days! Well done! ;)
manu35
Registered User
Posts: 14
Joined: Wed Sep 20, 2006 10:15 am
Location: rennes

Re: [BETA] Upcoming Birthday list

Post by manu35 »

Hi all
I just want to say this mod doesn't work with "NV who was here 6.0.4"
Because of a conflict on the index.php before "assign variable" or sth like this (it's the final modification on index.php"
bye

edit : sorry, it's with the centre announcement 0.2.0
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: [BETA] Upcoming Birthday list

Post by lefty74 »

hi,
it doesn't work?

what error message do you get?
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.
manu35
Registered User
Posts: 14
Joined: Wed Sep 20, 2006 10:15 am
Location: rennes

Re: [BETA] Upcoming Birthday list

Post by manu35 »

hi lefty ;)
in fact it works, but the announcement centre had a problem in the acp when I install your mod (I had a white page). When I wanted to go to the "board settings ", I had the same page.

In the index.php :

Code: Select all

// Assign index specific vars
add after :

Code: Select all

// Generate birthday ahead list if required ...// Generate birthday ahead list if required ...
$birthday_ahead_list = '';
if ($config['load_birthdays'] && $config['allow_birthdays'] && ( $config['allow_birthdays_ahead'] > 0 ) )
{
	$sql = 'SELECT user_id, username, user_colour, user_birthday
		FROM ' . USERS_TABLE . "
		WHERE user_birthday <> ''
			AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
	$result = $db->sql_query($sql);

	$now = getdate(time() + $user->timezone + $user->dst - date('Z'));
    $today = (mktime(0, 0, 0, $now['mon'], $now['mday'], $now['year']));

	while ($row = $db->sql_fetchrow($result))
	{
       $birthdaydate = (gmdate('Y') . '-' . trim(substr($row['user_birthday'],3,-5)) . '-' . trim(substr($row['user_birthday'],0,-8) ));
       $user_birthday = strtotime($birthdaydate);
	   if ( $user_birthday >= ($today + 86400) && $user_birthday <= ($today + ($config['allow_birthdays_ahead'] * 86400) ) )
	   {
		if ($row['user_colour'])
			{
				$user_colour = ' style="color:#' . $row['user_colour'] . '"';
				$row['username'] = '<strong>' . $row['username'] . '</strong>';
			}
		else
			{
				$user_colour = '';
			}

	   $birthday_ahead_list .= (($birthday_ahead_list != '') ? ', ' : '') . '<a' . $user_colour . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']) . '" title="' . date('d M', $user_birthday) . '">' . $row['username'] . '</a>';

		if ( $age = (int) substr($row['user_birthday'], -4) )
		{
			$birthday_ahead_list .= ' (' . ($now['year'] - $age) . ')';
		}
		}
	}
	
	$db->sql_freeresult($result);
}
and the announcement center needs to have before :

Code: Select all

get_announcement_data( ($birthday_list) ? true : false );
Sorry for my bad english, but it's what I noticed.
User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: [BETA] Upcoming Birthday list

Post by lefty74 »

they are
manu35 wrote: In the index.php :

Code: Select all

// Assign index specific vars
add after :

Code: Select all

// Generate birthday ahead list if required ...// Generate birthday ahead list if required ...
$birthday_ahead_list = '';
if ($config['load_birthdays'] && $config['allow_birthdays'] && ( $config['allow_birthdays_ahead'] > 0 ) )
...
it is actually

Code: Select all

#
#-----[ FIND ]------------------------------------------
#
// Assign index specific vars

#
#-----[ BEFORE, ADD ]------------------------------------------
#
both mods have an add before at the same place but there is no conflict. it does not matter which one is before the other ;)
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.
Locked

Return to “[3.0.x] MODs in Development”