No idea why this template isn't working...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • John Diver
    Senior Member
    • May 2003
    • 752

    No idea why this template isn't working...

    Hey,

    Im getting an error and I dont know what is wrong, the error is

    Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/northwes/public_html/canary/global.php(833) : eval()'d code on line 24
    and this is the template showing the error:

    Code:
    <!-- logo -->
    <a name="top"></a>
    
    <table border="0" width="100%" cellpadding="0" cellspacing="0" align="center" class="bgimage">
    <tr>
    <td align="left" valign="top""><img src="/images/styles/sunrise/misc/logo__sample.png" height="117" width="359" border="0" alt="logo"/></td>
    <td align="right" valign="bottom"><img src="$stylevar[imgdir_misc]/logo_right.png" alt="" /></td>
    </tr>
    </table>
    
    <div class="nav">
    	<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
    	<tr align="center">
    		<if condition="$show['registerbutton']">
    			<td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
    		</if>
    		$template_hook[navbar_buttons_left]
    <td class="vbmenu_control"><a href="/">Homepage</a></td>
    <td class="vbmenu_control"><a href="/forum.php">Forum</a></td>
    <td class="vbmenu_control"><a href="index.php?pageid=about_the_canary_islands">About The Islands</a></td>
    <td class="vbmenu_control"><a href="canary_island_photos">Photo Gallery</a></td>
    <td class="vbmenu_control"><a href="reviews.php">Reviews</a></td>
    <td class="vbmenu_control"><a href="index.php?pageid=canary_island_accommodation">Accommodation</a></td>
    <td class="vbmenu_control"><a href="index.php?pageid=canary_island_attractions">Attractions</a></td><if condition="$show['popups']">
    			<if condition="$show['searchbuttons']">
    				<if condition="$show['member']">
    				<td id="navbar_search" class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a> <if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("navbar_search", true); </script></if></td>
    			</if>
    			<if condition="$show['member']">
    				<td id="usercptools" class="vbmenu_control"><a href="$show[nojs_link]#usercptools" accesskey="3">$vbphrase[quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools", true); </script></td>
    			</if>
    		<else />
    			<if condition="$show['searchbuttons']">
    				<td class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4">$vbphrase[search]</a></td>
    				<if condition="$show['member']">
    				<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
    				<else />
    				<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
    				</if>
    			</if>
    			<td class="vbmenu_control"><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a></td>
    			<if condition="$show['member']">
    				<td class="vbmenu_control"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&amp;focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=250,height=300'); return false;">$vbphrase[open_contacts]</a></td>
    			</if>
    		</if>
    		$template_hook[navbar_buttons_right]
    		<if condition="$show['member']">
    			<td class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')">$vbphrase[log_out]</a>
    <if condition="$show['member']">
    			<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
    		</if></td>
    		</if>
    		</tr>
    	</table>
    </div>
    <!-- / nav buttons bar -->
    
    <br />
    
    <!-- /logo -->
    
    $photoplog_forumhome
    <p align="center"><script type="text/javascript"><!--
    google_ad_client = "ca-pub-9222821431952789";
    /* Canary */
    google_ad_slot = "4019511294";
    google_ad_width = 728;
    google_ad_height = 90;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script></p>
    
    <!-- content table -->
    $spacer_open
    
    $_phpinclude_output
    
    $ad_location[ad_header_end]
    I can't see anything wrong on line 24..

    Would love some help

    Thanks!
    John Diver
  • Dustin L.
    Senior Member
    • Mar 2011
    • 639
    • 4.2.X

    #2
    I responded to your other thread in the Chit Chat area. Hopefully staff can merge the two.
    http://quikmsg.net/strtoupper/ - Convert lowercase text and code to all uppercase!
    http://quikmsg.net/strtolower/ - Convert uppercase text and code to all lowercase!

    Comment

    • Ace
      Senior Member
      • Apr 2004
      • 4051
      • 4.2.X

      #3
      That error refers to something wrong on line 24 of the code being executed at the hook that is located at line 833 of global.php.
      My Live vB5 Site - NZEating.com
      vBulletin Hosting | vBulletin Services - Need hosting for your vB? Need it installed? Something else? Let me take that hassle off your hands.

      Comment

      • John Diver
        Senior Member
        • May 2003
        • 752

        #4
        Thanks Dustin!

        Ace, I just have the default global.php - I just removed a link in the navigation for "New Posts" when I got this error...Not sure what is wrong :s
        John Diver

        Comment

        • Lats
          Senior Member
          • Mar 2002
          • 3671

          #5
          You have an extra quote...
          Code:
          ...
          <td align="left" valign="top"[COLOR=#ff0000][B]"[/B][/COLOR]><img src...
          Lats...

          Comment

          • John Diver
            Senior Member
            • May 2003
            • 752

            #6
            Thanks Lats, I didn't notice that...

            Now I can't even login to the admincp ahhhhh

            Unable to add cookies, header already sent.
            File: /home/northwes/public_html/canary/global.php(833) : eval()'d code
            Line: 24
            Last edited by John Diver; Mon 9 Jul '12, 3:11pm.
            John Diver

            Comment

            • Lats
              Senior Member
              • Mar 2002
              • 3671

              #7
              If you're feeling keen, you could edit the template in phpmyadmin. Look for the template table then click on Search and enter header in the title field and edit the result.

              You can then look for the troublesome double quote and remove it.
              Lats...

              Comment

              • John Diver
                Senior Member
                • May 2003
                • 752

                #8
                Hey Lats,

                Changed this in phpmyadmin but still having the same problem

                Cant even view threads:

                Unable to add cookies, header already sent.
                File: /home/northwes/public_html/canary/global.php(833) : eval()'d code
                Line: 24
                I don't think the double " was causing the problem...

                Thanks for the help people

                - - - Updated - - -

                Sorry for another reply but the forum is totally down...

                Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/northwes/public_html/canary/global.php(833) : eval()'d code on line 24

                Warning: Cannot modify header information - headers already sent by (output started at [path]/global.php(833) : eval()'d code:24) in [path]/includes/functions.php on line 3103
                I have no idea what's wrong...
                John Diver

                Comment

                • Lats
                  Senior Member
                  • Mar 2002
                  • 3671

                  #9
                  Quite often an extra quote will cause problems, but anyways,

                  Try disabling your modifications/plugins and using that default style and see if you still have this problem.
                  Note: To temporarily disable the plugin system, edit includes/config.php and add this line right under <?php


                  PHP Code:
                  define('DISABLE_HOOKS'true); 
                  Lats...

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...
                  😀
                  😂
                  🥰
                  😘
                  🤢
                  😎
                  😞
                  😡
                  👍
                  👎