[wikka-community] "Counter" action

Krzysztof Trybowski trybowski
Mon Feb 4 00:58:16 GMT 2008


Dnia 3 lutego 2008 Dario Taraborelli napisal(a):
>> Hello all,
>> in attempts to customize my Wikka I came across this action:
>> http://wikkawiki.org/GmBowenCounter
>> --it adds a counter to each wiki page. That code is old and I
>> consider it not very optimal, hence the question: it there a better
>> version of it?

> maybe this can help? http://wikkawiki.org/TRBCounter

Well, this is mine :).
And it's partially obsolete anyway, since I've been busy for a few
last hours. The new version is being prepared, aimed at 1.1.7.0
compatibility. Changes:
 --setting a counter on a global basis -- for all pages
 --translatable 'Total hits' string
 --number of hits displayed in the footer (with check for read access)
 --action counter compatible with the old one (but only changing the
 setting)
 --action nocounter disabling counter totally (as an analogy to
 nocomments)
 --the code is moved to a separate file (counter.lib.php)

Now a question: where should I put the counter.lib.php? Is there a
rule for that? For now I put it in libs/ and include in footer.php by
require_once. I guess it would be better to change it into a function,
and in footer.php just refer to a function. But then how do I have the
code automatically included? I would like keep number of changes in
Wakka.class.php on minimal level.

Regdars, KT

-- 
Krzysztof Trybowski
  Gadu-Gadu: 1458144 --- Skype: trybowski
  AQQ: 141062 --- ICQ: 4350719 --- gpg key-id: 0x1245B774





More information about the community mailing list