In order of providing more power to Documentation, it is needed a HOWTO to let developers understand the whole picture. Following is a first draft:

------------

Subscriptions module is able to be extended by add-ons like its own for: Content, Blogs and Taxonomy (both depending on Content).

USER INTERFACE
In order of let users manage their subscriptions and administrators manage user and global settings, You may implement following hooks:

_hook_types()
This is a key function for providing useful information about your module, it is used to construct your plug-in sub-tab in Subscriptions settings in user account and admin settings for defaults. This also returns the name of access permission in order of control user permissions for your add-on.
Example 1:

  $t = get_t();
  $types['myplugin'] = array(
    'title' => $t('sub-tab label'),
    'access' => $t('subscribe to my add-on'),
    'page' => 'module_page_myplugin',
    'fields' => array('myplugin', 'myplugin_nid'),
    'weight' => -5,
  );
  return $types;

hook_count_user_subscriptions()
In order of provide a count of subscriptions a user have within your plug-in, ie: amount of blogs a user is subscribed.

_hook_node_options()
Subscriptions_UI provides a User Interface for users to manage subscriptions by providing a form in every node (a.k.a subscriptions controls), if you want to add an option for your plug-in you implement this function. See also: hook_form_alter(), in order of customize node form before render.

hook_mailkeys()
In order of let Mail Editor manage your plug-in's mail templates. Since Subscriptions module depends on mail_edit.

SUBSCRIPTIONS FRAMEWORK
Once You know how to construct an UI for our add-on, it is time of deal with queue, subscription types and fields for mailvars.
hook_subscriptions()
It is on charge of rooting sub-hooks.

------------

Blessings!

Comments

develcuy’s picture

In order of easy development of this HOWTO, I've posted it to a wiki at: http://groups.drupal.org/node/9818. Suggested by gustav.

Blessings!

gustav’s picture

develCuy, I am really looking forward to having such a HOW TO. I hope you will find the time to continue to develop that page. Given that you have just written the subscriptions_og plugin you are well-placed to write this HOW TO. But I would also be grateful for anyone else who contributed. (Apparently there is currently a bug with editing the wiki on groups.drupal.org. I have submitted a bug report at http://drupal.org/node/234809)

Rustan’s picture

Status: Active » Closed (won't fix)

Closing, too old