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 1.0

Adds discussions (thread) views, and displays the total in the Sidebar and on each Forum

  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
    http://xenforo.com/community/resources/bd-widget-framework.297/

    Template: wf_widget_stats

    Search for:
    PHP:
     <dl class="memberCount"><dt>{xen:phrase members_count}:</dt>
    Add above:
    PHP:
    <dl class="memberCount"><dt>{xen:phrase iwd_tftv_message_views}:</dt>
         <
    dd>{xen:number $boardTotals.message_views}</dd></dl>
    Done :)
     
    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.
     
    Last edited: Mar 5, 2016

Share This Page