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?


All times are GMT. The time now is 04:13 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.01243 seconds
  • Memory Usage 1,736KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete