7

Go to line 706 in /system/expressionengine/third_party/campaigner/ext.campaigner.php and change it from: $this->EE->javascript->generate_json($js_member_fields)); to: json_encode($js_member_fields)); And yes, this line needs double parentheses at the end, since it's a continuation of line 705.


4

The cleanest way is to create an accessory add-on that will add your js to all pages in the cp. Here's a basic example called "Default Value." Change the name and code as needed. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * ExpressionEngine Developer Accessory * * @package Default Value * @category ...


4

You have this tagged as PHP, but this sounds more like a job for JavaScript. The Search module is already preventing empty searches, which is why you get that error page. Lots of ways to accomplish this, here is one way if you are using jQuery: $(document).ready(function() { $('#search').submit(function() { if ($('#keywords').val() == '') { ...


3

Honestly, I wouldn't even mess with that plugin since that's what it's supposed to do. Just do a simple ajax call and append the data like this. Note the move of #articles to the main template, and paginate_base parameter in the embed template. Main Template <html> <head></head> <body> <section id="articles"> ...


3

The error has been confirmed as a bug in EE 2.8. Bug tracker: https://support.ellislab.com/bugs/detail/20165 The issue will be fixed in the next release, and a patch has been posted to the bug tracker for any who need it.


3

For my specific case, it appears to be addons such as Matrix and Assets by Pixel & Tonic that are causing this. By uninstalling the addons I was able to get rid of this error.


3

update looks like this task is not so simple as looks like - can't find where some notice even is registered (like for save custom field setting - looks like it is flashdata). I made a quick example using HubSpot Messaging + ee_notice replacement as combination of JS & hooks - CP Notice before Why just don't replace it with ext.? function cp_js_end( ...


3

OK, I feel like an idiot! Forgot about the Javascript template type. Solution: I simply created a new template, designated it as type "JavaScript", inserted my code, minus the <script> tags, then did <script src="{path="paht_to_js_template"}"></script>. Simple ;)


2

I often use the cp_menu_array hook for this purpose. It runs on every CP request, and unlike cp_js_end, it doesn't run in a separate HTTP request. You just have to be careful to keep the $menu value, as other extensions might be using the same hook. public function cp_menu_array($menu) { ee()->javascript->output('$("#publishForm").css("background-...


2

I know it's a bit old but for someone looking to change some parameters (like the return value) on submit by JavaScript - the reason it's not possible is that EE uses the meta tag which is an encrypted string containing some of the information. So, to change the value you would need to recreate that encryption. Look in the file Channel_form_lib.php for more ...


2

If it's just for a slider on the front-end, forget that you're even using EE and include jQuery as you would with any other platform. HTML5 Boilerplate recommends using the Google CDN with a local fallback, so you could throw this segment in your template: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <...


2

I have found (and apparently you have too!) that using one css file that 'imports' multiple is the way to go. I point WYGWAM to my wygwam-style.css file which includes: @import url("/css/reset.css"); @import url("/css/dynamic-content.css"); Reset.css is just a basic css reset that I use on the front-end of my site, so I figured it'd be best if it was ...


2

is not needs in path here <script src="http://whitewashed.richiesiegel.com/slider.js" type="text/javascript"></script> p.s. EE is not parsed tags in entries w/o special add-ons


2

Not sure if the markup is entirely correct, but this works: $("#shipping_method").change(function(e) { $(this.form).submit(); });


2

Why do you have 3 sets of parenthesis around the member_id tag? Does it work if you simply use {member_id}? EDIT (after comments) I'm not completely sure how this should be set up as I've never used this (will need to get up to speed on it though) but based on what I see in the docs does this work; {if logged_in} ga('create', 'UA-XXXX-Y', { 'userId': ...


2

Try adding a dynamic="off" parameter to your channel entries tag - though I'm not sure how this will pan out with Structure. {exp:channel:entries channel="marquee" limit="3" status="open" dynamic="off"}


2

First of all, the stylesheet tag needs quotation marks. {stylesheet="global_embeds/style"} If you link to the JS file using path variable, all the templates variables on the linked file will be parsed. {path="global_embeds/init.js"} But I really don't think it's good for performance. It's much better to use static links for the JS and CSS.


2

This usually happens with duplicate jquery files. You can add either of these parameters include_jquery="no" include_assets="no"


1

You'll have to write an extension which uses the freeform_module_insert_end hook to save the cookie (or cookies, depending - cookie size is an issue, so maybe one cookie per field?). Something like: function freeform_module_insert_end($field_input_data, $entry_id, $form_id, $this) { $expires = ee()->localize->now + 3600; ee()->input->...


1

Should use 'change' event instead of click. Cause user may not select any new file, then it will remove the existing file. <img src="{url}" /> <input type="hidden" name="member_photo" value="{file_id}" id="cur_file_id"> <input type="file" name="member_photo" id="file_upload"> <input type="hidden" name="member_photo_filedir" value="8">...


1

Darren used a button, which should work too, but here's the jQuery I came up with to remove the name attribute value: HTML: <label class="control-label" for="member_photo">Performer / Band Photo</label> <input type="hidden" name="member_photo[]" value="0"/> <div> <img src="http://placehold.it/150x150" width="150"...


1

I think you need to output a delete button/checkbox alongside each image/input. You can then use jQuery to remove that img/input from the DOM so when you submit the form it's no longer there. Maybe something like this: <input type="hidden" name="member_photo[]" value="0"/> {member_photo}<div><img src="{url}" width="150" /><input ...


1

I was able to fix this by adding the redirect url directly in the javascript: success: function() { window.location.href = "redirected-page.html"; }


1

Another option would to go with a Blocks or Content Elements approach, where your content is actually a list of content building blocks. Then you can have any combination: text-ad-text, text-ad-ad-text, text-ad-text-ad-text, text-somethingelse-text-ad-text, etc. The value of that is that editors can just click on an "Ad" button, instead of needing to ...


1

You've got a few problems, all related to JavaScript, not EE though. You'd be better off asking on the general Stack Exchange if this doesn't answer it. Your JavaScript code is being generated per loop of the bios, so you have 11 copies of the JS you've posted above and only the last one will ever run as they're all triggered from the same class trigger (....


1

<head> <meta name="twitter:card" content="summary_large_image"/> <meta name="twitter:site" content="@lorem"/> {exp:channel:entries channel="blog" limit="1"} {if no_results} <meta name="twitter:title" content="Lorem ipsum dolor"/> <meta name="twitter:description" content="Lorem ipsum dolor sit amet, ...


1

This won't work because you're rendering an EE form with the DOM - EE needs to parse those {exp:..} tags in order to generate an HTML form that will work. You'd be better off generating the form in the EE template and hiding/showing it using javascript/css.


1

I recommend posting on Director-EE, then tweeting about it using the #eecms hashtag. That'll get you the most exposure. (Shameless plug: I'm available for EE work, get in touch)


1

Admittedly it's a few months late but I too was having this issue. It's caused by Store loading it's JS into the body tag before the page has finished loading. The fix is to wrap it in a document.ready function. This is on line 159 of AbstractTag.php which can be found in third_party/store/src/Store/Tag So replace return ' (function() { ExpressoStore....


1

You could use another field type for the images in the post. Grid would be one that would work without going to a third-party resource. Channel Images is a solid commercial addon that handles multiple images in an entry really well.


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