vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How to put custom profile field into postbit (https://vborg.vbsupport.ru/showthread.php?t=232855)

SuperGLS 01-12-2010 02:29 AM

How to put custom profile field into postbit
 
I'm not sure if this should be in this section or under the Template Mods section.

Basically you want to open up the postbit template.

AdminCP > Styles & Templates > Style Manager > Edit Templates > Posbit

Then search for "joindate" which will take you to the section of the postbit template that you'll want to edit.

You can choose for yourself where exactly you want to put the additional profile field information. For me I wanted it above the Join Date so find.

Code:

<vb:if condition="$post['joindate']"><dt>{vb:rawphrase join_date}</dt> <dd>{vb:raw post.joindate}</dd></vb:if>
Add above it:

Code:

<vb:if condition="$post['fieldX']"><dt>XXXXXXXXX</dt> <dd>{vb:raw post.fieldX}</dd></vb:if>
[/code]

Replace the two X's with the field number of your profile field. This information can be found by going to AdminCP > User Profile Fields > User Profile Field Manager. Make sure the number is the the field number and NOT the display number. Next, replace the information in between the <dt> tags (XXXXXXXXX) with whatever you want it to say in the Postbit.

I don't know how to use the {vb:rawphrase XXXXXX} stuff, so I just put basic text in between the <dt> tags and it worked ok.

On my forums, I wanted to add a "Car" profile field that details what kind of car each person drives. A screenshot.

https://vborg.vbsupport.ru/external/2010/01/50.png

Of course, this template usually needs to be reverted when upgrading vB, so it's not the best solution, but it works.

(Apologies if this has been posted since the release of vB4, I hadn't seen it yet).

Happiness 01-12-2010 02:55 AM

This is WICKED... I was wondering how to do this....

What I am really looking to do is to add a custom field in the postbit that would list the FORUMS a moderator leads.. that also might LINK to the forum they lead...

SuperGLS 01-12-2010 03:30 PM

I'm sure it's possible, but I don't know how to do it.

ryacine 01-14-2010 09:31 AM

Hello mates,
First of all, thank you very much for this tutorial. I have one question though:
I have a custom profile filed that is a "Multiple-Selection Menu", so this field can have several values. How can I address these values in this example "{vb:raw post.fieldX}"?
Thank you for your help.

--------------- Added [DATE]1263496357[/DATE] at [TIME]1263496357[/TIME] ---------------

Quote:

Originally Posted by ryacine (Post 1955290)
Hello mates,
First of all, thank you very much for this tutorial. I have one question though:
I have a custom profile filed that is a "Multiple-Selection Menu", so this field can have several values. How can I address these values in this example "{vb:raw post.fieldX}"?
Thank you for your help.

Can somebody help please?

SuperGLS 01-14-2010 08:01 PM

Well the post.fieldX should still have X as the field number, no matter what kind of field it is (fill in the blank, pick from a selection list, etc). However, I'm not sure what you should put between the <dt> tags.

fishmaster 01-15-2010 03:46 AM

thanks for the refresher!

SuperGLS 01-19-2010 07:54 PM

Has anyone updated to vB4.0.1 after doing this? Did you have to revert the template?

socaligurl80 01-21-2010 11:39 AM

I tried this on 4.0.1 and it isn't working.... :(

SuperGLS 01-23-2010 01:09 PM

What part of it wasn't working? What happened?

preschool 01-27-2010 11:11 PM

I also tried this on 4.0.1 & I cannot get it to work. It will allow me to do some fields, but it will not allow me to do a field with Multiple Selection Menu. Is it a different code for this?

SuperGLS 01-29-2010 01:28 AM

Yeah, like I said above, I wouldn't know what to change for that. Sorry!

Miguel86 01-29-2010 07:49 AM

Quote:

Originally Posted by ryacine (Post 1955290)
Hello mates,
First of all, thank you very much for this tutorial. I have one question though:
I have a custom profile filed that is a "Multiple-Selection Menu", so this field can have several values. How can I address these values in this example "{vb:raw post.fieldX}"?
Thank you for your help.

--------------- Added [DATE]1263496357[/DATE] at [TIME]1263496357[/TIME] ---------------


Can somebody help please?

I'm searching to do the same, i have posted to support and after waiting 2 days they said i must ask here, did you found a solution to show multiple selection value?

Thanks.

Miguel86 02-05-2010 10:07 AM

Anyone know how to do this? support say that must be asked on forums but any developer knows how to do this?

MikeF 02-09-2010 02:30 PM

There was a guy who wrote a whole custom product for custom profile fields in the postbit for 3.8. I doubt he wants to do it again for 4. Anyway, the great thing about this mod was that you could put a whole bunch of custom fields in a dropdown. I forget if it was using AJAX for the dropdown or Javascript, but eitherway, it worked great. So you could have, for example, a "car" icon or a "computer" icon, and then have those custom profile fields display in a dropdown menu.

Now we are back in the stone age until someone comes up with something as great as that add-on.

dosadno 03-27-2010 12:24 PM

Quote:

Originally Posted by socaligurl80 (Post 1962244)
I tried this on 4.0.1 and it isn't working.... :(

It did't work for me to, but when I put the code in posbit legay template it works like charm.

venom2124 03-28-2010 12:32 AM

Didn't work for 4.0.2 either.

--------------- Added [DATE]1269741986[/DATE] at [TIME]1269741986[/TIME] ---------------

okay to make it work on 4.0.2 you need to put the code in postbit_legacy.

Fuhrmann 05-20-2010 02:04 AM

Quote:

Originally Posted by Miguel86 (Post 1969617)
I'm searching to do the same, i have posted to support and after waiting 2 days they said i must ask here, did you found a solution to show multiple selection value?

Thanks.

Searching for how to do this, too...

CybaGirl 06-23-2010 11:59 AM

THANK YOU SO VERY MUCH!!!!!

You guys are so awesome!!!!!

Been trying to figure out how to do this by searching the forum all day!

In case anyone is interested I have it working on vBulletin v4.0.3 adding the code to the postbit_legacy makes it work.

So thanks heaps dosadno and venom2124 for letting others know about this.

MASSIVE THANKS TO

SuperGLS for letting everyone know how to do this originally!

https://vborg.vbsupport.ru/external/2010/06/5.gif

DanGarion 07-08-2010 08:12 PM

Thanks worked perfectly. Was wondering how to do this since it's changed from vB3.8.

Footman 07-09-2010 10:45 AM

Quote:

Originally Posted by Happiness (Post 1953237)
This is WICKED... I was wondering how to do this....

What I am really looking to do is to add a custom field in the postbit that would list the FORUMS a moderator leads.. that also might LINK to the forum they lead...

You may want to add a field to their profile which the moderator can choose or add the forum link themselves. The only thing I'm not sure about is how to limit this ONLY to your moderators. You can of course NOT make it mandatory and trust the other members to leave it blank. In any case, check out the mod https://vborg.vbsupport.ru/showthread.php?t=231260 and you should be able to adapt this process for your needs.

ascender 07-13-2010 02:00 PM

Thanks very much for this thread, very useful. Now have it working for multiple selections.

Is there any way to remove the trailing : after an entry?

Example:

<vb:if condition="$post['field5'] & 1"><dt>MdS Veteran</dt></vb:if>

Outputs:

MdS Veteran:

Also, is there any way to force a carriage return after this? At the moment the next entry "Blog Entries" just follows on from it instead of being on a new line.

Thanks!

danyol1706 10-23-2010 08:35 PM

How do I align the user fields vertically?

In my example image, the word "Orientation" is so long, that it pushes the result text slightly off-line vertically from the other ones...

http://www.gaytorium.com/images/postbit.png

vantastic 01-16-2011 09:36 AM

Thanks for this code. It's great. I had no luck initially but I found that my vBulletin was using postbit_legacy

If you are having no luck with postbit, try editing the postbit_legacy instead.

GamerUnguided 02-10-2014 07:37 AM

I know this is like Uber "Necro" but i just had to say thanks :p every time i install a new theme i open this guide just to take a look and remind myself one day i'll be able to do it without looking


All times are GMT. The time now is 07:14 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01303 seconds
  • Memory Usage 1,768KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (24)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete