Tuesday, November 17, 2015

SharePoint - To Play Video from Video Library with carousel

Include this below scripts and update the video library as required in a content editor webpart.

<script type="text/javascript">
    function ShowPlayer(PlayerId) {
        var elm = document.getElementById(PlayerId);
        elm.style.display = 'block';
    }
    function HidePlayer(PlayerId) {
        var elm = document.getElementById(PlayerId);
        elm.style.display = 'none';
    }
  </script>

<div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div style="width:176px;height:104px;background-image:url('/film1.jpg');
                cursor:hand;"
                onclick="ShowPlayer('divp');
                playerp.controls.Play()" >
                <div id="divp" style="display:none;">
                <object classid='objPlayerID'
                id='playerp'
                width='174'
                height='104'
                standby='Please wait while the video is loaded...'>
                <param name='url' value='/film1.wmv' />
                <param name='src' value='/film1.wmv' />
                <param name='TransparentAtStart' value='0' />
                <param name='AutoStart' value='0' />
                <param name='CurrentMarker' value='0' />
                <param name='Balance' value='0' />
                <param name='CurrentPosition' value='0' />
                <param name='showcontrols' value='false' />
                <param name='enablecontextmenu' value='false' />
                <param name='fullscreen' value='False' />
                <param name='mute' value='false' />
                <param name='PlayCount' value='1' />
                <param name='rate' value='1.0' />
                <param name='uimode' value='none' />
                <param name='volume' value='100' />
                <embed type='application/x-mplayer2'
                pluginspace = 'http://www.microsoft.com/Windows/MediaPlayer/'
                name='playerp' ShowStatusBar='0' EnableContextMenu='0' autostart='0'
                width = '174' height = '129' loop='false'
                transparentatstart='true' src='/film1.wmv' />
                </object>
               
                </div>
        </div>

        <div style="text-align:left;">
                <img alt="" src=" /video_play.gif "
                title="Play" style="width: 82px;cursor:hand;height: 17px;padding-top:5px;"
                onclick="ShowPlayer('divp');playerp.controls.Play()" />
                <img alt="" src="/stop.png "
                title="Stop" style="width: 23px;cursor:hand;height: 17px;padding-top:5px;"
                onclick="HidePlayer('divp');playerp.controls.pause()";playerp.controls.stop(); />
                </div>
    </div>


Please update the source file, video locations, images for play, stop respectively to work correctly

Happy Browsing!
Relax..

SharePoint - To make Calculated Column as Hyperlink with URL parameters



 Steps to add a hyperlink column/field in the list with query string parameters.

1. Add a calculated field in the list and name it.  Select the calculated field type and in the calculation box, use the URL to compose the address string.
 Example :
 ="<a href='https://myserver/sites/team1?ProjectName="&Title&"'>"&Title&"</a>"

This will add the URL with server name and then add the query string parameter as title of that list item.

2. Select the Calculated field type as "Number".  Please do not select Single line of text. Number will give you the expected result as Hyperlink. (Decimals as Automatic.)

3. Save the field.

This will give the Hyper link the list column with query string parameter from other columns in that list.


Happy Browsing!
Relax..


Tuesday, June 16, 2015

SharePoint - HTML / JavaScript Banner - Static Sliding Images

This will give you a basic static image sliding code which you can apply on your home page. This will have images and link to any URL which is predefined in the HTML file. An easy and free approach for the rotating banner or images or div that can be used to decorate the home pages of your website.  It has been tested and works in latest versions of all browsers. I'm using the frames and JQuery library defined to support this model. These JQuery are free to download as is available from internet.

For dynamic sliding images , please refer this article. 


Click Here to Get the Source Code with JS and CSS files. Check for more (external).

Happy Browsing!
Relax..