michaellindahl Wrote:Two questions – I am moving my blog from Posterous to GetSimple using the GS Blog plugin (http://get-simple.info/extend/plugin/gs-blog/462/). As a part of the transition I would like to not lose my post's hits, how do I artificially boost the hit count for pages? [and yes I understand that this could make the graphs look poor.]
Currently hitcount both increases a counter for the current page (data/other/hitcount/hits_pageslug.txt) in order to allow you to display hit counters on your pages and it writes an entry to a log file, which is then used for the graphs.
You can simply change the number in the hits_*.txt files, but this will only affect the hit counts, not the graphs.
For the log file you could create dummy log files or just dummy entries in one of the log files in the format
Code:
UnixTimeStamp SessionNumber Slug Referer UserAgent
Code:
1298046412 0 my-slug http://mysite.com/ Mozilla/5.0
michaellindahl Wrote:The second – currently HitCount shows all hits on the blog page and hits on the individual blog posts as a single page. Can HitCount be upgraded so that it supports the posts using the GS Blog plugin?
I could probably add some functionality to Hitcount to allow other plugins to change the slug, but it probably would not be used by the plugin authors - so far even the hooks in I18N Search are used only by one plugin (HideFuturePages), as far as I know :-(
But I think, you could add a call to hitcount_init($slug) to your page template for the blog, where the parameter is e.g. the blog page slug concatenated with the blog entries slug/name, like (I didn't test it):
Code:
<?php
$entryslug = ...; // I don't use the blog plugin, so you need to find out how to get the entries name/slug
@hitcount_init(return_page_slug().'-'.$entryslug);
?>
Edit: there is one plugin that uses the I18N Search hooks: HideFuturePages.