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

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

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

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

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

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

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

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

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

I believe ExpressionEngine actually takes care of the issue for you by automatically encoding the spaces as %20. You shouldn't need to use a plugin or enable PHP. To check this just output the Grid row's {file_url} and you should see it encoded. {my_grid_field} <li>{my_grid_field:file_url}</li> {/my_grid_field} If the file you uploaded was ...


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


2

You can use the low_search_update_index hook in Low Search to index relationship fields inside Grid fields - I've done this before. There's a ready-made extension available which does this for standalone relationship fields ... it doesn't do Grid fields, but it would be easy to modify the query inside the extension to do so. So, stick with the relationship ...


2

You should be able to do this by changing the expected content of your field from a number/integer to "any" which is basically a string and so will not be treated as a number.


1

I would imagine NSM TinyMCE hasn't been updated to work with recent versions of EE. You may need to try another Wysiwyg fieldtype instead. There are a number of them out there.


1

How you intend to search the directory is certainly a factor as far as your channel structure is concerned. Are you browsing only? And by category or geography? Or are you introducing a geolocated search functionality? No matter how you handle the browse/search itself, you certainly should be able to assign one location as a "headquarters" simply by having ...


1

I came across this post while attempting to solve a similar problem; hopefully this will be helpful to others who need the same functionality in the future. Event Helper is a plugin that comes with a field type that allows for a simple date formatting WITHOUT a time stamp that can be used in GRID and MATRIX. The actual Event Helper extension still needs to ...


1

Can you simply remove the timestamp after the fact with something like CE String? Or, don't use the EE date field at all. Set up your own custom field, use a javscript calendar like jQuery UI Datepicker, and then you can format it exactly as you like.


1

Fieldtype tag pairs with modifiers SHOULD NOT contain the modifier in the closing tag. Wrong: {myfield:modifier}{somedata}{/myfield:modifier} Right: {myfield:modifier}{somedata}{/myfield}


1

Since you're using a multiselect element, you're posting an array of data when the entry is saved. But you can't simply insert an array into the database - you need to turn it into a string. So in your fieldtype's save() method, you need to do something like: return implode('|', $data); Or: return json_encode($data); Then you need to turn your data back ...


1

Try deleting that custom field, and recreating the custom field as a radio first. That may fix the issue.


1

You can make it required by adding an hidden input with the same name as your file input: {exp:freeform:form required="file_upload"} {freeform:field:file_upload show="1"} <input type="hidden" name="file_upload"> <button type="submit">Send</button> {/exp:freeform:form}


1

You need to prefix those IDs with field_id_, e.g., $old_field = 'field_id_51'; $new_field = 'field_id_217'; That should get the migration working. Note that you'll only need to load that code once in a single PHP-enabled template, and it should migrate all entries which have an image in the specified field (you mentioned "loading a few pages").


1

The field type data is not accessible in typical template tags, like {exp:channel}. Typically, you have to use the field names for your conditions, e.g.: <div class="{if copy-seg}wygwam{if:else}{/if}">{copy-seg}</div> or {if copy_seg != ''} <div class="wygwam"> {copy-seg} </div> {/if}


1

Yes, you can do this using any FT which can retrieve data by query (for example SELECT+). But will be needed to save entry first after upload images to get it in select field. Other way is to create this field (simple select + little bit JS coding). But take attention on Penzizzle advice - way which you choose is looks little bit unusual.


1

Have the host look at the /tmp directory for your hosting account. It might be full or permissions may have changed. Also, look at your php logs. If there is a specific PHP error stopping the upload, it might be there. Also, look at the actual hosting account's diskspace. Maybe you've hit your limit.


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