vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Adding Comas to user postcounts, threadcounts and forum reply counts (https://vborg.vbsupport.ru/showthread.php?t=48271)

Platinumgamer 01-29-2003 02:40 AM

Adding Comas to user postcounts, threadcounts and forum reply counts
 
Hi,

I'm looking for a way to add comas to my users' postcounts and to my forums thread and reply counts(IE: 1,000 instead of 1000). I know it's done by filehacking as I was told this over at vB.com, so if someone could help me figure out how this is done, I'd be very appreciative.

Thanks for any help!

Logician 01-29-2003 09:26 AM

I dont know what version you are running but it already exists in my 2.2.6..

You can either upgrade or apply this fix:

edit index.php, find:
PHP Code:

$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread'); 

after that add:
PHP Code:

$numbermembers=number_format($numbersmembers['users']);
$totalposts=number_format($countposts['posts']);
$totalthreads=number_format($countthreads['threads']); 

however if your board is too old I dont know if variable names will match.. If not simply replace the names in the template with these:
$numbermembers
$totalposts
$totalthreads

Logician 01-29-2003 09:28 AM

oh sorry I guess I understand you wrongly? Which count in which page did you mean?

Platinumgamer 01-29-2003 12:11 PM

I'm currently running 2.2.9;)

The counts I'm referring to are the Replies and Threads numbers shown on the forumhome and the number of posts a user has(if possible)

Thanks!

Platinumgamer 01-30-2003 12:38 AM

Sorry for bumping this, but I really would like this hack if possible...

:o

mr e 01-30-2003 02:18 AM

so do the same thing only to the different variables on the page you want

Logician 01-30-2003 09:19 AM

I guess what you want is this:

edit index.php, find:

PHP Code:

        eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$tempext")."\";"); 

Replace it as:
PHP Code:

$forum[threadcount]=number_format($forum[threadcount]);
$forum[replycount]=number_format($forum[replycount]);
        eval(
"\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$tempext")."\";"); 

Enjoy..

Platinumgamer 01-30-2003 08:34 PM

Thanks Logician, it worked perfectly! :):)


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