Hot answers tagged

11

The upgrade from EE2 to EE3 is a major step - from EE3 to EE4 not such a big one. So getting your site to EE3 is the thing to focus on. How hard this will be will very much depend upon how your EE2 site is set up, and in particular what add-ons you are using. To be able to upgrade to EE3 you need to get your copy of EE2 up to a late version (I think 2.10....


7

Fixed it by changing this line: function usage() To this: public static function usage() Source: https://support.ellislab.com/bugs/detail/20352/plugins-through-php-warning-with-strict-errors-on


6

According to http://uk1.php.net/preg_replace , the /e modifier was removed in PHP 5.5.0 . If you downgrade PHP to pre-5.5.0, then the error will go away. Alternatively, in your config.php file set error_reporting(E_ALL ^ E_DEPRECATED); to hide deprecated warnings. Alternatively, upgrade Textile - but it looks like http://devot-ee.com/add-ons/textile-editor-...


5

I was almost certain that Custom System Messages was causing this problem. The template offline message could be set in the preferences, but it was not. As Custom System Message has a greater priority over EE offline template, and no template was set, it was not working. The template was set inside Custom System Message The problem is solved.


5

Channel Images can do that and a lot of other neat stuff: http://www.devdemon.com/documentation/channel-images


5

The CE Image plugin has a watermark functionality (and much more), check 'watermark' on this page: http://www.causingeffect.com/software/expressionengine/ce-image/user-guide/parameters


4

What you're trying to accomplish would be better served using a module, instead of plugins in a template. With a module, you can create a true form action and use pure PHP, rather than fighting the template parser with the spaghetti you've got here. There are good docs on building a module: http://ellislab.com/expressionengine/user-guide/development/modules....


4

is not possible that some add-on can be affected on this. You need to be sure, that you are not login as SuperAdmin. Because Super Admin can see site even in offline.


4

You should be able to do this with the query module in a template (or with a query directly to your database, of course). Something simple like this should output what you need: {exp:query sql="SELECT email FROM exp_mailing_list WHERE list_id = '1'"} {email} {/exp:query} EDIT To improve this furher, you could use the Download Content plugin like this: {...


4

You shouldn't see the site in online mode if you have set $config['is_system_on'] = 'n'; in your config.php file. If you are seeing the site, I'd guess one of the following is true: You are editing the wrong config.php file You are still logged into the control panel as a SuperAdmin. Clear browser cookies to be sure and confirm that you see the login ...


4

I'm no expert, but I don't think numbers that start with a zero are programatically treated as integers (some Googling suggests they are treated as something called Octals). In your case, unless you need to do mathematical operations on those values, why not just declare them as strings by putting quote marks around them? private function ...


4

Shine PDF Documentation Shine PDF uses the mPDF library to generate a PDF on-the-fly from an ExpressionEngine template. At its core, Shine PDF is simply a tag pair that accepts channel:entries parameters and outputs entry data accordingly: {exp:shine_pdf:make channel="good" url_title="vibes"} ... {/exp:shine_pdf:make} ...but let's take a closer look at ...


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

You can do this by developing your add-on as a module rather than a plugin since only modules can use EE actions. (See the EE docs for an explanation of the difference between the types of add-on.) More info on EE actions here. Essentially, you need to develop a module to perform your desired action, then call the associated ACT URL (e.g. http://example....


4

You can make a module - like Steve advice. Use Yeoman ExpressionEngine Add-On generator to simplify developing process. On server you will need to setup cron with wget: execute cronjob every day at 3am 00 03 * * * wget http://example.com/index.php?ACT=XX&task_id=1 Or if you want something really quick and simple: Create a special template with some ...


4

I found the answer. Devotee has a list here.


4

you need to add a addon.setup.php file to the folder. https://docs.expressionengine.com/latest/development/addon_setup_php_file.html


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 are doing a ton in your template. After a quick look I'd say your slowness is related to your relationship fields. I suggest installing the EE Debug Tool to determine what specifically is "slow" on the page load. That will help you decide how to optimize the template. I also suggest taking a look at CE Cache to see if it makes sense for your project.


3

If you look at the documentation a bit more carefully, you'll see that the {case value="xxx"} tags only use a single = sign. So, this should work {exp:switchee variable = "{champions}" parse="inward"} {case value="team 3"} <p>team 3</p> {/case} {/exp:switchee}


3

From the plugin file in EE 2.7: This plugin parses text using Markdown and Smartypants. To use this plugin wrap any text in this tag pair: {exp:markdown} Text to be **parsed**. {/exp:markdown} There are two parameters you can set: encode_ee_tags - ('yes'/'no') defaults to 'yes', when set to 'no' allows EE code to be rendered smartypants - ('yes'/'no') ...


3

You need to make a folder in your system/expressionengine/third_party folder called auto_acronym and place your plugin file in there.


3

put exp:channel:entries inside embeded template {embed="site/channel" my_plugin_ids="{exp:plugin entry_id="{segment_3}"} site/channel {exp:channel:entries channel='{embed:my_plugin_ids}' … -or- put exp:channel:entries inside your plugin tag's {exp:plugin entry_id="{segment_3}" parse="inward"} {exp:channel:entries channel='{my_plugin_ids}' … {/...


3

You need to loop through the query result and build an array containing your variables. Using the following code after your query should work. if ($query->num_rows() == 0) { return $this->EE->TMPL->no_results(); } foreach ($query->result() as $row) { $vars[] = array( 'FirstName' => $row->FirstName, 'LastName'...


3

No add-ons are necessary. You could use an embed, passing the lawyer's member ID to the embedded template. Embedded templates are parsed separately, and would allow you to use a separate channel entries tag inside another one. You would use the passed member ID in the author_id= parameter of the tag on the "inner" template.


3

Your plugin class method needs to return the (parsed) tagdata instead of setting the $this->return_data property. The latter is only needed if the class constructor is used for template output. So: public function testfunction() { return ee()->TMPL->tagdata; }


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

Yes, of course! return $this->return_data = ee()->TMPL->no_results(); Or this, on the versions before 2.6: return $this->return_data = $this->EE->TMPL->no_results();


2

It really depends on how you're going to filter the entries. Categories would work if you're going to rigidly filter by specific months, durations, and seasons (ex: output holidays that depart in January, or that are 14 days long). Just have one category group per filter type (Departure Months, Duration, Season). However, if you need to filter based on a ...


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