[pmwiki-users] Determine from which WikiLibDir a page was read?
Tobias Thelen
tt at tobiasthelen.de
Fri May 25 17:40:23 CDT 2007
Hi out there!
Is it possible to display/determine from which PageStore resp.
WikiLibDir a page was read? I found no straight-forward way to do so.
(maybe I didn't notice..)
A relatively simple solution to make us happy would be e.g. setting
something like $page['wikilibdir'] in ReadPage() (pmwiki.php) and
defining a corresponding PageVar.
See below for further explanation on our scenario.
Regards,
Tobias Thelen
Background:
For Stud.IP (a learning management system widely used in Germany) we use
a PmWiki based central online help /documentation site
(http://hilfe.studip.de - German only for now). There's a default view
reflecting the standard configuration. However, local configurations and
workflows are different, so each University can have a special view that
differs only on those pages that have to contain local information.
Common example: Help for uploading files or searching for courses is
identical but how to reset a forgotten password isn't.
We achieve this by cascading WikiLibDirs (entry links are generated
automatically and context sensitively by local Stud.IP configuration.
Views are determinded by session variables using a mechanism derived
from http://www.pmichaud.com/wiki/Cookbook/SkinChange. ):
Default view
(http://hilfe.studip.de/index.php/Main/HomePage?setstudiplocationid=default):
./wiki.d <-- ./wikilib.d
Local view, e.g. University of Osnabück
(http://hilfe.studip.de/index.php/Main/HomePage?setstudiplocationid=uos):
./locations/uni-osnabrueck/wiki.d [1] <-- ./wiki.d [2] <-- ./wikilib.d [3]
This situation will be more complicated soon when German and English
versions will be introduced. (German pages will be delivered if no
english translation exists, but local German pages superseed default
English translations, thus leading to:
./locations/uni-osnabrueck-en/wiki.d <--
./locations/uni-osnabrueck/wiki.d <-- ./wiki-en.de <-- ./wiki.d <--
./wikilib.) We've not yet decided on a final solution for this - anyone
with experience in multilanguage wikis and willing to give advice? I'd
explain further in a private mail.
Our authors are encouraged decide if changes are relevant for all uers
(editing in default view, thus writing to [2]) or just of local interest
(editing in local view, thus writing to [1]). When editing in local view
they often get confused because they don't know if they're editing an
already localized version [1] or a default version [2]. For this reason
we'd like to display something like "base version" or "local version"
(or "local version from {$wikilibdir}" for authenticated authors.
P.S. There are some issues with $EnableDrafts in this scenario. Example:
If a draft version exists in the default view [2], the local versions
[1] can't be edited anymore because 'edit' always loads the default
view's draft version. Another example: I posted a bug here twice and
also as a PITS entry (http://www.pmichaud.com/wiki?n=PITS.00873) but
received no answer yet.
More information about the pmwiki-users
mailing list