Gossamer Forum
Home : Products : Others : Gossamer Community :

GTComm Plug In Question

Quote Reply
GTComm Plug In Question
Hi:

Trying to write a plug-in for GTCom, and create my own hook, and I am not sure how. Hopefully someone will know!

OK, I want to replace sub insert in Community::Apps::Local::LinksSQL with my own code.

When I get to Add New Hook, what do I add?

Community::Apps::Local::LinksSQL
Community::Apps::Local::LinksSQL::
Community::Apps::Local::LinksSQL::insert


or none of these? Do I leave Code as-is (Plugins::Community::Update_Links::)?

Finally, for the plug-in code itself, do I run it as: sub { }, or do I rename it to sub insert { } for the sub I am replacing?

I have tried a few different versions of these, and so far, none work...

(Oh, and yes, I do have GT::Plugins->action ( STOP ); right in there to REPLACE the existing code...)

Thanks!
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] GTComm Plug In Question In reply to
Oh- Alex:

Forgot to mention, just a TINY bug in the help pages for GTComm. The link to Help for plug-ins is to 'help_plugin.html', but the file is saved as 'help_plugins.html'

Is there a place in the help files that explains how to create your own hook? I did not find it....
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] GTComm Plug In Question In reply to
I think I might have found something... do I need to add

"use GT::Plugins;"

to the top of this script to get it to work?

dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] GTComm Plug In Question In reply to
Hi, I have been reading the forum and need that sort of advice too - this seems to be not discussed in any detail.

I can't find any docu on how you would go about hooking your own apps to authenticate from Community. Looking over the private/Pluggins examples I still can't see how you'd go about using Community to authenticate for your own apps.

It would seem easier just to look for the session cookie and go directly back into the database and pull the sess_user_fk out of the session table. Is this a viable option or am I missing something?

If somebody could explain how you are supposed to use community for your third party apps that would be great.

thanks doug