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


10

Yes. For example.... $hooks = array( "template_fetch_template" => "template_fetch_template", "typography_parse_type_end" => "typography_parse_type_end" ); foreach ($hooks as $hook => $method) { $data = array( 'class' => __CLASS__, 'method' => $method, 'hook' => $hook, ...


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

dashEE - is fully customizable ExpressionEngine control panel dashboard alternative. Module comes with 8 default widgets but you also have the ability to develop your own tailored to your needs. In addition to developing your own stand along widgets you can also incorporate dashEE widgets into your existing custom EE modules instantly making your ...


6

open file /system/expressionengine/third_party/ext.sh_member_group_tabs.php and change line 270: if (APP_VER >= '2.6.0') to if (version_compare(APP_VER, '2.6.0', '>=')) it is also needs to make search & replace for APP_VER >= '2.6.0' & APP_VER >= '2.8' and replace it with version_compare(APP_VER, '2.6.0', '>=') & version_compare(...


5

Have you checked all of your installed add-ons for updated versions? White screens are also typically a sign of hidden errors, so make sure that display_errors is enabled in your PHP environment, and set the $debug value in the admin.php file to 1. That may reveal a PHP error that identifies the problem. If that doesn't help, and you think you have the ...


5

This was driving me insane but I've figured it out. You need to edit the $entry object (1st parameter of the function) in order for this to work. You can, however, use the 2nd parameter, $values, for easy reading of the data. public function before_channel_entry_save( $entry, $values ) { // Set value for specific field name $entry->setProperty( '...


4

Yes: use the sessions_end hook. It runs on every page load. Be sure to check to see if you're using it on the front-end before you set your cookie (I assume you want this for the front-end only). if(REQ != 'CP') { // do your stuff }


4

I can think of two ways to do this. One is to use Resource Router. Your config would look something like this: $config['resource_router'] = array( ':num' => function($router, $wildcard) { $query = ee()->db->select('url_title') ->where('entry_id', $wildcard->value) ->where('channel_id', 1) // use the right channel id here ...


4

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


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 can do it with the following example code within your plugin: require_once PATH_THIRD."modulename/modulefilename"; $obj = new ModuleClass(); $obj->module_method(); Hope, it would help you.


3

Since Last Visit "Attempts to point out various actions that have happened since a visitor's last visit to your site." http://devot-ee.com/add-ons/since-last-visit Otherwise you'd need to roll your own plugin that taps into the Session Class: http://ellislab.com/expressionengine/user-guide/development/usage/session.html Specifically looking at this ...


3

I have this method defined in my extension class There it is! Action methods are only valid if they belong to a module (either mod.classname.php or mcp.classname.php). They will not work if they live in an extension or plugin.


3

There is also Bookmarks module, but it also does not allow you to create sets of bookmarks. I would use different approach: create a channel named "Lightboxes" with custom field that will hold relationships with entries use Safecracker to create a lighbox have some code that will add entries to relationships custom field in lightbox entry


3

The code you have should work fine. I've just run a test on a module and it loads fine in EE v2.5.3 (either in a method or in the class constructor). I've just had a quick read of the EE changelog and can't see any reference to changes there, so don't think it's version related. Are you sure it's not calling the Class and then doing something unexpected? I ...


3

You're using the wrong hook. Try using entry_submission_start and/or publish_form_entry_data Update: Abort the channel entry publish process? Head-scratcher: manipulating new/updated entries after submission


3

It's the Tag module from Solspace. If you've removed the files without uninstalling properly via the control panel, you'll need to delete the 'Tag_ext' rows from 'exp_extensions' in your database.


3

You should create a library, which is just a PHP class stored in system/expressionengine/third_party/your_addon_name/libraries/. <?php class Your_library { public function do_something() { return 'foo'; } } Then in your module / extension, you'd be able to do this: ee()->load->library('your_library'); // prints out foo echo ee()->...


3

Yes I don't see any problem with that if it's just for a simple tax adjustment. We don't look to make things deliberately hard. :) You could also look to set it up as an actual tax adjustment if you wanted to however. Adjustments were introduced in Store v2 to handle extra line items for anything which is not a product (e.g. shipping, discounts, taxes). ...


3

Extensions are used when you want to take over, modify, or perform extra routines when native first-party methods are executed. For example, performing extra actions after an entry is saved. Modules (and Plugins to an extent) are used when you want to make functionality (and therefore output) available in Templates via tags. Things that need to occur in a ...


3

It depends on whether the events that trigger the functions trigger a hook. If a button click, form submission, page load etc triggers a hook, then an extension is the right place for your custom functionality. If no hook is triggered and you need to respond to arbitrary clicks or form submissions, then a module or plugin would be appropriate. You can react ...


3

Extensions are for backend or server side stuff, whereas Modules can interact via the frontend or EE Control Panel. So an Extension captures a hook from another class, but can't capture a form submission or Ajax call from the frontend. Whereas a Module can't tap into a hook. But you can roll both an extension and a module into a single add-on (same name, ...


3

You need to tell Store about your new gateway in the ext. file. Use the store_payment_gateways hook and pass in the $gateways array: public function store_payment_gateways($gateways) Then ensure that you add your gateway to the list: $gateways[] = 'PayU'; Include the autoloader: $composer = require(PATH_THIRD.'store/autoload.php'); And tell Composer ...


3

Judging from this statement: "The plugin uses the calculation method of the extension", I assume you're doing something like this in your plugin: $ext = new Your_addon_ext(); return $ext->do_calculation(ee()->TMPL->fetch_param('your_value')); In this scenario, the extension object will not automatically load its settings, like it normally does ...


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

Crelate a plugin containing single function, say, function_name. The plugin will accept member_id of logged in visitor ee()->session->userdata('member_id') and ID of entry being viewed, passed as parameter ee()->TMPL->fetch_param('entry_id) In this function, if member_id is not 0 (i.e. member is logged in), perform a check against your ...


2

I'm afraid there is not. What i would recommend is that you get a test site setup on either the same server as the live site but in a subdomain so for example 'test.mysite.com', (password protect that of course!), or on a server of identical specification as the live one. Then take a copy of your live site, put it in the test subdomain and test your changes....


2

I suspect there are some sessions/cookies referenced in the DB that that exist on the production server, but not the other environment; removing said references from the DB could resolve it.


2

You should loop through the output of PHP's debug_backtrace() method. For example, I just called it inside an extension using the channel_entries_query_result hook (truncated a little). The object or class parameters would be most helpful to you to figure out which extension called the hook: Array ( [0] => Array ( [function] =>...


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