Author |
Topic |
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 17 July 2003 : 12:11:28
|
Nikkol,
just a question ; I want to create a page called 'All recent viewed topics', which shows the fir instance last 20 viewed topics. I want to show the following columns: Membername | Topic subject | Time viewed, sorted by time.
I tried to come up with something, but I just cannot seem to get it right. I suspect it to be verrrry simple however...
You might want to try it ?
I've come up with this now: edited : béta of admin_recentviews.asp available... http://www.opzolder.net/portal/uploaded/marcelg/admin_recentviews.zip
|
portfolio - linkshrinker - oxle - twitter |
Edited by - MarcelG on 20 July 2003 16:36:56 |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 18 July 2003 : 04:22:56
|
btw, nikkol; just a tip; I slightly modded the your code in forum.asp ; instead of allways showing the binoculars; only show them when the topic is actually read.
So, simply add if Topic_ViewCount <> 0 then in front, and end if behind it, so it looks like this:
sub TopicAdminOptions()
'===================================WHO READ MOD===================================
if Topic_ViewCount <> 0 then
Response.Write " <a href=""who_read.asp?" & ArchiveLink & "method=bytopic&FORUM_ID="
& Forum_ID & "&TOPIC_ID=" & Topic_ID & """>"
& getCurrentIcon(strIconWhoRead,"Who Read Topic","hspace=""0""") & "</a>" & vbNewLine
end if
'================================================================================
In green your code, in red my small addition. |
portfolio - linkshrinker - oxle - twitter |
Edited by - MarcelG on 18 July 2003 04:24:07 |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 18 July 2003 : 17:21:13
|
marcelgoertz, thanks for the code suggestion. also, do me a favor and remind me to look at what you've done later. i've been out of town for a few days, so i need to catch up on some posts first. |
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
|
|
eauxvives
Junior Member
Bhutan
145 Posts |
Posted - 19 July 2003 : 05:54:48
|
thanks for this great mod! worked perfectly for me. I liked the fact that it is viewable only by admins |
|
|
richfed
Average Member
United States
999 Posts |
|
Nikkol
Forum Moderator
USA
6907 Posts |
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 19 July 2003 : 19:21:06
|
Add the red part on line 95 of who_read.asp: strSql = "SELECT C.CAT_ID, C.CAT_NAME, F.F_SUBJECT, C.CAT_STATUS, F.F_STATUS FROM
Add the red lines after line 101: Forum_Subject = rsFProp(2) <--line 101 Cat_Status = rsFProp(3) Forum_Status = rsFProp(4) rsFProp.close[/code] |
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
Edited by - Nikkol on 19 July 2003 19:21:29 |
|
|
jfitz
Junior Member
USA
345 Posts |
Posted - 19 July 2003 : 23:51:42
|
Nikkol, do you have any feel for how much additional processing load this mod puts on the system? With each mod I add, it seems that my page build time is creeping up. I think this would be a very valuable mod, but I'm wondering about the overhead. |
--Jördan It's a wasted day if you don't spend at least part of it flying upside down. |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 20 July 2003 : 00:44:36
|
I have no idea really. You could check to see the page load time with and without the MOD as a comparison. I haven't done that myself though. |
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
|
|
eauxvives
Junior Member
Bhutan
145 Posts |
Posted - 20 July 2003 : 03:18:05
|
Suggestion: would it be possible to display the number of guests (not members) who also viewed the topic?, or is it too complicated? |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 20 July 2003 : 03:34:59
|
probably not complicated, just not how this mod works. this mod records the last date/time that a user read a topic. so if you tried to do that for a guest, all you'd get is the last date/time a guest read the topic (not the number of guests). |
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
richfed
Average Member
United States
999 Posts |
Posted - 20 July 2003 : 07:00:28
|
quote: Originally posted by Nikkol
Add the red part on line 95 of who_read.asp: strSql = "SELECT C.CAT_ID, C.CAT_NAME, F.F_SUBJECT, C.CAT_STATUS, F.F_STATUS FROM
Add the red lines after line 101: Forum_Subject = rsFProp(2) <--line 101 Cat_Status = rsFProp(3) Forum_Status = rsFProp(4) rsFProp.close[/code]
That did it!
Thanks! |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 20 July 2003 : 16:30:16
|
Nikkol, I have finished a béta of the addition "Recently Viewed Topics". It can be downloaded for comments and improvements here : http://www.opzolder.net/portal/uploaded/marcelg/admin_recentviews.zip.
I've modded INC_HEADER.ASP, and included the following:
if mlev > 3 then
Response.Write " <font face=""Symbol"" color=""#cc0000""> · </font>" & vbNewline & _
" <a href=""admin_recentviews.asp""" & dWStatus("List recently read topics") & vbNewline & _
" tabindex=""-1""><acronym title=""List recently read topics"">Recent Reads</acronym></a>" & vbNewline
end if
The page is/should only be accessible for (all) mod's and admins.
It's not working as I want it to work, because I notice that the number of listed recent views does not allign with the number of entries in the tables. (I now have 120 entries in the table, and it only lists 106...) I suspect something to be wrong in the SQL statement. I 'ripped' it from the code you used in pop_profile.asp, and removed the 'Where member_id = rt_member_id' and some other things. |
portfolio - linkshrinker - oxle - twitter |
Edited by - MarcelG on 20 July 2003 16:33:07 |
|
|
Topic |
|