[pmwiki-users] ABC Musik

Martin Fick mogulguy at yahoo.com
Mon Oct 1 11:43:59 CDT 2007


--- Patrick Ogay <lists at basel-inside.ch> wrote:
> 2)
>
http://www.wprj.net/chor/index.php/Tunes/2Sem2007-Chor
> in a pagelist  (this I made manually), I like to
> have the name of the file and the link of the 
> midi-file. Is this possible with a correct 
> pagelistformat?

I'm not sure what you mean here, your list seems to
work.  Do you mean that you made every entry in the
list manually?

If you are looking for a template to do that it might
be hard if you cannot predict exactly what the link to
the midi file is going to be.  For example on your
site you have:

UbiCaritas which needs a link to:
http://www.wprj.net/main/user.d/cache/Ubi_Caritas.mid
Adding the prefix and the .mid should be easy, but to
get rid of the _ underscore might require some recipe
tweaking.

This might be a little bit easier with the Music
recipe since one of its objective is making better
URLs (via the Content recipe).  A temlpate to do that
with the music recipe would probably look like this:

[[#music]]
* [[{=$Fullname}]] 
[[http://www.wprj.net/chor/index.php/1.mid?n={=$Fullname}&action=content&content=/abcm..midi~1.mid]]
[[#musicend]]

This will grab the first (abcm) entry on your page.

I will think about adding a shortcut to the Content
recipe which grabs the first entry no matter what the
source, that would seem useful as illustrated by your
case.
 

> 3) Is there a short form for a pagefmt-list 
> consisting of one link - to hide when page is 
> protected?

Do you mean that you want the entry to be skipped (not
even displayed) in your pagelist if the visitor does
not have read access to the page?

If so, if you use the above method you can probably
add a simple conditional in your template to do this
like this:

[[#music]]
(:if auth read {=$Fullname}:)
* [[{=$Fullname}]] 
[[http://www.wprj.net/chor/index.php/1.mid?n={=$Fullname}&action=content&content=/abcm..midi~1.mid]]
[[#musicend]]

You could you a similar manual method if you stick
with the abcmusic recipe.

Another advantage of the Music recipe over the
abcmusic recipe is that in this case, even if a user
can guess the URL to the midi file they will not have
read access to it unless they have read access to the
page within which the source resides!  (mechanism
provided by the Content recipe)

Sorry it took me a while to respond, I hope that this
helps a little.  Ask more if needed,

-Martin



       
____________________________________________________________________________________
Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469



More information about the pmwiki-users mailing list