Problems, need help? Have a tip or advice? Post it here.
16 posts Page 1 of 2
Hi, im having trouble posting a youtube video to my blog. Ive tried using the iframe and the object from youtube. Posting the url from youtube and clicking on the Flash button in the editable region.

What it does is not showing a video, its just outputting text. Any idea what it might be?

By default, Couch as a security measure neutralizes all potentially dangerous tags (like 'object', 'script', 'iframe') etc.
This is the reason why one cannot use Youtube video embed code directly from within the wysiwyg CKeditor.

We are working on ways to allow this in a safe manner (perhaps by allowing something like Wordpress short-tags within contents).

For now, as a work around, you could try the following method -
Create a separate editable region of type textarea and set its 'no_xss_check' parameter to '1'.
Code: Select all
<cms:editable name='video' type='textarea' no_xss_check='1' />

Enter the Youtube embed code within this textarea.
The setting of 'no_xss_check' parameter to '1' will cause Couch to leave all contents entered untouched.

This 'video' custom field can now be used anywhere in your template in the regular manner
Code: Select all
<cms:show video />
Thanks it worked perfectly.
Im trying to implement this code. I'm still a novice and am suprised I got this far! can you please tell me exactly how and where to put this code?

Right now. I put <cms:editable name='video' type='textarea' no_xss_check='1' /> on the blog.php page at the top with the other editable reigons

and the cms show video in the blog-list page like this
Code: Select all
[code]<!-- Post Image -->
            <img class="thumb" alt="" src="<cms:show blog_image />" />
                <!-- Post Video -->
                <cms:show video />
            <!-- Post Content -->
            <cms:excerptHTML count='75' ignore='img'><cms:show blog_content /></cms:excerptHTML>
            <!-- Read More Button -->
            <p class="clearfix"><a href="<cms:show k_page_link />" class="button right"> Read More...</a></p>

Is it suppost to show up in the admin section?


You are right in putting <cms:editable name='video' type='textarea' no_xss_check='1' /> with other other editable regions.
By placing this statement within 'blog.php' and then refreshing the template (i.e. accessing it again in your browser) while logged-in as super-admin will add a new editable region in the admin panel.

You should find a textarea added to 'blog.php' in the admin-panel.
Any thing inserted into this editable region can now be accessed by <cms:show video />.

We actually paste into this editable region the 'embed code' that is available for every individual video at YouTube (or any other service).
We then output this code back onto the generated webpage by calling <cms:show video />. This way we can show embedded videos.

Hope I was able to make the process clearer. Do let us know if still require any help.
thank you! works great
Hi Kamran,

I seem not to be able to post a video through the wisywyg source code even though i used the codesnippet above.

Any ideas?

I seem not to be able to post a video through the wisywyg source code even though i used the codesnippet above

Wysiwyg (i.e. editable region of type 'richtext') will always 'neutralize' the video tags as a security measure.
The method we had outlined utilized an editable region of type 'textarea' instead with the parameter 'no_xss_check' set to '1'.

Could you please confirm that you are using 'textarea' with 'no_xss_check'?
Im not using textarea but richtext and the tag.

Is it possible to solve this in any way as i dont think the organisation isnt so fan about this problem. Will shortcodes go around the problem or will it still naturlize the problem?

Thanks and regards
To use videos with richtext, you can use 'shortcodes'.
Please upgrade to v1.2 (found at viewtopic.php?f=5&t=3781)
to use shortcodes.

You can find details about shortcodes in our documentation at ... codes.html

Do let me know if require any help.
16 posts Page 1 of 2

Who is online

In total there are 12 users online :: 0 registered, 0 hidden and 12 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 12 guests