This falls into the category "Neat things you can do with SMW":
I just added the following code to my wiki:

--- orig/includes/OutputPage.php
+++ mod/includes/OutputPage.php
@@ -1039,6 +1039,11 @@
                        $ret .= "<meta name=\"keywords\" content=\"" .
                          htmlspecialchars(preg_replace(array_keys($strip), 
array_values($strip),implode( ",", $this->mKeywords ))) . "\" />\n";
                }
+               $d = $this->parse('<ask 
headers="hide">{{PAGENAME}}[[Kurzbeschreibung:=+]][[Kurzbeschreibung:=*]]</ask>',
 false);
+               if ($d != '') {
+                       $ret .= '<meta name="description" content="' .
+                         htmlspecialchars($d) . "\" />\n";
+               }
                foreach ( $this->mLinktags as $tag ) {
                        $ret .= '<link';
                        foreach( $tag as $attr => $val ) {

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!
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.
PPS: I have no idea how this change interacts with caching. Does anyone
know this?


-------------------------------------------------------------------------
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