Plugin Directory

Changeset 1470414


Ignore:
Timestamp:
08/09/2016 12:55:57 AM (10 years ago)
Author:
uglion
Message:

Обновление версии

Location:
radio-widget-popular/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • radio-widget-popular/trunk/Radio-Widget-Popular.php

    r1435150 r1470414  
    44 * Plugin URI: https://wordpress.org/plugins/radio-widget-popular
    55 * Description: Плеер популярных Российских радиостанций.
    6  * Version: 1.0
     6 * Version: 1.1
    77 * Author: Иванов Тихон
    88 * Author URI: https://radiola.audio
     
    2929        extract( $args );
    3030        $title = apply_filters('widget_title', $instance['title'] );
    31         $w_width = $instance['w_width'];
     31       
     32        $player_back = $instance['player_back'];
     33        $buttons_back = $instance['buttons_back'];
     34       
     35        $radstation1 = $instance['radstation1'];
     36        $radstation2 = $instance['radstation2'];
     37        $radstation3 = $instance['radstation3'];
     38        $radstation4 = $instance['radstation4'];
     39        $radstation5 = $instance['radstation5'];
     40       
     41        $radname1 = $instance['radname1'];
     42        $radname2 = $instance['radname2'];
     43        $radname3 = $instance['radname3'];
     44        $radname4 = $instance['radname4'];
     45        $radname5 = $instance['radname5'];
     46       
     47        $showtracks = $instance['showtracks'];
     48        $showslider = $instance['showslider'];
     49       
     50        $customslide1 = $instance['customslide1'];
     51        $customslide2 = $instance['customslide2'];
     52        $customslide3 = $instance['customslide3'];
     53       
     54        $customlink1 = $instance['customlink1'];
     55        $customlink2 = $instance['customlink2'];
     56        $customlink3 = $instance['customlink3'];
     57       
    3258        echo $before_widget;
    3359
     
    3561        if ( $title )
    3662            echo $before_title . $title . $after_title;
    37        
    38         if ($w_width < 270){
    39             echo "<iframe width='$w_width' height='340' frameborder='no' marginheight='0' marginwidth='0' src='https://radiola.audio/radio/stations/radiowidgetpopular.html?m=1'>Радиола Аудио</iframe>";
     63        echo "<meta charset='UTF-8'>";
     64        echo "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>";
     65        echo "<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js'></script>";
     66        echo "<script src='https://radiola.audio/radio/ads/sliderdata/jquery.bxslider.min.js'></script>";
     67        echo "<link href='https://radiola.audio/radio/ads/sliderdata/jquery.bxslider.css' rel='stylesheet' />";
     68        echo "<link href='https://radiola.audio/radio/radiola_player.css' rel='stylesheet'/>";
     69        echo "<div id='radiola_container' align='absmiddle'><a href='https://radiola.audio'>Слушать радио онлайн</a></div>";
     70        echo "<script type='text/javascript'>// <![CDATA[\n";
     71        echo "var rad_type='Multiple';";
     72        echo "var ad_slider = 'radiowidgetpopular';";
     73       
     74        if ( $customslide1 ) {
     75            echo "var customslide1 = '$customslide1'; ";
     76            if ( $customlink1 ) echo "var customlink1 = '$customlink1'; ";
     77        }
     78
     79        if ( $customslide2 ) {
     80            echo "var customslide2 = '$customslide2'; ";
     81            if ( $customlink2 ) echo "var customlink2 = '$customlink2'; ";
     82        }
     83
     84        if ( $customslide3 ) {
     85            echo "var customslide3 = '$customslide3'; ";
     86            if ( $customlink3 ) echo "var customlink3 = '$customlink3'; ";
     87        }
     88       
     89        if ( $showtracks == 1 ) {
     90            echo "var showtracks = true; ";
    4091        } else {
    41             echo "<iframe width='$w_width' height='440' frameborder='no' marginheight='0' marginwidth='0' src='https://radiola.audio/radio/stations/radiowidgetpopular.html'>Радиола Аудио</iframe>";
    42         }
     92            echo "var showtracks = false; ";
     93        }
     94       
     95        if ( $showslider == 1 ) {
     96            echo "var showslider = true; ";
     97        } else {
     98            echo "var showslider = false; ";
     99        }
     100       
     101        if ( $buttons_back ) echo "var buttons_back = '$buttons_back'; ";       
     102        if ( $player_back ) echo "var player_back='$player_back'; ";
     103        echo "var rad_home = 'https://radiola.audio'; var rad_stations =[";
     104        if ( $radstation1 ) {
     105            echo "";
     106            if ( $radname1 ) {
     107                echo "['$radstation1','$radname1'],";
     108            } else {
     109                echo "['$radstation1','Поток 1'],";
     110            }
     111        }
     112        if ( $radstation2 ) {
     113            echo "";
     114            if ( $radname2 ) {
     115                echo "['$radstation2','$radname2'],";
     116            } else {
     117                echo "['$radstation2','Поток 2'],";
     118            }
     119        }
     120        if ( $radstation3 ) {
     121            echo "";
     122            if ( $radname3 ) {
     123                echo "['$radstation3','$radname3'],";
     124            } else {
     125                echo "['$radstation3','Поток 3'],";
     126            }
     127        }
     128        if ( $radstation4 ) {
     129            echo "";
     130            if ( $radname4 ) {
     131                echo "['$radstation4','$radname4'],";
     132            } else {
     133                echo "['$radstation4','Поток 4'],";
     134            }
     135        }
     136        if ( $radstation5 ) {
     137            echo "";
     138            if ( $radname5 ) {
     139                echo "['$radstation5','$radname5']];\n";
     140            } else {
     141                echo "['$radstation5','Поток 5']];\n";
     142            }
     143        }               
     144        echo "// ]]></script>";
     145        echo "<script src='https://radiola.audio/radio/radiola_player7.2.js' type='text/javascript'></script>";
    43146
    44147        echo $after_widget;
     
    50153        $instance = $old_instance;
    51154        $instance['title'] = strip_tags( $new_instance['title'] );
    52         $instance['w_width'] = strip_tags( $new_instance['w_width'] );
     155       
     156        $instance['player_back'] = strip_tags( $new_instance['player_back'] );
     157        $instance['buttons_back'] = strip_tags( $new_instance['buttons_back'] );
     158       
     159        $instance['radstation1'] = strip_tags( $new_instance['radstation1'] );
     160        $instance['radstation2'] = strip_tags( $new_instance['radstation2'] );
     161        $instance['radstation3'] = strip_tags( $new_instance['radstation3'] );
     162        $instance['radstation4'] = strip_tags( $new_instance['radstation4'] );
     163        $instance['radstation5'] = strip_tags( $new_instance['radstation5'] );
     164       
     165        $instance['radname1'] = strip_tags( $new_instance['radname1'] );
     166        $instance['radname2'] = strip_tags( $new_instance['radname2'] );
     167        $instance['radname3'] = strip_tags( $new_instance['radname3'] );
     168        $instance['radname4'] = strip_tags( $new_instance['radname4'] );
     169        $instance['radname5'] = strip_tags( $new_instance['radname5'] );
     170       
     171        $instance['showtracks'] = strip_tags( $new_instance['showtracks'] );
     172        $instance['showslider'] = strip_tags( $new_instance['showslider'] );
     173       
     174        $instance['customslide1'] = strip_tags( $new_instance['customslide1'] );
     175        $instance['customslide2'] = strip_tags( $new_instance['customslide2'] );
     176        $instance['customslide3'] = strip_tags( $new_instance['customslide3'] );
     177       
     178        $instance['customlink1'] = strip_tags( $new_instance['customlink1'] );
     179        $instance['customlink2'] = strip_tags( $new_instance['customlink2'] );
     180        $instance['customlink3'] = strip_tags( $new_instance['customlink3'] );
     181       
    53182        return $instance;
    54183    }
    55 
    56184   
    57185    function form( $instance ) {
    58186
    59187        //Set up some default widget settings.
    60         $defaults = array( 'title' => __('Радио', 'rwidget'), 'w_width' => __('300', 'rwidget'));
     188        $defaults = array('title' => __('Радио', 'rwidget'), 'radstation1' => __('http://ruhit.imgradio.pro/RusHit', 'rwidget'), 'radstation2' => __('http://listen.rusongs.ru/ru-mp3-128', 'rwidget'), 'radstation3' => __('http://listen2.myradio24.com:9000/1632', 'rwidget'), 'radstation4' => __('http://radio.horoshee.fm:8000/mp3', 'rwidget'), 'radstation5' => __('http://stream01.radiocon.ru:8000/live', 'rwidget'), 'radname1' => __('Руский хит', 'rwidget'), 'radname2' => __('Русские песни', 'rwidget'), 'radname3' => __('Пляж', 'rwidget'), 'radname4' => __('Хорошее радио', 'rwidget'), 'radname5' => __('Континенталь', 'rwidget'), 'buttons_back' => __('#630c00', 'rwidget'), 'showtracks' => __(1, 'rwidget'), 'showslider' => __(1, 'rwidget'), 'customslide1' => __('https://radiola.audio/radio/widgets/the_getaway.jpg', 'rwidget'), 'customslide2' => __('https://radiola.audio/radio/widgets/default_ad5.jpg', 'rwidget'), 'customslide3' => __('https://radiola.audio/radio/widgets/default_ad6.jpg', 'rwidget'), 'customlink1' => __('https://radiola.audio/red-hot-chili-peppers-the-getaway-2016/', 'rwidget'), 'customlink2' => __('https://radiola.audio/10-kaverov-kotorye-luchshe-originalov/', 'rwidget'), 'customlink3' => __('https://radiola.audio/dajdo-zhizn-posle-jeminema/', 'rwidget'));
    61189        $instance = wp_parse_args( (array) $instance, $defaults ); ?>
    62190
     
    68196
    69197        <p>
    70             <label for="<?php echo $this->get_field_id( 'w_width' ); ?>"><?php _e('Ширина плеера в пикселях:', 'rwidget'); ?></label>
    71             <input id="<?php echo $this->get_field_id( 'w_width' ); ?>" name="<?php echo $this->get_field_name( 'w_width' ); ?>" value="<?php echo $instance['w_width']; ?>" style="width:100%;" />
    72         </p>
    73             <p>Минимальная ширина плеера: 180 пикселей.</p>
    74             <p>Ширина компактной версии плеера: от 180 до 270 пикселей.</p>
    75             <p>Ширина полной версии плеера: от 270 до 400 пикселей.</p>
     198            <label for="<?php echo $this->get_field_id( 'player_back' ); ?>"><?php _e('Фон плеера:', 'rwidget'); ?></label>
     199            <input id="<?php echo $this->get_field_id( 'player_back' ); ?>" name="<?php echo $this->get_field_name( 'player_back' ); ?>" value="<?php echo $instance['player_back']; ?>" style="width:100%;" />
     200
     201            <label for="<?php echo $this->get_field_id( 'buttons_back' ); ?>"><?php _e('Цвет кнопок:', 'rwidget'); ?></label>
     202            <input id="<?php echo $this->get_field_id( 'buttons_back' ); ?>" name="<?php echo $this->get_field_name( 'buttons_back' ); ?>" value="<?php echo $instance['buttons_back']; ?>" style="width:100%;" />             
     203        </p>
     204       
     205        <p>
     206            <label for="<?php echo $this->get_field_id( 'radname1' ); ?>"><?php _e('Название первого потока:', 'rwidget'); ?></label>
     207            <input id="<?php echo $this->get_field_id( 'radname1' ); ?>" name="<?php echo $this->get_field_name( 'radname1' ); ?>" value="<?php echo $instance['radname1']; ?>" style="width:100%;" />
     208           
     209            <label for="<?php echo $this->get_field_id( 'radstation1' ); ?>"><?php _e('Ссылка на первый поток:', 'rwidget'); ?></label>
     210            <input id="<?php echo $this->get_field_id( 'radstation1' ); ?>" name="<?php echo $this->get_field_name( 'radstation1' ); ?>" value="<?php echo $instance['radstation1']; ?>" style="width:100%;" />
     211        </p>
     212        <p>
     213            <label for="<?php echo $this->get_field_id( 'radname2' ); ?>"><?php _e('Название второго потока:', 'rwidget'); ?></label>
     214            <input id="<?php echo $this->get_field_id( 'radname2' ); ?>" name="<?php echo $this->get_field_name( 'radname2' ); ?>" value="<?php echo $instance['radname2']; ?>" style="width:100%;" />
     215       
     216            <label for="<?php echo $this->get_field_id( 'radstation2' ); ?>"><?php _e('Ссылка на второй поток:', 'rwidget'); ?></label>
     217            <input id="<?php echo $this->get_field_id( 'radstation2' ); ?>" name="<?php echo $this->get_field_name( 'radstation2' ); ?>" value="<?php echo $instance['radstation2']; ?>" style="width:100%;" />
     218        </p>   
     219        <p>
     220            <label for="<?php echo $this->get_field_id( 'radname3' ); ?>"><?php _e('Название третьего потока:', 'rwidget'); ?></label>
     221            <input id="<?php echo $this->get_field_id( 'radname3' ); ?>" name="<?php echo $this->get_field_name( 'radname3' ); ?>" value="<?php echo $instance['radname3']; ?>" style="width:100%;" />
     222
     223            <label for="<?php echo $this->get_field_id( 'radstation3' ); ?>"><?php _e('Ссылка на третий поток:', 'rwidget'); ?></label>
     224            <input id="<?php echo $this->get_field_id( 'radstation3' ); ?>" name="<?php echo $this->get_field_name( 'radstation3' ); ?>" value="<?php echo $instance['radstation3']; ?>" style="width:100%;" />
     225        </p>
     226        <p>
     227            <label for="<?php echo $this->get_field_id( 'radname4' ); ?>"><?php _e('Название четвёртого потока:', 'rwidget'); ?></label>
     228            <input id="<?php echo $this->get_field_id( 'radname4' ); ?>" name="<?php echo $this->get_field_name( 'radname4' ); ?>" value="<?php echo $instance['radname4']; ?>" style="width:100%;" />
     229       
     230            <label for="<?php echo $this->get_field_id( 'radstation4' ); ?>"><?php _e('Ссылка на четвёртый поток:', 'rwidget'); ?></label>
     231            <input id="<?php echo $this->get_field_id( 'radstation4' ); ?>" name="<?php echo $this->get_field_name( 'radstation4' ); ?>" value="<?php echo $instance['radstation4']; ?>" style="width:100%;" />
     232        </p>
     233        <p>
     234            <label for="<?php echo $this->get_field_id( 'radname5' ); ?>"><?php _e('Название пятого потока:', 'rwidget'); ?></label>
     235            <input id="<?php echo $this->get_field_id( 'radname5' ); ?>" name="<?php echo $this->get_field_name( 'radname5' ); ?>" value="<?php echo $instance['radname5']; ?>" style="width:100%;" />
     236       
     237            <label for="<?php echo $this->get_field_id( 'radstation5' ); ?>"><?php _e('Ссылка на пятый поток:', 'rwidget'); ?></label>
     238            <input id="<?php echo $this->get_field_id( 'radstation5' ); ?>" name="<?php echo $this->get_field_name( 'radstation5' ); ?>" value="<?php echo $instance['radstation5']; ?>" style="width:100%;" />
     239        </p>       
     240        <input id="<?php echo $this->get_field_id('showtracks'); ?>" name="<?php echo $this->get_field_name('showtracks'); ?>" type="checkbox" value="1" <?php checked('1', $instance['showtracks']); ?>/>
     241        <label for="<?php echo $this->get_field_id('showtracks'); ?>"><?php _e('Показывать названия песен', 'rwidget'); ?></label><br>
     242        <input id="<?php echo $this->get_field_id('showslider'); ?>" name="<?php echo $this->get_field_name('showslider'); ?>" type="checkbox" value="1" <?php checked('1', $instance['showslider']); ?>/>
     243        <label for="<?php echo $this->get_field_id('showslider'); ?>"><?php _e('Показывать слайдер', 'rwidget'); ?></label>
     244       
     245        <p>
     246            <label for="<?php echo $this->get_field_id( 'customslide1' ); ?>"><?php _e('Изображение третьего слайда:', 'rwidget'); ?></label>
     247            <input id="<?php echo $this->get_field_id( 'customslide1' ); ?>" name="<?php echo $this->get_field_name( 'customslide1' ); ?>" value="<?php echo $instance['customslide1']; ?>" style="width:100%;" />
     248
     249            <label for="<?php echo $this->get_field_id( 'customlink1' ); ?>"><?php _e('Ссылка третьего слайда:', 'rwidget'); ?></label>
     250            <input id="<?php echo $this->get_field_id( 'customlink1' ); ?>" name="<?php echo $this->get_field_name( 'customlink1' ); ?>" value="<?php echo $instance['customlink1']; ?>" style="width:100%;" />             
     251        </p>
     252        <p>
     253            <label for="<?php echo $this->get_field_id( 'customslide2' ); ?>"><?php _e('Изображение четвёртого слайда:', 'rwidget'); ?></label>
     254            <input id="<?php echo $this->get_field_id( 'customslide2' ); ?>" name="<?php echo $this->get_field_name( 'customslide2' ); ?>" value="<?php echo $instance['customslide2']; ?>" style="width:100%;" />
     255
     256            <label for="<?php echo $this->get_field_id( 'customlink2' ); ?>"><?php _e('Ссылка четвёртого слайда:', 'rwidget'); ?></label>
     257            <input id="<?php echo $this->get_field_id( 'customlink2' ); ?>" name="<?php echo $this->get_field_name( 'customlink2' ); ?>" value="<?php echo $instance['customlink2']; ?>" style="width:100%;" />             
     258        </p>
     259        <p>
     260            <label for="<?php echo $this->get_field_id( 'customslide3' ); ?>"><?php _e('Изображение пятого слайда:', 'rwidget'); ?></label>
     261            <input id="<?php echo $this->get_field_id( 'customslide3' ); ?>" name="<?php echo $this->get_field_name( 'customslide3' ); ?>" value="<?php echo $instance['customslide3']; ?>" style="width:100%;" />
     262
     263            <label for="<?php echo $this->get_field_id( 'customlink3' ); ?>"><?php _e('Ссылка пятого слайда:', 'rwidget'); ?></label>
     264            <input id="<?php echo $this->get_field_id( 'customlink3' ); ?>" name="<?php echo $this->get_field_name( 'customlink3' ); ?>" value="<?php echo $instance['customlink3']; ?>" style="width:100%;" />             
     265        </p>       
     266            <p>Спасибо за использование нашего плеера!</p>
    76267    <?php
    77268    }
  • radio-widget-popular/trunk/readme.txt

    r1435150 r1470414  
    33Tags: radio, widget, radiostation, player, russian, music, радио, виджет, радиостанции, плеер, русский, музыка
    44Requires at least: 3.9
    5 Tested up to: 4.5.2
    6 Stable tag: 1.0
     5Tested up to: 4.6
     6Stable tag: 1.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.txt
    99
    10 Плеер Российских радиостанций для сайдбара
    11 
    1210== Description ==
    13 Radio Widget Popular - виджет плеера Российских популярных радиостанций
    14 
    15 _For English description scroll down, please._
     11Радиоплеер для сайдбара
    1612
    1713Задача плагина - облегчить лёгкую установку радиоплеера.
     
    2016* Функции прослушивания радио становятся доступны сразу после установки.
    2117
    22 Плагин разработан и поддерживается Radiola.Audio
    23 
     18Плагин разработан и поддерживается порталом Radiola.Audio.
    2419
    2520**Основные функции**
    2621
    27 * Обеспечение прослушивания пяти Российских радиостанций
     22* Обеспечение прослушивания до 5 различных радиостанций
    2823* Настройка ширины под любой сайдбар
    2924* Компактная и полная версия плеера
    3025* Отображение названий проигрываемых песен
     26* Настраиваемый слайдер
    3127
    3228После установки настройки плагина доступны через виджеты.
     
    3733
    3834* Добавить сообщение об ошибке или предложение по улучшению.
    39 * Поделиться улучшениями кода, послав нам Pull Request.
    4035* Сделать перевод плагина или оптимизировать его для вашей страны.
    41 
    42 **IN ENGLISH**
    43 
    44 Radio Player Popular - is the widget for WordPress that plays russian popular radiostations.
    45 
    46 The goal of the plugin is to simplify the integration of any WordPress-powered website.
    47 
    48 * The installation process is smooth and requires minimum settings.
    49 * Listening radiostations is available immediately after installation.
    50 
    51 The plugin is developed and maintained by Radiola.Audio.
    52 
    53 
    54 **Features**
    55 
    56 * Provision of listening of five Russian radio stations
    57 * Custom width for any sidebars.
    58 * Compact and full versions of player.
    59 * Displaing the names of songs.
    60 
    61 After installing the plugin settings are available under Wordpress Widgets
    62 
    63 **Help us**
    64 
    65 We will be very grateful for your help us to make the plugin better. You can do it in the following ways:
    66 
    67 * Report bugs or suggest improvements.
    68 * Send us a Pull Request with your fixes or improvements.
    69 * Translate the plugin or optimize it for your country.
    70 
    7136
    7237== Installation ==
     
    8348== Changelog ==
    8449
     50= 1.1 =
     51* Добавлена возможность слушать любые радиостанции
     52* Довавлена возможность настраивать слайдер
     53* Плеер полностью переведён на HTML5
     54
    8555= 1.0 =
    86 * First official release!
     56* Первая версия плеера.
Note: See TracChangeset for help on using the changeset viewer.