23

The following list should get you started: ExpressionEngine Add-On Development Docs: links to guidelines, reference material, and tutorials for developing Plugins, Modules, and Extensions for ExpressionEngine ExpressionEngine Add-on Development Recipes: a collection of articles and tutorials to help you learn how to build ExpressionEngine add-ons Add-On ...


11

In this case, I think building your own settings table is the way to go for sure. Using the settings column should really only be for very minor yes/no types of settings, not storing actual data. Especially when you get into supporting MSM, where you need settings for each site, it can get hairy fast. Plus, then your data is more easily searchable and ...


11

There are a couple of ways to create plugins which return entry IDs like that. The first, and most obvious, is for your plugin to return a pipe-separated list of entries, which is then passed to a channel entries tag. In your plugin file: $tag_vars = array(array('search_entry_ids' => '4|6|12|19')); $this->return_data = $this->EE->TMPL->...


9

$variables[] = array('variable_name' => 'Your value'); $variables[] = array('variable_name' => 'Different Value'); $variables[] = array('variable_name' => 'Another one'); $this->return_data = $this->EE->TMPL->parse_variables($this->EE->TMPL->tagdata, $variables); It is important to not manually specify indexes for the $...


6

I think you're looking for this page in the EE Developer docs. Basically, if you only need the JS in the Control Panel (so not on the front-end of the site), put your JS files in the /your_addon_package/javascript/ folder and then use $this->EE->cp->load_package_js('my_file'); to load it. If you need the JS outside of the CP as well, you need to ...


6

This is a bit of an undocumented feature, but it works like this. In your extension, add a class variable called $required_by, with an array of values: $required_by = array('module'); ('module' is actually the only acceptable array value here, as neither plugins nor accessories have installation routines, which are needed for this to work.) Note that ...


6

I've created an extension that'll let you do it. https://github.com/jazonv/SafeCracker-HTML5-Attributes In addition to data-foo="bar", it'll also lets you use autocomplete="no" and novalidate="novalidate". (Inspired by this gist by Objective HTML) Disclaimer: I'm by no means a PHP/Add-on dev. I just wanted to 'have a go' too. Hopefully there's nothing ...


6

While you can't actually parse the tag using your custom module, you can pass parameters to the channel module and run it. Here's a code sample: function your_module_method() { // Set the parameters for the channel:entries tag $this->EE->TMPL->tagparams['entry_id'] = $entry_ids; $this->EE->TMPL->tagparams['dynamic'] = 'no'; ...


6

Converting from EE2 to EE3 is easy. All the syntax's etc. are almost same. You just need to create an extra file named addon.setup.php and done. In your case, follow the points below: Open FTP and go to your site/system/user/addons/ Create a Folder named string. Enter in the folder. Create a file named pi.string.php and put this code inside: $...


5

You can use $this->EE->output->send_ajax_response($array); for the same purpose.


5

It's certainly possible without hacking. Just that the EE documentation isn't particularly helpful on how to handle this sort of thing. Basically, you want to write a Module. Then you need to register an "action" in your module's install script: $data = array( 'class' => 'Module_name' , 'method' => 'method_to_call' ); $this->EE->...


5

First, no need to ever load directly from CI - you can always use EE. (So, $this->EE->load->helper('file').) Same with your validation class - I'd extend Form_validation, not CI_Form_validation. (Generally, EE should serve as your path to anything CI-related to avoid any conflicts.) You'll need to load your custom validation library, and call it ...


5

Use the session cache: if (ee()->session->cache(__CLASS__, __FUNCTION__) === FALSE) { ee()->cp->add_to_head('/path/to/foo.css'); ee()->session->set_cache(__CLASS__, __FUNCTION__, TRUE); } Your code will only run once per page load.


4

Take a look at the fetch_param() method in the Template library. There you can see all it does is return the value of the given key in the tagparams array, offering a fallback default. So, it should be completely safe, unless EllisLab decides to make it a private property, which I doubt they'll do.


4

I think UltraBob is right in that if you need a global variable available inside the module you need parse them inside the add-on. parse_globals() looks to be the way to do so (thanks to this answer on Stack Overflow). The following will show that the parsed global is available in the module: $parameter = $this->EE->TMPL->fetch_param('...


4

You want to use the EE->TMPL->parse_variables function. Here's an example block public function reggy() { $variables = array(); $tagdata = $this->EE->TMPL->tagdata; $variables[] = array('head_type' => 'horse mask'); return $this->EE->TMPL->parse_variables($tagdata, $variables); } You can define other replacement ...


4

As you mentioned Store does not currently support recurring payments with any of the gateways. It is a bit more complicated then just adding a gateway that allows recurring subscriptions to actually have them execute in Store. Currently there isn't a way in Store to store the customers CC details or Payment Token that would allow the payment details to be ...


4

Any ft files in the root of your package directory (system/expressionengine/third_party/your_package) will be recognized as part of the package. See P&T's Field Pack for an example.


4

Short answer: Nope. Slightly longer answer: native search, Super Search and Low Search all use the Channel module in some shape or form to display search results. Combining channel entries with other content types in a single tag is currently very cumbersome, if not impossible. Basically, EE's current API simply isn't built for that sort of thing. You'd ...


4

The loading of the template needs to be done as follows: $this->EE->load->library('template',null,'TMPL'); Now it works.


4

If you're looking for robust tracking of user actions in the Control Panel than what EE provides, there is Audit (and Audit Pro). Audit adds some additional user tracking beyond what EE does. Here is the list of what it tracks, from its page on Devot:ee Member Logins, including Control Panel & front-end Member Logouts, including Control Panel &...


4

I would suggest a couple things to help separate our your code. As Derek mentioned in a comment above, make sure you're abstracting your data model work to a model class. You can also create a libraries directory within your add-on package and begin to create your own set of libraries. Since they are local to your package, you'll be able to easily load them ...


4

If you add parse="inward" to your channel entries tag parameters, it will force module tags inside your parameters to be parsed before the channel entries tag.


4

You can use the channel fields api to get the field names: ee()->load->library('api'); ee()->api->instantiate('channel_fields'); $fields = ee()->api_channel_fields->fetch_custom_channel_fields(); //change 1 to your site_id if using MSM $quantity_field_id = $fields['custom_channel_fields'][1]['your_quantity_field_name']; $sql .= "picd....


4

After setting the return data, you need to return program control to the Template class, which ends execution of the current method. if ($date[2] == 25 && $date[1] == 12) { $this->return_data = '<p>Sorry, there are no sailings on Christmas Day.</p>'; return; } Incidentally, it isn't necessary to set the $return_data class ...


4

ee()->router->fetch_class() and ee()->router->fetch_method() should always reveal that information to you, regardless of the URL pattern or special routing.


4

ref: https://docs.expressionengine.com/latest/development/legacy/libraries/cache.html#class-methods ee()->cache->delete('/myaddon/');


3

Unfortunately there is no hook for this in EE2. Zenbu is a popular addon that offers this functionality within a completely separate module.


3

EE uses the codeigniter table library .. http://ellislab.com/expressionengine/user-guide/development/cp_styles/index.html#table-based-layout The issue you're probably running into is that it's trying to use one of the default CP styles. The library itself should be usable without being in the control panel, though jquery tablesorter may still be a better ...


3

Have you looked into the EE addon called DataGrab from Brandnewbox? http://devot-ee.com/add-ons/datagrab http://brandnewbox.co.uk/products/details/datagrab There's notes here on how it can support Matrix fields: http://brandnewbox.co.uk/support/details/datagrab_and_matrix_fields I've had it used on quite a few large projects with great success so don't ...


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