vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Display Users Points (https://vborg.vbsupport.ru/showthread.php?t=63061)

Mike Cout 03-28-2004 12:06 PM

Display Users Points
 
Hello,
I am currently working on a hack and I have been unsuccessful in figuring out how to display each users pointtotal in the postbit.

I have added "points" to the users in the database, I am unable to properly sort the information and send it out to the postbit.

If anyone could help me with this or put me on the right track I would be very grateful.

Thank You,
-mc

Boofo 03-28-2004 02:07 PM

Is it you can't pull the info it from the db or you are getting a query for each post on the page?

Mike Cout 03-28-2004 02:11 PM

I don't know how to pull in the info for each individual user. I would like to keep it to one query and pull all the info from that.

I tried looking at how VB displays the postcount but I did not understand it. Would like it to run it like that.

Boofo 03-28-2004 02:26 PM

Maybe something like this?

PHP Code:

$yourcount $DB_site->query_first("
    SELECT points AS points
    FROM " 
TABLE_PREFIX "user
    WHERE userid='"
.$post[userid]."'
"
);
    
$postpoints $yourcount['points']; 


Mike Cout 03-28-2004 02:35 PM

Trying to get it to work in functions_showthread. Would that be the wrong place?

Boofo 03-28-2004 02:40 PM

Instead of running that query, try this instead. Add this to the postbit where you want the points to show up.

HTML Code:

$post[points]
Let me know what happens. ;)

Mike Cout 03-28-2004 02:47 PM

YES! It worked!!

Thank you so much!!!

-mc

Boofo 03-28-2004 02:53 PM

Ok, for future reference. Anything you add to the user table can be done just like that for the postbit from now on. And assassingod is the one to thank for this. I learned sonmething right along with you this time. ;)

Enjoy! ;)


All times are GMT. The time now is 01:22 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.01045 seconds
  • Memory Usage 1,723KB
  • 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_html_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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