I just installed this for the first time to see how it works and it seemed to work fine for me. So, you uploaded the new version of the extension overwriting the old files. Was the extension still activated?
Also, before you activate it again, if it needs it, I would suggest making a copy of the vanilla database first.
I just discovered it is an issue with the overview interface. If I go back to the standard vanilla discussion list, the view count is there. If I turn on the overview extension, they disappear. Must be missing something..
I tried installing this after I had un-installed a previous version but I got an error saying that the table did not exist.
Affected Elements
ViewDiscussions.DiscussionGridView_Add();
The error occurred on or near: Table 'skubeco_vanilla.LUM_discussionviews' doesn't exist
Is there something I need to do to re-create the table?
Skube: If you remove the version setting ('EXTENSION_VIEW_DISCUSSION_VERSION') from conf/settings.php, it will force the view counter to rebuild the missing table.
Related: Version 1.2.1 has a bad installation routine that can cause the settings file to be corrupted.
On pages from extensions such as Dojo, Private Messages, PFC, to the left it shows "Extension Options" with "Discussion Counter" underneath when it's only meant for the Settings page.
The easiest way I've found to fix this is by replacing line 96: if( in_array($Context->SelfUrl, array('settings.php', 'extension.php')) && $Context->Session->User->RoleID == $managerRoleId) by this: if( in_array($Context->SelfUrl, array('settings.php')) && $Context->Session->User->RoleID == $managerRoleId) Dunno if it's good to create an array with only one element since I'm not really a coder, but it seems to work so far.
By the way, if someone knows a way to make it work with Discussion Overview like GMonkey asked earlier, I'd be interested too
hi there, I use this extension but, my site is now developing so I found that when I (as Admin) view any discussion, the counter is updating. I don't know if anyone finds that necessary but I did, so I add;
function CreateMemberList() {
global $Context;
$sql = $Context->ObjectFactory->NewContextObject($Context, 'SqlBuilder');
$sql->SetMainTable('User','u');
$sql->AddSelect(array('UserID', 'RoleID', 'FirstName', 'LastName', 'Name', 'Email', 'UtilizeEmail', 'CountDiscussions', 'CountComments', 'DateFirstVisit', 'ShowName', 'Icon', 'CountVisit'), 'u');
$result = $Context->Database->Select($sql, 'MembersList', 'MembersListTable', 'An error occurred while listing the member information.');
//return $Context->Session->RoleID;
return $Context->Session->User->UserID;
}
right after
include(VIEW_DISCUSSION_EXTENSION_PATH . 'conf/settings.php');
then, find that line, if($check)
change it,
if($check && CreateMemberList()!=1)
so if you are an admin (creator of the forum), it will not count your visits...
if I'm mistaken or suggesting something wrong please inform me.. thanks in advance selflearner./
is it me or does this extension not work right? i can open a discussion and hit refresh 10 times and it will update the view count 10 times. a view count shouldn't update with each page view, but with each person viewing it. has anyone modified tis extension to do that? i would love to use this if it worked like other boards.
@selflearner: When I do what you've posted up there, all my View numbers remain at 0. Are we supposed to change the if($check) in both locations of default.php or just one of the two locations? I did it at both.
Edit: Forget it; I played around and found that you just change the first one.
Comments
Looks like this extension isn't found by the Vanilla updater.
Removed unnecessary instructions from readme (obsolete since the release of Vanilla 1.1).
No ideas why the counter stopped working?
Also, before you activate it again, if it needs it, I would suggest making a copy of the vanilla database first.
Affected Elements ViewDiscussions.DiscussionGridView_Add(); The error occurred on or near: Table 'skubeco_vanilla.LUM_discussionviews' doesn't exist
Is there something I need to do to re-create the table?
Related:
Version 1.2.1 has a bad installation routine that can cause the settings file to be corrupted.
This should fix the issue
How can this be fixed?
if( in_array($Context->SelfUrl, array('settings.php', 'extension.php')) && $Context->Session->User->RoleID == $managerRoleId)
by this:
if( in_array($Context->SelfUrl, array('settings.php')) && $Context->Session->User->RoleID == $managerRoleId)
Dunno if it's good to create an array with only one element since I'm not really a coder, but it seems to work so far.
By the way, if someone knows a way to make it work with Discussion Overview like GMonkey asked earlier, I'd be interested too
I use this extension but, my site is now developing so I found that when I (as Admin) view any discussion, the counter is updating. I don't know if anyone finds that necessary but I did, so I add;
function CreateMemberList() { global $Context; $sql = $Context->ObjectFactory->NewContextObject($Context, 'SqlBuilder'); $sql->SetMainTable('User','u'); $sql->AddSelect(array('UserID', 'RoleID', 'FirstName', 'LastName', 'Name', 'Email', 'UtilizeEmail', 'CountDiscussions', 'CountComments', 'DateFirstVisit', 'ShowName', 'Icon', 'CountVisit'), 'u'); $result = $Context->Database->Select($sql, 'MembersList', 'MembersListTable', 'An error occurred while listing the member information.'); //return $Context->Session->RoleID; return $Context->Session->User->UserID; }
right after
include(VIEW_DISCUSSION_EXTENSION_PATH . 'conf/settings.php');
then,
find that line,
if($check)
change it,
if($check && CreateMemberList()!=1)
so if you are an admin (creator of the forum), it will not count your visits...
if I'm mistaken or suggesting something wrong please inform me..
thanks in advance
selflearner./
Edit: Forget it; I played around and found that you just change the first one.