Gossamer Forum
Home : Products : DBMan SQL : Discussion :

How to access the object data in a ver 2.0 plugin?

Quote Reply
How to access the object data in a ver 2.0 plugin?
Hi,

i would like to use the plugin system for my mods. I am trying different things, just to get used to it. But as soon as i need access to the hashes cgi, in, user etc. i got stuck.

It seems as if the plugin does not get any data. @_ is empty. Please give me a hint.

For example, if i would just rebuild the standard sub search_results. How would i put this function into a plugin?

Thanks to get me started.

Henning
Quote Reply
Re: [ktt] How to access the object data in a ver 2.0 plugin? In reply to
Hi Henning,

I believe it will be fixed in next update DBMan SQL 2.0.1 and @_ will return the self of dbsql then you can change them as much as you want. Also, 2.0.1 will have file upload built-in and some bugs fixed
Cheers,
doublemint
Quote Reply
Re: [ktt] How to access the object data in a ver 2.0 plugin? In reply to
Hi,

In 2.0.1, plugin hooks now get $self as the first parameter. This contains:

$self->{in} # a GT::CGI object
$self->{cgi} # a hash of current form input
$self->{sql} # a GT::SQL object connected to the database
$self->{glb_cfg} # a hash of global config options
$self->{cfg} # current table options (like view permissions, etc)
$self->{user} # a hash of currently logged in user.

Let me know if you have any questions!

Cheers,

Alex
--
Gossamer Threads Inc.