DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:listeabo

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:listeabo [2010-03-29 17:31] – template custimization in lemming 194.120.150.21plugin:listeabo [2016-01-22 10:44] (current) Aleksandr
Line 2: Line 2:
  
 ---- plugin ---- ---- plugin ----
-description: Affiche la liste des abonnements / Displays the subscription list+description: Displays the subscription list (fr: Affiche la liste des abonnements)
 author     : Etienne M. author     : Etienne M.
 email      : emauvaisfr@yahoo.fr email      : emauvaisfr@yahoo.fr
Line 142: Line 142:
 But it works when I do it by hand ... But it works when I do it by hand ...
  
-(PHP Version 5.2.10 and dokuwiki-2009-02-14b.tgz)+(PHP Version 5.2.10 and DokuWiki-2009-02-14b.tgz)
  
 ==== 2009-09-04 ==== ==== 2009-09-04 ====
Line 155: Line 155:
 I don't know how I can correct this behaviour. I don't know how I can correct this behaviour.
  
-(dokuwiki 2009-02-14b)+(DokuWiki 2009-02-14b) 
 + 
 +I fixed it. It links now on a namespace subscriptions to the first page which is found in the namespace. 
 + 
 + 
 +on line 126 I replaced: 
 +<code php> 
 +            else { 
 +                    if($page==''
 +                      $page = "root"; 
 +              print $this->getLang('abo_cat')." \"".preg_replace("/:$/","",$page)."\""; 
 +              $nbCat++; 
 +            } 
 +</code>             
 +with this 
 +<code php> 
 +            else { 
 + if($page==''
 + $page = "root"; 
 + else  
 + $page = $this->next_file($page); 
 +              print $this->getLang('abo_cat')." \"".preg_replace("/:.[^:]*$/","",$page)."\""; 
 +              $nbCat++; 
 +            } 
 +</code>             
 +and added this function: 
 +<code php> 
 +    function next_file($wiki_dir){ 
 +    global $conf; 
 +    $dir = $conf['savedir'].'/pages/'.$wiki_dir;  
 +    $dir = str_replace(":","/",$dir);     
 +     if($dh = opendir($dir)) { 
 +     while(($file = readdir($dh)) !== false) { 
 + if($file != "." && $file != "..") { 
 + if (is_file($dir.$file)) 
 +
 +               closedir($dh); 
 +               $file = str_replace(".txt","",$file); 
 +               return $wiki_dir.$file;                
 +
 +
 +
 +
 +
 +</code>     
 +(DokuWiki 2009-12-25c "Lemming"
 +     
 +//[[arno.puschmann@it-ng.com|apuschmann]] 2010/04/12 16:22// 
 +             
 +             
 + 
 +             
  
 ==== 2010-03-29 Adding button in Lemming ==== ==== 2010-03-29 Adding button in Lemming ====
-(dokuwiki 2009-12-25c)+(DokuWiki 2009-12-25c)
  
-The file ''<dokuwiki>/inc/template.php'' has changed in this dokuwiki version. The [[#template_customization|Template custimization]] to add the button as described above isn't up to date. I'm not sure if it is right but following worked for me. I added only following three lines to ''template.php'' (between %%//%%listeabo):+The file ''<dokuwiki>/inc/template.php'' has changed in this DokuWiki version. The [[#template_customization|Template custimization]] to add the button as described above isn't up to date. I'm not sure if it is right but following worked for me. I added only following three lines to ''template.php'' (between %%//%%listeabo):
 <code php> <code php>
 ... ...
Line 188: Line 240:
 ... ...
 </code> </code>
 +
 +==== Display fix for Anteater (and newer) versions ====
 +
 +Since Anteater DokuWiki stores additional data about digest mail subscriptions in the *.mlist files. This prevents the plugin from displaying the usernames in a proper way.
 +To re-enable the "good look" you could add the following three lines to your action.php: [[https://github.com/lupo49/plugin-listeabo/commit/ef2fcd1acba9707dd581d0ba12e199f6a4d11564#L0R94|action.php - Line 94-96]]  --- [[user>lupo49|M. S.]] //2011/04/29 20:52//
 +
 +==== To make it work under Angua ====
 +
 +I actually like this plugin but I was only interested in the Admin-part here so no guarantee for the rest of this. \\
 +In addition to the digest-patch above some HTML-Escape characters in the .mlist files needed to be replaced. There is probably some function that does this and catches some more escapes, but I do not know it. So the full patch  is:
 +
 +<code php>
 +...
 +foreach(file($page) as $nom) {
 +$nom=chop($nom);
 +
 +//added code at line 90
 +// Discard digest information of the line
 +$digest = strpos($nom, ' ');
 +if($digest) $nom = substr($nom, 0, $digest);
 +
 +$search = array("%5f", "%2d");
 +$replace = array("_", "-");
 +$nom = str_replace($search, $replace,$nom);
 +//and added code
 + ...
 +</code>
 +
 +Also the table layout can be improved, but that's a matter of taste. \\
 +You should also have a look at the english lang.php. \\
 +Watch out for the hardcoded "doku.php" string in action.php when the URL for pages is constructed in case you renamed that file.
 +
 +
 +==== Required: Remove not existing users from Abo ====
 +It would be nice, if there would be a possibility in the admin area of this plugin, to clean the ''.mlist'' files from entries of users, that do not longer exist... Thanks in advance!
 +
plugin/listeabo.1269876664.txt.gz · Last modified: 2010-03-29 17:31 by 194.120.150.21

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