Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Auto-Action: How to execute a php script ?

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
11 years 3 months ago #230271 by dotcom22
hello

I would like execute a php script installed on my server with Auto-Action but I don't see which Type of action I'm supposed to use..

Any clue ?

thank

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: 48465
  • Thanks: 8280
  • Karma: 1443
11 years 3 months ago #230273 by krileon
Replied by krileon on topic Auto-Action: How to execute a php script ?
Use the Request action and perform a GET or POST request on your PHP file.


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
11 years 3 months ago #230276 by dotcom22
Replied by dotcom22 on topic Auto-Action: How to execute a php script ?
Ok thank I was not sure...

In fact my goal was to fire this script with trigger onBeforeUserUpdate. Then the script must make itself a Post request to a remote server and IF this request is well done (that mean the remote server is well reachable and will return OK message), the script must continue his process for update CB profile (when a user decide to make this task) as usual.

If I'm not wrong this process cannot be done with Auto-Action only (make a step by step action after waiting the returning message of remote server) and I wondering if I need to build a CB plugin or if is better to simply build a script who will be executed with Auto-Action.

Any advice ?

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: 48465
  • Thanks: 8280
  • Karma: 1443
11 years 3 months ago #230280 by krileon
Replied by krileon on topic Auto-Action: How to execute a php script ?
You'd need to develop a new plugin that can properly handle basically pausing/interrupting the profile update process. CB Auto Actions won't be able to do this as it's designed not to interrupt normal processes the best it can. You could try a Code action with method set to PHP, but that still may not interrupt the profile update.


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
11 years 3 months ago #230283 by dotcom22
Replied by dotcom22 on topic Auto-Action: How to execute a php script ?
OK I see..

Do you know if this kind of plugin will need to hack CB core file for work or if is not necessary ?

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: 48465
  • Thanks: 8280
  • Karma: 1443
11 years 3 months ago #230289 by krileon
Replied by krileon on topic Auto-Action: How to execute a php script ?
No, you need to make a new CB plugin that acts on the before profile update trigger and perform your PHP code there and if your PHP code meets a condition where it should fail you'd need to set an error in the user object, which would stop the profile update and show profile update with your error.

You can try using a Code action with Method set to PHP then you'd trigger an error with the below, but again I don't know if this would work or not in CB Auto Actions.
Code:
global $_PLUGINS; $_PLUGINS->_setErrorMSG( 'This is my error message' ); $_PLUGINS->raiseError( 1 );


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.
The following user(s) said Thank You: dotcom22

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

Moderators: beatnantkrileon
Powered by Kunena Forum