vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   Using your User Profile Fields in your postbit templates (w/ all plugin method) (https://vborg.vbsupport.ru/showthread.php?t=250418)

steve-iv 07-03-2011 09:11 AM

Hi guys,

just have a question regarding to display a phrase in my profile field

Let's say i created field9 -> and a language dependend title in field9_title.

Now I edited the postbitlegacy template:

Code:

<vb:if condition="$post[field9]">
<dt>{vb:rawphrase field9_title}</dt>
<dd>{vb:raw post.field9}</dd>
</vb:if>

The problem is, post.field9 is working. Now I want to display the content of the phrase variable called field9_title.

But why is vb:rawphrase not working with field9_title? And what can I do to get it working?

And why is vbphrase not working?

Thanks!

Lynne 07-03-2011 04:08 PM

You need to create a plugin to add that phrasegroup to the page. The plugin is shown in the first post.

(Sorry, I'm stuck on dialup right now and not going to go look it up and post it again.)

Nerror 07-12-2011 06:10 AM

This is great and just what I was looking for, thanks. :)

One question though, how do I add commas for the multi-selection fields?

I used method 1 and have this code, which works:
Code:

<vb:if condition="$post['field5']"><dt>Spil</dt><dd>
<vb:if condition="$post['field5'] & 1">Ingen</vb:if>
<vb:if condition="$post['field5'] & 2">WoW</vb:if>
<vb:if condition="$post['field5'] & 4">SWTOR</vb:if>
<vb:if condition="$post['field5'] & 8">Rift</vb:if>
<vb:if condition="$post['field5'] & 16">Andet</dd>
</vb:if>

and I tried modifying the code from here to vBulletin 4.x but I am not a coder at all, so adding commas didn't work. :p

Any help much appreciated!

kdog316 12-10-2011 06:42 AM

works great but is there a reason if you see in the second post it doesnt show the label for the fields after making a post until I refresh the page. Also announcements never show the labels.

https://vborg.vbsupport.ru/external/2011/12/44.jpg

I went with the more advanced method of inserting this stuff

Ramsesx 01-19-2012 09:25 AM

A nice tutorial Lynne, thanks.

michelle86 03-11-2012 07:59 PM

Thank you thank you thank you! 5 stars!

EasyEazy 04-01-2012 02:26 AM

Great work

Thanks

michaelbang 04-16-2012 02:22 PM

I'm struggeling to get my new profilefield right under the username. I've read the previous post about it, but still can't figure out where to your code <vb:if condition="$post['fieldx']"><dt>My FieldX</dt> <dd>{vb:raw post.fieldx}</dd></vb:if>.

Is it in postbit or postbit legacy? And exactly where do I put it? I've tried several places, with no succes.

Thanks a million. :)

Lynne 04-16-2012 03:32 PM

Do you have your userinfo on top of the post (postbit) or on the left side of the post (postbit_legacy)? That determines which template to edit.

Tri@de 06-08-2012 02:16 PM

There's a way to use profile fields also in other pages like cms articles?


All times are GMT. The time now is 07:38 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.01340 seconds
  • Memory Usage 1,733KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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