Gossamer Forum
Home : Products : Others : Gossamer Community :

Using my own do= actions?

Quote Reply
Using my own do= actions?
Is it possible to use my own do= action?
ie.: http://site/cgi-bin/g/community.cgi?do=user_action

I don't see that there is possible to use my own action, since:
- community.cgi filters to one of wap_*, user_*, admin_*
- then Community::Web::User::process($do) filters to one of following valid user actions: user_login, user_signup, user_signup_keyimage, user_lostpw, user_profile, user_verify, user_logout, user_home
- then the $do = exists $valid{$do} ? $do : 'user_home'; overrides any invalid user action with 'user_home'

That makes impossible the plugin development with my own actions. It allows only to extend the available actions with plugin hooks, but nothing more. Frown

Is there any possibility what I didn't notice, and still make available to use my own actions???

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Using my own do= actions? In reply to
Same problem here:
http://www.gossamer-threads.com/...i?post=254980#254980

I would also appreciate it if actions could be added.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Using my own do= actions? In reply to
I suppose would be enough if the action dispatcher would:
  1. Look in valid action list, and call the valid web_$do hook with plugin dispatcher
  2. If it's not a valid action (custom action), call the custom web_$do hook with plugin dispatcher
  3. If none was successful, display default page. Also, if we are in debug mode, log an error, that action doesn't exists.


Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: Mar 8, 2004, 10:42 AM
Quote Reply
Re: [webmaster33] Using my own do= actions? In reply to
Hi,

I'll add hooks for all process() functions in the next release which will hopefully be out tomorrow or Monday.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Using my own do= actions? In reply to
I aggree, to have hook on process() functions.

But I think it would be also fine to add hook to web_$do as I suggested in my previous post.
This would be similar to the site_html_${plugin_function} which is used in Links SQL.
I think it would be useful.

While hook on process() function is useful to replace the whole process() function,
the hook on web_$do would simply help to expand with new actions.

Opinion?

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [Alex] Using my own do= actions? In reply to
Alex,

In the GCommunity v1.0.2 I still miss the feature to be able to call my own 'do' actions, like do=user_bbb
This code in Community::Web::User::process is preventing to use my own do actions:
Code:
$do = exists $valid{$do} ? $do : 'user_home';

It means, that if there is no valid do action, then only the default 'user_home' page is displayed.
I don't even have the chance to create my own do action. I could use a hook to workaround the problem, but that would mean more work.
This limitation cuts a lot possibilities, and makes GComm plugin development difficulter.

Do you see any possibility to implement this into GCommunity v1.0.3 release?

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...