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 ...


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

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

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

There is no documentation on this. Think of a fieldtype not as a single input or textfield, but as a single piece of data. So you could build multiple fieldtypes as separate files and folders (and completely different add-ons) or there's a couple of other ways to approach it: either storing the data in channel_data table as delimited or serialized data (for ...


3

I managed to fix this. My problem stemmed from an incorrect class name and missing a critical bit of code which inserted the necessary information into the extensions table. I needed to insert; ee()->db->insert('extensions', $data); within the activate_extension method The extension wasn't showing as 'Enabled' in the CP because the class name was ...


3

You could check for the presence of the Safecracker library: if (isset(ee()->safecracker)) Or check if you're in the control panel if (REQ === 'CP')


3

No, there's no hook, but depending on the amount of data you want included, you can get the data included in searches (be it native EE, Low Search or SolSpace search). I had the same issue with Expresso Store that the modifiers (colour/size) didn't appear in the search results - only SKUs were included by default. You'll need to have some sort of fieldtype ...


3

@naboovallay said it all really, but seeing as I had exactly the code you wanted already open, I figured I'd paste it... function update($current = '') { if ($current == '' OR $current == $this->version) return FALSE; if (preg_replace("/[^0-9\.]/", '', $current) < '1.1.0') { //### Create ACTion IDs for the relevant functions ...


3

I've done it before. Take a look at the display_field method of ft.wygwam.php. You'll see that it's fairly simple to instantiate a WYGWAM field. A few calls to the Wygwam_Helper class to load the JS/CSS. There are also some helpers for properly formatting the data. You'll need a textarea with an id, and also the ID number of a WYGWAM config. I don't want to ...


3

If you are in an extension, it's possible that the db class is in the midst of a query. I'll show an example. Let's say this was the core EE code: ee()->db->select('some_column'); ee()->db->where('some_column', 1); // your code gets called here, while the active record methods have already been invoked ee()->extensions->call('some_hook');...


3

You would actually want to use a module for this, so that you can have an action ID associated. The module development documentation section about the install method mentions how to setup action IDs, which basically allow you to load http://yourdomain.com?ACT=123 from a cron job and run a method from your module. From there you simply need to build out ...


3

You could create an extension which uses the channel_entries_query_result hook to add your variable to each entry row. That will get parsed along with the native vars. To pass data from your module/plugin file to the extension, you'd need to use the Session cache. You might be interested to know that Low Search offers a straight forward API for custom ...


3

If you're looking to change the column layout as well as the look, try the module Zenbu. It will let you customize which columns are visible from the Edit Entries view. You can show expiration dates, edit dates, custom field data, etc. You can also vary what columns are shown based on member groups. https://devot-ee.com/add-ons/zenbu


3

You can create a function to set variable for backward compatibility like below : function set_var($key, $val) { if (version_compare(APP_VER, '2.6.0', '<')) { ee()->cp->set_variable($key, $val); } else { ee()->view->$key = $val; } } You can then use this function as below : $this->set_var('...


2

You can also do this with the rte_lib: ee()->load->library(array('javascript', 'rte_lib')); ee()->javascript->output( ee()->rte_lib->build_js(0, '.WysiHat-field', NULL, TRUE) ); $field_output = ee()->rte_lib->display_field('<p>Your text</p>', 'your_field_name', array( 'field_ta_rows' => 3, 'field_text_direction'...


2

The docs say that Database Class is initialized automatically. A var_dump(ee()->db) show us that the name of database can be retrieved by, on EECMS 2.6+: ee()->db->database And on EECMS 2.5.5-: $this->EE->db->database


2

I literally just saw this plugin on twitter this morning: Template Info, which was originally developed by Leevi Graham for EE1, and then Sean ported to EE2. Just add one or all of the following tags to your template: {exp:template_info attribute="template_id"} {exp:template_info attribute="template_name"} {exp:template_info attribute="template_group_id"} {...


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