Announcement

Collapse
No announcement yet.

syntax eror on editing templates

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

  • syntax eror on editing templates

    when I try to edit and save some templates(such as posrbit and postbit_legacy), after clicking on the save it gaves me this eror:
    Code:
    The following error occurred when attempting to evaluate this template:
    
    Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/wwwXXX/public_html/my/includes/adminfunctions_template.php(3537) : eval()'d code on line 88
    
    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
    also I chaecked the codes & saw it's uncmplete.
    for exampe the postbit_lagacy contains:
    Code:
    <!-- post #$post[postid] -->
    <if condition="$show['spacer']">
    	$spacer_open
    	<div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
    	<if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>	
    </if>
    
    <table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
    <tr>
    	<if condition="$show['announcement']">
    		<td class="thead" style="font-weight:normal" colspan="2">
    			<img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" />
    			<phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
    		</td>
    	<else />
    		<td class="thead" style="font-weight:normal" $post[scrolltothis]>		
    			<!-- status icon and date -->
    			<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
    			$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
    			$post[firstnewinsert]
    			<!-- / status icon and date -->				
    		</td>
    		<td class="thead" style="font-weight:normal" align="$stylevar[right]">
    			&nbsp;
    			<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a></if>
    			<if condition="$show['inlinemod']">
    				<input type="checkbox" name="plist[$postid]" id="plist_$postid" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="$post[checkbox_value]" onclick="inlineMod.toggle(this)" />
    			</if>
    		</td>
    	</if>
    </tr>
    <tr valign="top">
    	<td class="alt2" width="175">
    			
    			<div id="postmenu_$post[postid]">
    				<if condition="$show['profile']">
    				<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
    				<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
    				<else />
    				$post[musername]
    				</if>
    			</div>
    			
    			<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
    			<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
    		
    			<if condition="$show['avatar']">
    				<div class="smallfont">
    					&nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
    				</div>
    			</if>
    			
    			<div class="smallfont">
    				&nbsp;<br />
    				<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
    				<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
    				<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
    				<div>
    					$vbphrase[posts]: $post[posts]
    <!-- Start Post Thank You Hack -->
    <if condition="$post[userid]">
    <br />
    $vbphrase[post_thanks_thanks]: $post[post_thanks_user_amount]
    <br />
    <if condition="$post[post_thanks_thanked_times_on] == 1">
    $vbphrase[post_thanks_time_post]
    <else />
    <if condition="$post[post_thanks_thanked_posts_on] == 1">
    <phrase 1="$post[post_thanks_thanked_times]">$vbphrase[post_thanks_times_post]</phrase>
    <else />
    <phrase 1="$post[post_thanks_thanked_times]" 2="$post[post_thanks_thanked_posts]">$vbphrase[post_thanks_times_posts]</phrase>
    </if>
    </if>
    </if>
    <!-- End Post Thank You Hack -->
    				</div>
    				<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div></if>
    				<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
    			</div>					
    		
    	</td>
    	<if condition="$show['moderated']">
    	<td class="alt2" id="td_post_$post[postid]">
    	<else />
    	<td class="alt1" id="td_post_$post[postid]">
    	</if>
    	
    		<if condition="$show['messageicon'] OR $post['title']">
    			<!-- icon and title -->
    			<div class="smallfont">
    				<if condition="$show['messageicon']"><img c
    only this and when I try to add the remainnig codes it gaves that eror agian.
    what happanned?

  • #2
    What happens when you revert the template and then try to edit it again?
    Best Regards
    Colin Frei

    Please don't contact me per PM.

    Comment


    • #3
      Originally posted by Colin F
      What happens when you revert the template and then try to edit it again?
      again this eror.

      Comment


      • #4
        Half of your template is clearly missing, its not meant to end with

        Code:
        <if condition="$show['messageicon']"><img c
        Scott MacVicar

        My Blog | Twitter

        Comment


        • #5
          Originally posted by Scott MacVicar
          Half of your template is clearly missing, its not meant to end with

          Code:
          <if condition="$show['messageicon']"><img c
          yes I know as I said when I try to cmplete itU again face with this eror(

          Comment


          • #6
            Try rebuilding the style by uploading the tools.php file from the do_not_upload folder of the vBulletin zip file and running the appropriate function there.
            Best Regards
            Colin Frei

            Please don't contact me per PM.

            Comment


            • #7
              Originally posted by Colin F
              Try rebuilding the style by uploading the tools.php file from the do_not_upload folder of the vBulletin zip file and running the appropriate function there.
              Thanks Colin, it solved.

              Comment

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