The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Help! Username/ID variable vs Current Profile Variable
Okay, I?ve been digging through vB forums for a while now using 3.64. I?ve figured out how to pull the username for the current user, but I need help figuring out how the pull the username or ID of the user?s profile I visit? as vbulletin->userinfo[username], only seems to pull for the id of the person logged in. I need this to run querys specific to each user?s profile when a visitor visit a that profile.
Query syntax like ?.. Select?.x x x where profile_being_viewed = $ profile_being_viewed anyone know the variable(s)/array(s) I?m looking for? |
#2
|
||||
|
||||
in the templates
User browsing the page is $bbuserinfo $vbulletin->userinfo User page is $userinfo |
#3
|
|||
|
|||
Thanks Zach, I'll give this a try tonite when I get home and post back!
I'm trying to pull these values into a php script so I can include them back into vB through a plugin. Looks like the variables changed in 3.64 $bbuserinfo ------ >$vbulletin->userinfo['x'] Works in templates, but my biggest issue is pulling this variable over to php. I ran a query of all my array data in userinfo and it never changes the user id or user name from the user logged in to the info of the user profile i'm visiting. I'm thinking this values is not pulled from array...? Still kinda stuck. |
#4
|
||||
|
||||
$bbuserinfo << Templates only
$vbulletin->userinfo << anywhere not in the templates. |
#5
|
|||
|
|||
This is really wierd....
When I use $vbulletin->userinfo[username] directly in the template, it gives me what I want, which is the name of the user's profile (member page) i'm visiting. The problem is I can not get this value outside of the template because it always defaults back to the user logged in. For instance, I'm logged in as Bobby, visiting Mike's page. $vbulletin->userinfo[username] should output Mike, but it pulls Bobby every time. Tried to echo out through a pluggin hooked to the menber_start or global_start using... Code:
ob_start(); echo $vbulletin->userinfo[username]; $givearray = ob_get_contents(); ob_end_clean(); Looks like the variable for the url location is consitent with what I need. I'll back door this unless some can provide a better solution. Code:
<?php $findmember = $vbulletin->session->vars[location]; // pull url location from vbulletin 3.6.5 $memberid = (str_replace("/forums/member.php?u=","",$findmember)); // fix string to filter down to the user id echo $memberid; // verfy the proper id was pulled and held in memberid ?> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|