SMF Ads Support Forum

Support => General Support => Topic started by: cheekylemon on April 27, 2007, 08:34:26 AM

Title: Please help, Parse error - index.template.php
Post by: cheekylemon on April 27, 2007, 08:34:26 AM
Hi.

I have tried installing this mod via the package manager, and I got an error regarding index.template file.

I continued the installation, and went back to modify the index.template file manually according to the xml file.

Now, I get the following parse error:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../Themes/BlueStory/index.template.php on line 120

111:    // Output any remaining HTML headers. (from mods, maybe?)
112:    echo $context['html_headers'], '
113: </head>
114:
115: //Display ads on the top of the page
116:    if (function_exists("show_topofpageAds"))
117:    {
118:       $ads = show_topofpageAds();
119:       if(!empty($ads))

120:          if($ads['type']==0)

121:             echo $ads['content'];
122:          else
123:             eval($ads['content']);
124:       unset($ads);

Has anyone come across this, or know what the problem is?

The theme is Bluestory,

Many thanks in advance :)

Richy B
Title: Re: Please help, Parse error - index.template.php
Post by: bigguy on April 27, 2007, 08:53:24 AM
The problem would not be line 120 but somewhere around it. try this:

After the </head> (right after it)

put this:

</head>';

and see if it works.
Title: Re: Please help, Parse error - index.template.php
Post by: cheekylemon on April 27, 2007, 09:50:16 AM
Hi Bigguy.

Well, that has certainly changed the error code! Thank for the help so far.

I now get:

Parse error: syntax error, unexpected '<' in .../Themes/BlueStory/index.template.php on line 128
119:       if(!empty($ads))
120:          if($ads['type']==0)
121:             echo $ads['content'];
122:          else
123:             eval($ads['content']);
124:       unset($ads);
125:    }
126:
127:

128: <body>';

129:
130:    // The logo, user information, news, and menu.
131:    echo '
132:

I'm normally able to solve these myself (usually browsing your other posts bigguy) but have been stumped and forced to seek advice!
Title: Re: Please help, Parse error - index.template.php
Post by: bigguy on April 27, 2007, 10:35:24 AM
On line 125 try this:

}';

You backed up the original right. :)
Title: Re: Please help, Parse error - index.template.php
Post by: cheekylemon on April 27, 2007, 10:49:15 AM
Bigguy, you are a diamond, it works!

Yep, the original was backed up. Not making that mistake again!

Now the forum works, I will try adding some adverts and see what happens. I hope I can somehow return the favour one day!
Title: Re: Please help, Parse error - index.template.php
Post by: bigguy on April 27, 2007, 02:30:11 PM
No problem, glad it works. ;)