A block for a simple page counter.
http://forum.writingcenter4.info/index.php?action=mgallery;sa=item;id=11334
This page counter will count the number of hits per page. This counter is organized in a block, so that means that the hit counter is counting the hits for each page of the eFiction site.
When you install the block, you can get the page counter by including {pagecounter_title} and {pagecounter_content}
[Modified by Wim]
I listened, and here is the database version of the counter.
http://forum.writingcenter4.info/index.php?action=mgallery;sa=item;id=11402
And the code (if you don't want to download it):
<?php
if(!defined("_CHARSET")) exit( );
// Take care that you add a field (hits) in the 'fanfiction_stats' table
// Replace 'tblprefix' from the tablename with your own prefix
// ALTER TABLE `tblprefix_fanfiction_stats` ADD `hits` INT( 11 ) NOT NULL ;
// Get the hits counter
$stats = dbassoc(dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_stats WHERE sitekey = '".SITEKEY."' LIMIT 1"));
// Increase the hits counter
$currenthits = $stats['hits'] + 1;
// Update the hits counter
dbquery("UPDATE ".TABLEPREFIX."fanfiction_stats SET hits = $currenthits WHERE sitekey = '".SITEKEY."' LIMIT 1");
$content = "<b>$currenthits</b> hits";
?>
This would REALLY be better done as a field in the stats table.
That's an excellent idea! Why could't I think about that.
Let me finish sweeping and cleaning the roof, bird cages and wash the dog, my wife is bringing my son away to basketball and then I make those changes.
I also am working on a block, which displays who is online, but per page (i.e. members A, B and C are reading story 1, members T is reading story 5).
Once you've bathed your canaries or whatever it is, I have a suggestion for you. If you do that for Who's Online, then you should also consider making an opt-out for it. It's something that I think it should have anyway (I've had members ask for it), but especially if you're giving it more detail.
Once you've bathed your canaries or whatever it is, I have a suggestion for you. If you do that for Who's Online, then you should also consider making an opt-out for it. It's something that I think it should have anyway (I've had members ask for it), but especially if you're giving it more detail.
You mean to hide their names in the online user list?
Yeah. A lot of forums and stuff that I've been to have that feature, so that you can opt to not show up in lists like that.
