birdland Posted August 28, 2008 Share Posted August 28, 2008 Hello to all, i´m trying to modify a Simple Machines Forum file. I don´t know PHP and i´m getting an error that might be simple for you. I put the code in a "php syntax check" and there´s the message: Parse error: parse error, unexpected $ in index.template.php on line 884 But the code goes only to line 883. By doing a research over the internet i think this error might be a brackets {} mistake or something like that. I´ll attach the file, if someone wants to take a look i´ll be thankful. [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/121709-php-help-in-smf/ Share on other sites More sharing options...
wildteen88 Posted August 28, 2008 Share Posted August 28, 2008 What line(s) have you modified (or added) in index.template.php. From what I can tell the error is coming from the template_main_below() function. The problem area is from line 541 and 562, due to your (closing) braces not matching up. The following code corrects this //Close table for towerright ads if (function_exists("show_towerrightAds") && function_exists("show_towerleftAds") && function_exists("show_bottomAds")) { $ads = show_towerrightAds(); if( !empty ( $ads ) ) echo '</td><td valign="top">', $ads['type']==0 ? $ads['content'] : eval($ads['content']) ,'</td></tr></table>'; unset($ads); //Close table for towerleft ads $ads = show_towerleftAds(); if( !empty ( $ads ) ) echo '</td></tr></table>'; unset($ads); //Show ads on the bottom of the page $ads = show_bottomAds(); if( !empty ( $ads ) ) { if($ads['type']==0) echo $ads['content']; else eval( $ads['content'] ); } unset($ads); } Link to comment https://forums.phpfreaks.com/topic/121709-php-help-in-smf/#findComment-627981 Share on other sites More sharing options...
birdland Posted August 28, 2008 Author Share Posted August 28, 2008 Thank you wildteen88!!!!!! I knew it was a syntax problem and i don´t know PHP. Thanks again it worked. If you come to Rio de Janeiro you will be my guest. Cheers! Link to comment https://forums.phpfreaks.com/topic/121709-php-help-in-smf/#findComment-628078 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.