The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Welcome [Username] on Homepage?
I was just wondering what I would need to put to show the Welcome [Username] on my site homepage. I dont need a login or anything, I just want them to see that simple msg. For guest could be something like Welcome Guest, and then the word guest would link to the registration page of the forum? Thanks for any help.
|
#2
|
|||
|
|||
bump
|
#3
|
||||
|
||||
You would just need this coding, mine is working fine...
This assumes and requires that the page you are trying to add the login to is a valid PHP file, would need a .php extension to work properly as the server will need to parse the php first obviously. Code:
------------------------- - Daniel Caldwell - - January 2nd, 2005 - - www.hdclan.org - ------------------------- This assumes and requires that the page you are trying to add this login to is a valid PHP file, such as the server must parse php first! Also please make note that "forums-dir" is considered your forums directory, and you must change this to what you have your forums directory named in order to work! ################### At the top of your Non-VB Page add: ################### <?php chdir("./forums-dir/"); require('./global.php'); chdir("../"); ?> ################### Where you want the login to go add: ################### <? if ($bbuserinfo['userid']!=0) { $username=$bbuserinfo['username']; print("<align='center'><span class='sectionheader'>Welcome back, <br>$username!<br><a href=forums-dir/login.php?do=logout&u=$bbuserinfo[userid]> Log Out?</a>"); } else { ?> <form action='/forums-dir/login.php' method='post' onsubmit='md5hash(vb_login_password,vb_login_md5password)'> <script type='text/javascript' src='/forums/clientscript/vbulletin_md5.js'></script> <span class="sectionheader"><font color=silver face=arial size=3>Username:</span> <input type='text' class='button' name='vb_login_username' id='navbar_username' size='15' accesskey='u' tabindex='1' value='' onfocus='if (this.value == 'username') this.value = '';' /><br> <span class="sectionheader">Password: </span> <input type='password' class='button' name='vb_login_password' size='15' accesskey='p' tabindex='2' /><br> <input type='checkbox' name='cookieuser' value='1' tabindex='3' id='cb_cookieuser_navbar' accesskey='c' checked='checked' /><span class='sectionheader'>Remember Me</span><br> <input name="submit" type='submit' class='button' accesskey='s' tabindex='4' title='Log In' value='Log In' /> <input type='hidden' name='do' value='login' /> <input type='hidden' name='forceredirect' value='1' /> <input type='hidden' name='vb_login_md5password' /> </form></font> <? } ?> ################### ALL DONE! ################### Live and in living color here! |
#4
|
|||
|
|||
Could that be added to an include file? I seem to remember reading someplace that if u used php inside an include file being called from a php file u had to add some kind of code?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|