[pmwiki-users] New recipe: Fox

Hans design5 at softflow.co.uk
Tue Dec 19 06:34:33 CST 2006


Tuesday, December 19, 2006, 11:46:41 AM, Jiri wrote:

> How can be used $FoxCountInc and $FoxCountDec  ?
> If I understand well then $FoxPostCount has a value=8 if there was 10
> posts and 2 were deleted,
> and the $FoxCount has a value=10.

Yes. And {$FoxCountInc} will give you a new number for the next post.

> What  happens with $FoxPostCount when action=foxinit ?

{$FoxPostCount} equals number of posts on page.
Actually it counts the #foxbegin# strings on the page.
Nothing happens to it with action=foxinit.
{$FoxCount} equals $page['foxcount'], a variable stored in the page,
and always increased by 1 with each addition of a post.
{$FoxCountInc} equals $page['foxcount'] + 1
{$FoxCountDec} equals $page['foxcount'] - 1

The added anchors [[#post$id]] and [[#postend$id]]
using $id = $page['foxcount'] + 1;
no post: {$FoxPostCount} equals 0
i.e. first post: [[#post1]];  {$FoxPostCount} equals 1
second post: [[#post2]];  {$FoxPostCount} equals 3
third post: [[#post3]];  {$FoxPostCount} equals 3
delete post two and one: {$FoxPostCount} equals 1
fourth post: [[#post4]]; {$FoxPostCount} equals 2


Hans





More information about the pmwiki-users mailing list