Hot answers tagged

5

Usually it's done on the install method of your addon. Best practice is to take advantage of ActiveRecord and a db->insert: $data = array( 'class' => $this->class, 'method' => $method ); ee()->db->insert('actions', $data); You don't need to specify an ACTion ID as this is auto incremented. You can find a bit more information in the ...


2

Take a look at the Code Ignitor Validation Helper. You can use this within PHP on an EE template, it really is as easy as this (example from the CI Docs), just replacing $this with a reference to EE : function gmail_only($value){ return ( stripos(strtolower($value), '@gmail.com') !== false ); } ee()->load->helper(array('form', '...


2

What data does the script which is being triggered with action URL accept? If that's EE form submission, then you should not worry if you follow standard EE forms security settings/practice. If it's a custom script that accepts ANY data, then you of course might need to add additional protection to it. There's a separate chapter in EE docs on security ...


2

There is no magic method for this, as far as I know. It's pretty standard that in the upd.your_addon.php file, in the install function, you just add rows to your exp_actions table like so: class Your_addon_upd { public $module_actions = array( 'my_action_method_one', 'my_action_method_two' ); public function install() { ...


1

After confirming your extension is installed with module. Have you registered your action in table exp_actions? If no, then first register your action with respected method name. If yes, then make sure method name which you've specified in the exp_actions should be declared in the mod.plugin_name.php. And check with just echoing sample text. After ...


1

I suggest you to use below code in mcp file of your module folder. url = BASE .'&'.'C=addons_modules'.'&'.'M=show_module_cp'.'&'.'module=MODULE_NAME'. '&' . 'method='.$method; $this->EE->cp->set_right_nav(array('Button Title' => $url));


1

Without knowing the details of your install and project, this questions is pretty impossible to answer in my opinion. First make sure you change $config['site_url'] = "http://domain.com/"; to $config['site_url'] = "/"; in your config file. $config['site_url'] = "//domain.com/"; may work also. If that doesn't do it, you'll need to identify the exact ...


Only top voted, non community-wiki answers of a minimum length are eligible