The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
array_merge
IS it possible for me to add custom userinfo to the fetch_userinfo() array to be then called with the fetch_userinfo() array anywhere on the site.
example i have a custom rating system based on post counts. what i want to do is do the return on it and then merge the result into the user info array. |
#2
|
|||
|
|||
If you add columns to the user table, they will load with the rest of the userdata and you won't have to do anything. If you use a separate table with a userid column, then you can use a plugin at hook location fetch_userinfo_query and set the variables $hook_query_fields and $hook_query_joins to add your table to the query. For example:
Code:
$hook_query_fields .= ', mytable.*'; $hook_query_joins .= ' LEFT JOIN mytable ON (mytable.userid = user.userid) '; Edit: I just reread what you posted - if you don't want to read your info directly from the database, you could instead use a plugin on hook fetch_userinfo to do whatever you have to to find the data for user $userid, then add your info to the $user array. |
Благодарность от: | ||
tbworld |
#3
|
|||
|
|||
thanks will give it ago and let you know
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|