Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 02-12-2008, 09:25 AM
UltraFanatics UltraFanatics is offline
 
Join Date: Dec 2007
Posts: 271
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Just a quickie

Hi all,

I have added a field 5 and 6 via VB control panel, that users have to add fill in when they register or via their control panel.

Anyway. can someone tell me how I get this to show on all their posts on the forum (below where it says joined date / number of posts etc?

I have been trying for ages but can't work out the code required and in what template.. I think its post_legacy?

Cheers
Reply With Quote
  #2  
Old 02-12-2008, 01:25 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This has been covered quite a bit in some posts lately. Search around in here and you'll see it discussed a bit. I think one of the ways to use the variable is "$vbulletin->userinfo[field6]", but I think it can be shorten.

postbit is the template that shows userinfo above the post, postbit_legacy shows the userinfo to the left of the post.
Reply With Quote
  #3  
Old 02-12-2008, 01:34 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Use $post[field5].
Reply With Quote
  #4  
Old 02-12-2008, 05:29 PM
UltraFanatics UltraFanatics is offline
 
Join Date: Dec 2007
Posts: 271
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
This has been covered quite a bit in some posts lately. Search around in here and you'll see it discussed a bit. I think one of the ways to use the variable is "$vbulletin->userinfo[field6]", but I think it can be shorten.

postbit is the template that shows userinfo above the post, postbit_legacy shows the userinfo to the left of the post.
It only shows Field6 when I tried this?

Quote:
Originally Posted by Boofo View Post
Use $post[field5].
This works but only shows the users text not the question too?

IE- I want it like this

Support: England (users answer)

It was only showing England, not the support bit?

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

Think I have it working as this, although looks rather long lol

<if condition="$post['field5']"><div>$vbphrase[Support_perm]Support: $post[field5]</div></if>
Reply With Quote
  #5  
Old 02-12-2008, 05:54 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You got it, sir.

If this phrase (Support_perm) is the word support you don't need that word in there too.
Reply With Quote
  #6  
Old 02-12-2008, 05:57 PM
UltraFanatics UltraFanatics is offline
 
Join Date: Dec 2007
Posts: 271
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can I delete (Support_perm) then or just support so it shows (perm)
Reply With Quote
  #7  
Old 02-12-2008, 06:00 PM
PaulSonny PaulSonny is offline
 
Join Date: Dec 2006
Location: Middlesbrough, UK
Posts: 433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would just put this:

Quote:
Support: $post[field5]
Thanks, Paul.
Reply With Quote
  #8  
Old 02-12-2008, 06:02 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What is thre phrase Support_perm? If it is the word Support, take the word out so you can keep it language editable. Like this:

<if condition="$post['field5']"><div>$vbphrase[Support_perm]: $post[field5]</div></if>

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

Quote:
Originally Posted by PaulSonny View Post
I would just put this:



Thanks, Paul.
I disagree as you should always use phrases where you can. That makes editing them for different languages easier or if you just want to change the wording of it sometime.
Reply With Quote
  #9  
Old 02-12-2008, 08:28 PM
UltraFanatics UltraFanatics is offline
 
Join Date: Dec 2007
Posts: 271
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo View Post
What is thre phrase Support_perm? If it is the word Support, take the word out so you can keep it language editable. Like this:

<if condition="$post['field5']"><div>$vbphrase[Support_perm]Support: $post[field5]</div></if>
If I don't write the highlighted section then it doesn't show on the page.
Reply With Quote
  #10  
Old 02-12-2008, 09:17 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I'll ask one more time, what is this? Support_perm. That phrase, what does it say?
Reply With Quote
Reply

Thread Tools
Display Modes

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 01:38 AM.


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.04828 seconds
  • Memory Usage 2,248KB
  • 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
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete