Em Andamento

I have a player script in string format to support a wordpress short code. I would like to unpack that string script so it can be used as a embed player code.

I have a flash player script written in a string format to support a wordpress shortcode where additional input is required. I would like to embed the player on my other sites, but I will not need the short code since all information will remain static and no additional input will be necessary of embedding the code.

As such I would like to unpack that string script so it can be used as a embed player code on other sites.

/* Custom shortcodes */

add_shortcode( "dcl_tv_player", "dcl_tv_player" );

function dcl_tv_player($atts, $content=null) {

extract(shortcode_atts(array(

'player_id' => '',

'width' => '400',

'height' => '225',

'channel' => '0',

'channels' => '0',

'ondemand' => '0',

'schedule' => '0',

'chat' => '0',

'autostart' => '0',

'player_class' => 'tvstation-player',

'widescreen' => '0'

), $atts));

if (empty($channel) || !is_numeric($channel)) return '<!-- Invalid channel. Please enter the correct channel -->';

if (empty($player_id)) $player_id = "tv-player-".$channel;

if (empty($width) && empty($height)) {

$width = 400;

$widescreen = 1;

}

if ( $widescreen == 1 && (!$width || !$height) ) {

if ($height && !$width) $width = intval($height * 16 / 9);

if (!$height && $width) $height = intval($width * 9 / 16);

}

$player_str = '<div id="'.$player_id.'" class="dcl-tv-player">';

$player_str .= ' <noscript><a href="[url removed, login to view]" class="small">Get the FREE Flash Player</a> to see this content.</noscript>';

$player_str .= '</div>';

$player_str .= '<script>';

$player_str .= '(function($) {';

$player_str .= 'var flashvars = ';

$player_str .= '{';

$player_str .= ' "RTMP": "rtmp://[url removed, login to view]",';

$player_str .= ' "id": "'.$player_id.'-instance",';

$player_str .= ' "channel": "channel'.$channel.'",';

$player_str .= ' "showChannels": '.(($channels == 1) ? "true" : "false").',';

$player_str .= ' "showOnDemand": '.(($ondemand == 1) ? "true" : "false").',';

$player_str .= ' "showDisplay": false,';

$player_str .= ' "showSchedule": '.(($schedule == 1) ? "true" : "false").',';

$player_str .= ' "showChat": '.(($chat == 1) ? "true" : "false").',';

$player_str .= ' "autostart": '.(($autostart == 1) ? "true" : "false").'';

$player_str .= '};';

$player_str .= 'var params =';

$player_str .= '{';

$player_str .= ' "allowfullscreen": "true",';

$player_str .= ' "allowscriptaccess": "sameDomain",';

$player_str .= ' "bgcolor": "#FFFFFF"';

$player_str .= '};';

$player_str .= 'var attributes =';

$player_str .= '{';

$player_str .= ' "id": "'.$player_id.'-'.$channel.'",';

$player_str .= ' "name": "'.$player_id.'-'.$channel.'"';

$player_str .= '};';

$player_str .= '[url removed, login to view]("[url removed, login to view]", "'.$player_id.'", "'.$width.'", "'.$height.'", "[url removed, login to view]", "false", flashvars, params, attributes);';

//$player_str .= '[url removed, login to view]("'.site_url( '/tvstudio/tv2beta/[url removed, login to view]' ).'", "'.$player_id.'", "'.$width.'", "'.$height.'", "[url removed, login to view]", "false", flashvars, params, attributes);';

$player_str .= '})(jQuery);';

$player_str .= '</script>';

return $player_str;

}

Habilidades: ActionScript, Adobe Flash, PHP

Ver mais: to string, this class jquery, string the, string i, php script null, need a flash player, get string c, c get string, i need a flash player, name format, jquery php/wordpress required, i have 16, php wordpress shortcodes, channel can, embed jquery, invalid script, wordpress shortcode, attributes jquery, php class attributes, script schedule, wordpress height, jquery swf, jquery wordpress player, wordpress jquery player, code rtmp flash

Acerca do Empregador:
( 0 comentários ) Coral Springs, United States

ID do Projeto: #5124253

Premiar a:

dustafo

I can get this done for you right away.

$75 USD em 1 dia
(96 Avaliações)
5.8

3 freelancers estão ofertando em média $78 para este trabalho

rajeshsonisl

Hello, With 99% completion rate, 650+ successfully completed projects, and a 5.00 reputation (maximum possible, 5.0) (Yes, not even 4.99 !!)... you can never go wrong choosing me :) I look forward to your reply. Mais

$103 USD in 10 dias
(455 Comentários)
7.3
nmansfield

I would like to slice your string for you. I have almost a decade of experience using Flash, and over four years of experience as a professional freelance developer. I encourage you to review my profile(http://ndmmed Mais

$55 USD em 1 dia
(27 Comentários)
4.5