CB autoaction route triggers

1 year 6 months ago #330578 by activha
CB autoaction route triggers was created by activha
Hi

Trying to use onBuildRoute and onParseRoute on CB Activity plugin.

I have activities with following data :
asset : activha.group.group_id.event.groupjive_event_id.activation.user_id
params_activ : title_of_the_activity

and would like to construct SEF urls like menuitem/groupjive_event_name/title_of_the_activity

Do you think that it is doable with the mentioned triggers ?
Do I only need a code autoaction to do it ?
Would you have an exemple of implementation somewhere ?

I know that you are working on SEF urls for CB Activity 6.0 : will this allow something like I wrote ? (in this case I won't need these autoactions)

Thanks a lot for you input
 

Please Log in to join the conversation.

1 year 6 months ago #330588 by krileon
Replied by krileon on topic CB autoaction route triggers
Joomla events need to be prefixed with joomla_. You should be able to use those events, but you'll have to custom implement the entire rewrite and reversal process for the URLs. Yes you will need a Code action to do this as you'll have to use PHP to rewrite the URLs. Refer to Joomla's documentation for those events on how to do this.

I know that you are working on SEF urls for CB Activity 6.0 : will this allow something like I wrote ? (in this case I won't need these autoactions)

No, CB Activity will only SEF its own URLs. It won't reference GJ or any other external source in them.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

1 year 6 months ago #330589 by activha
Replied by activha on topic CB autoaction route triggers
OK but I thought that these two triggers were part of CB as they are documented in CB Triggers ?

Please Log in to join the conversation.

1 year 6 months ago #330596 by krileon
Replied by krileon on topic CB autoaction route triggers
Ah, sorry. Yes, those are used for plugin routing behavior. Their variables are as follows. Sorry, speed reading here.. too much to do not enough time. 
$_PLUGINS->trigger( 'onBuildRoute', array( $this, $plugin, &$segments, &$query, &$menuItem ) );
$_PLUGINS->trigger( 'onParseRoute', array( $this, $plugin, $segments, &$vars, $menuItem ) );

Take a look at the following for an example of how they are used.

/components/com_comprofiler/plugin/user/plug_cbgroupjive/library/Trigger/RouterTrigger.php


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

1 year 6 months ago #330597 by activha
Replied by activha on topic CB autoaction route triggers
Thanks for your time, will check it ;-)

Please Log in to join the conversation.

1 year 4 months ago #331437 by activha
Replied by activha on topic CB autoaction route triggers
I come back on this. In fact I only need to retrieve some data with the activity id to build the url but it's not easy to display variables with these triggers :-(

What function could I use to retrieve the asset and params of an activity with its id ?

Is it best to use ActivityTable or something else ?

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.304 seconds

Facebook Twitter LinkedIn