vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Member number in profile (https://vborg.vbsupport.ru/showthread.php?t=279450)

I.G.O.T.A. 03-02-2012 08:16 PM

Member number in profile
 
Is there any way to add a the member number of the user to their profile. Say a member signs up and is 301 can you add that somewhere in his profile?

Lynne 03-03-2012 05:15 PM

You would need to do it manually, like in a template edit. Depending on which template you add it to, it's probably either {vb:raw userinfo.userid} or {vb:raw prepared.userid}

I.G.O.T.A. 03-07-2012 02:52 AM

I tried this and it don't work. Any ideas.

<vb:if condition="$post['membernumber']"><dt>{vb:rawphrase member_number}</dt> <dd>{vb:raw post.userid}</dd></vb:if>

cellarius 03-07-2012 08:26 AM

In profile you need to use prepared.userid, not post.userid (which is for postbit).

I.G.O.T.A. 03-07-2012 02:50 PM

So like this? I tried it and it don't work.

<vb:if condition="$post['membernumber']"><dt>{vb:rawphrase member_number}</dt> <dd>{vb:raw prepared.userid}</dd></vb:if>

Lynne 03-07-2012 05:03 PM

As Cellarius said, $post is not a valid variable there. What is $post[membernumber] supposed to be? Don't you mean something more like $prepared['userid']?

I.G.O.T.A. 03-07-2012 05:12 PM

I think I'm a tard, lol. So how would I write that to get it to worK?

Lynne 03-07-2012 05:25 PM

Maybe something like:

<vb:if condition="$prepared['userid']"><dt>{vb:rawphrase member_number}</dt> <dd>{vb:raw prepared.userid}</dd></vb:if>

Have you even tried it without the condition to see if that part is correct?

I.G.O.T.A. 03-07-2012 05:41 PM

I just tried it and it didn't work. Pulling my hair out, lol.

TheLastSuperman 03-07-2012 05:58 PM

Try...

Code:

<vb:if condition="$prepared['userid']"><dt>{vb:rawphrase member_number}</dt> <dd>{vb:raw userinfo.userid}</dd></vb:if>
Of course you must manually add the phrase I see in the code i.e. member_number before the <dt> part of the code will display but we use userinfo.userid as it picks up the members profile number your viewing instead of bbuserinfo.userid as that would show you YOUR number when viewing their profile = no good.

Edit: Yeap and to confirm, it's what Lynne mentioned above in post #2.


All times are GMT. The time now is 01:17 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.00996 seconds
  • Memory Usage 1,728KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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