Changeset 564241
- Timestamp:
- 06/26/2012 08:05:08 PM (14 years ago)
- Location:
- video-onclick/trunk
- Files:
-
- 2 edited
-
video-onclick.js (modified) (3 diffs)
-
video-onclick.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
video-onclick/trunk/video-onclick.js
r547329 r564241 14 14 { 15 15 var divTag = document.createElement("div"); 16 16 17 17 divTag.id = "vimeo_"+id; 18 18 divTag.innerHTML = '<div class="video-onclick-inline"><div class="video-onclick-close" onClick="closevovimeo('+"'"+id+"'"+')">'+videoclosetext()+'</div><div class="video-onclick-content"><iframe src="http://player.vimeo.com/video/'+id+'?autoplay=1" width="640" height="360" frameborder="0"></iframe></div><div class="video-onclick-info">'+videoinfo()+'</div></div>'; 19 19 20 21 20 22 var vimeo = 'video-onclick-'+id; 21 23 document.getElementById(vimeo).appendChild(divTag); … … 34 36 35 37 divTag.innerHTML = '<div class="video-onclick-main"><div class="video-onclick-close" onClick="closevoutub('+"'"+id+"'"+')">'+videoclosetext()+'</div><div class="video-onclick-content"><object style="height: 390px; width: 640px"><param name="movie" value="http://www.youtube.com/v/'+id+'?version=3&autoplay=1"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/'+id+'?version=3&autoplay=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="390"></object></div><div class="video-onclick-info">'+videoinfo()+'</div></div>'; 38 39 document.body.appendChild(divTag); 40 41 if(typeof window.VideoOnclickHook == 'function') { 36 42 37 document.body.appendChild(divTag); 43 VideoOnclickHook(); 44 } 38 45 } 39 46 … … 61 68 62 69 document.body.appendChild(divTag); 70 if(typeof window.VideoOnclickHook == 'function') { 71 72 VideoOnclickHook(); 73 } 63 74 64 75 -
video-onclick/trunk/video-onclick.php
r547330 r564241 4 4 Plugin URI: http://tigors.net/en/en-video-onclick/ 5 5 Description: Inserts video code only when user clicks on Play picture. Reduces load time on pages with many videos. 6 Version: DEV 6 7 7 Author: TIgor 8 8 Author URI: http://tigors.net … … 37 37 function videoinfo() { 38 38 return '<?php 39 echo str_replace(array("\n","\r\n"), ' ',$options['info']);39 echo str_replace(array("\n","\r\n"), ' ',$options['info']); 40 40 ?>'; 41 41 } … … 63 63 $width = $atts ['width']; 64 64 $height = $atts ['height']; 65 65 66 66 67 if ('' != $atts ['title']) … … 85 86 $play = $options['play']; 86 87 } 87 if ('true' == $options['inline']) 88 89 90 91 if ((('true' == $atts['inline'])OR('true' == $options['inline'])) AND ('false' != $atts['inline'])) 88 92 { 89 93 $onclick = "inline_voutub('".$content."')"; … … 91 95 $onclick = "voutub('".$content."')"; 92 96 } 93 $ret = '<div id="video-onclick-'.$content.'"><div title="'.$title.'" class="video-onclick-click-div" id="'.$content.'" style="width:'.$width.';height:'.$height.';background-image:url('."'".$youtube['thumb']."'".');" onClick="'.$onclick.'"> 97 98 99 100 $ret = '<a name="'.$content.'"></a><div id="video-onclick-'.$content.'"><a class="video-onclick-link" href="#'.$content.'">'.$title.'</a><div title="'.$title.'" class="video-onclick-click-div" id="'.$content.'" style="width:'.$width.';height:'.$height.';background-image:url('."'".$youtube['thumb']."'".');" onClick="'.$onclick.'"> 94 101 <img class="video-onclick-play-button" src="'.$play.'" / > 95 102 </div></div>'; … … 129 136 } 130 137 131 if ( 'true' == $options['inline'])138 if ((('true' == $atts['inline'])OR('true' == $options['inline'])) AND ('false' != $atts['inline'])) 132 139 { 133 140 $onclick = "inline_vovimeo('".$content."')"; … … 136 143 } 137 144 138 $ret = '< div id="video-onclick-'.$content.'"><div title="'.$title.'" class="video-onclick-click-div" id="'.$content.'" style="width:'.$width.';height:'.$height.';background-image:url('."'".$vimeo['thumb']."'".');" onClick='.$onclick.'>145 $ret = '<a name="'.$content.'"></a><div id="video-onclick-'.$content.'"><a class="video-onclick-link" href="#'.$content.'">'.$title.'</a><div title="'.$title.'" class="video-onclick-click-div" id="'.$content.'" style="width:'.$width.';height:'.$height.';background-image:url('."'".$vimeo['thumb']."'".');" onClick='.$onclick.'> 139 146 <img class="video-onclick-play-button" src="'.$play.'" / > 140 147 </div></div>';
Note: See TracChangeset
for help on using the changeset viewer.