The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
The result for the script echos this "The userid for is ". I specify a username that exists case sensitive.
|
#12
|
||||
|
||||
It should still work if you replace
PHP Code:
PHP Code:
|
#13
|
||||
|
||||
Quote:
Sorry! |
#14
|
|||
|
|||
I put
chdir("/mainforum/"); require("./global.php"); i have the file in the root and my directory is mainforum |
#15
|
||||
|
||||
The directory is REALLY /mainforum?
I doubt that ... except you are in a chroot-jail. More likely it is smt.h like /var/htdocs/youraccount/html/mainforum |
#16
|
|||
|
|||
I have a situation where I also need to convert a USERNAME from a template to a USERID inside a main php file....
I tried to use the code above in my file like this: Code:
$getuser = $vbulletin->db->query(" SELECT userid,username FROM myuser WHERE username = $username "); $user = $DB_site->fetch_array($getuser); echo("The userid for $user[username] is <b>$user[userid]</b>"); Quote:
I would really appreciate any help! |
#17
|
|||
|
|||
you can use
PHP Code:
$user['userid'] will then contain the userid |
#18
|
|||
|
|||
Can we please keep vB3.5 questions and solutions in the vB3.5 forum. This to avoid confusion.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|