Jump to content
Sign in to follow this  
tomtom84

Php-Problem

Recommended Posts

Hallo zusammen,

ich wollte heute auf meinen phpbb-forum den "singlemod" installieren. Jetzt hab ich 4 verschiedene Error-Medungen. Ich wäre echt dankbar, wenn jemand über die Code-ausschnitte drüberschauen würde. Bin nicht so versiert in Php. Vielen, vielen dank im Vorraus!!!


also, wenn ich mein eigenes Profil aufrufen möchte oder mich registrieren:


Parse error: syntax error, unexpected ';' in /is/htdocs/wp1066766_EGVMMEC266/www/Forum/phpBB2-2.0.22-deutsch/phpBB2/includes/usercp_register.php on line 136


130. {

131. if ( !empty($HTTP_POST_VARS[$param]) )

132. {

133. $$var = trim($HTTP_POST_VARS[$param]);

134. }

135. }

136.

137. $signature = (isset($signature)) ? str_replace(// Start add - Single MOD

138. $single = ( isset($HTTP_POST_VARS['single']) ) ? intval ($HTTP_POST_VARS['single']) : 0;

139. // End add - Single MOD

140. '

', "\n", $signature) : '';

141. $signature_bbcode_uid = '';

142.

143. // Run some validation on the optional fields. These are pass-by-ref, so they'll be changed to

144. // empty strings if they fail.




wenn ich mir Forenbeiträge anschauen will:


Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /is/htdocs/wp1066766_EGVMMEC266/www/Forum/phpBB2-2.0.22-deutsch/phpBB2/viewtopic.php on line 894



882. $poster_rank = '';

883. $rank_image = "; // Start add - Single MOD

884. $single_image = '';

885. // End add - Single MOD

886. if ( $postrow[$i]['user_id'] == ANONYMOUS )

887. {

888. }

889. else if ( $postrow[$i]['user_rank'] )

890. {

891. for($j = 0; $j

' : '';

897. }

898. }

899. }

900. else





wenn ich mir das Profil eines Users anschauen will:


Parse error: syntax error, unexpected T_DOUBLE_ARROW, expecting ')' in /is/htdocs/wp1066766_EGVMMEC266/www/Forum/phpBB2-2.0.22-deutsch/phpBB2/includes/usercp_viewprofile.php on line 229


228. 'LOCATION' => ( $profiledata['user_from'] ) ? $profiledata['user_from'] : ' ',

229. 'OCCUPATION' => ( $profiledata['user_occ'] ) ? $profiledata['user_occ'] : ' ',

230. 'INTERESTS' =>// Start add - Single MOD

231. 'SINGLE' => $single,

232. // End add - Single MOD ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : ' ',

233. 'AVATAR_IMG' => $avatar_img,



wenn ich den Administrationsbereich besuche:


Parse error: syntax error, unexpected T_VARIABLE in /is/htdocs/wp1066766_EGVMMEC266/www/Forum/phpBB2-2.0.22-deutsch/phpBB2/admin/admin_users.php on line 249



247. $website = ( !empty($HTTP_POST_VARS['website']) ) ? trim(strip_tags( $HTTP_POST_VARS['website'] ) ) : '';

248. $location = ( !empty($HTTP_POST_VARS['location']) ) ? trim(strip_tags( $HTTP_POST_VARS['location'] ) ) : '';

249. $occupation = ( !empty($HTTP_POST_VARS['occupation']) ) ? trim(strip_tags( $HTTP_POST_VARS['occupation'] ) ) : '';

250. $interests = ( !empty($HTTP_POST_VARS['interests']) ) // Start add - Single MOD

251. $single = ( isset($HTTP_POST_VARS['single']) ) ? intval ($HTTP_POST_VARS['single']) : 0;

252. // End add - Single MOD ? trim(strip_tags( $HTTP_POST_VARS['interests'] ) ) : '';

253. $signature = ( !empty($HTTP_POST_VARS['signature']) ) ? trim(str_replace('

', "\n", $HTTP_POST_VARS['signature'] ) ) : '';

Share this post


Link to post
Share on other sites

Hallo,


bitte für die Zukunft mal einen aussagekräftigen Titel wählen.

 

$signature = (isset($signature)) ? str_replace($single = ( isset($HTTP_POST_VARS['single']) ) ? intval ($HTTP_POST_VARS['single']) : 0; '
', "\n", $signature) : '';
$signature_bbcode_uid = '';

 

Wer schreibt solchen verzwackten Quellcode? Ich hab den versucht umzustellen, ist ungetestet.

 

if (isset($HTTP_POST_VARS['single']))
$single = intval ($HTTP_POST_VARS['single']);
else 
$single = 0;

if (isset($signature))
$signature = str_replace($single, '
', "\n", $signature);
else
$signature = '';

$signature_bbcode_uid = '';

 


Beim nächsten Codeabschnitt schien er statt 2 Hochkommas ' , nur ein Gänsefüsschen " gemacht zu haben.


Also statt dem hier

 

882. $poster_rank = '';
883. $rank_image = "; // Start add - Single MOD 
884. $single_image = ''; 
885. // End add - Single MOD
886. if ( $postrow[$i]['user_id'] == ANONYMOUS )
887. {
888. }
889. else if ( $postrow[$i]['user_rank'] )
890. {
891. for($j = 0; $j 
' : '';
897. }
898. }
899. }
900. else

 

das hier versuchen

 

$poster_rank = '';
$rank_image = '';
$single_image = ''; 

if ( $postrow[$i]['user_id'] == ANONYMOUS )
{
}
else if ( $postrow[$i]['user_rank'] )
{
for($j = 0; $j 
' : '';
	}
}
}
else

 



Beim nächsten Abschnitt weiß ich nicht so recht, was der Code bringt:

 

228. 'LOCATION' => ( $profiledata['user_from'] ) ? $profiledata['user_from'] : ' ',
229. 'OCCUPATION' => ( $profiledata['user_occ'] ) ? $profiledata['user_occ'] : ' ',
230. 'INTERESTS' =>// Start add - Single MOD 
231. 'SINGLE' => $single, 
232. // End add - Single MOD ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : ' ',
233. 'AVATAR_IMG' => $avatar_img,

 

Was stand da davor?



Und zu guter Letzt. Hier macht die Zeile 250 Probleme. Da wird nämlich garnichts gemacht und da fehlt ein Semikolon.

 

247. $website = ( !empty($HTTP_POST_VARS['website']) ) ? trim(strip_tags( $HTTP_POST_VARS['website'] ) ) : '';
248. $location = ( !empty($HTTP_POST_VARS['location']) ) ? trim(strip_tags( $HTTP_POST_VARS['location'] ) ) : '';
249. $occupation = ( !empty($HTTP_POST_VARS['occupation']) ) ? trim(strip_tags( $HTTP_POST_VARS['occupation'] ) ) : '';
250. $interests = ( !empty($HTTP_POST_VARS['interests']) ) // Start add - Single MOD 
251. $single = ( isset($HTTP_POST_VARS['single']) ) ? intval ($HTTP_POST_VARS['single']) : 0; 
252. // End add - Single MOD ? trim(strip_tags( $HTTP_POST_VARS['interests'] ) ) : '';
253. $signature = ( !empty($HTTP_POST_VARS['signature']) ) ? trim(str_replace('
', "\n", $HTTP_POST_VARS['signature'] ) ) : '';

 

Bereinigt sieht das so aus:

 

$website = ( !empty($HTTP_POST_VARS['website']) ) ? trim(strip_tags( $HTTP_POST_VARS['website'] ) ) : '';
$location = ( !empty($HTTP_POST_VARS['location']) ) ? trim(strip_tags( $HTTP_POST_VARS['location'] ) ) : '';
$occupation = ( !empty($HTTP_POST_VARS['occupation']) ) ? trim(strip_tags( $HTTP_POST_VARS['occupation'] ) ) : '';
$interests = ( !empty($HTTP_POST_VARS['interests']) ); // Start add - Single MOD 
$single = ( isset($HTTP_POST_VARS['single']) ) ? intval ($HTTP_POST_VARS['single']) : 0; 
// End add - Single MOD ? trim(strip_tags( $HTTP_POST_VARS['interests'] ) ) : '';
$signature = ( !empty($HTTP_POST_VARS['signature']) ) ? trim(str_replace('
', "\n", $HTTP_POST_VARS['signature'] ) ) : '';

 




Ob dir meine Hinweise was bringen, weiß ich nicht. Schaue doch, ob dir das phpBB-Forum was helfen kann. Ich kenne erstens das phpBB-Board nicht und ich kenne den Mod nicht, weshalb ich dir da nur vom codetechnischen was sagen kann.



Grüße

Share this post


Link to post
Share on other sites
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...