On Tuesday 17 October 2006 00:27, Thomas Bleher wrote:
> This falls into the category "Neat things you can do with SMW":
> I just added the following code to my wiki:
>

<snip>

<ask headers="hide">{{PAGENAME}}[[Kurzbeschreibung:=+]]
[[Kurzbeschreibung:=*]]</ask>

Please put [[ ]] around every query statement (also around {{PAGENAME}}) since 
this is the official syntax. I know that it sometimes works to leave the 
[[ ]] away, but such uses might fail in new versions. I might tighten the 
regexps at any time ... 

The motivation for being strict is to preserve a describable syntax for <ask>, 
thus avoiding the problems MediaWiki currently has with describing its 
official syntax.

<snip>

> As you can guess, most pages have an attribute "Kurzbeschreibung"
> (= short description), which now gets automatically added if it is
> available.
> I'm still amazed at the cool things SMW enables me to do!

Me too. Nice idea ...

> Kudos to all the developers!
>
> Thomas
>
> PS: This could be made into an extension, so the query is not hardcoded
> but can be set via a special page.

If you want to do this without a patch, you would need some interface to the 
keywords section in OutputPage; but otherwise it would be easy to do.

I could image to have "extensions to the extension", i.e. some set of 
additional modules shipped with SMW, which you can load in your 
(SMW_)LocalSettings.php. There are many small things that one can do, but 
that will not be used by everybody.

> PPS: I have no idea how this change interacts with caching. Does anyone
> know this?

Well ... no. The parsercache still remains somewhat mysterious to me. In any 
case, <ask> can only retrieve results *after* they have been stored. So if 
you store an article with a new Kurzbeschreibung, it might occurr that the 
article you get immediately after storing does not reflect your changes yet 
(this is the case for inline <ask> queries anyway, but it may or may not 
happen with queries in the header).

-- Markus

-- 
Markus Krötzsch
Institute AIFB, University of Karlsruhe, D-76128 Karlsruhe
[EMAIL PROTECTED]        phone +49 (0)721 608 7362
www.aifb.uni-karlsruhe.de/WBS/     fax +49 (0)721 693  717

Attachment: pgpTXYL5bunyc.pgp
Description: PGP signature

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Semediawiki-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user

Reply via email to