Tuesday, June 29, 2010

Validation prevents SharePoint publishing check-in

The following error appears on check-in:
"This page contains content or formatting that is not valid. You can find more information in the affected sections."
As pointed out by one of the replies here, use Validation Groups. And hide the validation controls in display mode. To check if it's in display mode, see if:
SPContext.Current.FormContext.FormMode == SPControlMode.Display

Wednesday, June 9, 2010

SharePoint 2010 not serving SWF files

Found the answer on this thread response by Manoj Jadoun:

SP2010 has restrictions on displaying SWF files. You need to go to central administration and check the "Browser File Handling" to "Permissive" for that web application's general settings.

JW Player on Fancybox

Using the advise from this thread, here's how I got JW Player working inside FancyBox (to play FLV files in a lightbox):

<a id="viewflv" href="js/player.swf?file=video.flv&amp;autostart=1"
title="Test Flv">Click to view FLV video</a>
<script type="text/javascript"> //<![CDATA[
$(function() {
$("#viewflv").click(function() {
$.fancybox({
'autoscale' : false,
'transitionIn' : 'none',
'transitionOut': 'none',
'padding' : 0,
'title' : this.title,
'width' : 370,
'height' : 301,
'type' : 'swf',
'href' : this.href,
'swf' : { 'wmode':'transparent', 'allowfullscreen':'true' }
});

return false;
});
});
// ]]> </script>