vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Display user infos. How? (https://vborg.vbsupport.ru/showthread.php?t=315494)

TheRealso0sick 11-19-2014 12:42 AM

Display user infos. How?
 
Hi,
I want to display some user info (taken from the postbits) on a different page on my vbulletin.
I'm talking about things like postcount, user rank, reputation..

How would I go about that?

When i try to insert something like <span>{vb:raw post.postcount}</span>
I end up having an empty span element on my page.

Why is it like that?
Can somebody help me out please?

ozzy47 11-19-2014 12:45 AM

What page are you trying to display this on?

TheRealso0sick 11-19-2014 12:47 AM

On every page in the "header".
I want to add some statistics up there and I'm confused because
usually it worked like that..

ozzy47 11-19-2014 12:49 AM

No, it won't work like that, as {vb:raw post.postcount} is only available in the postbit template.

You would need to write queries for the info you want, and then register the variables to what ever template you are going to display them in.

TheRealso0sick 11-19-2014 12:52 AM

Ugh, I guess this goes far behind my knowledge.
Is there any tip you can give me or a link on how to do this?

And once again, thank you ozzy for helping out.

ozzy47 11-19-2014 01:02 AM

Actually now that I think about it, postcount is available in the header like this, {vb:raw bbuserinfo.posts}

As well as, user rank, reputation

TheRealso0sick 11-19-2014 01:11 AM

Damn, thank you!
You just saved me a lot of time

Works perfectly

ozzy47 11-19-2014 01:13 AM

Glad it's working for you.

I just had to think about it for a minute, because I remembered I added such info before, and I was pretty sure I did not add any queries. :)

TheRealso0sick 11-19-2014 01:15 AM

Got you.
I tend to think more complicated than i actually need to too, lol.

Thanks again man

ozzy47 11-19-2014 01:16 AM

Believe me, I waaay over think coding side of things all the time. :p


All times are GMT. The time now is 07:09 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.01063 seconds
  • Memory Usage 1,715KB
  • 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)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