Birthdays

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

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
151
66%
Very Good
39
17%
Good
21
9%
Fair
5
2%
Poor
12
5%
 
Total votes: 228

Trish20646
Registered User
Posts: 14
Joined: Sat Aug 11, 2007 4:54 am

Re: Birthdays

Post by Trish20646 » Fri Aug 24, 2007 7:36 pm

I re-uploaded the original one I had up there with the first error.

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Birthdays

Post by RMcGirr83 » Fri Aug 24, 2007 7:41 pm

okay, what I did was take a vanilla template.php file and applied the edits to it for the birthday mod. The link I gave you above has been updated. Please try again.

Remember to "select all" when trying to copy the file over and renaming to template.php. What editor do you use?
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

Brinda
Registered User
Posts: 41
Joined: Fri Mar 02, 2007 7:54 pm
Contact:

Re: Birthdays

Post by Brinda » Fri Aug 24, 2007 7:44 pm

Sorry, but I have the same problem of 15 days ago.

I've just added this mod on my forum (the real forum, not where normally I try the changes) and in viewprofile all the years is 2000 and not the correct birthyear.

I've change with this:

Code: Select all

$birthday = ' ';
    if ( !empty($profiledata['user_birthday']) && $profiledata['birthday_display'] != BIRTHDAY_AGE && $profiledata['birthday_display'] != BIRTHDAY_NONE )
    {
       preg_match('/(..)(..)(....)/', sprintf('%08d',$profiledata['user_birthday']), $bday_parts);
       $bday_month = $bday_parts[1];
       $bday_day = $bday_parts[2];
       $bday_year = ( $profiledata['birthday_display'] != BIRTHDAY_DATE ) ? $bday_parts[3] : 0;
   $birthday_format = ($bday_year != 0) ? str_replace(array('y','Y'),array($bday_year % 100,$bday_year),'d/M/Y') : preg_replace('#[^djFmMnYy]*[Yy]#','','d/M/Y');
       $birthday = create_date('d/M/Y', gmmktime(12,0,0,$bday_month,$bday_day,2000), 0);
    }
As Terrafrost write me, but it does'nt work.

May have I to change something else?

Thank you!

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Birthdays

Post by RMcGirr83 » Fri Aug 24, 2007 7:51 pm

Not sure but the 2000 in this code

Code: Select all

$birthday = create_date('d/M/Y', gmmktime(12,0,0,$bday_month,$bday_day,2000), 0);
I believe is where the year 2000 is coming from.

you could try and change it to this and see what happens

Code: Select all

$birthday = create_date('d/M/Y', gmmktime(12,0,0,$bday_month,$bday_day,$bday_year), 0);
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

Trish20646
Registered User
Posts: 14
Joined: Sat Aug 11, 2007 4:54 am

Re: Birthdays

Post by Trish20646 » Fri Aug 24, 2007 9:40 pm

RMcGirr83 wrote:okay, what I did was take a vanilla template.php file and applied the edits to it for the birthday mod. The link I gave you above has been updated. Please try again.

Remember to "select all" when trying to copy the file over and renaming to template.php. What editor do you use?
I use notepad to edit the files.

I uploaded the new file and now the error is gone but I'm getting a new error:

Parse error: syntax error, unexpected $end in /home/jmdinfon/public_html/duganenterprisesinc/trish/forum/phpBB-2.0.22/phpBB2/includes/template.php(127) : eval()'d code on line 153

I'm sure if I understood PHP I could fix this myself but since I don't I can't figure it out. Just something to do with the $ that is in there on that line.

Thanks again :)

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Birthdays

Post by RMcGirr83 » Fri Aug 24, 2007 9:53 pm

That error is being generated from the part of the template.php file that I stated earlier was different from a fresh template.php file

Here is your code

Code: Select all

	function assign_var_from_handle($varname, $handle)
	{
		if (!$this->loadfile($handle))
		{
			die("Template->assign_var_from_handle(): Couldn't load template file for handle $handle");
		}
{
		// Compile it, with the "no echo statements" option on.
		$_str = "";
		$code = $this->compile($this->uncompiled_code[$handle], true, '_str');
        }

{
		// evaluate the variable assignment.
		eval($code);
		// assign the value of the generated variable to the given varname.
		$this->assign_var($varname, $_str);

		return true;
	}
and here is the code from a fresh download

Code: Select all

	function assign_var_from_handle($varname, $handle)
	{
		if (!$this->loadfile($handle))
		{
			die("Template->assign_var_from_handle(): Couldn't load template file for handle $handle");
		}

		// Compile it, with the "no echo statements" option on.
		$_str = "";
		$code = $this->compile($this->uncompiled_code[$handle], true, '_str');

		// evaluate the variable assignment.
		eval($code);
		// assign the value of the generated variable to the given varname.
		$this->assign_var($varname, $_str);

		return true;
	}
I'm not really sure what the purpose of the misplaced { } s is.

Perhaps TerraFrost can assist you further.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

Trish20646
Registered User
Posts: 14
Joined: Sat Aug 11, 2007 4:54 am

Re: Birthdays

Post by Trish20646 » Fri Aug 24, 2007 10:06 pm

RMcGirr83 wrote:That error is being generated from the part of the template.php file that I stated earlier was different from a fresh template.php file

Here is your code

Code: Select all

	function assign_var_from_handle($varname, $handle)
	{
		if (!$this->loadfile($handle))
		{
			die("Template->assign_var_from_handle(): Couldn't load template file for handle $handle");
		}
{
		// Compile it, with the "no echo statements" option on.
		$_str = "";
		$code = $this->compile($this->uncompiled_code[$handle], true, '_str');
        }

{
		// evaluate the variable assignment.
		eval($code);
		// assign the value of the generated variable to the given varname.
		$this->assign_var($varname, $_str);

		return true;
	}
and here is the code from a fresh download

Code: Select all

	function assign_var_from_handle($varname, $handle)
	{
		if (!$this->loadfile($handle))
		{
			die("Template->assign_var_from_handle(): Couldn't load template file for handle $handle");
		}

		// Compile it, with the "no echo statements" option on.
		$_str = "";
		$code = $this->compile($this->uncompiled_code[$handle], true, '_str');

		// evaluate the variable assignment.
		eval($code);
		// assign the value of the generated variable to the given varname.
		$this->assign_var($varname, $_str);

		return true;
	}
I'm not really sure what the purpose of the misplaced { } s is.

Perhaps TerraFrost can assist you further.
Thanks for your help :)

I'll wait for Terra to come on and see if she can figure it out. I re-uploaded the template.txt file on my site in case it needs to be veiwed again with the new changes:

http://www.duganenterprisesinc.com/tris ... mplate.txt

Here is a link to my site in case the error needs to be viewed:
http://www.duganenterprisesinc.com/tris ... /index.php

GRRR You are going to hate me for this one:

I'm also having an error when I click on Log in to check private messages:
Parse error: syntax error, unexpected ';' in /home/jmdinfon/public_html/duganenterprisesinc/trish/forum/phpBB-2.0.22/phpBB2/privmsg.php on line 516

Here is the link to my txt file for that:
http://www.duganenterprisesinc.com/tris ... rivmsg.txt

Plus I have an error when I log into my admin board. On the left where the CP should be this is what I'm seeing:
Parse error: syntax error, unexpected $end in /home/jmdinfon/public_html/duganenterprisesinc/trish/forum/phpBB-2.0.22/phpBB2/admin/admin_users.php on line 1273

Here is the txt file for that one:
http://www.duganenterprisesinc.com/tris ... _users.txt

Sorry about all the mess. I don't know how I could have screwed this up so royally :oops: :cry:

chery
Registered User
Posts: 95
Joined: Wed Mar 22, 2006 7:30 pm
Location: terra australia
Contact:

Re: Birthdays

Post by chery » Fri Aug 24, 2007 10:39 pm

Thanks for the help TerraFrost - you have a great mod here and your support for it is fantastic and much appreciated :D

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Birthdays

Post by RMcGirr83 » Fri Aug 24, 2007 10:49 pm

Trish20646 wrote: I'll wait for Terra to come on and see if she can figure it out.
:lol:

I don't think he will agree with that. It's okay, it's happened to me as well. ;)

If you have no other mods installed, your best bet may be to start over or at the least double check your edits. Something is not right for you to be getting all those errors.

BTW, winmerge that I have linked to in my sig is an awesome utility. I highly recommend it for anyone modding by hand and wanting to compare before and afters in case errors occur.

Good luck with your endeavors. :)
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored

Trish20646
Registered User
Posts: 14
Joined: Sat Aug 11, 2007 4:54 am

Re: Birthdays

Post by Trish20646 » Fri Aug 24, 2007 10:55 pm

RMcGirr83 wrote:
Trish20646 wrote: I'll wait for Terra to come on and see if she can figure it out.
:lol:

I don't think he will agree with that. It's okay, it's happened to me as well. ;)

If you have no other mods installed, your best bet may be to start over or at the least double check your edits. Something is not right for you to be getting all those errors.

BTW, winmerge that I have linked to in my sig is an awesome utility. I highly recommend it for anyone modding by hand and wanting to compare before and afters in case errors occur.

Good luck with your endeavors. :)
:oops: :oops: Sorry about that. Thanks for letting me know.

I have some other mods applied. Easy MOD, Callite, and my quick reply so I really would hate to start over. I will if I have to.

I'm going to look into that winmerge. Thanks for the heads up and all of your help :)

Brinda
Registered User
Posts: 41
Joined: Fri Mar 02, 2007 7:54 pm
Contact:

Re: Birthdays

Post by Brinda » Fri Aug 24, 2007 11:02 pm

RMcGirr83 wrote:Not sure but the 2000 in this code

Code: Select all

$birthday = create_date('d/M/Y', gmmktime(12,0,0,$bday_month,$bday_day,2000), 0);
I believe is where the year 2000 is coming from.

you could try and change it to this and see what happens

Code: Select all

$birthday = create_date('d/M/Y', gmmktime(12,0,0,$bday_month,$bday_day,$bday_year), 0);
Yeah...now it is ok!

Last thing...

In ACP when I want to select "Pm", I can't do it. I can choose only Email and Popup. I don't know why!

thanks a lot!

Bye!

User avatar
quahappy
Former Team Member
Posts: 1416
Joined: Tue Dec 12, 2006 8:19 pm
Location: South Yorkshire
Name: Andy Green

Re: Birthdays

Post by quahappy » Fri Aug 24, 2007 11:53 pm

TerraFrost wrote:good luck! If you are able to achieve the desired effect, please post how, here, so others can benefit from your work :)

If you can't achieve the desired effect, post the URL to your board and I'll see what I can do (also, do mention why you're posting the URL to your board - I'm not going to remember your name :P)
Managed to get this one sorted after a lot of fiddling. It didn't help the fact that Internet Explorer 7 isn't W3C compliant with the use of <BIG>, so I've removed that (I had only remembered!). Anyhow, below is the original /ca_aphrodite/index_body.tpl birthday code that I had changed (from Birthday MOD):

Code: Select all

<!-- BEGIN birthdays -->
<div class="forumline">

   <p class="row-header"><span>{L_TODAYS_BIRTHDAYS}</span></p>
<big><br />
   <p class="row-header1"><img src="templates/subSilver/images/icon_birthday.gif" align="left" alt="{L_VIEW_BIRTHDAYS}" />{BIRTHDAYS}<br />
           <!-- BEGIN upcoming -->
           {UPCOMING}<br />
           <!-- END upcoming -->
<br />
</big>
</p>
</div>
  <!-- END birthdays -->
And the new code:

Code: Select all

<!-- BEGIN birthdays -->
<table width="100%" cellspacing="0" class="forumline">
  <tr>
	<td colspan="5" class="row-header"><span>{L_TODAYS_BIRTHDAYS}</span></td> 
  </tr>
   <tr>
     <td class="row3 row-center" width="50"><img src="templates/subSilver/images/icon_birthday.gif" valign="middle"></td>
     <td align="left"><font size="2"><br />&nbsp;{BIRTHDAYS}<br />
       		<!-- BEGIN upcoming -->
	         	  &nbsp;{UPCOMING}<br />
		<!-- END upcoming -->
                 <br />
           </font>
      </td>
  </tr>
</table>
<!-- END birthdays -->
OK, there is an overkill of <br /> but this is purely to make the Birthday block stand out. Also the use of &nbsp; indents the text away from the line that separates the image from the birthday greetings. I could have set up an additional css for this but as it only applies to Birthday panel, I didn't see the point.

New screenshot:

Image

BTW, the Birthday Panel on my website is NOT visible to Guests ;)

No matter how many Members have birthdays, the birthday Image stays vertically centered. Everything looks much tidier now compared to how I had it before. And the size of the text is correct in all browsers. Even replacing <td align="left"> with <td align="center"> also looks nice. ;)

TerraFrost - if you could comment on what I've done (new code) I'd be eternally grateful. I'm open to criticism otherwise I won't know if I'm doing right or not LOL.

Thanks.

Andy
http://www.screwballscrabble.co.uk
If you don't ask.....

Brinda
Registered User
Posts: 41
Joined: Fri Mar 02, 2007 7:54 pm
Contact:

Re: Birthdays

Post by Brinda » Sat Aug 25, 2007 2:27 am

Another problem! (sorry)

In memberlist doesn't appear any Age... :roll: :roll:

User avatar
bamavamp
Registered User
Posts: 62
Joined: Wed Jan 24, 2007 5:13 am
Location: sweet home alabama

Re: Birthdays

Post by bamavamp » Sat Aug 25, 2007 5:41 am

Terra...I figured out why admins keep getting the 'invalid birthday' mesage when we approve members, that I posted about earlier. Its because they are putting the date in wrong. For some reason they are thinking the big long box is for the month and year like 1021 meaning october 21st and the first small box is the year they were born so they are just putting 66 as in 1966. Is there anyway to fix the boxes so they are in order of month, day, year? Or even have word beside the boxes to explain what each box is for?
Thanks so much!

User avatar
quahappy
Former Team Member
Posts: 1416
Joined: Tue Dec 12, 2006 8:19 pm
Location: South Yorkshire
Name: Andy Green

Re: Birthdays

Post by quahappy » Sat Aug 25, 2007 7:18 pm

bamavamp wrote:Terra...I figured out why admins keep getting the 'invalid birthday' mesage when we approve members, that I posted about earlier. Its because they are putting the date in wrong. For some reason they are thinking the big long box is for the month and year like 1021 meaning october 21st and the first small box is the year they were born so they are just putting 66 as in 1966. Is there anyway to fix the boxes so they are in order of month, day, year? Or even have word beside the boxes to explain what each box is for?
Thanks so much!
Hope TerraFrost doesn't mind me answering your question. ;)

I had a similar problem (and had description of what each box was too!), until I changed the Birthday Interface:

If you look within the docs folder of the Birthday MOD saved on your PC, there is a HTML file called: Interface. Double-click on this and it'll open in your browser. Here, you can see four different layouts. I would say the bottom one, Year Dropdown, answers your needs, plus it is in the order that you want: Month, Day, and Year (once you've made the changes as below):

(The year_dropdown.tpl file requires renaming to birthday_interface.tpl)

Code: Select all

#
#-----[ COPY ]------------------------------------------
#
copy contrib/templates/subSilver/year_dropdown.tpl to templates/subSilver/birthday_interface.tpl
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Default_Month'] = '[ Select a Month ]';
$lang['Default_Day'] = 'dd';
$lang['Default_Year'] = 'yyyy';
#
#-----[ REPLACE WITH ]----------------------------------
#
$lang['Default_Month'] = 'Month';
$lang['Default_Day'] = 'Day';
$lang['Default_Year'] = 'Year';
Obviously, if using a different style, upload the [ COPY ] to your template folder.

I hope that helps.
If you don't ask.....

Post Reply

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