Popup on Birthday

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
User avatar
Cr33per
Registered User
Posts: 366
Joined: Mon Aug 13, 2007 6:29 pm
Location: Illinois
Contact:

Re: Popup on Birthday

Post by Cr33per »

Yes I have it installed on that forum.
User Name: Test
Pass: testme

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

Re: Popup on Birthday

Post by lefty74 »

ok, thanks.

could you post your includes/functions.php and posting.php please?

cheers

p.s.. it is switched turned on in the acp, isnt it?
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.

User avatar
Cr33per
Registered User
Posts: 366
Joined: Mon Aug 13, 2007 6:29 pm
Location: Illinois
Contact:

Re: Popup on Birthday

Post by Cr33per »

Yes it is.
Attachments

[The extension zip has been deactivated and can no longer be displayed.]


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

Re: Popup on Birthday

Post by lefty74 »

thanks, looks ok to me.

should work really.

i am assuming you checked all your other edits already.

you would not happen to have a test board by any chance>?
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.

User avatar
Cr33per
Registered User
Posts: 366
Joined: Mon Aug 13, 2007 6:29 pm
Location: Illinois
Contact:

Re: Popup on Birthday

Post by Cr33per »

A test board? This is the only board I have.
This is a fresh install of php 3.0.3 and I only use approved mods. The board was installed on November 28th 2008

Did you try to join the forum and see if it works ?

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

Re: Popup on Birthday

Post by lefty74 »

yeah, well, i used your test account.

to check it further, i would need ftp access? would you be willing to maybe set me up with a temp ftp account?
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.

User avatar
Cr33per
Registered User
Posts: 366
Joined: Mon Aug 13, 2007 6:29 pm
Location: Illinois
Contact:

Re: Popup on Birthday

Post by Cr33per »

Here are the rest of the files I had to edit, i hope it helps.
I never had to create a temp ftp account before so :oops:
Attachments

[The extension zip has been deactivated and can no longer be displayed.]


JeRicHoOL
Registered User
Posts: 449
Joined: Sun Jun 01, 2008 4:02 pm

Re: Popup on Birthday

Post by JeRicHoOL »

I installed this mod and applied all the edits but it doesnt seem to work. I went on with my test account and I didnt get a pop up message. I set the 15 december as his bday.
Any solutions?

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

Re: Popup on Birthday

Post by lefty74 »

Cr33per wrote:Here are the rest of the files I had to edit, i hope it helps.
I never had to create a temp ftp account before so :oops:
i will try and have a look
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.

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

Re: Popup on Birthday

Post by lefty74 »

JeRicHoOL wrote:I installed this mod and applied all the edits but it doesnt seem to work. I went on with my test account and I didnt get a pop up message. I set the 15 december as his bday.
Any solutions?
nope, as i said before, it works on my board.

did you doublecheck the edits? is the mod turned on?

If so, could you set me up with a temp ftp account?
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.

JeRicHoOL
Registered User
Posts: 449
Joined: Sun Jun 01, 2008 4:02 pm

Re: Popup on Birthday

Post by JeRicHoOL »

I just turned it on but it still doesn't work. I have found something though.

posting.php

Find

Code: Select all

	$template->assign_vars(array(
		'PROGRESS_BAR'	=> $user->img('upload_bar', $user->lang['UPLOAD_IN_PROGRESS']))
	);

	$template->display('popup');
}
Add After

Code: Select all

function birthday_popup()
{
	global $template, $user;

	$user->setup('posting');

	page_header($user->lang['CONGRATULATIONS']);

	$template->set_filenames(array(
		'birthday_popup'	=> 'birthday_popup.html')
	);

    $birthdaydate = (gmdate('Y') . '-' . trim(substr($user->data['user_birthday'],3,-5)) . '-' . trim(substr($user->data['user_birthday'],0,-8)));
	$user_birthday = strtotime($birthdaydate) ;
	$last_visit_birthday = $user->data['user_lastvisit'];
	$now_popup = getdate(time() + $user->timezone + $user->dst - date('Z'));
	$today_popup = mktime(0, 0, 0, $now_popup['mon'], $now_popup['mday'], $now_popup['year']);

	if ( ( $user_birthday >= $today_popup ) && ( $user_birthday < ($today_popup + 86400) ) && ( $user_birthday > $last_visit_birthday ) )
	{
		$message = sprintf($user->lang['CONGRATSTODAY'], $user->data['username']); 
	}
	else if ( ( $user_birthday > $last_visit_birthday ) && ( $user_birthday < $today_popup ) )
	{
		$message = sprintf($user->lang['CONGRATSBEFORE'], $user->data['username']); 
	}
		

		$template->assign_vars(array(
			'MESSAGE'			=> $message,
			'S_NOT_LOGGED_IN'	=> ($user->data['user_id'] == ANONYMOUS) ? true : false)
		);

	$template->display('birthday_popup');
}

The code part I had to find looks like this in my posting.php

Code: Select all

	$template->assign_vars(array(
		'PROGRESS_BAR'	=> $user->img('upload_bar', $user->lang['UPLOAD_IN_PROGRESS']))
	);

	$template->display('popup');

	garbage_collection();
	exit_handler();
}
I have added the code after but as you can see there are 2 more lines in my file...

Code: Select all

	garbage_collection();
	exit_handler();
I don't know what these lines are for.

phpBB 3.0.3
BlackSmoke Style (prosilver based)

User avatar
DragonMaster1
Registered User
Posts: 994
Joined: Tue Aug 17, 2004 11:04 am
Name: Terry
Contact:

Re: Popup on Birthday

Post by DragonMaster1 »

I had found this too and added the code after:

garbage_collection();
exit_handler();
}


Seems to work right on my test board

User avatar
Cr33per
Registered User
Posts: 366
Joined: Mon Aug 13, 2007 6:29 pm
Location: Illinois
Contact:

Re: Popup on Birthday

Post by Cr33per »

I have checked all my edits a thousand times. Whats the best way to check if this is working because i get nothing. Set my b-day for the next day and wait or can I just change my b-day to today and it should pop up?

User avatar
DragonMaster1
Registered User
Posts: 994
Joined: Tue Aug 17, 2004 11:04 am
Name: Terry
Contact:

Re: Popup on Birthday

Post by DragonMaster1 »

When I tested it on my board I found that I had to leave it run normally for a few days and it just worked on time. Was not able to instantly get it into action. I think it takes at least 1 full day plus the few extra hours til a day starts....

MoneyMagnets
Registered User
Posts: 7
Joined: Fri Jan 09, 2009 12:07 am
Location: South Australia
Contact:

Re: Popup on Birthday

Post by MoneyMagnets »

I can't get it to work on phpBB3 either but I'm using template prosilver SE - are there any special changes that need to be made for that template?

Thanks for any help.....
Last edited by MoneyMagnets on Fri Jan 09, 2009 6:57 am, edited 1 time in total.

Locked

Return to “[3.0.x] MOD Database Releases”