SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Evangelist
    Join Date
    Apr 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    2 problems with Wordpress

    I try to find a solution or plugin to add :
    - an iframe
    - a javascript code
    inside posts

    I do not find anything working

    Could you help please

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,486
    Mentioned
    164 Post(s)
    Tagged
    1 Thread(s)

    tags

    If there aren't any plugins then you may need to add the tags (ie. iframe, script) to the content filter code. Although this may introduce a security risk if you allow others to post, so be careful.

  3. #3
    SitePoint Evangelist
    Join Date
    Apr 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mittineague View Post
    If there aren't any plugins then you may need to add the tags (ie. iframe, script) to the content filter code. Although this may introduce a security risk if you allow others to post, so be careful.
    ???

    RAW HTML = http://wordpress.org/extend/plugins/raw-html/

    It's fine to add JS in the code mode with this plugin

    [RAW]... JS ...[/RAW]



    For iFrames ... no idea

  4. #4
    SitePoint Addict BlazeMiskulin's Avatar
    Join Date
    May 2007
    Location
    Wisconsin
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've added both JS and iframes to WP without any special plugins or modifications. In fact... I have a snippet of JS that creates a dynamic-height iframe (height changes to the size of the content) specifically created for—and used in—WP.

    Has something changed in the last couple revisions that disallows this?
    M Blaze Miskulin
    President
    Geek Niche Web Hosting

  5. #5
    SitePoint Wizard ryanhellyer's Avatar
    Join Date
    Oct 2006
    Location
    New Zealand
    Posts
    2,323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If that Raw HTML plugin does what it says it does (I haven't tried it), then it should be able to do iframes no problem at all.

    Note: there is a warning about bugs in this plugin here ... http://wordpress.org/support/topic/152760

    BlazeMiskulin - A standard WordPress 2+ installation will mess up most Javascript, HTML etc. without a plugin. So unless you are using a plugin and have forgotten about it or have hacked the core code then I have no idea how you managed to place an iframe in your posts.

  6. #6
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    16,486
    Mentioned
    164 Post(s)
    Tagged
    1 Thread(s)

    plugin

    The plugin adds filters to "the_content" so it will not work for "the_content_rss", "the_excerpt", or "the_excerpt_rss".

    Also note that the plugin only allows for 1 set of "RAW" tags per post. But it appears that inside them anything goes, including an iframe.

  7. #7
    SitePoint Evangelist
    Join Date
    Apr 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I gave this solution (the RAW HTML plugin) because I tried it - of course

    Fine with javascript

    If I had no success with the iframe it's because the code given by the affiliate program was wrong

    With a clean code it does work even without the RAW plugin

    Well - The use of javascript and iframes with Wordpress is not so easy
    Last edited by Lastbutnotleast; Mar 11, 2008 at 19:15.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •