Announcement

Collapse
No announcement yet.

guest and table problems

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

  • guest and table problems

    I am having problems. Can someone help?

    DNS Server.
    vBulletin Version: 3.0.3
    Licenced: Yes
    Server: Linux
    PHP: 4
    MySQL: 4
    Apache
    GD 2
    CGI
    ASP .NET
    ASP, VB, VB.NET, Visual Basic .NET
    SSI
    SSQL
    Cpanel/WHM
    ColdFusion
    JSP Sun Mainframe


    Scenario:

    On the forum (index.php) when a guest comes on he will see the welcome message and please register avatar, also the login area.
    On the other hand, when I member is logged in, he shel will see the "welcome username the time is, view new posts (link search?=new posts blah).

    The problem:

    I have attached the images you can also visit my site. http://death-eater.net

    Basically the guest message does not come up. The forms are not aligned.
    On the users logged in the table goes to timbuck 2 and no welcome message its quite awfull.

    The code:

    The code is (c) to Khaleel Mughal, and is for The Death-Eater.NET Community ONLY - please read the only as a few times my modifcations get used. (The mod i modified was welcome panel from vb.org)
    Code:
    $header
    $navbar
    <!-- Welcome Panel Hack V1.1 [] Created By SmasherMaster -->
    <if condition="THIS_SCRIPT == 'index' OR THIS_SCRIPT == 'adv_index'">
    <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center"> 
    <tr>
    <!-- Main Welcome Panel Block [] Begin -->
    	<td class="alt1" valign="middle" align="center">
    	<if condition="$bbuserinfo[userid]!=0">
    	<!-- Avatar Cell [] Begin -->
    	<if condition="THIS_SCRIPT == 'adv_index'">
    	<a href="profile.php?{$session['sessionurl']}&do=editavatar"><img src="$avatarurl" border=0></a>
    	<else />
    	{$welcome_avatar}
    	</if>
    	<!-- Avatar Cell [] End -->
    	</td>
    
    	<td class="alt2" nowrap="nowrap" style="padding:3px">
    	<!-- Your Stats [] Begin -->
    	<div class="smallfont">$vbphrase[first_visit_message]<br/><center>$vbphrase[all_times_are_gmt_x_time_now_is_y]</center></div>
    	<!-- Your Stats [] End -->
    	<else />
    	<!-- Guest [] Begin -->
    			<!-- Avatar --> 
    		<td class="alt1" valign="middle" align="center"> 
    		<a href="register.php?"><img src="images/avatars/guestavatar.gif" border="0"></a> 
    		</td> 
    		<!-- / Avatar --> 
    
    		<td class="alt2" nowrap="nowrap" style="padding:0px"> 
    		<!-- 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 cellpadding="0" cellspacing="3" border="0"> 
    		<tr> 
    		<td class="smallfont">User Name</td> 
    		<td><input type="text" class="button" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="1" value="User Name" onfocus="if (this.value == 'User Name') this.value = '';" /></td>
    
    		</tr> 
    		<tr> 
    		<td class="smallfont">Password</td> 
    		<td><input type="password" class="button" name="vb_login_password" size="10" accesskey="p" tabindex="2" /></td> 
    		</tr> 
    		<tr> 
    		<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" />Remember Me?</label> 
    		<input type="submit" class="button" value="Log in" tabindex="4" title="Enter your username and password in the boxes provided to login, or click the 'register' button to create a profile for yourself." accesskey="s" /> 
    		</td>
    		</tr> 
    		</table> 
    		<input type="hidden" name="ID" value="" /> 
    		<input type="hidden" name="s" value="" /> 
    		<input type="hidden" name="do" value="login" /> 
    		<input type="hidden" name="forceredirect" value="1" /> 
    		<input type="hidden" name="vb_login_md5password" /> 
    		</form> 
    		<!-- / login form --> 
    		</td>
    	<!-- Guest [] End --></if>
    	</td>
    <!-- Main Welcome Panel Block [] End -->
    </tr>
    </table>
    <else />
    <!-- / Welcome Panel Hack V1.1 [] Created By SmasherMaster --></if>
    	<br />
    Can somehelp?

    IMAGES LINK:

    IMAGE 1 -
    IMAGE 2 -

    These are temporay mirrors files are 150K sorry for being so big, just quickly screeny from paint.

    Please can anyone help?

    Thankyou
    -kaz
    Last edited by Khaleel; Wed 13 Oct '04, 12:36pm. Reason: Image forgot to attach

  • #2
    Try removing some nowrap attributes:

    Code:
    $header
    $navbar
    <!-- Welcome Panel Hack V1.1 [] Created By SmasherMaster -->
    <if condition="THIS_SCRIPT == 'index' OR THIS_SCRIPT == 'adv_index'">
    <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center"> 
    <tr>
    <!-- Main Welcome Panel Block [] Begin -->
    	<td class="alt1" valign="middle" align="center">
    	<if condition="$bbuserinfo[userid]!=0">
    	<!-- Avatar Cell [] Begin -->
    	<if condition="THIS_SCRIPT == 'adv_index'">
    	<a href="profile.php?{$session['sessionurl']}&do=editavatar"><img src="$avatarurl" border=0></a>
    	<else />
    	{$welcome_avatar}
    	</if>
    	<!-- Avatar Cell [] End -->
    	</td>
    
    	<td class="alt2" [color=red]nowrap="nowrap"[/color] style="padding:3px">
    	<!-- Your Stats [] Begin -->
    	<div class="smallfont">$vbphrase[first_visit_message]<br/><center>$vbphrase[all_times_are_gmt_x_time_now_is_y]</center></div>
    	<!-- Your Stats [] End -->
    	<else />
    	<!-- Guest [] Begin -->
    			<!-- Avatar --> 
    		<td class="alt1" valign="middle" align="center"> 
    		<a href="register.php?"><img src="images/avatars/guestavatar.gif" border="0"></a> 
    		</td> 
    		<!-- / Avatar --> 
    
    		<td class="alt2" [color=red]nowrap="nowrap"[/color] style="padding:0px"> 
    		<!-- 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 cellpadding="0" cellspacing="3" border="0"> 
    		<tr> 
    		<td class="smallfont">User Name</td> 
    		<td><input type="text" class="button" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="1" value="User Name" onfocus="if (this.value == 'User Name') this.value = '';" /></td>
    
    		</tr> 
    		<tr> 
    		<td class="smallfont">Password</td> 
    		<td><input type="password" class="button" name="vb_login_password" size="10" accesskey="p" tabindex="2" /></td> 
    		</tr> 
    		<tr> 
    		<td class="smallfont" colspan="2" [color=red]nowrap="nowrap"[/color]> 
    		<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="submit" class="button" value="Log in" tabindex="4" title="Enter your username and password in the boxes provided to login, or click the 'register' button to create a profile for yourself." accesskey="s" /> 
    		</td>
    		</tr> 
    		</table> 
    		<input type="hidden" name="ID" value="" /> 
    		<input type="hidden" name="s" value="" /> 
    		<input type="hidden" name="do" value="login" /> 
    		<input type="hidden" name="forceredirect" value="1" /> 
    		<input type="hidden" name="vb_login_md5password" /> 
    		</form> 
    		<!-- / login form --> 
    		</td>
    	<!-- Guest [] End --></if>
    	</td>
    <!-- Main Welcome Panel Block [] End -->
    </tr>
    </table>
    <else />
    <!-- / Welcome Panel Hack V1.1 [] Created By SmasherMaster --></if>
    	<br />

    Comment


    • #3
      help

      Ok, I did that, all that resulted in is the template was not at timbuck two
      HOWEVER, I then saw a few errors in my code, such as if username and then end etc

      The new code which is well should be correct from a newbs view is

      Code:
      <!-- Welcome Panel Hack V1.1 [] Created By SmasherMaster -->
      <if condition="THIS_SCRIPT == 'index' OR THIS_SCRIPT == 'adv_index'">
      <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center"> 
      <tr>
      <!-- Main Welcome Panel Block [] Begin -->
      <td class="alt1" valign="middle" align="center">
      <if condition="$bbuserinfo[userid]!=0">
      <!-- Avatar Cell [] Begin -->
      <if condition="THIS_SCRIPT == 'adv_index'">
      <a href="profile.php?{$session['sessionurl']}&do=editavatar"><img src="$avatarurl" border=0></a>
      <else />
      {$welcome_avatar}
      </if>
      <!-- Avatar Cell [] End -->
      </td></if>
       
      <td class="alt2" style="padding:3px">
      <!-- Your Stats [] Begin -->
      <div class="smallfont">$vbphrase[first_visit_message]<br/></div><center><div class="smallfont">$vbphrase[all_times_are_gmt_x_time_now_is_y]</center></div>
      <!-- Your Stats [] End -->
      <else />
      <!-- Guest [] Begin -->
      <!-- Avatar --> 
      <td class="alt1" valign="middle" align="center"> 
      <a href="register.php?"><img src="images/avatars/guestavatar.gif" border="0"></a> 
      </td> <td class="alt2" style="padding:3px">
      <!-- Your Stats [] Begin -->
      <div class="smallfont">$vbphrase[first_visit_message]<br/></div><center><div class="smallfont">$vbphrase[all_times_are_gmt_x_time_now_is_y]</center></div>
       
      <!-- / Avatar --> 
       
      <td class="alt2" style="padding:0px"> 
      <!-- 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 cellpadding="0" cellspacing="3" border="0"> 
      <tr> 
      <td class="smallfont">User Name</td> 
      <td><input type="text" class="button" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="1" value="User Name" onfocus="if (this.value == 'User Name') this.value = '';" /></td>
       
      </tr> 
      <tr> 
      <td class="smallfont">Password</td> 
      <td><input type="password" class="button" name="vb_login_password" size="10" accesskey="p" tabindex="2" /></td> 
      </tr> 
      <tr> 
      <td class="smallfont" colspan="2"> 
      <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="submit" class="button" value="Log in" tabindex="4" title="Enter your username and password in the boxes provided to login, or click the 'register' button to create a profile for yourself." accesskey="s" /> 
      </td>
      </tr> 
      </table> 
      <input type="hidden" name="ID" value="" /> 
      <input type="hidden" name="s" value="" /> 
      <input type="hidden" name="do" value="login" /> 
      <input type="hidden" name="forceredirect" value="1" /> 
      <input type="hidden" name="vb_login_md5password" /> 
      </form> 
      <!-- / login form --> 
      </td>
      <!-- Guest [] End --></if>
      </td>
      <!-- Main Welcome Panel Block [] End -->
      </tr>
      </table>
      <else />
      <!-- / Welcome Panel Hack V1.1 [] Created By SmasherMaster --></if>
      <br />
      BUT! I am getting the following error..

      Originally posted by index.php?
      Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/deathqe/public_html/forum/index.php(509) : eval()'d code on line 197
      Line 197 READS...
      <td class="thead">$vbphrase[moderator]</td>
      surround code around the line is

      Code:
      <thead>
       
      <tr align="center">
      <td class="thead">&nbsp;</td>
      <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
      <td class="thead" width="175">$vbphrase[last_post]</td>
      <td class="thead">$vbphrase[threads]</td>
      <td class="thead">$vbphrase[posts]</td>
      <if condition="$vboptions['showmoderatorcolumn']">
      <td class="thead">$vbphrase[moderator]</td>
      </if>
      </tr>
      </thead>
      help me please

      Comment


      • #4
        Do you get the error on a default style? I suspect this is a problem with your conditional code in the templates. Otherwise it is a file problem. Try reproducing the problem on a default style and default files.

        Comment


        • #5
          It happens on all the styles

          Comment


          • #6
            Originally posted by Khaleel
            It happens on all the styles
            On a default style?

            Also try uploading the original PHP files.

            If you continue to have problems then we will need to take a look. Submit a support ticket with your forum and server info.

            Comment


            • #7
              Fixed it Just modified some of the welcome hack modification thanks to my teacher! Can you believe it I was in college and in class he was monitoring the machine and called me, he said "Do you know what this is?" I said "Erm Adrian its my college work" He says "no its not valid PHP, he said add an </if> here and move this there and then cut that" and well what do you know done! I asked him how would a law teacher know this? He said he is part admin and co owner of a vbulletin powered lawyers site cool!

              Comment

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