Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1532 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     HTML/XHTML/DHTML/CSS :

Talk Freelance Login Box

Thread title: Talk Freelance Login Box
Closed Thread  
Page 1 of 2 1 2 >
    Thread tools Search this thread Display Modes  
01-15-2006, 08:49 AM
#1
Ferrarislave is offline Ferrarislave
Status: Member
Join date: Dec 2005
Location: Miami, Florida
Expertise:
Software:
 
Posts: 309
iTrader: 0 / 0%
 

Ferrarislave is on a distinguished road

  Old  Talk Freelance Login Box

Can anyone tell me the code used for the login box area, after you login. I have asked on vb.org and they have not been able to help, so I am hoping someone here can help. I just would like to know what the code is for the new messages, new threads, etc.. I don't want to keep a login box up on my site after the user has logged in; that looks funny.

Thanks.

01-16-2006, 04:51 AM
#2
Julian is offline Julian
Status: Simply to simplify
Join date: Apr 2005
Location: Foxton, Manawatu, New Zealand
Expertise:
Software:
 
Posts: 5,572
iTrader: 0 / 0%
 

Julian is on a distinguished road

  Old

Please don't bump your threads. Please read the rules.

01-16-2006, 05:42 AM
#3
B72 is offline B72
Status: Sin Binner
Join date: Jan 2006
Location:
Expertise:
Software:
 
Posts: 83
iTrader: 0 / 0%
 

B72 is on a distinguished road

  Old

Originally Posted by Ferrarislave
Can anyone tell me the code used for the login box area, after you login. I have asked on vb.org and they have not been able to help, so I am hoping someone here can help. I just would like to know what the code is for the new messages, new threads, etc.. I don't want to keep a login box up on my site after the user has logged in; that looks funny.

Thanks.
Hey, u can actually look at the code for a regularl ogin box, and construct it yourself,

01-16-2006, 06:37 AM
#4
Ferrarislave is offline Ferrarislave
Status: Member
Join date: Dec 2005
Location: Miami, Florida
Expertise:
Software:
 
Posts: 309
iTrader: 0 / 0%
 

Ferrarislave is on a distinguished road

  Old

My apologies, and thanks I will look at the code. I thought someone would have the php for it, but I guess not.

Thanks anyway.

01-16-2006, 07:24 AM
#5
Sam Granger is offline Sam Granger
Status: Request a custom title
Join date: Feb 2005
Location: The Netherlands
Expertise:
Software:
 
Posts: 2,616
iTrader: 19 / 88%
 

Sam Granger is on a distinguished road

Send a message via MSN to Sam Granger

  Old

Its basically just xhtml, variables and if statements.

Make 2 boxes. One for the guests, one for logged in people.

Here's an example for guests (login box)


PHP Code:
<!-- Login panel -->
<
table width="100%" border="0" cellspacing="0" cellpadding="0">
  <
tr>
    <
td class="tcat">
    
Member Login        
    
</td>
  </
tr>
</
table>
<
table width="100%" border="0" cellspacing="0" cellpadding="0" class="tborder">
        <
tr>
          <
td class="alt2">

<
form action="login.php" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">
        <
script type="text/javascript" src="clientscript/vbulletin_md5.js"></script>

<label>$vbphrase[username]<br />
<input type="text" class="bginput" style="font-size: 11px; width: 119px; height: 18px;" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></label><br />
<label>$vbphrase[password]<br /><input type="password" class="bginput" style="font-size: 11px; width: 119px; height: 18px;" name="vb_login_password" size="10" accesskey="p" tabindex="102" /></label><br />
<label for="cb_cookieuser_navbar" style="font-size: 10px; font-weight: normal;"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />$vbphrase[remember_me]</label><br />
<input type="submit" class="button" value="$vbphrase[log_in]" tabindex="104" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" />

        <input type="hidden" name="s" value="$session[sessionhash]" />
        <input type="hidden" name="do" value="login" />        
        <input type="hidden" name="vb_login_md5password" />
        <input type="hidden" name="vb_login_md5password_utf" />
</form>

</td>
        </tr>
      </table>
<!-- end login panel --> 
Now one for the logged in user:

PHP Code:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <
tr>
    <
td class="tcat">
    
Member Information    
    
</td>
  </
tr>
</
table>
      <
table width="100%" border="0" cellspacing="0" cellpadding="0" class="tborder">
        <
tr>
          <
td class="alt2">
        <!-- 
member logout -->
<
phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase><br />
<
phrase 1="$pmbox[lastvisitdate]2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase><br />
<if 
condition="$show['pmstats']"><phrase 1="$vbphrase[unread_x_nav_compiled]2="$vbphrase[total_x_nav_compiled]3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase><br /></if>
        <
a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]"  onclick="return log_out()">logout text or image here.... :)</a>
        <!-- 
end member logout -->

</
td>
        </
tr>
      </
table
Ok, now, you might be wondering, how on earth does the forum know how to display what? For this we use if statements:
PHP Code:
<if condition="$show['guest']">
If 
you are a guest you see this text
<else />
But if you aren't a guest, you can see this because you are logged in!!
</if> 

Our end result:
PHP Code:
<if condition="$show['guest']">
<!-- 
Login panel -->
<
table width="100%" border="0" cellspacing="0" cellpadding="0">
  <
tr>
    <
td class="tcat">
    
Member Login        
    
</td>
  </
tr>
</
table>
<
table width="100%" border="0" cellspacing="0" cellpadding="0" class="tborder">
        <
tr>
          <
td class="alt2">

<
form action="login.php" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">
        <
script type="text/javascript" src="clientscript/vbulletin_md5.js"></script>

<label>$vbphrase[username]<br />
<input type="text" class="bginput" style="font-size: 11px; width: 119px; height: 18px;" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" /></label><br />
<label>$vbphrase[password]<br /><input type="password" class="bginput" style="font-size: 11px; width: 119px; height: 18px;" name="vb_login_password" size="10" accesskey="p" tabindex="102" /></label><br />
<label for="cb_cookieuser_navbar" style="font-size: 10px; font-weight: normal;"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />$vbphrase[remember_me]</label><br />
<input type="submit" class="button" value="$vbphrase[log_in]" tabindex="104" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" />

        <input type="hidden" name="s" value="$session[sessionhash]" />
        <input type="hidden" name="do" value="login" />        
        <input type="hidden" name="vb_login_md5password" />
        <input type="hidden" name="vb_login_md5password_utf" />
</form>

</td>
        </tr>
      </table>
<!-- end login panel -->
<else />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="tcat">
    Member Information    
    </td>
  </tr>
</table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tborder">
        <tr>
          <td class="alt2">
        <!-- member logout -->
<phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase><br />
<phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase><br />
<if condition="$show['pmstats']"><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase><br /></if>
        <a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]"  onclick="return log_out()">logout text or image here.... :)</a>
        <!-- end member logout -->

</td>
        </tr>
      </table>
</if> 
Hope this helps a bit. If you have any questions on how to add extra bits etc... just ask. This could be placed in forumhome for example in a column of a table.

01-16-2006, 07:44 AM
#6
Ferrarislave is offline Ferrarislave
Status: Member
Join date: Dec 2005
Location: Miami, Florida
Expertise:
Software:
 
Posts: 309
iTrader: 0 / 0%
 

Ferrarislave is on a distinguished road

  Old

Thank you Sam I greatly appreciate your effort and information. That is how I skinned my forum, I deleted $header and $footer and just put everything into Forumhome; however when you click on a forum it takes you to a different page without the blue bar, ads, and subtracts the skrunched feel. It uses the original header and footer then. I am now having trouble with the drop down menu's (quick links and search) working in forumhome. I copied my code from header exactly (the drop down's work in header, but not in Forumhome). I can't figure out that issue, i suspect it's just some msising php stuff, but where would I find that? I copied the stuff exactly from HEADER, and looked in Navbar.

Once again thanks!

01-16-2006, 07:48 AM
#7
Sam Granger is offline Sam Granger
Status: Request a custom title
Join date: Feb 2005
Location: The Netherlands
Expertise:
Software:
 
Posts: 2,616
iTrader: 19 / 88%
 

Sam Granger is on a distinguished road

Send a message via MSN to Sam Granger

  Old

Its best to keep #$header and $footer there but I'm not wuite sure. You might be missing some javascript or something. Have an exam to rush off to now, but I'll try to respond asap with an answer.

01-16-2006, 07:53 AM
#8
Ferrarislave is offline Ferrarislave
Status: Member
Join date: Dec 2005
Location: Miami, Florida
Expertise:
Software:
 
Posts: 309
iTrader: 0 / 0%
 

Ferrarislave is on a distinguished road

  Old

Thanks, me and my friend are both trying to figure it out. He is fav more knowledgible able then I with code. Thanks for the help, and thanks for replying!

01-16-2006, 09:15 AM
#9
Sam Granger is offline Sam Granger
Status: Request a custom title
Join date: Feb 2005
Location: The Netherlands
Expertise:
Software:
 
Posts: 2,616
iTrader: 19 / 88%
 

Sam Granger is on a distinguished road

Send a message via MSN to Sam Granger

  Old

Originally Posted by Ferrarislave
Thanks, me and my friend are both trying to figure it out. He is fav more knowledgible able then I with code. Thanks for the help, and thanks for replying!
Probably best if you add me to msn (easier for me to help - otherwise we'll be responding through the forum which takes longer). My msn is: crazybertje@hotmail.com

01-16-2006, 09:21 AM
#10
Ferrarislave is offline Ferrarislave
Status: Member
Join date: Dec 2005
Location: Miami, Florida
Expertise:
Software:
 
Posts: 309
iTrader: 0 / 0%
 

Ferrarislave is on a distinguished road

  Old

Thanks, we figured out the after login box, and the nav. I used the code you gave me and tweaked it to my liking a bit. I will add you to my msn.

I am fr0zen2k3@msn.com

Closed Thread  
Page 1 of 2 1 2 >


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed