The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Hi guys im not a pro with coding so pls be nice,
Ive made a html homepage for my site, and i have integrated a login box on this page for the forums, ive managed to code the box so that when the user enters their username and password they are logged in and redirected to the forum index, but if the user returns to the homepage, they still see the login box , I need help with the coding, such that if a user is logged in and they return to the homepage they see that they are logged in and unread messages etc exactly like we have on vbulletin forum, and maybe a log out button too, Below is the code i have used, pls tell me what else i need to do, Thanks in advance ![]() Code:
<form action="forums/login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)"> <table cellpadding="0" cellspacing="3" border="0"> <tr> <td class="smallfont"><label for="navbar_username">User Name</label></td> <td><input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="17" accesskey="u" tabindex="101" value="User Name" onfocus="if (this.value == 'User Name') this.value = '';" /></td> <td class="smallfont" nowrap="nowrap"> </td> </tr> <tr> <td class="smallfont"><label for="navbar_password">Password</label></td> <td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="17" tabindex="102" /></td> <td> </td> </tr> </table> <span class="smallfont"> <input name="submit" type="submit" class="button" accesskey="s" tabindex="104" title="Enter your username and password in the boxes provided to login, or click the 'register' button to create a profile for yourself." value="Log in" /> <input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" /><label for="cb_cookieuser_navbar">Remember Me?</label></span> <!--<a href="forums/register.php" class="style2">REGISTER</a>--> <input type="button" onClick="parent.location='forums/register.php'" value="Register" /> <input type="hidden" name="s" value="" /> <input type="hidden" name="do" value="login" /> <input type="hidden" name="url" value="/forums/" /> <input type="hidden" name="vb_login_md5password" /> <input type="hidden" name="vb_login_md5password_utf" /> <tr><td> </td> </tr> </form> |
#2
|
|||
|
|||
![]()
There are already actually a couple things on the forum about this, try using some of the search in the future.
Here are two examples: https://vborg.vbsupport.ru/showthrea...ighlight=login https://vborg.vbsupport.ru/showthrea...t=login&page=2 By the way - Us coders are here to help, we are not always mean ![]() |
#3
|
||||
|
||||
![]()
Also this http://www.vbulletin.com/forum/showp...7&postcount=17 definitely works.
Demo: http://die16-clan.com/forum/ |
#4
|
||||
|
||||
![]()
Thanks for the help guys, i did use the search bar and found the programs uve shown me, but only 1 works to my requirements which i couldnt get to work at first but now i have
https://vborg.vbsupport.ru/showthrea...ighlight=login I still need a bit more help, after logging in the user sees ![]() I would like to add some more details like we can see on a vbulletin: ![]() I would like to have those notification in the empty space i have on my homepage as shown in the first picture, but i do not know the code required and where it should go, thanks in advance |
#5
|
|||
|
|||
![]()
You have to copy the functions from the styles in your navbar to that location. For example, look at the navbar file and look for the private messages code and copy that over. Keep tinkering around with this until you have your desired results.
Hope that helps! |
#6
|
||||
|
||||
![]()
Hi, Thanks for your reply, im not very good with this, so below is my code from the navbar and i cannot find anything to do with the PM system,
Could you please point it out for me, and tell me how i could use it, Many thanks Code:
<br /> <div class="breadcrumb"> <div class="bcright"> <div class="bcleft"> <a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a> $navbits[breadcrumb] <if condition="$navbits['lastelement']">» $navbits[lastelement]</if> </div> </div> </div> <br /> <div style="border-bottom: 3px solid #000000;"> </div> <br /> <if condition="$show['member']"> <div style="width: 100%;"> <iframe src="shoutbox.php" width="100%" height="190" frameborder="no" scrolling="yes" style="overflow-x: hidden;"></iframe> </div> <br /> <div style="border-bottom: 3px solid #000000;"> </div> </if> <br /> <!-- donationbar --> $cybpaypal_donbar <!-- / donationbar --> <if condition="$show['notices']"> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="thead">$vbphrase[notices]</td> </tr> <tr> <td class="alt1">$notices</td> </tr> </table> <br /> </if> <if condition="$show['forumdesc']"> <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="alt1" width="100%"><strong>$foruminfo[title]</strong> <span class="smallfont">$foruminfo[description]</span></td> </tr> </table> <br /> </if> <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" align="$stylevar[left]"> <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?do=process" method="post"> <input type="hidden" name="do" value="process" /> <input type="hidden" name="quicksearch" value="1" /> <input type="hidden" name="childforums" value="1" /> <input type="hidden" name="exactname" value="1" /> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" /> <div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" /></div> <div style="margin-top:$stylevar[cellpadding]px"> <label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label> <label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label> </div> </form> </td> </tr> <if condition="$vboptions[threadtagging]"> <tr> <td class="vbmenu_option"><a href="tags.php$session[sessionurl_q]" rel="nofollow">$vbphrase[tag_search]</a></td> </tr> </if> <tr> <td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td> </tr> $template_hook[navbar_search_menu] </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" align="$stylevar[left]"> <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=getdaily">$vbphrase[todays_posts]</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&focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=250,height=300'); return false;">$vbphrase[open_contacts]</a></td></tr> $template_hook[navbar_quick_links_menu_pos1] <tr><td class="thead">$vbphrase[networking]</td></tr> <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=buddylist"><if condition="$show['friends_and_contacts']">$vbphrase[contacts_and_friends]<else />$vbphrase[contacts]</if></a></td></tr> <if condition="$show['quick_links_groups']"> <tr><td class="vbmenu_option"><a href="group.php$session[sessionurl_q]">$vbphrase[social_groups]</a></td></tr> </if> <if condition="$show['quick_links_albums']"> <tr><td class="vbmenu_option"><a href="album.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[pictures_and_albums]</a></td></tr> </if> $template_hook[navbar_quick_links_menu_pos2] <tr><td class="thead"><a href="usercp.php$session[sessionurl_q]">$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_your_details]</a></td></tr> <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr> $template_hook[navbar_quick_links_menu_pos3] <tr><td class="thead">$vbphrase[miscellaneous]</td></tr> <if condition="$show['pmmainlink']"><tr><td class="vbmenu_option"><a href="private.php$session[sessionurl_q]" rel="nofollow">$vbphrase[private_messages]</a></td></tr></if> <tr><td class="vbmenu_option"><a href="subscription.php$session[sessionurl_q]" rel="nofollow">$vbphrase[subscribed_threads]</a></td></tr> <tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[your_profile]</a></td></tr> <if condition="$show['wollink']"><tr><td class="vbmenu_option"><a href="online.php$session[sessionurl_q]">$vbphrase[whos_online]</a></td></tr></if> $template_hook[navbar_quick_links_menu_pos4] </table> </div> <!-- / user cp tools menu --> <if condition="$notifications_total"> <!-- notifications menu --> <div class="vbmenu_popup" id="notifications_menu" style="display:none"> <table cellpadding="4" cellspacing="1" border="0"> <tr><td class="thead" colspan="2">$vbphrase[your_notifications]</td></tr> $notifications_menubits </table> </div> <!-- / notifications menu --> </if> </if> <!-- / NAVBAR POPUP MENUS --> <!-- PAGENAV POPUP --> <div class="vbmenu_popup" id="pagenav_menu" style="display:none"> <table cellpadding="4" cellspacing="1" border="0"> <tr> <td class="thead" nowrap="nowrap">$vbphrase[go_to_page]</td> </tr> <tr> <td class="vbmenu_option" title="nohilite"> <form action="$vboptions[forumhome].php" method="get" onsubmit="return this.gotopage()" id="pagenav_form"> <input type="text" class="bginput" id="pagenav_itxt" style="font-size:11px" size="4" /> <input type="button" class="button" id="pagenav_ibtn" value="$vbphrase[go]" /> </form> </td> </tr> </table> </div> <!-- / PAGENAV POPUP --> </if> $ad_location[ad_navbar_below] |
#7
|
|||
|
|||
![]()
Out of the code you provided, this was displayed
PHP Code:
For your reference, here is my PM information from my style: PHP Code:
|
#8
|
||||
|
||||
![]()
thanks for the reply, your code seems to be a lot more complexed than mine,
I had changed th homepage to php so I could use the php script from the add on, have u had a look at the add on script? I am not 100% sure exactly where I'll have to put the code you located in the given filed of the ad on: This for ure help |
#9
|
|||
|
|||
![]()
If you insure the globals.php and functions files are included it should display properly.
You also need to display the template ![]() Not sure which script you are using, can you post the link? |
#10
|
||||
|
||||
![]()
This is the script im using, the author describes that you can add things to your login box, but there;s no support, im glad there's still people like you around
![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|