Announcement

Collapse
No announcement yet.

unexpected T_ENCAPSED_AND_WHITESPACE ???

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

  • unexpected T_ENCAPSED_AND_WHITESPACE ???

    Hello...on the navbar (vb 3.0.1) templet I'm getting...

    The following error occurred when attempting to evaluate this template:

    Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/jabcreat/public_html/community/includes/adminfunctions_template.php(3037) : eval()'d code on line 55

    Here's my code...

    Code:
       <SCRIPT TYPE="TEXT/JAVASCRIPT" SRC="http://www.jabcreations.com/scripts/script-vb-navbar.js"></SCRIPT>
       <br />
       
       <if condition="is_array($navbits)">
       <table cellpadding="0" cellspacing="0" class="table-title-extended">
        <tr>
        <td>
         <a href="#" onclick="history.back(1)">
         <img src="$stylevar[imgdir_misc]/navbits_start.gif" alt="$vbphrase[go_back]" border="0" /></a>
        </td>
        <td>&nbsp;</td>
        <td width="100%">
     <span class="navbar"><a href="$vboptions[forumhome].php?$session[sessionurl]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
        </tr>
        <tr>
        <td class="navbar" style="font-size:10pt; padding-top:1px" colspan="3">
     <a href="$scriptpath"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink.gif" alt="$vbphrase[reload_this_page]" border="0" /></a> <strong>$navbits[lastelement]</strong></td>
       </tr>
       </table>
       
       <else />
       
       <table cellpadding="0" cellspacing="0" class="table-title-extended">
        <tr>
        <td>
     <a href="$vboptions[forumhome].php?$session[sessionurl]" accesskey="1"><img class="inlineimg" src="http://www.jabcreations.com/images/section-community.gif" alt="Community Location" border="0" /></a> <span class="h2">$vboptions[bbtitle]</span>
        </td>
        </tr>
       </table>
       </if>
       
       <!-- breadcrumb, login, pm info -->
       
       <table border="0" cellpadding="0" cellspacing="0" class="table-content-inset">
        <tr>
        <td align="left" class="cell-outset" valign="top">
        <p align="justify">
       <if condition="$bbuserinfo['userid']">Hi
         <span class="h4">$bbuserinfo[username]</span> and welcome to the Community Forums!
         &nbsp; Please feel free to use the forums to talk about anything you would like in a respectable manner!
     &nbsp; Always <a href="http://www.jabcreations.com/community/sendmessage.php?do=mailmember&u=1">ask a question</a> if you have one!</p>
     &nbsp; You are one of the currently <span class="h4">$totalonline</span> people <span class="h5">(</span><span class="h4">$numberregistered members</span> and <span class="h4">$numberguest guests</span><span class="h5">)</span> visiting my web-site.</p>
       
       </span>
       <else />
        <p align="justify">Hi <span class="h4">Stranger</span> and welcome to the Community Forums!</p>
       
     <p align="justify">Please <a href="http://www.jabcreations.com/community/register.php">register</a> to be able to fully participate in the forums.
         &nbsp; Registered users have the ability to post new threads and respond to currently open threads.
         &nbsp; Members also have access to the larger downloable files at JAB Creations.
         &nbsp; All visitors registered or not have full access to view my site and vote on public poles.</p>
       </if>
        </td>
       
       <if condition="$bbuserinfo['userid']">
     <td align="left" class="cell-inset" onmouseover=this.className='cell-inset-hover' onmouseout=this.className='cell-inset' valign="top">
     <!--<span style="float:$stylevar[right]">[<a href="login.php?$session[sessionurl]do=logout&amp;u=$bbuserinfo[userid]" onclick="return log_out()">$vbphrase[log_out]</a>]</span>-->
       <br />
         <phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
     <if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl]">$vbphrase[private_messages_nav]</phrase></if>
        </td>
       <else />
     <td align="left" class="cell-inset" onmouseover=this.className='cell-inset-hover' onmouseout=this.className='cell-inset' valign="top">
        
       
       
       <!-- login form -->
       <form action="login.php" method="post" onsubmit="md5hash(vb_login_password,vb_login_md5password)">
       <script type="text/javascript" src="clientscript/vbulletin_md5.js"></script>
       <table border="0" cellpadding="0" cellspacing="0" width="150">
        <tr>
        <td>
         <span class="h4s">User Name</span><span class="h5s">:</span>
        </td>
        <td>
     <input type="text" class="textbox" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="1" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" />
        </td>
        </tr>
        <tr>
        <td>
         <span class="h4s">Password</span><span class="h5s">:</span>
        </td>
        <td>
         <input type="password" class="textbox" name="vb_login_password" size="10" accesskey="p" tabindex="2" />
        </td>
        </tr>
        <tr>
        <td colspan="2">
     <input type="submit" class="input" value="Sign In" tabindex="4" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" />
       <br>
        <label for="cb_cookieuser_navbar">
     <input type="checkbox" name="cookieuser" value="1" tabindex="3" id="cb_cookieuser_navbar" accesskey="c" checked="checked" />Remember Me</label>
        <input type="hidden" name="s" value="$session[sessionhash]" />
        <input type="hidden" name="do" value="login" />
        <input type="hidden" name="forceredirect" value="1" /> 
        <input type="hidden" name="vb_login_md5password" />
        </td>
        </tr>
       </table>
       </form>
       <!-- / login form -->
       
       <!-- / breadcrumb, login, pm info -->
       
       <!-- nav buttons bar -->
       <div align="center">
     	<table class="table-content" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" align="center" style="border-top-width:0px">
       	<tr align="center">	
     		<!--<td class="vbmenu_control"><a href="$vboptions[forumhome].php?$session[sessionurl]">Home</a></td>-->
       		
       		<if condition="$show['member']">
     			<td class="vbmenu_control"><a href="usercp.php?$session[sessionurl]">$vbphrase[user_cp]</a></td>
       		</if>
       		<if condition="$show['registerbutton']">
     			<td class="vbmenu_control"><a href="register.php?$session[sessionurl]">$vbphrase[register]</a></td>
       		</if>
     		<td class="vbmenu_control"><a href="faq.php?$session[sessionurl]" accesskey="5">$vbphrase[faq]</a></td>
     		<td class="vbmenu_control"><a href="memberlist.php?$session[sessionurl]">$vbphrase[members_list]</a></td>
     		<td class="vbmenu_control"><a href="calendar.php?$session[sessionurl]">$vbphrase[calendar]</a></td>
     		<if condition="$show['popups']">		
       			<if condition="$show['searchbuttons']">
     				<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>
     		 	<td id="navbar_search" class="vbmenu_control"><a href="search.php?$session[sessionurl]" accesskey="4">$vbphrase[search]</a> <script type="text/javascript"> vbmenu_register("navbar_search"); </script></td>
       			</if>
       			<if condition="$bbuserinfo['userid']">
     		 	<td id="usercptools" class="vbmenu_control"><a href="#usercptools">$vbphrase[quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></td>		
       			</if>
       		<else />		
       			<if condition="$show['searchbuttons']">
     		 	<td class="vbmenu_control"><a href="search.php?$session[sessionurl]" 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">$vbphrase[mark_forums_read]</a></td>
     			<if condition="$bbuserinfo['userid']"> 		
     		 	<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_buddy_list]</a></td> 		
     			</if>			
       		</if>
       		<if condition="$bbuserinfo['userid']">
     			<td class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&amp;u=$bbuserinfo[userid]" onclick="return log_out()">$vbphrase[log_out]</a></td>
       		</if>
       	</tr>
       	</table>
       </div>
       <!-- / nav buttons bar -->
       
       <br />
       <br />
       
       
       
       
       
       
       
       <if condition="$show['popups']">
       <!-- NAVBAR POPUP MENUS -->
       	
       	<if condition="$show['searchbuttons']">
       	<!-- header quick search form -->
       	<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
       		<table cellpadding="4" cellspacing="1" border="0">
       		<tr>
     			<td class="thead">$vbphrase[search_forums]</td>
       		</tr>
       		<tr>
       			<td class="vbmenu_option" title="nohilite">
       			<form action="search.php" method="post">
     		 	<input type="hidden" name="do" value="process" />
     		 	<input type="hidden" name="showposts" value="0" />
     		 	<input type="text" class="bginput" name="query" size="20" />$gobutton<br />
       			</form>
       			</td>
       		</tr>
       		<tr>
     			<td class="vbmenu_option"><a href="search.php?$session[sessionurl]" accesskey="4">$vbphrase[advanced_search]</a></td>
       		</tr>
       		</table>
       	</div>
       	<!-- / header quick search form -->
       	</if>
       
       	<if condition="$show['member']">
       	<!-- user cp tools menu -->
       	<div class="vbmenu_popup" id="usercptools_menu" style="display:none">
       		<table cellpadding="4" cellspacing="1" border="0">
       		
     		<tr><td class="thead">$vbphrase[quick_links]</td></tr> 	
     		<if condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getnew">$vbphrase[new_posts_nav]</a></td></tr></if>
     		<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a></td></tr>
     		<tr><td class="vbmenu_option"><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_buddy_list]</a></td></tr>
       				
     		<tr><td class="thead"><a href="usercp.php?$session[sessionurl]">$vbphrase[user_control_panel]</a></td></tr>
     		<if condition="$show['siglink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editsignature">$vbphrase[edit_signature]</a></td></tr></if>
     		<if condition="$show['avatarlink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editavatar">$vbphrase[edit_avatar]</a></td></tr></if>
     		<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editprofile">$vbphrase[edit_profile]</a></td></tr>
     		<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr>
       		
     		<tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
     		<if condition="$show['pmstats']"><tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]">$vbphrase[private_messages]</a></td></tr></if>
     		<tr><td class="vbmenu_option"><a href="subscription.php?$session[sessionurl]">$vbphrase[subscribed_threads]</a></td></tr>
     		<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[my_profile]</a></td></tr>
     		<if condition="$show['wollink']"><tr><td class="vbmenu_option"><a href="online.php?$session[sessionurl]">$vbphrase[whos_online]</a></td></tr></if>
       		
       		</table>
       	</div>
       	<!-- / user cp tools menu -->
       	</if>
       <!-- / NAVBAR POPUP MENUS -->
       </if>
    John Bilicki III
    Webmaster of JAB Creations

  • #2
    That error isn't referring to that template, it is referring to the file called "adminfunctions_template.php"

    Comment


    • #3
      No, that error is refering to the template, hence the eval() error message.
      What changes did you apply to the template? Maybe it's easier to go through the changes because there's nothing wrong on line 55, so the actual error will be somewhere else.

      Comment


      • #4
        I actually got the error after adding the last code (login). However when I restored JUST the login code it STILL gave me the error message. This is why I posted it here...plus I was going to bed

        Anyway the code I changed appears closer to the left as I dont do my formating like VB.
        John Bilicki III
        Webmaster of JAB Creations

        Comment


        • #5
          This is probably due to the code you changed, you either broke an existing <if> conditional or a new one.

          If you have <if ..> ..... code .... </if> and you remove the last </if> from the template, it will break.

          If you have <if conditional="something> ...code </if> (missing ") it will break.

          Revert the template to original and re-apply (step by step) your code changes, keep an eye on the conditionals.

          Comment


          • #6
            Floris you are great! Thanks!

            I simply counted how many <if and then how many /if> I had and I came out with <if=22 /if>=21.

            I just added another /if and the error disapeared! Now my login table appears while im logged on. Oh well I can take care of that!
            John Bilicki III
            Webmaster of JAB Creations

            Comment


            • #7
              Make sure the </if> is in the right place, otherwise it will include or exclude code for certain conditions, ending up with the login box (for example) to show when you are actually logged in.

              Comment

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