vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Add commas to replycounts, thread views, etc (https://vborg.vbsupport.ru/showthread.php?t=51638)

N9ne 04-15-2003 08:55 PM

And also for post counts, in postbit and member list :D

N9ne 04-15-2003 09:12 PM

For post counts in postbit, put this code anywhere in the buildpostbit function in functions.php

$post[posts]=number_format($post[posts]);

N9ne 04-15-2003 09:15 PM

And for memberlist post counts:

memberlist.php, find:

$userinfo[datejoined]=vbdate($dateformat,$userinfo[joindate]);

Below it, add:

$userinfo[posts]=number_format($userinfo[posts]);

Done.

Thanks for the hack Tigga :)

Logik 04-15-2003 10:15 PM

Nice addition. :)

VAN 05-04-2003 08:20 PM

Doh! Found another...

To add this to the post counts in a users profile,

In member.php find:

$userinfo[datejoined]=vbdate($dateformat,$userinfo[joindate]);

Below that, add:

$userinfo[posts]=number_format($userinfo[posts]);

Thanks for the "mini-hack", Tigga.

::installs original + everyones add-ons::

Boofo 05-04-2003 09:05 PM

Tigga, in your instructions, shouldn't this:

PHP Code:

Now open usercp.php AND member2.php and look for:

$replies=$thread[replycount];
$views=$thread[views];


Change that to (in both files):

$thread[replycount]=number_format($thread[replycount]);
$thread[views]=number_format($thread[views]); 

actually be this:

PHP Code:

Now open usercp.php AND member2.php and look for:

$replies=$thread[replycount];
$views=$thread[views];


Change that to (in both files):

$replies=number_format($thread[replycount]);
$views=number_format($thread[views]); 


Tigga 05-04-2003 10:13 PM

Bofo - No, actually the code you're looking for in those 2 files is useless. The $replies and $views variables aren't used anywhere in the templates, so I'm not sure why the code is even there in the first place (other than the devs forgot to remove it). That's why I figured it best to trade out that code for something a little more useful. ;)

Boofo 05-04-2003 10:53 PM

I just checked the templates. You're right. I don't see those anywhere at all. Thanks for clearing that up. ;)

BTW: It's Boofo, not Bofo. ;)

Tigga 05-04-2003 10:57 PM

No problem at all. I thought it was kinda strange that the code was in there as well and made sure it wasn't used anywhere first. Maybe they were planning on using the number_format tags at first and forgot about it? Who knows...
Sorry about the typo in your name. Guess I was typing a little too fast. ;)

Boofo 05-04-2003 11:10 PM

I would tend to believe it is just forgotten code. ;)

BTW: Did you get the pm I sent you?


All times are GMT. The time now is 05:16 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.01180 seconds
  • Memory Usage 1,735KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete