Skip to Content Skip to Menu

Apply a trigger to submit button

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
10 years 6 months ago #243859 by dotcom22
Replied by dotcom22 on topic Apply a trigger to submit button
I tested with internalUsers trigger and that work well :cheer:

However I don't see how to create/differentiate multiple "event" when using the same trigger. The Internal Users URL seem to not be customizable except by passing one or more userid. Conditions in action seem to not be usable (for determinate which link has been clicked and fire or not the action) because they are related to CB user and not to content.

My goal was to fire different action on different links and not to fire all Auto-Action who use internalUsers trigger.

For example if it was possible to pass a custom value inside Internal Users URL (such &item=video2) and to set a condition "video2" inside Action, this could determinate if
the action must or not be fired. Like that is possible to create as many action needed based of the number of different links.

any clue ?

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 6 months ago #243883 by krileon
Replied by krileon on topic Apply a trigger to submit button

However I don't see how to create/differentiate multiple "event" when using the same trigger.

Use a GET variable. Example as follows.

index.php?option=com_comprofiler&task=pluginclass&plugin=cbautoactions&action=users&token=TOKEN&Itemid=494&format=raw&test=123

Notice I've now added "&test=123" to the URL. Now in your conditional you can do the following.

Conditional: [get_test] Equal To 123


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 or Create an account to join the conversation.

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
10 years 6 months ago #243940 by dotcom22
Replied by dotcom22 on topic Apply a trigger to submit button
Excellent work well... :woohoo:

Please last point:

Using as is the "Internal Users URL" in my link is not very secure because the token is supposed to be private. Furthermore the url redirect to a blank page.

I found a workaround:

- I placed my link "Click here" in Article1 and when I click, I'm redirect to Article2
- I placed in Article2 a Javascript window.location who redirect to "Internal Users URL"
- Finally I created a Redirect Auto-Action who fire whit internalUsers trigger + get condition for redirect user to a page of my choice (more less a thank you page).

This trick allow to "hide" the Internal Users URL and to avoid blank page. However this is not a very elegant and ideal way. Have you another suggestion ?

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 6 months ago #243957 by krileon
Replied by krileon on topic Apply a trigger to submit button
Those URLs weren't intended for frontend usage as it opens them for abuse. There's really no other way to do it though. Even if URLs were implemented with no token usage it's still easy for a user to just keep clicking the URL over and over.

I'll implement some additional URLs for next release, but it's pretty much the same situation. A new URL planned is internalAction, which will pull &action=ACTION_ID from the URL and only execute on actions with the trigger and with the matching ID. So basically a URL to fire a specific action.

Your double article trick only works for those who are unfamiliar with their browsers developer console. So it doesn't really do anything to stop those who have bad intentions as they'll know to press F12 and monitor the network data and grab the URL easily.

The redirection is the correct usage to get away from the blank page. There's no real intentions of changing that. You can remove "format=raw" from the URL if you want and it'll then show Joomlas template, but as the page has no output it'll still be blank unless you use a Code action to output something.


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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum