Changeset 4073


Ignore:
Timestamp:
10/20/09 22:55:57 (10 years ago)
Author:
vdigital
Message:

[Public Piwigo WordPress Widget] Don't make any mistake it is a WordPress sidebar widget!

.po and .mo files provided by Laurent Duretz (Thanks to him)

Location:
extensions/Public_Piwigo_WordPress_Widget
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/Public_Piwigo_WordPress_Widget/Public_WP_Piwigo_Widget.php

    r4057 r4073  
    2828if (!defined('PPW_PFX')) define('PPW_PFX','Public_Piwigo_WordPress_'); 
    2929 
     30load_plugin_textdomain('pwg', 'wp-content/plugins/Public_Piwigo_WordPress_Widget', 'Public_Piwigo_WordPress_Widget' ); 
     31 
    3032class Public_Piwigo_WordPress_Widget extends WP_Widget 
    3133{ 
    3234        function Public_Piwigo_WordPress_Widget(){ 
    3335                $widget_ops = array('classname' => PPW_PFX . 'Widget', 
    34                         'description' => __( "Adds a thumbnail and its link (to the picture) inside your blog sidebar.") ); 
     36                        'description' => __( "Adds a thumbnail and its link (to the picture) inside your blog sidebar.",'pwg') ); 
    3537                $control_ops = array('width' => 300, 'height' => 300); 
    3638                $this->WP_Widget(PPW_PFX . 'Widget', PPW_NAME . 'Widget', $widget_ops, $control_ops); 
  • extensions/Public_Piwigo_WordPress_Widget/Public_WP_Piwigo_code.php

    r4055 r4073  
    6262        $cats = unserialize($response); 
    6363        if ($cats["stat"] == 'ok') { 
    64                 echo '<ul style="clear: both;"><li>' . __('Pictures categories') . '<ul>'; 
     64                echo '<ul style="clear: both;"><li>' . __('Pictures categories','pwg') . '<ul>'; 
    6565                foreach ($cats["result"]["categories"] as $cat) { 
    6666                        echo '<li><a title="' . $cat['name'] . '" href="' . $piwigo_url . 'index.php?category/' . $cat['id'] . '">' . $cat['name'] . '</a></li>'; 
     
    7575 
    7676if ($most_visited == 'true')  
    77         echo '<li><a title="' . __('Most visited') . '" href="' . $piwigo_url . 'index.php?most_visited' . '">' . __('Most visited') . '</a></li>'; 
     77        echo '<li><a title="' . __('Most visited','pwg') . '" href="' . $piwigo_url . 'index.php?most_visited' . '">' . __('Most visited','pwg') . '</a></li>'; 
    7878 
    7979if ($best_rated == 'true')  
    80         echo '<li><a title="' . __('Best rated') . '" href="' . $piwigo_url . 'index.php?best_rated' . '">' . __('Best rated') . '</a></li>'; 
     80        echo '<li><a title="' . __('Best rated','pwg') . '" href="' . $piwigo_url . 'index.php?best_rated' . '">' . __('Best rated','pwg') . '</a></li>'; 
    8181 
    8282if ($most_commented == 'true')  
    83         echo '<li><a title="' . __('Most commented') . '" href="' . $piwigo_url . 'index.php?most_commented' . '">' . __('Most commented') . '</a></li>'; 
     83        echo '<li><a title="' . __('Most commented','pwg') . '" href="' . $piwigo_url . 'index.php?most_commented' . '">' . __('Most commented','pwg') . '</a></li>'; 
    8484 
    8585if ($random == 'true')  
    86         echo '<li><a title="' . __('Random') . '" href="' . $piwigo_url . 'random.php' . '">' . __('Random') . '</a></li>'; 
     86        echo '<li><a title="' . __('Random','pwg') . '" href="' . $piwigo_url . 'random.php' . '">' . __('Random','pwg') . '</a></li>'; 
    8787 
    8888if ($recent_pics == 'true') 
    89         echo '<li><a title="' . __('Recent pics') . '" href="' . $piwigo_url . 'index.php?recent_pics' . '">' . __('Recent pics') . '</a></li>'; 
     89        echo '<li><a title="' . __('Recent pics','pwg') . '" href="' . $piwigo_url . 'index.php?recent_pics' . '">' . __('Recent pics','pwg') . '</a></li>'; 
    9090 
    9191if ($calendar == 'true')  
    92         echo '<li><a title="' . __('Calendar') . '" href="' . $piwigo_url . 'index.php?created-monthly-calendar' . '">' . __('Calendar') . '</a></li>'; 
     92        echo '<li><a title="' . __('Calendar','pwg') . '" href="' . $piwigo_url . 'index.php?created-monthly-calendar' . '">' . __('Calendar','pwg') . '</a></li>'; 
    9393 
    9494if ($tags == 'true')  
    95         echo '<li><a title="' . __('Tags') . '" href="' . $piwigo_url . 'tags.php' . '">' . __('Tags') . '</a></li>'; 
     95        echo '<li><a title="' . __('Tags','pwg') . '" href="' . $piwigo_url . 'tags.php' . '">' . __('Tags','pwg') . '</a></li>'; 
    9696 
    9797if ($comments == 'true')  
    98         echo '<li><a title="' . __('Comments') . '" href="' . $piwigo_url . 'comments.php' . '">' . __('Comments') . '</a></li>'; 
     98        echo '<li><a title="' . __('Comments','pwg') . '" href="' . $piwigo_url . 'comments.php' . '">' . __('Comments','pwg') . '</a></li>'; 
    9999 
    100100 
  • extensions/Public_Piwigo_WordPress_Widget/Public_WP_Piwigo_options.php

    r4055 r4073  
    3131 
    3232        // Options 
    33         echo '<p style="text-align:right;"><label for="' . $this->get_field_name('title') . '">' . __('Title')  
     33        echo '<p style="text-align:right;"><label for="' . $this->get_field_name('title') . '">' . __('Title','pwg')  
    3434        . ' <input style="width: 250px;" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') 
    3535        . '" type="text" value="' . $title . '" /></label></p>'; 
    3636        // Thumbnail 
    37         echo '<p style="text-align:right;"><label for="' . $this->get_field_name('thumbnail') . '">' . __('Get thumbnails')  
     37        echo '<p style="text-align:right;"><label for="' . $this->get_field_name('thumbnail') . '">' . __('Get thumbnails','pwg')  
    3838        . ' <input style="width: 50px;" id="' . $this->get_field_id('thumbnail') . '" name="' . $this->get_field_name('thumbnail') 
    3939        . '" type="checkbox" value="true" ' . $thumbnail . '/></label></p>'; 
    4040        // Piwigo directory 
    41         echo '<p style="text-align:right;"><label for="' . $this->get_field_name('piwigo') . '">' . __('<strong>Local</strong> directory (if local)')  
     41        echo '<p style="text-align:right;"><label for="' . $this->get_field_name('piwigo') . '">' . __('<strong>Local</strong> directory (if local)','pwg')  
    4242        . ' <input style="width: 200px;" id="' . $this->get_field_id('piwigo') . '" name="' . $this->get_field_name('piwigo') 
    4343        . '" type="text" value="' . $piwigo . '" /></label></p>'; 
    4444        // External website 
    45         echo '<p style="text-align:right;"><label for="' . $this->get_field_name('external') . '">' . __('(or) <strong>External</strong> gallery URL')  
     45        echo '<p style="text-align:right;"><label for="' . $this->get_field_name('external') . '">' . __('(or) <strong>External</strong> gallery URL','pwg')  
    4646        . ' <input style="width: 250px;" id="' . $this->get_field_id('external') . '" name="' . $this->get_field_name('external') 
    4747        . '" type="text" value="' . $external . '" /></label></p>'; 
    4848        // number of pictures 
    49         echo '<p style="text-align:right;"><label for="' . $this->get_field_name('number') . '">' . __('Number of pictures (0=none)')  
     49        echo '<p style="text-align:right;"><label for="' . $this->get_field_name('number') . '">' . __('Number of pictures (0=none)','pwg')  
    5050        . ' <input style="width: 30px;" id="' . $this->get_field_id('number') . '" name="' . $this->get_field_name('number') 
    5151        . '" type="text" value="' . $number . '" /></label></p>'; 
    5252        // Optional parameters 
    53         echo '<h5>' . __('Optional parameters') . '</h5>'; 
     53        echo '<h5>' . __('Optional parameters','pwg') . '</h5>'; 
    5454        // Selected category 
    55         echo '<p style="text-align:right; font-size:8px; margin:0;"><label for="' . $this->get_field_name('category') . '">' . __('Category id (0=all)')  
     55        echo '<p style="text-align:right; font-size:8px; margin:0;"><label for="' . $this->get_field_name('category') . '">' . __('Category id (0=all)','pwg')  
    5656        . ' <input style="width: 30px;" id="' . $this->get_field_id('category') . '" name="' . $this->get_field_name('category') 
    5757        . '" type="text" value="' . $category . '" /></label></p>'; 
    5858        // from 
    59         echo '<p style="text-align:right; font-size:8px; margin:0;"><label for="' . $this->get_field_name('from') . '">' . __('Since X months (0=all)')  
     59        echo '<p style="text-align:right; font-size:8px; margin:0;"><label for="' . $this->get_field_name('from') . '">' . __('Since X months (0=all)','pwg')  
    6060        . ' <input style="width: 30px;" id="' . $this->get_field_id('from') . '" name="' . $this->get_field_name('from') 
    6161        . '" type="text" value="' . $from . '" /></label></p>'; 
    6262        // divclass 
    63         echo '<p style="text-align:right; font-size:8px; margin:0;"><label for="' . $this->get_field_name('divclass') . '">' . __('CSS DIV class')  
     63        echo '<p style="text-align:right; font-size:8px; margin:0;"><label for="' . $this->get_field_name('divclass') . '">' . __('CSS DIV class','pwg')  
    6464        . ' <input style="width: 200px;" id="' . $this->get_field_id('divclass') . '" name="' . $this->get_field_name('divclass') 
    6565        . '" type="text" value="' . $divclass . '" /></label></p>'; 
    6666        // class 
    67         echo '<p style="text-align:right; font-size:8px; margin:0;"><label for="' . $this->get_field_name('class') . '">' . __('CSS IMG class')  
     67        echo '<p style="text-align:right; font-size:8px; margin:0;"><label for="' . $this->get_field_name('class') . '">' . __('CSS IMG class','pwg')  
    6868        . ' <input style="width: 200px;" id="' . $this->get_field_id('class') . '" name="' . $this->get_field_name('class') 
    6969        . '" type="text" value="' . $class . '" /></label></p>'; 
    7070 
    7171        // The categories menu 
    72         echo '<table><tr><td style="text-align:right; font-size:8px;" colspan="2"><label for="' . $this->get_field_name('mbcategories') . '">' . __('Categories menu')  
     72        echo '<table><tr><td style="text-align:right; font-size:8px;" colspan="2"><label for="' . $this->get_field_name('mbcategories') . '">' . __('Categories menu','pwg')  
    7373        . ' <input style="width: 50px;" id="' . $this->get_field_id('mbcategories') . '" name="' . $this->get_field_name('mbcategories') 
    7474        . '" type="checkbox" value="true" ' . $mbcategories . '/></label></td>'; 
    7575        // The most visited 
    76         echo '</tr><tr><td style="text-align:right; font-size:8px;"><label for="' . $this->get_field_name('most_visited') . '">' . __('Most visited')  
     76        echo '</tr><tr><td style="text-align:right; font-size:8px;"><label for="' . $this->get_field_name('most_visited') . '">' . __('Most visited','pwg')  
    7777        . ' <input style="width: 50px;" id="' . $this->get_field_id('most_visited') . '" name="' . $this->get_field_name('most_visited') 
    7878        . '" type="checkbox" value="true" ' . $most_visited . '/></label></td>'; 
    7979        // The best rated 
    80         echo '<td style="text-align:right; font-size:8px;"><label for="' . $this->get_field_name('best_rated') . '">' . __('Best rated')  
     80        echo '<td style="text-align:right; font-size:8px;"><label for="' . $this->get_field_name('best_rated') . '">' . __('Best rated','pwg')  
    8181        . ' <input style="width: 50px;" id="' . $this->get_field_id('best_rated') . '" name="' . $this->get_field_name('best_rated') 
    8282        . '" type="checkbox" value="true" ' . $best_rated . '/></label></td>'; 
    8383        // The most commented 
    84         echo '</tr><tr><td style="text-align:right; font-size:8px;"><label for="' . $this->get_field_name('most_commented') . '">' . __('Most commented')  
     84        echo '</tr><tr><td style="text-align:right; font-size:8px;"><label for="' . $this->get_field_name('most_commented') . '">' . __('Most commented','pwg')  
    8585        . ' <input style="width: 50px;" id="' . $this->get_field_id('most_commented') . '" name="' . $this->get_field_name('most_commented') 
    8686        . '" type="checkbox" value="true" ' . $most_commented . '/></label></td>'; 
    8787        // The random link 
    88         echo '<td style="text-align:right; font-size:8px;"><label for="' . $this->get_field_name('random') . '">' . __('Random')  
     88        echo '<td style="text-align:right; font-size:8px;"><label for="' . $this->get_field_name('random') . '">' . __('Random','pwg')  
    8989        . ' <input style="width: 50px;" id="' . $this->get_field_id('random') . '" name="' . $this->get_field_name('random') 
    9090        . '" type="checkbox" value="true" ' . $random . '/></label></td>'; 
    9191        // The recent pics 
    92         echo '</tr><tr><td style="text-align:right; font-size:8px;"><label for="' . $this->get_field_name('recent_pics') . '">' . __('Recent pics')  
     92        echo '</tr><tr><td style="text-align:right; font-size:8px;"><label for="' . $this->get_field_name('recent_pics') . '">' . __('Recent pics','pwg')  
    9393        . ' <input style="width: 50px;" id="' . $this->get_field_id('recent_pics') . '" name="' . $this->get_field_name('recent_pics') 
    9494        . '" type="checkbox" value="true" ' . $recent_pics . '/></label></td>'; 
    9595        // The calendar 
    96         echo '<td style="text-align:right; font-size:8px;"><label for="' . $this->get_field_name('calendar') . '">' . __('Calendar')  
    97         . ' <input style="width: 50px;" id="' . $this->get_field_id('calendar') . '" name="' . $this->get_field_name('calendar') 
     96        echo '<td style="text-align:right; font-size:8px;"><label for="' . $this->get_field_name('calendar') . '">' . __('Calendar','pwg')  
     97        . ' <input style="width: 50px;" id="' . $this->get_field_id('calendar') . '" name="' . $this->get_field_name('calendar','pwg') 
    9898        . '" type="checkbox" value="true" ' . $calendar . '/></label></td>'; 
    9999        // The random 
    100         echo '</tr><tr><td style="text-align:right; font-size:8px;"><label for="' . $this->get_field_name('tags') . '">' . __('Tags')  
     100        echo '</tr><tr><td style="text-align:right; font-size:8px;"><label for="' . $this->get_field_name('tags') . '">' . __('Tags','pwg')  
    101101        . ' <input style="width: 50px;" id="' . $this->get_field_id('tags') . '" name="' . $this->get_field_name('tags') 
    102102        . '" type="checkbox" value="true" ' . $random . '/></label></td>'; 
    103103        // The tags 
    104         echo '<td style="text-align:right; font-size:8px;"><label for="' . $this->get_field_name('comments') . '">' . __('Comments')  
    105         . ' <input style="width: 50px;" id="' . $this->get_field_id('comments') . '" name="' . $this->get_field_name('comments') 
     104        echo '<td style="text-align:right; font-size:8px;"><label for="' . $this->get_field_name('comments') . '">' . __('Comments','pwg')  
     105        . ' <input style="width: 50px;" id="' . $this->get_field_id('comments') . '" name="' . $this->get_field_name('comments','pwg') 
    106106        . '" type="checkbox" value="true" ' . $tags . '/></label></td></tr></table>'; 
    107107 
Note: See TracChangeset for help on using the changeset viewer.