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 [2009-09-04 15:11] 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 11: Line 11:
 conflicts  : conflicts  :
 similar    : similar    :
-tags       : abonnement, subscription +tags       : listing, users, subscription
-----+
  
-^ Download | http://membres.lycos.fr/emauvais/dokuwiki/listeabo.tar.gz |+downloadurl: http://emauvaisfr.free.fr/dokuwiki/listeabo.tar.gz 
 +bugtracker : 
 +sourcerepo : 
 +donationurl: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=79ZVTRTJ52DDY&lc=FR&item_name=Plugin%20dokuwiki%20%28Etienne%20M%2e%29&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted 
 +----
  
 ===== Description ===== ===== Description =====
Line 81: Line 84:
   * 2008-10-06: Better superuser detection.   * 2008-10-06: Better superuser detection.
   * 2008-11-26: German language added (thanks to Otto R.)   * 2008-11-26: German language added (thanks to Otto R.)
-  * 2009-01-05: Bugs corrected: BOM in the german lang.php file and error message when there are no subscriptions yet (thanks to Benjamin).+  * 2009-01-05: Bugs corrected: BOM in the German lang.php file and error message when there are no subscriptions yet (thanks to Benjamin).
  
 ===== Discussion ===== ===== Discussion =====
   * Tell me...   * Tell me...
   *    * 
-==== 2009-09-04 ==== 
-Good plugin - Tank You! 
  
-//Info:// The plugin requires the [[plugin:pagelist]] plugin for displaying the subscriptions. 
- 
-//Error://  
-The unsubscribe Button in the list view doesn't work for namespace subscriptions. It links to\\ ''doku.php/namespace1:namespace2:?do=unsubscribens'' 
- 
-It jumps to the start page, but doesn't unsubscribe the namespace subscription. 
-I don't know whow I can correct this behaviour. 
- 
-(dokuwiki 2009-02-14b) 
- 
-==== 2009-08-17 Installation error ==== 
- 
-Hello, 
- 
-There is an error when I try to install the plugin with the Plugin Manager : 
- 
-  Impossible de télécharger le fichier du plugin: 
-  http://membres.lycos.fr/emauvais/dokuwiki/listeabo.tar.gz 
-   
-  Warning: gzinflate() [function.gzinflate]: data error in /homez.195/giquello/www/cyrille/inc/HTTPClient.php on line 381 
- 
-But it works when I do it by hand ... 
- 
-(PHP Version 5.2.10 and dokuwiki-2009-02-14b.tgz) 
  
  
Line 151: Line 128:
 >Thanks! Corrected in the new version (2009-01-05) >Thanks! Corrected in the new version (2009-01-05)
 >Happy new year! >Happy new year!
 +
 +==== 2009-08-17 Installation error ====
 +
 +Hello,
 +
 +There is an error when I try to install the plugin with the Plugin Manager :
 +
 +  Impossible de télécharger le fichier du plugin:
 +  http://membres.lycos.fr/emauvais/dokuwiki/listeabo.tar.gz
 +  
 +  Warning: gzinflate() [function.gzinflate]: data error in /homez.195/giquello/www/cyrille/inc/HTTPClient.php on line 381
 +
 +But it works when I do it by hand ...
 +
 +(PHP Version 5.2.10 and DokuWiki-2009-02-14b.tgz)
 +
 +==== 2009-09-04 ====
 +Good plugin - Tank You!
 +
 +//Info:// The plugin requires the [[plugin:pagelist]] plugin for displaying the subscriptions.
 +
 +//Error:// 
 +The unsubscribe Button in the list view doesn't work for namespace subscriptions. It links to\\ ''doku.php/namespace1:namespace2:?do=unsubscribens''
 +
 +It jumps to the start page, but doesn't unsubscribe the namespace subscription.\\
 +I don't know how I can correct this behaviour.
 +
 +(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 ====
 +(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):
 +<code php>
 +...
 + case 'subscribens':
 +      if($conf['useacl'] && $auth && $ACT == 'show' && $conf['subscribers'] == 1){
 +        if($_SERVER['REMOTE_USER']){
 +          if($INFO['subscribedns']) {
 +            if(actionOK('unsubscribens'))
 +              $out .= tpl_link(wl($ID,'do=unsubscribens'),
 +                     $pre.(($inner)?$inner:$lang['btn_unsubscribens']).$suf,
 +                     'class="action unsubscribens" rel="nofollow"',1);
 +          } else {
 +            if(actionOK('subscribens'))
 +              $out .= tpl_link(wl($ID,'do=subscribens'),
 +                     $pre.(($inner)?$inner:$lang['btn_subscribens']).$suf,
 +                     'class="action subscribens" rel="nofollow"',1);
 +          }
 +              
 +              //listeabo
 +              $out .= tpl_link(wl($ID,'do=listeabo'),
 +                     $pre.(($inner)?$inner:$lang['btn_listeabo']).$suf,
 +                     'class="action subscribens" rel="nofollow"',1);
 +              //listeabo
 +
 +        }
 +      }
 +...
 +</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.1252069892.txt.gz · Last modified: 2009-09-04 15:11 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