Thank you for quick response,

                       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? Sorry for my weak explanation in last email. If there is
something missing again in my explanation then please acknowledge me, i will
elaborate it more.

Regard's
Suleman Siddiqui


On Sat, Apr 10, 2010 at 10:40 PM, Christopher Vollick <[email protected]>wrote:

> On 10-Apr-10, at 6:58 AM, Suleman Siddiqui wrote:
>
>>    I was working in status net, and wants to make subscription a separate
>> plugin. After some read and development I came to know that I have to either
>> change a core file (action/all.php) to alter the form action for subscribe
>> button (in profile page so that it will post it to my custom class) or have
>> to modify subscribe class(classes/subscribe.php). This means I am making
>> changes to the core of the status net, latter on for upgradation to next
>> versions will update the files and my added functionality will be
>> over-ridden. Please suggest me some way so that I can over-ride the profle
>> page subscribe action or over-ride the subscribe class functionality to
>> perform my custom actions. Is it possible to over-ride the handle function?
>> Like we can over-ride the Custom navigation menu tabs by making their
>> functions in plugins.
>>
>
> I don't know exactly what you want to do, but you should be able to hook
> into the StartSubscribe event and return 'false' if you want to completely
> override, or prevent, subscription, or you could hook into the EndSubscribe
> event if you want to perform some action when subscriptions are made.
>
> Depending on what you're doing it may also be useful to hook into the
> corresponding Unsubscribe event.
>
>
>  Secondly, Please suggest me the way to generate models for my custom
>> tables.
>>
>
> This is currently a slightly complex procedure. At least I feel it is.
>
> You should look at the OpenID plugin.
> The User_openid.php file, for example, contains the DB_DataObject class
> that represents the table, including the required staticGet(), table(),
> keys(), keyTypes(), and sometimes sequenceKey() functions.
>
> Then that class is loaded by the onAutoload() function of OpenIDPlugin.php,
> and the  table is made in the onCheckSchema() function also in
> OpenIDPlugin.php.
>
_______________________________________________
StatusNet-dev mailing list
[email protected]
http://lists.status.net/mailman/listinfo/statusnet-dev

Reply via email to