View Full Version : How do I get , in postcounts?
Gutspiller
04-16-2003, 05:58 AM
So that when a user has 1000 posts, his post count is 1,000 not 1000?
In admin/functions.php:
Look for:
//highlight words for search engine
Add the following directly above it:
if($post[posts] >= 1000) {
$left = floor($post[posts] / 1000);
$right = $post[posts] % 1000;
$post[posts] = "$left".","."$right";
}
;)
Gutspiller
04-16-2003, 07:37 AM
rack up another tweak and polish for my forum. Thanks. Is 43,875 forum posts in my own forum a lot? LOL
You're welcome. :)
43k is small but nice. :) My forums are about 730k posts. :eek:
This should work for you until you reach 1,000,000 posts. :laugh:
filburt1
04-16-2003, 11:49 AM
Today at 03:26 AM Zzed said this in Post #2 (https://vborg.vbsupport.ru/showthread.php?postid=382826#post382826)
In admin/functions.php:
Look for:
//highlight words for search engine
Add the following directly above it:
if($post[posts] >= 1000) {
$left = floor($post[posts] / 1000);
$right = $post[posts] % 1000;
$post[posts] = "$left".","."$right";
}
;)
Or just:
$post['posts'] = number_format($post['posts']);
Gutspiller
04-28-2003, 08:00 PM
04-16-03 at 02:26 AM Zzed said this in Post #2 (https://vborg.vbsupport.ru/showthread.php?postid=382826#post382826)
In admin/functions.php:
Look for:
//highlight words for search engine
Add the following directly above it:
if($post[posts] >= 1000) {
$left = floor($post[posts] / 1000);
$right = $post[posts] % 1000;
$post[posts] = "$left".","."$right";
}
;)
I used this code, but one of my users postcount is showing up like this: "7,22" What's wrong? Should I remove this code and use the code Filburt suggestioned?
Example: http://www.theforumz.com/forumz/showthread.php?s=&postid=175659#post175659
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.