2022 Developer Survey is open! Take survey.
6 votes
Accepted

Converting addon to EE3

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 ...
user avatar
4 votes
Accepted

Conditionally returning result from a plugin

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->...
user avatar
  • 2,255
4 votes

Accesoire development, determine publish page

ee()->router->fetch_class() and ee()->router->fetch_method() should always reveal that information to you, regardless of the URL pattern or special routing.
user avatar
  • 2,255
4 votes
Accepted

Clearing the cache via API

ref: https://docs.expressionengine.com/latest/development/legacy/libraries/cache.html#class-methods ee()->cache->delete('/myaddon/');
user avatar
  • 1,987
3 votes

How to edit Expression Admin panel

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, ...
user avatar
3 votes
Accepted

Add-on Dev: Extending channel->entries and tagdata

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/...
user avatar
  • 11.3k
3 votes
Accepted

Updating ExpressionEngine 2.6 add-on variable PHP code for 2.11.6 compatibility

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->...
user avatar
  • 626
2 votes

Looking for an a icon dropdown add-on?

No. Create your own using Grid or Matrix fieldtype. Define the values in a select dropdown, then in your template code have each value correlate to a specific icon with conditionals.
user avatar
2 votes
Accepted

With the hook entry_submission_end, is it possible to know if the entry is inserted or updated?

I usually check if entry_id = 0 (for new entry) $this->EE->input->get_post('entry_id') == 0
user avatar
  • 5,781
2 votes

Fieldtype display_field() function converting to htmlentities()?

The comments on the official documentation page note the following: Just a note that on display_field the data has htmlspeciachars on it if you’re trying to deserialize or decode_json so make sure ...
user avatar
2 votes

is it healthy to built a web services or a web app using EE?

The real value/power of EE is in the control panel, and how quickly you can pull together complex data-driven sites by not having to build an admin interface. I'm currently building a mobile app that ...
user avatar
2 votes

is it healthy to built a web services or a web app using EE?

It's really a matter of "it depends" There are a lot of factors that can help you determine whether EE is good as a long-term platform for a site, so there's no clear answer. You have to look at ...
user avatar
2 votes
Accepted

How to include search params in plugin with TMPL->tagparams

The search parameters belong in a different property of the Template object: ee()->TMPL->search_fields So use something like this: ee()->TMPL->search_fields['weekday'] = '=Monday';
user avatar
  • 11.3k
2 votes
Accepted

Problem setting a stash variable in a custom module

It should be possible, since that's exactly what I'm doing on my project. Here's my code (which is working): in my __construct() $this->EE = get_instance(); if ( ! class_exists('Stash')) ...
user avatar
  • 1,986
2 votes
Accepted

Add a new menu button in control panel on module installation

There isn't a standard function, but there is a standard event hook, so within your module you can create an extension too, and use this to input your menu item. This way when you install the module, ...
user avatar
  • 2,418
2 votes
Accepted

Render embed tags Shine pdf

What you're looking to do is far from trivial, however.... Lets simplify first. Forget the pdf module, I assume you want to render your embed (and any other) tags and push the result into your pdf ...
user avatar
  • 2,418
2 votes

How to add a new database column in third party module?

add_column just defines the column specs. After which you need to run create_table https://codeigniter.com/userguide2/database/forge.html#add_field "After the fields have been defined, they can be ...
user avatar
  • 1,987
2 votes
Accepted

How to add a new database column in third party module?

The add column function requires the database name, something that I had missed out in my function. ee()->dbforge->add_column( 'module_table', $updates ); Full code: public function update( $...
user avatar
2 votes
Accepted

Upgrading module from EE2 > EE3

Generally yes, you only need to add addon.setup.php. There of course could be some deprecated code etc.
user avatar
  • 2,831
2 votes
Accepted

Using the cp_custom_menu hook

The cp_custom_menu hook, although sounding like it will automatically add an item to the menu, in fact just adds your add-on as a new option when creating a custom menu via Settings -> Menu Manager ...
user avatar
  • 17.4k
2 votes
Accepted

Custom add-on not appearing in Add-On Manager

You need to also have a pi.wmd_cp.php, ext.wmd_cp.php or mod.wmd_cp.php files with a class that matches your folder name. Otherwise, EE has no way of knowing what the addon is.
user avatar
  • 1,987
2 votes

Plugin Development - Is it possible to extend the 'Grid' fieldtype?

I'm doing the same right now. In short - yes, it's possible. Unfortunately there are almost no docs on that, so I took Grid field as example and tried to re-create it with modified functionality. ...
user avatar
  • 2,831
2 votes

Expresso Store custom tax rule

Sorted thanks. The issue here was a typo (store_orders_taxes not store_order_taxes). Pro tip folk - use a different name for your method from the hook you are accessing!
user avatar
2 votes

How to remove -EE warning about a deprecated function from the NCE LDAP plugin

Replace the hash() function line with following code: $this->EE->load->helper('security'); $encrypted_password = do_hash(stripslashes($user_info['password']));
user avatar
  • 626
2 votes

Custom add-on accessing method from another custom add-on …

I agree with the advice provided by Brian in EECMS Slack. You can do this: require_once PATH_THIRD . 'your_addon/somefile.php' $someFile = new SomeFile(); $someFile->method();
user avatar
  • 1,232
2 votes
Accepted

Create an entry from an extension?

Yes, obviously it is possible to use the model to create a new entry. To create a new entry using model you should follow below syntax. $entry = ee('Model')->make('ChannelEntry'); $entry->...
user avatar
2 votes
Accepted

Updating hooks from v2 to v4

There were certainly several extension hook changes with the arrival of EE3, possibly with EE4 too, so you may well need to update the naming of the hooks in your addon. You can find a complete list ...
user avatar
  • 3,562
1 vote
Accepted

module template tag looping thru values in module template tag

Tag pairs need to be formatted correctly as an array of arrays like this. Just think of the tag pair as a module tag, and the arrays as the $vars variable in your example above. $field_list_items = ...
user avatar
1 vote

How to edit Expression Admin panel

You mentioned in your comment... I have my own module and I need to show that modules records also in EE2 Admin panel. In that case, what you need to do is use a module "Control Panel File" mcp....
user avatar
  • 7,941
1 vote
Accepted

How do I add an entry to a category progammatically in an add-on?

The way ExpressionEngine handle's categories is in the exp_category_posts table. In order to assign an entry to a category, simply insert the new entry id into the entry_id column and the associated ...
user avatar

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