Jump to content

php help in SMF


birdland

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.