Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    New Coder
    Join Date
    Dec 2011
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Parse error: syntax error, unexpected '}'

    Greetings,


    I have this error:

    Parse error: syntax error, unexpected '}' in /home/user/public_html/Forum/cache/tpl_prosilver_viewtopic_body.html.php on line 44


    Can anybody help me resolve this issue? Everytime i try to enter on a post in forum appear that error. I don't know what to do and what to edit.


    On line 44 from "cache/tpl_prosilver_viewtopic_body.html.php" is this:

    Code:
    <dd><?php if ($_poll_option_val['POLL_OPTION_RESULT'] == 0) {  echo ((isset($this->_rootref['L_NO_VOTES'])) ? $this->_rootref['L_NO_VOTES'] : ((isset($user->lang['NO_VOTES'])) ? $user->lang['NO_VOTES'] : '{ NO_VOTES }')); } else { echo $_poll_option_val['POLL_OPTION_PERCENT']; } ?></dd><?php } ?></dl><?php }} if ($this->_rootref['S_DISPLAY_RESULTS']) {  ?>

    Please anybody can help?
    If that line is not enough for resolving i can provide another codes.I'm new in this job and don't know much.

    Thanks

  • #2
    Regular Coder
    Join Date
    Dec 2011
    Location
    NW England
    Posts
    194
    Thanks
    8
    Thanked 15 Times in 15 Posts
    Quote Originally Posted by darkhost View Post
    Greetings,


    I have this error:

    Parse error: syntax error, unexpected '}' in /home/user/public_html/Forum/cache/tpl_prosilver_viewtopic_body.html.php on line 44


    Can anybody help me resolve this issue? Everytime i try to enter on a post in forum appear that error. I don't know what to do and what to edit.


    On line 44 from "cache/tpl_prosilver_viewtopic_body.html.php" is this:

    Code:
    <dd><?php if ($_poll_option_val['POLL_OPTION_RESULT'] == 0) {  echo ((isset($this->_rootref['L_NO_VOTES'])) ? $this->_rootref['L_NO_VOTES'] : ((isset($user->lang['NO_VOTES'])) ? $user->lang['NO_VOTES'] : '{ NO_VOTES }')); } else { echo $_poll_option_val['POLL_OPTION_PERCENT']; } ?></dd><?php } ?></dl><?php }} if ($this->_rootref['S_DISPLAY_RESULTS']) {  ?>

    Please anybody can help?
    If that line is not enough for resolving i can provide another codes.I'm new in this job and don't know much.

    Thanks
    Take off one } just before the last if statement you showed us
    Last edited by melloorr; 12-28-2011 at 02:07 AM.

  • #3
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,341
    Thanks
    60
    Thanked 527 Times in 514 Posts
    Blog Entries
    4
    See the Coding Styles link in my signature for more help on dealing with this problem and to see why your should format your code neatly.
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #4
    New Coder
    Join Date
    Dec 2011
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i've removed the last { from the last if statement..... and now the parse error syntax error, unexpected '}' is in "/home/user/public_html/Forum/includes/template.php(229) : eval()'d code on line 44"


    after second refresh the error is back in on cache/tpl_prosilver_viewtopic_body.html.php" ...

    any ideas?

  • #5
    Regular Coder
    Join Date
    Dec 2011
    Location
    NW England
    Posts
    194
    Thanks
    8
    Thanked 15 Times in 15 Posts
    Quote Originally Posted by darkhost View Post
    i've removed the last { from the last if statement..... and now the parse error syntax error, unexpected '}' is in "/home/user/public_html/Forum/includes/template.php(229) : eval()'d code on line 44"


    after second refresh the error is back in on cache/tpl_prosilver_viewtopic_body.html.php" ...

    any ideas?
    I said last } BEFORE the last if statement.

    Copy and paste this:

    PHP Code:
    <dd><?php if ($_poll_option_val['POLL_OPTION_RESULT'] == 0) {  echo ((isset($this->_rootref['L_NO_VOTES'])) ? $this->_rootref['L_NO_VOTES'] : ((isset($user->lang['NO_VOTES'])) ? $user->lang['NO_VOTES'] : '{ NO_VOTES }')); } else { echo $_poll_option_val['POLL_OPTION_PERCENT']; } ?></dd><?php ?></dl><?php } if ($this->_rootref['S_DISPLAY_RESULTS']) {  ?>
    If it doesn't work, then go to the phpbb forum...

  • #6
    New Coder
    Join Date
    Dec 2011
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok...i will paste that....but i don't wanna make any mistakes paste it in another files....where to paste that?

    in: /cache/tpl_prosilver_viewtopic_body.html.php

    or

    in: styles/prosilver/template/viewtopic_body.html


    or somewhere else?

    sorry....i'm new in php

  • #7
    Regular Coder
    Join Date
    Dec 2011
    Location
    NW England
    Posts
    194
    Thanks
    8
    Thanked 15 Times in 15 Posts
    Quote Originally Posted by darkhost View Post
    ok...i will paste that....but i don't wanna make any mistakes paste it in another files....where to paste that?

    in: /cache/tpl_prosilver_viewtopic_body.html.php

    or

    in: styles/prosilver/template/viewtopic_body.html


    or somewhere else?

    sorry....i'm new in php
    Paste it over the code you first posted, replace all of it (line 44) with what I just posted

  • #8
    New Coder
    Join Date
    Dec 2011
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    done that....i've maded a refresh and same error....and the i go to administator control panel->styles->templates and hit the refresh button and cleared all the cache and still same error ...

  • #9
    Regular Coder
    Join Date
    Dec 2011
    Location
    NW England
    Posts
    194
    Thanks
    8
    Thanked 15 Times in 15 Posts
    Quote Originally Posted by darkhost View Post
    done that....i've maded a refresh and same error....and the i go to administator control panel->styles->templates and hit the refresh button and cleared all the cache and still same error ...
    Have you tried just deleting that file? Its cache, so it shouldn't matter if it is deleted. Just make a backup of it just in case

  • #10
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,341
    Thanks
    60
    Thanked 527 Times in 514 Posts
    Blog Entries
    4
    Did you even look at my topic? - You've come here and posted one very long line of code.

    It's no wonder you can't see the error. Break it down into lines of readable code as suggested in the 'Coding Styles' link in my topic. It will make your life so much easier.

    Trust me, I had to learn PHP once too.
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #11
    Regular Coder
    Join Date
    Dec 2011
    Location
    NW England
    Posts
    194
    Thanks
    8
    Thanked 15 Times in 15 Posts
    Quote Originally Posted by tangoforce View Post
    Did you even look at my topic? - You've come here and posted one very long line of code.

    It's no wonder you can't see the error. Break it down into lines of readable code as suggested in the 'Coding Styles' link in my topic. It will make your life so much easier.

    Trust me, I had to learn PHP once too.
    He didn't even make the code, it is a theme from phpbb (why he didn't ask this on their forum, I don't know)

  • #12
    New Coder
    Join Date
    Dec 2011
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    tangoforce - i will do gladly that "Break it down into lines of readable code" but like i sayd i'm new in this and don't know how to do that...who knows what mistake i made when try something on my own without having the knowledge of php ... i just wanna get rid of that error.


    melloorr - i've deleted that php. at first refresh sayd this:

    Parse error: syntax error, unexpected '}' in /home/user/public_html/Forum/includes/template.php(230) : eval()'d code on line 44
    at second refresh sayd this:

    Parse error: syntax error, unexpected '}' in /home/user/public_html/Forum/cache/tpl_prosilver_viewtopic_body.html.php on line 44

  • #13
    Regular Coder
    Join Date
    Dec 2011
    Location
    NW England
    Posts
    194
    Thanks
    8
    Thanked 15 Times in 15 Posts
    Quote Originally Posted by darkhost View Post
    tangoforce - i will do gladly that "Break it down into lines of readable code" but like i sayd i'm new in this and don't know how to do that...who knows what mistake i made when try something on my own without having the knowledge of php ... i just wanna get rid of that error.


    melloorr - i've deleted that php. at first refresh sayd this:



    at second refresh sayd this:
    Go into Admin Control Panel and on the first page, click the button 'Purge the cache'

  • #14
    New Coder
    Join Date
    Dec 2011
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    done that....same errors....

    i think this erros is because i modified something in "viewtopic_body.html"....but when i saw those errors i delete my modifications....its about the +1 Google Button.

    i don't understand...i undo my modifications...i cleared the cache...i deleted that cache manualy from file manager...and still same errors......

    what can it be the problem?

  • #15
    Regular Coder
    Join Date
    Dec 2011
    Location
    NW England
    Posts
    194
    Thanks
    8
    Thanked 15 Times in 15 Posts
    Quote Originally Posted by darkhost View Post
    done that....same errors....

    i think this erros is because i modified something in "viewtopic_body.html"....but when i saw those errors i delete my modifications....its about the +1 Google Button.

    i don't understand...i undo my modifications...i cleared the cache...i deleted that cache manualy from file manager...and still same errors......

    what can it be the problem?
    I do not know. If you file has been open in the editor since you edited it, just keep undoing untill you cannot anymore, then save and upload it. if that does not work then you may have to reinstall the forum theme


  •  
    Page 1 of 2 12 LastLast

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •