Im just trying to edit my navbar template and I copied the if condition to see if the user is logged in or not, my code is as follows:
only when I save the template I get
I copied the if condition statement from the original template and cant find out whats wrong with it.. looks perfectly fine to me.. but I havent worked much with vb3 yet so maybe some1 here can enlighten me..
HTML Code:
<script type="text/javascript"> <!-- function log_out() { ht = document.getElementsByTagName("html"); ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)"; if (confirm('$vbphrase[sure_you_want_to_log_out]')) { return true; } else { ht[0].style.filter = ""; return false; } } //--> </script> <br /> <!-- nav buttons bar --> <table border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td><a href="#"><img border="0" src="images/menubar/m01.gif"></a></td> <td><a href="#"><img border="0" src="images/menubar/m02.gif"></a></td> <td><a href="#"><img border="0" src="images/menubar/m03.gif"></a></td> <td><a href="#"><img border="0" src="images/menubar/m04.gif"></a></td> <td><a href="#"><img border="0" src="images/menubar/m05.gif"></a></td> <td><a href="#"><img border="0" src="images/menubar/m06.gif"></a></td> <td><a href="#"><img border="0" src="images/menubar/m07.gif"></a></td> <td id="navbar_search"><a href="search.php?$session[sessionurl]" accesskey="4"><img border="0" src="images/menubar/m09.gif"></a></td> <td id="usercptools"><a href="#usercptools"><img border="0" src="images/menubar/m10.gif"></a></td> <td><a href="#"><img border="0" src="images/menubar/m11.gif"></a></td> </tr> </table> <br /> <!-- / nav buttons bar --> <!-- breadcrumb, login, pm info --> <table width="900" height="150" cellpadding="4" cellspacing="0" border="0" background="images/misc/welcomescreen.gif"> <tr> <td> <if condition="$bbuserinfo['userid']"> <strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><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> <else /> <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 cellpadding="0" cellspacing="$stylevar[formspacer]" border="0"> <tr> <td class="smallfont">$vbphrase[username]</td> <td><input type="text" class="button" 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> <td class="smallfont" colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="3" id="cb_cookieuser_navbar" accesskey="c" checked="checked" />$vbphrase[remember_me]</label></td> </tr> <tr> <td class="smallfont">$vbphrase[password]</td> <td><input type="password" class="button" name="vb_login_password" size="10" accesskey="p" tabindex="2" /></td> <td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="4" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" /></td> </tr> </table> <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" /> </form> </if> </td> </tr> </table> <!-- / breadcrumb, login, pm info --> <br>
Code:
The following error occurred when attempting to evaluate this template: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/ripprod/public_html/riptest/includes/adminfunctions_template.php(3037) : eval()'d code on line 45 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.
Comment