DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:usersubscriptions

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
Next revisionBoth sides next revision
plugin:usersubscriptions [2010-12-05 20:22] 85.179.149.63plugin:usersubscriptions [2019-08-11 18:09] Aleksandr
Line 1: Line 1:
-====== usersubscriptions plugin ======+====== usersubscriptions Plugin ======
  
 ---- plugin ---- ---- plugin ----
Line 17: Line 17:
 sourcerepo :  sourcerepo : 
 donationurl:  donationurl: 
 +
 +screenshot_img: 
 ---- ----
  
 ===== Description ===== ===== Description =====
  
-The Syntax [[plugins|Plugin]] allows to display the subscription list of the current user. It can display list for a specific namespace, the current namespace or all namespaces. In addition, it provides a quick way to subscribe or unsubscribe.+The Syntax Plugin allows to display the subscription list of the current user. It can display list for a specific namespace, the current namespace or all namespaces. In addition, it provides a quick way to subscribe or unsubscribe.
  
-//2009-01-27 Added ACL check for quick subscribe dropdown filling//\\  +  * 2010-09-24merged some patches (thx to "MR") and fixed caching issue 
-//2009-01-26 : inherited subscription display option added, recursive parent subscription check fixed//\\  +  2009-09-15: added template for easy styling, fixed some bugs (img paths...) and added regexp based item exclusion (for _template, sidebar...) 
-//2009-09-15 : added template for easy styling, fixed some bugs (img paths ...) and added regexp based item exclusion (for _template, sidebar ...)//\\  +  * 2009-01-27Added ACL check for quick subscribe dropdown filling 
-//2010-09-24 merged some patches (thx to "MR") and fixed caching issue//\\ +  * 2009-01-26: inherited subscription display option added, recursive parent subscription check fixed
  
-//En, De, Pt, Es and Fr lang files included, translations are welcome ...//\\ +//En, De, Pt, Es and Fr lang files included, translations are welcome...//
  
 //**Many thanks to Thomas and Mark for the De lang file, to RC for Pt lang file and to Federico for Es lang file**// //**Many thanks to Thomas and Mark for the De lang file, to RC for Pt lang file and to Federico for Es lang file**//
Line 36: Line 38:
   <usersubscriptions [ns] [r[=[N]]] [deletelink] [quicksubscribe] [displayinheritedsubscriptions] />   <usersubscriptions [ns] [r[=[N]]] [deletelink] [quicksubscribe] [displayinheritedsubscriptions] />
  
-  * [ns] base namespace, MUST BE PRESENT IF OTHER OPTIONS ARE USED\\ Can be either empty or . for targeting the current namespace,\\ * for targeting all namespaces or a specific namespace\\ (must be absolute) +  * ''[ns]'' --- base namespace, MUST BE PRESENT IF OTHER OPTIONS ARE USED.\\ Can be either empty or\\ ''.'' for targeting the current namespace,\\ ''*'' for targeting all namespaces or a specific namespace (must be absolute) 
-  * [r[=[N]]] recursive option, if only "ror "r=are mentioned the\\ maximum depth is infinite, if a number is passed it indicates\\ how much successive namespaces will be explored\\ (ex : r=0 means only the current namespace, r=3 means 3 levels in depth) +  * ''[r[=[N]]]'' --- recursive option, if only ''r'' or ''r='' are mentioned the maximum depth is infinite, if a number is passed it indicates how much successive namespaces will be explored (ex.''r=0'' means only the current namespace, ''r=3'' means 3 levels in depth) 
-  * [deletelink] if present a link to unsubscribe is displayed +  * ''[deletelink]'' --- if present a link to unsubscribe is displayed 
-  * [quicksubscribe] if present a form is displayed to allow the user\\ to quick-subscribe +  * ''[quicksubscribe]'' --- if present a form is displayed to allow the user to quick-subscribe 
-  * [displayinheritedsubscriptions] if present elements that are subscribed\\ because the user subscribed to a parent namespace.+  * ''[displayinheritedsubscriptions]'' --- if present elements that are subscribed because the user subscribed to a parent namespace.
  
  
 ===== Download and Installation ===== ===== Download and Installation =====
  
-Download and install the plugin using the [[plugin:plugin|Plugin Manager]] using the following URL. Refer to [[:Plugins]] on how to install plugins manually.+Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
   * [[http://dokuwiki.yent.eu/usersubscriptions.zip]]   * [[http://dokuwiki.yent.eu/usersubscriptions.zip]]
Line 52: Line 54:
  
 ===== Screenshot ===== ===== Screenshot =====
-   Generated by putting <usersubscriptions * r deletelink quicksubscribe /> in the page.+ 
 +Generated by putting ''<usersubscriptions * r deletelink quicksubscribe />'' in the page.
  
 {{ http://dokuwiki.yent.eu/usersubscriptions_screenshot.png?nocache }} {{ http://dokuwiki.yent.eu/usersubscriptions_screenshot.png?nocache }}
  
 ===== Discussion ===== ===== Discussion =====
 +
 ==== 2009-05-01 ==== ==== 2009-05-01 ====
 +
   * "src" values for <img> elements are broken for any site that has a non-default directory structure.  For example we have DokuWiki installed to /wiki instead of /.   * "src" values for <img> elements are broken for any site that has a non-default directory structure.  For example we have DokuWiki installed to /wiki instead of /.
   * A similar problem exists for the URL of a background element in the style.css file.   * A similar problem exists for the URL of a background element in the style.css file.
Line 190: Line 195:
 --------------- ---------------
 Did you add NOCACHE to the page? Did you add NOCACHE to the page?
 +>no, I didn't - it works properly after including a <code>~~NOCACHE~~</code> to the page - thx!
  
 ==== 2010-09-24 ==== ==== 2010-09-24 ====
Line 200: Line 206:
 "Fatal error: Call to undefined function is_subscribed() in /.../lib/plugins/usersubscriptions/syntax.php on line 174" "Fatal error: Call to undefined function is_subscribed() in /.../lib/plugins/usersubscriptions/syntax.php on line 174"
 Is there a new Plugin-Version on the horizon or can you help me? Is there a new Plugin-Version on the horizon or can you help me?
 +
 +> Indeed the is_subscribed() function has disappeared from Dokuwiki (it was used through an include inside the plugin).
 +> A quick "dirty" fix is to copy the function in the syntax.php file of the plugin. A good place is between the includes and the class (the function shall absolutely be out of the class definition).
 +> Below a copy of the code coming from the former release of Dokuwiki
 +  function is_subscribed($id,$uid,$ns=false){
 +    if(!$ns) {
 +      $file=metaFN($id,'.mlist');
 +    } else {
 +      if(!getNS($id)) {
 +        $file = metaFN(getNS($id),'.mlist');
 +      } else {
 +        $file = metaFN(getNS($id),'/.mlist');
 +      }
 +    }
 +    if (@file_exists($file)) {
 +      $mlist = file($file);
 +      $pos = array_search($uid."\n",$mlist);
 +      return is_int($pos);
 +    }
 +    return false;
 +  }
 +  
 +It should probably be more proper to work on a patch that will use the new Dokuwiki functions, but I don't have enough time at now.
 +> Hope this help, waiting for a better solution
 +> MR (2010-12-08)
 +
 +**Thank you very much, it works fine now! thumbup**
 +
 +
 +==== 2014-04-04 ====
 +
 +I have installed this plug in, yet now this appears
 +  Fatal error: Call to undefined function is_subscribed() 
 +  in lib\plugins\usersubscriptions\syntax.php on line 178
 +Can someone help me please?
plugin/usersubscriptions.txt · Last modified: 2023-12-17 21:29 by Aleksandr

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