[1]

job78
Guest
May 11th, 2009 at 8:19 pm

Hi,

I have disabled Moderation like you said on the faq plugin, but embed youtube code continue to be stripped.

How can we make to resolve that ?

Why don\’t make a custom fild specifically for embed codes videos ?

Thanks

PS : Sorry for my bad english, I\’m French.

Permalink | Quote

[2]

job78
Guest
May 12th, 2009 at 8:49 pm

Is there a way to permit embedded videos even if moderation is disabled ?
Thanks!

Permalink | Quote

[3]

Mark Cunningham
Guest
May 26th, 2009 at 2:26 pm

I’d use Custom Fields to achieve the effect. Have a custom field text area that takes the embedded video code and then on you’re single.php template you can modify it take the value of the Custom Field and embed the video.

Add a Custom Field widget and set it to Text Area. Disable preview and Append to Post Content. I gave it a title key of youtube. Then in single.php, I added this piece of code which displays the embedded code correctly:

<?php $youtube = get_post_meta(get_the_ID(),'youtube',true); if(!empty($youtube)) { ?>
   <p><?php echo $youtube; ?></p>
<?php } ?>

Now the danger with this method is security, they can paste any sort of code. So what might be easier is to ask for the URL of the youtube video and in the singe.php, convert it to the embedded code and display it.

Or an even nicer way. Install the plugin Viper's Video QuickTags. Now configure the Custom Field to be a URL and modify the format to be "[youtube]%%VALUE%%[/youtube]" and make sure "Append Custom Field to Post Content" is checked. This won't work in preview, but if they supply a URL for youtube, Vipers video plugin will handle how to display it.

Permalink | Quote

[4]

soph
Guest
May 26th, 2009 at 2:39 pm

Don’t worry about your English, Mar is used to it… being married to a Frenchie :)

Permalink | Quote

[5]

.
Guest
June 7th, 2009 at 6:02 pm

isn’t working

Permalink | Quote

Advertisments

Join the Discussion