Foutmelding na installatie EasyMod add-on

Installatie lukt niet? Plotseling een foutmelding. Of weet je niet hoe iets werkt. Problemen met phpBB2 kun je in dit archief opzoeken.
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gesloten
XP-Rene
Berichten: 2168
Lid geworden op: 01 dec 2004, 19:33
Locatie: Vlissingen
Contacteer:

Foutmelding na installatie EasyMod add-on

Bericht door XP-Rene » 04 mei 2005, 13:56

Na de installatie van de add-on voor EasyMod, de add-on voor het un-installen van Mods, krijg ik in het ACP de volgende melding:
Parse error: parse error, unexpected T_IF in /home/virtual/site130/fst/var/www/html/forum/admin/admin_easymod.php on line 2903


Dit is regel 2900 t/m 2905 van admin_easymod.php:

Code: Selecteer alles

	$mod_version = str_replace("'", "''", substr( $mod_version, 0, 15)) ;

	$sql = 'INSERT INTO ' . EASYMOD_TABLE . " ( mod_file, mod_title, mod_version, mod_author_handle, mod_author_email, mod_author_url, mod_author_name, mod_description, mod_process_date, mod_phpBB_version, mod_processed_themes, mod_processed_langs, mod_files_edited)
		VALUES ( '" . substr($install_path, 7) if  (intval($HTTP_POST_VARS['mod_id']) > 0  
	{ 
		$sql = "DELETE FROM " . EASYMOD_TABLE ." 
Ik kan de fout echt niet vinden, iemand van jullie misschien?
KNAVIVO DIERENHULP
Stimuleer verdraagzaamheid. Wees eens wat vaker irritant.

Gebruikersavatar
Paul
Beheerder
Beheerder
Berichten: 20316
Lid geworden op: 23 okt 2003, 11:38
Locatie: Utrecht
Contacteer:

Bericht door Paul » 04 mei 2005, 14:00

je hebt iets goed fout gedaan :?

Code: Selecteer alles

   VALUES ( '" . substr($install_path, 7) if  (intval($HTTP_POST_VARS['mod_id']) > 0 
   {
klopt natuurlijk nooit. geef de orginele regels daarvan is, en de mod uitleg?

XP-Rene
Berichten: 2168
Lid geworden op: 01 dec 2004, 19:33
Locatie: Vlissingen
Contacteer:

Bericht door XP-Rene » 04 mei 2005, 14:03

Hier de Mod uitleg:

Code: Selecteer alles

## EasyMod 0.0.8 compliant
########################################################
## Mod Title:    Easy MOD Add-on
## Mod Author:   JuniorZ < juniorz@phpbb.com.br > (JuniorZ) http://www.phpbb.com.br
## Mod Description:  This MOD adds the uninstall option to your EasyMOD 0.0.9
## Mod Version: 1.2.0
## 
## Installation Level:  Easy
## Installation Time:   10-15 Minutes
## Included Files:	1
##			includes/em_addon_functions.php
## Files To Edit:	3
##			admin/admin_easymod.php
##			language/lang_english/lang_easymod.php
##			templates/subSilver/admin/mod_history.tpl
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## MOD History: 
## 
##   2003-06-03 - Version 1.2.0 
##	* em_addon_functions.php updated.
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
# 
#-----[ COPY ]------------------------------------------ 
# 
includes/em_addon_functions.php.txt to includes/em_addon_functions.php 

# 
#-----[ OPEN ]------------------------------------------ 
# 
admin/admin_easymod.php 

# 
#-----[ FIND ]------------------------------------------ 
# 
($mode != 'update') && ($mode != 'process') 

# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
($mode != 'post_process')

# 
#-----[ IN-LINE AFTER, ADD]------------------------------------------ 
# 
 && ($mode != 'uninstall')

# 
#-----[ FIND ]------------------------------------------ 
# 
'L_NONE_INSTALLED' => 

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
	'L_UNINST' => $lang['EM_uninstall'], 
	'S_ACTION' => append_sid('admin_easymod.'.$phpEx), 

# 
#-----[ FIND ]------------------------------------------ 
# 
'URL' => $row['mod_author_url'], 
'PHPBB_VER' => $row['mod_phpBB_version'], 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
		'MOD_ID' => $row['mod_id'], 
		'MOD_FILE' => basename($row['mod_file']), 
		'MOD_PATH' => './mods/' . dirname($row['mod_file'])  . '/', 
    
# 
#-----[ FIND ]------------------------------------------ 
# 
else if (($mode == 'process' ) || 

# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
($mode == 'download_file') 

# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------ 
# 
 || ($mode == 'uninstall') 

# 
#-----[ FIND ]------------------------------------------ 
# 
// loop 
for ($i=0; $i<count($commands); $i++) 

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
	//But Before we generate the uninstall script (if needed) 
	if ($mode == 'uninstall') 
	{ 
		include($phpbb_root_path . 'includes/em_addon_functions.'.$phpEx); 
		$mode = generate_uninstall($commands, $body); 
	} 

# 
#-----[ FIND ]------------------------------------------ 
# 
for ($i=0; $i<count( $command_file->afile); $i++) 

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
	$hidden .= ( intval($HTTP_POST_VARS['mod_id']) > 0 ) ? '<input type="hidden" name="mod_id" value="'.intval($HTTP_POST_VARS['mod_id'])."\">\n" : ''; 


# 
#-----[ FIND ]------------------------------------------ 
# 
for ( $i=0; $i<$num_command_steps; $i++) 

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
	$hidden .= ( intval($HTTP_POST_VARS['mod_id']) > 0 ) ? '<input type="hidden" name="mod_id" value="'.intval($HTTP_POST_VARS['mod_id'])."\">\n" : '';

# 
#-----[ FIND ]------------------------------------------ 
# 
$template->assign_vars(array( 
	'S_ACTION' => 
	'L_STEP' => 
	'L_COMPLETE' => 
	'L_COMP_DESC' => 

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 
	if( intval($HTTP_POST_VARS['mod_id']) > 0 ) 
	{ 
		$compl_msg = $lang['EM_pp_install_comp']; 
		$compl_msg_desc = $lang['EM_pp_comp_desc']; 
	} 
	else 
	{ 
		$compl_msg = $lang['EM_pp_uninstall_comp']; 
		$compl_msg_desc = $lang['EM_pp_un_comp_desc']; 
	} 

	$template->assign_vars(array( 
		'S_ACTION' => append_sid('admin_easymod.'.$phpEx), 

		'L_STEP' => $lang['EM_pp_step3'], 
		'L_COMPLETE' => $compl_msg, 
		'L_COMP_DESC' => $compl_msg_desc, 

# 
#-----[ FIND ]------------------------------------------ 
# 
$sql = 'INSERT INTO ' . EASYMOD_TABLE . " 
VALUES ( '" . substr($install_path, 7) 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
	if ( intval($HTTP_POST_VARS['mod_id']) > 0 ) 
	{ 
		$sql = "DELETE FROM " . EASYMOD_TABLE ." 
			WHERE mod_id = " . intval($HTTP_POST_VARS['mod_id']); 

		$lang['EM_err_em_info'] = $lang['EM_err_em_unins']; 
	} 

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

# 
#-----[ FIND ]------------------------------------------ 
# 
?> 

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 

//uninstall 
$lang['EM_uninstall'] = 'Uninstall'; 
$lang['EM_err_em_unins'] = 'Could not delete the MOD entry from EasyMOD table';
$lang['EM_pp_uninstall_comp'] = 'Uninstallation Complete!';
$lang['EM_pp_un_comp_desc']  = 'Uninstallation of this MOD is now complete!  You should verify if the MOD really is not functioning in any installed themes and languages. You should too to remove all files added to your phpBB by this MOD if you are uninstalling this MOD permanently. Therefore if you just want to reinstall this MOD, you can ignore this.'; 

# 
#-----[ OPEN ]------------------------------------------ 
# 
templates/subSilver/admin/mod_history.tpl 

#
#-----[ FIND ]------------------------------------------ 
#
<td width="5%" class="{install.ROW_CLASS}" align="center"><span class="gensmall">details</span></td>

#
#-----[ REPLACE WITH ]------------------------------------------ 
#
	<td class="{install.ROW_CLASS}" align="center" valign="bottom">
		<form method="post" action="{S_ACTION}">
			<input type="hidden" name="mode" value="uninstall">
			<input type="hidden" name="mod_id" value="{install.MOD_ID}">
			<input type="hidden" name="install_file" value="{install.MOD_FILE}">
			<input type="hidden" name="install_path" value="{install.MOD_PATH}">
			<input type="submit" name="post" class="mainoption" value="{L_UNNINST}" />
		</form>
	</td>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
#
# EoM
KNAVIVO DIERENHULP
Stimuleer verdraagzaamheid. Wees eens wat vaker irritant.

XP-Rene
Berichten: 2168
Lid geworden op: 01 dec 2004, 19:33
Locatie: Vlissingen
Contacteer:

Bericht door XP-Rene » 04 mei 2005, 14:10

Hierbij regel 2902 t/m 2927 van admin_easymod.php:

Code: Selecteer alles

	$sql = 'INSERT INTO ' . EASYMOD_TABLE . " ( mod_file, mod_title, mod_version, mod_author_handle, mod_author_email, mod_author_url, mod_author_name, mod_description, mod_process_date, mod_phpBB_version, mod_processed_themes, mod_processed_langs, mod_files_edited)
		VALUES ( '" . substr($install_path, 7) if (intval($HTTP_POST_VARS['mod_id']) > 0   
	{ 
		$sql = "DELETE FROM " . EASYMOD_TABLE ." 
			WHERE mod_id = " . intval($HTTP_POST_VARS['mod_id']); 

		$lang['EM_err_em_info'] = $lang['EM_err_em_unins']; 
	} . $install_file . "', '$mod_title', '$mod_version', '$mod_author_handle', '$mod_author_email', '$mod_author_url', '$mod_author_name', '$mod_description', " . time() . ", '" . $phpbb_version . "', '" . $themes . "', '" . $languages . "', $files)";


	if ($preview)
	{
		// do not update the DB while in preview mode
	}
	else if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, $lang['EM_err_em_info'], '', __LINE__, __FILE__, $sql);
	}
}
	

// actually outputs the template date we've built
$template->pparse('body');

// output the footer
include('page_footer_admin.'.$phpEx);
Waar zou die "" if"moeten staan dan?
KNAVIVO DIERENHULP
Stimuleer verdraagzaamheid. Wees eens wat vaker irritant.

Gebruikersavatar
Paul
Beheerder
Beheerder
Berichten: 20316
Lid geworden op: 23 okt 2003, 11:38
Locatie: Utrecht
Contacteer:

Bericht door Paul » 04 mei 2005, 14:22

maak van

Code: Selecteer alles

$sql = 'INSERT INTO ' . EASYMOD_TABLE . " ( mod_file, mod_title, mod_version, mod_author_handle, mod_author_email, mod_author_url, mod_author_name, mod_description, mod_process_date, mod_phpBB_version, mod_processed_themes, mod_processed_langs, mod_files_edited)
      VALUES ( '" . substr($install_path, 7) if (intval($HTTP_POST_VARS['mod_id']) > 0   
   {
      $sql = "DELETE FROM " . EASYMOD_TABLE ."
         WHERE mod_id = " . intval($HTTP_POST_VARS['mod_id']);

      $lang['EM_err_em_info'] = $lang['EM_err_em_unins'];
   } . $install_file . "', '$mod_title', '$mod_version', '$mod_author_handle', '$mod_author_email', '$mod_author_url', '$mod_author_name', '$mod_description', " . time() . ", '" . $phpbb_version . "', '" . $themes . "', '" . $languages . "', $files)"; 
dit:

Code: Selecteer alles

   $sql = 'INSERT INTO ' . EASYMOD_TABLE . " ( mod_file, mod_title, mod_version, mod_author_handle, mod_author_email, mod_author_url, mod_author_name, mod_description, mod_process_date, mod_phpBB_version, mod_processed_themes, mod_processed_langs, mod_files_edited)
      VALUES ( '" . substr($install_path, 7) . $install_file . "', '$mod_title', '$mod_version', '$mod_author_handle', '$mod_author_email', '$mod_author_url', '$mod_author_name', '$mod_description', " . time() . ", '" . $phpbb_version . "', '" . $themes . "', '" . $languages . "', $files)";    

   if ( intval($HTTP_POST_VARS['mod_id']) > 0 )
   {
      $sql = "DELETE FROM " . EASYMOD_TABLE ."
         WHERE mod_id = " . intval($HTTP_POST_VARS['mod_id']);

      $lang['EM_err_em_info'] = $lang['EM_err_em_unins'];
   } 	  

XP-Rene
Berichten: 2168
Lid geworden op: 01 dec 2004, 19:33
Locatie: Vlissingen
Contacteer:

Bericht door XP-Rene » 04 mei 2005, 14:26

Wow, Paulus, je bent een kanjer, als je een heel goed uitziende vrouw zou zijn, kreeg je een dikke pakkerd van me, maar helaas... :bier: :thumb:

Maar toch bedankt.
KNAVIVO DIERENHULP
Stimuleer verdraagzaamheid. Wees eens wat vaker irritant.

Gebruikersavatar
Paul
Beheerder
Beheerder
Berichten: 20316
Lid geworden op: 23 okt 2003, 11:38
Locatie: Utrecht
Contacteer:

Bericht door Paul » 04 mei 2005, 14:28

gewoon je verstand op nul zetten en gokken 8)

XP-Rene
Berichten: 2168
Lid geworden op: 01 dec 2004, 19:33
Locatie: Vlissingen
Contacteer:

Bericht door XP-Rene » 04 mei 2005, 14:28

Tja, als ik dat ga doen, komt er helemaal niets meer van terecht....
KNAVIVO DIERENHULP
Stimuleer verdraagzaamheid. Wees eens wat vaker irritant.

Gesloten