[pmwiki-users] How to include last line?
Petko Yotov
5ko at 5ko.fr
Thu Jul 8 15:09:53 CDT 2010
On Thursday 08 July 2010 19:52:01, Kollektivmail . wrote :
> I've spent a while now tried to figure out how to use (:include:) to get
> only the last line of a page. Without success..
> It is for a nice little story-writing game. You write a part of a story
> based on the last line of what is written before, and first when the story
> is finished you can read the whole story..
> I'm using Fox Shoutbox since before, so I used that for text input and then
> stores the text at the bottom of another page, so it's not convinient to
> use anchors either. Unless it is possible to grab text BEFORE a certain
> achor rather than AFTER.
>
> So my question is.. how can you automatically include the last line of a
> page that is changing.
> Or any other solution that works for the game above..
Hello. It may be possible possible to use different pages instead of different
lines. When a visitor adds a line, you can create a new page rather than
append the text to an existing page, for example [[MyStory.00234]], then
display the last created page with
(:pagelist group=MyStory order=-name fmt=#include count=1:)
To display the full story, use
(:pagelist group=MyStory order=name fmt=#include:)
I think Fox and/or PowerTools should be able to create new serial name / new
ticket pagenames.
Alternatively, if it is possible with Fox, it may be even better to store the
new line to two pages: (1) appended to the end of your full story, like now,
and (2) replacing the content of a temporary LastLine page which you display
to the visitors.
Petko
More information about the pmwiki-users
mailing list