Hot answers tagged

4 votes
Accepted

With new Routing capabilities in EE 2.8 - Trying to figure out the best solution

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) { $...
  • 4,002
4 votes
Accepted

What Addons are compatible with EE 3.0?

I found the answer. Devotee has a list here.
  • 1,068
3 votes
Accepted

Detect if url is that of the Pages Module

You should be able to do: {exp:channel:entries} {if page_uri} {!-- or {if pages_url} --} This is a page in the pages module {if:else} This is not {/if} {/exp:channel:...
  • 7,556
3 votes
Accepted

Module development: Any reasons creating catch-all action is a bad idea?

It's really your choice here. I imagine that this framework is best for smaller addons. One point of access is always slightly frowned upon; because it creates a SPOF in your addon. Trust me, I ...
  • 5,900
3 votes

How to create modules in ExpressionEngine?

The 1st party guide is everything you need to get the concept of module/extension/add-on/plugin/fieldtype development : https://ellislab.com/expressionengine/user-guide/development/index.html If you'...
  • 2,418
3 votes
Accepted

Hook for when viewing single entry

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, ...
  • 2,846
3 votes
Accepted

PHP Version compatibility issue with EE module

As error says, PHP 7 is only allow variables to passed by reference not an instance. You now need to remove that line and replace all $this->EE calls to ee(). That will work for you.
  • 626
2 votes
Accepted

Hook for when status is updated

I would use the entry_submission_ready extension hook, and write a mini-extension that looks at the meta array in the api for the entry status value, and compares it to the previous value for that ...
  • 5,900
2 votes
Accepted

Security of an Action URL called from AJAX

What data does the script which is being triggered with action URL accept? If that's EE form submission, then you should not worry if you follow standard EE forms security settings/practice. If it's ...
  • 2,846
2 votes
Accepted

Global variable as a module tag pair's parameter?

One really simple way to get around parse order is just to use an embed. {embed="embeds/_rest" ip_address="{ip_address}"} Then in your embedded template (embeds/_rest): {exp:rest url="http://domain....
  • 7,941
2 votes

Add form to EE Module for front end processing

Take a look at the Code Ignitor Validation Helper. You can use this within PHP on an EE template, it really is as easy as this (example from the CI Docs), just replacing $this with a reference to EE : ...
  • 2,418
2 votes
Accepted

Stash with timestamps and custom written module

Carefully "unescape" the variables you want to be cached, so e.g. {stash:nocache} <div> {if {current_time format="%U"} - {/stash:nocache}{event_time format="%U"}{stash:nocache} < -86400} ...
  • 5,234
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 ...
  • 2,418
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, ...
  • 2,418
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( $...
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 ...
  • 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.
  • 2,846
2 votes

How to update Modules?

Important edit: a database backup before you do any module updating might prevent data loss and is always a good idea! It is a pretty straight forward process. For Transcribe simply follow the ...
  • 3,572
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 ...
  • 2,846
1 vote
Accepted

How to access a custom table name that isn't prefixed with exp_

If I recall correctly, using the query module (and relative portion of the database class) doesn't force the prefix. https://ellislab.com/expressionengine/user-guide/add-ons/query/ So you can use ...
  • 5,900
1 vote

How to access a custom table name that isn't prefixed with exp_

You can set the database to be used like so: $mydb = ee()->load->database('mydatabase', TRUE); By setting the second parameter to TRUE the function will return the database object. and then ...
  • 7,176
1 vote

Module not showing in modules list for installing

You will need to make sure the folder you place in the third_party directory matches the package name. From the Github repo, you can see that the files are called xxx.flag_master.php, so therefore ...
1 vote
Accepted

Module not showing in modules list for installing

The files should be located inside system/expressionengine/third_party/flag_master/ folder, not directly in third_party folder. Please check that.
  • 2,846
1 vote

Trigger the member self activation email from custom add-on with member registration

The email are being sent with help of Email library. In the code you posted, there is no reference for it, therefore no emails go out. Here is sample code for sending member activation email from one ...
  • 2,846
1 vote
Accepted

Store: who can access "Settings?"

You will have to login with your super admin account and go to the settings panel. From there you will need to navigate to the security panel. You should see your member group on the right hand side ...
  • 7,556
1 vote

form validation for module mod file template tags

Looks like you're looking for the Forn Validation library that is inherited from CodeIgnitor. What you seem to be trying to do is set the validation rules at thes same time as setting up the form, ...
  • 2,418
1 vote

redirect in add-on module redirecting me to admin control panel login form with # appended in URL

Brandon is correct - EE does not like a hash in a redirect URL. Instead, try using flash data for this. $this->EE->session->set_flashdata('selected-tab', 'settings'); $this->EE->...
  • 17.4k
1 vote

Structure & Channel Forms not playing nicely

I've just had this issue too but managed to fix it by doing the following: Go to Addons > Modules > Structure Click Module Settings in the top right On this screen click the convert to using the 2.7 ...
1 vote
Accepted

Photo Frame add-on -- customize alt attribute?

You can use the same template code as before. Just need to add {item_photo:url} <div class="item-photo"> <img src="{item_photo:url}" alt="{title} photo"> </div>
  • 5,781
1 vote

Pagination while Get Variables in URL

There isn't "something obvious" you're missing, as far as I know. I try and maintain the query string in pagination for Low Search, which ended up doing an obtuse regular expression to find/replace ...
  • 11.3k

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