1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Header script problem page_container_js_head

Discussion in 'Troubleshooting and Problems' started by otfordnet, Apr 5, 2013.

  1. otfordnet

    otfordnet Member

    Hi, I'm trying to add a site wide HEAD script for online chat support using the Zopim widget.
    Edited page_container_js_head to include lines at bottom and works fine for normal page loads. However when you are creating a new thread and click on toolbar icon for picture the popup prompt also includes the online chat prompt too, overlaying the cancel option :-(
    headscript.jpg
    Is there a different template location I should use for this?
    Many thanks
    JohnH

    Apologies, wrong forum posted in :(
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Does that happen with all editor popups - URL link, video and code too?
     
  3. otfordnet

    otfordnet Member

    Hi Brogan, thanks for looking. Yes, it does on all of them.
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    The problem is all the editor_dialog_ popup templates include this line of code:

    Code:
    <xen:include template="page_container_js_head" />
    Which is why it is appearing in the iframes for code, image, media, etc.

    Try adding the script to a different template - see this from the FAQ:

    Where can additional JavaScript be placed?
    Additional JavaScript can be placed in the PAGE_CONTAINER, page_container_js_head or page_container_js_bodytemplates. If PAGE_CONTAINER is used, it can be placed anywhere in the template. If page_container_js_head is used, it will be included in the head section of PAGE_CONTAINER. If page_container_js_body is used, it will be included in the body section of PAGE_CONTAINER, after the footer. It depends on the JavaScript to a large extent; some require to be placed in the head, some in the body.

    http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-181112
     
    otfordnet likes this.
  5. otfordnet

    otfordnet Member

    Thanks very much :) .. swapped it to PAGE_CONTAINER and works fine.
    Appreciate the help.
     

Share This Page