<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — Number Formating]]></title>
		<link>https://punbb.informer.com/forums/topic/7347/number-formating/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/7347/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Number Formating.]]></description>
		<lastBuildDate>Sun, 01 May 2005 20:37:12 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Number Formating]]></title>
			<link>https://punbb.informer.com/forums/post/42165/#p42165</link>
			<description><![CDATA[<p>nice touch, i&#039;ll give a try later <img src="https://punbb.informer.com/forums/img/smilies/tongue.png" width="15" height="15" alt="tongue" /></p>]]></description>
			<author><![CDATA[null@example.com (Reines)]]></author>
			<pubDate>Sun, 01 May 2005 20:37:12 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/42165/#p42165</guid>
		</item>
		<item>
			<title><![CDATA[Number Formating]]></title>
			<link>https://punbb.informer.com/forums/post/42163/#p42163</link>
			<description><![CDATA[<p>This Mod was built in PunBB 1.2.5 but should work in most versions, it can be easily modified.<br />I noticed PunBB wasn&#039;t putting commas in the right spot, so I decided to do a little Modification.</p><p>For example, if the forums has &quot;5098&quot; posts in total, PunBB will display &quot;5098&quot;. With these modifications it will display &quot;5,098&quot;.<br />Please take note that not all servers support the number_format(); command, backup before making any modifications.<br />Interesting so far?</p><p>Alright so open up index.php and search for:<br /></p><div class="codebox"><pre><code>&lt;div id=&quot;brdstats&quot; class=&quot;block&quot;&gt;
&lt;h2&gt;&lt;span&gt;&lt;?php echo $lang_index[&#039;Board info&#039;] ?&gt;&lt;/span&gt;&lt;/h2&gt;</code></pre></div><p>Right over, add:<br /></p><div class="codebox"><pre><code>&lt;?php
$total_users = number_format($stats[&#039;total_users&#039;]);
$total_topics = number_format($stats[&#039;total_topics&#039;]);
$total_posts = number_format($stats[&#039;total_posts&#039;]);
?&gt;</code></pre></div><p>Now, find:<br /></p><div class="codebox"><pre><code>&lt;dd&gt;&lt;?php echo $lang_index[&#039;No of users&#039;].&#039;: &lt;strong&gt;&#039;. $stats[&#039;total_users&#039;] ?&gt;&lt;/strong&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;?php echo $lang_index[&#039;No of topics&#039;].&#039;: &lt;strong&gt;&#039;.$stats[&#039;total_topics&#039;] ?&gt;&lt;/strong&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;?php echo $lang_index[&#039;No of posts&#039;].&#039;: &lt;strong&gt;&#039;.$stats[&#039;total_posts&#039;] ?&gt;&lt;/strong&gt;&lt;/dd&gt;</code></pre></div><p>And replace with:<br /></p><div class="codebox"><pre><code>&lt;dd&gt;&lt;?php echo $lang_index[&#039;No of users&#039;].&#039;: &lt;strong&gt;&#039;. $total_users ?&gt;&lt;/strong&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;?php echo $lang_index[&#039;No of topics&#039;].&#039;: &lt;strong&gt;&#039;.$total_topics ?&gt;&lt;/strong&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;?php echo $lang_index[&#039;No of posts&#039;].&#039;: &lt;strong&gt;&#039;.$total_posts ?&gt;&lt;/strong&gt;&lt;/dd&gt;</code></pre></div><p>Here we go that&#039;s it! You can do the same thing in viewtopic for posts of users.</p><p>Footers look much more interesting now heh?</p><p>Now, if any french coders are around here, the right french display would be &quot;5 098&quot; and not &quot;5098&quot; or &quot;5,098&quot;.<br />In order to do that you would need to use the following:<br /></p><div class="codebox"><pre><code>&lt;?php
$total_users = number_format($stats[&#039;total_users&#039;], 0, &#039;,&#039;, &#039; &#039;);
$total_topics = number_format($stats[&#039;total_topics&#039;], 0, &#039;,&#039;, &#039; &#039;);
$total_posts = number_format($stats[&#039;total_posts&#039;], 0, &#039;,&#039;, &#039; &#039;);
?&gt;</code></pre></div><p>- ultime</p>]]></description>
			<author><![CDATA[null@example.com (ultime)]]></author>
			<pubDate>Sun, 01 May 2005 20:07:54 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/42163/#p42163</guid>
		</item>
	</channel>
</rss>
