Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Discussion View Counter

edited March 2007 in Vanilla 1.0 Help
Discussion View Counter


  • Hi there,

    Looks like this extension isn't found by the Vanilla updater.
  • Uploaded version 1.2.1 of Discussion View Counter.

    Removed unnecessary instructions from readme (obsolete since the release of Vanilla 1.1).
  • I just lost all the discussion view counts when I updated. Now no views counter shows.
  • Tamkun,

    No ideas why the counter stopped working?
  • 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..
  • Version 1.2.1 has "Discussion View Count" in the default.php file, and this page is "Discussion View Counter". Update checking doesn't work.
  • 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.

    Version 1.2.1 has a bad installation routine that can cause the settings file to be corrupted.

    This should fix the issue
  • 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.

    How can this be fixed?
  • 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 :)
  • Any way someone could come up with a DiscussionFilter for this plugin? Sort by most views.
  • 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');
    find that line,
    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
  • Great extension. Anyone know how I can get the View count to display before the New comments count? I've tried to track it down, but I can't.
  • 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.
  • I agree with phynias, It should only update with each new visitor, not each new page refresh.
  • @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.
  • Does this work with 1.1.5a?
Sign In or Register to comment.