Coinbase

Author Topic: Please help, Parse error - index.template.php  (Read 3044 times)

0 Members and 1 Guest are viewing this topic.

Offline cheekylemon

  • Newbie
  • *
  • Posts: 3
    • Email
Please help, Parse error - index.template.php
« on: April 27, 2007, 07: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

Offline bigguy

  • Support
  • Elite Member
  • *
  • Posts: 1518
    • SMF Helper
Re: Please help, Parse error - index.template.php
« Reply #1 on: April 27, 2007, 07: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.

Offline cheekylemon

  • Newbie
  • *
  • Posts: 3
    • Email
Re: Please help, Parse error - index.template.php
« Reply #2 on: April 27, 2007, 08: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!

Offline bigguy

  • Support
  • Elite Member
  • *
  • Posts: 1518
    • SMF Helper
Re: Please help, Parse error - index.template.php
« Reply #3 on: April 27, 2007, 09:35:24 am »
On line 125 try this:

}';

You backed up the original right. :)

Offline cheekylemon

  • Newbie
  • *
  • Posts: 3
    • Email
Re: Please help, Parse error - index.template.php
« Reply #4 on: April 27, 2007, 09: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!

Offline bigguy

  • Support
  • Elite Member
  • *
  • Posts: 1518
    • SMF Helper
Re: Please help, Parse error - index.template.php
« Reply #5 on: April 27, 2007, 01:30:11 pm »
No problem, glad it works. ;)

SMF Ads Support Forum

Re: Please help, Parse error - index.template.php
« Reply #5 on: April 27, 2007, 01:30:11 pm »
.

 

.