From: <mol...@us...> - 2009-08-28 14:25:50
|
Revision: 1321 http://openutils.svn.sourceforge.net/openutils/?rev=1321&view=rev Author: molaschi Date: 2009-08-28 14:25:43 +0000 (Fri, 28 Aug 2009) Log Message: ----------- add again ignoreDim attribute to tag media Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media.tag Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld 2009-08-28 13:42:23 UTC (rev 1320) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld 2009-08-28 14:25:43 UTC (rev 1321) @@ -112,6 +112,17 @@ </tr> <tr> <td> + ignoreDim + </td> + <td> + false + </td> + <td> + if true the img element will be rendered without width and height attributes + </td> + </tr> + <tr> + <td> autoPlay </td> <td> Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media.tag 2009-08-28 13:42:23 UTC (rev 1320) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media.tag 2009-08-28 14:25:43 UTC (rev 1321) @@ -9,6 +9,7 @@ <jsp:directive.attribute name="cssClass" required="false" rtexprvalue="true" /> <jsp:directive.attribute name="style" required="false" rtexprvalue="true" /> <jsp:directive.attribute name="resize" required="false" rtexprvalue="true" /> + <jsp:directive.attribute name="ignoreDim" required="false" rtexprvalue="true" type="java.lang.Boolean" /> <jsp:directive.attribute name="autoPlay" required="false" rtexprvalue="true" type="java.lang.Boolean" /> <jsp:directive.attribute name="loop" required="false" rtexprvalue="true" type="java.lang.Boolean" /> <jsp:directive.attribute name="noPlayIcon" required="false" rtexprvalue="true" type="java.lang.Boolean" /> @@ -38,11 +39,13 @@ <c:if test="${not empty id}"> <![CDATA[ id="${id}"]]> </c:if> - <c:if test="${not empty width"> + <c:if test="${not ignoreDim}"> + <c:if test="${not empty width"> <![CDATA[ width="${width}"]]> - </c:if> - <c:if test="${not empty height"> + </c:if> + <c:if test="${not empty height"> <![CDATA[ height="${height}"]]> + </c:if> </c:if> <c:if test="${not empty cssClass}"> <![CDATA[ class="${cssClass}"]]> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2009-12-30 16:55:41
|
Revision: 1559 http://openutils.svn.sourceforge.net/openutils/?rev=1559&view=rev Author: fgiust Date: 2009-12-30 16:55:32 +0000 (Wed, 30 Dec 2009) Log Message: ----------- moved tags to META-INF/media Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld Added Paths: ----------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/imageTag.tag trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag Removed Paths: ------------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/imageTag.tag trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media.tag Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld 2009-12-30 16:43:03 UTC (rev 1558) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld 2009-12-30 16:55:32 UTC (rev 1559) @@ -9,7 +9,7 @@ <uri>http://net.sourceforge.openutils/mgnlMedia</uri> <tag-file> <name>media</name> - <path>/META-INF/tags/media.tag</path> + <path>/META-INF/tags/media/media.tag</path> <display-name>Media Tag</display-name> <description> <![CDATA[ @@ -188,8 +188,8 @@ false </td> <td> - if true, and ignoreDimensions is not true it will apply style attribute on img tags with sidth and height in "em". the em values will be computed using as width in pixel * emRatio (see next attribute) - </td> + if true, and ignoreDimensions is not true it will apply style attribute on img tags with sidth and height in "em". the em values will be computed using as width in pixel * emRatio (see next attribute) + </td> </tr> <tr> <td> @@ -200,7 +200,7 @@ </td> <td> float value to convert dimensions from px to em - </td> + </td> </tr> </table> @@ -355,7 +355,7 @@ <b>no control char</b> : makes the new image to contain the required res and the crop the simmetric bands that outfit res </li> - </ul> + </ul> ]]> </description> <function-class>net.sourceforge.openutils.mgnlmedia.media.tags.el.MediaEl</function-class> Deleted: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/imageTag.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/imageTag.tag 2009-12-30 16:43:03 UTC (rev 1558) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/imageTag.tag 2009-12-30 16:55:32 UTC (rev 1559) @@ -1,35 +0,0 @@ -<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jsp/jstl/core" - xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:fn="http://java.sun.com/jsp/jstl/functions" - xmlns:image="urn:jsptld:http://it.openmindonline/imageTag"> - <!-- - image rendering tag - --> - <jsp:directive.attribute name="name" type="java.lang.String" required="true" rtexprvalue="true" /> - <jsp:directive.attribute name="title" type="java.lang.String" required="false" rtexprvalue="true" /> - <jsp:directive.attribute name="altNodeDataName" type="java.lang.String" required="true" rtexprvalue="true" /> - <jsp:directive.attribute name="style" type="java.lang.String" required="false" rtexprvalue="true" /> - <jsp:directive.attribute name="align" type="java.lang.String" required="false" rtexprvalue="true" /> - <jsp:directive.attribute name="classCss" type="java.lang.String" required="false" rtexprvalue="true" /> - <jsp:directive.attribute name="cssClassSqueezeBox" type="java.lang.String" required="false" rtexprvalue="true" /> - <c:set var="globalStyle" value="${style}" /> - <c:if test="${empty align}"> - <c:set var="align" value="left" /> - </c:if> - <c:set var="globalStyle" value="${globalStyle}; float:${align}" /> - <c:set var="isOriginal" value="${image:checkOriginal(name)}"></c:set> - <c:set var="description" value="${image:getDescription(name)}"></c:set> - <div class="imageTag" style="position:relative;padding:0;${globalStyle};"> - <c:if test="${isOriginal}"> - <a class="${cssClassSqueezeBox}" href="${pageContext.request.contextPath}/gallery/${name}/original/data.jpg" - target="_blank" rel="lightbox[group]"> - <img src="${pageContext.request.contextPath}/gallery/${name}/image/data.jpg" alt="${altNodeDataName}" - class="${classCss}" title="${description}" /> - <img class="zoom" src="${pageContext.request.contextPath}/theme/lente/data.png" /> - </a> - </c:if> - <c:if test="${not isOriginal}"> - <img src="${pageContext.request.contextPath}/gallery/${name}/image/data.jpg" alt="${altNodeDataName}" - class="${classCss}" title="${description}" /> - </c:if> - </div> -</jsp:root> \ No newline at end of file Copied: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/imageTag.tag (from rev 1528, trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/imageTag.tag) =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/imageTag.tag (rev 0) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/imageTag.tag 2009-12-30 16:55:32 UTC (rev 1559) @@ -0,0 +1,35 @@ +<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jsp/jstl/core" + xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:fn="http://java.sun.com/jsp/jstl/functions" + xmlns:image="urn:jsptld:http://it.openmindonline/imageTag"> + <!-- + image rendering tag + --> + <jsp:directive.attribute name="name" type="java.lang.String" required="true" rtexprvalue="true" /> + <jsp:directive.attribute name="title" type="java.lang.String" required="false" rtexprvalue="true" /> + <jsp:directive.attribute name="altNodeDataName" type="java.lang.String" required="true" rtexprvalue="true" /> + <jsp:directive.attribute name="style" type="java.lang.String" required="false" rtexprvalue="true" /> + <jsp:directive.attribute name="align" type="java.lang.String" required="false" rtexprvalue="true" /> + <jsp:directive.attribute name="classCss" type="java.lang.String" required="false" rtexprvalue="true" /> + <jsp:directive.attribute name="cssClassSqueezeBox" type="java.lang.String" required="false" rtexprvalue="true" /> + <c:set var="globalStyle" value="${style}" /> + <c:if test="${empty align}"> + <c:set var="align" value="left" /> + </c:if> + <c:set var="globalStyle" value="${globalStyle}; float:${align}" /> + <c:set var="isOriginal" value="${image:checkOriginal(name)}"></c:set> + <c:set var="description" value="${image:getDescription(name)}"></c:set> + <div class="imageTag" style="position:relative;padding:0;${globalStyle};"> + <c:if test="${isOriginal}"> + <a class="${cssClassSqueezeBox}" href="${pageContext.request.contextPath}/gallery/${name}/original/data.jpg" + target="_blank" rel="lightbox[group]"> + <img src="${pageContext.request.contextPath}/gallery/${name}/image/data.jpg" alt="${altNodeDataName}" + class="${classCss}" title="${description}" /> + <img class="zoom" src="${pageContext.request.contextPath}/theme/lente/data.png" /> + </a> + </c:if> + <c:if test="${not isOriginal}"> + <img src="${pageContext.request.contextPath}/gallery/${name}/image/data.jpg" alt="${altNodeDataName}" + class="${classCss}" title="${description}" /> + </c:if> + </div> +</jsp:root> \ No newline at end of file Copied: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag (from rev 1528, trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media.tag) =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag (rev 0) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2009-12-30 16:55:32 UTC (rev 1559) @@ -0,0 +1,219 @@ +<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jsp/jstl/core" + xmlns:cms="cms-taglib" xmlns:cmsfn="http://www.magnolia.info/tlds/cmsfn-taglib.tld" xmlns:cmsu="cms-util-taglib" + xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:media="http://net.sourceforge.openutils/mgnlMedia" + xmlns:su="http://openutils.sf.net/openutils-stringutils"> + <jsp:directive.attribute name="id" required="false" rtexprvalue="true" /> + <jsp:directive.attribute name="item" required="true" rtexprvalue="true" type="java.lang.Object" /> + <jsp:directive.attribute name="width" required="false" rtexprvalue="true" type="java.lang.Integer" /> + <jsp:directive.attribute name="height" required="false" rtexprvalue="true" type="java.lang.Integer" /> + <jsp:directive.attribute name="useEm" required="false" rtexprvalue="true" type="java.lang.Boolean" /> + <jsp:directive.attribute name="emRatio" required="false" rtexprvalue="true" type="java.lang.Float" /> + <jsp:directive.attribute name="alt" required="false" rtexprvalue="true" /> + <jsp:directive.attribute name="cssClass" required="false" rtexprvalue="true" /> + <jsp:directive.attribute name="style" required="false" rtexprvalue="true" /> + <jsp:directive.attribute name="resize" required="false" rtexprvalue="true" /> + <jsp:directive.attribute name="parameters" required="false" rtexprvalue="true" /> + <jsp:directive.attribute name="ignoreDim" required="false" rtexprvalue="true" type="java.lang.Boolean" /> + <jsp:directive.attribute name="autoPlay" required="false" rtexprvalue="true" type="java.lang.Boolean" /> + <jsp:directive.attribute name="loop" required="false" rtexprvalue="true" type="java.lang.Boolean" /> + <jsp:directive.attribute name="noPlayIcon" required="false" rtexprvalue="true" type="java.lang.Boolean" /> + <jsp:directive.attribute name="skin" required="false" rtexprvalue="true" /> + <jsp:directive.attribute name="thumbnail" required="false" rtexprvalue="true" type="java.lang.Boolean" /> + <c:set value="${10000}" var="bigValue" /> + <c:if test="${empty width }"> + <c:set var="width" value="${0 }" /> + </c:if> + <c:if test="${empty height }"> + <c:set var="height" value="${0 }" /> + </c:if> + <c:if test="${empty emRatio }"> + <c:set var="emRatio" value="${1.0 }" /> + </c:if> + <c:set value="${media:node(item)}" var="mediaNode" /> + <c:choose> + <c:when test="${!empty mediaNode}"> + <cms:setNode var="media" content="${mediaNode}" /> + <c:choose> + <c:when test="${media.type eq 'image' or media.type eq 'wallpaper'}"> + <c:choose> + <c:when test="${width eq 0 and height eq 0}"> + <c:set var="url" value="${media:url(mediaNode)}" /> + <c:set var="size" value="${media:size(mediaNode, 'original')}" /> + </c:when> + <c:otherwise> + <c:set var="controlChar" value="" /> + <c:choose> + <c:when test="${resize eq 'nocrop'}"> + <c:set var="controlChar" value="n" /> + </c:when> + <c:when test="${resize eq 'fitbands'}"> + <c:set var="controlChar" value="o" /> + </c:when> + <c:when test="${resize eq 'fit'}"> + <c:set var="controlChar" value="l" /> + </c:when> + </c:choose> + <c:if test="${width eq 0}"> + <c:set var="controlChar" value="l" /> + <c:set var="width" value="${bigValue}" /> + </c:if> + <c:if test="${height eq 0}"> + <c:set var="controlChar" value="l" /> + <c:set var="height" value="${bigValue}" /> + </c:if> + <c:set var="resolution">${controlChar}${width}x${height}${empty parameters ? '': ';'}${parameters}</c:set> + <c:set var="url" value="${media:urlres(mediaNode, resolution)}" /> + <c:set var="size" value="${media:size(mediaNode, resolution)}" /> + </c:otherwise> + </c:choose> + <c:if test="${!empty(url)}"> + <c:if test="${empty alt}"> + <c:set var="alt" value="${media:title(mediaNode)}" /> + </c:if> + <![CDATA[<img src="${pageContext.request.contextPath}${url}" alt="${alt}" title="${alt}"]]> + <c:if test="${not empty id}"> + <![CDATA[ id="${id}"]]> + </c:if> + <c:if test="${not ignoreDim}"> + <c:if test="${ size[0] gt 0}"> + <c:set var="style">${style}${(!empty style)?';':''}width:${size[0]*emRatio}${(not useEm ? 'px':'em')} + </c:set> + </c:if> + <c:if test="${ size[1] gt 1}"> + <c:set var="style">${style}${(!empty style)?';':''}height:${size[1]*emRatio}${(not useEm ? 'px':'em')} + </c:set> + </c:if> + </c:if> + <c:if test="${not empty cssClass}"> + <![CDATA[ class="${cssClass}"]]> + </c:if> + <c:if test="${not empty style}"> + <![CDATA[ style="${style}"]]> + </c:if> + <![CDATA[ />]]> + </c:if> + </c:when> + <c:when test="${media.type eq 'video' or media.type eq 'audio' }"> + <c:set var="url" value="${media:url(mediaNode)}" /> + <c:if test="${width eq 0 }"> + <c:set var="width" value="320" /> + </c:if> + <c:if test="${height eq 0}"> + <c:set var="height" value="${media.type eq 'video' ? 240 : 20}" /> + </c:if> + <c:set var="controlBar" value="" /> + <c:if test="${media.type eq 'video' }"> + <c:set var="controlBar"> + <![CDATA[&controlbar=over]]> + </c:set> + </c:if> + <c:if test="${!empty(url)}"> + <c:set var="previewId" value="preview-${su:randomAlphanumeric(6)}" /> + <div id="${previewId}" class="preview"> + <div id="no-player"><!-- --> + </div> + </div> + <c:if + test="${fn:endsWith(fn:toLowerCase(media:url(mediaNode)), 'flv') or fn:endsWith(fn:toLowerCase(media:url(mediaNode)), 'mp3')}"> + <c:set var="flashvars"> + <![CDATA[file=${pageContext.request.contextPath}${media:url(mediaNode)}${controlBar}]]> + <c:if test="${autoPlay}"> + <![CDATA[&autostart=true]]> + </c:if> + <c:if test="${loop}"> + <![CDATA[&repeat=always]]> + </c:if> + <c:if test="${noPlayIcon}"> + <![CDATA[&icons=false]]> + </c:if> + <c:if test="${not empty skin}"> + <![CDATA[&skin=${skin}]]> + </c:if> + <c:if test="${thumbnail}"> + <![CDATA[&image=${pageContext.request.contextPath}${media:thumbnail(mediaNode)}]]> + </c:if> + </c:set> + <script type='text/javascript'> + <![CDATA[ + window.addEvent('domready', function(){ + var swfobject = new SWFObject('${pageContext.request.contextPath}/.resources/media/players/player.swf','player','${width}','${height}','9','#ffffff'); + swfobject.addParam('allowfullscreen','true'); + swfobject.addParam('allowscriptaccess','always'); + swfobject.addParam('wmode','opaque'); + swfobject.addParam('flashvars', '${flashvars}'); + + var version = deconcept.SWFObjectUtil.getPlayerVersion(); + if (version["major"] == 0 || version["major"] < 9) { + $('no-player').setStyle('display','block'); + } else { + swfobject.write('${previewId}'); + } + });]]> + </script> + </c:if> + <c:if test="${fn:endsWith(fn:toLowerCase(media:url(mediaNode)), 'swf')}"> + <script type='text/javascript'> + <![CDATA[ + window.addEvent('domready', function(){ + var swfobject = new SWFObject('${pageContext.request.contextPath}${media:url(mediaNode)}', '${previewId}', "${width}", "${height}", "9.0.0"); + var version = deconcept.SWFObjectUtil.getPlayerVersion(); + if (version["major"] == 0 || version["major"] < 9) { + $('no-player').setStyle('display','block'); + } else { + swfobject.write('${previewId}'); + } + });]]> + </script> + </c:if> + </c:if> + </c:when> + <c:when test="${media.type eq 'youtube'}"> + <c:set var="url" value="${media:url(mediaNode)}" /> + <c:if test="${width eq 0 }"> + <c:set var="width" value="320" /> + </c:if> + <c:if test="${height eq 0}"> + <c:set var="height" value="240" /> + </c:if> + <c:set var="flashvars"> + <![CDATA[file=${media:url(mediaNode)}&controlbar=over]]> + <c:if test="${fn:indexOf(url, 'youtube') ge 0}"> + <c:set var="previewImage" value="${su:substringAfterLast(url, 'v=')}" /> + <![CDATA[&type=youtube&image=http://img.youtube.com/vi/${previewImage}/0.jpg]]> + </c:if> + </c:set> + <c:set var="previewImage" value="${su:substringAfterLast(url, 'v=')}" /> + <c:if test="${!empty(url)}"> + <c:set var="previewId" value="preview-${su:randomAlphanumeric(6)}" /> + <div id="${previewId}" class="preview"> + <div id="no-player"> + <!-- + <ma:message key="media.noFlashPlayerDetected" /> --> + </div> + </div> + <script type='text/javascript'> + <![CDATA[ + + window.addEvent('domready', function(){ + var swfobject = new SWFObject('${pageContext.request.contextPath}/.resources/media/players/player.swf','player','${width}','${height}','9','#ffffff'); + swfobject.addParam('allowfullscreen','true'); + swfobject.addParam('allowscriptaccess','always'); + swfobject.addParam('wmode','opaque'); + swfobject.addParam('flashvars','${flashvars}'); + var version = deconcept.SWFObjectUtil.getPlayerVersion(); + if (version["major"] == 0 || version["major"] < 9) { + $('no-player').setStyle('display','block'); + } else { + swfobject.write('${previewId}'); + } + }); + ]]></script> + </c:if> + </c:when> + </c:choose> + </c:when> + <c:otherwise> + <![CDATA[<!-- missing media: ${item} -->]]> + </c:otherwise> + </c:choose> +</jsp:root> \ No newline at end of file Deleted: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media.tag 2009-12-30 16:43:03 UTC (rev 1558) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media.tag 2009-12-30 16:55:32 UTC (rev 1559) @@ -1,219 +0,0 @@ -<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jsp/jstl/core" - xmlns:cms="cms-taglib" xmlns:cmsfn="http://www.magnolia.info/tlds/cmsfn-taglib.tld" xmlns:cmsu="cms-util-taglib" - xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:media="http://net.sourceforge.openutils/mgnlMedia" - xmlns:su="http://openutils.sf.net/openutils-stringutils"> - <jsp:directive.attribute name="id" required="false" rtexprvalue="true" /> - <jsp:directive.attribute name="item" required="true" rtexprvalue="true" type="java.lang.Object" /> - <jsp:directive.attribute name="width" required="false" rtexprvalue="true" type="java.lang.Integer" /> - <jsp:directive.attribute name="height" required="false" rtexprvalue="true" type="java.lang.Integer" /> - <jsp:directive.attribute name="useEm" required="false" rtexprvalue="true" type="java.lang.Boolean" /> - <jsp:directive.attribute name="emRatio" required="false" rtexprvalue="true" type="java.lang.Float" /> - <jsp:directive.attribute name="alt" required="false" rtexprvalue="true" /> - <jsp:directive.attribute name="cssClass" required="false" rtexprvalue="true" /> - <jsp:directive.attribute name="style" required="false" rtexprvalue="true" /> - <jsp:directive.attribute name="resize" required="false" rtexprvalue="true" /> - <jsp:directive.attribute name="parameters" required="false" rtexprvalue="true" /> - <jsp:directive.attribute name="ignoreDim" required="false" rtexprvalue="true" type="java.lang.Boolean" /> - <jsp:directive.attribute name="autoPlay" required="false" rtexprvalue="true" type="java.lang.Boolean" /> - <jsp:directive.attribute name="loop" required="false" rtexprvalue="true" type="java.lang.Boolean" /> - <jsp:directive.attribute name="noPlayIcon" required="false" rtexprvalue="true" type="java.lang.Boolean" /> - <jsp:directive.attribute name="skin" required="false" rtexprvalue="true" /> - <jsp:directive.attribute name="thumbnail" required="false" rtexprvalue="true" type="java.lang.Boolean" /> - <c:set value="${10000}" var="bigValue" /> - <c:if test="${empty width }"> - <c:set var="width" value="${0 }" /> - </c:if> - <c:if test="${empty height }"> - <c:set var="height" value="${0 }" /> - </c:if> - <c:if test="${empty emRatio }"> - <c:set var="emRatio" value="${1.0 }" /> - </c:if> - <c:set value="${media:node(item)}" var="mediaNode" /> - <c:choose> - <c:when test="${!empty mediaNode}"> - <cms:setNode var="media" content="${mediaNode}" /> - <c:choose> - <c:when test="${media.type eq 'image' or media.type eq 'wallpaper'}"> - <c:choose> - <c:when test="${width eq 0 and height eq 0}"> - <c:set var="url" value="${media:url(mediaNode)}" /> - <c:set var="size" value="${media:size(mediaNode, 'original')}" /> - </c:when> - <c:otherwise> - <c:set var="controlChar" value="" /> - <c:choose> - <c:when test="${resize eq 'nocrop'}"> - <c:set var="controlChar" value="n" /> - </c:when> - <c:when test="${resize eq 'fitbands'}"> - <c:set var="controlChar" value="o" /> - </c:when> - <c:when test="${resize eq 'fit'}"> - <c:set var="controlChar" value="l" /> - </c:when> - </c:choose> - <c:if test="${width eq 0}"> - <c:set var="controlChar" value="l" /> - <c:set var="width" value="${bigValue}" /> - </c:if> - <c:if test="${height eq 0}"> - <c:set var="controlChar" value="l" /> - <c:set var="height" value="${bigValue}" /> - </c:if> - <c:set var="resolution">${controlChar}${width}x${height}${empty parameters ? '': ';'}${parameters}</c:set> - <c:set var="url" value="${media:urlres(mediaNode, resolution)}" /> - <c:set var="size" value="${media:size(mediaNode, resolution)}" /> - </c:otherwise> - </c:choose> - <c:if test="${!empty(url)}"> - <c:if test="${empty alt}"> - <c:set var="alt" value="${media:title(mediaNode)}" /> - </c:if> - <![CDATA[<img src="${pageContext.request.contextPath}${url}" alt="${alt}" title="${alt}"]]> - <c:if test="${not empty id}"> - <![CDATA[ id="${id}"]]> - </c:if> - <c:if test="${not ignoreDim}"> - <c:if test="${ size[0] gt 0}"> - <c:set var="style">${style}${(!empty style)?';':''}width:${size[0]*emRatio}${(not useEm ? 'px':'em')} - </c:set> - </c:if> - <c:if test="${ size[1] gt 1}"> - <c:set var="style">${style}${(!empty style)?';':''}height:${size[1]*emRatio}${(not useEm ? 'px':'em')} - </c:set> - </c:if> - </c:if> - <c:if test="${not empty cssClass}"> - <![CDATA[ class="${cssClass}"]]> - </c:if> - <c:if test="${not empty style}"> - <![CDATA[ style="${style}"]]> - </c:if> - <![CDATA[ />]]> - </c:if> - </c:when> - <c:when test="${media.type eq 'video' or media.type eq 'audio' }"> - <c:set var="url" value="${media:url(mediaNode)}" /> - <c:if test="${width eq 0 }"> - <c:set var="width" value="320" /> - </c:if> - <c:if test="${height eq 0}"> - <c:set var="height" value="${media.type eq 'video' ? 240 : 20}" /> - </c:if> - <c:set var="controlBar" value="" /> - <c:if test="${media.type eq 'video' }"> - <c:set var="controlBar"> - <![CDATA[&controlbar=over]]> - </c:set> - </c:if> - <c:if test="${!empty(url)}"> - <c:set var="previewId" value="preview-${su:randomAlphanumeric(6)}" /> - <div id="${previewId}" class="preview"> - <div id="no-player"><!-- --> - </div> - </div> - <c:if - test="${fn:endsWith(fn:toLowerCase(media:url(mediaNode)), 'flv') or fn:endsWith(fn:toLowerCase(media:url(mediaNode)), 'mp3')}"> - <c:set var="flashvars"> - <![CDATA[file=${pageContext.request.contextPath}${media:url(mediaNode)}${controlBar}]]> - <c:if test="${autoPlay}"> - <![CDATA[&autostart=true]]> - </c:if> - <c:if test="${loop}"> - <![CDATA[&repeat=always]]> - </c:if> - <c:if test="${noPlayIcon}"> - <![CDATA[&icons=false]]> - </c:if> - <c:if test="${not empty skin}"> - <![CDATA[&skin=${skin}]]> - </c:if> - <c:if test="${thumbnail}"> - <![CDATA[&image=${pageContext.request.contextPath}${media:thumbnail(mediaNode)}]]> - </c:if> - </c:set> - <script type='text/javascript'> - <![CDATA[ - window.addEvent('domready', function(){ - var swfobject = new SWFObject('${pageContext.request.contextPath}/.resources/media/players/player.swf','player','${width}','${height}','9','#ffffff'); - swfobject.addParam('allowfullscreen','true'); - swfobject.addParam('allowscriptaccess','always'); - swfobject.addParam('wmode','opaque'); - swfobject.addParam('flashvars', '${flashvars}'); - - var version = deconcept.SWFObjectUtil.getPlayerVersion(); - if (version["major"] == 0 || version["major"] < 9) { - $('no-player').setStyle('display','block'); - } else { - swfobject.write('${previewId}'); - } - });]]> - </script> - </c:if> - <c:if test="${fn:endsWith(fn:toLowerCase(media:url(mediaNode)), 'swf')}"> - <script type='text/javascript'> - <![CDATA[ - window.addEvent('domready', function(){ - var swfobject = new SWFObject('${pageContext.request.contextPath}${media:url(mediaNode)}', '${previewId}', "${width}", "${height}", "9.0.0"); - var version = deconcept.SWFObjectUtil.getPlayerVersion(); - if (version["major"] == 0 || version["major"] < 9) { - $('no-player').setStyle('display','block'); - } else { - swfobject.write('${previewId}'); - } - });]]> - </script> - </c:if> - </c:if> - </c:when> - <c:when test="${media.type eq 'youtube'}"> - <c:set var="url" value="${media:url(mediaNode)}" /> - <c:if test="${width eq 0 }"> - <c:set var="width" value="320" /> - </c:if> - <c:if test="${height eq 0}"> - <c:set var="height" value="240" /> - </c:if> - <c:set var="flashvars"> - <![CDATA[file=${media:url(mediaNode)}&controlbar=over]]> - <c:if test="${fn:indexOf(url, 'youtube') ge 0}"> - <c:set var="previewImage" value="${su:substringAfterLast(url, 'v=')}" /> - <![CDATA[&type=youtube&image=http://img.youtube.com/vi/${previewImage}/0.jpg]]> - </c:if> - </c:set> - <c:set var="previewImage" value="${su:substringAfterLast(url, 'v=')}" /> - <c:if test="${!empty(url)}"> - <c:set var="previewId" value="preview-${su:randomAlphanumeric(6)}" /> - <div id="${previewId}" class="preview"> - <div id="no-player"> - <!-- - <ma:message key="media.noFlashPlayerDetected" /> --> - </div> - </div> - <script type='text/javascript'> - <![CDATA[ - - window.addEvent('domready', function(){ - var swfobject = new SWFObject('${pageContext.request.contextPath}/.resources/media/players/player.swf','player','${width}','${height}','9','#ffffff'); - swfobject.addParam('allowfullscreen','true'); - swfobject.addParam('allowscriptaccess','always'); - swfobject.addParam('wmode','opaque'); - swfobject.addParam('flashvars','${flashvars}'); - var version = deconcept.SWFObjectUtil.getPlayerVersion(); - if (version["major"] == 0 || version["major"] < 9) { - $('no-player').setStyle('display','block'); - } else { - swfobject.write('${previewId}'); - } - }); - ]]></script> - </c:if> - </c:when> - </c:choose> - </c:when> - <c:otherwise> - <![CDATA[<!-- missing media: ${item} -->]]> - </c:otherwise> - </c:choose> -</jsp:root> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <me...@us...> - 2010-01-19 13:44:24
|
Revision: 1684 http://openutils.svn.sourceforge.net/openutils/?rev=1684&view=rev Author: memila Date: 2010-01-19 13:44:18 +0000 (Tue, 19 Jan 2010) Log Message: ----------- new tag player created Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld Added Paths: ----------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld 2010-01-19 12:13:41 UTC (rev 1683) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld 2010-01-19 13:44:18 UTC (rev 1684) @@ -229,6 +229,19 @@ ]]> </example> </tag-file> + <tag-file> + <name>player</name> + <path>/META-INF/tags/media/player.tag</path> + <display-name>Player Tag</display-name> + <description> + + </description> + <example> + <![CDATA[ + + ]]> + </example> + </tag-file> <function> <name>node</name> <description>Load a node from the media repository, given the UUID of the media node.</description> Added: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag (rev 0) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag 2010-01-19 13:44:18 UTC (rev 1684) @@ -0,0 +1,91 @@ +<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jsp/jstl/core" + xmlns:cms="cms-taglib" xmlns:cmsfn="http://www.magnolia.info/tlds/cmsfn-taglib.tld" xmlns:cmsu="cms-util-taglib" + xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:media="http://net.sourceforge.openutils/mgnlMedia" + xmlns:su="http://openutils.sf.net/openutils-stringutils"> + <jsp:directive.attribute name="item" required="true" rtexprvalue="true" type="java.lang.Object" /> + <jsp:directive.attribute name="width" required="false" rtexprvalue="true" type="java.lang.Integer" /> + <jsp:directive.attribute name="height" required="false" rtexprvalue="true" type="java.lang.Integer" /> + <jsp:directive.attribute name="ignoreDim" required="false" rtexprvalue="true" type="java.lang.Boolean" /> + <jsp:directive.attribute name="autoPlay" required="false" rtexprvalue="true" type="java.lang.Boolean" /> + <jsp:directive.attribute name="loop" required="false" rtexprvalue="true" type="java.lang.Boolean" /> + <jsp:directive.attribute name="noPlayIcon" required="false" rtexprvalue="true" type="java.lang.Boolean" /> + <jsp:directive.attribute name="skin" required="false" rtexprvalue="true" /> + <jsp:directive.attribute name="thumbnail" required="false" rtexprvalue="true" type="java.lang.Boolean" /> + <jsp:directive.attribute name="controlBa" required="false" rtexprvalue="true" type="java.lang.String"/> + <c:set value="${media:node(item)}" var="mediaNode" /> + <c:set var="url" value="${media:url(mediaNode)}" /> + <c:if test="${width eq 0 }"> + <c:set var="width" value="320" /> + </c:if> + <c:if test="${height eq 0}"> + <c:set var="height" value="${media.type eq 'video' ? 240 : 20}" /> + </c:if> + <c:if test="${!empty(url)}"> + <c:set var="previewId" value="preview-${su:randomAlphanumeric(6)}" /> + <div id="${previewId}" class="preview"> + <div id="no-player"><!-- --> + </div> + </div> + <c:if + test="${fn:endsWith(fn:toLowerCase(media:url(mediaNode)), '.flv') or fn:endsWith(fn:toLowerCase(media:url(mediaNode)), '.mp3')}"> + <c:set var="flashvars"> + <![CDATA[file=${pageContext.request.contextPath}${media:url(mediaNode)}${controlBar}]]> + <c:if test="${autoPlay}"> + <![CDATA[&autostart=true]]> + </c:if> + <c:if test="${loop}"> + <![CDATA[&repeat=always]]> + </c:if> + <c:if test="${noPlayIcon}"> + <![CDATA[&icons=false]]> + </c:if> + <c:if test="${not empty skin}"> + <![CDATA[&skin=${skin}]]> + </c:if> + <c:if test="${thumbnail}"> + <c:choose> + <c:when test="${width gt 0 and height gt 0}"> + <c:set var="previewres" value="${width}x${height}" /> + <![CDATA[&image=${pageContext.request.contextPath}${media:urlres(mediaNode, previewres)}]]> + </c:when> + <c:otherwise> + <![CDATA[&image=${pageContext.request.contextPath}${media:thumbnail(mediaNode)}]]> + </c:otherwise> + </c:choose> + </c:if> + </c:set> + <script type='text/javascript'> + <![CDATA[ + window.addEvent('domready', function(){ + var swfobject = new SWFObject('${pageContext.request.contextPath}/.resources/media/players/player.swf','player','${width}','${height}','9','#ffffff'); + swfobject.addParam('allowfullscreen','true'); + swfobject.addParam('allowscriptaccess','always'); + swfobject.addParam('wmode','opaque'); + swfobject.addParam('flashvars', '${flashvars}'); + + var version = deconcept.SWFObjectUtil.getPlayerVersion(); + if (version["major"] == 0 || version["major"] < 9) { + $('no-player').setStyle('display','block'); + } else { + swfobject.write('${previewId}'); + } + });]]> + </script> + </c:if> + <c:if test="${fn:endsWith(fn:toLowerCase(media:url(mediaNode)), 'swf')}"> + <script type='text/javascript'> + <![CDATA[ + window.addEvent('domready', function(){ + var swfobject = new SWFObject('${pageContext.request.contextPath}${media:url(mediaNode)}', '${previewId}', "${width}", "${height}", "9.0.0"); + var version = deconcept.SWFObjectUtil.getPlayerVersion(); + if (version["major"] == 0 || version["major"] < 9) { + $('no-player').setStyle('display','block'); + } else { + swfobject.write('${previewId}'); + } + });]]> + </script> + </c:if> + </c:if> + +</jsp:root> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <me...@us...> - 2010-01-20 14:48:02
|
Revision: 1690 http://openutils.svn.sourceforge.net/openutils/?rev=1690&view=rev Author: memila Date: 2010-01-20 14:47:55 +0000 (Wed, 20 Jan 2010) Log Message: ----------- Media-53: Add a "share" feature to the media tag to enable the jvl player share plugin Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld 2010-01-20 14:39:29 UTC (rev 1689) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld 2010-01-20 14:47:55 UTC (rev 1690) @@ -11,218 +11,7 @@ <name>media</name> <path>/META-INF/tags/media/media.tag</path> <display-name>Media Tag</display-name> - <description> - <![CDATA[ - Media tag that renders according to media type. <br/> - - The following properties are supported: - <table> - <tr> - <th>Property</th> - <th>Required</th> - <th>Description</th> - </tr> - <tr> - <td> - id - </td> - <td> - false - </td> - <td> - html element id - </td> - </tr> - <tr> - <td> - item - </td> - <td> - true - </td> - <td> - media uuid or media content node - </td> - </tr> - <tr> - <td> - width - </td> - <td> - false for images, true for videos or mp3 - </td> - <td> - image or player width - </td> - </tr> - <tr> - <td> - height - </td> - <td> - false for images, true for videos or mp3 - </td> - <td> - image or player height - </td> - </tr> - <tr> - <td> - alt - </td> - <td> - false - </td> - <td> - alt / title on images. If not specified, the title of the media (if present) will be used - </td> - </tr> - <tr> - <td> - cssClass - </td> - <td> - false - </td> - <td> - cssClass to be applied on html element - </td> - </tr> - <tr> - <td> - style - </td> - <td> - false - </td> - <td> - style to be applied on html element - </td> - </tr> - <tr> - <td> - resize - </td> - <td> - false - </td> - <td> - valid values are <ul> - <li><b>fit:</b>makes the new image to fit into required res</li> - <li><b>nocrop:</b>makes the new image to contain the required res</li> - <li><b>crop:</b>makes the new image to contain the required res and the crop the simmetric bands that outfit res</li> - <li><b>fitbands:</b>makes the new image to fit into required res and fills empty areas with background color you pass to in "parameter" attribute as hex value of "background" parameter (i.e. paramters='background=FF67A5&apos)</li> - </td> - </tr> - <tr> - <td> - parameters - </td> - <td> - false - </td> - <td> - parameters to pass to image processor as couples key=value joined by commas - </td> - </tr> - <tr> - <td> - ignoreDim - </td> - <td> - false - </td> - <td> - if true the img element will be rendered without width and height attributes - </td> - </tr> - <tr> - <td> - autoPlay - </td> - <td> - false - </td> - <td> - auto starts the player without waiting for user play command - </td> - </tr> - <tr> - <td> - loop - </td> - <td> - false - </td> - <td> - loop video or audio - </td> - </tr> - <tr> - <td> - noPlayIcon - </td> - <td> - false - </td> - <td> - hide player icons - </td> - </tr> - <tr> - <td> - skin - </td> - <td> - false - </td> - <td> - set player skin - </td> - </tr> - <tr> - <td> - useEm - </td> - <td> - false - </td> - <td> - if true, and ignoreDimensions is not true it will apply style attribute on img tags with sidth and height in "em". the em values will be computed using as width in pixel * emRatio (see next attribute) - </td> - </tr> - <tr> - <td> - emRatio - </td> - <td> - false - </td> - <td> - float value to convert dimensions from px to em - </td> - </tr> - <tr> - <td> - videoImagePreview - </td> - <td> - false - </td> - <td> - if set to true, the tag will not insert the player for videos but only a preview image - </td> - </tr> - </table> - - For videos or mp3s it needs the following scripts loaded in page: - <ul> - <li>.resources/media/js/mootools-1.2-core.js</li> - <li>.resources/media/js/mootools-1.2-more.js</li> - <li>.resources/media/js/mootools-1.2-swfobject.js</li> - </ul> - ]]> - </description> + <description>Media tag that renders according to media type</description> <example> <![CDATA[ <media:media id="myMedia" item="${content.image}" /> @@ -234,13 +23,8 @@ <path>/META-INF/tags/media/player.tag</path> <display-name>Player Tag</display-name> <description> - + Render the audio or video player </description> - <example> - <![CDATA[ - - ]]> - </example> </tag-file> <function> <name>node</name> Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-01-20 14:39:29 UTC (rev 1689) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-01-20 14:47:55 UTC (rev 1690) @@ -2,27 +2,26 @@ xmlns:cms="cms-taglib" xmlns:cmsfn="http://www.magnolia.info/tlds/cmsfn-taglib.tld" xmlns:cmsu="cms-util-taglib" xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:media="http://net.sourceforge.openutils/mgnlMedia" xmlns:su="http://openutils.sf.net/openutils-stringutils"> - <jsp:directive.attribute name="id" required="false" rtexprvalue="true" /> - <jsp:directive.attribute name="item" required="true" rtexprvalue="true" type="java.lang.Object" /> - <jsp:directive.attribute name="width" required="false" rtexprvalue="true" type="java.lang.Integer" /> - <jsp:directive.attribute name="height" required="false" rtexprvalue="true" type="java.lang.Integer" /> - <jsp:directive.attribute name="useEm" required="false" rtexprvalue="true" type="java.lang.Boolean" /> - <jsp:directive.attribute name="emRatio" required="false" rtexprvalue="true" type="java.lang.Float" /> - <jsp:directive.attribute name="alt" required="false" rtexprvalue="true" /> - <jsp:directive.attribute name="cssClass" required="false" rtexprvalue="true" /> - <jsp:directive.attribute name="style" required="false" rtexprvalue="true" /> - <jsp:directive.attribute name="resize" required="false" rtexprvalue="true" /> - <jsp:directive.attribute name="parameters" required="false" rtexprvalue="true" /> - <jsp:directive.attribute name="ignoreDim" required="false" rtexprvalue="true" type="java.lang.Boolean" /> - <jsp:directive.attribute name="autoPlay" required="false" rtexprvalue="true" type="java.lang.Boolean" /> - <jsp:directive.attribute name="loop" required="false" rtexprvalue="true" type="java.lang.Boolean" /> - <jsp:directive.attribute name="noPlayIcon" required="false" rtexprvalue="true" type="java.lang.Boolean" /> - <jsp:directive.attribute name="skin" required="false" rtexprvalue="true" /> - <jsp:directive.attribute name="thumbnail" required="false" rtexprvalue="true" type="java.lang.Boolean" /> - <jsp:directive.attribute name="videoImagePreview" required="false" rtexprvalue="true" - type="java.lang.Boolean" /> - <jsp:directive.attribute name="controlbar" required="false" rtexprvalue="true" type="java.lang.String" - description="Defines controlbar position. Possible values are: 'none' (for hiding), 'over', 'bottom', 'top'. If not set, this value will be 'bottom' by default." /> + <jsp:directive.attribute name="id" required="false" rtexprvalue="true" description="html element id"/> + <jsp:directive.attribute name="item" required="true" rtexprvalue="true" type="java.lang.Object" description="media uuid or media content node "/> + <jsp:directive.attribute name="width" required="false" rtexprvalue="true" type="java.lang.Integer" description="image or player width"/> + <jsp:directive.attribute name="height" required="false" rtexprvalue="true" type="java.lang.Integer" description="image or player height"/> + <jsp:directive.attribute name="useEm" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if true, and ignoreDimensions is not true it will apply style attribute on img tags with sidth and height in 'em'. the em values will be computed using as width in pixel * emRatio (see next attribute)"/> + <jsp:directive.attribute name="emRatio" required="false" rtexprvalue="true" type="java.lang.Float" description="float value to convert dimensions from px to em "/> + <jsp:directive.attribute name="alt" required="false" rtexprvalue="true" description="alt / title on images. If not specified, the title of the media (if present) will be used"/> + <jsp:directive.attribute name="cssClass" required="false" rtexprvalue="true" description="cssClass to be applied on html element"/> + <jsp:directive.attribute name="style" required="false" rtexprvalue="true" description="style to be applied on html element "/> + <jsp:directive.attribute name="resize" required="false" rtexprvalue="true" description="valid values are <ul><li><b>fit:</b>makes the new image to fit into required res</li><li><b>nocrop:</b>makes the new image to contain the required res</li><li><b>crop:</b>makes the new image to contain the required res and the crop the simmetric bands that outfit res</li><li><b>fitbands:</b>makes the new image to fit into required res and fills empty areas with background color you pass to in 'parameter' attribute as hex value of 'background' parameter </li>"/>"/> + <jsp:directive.attribute name="parameters" required="false" rtexprvalue="true" description="parameters to pass to image processor as couples key=value joined by commas "/> + <jsp:directive.attribute name="ignoreDim" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if true the img element will be rendered without width and height attributes "/> + <jsp:directive.attribute name="autoPlay" required="false" rtexprvalue="true" type="java.lang.Boolean" description="auto starts the player without waiting for user play command"/> + <jsp:directive.attribute name="loop" required="false" rtexprvalue="true" type="java.lang.Boolean" description="loop video or audio"/> + <jsp:directive.attribute name="noPlayIcon" required="false" rtexprvalue="true" type="java.lang.Boolean" description="hide player icons"/> + <jsp:directive.attribute name="skin" required="false" rtexprvalue="true" description="set player skin"/> + <jsp:directive.attribute name="thumbnail" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if set to true the preview of the player shows the thumbnail image"/> + <jsp:directive.attribute name="videoImagePreview" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if set to true, the tag will not insert the player for videos but only a preview image. For videos or mp3s it needs the following scripts loaded in page: <ul><li>.resources/media/js/mootools-1.2-core.js</li><li>.resources/media/js/mootools-1.2-more.js</li><li>.resources/media/js/mootools-1.2-swfobject.js</li></ul>"/> + <jsp:directive.attribute name="controlbar" required="false" rtexprvalue="true" type="java.lang.String" description="defines controlbar position. Possible values are: 'none' (for hiding), 'over', 'bottom', 'top'. If not set, this value will be 'bottom' by default." /> + <jsp:directive.attribute name="share" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if set to true the pluging share-1 is showen"/> <c:set value="${10000}" var="bigValue" /> <c:if test="${empty width }"> <c:set var="width" value="${0 }" /> @@ -106,7 +105,7 @@ </c:if> </c:when> <c:when test="${media.type eq 'video' or media.type eq 'audio' }"> - <media:player item="${item}" width="${width}" height="${height}" autoPlay="${autoPlay}" loop="${loop}" thumbnail="${thumbnail}" noPlayIcon="${noPlayIcon}" controlBa="${controlBar}" skin="${skin}"/> + <media:player share="${share}" item="${item}" width="${width}" height="${height}" autoPlay="${autoPlay}" loop="${loop}" thumbnail="${thumbnail}" noPlayIcon="${noPlayIcon}" controlBa="${controlBar}" skin="${skin}"/> </c:when> <c:when test="${media.type eq 'youtube'}"> <c:set var="url" value="${media:url(mediaNode)}" /> @@ -141,13 +140,11 @@ <c:set var="previewId" value="preview-${su:randomAlphanumeric(6)}" /> <div id="${previewId}" class="preview"> <div id="no-player"> - <!-- - <ma:message key="media.noFlashPlayerDetected" /> --> + <!-- <ma:message key="media.noFlashPlayerDetected" /> --> </div> </div> <script type='text/javascript'> <![CDATA[ - window.addEvent('domready', function(){ var swfobject = new SWFObject('${pageContext.request.contextPath}/.resources/media/players/player.swf','player','${width}','${height}','9','#ffffff'); swfobject.addParam('allowfullscreen','true'); Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag 2010-01-20 14:39:29 UTC (rev 1689) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag 2010-01-20 14:47:55 UTC (rev 1690) @@ -2,17 +2,29 @@ xmlns:cms="cms-taglib" xmlns:cmsfn="http://www.magnolia.info/tlds/cmsfn-taglib.tld" xmlns:cmsu="cms-util-taglib" xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:media="http://net.sourceforge.openutils/mgnlMedia" xmlns:su="http://openutils.sf.net/openutils-stringutils"> - <jsp:directive.attribute name="item" required="true" rtexprvalue="true" type="java.lang.Object" /> - <jsp:directive.attribute name="width" required="false" rtexprvalue="true" type="java.lang.Integer" /> - <jsp:directive.attribute name="height" required="false" rtexprvalue="true" type="java.lang.Integer" /> - <jsp:directive.attribute name="ignoreDim" required="false" rtexprvalue="true" type="java.lang.Boolean" /> - <jsp:directive.attribute name="autoPlay" required="false" rtexprvalue="true" type="java.lang.Boolean" /> - <jsp:directive.attribute name="loop" required="false" rtexprvalue="true" type="java.lang.Boolean" /> - <jsp:directive.attribute name="noPlayIcon" required="false" rtexprvalue="true" type="java.lang.Boolean" /> - <jsp:directive.attribute name="skin" required="false" rtexprvalue="true" /> - <jsp:directive.attribute name="thumbnail" required="false" rtexprvalue="true" type="java.lang.Boolean" /> - <jsp:directive.attribute name="controlBa" required="false" rtexprvalue="true" type="java.lang.String"/> + <jsp:directive.attribute name="item" required="true" rtexprvalue="true" type="java.lang.Object" description="media uuid or media content node "/> + <jsp:directive.attribute name="width" required="false" rtexprvalue="true" type="java.lang.Integer" description="image or player width"/> + <jsp:directive.attribute name="height" required="false" rtexprvalue="true" type="java.lang.Integer" description="image or player height"/> + <jsp:directive.attribute name="ignoreDim" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if true the img element will be rendered without width and height attributes "/> + <jsp:directive.attribute name="autoPlay" required="false" rtexprvalue="true" type="java.lang.Boolean" description="auto starts the player without waiting for user play command"/> + <jsp:directive.attribute name="loop" required="false" rtexprvalue="true" type="java.lang.Boolean" description="loop video or audio"/> + <jsp:directive.attribute name="noPlayIcon" required="false" rtexprvalue="true" type="java.lang.Boolean" description="hide player icons"/> + <jsp:directive.attribute name="skin" required="false" rtexprvalue="true" description="set player skin"/> + <jsp:directive.attribute name="thumbnail" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if set to true the preview of the player shows the thumbnail image"/> + <jsp:directive.attribute name="controlBa" required="false" rtexprvalue="true" type="java.lang.String" description="defines controlbar position. Possible values are: 'none' (for hiding), 'over', 'bottom', 'top'. If not set, this value will be 'bottom' by default."/> + <jsp:directive.attribute name="share" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if set to true the pluging share-1 is showen"/> + <c:set value="${media:node(item)}" var="mediaNode" /> + <c:set var="sharinglink" value=""/> + <c:set var="sharingcode" value=""/> + <c:set var="baseUrl" scope="request"> + <jsp:text>${pageContext.request.scheme}://${pageContext.request.serverName}</jsp:text> + <c:if test="${(pageContext.request.scheme eq 'http' and pageContext.request.serverPort != 80)}">:${pageContext.request.serverPort}</c:if> + </c:set> + <c:if test="${share}"> + <c:set var="sharinglink">document.URL</c:set> + <c:set var="sharingcode"><embed src="${baseUrl}${pageContext.request.contextPath}/.resources/media/players/player.swf" flashvars="file=${pageContext.request.contextPath}${media:url(mediaNode)}" width="${width}" height="${height}" /></c:set> + </c:if> <c:set var="url" value="${media:url(mediaNode)}" /> <c:if test="${width eq 0 }"> <c:set var="width" value="320" /> @@ -62,7 +74,9 @@ swfobject.addParam('allowscriptaccess','always'); swfobject.addParam('wmode','opaque'); swfobject.addParam('flashvars', '${flashvars}'); - + swfobject.addVariable('plugins', 'sharing-1'); + swfobject.addVariable('sharing.link', ${sharinglink}); + swfobject.addVariable('sharing.code', escape('${sharingcode}')); var version = deconcept.SWFObjectUtil.getPlayerVersion(); if (version["major"] == 0 || version["major"] < 9) { $('no-player').setStyle('display','block'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2010-02-01 15:37:43
|
Revision: 1743 http://openutils.svn.sourceforge.net/openutils/?rev=1743&view=rev Author: diego_schivo Date: 2010-02-01 15:37:33 +0000 (Mon, 01 Feb 2010) Log Message: ----------- MEDIA-71 refactoring: <media:swfobject> Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag Added Paths: ----------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld 2010-02-01 15:08:13 UTC (rev 1742) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld 2010-02-01 15:37:33 UTC (rev 1743) @@ -26,6 +26,17 @@ Renders the audio or video player </description> </tag-file> + <tag-file> + <name>swfobject</name> + <path>/META-INF/tags/media/swfobject.tag</path> + <display-name>Swfobject Tag</display-name> + <description>Renders the flash-content and the javascript for replacing it</description> + <example> + <![CDATA[ + <media:swfobject width="${width}" height="${height}" allowfullscreen="true" allowscriptaccess="always" wmode="opaque" flashvars="${flashvars}" /> + ]]> + </example> + </tag-file> <function> <name>node</name> <description>Load a node from the media repository, given the UUID of the media node.</description> Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-02-01 15:08:13 UTC (rev 1742) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-02-01 15:37:33 UTC (rev 1743) @@ -147,26 +147,7 @@ </c:set> <c:set var="previewImage" value="${su:substringAfterLast(url, 'v=')}" /> <c:if test="${!empty(url)}"> - <c:set var="previewId" value="preview-${su:randomAlphanumeric(6)}" /> - <div id="${previewId}" class="preview"><!-- --> - </div> - <c:if test="${empty requestScope['mgnlmedia_swfobject_link_drawn']}"> - <script type="text/javascript" src="${pageContext.request.contextPath}/.resources/media/js/swfobject.js"><!-- --> - </script> - <c:set var="mgnlmedia_swfobject_link_drawn" scope="request" value="true" /> - </c:if> - <script type='text/javascript'> - <![CDATA[ - var swfobject = new SWFObject('${pageContext.request.contextPath}/.resources/media/players/player.swf','player','${width}','${height}','9','#ffffff'); - swfobject.addParam('allowfullscreen','true'); - swfobject.addParam('allowscriptaccess','always'); - swfobject.addParam('wmode','opaque'); - swfobject.addParam('flashvars','${flashvars}'); - var version = deconcept.SWFObjectUtil.getPlayerVersion(); - if (!(version["major"] == 0 || version["major"] < 9)) { - swfobject.write('${previewId}'); - } - ]]></script> + <media:swfobject width="${width}" height="${height}" allowfullscreen="true" allowscriptaccess="always" wmode="opaque" flashvars="${flashvars}" /> </c:if> </c:when> </c:choose> Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag 2010-02-01 15:08:13 UTC (rev 1742) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag 2010-02-01 15:37:33 UTC (rev 1743) @@ -28,9 +28,6 @@ <c:set var="height" value="${media.type eq 'video' ? 240 : 20}" /> </c:if> <c:if test="${!empty(url)}"> - <c:set var="previewId" value="preview-${su:randomAlphanumeric(6)}" /> - <div id="${previewId}" class="preview"><!-- --> - </div> <c:if test="${su:endsWith(fn:toLowerCase(url), '.flv') or su:endsWith(fn:toLowerCase(url), '.mp3')}"> <c:set var="flashvars"> @@ -70,28 +67,10 @@ <![CDATA[&sharing.code=${fn:escapeXml(sharingcode)}]]> </c:if> </c:set> - <script type='text/javascript'> - <![CDATA[ - var swfobject = new SWFObject('${pageContext.request.contextPath}/.resources/media/players/player.swf','player','${width}','${height}','9','#ffffff'); - swfobject.addParam('allowfullscreen','true'); - swfobject.addParam('allowscriptaccess','always'); - swfobject.addParam('wmode','opaque'); - swfobject.addParam('flashvars', '${flashvars}'); - var version = deconcept.SWFObjectUtil.getPlayerVersion(); - if (!(version["major"] == 0 || version["major"] < 9)) { - swfobject.write('${previewId}'); - }]]> - </script> + <media:swfobject width="${width}" height="${height}" allowfullscreen="true" allowscriptaccess="always" wmode="opaque" flashvars="${flashvars}" /> </c:if> <c:if test="${su:endsWith(fn:toLowerCase(url), 'swf')}"> - <script type='text/javascript'> - <![CDATA[ - var swfobject = new SWFObject('${pageContext.request.contextPath}${url}', '${previewId}', "${width}", "${height}", "9.0.0"); - var version = deconcept.SWFObjectUtil.getPlayerVersion(); - if (!(version["major"] == 0 || version["major"] < 9)) { - swfobject.write('${previewId}'); - }]]> - </script> + <media:swfobject player="${pageContext.request.contextPath}${url}" width="${width}" height="${height}" /> </c:if> </c:if> </jsp:root> Added: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag (rev 0) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag 2010-02-01 15:37:33 UTC (rev 1743) @@ -0,0 +1,43 @@ +<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jsp/jstl/core" + xmlns:cms="cms-taglib" xmlns:cmsfn="http://www.magnolia.info/tlds/cmsfn-taglib.tld" xmlns:cmsu="cms-util-taglib" + xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:media="http://net.sourceforge.openutils/mgnlMedia" + xmlns:su="http://openutils.sf.net/openutils-stringutils"> + <jsp:directive.tag description="" pageEncoding="UTF-8" /> + <jsp:directive.attribute name="player" required="false" rtexprvalue="true" /> + <jsp:directive.attribute name="width" required="false" rtexprvalue="true" type="java.lang.Integer" + description="flash content width" /> + <jsp:directive.attribute name="height" required="false" rtexprvalue="true" type="java.lang.Integer" + description="flash content height" /> + <jsp:directive.tag dynamic-attributes="attrs" /> + + <c:if test="${empty player}"> + <c:set var="player" value="${pageContext.request.contextPath}/.resources/media/players/player.swf" /> + </c:if> + + <c:set var="previewId" value="preview-${su:randomAlphanumeric(6)}" /> + <div id="${previewId}" class="preview"><!-- --> + </div> + + <c:if test="${empty requestScope['mgnlmedia_swfobject_link_drawn']}"> + <script type="text/javascript" src="${pageContext.request.contextPath}/.resources/media/js/swfobject.js"><!-- --> + </script> + <c:set var="mgnlmedia_swfobject_link_drawn" scope="request" value="true" /> + </c:if> + + <script type='text/javascript'> + <![CDATA[ + var swfobject = new SWFObject('${player}','player','${width}','${height}','9','#ffffff');]]> + <c:forEach var="attr" items="${attrs}"> + <c:if test="${!empty attr.value}"> + <![CDATA[ + swfobject.addParam('${attr.key}','${attr.value}');]]> + </c:if> + </c:forEach> + <![CDATA[ + var version = deconcept.SWFObjectUtil.getPlayerVersion(); + if (!(version["major"] == 0 || version["major"] < 9)) { + swfobject.write('${previewId}'); + }]]> + </script> + +</jsp:root> Property changes on: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag ___________________________________________________________________ Added: svn:mime-type + text/xml Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2010-02-01 17:33:38
|
Revision: 1747 http://openutils.svn.sourceforge.net/openutils/?rev=1747&view=rev Author: diego_schivo Date: 2010-02-01 16:21:04 +0000 (Mon, 01 Feb 2010) Log Message: ----------- MEDIA-71 refactoring: playerPath Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld 2010-02-01 16:00:30 UTC (rev 1746) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld 2010-02-01 16:21:04 UTC (rev 1747) @@ -33,7 +33,7 @@ <description>Renders the flash-content and the javascript for replacing it</description> <example> <![CDATA[ - <media:swfobject width="${width}" height="${height}" allowfullscreen="true" allowscriptaccess="always" wmode="opaque" flashvars="${flashvars}" /> + <media:swfobject player="jw-player-4/player.swf" width="${width}" height="${height}" allowfullscreen="true" allowscriptaccess="always" wmode="opaque" flashvars="${flashvars}" /> ]]> </example> </tag-file> Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-02-01 16:00:30 UTC (rev 1746) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-02-01 16:21:04 UTC (rev 1747) @@ -39,7 +39,7 @@ <c:set var="emRatio" value="${1.0 }" /> </c:if> <c:if test="${empty player}"> - <c:set var="player" value="${pageContext.request.contextPath}/.resources/media/players/jw-player-4/player.swf" /> + <c:set var="player" value="jw-player-4/player.swf" /> </c:if> <c:set value="${media:node(item)}" var="mediaNode" /> <c:choose> Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag 2010-02-01 16:00:30 UTC (rev 1746) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag 2010-02-01 16:21:04 UTC (rev 1747) @@ -21,9 +21,16 @@ <c:set var="mgnlmedia_swfobject_link_drawn" scope="request" value="true" /> </c:if> + <c:set var="playerPath"> + <c:choose> + <c:when test="${fn:startsWith(player, '/')}">${pageContext.request.contextPath}${player}</c:when> + <c:otherwise>${pageContext.request.contextPath}/.resources/media/players/${player}</c:otherwise> + </c:choose> + </c:set> + <script type='text/javascript'> <![CDATA[ - var swfobject = new SWFObject('${player}','player','${width}','${height}','9','#ffffff');]]> + var swfobject = new SWFObject('${playerPath}','player','${width}','${height}','9','#ffffff');]]> <c:forEach var="attr" items="${attrs}"> <c:if test="${!empty attr.value}"> <![CDATA[ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2010-02-03 11:14:51
|
Revision: 1791 http://openutils.svn.sourceforge.net/openutils/?rev=1791&view=rev Author: diego_schivo Date: 2010-02-03 11:14:39 +0000 (Wed, 03 Feb 2010) Log Message: ----------- MEDIA-59 "jwplayer4", "jwplayer5" shortcuts Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld 2010-02-03 11:10:16 UTC (rev 1790) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/media.tld 2010-02-03 11:14:39 UTC (rev 1791) @@ -33,7 +33,7 @@ <description>Renders the flash-content and the javascript for replacing it</description> <example> <![CDATA[ - <media:swfobject player="jwplayer5/player.swf" width="${width}" height="${height}" allowfullscreen="true" allowscriptaccess="always" wmode="opaque" flashvars="${flashvars}" /> + <media:swfobject player="jwplayer5" width="${width}" height="${height}" allowfullscreen="true" allowscriptaccess="always" wmode="opaque" flashvars="${flashvars}" /> ]]> </example> </tag-file> Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-02-03 11:10:16 UTC (rev 1790) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/media.tag 2010-02-03 11:14:39 UTC (rev 1791) @@ -5,7 +5,7 @@ <jsp:directive.tag description="Displays a media" pageEncoding="UTF-8"/> <jsp:directive.attribute name="id" required="false" rtexprvalue="true" description="html element id"/> <jsp:directive.attribute name="item" required="true" rtexprvalue="true" type="java.lang.Object" description="media uuid or media content node "/> - <jsp:directive.attribute name="player" required="false" rtexprvalue="true" type="java.lang.String" description="the swf file of the player (examples: player.swf (default), jwplayer5/player.swf, /.resources/media/players/jwplayer5/player.swf)"/> + <jsp:directive.attribute name="player" required="false" rtexprvalue="true" type="java.lang.String" description="the swf file of the player (examples: player.swf (default), jwplayer4, jwplayer5, jwplayer5/player.swf, /.resources/media/players/jwplayer5/player.swf)"/> <jsp:directive.attribute name="width" required="false" rtexprvalue="true" type="java.lang.Integer" description="image or player width"/> <jsp:directive.attribute name="height" required="false" rtexprvalue="true" type="java.lang.Integer" description="image or player height"/> <jsp:directive.attribute name="useEm" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if true, and ignoreDimensions is not true it will apply style attribute on img tags with sidth and height in 'em'. the em values will be computed using as width in pixel * emRatio (see next attribute)"/> Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag 2010-02-03 11:10:16 UTC (rev 1790) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/player.tag 2010-02-03 11:14:39 UTC (rev 1791) @@ -4,7 +4,7 @@ xmlns:su="http://openutils.sf.net/openutils-stringutils"> <jsp:directive.tag description="Renders the audio or video player" pageEncoding="UTF-8"/> <jsp:directive.attribute name="item" required="true" rtexprvalue="true" type="java.lang.Object" description="media uuid or media content node "/> - <jsp:directive.attribute name="player" required="true" rtexprvalue="true" type="java.lang.String" description="the swf file of the player (examples: player.swf (default), jwplayer5/player.swf, /.resources/media/players/jwplayer5/player.swf)"/> + <jsp:directive.attribute name="player" required="true" rtexprvalue="true" type="java.lang.String" description="the swf file of the player (examples: player.swf (default), jwplayer4, jwplayer5, jwplayer5/player.swf, /.resources/media/players/jwplayer5/player.swf)"/> <jsp:directive.attribute name="width" required="false" rtexprvalue="true" type="java.lang.Integer" description="image or player width"/> <jsp:directive.attribute name="height" required="false" rtexprvalue="true" type="java.lang.Integer" description="image or player height"/> <jsp:directive.attribute name="ignoreDim" required="false" rtexprvalue="true" type="java.lang.Boolean" description="if true the img element will be rendered without width and height attributes "/> Modified: trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag 2010-02-03 11:10:16 UTC (rev 1790) +++ trunk/openutils-mgnlmedia/src/main/resources/META-INF/tags/media/swfobject.tag 2010-02-03 11:14:39 UTC (rev 1791) @@ -4,7 +4,7 @@ xmlns:su="http://openutils.sf.net/openutils-stringutils"> <jsp:directive.tag description="" pageEncoding="UTF-8" /> <jsp:directive.attribute name="player" required="true" rtexprvalue="true" type="java.lang.String" - description="the swf file of the player (examples: player.swf (default), jwplayer5/player.swf, /.resources/media/players/jwplayer5/player.swf)" /> + description="the swf file of the player (examples: player.swf (default), jwplayer4, jwplayer5, jwplayer5/player.swf, /.resources/media/players/jwplayer5/player.swf)" /> <jsp:directive.attribute name="width" required="false" rtexprvalue="true" type="java.lang.Integer" description="flash content width" /> <jsp:directive.attribute name="height" required="false" rtexprvalue="true" type="java.lang.Integer" @@ -21,6 +21,15 @@ <c:set var="mgnlmedia_swfobject_link_drawn" scope="request" value="true" /> </c:if> + <c:choose> + <c:when test="${player eq 'jwplayer4'}"> + <c:set var="player" value="player.swf" /> + </c:when> + <c:when test="${player eq 'jwplayer5'}"> + <c:set var="player" value="jwplayer5/player.swf" /> + </c:when> + </c:choose> + <c:set var="playerPath"> <c:choose> <c:when test="${fn:startsWith(player, '/')}">${pageContext.request.contextPath}${player}</c:when> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |