On 10-Apr-10, at 4:33 PM, Suleman Siddiqui wrote:
I am new in Statusnet, so i am trying to be
more descriptive in my email to get helpful reply :). Basically i
want to add some extra functionality in subscribe button appearing
on users profile page (also some extra functionality for
Unsubscribe). By default, form action for subscribe button take it
to subscribe.php under Action folder and in this file there are two
functions 1)prepare and 2) handle and in handle function it calls
start function of subscrition.php under Classes folder which helps
in adding entry in subscription table in Database and also send
email to user who is being subscribed. Now in my case i need some
extra functionality to implement after hitting the subscription, so
how can i add this functionality without changing the core code of
StatusNet(talking about subscribe.php under Actions and
subscription.php under Classes). whether i need to add some file
under Plugins folder that can over-ride the subscribe.php files
function and also some new functions to add extra functionality?
Right, so it looks like you should hook into the EndSubscribe event,
which gets the subscriber and the subscribed user's passed to it.
Information on making a plugin can be found here: http://status.net/
wiki/Plugin_development
Look at some of the existing plugins for reference.
You should be able to put any processing you need in the
onEndSubscribe function of your plugin class to have that code run
after a new subscription is made.
_______________________________________________
StatusNet-dev mailing list
[email protected]
http://lists.status.net/mailman/listinfo/statusnet-dev