Log in

View Full Version : Adding users Location field to postbit


ctimes
05-03-2009, 02:46 PM
I would like to list my users location right under 'post count' in threads, I know Ineed to add this to the postbit but I have been unable to find the correct code to add in order to see it.

Lynne
05-03-2009, 03:30 PM
It should show automatically if the user entered a location in their profile (like it does here). I listed a location, so mine shows here - you didn't list a location, so nothing shows in your postbit.

ctimes
05-03-2009, 05:56 PM
I thought so too by enabling it to be required on registration or profile update but it still does not show :( I have Rep, Rep Power, Posts and Join date but no Location unfortunately.

I am using the techforums skin so I am not sure if they disabled it or not maybe?

Lynne
05-03-2009, 06:01 PM
They may not have it on their skin. Go to Edit the postbit (and/or postbit_legacy) and do a View History > Compare, or hit View Default, and you should be able to find the code to add.

ctimes
05-04-2009, 06:20 AM
I actually deleted the default theme before I knew you could force users to use one type :( do you know if there is a place to download the default style? I checked the members area and did not see anything unfortunately.

They may not have it on their skin. Go to Edit the postbit (and/or postbit_legacy) and do a View History > Compare, or hit View Default, and you should be able to find the code to add.

Lynne
05-04-2009, 02:39 PM
Create a new style with no parent:

Styles & Templates > Style Manager > Add New Style
Parent Style: No Parent Style
Title: Default vBulletin
Allow User Selection: Yes
Save


That will give you a completely default style.

ctimes
05-05-2009, 08:24 PM
Create a new style with no parent:

Styles & Templates > Style Manager > Add New Style
Parent Style: No Parent Style
Title: Default vBulletin
Allow User Selection: Yes
Save


That will give you a completely default style.

Ok here is a weird one, I did what you said found where it was in the default style and looked in my custom style and it is actually there so as far as I can tell should technically be showing in each post.

Here is the code

<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>

So it was in the default vB style as well as my custom style I am trying to get it to show up on.

--------------- Added 1241561049 at 1241561049 ---------------

One thing I did notice is in my user profile manager the field is set as '6' while the postbit says '2' however upon changing that in the postbit and postbit_legacy I am having the same results.

--------------- Added 1241565159 at 1241565159 ---------------

ahh I figured it out :) I had to change it in two places in the postbit oops :)

thank you for your help