Re: [pmwiki-users] Question about expanding menu (w/o additional scripts) :)

2007-09-17 Thread Martin Fick
--- Vladimir Grigor <[EMAIL PROTECTED]> wrote:
...
> The same code but expressed in (:template:) doesn't
> work for me.
> Following code:
> [[#sidebar]]
> (:template first:)
>  >>fplsidebar<<
> (:template first {=$Group}:)
> %sidehead% [[{=$Group}]]
> (:if equal {$Group} {=$Group} :)
> * [[{=$FullName}|+]] (:ifend:)
> (:template last:)
>  >><<
> [[#sidebarend]]
> 
> produces following lines in sidebar:
> (:template first:)
> (:template first Research:) Research (:template
> last:)
> (:template first:)
> (:template first Research:) Research (:template
> last:)
> (:template first:)
> (:template first Research:) Research (:template
> last:)

Sounds like you do not have that feature in your
version of pmwiki, perhaps it is older than version
2.2.0-beta48?

-Martin



   

Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.
http://farechase.yahoo.com/

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Suggestions for Parallel Language versions of Pages.

2007-09-17 Thread Kathryn Andersen
On Mon, Sep 17, 2007 at 08:16:10PM -0400, Stirling Westrup wrote:
> I'm currently working on a Bilingual (English/French) site where most of the
> pages in the English/ group will be mirrored by a translation in the
> Francaise/ group and vice-versa.
> 
> I would like to have a "Francaise" button in the English group which takes you
> to the equivalent French page, and an "English" button in the French group
> which takes you to the equivalent page.
> 
> The question is, how should I best go about setting up these page
> equivalences? I can imagine a few methods such as:
> 
> 1) Each page in either group has a (:Alternate: ... ) PTV pointing to the
> other page.

What about an automatically calculated PageVariable -- if the pages
differ only by what group they're in, then that should be a relatively
easy function to create: check what the current group is, and give
the $Name plus the name of the other language group.

One could even put it in the GroupHeader or GroupFooter.
 
> So, what do folks suggest? It would be best if the system made it obvious when
> the translation of a page (or its link) was missing, and that would be simple
> to extend to other languages if need be.

The other advantage of using a page variable inside a link would
be that broken links would show up automatically.

Kathryn Andersen
-- 
 _--_|\ | Kathryn Andersen  
/  \| 
\_.--.*/| GenFicCrit mailing list 
  v | 
| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |   -> Earth -> Sol -> Milky Way Galaxy -> Universe

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] Suggestions for Parallel Language versions of Pages.

2007-09-17 Thread Stirling Westrup
I'm currently working on a Bilingual (English/French) site where most of the
pages in the English/ group will be mirrored by a translation in the
Francaise/ group and vice-versa.

I would like to have a "Francaise" button in the English group which takes you
to the equivalent French page, and an "English" button in the French group
which takes you to the equivalent page.

The question is, how should I best go about setting up these page
equivalences? I can imagine a few methods such as:

1) Each page in either group has a (:Alternate: ... ) PTV pointing to the
other page.

2) Each page lists other pages by language, so that you might find an
(:English: ... ) PTV in French pages and vice-versa. This allows me to expand
the language list later (although I'm not sure we ever will).

3) There's some strange two-way XLPage set up that maps pages back and forth.
This was my initial plan, but its now looking difficult to set up.

4) Something I haven't thought of.

So, what do folks suggest? It would be best if the system made it obvious when
the translation of a page (or its link) was missing, and that would be simple
to extend to other languages if need be.

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


[pmwiki-users] Bug: (:if action ...:) does not work as builtin condition.

2007-09-17 Thread christian . ridderstrom

The documentation states that the following:

 (:if action ACTION:)  - true if ?action=ACTION (edit, print, ...)

should work as a builtin command, but it doesn't.

I've verified that it doesn't work on this page:
http://www.pmwiki.org/wiki/Test/ConditionAction

There does not seem to be a PITS for this yet, should I add one?
(I suspect the fix is trivial, i.e. a line that's forgotten in 
stdmarkup.php or pmwiki.php)


Best regards,
/Christian

PS. I still think it's a bad "design" that (:if UNKNOWN:) returns true 
without any warning messges. Besides the condition being considered 
satisfied, there is nothing that indicates to the author that he used a 
condition which does not exists. This also makes it more error prone, e.g. 
simple typos are difficult to catch.



--
Christian Ridderström, +46-8-768 39 44   http://www.md.kth.se/~chr___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Question about expanding menu (w/o additional scripts) :)

2007-09-17 Thread Vladimir Grigor
Thanks Martin!

I found my mistake - it was lack of closing semicolon in (:if:) 
construction. :)

Following code does expanding menu that I wanted:
1)Site.SideBar has this line for every 1st level menu item:
(:pagelist fmt=#sidebar name=GroupName.*,-RecentChanges,-HomePage  :)
2)Site.LocalTemplates has this code for #sidebar:
[[#sidebar]]
(:if equal {<$Group}:)
 >>fplsidebar<<
(:if ! equal {<$Group} {=$Group}:)
%sidehead% [[{=$Group}]]
(:if equal {$Group} {=$Group} :)
* [[{=$FullName}|+]]
(:if equal {>$Group}:)
 >><< (:if:)
[[#sidebarend]]

The same code but expressed in (:template:) doesn't work for me.
Following code:
[[#sidebar]]
(:template first:)
 >>fplsidebar<<
(:template first {=$Group}:)
%sidehead% [[{=$Group}]]
(:if equal {$Group} {=$Group} :)
* [[{=$FullName}|+]] (:ifend:)
(:template last:)
 >><<
[[#sidebarend]]

produces following lines in sidebar:
(:template first:)
(:template first Research:) Research (:template last:)
(:template first:)
(:template first Research:) Research (:template last:)
(:template first:)
(:template first Research:) Research (:template last:)

Thanks Martin :)

Martin Fick wrote:
> --- Vladimir Grigor <[EMAIL PROTECTED]> wrote:
> 
>> Hi dear All! Need you help...
>>
>> I want to implement 2 level menu in sidebar. 2nd
>> level items link to pages in corresponding groups.
>>
>> Suppose there are these pages in wiki:
>>
>> Main.Homepage
>> Research.Research
>> Research.Projects
>> Research.Funding
>> Research.Join us
>> Contacts.Contacts
>>
>> And if user is on Main.Homepage (s)he sees following
>> menu:
>> ---
>> Homepage
>> Research
>> Contacts
>> ===
>>
>> But if user browses pages in group Research
>> (Research.*) then menu is this:
>> ---
>> Homepage
>> Research
>>   *Projects
>>   *Funding
>>   *Join us
>> Contacts
>> ===
>>
>> I've read (probably) all (and recipes in
> cookbook.menues also) what I
>> could find about "expanding menu". It should be
> possible to do it by
>> Local Templates mechanism.
>>
>> I try to implement it in the following way:
>>
>>  code in Site.SideBar starts
>> %sidehead% [[Main/HomePage]]
>> (:pagelist fmt=#sidebar order=title
>> name=Research.*,-HomePage :)
>> * [[Contacts.Contacts]]
>> = code ends
>>
>>  code in Site.LocalTemplates starts
>> [[#sidebar]]
>>
>> (:template defaults order=name:)
>> (:template first :)
> 
> you probably want
>  (:template first {=$Group} :)
> 
>> %sidehead% [[{=$Group}]]
>> (:template each:)
>> * [[{=$Name}]]
>>
>> [[#sidebarend]]
>> = code ends
>>
>> There is only one problem with this code - it
>> doesn't work :)
> 
> What specifically doesn't work?  First make sure that
> you get the set of pages  that you expect returned by
> the pagelist (maybe with a default template), then
> make sure that it filters them properly with your
> template.
> 
> -Martin
> 
> 
> 
> 
>   
> 
> Check out the hottest 2008 models today at Yahoo! Autos.
> http://autos.yahoo.com/new_cars.html


___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users


Re: [pmwiki-users] Speed up PmWiki

2007-09-17 Thread Eemeli Aro
I've gone and implemented something very much like Thomas's script as
a cookbook recipe: FastCache
. I didn't actually notice
this thread until I was posting the thing, but the implementation is
very similar.

FastCache buffers printed output during anonymous page viewing and
saves the complete HTML page to file, allowing for Apache mod_rewrite
rules to serve up-to-date static pages for anonymous users, which
significantly speeds up general site access. Cache pages are
invalidated when a wiki page is posted, ensuring that the cache stays
up to date.

As an indicator of the efficiency of this kind of caching, my server
without FastCache can handle at most 10 pages/second, and with
FastCache it handles about 1500 pages/second.

Some beta issues still remain, of course. See the recipe for more info.

eemeli

___
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users