Plugin Directory

Changeset 326302


Ignore:
Timestamp:
12/27/2010 09:58:06 AM (15 years ago)
Author:
mindvex
Message:
 
Location:
picasaview/branches/refactoring-1
Files:
30 copied

Legend:

Unmodified
Added
Removed
  • picasaview/branches/refactoring-1/picasaview.php

    r277948 r326302  
    473473    }
    474474   
    475 private function fetchDataFromPicasaweb($uri, $tagOptions) {
     475    private function fetchDataFromPicasaweb($uri, $tagOptions) {
    476476
    477477    $error = '';
     
    513513       
    514514        // check, if fsockopen is able to connect - we will use google for that check
    515         $fsockopenWorks = @fsockopen('www.google.com', 80, $errnovnc, $errstrvnc, 5);       
    516        
    517         ?><div class="wrap"><h2><?php _e('PicasaView Options','picasaView'); ?></h2>
    518        
    519         <form method="post" action="<?php echo $this->optionsPage ?>&amp;updated=true">
    520             <?php
    521                 // Use nonce for verification
    522                 echo '<input type="hidden" name="picasaView_check" id="picasaView_check" value="' . wp_create_nonce( plugin_basename(__FILE__) ) . '" />';
    523             ?>
    524            
    525             <h3><?php _e('Connection settings', 'picasaView') ?></h3>
    526             <?php if (version_compare(PHP_VERSION, '5.0.0', '<')) {
    527                 echo '<p style="color:red">' . __('Bad news: You need PHP5 to run this plugin, sorry. You have installed PHP ', 'picasaView') . PHP_VERSION . '</p>';
    528             } elseif(!function_exists('simplexml_load_string')) {
    529                 echo '<p style="color:red">' . __('Bad news: the required PHP extension <code>SimpleXML</code> (which is usually enabled by default) on your server is not available. Blame your provider. Sorry.','picasaView') . '</p>';
    530             } ?>
    531             <table class="form-table">
    532                 <tbody>
    533                     <tr valign="top">
    534                         <th scope="row"><?php _e('Server-URL','picasaView'); ?>:</th>
    535                         <td><input name="picasaView_server" type="text" id="picasaView_server" value="<?php echo htmlspecialchars($this->options['server'], ENT_QUOTES); ?>" size="50" /></td>
    536                     </tr>
    537                     <tr valign="top">
    538                         <th scope="row"><?php _e('User Id','picasaView'); ?>:</th>
    539                         <td><input name="picasaView_userId" type="text" id="picasaView_userId" value="<?php echo htmlspecialchars($this->options['userid'], ENT_QUOTES); ?>" size="50" />
    540                         </td>
    541                     </tr>
    542                     <tr valign="top">
    543                         <th scope="row"><?php _e('Debug output','picasaView'); ?>:</th>
    544                         <td>
    545                             <p><label><input name="picasaView_showDebugOutput" type="checkbox" value="1" <?php if($this->options['showdebugoutput']) echo 'checked="checked"' ?>><?php _e("Print url and the returned data from picasaweb when a connection failure occured",'picasaView'); ?></label></p>
    546                         </td>
    547                     </tr>   
    548                 </tbody>
    549             </table>
    550 
    551             <h3><?php _e('Display settings', 'picasaView') ?></h3>
    552             <table class="form-table">
    553                 <tbody>
    554                     <tr valign="top">
    555                         <th scope="row"><?php _e('Date/Time format','picasaView'); ?>:</th>
    556                         <td><input name="picasaView_datetimeformat" type="text" id="picasaView_datetimeformat" value="<?php echo $this->options['datetimeformat'] ?>" size="50" maxlength="50" />
    557                         <p class="setting-description"><?php _e("Date format that is used when displaying date information. For all allowed format please see the <a href=\"http://php.net/manual/en/function.strftime.php\">php strftime-documentation</a>.",'picasaView'); ?></p>
    558                         </td>
    559                     </tr>
    560                     <tr valign="top">
    561                         <th scope="row"><?php _e('Thumbnail size','picasaView'); ?>:</th>
    562                         <td>
    563                     <select name="picasaView_thumbnailSize" id="picasaView_thumbnailSize">
    564                     <?php
    565                     foreach ($this->thumbnailSizes as $size) {
    566                     ?>
    567                         <option <?php if ($this->options['thumbnailsize'] == $size) { echo 'selected'; } ?> value="<?php echo attribute_escape($size); ?>"><?php echo $size; ?>px</option>
    568                     <?php } ?>
    569                     </select>
    570                     <p><label><input name="picasaView_cropThumbnails" id="picasaView_cropThumbnails" type="checkbox" value="1" <?php if($this->options['cropthumbnails']) echo 'checked="checked"' ?>><?php _e("Crop thumbnails (only available for thumbnails smaller than 200px)",'picasaView'); ?></label></p>
    571                     </td>
    572                     </tr>
    573                     <tr valign="top">
    574                         <th scope="row"><?php _e('Full image size','picasaView'); ?>:</th>
    575                         <td>
    576                     <select name="picasaView_imageSize">
    577                     <?php foreach ($this->imageSizes as $size) { ?>
    578                         <option <?php if ($this->options['imagesize'] == $size) { echo 'selected'; } ?> value="<?php echo attribute_escape($size); ?>"><?php echo $size; ?>px</option>
    579                     <?php } ?>
    580                     </select>
    581                     <p class="setting-description"><?php _e("1024 and above will *not* work right now due to restrictions on picasaweb (blame Google for this).",'picasaView'); ?></p>
    582                     </td>
    583                     </tr>
    584                     <tr valign="top">
    585                         <th scope="row"><?php _e('Images per page','picasaView'); ?>:</th>
    586                         <td><input name="picasaView_imagesPerPage" type="text" id="picasaView_imagesPerPage" value="<?php echo $this->options['imagesperpage'] ?>" size="5" maxlength="3" />
    587                         <p class="setting-description"><?php _e("insert <code>0</code> to disable paging and show all images on the same page",'picasaView'); ?></p>
    588                         </td>
    589                     </tr>
    590                     <tr valign="top">
    591                         <th scope="row"><?php _e('Quick paging','picasaView'); ?>:</th>
    592                         <td>
    593                             <p><label><input name="picasaView_quickPaging" type="checkbox" value="1" <?php if($this->options['quickpaging']) echo 'checked="checked"' ?>><?php _e("use JavaScript for paging (a lot faster and more beautiful when flipping through your image pages)",'picasaView'); ?></label></p>
    594                         </td>
    595                     </tr>
    596 
    597                 </tbody>
    598             </table>
    599 
    600         <p class="submit">
    601             <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
    602         </p>
    603    
    604    
    605    
    606         </form>
    607         </div>     
    608        
    609         <?
     515        $fsockopenWorks = @fsockopen('www.google.com', 80, $errnovnc, $errstrvnc, 5);
     516
     517        include dirname(__FILE__) . '/admintemplates/admin-menu-options.phtml';
    610518    }
    611519   
     
    640548
    641549$picasaView = new picasaView();
     550
     551
     552
  • picasaview/branches/refactoring-1/readme.txt

    r277948 r326302  
    5353
    5454* `album`: the name of the album you'd like to view
    55 * `instantView`: if set to "yes", the album images are shown directly in the post. Can only in combination with `album`
     55* `instantview`: if set to "yes", the album images are shown directly in the post. Can only in combination with `album`
    5656* `authkey`: authentication key (as specified by picasaweb) for displaying private albums. Works only in combination with `album`
    57 * `userId`: the user-Id from picasaweb
     57* `userid`: the user-Id from picasaweb
    5858* `server`: the URL of the picasaView server
    59 * `thumbnailSize`: the size of the thumbnails. May be one of the following values: `32, 48, 64, 72, 144, 160, 200, 288, 320, 400, 512, 576, 640, 720, 800`
    60 * `imageSize`: the size of the full images. May be one of the following values: `200, 288, 320, 400, 512, 576, 640, 720, 800, 1024, 1152, 1280, 1440, 1600` (note: 1024 and above will currently not work due to limitations of the picasaweb-service)
    61 * `imagesPerPage`: how many images should be shown at one page. If the album contains more images than this setting, paging is enabled
    62 * `cropThumbnails`: if set to `yes`, the thumbnails will be cropped, if `no`, they won't (note: only works with a thumbnail size smaller than 200)
    63 * `showDebugOutput`: shows more information on what went wrong (if an error occured).
    64 * `rssLookupType`: overrides the default lookupType. May be set to one of the following values: `curl, socket, file_get_contents`
     59* `thumbnailsize`: the size of the thumbnails. May be one of the following values: `32, 48, 64, 72, 144, 160, 200, 288, 320, 400, 512, 576, 640, 720, 800`
     60* `imagesize`: the size of the full images. May be one of the following values: `200, 288, 320, 400, 512, 576, 640, 720, 800, 1024, 1152, 1280, 1440, 1600` (note: 1024 and above will currently not work due to limitations of the picasaweb-service)
     61* `imagesperpage`: how many images should be shown at one page. If the album contains more images than this setting, paging is enabled
     62* `cropthumbnails`: if set to `yes`, the thumbnails will be cropped, if `no`, they won't (note: only works with a thumbnail size smaller than 200)
     63* `showdebugoutput`: shows more information on what went wrong (if an error occured).
     64
    6565
    6666A combination could be `[picasaView user="USERNAME" imagesPerPage='6' cropThumbnails='yes']`.
     
    155155Changes in this version:
    156156
    157 ADD: Arabic translation (thanks to www.r-sn.com)
    158 ADD: It's now possible to specify an authkey to display non-public albums (this only works when showing an album directly)
    159 
    160157 == To Do ==
    161158
     159 * There is a serious problem with the Javascript view, in that the fall-back behaviour isn't correct. This is important because Search Engines don't use Javascript.
     160
     161The problem is that the Previous and Next URL is always generated, even when there is no previous or next content. This results in an infinitely deep link scheme. (You can always continue to press next of previous, ad infinum) Search Engines DON'T like this (especially if you don't have a canonical URL, because you are basically creating infinite copies of your content)
     162    * pagination on album overview
    162163 * add link to the original album on picasaweb
    163164 * anchor link to the detail view of an album
Note: See TracChangeset for help on using the changeset viewer.