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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • 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.