Smart YouTube PRO
Request: YouTube's new Cosmic Panda theme (dark) (5 posts)

  1. ben4d85
    Posted 4 years ago #

    YouTube has released a new theme for their player. It is called "Cosmic Panda" and has a dark/black style. Please include it in the plugin.

    I've listed the necessary changes below (smartyoutube.class.php):

    Below line 93, add:
    $this->options['cosmic_panda'] = isset($_POST['disp_cosmic_panda']) ? 'off' : 'on';

    Below line 134, add:
    $disp_cosmic_panda = $this->options['cosmic_panda'] == 'on' ? checked="checked"' : '';

    At the end of line 353, add:

    <input type="checkbox" id="disp_cosmic_panda" name="disp_cosmic_panda" $disp_cosmic_panda /><label for="disp_cosmic_panda"> Use YouTube's new, black <em>"Cosmic Panda"</em> theme for the player (instead of the standard theme)</label>

    Below line 455, add:
    $disp_cosmic_panda = $this->options['cosmic_panda'] == 'on' ? &theme=dark' : '';

    Line 510 change to:
    $video_url = htmlspecialchars("$root_url/embed/$file?color1={$this->custom_colors[$disp_color][0]}&color2={$this->custom_colors[$disp_color][1]}&border=$disp_border&fs=1&hl=en&autoplay=$autoplay&loop=$loop{$disp_info}$disp_ann$disp_cosmic_panda&showsearch=$disp_search&rel=$disp_rel", ENT_QUOTES) . $high . $time;

    Line 512 change to:
    $video_url = htmlspecialchars("$root_url/v/$file?color1={$this->custom_colors[$disp_color][0]}&color2={$this->custom_colors[$disp_color][1]}&border=$disp_border&fs=1&hl=en&autoplay=$autoplay&loop=$loop{$disp_info}$disp_ann$disp_cosmic_panda&showsearch=$disp_search&rel=$disp_rel", ENT_QUOTES) . $high . $time;

    Line 517 change to:
    $video_url = htmlspecialchars("$root_url/p/$file?color1={$this->custom_colors[$disp_color][0]}&color2={$this->custom_colors[$disp_color][1]}&border=$disp_border&fs=1&hl=en&autoplay=$autoplay{$disp_info}$disp_ann$disp_cosmic_panda&showsearch=$disp_search&rel=$disp_rel", ENT_QUOTES) . $high . $time;

  2. niklasilves
    Posted 4 years ago #


    I have follow your guide with no success. Do you have a copy of the file so I can compare? I really want cosmic panda theme on the plugin. I hope that you can help me.


  3. ben4d85
    Posted 4 years ago #

    Hi Niklas,

    you can get my version of the file from http://www.dobschin.com/webdev/wp/smartyoutube.class.zip

    Let me know if that works for you.

  4. Ronaldo0011
    Posted 4 years ago #

  5. niklasilves
    Posted 4 years ago #


    Thanks it worked like a charme! Now will the check on the option stick and cosmic panda is activate! Perfect.


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic