View Full Version : Show the amount of threads a user has viewed
Issvar
03-25-2002, 10:00 PM
Simple hack but it was requested on the request forum.
Anytime a user is logged in and views a thread it will increase the threadcounter by one. Ofcourse if you want to be sure not to miss any thread views turn off guest access.
Comments are welcome.
frozt
03-26-2002, 08:22 PM
Great! And Thanks Again!
Issvar
03-26-2002, 08:41 PM
In case you still want to view it in profiles as well, find: <tr>
<td bgcolor="#1C5780"><normalfont><b>Total Posts:</b></normalfont></td>
<td bgcolor="#1C5780"><normalfont>$userinfo[posts] ($postsperday posts per day)</normalfont></td>
</tr>
And add after that:
<tr>
<td bgcolor="#1C5780"><normalfont><b>Total Views:</b></normalfont></td>
<td bgcolor="#1C5780"><normalfont>$userinfo[views]</normalfont></td>
</tr>
This has already been added to the hack text file, so no need to do this if you downloaded after this was posted.
Xanthine
03-26-2002, 08:56 PM
:) nice 1
Recluse
03-27-2002, 04:49 AM
works great on 2.2.2 thanks
Jawelin
03-27-2002, 07:23 AM
Does it require an extra query ? Where ?
Thanks a lot... Is there any screenshot ?
Issvar
03-27-2002, 07:45 AM
Stupid me, it does require a query, it ofcourse has to update the views. So one more (very simple) query per thread viewed.
As for output, it writes Views: 12345 beneath Posts: 4321 in threads and profile.
Views means how many threads that user saw while logged in since the hack is installed.
A screenshot of the Views line added in the profile is attached.
Issvar
03-27-2002, 07:47 AM
And a screenshot in the forum (24KB). The screenshot above is 11KB
Jawelin
03-27-2002, 08:23 AM
Thanks a lot.
Very cool even your UserCP interface... do you 'release' it in Template forum ? ;)
Thanks again. I'll install it ASAP.
Bye
Issvar
03-27-2002, 08:57 AM
I edited my reply about queries, it's not released as template hack as it requires a file change and a database change as well.
Admin
03-27-2002, 08:59 AM
This hack shows the amount of times a user viewed a thread, not the amount of threads a user has viewed. :)
Jawelin
03-31-2002, 08:57 PM
Originally posted by Jawelin
Thanks a lot.
Very cool even your UserCP interface... do you 'release' it in Template forum ? ;)
Bye
No, sorry. I was explained not too well... ;)
I meant I liked very much your UserCP look'n'feel... and asked if u had/would 'released' some tip to create something like in the Template forum of vb.org....
I know this hack need code modification (i asked for queries, do you remember? :nervous: ) so it's of course a Full Release hack...
Excuse me for having generated a misunderstanding.
Thanks.
o0oKARo0o
05-12-2002, 03:39 AM
Still quite interesting hack, thanks anyway ;)
wolfe
10-13-2002, 01:39 PM
thanx d00d :D
Kars10
11-05-2002, 10:33 AM
Cool Hack. Ive modified it a bit to work on forumhome. Thanks a lot!!
* Minifreunde klicks install!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.