Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Smf: Template Parse Error


7 replies to this topic

#1 karlosantana

    Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPip
  • 145 posts
  • Gender:Male
  • Location:Wales(But I'm not a welsh farmer!)

Posted 31 January 2008 - 04:35 PM

Quote

Template Parse Error!
There was a problem loading the /Themes/default/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../Themes/default/index.template.php on line 167
And here's line 166

Quote

<td height="24" width="222" valign=middle onMouseOver="java script:taust(this,'#0F363F')" onMouseOut="java script:taust(this,'#202020')"> <a href="#">» Free Web design </a></td>
and 167:

Quote

<td height="24" width="222" valign=middle onMouseOver="java script:taust(this,'#0F363F')" onMouseOut="javascript:taust(this,'#202020')"> <a href="#">» Free Money </a></td>
It's hating the bit underlined, it's SMF, can't tell you a lot more really, i'm stumped! if you want to see look here I am really pulling my hair out at this can anyone think what i've done wrong? They both look the same and it's line 167 it doesn't like. :o
Any help is well apreciated!

#2 truefusion

    Coincidence is non-sequitur, therefore everything has a reason for its existence (except if they are eternal).

  • [MODERATOR]
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3,216 posts
  • Gender:Male
  • Location:No, not there. Not there either. Yes, you'll never figure it out.
  • Interests:God, Christianity.
  • myCENT:86.16

Posted 31 January 2008 - 09:29 PM

Quote

remember, single quotes (') often have to be escaped with a slash (\).
I believe this explains everything. In your onmouseover and onmouseout events, you have single quotes in them. Escape them, then refresh the page.

#3 karlosantana

    Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPip
  • 145 posts
  • Gender:Male
  • Location:Wales(But I'm not a welsh farmer!)

Posted 31 January 2008 - 10:19 PM

When you say escape what do you mean? do you mean i replace them with a backslash? place a blackslash behind it, or that i simply get rid of them?

#4 sonesay

    |||[ n00b King ]|||

  • Kontributors
  • PipPipPipPipPipPipPipPipPip
  • 958 posts
  • Gender:Male
  • Location:Auckland
  • myCENT:68.27

Posted 31 January 2008 - 11:34 PM

lets say you want to use a qoute in a string
$string = "a double looks like this " ";

the above statement will cause an error because it will expect the double qoute at 'this "' to be the closing end. you need to escape it so it ignores it as a closing end and treats it as a double qoute.

$string = "a double looks like this \" ";

now string will be

a double looks like this "

#5 karlosantana

    Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPip
  • 145 posts
  • Gender:Male
  • Location:Wales(But I'm not a welsh farmer!)

Posted 05 February 2008 - 11:30 AM

ok i will give it a go if it doesn't work ill probably put it in a frame and make it look like my site that way :o pray for me peeps!
Thanks for your help guys

[hr=noshade] [/hr]
Ok i really can't do this, its damn fustrating :D It will not work no matter what i do If anyones got any spare time ive attatched a file on this post have a look at it destroy it if you wish but anything is appreciated.

If anyone does help me i will give out credits to them (thats how much i will appreciate it!) leave me build up a load of credits (ill post a couple of tutorials) and i will give the person the most i can!

Attached Files



#6 truefusion

    Coincidence is non-sequitur, therefore everything has a reason for its existence (except if they are eternal).

  • [MODERATOR]
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3,216 posts
  • Gender:Male
  • Location:No, not there. Not there either. Yes, you'll never figure it out.
  • Interests:God, Christianity.
  • myCENT:86.16

Posted 08 February 2008 - 03:16 PM

View Postkarlosantana, on Feb 5 2008, 06:30 AM, said:

...If anyones got any spare time, i've attatched a file on this post have a look at it, destroy it if you wish, but anything is appreciated.
I'm not sure if the PHP file you attached was the original or modified one, but i'm attaching a modified one with escaped single quotes.

Attached File  index.template.php   28.32K   8 downloads

If it doesn't work now, then i don't know what's wrong with it. But i recommend editing your files in an editor that supports syntax highlighting. I'd recommend Geany.

#7 karlosantana

    Advanced Member

  • Kontributors
  • PipPipPipPipPipPipPip
  • 145 posts
  • Gender:Male
  • Location:Wales(But I'm not a welsh farmer!)

Posted 10 February 2008 - 10:24 AM

okie dokie i will give this a try right now. *uploads file* That geany program is awesome!
Thankyou so much true fusion, you're better than the person who designed the templating system for smf in the first place! Your right though i did put the wrong template up *strangles himself* Hopefully geany should help me though, I will be building my credits up and giving them to you soon, hold in there! I have no idea what happened to the template file i made, its gone :D who knows where? Thankyou for putting all that work in though! it is incredibly appreciated! I'm gonna try out this tutorial and see what happens :D although i have done it before with no success, it's worth a try!

I also love some of the things in you sigy

Quote

I cannot imagine how the clockwork of the universe can exist without a Clockmaker. (Voltaire)
That is fantastic!

Quote

It is said energy cannot be created, nor destroyed. Yet, energy exists. This sounds like God to me!
And so is that!
Thanks again
^^^needs a hug :o

#8 truefusion

    Coincidence is non-sequitur, therefore everything has a reason for its existence (except if they are eternal).

  • [MODERATOR]
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3,216 posts
  • Gender:Male
  • Location:No, not there. Not there either. Yes, you'll never figure it out.
  • Interests:God, Christianity.
  • myCENT:86.16

Posted 10 February 2008 - 05:07 PM

View Postkarlosantana, on Feb 10 2008, 05:24 AM, said:

I will be building my credits up and giving them to you soon, hold in there!
I'm not interested in receiving credits. Thanks for the offer, but i didn't help 'cause there was a credit reward. And good luck with that tutorial.




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users