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 ...
Mufi - Amici Infotech's user avatar
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/');
Jim Wyse's user avatar
  • 1,987
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->...
Jainil's user avatar
  • 626
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( $...
Kieran McClung's user avatar
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 ...
Jim Wyse's user avatar
  • 1,987
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.
Yuri Salimovskiy's user avatar
  • 2,846
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 ...
Derek Hogue's user avatar
  • 17.4k
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. ...
Yuri Salimovskiy's user avatar
  • 2,846
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.
Jim Wyse's user avatar
  • 1,987
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();
Matt's user avatar
  • 1,232
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']));
Jainil's user avatar
  • 626
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!
Cole Henley's user avatar
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->...
Harsh Barach's 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 ...
JCOGS Design's user avatar
  • 3,585
1 vote

How To Fire Addon Method With Cron Job

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 ...
Harsh Barach's user avatar
1 vote

Anyone with PHP skills interested in updating an add-on for EE 5?

The update is waiting for you. You can take it in my fork or approved push request which I did for your repo. p.s. I will do some extra updates this evening because I can see that some unsafe method ...
Max Lazar's user avatar
  • 5,781
1 vote

How can I use stash->parse in my extension

Quick update - having looked at what causes this error, I found that if I call ee()->TMPL->fetch_addons(); in my extension before I call stash->parse, it works fine without an issue. Hope ...
boilerroomdigital's user avatar
1 vote

Expresso store : add on, hook store_order_complete_end creates order id+1

Using $this->extensions->last_call in the hook turned out to be redundant.
bart's user avatar
  • 21
1 vote
Accepted

Model service filtering by date

$data = ee('Model')->get('ChannelEntry')->filter('field_id_103', '>' , '1536677819'); This code works for me. Where field_id_103 is my field ID and 2nd parameter is operator (> , <, >=, &...
Mufi - Amici Infotech's user avatar
1 vote

Store shipping plugin …

(I'm with Vector, the people behind Expresso Store, but this is just something I made quickly and shouldn't be considered "official advice") Here's a sample to get you started: <?php /* ** The ...
Matt's user avatar
  • 1,232
1 vote

Custom Fieldtype: How to check save($data)

I received some help in the slack forum for this one. Short answer is I was not providing a name for my fieldtype during construction. I assumed this was auto-generated by EE due to back end ...
W3bGuy's user avatar
  • 1,610
1 vote

Using the cp_custom_menu hook

add this at the end of public function cp_menu_array($menu) { if ($this->EE->extensions->last_call !== FALSE) { $menu = $this->EE->extensions->...
Rogger S.'s user avatar
1 vote
Accepted

In ExpressionEngine 3, what is the format of the config file to be able to use the Config Service?

It works just like the main user/config/config.php file. So in user/addons/my_addon/config/config.php: <?php $config = array( 'foo' => 'bar', 'baz' => 'foo' ); ?> ...
Derek Hogue's user avatar
  • 17.4k
1 vote
Accepted

Return Variables to a Template

I had similar situation this week. I've made two functions - one for the form template tag and second is action callback that works with form data. In this manner I could output information with ee()...
sirBlond's user avatar
  • 126
1 vote

How to create an Addon

I am relatively new to EE, but for our current project, I have already written one Extension and one Module. It is a pretty straight-forward process. Here is the explanation of how the AddOn types ...
EXODev's user avatar
  • 49
1 vote

Is there a way to get the member_id of a user that was just logged out?

Although the hook doesn't provide any information you can use, you could do a query on the exp_members table where ip_address is equal to the users ip, and sort the results by last_activity descending....
Matt Shearing's user avatar
1 vote
Accepted

Enable "search:" Parameter in Custom Add-On Channel Entries Method (EE2)

If those methods are in your own plugin/module, then the search:foo parameters won't be added to the search_fields property. That only happens for the channel:entries tag. For any other tag, those ...
Low's user avatar
  • 11.3k
1 vote
Accepted

Lang text with control panel interface

You can either use built-in Global Variables feature or Low Variables add-on Both will work same way, you'll just place {variable_name} in your templates, without any other special tags, but you may ...
Yuri Salimovskiy's user avatar
  • 2,846
1 vote
Accepted

For a list of events, get the first occurrence of each event, programmatically

Okay, I was able to get what I needed, mainly with the help of a query similar to this one: SELECT entry_id, MIN(start_date) AS start FROM ( (SELECT entry_id, start_date FROM exp_calendar_events) ...
Low's user avatar
  • 11.3k
1 vote
Accepted

Custom AddOn, Using SimplePie to display an enclosure

Figured it out. Basically the error was being cause when an entry did not have an enclosure. The answer was to check if it had an enclosure first. So it goes something like this: if ( $enclosure = $...
M Purdy's user avatar
  • 21

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