Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-12-2010, 02:29 AM
SuperGLS SuperGLS is offline
 
Join Date: Nov 2004
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.



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).
Reply With Quote
  #2  
Old 01-12-2010, 02:55 AM
Happiness Happiness is offline
 
Join Date: Nov 2009
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #3  
Old 01-12-2010, 03:30 PM
SuperGLS SuperGLS is offline
 
Join Date: Nov 2004
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm sure it's possible, but I don't know how to do it.
Reply With Quote
  #4  
Old 01-14-2010, 09:31 AM
ryacine ryacine is offline
 
Join Date: May 2007
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 View Post
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?
Reply With Quote
  #5  
Old 01-14-2010, 08:01 PM
SuperGLS SuperGLS is offline
 
Join Date: Nov 2004
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 01-15-2010, 03:46 AM
fishmaster fishmaster is offline
 
Join Date: Nov 2006
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for the refresher!
Reply With Quote
  #7  
Old 01-19-2010, 07:54 PM
SuperGLS SuperGLS is offline
 
Join Date: Nov 2004
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anyone updated to vB4.0.1 after doing this? Did you have to revert the template?
Reply With Quote
  #8  
Old 01-21-2010, 11:39 AM
socaligurl80 socaligurl80 is offline
 
Join Date: Jan 2010
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried this on 4.0.1 and it isn't working....
Reply With Quote
  #9  
Old 01-23-2010, 01:09 PM
SuperGLS SuperGLS is offline
 
Join Date: Nov 2004
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What part of it wasn't working? What happened?
Reply With Quote
  #10  
Old 01-27-2010, 11:11 PM
preschool preschool is offline
 
Join Date: Jan 2010
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 11:36 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04370 seconds
  • Memory Usage 2,256KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete