Video plugin

Creating and modifying plugins.
Post Reply
lib3rty1
Regular
Posts: 19
Joined: Mon May 03, 2010 1:07 am

Video plugin

Post by lib3rty1 »

Hi,
is there a some kind of plugin that would allow inserting embedd code or iframe into posts ?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Video plugin

Post by garvinhicking »

Hi!

You can actually insert HTML code quite easily; either you go to your personal preferences and disable WYISWYG editing (maybe even temporarily for some posts only). Or when you use the WYSIWYG editor, you can switch to HTML source mode. However, in some cases adding javascript/iframes intpo the WYSIWYG editors might behave oddly when saving/restoring, as they might choke on that code.

So disabling the WYSIWYG editor is definitely the most safe version.

An advanced usage would be to isntall the "Extended properties for entries" plugin, then add a custom property field (in the configuration of the plugin) called "EmbeddedCode" or something like that, and then edit your entries.tpl template file and place {$entry.properties.ep_EmbeddedCode} where you would like your code to show up. The custom entry properties fields do not utilize the WYSIWYG editing component, so you can paste any JS/XHTML code you like.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply