Plugin Directory

Changeset 409240


Ignore:
Timestamp:
07/13/2011 01:44:36 PM (14 years ago)
Author:
parelius
Message:

Version 1.0.1

Location:
ssp-director-tools/trunk
Files:
35 edited

Legend:

Unmodified
Added
Removed
  • ssp-director-tools/trunk/css/sspdt-admin.css

    r409223 r409240  
    11td.thcol {
    2     font-size : 13px;
    3 
     2    font-size: 13px;
    43}
    54
    65.sspdt_handling_icon {
    7     vertical-align : middle;
    8     padding-right : 6px;
     6    vertical-align: middle;
     7    padding-right: 6px;
    98}
    109
    1110.sspdt_thumb {
    12     text-align : left;
     11    text-align: left;
    1312}
    1413
    1514p.wp-caption-text {
    16     margin-bottom : 0px !important;
     15    margin-bottom: 0px !important;
    1716}
    18 
  • ssp-director-tools/trunk/css/sspdt.css

    r409223 r409240  
    11div.sspdt_feedlink {
    2     vertical-align:middle;
    3     margin-top:10px
     2    vertical-align: middle;
     3    margin-top: 10px
    44}
    55
    66div.sspdt_feedlink img {
    7     margin-right:6px;
    8     vertical-align:middle;
    9     border-style:none;
     7    margin-right: 6px;
     8    vertical-align: middle;
     9    border-style: none;
    1010}
    1111
    1212div.sspdt_feedlink a {
    13     vertical-align:middle;
     13    vertical-align: middle;
    1414}
    1515
    1616.sspdt_grid {
    17     border-style:none !important;
     17    border-style: none !important;
    1818}
    1919
    2020.sspdt_thumb {
    21     border-style:none !important;
     21    border-style: none !important;
    2222}
  • ssp-director-tools/trunk/feed/feed.php

    r409223 r409240  
    44require_once 'includes/PhotoFeed.php';
    55require_once 'includes/config.php';
     6include_once 'includes/Testing.php';
    67
    78
     
    1314 * @return array
    1415 */
    15 function doubleExplode ($del1, $del2, $array){ 
    16    
    17     $array1 = explode("$del1", $array);
    18     foreach($array1 as $key=>$value){ 
    19        
    20         $array2 = explode("$del2", $value); 
    21         foreach($array2 as $key2=>$value2){ 
    22             $array3[] = $value2; 
    23         } 
    24     } 
    25     $afinal = array();
    26    
    27     for ( $i = 0; $i <= count($array3); $i += 2) { 
    28         if($array3[$i]!=""){
    29         $afinal[trim($array3[$i])] = trim($array3[$i+1]);
    30         }
    31     } 
    32    
    33     return $afinal; 
     16function doubleExplode ($del1, $del2, $array){
     17
     18    $array1 = explode("$del1", $array);
     19    foreach($array1 as $key=>$value){
     20
     21        $array2 = explode("$del2", $value);
     22        foreach($array2 as $key2=>$value2){
     23            $array3[] = $value2;
     24        }
     25    }
     26    $afinal = array();
     27
     28    for ( $i = 0; $i <= count($array3); $i += 2) {
     29        if($array3[$i]!=""){
     30            $afinal[trim($array3[$i])] = trim($array3[$i+1]);
     31        }
     32    }
     33
     34    return $afinal;
    3435}
    3536
     
    3839$decrypted_options = $crypt->decode($_GET['p']);
    3940
    40 if(md5($decrypted_options) != $_GET['c']) die('So nicht!');
     41if(md5($decrypted_options) != $_GET['c']) die('Incorrect feed parameters.');
    4142
    4243$options = doubleExplode('&', '=', $decrypted_options);
     
    4445$feed->rss($options);
    4546
     47
    4648?>
  • ssp-director-tools/trunk/feed/includes/Encryption.php

    r409223 r409240  
    22
    33class Encryption {
    4    
     4
    55    var $skey;
    6    
     6
    77    public function __construct($secret){
    88        $this->skey = $secret;
    99    }
    10  
    11     public  function safe_b64encode($string) {
    12  
    13         $data = base64_encode($string);
    14         $data = str_replace(array('+','/','='),array('-','_',''),$data);
    15         return $data;
    16     }
    17  
     10
     11    public  function safe_b64encode($string) {
     12
     13        $data = base64_encode($string);
     14        $data = str_replace(array('+','/','='),array('-','_',''),$data);
     15        return $data;
     16    }
     17
    1818    public function safe_b64decode($string) {
    19         $data = str_replace(array('-','_'),array('+','/'),$string);
    20         $mod4 = strlen($data) % 4;
    21         if ($mod4) {
    22             $data .= substr('====', $mod4);
    23         }
    24         return base64_decode($data);
    25     }
    26  
    27     public  function encode($value){
    28  
    29         if(!$value){return false;}
    30         $text = $value;
    31         $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
    32         $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
    33         $crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->skey, $text, MCRYPT_MODE_ECB, $iv);
    34         return trim($this->safe_b64encode($crypttext));
    35     }
    36  
    37     public function decode($value){
    38  
    39         if(!$value){return false;}
    40         $crypttext = $this->safe_b64decode($value);
    41         $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
    42         $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
    43         $decrypttext = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->skey, $crypttext, MCRYPT_MODE_ECB, $iv);
    44         return trim($decrypttext);
    45     }
     19        $data = str_replace(array('-','_'),array('+','/'),$string);
     20        $mod4 = strlen($data) % 4;
     21        if ($mod4) {
     22            $data .= substr('====', $mod4);
     23        }
     24        return base64_decode($data);
     25    }
     26
     27    public  function encode($value){
     28
     29        if(!$value){return false;}
     30        $text = $value;
     31        $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
     32        $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
     33        $crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->skey, $text, MCRYPT_MODE_ECB, $iv);
     34        return trim($this->safe_b64encode($crypttext));
     35    }
     36
     37    public function decode($value){
     38
     39        if(!$value){return false;}
     40        $crypttext = $this->safe_b64decode($value);
     41        $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
     42        $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
     43        $decrypttext = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->skey, $crypttext, MCRYPT_MODE_ECB, $iv);
     44        return trim($decrypttext);
     45    }
    4646}
    4747
  • ssp-director-tools/trunk/feed/includes/PhotoFeed.php

    r409223 r409240  
    55
    66class PhotoFeed extends Director {
    7    
     7
    88    public $formats;
    99    public $api_path;
    10    
     10
    1111    public function __construct($key, $path, $preview, $full) {
    1212        parent::__construct ( $key, $path , true );
    1313        $this->add_formats($preview, $full);
    14         $this->api_path = $path;   
     14        $this->api_path = $path;
     15        $this->cache->set('sspdt');
    1516    }
    16    
    17    
     17
     18
    1819    private function add_formats($preview, $full) {
    1920           
     
    2526
    2627    }
    27    
     28
    2829    public function rss($opts) {
    29        
     30
    3031        if(!isset($opts)) return;
    31        
     32
    3233        $options = array();
    33        
     34
    3435        $options['only_images'] = '1';
    35        
     36
    3637        if($opts['model'] == "gallery" || $opts['model'] == "album") {
    3738            $scope = array ($opts['model'], (int) $opts['model_id']);
    3839            $options['scope'] = $scope;
    3940        }
    40        
     41
    4142        if((int) $opts['limit'] > 0) {
    4243            $options['limit'] = $opts['limit'];
    4344        }
    44        
     45
    4546        if($opts['tags'] != "") {
    4647            $options['tags'] = array($opts['tags'], $opts['tagmode']);
    4748        }
    48        
     49
    4950        if($opts['sort_on'] != "null") {
    5051            $options['sort_on'] = $opts['sort_on'];
    5152            $options['sort_direction'] = $opts['sort_direction'];
    5253        }
    53    
     54
    5455        if($opts['sort_on' == "random"]) {
    5556            return;
    5657        }
    57        
     58
    5859        //$this->debug($options);
    59        
     60
    6061        $contents = $this->content->all($options);
    61        
     62
    6263        if($opts['model'] == 'gallery') {
    6364            $bulk = $this->gallery->get($opts['model_id']);
     
    7071        $modified = date('r', (int) $bulk->modified );
    7172        $protocol = $_SERVER['HTTPS'] != "" ? 'https://' : 'http://';
    72        
     73
    7374        header('Content-type: application/rss+xml');
    74        
     75
    7576        print("<?xml version='1.0' encoding='UTF-8' ?>\n");
    76         print("<rss version='2.0' 
     77        print("<rss version='2.0'
    7778        xmlns:dc='http://purl.org/dc/elements/1.1/'
    7879        xmlns:media='http://search.yahoo.com/mrss/'
     
    8788        printf("        <generator>%s</generator>\n", "SSP Director Tools – WordPress Plugin");
    8889        printf("        <atom:link href='%s' rel='self' type='application/rss+xml' />\n", $protocol . urlencode( $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ));
    89        
     90
    9091        foreach ($contents as $content){
    91            
     92               
    9293            $description = "<img src='".$content->preview->url."' /><p>". ( $content->caption ? $this->prep($content->caption) : $this->prep($content->iptc->caption) ) ."</p>";
    9394            $url = $content->full->url;
    9495            $filesize = $content->filesize;
    9596            $guid = 'http://' . $this->api_path . '/content/' . $content->id;
    96            
     97               
    9798            printf("        <item>\n");
    9899            printf("            <title>%s</title>\n", $content->title ? ($content->title) : $content->src);
     
    112113            printf("            <dc:date.Taken>%s</dc:date.Taken>\n", date('c', (int) $content->captured_on));
    113114            printf("        </item>\n");
    114            
     115               
    115116        }
    116        
     117
    117118        print(" </channel>\n");
    118119        print("</rss>\n");
    119120    }
    120    
     121
    121122    private function prep($string) {
    122123        return  ( htmlspecialchars( $string, ENT_QUOTES, 'UTF-8', false ) );
    123124    }
    124    
     125
    125126    private function debug( $var ) {
    126127        echo "<pre>";
     
    128129        echo "</pre>";
    129130    }
    130    
     131
    131132}
    132133
  • ssp-director-tools/trunk/feed/includes/api/Album.php

    r409223 r409240  
    66        return $this->parent->send('get_album', $options);
    77    }
    8    
     8
    99    public function all($options = array()) {
    1010        $response = $this->parent->send('get_album_list', $options);
    1111        return $response->albums;
    1212    }
    13    
     13
    1414    public function galleries($album_id, $options = array()) {
    1515        if (isset($options['exclude']) && is_array($options['exclude'])) {
  • ssp-director-tools/trunk/feed/includes/api/App.php

    r409223 r409240  
    66        return $response->version;
    77    }
    8    
     8
    99    public function limits() {
    1010        $response = $this->parent->send('app_limits');
    1111        return $response;
    1212    }
    13    
     13
    1414    public function totals() {
    1515        $response = $this->parent->send('app_totals');
  • ssp-director-tools/trunk/feed/includes/api/Cache.php

    r409223 r409240  
    22
    33class DirectorCache extends DirectorWrapper {
    4    
     4
    55    function set($key, $expires = '+1 hour') {
    66        $this->parent->cache_key = $key;
    77        $this->parent->expires = $expires;
    88    }
    9    
     9
    1010    function disable() {
    1111        $this->parent->cache = false;
    1212    }
    13    
     13
    1414    function get($tail = '') {
    1515        $filename = $this->parent->cache_path . $this->parent->cache_key . DIRECTORY_SEPARATOR . $tail;
     
    2929        }
    3030    }
    31    
     31
    3232    function fill($data, $tail) {
    3333        $filename = $this->parent->cache_path . $this->parent->cache_key . DIRECTORY_SEPARATOR . $tail;
  • ssp-director-tools/trunk/feed/includes/api/Content.php

    r409223 r409240  
    77        return $response;
    88    }
    9    
     9
    1010    public function all($options = array()) {
    1111        if (isset($options['scope']) && !empty($options['scope'])) {
  • ssp-director-tools/trunk/feed/includes/api/DirectorPHP.php

    r409223 r409240  
    44 * DirectorPHP API class
    55 * Version 1.5
    6 */
     6 */
    77
    88class Director {
    9    
     9
    1010    # Fill in your API key here. It can be found on your Director preferences pane,
    1111    # under the "About your install" section.
    1212    public $api_key = '';
    13    
     13
    1414    # Path to your Director install
    15     # This can also be found on your preferences pane, below the API key       
     15    # This can also be found on your preferences pane, below the API key
    1616    public $path = '';
    17    
     17
    1818    ##
    1919    # DO NOT EDIT BEYOND THIS POINT
    2020    ##
    21    
     21
    2222    public $endpoint;
    2323    public $sizes = array();
     
    3535    public $cache_invalidator;
    3636    public $user_scope = array();
    37    
     37
    3838    function __construct($api_key = '', $path = '', $debug = true) {
    3939        $this->debug = $debug;
     
    4141            $this->handle_error('The DirectorPHP class requires the cURL library.');
    4242        }
    43        
     43
    4444        if (!function_exists('json_decode')) {
    4545            $this->handle_error('The DirectorPHP class requires the PHP 5.2.x or higher or the php-json PECL library.');
    4646        }
    47        
     47
    4848        if (!empty($api_key)) {
    4949            $this->api_key = $api_key;
    5050        }
    51        
     51
    5252        if (!empty($path)) {
    5353            $this->path = $path;
    5454        }
    55        
     55
    5656        $this->api_key = trim($this->api_key);
    5757        $this->path = str_replace('http://', '', rtrim($this->path, '/'));
    58        
     58
    5959        if (empty($this->api_key) || empty($this->path)) {
    6060            $this->handle_error('You must specify an API key and install path.');
    6161        }
    62        
     62
    6363        if (preg_match('/^(local|hosted)\-(.*)/', $this->api_key, $matches)) {
    6464            if ($matches[1] == 'local') {
     
    7373        if ($this->is_local) {
    7474            $this->endpoint .= '/index.php?';
    75         } 
     75        }
    7676        $this->endpoint .= '/api/';
    7777
     
    9292        $this->user = new DirectorUser($this);
    9393    }
    94    
     94
    9595    /********************************************************
    96        
    97         public functions
    98        
    99         Only methods in this class or a subclass of
    100         this class can call these methods.
    101    
     96
     97    public functions
     98
     99    Only methods in this class or a subclass of
     100    this class can call these methods.
     101
    102102    ********************************************************/
    103    
     103
    104104    protected function format_sizes() {
    105105        if (!empty($this->sizes)) {
     
    109109            }
    110110        }
    111        
     111
    112112        if (!empty($this->preview)) {
    113113            $temp_arr = array($this->preview['width'], $this->preview['height'], $this->preview['crop'], $this->preview['quality'], $this->preview['sharpening']);
     
    115115            $this->params[] = 'preview=' . $preview;
    116116        }
    117        
     117
    118118        if (!empty($this->user_sizes)) {
    119119            foreach($this->user_sizes as $key => $size) {
     
    123123        }
    124124    }
    125    
     125
    126126    public function send($method, $options = array()) {
    127127        if ($this->dead) {
     
    143143                }
    144144            }
    145            
     145               
    146146            $this->format_sizes();
    147            
     147               
    148148            $params_str = join('&', $this->params);
    149149            $this->params = array();
    150            
     150               
    151151            $tail = md5($params_str);
    152            
     152               
    153153            if ($this->cache && !empty($this->cache_key)) {
    154154                $cache = true;
     
    158158                $return = array();
    159159            }
    160            
     160               
    161161            if (empty($return)) {
    162162                if ($cache) {
    163163                    $params_str .= '&invalidator[path]=' . $this->cache_invalidator . '&invalidator[name]=' . $this->cache_key . '/' . $tail;
    164164                }
    165                 $ch = curl_init($this->endpoint . $method . '?' . $params_str); 
    166                
     165                $ch = curl_init($this->endpoint . $method . '?' . $params_str);
     166
    167167                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    168168                $return = trim(curl_exec($ch));
     
    179179            }
    180180
    181             $response = json_decode($return);   
     181            $response = json_decode($return);
    182182
    183183            if (!empty($response->error)) {
     
    190190        }
    191191    }
    192    
     192
    193193    function handle_error($msg) {
    194194        if ($this->debug) {
     
    198198        }
    199199    }
    200    
     200
    201201}
    202202
  • ssp-director-tools/trunk/feed/includes/api/Format.php

    r409223 r409240  
    55        $this->parent->sizes[] = $arr;
    66    }
    7    
     7
    88    public function user($arr) {
    99        $this->parent->user_sizes[] = $arr;
    1010    }
    11    
     11
    1212    public function preview($arr) {
    1313        $this->parent->preview = $arr;
    1414    }
    15    
     15
    1616    public function clear() {
    1717        $this->parent->preview = array();
    1818        $this->parent->sizes = array();
    19     }   
     19    }
    2020}
    2121
  • ssp-director-tools/trunk/feed/includes/api/Gallery.php

    r409223 r409240  
    77        return $response;
    88    }
    9    
     9
    1010    public function all($options = array()) {
    1111        $response = $this->parent->send('get_gallery_list', $options);
  • ssp-director-tools/trunk/feed/includes/api/User.php

    r409223 r409240  
    22
    33class DirectorUser extends DirectorWrapper {
    4    
     4
    55    function scope($options = array()) {
    66        $defaults = array('all' => false);
     
    1212        }
    1313    }
    14    
     14
    1515    function all($options = array()) {
    1616        if (!empty($this->parent->user_scope)) {
  • ssp-director-tools/trunk/feed/includes/api/Utils.php

    r409223 r409240  
    22
    33class DirectorUtils extends DirectorWrapper {
    4    
     4
    55    function is_video($fn) {
    66        if (eregi('\.flv|\.mov|\.mp4|\.m4a|\.m4v|\.3gp|\.3g2', $fn)) {
     
    1010        }
    1111    }
    12    
     12
    1313    function is_image($filename) {
    1414        if (!$this->is_video($filename)) {
     
    1818        }
    1919    }
    20    
     20
    2121    function is_mobile() {
    22          return preg_match('/(iPhone|iPad|Android 2)/',  $_SERVER['HTTP_USER_AGENT']);
     22        return preg_match('/(iPhone|iPad|Android 2)/',  $_SERVER['HTTP_USER_AGENT']);
    2323    }
    24    
     24
    2525    function truncate($string, $limit = 40, $tail = '...') {
    2626        if (strlen($string) > $limit) {
     
    2929        return $string;
    3030    }
    31    
     31
    3232    public function convert_line_breaks($string, $br = true) {
    3333        $string = preg_replace("/(\r\n|\n|\r)/", "\n", $string);
  • ssp-director-tools/trunk/includes/Encryption.php

    r409223 r409240  
    22
    33class Encryption {
    4    
     4
    55    var $skey;
    6    
     6
    77    public function __construct($secret){
    88        $this->skey = $secret;
    99    }
    10  
    11     public  function safe_b64encode($string) {
    12  
    13         $data = base64_encode($string);
    14         $data = str_replace(array('+','/','='),array('-','_',''),$data);
    15         return $data;
    16     }
    17  
     10
     11    public  function safe_b64encode($string) {
     12
     13        $data = base64_encode($string);
     14        $data = str_replace(array('+','/','='),array('-','_',''),$data);
     15        return $data;
     16    }
     17
    1818    public function safe_b64decode($string) {
    19         $data = str_replace(array('-','_'),array('+','/'),$string);
    20         $mod4 = strlen($data) % 4;
    21         if ($mod4) {
    22             $data .= substr('====', $mod4);
    23         }
    24         return base64_decode($data);
    25     }
    26  
    27     public  function encode($value){
    28  
    29         if(!$value){return false;}
    30         $text = $value;
    31         $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
    32         $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
    33         $crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->skey, $text, MCRYPT_MODE_ECB, $iv);
    34         return trim($this->safe_b64encode($crypttext));
    35     }
    36  
    37     public function decode($value){
    38  
    39         if(!$value){return false;}
    40         $crypttext = $this->safe_b64decode($value);
    41         $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
    42         $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
    43         $decrypttext = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->skey, $crypttext, MCRYPT_MODE_ECB, $iv);
    44         return trim($decrypttext);
    45     }
     19        $data = str_replace(array('-','_'),array('+','/'),$string);
     20        $mod4 = strlen($data) % 4;
     21        if ($mod4) {
     22            $data .= substr('====', $mod4);
     23        }
     24        return base64_decode($data);
     25    }
     26
     27    public  function encode($value){
     28
     29        if(!$value){return false;}
     30        $text = $value;
     31        $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
     32        $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
     33        $crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this->skey, $text, MCRYPT_MODE_ECB, $iv);
     34        return trim($this->safe_b64encode($crypttext));
     35    }
     36
     37    public function decode($value){
     38
     39        if(!$value){return false;}
     40        $crypttext = $this->safe_b64decode($value);
     41        $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
     42        $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
     43        $decrypttext = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->skey, $crypttext, MCRYPT_MODE_ECB, $iv);
     44        return trim($decrypttext);
     45    }
    4646}
    4747
  • ssp-director-tools/trunk/includes/SSPDT.php

    r409223 r409240  
    55/**
    66 * Class handles API calls to Director Server. Subclasses Director class.
    7  * @author Matthias Scheidl <matthias@scheidl.name>
     7 * @author Matthias Scheidl <dev@scheidl.name>
    88 *
    99 */
    1010class SSPDT extends Director{
    11    
     11
    1212    private $format_options;
    1313    public $formats;
    14    
    15    
    16     public function __construct( $api_key = '', $path = '', $debug = true, $format_options ) {
    17        
     14
     15
     16    public function __construct( $api_key = '', $path = '', $debug = false, $format_options ) {
     17
    1818        parent::__construct ( $api_key, $path, $debug );
    1919        $this->format_options = $format_options;
    20         $this->add_formats($format_options);       
     20        $this->add_formats($format_options);
    2121       
    2222    }
    23    
    24    
     23
     24
    2525    /**
    2626     * Adds the needes formats as defined on the plugin options page.
     
    2828     * @return void
    2929     */
    30     private function add_formats($format_options) { 
    31        
    32          $grid = array(
     30    private function add_formats($format_options) {
     31
     32        $grid = array(
    3333             'name' => 'grid',
    3434             'width' => $format_options['grid_width'],
     
    3737             'quality' => $format_options['grid_quality'],
    3838             'sharpening' => ($format_options['grid_sharpen'] == '1' ? 1 : 0)
    39           );
    40          
    41           $thumb = array(
     39        );
     40
     41        $thumb = array(
    4242             'name' => 'thumb',
    4343             'width' => $format_options['thumb_width'],
     
    4646             'quality' => $format_options['thumb_quality'],
    4747             'sharpening' => ($format_options['thumb_sharpen'] == '1' ? 1 : 0)
    48           );
    49        
    50           $large = array(
     48        );
     49
     50        $large = array(
    5151             'name' => 'large',
    5252             'width' => $format_options['large_width'],
     
    5555             'quality' => $format_options['large_quality'],
    5656             'sharpening' => ($format_options['large_sharpen'] == '1' ? 1 : 0)
    57           );
    58    
     57        );
     58
    5959        $this->format->add($grid);
    6060        $this->format->add($thumb);
    6161        $this->format->add($large);
    62        
     62
    6363        // Make our formats accessible more easily
    6464        $this->formats['grid'] = $grid;
    6565        $this->formats['thumb'] = $thumb;
    6666        $this->formats['large'] = $large;
    67        
    68        
    69     }
    70    
     67
     68
     69    }
     70
    7171    /**
    7272     * Creates a grid of photos
     
    7777     */
    7878    public function photogrid($content_options, $context) {
    79        
     79
    8080        $options = array();
    8181        $params= "";
    82        
     82
    8383        //show images, only
    8484        $options['only_images'] = '1';
    8585        $params .= "&only_images=1";
    86    
     86
    8787        if($content_options['model'] == "gallery" || $content_options['model'] == "album") {
    8888            $scope = array ($content_options['model'], (int) $content_options['model_id']);
     
    9191            $params .= "&model_id=" . $content_options['model_id'];
    9292        }
    93        
     93
    9494        if((int) $content_options['limit'] > 0) {
    9595            $options['limit'] = $content_options['limit'];
    9696            $params .= "&limit=" . $content_options['limit'];
    9797        }
    98        
     98
    9999        if($content_options['tags'] != "") {
    100100            $options['tags'] = array($content_options['tags'], $content_options['tagmode']);
     
    102102            $params .= "&tagmode=" . $content_options['tagmode'];
    103103        }
    104        
     104
    105105        if($content_options['sort_on'] != "null") {
    106106            $options['sort_on'] = $content_options['sort_on'];
     
    109109            $params .= "&sort_direction=" . $content_options['sort_direction'];
    110110        }
    111    
     111
    112112        if($content_options['sort_on' == "random"]) {
    113113            $this->cache->disable();
    114114        }
    115        
     115
    116116        if($context == 'post') {
    117117            $rel = "post-" . get_the_ID();
     
    121121
    122122        $params = substr($params, 1);
    123        
     123
    124124        $feed_options = get_option('sspdt_feed_options');
    125         $baseurl = $feed_options['feed_url'];
     125        $baseurl = $feed_options['feed_url'] . 'feed.php';
    126126        $secret = $feed_options['secret'];
    127        
     127
    128128        $crypt = new Encryption($secret);
    129129        $checksum = md5($params);
    130        
     130
    131131        $feedurl = $baseurl . '?p=' . $crypt->encode($params) . '&c=' . $checksum;
    132132
    133133        $contents = $this->content->all($options);
    134        
     134
    135135        $out = ( "\n<div class='sspd_grid' style='display:block;margin-top:6px;'>\n" );
    136    
     136
    137137        foreach( $contents as $content ) {
    138138            $width =  (int)$content->grid->width;
     
    143143    <img class='sspdt_grid' src='%s' alt='%s' width='%s' height='%s' type='image/jpeg'/>
    144144</a>\n", "fancybox", $rel, $content->large->url, $title, $content->grid->url, $alt, $width, $height);
    145         } 
    146        
     145        }
     146
    147147        $out .= ( "</div>\n" );
    148148        if($content_options['rss'] == '1' || $content_options == 'yes' && $content_options['sort_on'] != 'random') {
     
    152152        $out .= "\n";
    153153
    154        
     154
    155155        return $out;
    156156    }
    157    
     157
    158158    /**
    159159     *  Creates a single content item (image)
    160      *  @param integer $image A unique Director content ID 
     160     *  @param integer $image A unique Director content ID
    161161     *  @param string $align attribute for image alignment: left|center|right
    162162     *  @param string $showcaption attribute determines if captions shall be shown: yes|no
     
    165165     */
    166166    public function single($image, $align, $showcaption, $post_id) {
    167        
     167
    168168        $content = $this->content->get($image);
    169169        $large = $content->large->url;
    170170        $thumb = $content->thumb->url;
    171171        $title = $content->caption ? $this->prep($content->caption) : "";
    172        
     172
    173173        $width =  (int)$content->thumb->width;
    174174        $height = (int)$content->thumb->height;
     
    178178        $rel = "post-" . $post_id;
    179179        $alt = $content->caption ? $this->prep($content->caption) : "";
    180        
     180
    181181        if($showcaption) {
    182182            $caption = ($content->caption) ? $this->prep($content->caption) : $this->prep($content->iptc->caption);
    183            
     183               
    184184            if($caption != "") {
    185185                return sprintf("<div id='sspdt-content-%s' class='wp-caption %s' style='width:%spx'>
     
    191191                $image, $align, $captionwidth, "fancybox", $large, $rel, $title, $thumb, $alt, $width, $height, $caption);
    192192            }
    193         } 
    194        
     193        }
     194
    195195        return sprintf("<a class='%s sspdt_thumb' href='%s' rel='%s' title='%s'>
    196196            <img class='%s' src='%s' alt='%s' width='%s' height='%s' />
     
    199199
    200200    }
    201    
     201
    202202    /**
    203203     * Prepares a string for HTML output
     
    209209    }
    210210
    211    
     211
    212212}
    213213
  • ssp-director-tools/trunk/includes/SSPDT_Widget.php

    r409223 r409240  
    55/**
    66 * Our widget class extending WP_Widget class
    7  * @author Matthias Scheidl <matthias@scheidl.name>
     7 * @author Matthias Scheidl <dev@scheidl.name>
    88 *
    99 */
    1010class SSPDT_Widget extends WP_Widget {
    11    
    12 
    13     function SSPDT_Widget() {
    14         $widget_ops = array(
     11
     12
     13    function SSPDT_Widget() {
     14        $widget_ops = array(
    1515            'classname' => 'SSPDT_Widget',
    1616            'description' => __('Displays a photogrid populated with SSP Director content.', 'sspdt')
    17             );
     17        );
    1818        $control_ops = array (
    1919            'width' => '300',
    2020            'height' => '200'
    21         );
    22         parent::WP_Widget(false, $name = __('Director Photogrid', 'sspdt'), $widget_options = $widget_ops, $control_options = $control_ops);
    23     }
    24    
    25    
    26     /**
    27     * Create the widget form
    28     * @param array $instance Our instance variables
    29     * @return void
    30     */
    31     function form($instance) {
    32         $defaults = array(
     21            );
     22            parent::WP_Widget(false, $name = __('Director Photogrid', 'sspdt'), $widget_options = $widget_ops, $control_options = $control_ops);
     23    }
     24
     25
     26    /**
     27    * Create the widget form
     28    * @param array $instance Our instance variables
     29    * @return void
     30    */
     31    function form($instance) {
     32        $defaults = array(
    3333            'title' => __('Title', 'sspdt'),
    3434            'model' => 'album',
     
    4040            'sort_direction' => 'DESC',
    4141            'element' => 'h3'
    42         );
    43        
    44         $instance = wp_parse_args( (array) $instance, $defaults );
    45         $title = $instance['title'];
    46         $model = $instance['model'];
    47         $model_id = $instance['model_id'];
    48         $limit = $instance['limit'];
    49         $tags = $instance['tags'];
    50         $tagmode = $instance['tagmode'];
    51         $sort_on = $instance['sort_on'];
    52         $sort_direction = $instance['sort_direction'];
    53         $element = $instance['element'];
    54        
    55         ?> 
    56             <p><?php  _e('Title', 'sspdt'); ?>
    57                 <input class="widefat" name="<?php echo $this->get_field_name( 'title' ); ?>"  type="text" value="<?php echo esc_attr( $title ); ?>" />
    58             </p>
    59             <p><?php _e('Surrounding HTML Element', 'sspdt'); ?>
    60                 <select name="<?php echo $this->get_field_name( 'element' ); ?>" style="min-width:60px;">
    61                     <option value="h2" <?php if(esc_attr($element) == 'h2') {echo "selected"; } ?>>h2</option>
    62                     <option value="h3" <?php if(esc_attr($element) == 'h3') {echo "selected"; } ?>>h3</option>
    63                     <option value="p" <?php if(esc_attr($element) == 'p') {echo "selected"; } ?>>p</option>
    64                 </select>
    65             </p>
    66             <p><?php  _e('Scope', 'sspdt'); ?><br />
    67                 <select name="<?php echo $this->get_field_name( 'model' ); ?>" onchange="model_on_change();">
    68                     <option value="null" <?php if(esc_attr($model) == 'null') {echo "selected";}?>><?php _e('-- Not specified --', 'sspdt'); ?></option>
    69                     <option value="gallery" <?php if(esc_attr($model) == 'gallery') {echo "selected";}?>><?php _e('Gallery', 'sspdt'); ?></option>
    70                     <option value="album" <?php if(esc_attr($model) == 'album') {echo "selected";}?>><?php _e('Album', 'sspdt'); ?></option>
    71                 </select>
    72                 ID <input name="<?php echo $this->get_field_name( 'model_id' ); ?>" size="3" type="text" value="<?php echo esc_attr( $model_id ); ?>" />
    73             </p>
    74             <p>
    75                 <?php  printf(__('Limit to <input name="%s" type="text" size="3" value="%s"/> images.', 'sspdt'), esc_attr($this->get_field_name( 'limit' )), $limit); ?>
    76             </p>
    77             <p><?php  _e('Tags', 'sspdt'); ?>
    78                 <input  name="<?php echo $this->get_field_name('tags'); ?>" type="text" value="<?php echo esc_attr($tags); ?>"/>
    79                 <select name="<?php echo $this->get_field_name( 'tagmode' ); ?>">
    80                     <option value="all" <?php if(esc_attr($tagmode) == 'all') {echo "selected";}?> ><?php _e('all', 'sspdt'); ?></option>
    81                     <option value="one" <?php if(esc_attr($tagmode) == 'null') {echo "selected";}?> ><?php _e('one', 'sspdt'); ?></option>
    82                 </select>
    83             </p>
    84             <p><?php  _e('Sort by', 'sspdt'); ?>
    85                 <select id="sort_on" name="<?php echo $this->get_field_name( 'sort_on' ); ?>" style="min-width:120px;" onchange="sort_on_change();">
    86                     <option value="null" <?php if($sort_on == 'null') {echo "selected";} ?> ><?php _e('-- Not specified --', 'sspdt'); ?></option>
    87                     <option value="created_on" <?php if($sort_on == 'created_on') {echo "selected";} ?> ><?php _e('Creation Date', 'sspdt'); ?></option>
    88                     <option value="captured_on" <?php if($sort_on == 'captured_on') {echo "selected";} ?> ><?php _e('Capture Date', 'sspdt'); ?></option>
    89                     <option value="modified_on" <?php if($sort_on == 'modified_on') {echo "selected";} ?> ><?php _e('Modification Date', 'sspdt'); ?></option>
    90                     <option value="filename" <?php if($sort_on == 'filename') {echo "selected";} ?> ><?php _e('File Name', 'sspdt'); ?></option>
    91                     <option value="random" <?php if($sort_on == 'random') {echo "selected";} ?> ><?php _e('Random', 'sspdt'); ?></option>
    92                 </select>
    93                 <select id="sort_direction" name="<?php echo $this->get_field_name( 'sort_direction' ); ?>" style="min-width:80px;" <?php if($sort_on == 'null' || $sort_on == null || $sort_on == 'random') {echo "disabled";} ?> >
    94                     <option value="ASC" <?php if($sort_direction == 'ASC') {echo "selected";} ?> ><?php _e('ascending', 'sspdt'); ?></option>
    95                     <option value="DESC" <?php if($sort_direction == 'DESC') {echo "selected";} ?> ><?php _e('descending', 'sspdt'); ?></option>
    96                 </select>
    97             </p>
    98 
    99         <?php
    100     }
    101    
    102    
    103     /**
    104      *  Update the widget
    105      *  @param array $new_instance The new instance variables
    106      *  @param array $old_instance The old instance varaiables
    107      *  @return array $instance The new instance variables returned
    108      */
    109     function update($new_instance, $old_instance) {
    110         $instance = $old_instance;
    111         $instance['title'] = strip_tags( $new_instance['title'] );
    112         $instance['model'] = strip_tags( $new_instance['model'] );
    113         $instance['model_id'] = strip_tags( $new_instance['model_id'] );
    114         $instance['limit'] = strip_tags( $new_instance['limit'] );
    115         $instance['tags'] = strip_tags( $new_instance['tags'] );
    116         $instance['tagmode'] = strip_tags( $new_instance['tagmode'] );
    117         $instance['sort_on'] = strip_tags( $new_instance['sort_on'] );
    118         $instance['sort_direction'] = strip_tags( $new_instance['sort_direction'] );
    119         $instance['element'] = strip_tags($new_instance['element'] );
    120         return $instance;
    121     }
    122    
    123    
    124    
    125     /**
    126      *  Display the widget in the frontend
    127      *  @param array $args
    128      *  @param array $instance
    129      *  @return void
    130      */
    131     function widget( $args, $instance ) {
    132         extract($args);
    133        
    134         $sspdt = new SSPDT(get_option('sspdt_api_key'), get_option('sspdt_api_path'), true, get_option('sspdt_format_options'));
    135        
    136         $title = apply_filters( 'widget_title', $instance['title'] );
    137         $elem = $instance['element'];
    138        
    139         $presentation_ops = get_option('sspdt_helpers');
    140         $presentation_helper = $presentation_ops['presentation_helper'];
    141         $helper = array('class' => $presentation_helper );
    142  
    143         echo $before_widget;     
     42            );
     43
     44            $instance = wp_parse_args( (array) $instance, $defaults );
     45            $title = $instance['title'];
     46            $model = $instance['model'];
     47            $model_id = $instance['model_id'];
     48            $limit = $instance['limit'];
     49            $tags = $instance['tags'];
     50            $tagmode = $instance['tagmode'];
     51            $sort_on = $instance['sort_on'];
     52            $sort_direction = $instance['sort_direction'];
     53            $element = $instance['element'];
     54
     55            ?>
     56<p>
     57<?php  _e('Title', 'sspdt'); ?>
     58    <input class="widefat"
     59        name="<?php echo $this->get_field_name( 'title' ); ?>" type="text"
     60        value="<?php echo esc_attr( $title ); ?>" />
     61</p>
     62<p>
     63<?php _e('Surrounding HTML Element', 'sspdt'); ?>
     64    <select name="<?php echo $this->get_field_name( 'element' ); ?>"
     65        style="min-width: 60px;">
     66        <option value="h2"
     67        <?php if(esc_attr($element) == 'h2') {echo "selected"; } ?>>h2</option>
     68        <option value="h3"
     69        <?php if(esc_attr($element) == 'h3') {echo "selected"; } ?>>h3</option>
     70        <option value="p"
     71        <?php if(esc_attr($element) == 'p') {echo "selected"; } ?>>p</option>
     72    </select>
     73</p>
     74<p>
     75<?php  _e('Scope', 'sspdt'); ?>
     76    <br /> <select name="<?php echo $this->get_field_name( 'model' ); ?>"
     77        onchange="model_on_change();">
     78        <option value="null"
     79        <?php if(esc_attr($model) == 'null') {echo "selected";}?>>
     80            <?php _e('-- Not specified --', 'sspdt'); ?>
     81        </option>
     82        <option value="gallery"
     83        <?php if(esc_attr($model) == 'gallery') {echo "selected";}?>>
     84            <?php _e('Gallery', 'sspdt'); ?>
     85        </option>
     86        <option value="album"
     87        <?php if(esc_attr($model) == 'album') {echo "selected";}?>>
     88            <?php _e('Album', 'sspdt'); ?>
     89        </option>
     90    </select> ID <input
     91        name="<?php echo $this->get_field_name( 'model_id' ); ?>" size="3"
     92        type="text" value="<?php echo esc_attr( $model_id ); ?>" />
     93</p>
     94<p>
     95<?php  printf(__('Limit to <input name="%s" type="text" size="3" value="%s"/> images.', 'sspdt'), esc_attr($this->get_field_name( 'limit' )), $limit); ?>
     96</p>
     97<p>
     98<?php  _e('Tags', 'sspdt'); ?>
     99    <input name="<?php echo $this->get_field_name('tags'); ?>" type="text"
     100        value="<?php echo esc_attr($tags); ?>" /> <select
     101        name="<?php echo $this->get_field_name( 'tagmode' ); ?>">
     102        <option value="all"
     103        <?php if(esc_attr($tagmode) == 'all') {echo "selected";}?>>
     104            <?php _e('all', 'sspdt'); ?>
     105        </option>
     106        <option value="one"
     107        <?php if(esc_attr($tagmode) == 'null') {echo "selected";}?>>
     108            <?php _e('one', 'sspdt'); ?>
     109        </option>
     110    </select>
     111</p>
     112<p>
     113<?php  _e('Sort by', 'sspdt'); ?>
     114    <select id="sort_on"
     115        name="<?php echo $this->get_field_name( 'sort_on' ); ?>"
     116        style="min-width: 120px;" onchange="sort_on_change();">
     117        <option value="null"
     118        <?php if($sort_on == 'null') {echo "selected";} ?>>
     119            <?php _e('-- Not specified --', 'sspdt'); ?>
     120        </option>
     121        <option value="created_on"
     122        <?php if($sort_on == 'created_on') {echo "selected";} ?>>
     123            <?php _e('Creation Date', 'sspdt'); ?>
     124        </option>
     125        <option value="captured_on"
     126        <?php if($sort_on == 'captured_on') {echo "selected";} ?>>
     127            <?php _e('Capture Date', 'sspdt'); ?>
     128        </option>
     129        <option value="modified_on"
     130        <?php if($sort_on == 'modified_on') {echo "selected";} ?>>
     131            <?php _e('Modification Date', 'sspdt'); ?>
     132        </option>
     133        <option value="filename"
     134        <?php if($sort_on == 'filename') {echo "selected";} ?>>
     135            <?php _e('File Name', 'sspdt'); ?>
     136        </option>
     137        <option value="random"
     138        <?php if($sort_on == 'random') {echo "selected";} ?>>
     139            <?php _e('Random', 'sspdt'); ?>
     140        </option>
     141    </select> <select id="sort_direction"
     142        name="<?php echo $this->get_field_name( 'sort_direction' ); ?>"
     143        style="min-width: 80px;"
     144            <?php if($sort_on == 'null' || $sort_on == null || $sort_on == 'random') {echo "disabled";} ?>>
     145        <option value="ASC"
     146        <?php if($sort_direction == 'ASC') {echo "selected";} ?>>
     147            <?php _e('ascending', 'sspdt'); ?>
     148        </option>
     149        <option value="DESC"
     150        <?php if($sort_direction == 'DESC') {echo "selected";} ?>>
     151            <?php _e('descending', 'sspdt'); ?>
     152        </option>
     153    </select>
     154</p>
     155
     156            <?php
     157    }
     158
     159
     160    /**
     161     *  Update the widget
     162     *  @param array $new_instance The new instance variables
     163     *  @param array $old_instance The old instance varaiables
     164     *  @return array $instance The new instance variables returned
     165     */
     166    function update($new_instance, $old_instance) {
     167        $instance = $old_instance;
     168        $instance['title'] = strip_tags( $new_instance['title'] );
     169        $instance['model'] = strip_tags( $new_instance['model'] );
     170        $instance['model_id'] = strip_tags( $new_instance['model_id'] );
     171        $instance['limit'] = strip_tags( $new_instance['limit'] );
     172        $instance['tags'] = strip_tags( $new_instance['tags'] );
     173        $instance['tagmode'] = strip_tags( $new_instance['tagmode'] );
     174        $instance['sort_on'] = strip_tags( $new_instance['sort_on'] );
     175        $instance['sort_direction'] = strip_tags( $new_instance['sort_direction'] );
     176        $instance['element'] = strip_tags($new_instance['element'] );
     177        return $instance;
     178    }
     179
     180
     181
     182    /**
     183     *  Display the widget in the frontend
     184     *  @param array $args
     185     *  @param array $instance
     186     *  @return void
     187     */
     188    function widget( $args, $instance ) {
     189        extract($args);
     190
     191        $sspdt = new SSPDT(get_option('sspdt_api_key'), get_option('sspdt_api_path'), true, get_option('sspdt_format_options'));
     192       
     193        if(get_option('sspdt_api_cache')) {
     194            $sspdt->cache->set('sspdt');
     195        }
     196
     197        $title = apply_filters( 'widget_title', $instance['title'] );
     198        $elem = $instance['element'];
     199
     200        $presentation_ops = get_option('sspdt_helpers');
     201        $presentation_helper = $presentation_ops['presentation_helper'];
     202        $helper = array('class' => $presentation_helper );
     203
     204        echo $before_widget;
    144205        echo "<$elem class='widget-title'>$title</$elem>";
    145206        echo $sspdt->photogrid($instance, 'widget');
    146         echo $after_widget;
    147     }
    148    
     207        echo $after_widget;
     208    }
     209
    149210}
    150211
  • ssp-director-tools/trunk/includes/api/Album.php

    r409223 r409240  
    66        return $this->parent->send('get_album', $options);
    77    }
    8    
     8
    99    public function all($options = array()) {
    1010        $response = $this->parent->send('get_album_list', $options);
    1111        return $response->albums;
    1212    }
    13    
     13
    1414    public function galleries($album_id, $options = array()) {
    1515        if (isset($options['exclude']) && is_array($options['exclude'])) {
  • ssp-director-tools/trunk/includes/api/App.php

    r409223 r409240  
    66        return $response->version;
    77    }
    8    
     8
    99    public function limits() {
    1010        $response = $this->parent->send('app_limits');
    1111        return $response;
    1212    }
    13    
     13
    1414    public function totals() {
    1515        $response = $this->parent->send('app_totals');
  • ssp-director-tools/trunk/includes/api/Cache.php

    r409223 r409240  
    22
    33class DirectorCache extends DirectorWrapper {
    4    
     4
    55    function set($key, $expires = '+1 hour') {
    66        $this->parent->cache_key = $key;
    77        $this->parent->expires = $expires;
    88    }
    9    
     9
    1010    function disable() {
    1111        $this->parent->cache = false;
    1212    }
    13    
     13
    1414    function get($tail = '') {
    1515        $filename = $this->parent->cache_path . $this->parent->cache_key . DIRECTORY_SEPARATOR . $tail;
     
    2929        }
    3030    }
    31    
     31
    3232    function fill($data, $tail) {
    3333        $filename = $this->parent->cache_path . $this->parent->cache_key . DIRECTORY_SEPARATOR . $tail;
  • ssp-director-tools/trunk/includes/api/Content.php

    r409223 r409240  
    77        return $response;
    88    }
    9    
     9
    1010    public function all($options = array()) {
    1111        if (isset($options['scope']) && !empty($options['scope'])) {
  • ssp-director-tools/trunk/includes/api/DirectorPHP.php

    r409223 r409240  
    44 * DirectorPHP API class
    55 * Version 1.5
    6 */
     6 */
    77
    88class Director {
    9    
     9
    1010    # Fill in your API key here. It can be found on your Director preferences pane,
    1111    # under the "About your install" section.
    1212    public $api_key = '';
    13    
     13
    1414    # Path to your Director install
    15     # This can also be found on your preferences pane, below the API key       
     15    # This can also be found on your preferences pane, below the API key
    1616    public $path = '';
    17    
     17
    1818    ##
    1919    # DO NOT EDIT BEYOND THIS POINT
    2020    ##
    21    
     21
    2222    public $endpoint;
    2323    public $sizes = array();
     
    3535    public $cache_invalidator;
    3636    public $user_scope = array();
    37    
     37
    3838    function __construct($api_key = '', $path = '', $debug = true) {
    3939        $this->debug = $debug;
     
    4141            $this->handle_error('The DirectorPHP class requires the cURL library.');
    4242        }
    43        
     43
    4444        if (!function_exists('json_decode')) {
    4545            $this->handle_error('The DirectorPHP class requires the PHP 5.2.x or higher or the php-json PECL library.');
    4646        }
    47        
     47
    4848        if (!empty($api_key)) {
    4949            $this->api_key = $api_key;
    5050        }
    51        
     51
    5252        if (!empty($path)) {
    5353            $this->path = $path;
    5454        }
    55        
     55
    5656        $this->api_key = trim($this->api_key);
    5757        $this->path = str_replace('http://', '', rtrim($this->path, '/'));
    58        
     58
    5959        if (empty($this->api_key) || empty($this->path)) {
    6060            $this->handle_error('You must specify an API key and install path.');
    6161        }
    62        
     62
    6363        if (preg_match('/^(local|hosted)\-(.*)/', $this->api_key, $matches)) {
    6464            if ($matches[1] == 'local') {
     
    7373        if ($this->is_local) {
    7474            $this->endpoint .= '/index.php?';
    75         } 
     75        }
    7676        $this->endpoint .= '/api/';
    7777
     
    9292        $this->user = new DirectorUser($this);
    9393    }
    94    
     94
    9595    /********************************************************
    96        
    97         public functions
    98        
    99         Only methods in this class or a subclass of
    100         this class can call these methods.
    101    
     96
     97    public functions
     98
     99    Only methods in this class or a subclass of
     100    this class can call these methods.
     101
    102102    ********************************************************/
    103    
     103
    104104    protected function format_sizes() {
    105105        if (!empty($this->sizes)) {
     
    109109            }
    110110        }
    111        
     111
    112112        if (!empty($this->preview)) {
    113113            $temp_arr = array($this->preview['width'], $this->preview['height'], $this->preview['crop'], $this->preview['quality'], $this->preview['sharpening']);
     
    115115            $this->params[] = 'preview=' . $preview;
    116116        }
    117        
     117
    118118        if (!empty($this->user_sizes)) {
    119119            foreach($this->user_sizes as $key => $size) {
     
    123123        }
    124124    }
    125    
     125
    126126    public function send($method, $options = array()) {
    127127        if ($this->dead) {
     
    143143                }
    144144            }
    145            
     145               
    146146            $this->format_sizes();
    147            
     147               
    148148            $params_str = join('&', $this->params);
    149149            $this->params = array();
    150            
     150               
    151151            $tail = md5($params_str);
    152            
     152               
    153153            if ($this->cache && !empty($this->cache_key)) {
    154154                $cache = true;
     
    158158                $return = array();
    159159            }
    160            
     160               
    161161            if (empty($return)) {
    162162                if ($cache) {
    163163                    $params_str .= '&invalidator[path]=' . $this->cache_invalidator . '&invalidator[name]=' . $this->cache_key . '/' . $tail;
    164164                }
    165                 $ch = curl_init($this->endpoint . $method . '?' . $params_str); 
    166                
     165                $ch = curl_init($this->endpoint . $method . '?' . $params_str);
     166
    167167                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    168168                $return = trim(curl_exec($ch));
     
    179179            }
    180180
    181             $response = json_decode($return);   
     181            $response = json_decode($return);
    182182
    183183            if (!empty($response->error)) {
     
    190190        }
    191191    }
    192    
     192
    193193    function handle_error($msg) {
    194194        if ($this->debug) {
     
    198198        }
    199199    }
    200    
     200
    201201}
    202202
  • ssp-director-tools/trunk/includes/api/Format.php

    r409223 r409240  
    55        $this->parent->sizes[] = $arr;
    66    }
    7    
     7
    88    public function user($arr) {
    99        $this->parent->user_sizes[] = $arr;
    1010    }
    11    
     11
    1212    public function preview($arr) {
    1313        $this->parent->preview = $arr;
    1414    }
    15    
     15
    1616    public function clear() {
    1717        $this->parent->preview = array();
    1818        $this->parent->sizes = array();
    19     }   
     19    }
    2020}
    2121
  • ssp-director-tools/trunk/includes/api/Gallery.php

    r409223 r409240  
    77        return $response;
    88    }
    9    
     9
    1010    public function all($options = array()) {
    1111        $response = $this->parent->send('get_gallery_list', $options);
  • ssp-director-tools/trunk/includes/api/User.php

    r409223 r409240  
    22
    33class DirectorUser extends DirectorWrapper {
    4    
     4
    55    function scope($options = array()) {
    66        $defaults = array('all' => false);
     
    1212        }
    1313    }
    14    
     14
    1515    function all($options = array()) {
    1616        if (!empty($this->parent->user_scope)) {
  • ssp-director-tools/trunk/includes/api/Utils.php

    r409223 r409240  
    22
    33class DirectorUtils extends DirectorWrapper {
    4    
     4
    55    function is_video($fn) {
    66        if (eregi('\.flv|\.mov|\.mp4|\.m4a|\.m4v|\.3gp|\.3g2', $fn)) {
     
    1010        }
    1111    }
    12    
     12
    1313    function is_image($filename) {
    1414        if (!$this->is_video($filename)) {
     
    1818        }
    1919    }
    20    
     20
    2121    function is_mobile() {
    22          return preg_match('/(iPhone|iPad|Android 2)/',  $_SERVER['HTTP_USER_AGENT']);
     22        return preg_match('/(iPhone|iPad|Android 2)/',  $_SERVER['HTTP_USER_AGENT']);
    2323    }
    24    
     24
    2525    function truncate($string, $limit = 40, $tail = '...') {
    2626        if (strlen($string) > $limit) {
     
    2929        return $string;
    3030    }
    31    
     31
    3232    public function convert_line_breaks($string, $br = true) {
    3333        $string = preg_replace("/(\r\n|\n|\r)/", "\n", $string);
  • ssp-director-tools/trunk/includes/api/cache/clear.php

    r409223 r409240  
    11<?php
    2     $names = explode(',', $_GET['name']);
    3     foreach($names as $name) {
    4         $name = str_replace('/', DIRECTORY_SEPARATOR, str_replace('.', '', $name));
    5         $to_clear = dirname(__FILE__) . DIRECTORY_SEPARATOR . $name;
    6         if (file_exists($to_clear)) {
    7             unlink($to_clear);
    8         }
     2$names = explode(',', $_GET['name']);
     3foreach($names as $name) {
     4    $name = str_replace('/', DIRECTORY_SEPARATOR, str_replace('.', '', $name));
     5    $to_clear = dirname(__FILE__) . DIRECTORY_SEPARATOR . $name;
     6    if (file_exists($to_clear)) {
     7        unlink($to_clear);
    98    }
     9}
    1010?>
  • ssp-director-tools/trunk/includes/helpers.php

    r409223 r409240  
    4444}
    4545
    46 //sanitize text 
     46//sanitize text
    4747function sspdt_nohtml($val) {
    4848    return wp_kses($val, array());
  • ssp-director-tools/trunk/includes/shortcodes.php

    r409223 r409240  
    44
    55/**
    6  * Shortcut for the 'sspd' tag. Creates HTML code for Director photo grids or single images 
    7  * @author Matthias Scheidl <matthias@scheidl.name>
     6 * Shortcut for the 'sspd' tag. Creates HTML code for Director photo grids or single images
     7 * @author Matthias Scheidl <dev@scheidl.name>
    88 * @param array $atts The attributes of the sspd tag
    99 * @return string The HTML code
     
    2222            'sort_direction' => '',
    2323            'rss' => ''
    24         ), $atts ) );
    25        
    26         //helper info
    27         $presentation_ops = get_option('sspdt_helpers');
     24            ), $atts ) );
    2825
    29         //Do not filter if we are on a search result page
    30         if(get_search_query() == "")
    31         {
    32             $sspdt = new SSPDT(get_option('sspdt_api_key'), get_option('sspdt_api_path'), true, get_option('sspdt_format_options'));
    33            
    34             if($image == '') { //we make a photo grid with multiple images
    35            
    36                 $defaults = get_option('sspdt_defaults');
    37                 $options = array();
     26            //helper info
     27            $presentation_ops = get_option('sspdt_helpers');
     28
     29            //Do not filter if we are on a search result page
     30            if(get_search_query() == "")
     31            {
     32                $sspdt = new SSPDT(get_option('sspdt_api_key'), get_option('sspdt_api_path'), false, get_option('sspdt_format_options'));
    3833               
    39                 // Determine the scope of the request
    40                 if($gallery != '') {
    41                     $options['model'] = 'gallery';
    42                     $options['model_id'] = $gallery;
    43                 } elseif ($album != '') {
    44                     $options['model'] = 'album';
    45                     $options['model_id'] = $album;
    46                 } elseif ($defaults['model'] =='gallery' || $defaults['model'] == 'album') {
    47                     $options['model'] = $defaults['model'];
    48                     $options['model_id'] = $defaults['model_id'] != '' ? $defaults['model_id'] : 1;
     34                if(get_option('sspdt_api_cache')) {
     35                    $sspdt->cache->set('sspdt');
    4936                }
    50                
    51                
    52                 // Determine the maximum number of images to show
    53                 if($limit != '0' && $limit != '') {
    54                     $options['limit'] = $limit;
    55                 } elseif ($defaults['limit'] != '0' && $defaults['limit'] != '') {
    56                     $options['limit'] = $defaults['limit'];
     37                   
     38                if($image == '') { //we make a photo grid with multiple images
     39                       
     40                    $defaults = get_option('sspdt_defaults');
     41                    $options = array();
     42
     43                    // Determine the scope of the request
     44                    if($gallery != '') {
     45                        $options['model'] = 'gallery';
     46                        $options['model_id'] = $gallery;
     47                    } elseif ($album != '') {
     48                        $options['model'] = 'album';
     49                        $options['model_id'] = $album;
     50                    } elseif ($defaults['model'] =='gallery' || $defaults['model'] == 'album') {
     51                        $options['model'] = $defaults['model'];
     52                        $options['model_id'] = $defaults['model_id'] != '' ? $defaults['model_id'] : 1;
     53                    }
     54
     55
     56                    // Determine the maximum number of images to show
     57                    if($limit != '0' && $limit != '') {
     58                        $options['limit'] = $limit;
     59                    } elseif ($defaults['limit'] != '0' && $defaults['limit'] != '') {
     60                        $options['limit'] = $defaults['limit'];
     61                    }
     62
     63                    // Determine if we do tag filtering
     64                    if($tags != '') {
     65                        if(strtolower($tagmode) == 'all' || strtolower($tagmode) == 'one') {
     66                            $options['tags'] = $tags;
     67                            $options['tagmode'] = strtolower($tagmode);
     68                        } elseif ($defaults['tagmode'] == 'all' || $defaults['tagmode'] == 'one') {
     69                            $options['tags'] = $tags;
     70                            $options['tagmode'] = $defaults['tagmode'];
     71                        } else {
     72                            $options['tags'] = $tags;
     73                            $options['tagmode'] = 'one';
     74                        }
     75                    } elseif ($defaults['tags'] != '') {
     76                        $options['tags'] = $defaults['tags'];
     77                        $options['tagmode'] = $defaults['tagmode'];
     78                    }
     79
     80                    // Determine the sort policy
     81                    if($sort_on != '' && $sort_on != 'null') {
     82                        $options['sort_on'] = $sort_on;
     83                    } elseif ($defaults['sort_on'] != '' && $defaults['sort_on'] != 'null') {
     84                        $options['sort_on'] = $defaults['sort_on'];
     85                    }
     86
     87                    // Determine the sort direction
     88                    if(strtoupper($sort_direction) == 'ASC' || strtoupper($sort_direction) == 'DESC') {
     89                        $options['sort_direction'] = $sort_direction;
     90                    } elseif ($defaults['sort_direction'] == 'ASC' || $defaults['sort_direction'] == 'DESC'){
     91                        $options['sort_direction'] = $defaults['sort_direction'];
     92                    } else {
     93                        $options['sort_direction'] = 'DESC';
     94                    }
     95
     96                    // Show RSS feed?
     97                    if($options['sort_on'] != 'random') {
     98                        // show rss feed only if our gallery is not randomised
     99                        if( $rss == 'yes' || $rss === '1' || $rss == 'no' || $rss === '0') {
     100                            $options['rss'] = $rss;
     101                        } elseif ( $defaults['rss'] == 'yes' || $defaults['rss'] === '1' ) {
     102                            $options['rss'] = '1';
     103                        } else {
     104                            $options['rss'] = '0';
     105                        }
     106                           
     107                    }
     108
     109
     110                    //debug_var($options);
     111
     112                    return $sspdt->photogrid($options, 'post');
     113
     114                } else { //we make a single image
     115
     116                    $format_options = get_option('sspdt_format_options');
     117
     118                    // Get the plugin settings
     119                    $showcaption = isset($format_options['thumb_caption']) ? $format_options['thumb_caption'] : false;
     120                    $thumbalign = isset($format_options['thumb_align']) ? $format_options['thumb_align'] : 'alignnone';
     121
     122                    // Override alignment settings if align attribute provided
     123                    if($align == 'left') $thumbalign = 'alignleft';
     124                    if($align == 'center') $thumbalign = 'aligncenter';
     125                    if($align == 'right') $thumbalign = 'alignright';
     126
     127                    // Override caption settings if caption attribute is set to 'yes' or '1'
     128                    if($caption == 'yes' || $caption == '1') {
     129                        $showcaption = true;
     130                    } elseif ($caption == 'no' || $caption == '0') {
     131                        $showcaption = false;
     132                    }
     133
     134                    //post ID
     135                    $post_id = get_the_ID();
     136
     137                    return $sspdt->single($image, $thumbalign, $showcaption, $post_id);
    57138                }
    58                
    59                 // Determine if we do tag filtering
    60                 if($tags != '') {
    61                     if(strtolower($tagmode) == 'all' || strtolower($tagmode) == 'one') {
    62                         $options['tags'] = $tags;
    63                         $options['tagmode'] = strtolower($tagmode);
    64                     } elseif ($defaults['tagmode'] == 'all' || $defaults['tagmode'] == 'one') {
    65                         $options['tags'] = $tags;
    66                         $options['tagmode'] = $defaults['tagmode'];
    67                     } else {
    68                         $options['tags'] = $tags;
    69                         $options['tagmode'] = 'one';
    70                     }
    71                 } elseif ($defaults['tags'] != '') {
    72                     $options['tags'] = $defaults['tags'];
    73                     $options['tagmode'] = $defaults['tagmode'];
    74                 }
    75                
    76                 // Determine the sort policy
    77                 if($sort_on != '' && $sort_on != 'null') {
    78                     $options['sort_on'] = $sort_on;
    79                 } elseif ($defaults['sort_on'] != '' && $defaults['sort_on'] != 'null') {
    80                     $options['sort_on'] = $defaults['sort_on'];
    81                 }
    82                
    83                 // Determine the sort direction
    84                 if(strtoupper($sort_direction) == 'ASC' || strtoupper($sort_direction) == 'DESC') {
    85                     $options['sort_direction'] = $sort_direction;
    86                 } elseif ($defaults['sort_direction'] == 'ASC' || $defaults['sort_direction'] == 'DESC'){
    87                     $options['sort_direction'] = $defaults['sort_direction'];
    88                 } else {
    89                     $options['sort_direction'] = 'DESC';
    90                 }
    91                
    92                 // Show RSS feed?
    93                 if($options['sort_on'] != 'random') {
    94                     // show rss feed only if our gallery is not randomised
    95                     if( $rss == 'yes' || $rss === '1' || $rss == 'no' || $rss === '0') {
    96                         $options['rss'] = $rss;
    97                     } elseif ( $defaults['rss'] == 'yes' || $defaults['rss'] === '1' ) {
    98                         $options['rss'] = '1';
    99                     } else {
    100                         $options['rss'] = '0';
    101                     }
    102                    
    103                 }
    104                
    105                
    106                 //debug_var($options);
    107                
    108                 return $sspdt->photogrid($options, 'post');
    109                
    110             } else { //we make a single image
    111                
    112                 $format_options = get_option('sspdt_format_options');
    113                
    114                 // Get the plugin settings
    115                 $showcaption = isset($format_options['thumb_caption']) ? $format_options['thumb_caption'] : false;
    116                 $thumbalign = isset($format_options['thumb_align']) ? $format_options['thumb_align'] : 'alignnone';
    117                
    118                 // Override alignment settings if align attribute provided
    119                 if($align == 'left') $thumbalign = 'alignleft';
    120                 if($align == 'center') $thumbalign = 'aligncenter';
    121                 if($align == 'right') $thumbalign = 'alignright';
    122                
    123                 // Override caption settings if caption attribute is set to 'yes' or '1'
    124                 if($caption == 'yes' || $caption == '1') {
    125                     $showcaption = true;
    126                 } elseif ($caption == 'no' || $caption == '0') {
    127                     $showcaption = false;
    128                 }
    129                
    130                 //post ID
    131                 $post_id = get_the_ID();
     139            }
    132140
    133                 return $sspdt->single($image, $thumbalign, $showcaption, $post_id);
    134             }
    135         }
    136141
    137    
    138142}
    139143
  • ssp-director-tools/trunk/includes/sspdt-options-page.php

    r409223 r409240  
    66    if ( isset($_POST['submit']) ) {
    77        if ( function_exists('current_user_can') && !current_user_can('manage_options') )
    8             die(__('Cheatin&#8217; uh?', 'ssspdt'));
     8        die(__('Cheatin&#8217; uh?', 'ssspdt'));
    99
    1010        check_admin_referer( $sspdt_nonce );
    11        
     11
    1212        $director = new Director($_POST['sspdt_api_key'],$_POST['sspdt_api_path'],false);
    13        
     13
    1414        if ( !$director->dead == true ) {
    15                
     15
    1616            update_option( 'sspdt_api_key', $_POST['sspdt_api_key'] );
    1717            update_option( 'sspdt_api_path', $_POST['sspdt_api_path'] );
    18            
    19             ?><div id="message" class="updated fade"><p><strong><?php _e('Settings have been saved.', 'sspdt'); ?></strong></p></div><?php
     18               
     19            ?>
     20<div id="message" class="updated fade">
     21    <p>
     22        <strong><?php _e('Settings have been saved.', 'sspdt'); ?>
     23        </strong>
     24    </p>
     25</div>
     26            <?php
    2027            unset( $director );
    2128            unset( $_POST['sspdt_api_key']);
    2229            unset( $_POST['sspdt_api_key']);
    23            
     30               
    2431        }
    25        
     32
    2633        else {
    27        
    28             ?><div id="message" class="error"><p><strong><?php _e('API Settings seem wrong. Please double check them.', 'sspdt'); ?></strong></p></div>
    29         <?php
    30         }   
    31        
     34
     35            ?>
     36<div id="message" class="error">
     37    <p>
     38        <strong><?php _e('API Settings seem wrong. Please double check them.', 'sspdt'); ?>
     39        </strong>
     40    </p>
     41</div>
     42            <?php
     43        }
     44
    3245        update_option( 'sspdt_api_cache', $_POST['sspdt_api_cache'] );
    3346
    3447        $format_options = array();
    35        
     48
    3649        $format_options['grid_width'] = sspdt_posint ( $_POST['grid_width'] );
    3750        $format_options['grid_height'] = sspdt_posint ( $_POST['grid_height'] );
     
    3952        $format_options['grid_quality'] = sspdt_posint ( $_POST['grid_quality'] );
    4053        $format_options['grid_sharpen'] = sspdt_bool( $_POST['grid_sharpen'] );
    41        
     54
    4255        $format_options['thumb_width'] = sspdt_posint( $_POST['thumb_width'] );
    4356        $format_options['thumb_height'] = sspdt_posint( $_POST['thumb_height'] );
     
    4760        $format_options['thumb_align'] = sspdt_align( $_POST['thumb_align'] );
    4861        $format_options['thumb_caption'] = sspdt_bool( $_POST['thumb_caption'] );
    49        
     62
    5063        $format_options['large_width'] = sspdt_posint( $_POST['large_width'] );
    5164        $format_options['large_height'] = sspdt_posint( $_POST['large_height'] );
    5265        $format_options['large_crop'] = sspdt_bool( $_POST['large_crop'] );
    53         $format_options['large_quality'] = sspdt_posint( $_POST['large_quality'] ); 
     66        $format_options['large_quality'] = sspdt_posint( $_POST['large_quality'] );
    5467        $format_options['large_sharpen'] = sspdt_bool( $_POST['large_sharpen'] );
    55         //$format_options['large_caption'] = sspdt_bool( $_POST['large_caption'] );
    56        
     68
    5769        $defaults = array();
    58        
     70
    5971        $defaults['model'] = sspdt_model( $_POST['model'] );
    6072        $defaults['model_id'] = sspdt_posint( $_POST['model_id'] );
     
    6577        $defaults['sort_direction'] = sspdt_sort_direction( $_POST['sort_direction'] );
    6678        $defaults['rss'] = sspdt_bool( $_POST['rss'] );
    67        
     79
    6880        $fb = array();
    69        
     81
    7082        $fb['padding'] = sspdt_posint( $_POST['padding'] );
    7183        $fb['margin'] = sspdt_posint( $_POST['margin'] );
    72        
     84
    7385        $fb['titleShow'] = sspdt_bool( $_POST['titleShow'] );
    7486        $fb['titlePosition'] = sspdt_fb_title_position( $_POST['titlePosition'] );
    7587        $fb['counterShow'] = sspdt_bool( $_POST['counterShow'] );
    76        
     88
    7789        $fb['overlayShow'] = sspdt_bool( $_POST['overlayShow'] );
    7890        $fb['overlayOpacity'] = sspdt_fb_opacity( $_POST['overlayOpacity'] );
    7991        $fb['overlayColor'] = sspdt_color( $_POST['overlayColor'] );
    80        
     92
    8193        $fb['cyclic'] = sspdt_bool( $_POST['cyclic'] );
    8294        $fb['showNavArrows'] = sspdt_bool( $_POST['showNavArrows'] );
    8395        $fb['showCloseButton'] = sspdt_bool( $_POST['showCloseButton'] );
    8496        $fb['enableEscapeButton'] = sspdt_bool( $_POST['enableEscapeButton'] );
    85        
     97
    8698        $fb['transitionIn'] = sspdt_fb_transition( $_POST['transitionIn'] );
    8799        $fb['speedIn'] = sspdt_posint( $_POST['speedIn'] );
     
    91103        $fb['easingOut'] = sspdt_fb_easing( $_POST['easingOut'] );
    92104        $fb['changeSpeed'] = sspdt_posint( $_POST['changeSpeed'] );
    93        
     105
    94106        $feed_options = array();
    95        
    96         $feed_options['feed_url'] = esc_url( $_POST['feed_url'] );
     107
     108        $feed_options['feed_url'] = rtrim( esc_url( $_POST['feed_url'] ), " /") . "/";
    97109        $feed_options['secret'] = sspdt_nohtml( $_POST['secret'] );
    98        
    99        
     110
     111
    100112        update_option( 'sspdt_format_options', $format_options );
    101113        update_option( 'sspdt_defaults', $defaults );
    102114        update_option( 'sspdt_fancybox', $fb );
    103115        update_option( 'sspdt_feed_options', $feed_options);
    104        
     116
     117    }
     118
     119    if(get_option('sspdt_api_key') == null) {
     120        ?>
     121<div id="message" class="error">
     122    <p>
     123        <strong><?php _e('You must define the API settings. Otherwise this plugin won\'t work.', 'sspdt'); ?>
     124        </strong>
     125    </p>
     126</div>
     127        <?php   
    105128    }
    106129   
    107         if(get_option('sspdt_api_key') == null) {
    108             ?>
    109             <div id="message" class="error">
    110                 <p><strong><?php _e('You must define the API settings. Otherwise this plugin won\'t work.', 'sspdt'); ?></strong></p>
    111             </div><?php
    112         }
    113        
    114         $fo = get_option('sspdt_feed_options');
    115         if($fo['feed_url'] == null || $fo['feed_url'] == '') {
    116 
    117         }
    118    
    119         if(get_option('sspdt_format_options') == null) {
    120        
    121             $format_options['grid_width'] = '60';
    122             $format_options['grid_height'] = '60';
    123             $format_options['grid_crop'] = '1';
    124             $format_options['grid_quality'] = '75';
    125             $format_options['grid_sharpen'] = '1';
    126            
    127             $format_options['thumb_width'] = '240';
    128             $format_options['thumb_height'] = '240';
    129             $format_options['thumb_crop'] = '0';
    130             $format_options['thumb_quality'] = '80';
    131             $format_options['thumb_sharpen'] = '1';
    132             $format_options['thumb_align'] = 'alignleft';
    133             $format_options['thumb_caption'] = '1';
    134            
    135             $format_options['large_width'] = '1000';
    136             $format_options['large_height'] = '720';
    137             $format_options['large_crop'] = '0';
    138             $format_options['large_quality'] = '85';
    139             $format_options['large_sharpen'] = '1';
    140             //$format_options['large_caption'] = '1';
    141            
    142             $format_options['preview_width'] = '180';
    143             $format_options['preview_height'] = '180';
    144             $format_options['preview_crop'] = '0';
    145             $format_options['preview_quality'] = '75';
    146             $format_options['preview_sharpen'] = '1';
    147            
    148             $format_options['full_width'] = '1920';
    149             $format_options['full_height'] = '1920';
    150             $format_options['full_crop'] = '0';
    151             $format_options['full_quality'] = '90';
    152             $format_options['full_sharpen'] = '1';
    153            
    154             update_option( 'sspdt_format_options', $format_options );
    155         }
    156        
    157         if(get_option('sspdt_defaults') == null) {
    158             $defaults['model'] = 'gallery';
    159             $defaults['model_id'] = '1';
    160             $defaults['limit'] = '12';
    161             $defaults['tags'] = '';
    162             $defaults['tagmode'] = 'one';
    163             $defaults['sort_on'] = 'captured_on';
    164             $defaults['sort_direction'] = 'DESC';
    165             $defaults['rss'] = '0';
    166            
    167             update_option( 'sspdt_defaults', $defaults );
    168         }
    169        
    170         if(get_option('sspdt_fancybox') == null) {
    171             $fb['padding'] = '10';
    172             $fb['margin'] = '20';
    173            
    174             $fb['titleShow'] = '1';
    175             $fb['titlePosition'] = 'outside';
    176             $fb['counterShow'] = '0';
    177            
    178             $fb['overlayShow'] = '1';
    179             $fb['overlayOpacity'] = '0.3';
    180             $fb['overlayColor'] = '#666';
    181            
    182             $fb['cyclic'] = '0';
    183             $fb['showNavArrows'] = '1';
    184             $fb['showCloseButton'] = '1';
    185             $fb['enableEscapeButton'] = '1';
    186            
    187             $fb['transitionIn'] = '1';
    188             $fb['speedIn'] = '300';
    189             $fb['easingIn'] = 'linear';
    190             $fb['transitionOut'] = '1';
    191             $fb['speedOut'] = '400';
    192             $fb['easingOut'] = 'linear';
    193             $fb['changeSpeed'] = '400';
    194            
    195             update_option( 'sspdt_fancybox', $fb );
    196         }
    197    
    198         $format_options = get_option('sspdt_format_options');
    199         $defaults = get_option('sspdt_defaults');
    200         $fb = get_option('sspdt_fancybox');
    201         $feed_options = get_option('sspdt_feed_options');
    202        
    203         $imdir =  WP_PLUGIN_URL . "/ssp-director-tools/images/";
    204 
    205 ?>
    206 
    207         <?php $phpversion = explode( ".", phpversion()); ?>
     130
     131
     132    if(get_option('sspdt_format_options') == null) {
     133
     134        $format_options['grid_width'] = '60';
     135        $format_options['grid_height'] = '60';
     136        $format_options['grid_crop'] = '1';
     137        $format_options['grid_quality'] = '75';
     138        $format_options['grid_sharpen'] = '1';
     139           
     140        $format_options['thumb_width'] = '240';
     141        $format_options['thumb_height'] = '240';
     142        $format_options['thumb_crop'] = '0';
     143        $format_options['thumb_quality'] = '80';
     144        $format_options['thumb_sharpen'] = '1';
     145        $format_options['thumb_align'] = 'alignleft';
     146        $format_options['thumb_caption'] = '1';
     147           
     148        $format_options['large_width'] = '1000';
     149        $format_options['large_height'] = '720';
     150        $format_options['large_crop'] = '0';
     151        $format_options['large_quality'] = '85';
     152        $format_options['large_sharpen'] = '1';
     153           
     154        update_option( 'sspdt_format_options', $format_options );
     155    }
     156
     157    if(get_option('sspdt_defaults') == null) {
     158        $defaults['model'] = 'gallery';
     159        $defaults['model_id'] = '1';
     160        $defaults['limit'] = '12';
     161        $defaults['tags'] = '';
     162        $defaults['tagmode'] = 'one';
     163        $defaults['sort_on'] = 'captured_on';
     164        $defaults['sort_direction'] = 'DESC';
     165        $defaults['rss'] = '0';
     166           
     167        update_option( 'sspdt_defaults', $defaults );
     168    }
     169
     170    if(get_option('sspdt_fancybox') == null) {
     171        $fb['padding'] = '10';
     172        $fb['margin'] = '20';
     173           
     174        $fb['titleShow'] = '1';
     175        $fb['titlePosition'] = 'outside';
     176        $fb['counterShow'] = '0';
     177           
     178        $fb['overlayShow'] = '1';
     179        $fb['overlayOpacity'] = '0.3';
     180        $fb['overlayColor'] = '#666';
     181           
     182        $fb['cyclic'] = '0';
     183        $fb['showNavArrows'] = '1';
     184        $fb['showCloseButton'] = '1';
     185        $fb['enableEscapeButton'] = '1';
     186           
     187        $fb['transitionIn'] = '1';
     188        $fb['speedIn'] = '300';
     189        $fb['easingIn'] = 'linear';
     190        $fb['transitionOut'] = '1';
     191        $fb['speedOut'] = '400';
     192        $fb['easingOut'] = 'linear';
     193        $fb['changeSpeed'] = '400';
     194           
     195        update_option( 'sspdt_fancybox', $fb );
     196    }
     197
     198    $format_options = get_option('sspdt_format_options');
     199    $defaults = get_option('sspdt_defaults');
     200    $fb = get_option('sspdt_fancybox');
     201    $feed_options = get_option('sspdt_feed_options');
     202
     203    $imdir =  WP_PLUGIN_URL . "/ssp-director-tools/images/";
     204
     205    ?>
     206
     207    <?php $phpversion = explode( ".", phpversion()); ?>
    208208
    209209    <?php if ( $phpversion[0] < "5" ) { ?>
    210     <div class="error" id="message">
    211         <p><strong><?php _e('Your PHP version is too old.', 'sspdt');?></strong></p>
    212         <p><?php _e('The DirectorPHP API needs at least PHP 5. Please install it or get in touch with your internet provider or system administrator', 'sspdt'); ?></p>
    213     </div>
    214     <?php }
     210<div class="error" id="message">
     211    <p>
     212        <strong><?php _e('Your PHP version is too old.', 'sspdt');?> </strong>
     213    </p>
     214    <p>
     215    <?php _e('The DirectorPHP API needs at least PHP 5. Please install it or get in touch with your internet provider or system administrator', 'sspdt'); ?>
     216    </p>
     217</div>
     218    <?php }
    215219    ?>
    216    
     220
    217221    <?php if ( !function_exists ( curl_version ) ) { ?>
    218     <div class="error fade" id="message">
    219         <p><strong><?php _e('php_curl is not installed.', 'sspdt');?></strong></p>
    220         <p><?php _e('SSP Director Tools need php_curl be installed to work properly.', 'sspdt'); ?></p>
    221     </div>
    222     <?php }
     222<div class="error fade" id="message">
     223    <p>
     224        <strong><?php _e('php_curl is not installed.', 'sspdt');?> </strong>
     225    </p>
     226    <p>
     227    <?php _e('SSP Director Tools need php_curl be installed to work properly.', 'sspdt'); ?>
     228    </p>
     229</div>
     230    <?php }
    223231    ?>
    224    
     232
    225233<script type="text/javascript">
    226234<!--
     
    244252<div class="wrap">
    245253<?php screen_icon(); ?>
    246 <h2><?php _e('SlideShowPro Director Tools', 'sspdt'); ?></h2>
    247 <div class="narrow">
    248 <form action="" method="post" id="sspdt-conf" >
    249 
    250 <?php sspdt_nonce_field($sspdt_nonce); ?>
    251 
    252 <h3><?php _e('API Settings', 'sspdt'); ?></h3>
    253     <p><i><?php _e('The settings can be found on the "System Info" page of your SlideShowPro Director installation.', 'sspdt'); ?></i></p>
    254 
    255     <table class="form-table">
    256         <tr valign="middle">
    257             <th scope="row">
    258                 <label for="sspdt_api_key"><?php _e('API Key', 'sspdt'); ?></label>
    259             </th>
    260             <td><input id="sspdt_api_key" name="sspdt_api_key" type="text" size="60" value="<?php echo get_option('sspdt_api_key'); ?>" />
    261             </td>
    262         </tr>
    263         <tr>
    264             <th scope="row">
    265                 <label for="sspdt_api_path"><?php _e('API Path', 'sspdt'); ?></label>
    266             </th>
    267             <td><input id="sspdt_api_path" name="sspdt_api_path" type="text" size="60" value="<?php echo get_option('sspdt_api_path'); ?>" />
    268             </td>
    269         </tr>
    270     </table>
    271 
    272     <?php if (!is_writable ( realpath(dirname(__FILE__)) . '/api/cache' )) {
    273         $disable_cache = 1;
    274         update_option('sspdt_api_cache', '0');
    275         echo "<div class='updated fade'><p><strong>";
    276         _e('Caching disabled', 'sspdt');
    277         echo "</strong></p><p>";
    278         printf( __( "Your cache directory %s is not writable.", "sspdt"), "<code>". realpath(dirname(__FILE__)) ."/api/cache</code>");
    279         echo "<br />";
    280         _e("You must allow your web server to write to it in order to enable caching.", "sspdt" );
    281         echo "</p></div>";
    282     }?>
    283 
    284     <table class="form-table">
    285         <tr valign="middle">
    286             <th scope="row">
    287                 <label for="sspdt_api_cache"><?php _e('API Cache', 'sspdt'); ?></label>
    288             </th>
    289             <td>
    290             <input style='margin-right:6px;' <?php if ($disable_cache == 1) { echo "DISABLED";} ?> id="sspdt_api_cache" name="sspdt_api_cache" type="checkbox" value="1" <?php if (get_option('sspdt_api_cache') == '1') {echo "checked = 'checked'";} ?> />
    291             <?php _e('API Cache activated', 'sspdt'); ?><i style='margin-left:20px;'><?php _e('The API cache can improve performance dramatically.', 'sspdt'); ?></i><br/>
    292             </td>
    293         </tr>
    294     </table>
    295    
    296     <h3><?php _e('Photo Feed Options', 'sspdt'); ?></h3>
    297     <p><i><?php _e('Needed, if you want to use the photo feed functionality.', 'sspdt'); ?></i></p>
    298     <table class="form-table">
    299         <tr valign="middle">
    300             <th scope="row"><label for="feed_url"><?php _e('Photo Feed URL', 'sspdt'); ?></label></th>
    301             <td><input id="feed_url" name="feed_url" type="text" size="60" value="<?php echo $feed_options['feed_url']; ?>" /></td>
    302         </tr>
    303         <tr valign="middle">
    304             <th scope="row"><label for="secret"><?php _e('Secret', 'sspdt'); ?></label></th>
    305             <td><input id="secret" name="secret" type="text" size="60" value="<?php echo $feed_options['secret']; ?>" /></td>
    306         </tr>
    307     </table>
    308    
    309     <h3><?php _e('Image Sizes an Handling', 'sspdt'); ?></h3>
    310     <p><i><?php _e('Define image sizes, quality and cropping.', 'sspdt'); ?></i></p>
    311     <table class="wp-list-table widefat" cellspacing="0">
    312         <thead>
    313             <tr valign="middle" >
    314                 <th>&nbsp;</th>
    315                 <th class="manage-column"><?php _e('Width', 'sspdt'); ?></th>
    316                 <th class="manage-column"><?php _e('Height', 'sspdt'); ?></th>
    317                 <th class="manage-column"><?php _e('Quality', 'sspdt'); ?></th>
    318                 <th class="manage-column"><?php _e('Cropping', 'sspdt'); ?></th>
    319                 <th class="manage-column"><?php _e('Sharpening', 'sspdt'); ?></th>
    320                 <th class="manage-column"><?php _e('Alignment', 'sspdt'); ?></th>
    321                 <th class="manage-column"><?php _e('Caption', 'sspdt'); ?></th>
    322             </tr>
    323         </thead>
    324         <tbody>
    325         <tr valign="middle">
    326             <th scope="row"><img class="sspdt_handling_icon" src="<?php echo $imdir . 'grid.png'?>" width="20" height="20" alt="icon" />
    327                 <label for="sspdt_grid" ><?php _e('Grid', 'sspdt'); ?></label>
    328             </th>
    329             <td>
    330                 <input id="grid_width" name="grid_width" type="text" size="4" value="<?php echo $format_options['grid_width']; ?>" />
    331             </td>
    332             <td>
    333                 <input id="grid_height" name="grid_height" type="text" size="4" value="<?php echo $format_options['grid_height']; ?>" />
    334             </td>
    335             <td>
    336                 <input id="grid_quality" name="grid_quality" type="text" size="4" value="<?php echo $format_options['grid_quality']; ?>" />
    337             </td>
    338             <td>
    339                 <input id="grid_crop" name="grid_crop" type="checkbox" value="1" <?php if ( $format_options['grid_crop'] == '1') { echo "checked = 'checked'";}  ?>/>
    340             </td>
    341             <td>
    342                 <input id="grid_sharpen" name="grid_sharpen" type="checkbox" value="1" <?php if ( $format_options['grid_sharpen'] == '1') { echo "checked = 'checked'";}  ?>/>
    343             </td>
    344             <td></td>
    345             <td></td>
    346         </tr>
    347         <tr valign="middle">
    348             <th scope="row"><img class="sspdt_handling_icon"  src="<?php echo $imdir . 'thumb.png'?>" width="20" height="20" alt="icon" />
    349                 <label for="sspdt_thumb"><?php _e('Thumbnail', 'sspdt'); ?></label>
    350             </th>
    351             <td>
    352                 <input id="thumb_width" name="thumb_width" type="text" size="4" value="<?php echo $format_options['thumb_width']; ?>" />
    353             </td>
    354             <td>
    355                 <input id="thumb_height" name="thumb_height" type="text" size="4" value="<?php echo $format_options['thumb_height']; ?>" />
    356             </td>
    357             <td>
    358                 <input id="thumb_quality" name="thumb_quality" type="text" size="4" value="<?php echo $format_options['thumb_quality']; ?>" />
    359             </td>
    360             <td>
    361                 <input id="thumb_crop" name="thumb_crop" type="checkbox" value="1" <?php if ( $format_options['thumb_crop'] == '1') { echo "checked = 'checked'";}  ?>/>
    362             </td>
    363             <td>
    364                 <input id="thumb_sharpen" name="thumb_sharpen" type="checkbox" value="1" <?php if ( $format_options['thumb_sharpen'] == '1') { echo "checked = 'checked'";}  ?>/>
    365             </td>
    366             <td>
    367                 <select id="thumb_align" name="thumb_align">
    368                     <option value="alignnone" <?php if($format_options['thumb_align'] == 'alignnone') {echo "selected";} ?> ><?php _e('none', 'sspdt'); ?></option>
    369                     <option value="alignleft" <?php if($format_options['thumb_align'] == 'alignleft') {echo "selected";} ?> ><?php _e('left', 'sspdt'); ?></option>
    370                     <option value="aligncenter" <?php if($format_options['thumb_align'] == 'aligncenter') {echo "selected";} ?> ><?php _e('center', 'sspdt'); ?></option>
    371                     <option value="alignright" <?php if($format_options['thumb_align'] == 'alignright') {echo "selected";} ?> ><?php _e('right', 'sspdt'); ?></option>
    372                 </select>
    373             </td>
    374             <td>
    375                 <input id="thumb_caption" name="thumb_caption" type="checkbox" value="1" <?php if ( $format_options['thumb_caption'] == '1') { echo "checked = 'checked'";}  ?>/>
    376             </td>
    377         </tr>
    378         <tr valign="middle">
    379             <th scope="row"><img class="sspdt_handling_icon"  src="<?php echo $imdir . 'large.png'?>" width="20" height="20" alt="icon" />
    380                 <label for="sspdt_large"><?php _e('Image', 'sspdt'); ?></label>
    381             </th>
    382             <td>
    383                 <input id="large_width" name="large_width" type="text" size="4" value="<?php echo $format_options['large_width']; ?>" />
    384             </td>
    385             <td>
    386                 <input id="large_height" name="large_height" type="text" size="4" value="<?php echo $format_options['large_height']; ?>" />
    387             </td>
    388             <td>
    389                 <input id="large_quality" name="large_quality" type="text" size="4" value="<?php echo $format_options['large_quality']; ?>" />
    390             </td>
    391             <td>
    392                 <input id="large_crop" name="large_crop" type="checkbox" value="1" <?php if ( $format_options['large_crop'] == '1') { echo "checked = 'checked'";}  ?>/>
    393             </td>
    394             <td>
    395                 <input id="large_sharpen" name="large_sharpen" type="checkbox" value="1" <?php if ( $format_options['large_sharpen'] == '1') { echo "checked = 'checked'";}  ?>/>
    396             </td>
    397             <td></td>
    398             <td>
    399                 <input id="titleShow" name="titleShow" type="checkbox" value="1" <?php if ( $fb['titleShow'] == '1') { echo "checked = 'checked'";}  ?>/>
    400             </td>
    401         </tr>
    402 
    403         </tbody>
    404         <tfoot>
    405             <tr valign="middle" >
    406                 <th>&nbsp;</th>
    407                 <th>&nbsp;</th>
    408                 <th>&nbsp;</th>
    409                 <th>&nbsp;</th>
    410                 <th>&nbsp;</th>
    411                 <th>&nbsp;</th>
    412                 <th>&nbsp;</th>
    413                 <th>&nbsp;</th>
    414             </tr>
    415         </tfoot>
    416     </table>
    417    
    418     <h3><?php _e('Photo Grid Defaults', 'sspdt'); ?></h3>
    419     <p><i><?php _e('Default settings for SSP Director Photo Grids.', 'sspdt'); ?><br/>
    420     <?php _e('These settings can be overridden by the photo grid shortcode [sspd] attributes.', 'sspdt'); ?></i></p>
    421     <table class="form-table">
    422         <tr valign="middle">
    423             <th scope="row">
    424                 <label for="model"><?php _e('Scope', 'sspdt'); ?></label>
    425             </th>
    426             <td>
    427                 <select id="model" name="model" style="min-width:120px;" onchange="model_on_change();">
    428                     <option value="null" <?php if($defaults['model'] == 'null') {echo "selected";} ?> ><?php _e('-- Not specified --', 'sspdt')?></option>
    429                     <option value="gallery" <?php if($defaults['model'] == 'gallery') {echo "selected";} ?> ><?php _e('Gallery', 'sspdt'); ?></option>
    430                     <option value="album" <?php if($defaults['model'] == 'album') {echo "selected";} ?> ><?php _e('Album', 'sspdt'); ?></option>
    431                 </select>
    432                 ID <input id="model_id" name="model_id" size="4" type="text" value="<?php echo $defaults['model_id']; ?>" <?php if($defaults['model'] == null || $defaults['model'] == 'null') {echo "disabled";} ?>/>
    433             </td>
    434         </tr>
    435         <tr valign="middle">
    436             <th scope="row">
    437                 <label for="limit"><?php _e('Limit', 'sspdt'); ?></label>
    438             </th>
    439             <td>
    440                 <input id="limit" name="limit" type="text" size="4" value="<?php echo $defaults['limit']; ?>" />
    441                 <i><?php _e('Leave blank if no limit should be specified.', 'sspdt');?></i>
    442             </td>
    443         </tr>
    444         <tr valign="middle">
    445             <th scope="row">
    446                 <label for="tags"><?php _e('Tags', 'sspdt'); ?></label>
    447             </th>
    448             <td>
    449                 <input id="tags" name="tags" type="text" size="40" value="<?php echo $defaults['tags']; ?>" onkeypress="tags_on_change();" onblur="tags_on_change();" />
    450                 <select id="tagmode" name="tagmode" <?php if($defaults['tags'] == null || $defaults['tags'] == '') {echo "disabled";} ?> >
    451                     <option value="all" <?php if($defaults['tagmode'] == 'all') {echo "selected";} ?> ><?php _e('all', 'sspdt'); ?></option>
    452                     <option value="one" <?php if($defaults['tagmode'] == 'one') {echo "selected";} ?> ><?php _e('one', 'sspdt'); ?></option>
    453                 </select>
    454                 <i><?php _e('Leave blank if no tags should be specified.', 'sspdt'); ?></i>
    455             </td>
    456         </tr>
    457         <tr valign="middle">
    458             <th scope="row">
    459                 <label for="sort_on"><?php _e('Sort', 'sspdt'); ?></label>
    460             </th>
    461             <td>
    462                 <select id="sort_on" name="sort_on" style="min-width:120px;" onchange="sort_on_change();">
    463                     <option value="null" <?php if($defaults['sort_on'] == 'null') {echo "selected";} ?> ><?php _e('-- Not specified --', 'sspdt'); ?></option>
    464                     <option value="created_on" <?php if($defaults['sort_on'] == 'created_on') {echo "selected";} ?> ><?php _e('Creation Date', 'sspdt'); ?></option>
    465                     <option value="captured_on" <?php if($defaults['sort_on'] == 'captured_on') {echo "selected";} ?> ><?php _e('Capture Date', 'sspdt'); ?></option>
    466                     <option value="modified_on" <?php if($defaults['sort_on'] == 'modified_on') {echo "selected";} ?> ><?php _e('Modification Date', 'sspdt'); ?></option>
    467                     <option value="filename" <?php if($defaults['sort_on'] == 'filename') {echo "selected";} ?> ><?php _e('File Name', 'sspdt'); ?></option>
    468                     <option value="random" <?php if($defaults['sort_on'] == 'random') {echo "selected";} ?> ><?php _e('Random', 'sspdt'); ?></option>
    469                 </select>
    470                 <select id="sort_direction" name="sort_direction" style="min-width:80px;" <?php if($defaults['sort_on'] == 'null' || $defaults['sort_on'] == null || $defaults['sort_on'] == 'random') {echo "disabled";} ?> >
    471                     <option value="ASC" <?php if($defaults['sort_direction'] == 'ASC') {echo "selected";} ?> ><?php _e('ascending', 'sspdt'); ?></option>
    472                     <option value="DESC" <?php if($defaults['sort_direction'] == 'DESC') {echo "selected";} ?> ><?php _e('descending', 'sspdt'); ?></option>
    473                 </select>
    474             </td>
    475         </tr>
    476         <tr valign="middle">
    477             <th scope="row">
    478                 <label for="rss"><?php _e('Photo Feed', 'sspdt'); ?></label>
    479             </th>
    480             <td>
    481                 <input id="rss" name="rss" type="checkbox" value="1" <?php if($defaults['rss'] == "1")  { echo "checked = 'checked'";} ?> /> <?php _e('Show a link to a photo feed for gallery images.', 'sspdt'); ?>
    482             </td>
    483         </tr>
    484     </table>
    485    
    486     <h3><?php _e('Presentation', 'sspdt'); ?></h3>
    487     <p><i><?php _e('FancyBox settings for image presentation.', 'sspdt'); ?></i></p>
    488     <table class="form-table">
    489         <tr valign="middle">
    490             <th scope="row">
    491                 <label><?php _e('Box', 'sspdt'); ?></label>
    492             </th>
    493             <td>
    494                 <?php _e('Padding', 'sspdt');?>
    495                 <input id="padding" name="padding" type="text" size="2" value="<?php echo $fb['padding']; ?>"/>px
    496                 <span style="margin-left: 20px;"><?php _e('Margin', 'sspdt'); ?></span>
    497                 <input id="margin" name="margin" type="text" size="2" value="<?php echo $fb['margin']; ?>"/>px
    498             </td>
    499         </tr>
    500         <tr valign="middle">
    501             <th scope="row">
    502                 <label for="fb_title"><?php _e('Caption', 'sspdt'); ?></label>
    503             </th>
    504             <td>
    505                 <?php _e('Position:', 'sspdt'); ?>
    506                 <select id="titlePosition" name="titlePosition">
    507                     <option value="outside" <?php if($fb['titlePosition'] == 'outside') {echo "selected";} ?> ><?php _e('outside frame', 'sspdt'); ?></option>
    508                     <option value="inside" <?php if($fb['titlePosition'] == 'inside') {echo "selected";} ?> ><?php _e('inside frame', 'sspdt'); ?></option>
    509                     <option value="over" <?php if($fb['titlePosition'] == 'over') {echo "selected";} ?> ><?php _e('over image', 'sspdt'); ?></option>
    510                 </select>
    511             </td>
    512         </tr>
    513         <tr valign="middle">
    514             <th>
    515                 <label for="fb_overlay"><?php _e('Overlay', 'sspdt'); ?></label>
    516             </th>
    517             <td>
    518                 <input id="overlayShow" name="overlayShow" type="checkbox" value="1" <?php if($fb['overlayShow'] == "1")  { echo "checked = 'checked'";} ?> />
    519                 <?php _e('Show overlay', 'sspdt'); ?>
    520                 <span style="margin-left: 20px;"><?php _e('Opacity:', 'sspdt'); ?> </span>
    521                 <select id="overlayOpacity" name="overlayOpacity">
    522                     <option value="0" <?php if($fb['overlayOpacity'] == '0') {echo "selected";} ?> >0</option>
    523                     <option value="0.1" <?php if($fb['overlayOpacity'] == '0.1') {echo "selected";} ?> >0.1</option>
    524                     <option value="0.2" <?php if($fb['overlayOpacity'] == '0.2') {echo "selected";} ?> >0.2</option>
    525                     <option value="0.3" <?php if($fb['overlayOpacity'] == '0.3') {echo "selected";} ?> >0.3</option>
    526                     <option value="0.4" <?php if($fb['overlayOpacity'] == '0.4') {echo "selected";} ?> >0.4</option>
    527                     <option value="0.5" <?php if($fb['overlayOpacity'] == '0.5') {echo "selected";} ?> >0.5</option>
    528                     <option value="0.6" <?php if($fb['overlayOpacity'] == '0.6') {echo "selected";} ?> >0.6</option>
    529                     <option value="0.7" <?php if($fb['overlayOpacity'] == '0.7') {echo "selected";} ?> >0.7</option>
    530                     <option value="0.8" <?php if($fb['overlayOpacity'] == '0.8') {echo "selected";} ?> >0.8</option>
    531                     <option value="0.9" <?php if($fb['overlayOpacity'] == '0.9') {echo "selected";} ?> >0.9</option>
    532                     <option value="1" <?php if($fb['overlayOpacity'] == '1') {echo "selected";} ?> >1</option>
    533                 </select>
    534                 <span style="margin-left: 20px;"><?php _e('Color:', 'sspdt'); ?></span>
    535                 <input type="text" id="overlayColor" name="overlayColor" value="<?php echo $fb['overlayColor'];?>" size="8"/>
    536             </td>
    537         </tr>
    538         <tr valign="middle">
    539             <th>
    540                 <label><?php _e('Navigation', 'sspdt'); ?></label>
    541             </th>
    542             <td>
    543                 <p><input type="checkbox" id="cyclic" name="cyclic" value="1" <?php if($fb['cyclic'] == "1")  { echo "checked = 'checked'";} ?> /> <?php _e('Cyclic navigation', 'sspdt'); ?></p>
    544                 <p><input type ="checkbox" id="showCloseButton" name="showCloseButton" value="1" <?php if($fb['showCloseButton'] == "1")  { echo "checked = 'checked'";} ?>/> <?php _e('Show close button', 'sspdt'); ?></p>
    545                 <p><input type="checkbox" id="showNavArrows" name="showNavArrows" value="1" <?php if($fb['showNavArrows'] == "1")  { echo "checked = 'checked'";} ?> /> <?php _e('Show navigation arrows', 'sspdt'); ?></p>
    546                 <p><input type="checkbox" id="enableEscapeButton" name="enableEscapeButton" value="1" <?php if($fb['enableEscapeButton'] == "1")  { echo "checked = 'checked'";} ?> /> <?php _e('Enable ESC key', 'sspdt'); ?></p>
    547             </td>
    548         </tr>
    549         <tr valign="middle">
    550             <th>
    551                 <label><?php _e('Transitions', 'sspdt'); ?></label>
    552             </th>
    553             <td>
    554                     <p>
    555                     <?php _e('In:', 'sspdt'); ?>
    556                     <select id="transitionIn" name="transitionIn">
    557                         <option value="none" <?php if($fb['transitionIn'] == 'none') {echo "selected";} ?>><?php _e('none', 'sspdt'); ?></option>
    558                         <option value="fade" <?php if($fb['transitionIn'] == 'fade') {echo "selected";} ?>><?php _e('fade', 'sspdt'); ?></option>
    559                         <option value="elastic" <?php if($fb['transitionIn'] == 'elastic') {echo "selected";} ?>><?php _e('elastic', 'sspdt'); ?></option>
     254    <h2>
     255    <?php _e('SlideShowPro Director Tools', 'sspdt'); ?>
     256    </h2>
     257    <div class="narrow">
     258        <form action="" method="post" id="sspdt-conf">
     259
     260        <?php sspdt_nonce_field($sspdt_nonce); ?>
     261
     262            <h3>
     263            <?php _e('API Settings', 'sspdt'); ?>
     264            </h3>
     265            <p>
     266                <i><?php _e('The settings can be found on the "System Info" page of your SlideShowPro Director installation.', 'sspdt'); ?>
     267                </i>
     268            </p>
     269
     270            <table class="form-table">
     271                <tr valign="middle">
     272                    <th scope="row"><label for="sspdt_api_key"><?php _e('API Key', 'sspdt'); ?>
     273                    </label>
     274                    </th>
     275                    <td><input id="sspdt_api_key" name="sspdt_api_key" type="text"
     276                        size="60" value="<?php echo get_option('sspdt_api_key'); ?>" />
     277                    </td>
     278                </tr>
     279                <tr>
     280                    <th scope="row"><label for="sspdt_api_path"><?php _e('API Path', 'sspdt'); ?>
     281                    </label>
     282                    </th>
     283                    <td><input id="sspdt_api_path" name="sspdt_api_path" type="text"
     284                        size="60" value="<?php echo get_option('sspdt_api_path'); ?>" />
     285                    </td>
     286                </tr>
     287            </table>
     288
     289            <?php if (!is_writable ( realpath(dirname(__FILE__)) . '/api/cache' )) {
     290                $disable_cache = 1;
     291                update_option('sspdt_api_cache', '0');
     292                echo "<div class='updated fade'><p><strong>";
     293                _e('Caching disabled', 'sspdt');
     294                echo "</strong></p><p>";
     295                printf( __( "Your cache directory %s is not writable.", "sspdt"), "<code>". realpath(dirname(__FILE__)) ."/api/cache</code>");
     296                echo "<br />";
     297                _e("You must allow your web server to write to it in order to enable caching.", "sspdt" );
     298                echo "</p></div>";
     299            }?>
     300
     301            <table class="form-table">
     302                <tr valign="middle">
     303                    <th scope="row"><label for="sspdt_api_cache"><?php _e('API Cache', 'sspdt'); ?>
     304                    </label>
     305                    </th>
     306                    <td><input style='margin-right: 6px;'
     307            <?php if ($disable_cache == 1) { echo "DISABLED";} ?>
     308                        id="sspdt_api_cache" name="sspdt_api_cache" type="checkbox"
     309                        value="1"
     310                        <?php if (get_option('sspdt_api_cache') == '1') {echo "checked = 'checked'";} ?> />
     311                        <?php _e('API Cache activated', 'sspdt'); ?><i
     312                        style='margin-left: 20px;'><?php _e('The API cache can improve performance dramatically.', 'sspdt'); ?>
     313                    </i><br />
     314                    </td>
     315                </tr>
     316            </table>
     317
     318            <h3>
     319            <?php _e('Photo Feed Options', 'sspdt'); ?>
     320            </h3>
     321            <p>
     322                <i><?php _e('Needed, if you want to use the photo feed functionality.', 'sspdt'); ?>
     323                </i>
     324            </p>
     325            <table class="form-table">
     326                <tr valign="middle">
     327                    <th scope="row"><label for="feed_url"><?php _e('Photo Feed URL', 'sspdt'); ?>
     328                    </label></th>
     329                    <td><input id="feed_url" name="feed_url" type="text" size="60"
     330                        value="<?php echo $feed_options['feed_url']; ?>" /><br/><i> <?php _e('Path to the photo feed installation with tailing slash.', 'sspdt'); ?></i></td>
     331                </tr>
     332                <tr valign="middle">
     333                    <th scope="row"><label for="secret"><?php _e('Secret', 'sspdt'); ?>
     334                    </label></th>
     335                    <td><input id="secret" name="secret" type="text" size="60"
     336                        value="<?php echo $feed_options['secret']; ?>" /><br/><i> <?php _e('Enter the same secret as in the config.php file of your photo feed installation.', 'sspdt'); ?></i></td>
     337                </tr>
     338            </table>
     339
     340            <h3>
     341            <?php _e('Image Sizes an Handling', 'sspdt'); ?>
     342            </h3>
     343            <p>
     344                <i><?php _e('Define image sizes, quality and cropping.', 'sspdt'); ?>
     345                </i>
     346            </p>
     347            <table class="wp-list-table widefat" cellspacing="0">
     348                <thead>
     349                    <tr valign="middle">
     350                        <th>&nbsp;</th>
     351                        <th class="manage-column"><?php _e('Width', 'sspdt'); ?></th>
     352                        <th class="manage-column"><?php _e('Height', 'sspdt'); ?></th>
     353                        <th class="manage-column"><?php _e('Quality', 'sspdt'); ?></th>
     354                        <th class="manage-column"><?php _e('Cropping', 'sspdt'); ?></th>
     355                        <th class="manage-column"><?php _e('Sharpening', 'sspdt'); ?></th>
     356                        <th class="manage-column"><?php _e('Alignment', 'sspdt'); ?></th>
     357                        <th class="manage-column"><?php _e('Caption', 'sspdt'); ?></th>
     358                    </tr>
     359                </thead>
     360                <tbody>
     361                    <tr valign="middle">
     362                        <th scope="row"><img class="sspdt_handling_icon"
     363                            src="<?php echo $imdir . 'grid.png'?>" width="20" height="20"
     364                            alt="icon" /> <label for="sspdt_grid"><?php _e('Grid', 'sspdt'); ?>
     365                        </label>
     366                        </th>
     367                        <td><input id="grid_width" name="grid_width" type="text" size="4"
     368                            value="<?php echo $format_options['grid_width']; ?>" />
     369                        </td>
     370                        <td><input id="grid_height" name="grid_height" type="text"
     371                            size="4" value="<?php echo $format_options['grid_height']; ?>" />
     372                        </td>
     373                        <td><input id="grid_quality" name="grid_quality" type="text"
     374                            size="4" value="<?php echo $format_options['grid_quality']; ?>" />
     375                        </td>
     376                        <td><input id="grid_crop" name="grid_crop" type="checkbox"
     377                            value="1"
     378                            <?php if ( $format_options['grid_crop'] == '1') { echo "checked = 'checked'";}  ?> />
     379                        </td>
     380                        <td><input id="grid_sharpen" name="grid_sharpen" type="checkbox"
     381                            value="1"
     382                            <?php if ( $format_options['grid_sharpen'] == '1') { echo "checked = 'checked'";}  ?> />
     383                        </td>
     384                        <td></td>
     385                        <td></td>
     386                    </tr>
     387                    <tr valign="middle">
     388                        <th scope="row"><img class="sspdt_handling_icon"
     389                            src="<?php echo $imdir . 'thumb.png'?>" width="20" height="20"
     390                            alt="icon" /> <label for="sspdt_thumb"><?php _e('Thumbnail', 'sspdt'); ?>
     391                        </label>
     392                        </th>
     393                        <td><input id="thumb_width" name="thumb_width" type="text"
     394                            size="4" value="<?php echo $format_options['thumb_width']; ?>" />
     395                        </td>
     396                        <td><input id="thumb_height" name="thumb_height" type="text"
     397                            size="4" value="<?php echo $format_options['thumb_height']; ?>" />
     398                        </td>
     399                        <td><input id="thumb_quality" name="thumb_quality" type="text"
     400                            size="4" value="<?php echo $format_options['thumb_quality']; ?>" />
     401                        </td>
     402                        <td><input id="thumb_crop" name="thumb_crop" type="checkbox"
     403                            value="1"
     404                            <?php if ( $format_options['thumb_crop'] == '1') { echo "checked = 'checked'";}  ?> />
     405                        </td>
     406                        <td><input id="thumb_sharpen" name="thumb_sharpen" type="checkbox"
     407                            value="1"
     408                            <?php if ( $format_options['thumb_sharpen'] == '1') { echo "checked = 'checked'";}  ?> />
     409                        </td>
     410                        <td><select id="thumb_align" name="thumb_align">
     411                                <option value="alignnone"
     412                                <?php if($format_options['thumb_align'] == 'alignnone') {echo "selected";} ?>>
     413                                    <?php _e('none', 'sspdt'); ?>
     414                                </option>
     415                                <option value="alignleft"
     416                                <?php if($format_options['thumb_align'] == 'alignleft') {echo "selected";} ?>>
     417                                    <?php _e('left', 'sspdt'); ?>
     418                                </option>
     419                                <option value="aligncenter"
     420                                <?php if($format_options['thumb_align'] == 'aligncenter') {echo "selected";} ?>>
     421                                    <?php _e('center', 'sspdt'); ?>
     422                                </option>
     423                                <option value="alignright"
     424                                <?php if($format_options['thumb_align'] == 'alignright') {echo "selected";} ?>>
     425                                    <?php _e('right', 'sspdt'); ?>
     426                                </option>
     427                        </select>
     428                        </td>
     429                        <td><input id="thumb_caption" name="thumb_caption" type="checkbox"
     430                            value="1"
     431                            <?php if ( $format_options['thumb_caption'] == '1') { echo "checked = 'checked'";}  ?> />
     432                        </td>
     433                    </tr>
     434                    <tr valign="middle">
     435                        <th scope="row"><img class="sspdt_handling_icon"
     436                            src="<?php echo $imdir . 'large.png'?>" width="20" height="20"
     437                            alt="icon" /> <label for="sspdt_large"><?php _e('Image', 'sspdt'); ?>
     438                        </label>
     439                        </th>
     440                        <td><input id="large_width" name="large_width" type="text"
     441                            size="4" value="<?php echo $format_options['large_width']; ?>" />
     442                        </td>
     443                        <td><input id="large_height" name="large_height" type="text"
     444                            size="4" value="<?php echo $format_options['large_height']; ?>" />
     445                        </td>
     446                        <td><input id="large_quality" name="large_quality" type="text"
     447                            size="4" value="<?php echo $format_options['large_quality']; ?>" />
     448                        </td>
     449                        <td><input id="large_crop" name="large_crop" type="checkbox"
     450                            value="1"
     451                            <?php if ( $format_options['large_crop'] == '1') { echo "checked = 'checked'";}  ?> />
     452                        </td>
     453                        <td><input id="large_sharpen" name="large_sharpen" type="checkbox"
     454                            value="1"
     455                            <?php if ( $format_options['large_sharpen'] == '1') { echo "checked = 'checked'";}  ?> />
     456                        </td>
     457                        <td></td>
     458                        <td><input id="titleShow" name="titleShow" type="checkbox"
     459                            value="1"
     460                            <?php if ( $fb['titleShow'] == '1') { echo "checked = 'checked'";}  ?> />
     461                        </td>
     462                    </tr>
     463
     464                </tbody>
     465                <tfoot>
     466                    <tr valign="middle">
     467                        <th>&nbsp;</th>
     468                        <th>&nbsp;</th>
     469                        <th>&nbsp;</th>
     470                        <th>&nbsp;</th>
     471                        <th>&nbsp;</th>
     472                        <th>&nbsp;</th>
     473                        <th>&nbsp;</th>
     474                        <th>&nbsp;</th>
     475                    </tr>
     476                </tfoot>
     477            </table>
     478
     479            <h3>
     480            <?php _e('Photo Grid Defaults', 'sspdt'); ?>
     481            </h3>
     482            <p>
     483                <i><?php _e('Default settings for SSP Director Photo Grids.', 'sspdt'); ?><br />
     484                <?php _e('These settings can be overridden by the photo grid shortcode [sspd] attributes.', 'sspdt'); ?>
     485                </i>
     486            </p>
     487            <table class="form-table">
     488                <tr valign="middle">
     489                    <th scope="row"><label for="model"><?php _e('Scope', 'sspdt'); ?> </label>
     490                    </th>
     491                    <td><select id="model" name="model" style="min-width: 120px;"
     492                        onchange="model_on_change();">
     493                            <option value="null"
     494                            <?php if($defaults['model'] == 'null') {echo "selected";} ?>>
     495                                <?php _e('-- Not specified --', 'sspdt')?>
     496                            </option>
     497                            <option value="gallery"
     498                            <?php if($defaults['model'] == 'gallery') {echo "selected";} ?>>
     499                                <?php _e('Gallery', 'sspdt'); ?>
     500                            </option>
     501                            <option value="album"
     502                            <?php if($defaults['model'] == 'album') {echo "selected";} ?>>
     503                                <?php _e('Album', 'sspdt'); ?>
     504                            </option>
     505                    </select> ID <input id="model_id" name="model_id" size="4"
     506                        type="text" value="<?php echo $defaults['model_id']; ?>"
     507                        <?php if($defaults['model'] == null || $defaults['model'] == 'null') {echo "disabled";} ?> />
     508                    </td>
     509                </tr>
     510                <tr valign="middle">
     511                    <th scope="row"><label for="limit"><?php _e('Limit', 'sspdt'); ?> </label>
     512                    </th>
     513                    <td><input id="limit" name="limit" type="text" size="4"
     514                        value="<?php echo $defaults['limit']; ?>" /><br/><i><?php _e('Leave blank if no limit should be specified.', 'sspdt');?>
     515                    </i>
     516                    </td>
     517                </tr>
     518                <tr valign="middle">
     519                    <th scope="row"><label for="tags"><?php _e('Tags', 'sspdt'); ?> </label>
     520                    </th>
     521                    <td><input id="tags" name="tags" type="text" size="40"
     522                        value="<?php echo $defaults['tags']; ?>"
     523                        onkeypress="tags_on_change();" onblur="tags_on_change();" /> <select
     524                        id="tagmode" name="tagmode"
     525                        <?php if($defaults['tags'] == null || $defaults['tags'] == '') {echo "disabled";} ?>>
     526                            <option value="all"
     527                            <?php if($defaults['tagmode'] == 'all') {echo "selected";} ?>>
     528                                <?php _e('all', 'sspdt'); ?>
     529                            </option>
     530                            <option value="one"
     531                            <?php if($defaults['tagmode'] == 'one') {echo "selected";} ?>>
     532                                <?php _e('one', 'sspdt'); ?>
     533                            </option>
     534                    </select><br/><i><?php _e('Leave blank if no tags should be specified.', 'sspdt'); ?>
     535                    </i>
     536                    </td>
     537                </tr>
     538                <tr valign="middle">
     539                    <th scope="row"><label for="sort_on"><?php _e('Sort', 'sspdt'); ?>
     540                    </label>
     541                    </th>
     542                    <td><select id="sort_on" name="sort_on" style="min-width: 120px;"
     543                        onchange="sort_on_change();">
     544                            <option value="null"
     545                            <?php if($defaults['sort_on'] == 'null') {echo "selected";} ?>>
     546                                <?php _e('-- Not specified --', 'sspdt'); ?>
     547                            </option>
     548                            <option value="created_on"
     549                            <?php if($defaults['sort_on'] == 'created_on') {echo "selected";} ?>>
     550                                <?php _e('Creation Date', 'sspdt'); ?>
     551                            </option>
     552                            <option value="captured_on"
     553                            <?php if($defaults['sort_on'] == 'captured_on') {echo "selected";} ?>>
     554                                <?php _e('Capture Date', 'sspdt'); ?>
     555                            </option>
     556                            <option value="modified_on"
     557                            <?php if($defaults['sort_on'] == 'modified_on') {echo "selected";} ?>>
     558                                <?php _e('Modification Date', 'sspdt'); ?>
     559                            </option>
     560                            <option value="filename"
     561                            <?php if($defaults['sort_on'] == 'filename') {echo "selected";} ?>>
     562                                <?php _e('File Name', 'sspdt'); ?>
     563                            </option>
     564                            <option value="random"
     565                            <?php if($defaults['sort_on'] == 'random') {echo "selected";} ?>>
     566                                <?php _e('Random', 'sspdt'); ?>
     567                            </option>
     568                    </select> <select id="sort_direction" name="sort_direction"
     569                        style="min-width: 80px;"
     570                                <?php if($defaults['sort_on'] == 'null' || $defaults['sort_on'] == null || $defaults['sort_on'] == 'random') {echo "disabled";} ?>>
     571                            <option value="ASC"
     572                            <?php if($defaults['sort_direction'] == 'ASC') {echo "selected";} ?>>
     573                                <?php _e('ascending', 'sspdt'); ?>
     574                            </option>
     575                            <option value="DESC"
     576                            <?php if($defaults['sort_direction'] == 'DESC') {echo "selected";} ?>>
     577                                <?php _e('descending', 'sspdt'); ?>
     578                            </option>
    560579                    </select>
    561                     <span style="margin-left: 20px;"><?php _e('Speed:', 'sspdt'); ?> </span>
    562                     <input id="speedIn" name="speedIn" type="text" size="4" value="<?php echo $fb['speedIn']; ?>" />ms
    563                     <span style="margin-left: 20px;"><?php _e('Easing:', 'sspdt'); ?> </span>
    564                     <select id="easingIn" name="easingIn">
    565                         <option value="linear" <?php if($fb['easingIn'] == 'linear') {echo "selected";} ?>><?php _e('Linear', 'sspdt'); ?></option>
    566                         <option value="swing" <?php if($fb['easingIn'] == 'swing') {echo "selected";} ?>><?php _e('Swing', 'sspdt'); ?></option>
     580                    </td>
     581                </tr>
     582                <tr valign="middle">
     583                    <th scope="row"><label for="rss"><?php _e('Photo Feed', 'sspdt'); ?>
     584                    </label>
     585                    </th>
     586                    <td><input id="rss" name="rss" type="checkbox" value="1"
     587                    <?php if($defaults['rss'] == "1")  { echo "checked = 'checked'";} ?> />
     588                    <?php _e('Show a link to a photo feed for gallery images.', 'sspdt'); ?>
     589                    </td>
     590                </tr>
     591            </table>
     592
     593            <h3>
     594            <?php _e('Presentation', 'sspdt'); ?>
     595            </h3>
     596            <p>
     597                <i><?php _e('FancyBox settings for image presentation.', 'sspdt'); ?>
     598                </i>
     599            </p>
     600            <table class="form-table">
     601                <tr valign="middle">
     602                    <th scope="row"><label><?php _e('Box', 'sspdt'); ?> </label>
     603                    </th>
     604                    <td><?php _e('Padding', 'sspdt');?> <input id="padding"
     605                        name="padding" type="text" size="2"
     606                        value="<?php echo $fb['padding']; ?>" />px <span
     607                        style="margin-left: 20px;"><?php _e('Margin', 'sspdt'); ?> </span>
     608                        <input id="margin" name="margin" type="text" size="2"
     609                        value="<?php echo $fb['margin']; ?>" />px</td>
     610                </tr>
     611                <tr valign="middle">
     612                    <th scope="row"><label for="fb_title"><?php _e('Caption', 'sspdt'); ?>
     613                    </label>
     614                    </th>
     615                    <td><?php _e('Position:', 'sspdt'); ?> <select id="titlePosition"
     616                        name="titlePosition">
     617                            <option value="outside"
     618                            <?php if($fb['titlePosition'] == 'outside') {echo "selected";} ?>>
     619                                <?php _e('outside frame', 'sspdt'); ?>
     620                            </option>
     621                            <option value="inside"
     622                            <?php if($fb['titlePosition'] == 'inside') {echo "selected";} ?>>
     623                                <?php _e('inside frame', 'sspdt'); ?>
     624                            </option>
     625                            <option value="over"
     626                            <?php if($fb['titlePosition'] == 'over') {echo "selected";} ?>>
     627                                <?php _e('over image', 'sspdt'); ?>
     628                            </option>
    567629                    </select>
    568                     </p><p>
    569                     <?php _e('Out:', 'sspdt'); ?>
    570                     <select id="transitionOut" name="transitionOut">
    571                         <option value="none" <?php if($fb['transitionOut'] == 'none') {echo "selected";} ?>><?php _e('none', 'sspdt'); ?></option>
    572                         <option value="fade" <?php if($fb['transitionOut'] == 'fade') {echo "selected";} ?>><?php _e('fade', 'sspdt'); ?></option>
    573                         <option value="elastic" <?php if($fb['transitionOut'] == 'elastic') {echo "selected";} ?>><?php _e('elastic', 'sspdt'); ?></option>
    574                     </select>
    575                     <span style="margin-left: 20px;"><?php _e('Speed:', 'sspdt'); ?> </span>
    576                     <input id="speedOut" name="speedOut" type="text" size="4" value="<?php echo $fb['speedOut']; ?>" />ms
    577                     <span style="margin-left: 20px;"><?php _e('Easing:', 'sspdt'); ?> </span>
    578                     <select id="easingOut" name="easingOut">
    579                         <option value="linear" <?php if($fb['easingOut'] == 'linear') {echo "selected";} ?>><?php _e('Linear', 'sspdt'); ?></option>
    580                         <option value="swing" <?php if($fb['easingOut'] == 'swing') {echo "selected";} ?>><?php _e('Swing', 'sspdt'); ?></option>
    581                     </select>
    582                     </p><p>
    583                     <?php _e('Change speed:', 'sspdt'); ?>
    584                     <input id="changeSpeed" name="changeSpeed" type="text" size="4" value="<?php echo $fb['changeSpeed']; ?>" />ms <i style="margin-left: 20px;"><?php _e('Speed of resizing when changing gallery items, in milliseconds', 'sspdt'); ?></i>
    585                     </p>
    586             </td>
    587         </tr>
    588        
    589     </table>
    590 
    591 
    592     <p class="submit"><input type="submit" name="submit" class="button-primary" value="<?php _e('Update settings', 'sspdt'); ?>" /></p>
    593 </form>
    594 
    595 </div>
    596 
    597    
     630                    </td>
     631                </tr>
     632                <tr valign="middle">
     633                    <th><label for="fb_overlay"><?php _e('Overlay', 'sspdt'); ?> </label>
     634                    </th>
     635                    <td><input id="overlayShow" name="overlayShow" type="checkbox"
     636                        value="1"
     637                        <?php if($fb['overlayShow'] == "1")  { echo "checked = 'checked'";} ?> />
     638                        <?php _e('Show overlay', 'sspdt'); ?> <span
     639                        style="margin-left: 20px;"><?php _e('Opacity:', 'sspdt'); ?> </span>
     640                        <select id="overlayOpacity" name="overlayOpacity">
     641                            <option value="0"
     642                            <?php if($fb['overlayOpacity'] == '0') {echo "selected";} ?>>0</option>
     643                            <option value="0.1"
     644                            <?php if($fb['overlayOpacity'] == '0.1') {echo "selected";} ?>>0.1</option>
     645                            <option value="0.2"
     646                            <?php if($fb['overlayOpacity'] == '0.2') {echo "selected";} ?>>0.2</option>
     647                            <option value="0.3"
     648                            <?php if($fb['overlayOpacity'] == '0.3') {echo "selected";} ?>>0.3</option>
     649                            <option value="0.4"
     650                            <?php if($fb['overlayOpacity'] == '0.4') {echo "selected";} ?>>0.4</option>
     651                            <option value="0.5"
     652                            <?php if($fb['overlayOpacity'] == '0.5') {echo "selected";} ?>>0.5</option>
     653                            <option value="0.6"
     654                            <?php if($fb['overlayOpacity'] == '0.6') {echo "selected";} ?>>0.6</option>
     655                            <option value="0.7"
     656                            <?php if($fb['overlayOpacity'] == '0.7') {echo "selected";} ?>>0.7</option>
     657                            <option value="0.8"
     658                            <?php if($fb['overlayOpacity'] == '0.8') {echo "selected";} ?>>0.8</option>
     659                            <option value="0.9"
     660                            <?php if($fb['overlayOpacity'] == '0.9') {echo "selected";} ?>>0.9</option>
     661                            <option value="1"
     662                            <?php if($fb['overlayOpacity'] == '1') {echo "selected";} ?>>1</option>
     663                    </select> <span style="margin-left: 20px;"><?php _e('Color:', 'sspdt'); ?>
     664                    </span> <input type="text" id="overlayColor" name="overlayColor"
     665                        value="<?php echo $fb['overlayColor'];?>" size="8" />
     666                    </td>
     667                </tr>
     668                <tr valign="middle">
     669                    <th><label><?php _e('Navigation', 'sspdt'); ?> </label>
     670                    </th>
     671                    <td>
     672                        <p>
     673                            <input type="checkbox" id="cyclic" name="cyclic" value="1"
     674                            <?php if($fb['cyclic'] == "1")  { echo "checked = 'checked'";} ?> />
     675                            <?php _e('Cyclic navigation', 'sspdt'); ?>
     676                        </p>
     677                        <p>
     678                            <input type="checkbox" id="showCloseButton"
     679                                name="showCloseButton" value="1"
     680                                <?php if($fb['showCloseButton'] == "1")  { echo "checked = 'checked'";} ?> />
     681                                <?php _e('Show close button', 'sspdt'); ?>
     682                        </p>
     683                        <p>
     684                            <input type="checkbox" id="showNavArrows" name="showNavArrows"
     685                                value="1"
     686                                <?php if($fb['showNavArrows'] == "1")  { echo "checked = 'checked'";} ?> />
     687                                <?php _e('Show navigation arrows', 'sspdt'); ?>
     688                        </p>
     689                        <p>
     690                            <input type="checkbox" id="enableEscapeButton"
     691                                name="enableEscapeButton" value="1"
     692                                <?php if($fb['enableEscapeButton'] == "1")  { echo "checked = 'checked'";} ?> />
     693                                <?php _e('Enable ESC key', 'sspdt'); ?>
     694                        </p>
     695                    </td>
     696                </tr>
     697                <tr valign="middle">
     698                    <th><label><?php _e('Transitions', 'sspdt'); ?> </label>
     699                    </th>
     700                    <td>
     701                        <p>
     702                        <?php _e('In:', 'sspdt'); ?>
     703                            <select id="transitionIn" name="transitionIn">
     704                                <option value="none"
     705                                <?php if($fb['transitionIn'] == 'none') {echo "selected";} ?>>
     706                                    <?php _e('none', 'sspdt'); ?>
     707                                </option>
     708                                <option value="fade"
     709                                <?php if($fb['transitionIn'] == 'fade') {echo "selected";} ?>>
     710                                    <?php _e('fade', 'sspdt'); ?>
     711                                </option>
     712                                <option value="elastic"
     713                                <?php if($fb['transitionIn'] == 'elastic') {echo "selected";} ?>>
     714                                    <?php _e('elastic', 'sspdt'); ?>
     715                                </option>
     716                            </select> <span style="margin-left: 20px;"><?php _e('Speed:', 'sspdt'); ?>
     717                            </span> <input id="speedIn" name="speedIn" type="text" size="4"
     718                                value="<?php echo $fb['speedIn']; ?>" />ms <span
     719                                style="margin-left: 20px;"><?php _e('Easing:', 'sspdt'); ?> </span>
     720                            <select id="easingIn" name="easingIn">
     721                                <option value="linear"
     722                                <?php if($fb['easingIn'] == 'linear') {echo "selected";} ?>>
     723                                    <?php _e('Linear', 'sspdt'); ?>
     724                                </option>
     725                                <option value="swing"
     726                                <?php if($fb['easingIn'] == 'swing') {echo "selected";} ?>>
     727                                    <?php _e('Swing', 'sspdt'); ?>
     728                                </option>
     729                            </select>
     730                        </p>
     731                        <p>
     732                            <?php _e('Out:', 'sspdt'); ?>
     733                            <select id="transitionOut" name="transitionOut">
     734                                <option value="none"
     735                                <?php if($fb['transitionOut'] == 'none') {echo "selected";} ?>>
     736                                    <?php _e('none', 'sspdt'); ?>
     737                                </option>
     738                                <option value="fade"
     739                                <?php if($fb['transitionOut'] == 'fade') {echo "selected";} ?>>
     740                                    <?php _e('fade', 'sspdt'); ?>
     741                                </option>
     742                                <option value="elastic"
     743                                <?php if($fb['transitionOut'] == 'elastic') {echo "selected";} ?>>
     744                                    <?php _e('elastic', 'sspdt'); ?>
     745                                </option>
     746                            </select> <span style="margin-left: 20px;"><?php _e('Speed:', 'sspdt'); ?>
     747                            </span> <input id="speedOut" name="speedOut" type="text" size="4"
     748                                value="<?php echo $fb['speedOut']; ?>" />ms <span
     749                                style="margin-left: 20px;"><?php _e('Easing:', 'sspdt'); ?> </span>
     750                            <select id="easingOut" name="easingOut">
     751                                <option value="linear"
     752                                <?php if($fb['easingOut'] == 'linear') {echo "selected";} ?>>
     753                                    <?php _e('Linear', 'sspdt'); ?>
     754                                </option>
     755                                <option value="swing"
     756                                <?php if($fb['easingOut'] == 'swing') {echo "selected";} ?>>
     757                                    <?php _e('Swing', 'sspdt'); ?>
     758                                </option>
     759                            </select>
     760                        </p>
     761                        <p>
     762                            <?php _e('Change speed:', 'sspdt'); ?>
     763                            <input id="changeSpeed" name="changeSpeed" type="text" size="4"
     764                                value="<?php echo $fb['changeSpeed']; ?>" />ms <i
     765                                style="margin-left: 20px;"><?php _e('Speed of resizing when changing gallery items, in milliseconds', 'sspdt'); ?>
     766                            </i>
     767                        </p>
     768                    </td>
     769                </tr>
     770
     771            </table>
     772
     773
     774            <p class="submit">
     775                <input type="submit" name="submit" class="button-primary"
     776                    value="<?php _e('Update settings', 'sspdt'); ?>" />
     777            </p>
     778        </form>
     779
     780    </div>
     781
    598782
    599783</div>
    600784<?php
    601 } ?>
     785}
     786?>
  • ssp-director-tools/trunk/js/fancybox/jquery.fancybox-1.3.4.css

    r409223 r409240  
    1515 *   http://www.gnu.org/licenses/gpl.html
    1616 */
    17 
    1817#fancybox-loading {
    1918    position: fixed;
     
    131130}
    132131
    133 #fancybox-left, #fancybox-right {
     132#fancybox-left,#fancybox-right {
    134133    position: absolute;
    135134    bottom: 0px;
     
    151150}
    152151
    153 #fancybox-left-ico, #fancybox-right-ico {
     152#fancybox-left-ico,#fancybox-right-ico {
    154153    position: absolute;
    155154    top: 50%;
     
    173172}
    174173
    175 #fancybox-left:hover, #fancybox-right:hover {
     174#fancybox-left:hover,#fancybox-right:hover {
    176175    visibility: visible; /* IE6 */
    177176}
     
    222221    right: -20px;
    223222    background-image: url('fancybox.png');
    224     background-position: -40px -182px; 
     223    background-position: -40px -182px;
    225224}
    226225
     
    324323
    325324/* IE6 */
    326 
    327 .fancybox-ie6 #fancybox-close { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_close.png', sizingMethod='scale'); }
    328 
    329 .fancybox-ie6 #fancybox-left-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_left.png', sizingMethod='scale'); }
    330 .fancybox-ie6 #fancybox-right-ico { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_nav_right.png', sizingMethod='scale'); }
    331 
    332 .fancybox-ie6 #fancybox-title-over { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_over.png', sizingMethod='scale'); zoom: 1; }
    333 .fancybox-ie6 #fancybox-title-float-left { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_left.png', sizingMethod='scale'); }
    334 .fancybox-ie6 #fancybox-title-float-main { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_main.png', sizingMethod='scale'); }
    335 .fancybox-ie6 #fancybox-title-float-right { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_title_right.png', sizingMethod='scale'); }
    336 
    337 .fancybox-ie6 #fancybox-bg-w, .fancybox-ie6 #fancybox-bg-e, .fancybox-ie6 #fancybox-left, .fancybox-ie6 #fancybox-right, #fancybox-hide-sel-frame {
    338     height: expression(this.parentNode.clientHeight + "px");
     325.fancybox-ie6 #fancybox-close {
     326    background: transparent;
     327    filter: progid : DXImageTransform.Microsoft.AlphaImageLoader ( src =
     328        'fancybox/fancy_close.png', sizingMethod = 'scale' );
     329}
     330
     331.fancybox-ie6 #fancybox-left-ico {
     332    background: transparent;
     333    filter: progid : DXImageTransform.Microsoft.AlphaImageLoader ( src =
     334        'fancybox/fancy_nav_left.png', sizingMethod = 'scale' );
     335}
     336
     337.fancybox-ie6 #fancybox-right-ico {
     338    background: transparent;
     339    filter: progid : DXImageTransform.Microsoft.AlphaImageLoader ( src =
     340        'fancybox/fancy_nav_right.png', sizingMethod = 'scale' );
     341}
     342
     343.fancybox-ie6 #fancybox-title-over {
     344    background: transparent;
     345    filter: progid : DXImageTransform.Microsoft.AlphaImageLoader ( src =
     346        'fancybox/fancy_title_over.png', sizingMethod = 'scale' );
     347    zoom: 1;
     348}
     349
     350.fancybox-ie6 #fancybox-title-float-left {
     351    background: transparent;
     352    filter: progid : DXImageTransform.Microsoft.AlphaImageLoader ( src =
     353        'fancybox/fancy_title_left.png', sizingMethod = 'scale' );
     354}
     355
     356.fancybox-ie6 #fancybox-title-float-main {
     357    background: transparent;
     358    filter: progid : DXImageTransform.Microsoft.AlphaImageLoader ( src =
     359        'fancybox/fancy_title_main.png', sizingMethod = 'scale' );
     360}
     361
     362.fancybox-ie6 #fancybox-title-float-right {
     363    background: transparent;
     364    filter: progid : DXImageTransform.Microsoft.AlphaImageLoader ( src =
     365        'fancybox/fancy_title_right.png', sizingMethod = 'scale' );
     366}
     367
     368.fancybox-ie6 #fancybox-bg-w,.fancybox-ie6 #fancybox-bg-e,.fancybox-ie6 #fancybox-left,.fancybox-ie6 #fancybox-right,#fancybox-hide-sel-frame
     369    {
     370    height: expression(this.parentNode.clientHeight +   "px");
    339371}
    340372
    341373#fancybox-loading.fancybox-ie6 {
    342     position: absolute; margin-top: 0;
    343     top: expression( (-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px');
    344 }
    345 
    346 #fancybox-loading.fancybox-ie6 div  { background: transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_loading.png', sizingMethod='scale'); }
     374    position: absolute;
     375    margin-top: 0;
     376    top: expression(( -20 +   ( document.documentElement.clientHeight ? 
     377        document.documentElement.clientHeight/ 2 : 
     378        document.body.clientHeight/ 2) +   (   ignoreMe = 
     379        document.documentElement.scrollTop ? 
     380        document.documentElement.scrollTop :   document.body.scrollTop ) ) + 
     381        'px' );
     382}
     383
     384#fancybox-loading.fancybox-ie6 div {
     385    background: transparent;
     386    filter: progid : DXImageTransform.Microsoft.AlphaImageLoader ( src =
     387        'fancybox/fancy_loading.png', sizingMethod = 'scale' );
     388}
    347389
    348390/* IE6, IE7, IE8 */
    349 
    350 .fancybox-ie .fancybox-bg { background: transparent !important; }
    351 
    352 .fancybox-ie #fancybox-bg-n { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_n.png', sizingMethod='scale'); }
    353 .fancybox-ie #fancybox-bg-ne { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_ne.png', sizingMethod='scale'); }
    354 .fancybox-ie #fancybox-bg-e { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_e.png', sizingMethod='scale'); }
    355 .fancybox-ie #fancybox-bg-se { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_se.png', sizingMethod='scale'); }
    356 .fancybox-ie #fancybox-bg-s { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_s.png', sizingMethod='scale'); }
    357 .fancybox-ie #fancybox-bg-sw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_sw.png', sizingMethod='scale'); }
    358 .fancybox-ie #fancybox-bg-w { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_w.png', sizingMethod='scale'); }
    359 .fancybox-ie #fancybox-bg-nw { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='fancybox/fancy_shadow_nw.png', sizingMethod='scale'); }
     391.fancybox-ie .fancybox-bg {
     392    background: transparent !important;
     393}
     394
     395.fancybox-ie #fancybox-bg-n {
     396    filter: progid : DXImageTransform.Microsoft.AlphaImageLoader ( src =
     397        'fancybox/fancy_shadow_n.png', sizingMethod = 'scale' );
     398}
     399
     400.fancybox-ie #fancybox-bg-ne {
     401    filter: progid : DXImageTransform.Microsoft.AlphaImageLoader ( src =
     402        'fancybox/fancy_shadow_ne.png', sizingMethod = 'scale' );
     403}
     404
     405.fancybox-ie #fancybox-bg-e {
     406    filter: progid : DXImageTransform.Microsoft.AlphaImageLoader ( src =
     407        'fancybox/fancy_shadow_e.png', sizingMethod = 'scale' );
     408}
     409
     410.fancybox-ie #fancybox-bg-se {
     411    filter: progid : DXImageTransform.Microsoft.AlphaImageLoader ( src =
     412        'fancybox/fancy_shadow_se.png', sizingMethod = 'scale' );
     413}
     414
     415.fancybox-ie #fancybox-bg-s {
     416    filter: progid : DXImageTransform.Microsoft.AlphaImageLoader ( src =
     417        'fancybox/fancy_shadow_s.png', sizingMethod = 'scale' );
     418}
     419
     420.fancybox-ie #fancybox-bg-sw {
     421    filter: progid : DXImageTransform.Microsoft.AlphaImageLoader ( src =
     422        'fancybox/fancy_shadow_sw.png', sizingMethod = 'scale' );
     423}
     424
     425.fancybox-ie #fancybox-bg-w {
     426    filter: progid : DXImageTransform.Microsoft.AlphaImageLoader ( src =
     427        'fancybox/fancy_shadow_w.png', sizingMethod = 'scale' );
     428}
     429
     430.fancybox-ie #fancybox-bg-nw {
     431    filter: progid : DXImageTransform.Microsoft.AlphaImageLoader ( src =
     432        'fancybox/fancy_shadow_nw.png', sizingMethod = 'scale' );
     433}
  • ssp-director-tools/trunk/languages/sspdt-de_DE.po

    r409223 r409240  
    33"Project-Id-Version: SSP Director Tools\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2011-07-08 18:18+0100\n"
    6 "PO-Revision-Date: 2011-07-08 18:21+0100\n"
     5"POT-Creation-Date: 2011-07-13 15:35+0100\n"
     6"PO-Revision-Date: 2011-07-13 15:37+0100\n"
    77"Last-Translator: Matthias Scheidl <[email protected]>\n"
    88"Language-Team: Matthias Scheidl <[email protected]>\n"
     
    2121msgstr "Schummeln Sie etwa?"
    2222
    23 #: ../includes/sspdt-options-page.php:19
     23#: ../includes/sspdt-options-page.php:22
    2424msgid "Settings have been saved."
    2525msgstr "Die Einstellungen wurden gespeichert."
    2626
    27 #: ../includes/sspdt-options-page.php:28
     27#: ../includes/sspdt-options-page.php:38
    2828msgid "API Settings seem wrong. Please double check them."
    2929msgstr "Die API Einstellungen sind offensichtlich nicht korrekt. Bitte überprüfen Sie sie."
    3030
    31 #: ../includes/sspdt-options-page.php:110
     31#: ../includes/sspdt-options-page.php:123
    3232msgid "You must define the API settings. Otherwise this plugin won't work."
    3333msgstr "Sie müssen die API Einstellungen festlegen, sonst funktioniert dieses Plugin nicht."
    3434
    35 #: ../includes/sspdt-options-page.php:211
     35#: ../includes/sspdt-options-page.php:212
    3636msgid "Your PHP version is too old."
    3737msgstr "Die Version von PHP auf diesem Server ist zu alt."
    3838
    39 #: ../includes/sspdt-options-page.php:212
     39#: ../includes/sspdt-options-page.php:215
    4040msgid "The DirectorPHP API needs at least PHP 5. Please install it or get in touch with your internet provider or system administrator"
    4141msgstr "Die DirectorPHP API benötigt mindestens PHP 5. Bitte installieren sie PHP 5."
    4242
    43 #: ../includes/sspdt-options-page.php:219
     43#: ../includes/sspdt-options-page.php:224
    4444msgid "php_curl is not installed."
    4545msgstr "php_curl ist nicht installiert."
    4646
    47 #: ../includes/sspdt-options-page.php:220
     47#: ../includes/sspdt-options-page.php:227
    4848msgid "SSP Director Tools need php_curl be installed to work properly."
    4949msgstr "php_curl muss installiert sein, damit SSP Director Tools korrekt funktionieren."
    5050
    51 #: ../includes/sspdt-options-page.php:246
     51#: ../includes/sspdt-options-page.php:255
    5252msgid "SlideShowPro Director Tools"
    5353msgstr "SlideShowPro Director Tools"
    5454
    55 #: ../includes/sspdt-options-page.php:252
     55#: ../includes/sspdt-options-page.php:263
    5656msgid "API Settings"
    5757msgstr "API Einstellungen"
    5858
    59 #: ../includes/sspdt-options-page.php:253
     59#: ../includes/sspdt-options-page.php:266
    6060msgid "The settings can be found on the \"System Info\" page of your SlideShowPro Director installation."
    6161msgstr "Die entsprechenden Werte finden Sie auf der Seite \"System Informationen\" Ihrer SlideShowPro Director Installation."
    6262
    63 #: ../includes/sspdt-options-page.php:258
     63#: ../includes/sspdt-options-page.php:272
    6464msgid "API Key"
    6565msgstr "API Schlüssel"
    6666
    67 #: ../includes/sspdt-options-page.php:265
     67#: ../includes/sspdt-options-page.php:280
    6868msgid "API Path"
    6969msgstr "API Pfad"
    7070
    71 #: ../includes/sspdt-options-page.php:276
     71#: ../includes/sspdt-options-page.php:293
    7272msgid "Caching disabled"
    7373msgstr "Caching deaktiviert"
    7474
    75 #: ../includes/sspdt-options-page.php:278
     75#: ../includes/sspdt-options-page.php:295
    7676#, php-format
    7777msgid "Your cache directory %s is not writable."
    7878msgstr "Ihr Cache Verzeichnis %s ist nicht beschreibbar."
    7979
    80 #: ../includes/sspdt-options-page.php:280
     80#: ../includes/sspdt-options-page.php:297
    8181msgid "You must allow your web server to write to it in order to enable caching."
    8282msgstr "Um das Caching zu aktivieren, müssen Sie dem Web-Server Schreibrecht auf diesem Verzeichnis geben."
    8383
    84 #: ../includes/sspdt-options-page.php:287
     84#: ../includes/sspdt-options-page.php:303
    8585msgid "API Cache"
    8686msgstr "API Cache"
    8787
    88 #: ../includes/sspdt-options-page.php:291
     88#: ../includes/sspdt-options-page.php:311
    8989msgid "API Cache activated"
    9090msgstr "API Cache aktiviert"
    9191
    92 #: ../includes/sspdt-options-page.php:291
     92#: ../includes/sspdt-options-page.php:312
    9393msgid "The API cache can improve performance dramatically."
    9494msgstr "Der API Cache kann die Performanz deutlich steigern."
    9595
    96 #: ../includes/sspdt-options-page.php:296
     96#: ../includes/sspdt-options-page.php:319
    9797msgid "Photo Feed Options"
    9898msgstr "Foto Feed Einstellungen"
    9999
    100 #: ../includes/sspdt-options-page.php:297
     100#: ../includes/sspdt-options-page.php:322
    101101msgid "Needed, if you want to use the photo feed functionality."
    102102msgstr "Wird benötigt, falls Sie die Foto Feed Funktionalität verwenden möchten."
    103103
    104 #: ../includes/sspdt-options-page.php:300
     104#: ../includes/sspdt-options-page.php:327
    105105msgid "Photo Feed URL"
    106106msgstr "Foto Feed URL"
    107107
    108 #: ../includes/sspdt-options-page.php:304
     108#: ../includes/sspdt-options-page.php:330
     109msgid "Path to the photo feed installation with tailing slash."
     110msgstr "Pfad zur Foto Feed Installation (mit abschließsendem Schrägstrich)."
     111
     112#: ../includes/sspdt-options-page.php:333
    109113msgid "Secret"
    110114msgstr "Secret"
    111115
    112 #: ../includes/sspdt-options-page.php:309
     116#: ../includes/sspdt-options-page.php:336
     117msgid "Enter the same secret as in the config.php file of your photo feed installation."
     118msgstr "Geben Sie dasselbe Secret ein wie in der config.php Datei Ihrer Foto Feed Installation."
     119
     120#: ../includes/sspdt-options-page.php:341
    113121msgid "Image Sizes an Handling"
    114122msgstr "Bildgrössen und -handhabung"
    115123
    116 #: ../includes/sspdt-options-page.php:310
     124#: ../includes/sspdt-options-page.php:344
    117125msgid "Define image sizes, quality and cropping."
    118126msgstr "Bildgrößen, Qualität und Zuschnitt festlegen."
    119127
    120 #: ../includes/sspdt-options-page.php:315
     128#: ../includes/sspdt-options-page.php:351
    121129msgid "Width"
    122130msgstr "Breite"
    123131
    124 #: ../includes/sspdt-options-page.php:316
     132#: ../includes/sspdt-options-page.php:352
    125133msgid "Height"
    126134msgstr "Höhe"
    127135
    128 #: ../includes/sspdt-options-page.php:317
     136#: ../includes/sspdt-options-page.php:353
    129137msgid "Quality"
    130138msgstr "Qualität"
    131139
    132 #: ../includes/sspdt-options-page.php:318
     140#: ../includes/sspdt-options-page.php:354
    133141msgid "Cropping"
    134142msgstr "Zuschnitt"
    135143
    136 #: ../includes/sspdt-options-page.php:319
     144#: ../includes/sspdt-options-page.php:355
    137145msgid "Sharpening"
    138146msgstr "Schärfung"
    139147
    140 #: ../includes/sspdt-options-page.php:320
     148#: ../includes/sspdt-options-page.php:356
    141149msgid "Alignment"
    142150msgstr "Ausrichtung"
    143151
    144 #: ../includes/sspdt-options-page.php:321
    145 #: ../includes/sspdt-options-page.php:502
     152#: ../includes/sspdt-options-page.php:357
     153#: ../includes/sspdt-options-page.php:612
    146154msgid "Caption"
    147155msgstr "Bildunterschrift"
    148156
    149 #: ../includes/sspdt-options-page.php:327
     157#: ../includes/sspdt-options-page.php:364
    150158msgid "Grid"
    151159msgstr "Bildraster"
    152160
    153 #: ../includes/sspdt-options-page.php:349
     161#: ../includes/sspdt-options-page.php:390
    154162msgid "Thumbnail"
    155163msgstr "Vorschau"
    156164
    157 #: ../includes/sspdt-options-page.php:368
    158 #: ../includes/sspdt-options-page.php:557
    159 #: ../includes/sspdt-options-page.php:571
     165#: ../includes/sspdt-options-page.php:413
     166#: ../includes/sspdt-options-page.php:706
     167#: ../includes/sspdt-options-page.php:736
    160168msgid "none"
    161169msgstr "keine"
    162170
    163 #: ../includes/sspdt-options-page.php:369
     171#: ../includes/sspdt-options-page.php:417
    164172msgid "left"
    165173msgstr "links"
    166174
    167 #: ../includes/sspdt-options-page.php:370
     175#: ../includes/sspdt-options-page.php:421
    168176msgid "center"
    169177msgstr "zentriert"
    170178
    171 #: ../includes/sspdt-options-page.php:371
     179#: ../includes/sspdt-options-page.php:425
    172180msgid "right"
    173181msgstr "rechts"
    174182
    175 #: ../includes/sspdt-options-page.php:380
     183#: ../includes/sspdt-options-page.php:437
    176184msgid "Image"
    177185msgstr "Präsentation"
    178186
    179 #: ../includes/sspdt-options-page.php:418
     187#: ../includes/sspdt-options-page.php:480
    180188msgid "Photo Grid Defaults"
    181189msgstr "Foto Grid Standardeinstellungen"
    182190
    183 #: ../includes/sspdt-options-page.php:419
     191#: ../includes/sspdt-options-page.php:483
    184192msgid "Default settings for SSP Director Photo Grids."
    185193msgstr "Standardeinstellungen für SSP Director Foto Grids"
    186194
    187 #: ../includes/sspdt-options-page.php:420
     195#: ../includes/sspdt-options-page.php:484
    188196msgid "These settings can be overridden by the photo grid shortcode [sspd] attributes."
    189197msgstr "Diese Einstellungen können mit den Attributen des Foto Grid Shortcodes [sspd] überschrieben werden."
    190198
    191 #: ../includes/sspdt-options-page.php:424
    192 #: ../includes/SSPDT_Widget.php:66
     199#: ../includes/sspdt-options-page.php:489
     200#: ../includes/SSPDT_Widget.php:75
    193201msgid "Scope"
    194202msgstr "Quelle"
    195203
    196 #: ../includes/sspdt-options-page.php:428
    197 #: ../includes/sspdt-options-page.php:463
    198 #: ../includes/SSPDT_Widget.php:68
    199 #: ../includes/SSPDT_Widget.php:86
     204#: ../includes/sspdt-options-page.php:495
     205#: ../includes/sspdt-options-page.php:546
     206#: ../includes/SSPDT_Widget.php:80
     207#: ../includes/SSPDT_Widget.php:119
    200208msgid "-- Not specified --"
    201209msgstr "-- Ohne Angabe --"
    202210
    203 #: ../includes/sspdt-options-page.php:429
    204 #: ../includes/SSPDT_Widget.php:69
     211#: ../includes/sspdt-options-page.php:499
     212#: ../includes/SSPDT_Widget.php:84
    205213msgid "Gallery"
    206214msgstr "Galerie"
    207215
    208 #: ../includes/sspdt-options-page.php:430
    209 #: ../includes/SSPDT_Widget.php:70
     216#: ../includes/sspdt-options-page.php:503
     217#: ../includes/SSPDT_Widget.php:88
    210218msgid "Album"
    211219msgstr "Album"
    212220
    213 #: ../includes/sspdt-options-page.php:437
     221#: ../includes/sspdt-options-page.php:511
    214222msgid "Limit"
    215223msgstr "Maximale Anzahl"
    216224
    217 #: ../includes/sspdt-options-page.php:441
     225#: ../includes/sspdt-options-page.php:514
    218226msgid "Leave blank if no limit should be specified."
    219227msgstr "Lassen SIe das Feld leer, wenn Sie die Zahl der Bilder nicht begrenzen wollen."
    220228
    221 #: ../includes/sspdt-options-page.php:446
    222 #: ../includes/SSPDT_Widget.php:77
     229#: ../includes/sspdt-options-page.php:519
     230#: ../includes/SSPDT_Widget.php:98
    223231msgid "Tags"
    224232msgstr "Schlüsselwörter"
    225233
    226 #: ../includes/sspdt-options-page.php:451
    227 #: ../includes/SSPDT_Widget.php:80
     234#: ../includes/sspdt-options-page.php:528
     235#: ../includes/SSPDT_Widget.php:104
    228236msgid "all"
    229237msgstr "alle"
    230238
    231 #: ../includes/sspdt-options-page.php:452
    232 #: ../includes/SSPDT_Widget.php:81
     239#: ../includes/sspdt-options-page.php:532
     240#: ../includes/SSPDT_Widget.php:108
    233241msgid "one"
    234242msgstr "eines"
    235243
    236 #: ../includes/sspdt-options-page.php:454
     244#: ../includes/sspdt-options-page.php:534
    237245msgid "Leave blank if no tags should be specified."
    238246msgstr "Lassen Sie das Feld leer, wenn Sie keine Schlüsselwörter spezifizieren wollen."
    239247
    240 #: ../includes/sspdt-options-page.php:459
     248#: ../includes/sspdt-options-page.php:539
    241249msgid "Sort"
    242250msgstr "Sortierung"
    243251
    244 #: ../includes/sspdt-options-page.php:464
    245 #: ../includes/SSPDT_Widget.php:87
     252#: ../includes/sspdt-options-page.php:550
     253#: ../includes/SSPDT_Widget.php:123
    246254msgid "Creation Date"
    247255msgstr "Erstellungsdatum"
    248256
    249 #: ../includes/sspdt-options-page.php:465
    250 #: ../includes/SSPDT_Widget.php:88
     257#: ../includes/sspdt-options-page.php:554
     258#: ../includes/SSPDT_Widget.php:127
    251259msgid "Capture Date"
    252260msgstr "Aufnahmedatum"
    253261
    254 #: ../includes/sspdt-options-page.php:466
    255 #: ../includes/SSPDT_Widget.php:89
     262#: ../includes/sspdt-options-page.php:558
     263#: ../includes/SSPDT_Widget.php:131
    256264msgid "Modification Date"
    257265msgstr "Änderungsdatum"
    258266
    259 #: ../includes/sspdt-options-page.php:467
    260 #: ../includes/SSPDT_Widget.php:90
     267#: ../includes/sspdt-options-page.php:562
     268#: ../includes/SSPDT_Widget.php:135
    261269msgid "File Name"
    262270msgstr "Dateiname"
    263271
    264 #: ../includes/sspdt-options-page.php:468
    265 #: ../includes/SSPDT_Widget.php:91
     272#: ../includes/sspdt-options-page.php:566
     273#: ../includes/SSPDT_Widget.php:139
    266274msgid "Random"
    267275msgstr "Zufällig"
    268276
    269 #: ../includes/sspdt-options-page.php:471
    270 #: ../includes/SSPDT_Widget.php:94
     277#: ../includes/sspdt-options-page.php:573
     278#: ../includes/SSPDT_Widget.php:147
    271279msgid "ascending"
    272280msgstr "aufsteigend"
    273281
    274 #: ../includes/sspdt-options-page.php:472
    275 #: ../includes/SSPDT_Widget.php:95
     282#: ../includes/sspdt-options-page.php:577
     283#: ../includes/SSPDT_Widget.php:151
    276284msgid "descending"
    277285msgstr "absteigend"
    278286
    279 #: ../includes/sspdt-options-page.php:478
     287#: ../includes/sspdt-options-page.php:583
    280288msgid "Photo Feed"
    281289msgstr "Foto Feed"
    282290
    283 #: ../includes/sspdt-options-page.php:481
     291#: ../includes/sspdt-options-page.php:588
    284292msgid "Show a link to a photo feed for gallery images."
    285293msgstr "Einen Foto-Feed Link für die Galerie-Bilder anzeigen."
    286294
    287 #: ../includes/sspdt-options-page.php:486
     295#: ../includes/sspdt-options-page.php:594
    288296msgid "Presentation"
    289297msgstr "Darstellung"
    290298
    291 #: ../includes/sspdt-options-page.php:487
     299#: ../includes/sspdt-options-page.php:597
    292300msgid "FancyBox settings for image presentation."
    293301msgstr "FancyBox Einstellungen für die Bild-Darstellung"
    294302
    295 #: ../includes/sspdt-options-page.php:491
     303#: ../includes/sspdt-options-page.php:602
    296304msgid "Box"
    297305msgstr "Rahmen"
    298306
    299 #: ../includes/sspdt-options-page.php:494
     307#: ../includes/sspdt-options-page.php:604
    300308msgid "Padding"
    301309msgstr "Innenabstand"
    302310
    303 #: ../includes/sspdt-options-page.php:496
     311#: ../includes/sspdt-options-page.php:607
    304312msgid "Margin"
    305313msgstr "Ränder"
    306314
    307 #: ../includes/sspdt-options-page.php:505
     315#: ../includes/sspdt-options-page.php:615
    308316msgid "Position:"
    309317msgstr "Position:"
    310318
    311 #: ../includes/sspdt-options-page.php:507
     319#: ../includes/sspdt-options-page.php:619
    312320msgid "outside frame"
    313321msgstr "außerhalb des Rahmens"
    314322
    315 #: ../includes/sspdt-options-page.php:508
     323#: ../includes/sspdt-options-page.php:623
    316324msgid "inside frame"
    317325msgstr "innerhalb des Rahmens"
    318326
    319 #: ../includes/sspdt-options-page.php:509
     327#: ../includes/sspdt-options-page.php:627
    320328msgid "over image"
    321329msgstr "über dem Bild"
    322330
    323 #: ../includes/sspdt-options-page.php:515
     331#: ../includes/sspdt-options-page.php:633
    324332msgid "Overlay"
    325333msgstr "Overlay"
    326334
    327 #: ../includes/sspdt-options-page.php:519
     335#: ../includes/sspdt-options-page.php:638
    328336msgid "Show overlay"
    329337msgstr "Overlay anzeigen"
    330338
    331 #: ../includes/sspdt-options-page.php:520
     339#: ../includes/sspdt-options-page.php:639
    332340msgid "Opacity:"
    333341msgstr "Deckkraft:"
    334342
    335 #: ../includes/sspdt-options-page.php:534
     343#: ../includes/sspdt-options-page.php:663
    336344msgid "Color:"
    337345msgstr "Farbe:"
    338346
    339 #: ../includes/sspdt-options-page.php:540
     347#: ../includes/sspdt-options-page.php:669
    340348msgid "Navigation"
    341349msgstr "Navigation"
    342350
    343 #: ../includes/sspdt-options-page.php:543
     351#: ../includes/sspdt-options-page.php:675
    344352msgid "Cyclic navigation"
    345353msgstr "Zyklische Navigation"
    346354
    347 #: ../includes/sspdt-options-page.php:544
     355#: ../includes/sspdt-options-page.php:681
    348356msgid "Show close button"
    349357msgstr "Schließen-Button anzeigen"
    350358
    351 #: ../includes/sspdt-options-page.php:545
     359#: ../includes/sspdt-options-page.php:687
    352360msgid "Show navigation arrows"
    353361msgstr "Navigations-Pfeile anzeigen"
    354362
    355 #: ../includes/sspdt-options-page.php:546
     363#: ../includes/sspdt-options-page.php:693
    356364msgid "Enable ESC key"
    357365msgstr "Schließen mit ESC-Taste aktivieren"
    358366
    359 #: ../includes/sspdt-options-page.php:551
     367#: ../includes/sspdt-options-page.php:698
    360368msgid "Transitions"
    361369msgstr "Übergänge"
    362370
    363 #: ../includes/sspdt-options-page.php:555
     371#: ../includes/sspdt-options-page.php:702
    364372msgid "In:"
    365373msgstr "Einwärts:"
    366374
    367 #: ../includes/sspdt-options-page.php:558
    368 #: ../includes/sspdt-options-page.php:572
     375#: ../includes/sspdt-options-page.php:710
     376#: ../includes/sspdt-options-page.php:740
    369377msgid "fade"
    370378msgstr "Überblenden"
    371379
    372 #: ../includes/sspdt-options-page.php:559
    373 #: ../includes/sspdt-options-page.php:573
     380#: ../includes/sspdt-options-page.php:714
     381#: ../includes/sspdt-options-page.php:744
    374382msgid "elastic"
    375383msgstr "Elastisch"
    376384
    377 #: ../includes/sspdt-options-page.php:561
    378 #: ../includes/sspdt-options-page.php:575
     385#: ../includes/sspdt-options-page.php:716
     386#: ../includes/sspdt-options-page.php:746
    379387msgid "Speed:"
    380388msgstr "Dauer:"
    381389
    382 #: ../includes/sspdt-options-page.php:563
    383 #: ../includes/sspdt-options-page.php:577
     390#: ../includes/sspdt-options-page.php:719
     391#: ../includes/sspdt-options-page.php:749
    384392msgid "Easing:"
    385393msgstr "Easing"
    386394
    387 #: ../includes/sspdt-options-page.php:565
    388 #: ../includes/sspdt-options-page.php:579
     395#: ../includes/sspdt-options-page.php:723
     396#: ../includes/sspdt-options-page.php:753
    389397msgid "Linear"
    390398msgstr "Linear"
    391399
    392 #: ../includes/sspdt-options-page.php:566
    393 #: ../includes/sspdt-options-page.php:580
     400#: ../includes/sspdt-options-page.php:727
     401#: ../includes/sspdt-options-page.php:757
    394402msgid "Swing"
    395403msgstr "Swing"
    396404
    397 #: ../includes/sspdt-options-page.php:569
     405#: ../includes/sspdt-options-page.php:732
    398406msgid "Out:"
    399407msgstr "Auswärts:"
    400408
    401 #: ../includes/sspdt-options-page.php:583
     409#: ../includes/sspdt-options-page.php:762
    402410msgid "Change speed:"
    403411msgstr "Dauer des Bildwechsels"
    404412
    405 #: ../includes/sspdt-options-page.php:584
     413#: ../includes/sspdt-options-page.php:765
    406414msgid "Speed of resizing when changing gallery items, in milliseconds"
    407415msgstr "Dauer des Bildwechsels in Millisekunden"
    408416
    409 #: ../includes/sspdt-options-page.php:592
     417#: ../includes/sspdt-options-page.php:776
    410418msgid "Update settings"
    411419msgstr "Einstellungen speichern"
    412420
    413 #: ../includes/SSPDT.php:146
     421#: ../includes/SSPDT.php:150
    414422msgid "Aquire these images as photo feed."
    415423msgstr "Diese Bilder als Foto-Feed beziehen."
     
    424432
    425433#: ../includes/SSPDT_Widget.php:33
    426 #: ../includes/SSPDT_Widget.php:56
     434#: ../includes/SSPDT_Widget.php:57
    427435msgid "Title"
    428436msgstr "Titel"
    429437
    430 #: ../includes/SSPDT_Widget.php:59
     438#: ../includes/SSPDT_Widget.php:63
    431439msgid "Surrounding HTML Element"
    432440msgstr "Umschließendes HTML Element"
    433441
    434 #: ../includes/SSPDT_Widget.php:75
     442#: ../includes/SSPDT_Widget.php:95
    435443#, php-format
    436444msgid "Limit to <input name=\"%s\" type=\"text\" size=\"3\" value=\"%s\"/> images."
    437445msgstr "Auf <input name=\"%s\" type=\"text\" size=\"3\" value=\"%s\"/> Bilder begrenzen."
    438446
    439 #: ../includes/SSPDT_Widget.php:84
     447#: ../includes/SSPDT_Widget.php:113
    440448msgid "Sort by"
    441449msgstr "Sortierung"
     450
     451#~ msgid "Incorrect feed parameters."
     452#~ msgstr "Falsche Feed"
    442453
    443454#~ msgid "Gallery Defaults"
  • ssp-director-tools/trunk/readme.txt

    r409223 r409240  
    33Tags: SlideShowPro, images, gallery, album, photos, fancybox, API, SSP, SSP Director, widget, shortcode
    44Requires at least: 3.0
    5 Tested up to: 3.2
    6 Stable tag: 1.0
     5Tested up to: 3.2.1
     6Stable tag: 1.0.1
    77
    88SSP Director Tools give you means for integrating SlideShowPro Director content into a WordPress blog.
     
    3535* It is recommended to copy the `feed` directory to a directory outside of your WordPress installation.
    3636* You might consider to copy it to the server hosting your director installation, e.g. to `http://director.myserver.com/feed/`.
    37 * Then, enter the path to the `feed.php` into the SSP Director Toos Options page, e.g. `http://director.mysserver.com/feed/feed.php`.
     37* Then, enter the path to the feed installation into the SSP Director Toos Options page, e.g. `http://director.mysserver.com/feed/`.
    3838* Define a secret for your photo feed installation, enter it into the SSP Director Tools Options page and set the `$sspdt_secret`variable in the `config.php`file to the same value.
    3939* Finally, set the `$sspd_api_key`and `$sspd_api_path` variables in the `config.php`file to the values for your SSP Director installation.
     
    5656
    5757== Changelog ==
     58
     59= 1.0.1 =
     60* Fixed de_DE localization
     61* Some maintenance fixes
    5862
    5963= 1.0 =
     
    7983* `tagmode`: Mode in which the tag filter works. Match all tags or any out of the list (all|one, default: one).
    8084* `sort_on`: The sort field (null|created_on|captured_on|modified_on|filename|random, default: null).
    81 * `sort_direction`: The sort order (ASC|DESC, default: ASC).
     85* `sort_direction`: The sort order (ASC|DESC, default: DESC).
    8286* `rss`: Whether or not to show a RSS photo feed link below the photo grid (yes|1|no|0, default: 1).
    8387
     
    9296
    9397* A bug in the Director API v. 1.5.0 beta generates a wrong result when a query with multiple tags is done. See [SSP Director Forum](http://forums.slideshowpro.net/viewtopic.php?id=29339).
     98* The plugin currently doesn't check if the photo feed feature is installed correctly.
  • ssp-director-tools/trunk/ssp-director-tools.php

    r409223 r409240  
    11<?php
    22/*
    3 Plugin Name: SSP Director Tools
    4 Description: SSP Director Tools help you to link content from a SlideShowPro Director installation to WordPress posts and pages.
    5 Version: 1.0
    6 Text Domain: sspdt
    7 Author: Matthias Scheidl <matthias@scheidl.name>
    8 */
     3 Plugin Name: SSP Director Tools
     4 Description: SSP Director Tools help you to link content from a SlideShowPro Director installation to WordPress posts and pages.
     5 Version: 1.0.1
     6 Text Domain: sspdt
     7 Author: Matthias Scheidl <dev@scheidl.name>
     8 */
    99
    10 /*  Copyright 2010-2011  Matthias Scheidl  (email : matthias@scheidl.name)
     10/*  Copyright 2010-2011  Matthias Scheidl  (email : dev@scheidl.name)
    1111
    12     This program is free software; you can redistribute it and/or modify
    13     it under the terms of the GNU General Public License, version 2, as
    14     published by the Free Software Foundation.
     12This program is free software; you can redistribute it and/or modify
     13it under the terms of the GNU General Public License, version 2, as
     14published by the Free Software Foundation.
    1515
    16     This program is distributed in the hope that it will be useful,
    17     but WITHOUT ANY WARRANTY; without even the implied warranty of
    18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    19     GNU General Public License for more details.
     16This program is distributed in the hope that it will be useful,
     17but WITHOUT ANY WARRANTY; without even the implied warranty of
     18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     19GNU General Public License for more details.
    2020
    21     You should have received a copy of the GNU General Public License
    22     along with this program; if not, write to the Free Software
    23     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     21You should have received a copy of the GNU General Public License
     22along with this program; if not, write to the Free Software
     23Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    2424*/
    2525
     
    6464    if(!is_admin()) {
    6565        wp_deregister_script( 'jquery' );
    66         wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js');
    67         wp_enqueue_script( 'jquery' );
     66        wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js');
     67        wp_enqueue_script( 'jquery' );
    6868        wp_register_script('sspdt_fancybox_js', plugins_url('/js/fancybox/jquery.fancybox-1.3.4.pack.js', __FILE__));
    6969        wp_enqueue_script('sspdt_fancybox_js');
     
    8080        echo '  $j(document).ready(function() {';
    8181        echo '      $j("a.fancybox").fancybox({"type" : "image"';
    82        
     82
    8383        if( isset( $fb['padding'] ) ) echo ', "padding" : ' . (int) $fb['padding'];
    8484        if( isset( $fb['margin'] ) ) echo ', "margin" : ' . (int) $fb['margin'];
     
    8686        if( isset( $fb['titlePosition'] ) && $fb['titlePosition'] != 'outside' ) echo ', "titlePosition" : "' . $fb['titlePosition'] . '"';
    8787        /*if( $fb['counterShow'] == '1' && $fb['titlePosition'] == 'inside')  echo ', "titleFormat" : function (title, currentArray, currentIndex, currentOpts) {
    88     return "<div id=\'tip7-title\' style=\'text-align:left\'>" + (title && title.length ? + title + : "" ) + "Image " + (currentIndex + 1) + " of " + currentArray.length + "</div>";
    89 };';*/
     88        return "<div id=\'tip7-title\' style=\'text-align:left\'>" + (title && title.length ? + title + : "" ) + "Image " + (currentIndex + 1) + " of " + currentArray.length + "</div>";
     89         };';*/
    9090        echo ( $fb['overlayShow'] === '1' ? ', "overlayShow" : true' : ', "overlayShow" : false');
    9191        if( isset( $fb['overlayOpacity'] ) && $fb['overlayShow'] === '1') echo ', "overlayOpacity" : ' . (float) $fb['overlayOpacity'] ;
     
    9595        echo ( $fb['showCloseButton'] === '1' ? ', "showCloseButton" : true' : ', "showCloseButton" : false');
    9696        echo ( $fb['enableEscapeButton'] === '1' ? ', "enableEscapeButton" : true' : ', "enableEscapeButton" : false');
    97        
     97
    9898        if( isset( $fb['transitionIn'] ) ) echo ', "transitionIn" : "' . $fb['transitionIn'] . '"';
    9999        if( isset( $fb['speedIn'] ) && $fb['transitionIn'] != 'none') echo ', "speedIn" : ' . (int) $fb['speedIn'];
     
    103103        if( isset( $fb['easingOut'] ) && $fb['transitionOut'] == 'easing' ) echo ', "easingOut" : "' . $fb['easingOut'] . '"';
    104104        if( isset( $fb['changeSpeed'] ) ) echo ', "changeSpeed" : ' . (int) $fb['changeSpeed'];
    105        
     105
    106106        echo '      });';
    107107        echo '  });';
     
    152152add_action( 'widgets_init', 'sspdt_register_widget' );
    153153function sspdt_register_widget() {
    154     register_widget( 'SSPDT_Widget' );
     154    register_widget( 'SSPDT_Widget' );
    155155}
    156156
    157 
    158157?>
Note: See TracChangeset for help on using the changeset viewer.