Log in

View Full Version : what is the FIELD variable for a user?


abroad
03-03-2008, 06:59 AM
Hi,

I need to know the variable to call a profile FIELD of a user e.g. Location or Interest

is it e.g. $userid[field3]?

snakes1100
03-03-2008, 10:15 AM
Look in your postbit/legacy_postbit template for that code.

Opserty
03-03-2008, 02:18 PM
Do a search in future this is asked some many times here. Anyway:

In Templates: $bbuserinfo[fieldX]

In PHP: $vbulletin->userinfo['fieldX']

X being the fieldid number.

abroad
03-03-2008, 02:30 PM
I did some search but I was actually looking for this:

I have vBlog installed and I want to get a field of a member who is the owner of a Blog.

I know that $blog[userid] gives me the User ID number but how can I get from there to a Specific Field number of the Blog Owner?

Opserty
03-03-2008, 02:44 PM
You have to post in the thread from which you downloaded the modification, for the best advice. You can try $blog[fieldX] but it might not work depending on vBlog. (vBlog might fetch the field or it might not, if it doesn't you will need to ask in that thread on how you can do fetch the field you need.)

abroad
03-03-2008, 02:46 PM
Actually, I do not have any modification, I try to program something by myself, but I need to know how to call this field variable...

Boofo
03-03-2008, 02:48 PM
In the postbit, you would use:

$post[fieldxx]

(xx being the fieldid number.)

abroad
03-03-2008, 03:08 PM
$post[field1];

or

$blog[field1];

doesnt work :((((

Any other ideas???

Boofo
03-03-2008, 04:01 PM
Location is $post[field2] and where exactly are you using this?

abroad
03-03-2008, 04:30 PM
I want to use it in my Blog. If somebody is watching the blog of a member, I want to get e.g. field2 of the members profile which blog is currently viewed by somebody.

(The field entry of the blogger and not of the viewer)

Boofo
03-03-2008, 04:39 PM
I don't know what they use in the blog for the $post variable. What other variables are they using in there? That might help.

abroad
03-03-2008, 04:44 PM
Actually, I dont know...so far I was only able to call the User ID of the Blog $blog[userid], but I am not sure if I can call a field variable with this User ID...at least I dont know how I should program it :confused:

Boofo
03-03-2008, 04:55 PM
Have you tried $blog[field2] oir $bloginfo[field2] for the location?

abroad
03-03-2008, 05:20 PM
not working...doesnt show any values... :(

Bilderback
03-03-2008, 07:36 PM
Have you tried $userinfo[fieldX]

abroad
03-04-2008, 06:09 AM
no didnt work as well.

Also asked this question in vbulletin.com but no answer. Do they not have any documentation or any support for this blog and which variables to use to call fields of a blogger?

Opserty
03-04-2008, 02:17 PM
Where do you want to put this variable? (i.e. which Page/File/Template)

abroad
03-04-2008, 02:39 PM
it worked with $userinfo[fieldX] !!!