vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   help with postbit / postbit_legacy upload stats hack (https://vborg.vbsupport.ru/showthread.php?t=77768)

Joe Pimms 03-09-2005 05:08 AM

help with postbit / postbit_legacy upload stats hack
 
1 Attachment(s)
hello im haveing a problem with is code :

PHP Code:

$usernumUploads $DB_site->query_first("select count(*) as `uploaded` from ".TABLE_PREFIX."attachment where userid={$bbuserinfo['userid']}"); 

here is the template mod:
PHP Code:

look for under postbit postbit_legacy:
<
div>
$vbphrase[posts]: $post[posts]
</
div>

add under:

<
div>
MY Files Uploaded$usernumUploads
</div

what im wanting to do is display under postbit template the total number of attachments a user has uploaded to my site. now when when i run this i get it saying "Array" why is that ?

im wanting a real count not like the other user stats hacks on here please help

please see error of pic

thanks

tgillespie 03-09-2005 07:14 AM

<a href="http://us3.php.net/array" target="_blank">http://us3.php.net/array</a>

Count the values in the array.

Marco van Herwaarden 03-09-2005 08:16 AM

PHP Code:

MY Files Uploaded$usernumUploads 

should be:
PHP Code:

MY Files Uploaded$usernumUploads['uploaded'


Joe Pimms 03-09-2005 11:22 AM

Quote:

Originally Posted by MarcoH64
PHP Code:

MY Files Uploaded$usernumUploads 

should be:
PHP Code:

MY Files Uploaded$usernumUploads['uploaded'


this did not work

Colin F 03-09-2005 02:49 PM

Quote:

Originally Posted by Joe Pimms
this did not work

I'd have said the same as Marcoh64

Zachery 03-09-2005 03:01 PM

Where is that query being run?

What file?

Joe Pimms 03-09-2005 07:31 PM

this is being run on "functions_subscriptions.php" unless its the wrong file to edit ?

p.s.
sorry i was at work im now finished and im back now


All times are GMT. The time now is 09:03 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.01076 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
  • (6)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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