vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Just a quickie (https://vborg.vbsupport.ru/showthread.php?t=170298)

UltraFanatics 02-12-2008 09:25 AM

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

Lynne 02-12-2008 01:25 PM

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.

Boofo 02-12-2008 01:34 PM

Use $post[field5].

UltraFanatics 02-12-2008 05:29 PM

Quote:

Originally Posted by Lynne (Post 1441440)
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 (Post 1441448)
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>

Boofo 02-12-2008 05:54 PM

You got it, sir. ;)

If this phrase (Support_perm) is the word support you don't need that word in there too.

UltraFanatics 02-12-2008 05:57 PM

Can I delete (Support_perm) then or just support so it shows (perm)

PaulSonny 02-12-2008 06:00 PM

I would just put this:

Quote:

Support: $post[field5]
Thanks, Paul.

Boofo 02-12-2008 06:02 PM

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 (Post 1441614)
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.

UltraFanatics 02-12-2008 08:28 PM

Quote:

Originally Posted by Boofo (Post 1441616)
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.

Boofo 02-12-2008 09:17 PM

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


All times are GMT. The time now is 12:19 AM.

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.01114 seconds
  • Memory Usage 1,731KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete