Log in Register FAQ Memberlist Search Welcome to RCF - WHF Forum Index
alt : test.swf
Welcome to RCF - WHF
4fx3.gif 
calendar_open_closeCalendar 
Parse Error
Post new topic   Reply to topic View previous topic :: View next topic
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support Add To Bookmarks
Parse Error
PostPosted: 11/10/2006 8:39 AM Reply with quote
Caravan
FTM
Caravan
Posts 282
Word Cnt. 31,380
BDay Apr 14
Sign Aries
Sex Sex:Female
Joined: Nov 01, 2006
Local time: 9:44 PM
Location: Denver, PA
usaCa.gif
I installed the simplified header links mod and had to tweak the install file a little bit so it would go through okay, but now the index looks all messed up and I have a parse error.

Code:
Parse error: parse error, unexpected '}' in /home/friend12/public_html/test/includes/template.php(127) : eval()'d code on line 253


Here is that line. I understand that it's not liking that "}" but I am not sure what to replace it with. I also am confused why I would get this error after installing a mod that didn't even change anything in the includes/template.php

Code:
      {
         if ( !empty($i) )
         {
            $bday_template.= isset($bday_tpls['bday_glue']) ? $bday_tpls['bday_glue'] : '';
         }
         $bday_template.= strtr($bday_format,array(
            'd' => $bday_tpls["bday_day$i"],
            'j' => $bday_tpls["bday_day$i"],


Just in case you need it, this is what I ran through EM

Code:
##############################################################
## MOD Title: Simplified Header Links
## MOD Author: Khurram
## Author Website: http://www.khurram.ca/
## MOD Description:
## Adds a Home link, modifies link wordings and removes Usergroups link from the overall header.
##
## MOD Version: 2.0.21  
##
## Installation Level: (Easy)
## Installation Time:  2 Minutes
## Files To Edit: 3
##
##    language/lang_english/lang_main.php
##    templates/subSilver/overall_header.tpl
##    includes/page_header.php
##
## Included Files: icon_mini_home.gif
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
## Graphic Licence: Free for personal, non-commercial use only.
##############################################################
##
## Author Notes:
##
## I wrote this mod while trying to add a home link to the overall header, modify a few link
## wordings and removed the usergroups link, as it is not used in any of the forums I use or
## designed. The usergroups link could be left as it is, if you study the changes carefully.
##
##    ONLY THE FOLLOWING SITE HAS THE LATEST AVAILABLE VERSION OF THIS MOD
##
##    http://forum.khurram.ca/viewtopic.php?t=50
##
## My mod was also released at phpBB community but I no longer support or update it there.
## So the only place to get updated version, help, and discuss this mod is at above link.
## The oringal phpBB site where this mod was released is:
##
## http://www.phpbb.com/phpBB/viewtopic.php?t=249475
##
##############################################################
## MOD History:
##
##   2006-06-14 - Version 2.0.21
##      - Renamed mod version to show the latest phpBB version it has been tested to work with
##
##   2006-04-25 - Version 2.0.20
##      - Renamed mod version to show the latest phpBB version it has been tested to work with
##      - Changed coding to comply with phpBB 2.0.20
##      - Instead of replacing whole text block, used in-line find and replace tips
##
##   2005-07-28 - Version 1.0.4
##      - Verified compatibility with phpBB 2.0.17
##
##   2005-04-12 - Version 1.0.3
##      - Changed wording of FAQ link
##      - Changed home icon graphic
##
##   2005-02-28 - Version 1.0.2
##      - Updated the version to be compatible with phpBB 2.0.13
##      - Home link now uses a new icon instead of the default usergroups icon
##
##   2004-12-22 - Version 1.0.1
##      - Corrected the incorrectly double pasted FAQ link from original code finding
##   2004-12-20 - Version 1.0.0
##      - First Release Version :)
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################



#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#
$lang['Message'] = 'Message';

#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Home'] = 'Home';

#
#-----[ FIND ]------------------------------------------
#
$lang['FAQ'] = 'FAQ';

#
#-----[ REPLACE WITH ]------------------------------------------
#
$lang['FAQ'] = 'Questions';

#
#-----[ FIND ]------------------------------------------
#
$lang['Login_check_pm'] = 'Log in to check your private messages';

#
#-----[ REPLACE WITH ]------------------------------------------
#
$lang['Login_check_pm'] = 'Private Messages';


#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl

#
#-----[ FIND ]------------------------------------------
# this is to find the area where we will be making two changes
#

                  <td align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a>&nbsp; &nbsp;<a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a>&nbsp;
                  <!-- BEGIN switch_memberlist -->
                  &nbsp;<a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a>&nbsp;
                  <!-- END switch_memberlist -->
                  &nbsp;<a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>&nbsp;
                  <!-- BEGIN switch_user_logged_out -->


#
#-----[IN-LINE FIND]--------------------------------------------
#
<a href="{U_FAQ}" class="mainmenu">


#
#-----[IN-LINE BEFORE, ADD]-------------------------------------
#
<a href="{U_INDEX}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_home.gif" width="12" height="13" border="0" alt="{L_HOME}" hspace="3" />{L_HOME}</a>&nbsp; &nbsp;

 
#
#-----[IN-LINE FIND]--------------------------------------------------
#
<a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>&nbsp;


#
#-----[ REPLACE WITH ]------------------------------------------
# just delete the line to remove the usergroup icon
# if you want usergroups icon to show, then dont do this step and dont delete
# Remember this only removes the usergroup icon. You can still access usergroup by yourForum.com/groupcp.php



#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php

#
#-----[ FIND ]------------------------------------------
#
'L_FAQ' => $lang['FAQ'],

#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_HOME' => $lang['Home'],

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Back to Top
View user's profile Find all posts by FTM Send private message   Visit poster's website Yahoo Messenger
Re: Parse Error
PostPosted: 11/11/2006 8:14 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 9:44 PM
Location: St Pete, FL
peace.gif
First, do you plan to support all of the languages in your language folder?  If you only plan to support English on your board, you can and should delete all the other non-English languages to simplify the modding process.  Just be careful not to delete the language/lang_english folder...

I just found a serious flaw in the MOD script.  This is how you fix it...

OPEN
simplified_header_links_mod_v2_0_21.txt

FIND
Code:
#
#-----[ REPLACE WITH ]------------------------------------------
# just delete the line to remove the usergroup icon
# if you want usergroups icon to show, then dont do this step and dont delete
# Remember this only removes the usergroup icon. You can still access usergroup by yourForum.com/groupcp.php

REPLACE WITH
Code:
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#

If that doesn't work in EM, then use this instead:

REPLACE WITH
Code:
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
<i></i>

I fixed your overall-header.tpl file on your Test board and all is working correctly again...

headbang
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: Parse Error
PostPosted: 11/11/2006 8:20 AM Reply with quote
Caravan
FTM
Caravan
Posts 282
Word Cnt. 31,380
BDay Apr 14
Sign Aries
Sex Sex:Female
Joined: Nov 01, 2006
Local time: 9:44 PM
Location: Denver, PA
usaCa.gif
Nightrider wrote:
First, do you plan to support all of the languages in your language folder?  If you only plan to support English on your board, you can and should delete all the other non-English languages to simplify the modding process.  Just be careful not to delete the language/lang_english folder...


No, I do not plan to support any other languages, thank you for telling me that, I will be sure to do that from now on.

Quote:

I just found a serious flaw in the MOD script.  This is how you fix it...


I actually noticed that!! I should have trusted myself in thinking it didn't look right. So do I have to do anything else to the test board? Or is this change just for when I put it on the live board?

Quote:

I fixed your overall-header.tpl file on your Test board and all is working correctly again...

headbang


Thank you bunches!!  banana
Back to Top
View user's profile Find all posts by FTM Send private message   Visit poster's website Yahoo Messenger
Re: Parse Error
PostPosted: 11/11/2006 8:30 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 9:44 PM
Location: St Pete, FL
peace.gif
I mentioned that change so that you can fix the MOD script, restore the backups, then try it again.  You don't want to try this on your Live board until you are confident that it will work correctly...

munky2
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: Parse Error
PostPosted: 11/11/2006 8:31 AM Reply with quote
Caravan
FTM
Caravan
Posts 282
Word Cnt. 31,380
BDay Apr 14
Sign Aries
Sex Sex:Female
Joined: Nov 01, 2006
Local time: 9:44 PM
Location: Denver, PA
usaCa.gif
okay, gotcha!!  blob8
Back to Top
View user's profile Find all posts by FTM Send private message   Visit poster's website Yahoo Messenger
Re: Parse Error
PostPosted: 11/11/2006 9:06 AM Reply with quote
Caravan
FTM
Caravan
Posts 282
Word Cnt. 31,380
BDay Apr 14
Sign Aries
Sex Sex:Female
Joined: Nov 01, 2006
Local time: 9:44 PM
Location: Denver, PA
usaCa.gif
I restored the backups, got rid of all the directory's that weren't english, modified the install file where you suggested , then ran through EM without any errors.

But unfortunately it did the same exact thing that it did before and I have a parse error again.

Code:
Parse error: parse error, unexpected '}' in /home/friend12/public_html/test/includes/template.php(127) : eval()'d code on line 252
Back to Top
View user's profile Find all posts by FTM Send private message   Visit poster's website Yahoo Messenger
Re: Parse Error
PostPosted: 11/11/2006 10:01 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 9:44 PM
Location: St Pete, FL
peace.gif
No, you didn't quite follow my suggestions.  The reason for the problem is the REPLACE ALL command.  It should have been an IN-LINE REPLACE WITH command.  All you did was remove the commented section but left the problem.  Removing any line that begins with # doesn't do a thing.  That is a comment to EM and totally ignored...

So I corrected the problem in the overall_header.tpl file again so that you can Restore the EM Backups, fix the mod correctly, then try it again in your Test forum...

headbang
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: Parse Error
PostPosted: 11/11/2006 10:45 AM Reply with quote
Caravan
FTM
Caravan
Posts 282
Word Cnt. 31,380
BDay Apr 14
Sign Aries
Sex Sex:Female
Joined: Nov 01, 2006
Local time: 9:44 PM
Location: Denver, PA
usaCa.gif
I am so sorry Nightrider. That was really silly of me.  Embarassed Thank you for fixing it for me again.
Back to Top
View user's profile Find all posts by FTM Send private message   Visit poster's website Yahoo Messenger
Re: Parse Error
PostPosted: 11/11/2006 10:54 AM Reply with quote
Caravan
FTM
Caravan
Posts 282
Word Cnt. 31,380
BDay Apr 14
Sign Aries
Sex Sex:Female
Joined: Nov 01, 2006
Local time: 9:44 PM
Location: Denver, PA
usaCa.gif
Worked perfect with the italics code in there. Your the best!  banana
Back to Top
View user's profile Find all posts by FTM Send private message   Visit poster's website Yahoo Messenger
Re: Parse Error
PostPosted: 11/11/2006 6:49 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 9:44 PM
Location: St Pete, FL
peace.gif
I was actually surprised that the REPLACE WITH command worked with nothing below it, so I was kind of hoping that the IN-LINE REPLACE WITH command would do the same.  I knew it would work with the italics code in there but I was hoping not to have to add unnecessary code in there...

munky2
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
 Post new topic  Reply to topic
Information
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
All times are GMT - 5 Hours

Page 1 of 1


Add To Bookmarks

 
  
  


  Google

Powered by phpBB © 2001, 2005 phpBB Group

Page generation time: 0.0998s (PHP: 63% - SQL: 37%) - SQL queries: 57 - GZIP disabled - Debug on