[MOD] Hits Counter ...
 
Notifications
Clear all

[MOD] Hits Counter on story pages

1 Posts
1 Users
0 Reactions
1,430 Views
 Pari
(@pari)
Posts: 18
Active Member
Topic starter
 

Description: This is a mod that will display a read count per chapter on each story/chapter page. Just like the read count I help create for version 1.1

Requirements: I know this works for ver. 3.0, you can try with other versions if you like just to see, but again I modded it from/for 3.0.

You will be modding the viewstory.php and viewstory.tpl files. Before you start modding anything please 'BACKUP YOUR FILES'!!

First open 'viewstory.php':

Find line 88 (or there about), which should look like this:

$tpl->assign("author", $c['penname']);

Right beneath that line add this code

$tpl->assign("count", $c['count']);

Find lines 93 and 144 (or there about) which should look like this:

$tpl->assign("chapterauthor", $c['penname']);

Right beneath those lines add this code:

$tpl->assign("chaptercount", $c['count']);

Find lines 258 and 288 (or there about) which should look like this:

 $chapid = $chap['chapid'];

Right beneath those lines add this:

 $chaptercount = $chap['count'];

Finally, find line 384 (or there about) which should look like this:

$tpl->assign("textsizer", $textsizer);

Right beneath that add this code:

$tpl->assign("chaptercount", $chaptercount);

Save the 'viewstory.php' file.

Next open the viewstory.tpl file in your skins folder
Add this bit of code:

{chaptercount}

wherever you want the chapter read/hits counter to appear on the page.
Save the 'viewstory.tpl' file and you're done!!

To see it in action please look HERE


 
Posted : 25/07/2009 5:40 pm
Share: