News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Topic View Log

Started by live627, July 16, 2015, 09:15:43 AM

Previous topic - Next topic

live627

[url=https://custom.simplemachines.org/index.php?mod=4060]Link to the mod[/url]

This is a fork of the original mod by [url="http://www.simplemachines.org/community/index.php?action=profile;u=118168"][SiNaN][/url] - 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 [center][url="http://creativecommons.org/licenses/by-nc-sa/3.0/"][img]http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png[/img][/url][/center]


Shambles

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?

live627

QuoteIn the absence of screenshots, does this mean each topic 'hit' generates a separate output line in the topic view?
Yes

Shambles

Okidoki.

In my mind, that's a backwards step.

madturnip

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?

Gryzor

Is this supposed to have its own settings page in the Admin area? I can't find anything... thanks!

Shambles

If it's a faithful fork, it'll have permissions settings:


Gryzor

Oh, it's in permissions. Right, I was looking around in he Admin area settings for a mod section... Thanks!

mikedijital

Everything installed great but i noticed no text in the permissions area. can anyone help?

mikedijital

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

runningtrades

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....


runningtrades

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

runningtrades

it seems it will only log the last user...not multiple users who viewed the log

runningtrades

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...

aegersz

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.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

#16
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.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

... (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.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

#18
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,
                )

The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

runningtrades

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

Advertisement: