Announcement

Collapse
No announcement yet.

Parse Error In Header

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Parse Error In Header

    When I go to edit the header template and I click 'Save and Reload' I get this error.

    Code:
    The following error occurred when attempting to evaluate this template:
    [i]
    [b]Parse error[/b]:  parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in [b]/home/public_html/vb/includes/adminfunctions_template.phtml(3096) : eval()'d code[/b] on line [b]18[/b]
    [/i]
    This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
    I looked for extra spaces in the phtml file but couldn't find it around line 18 at all.

    Anyone else get this?

    Do I need to post part of the adminfunctions_template.phtml for you to look at?

    Thanks in advance.

  • #2
    Line 3096:
    eval('$devnull = "' . $template . '";');

    Does this happen when you try to save an unmodified header template? My guess is that you have a syntat problem on line 18 of your modified header template.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      No, this only happens with the header template.

      I can edit footer, navbar, and don't get the error. Just with the header template.

      Comment


      • #4
        Yes, I understand that. Does this happen when you try to save an unmodified header template? My guess is that you have a syntax problem on line 18 of your modified header template.
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment


        • #5
          No, if I go into the default skin, and save the header template there (I haven't done any mods or anything to that skin) it saves fine.

          If I posted part of my header template would I be going against the TOC here?

          Would like someone to look at it because I don't really know what I'm looking for.

          Could post the first 25 lines or something.

          Comment


          • #6
            Sure.
            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
            Change CKEditor Colors to Match Style (for 4.1.4 and above)

            Steve Machol Photography


            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


            Comment


            • #7
              PHP Code:
              <!-- begin tren_z header-->
              <
              div align=\"center\">
              <table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"border\">
              <tr>
                <td align=\"left\" valign=\"top\">
              <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">
                <tr> 
                  <td width=\"469\" height=\"137\" align=\"left\" valign=\"top\"><img src=\"
              $stylevar[imgdir_misc]/tren_z_header_top_ls.jpg\" width=\"469\" height=\"137\" alt=\"\" /></td>
                  <td width=\"100%\" height=\"137\" align=\"left\" valign=\"top\" style=\"background-image: url(
              $stylevar[imgdir_misc]/tren_z_header_top_back.jpg)\"><iframe src=\"../phpads/adframe2.php\" width=\"100%\" height=\"137\" scrolling=\"no\" frameborder=\"0\"></iframe></td>
                  <td width=\"40\" height=\"137\" align=\"left\" valign=\"top\"><img src=\"
              $stylevar[imgdir_misc]/tren_z_header_rs.jpg\" width=\"40\" height=\"137\" alt=\"\" /></td>
                </tr>
              </table>    
              <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
                <tr>
                  <td width=\"100%\" height=\"22\" align=\"left\" valign=\"top\" style=\"background-image: url(
              $stylevar[imgdir_misc]/tren_z_header_bot_expand.gif)\"><img src=\"$stylevar[imgdir_misc]/tren_z_header_bot_expand.gif\" width=\"100%\" height=\"22\"  alt=\"\" /></td>
                  <td width=\"77\" height=\"22\" align=\"left\" valign=\"top\"><a href=\"http://www.groundpilots.com\" target=\"_self\"><img src=\"
              $stylevar[imgdir_misc]/tren_z_header_home.gif\" width=\"77\" height=\"22\" alt=\"\" border=\"0\" /></a></td> 

              Comment


              • #8
                That only includes up to line 16. Your problem is in line 18.
                Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                Change CKEditor Colors to Match Style (for 4.1.4 and above)

                Steve Machol Photography


                Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                Comment


                • #9
                  Opps, here is some more.

                  PHP Code:
                  <td width=\"70\" height=\"22\" align=\"left\" valign=\"top\"><a 

                  href=\"usercp.phtml?s=
                  $session[sessionhash]\"><img 

                  src=\"
                  $stylevar[imgdir_misc]/tren_z_header_cp.gif\" width=\"70\" height=\"22\" alt=\"\" 

                  border=\"0\" /></a></td>
                      " 
                  . (($show['registerbutton']) ? ("
                      <td width=\"70\" height=\"22\" align=\"left\" valign=\"top\"><a 

                  href=\"register.phtml?s=
                  $session[sessionhash]&amp;action=signup\"><img 

                  src=\"
                  $stylevar[imgdir_misc]/tren_z_header_register.gif\" width=\"70\" height=\"22\" 

                  alt=\"\" border=\"0\" /></a></td>
                      "
                  ) : ("
                          <td width=\"70\" height=\"22\" align=\"left\" valign=\"top\" 

                  id=\"usercptools\"><a href=\"#usercptools\"><img 

                  src=\"
                  $stylevar[imgdir_misc]/tren_z_header_links.gif\" width=\"70\" height=\"22\" alt=\"\" 

                  border=\"0\" /></a><script type=\"text/javascript\"> vbmenu_register(\"usercptools\" ,1); 

                  </script></td>
                   "
                  ))."
                      <td width=\"71\" height=\"22\" align=\"left\" valign=\"top\"><a 

                  href=\"calendar.phtml?s=
                  $session[sessionhash]\"><img 

                  src=\"
                  $stylevar[imgdir_misc]/tren_z_header_calendar.gif\" width=\"71\" height=\"22\" 

                  alt=\"\" border=\"0\" /></a></td>
                      <td width=\"70\" height=\"22\" align=\"left\" valign=\"top\"><a 

                  href=\"memberlist.phtml?s=
                  $session[sessionhash]\"><img 

                  src=\"
                  $stylevar[imgdir_misc]/tren_z_header_members.gif\" width=\"70\" height=\"22\" alt=\"\" 

                  border=\"0\" /></a></td>
                      <td width=\"72\" height=\"22\" align=\"left\" valign=\"top\"><a 

                  href=\"faq.phtml?
                  $session[sessionurl]\" accesskey=\"5\"><img 

                  src=\"
                  $stylevar[imgdir_misc]/tren_z_header_faq.gif\" width=\"72\" height=\"22\" alt=\"\" 

                  border=\"0\" /></a></td>
                      <td width=\"74\" height=\"22\" align=\"left\" valign=\"top\"  

                  id=\"navbar_search\"><a href=\"search.phtml?s=
                  $session[sessionhash]\"><img 

                  src=\"
                  $stylevar[imgdir_misc]/tren_z_header_search.gif\" width=\"74\" height=\"22\" alt=\"\" 

                  border=\"0\" /></a><script type=\"text/javascript\"> vbmenu_register(\"navbar_search\" ,1); 

                  </script></td>
                      </tr>    
                  </table>
                  <!-- end tren_z header--> 

                  Comment


                  • #10
                    Something's not right because line 18 is blank on that snippet. Make sure you are not introducing any unwanted line breaks. It also has different code than your first one.
                    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                    Change CKEditor Colors to Match Style (for 4.1.4 and above)

                    Steve Machol Photography


                    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                    Comment


                    • #11
                      I will attach the header template in .txt format.

                      Maybe that will help you (and me of course)

                      I appreciate the time you are taking.
                      Attached Files

                      Comment


                      • #12
                        Line 18 is:

                        " . (($show['registerbutton']) ? ("

                        I believe that is where your problem is.
                        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                        Change CKEditor Colors to Match Style (for 4.1.4 and above)

                        Steve Machol Photography


                        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                        Comment


                        • #13
                          What do you think it should be?

                          Sorry, I'm really green when it comes to php code.

                          Comment


                          • #14
                            If that's what you're trying to do, you can't use PHP code in the header template. You can only do this in the phpinclude templates. Here are the instructions on using phpinclude:

                            http://www.vbulletin.com/docs/html/m...tes_phpinclude

                            And here is a tutorial at vbulletin.org for using phpinclude:

                            http://www.vbulletin.org/forum/showthread.php?t=71313
                            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                            Change CKEditor Colors to Match Style (for 4.1.4 and above)

                            Steve Machol Photography


                            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                            Comment


                            • #15
                              Sorry, maybe I chose the wrong words. I meant whatever code is in the templates I'm green with.

                              On line 18, does it appear there is just an extra space or something in there that shouldn't be?

                              I don't recall ever editing line 18 or near there.

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X