Plugin Directory

Changeset 212590


Ignore:
Timestamp:
03/03/2010 05:25:22 PM (16 years ago)
Author:
fairweb
Message:
 
Location:
fw-vimeo-videowall
Files:
18 added
7 edited

Legend:

Unmodified
Added
Removed
  • fw-vimeo-videowall/trunk/fw-vimeo-videowall-widget.class.php

    r201420 r212590  
    3131        'number' => $instance['number'],
    3232        'width' => $instance['width'],
    33                 'height' => $instance['height']);
     33                'height' => $instance['height'],
     34                'title' => $instance['title']);
    3435       
    3536
     
    6364        $instance['width'] = strip_tags( $new_instance['width'] );
    6465                $instance['height'] = strip_tags( $new_instance['height'] );
    65        
     66        $instance['title'] = strip_tags( $new_instance['title'] );
    6667
    6768        return $instance;
     
    103104        </p>
    104105
     106                 <p><?php _e('Display video title under thumbnail (irrelevant if you display a list of video titles)','fwvvw');?><br />
     107                    <label><input type="radio" name="<?php echo $this->get_field_name( 'title' ); ?>" value="1" <?php if ( 1 == $instance['title'] ) echo 'checked="checked"'; ?> /><?php _e('Yes','fwvvw');?></label>
     108                    <br />
     109                    <label><input type="radio" name="<?php echo $this->get_field_name( 'title' ); ?>" value="0" <?php if ( 0 == $instance['title'] ) echo 'checked="checked"'; ?> /><?php _e('No','fwvvw');?></label>
     110                 </p>
     111
    105112                <p>
    106113        <label for="<?php echo $this->get_field_id( 'number' ); ?>"><?php _e('Number of videos','fwvvw');?><br /></label>
  • fw-vimeo-videowall/trunk/fw-vimeo-videowall.class.php

    r201834 r212590  
    1919    public $vpage = 1;
    2020    public $vpagination = true;
     21    public $vtitle = false;
    2122
    2223    function FW_vimeo_videowall() {
     
    3839            case 'channel' : $this->api_endpoint = 'http://www.vimeo.com/api/v2/channel/'.$this->id.'/videos.json?page='.$this->vpage;
    3940                                $this->info_endpoint = 'http://vimeo.com/api/v2/channel/'.$this->id.'/info.json'; break;
    40             case 'video' : $this->api_endpoint = 'http://www.vimeo.com/api/oembed.json'; break;
     41             case 'video' : $this->api_endpoint = 'http://vimeo.com/api/v2/video/'.$this->id.'.json'; break;
     42
     43            //case 'video' : $this->api_endpoint = 'http://www.vimeo.com/api/oembed.json'; break;
    4144            default : $this->api_endpoint = 'http://www.vimeo.com/api/v2/'.$this->id.'/videos.json'; break;
    4245        }
     
    5154        $this->vtype = $args['type'];
    5255        $this->vpage = $args['page'];
     56        $this->vtitle = $this->vtype == 'title' ? false : $args['title'];
    5357       // $this->vperpage = $args['perpage'];
    5458        // $this->vpaginate = $args['paginate'];
     
    112116    public function display_single_video ($video_id) {
    113117        $this->id = $video_id;
    114        
     118        
    115119        $this->vsource = 'video';
    116         $this->choose_endpoint ();
     120        //$this->choose_endpoint ();
     121        $this->api_endpoint = 'http://www.vimeo.com/api/oembed.json';
    117122        $oembed_url = $this->api_endpoint.'?url='.rawurlencode('http://vimeo.com/'.$this->id).'&maxwidth='.$this->vwidth.'&maxheight='.$this->vheight;       
    118123        $oembed_req = wp_remote_retrieve_body( wp_remote_get($oembed_url));
     
    154159        $html_code = '<div id="video_'.$video->id.'" class="fwvvw_vthumb">';
    155160        $html_code .= html_entity_decode($oembed->html);
     161        $html_code .= $this->vtitle == true ? '<div class="fwvvw-videotitle" style="width: '.$this->vwidth.'px;">'.$video->title.'</div>' : '';
    156162        $html_code .= '</div>';
    157163        return $html_code;
     
    161167         $html_code = '<div id="video_'.$video->id.'" class="fwvvw_vthumb">';
    162168         $html_code .= '<img src="'.$video->thumbnail_small.'" alt="'.$video->title.'" title="'.$video->title.'" width="'.$this->vwidth.'" />';
     169         $html_code .= $this->vtitle == true ? '<div class="fwvvw-videotitle" style="width: '.$this->vwidth.'px;">'.$video->title.'</div>' : '';
     170
    163171         $html_code .= '</div>';
    164172         return $html_code;
     
    210218
    211219    public function get_datas() {
    212 //echo $this->api_endpoint;
     220    //echo $this->api_endpoint;
    213221        $endpoint_req = wp_remote_retrieve_body( wp_remote_get($this->api_endpoint));
    214222        $videos = json_decode($endpoint_req );
  • fw-vimeo-videowall/trunk/fw-vimeo-videowall.css

    r201420 r212590  
    1010    border: #ebebeb 1px solid;
    1111    margin:2px;
     12    cursor:pointer;
    1213}
    1314
     
    7172    font-weight:bold;
    7273}
     74
     75.fwvvw-videotitle {
     76    font-size:0.8em;
     77}
  • fw-vimeo-videowall/trunk/fw-vimeo-videowall.php

    r201834 r212590  
    88Description: Displays a user, group, album or channel vimeo videowall with thumbnails or small videos in sidebar or content with pagination if needed.
    99Author: fairweb
    10 Version: 1.2.1
     10Version: 1.3
    1111Author URI: http://www.fairweb.fr/
    1212*/
     
    4141        'number' => 4, 'width' => 100,
    4242        'height' => 100, 'type' => 'image',
    43         'source' => 'user', 'paginate' => true, 'page' => 1, 'echo' => true
     43        'source' => 'user', 'paginate' => true, 'page' => 1, 'title' => false, 'echo' => true
    4444    );
    4545
  • fw-vimeo-videowall/trunk/languages/fwvvw-fr_FR.po

    r201420 r212590  
    33"Project-Id-Version: fwvvw\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2010-02-03 15:58+0100\n"
     5"POT-Creation-Date: 2010-02-12 05:08+0100\n"
    66"PO-Revision-Date: \n"
    77"Last-Translator: Myriam Faulkner <[email protected]>\n"
     
    2828msgstr "Videowall Vimeo"
    2929
    30 #: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:73
     30#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:74
    3131msgid "Videos"
    3232msgstr "Vidéos"
    3333
    34 #: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:77
     34#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:78
    3535msgid "Title"
    3636msgstr "Titre"
    3737
    38 #: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:82
     38#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:83
    3939msgid "Vimeo source type"
    4040msgstr "Type de source Vimeo"
    4141
    42 #: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:84
     42#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:85
    4343msgid "Vimeo User"
    4444msgstr "Utilisateur Vimeo"
    4545
    46 #: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:85
     46#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:86
    4747msgid "Vimeo Group"
    4848msgstr "Groupe Vimeo"
    4949
    50 #: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:86
     50#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:87
    5151msgid "Vimeo Album"
    5252msgstr "Album Vimeo"
    5353
    54 #: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:87
     54#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:88
    5555msgid "Vimeo Channel"
    5656msgstr "Canal Vimeo"
    5757
    58 #: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:92
     58#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:93
    5959msgid "Vimeo ID"
    6060msgstr "ID Vimeo"
    6161
    62 #: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:92
     62#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:93
    6363msgid "user, group, album or channel ID"
    6464msgstr "ID de l'utilisateur, du groupe, de l'album ou du canal"
    6565
    66 #: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:97
     66#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:98
    6767msgid "Display"
    6868msgstr "Afficher"
    6969
    70 #: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:99
     70#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:100
    7171msgid "clickable video thumbnails"
    7272msgstr "des miniatures cliquables"
    7373
    74 #: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:100
     74#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:101
    7575msgid "playable videos"
    7676msgstr "des vidéos jouables"
    7777
    78 #: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:101
     78#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:102
    7979msgid "list of video titles"
    8080msgstr "Liste de titres"
    8181
    8282#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:106
     83msgid "Display video title under thumbnail (irrelevant if you display a list of video titles)"
     84msgstr "Afficher le titre de la vidéo sous la miniature (sans effet si vous affichez une liste de titres)"
     85
     86#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:107
     87msgid "Yes"
     88msgstr "Oui"
     89
     90#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:109
     91msgid "No"
     92msgstr "Non"
     93
     94#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:113
    8395msgid "Number of videos"
    8496msgstr "Nombre de vidéos"
    8597
    86 #: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:111
     98#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:118
    8799msgid "Max video width"
    88100msgstr "Largeur max de la vidéo"
    89101
    90 #: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:116
     102#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall-widget.class.php:123
    91103msgid "Max video height"
    92104msgstr "Hauteur max de la vidéo"
    93105
    94 #: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall.class.php:81
     106#: wp-content\plugins\fw-vimeo-videowall/fw-vimeo-videowall.class.php:85
    95107msgid "No video"
    96108msgstr "Aucune vidéo"
  • fw-vimeo-videowall/trunk/readme.txt

    r201834 r212590  
    1818You may choose to display clickable video thumbnails or titles which will open a window with Vimeo default sized video or small playable videos.
    1919You may choose how many thumbnails or titles you want to display.
     20You may display video title under its thumbnail.
    2021
    2122= Localized =
     
    49501. width : thumbnail max width. Default is 100. It has no effet if `type` is set to "title".
    50511. height : thumbnail max height. Default is 100. It has no effet if `type` is set to "title".
     521. title : displays the video title under its thumbnail if set to true. Default is false. It has no effet if `type` is set to "title". Consider adding a height CSS attribute to div.fwvvw_vthumb.
    51531. echo : if true, displays the videowall, if false return the html without displaying it. Default is true.
    5254
     
    5759
    5860== Changelog ==
     61= 1.3 =
     62* Corrected bug : display a single video (reported by Jaryd)
     63* Added the video title under thumbnail feature (requested by Jaryd)
    5964= 1.2.1 =
    6065* Corrected bug : limited number of videos displayed did not work since 1.2 (reported by Dan)
Note: See TracChangeset for help on using the changeset viewer.