SafeHTML output filter and youtube  Bottom

Go to page 1 - 2 [+1]:

  • SafeHTML output filter deny the object HTML tag, which youtube and other video sites uses...

    How I can post YT videos without disable de SafeHTML?
  • I assume you mean the object tag? you can enable that in admin > settings
  • You can install MediaAttach
    and upload the videos there.

    Then install and enable MultiHook for your Content-Management module and embed them with the MediaAttach needle with a keyword like:

    Code

    MEDIAATTACHI-4
    (that embed the media with id=4 where you put that text)

    You can write it in a post here in the community
    and preview to see it working icon_wink

    --
    - Mateo T. -
    Mis principios... son mis fines
  • Even with the object tag enabled in settings, embedding Youtube videos does not work. They still get stripped even if all the HTML settings are allowed.

    Recommending MediaAttach/Multihook to a new user is like asking someone who has never built a shed to build a house and handing them a hammer. MediaAttach is at best complicated and not an appropriate solution for what most of us consider should be out of the box working, posting youtube videos.

    --
    [ stevencopley.com ]
  • Well it just seems to me that it should work without MediaAttach anyway if all the right HTML tags are allowed in the Settings. It is deceiving (obviously, or this thread wouldn't exist) because one would expect it to work after following the rules.



    edited by: Wendell, Jun 04, 2009 - 09:40 AM
  • One question I have is, I am able to post YouTube videos in a block but not the main content area of the news or when testing the Dizkus forums. Is this normal? It seems the safe HTML is used only in parts of the site.

    Another thing that I am wondering is that the safe HTML list doesn't show certain tags used to embed YouTube videos in order to allow/disallow them. For example the value= and type= tags. Is there a way to add those to allow them instead of turning the entire safe HTML feature off?
  • Not sure about the News module [maybe hook bbcode with it].
    For Diskuz, I've added a new type, [YouTubeUrl] and [/YouTubeUrl]
    and that would be converted to the appropriate code.... [in my case I used the javascript version].

    Maybe an idea for the future development of bbcode...

    - Igor
  • I use Lightbox XL for YouTube or other videos.
    Sample:http://postnuke-them…display-sid-18.html

    --
    regards from germany

    High Quality Postnuke + Zikula Themes
  • Hi

    I use MultiHook and youtube needle:

    youtube.php

    Code

    function MultiHook_needleapi_youtube($args)
    {
        // Get arguments from argument array
        $nid = $args['nid'];
        unset($args);
       
        // cache the results
        static $cache;
        if(!isset($cache)) {
            $cache = array();
        }

        if(!empty($nid)) {
            if(!isset($cache[$nid])) {
                // not in cache array
                        $url   = 'test';
                        $title = 'test';
                        $cache[$nid] = '
                                            <param name="movie" value="http://www.youtube.com/v/'
    . $nid . '">
                                            </param><param name="allowFullScreen" value="true">
                                            </param><param name="allowscriptaccess" value="always">
                                            </param> <embed src="http://www.youtube.com/v/'
    . $nid . '" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344">
                                            </embed>'
    ;
                    } else {
                        $cache[$nid] = '<em>' . DataUtil::formatForDisplay(_MH_HP_UNKNOWNPAGE . ' (' . $nid . ')') . '</em>';
                     
                                    }
            $result = $cache[$nid];
                   
        } else {
            $result = '<em>' . DataUtil::formatForDisplay(_MH_HP_NONEEDLEID) . '</em>';
        }
        return $result;
       
    }


    youtube_info.php

    Code

    function MultiHook_needleapi_youtube_info()
    {
        $info = array('module'  => 'youtube',
                      'info'    => 'YOUTUBE{link}',
                      'inspect' => false);
        return $info;
    }


    and then user can type YOUTUBEmoviecode like YOUTUBEn65-dNZO_Bw
    youtube.com/watch?v=moviecode

    Still need safeHTML off and the object tag enabled in settings...

    --
    rgfdgafgaf
  • Looks like the big issue is safeHTML needs to adhere to the settings in HTML settings.

    --
    Home Page | Find on Facebook | Follow on Twitter
  • I must again say that directing a new user to do tons of hacks or complicated third party module installs is the wrong way to handle this. Zikula should be able to allow posting of videos or any content through simple administrative settings, like HTML output settings. Making users jump through hoops is a terrible move andthis is a huge problem.

    --
    [ stevencopley.com ]
  • jaenosjelantru

    I must again say that directing a new user to do tons of hacks or complicated third party module installs is the wrong way to handle this. Zikula should be able to allow posting of videos or any content through simple administrative settings, like HTML output settings. Making users jump through hoops is a terrible move andthis is a huge problem.

    +100
  • Quote

    Still need safeHTML off and the object tag enabled in settings...


    Anything that requires safeHTML to be turned off, is not a good option. This also goes back to an admin should be able to use any tag they want. I shouldn't have to open the whole system up to the use of object, embed, etc by users to use it myself.



    edited by: HalbrookTech, Sep 15, 2009 - 09:58 AM

    --
    Home Page | Find on Facebook | Follow on Twitter
  • videokid

    Not sure about the News module [maybe hook bbcode with it].
    For Diskuz, I've added a new type, [YouTubeUrl] and [/YouTubeUrl]
    and that would be converted to the appropriate code.... [in my case I used the javascript version].

    Maybe an idea for the future development of bbcode...

    - Igor

    Can you share your code for this? Independant of the issue at hand, that would be a very handy bit of code. :)

    --
    Home Page | Find on Facebook | Follow on Twitter
  • Ideally, a YouTube plugin for Scribite would be awesome!

Go to page 1 - 2 [+1]:

  • 0 users

This list is based on users active over the last 60 minutes.