Error in index page

Having trouble installing ModphpBB3 - Post any questions or issues in here.
Anggun
Forum Member
Forum Member
Posts: 15
Joined: Wed Jul 23, 2008 9:11 am

Re: Error in index page

Post by Anggun »

LDM wrote:hmm, it sounds like something server related. Can you see if the edit is at the bottom of index_body.html.
You mean this line??

Code: Select all

<br /><!-- IF BIRTHDAYS_AHEAD_LIST -->{L_BIRTHDAYS_AHEAD}: <strong>{BIRTHDAYS_AHEAD_LIST}</strong><!-- ENDIF -->
I didn't delete it if thats what you meant....

Okay, I tried deleting it... and still got the same error...
Disable the upcoming birthday feature in ACP and its back to normal.
User avatar
LDM
Site Admin
Site Admin
Posts: 1786
Joined: Thu May 29, 2008 6:51 pm

Re: Error in index page

Post by LDM »

I still think it could may be server related as haven't seen this issue before. Maybe a bug on that mod that only affects some servers or maybe a language issue?

Here are the edits for the core files so you can have a check over your files.

index.php

Find:

Code: Select all

// Assign index specific vars
Listed before:

Code: Select all

if ($config['load_birthdays'] && $config['allow_birthdays'] && ( $config['allow_birthdays_ahead'] > 0 ) )
{
	if(!function_exists('get_upcbirthdays'))
	{	
		include_once($phpbb_root_path . 'includes/functions_upcbirthdays.' . $phpEx);
	}
	get_upcbirthdays();
}
includes/acp/acp_board.php

Find:

Code: Select all

'allow_birthdays'		=> array('lang' => 'ALLOW_BIRTHDAYS',		'validate' => 'bool',	'type' => 'radio:yes_no', 'explain' => true),
Listed after:

Code: Select all

'allow_birthdays_ahead'	=> array('lang' => 'ALLOW_BIRTHDAYS_AHEAD','validate' => 'int',	'type' => 'text:3:4', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
includes/session.php

Find:

Code: Select all

/**
       * Format user date
       */
       function format_date($gmepoch, $format = false, $forcedate = false)
Listed before:

Code: Select all

/**
       * Format user date for the Upcoming Birthday Mod
       */
       function format_dateucb($date, $format = false)
       {

          $lang_dates = $this->lang['datetime'];
          $format = (!$format) ? $this->date_format : $format;

          // Short representation of month in format
          if ((strpos($format, '\M') === false && strpos($format, 'M') !== false) || (strpos($format, '\r') === false && strpos($format, 'r') !== false))
          {
             $lang_dates['May'] = $lang_dates['May_short'];
          }

          unset($lang_dates['May_short']);


          return strtr(@date(str_replace('|', '', $format), $date), $lang_dates);
       }
language/en/common.php

find:

Code: Select all

'BIRTHDAYS'				=> 'Birthdays',
listed after:

Code: Select all

'BIRTHDAYS_AHEAD'		=> 'Users with a birthday within the next %d days',
language/en/acp/board.php

find:

Code: Select all

'ALLOW_BIRTHDAYS_EXPLAIN'	=> 'Allow birthdays to be entered and age being displayed in profiles. Please note the birthday list within the board index is controlled by a separate load setting.',
listed after:

Code: Select all

'ALLOW_BIRTHDAYS_AHEAD'		=> 'Number of Days to display upcoming birthdays',
	'ALLOW_BIRTHDAYS_AHEAD_EXPLAIN'	=> 'Displays the upcoming birthdays on the index page. Entering 0 or negative numbers will disable this feature.',
These edits should be on index_body.html

Code: Select all

<!-- IF S_DISPLAY_BIRTHDAY_LIST and BIRTHDAY_LIST or BIRTHDAYS_AHEAD_LIST -->
and

Code: Select all

{L_NO_BIRTHDAYS}<!-- ENDIF --><br /><!-- IF BIRTHDAYS_AHEAD_LIST -->{L_BIRTHDAYS_AHEAD}: <strong>{BIRTHDAYS_AHEAD_LIST}</strong><!-- ENDIF -->
I would like to help ypu more Anggun but really not sure why you are getting the error. The other option is to locate this upcoming birthday mods thread on phpbb.com and ask the author if they've seen the error before. It may even have been posted in there.
Anggun
Forum Member
Forum Member
Posts: 15
Joined: Wed Jul 23, 2008 9:11 am

Re: Error in index page

Post by Anggun »

LDM wrote:I still think it could may be server related as haven't seen this issue before. Maybe a bug on that mod that only affects some servers or maybe a language issue?

Here are the edits for the core files so you can have a check over your files.
Thank you so much!! I found a discrepancy in the index.php... Don't know how I got that considering the original file I got has the correct line.
User avatar
pawmarks
Forum Member
Forum Member
Posts: 18
Joined: Sat Apr 18, 2009 5:14 am

Re: Error in index page

Post by pawmarks »

I'm getting this same error after the upgrade to 3.0.5 from 3.0.4

perhaps because i'm running modphpbb3?

Fatal error: Call to undefined method user::format_dateucb() in /home/rough/public_html/includes/functions_upcbirthdays.php on line 91

couldn't find the "load settings" anywhere in acp or any other mention of birthday config within admin. (guess it's hiding from me)

tried to do the insert but it fails - duplicate - guess that's already in there.

whole forum is down because of this. any help is appreciated!
User avatar
pawmarks
Forum Member
Forum Member
Posts: 18
Joined: Sat Apr 18, 2009 5:14 am

Re: Error in index page

Post by pawmarks »

Ok, i simply disabled the upcoming birthdays look ahead within board features and WHAM! everything is now working (except, of course the bday thingie - big deal)

guess it's time i RTFM'd a bit! LOL
User avatar
LDM
Site Admin
Site Admin
Posts: 1786
Joined: Thu May 29, 2008 6:51 pm

Re: Error in index page

Post by LDM »

I was just going to try updating a current test board, but the ftp is down for some reason (which is bloody annoying) so as soon as it's back up, I will give it a go.

Speaking of 'back up', remember you should do it on your board before any upgrade attempts cause if it backfires you can just restore from back up and go over it again.
User avatar
cisco007
Staff
Staff
Posts: 501
Joined: Tue Oct 07, 2008 3:44 am

Re: Error in index page

Post by cisco007 »

you should check your mods compatability with 3.0.5 specially if it has language files, the new filesystem seems to be causing alot of errors.
User avatar
LDM
Site Admin
Site Admin
Posts: 1786
Joined: Thu May 29, 2008 6:51 pm

Re: Error in index page

Post by LDM »

I got my ftp back so will give it a whirl later and see what happens. So far the ModphpBB3 versions have been quite a breeze merging, so hopefully this will be the same.. I'm hoping :D
Post Reply