Pligg Support - Module to show the total views of each story in the summary I created a free module (total_story_views) for pligg CMS to show the number of story views in the line under the story title right after the time published. it has two callbacks to functions in the module: 1. To add the story ID to a newly created table “story_views”, every time a story is viewed. 2. To get the total views of each story from the “Story_views” table to print in the story summary. The module (total_story_views) includes the following files (attached in a zip file): 1. total_story_views_init.php, where the pages to include are listed and the module_add_action to answer the callbacks, and module_add_action_tpl to display the result of the callbacks. 2. total_story_views_install.php (information about the module) 3. total_story_views_main.php, where the two callback functions reside. 4. total_story_views_settings.php (settings of the paths to the location of the module, the template folder and language files) 5. Language file. I made sure that language files are detected automatically by the config file, because I named them lang_english, lang_french, etc. and the define statement picks up the file according to the language chosen during installation or even when it is changed back and forth. define('total_story_views_lang_conf', "/modules/total_story_views/lang_" . pligg_language . ".conf"); I tested it many times and here is the result: • The callback from the story.php file to insert the ID in the story_view table is working • The callback to Read More get the total views of each story ID from the story_views table is partially working: i. It gets the totals (I echoed them within the function to check) ii. However, it is not inserting the $main_smarty variable in the template file at all. I tried every possible solution and process of elimination to pin point why but to no avail! The table creation, callback placements, changes to the link_summary.tpl and defining the table are explained in the readme file within the zipped module. Could anyone shed a light on this problem? Thank you in advance! Fri, 06 Jun 2014 16:07:06 EDT en <![CDATA[Answer #2945]]> Wed, 28 Jan 2015 05:18:18 EST redwine 0 2945 <![CDATA[Answer #2943]]> Wed, 28 Jan 2015 00:50:38 EST kevinzhouqq 0 2943 <![CDATA[Answer #2465]]> Sat, 25 Oct 2014 11:54:03 EDT redwine 0 2465 <![CDATA[Answer #2464]]> Sat, 25 Oct 2014 11:49:37 EDT pligglab 0 2464