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?
- craigh responded to »TagIt 3.0 for Zikula« 03:58 PM
- jmvaughn responded to »error when i try to upgrade to the last version of dizkus module (3.1)« 12:05 PM
- localrags responded to »Remove contents of nuke_sc_anticracker from Database« 11:30 AM
- jmvaughn responded to »Shoutit for zikula 1.3?« 09:31 AM
- mdee responded to »Different page content under one template (tpl file) based on URL« 07:17 AM
- espaan responded to »Categories disappear when editing ...« 08. Feb
- eledril responded to »How decrease zikula cpu usage« 08. Feb
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
SafeHTML output filter and youtube
-
- Rank: Softmore
- Registered: May 12, 2005
- Last visit: Oct 21, 2009
- Posts: 109
-
- Rank: Developer
- Registered: Jun 16, 2003
- Last visit: May 29, 2010
- Posts: 1915
I assume you mean the object tag? you can enable that in admin > settings -
- Rank: Team Member
- Registered: Sep 06, 2006
- Last visit: May 09, 2010
- Posts: 2411
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:(that embed the media with id=4 where you put that text)Code
MEDIAATTACHI-4
You can write it in a post here in the community
and preview to see it working
--
- Mateo T. -
Mis principios... son mis fines -
- Rank: Moderator
- Registered: Mar 15, 2005
- Last visit: May 30, 2010
- Posts: 1077
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 ] -
**unknown user**
- Rank: Expert
- Registered: Mar 16, 2002
- Last visit: Apr 02, 2010
- Posts: 1208
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 -
- Rank: Registered User
- Registered: Jul 02, 2009
- Last visit: Jul 04, 2009
- Posts: 10
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? -
**unknown user**
- Rank: Helper
- Registered: Mar 16, 2002
- Last visit: May 18, 2010
- Posts: 985
-
- Rank: Freshman
- Registered: Apr 18, 2006
- Last visit: Feb 28, 2010
- Posts: 68
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 -
- Rank: Freshman
- Registered: Dec 30, 2006
- Last visit: Apr 20, 2010
- Posts: 58
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 -
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: Jun 01, 2010
- Posts: 6840
Looks like the big issue is safeHTML needs to adhere to the settings in HTML settings.
--
Home Page | Find on Facebook | Follow on Twitter
-
- Rank: Moderator
- Registered: Mar 15, 2005
- Last visit: May 30, 2010
- Posts: 1077
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 ] -
**unknown user**
- Rank: Expert
- Registered: Mar 16, 2002
- Last visit: Apr 02, 2010
- Posts: 1208
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 -
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: Jun 01, 2010
- Posts: 6840
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
-
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: Jun 01, 2010
- Posts: 6840
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
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
