DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:description

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:description [2011-01-20 13:06] – downloadurl lupo49plugin:description [2023-10-30 23:47] (current) Klap-in
Line 1: Line 1:
-====== description plugin ======+====== Description Plugin ======
  
 ---- plugin ---- ---- plugin ----
-description: Copies a page'"description abstract" meta-data to a meta header line that is visible in the page source. +description: Copies a page's abstract, a global description, or individual text to a meta header line that is visible in the page source. 
-author     : Ikuo Obataya +author     : Ikuo Obataya, Matthias Schulte 
-email      : ikuo.obataya@gmail.com+email      : dokuwiki@lupo49.de
 type       : action type       : action
-lastupdate : 2010-11-09 +lastupdate : 2012-07-02 
-compatible : 2008-05-05+compatible : Lemming, Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun
 depends    :  depends    : 
 conflicts  conflicts 
-similar    : meta,keywords +similar    : keywords, meta, metaheaders, combo 
-tags       : meta+tags       : meta, seo 
 +securitywarning: This plugin does not respect ACL, see https://github.com/lupo49/plugin-description/issues/6
  
-downloadurl: http://symplus.edu-wiki.org/_media/src/description.zip+downloadurl: https://github.com/lupo49/plugin-description/tarball/master 
 +bugtracker : https://github.com/lupo49/plugin-description/issues 
 +sourcerepo : https://github.com/lupo49/plugin-description
 ---- ----
  
-^Download  |{{http://symplus.edu-wiki.org/_media/src/description.zip}} (1 KB)|+===== Security ===== 
 +This plugin does not respect ACL, it could leak sensitive data through the login page, see  
 + https://github.com/lupo49/plugin-description/issues/6
  
 +===== Usage =====
  
 +There are three alternative methods to specify the meta header keywords:
  
-This DokuWiki plugin append an abstract of page (meta['description']['abstract']for meta headers. This functionality is applied to all pages by installing the plugin.+  * Configuration option "keyword_source" 
 +    * Value "abstract" 
 +      * The meta headers are automatically filled with an abstract of the page of the DokuWiki metadata system 
 +    * Value "global" 
 +      * A global value (specified with the configuration option "global_description") is used on every page 
 +    * Value "syntax" 
 +      * The keywords can be individually specified for each page
  
  
-=====Example===== +== Syntax == 
-The appended meta header of the [[http://symplus.edu-wiki.org/en/description_plugin|demo page]] is like this.+ 
 +(If configuration is set to "syntax"
 + 
 +<code> 
 +{{description>Place the page description here}} 
 +</code> 
 + 
 + 
 +===== Example =====
  
 <code> <code>
 ... ...
-<meta name="description" content="This DokuWiki plugin append an abstract of a page for a meta header. This functionality is applied to all pages by installing the plugin.   The appended meta headers of this page is like this.    ... &lt;meta name=&quot;description&quot; content=&quot;This DokuWiki plugin append an abstract of a page for a meta header. This functionality is applied to all pages by installing the plugin. ExampleA meta headers of this page is like this.&quot; /&gt; ..." />+<meta name="description" content="This DokuWiki plugin appends an abstract of a page for a meta header. This functionality is applied to all pages by installing the plugin.  
 +The appended meta headers of this page is like this.    ... &lt;meta name=&quot;description&quot; content=&quot;This DokuWiki plugin append an abstract of a page for a meta header.  
 +This functionality is applied to all pages by installing the plugin. Example meta headers of this page is like this.&quot; /&gt; ..." />
 ... ...
 </code> </code>
  
-=====Discussion===== 
-This looks like just the feature what I want. But how do I use it? I installed the plugin and I guess I was expecting an admin menu item or a Configuration section to allow me to enter the text I wanted. I can't see either of those. I can't work out how it get it going - Thanks. Chris 8Sep08    
-> This plugin only copies abstract created by DokuWiki (e.g. for RSS feed) to meta headers. The abstract is created from the beginning of the page. To alter it, you can use [[plugin:meta]] plugin, see description->abstract element. But changing it probably will change RSS feed output if you use abstract mode of RSS. --- //[[mail@mplicka.cz|Martin Plicka]] 2008/09/08 09:46// 
  
-Broken link for download was fixed.  --- [[user>iobataya]] //2010/11/09 14:18//+===== Discussion =====
  
-I modified the description function to make it more search engine friendly (max. 150 chars / max 30 words):+> This plugin only copies an abstract created by DokuWiki (e.g. for RSS feed) to meta headers. The abstract is created from the beginning of the page. To alter it, you can use [[plugin:meta]] plugin, see description->abstract element. But changing it probably will change RSS feed output if you use abstract mode of RSS. --- //[[mail@mplicka.cz|Martin Plicka]] 2008/09/08 09:46// 
 + 
 +\\ 
 + 
 +I modified the description function to make it more search engine friendly (max. 150 chars / max 30 words)
 +NewChecks if DOKU_MEDIADETAIL is set so no duplicate description tags will be generated for media detail view.
 <code php> <code php>
   function description(&$event, $param) {   function description(&$event, $param) {
Line 72: Line 97:
  }  }
  // END SEO Changes  // END SEO Changes
-      $m = array("name"=>"description","content"=>$a);      +      $m = array("name"=>"description","content"=>$a); 
 +      if(!defined('DOKU_MEDIADETAIL')){      
       $event->data['meta'][] = $m;       $event->data['meta'][] = $m;
 +      }
   }   }
 </code> </code>
 If you like it, you can use it :)  --- [[user>flam]] //2010/12/28 19:00// If you like it, you can use it :)  --- [[user>flam]] //2010/12/28 19:00//
 +
 +>I'm using this plugin also with the Keywords plugin. The abstract is actually not created from the beginning of the page but it takes all words marked with BOLD on my page www.riversedge.pl. Why? Any chances to fix it?  --- [[user>V-12]] //2011/08/18 10:54//
 +>> Edit: The abstract ignores styled text except bold text. Any chances to have this plugin working like the Keywords plugin where I can manually write description for a single page? --- [[user>V-12]] //2011/08/25 18:41//
 +>>>The syntax configuration option allows it.  --- [[user>lupo49|M. S.]] //2012/07/01 19:35//
 +
 +seems pagelist cannot pick up the output of this plugin in Weatherwax[[user>harald]]
 +
 +> Would be practical if syntax could override an abstract or global default description. [[user>molefunk]]
plugin/description.1295525214.txt.gz · Last modified: 2011-01-20 13:06 by lupo49

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki