2

I'm trying to remove ALL inserted assets in SafeCracker, I've got my opening tag like so:

{exp:safecracker 
    channel="{prv_channel}"
    return="{segment_1}/{segment_2}/{segment_3}" 
    entry_id="{entry_id}"
    class="form-inline"
    include_jquery="no"
    include_assets="no"
    datepicker="no"
}

So in theory, should this remove all the "inserted" code? Well... It doesn't :(

<script type="text/javascript" charset="utf-8"> 
if (typeof EE == "undefined" || ! EE) { 
var EE = {"BASE":"http:\/\/website\/index.php?","THEME_URL":"http:\/\/website\/themes\/cp_themes\/default\/","PATH_CP_GBL_IMG":"http:\/\/website\/themes\/cp_global_images\/","filebrowser":{"endpoint_url":"ACT=2","window_title":"File Manager","theme_url":"http:\/\/website\/themes\/cp_themes\/default\/"},"fileuploader":{"window_title":"File Upload","delete_url":"C=content_files&M=delete_files"},"lang":{"or":"or","resize_image":"Resize Image","return_to_publish":"Return to Publish","confirm_exit":"When you leave, any data entered will be lost. Are you sure you want to leave?","add_new_html_button":"Add New HTML button"},"publish":{"show_write_mode":true,"title_focus":true,"smileys":false},"user_id":1,"XID":"ac7721bdd8cfa9b80a37ce5b27f741bae5d7ec41"};}
mySettings = {"nameSpace":"html","onShiftEnter":{"keepDefault":false,"replaceWith":"<br \/>\n"},"onCtrlEnter":{"keepDefault":false,"openWith":"\n<p>","closeWith":"<\/p>\n"},"markupSet":[{"name":"b","key":"B","openWith":"<strong>","closeWith":"<\/strong>","className":"btn_b"},{"name":"i","key":"I","openWith":"<em>","closeWith":"<\/em>","className":"btn_i"},{"name":"blockquote","key":"Q","openWith":"<blockquote>","closeWith":"<\/blockquote>","className":"btn_blockquote"},{"name":"a","key":"A","openWith":"<a href=\"[![Link:!:http:\/\/]!]\"(!( title=\"[![Title]!]\")!)>","closeWith":"<\/a>","className":"btn_a"},{"name":"img","key":"","replaceWith":"","className":"btn_img"}]};
myWritemodeSettings = {"nameSpace":"html","onShiftEnter":{"keepDefault":false,"replaceWith":"<br \/>\n"},"onCtrlEnter":{"keepDefault":false,"openWith":"\n<p>","closeWith":"<\/p>\n"},"markupSet":[{"name":"b","key":"B","openWith":"<strong>","closeWith":"<\/strong>","className":"btn_b"},{"name":"i","key":"I","openWith":"<em>","closeWith":"<\/em>","className":"btn_i"},{"name":"blockquote","key":"Q","openWith":"<blockquote>","closeWith":"<\/blockquote>","className":"btn_blockquote"},{"name":"a","key":"A","openWith":"<a href=\"[![Link:!:http:\/\/]!]\"(!( title=\"[![Title]!]\")!)>","closeWith":"<\/a>","className":"btn_a"},{"name":"img","key":"","replaceWith":"","className":"btn_img"}],"onTab":{"keepDefault":false,"replaceWith":"\t"}};
</script>

<script type="text/javascript" charset="utf-8" src="http://website/index.php?ACT=58&amp;ui=core,widget,mouse,position,draggable,resizable,button,dialog&amp;plugin=scrollable,scrollable.navigator,markitup,thickbox,toolbox.expose,overlay,tmpl&amp;v=1366647338"></script>

<script type="text/javascript" charset="utf-8">
// <![CDATA[
$(document).ready(function() {
    if (typeof SafeCracker == "undefined" || ! SafeCracker) { var SafeCracker = {markItUpFields:{}};}});
// ]]>
</script>

WHY!?

I can't remove them in the module file due to me needing them elsewhere on another template.

How can I remove these? Because jQuery isn't included before these scripts, it's just throwing big fat errors in console! Eugh.

3

You're likely looking at the new docs that just went up, for EE 2.7 (released yesterday).

Under EE 2.6.1, the parameter you want is called safecracker_head, not include_assets.

| improve this answer | |
  • Perfect! I didn't notice that. Doh. I'll need to upgrade to 2.7 now as well. – Jason Mayo Aug 28 '13 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.