JavaScript Forms Validation

0

Posted on : 09-12-2008 | By : Stefan | In : Javascript

Ok I found this great web example on forms validation and just had to post it for later reference. That’s what blogs are for, right?

http://www.webcredible.co.uk/user-friendly-resources/dom-scripting/validate-forms-javascript.shtml

SilverStripe TinyMCE Media / Embed Movies How-to

2

Posted on : 03-12-2008 | By : Stefan | In : Silverstripe CMS

Phew! I’ve just spent the best part of 3 hours figuring out how to add in media support for TinyMCE and SilverStripe CMS. I hope the following code helps others and if there’s any questions i’ll do my best to help.

Firstly we need to add the button to the TinyMCE. SilverStripe is setup to do this by linking in from a seperate file.

Edit /saphire/forms/HtmlEditorField.php
new HtmlEditorField_button(”mceMedia”,”media:media”,_t(’HtmlEditorField.MEDIA’, “Insert media”)),

Next we need to enable the backend TinyMCE code itself.

Edit /cms/javascript/tinymce.template.js
mode : “textareas”,
plugins : “contextmenu,table,emotions,media,paste”,

Now go to /admin/?flush=1 to flush the cache.

That’s it, you should have a media button on your TinyMCE toolbar which pops up and gives option to add in Flash, Quicktime, WMV etc.