People who code: we want your input. Take the Survey
8

Ah, you want groups of three wrapped and not every third one, wrapped, right? @mediagirl almost has it, but if your returned entries is not evenly divisible by three, you'll have a problem - the final switch will not take effect. You therefore have to close the wrapper conditionally, like this: {exp:channel:entries channel="pages" disable="categories|...


5

Use the session cache: if (ee()->session->cache(__CLASS__, __FUNCTION__) === FALSE) { ee()->cp->add_to_head('/path/to/foo.css'); ee()->session->set_cache(__CLASS__, __FUNCTION__, TRUE); } Your code will only run once per page load.


4

Any ft files in the root of your package directory (system/expressionengine/third_party/your_package) will be recognized as part of the package. See P&T's Field Pack for an example.


4

unexplainedBacn is right. Or you can also use the XML Encode plugin for this. It's actually included with ExpressionEngine This plugin converts reserved XML characters to entities. It is used in the RSS templates. To use this plugin, wrap anything you want to be processed by it between these tag pairs: {exp:xml_encode} text you want ...


4

You have to add the has_array_data property to your fieldtype class: class My_field extends EE_Fieldtype { public $has_array_data = TRUE; ... }


4

Replace "parent::EE_Fieldtype();" on line 23 of ft.copee_pastee.php with "parent::__construct();"


3

There is no documentation on this. Think of a fieldtype not as a single input or textfield, but as a single piece of data. So you could build multiple fieldtypes as separate files and folders (and completely different add-ons) or there's a couple of other ways to approach it: either storing the data in channel_data table as delimited or serialized data (for ...


3

You could check for the presence of the Safecracker library: if (isset(ee()->safecracker)) Or check if you're in the control panel if (REQ === 'CP')


3

Unfortunately, I don't think this is supported natively (thought I would love to be shown otherwise!). The way I achieved this was to use the MX Calculator extension to calculate whether a row's count is divisible by 3 or not: {matrix_test} <span style="display: none;"> {exp:mx_calc expression="mod({row_count}, 3)"} </...


3

It seems that WYGWAM was installed previously and still having record in database table. Check the database table "exp_fieldtypes" if having any record with field "name" as WYGWAM. You can delete that record. Also, there may be some custom fields which may be using WYGWAM field type. You might check it also.


3

As folks mention above, no custom development is needed here. Just use the native Grid fieldtype with two columns - one using the File fieldtype (called, say, file), and the other using the Text fieldtype (called, say, url). Then, in your template: {my_grid_field} {if my_grid_field:file}<a href="{my_grid_field:file}">Download this file</a>{/...


3

You can try making the requests "schemeless"... Instead of http://www.example.com/styles/ngen_file_field.css or https://www.example.com/styles/ngen_file_field.css simply edit to: //www.example.com/styles/ngen_file_field.css This will cause the resources to inherit the scheme of the page in which they are loaded.


3

The answer to getting the fieldtypes all under SSL is to make sure the fieldframe settings are set to https in the fieldtype path. utilities -> extensions manager -> fieldframe -> settings .htaccess forces ssl by the below: RewriteEngine on RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] So to recap, converting an ...


3

I've done it before. Take a look at the display_field method of ft.wygwam.php. You'll see that it's fairly simple to instantiate a WYGWAM field. A few calls to the Wygwam_Helper class to load the JS/CSS. There are also some helpers for properly formatting the data. You'll need a textarea with an id, and also the ID number of a WYGWAM config. I don't want to ...


3

I built a fieldtype that may do what you want without your having to build one from scratch; it's called ALT Multifield. http://devot-ee.com/add-ons/alt-multifield You can create a custom block of inputs and it all gets stored in one column. Hit me up if you have questions. (I've actually got some significant improvements coming to it soon, but I can't ...


3

Looking carefully at your error message, you may have some incorrect capitalization of the EE_Fieldtype class file name. EE_Fieldtype.php is the correct way (uppercase F, lowercase t). Likely your localhost is case insensitive but your server is not.


3

I found out what the issues are. The plugins simply haven't been updated for the most recent versions of EE. I use a different locations for my third_party folder. The url in most of these plugins look for the theme directory in the default location using this url: $this->EE->config->item('theme_folder_url').'third_party/plugin_folder_name But, ...


3

You are missing a file from an add-on, most likely Solspace Calendar. You will need to verify the installation of that add-on is complete, and correct for your version of EE (which is either 3 or 4). The missing file would be /system/user/addons/calendar/ft.calendar.php. The other option is to remove the add-on, but this can be dicey if you already have an ...


2

I'd say you'd want to look closely at Matrix or Content Elements for this purpose, depending on your exact requirements.


2

You can also do this with the rte_lib: ee()->load->library(array('javascript', 'rte_lib')); ee()->javascript->output( ee()->rte_lib->build_js(0, '.WysiHat-field', NULL, TRUE) ); $field_output = ee()->rte_lib->display_field('<p>Your text</p>', 'your_field_name', array( 'field_ta_rows' => 3, 'field_text_direction'...


2

There is nothing built into Store currently that would allow you to create modifiers on a per channel basis if you want the modifiers to adjust price or stock levels. There is currently a feature request for Global Product Variations that you can vote for. If you do not not need to adjust the price, quantity or have a unique SKU for your variations you can ...


2

You can create a configuration page for your fieldtype by including a display_global_settings() and a save_global_settings() which display and save the settings respectively. When your fieldtype class is instantiated your current settings are passed to a public settings property. You access your current settings within the display_global_settings() method ...


2

MX Select Plus is a great fieldtype–you can choose either to populate the menu with plain text or write a SQL query. It's pretty slick!


2

Straight SQL is much more difficult than a little bit of PHP in a one-off PHP-enabled template. JayF is right that a new File field to hold your extracted data is a good idea - you can delete the old field after you see the migration has worked as expected. This code assumes you've upgraded to EE 2.6+. Replace the top two field names, throw it in a PHP-...


2

I've done this kind of thing in SQL. The trick is matching what you need using just SQL, since its string matching is somewhat verbose. I've also done this using SQL in PHP--just looping through a query result set, making the changes using PHP's RegEx or basic string substitution, and then updating the entries. To get at the field data in EE1, you'll want ...


2

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 you do this: htmlspecialchars_decode($data) Before you try and decode it. So to apply that same thing in your case, you'd need: function ...


2

You could do it with Matrix and create a column for every possible piece of content, although it could get unwieldy. Or maybe Entry Widgets will do what you need.


2

I've put together dropbox_chooser which is a fieldtype. At the moment, it opens the Dropbox Chooser and allows you to pick a single file (whilst multiselect can work, I'm not sure how to output multiple links individually in a template). You will need an App Key from Dropbox. I'm no developer, but I needed this functionality.


2

Using the switch="" parameter may do what you need. This is untested but I don't see why it wouldn't work. {switch="||<div class='row'>"} {switch="||</div>"} EDIT I adjusted the quotes in my code example based on Jean's comment below...


2

Can you not just use the standard file field and set up a folder for backgrounds? Your client can then either select an already-uploaded image from the list of files, or upload a new one. You can restrict this field to one folder so there's no room for confusion and have it as a field in your pages channel. This way you don't have two separate strands to ...


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