I tried to install this and I got a parse error because of another hack I have installed. Is the following basically the same hack?
Code:
### Open member.php
### Find
if ($userinfo[customtitle]==2)
$userinfo[usertitle] = htmlspecialchars($userinfo[usertitle]);
$userinfo[datejoined]=vbdate($dateformat,$userinfo[joindate]);
### After That Add
// Total Thread Views
$boardviews = $DB_site->query_first("SELECT SUM(views) AS totalviews FROM thread");
$totalviews = $boardviews['totalviews'];
$countviews=$DB_site->query_first("SELECT SUM(views) AS views FROM thread WHERE postuserid='$userinfo[userid]'");
$myviews= $countviews['views'];
$percentofmyviews = round(($myviews / $totalviews) * 100,2);
### Close member.php
### Login to your control panel
### Go to Templates -> Modify -> [expand list] -> User Info Display Templates [expand] -> getinfo [change original]
### Find In That Template
any place and add the code:
$percentofmyviews% of total views
### Done in the control panel
Quote:
Originally posted by Gamingforce
I have been using this on my message board community for a while, but haven't seen a public hack out for it. This hack allows you to see what percent of all thread views made were threads started by that particular user. Very easy to install. Enjoy!
For a demo, check a profile on my board:
http://www.gamingforce.com/forums/me...tinfo&userid=1
(It's under activity summary)
File to edit: member.php
Template to edit: getinfo
Tested on vBulletin 2.0.3 - 2.2.4.
|