Skip to Content Skip to Menu

Plugin API Help

  • p9939068
  • p9939068
  • OFFLINE
  • Posts: 186
  • Thanks: 0
  • Karma: 117
17 years 10 months ago #26642 by p9939068
Plugin API Help was created by p9939068
Hi,
I am currently creating a plugin that manipulates connections adding. For example, if a particular user is a Merchant (based on a CB field of the user), then the plugin will execute its codes and then halt the rest of CB's own connections adding codes. I am doing this through onBeforeAddConnection.

My initial idea was if the condition is satisfied (ie, the person being added is a merchant), it will execute my codes and then call for a [code:1]
$this->_setErrorMSG("Merchant added"«»);
return false;
[/code:1]
Reading through the API, i assumed this will result in a javascript popup, and then stop CB's own codes. Or was i wrong? Is there a way to do that?

Also, is there a way to get the $option variable (either global or from the URI) during the execution of the bot plugin?

Any help is greatly appreciated! Thanks in advance!

Regards, Mike


Mike Feng
Creator of SIMGallery, SIMAnswers, and ParaInvite
www.simbunch.com
twitter.com/simbunch

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

  • p9939068
  • p9939068
  • OFFLINE
  • Posts: 186
  • Thanks: 0
  • Karma: 117
17 years 10 months ago #26646 by p9939068
Replied by p9939068 on topic Re:Plugin API Help
Ok i solved that partially. I should be using $_PLUGINS-> instead of this->.

The problem now is the alert message ends with a "\n" even when i did not add that. eg "Merchant added. \n"

I'm totally clueless about this :(

Rgds, Mike


Mike Feng
Creator of SIMGallery, SIMAnswers, and ParaInvite
www.simbunch.com
twitter.com/simbunch

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

Moderators: beatnantkrileon
Powered by Kunena Forum