[dokuwiki] Re: Question about tpl_button('subscribe')

  • From: Anika Henke <anika@xxxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 21 Feb 2011 00:35:24 +0000

On 09.02.2011 21:33, Andreas Haerter wrote:
small question regarding template development, Release Notes for Release
2010-11-07 "Anteater":
improved email subscriptions
Template authors need to check if they implement the correct button

The vector and monobook template are not using tpl_button() but the
following code to get (un)subscribe tabs:
<https://github.com/andreashaerter/dokuwiki-template-vector/blob/master/conf/tabs.php#L144>

can someone explain what changed internally and/or if I have
to adapt vector and monobook?

As an action "unsubscribe" doesn't exist anymore. That's why your 'elseif (actionOK("unsubscribe"))' is never executed.

Before this change [1] (and some others later one), there were two buttons: "(un)subscribe page" and "(un)subscribe namespace". Now there is only "?do=subscribe" which leads to the new "Subscription Management" page in which all (un)subscriptions to page and namespace are handled.

So, you only need to *always* show the subscribe button/link/tab, no matter if the user is already subscribed or not. (Because if a user needs to subscribe or unsubscribe is differently reflected on that page now.)

Hope that explains everything,
Anika


[1] https://github.com/splitbrain/dokuwiki/commit/5b75cd1f5c479ada468fbf62a733c54edad152f1
--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: