TinyMCE stripping embed code in Drupal 6 using Wysiwyg module - drupal

I have a Drupal 6 installation with a Wysiwyg profile set up to use TinyMCE. The profile has the media button turned on. I have defined the Filtered HTML input format to allow the <embed>, <object>, and <param> tags and made this the default format for all roles. When you use the media button (the thing that looks like a couple frames of film) and enter a url, code like the following is generated and visible in the source:
<object width="100" height="100" data="http://youtu.be/wEWSHWp5vHM" type="application/x-shockwave-flash">
<param name="data" value="http://youtu.be/wEWSHWp5vHM" />
<param name="src" value="http://youtu.be/wEWSHWp5vHM" />
</object>
However, when you preview or save the post, the video is not rendered.
Here is the list of allowed tags:
<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd><form><input><br><p><div><span><img><h1><h2><h3><h4><h5><h6><table><tr><td><thead><th><tbody><iframe><embed><object><param>
Anybody have any idea what I'm doing wrong? I found this recent post that seems to imply that you need to set TinyMCE to not use media_strict, but I can't believe you have to add a homebrew module to get embedding to work: http://drupal.org/node/368388#comment-5501684

What happens when you try embedding using 'Full HTML Filter'? You might also create a whole new input filter type for this content type.

Related

How I can load Wordpress page in Codeigniter without using iframe

Hi I am trying to load a single page of my WordPress site into a Codeigniter project. But without using iframe. Is it possible?
Ajax call into particular div element ? Or html object tag.. ?
<object style="(width and height in pixels)" type="text/html" data="http://my-wpsite.com" typemustmatch="typemustmatch">
<param name="data" value="http://my-wpsite.com">
Object unavailable at this moment.
</object>

Embed PDF In Dexterity File View

I want a quick and easy (plugin dependent) PDF embedded view, not just a download link for File items.
My custom File schema looks like:
class IBulletin(form.Schema):
...
form.primary('file')
file = NamedBlobFile(
title=_(u"File"),
required=False,
)
class Bulletin(Item):
grok.implements(IBulletin, IFile)
I follow instruction at http://www.kcsts.co.uk/blog/embedded-pdf-in-file-view-with-plone and it works for Archetypes File view, but seems not working for Dexterity File view.
I guess the critical part is within <object ...> and <embed ...>. My trial to the template looks as follows:
<metal:content-core define-macro="content-core"
tal:define="content_type context/file/contentType|nothing;
location string:${context/absolute_url}/##download/file/${context/file/filename};
v python:context.restrictedTraverse('contenttype_utils');">
<object class="viewembededfile" type="application/pdf" data=""
tal:condition="python:content_type.endswith('pdf')"
tal:attributes="data location; width string:100%; height string:900">
Please click here to download the PDF.
<embed src="" class="viewembededfile" type="application/pdf"
tal:attributes="src location">
</embed>
</object>
...
I also tried <object ... attributes="data context/absoulte_url;" and <embed ... attributes="src context/absolute_url" but does not work. It shows only a block with gray background. See the image for reference.
Any advice?
I faced the same problem and after some trial and error, I found out that if I don't include the file name at the end of the location of the pdf file then at least Firefox starts to show the embedded pdf.
<object type="application/pdf"
tal:attributes="data string:${context/absolute_url}/##download/file">
</object>
Same applies for links to the pdf file, with file name a download dialog is shown, and without the pdf file is rendered inside Firefox.

Define CSS class's on tables in Sitecore

In one of my Sitecore solutions the user needs to have some predefined CSS class's that they can put on their tables created in the richtext editor from the back office.
When I go to the Table wizard I can see the CSS class dropdown list, but the only option that's available is one called "Clear class".
How can I define some more class's in that drop down list?
You want to find the following setting in the web.config:
<!-- WEB SITE STYLESHEET
CSS file for HTML content of Sitecore database.
The file pointed to by WebStylesheet setting is automatically included in Html and Rich Text fields.
By using it, you can make the content of HTML fields look the same as the actual Web Site
-->
<setting name="WebStylesheet" value="/default.css" />
Whatever that CSS file is, that's the one where you can add your new classes. Once you change it, clear your browser cache and re-open the browser. The RTE should then get the new classes.
Problem:
Need to add predefined css in external css to RadEditor in Sitecore CMS
Solution:
Add css class to default.css which can be found in WEB_ROOT/Web.config on the following line:
<setting name="WebStylesheet" value="/default.css" />
Example css:
.cufon {
font-weight: bold;
color: #666;
}
Modify the ToolsFile.xml defined in where the Sitecore uses the RadEditor (in my case: WEB_ROOT/sitecore/shell/Controls/Rich Text Editor/Default.aspx) and add the following lines:
<classes>
<class name="Clear Class" value="" />
<class name="Cufon Book" value=".cufonBook" />
<class name="Cufon Light" value=".cufonLight" />
</classes>
Reference:
RadControls – CSS Styles http://www.telerik.com/help/aspnet-ajax/cssstyles.html
how to load css classes from my own project specfic css in Sitecore’s RAD editor? how to load css classes from my own project specfic css in Sitecore's RAD editor?

.swf will play in IE but not Chrome

I have a asp.net 3.5 page that shows a file with a .swf extension. In IE when the page is pulled up the flash file is played and all looks normal. When I look at it in Google Chrome their is just a white space where the file should be playing. Is their a way to make the file play when viewing in chrome?
Here is the code:
<object width="400" height="250">
<param name="movie" value="abc.swf">
<embed src="../StaticPages/abc.swf" width="400" height="250" />
</object>
IE 7-9 will play as long as the param value is a valid path; but Chrome and other compliant browsers require both param and embed paths to be correct.
The page that is showing the flash file is being loaded by a text file that has the text for the page and the tags in it to run the flash file.
Once I looked at the tags more I see where the issue was. the src and value path were not the same so chrome could not locate the file. When I updated the file locations to match it worked.
Thanks
Original Code
<object width="400" height="250">
<param name="movie" value="abc.swf">
<embed src="../StaticPages/abc.swf" width="400" height="250" />
Fixed/correct Code:
<object width="400" height="250">
<param name="movie" value="/StaticPages/abc.swf">
<embed src="/StaticPages/abc.swf" width="400" height="250" />
This is most likely to be related to way you embed your swf into your page.
Especially if it also occurs in other browsers like firefox.
You can use SWFObject for this. It is an open source javascript library that handles embedding swfs in all different browsers.
More information on why this occurs: http://livedocs.adobe.com/flex/3/html/help.html?content=wrapper_13.html
Or if you want a more fancy way to display video content on a browser, try
http://flowplayer.org/demos/installation/index.html
and
http://www.longtailvideo.com/players/jw-flv-player/
Could you provide the actual tags / javascript you are using to place the flash file in the page?
Have you tried opening the swf file by itself in chrome to make sure it is not just a tag issue?
As DennisJaamann points out, at least as far as firefox, there are issues with tags. Firefox won't play swfs using just the object tag without specifying the proper type.
The problem of the difference in browsers is such that if you poke at the Adobe site itself, you'll see they use a public library for embedding swfs on their own site.

Multiple JWPlayers on Wordpress page

I have a Wordpress site that has a large photo slider for the header. Within that slider, I have buttons to launch videos corresponding to the current image. These are being set by custom tags within multiple posts. All the data is being passed correctly (based off of looking at the source code), however, I can only get 1 video to play while the other 2 (3 total) just appear black and won't play anything at all.
Here is my embed code:
<div id="video-block'.$videoID.'" class="video-block-player hide">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'.$video_width[0].'" height="'.$video_height[0].'" id="video'.$videoID.'" name="video'.$videoID.'">
<param name="movie'.$videoID.'" value="player.swf">
<param name="allowfullscreen" value="true">
<param name="allowscriptaccess" value="always">
<param name="wmode" value="transparent">
<param name="flashvars" value="'.$video_link[0].'&autostart=true&icons=false&mute=true">
<embed
type="application/x-shockwave-flash"
id="video'.$videoID.'"
name="video'.$videoID.'"
src="player.swf"
width="'.$video_width[0].'"
height="'.$video_height[0].'"
bgcolor="undefined"
allowscriptaccess="always"
allowfullscreen="true"
wmode="transparent"
flashvars="file='.$video_link[0].'&autostart=true&icons=false&mute=true"
/>
</object>
</div>
The $videoID is being set dynamically to ensure that elements like the div id's are unique, all other variables are being set and pulled from custom tags (and again, appear correct when I view source).
Does anyone have any suggestions as to what I might do to get multiple video players working on a single page? (Please note that I am using JWPlayer, but am not forced to use it if someone has a better solution, but that this embed code is already being launched from within another Plug-In [SlidePress] so plug-in options may not be the best solution.)
Thanks in advance for any and all help!
J
Try Firebug to see what's loading and not loading and what errors you get.

Resources