vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Adding Referral Count to User Stats (https://vborg.vbsupport.ru/showthread.php?t=45557)

Erwin 11-11-2002 08:26 PM

Did you paste that in the right place? Your error message does not correlate with the query.

NTLDR 11-11-2002 08:40 PM

You need to make sure you have $DB_site listed with the globals at the top of the buildpostbit function.

Erwin 11-11-2002 08:51 PM

Do this:

In functions.php -

Find:

PHP Code:

// ###################### Start buildpostbit ####################### 

Underneath, add:

PHP Code:

global $DB_site 

Like I said, this is usually not done because you don't want to add 1 query per post per thread. But you wanted it.

esawdust 11-12-2002 12:10 AM

Quote:

Parse error: parse error, expecting `','' or `';'' in /public_html/forums/admin/functions.php on line 59

Fatal error: Call to undefined function: getuserinfo() in /public_html/forums/admin/sessions.php on line 365
Well :) ... I added the additonal piece of code as stated and it gave me the above errors. I also double checked the original code and all is in the locations you specified.

My intent for the count was to promote refers through a points/awards system. At 10 referal they can earn something, 25 points... and so on. I wanted to display it within the user stats to entice a competitive spirit :)

Maybe there's a better way of doing this?

Thanks again!

Greg

NTLDR 11-12-2002 06:14 PM

Make sure theres a ; on the end, ie:

PHP Code:

global $DB_site


esawdust 11-12-2002 06:55 PM

Quote:

Fatal error: Call to a member function on a non-object in /public_html/forums/admin/functions.php on line 230
:) Back down to one error .....

Greg

esawdust 11-12-2002 07:02 PM

I tried this with the first bit of code Erwin posted as well.. didn't work. Although there are no errors and everything works fine... just no referrals #

Greg

xXoOmegaoXx 01-28-2003 10:42 PM

did you paste "Referrals : #$referals;"?

IF you did, you ARE supposed to take out the pound (#) symbol ;)

Dean C 01-29-2003 03:24 PM

That's irrelevant buddy ^ the # is just what will apeare in the postbit template so it will like this:

PHP Code:

Referrals#4 

- miSt


All times are GMT. The time now is 01:42 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.01843 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
  • (4)bbcode_php_printable
  • (2)bbcode_quote_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
  • (9)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