Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Add custom field to postbit Details »
Add custom field to postbit
Mod Version: 1.00, by Replicant (Member) Replicant is offline
Developer Last Online: Mar 2017 I like it Show Printable Version Email this Page

vB Version: 5.1.9 Rating: (1 vote - 5.00 average) Installs: 8
Released: 28 Nov 2015 Last Update: Never Downloads: 0
Not Supported Template Edits  

There have been a few questions regarding adding location to the postbit on vb.com lately. Lynne had a write-up here in 2013 using the Product/Hook system which is the best way to do it as the mod will survive an upgrade and there is a hook exactly where it's needed. I'm not going to go into creating a product with this mod.This is an example of a template edit to add a field to the postbit that only takes a few minutes. Keep in mid, this will be overwritten during an upgrade and will need to be re-applied. Since this requires editing templates, it will not work on the cloud. I am currently working on a jquery/ajax version for the cloud, but it's a little ways down the road when I'm not so busy.

Here's how to do it.
Step 1)Go to AdminCP >> User Profile fields >> Add new user profile field
Select single line textbox > then click "continue"
Fill out the title, description and other relevant info on that page and click save. This will also create the necessary phrases for the field.
Go to AdminCP >> User Profile fields >> User Profile fields Manager. Here you will see the new field you created and the field number used in step 2. I used field8 (Location) for this example.

Step 2) Edit conversation_userinfo template. Add this code after {vb:hook 'conversation_userstats'} on or about line 53 and click save.

Step 3) Goto your user profile and click edit settings. Scroll down on the profile tab and fill the new field with the info.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


You can add classes in the code for custom CSS if you prefer. The default list view kind of sucks IMO.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	postbit.png
Views:	301
Size:	16.6 KB
ID:	153763  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Remove Location display if author has no location JJR512 vBulletin 2.x Full Releases 16 28 Apr 2003 09:19

Comments
  #2  
Old 01 Dec 2015, 21:47
faustvasea97 faustvasea97 is offline
 
Join Date: Mar 2015
any photo ?
Reply With Quote
  #3  
Old 04 Dec 2015, 05:29
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Real name: Mel
Originally Posted by faustvasea97 View Post
any photo ?
I added one. Also fixed a typo in the code.
__________________
VB5 mods - RepliClock VB4 mods - Member Online Status
Reply With Quote
  #4  
Old 06 Jan 2016, 15:35
Rico300 Rico300 is offline
 
Join Date: May 2008
Thx
Reply With Quote
  #5  
Old 08 Jan 2016, 12:16
jkotlowski jkotlowski is offline
 
Join Date: May 2015
Hi Replicant, I think this may be what I was looking for, but I'm not one hundred percent certain. Can this be used to add an image icon under a usertitle? And can that extra part in the postbit be assigned to specific usergroups only?

My members want to start doing "member of the year" awards, and a few are suggesting that the winners get small badges in their postbits for when they win a category. So I'd like to see if this is possible.
Reply With Quote
  #6  
Old 08 Jan 2016, 19:48
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Real name: Mel
Probably not without a custom coded product as these are user profile fields entered by the user. What you are looking for is an awards system that will need to be coded. Probably not too difficult to do. I'll look at it when I get some time or at least a hack to buy some time. With the hook system coming back, this may be easier to do but since it is in it's infancy, may be some time to wait until it's ready for production.
__________________
VB5 mods - RepliClock VB4 mods - Member Online Status
Reply With Quote
  #7  
Old 08 Jan 2016, 22:23
jkotlowski jkotlowski is offline
 
Join Date: May 2015
Originally Posted by Replicant View Post
Probably not without a custom coded product as these are user profile fields entered by the user. What you are looking for is an awards system that will need to be coded. Probably not too difficult to do. I'll look at it when I get some time or at least a hack to buy some time. With the hook system coming back, this may be easier to do but since it is in it's infancy, may be some time to wait until it's ready for production.
Thank you for the reply! If at any point in the future you could help, I'd appreciate it. (as I'm sure other VB5 members would!)
Reply With Quote
  #8  
Old 18 Jan 2016, 03:42
josueinaki josueinaki is offline
 
Join Date: Sep 2015
this is a good think, thanks for that.
Reply With Quote
  #9  
Old 11 Feb 2016, 15:59
Aros12 Aros12 is offline
 
Join Date: Jan 2016
Thanks for the code Replicant but I could not get it to work. It shows "Location:" under some user's postbit but no location. My location is entered in my settings but doesn't show up in the postbit. I put the exact code above into my conversation_userinfo template at line 53 (field2 for me) but no go. Any ideas?

http://www.hobbysquawk.com/forum/rc-...-knowledgebase
Reply With Quote
  #10  
Old 11 Feb 2016, 17:51
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Real name: Mel
I pulled the fetchProfileInfo for your user at your site and the location info is there so its just not retrieving or getting translated at the template. I've not tested this on 5.2.0 so maybe that's the issue. I'll take a look at it and report back. Give me a day or so.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

SOLVED:I fetched your template and found your issue. It's a typo. Change the 8 below to a 2 in your template and it should work.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
VB5 mods - RepliClock VB4 mods - Member Online Status

Last edited by Replicant; 11 Feb 2016 at 18:44.
Reply With Quote
  #11  
Old 11 Feb 2016, 18:31
Aros12 Aros12 is offline
 
Join Date: Jan 2016
Okay thanks so much!
Reply With Quote
  #12  
Old 12 Feb 2016, 19:52
Aros12 Aros12 is offline
 
Join Date: Jan 2016
You are the man! Thank you!!
Reply With Quote
  #13  
Old 22 Feb 2016, 13:38
IggyP IggyP is offline
 
Join Date: May 2012
great thanks
Reply With Quote
  #14  
Old 22 Mar 2016, 01:29
mhere21 mhere21 is offline
 
Join Date: Mar 2016
Exactly what I was looking for. Thank you.
Reply With Quote
  #15  
Old 11 Aug 2016, 21:00
KimK KimK is offline
 
Join Date: Feb 2012
Real name: Kim
Originally Posted by Replicant View Post
I pulled the fetchProfileInfo for your user at your site and the location info is there so its just not retrieving or getting translated at the template. I've not tested this on 5.2.0 so maybe that's the issue. I'll take a look at it and report back. Give me a day or so.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

SOLVED:I fetched your template and found your issue. It's a typo. Change the 8 below to a 2 in your template and it should work.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Hi Replicant, I am using vb 5.2.2 and tried the above, but it just translates into the field 2 title Location, without pulling the actual location the member entered. My hope is to actually bring in 2 fields, occupation and location. If you have a second, can you take a look? I didn't know if I was suppose to do anything with your first code block in this post, so that could be what I am doing wrong. My location field is 2, and I copied your code above to try the second time. www.Agentlinkus.com

I tried the update tools, because these are fields my members have already filled in, they are not new fields, and perhaps that is the problem. Running update tools didn't fix. Thank you so much.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 19:50.

Layout Options | Width: Wide Color: