Changeset 961328
- Timestamp:
- 08/06/2014 08:49:49 PM (12 years ago)
- Location:
- zbplayer
- Files:
-
- 4 edited
-
tags/2.1.9/zbPlayer.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/zbPlayer.admin.php (modified) (1 diff)
-
trunk/zbPlayer.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
zbplayer/tags/2.1.9/zbPlayer.php
r961325 r961328 208 208 } 209 209 210 210 /** 211 * Test if incoming parameter contain utf8 symbols 212 * 213 * @param mixed(string|array) $mixed 214 * @return boolean 215 */ 211 216 function zbp_is_utf8($mixed) 212 217 { 218 if (!function_exists('mb_detect_encoding')) { 219 return true; 220 } 213 221 if (is_array($mixed)) { 214 222 foreach ($mixed as $name) { -
zbplayer/trunk/readme.txt
r961284 r961328 5 5 Requires at least: 3.5 6 6 Tested up to: 3.9.2 7 Stable tag: 2.1. 87 Stable tag: 2.1.9 8 8 License: Dual Licensed under the MIT and GPLv2 or later 9 9 … … 52 52 == Changelog == 53 53 54 = 2.1.8 =54 = 2.1.8/9 = 55 55 * Fix links/file name problem. Sometime flash player did not understand correctly file names to play. 56 56 -
zbplayer/trunk/zbPlayer.admin.php
r961284 r961328 7 7 * 8 8 * zbPlayer.admin.php 9 * Release 2.1. 8August 20149 * Release 2.1.9 August 2014 10 10 */ 11 11 // connect wordpress color picker -
zbplayer/trunk/zbPlayer.php
r961284 r961328 4 4 Plugin URI: http://gilevich.com/portfolio/zbplayer 5 5 Description: Converts mp3 files links to a small flash player and a link to download file mp3 file. Also you can share your mp3 files with that plugin. 6 Version: 2.1. 86 Version: 2.1.9 7 7 Author: Vladimir Gilevich 8 8 Author URI: http://gilevich.com/ … … 10 10 */ 11 11 12 define('ZBPLAYER_VERSION', "2.1. 8");12 define('ZBPLAYER_VERSION', "2.1.9"); 13 13 define('ZBPLAYER_DEFAULT_WIDTH', "500"); 14 14 define('ZBPLAYER_DEFAULT_INITIALVOLUME', "60"); … … 107 107 } 108 108 if (count($links)) { 109 // test on utf-8 in links 110 if (zbp_is_utf8($links)) { 111 foreach ($links as $key => $link) { 112 $links[$key] = zbp_urlencode($link); 113 } 114 $links = implode(',', $links); 115 $encode = ''; 116 } else { 117 $links = zbp_encode_source(implode(',', $links)); 118 $encode = '&encode=yes'; 119 } 109 120 $loop = get_option('zbp_loop') == 'true' ? 'yes' : 'no'; 110 121 $autostart = get_option('zbp_autostart') == 'true' ? 'yes' : 'no'; … … 117 128 . ' flashvars="loop='.$loop.'&animation='.$animation.'&playerID=zbPlayer&initialvolume='.$initialvolume . zbp_get_color_srt() 118 129 . $titles 119 . '&encode=yes&soundFile='.zbp_encode_source(implode(',',$links))130 . $encode.'&soundFile='.$links 120 131 . '&autostart='.$autostart.'" type="application/x-shockwave-flash" class="player" src="'.plugin_dir_url(__FILE__).'data/player.swf" id="zbPlayer"/></div>'; 121 132 $content = str_replace(get_option('zbp_collect_field'), $player, $content); … … 185 196 $songname .= !empty($songname) ? '<br/>' : ''; 186 197 $titles = (get_option('zbp_id3') == 'true') ? '' : '&titles='.urlencode($titles); 187 198 $encode = zbp_is_utf8($link) ? '' : '&encode=yes'; 188 199 $ret = '<div class="zbPlayer">' . $songname 189 200 . $shareInline 190 201 . '<embed width="'.$width.'" height="26" wmode="transparent" menu="false" quality="high"' 191 202 . ' flashvars="loop='.$loop.'&animation='.$animation.'&playerID=zbPlayer&initialvolume='.$initialvolume . zbp_get_color_srt() 192 . $titles. '&encode=yes&soundFile='.zbp_encode_source($link)203 . $titles.$encode.'&soundFile='.zbp_encode_source($link) 193 204 . '&autostart='.$autostart.'" type="application/x-shockwave-flash" class="zbPlayerFlash" src="'.plugin_dir_url(__FILE__).'data/player.swf" id="zbPlayer"/>'; 194 205 $ret .= '<audio class="zbPlayerNative" src="'.$link.'" controls preload="none"></audio>'; … … 198 209 199 210 /** 211 * Test if incoming parameter contain utf8 symbols 212 * 213 * @param mixed(string|array) $mixed 214 * @return boolean 215 */ 216 function zbp_is_utf8($mixed) 217 { 218 if (!function_exists('mb_detect_encoding')) { 219 return true; 220 } 221 if (is_array($mixed)) { 222 foreach ($mixed as $name) { 223 if (mb_detect_encoding($name) == 'UTF-8') { 224 return true; 225 } 226 } 227 } else { 228 if (mb_detect_encoding($mixed) == 'UTF-8') { 229 return true; 230 } 231 } 232 return false; 233 } 234 235 /** 200 236 * Encodes the given string for flash player 201 237 * … … 205 241 function zbp_encode_source($string) 206 242 { 243 if (zbp_is_utf8($string)) { 244 return zbp_urlencode($string); 245 } 207 246 $source = utf8_decode($string); 208 247 $ntexto = "";
Note: See TracChangeset
for help on using the changeset viewer.