The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Possible to know UserID (pretemplate) in php to load content. [] - new question
Making a costum page, and i got myself stuck..
Got a table with userinformation store in various colums, and i want it to load so when a use enters that page "from anywhere" if he is logged in, it shows his stats/content and for that i would like to do SELECT * FROM table WHERE userID but since i dont have a template "first" im not sure how i can check userID in php, cause i would be missing bbinfo. proberly crappy explained.. let me know if i need to clear it up a bit.. EDIT : basicly i want this function in PHP {vb:raw bbuserinfo.userid} |
#2
|
|||
|
|||
erm, sorry to state the obvious but:
PHP Code:
|
#3
|
||||
|
||||
I thought so aswell, just cant get it working..
Got a user with the UserID as 1 in the table tableAlpha The userID's in tableAlpha "Match" userids from vbulletin>user table. PHP Code:
PHP Code:
the correct value I also tryed entering the bbuserinfo direct into the query with no luck.. |
#4
|
|||
|
|||
Use:
PHP Code:
|
#5
|
||||
|
||||
Thank you so much vBs !!!
3x cheers for you. |
#6
|
||||
|
||||
next step, what about usergroup ?
userinfo['usergroup'] does nada, zip,, zero |
#7
|
||||
|
||||
If you look at the user table in the database, you'll see the field is usergroupid, not just usergroup. And, as the field implies, it is the id not the name of the group.
|
#8
|
||||
|
||||
Quote:
this is what im trying to do getting the user set groups from settings which is something like 2,5,6,7 PHP Code:
|
#9
|
||||
|
||||
preg_split returns an array, I believe. So, how can you do a comparison of $currentuser to an array? You would need to do something like:
PHP Code:
|
#10
|
||||
|
||||
yes, usually i would use usergroup control via a admincp.php and a database query,
was just trying something else for a change, to completely remove ekstra upload files, so it would all just be run on plugins and templates. then i was looking at bitfield options, but i hate those haveing to enter each usergroup to enable a product, i prefer just writeing acces to 2,4,5,6, etc think im gonna drop the settings, and go old school and do a prober php file and a database table. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|