1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Icewind Total Forum Thread Views [Deleted]

Discussion in 'Add-on Releases' started by Lawrence, Jan 17, 2014.

  1. Lawrence

    Lawrence Well-Known Member

    Lawrence submitted a new resource:

    Icewind Total Forum Thread Views - Adds discussions (thread) views, and displays the total in the Sidebar and on each Forum

    Read more about this resource...
  2. maxicep

    maxicep Active Member

    Is there xf_forum table alteration ?
  3. Lawrence

    Lawrence Well-Known Member

    Yes, it is in the read-me (I'll update the Overview). Before the alteration is added, (or removed when un-installing), the script checks for it existence first. The alteration adds one column to xf_forum called iwd_forum_views to store each forums total views count. Any alterations to existing XenForo tables I make I precede the column name with iwd_ to avoid any future conflicts with XF updates or other add-ons.
  4. Adam Howard

    Adam Howard Well-Known Member

    For those of you who are using @xfrocks [bd] Widget Frame Work add-on and want this added

    Template: wf_widget_stats

    Search for:
     <dl class="memberCount"><dt>{xen:phrase members_count}:</dt>
    Add above:
    <dl class="memberCount"><dt>{xen:phrase iwd_tftv_message_views}:</dt>
    dd>{xen:number $boardTotals.message_views}</dd></dl>
    Done :)
    DieselMinded, Lawrence and xfrocks like this.
  5. Cubie

    Cubie Member

    Please can you make a new Option.... Summaries the Message Views on the Main Node and its Sub Nodes (Total Views)

    In the current Version it is seperate. Display the Total Views beside the Main Node.
  6. nitai.tv

    nitai.tv Member

    @Lawrence I added the code to the wf_widget_stats template. For some reason, I can see the total forum threads views only on the /forums page in the stats block. On all other pages it shows Views: 0. Please help me to fix this. Thanks in advance.
  7. Lawrence

    Lawrence Well-Known Member

    @ngn.pw that stat was made to show on the forum list page, the required variable is not available to other pages that uses a sidebar. I have never used the any widget add-on so I can't give much help. It shouldn't be difficult though to create a listener to retrieve that stat for other pages as it is stored in the simple cache, which is loaded on every page load.
    BobbyWibowo likes this.
  8. BobbyWibowo

    BobbyWibowo Well-Known Member

    I'm also using Widget Framework for my forums. I simply made a template callback straight to "Icewind_ForumThreadViews_Model_Views" class with "getTotalThreadViews" methods, and it worked on all pages with sidebars.

    UPDATE: It threw warning message about calling non-static function statically. I had to copy the exact function to my globally used Listener file and set it as a static function. But it works fine since then.

    Just make your own listener file that will do this:
    return XenForo_Model::create('Icewind_ForumThreadViews_Model_Views')->getTotalThreadViews();
    Last edited: Feb 7, 2017
  9. BobbyWibowo

    BobbyWibowo Well-Known Member

    Can someone confirm that this is still working or something? I uninstalled the add-on a few months ago since I couldn't make the total values appear on other pages properly (used widget framework), but now I can, so I reinstalled the add-on again. Though, a few days ago we moved most of the threads on our forum to a Graveyard-like forum, and after I installed the add-on today, it seemed to be using the old counts value (maybe the data was kept on un-installation?):
    I tried rebuilding "Forum Thread Views" caches and manually running "Icewind Forum Views Update" cron entry, but the counts remained like the above :confused:
  10. Lawrence

    Lawrence Well-Known Member

    Hi, like all my add-ons, when it is uninstalled nothing is left in the DB to indicate the add-on in question was ever installed. When you install this add-on, it is recommended to rebuild the cache: Admin->Tools->Rebuild Caches, and select Rebuild Now for the add-on. When you move threads, the views are not changed for either forum (intentional as those forums were viewed that many times), rebuilding the add-ons cache should update the totals to reflect the moved threads.
  11. BobbyWibowo

    BobbyWibowo Well-Known Member

    By the way, will Redis view count add-on cause any incompatibility with this add-on?
  12. Lawrence

    Lawrence Well-Known Member

    I'm not sure to be honest. Forum Thread Views has it's own table where it stores the views for each forum, and when the cron runs it then adds them up for each forum and adds the results to the xf_forum iwd_forum_views field.
  13. Lawrence

    Lawrence Well-Known Member

    This resource has been removed and is no longer available for download.

Share This Page