A combination of a couple of hacks and a fix for the error when there are no posts on the entire board: by kreft
Total Threads And Percentage Of Total Posts & Threads In Users Profile
A combination of User's Percent of Total Posts by apfeifer &
User Has Started X Threads by tubedogg
member.php
FIND:
PHP Code:
if ($userinfo[customtitle]==2)
$userinfo[usertitle] = htmlspecialchars($userinfo[usertitle]);
$userinfo[datejoined]=vbdate($dateformat,$userinfo[joindate]);
ADD this after:
PHP Code:
$startcount = $DB_site->query_first("SELECT COUNT(title) AS starts FROM thread WHERE postusername='$userinfo[username]' AND open!='10'");
$starts = $startcount[starts];
$countposts=$DB_site->query_first('SELECT COUNT(*) AS posts FROM post');
$totalposts=$countposts['posts'];
if ($totalposts == 0) { $totalposts=$totalposts + 1; }
$percentoftotalposts = round(($userinfo[posts] / $totalposts) * 100,2);
$counttotalthreads=$DB_site->query_first('SELECT count(*) AS threads FROM thread');
$totalthreads=$counttotalthreads['threads'];
if ($totalthreads == 0) { $totalthreads=$totalthreads + 1; }
$percentageoftotalthreads = round(($starts / $totalthreads) * 100,2);
getinfo template
FIND:
<tr>
<td bgcolor=""><normalfont><b>Total Posts:</b></normalfont></td>
<td bgcolor=""><normalfont>$userinfo[posts]($postsperday posts per day)</normalfont></td>
</tr>
ADD this after:
<tr>
<td bgcolor=""><normalfont><b>Total Threads:</b></normalfont></td>
<td bgcolor=""><normalfont>$starts</normalfont></td>
</tr>
<tr>
<td bgcolor=""><normalfont><b>Percent of Total Posts & Threads:</b></normalfont></td>
<td bgcolor=""><normalfont>$percentoftotalposts% of total posts | $percentageoftotalthreads% of total threads</normalfont></td>
</tr>