Link to the mod (https://custom.simplemachines.org/index.php?mod=4060)
This is a fork of the original mod by [SiNaN] (http://www.simplemachines.org/community/index.php?action=profile;u=118168) - http://www.simplemachines.org/community/index.php?topic=251656.msg1629997#msg1629997
Changes:
- 1.1.x support removed
- Hits are no longer grouped by member
https://github.com/live627/smf-topic-view-log
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.creativecommons.org%2Fl%2Fby-nc-sa%2F3.0%2F88x31.png&hash=be27368905a4a8052533722bf679594f2501899d) (http://creativecommons.org/licenses/by-nc-sa/3.0/)
QuoteHits are no longer grouped by member
Isn't that a reduction in functionality? In the absence of screenshots, does this mean each topic 'hit' generates a separate output line in the topic view?
QuoteIn the absence of screenshots, does this mean each topic 'hit' generates a separate output line in the topic view?
Yes
Okidoki.
In my mind, that's a backwards step.
Everytime I go to topic view all I see is ME who has viewed it. Is there something I am doing wrong as the installation never said there were any errors?
Is this supposed to have its own settings page in the Admin area? I can't find anything... thanks!
If it's a faithful fork, it'll have permissions settings:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FL1Tm4.png&hash=88a99bd73290028f0114775a0479eb8cf906f053)
Oh, it's in permissions. Right, I was looking around in he Admin area settings for a mod section... Thanks!
Everything installed great but i noticed no text in the permissions area. can anyone help?
I figured it out this
$txt['permissionname_tvl_view'] = 'View topic view log';
$txt['permissionhelp_tvl_view'] = 'This permission allows users to view the topic view log.';
$txt['permissionname_tvl_view_own'] = 'Own topic';
$txt['permissionname_tvl_view_any'] = 'Any topic';
$txt['permissionname_simple_tvl_view_own'] = 'View own topic view log';
$txt['permissionname_simple_tvl_view_any'] = 'View any topic view log';
needs to be added anywhere in themes/default/languages/managepermissions.english.php
im not quite sure why its not done as part of the install .. i had no errors during install.
SMF 2.0.11
Quote from: madturnip on July 19, 2015, 06:55:49 PM
Everytime I go to topic view all I see is ME who has viewed it. Is there something I am doing wrong as the installation never said there were any errors?
i am having the same issue after installing the mod. I can not find the permissions for the mod either....
http://www.simplemachines.org/community/index.php?topic=538187.msg3829305#msg3829305
Quote from: Shambles on October 11, 2016, 02:36:29 PM
http://www.simplemachines.org/community/index.php?topic=538187.msg3829305#msg3829305
found it...had to add the code to both english language files....
still only showing me in the log files though...not showing other member's who have viewed the topic
it seems it will only log the last user...not multiple users who viewed the log
Quote from: runningtrades on October 12, 2016, 03:40:20 PM
it seems it will only log the last user...not multiple users who viewed the log
any solutions? I can now see multiple pages, but only one user name on the first page, after that, all of the other pages are blank...
Quote from: mikedijital on September 30, 2015, 09:29:39 PM
I figured it out this
$txt['permissionname_tvl_view'] = 'View topic view log';
$txt['permissionhelp_tvl_view'] = 'This permission allows users to view the topic view log.';
$txt['permissionname_tvl_view_own'] = 'Own topic';
$txt['permissionname_tvl_view_any'] = 'Any topic';
$txt['permissionname_simple_tvl_view_own'] = 'View own topic view log';
$txt['permissionname_simple_tvl_view_any'] = 'View any topic view log';
needs to be added anywhere in themes/default/languages/managepermissions.english.php
im not quite sure why its not done as part of the install .. i had no errors during install.
SMF 2.0.11
thanks, that worked.
Quote from: runningtrades on October 12, 2016, 03:40:20 PM
it seems it will only log the last user...not multiple users who viewed the log
same here (at 2.0.11), only shows one viewer. The database entries are OK as i see multiple enties for the individual topics.
... (continued from above) I have been trying to debug the code by dumping variables but they all look good.
something is stopping the list from populating but my php debugging skills are basic ... at least i tried.
check the following SQL statement as ONLY 1 row is returned (if it's correct then maybe it should be called for each row that contains the topic number):
SELECT
mem.id_member, mem.member_name, mem.real_name, mg.group_name,
tvl.time, COUNT(m.id_msg) AS topic_posts
FROM {db_prefix}log_topic_view AS tvl
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = tvl.id_member)
LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = CASE WHEN mem.id_group = {int:regular_id_group} THEN mem.id_post_group ELS$
LEFT JOIN {db_prefix}messages AS m ON (m.id_member = mem.id_member AND m.id_topic = tvl.id_topic)
WHERE tvl.id_topic = {int:topic}
ORDER BY {raw:sort}
LIMIT {int:start}, {int:per_page}',
array(
'sort' => $sort,
'start' => $start,
'per_page' => $items_per_page,
'topic' => $topic,
'regular_id_group' => 0,
)
Quote from: aegersz on October 19, 2016, 08:03:58 AM
check the following SQL statement as ONLY 1 row is returned (if it's correct then maybe it should be called for each row that contains the topic number):
SELECT
mem.id_member, mem.member_name, mem.real_name, mg.group_name,
tvl.time, COUNT(m.id_msg) AS topic_posts
FROM {db_prefix}log_topic_view AS tvl
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = tvl.id_member)
LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = CASE WHEN mem.id_group = {int:regular_id_group} THEN mem.id_post_group ELS$
LEFT JOIN {db_prefix}messages AS m ON (m.id_member = mem.id_member AND m.id_topic = tvl.id_topic)
WHERE tvl.id_topic = {int:topic}
ORDER BY {raw:sort}
LIMIT {int:start}, {int:per_page}',
array(
'sort' => $sort,
'start' => $start,
'per_page' => $items_per_page,
'topic' => $topic,
'regular_id_group' => 0,
)
my debugging skills are non-existent...lol..did this work for you? The name of the member who viewed the log last changes, and I can see multiple pages, but only one member
the info I posted is intended to be for the guy who wrote it. I get the same thing as you but only on 1 page.
as I said, the database table it uses is correct but the query of it only returns the same one line - he expects a number of rows as he sets up an array to receive them.
buggered if i know, I'm just exploring the wonders of php+SQL and I'm only a novice.
i get multiple pages, but can only see one name on the first page, but the name always changes, as members view the post
I was able to get two pages of blanks by altering a SQL query and I have run the SQL from the debugging mods on phpmyadmin and I get the exact same single line returned, despite there being multiple rows to be accessed.
I emailed the author because it's now beyond my current skillset ... i really like this mod BUT that database table is slowly growing with every thread view and that's another concern.
I can't see any code to process all the appropriate rows to provide a consice listing of viewers so I am even more confused !
i got it working but it produces HEAPS of information ... try my fix (and see if you like the amount of data it produces) by replacing the top 3 lines of the SQL SELECT code in function list_get_tvl_members in .Sources/TopicViewLog.php as shown below:
change the following:
SELECT
mem.id_member, mem.member_name, mem.real_name, mg.group_name,
tvl.time, COUNT(m.id_msg) AS topic_posts
to the following:
SELECT
DISTINCT
mem.id_member, mem.member_name, mem.real_name, mg.group_name, tvl.time, mem.posts AS topic_posts
that fix works perfectly! Thank you very much!!
You're welcome but I decided to Uninstall it due to the table it uses that is continually growing and the huge amount of pages it produces.
Good for every now and then though.
I managed to track down an offending member that I was trying to weed out, so it served it's purpose for me! I'll probably keep the logs for now, see how big they get...if they get too big, I may remove it. But it helped me ban a member I was looking for!