• Welcome to Simple Machines Community Forum. Please login or sign up.
September 27, 2021, 05:45:56 PM

News:

SMF 2.0.18 has been released! Please update. Read more.


Parse error -- YIPPEE!

Started by tk2012, August 15, 2008, 02:11:37 AM

Previous topic - Next topic

tk2012

August 15, 2008, 02:11:37 AM Last Edit: August 15, 2008, 02:16:18 AM by tk2012
I love having problems and they seem to love me, too.  But, with each problem I get a little bit smarter and won't have to ask the same question again... hopefully!  ;)

Sooo, I just installed a modification, but I'm not sure if this is causing it or not.  Regardless, I go to look at a post and I get a parse error that is attached below...

Questions:

1) What does this error tell me when I see something like this?
2) What do I do to go about fixing this error?

PS - If I knew what a double arrow was that may help! 

ccbtimewiz

The error is caused when you have illogical statements together. Mostly, misplaced functions, commands, etc. This creates parse errors and causes the template not to load and spitting out an error.

They are usually simple to fix. Could you attach your Display.template.php file?

tk2012

Sure, I just installed "Bookmarks" , but I was getting an error with "Today's Birthday" as well, so JohnnyB is looking at it, too in regards to his mod. 

Is there no "code check" feature for Notepad+++?  Kinda like a spellcheck, but for code... Someone should make that for the less to no skilled computer workers like me!! LOL


ccbtimewiz

Found the error. I'd report this to Aaron when you can, BTW.

Find:
/ Build the normal button array.
'bookmark' => array('test' => 'can_reply', 'text' => 'bookmark_add', 'lang' => true, 'url' => $scripturl . '?action=bookmarks;sa=add;topic=' . $context['current_topic']),
$normal_buttons = array(
'reply' => array('test' => 'can_reply', 'text' => 'reply', 'image' => 'reply.gif', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies']),


Replace with:
/ Build the normal button array.
$normal_buttons = array(
'reply' => array('test' => 'can_reply', 'text' => 'reply', 'image' => 'reply.gif', 'lang' => true, 'url' => $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';num_replies=' . $context['num_replies']),
                'bookmark' => array('test' => 'can_reply', 'text' => 'bookmark_add', 'lang' => true, 'url' => $scripturl . '?action=bookmarks;sa=add;topic=' . $context['current_topic']),

tk2012

THANK YOU!!

I need to track down my PayPal password and share the love.  You guys are truly awesome!  Will do the above change and will let him know after my edit is done!

THANK YOU AGAIN!

-TK

tk2012

August 15, 2008, 02:30:50 AM #5 Last Edit: August 15, 2008, 02:34:20 AM by tk2012
I got another error, but I think I may see what happened....

shouldn't the beginning of the code have two "//" instead of one "/" ??

I uploaded and I'm getting the error now that says...  syntax error, unexpected '/'



EDIT!! 

Woohoo.. I added the extra "/" and it works!  No more parse error!  YAY!!! Go Me! Go Me!

ccbtimewiz

Oh wow, how could I miss that? Must be 2am madness. x.x

Yes, comment tags are suffixed by using "//" or "#" or putting the information between /* and */.

Though looks like you figured it out. :)

I'll mark this as solved seeing how I managed to fix your first error and you managed to fix the other.

tk2012

Yes, I was supposed to be asleep about 3 hours ago... it is almost 3am now.  Oh well, the weekend is almost here and tomorrow is a 1/2 day! 

Thanks again!

solved!

and noted in the bookmarks thread, too

Advertisement: