The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I know how to program in PHP and interact with mysql so don't worry about that part. I just need to know what files to include() and what variables. Basically I want to do this:
//Check if user is logged in //If logged in, get username in a variable And that's pretty much it. It would also be nice if they are not logged in, display a small login box. But that is not necessary, I really need to know how to do the above. Thanks in advance! |
|
#2
|
||||
|
||||
|
PHP Code:
|
|
#3
|
|||
|
|||
|
Whoa thanks! I had no idea it was so easy! You are SOOO COOL thanks!
|
|
#4
|
|||
|
|||
|
does this add queries when this is run by each user?
|
|
#5
|
||||
|
||||
|
Yes. I think I read 6 somewhere, but I just woke up, so who knows.
|
|
#6
|
|||
|
|||
|
I can believe it. It quadrupled our server load. If there was a way to cache this or something it would be awesome.
|
|
#7
|
|||
|
|||
|
Quote:
<? chdir('../forums/'); //optional include('global.php'); if (!$bbuserinfo['userid']) { echo "user id =".$bbuserinfo['userid']."</br>"; echo "username = ".$bbuserinfo['username']; } else { $username = $bbuserinfo['username']; echo "user id =".$bbuserinfo['userid']."</br>"; echo "username = ".$bbuserinfo['username']; } ?> result is: user id = username = |
|
#8
|
||||
|
||||
|
That was for vB 3.0.x
Use $vbulletin->userinfo instead of $bbuseirnfo |
|
#9
|
|||
|
|||
|
Thanks.
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|