Page 4 of 6

Re: Popup on Birthday

Posted: Sun Dec 14, 2008 7:03 pm
by Cr33per
Yes I have it installed on that forum.
User Name: Test
Pass: testme

Re: Popup on Birthday

Posted: Sun Dec 14, 2008 7:13 pm
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?

Re: Popup on Birthday

Posted: Sun Dec 14, 2008 7:40 pm
by Cr33per
Yes it is.

Re: Popup on Birthday

Posted: Sun Dec 14, 2008 8:00 pm
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>?

Re: Popup on Birthday

Posted: Sun Dec 14, 2008 9:22 pm
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 ?

Re: Popup on Birthday

Posted: Sun Dec 14, 2008 9:24 pm
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?

Re: Popup on Birthday

Posted: Sun Dec 14, 2008 10:18 pm
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:

Re: Popup on Birthday

Posted: Sun Dec 14, 2008 11:11 pm
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?

Re: Popup on Birthday

Posted: Sun Dec 14, 2008 11:17 pm
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

Re: Popup on Birthday

Posted: Sun Dec 14, 2008 11:18 pm
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?

Re: Popup on Birthday

Posted: Sun Dec 14, 2008 11:32 pm
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)

Re: Popup on Birthday

Posted: Wed Dec 24, 2008 3:53 am
by DragonMaster1
I had found this too and added the code after:

garbage_collection();
exit_handler();
}


Seems to work right on my test board

Re: Popup on Birthday

Posted: Wed Dec 31, 2008 3:21 pm
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?

Re: Popup on Birthday

Posted: Wed Dec 31, 2008 3:46 pm
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....

Re: Popup on Birthday

Posted: Fri Jan 09, 2009 1:33 am
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.....