diff --git a/README.markdown b/README.markdown index 1952b214..42c6b6cc 100644 --- a/README.markdown +++ b/README.markdown @@ -1,4 +1,3 @@ -# Serendipity - a PHP Weblog/Blog software - -[Serendipity](http://s9y.org) is a PHP-powered weblog application which gives the user an easy way to maintain an online diary, weblog or even a complete homepage. While the default package is designed for the casual blogger, Serendipity offers a flexible, expandable and easy-to-use framework with the power for professional applications. +# Serendipity - A reliable, secure & extensible PHP blog +[Serendipity](https://s9y.org) is a PHP-powered weblog engine which gives the user an easy way to maintain a blog. While the default package is designed for the casual blogger, Serendipity offers an expandable framework with the power for professional applications. \ No newline at end of file diff --git a/bundled-libs/Cache/Lite.php b/bundled-libs/Cache/Lite.php index c74eb243..5770f3d1 100644 --- a/bundled-libs/Cache/Lite.php +++ b/bundled-libs/Cache/Lite.php @@ -19,8 +19,8 @@ * * @package Cache_Lite * @category Caching -* @version $Id: Lite.php,v 1.54 2009/07/07 05:34:37 tacker Exp $ * @author Fabien MARTY <fab@php.net> +* @author Markus Tacker <tacker@php.net> */ define('CACHE_LITE_ERROR_RETURN', 1); @@ -247,6 +247,12 @@ class Cache_Lite * @var boolean */ var $_errorHandlingAPIBreak = false; + + var $_hashedDirectoryGroup = NULL; + + var $_cacheFileMode = NULL; + + var $_cacheFileGroup = NULL; // --- Public methods --- @@ -272,16 +278,30 @@ class Cache_Lite * 'hashedDirectoryLevel' => level of the hashed directory system (int), * 'hashedDirectoryUmask' => umask for hashed directory structure (int), * 'errorHandlingAPIBreak' => API break for better error handling ? (boolean) + * 'hashedDirectoryGroup' => group of hashed directory structure (int | string) (see function chgrp) + * 'cacheFileMode' => filesystem mode of newly created cache files (int) + * 'cacheFileGroup' => group of newly created cache files (int | string) (see function chgrp) * ); + * + * If sys_get_temp_dir() is available and the + * 'cacheDir' option is not provided in the + * constructor options array its output is used + * to determine the suitable temporary directory. + * + * @see http://de.php.net/sys_get_temp_dir + * @see http://pear.php.net/bugs/bug.php?id=18328 * * @param array $options options * @access public */ - function Cache_Lite($options = array(NULL)) + function __construct($options = array(NULL)) { foreach($options as $key => $value) { $this->setOption($key, $value); } + if (!isset($options['cacheDir']) && function_exists('sys_get_temp_dir')) { + $this->setOption('cacheDir', sys_get_temp_dir() . DIRECTORY_SEPARATOR); + } } /** @@ -295,7 +315,7 @@ class Cache_Lite */ function setOption($name, $value) { - $availableOptions = array('errorHandlingAPIBreak', 'hashedDirectoryUmask', 'hashedDirectoryLevel', 'automaticCleaningFactor', 'automaticSerialization', 'fileNameProtection', 'memoryCaching', 'onlyMemoryCaching', 'memoryCachingLimit', 'cacheDir', 'caching', 'lifeTime', 'fileLocking', 'writeControl', 'readControl', 'readControlType', 'pearErrorMode'); + $availableOptions = array('errorHandlingAPIBreak', 'hashedDirectoryUmask', 'hashedDirectoryLevel', 'automaticCleaningFactor', 'automaticSerialization', 'fileNameProtection', 'memoryCaching', 'onlyMemoryCaching', 'memoryCachingLimit', 'cacheDir', 'caching', 'lifeTime', 'fileLocking', 'writeControl', 'readControl', 'readControlType', 'pearErrorMode', 'hashedDirectoryGroup', 'cacheFileMode', 'cacheFileGroup'); if (in_array($name, $availableOptions)) { $property = '_'.$name; $this->$property = $value; @@ -329,7 +349,7 @@ class Cache_Lite } if ($this->_onlyMemoryCaching) { return false; - } + } } if (($doNotTestCacheValidity) || (is_null($this->_refreshTime))) { if (file_exists($this->_file)) { @@ -376,8 +396,8 @@ class Cache_Lite } } if ($this->_automaticCleaningFactor>0 && ($this->_automaticCleaningFactor==1 || mt_rand(1, $this->_automaticCleaningFactor)==1)) { - $this->clean(false, 'old'); - } + $this->clean(false, 'old'); + } if ($this->_writeControl) { $res = $this->_writeAndControl($data); if (is_bool($res)) { @@ -387,7 +407,7 @@ class Cache_Lite // if $res if false, we need to invalidate the cache @touch($this->_file, time() - 2*abs($this->_lifeTime)); return false; - } + } } else { $res = $this->_write($data); } @@ -534,7 +554,7 @@ class Cache_Lite */ function raiseError($msg, $code) { - include_once dirname(__FILE__) . '/../PEAR.php'; + include_once('PEAR.php'); return PEAR::raiseError($msg, $code, $this->_pearErrorMode); } @@ -599,7 +619,7 @@ class Cache_Lite $motif = ($group) ? 'cache_'.$group.'_' : 'cache_'; } if ($this->_memoryCaching) { - foreach($this->_memoryCachingArray as $key => $v) { + foreach($this->_memoryCachingArray as $key => $v) { if (strpos($key, $motif) !== false) { unset($this->_memoryCachingArray[$key]); $this->_memoryCachingCounter = $this->_memoryCachingCounter - 1; @@ -613,7 +633,7 @@ class Cache_Lite return $this->raiseError('Cache_Lite : Unable to open cache directory !', -4); } $result = true; - while ($file = readdir($dh)) { + while (($file = readdir($dh)) !== false) { if (($file != '.') && ($file != '..')) { if (substr($file, 0, 6)=='cache_') { $file2 = $dir . $file; @@ -654,7 +674,19 @@ class Cache_Lite } return $result; } - + + /** + * Touch the cache file while are recreating it to avoid + * launch this task more then once when necessary + * When the cache recreated and Added in Cache Memory + * @return void + * @access private + */ + function _touchCacheFile(){ + if (file_exists($this->_file)) { + @touch($this->_file); + } + } /** * Add some date in the memory caching array * @@ -663,6 +695,7 @@ class Cache_Lite */ function _memoryCacheAdd($data) { + $this->_touchCacheFile(); $this->_memoryCachingArray[$this->_file] = $data; if ($this->_memoryCachingCounter >= $this->_memoryCachingLimit) { list($key, ) = each($this->_memoryCachingArray); @@ -707,8 +740,8 @@ class Cache_Lite function _read() { $fp = @fopen($this->_file, "rb"); - if ($this->_fileLocking) @flock($fp, LOCK_SH); if ($fp) { + if ($this->_fileLocking) @flock($fp, LOCK_SH); clearstatcache(); $length = @filesize($this->_file); $mqr = get_magic_quotes_runtime(); @@ -718,9 +751,13 @@ class Cache_Lite if ($this->_readControl) { $hashControl = @fread($fp, 32); $length = $length - 32; - } + } + if ($length) { - $data = @fread($fp, $length); + $data = ''; + // See https://bugs.php.net/bug.php?id=30936 + // The 8192 magic number is the chunk size used internally by PHP. + while(!feof($fp)) $data .= fread($fp, 8192); } else { $data = ''; } @@ -760,13 +797,29 @@ class Cache_Lite for ($i=0 ; $i<$this->_hashedDirectoryLevel ; $i++) { $root = $root . 'cache_' . substr($hash, 0, $i + 1) . '/'; if (!(@is_dir($root))) { - @mkdir($root, $this->_hashedDirectoryUmask); + if (@mkdir($root)) + { + @chmod($root, $this->_hashedDirectoryUmask); + if (! is_null($this->_hashedDirectoryGroup)) + @chgrp($root, $this->_hashedDirectoryGroup); + } } } } + // if both _cacheFileMode and _cacheFileGroup is null, then we don't need to call + // file_exists (see below: if ($is_newfile) ...) + $is_newfile = (! is_null($this->_cacheFileMode) || !is_null($this->_cacheFileGroup)) + && ! @file_exists($this->_file); $fp = @fopen($this->_file, "wb"); if ($fp) { if ($this->_fileLocking) @flock($fp, LOCK_EX); + if ($is_newfile) + { + if (! is_null($this->_cacheFileMode)) + @chmod($this->_file, $this->_cacheFileMode); + if (! is_null($this->_cacheFileGroup)) + @chgrp($this->_file, $this->_cacheFileGroup); + } if ($this->_readControl) { @fwrite($fp, $this->_hash($data, $this->_readControlType), 32); } @@ -781,7 +834,7 @@ class Cache_Lite if ($this->_fileLocking) @flock($fp, LOCK_UN); @fclose($fp); return true; - } + } return $this->raiseError('Cache_Lite : Unable to write cache file : '.$this->_file, -1); } @@ -831,5 +884,3 @@ class Cache_Lite } } - -?> diff --git a/bundled-libs/Cache/Lite/File.php b/bundled-libs/Cache/Lite/File.php new file mode 100644 index 00000000..d8ca31c1 --- /dev/null +++ b/bundled-libs/Cache/Lite/File.php @@ -0,0 +1,90 @@ +<?php + +/** +* This class extends Cache_Lite and offers a cache system driven by a master file +* +* With this class, cache validity is only dependent of a given file. Cache files +* are valid only if they are older than the master file. It's a perfect way for +* caching templates results (if the template file is newer than the cache, cache +* must be rebuild...) or for config classes... +* There are some examples in the 'docs/examples' file +* Technical choices are described in the 'docs/technical' file +* +* @package Cache_Lite +* @author Fabien MARTY <fab@php.net> +*/ + +require_once('Cache/Lite.php'); + +class Cache_Lite_File extends Cache_Lite +{ + + // --- Private properties --- + + /** + * Complete path of the file used for controlling the cache lifetime + * + * @var string $_masterFile + */ + var $_masterFile = ''; + + /** + * Masterfile mtime + * + * @var int $_masterFile_mtime + */ + var $_masterFile_mtime = 0; + + // --- Public methods ---- + + /** + * Constructor + * + * $options is an assoc. To have a look at availables options, + * see the constructor of the Cache_Lite class in 'Cache_Lite.php' + * + * Comparing to Cache_Lite constructor, there is another option : + * $options = array( + * (...) see Cache_Lite constructor + * 'masterFile' => complete path of the file used for controlling the cache lifetime(string) + * ); + * + * @param array $options options + * @access public + */ + function __construct($options = array(NULL)) + { + $options['lifetime'] = 0; + parent::__construct($options); + if (isset($options['masterFile'])) { + $this->_masterFile = $options['masterFile']; + } else { + return $this->raiseError('Cache_Lite_File : masterFile option must be set !'); + } + if (!($this->_masterFile_mtime = @filemtime($this->_masterFile))) { + return $this->raiseError('Cache_Lite_File : Unable to read masterFile : '.$this->_masterFile, -3); + } + } + + /** + * Test if a cache is available and (if yes) return it + * + * @param string $id cache id + * @param string $group name of the cache group + * @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested + * @return string data of the cache (else : false) + * @access public + */ + function get($id, $group = 'default', $doNotTestCacheValidity = false) + { + if ($data = parent::get($id, $group, true)) { + if ($filemtime = $this->lastModified()) { + if ($filemtime > $this->_masterFile_mtime) { + return $data; + } + } + } + return false; + } + +} diff --git a/bundled-libs/Cache/Lite/Function.php b/bundled-libs/Cache/Lite/Function.php index 9e1ce28f..0814b58f 100644 --- a/bundled-libs/Cache/Lite/Function.php +++ b/bundled-libs/Cache/Lite/Function.php @@ -11,12 +11,11 @@ * Technical choices are described in the 'docs/technical' file * * @package Cache_Lite -* @version $Id: Function.php,v 1.11 2006/12/14 12:59:43 cweiske Exp $ * @author Sebastian BERGMANN <sb@sebastian-bergmann.de> * @author Fabien MARTY <fab@php.net> */ -require_once dirname(__FILE__) . '/../Lite.php'; +require_once('Cache/Lite.php'); class Cache_Lite_Function extends Cache_Lite { @@ -82,7 +81,7 @@ class Cache_Lite_Function extends Cache_Lite * @param array $options options * @access public */ - function Cache_Lite_Function($options = array(NULL)) + function __construct($options = array(NULL)) { $availableOptions = array('debugCacheLiteFunction', 'defaultGroup', 'dontCacheWhenTheOutputContainsNOCACHE', 'dontCacheWhenTheResultIsFalse', 'dontCacheWhenTheResultIsNull'); while (list($name, $value) = each($options)) { @@ -92,7 +91,7 @@ class Cache_Lite_Function extends Cache_Lite } } reset($options); - $this->Cache_Lite($options); + parent::__construct($options); } /** @@ -207,5 +206,3 @@ class Cache_Lite_Function extends Cache_Lite } } - -?> diff --git a/bundled-libs/Cache/Lite/NestedOutput.php b/bundled-libs/Cache/Lite/NestedOutput.php new file mode 100644 index 00000000..81ece30d --- /dev/null +++ b/bundled-libs/Cache/Lite/NestedOutput.php @@ -0,0 +1,56 @@ +<?php + +/** +* This class extends Cache_Lite and uses output buffering to get the data to cache. +* It supports nesting of caches +* +* @package Cache_Lite +* @author Markus Tacker <tacker@php.net> +*/ + +require_once('Cache/Lite/Output.php'); + +class Cache_Lite_NestedOutput extends Cache_Lite_Output +{ + private $nestedIds = array(); + private $nestedGroups = array(); + + /** + * Start the cache + * + * @param string $id cache id + * @param string $group name of the cache group + * @param boolean $doNotTestCacheValidity if set to true, the cache validity won't be tested + * @return boolean|string false if the cache is not hit else the data + * @access public + */ + function start($id, $group = 'default', $doNotTestCacheValidity = false) + { + $this->nestedIds[] = $id; + $this->nestedGroups[] = $group; + $data = $this->get($id, $group, $doNotTestCacheValidity); + if ($data !== false) { + return $data; + } + ob_start(); + ob_implicit_flush(false); + return false; + } + + /** + * Stop the cache + * + * @param boolen + * @return string return contents of cache + */ + function end() + { + $data = ob_get_contents(); + ob_end_clean(); + $id = array_pop($this->nestedIds); + $group = array_pop($this->nestedGroups); + $this->save($data, $id, $group); + return $data; + } + +} diff --git a/bundled-libs/Cache/Lite/Output.php b/bundled-libs/Cache/Lite/Output.php index 37cba664..9880cfa4 100644 --- a/bundled-libs/Cache/Lite/Output.php +++ b/bundled-libs/Cache/Lite/Output.php @@ -7,11 +7,10 @@ * Technical choices are described in the 'docs/technical' file * * @package Cache_Lite -* @version $Id: Output.php,v 1.4 2006/01/29 00:22:07 fab Exp $ * @author Fabien MARTY <fab@php.net> */ -require_once dirname(__FILE__) . '/../Lite.php'; +require_once('Cache/Lite.php'); class Cache_Lite_Output extends Cache_Lite { @@ -27,9 +26,9 @@ class Cache_Lite_Output extends Cache_Lite * @param array $options options * @access public */ - function Cache_Lite_Output($options) + function __construct($options) { - $this->Cache_Lite($options); + parent::__construct($options); } /** @@ -67,6 +66,3 @@ class Cache_Lite_Output extends Cache_Lite } } - - -?> diff --git a/bundled-libs/HTTP/Request2.php b/bundled-libs/HTTP/Request2.php index 36c413fa..b835822e 100644 --- a/bundled-libs/HTTP/Request2.php +++ b/bundled-libs/HTTP/Request2.php @@ -1,1030 +1,1037 @@ -<?php -/** - * Class representing a HTTP request message - * - * PHP version 5 - * - * LICENSE - * - * This source file is subject to BSD 3-Clause License that is bundled - * with this package in the file LICENSE and available at the URL - * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @copyright 2008-2014 Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** - * A class representing an URL as per RFC 3986. - */ -require_once 'Net/URL2.php'; - -/** - * Exception class for HTTP_Request2 package - */ -require_once 'HTTP/Request2/Exception.php'; - -/** - * Class representing a HTTP request message - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - * @link http://tools.ietf.org/html/rfc2616#section-5 - */ -class HTTP_Request2 implements SplSubject -{ - /**#@+ - * Constants for HTTP request methods - * - * @link http://tools.ietf.org/html/rfc2616#section-5.1.1 - */ - const METHOD_OPTIONS = 'OPTIONS'; - const METHOD_GET = 'GET'; - const METHOD_HEAD = 'HEAD'; - const METHOD_POST = 'POST'; - const METHOD_PUT = 'PUT'; - const METHOD_DELETE = 'DELETE'; - const METHOD_TRACE = 'TRACE'; - const METHOD_CONNECT = 'CONNECT'; - /**#@-*/ - - /**#@+ - * Constants for HTTP authentication schemes - * - * @link http://tools.ietf.org/html/rfc2617 - */ - const AUTH_BASIC = 'basic'; - const AUTH_DIGEST = 'digest'; - /**#@-*/ - - /** - * Regular expression used to check for invalid symbols in RFC 2616 tokens - * @link http://pear.php.net/bugs/bug.php?id=15630 - */ - const REGEXP_INVALID_TOKEN = '![\x00-\x1f\x7f-\xff()<>@,;:\\\\"/\[\]?={}\s]!'; - - /** - * Regular expression used to check for invalid symbols in cookie strings - * @link http://pear.php.net/bugs/bug.php?id=15630 - * @link http://web.archive.org/web/20080331104521/http://cgi.netscape.com/newsref/std/cookie_spec.html - */ - const REGEXP_INVALID_COOKIE = '/[\s,;]/'; - - /** - * Fileinfo magic database resource - * @var resource - * @see detectMimeType() - */ - private static $_fileinfoDb; - - /** - * Observers attached to the request (instances of SplObserver) - * @var array - */ - protected $observers = array(); - - /** - * Request URL - * @var Net_URL2 - */ - protected $url; - - /** - * Request method - * @var string - */ - protected $method = self::METHOD_GET; - - /** - * Authentication data - * @var array - * @see getAuth() - */ - protected $auth; - - /** - * Request headers - * @var array - */ - protected $headers = array(); - - /** - * Configuration parameters - * @var array - * @see setConfig() - */ - protected $config = array( - 'adapter' => 'HTTP_Request2_Adapter_Socket', - 'connect_timeout' => 10, - 'timeout' => 0, - 'use_brackets' => true, - 'protocol_version' => '1.1', - 'buffer_size' => 16384, - 'store_body' => true, - 'local_ip' => null, - - 'proxy_host' => '', - 'proxy_port' => '', - 'proxy_user' => '', - 'proxy_password' => '', - 'proxy_auth_scheme' => self::AUTH_BASIC, - 'proxy_type' => 'http', - - 'ssl_verify_peer' => true, - 'ssl_verify_host' => true, - 'ssl_cafile' => null, - 'ssl_capath' => null, - 'ssl_local_cert' => null, - 'ssl_passphrase' => null, - - 'digest_compat_ie' => false, - - 'follow_redirects' => false, - 'max_redirects' => 5, - 'strict_redirects' => false - ); - - /** - * Last event in request / response handling, intended for observers - * @var array - * @see getLastEvent() - */ - protected $lastEvent = array( - 'name' => 'start', - 'data' => null - ); - - /** - * Request body - * @var string|resource - * @see setBody() - */ - protected $body = ''; - - /** - * Array of POST parameters - * @var array - */ - protected $postParams = array(); - - /** - * Array of file uploads (for multipart/form-data POST requests) - * @var array - */ - protected $uploads = array(); - - /** - * Adapter used to perform actual HTTP request - * @var HTTP_Request2_Adapter - */ - protected $adapter; - - /** - * Cookie jar to persist cookies between requests - * @var HTTP_Request2_CookieJar - */ - protected $cookieJar = null; - - /** - * Constructor. Can set request URL, method and configuration array. - * - * Also sets a default value for User-Agent header. - * - * @param string|Net_Url2 $url Request URL - * @param string $method Request method - * @param array $config Configuration for this Request instance - */ - public function __construct( - $url = null, $method = self::METHOD_GET, array $config = array() - ) { - $this->setConfig($config); - if (!empty($url)) { - $this->setUrl($url); - } - if (!empty($method)) { - $this->setMethod($method); - } - $this->setHeader( - 'user-agent', 'HTTP_Request2/2.2.1 ' . - '(http://pear.php.net/package/http_request2) PHP/' . phpversion() - ); - } - - /** - * Sets the URL for this request - * - * If the URL has userinfo part (username & password) these will be removed - * and converted to auth data. If the URL does not have a path component, - * that will be set to '/'. - * - * @param string|Net_URL2 $url Request URL - * - * @return HTTP_Request2 - * @throws HTTP_Request2_LogicException - */ - public function setUrl($url) - { - if (is_string($url)) { - $url = new Net_URL2( - $url, array(Net_URL2::OPTION_USE_BRACKETS => $this->config['use_brackets']) - ); - } - if (!$url instanceof Net_URL2) { - throw new HTTP_Request2_LogicException( - 'Parameter is not a valid HTTP URL', - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - // URL contains username / password? - if ($url->getUserinfo()) { - $username = $url->getUser(); - $password = $url->getPassword(); - $this->setAuth(rawurldecode($username), $password? rawurldecode($password): ''); - $url->setUserinfo(''); - } - if ('' == $url->getPath()) { - $url->setPath('/'); - } - $this->url = $url; - - return $this; - } - - /** - * Returns the request URL - * - * @return Net_URL2 - */ - public function getUrl() - { - return $this->url; - } - - /** - * Sets the request method - * - * @param string $method one of the methods defined in RFC 2616 - * - * @return HTTP_Request2 - * @throws HTTP_Request2_LogicException if the method name is invalid - */ - public function setMethod($method) - { - // Method name should be a token: http://tools.ietf.org/html/rfc2616#section-5.1.1 - if (preg_match(self::REGEXP_INVALID_TOKEN, $method)) { - throw new HTTP_Request2_LogicException( - "Invalid request method '{$method}'", - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - $this->method = $method; - - return $this; - } - - /** - * Returns the request method - * - * @return string - */ - public function getMethod() - { - return $this->method; - } - - /** - * Sets the configuration parameter(s) - * - * The following parameters are available: - * <ul> - * <li> 'adapter' - adapter to use (string)</li> - * <li> 'connect_timeout' - Connection timeout in seconds (integer)</li> - * <li> 'timeout' - Total number of seconds a request can take. - * Use 0 for no limit, should be greater than - * 'connect_timeout' if set (integer)</li> - * <li> 'use_brackets' - Whether to append [] to array variable names (bool)</li> - * <li> 'protocol_version' - HTTP Version to use, '1.0' or '1.1' (string)</li> - * <li> 'buffer_size' - Buffer size to use for reading and writing (int)</li> - * <li> 'store_body' - Whether to store response body in response object. - * Set to false if receiving a huge response and - * using an Observer to save it (boolean)</li> - * <li> 'local_ip' - Specifies the IP address that will be used for accessing - * the network (string)</li> - * <li> 'proxy_type' - Proxy type, 'http' or 'socks5' (string)</li> - * <li> 'proxy_host' - Proxy server host (string)</li> - * <li> 'proxy_port' - Proxy server port (integer)</li> - * <li> 'proxy_user' - Proxy auth username (string)</li> - * <li> 'proxy_password' - Proxy auth password (string)</li> - * <li> 'proxy_auth_scheme' - Proxy auth scheme, one of HTTP_Request2::AUTH_* constants (string)</li> - * <li> 'proxy' - Shorthand for proxy_* parameters, proxy given as URL, - * e.g. 'socks5://localhost:1080/' (string)</li> - * <li> 'ssl_verify_peer' - Whether to verify peer's SSL certificate (bool)</li> - * <li> 'ssl_verify_host' - Whether to check that Common Name in SSL - * certificate matches host name (bool)</li> - * <li> 'ssl_cafile' - Cerificate Authority file to verify the peer - * with (use with 'ssl_verify_peer') (string)</li> - * <li> 'ssl_capath' - Directory holding multiple Certificate - * Authority files (string)</li> - * <li> 'ssl_local_cert' - Name of a file containing local cerificate (string)</li> - * <li> 'ssl_passphrase' - Passphrase with which local certificate - * was encoded (string)</li> - * <li> 'digest_compat_ie' - Whether to imitate behaviour of MSIE 5 and 6 - * in using URL without query string in digest - * authentication (boolean)</li> - * <li> 'follow_redirects' - Whether to automatically follow HTTP Redirects (boolean)</li> - * <li> 'max_redirects' - Maximum number of redirects to follow (integer)</li> - * <li> 'strict_redirects' - Whether to keep request method on redirects via status 301 and - * 302 (true, needed for compatibility with RFC 2616) - * or switch to GET (false, needed for compatibility with most - * browsers) (boolean)</li> - * </ul> - * - * @param string|array $nameOrConfig configuration parameter name or array - * ('parameter name' => 'parameter value') - * @param mixed $value parameter value if $nameOrConfig is not an array - * - * @return HTTP_Request2 - * @throws HTTP_Request2_LogicException If the parameter is unknown - */ - public function setConfig($nameOrConfig, $value = null) - { - if (is_array($nameOrConfig)) { - foreach ($nameOrConfig as $name => $value) { - $this->setConfig($name, $value); - } - - } elseif ('proxy' == $nameOrConfig) { - $url = new Net_URL2($value); - $this->setConfig(array( - 'proxy_type' => $url->getScheme(), - 'proxy_host' => $url->getHost(), - 'proxy_port' => $url->getPort(), - 'proxy_user' => rawurldecode($url->getUser()), - 'proxy_password' => rawurldecode($url->getPassword()) - )); - - } else { - if (!array_key_exists($nameOrConfig, $this->config)) { - throw new HTTP_Request2_LogicException( - "Unknown configuration parameter '{$nameOrConfig}'", - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - $this->config[$nameOrConfig] = $value; - } - - return $this; - } - - /** - * Returns the value(s) of the configuration parameter(s) - * - * @param string $name parameter name - * - * @return mixed value of $name parameter, array of all configuration - * parameters if $name is not given - * @throws HTTP_Request2_LogicException If the parameter is unknown - */ - public function getConfig($name = null) - { - if (null === $name) { - return $this->config; - } elseif (!array_key_exists($name, $this->config)) { - throw new HTTP_Request2_LogicException( - "Unknown configuration parameter '{$name}'", - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - return $this->config[$name]; - } - - /** - * Sets the autentification data - * - * @param string $user user name - * @param string $password password - * @param string $scheme authentication scheme - * - * @return HTTP_Request2 - */ - public function setAuth($user, $password = '', $scheme = self::AUTH_BASIC) - { - if (empty($user)) { - $this->auth = null; - } else { - $this->auth = array( - 'user' => (string)$user, - 'password' => (string)$password, - 'scheme' => $scheme - ); - } - - return $this; - } - - /** - * Returns the authentication data - * - * The array has the keys 'user', 'password' and 'scheme', where 'scheme' - * is one of the HTTP_Request2::AUTH_* constants. - * - * @return array - */ - public function getAuth() - { - return $this->auth; - } - - /** - * Sets request header(s) - * - * The first parameter may be either a full header string 'header: value' or - * header name. In the former case $value parameter is ignored, in the latter - * the header's value will either be set to $value or the header will be - * removed if $value is null. The first parameter can also be an array of - * headers, in that case method will be called recursively. - * - * Note that headers are treated case insensitively as per RFC 2616. - * - * <code> - * $req->setHeader('Foo: Bar'); // sets the value of 'Foo' header to 'Bar' - * $req->setHeader('FoO', 'Baz'); // sets the value of 'Foo' header to 'Baz' - * $req->setHeader(array('foo' => 'Quux')); // sets the value of 'Foo' header to 'Quux' - * $req->setHeader('FOO'); // removes 'Foo' header from request - * </code> - * - * @param string|array $name header name, header string ('Header: value') - * or an array of headers - * @param string|array|null $value header value if $name is not an array, - * header will be removed if value is null - * @param bool $replace whether to replace previous header with the - * same name or append to its value - * - * @return HTTP_Request2 - * @throws HTTP_Request2_LogicException - */ - public function setHeader($name, $value = null, $replace = true) - { - if (is_array($name)) { - foreach ($name as $k => $v) { - if (is_string($k)) { - $this->setHeader($k, $v, $replace); - } else { - $this->setHeader($v, null, $replace); - } - } - } else { - if (null === $value && strpos($name, ':')) { - list($name, $value) = array_map('trim', explode(':', $name, 2)); - } - // Header name should be a token: http://tools.ietf.org/html/rfc2616#section-4.2 - if (preg_match(self::REGEXP_INVALID_TOKEN, $name)) { - throw new HTTP_Request2_LogicException( - "Invalid header name '{$name}'", - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - // Header names are case insensitive anyway - $name = strtolower($name); - if (null === $value) { - unset($this->headers[$name]); - - } else { - if (is_array($value)) { - $value = implode(', ', array_map('trim', $value)); - } elseif (is_string($value)) { - $value = trim($value); - } - if (!isset($this->headers[$name]) || $replace) { - $this->headers[$name] = $value; - } else { - $this->headers[$name] .= ', ' . $value; - } - } - } - - return $this; - } - - /** - * Returns the request headers - * - * The array is of the form ('header name' => 'header value'), header names - * are lowercased - * - * @return array - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * Adds a cookie to the request - * - * If the request does not have a CookieJar object set, this method simply - * appends a cookie to "Cookie:" header. - * - * If a CookieJar object is available, the cookie is stored in that object. - * Data from request URL will be used for setting its 'domain' and 'path' - * parameters, 'expires' and 'secure' will be set to null and false, - * respectively. If you need further control, use CookieJar's methods. - * - * @param string $name cookie name - * @param string $value cookie value - * - * @return HTTP_Request2 - * @throws HTTP_Request2_LogicException - * @see setCookieJar() - */ - public function addCookie($name, $value) - { - if (!empty($this->cookieJar)) { - $this->cookieJar->store( - array('name' => $name, 'value' => $value), $this->url - ); - - } else { - $cookie = $name . '=' . $value; - if (preg_match(self::REGEXP_INVALID_COOKIE, $cookie)) { - throw new HTTP_Request2_LogicException( - "Invalid cookie: '{$cookie}'", - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - $cookies = empty($this->headers['cookie'])? '': $this->headers['cookie'] . '; '; - $this->setHeader('cookie', $cookies . $cookie); - } - - return $this; - } - - /** - * Sets the request body - * - * If you provide file pointer rather than file name, it should support - * fstat() and rewind() operations. - * - * @param string|resource|HTTP_Request2_MultipartBody $body Either a - * string with the body or filename containing body or - * pointer to an open file or object with multipart body data - * @param bool $isFilename Whether - * first parameter is a filename - * - * @return HTTP_Request2 - * @throws HTTP_Request2_LogicException - */ - public function setBody($body, $isFilename = false) - { - if (!$isFilename && !is_resource($body)) { - if (!$body instanceof HTTP_Request2_MultipartBody) { - $this->body = (string)$body; - } else { - $this->body = $body; - } - } else { - $fileData = $this->fopenWrapper($body, empty($this->headers['content-type'])); - $this->body = $fileData['fp']; - if (empty($this->headers['content-type'])) { - $this->setHeader('content-type', $fileData['type']); - } - } - $this->postParams = $this->uploads = array(); - - return $this; - } - - /** - * Returns the request body - * - * @return string|resource|HTTP_Request2_MultipartBody - */ - public function getBody() - { - if (self::METHOD_POST == $this->method - && (!empty($this->postParams) || !empty($this->uploads)) - ) { - if (0 === strpos($this->headers['content-type'], 'application/x-www-form-urlencoded')) { - $body = http_build_query($this->postParams, '', '&'); - if (!$this->getConfig('use_brackets')) { - $body = preg_replace('/%5B\d+%5D=/', '=', $body); - } - // support RFC 3986 by not encoding '~' symbol (request #15368) - return str_replace('%7E', '~', $body); - - } elseif (0 === strpos($this->headers['content-type'], 'multipart/form-data')) { - require_once 'HTTP/Request2/MultipartBody.php'; - return new HTTP_Request2_MultipartBody( - $this->postParams, $this->uploads, $this->getConfig('use_brackets') - ); - } - } - return $this->body; - } - - /** - * Adds a file to form-based file upload - * - * Used to emulate file upload via a HTML form. The method also sets - * Content-Type of HTTP request to 'multipart/form-data'. - * - * If you just want to send the contents of a file as the body of HTTP - * request you should use setBody() method. - * - * If you provide file pointers rather than file names, they should support - * fstat() and rewind() operations. - * - * @param string $fieldName name of file-upload field - * @param string|resource|array $filename full name of local file, - * pointer to open file or an array of files - * @param string $sendFilename filename to send in the request - * @param string $contentType content-type of file being uploaded - * - * @return HTTP_Request2 - * @throws HTTP_Request2_LogicException - */ - public function addUpload( - $fieldName, $filename, $sendFilename = null, $contentType = null - ) { - if (!is_array($filename)) { - $fileData = $this->fopenWrapper($filename, empty($contentType)); - $this->uploads[$fieldName] = array( - 'fp' => $fileData['fp'], - 'filename' => !empty($sendFilename)? $sendFilename - :(is_string($filename)? basename($filename): 'anonymous.blob') , - 'size' => $fileData['size'], - 'type' => empty($contentType)? $fileData['type']: $contentType - ); - } else { - $fps = $names = $sizes = $types = array(); - foreach ($filename as $f) { - if (!is_array($f)) { - $f = array($f); - } - $fileData = $this->fopenWrapper($f[0], empty($f[2])); - $fps[] = $fileData['fp']; - $names[] = !empty($f[1])? $f[1] - :(is_string($f[0])? basename($f[0]): 'anonymous.blob'); - $sizes[] = $fileData['size']; - $types[] = empty($f[2])? $fileData['type']: $f[2]; - } - $this->uploads[$fieldName] = array( - 'fp' => $fps, 'filename' => $names, 'size' => $sizes, 'type' => $types - ); - } - if (empty($this->headers['content-type']) - || 'application/x-www-form-urlencoded' == $this->headers['content-type'] - ) { - $this->setHeader('content-type', 'multipart/form-data'); - } - - return $this; - } - - /** - * Adds POST parameter(s) to the request. - * - * @param string|array $name parameter name or array ('name' => 'value') - * @param mixed $value parameter value (can be an array) - * - * @return HTTP_Request2 - */ - public function addPostParameter($name, $value = null) - { - if (!is_array($name)) { - $this->postParams[$name] = $value; - } else { - foreach ($name as $k => $v) { - $this->addPostParameter($k, $v); - } - } - if (empty($this->headers['content-type'])) { - $this->setHeader('content-type', 'application/x-www-form-urlencoded'); - } - - return $this; - } - - /** - * Attaches a new observer - * - * @param SplObserver $observer any object implementing SplObserver - */ - public function attach(SplObserver $observer) - { - foreach ($this->observers as $attached) { - if ($attached === $observer) { - return; - } - } - $this->observers[] = $observer; - } - - /** - * Detaches an existing observer - * - * @param SplObserver $observer any object implementing SplObserver - */ - public function detach(SplObserver $observer) - { - foreach ($this->observers as $key => $attached) { - if ($attached === $observer) { - unset($this->observers[$key]); - return; - } - } - } - - /** - * Notifies all observers - */ - public function notify() - { - foreach ($this->observers as $observer) { - $observer->update($this); - } - } - - /** - * Sets the last event - * - * Adapters should use this method to set the current state of the request - * and notify the observers. - * - * @param string $name event name - * @param mixed $data event data - */ - public function setLastEvent($name, $data = null) - { - $this->lastEvent = array( - 'name' => $name, - 'data' => $data - ); - $this->notify(); - } - - /** - * Returns the last event - * - * Observers should use this method to access the last change in request. - * The following event names are possible: - * <ul> - * <li>'connect' - after connection to remote server, - * data is the destination (string)</li> - * <li>'disconnect' - after disconnection from server</li> - * <li>'sentHeaders' - after sending the request headers, - * data is the headers sent (string)</li> - * <li>'sentBodyPart' - after sending a part of the request body, - * data is the length of that part (int)</li> - * <li>'sentBody' - after sending the whole request body, - * data is request body length (int)</li> - * <li>'receivedHeaders' - after receiving the response headers, - * data is HTTP_Request2_Response object</li> - * <li>'receivedBodyPart' - after receiving a part of the response - * body, data is that part (string)</li> - * <li>'receivedEncodedBodyPart' - as 'receivedBodyPart', but data is still - * encoded by Content-Encoding</li> - * <li>'receivedBody' - after receiving the complete response - * body, data is HTTP_Request2_Response object</li> - * </ul> - * Different adapters may not send all the event types. Mock adapter does - * not send any events to the observers. - * - * @return array The array has two keys: 'name' and 'data' - */ - public function getLastEvent() - { - return $this->lastEvent; - } - - /** - * Sets the adapter used to actually perform the request - * - * You can pass either an instance of a class implementing HTTP_Request2_Adapter - * or a class name. The method will only try to include a file if the class - * name starts with HTTP_Request2_Adapter_, it will also try to prepend this - * prefix to the class name if it doesn't contain any underscores, so that - * <code> - * $request->setAdapter('curl'); - * </code> - * will work. - * - * @param string|HTTP_Request2_Adapter $adapter Adapter to use - * - * @return HTTP_Request2 - * @throws HTTP_Request2_LogicException - */ - public function setAdapter($adapter) - { - if (is_string($adapter)) { - if (!class_exists($adapter, false)) { - if (false === strpos($adapter, '_')) { - $adapter = 'HTTP_Request2_Adapter_' . ucfirst($adapter); - } - if (!class_exists($adapter, false) - && preg_match('/^HTTP_Request2_Adapter_([a-zA-Z0-9]+)$/', $adapter) - ) { - include_once str_replace('_', DIRECTORY_SEPARATOR, $adapter) . '.php'; - } - if (!class_exists($adapter, false)) { - throw new HTTP_Request2_LogicException( - "Class {$adapter} not found", - HTTP_Request2_Exception::MISSING_VALUE - ); - } - } - $adapter = new $adapter; - } - if (!$adapter instanceof HTTP_Request2_Adapter) { - throw new HTTP_Request2_LogicException( - 'Parameter is not a HTTP request adapter', - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - $this->adapter = $adapter; - - return $this; - } - - /** - * Sets the cookie jar - * - * A cookie jar is used to maintain cookies across HTTP requests and - * responses. Cookies from jar will be automatically added to the request - * headers based on request URL. - * - * @param HTTP_Request2_CookieJar|bool $jar Existing CookieJar object, true to - * create a new one, false to remove - * - * @return HTTP_Request2 - * @throws HTTP_Request2_LogicException - */ - public function setCookieJar($jar = true) - { - if (!class_exists('HTTP_Request2_CookieJar', false)) { - require_once 'HTTP/Request2/CookieJar.php'; - } - - if ($jar instanceof HTTP_Request2_CookieJar) { - $this->cookieJar = $jar; - } elseif (true === $jar) { - $this->cookieJar = new HTTP_Request2_CookieJar(); - } elseif (!$jar) { - $this->cookieJar = null; - } else { - throw new HTTP_Request2_LogicException( - 'Invalid parameter passed to setCookieJar()', - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - - return $this; - } - - /** - * Returns current CookieJar object or null if none - * - * @return HTTP_Request2_CookieJar|null - */ - public function getCookieJar() - { - return $this->cookieJar; - } - - /** - * Sends the request and returns the response - * - * @throws HTTP_Request2_Exception - * @return HTTP_Request2_Response - */ - public function send() - { - // Sanity check for URL - if (!$this->url instanceof Net_URL2 - || !$this->url->isAbsolute() - || !in_array(strtolower($this->url->getScheme()), array('https', 'http')) - ) { - throw new HTTP_Request2_LogicException( - 'HTTP_Request2 needs an absolute HTTP(S) request URL, ' - . ($this->url instanceof Net_URL2 - ? "'" . $this->url->__toString() . "'" : 'none') - . ' given', - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - if (empty($this->adapter)) { - $this->setAdapter($this->getConfig('adapter')); - } - // magic_quotes_runtime may break file uploads and chunked response - // processing; see bug #4543. Don't use ini_get() here; see bug #16440. - if ($magicQuotes = get_magic_quotes_runtime()) { - set_magic_quotes_runtime(false); - } - // force using single byte encoding if mbstring extension overloads - // strlen() and substr(); see bug #1781, bug #10605 - if (extension_loaded('mbstring') && (2 & ini_get('mbstring.func_overload'))) { - $oldEncoding = mb_internal_encoding(); - mb_internal_encoding('8bit'); - } - - try { - $response = $this->adapter->sendRequest($this); - } catch (Exception $e) { - } - // cleanup in either case (poor man's "finally" clause) - if ($magicQuotes) { - set_magic_quotes_runtime(true); - } - if (!empty($oldEncoding)) { - mb_internal_encoding($oldEncoding); - } - // rethrow the exception - if (!empty($e)) { - throw $e; - } - return $response; - } - - /** - * Wrapper around fopen()/fstat() used by setBody() and addUpload() - * - * @param string|resource $file file name or pointer to open file - * @param bool $detectType whether to try autodetecting MIME - * type of file, will only work if $file is a - * filename, not pointer - * - * @return array array('fp' => file pointer, 'size' => file size, 'type' => MIME type) - * @throws HTTP_Request2_LogicException - */ - protected function fopenWrapper($file, $detectType = false) - { - if (!is_string($file) && !is_resource($file)) { - throw new HTTP_Request2_LogicException( - "Filename or file pointer resource expected", - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - $fileData = array( - 'fp' => is_string($file)? null: $file, - 'type' => 'application/octet-stream', - 'size' => 0 - ); - if (is_string($file)) { - if (!($fileData['fp'] = @fopen($file, 'rb'))) { - $error = error_get_last(); - throw new HTTP_Request2_LogicException( - $error['message'], HTTP_Request2_Exception::READ_ERROR - ); - } - if ($detectType) { - $fileData['type'] = self::detectMimeType($file); - } - } - if (!($stat = fstat($fileData['fp']))) { - throw new HTTP_Request2_LogicException( - "fstat() call failed", HTTP_Request2_Exception::READ_ERROR - ); - } - $fileData['size'] = $stat['size']; - - return $fileData; - } - - /** - * Tries to detect MIME type of a file - * - * The method will try to use fileinfo extension if it is available, - * deprecated mime_content_type() function in the other case. If neither - * works, default 'application/octet-stream' MIME type is returned - * - * @param string $filename file name - * - * @return string file MIME type - */ - protected static function detectMimeType($filename) - { - // finfo extension from PECL available - if (function_exists('finfo_open')) { - if (!isset(self::$_fileinfoDb)) { - self::$_fileinfoDb = @finfo_open(FILEINFO_MIME); - } - if (self::$_fileinfoDb) { - $info = finfo_file(self::$_fileinfoDb, $filename); - } - } - // (deprecated) mime_content_type function available - if (empty($info) && function_exists('mime_content_type')) { - return mime_content_type($filename); - } - return empty($info)? 'application/octet-stream': $info; - } -} -?> +<?php +/** + * Class representing a HTTP request message + * + * PHP version 5 + * + * LICENSE + * + * This source file is subject to BSD 3-Clause License that is bundled + * with this package in the file LICENSE and available at the URL + * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @copyright 2008-2016 Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** + * A class representing an URL as per RFC 3986. + */ +if (!class_exists('Net_URL2', true)) { + require_once 'Net/URL2.php'; +} + +/** + * Exception class for HTTP_Request2 package + */ +require_once 'HTTP/Request2/Exception.php'; + +/** + * Class representing a HTTP request message + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + * @link http://tools.ietf.org/html/rfc2616#section-5 + */ +class HTTP_Request2 implements SplSubject +{ + /**#@+ + * Constants for HTTP request methods + * + * @link http://tools.ietf.org/html/rfc2616#section-5.1.1 + */ + const METHOD_OPTIONS = 'OPTIONS'; + const METHOD_GET = 'GET'; + const METHOD_HEAD = 'HEAD'; + const METHOD_POST = 'POST'; + const METHOD_PUT = 'PUT'; + const METHOD_DELETE = 'DELETE'; + const METHOD_TRACE = 'TRACE'; + const METHOD_CONNECT = 'CONNECT'; + /**#@-*/ + + /**#@+ + * Constants for HTTP authentication schemes + * + * @link http://tools.ietf.org/html/rfc2617 + */ + const AUTH_BASIC = 'basic'; + const AUTH_DIGEST = 'digest'; + /**#@-*/ + + /** + * Regular expression used to check for invalid symbols in RFC 2616 tokens + * @link http://pear.php.net/bugs/bug.php?id=15630 + */ + const REGEXP_INVALID_TOKEN = '![\x00-\x1f\x7f-\xff()<>@,;:\\\\"/\[\]?={}\s]!'; + + /** + * Regular expression used to check for invalid symbols in cookie strings + * @link http://pear.php.net/bugs/bug.php?id=15630 + * @link http://web.archive.org/web/20080331104521/http://cgi.netscape.com/newsref/std/cookie_spec.html + */ + const REGEXP_INVALID_COOKIE = '/[\s,;]/'; + + /** + * Fileinfo magic database resource + * @var resource + * @see detectMimeType() + */ + private static $_fileinfoDb; + + /** + * Observers attached to the request (instances of SplObserver) + * @var array + */ + protected $observers = array(); + + /** + * Request URL + * @var Net_URL2 + */ + protected $url; + + /** + * Request method + * @var string + */ + protected $method = self::METHOD_GET; + + /** + * Authentication data + * @var array + * @see getAuth() + */ + protected $auth; + + /** + * Request headers + * @var array + */ + protected $headers = array(); + + /** + * Configuration parameters + * @var array + * @see setConfig() + */ + protected $config = array( + 'adapter' => 'HTTP_Request2_Adapter_Socket', + 'connect_timeout' => 10, + 'timeout' => 0, + 'use_brackets' => true, + 'protocol_version' => '1.1', + 'buffer_size' => 16384, + 'store_body' => true, + 'local_ip' => null, + + 'proxy_host' => '', + 'proxy_port' => '', + 'proxy_user' => '', + 'proxy_password' => '', + 'proxy_auth_scheme' => self::AUTH_BASIC, + 'proxy_type' => 'http', + + 'ssl_verify_peer' => true, + 'ssl_verify_host' => true, + 'ssl_cafile' => null, + 'ssl_capath' => null, + 'ssl_local_cert' => null, + 'ssl_passphrase' => null, + + 'digest_compat_ie' => false, + + 'follow_redirects' => false, + 'max_redirects' => 5, + 'strict_redirects' => false + ); + + /** + * Last event in request / response handling, intended for observers + * @var array + * @see getLastEvent() + */ + protected $lastEvent = array( + 'name' => 'start', + 'data' => null + ); + + /** + * Request body + * @var string|resource + * @see setBody() + */ + protected $body = ''; + + /** + * Array of POST parameters + * @var array + */ + protected $postParams = array(); + + /** + * Array of file uploads (for multipart/form-data POST requests) + * @var array + */ + protected $uploads = array(); + + /** + * Adapter used to perform actual HTTP request + * @var HTTP_Request2_Adapter + */ + protected $adapter; + + /** + * Cookie jar to persist cookies between requests + * @var HTTP_Request2_CookieJar + */ + protected $cookieJar = null; + + /** + * Constructor. Can set request URL, method and configuration array. + * + * Also sets a default value for User-Agent header. + * + * @param string|Net_Url2 $url Request URL + * @param string $method Request method + * @param array $config Configuration for this Request instance + */ + public function __construct( + $url = null, $method = self::METHOD_GET, array $config = array() + ) { + $this->setConfig($config); + if (!empty($url)) { + $this->setUrl($url); + } + if (!empty($method)) { + $this->setMethod($method); + } + $this->setHeader( + 'user-agent', 'HTTP_Request2/2.3.0 ' . + '(http://pear.php.net/package/http_request2) PHP/' . phpversion() + ); + } + + /** + * Sets the URL for this request + * + * If the URL has userinfo part (username & password) these will be removed + * and converted to auth data. If the URL does not have a path component, + * that will be set to '/'. + * + * @param string|Net_URL2 $url Request URL + * + * @return HTTP_Request2 + * @throws HTTP_Request2_LogicException + */ + public function setUrl($url) + { + if (is_string($url)) { + $url = new Net_URL2( + $url, array(Net_URL2::OPTION_USE_BRACKETS => $this->config['use_brackets']) + ); + } + if (!$url instanceof Net_URL2) { + throw new HTTP_Request2_LogicException( + 'Parameter is not a valid HTTP URL', + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + // URL contains username / password? + if ($url->getUserinfo()) { + $username = $url->getUser(); + $password = $url->getPassword(); + $this->setAuth(rawurldecode($username), $password? rawurldecode($password): ''); + $url->setUserinfo(''); + } + if ('' == $url->getPath()) { + $url->setPath('/'); + } + $this->url = $url; + + return $this; + } + + /** + * Returns the request URL + * + * @return Net_URL2 + */ + public function getUrl() + { + return $this->url; + } + + /** + * Sets the request method + * + * @param string $method one of the methods defined in RFC 2616 + * + * @return HTTP_Request2 + * @throws HTTP_Request2_LogicException if the method name is invalid + */ + public function setMethod($method) + { + // Method name should be a token: http://tools.ietf.org/html/rfc2616#section-5.1.1 + if (preg_match(self::REGEXP_INVALID_TOKEN, $method)) { + throw new HTTP_Request2_LogicException( + "Invalid request method '{$method}'", + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + $this->method = $method; + + return $this; + } + + /** + * Returns the request method + * + * @return string + */ + public function getMethod() + { + return $this->method; + } + + /** + * Sets the configuration parameter(s) + * + * The following parameters are available: + * <ul> + * <li> 'adapter' - adapter to use (string)</li> + * <li> 'connect_timeout' - Connection timeout in seconds (integer)</li> + * <li> 'timeout' - Total number of seconds a request can take. + * Use 0 for no limit, should be greater than + * 'connect_timeout' if set (integer)</li> + * <li> 'use_brackets' - Whether to append [] to array variable names (bool)</li> + * <li> 'protocol_version' - HTTP Version to use, '1.0' or '1.1' (string)</li> + * <li> 'buffer_size' - Buffer size to use for reading and writing (int)</li> + * <li> 'store_body' - Whether to store response body in response object. + * Set to false if receiving a huge response and + * using an Observer to save it (boolean)</li> + * <li> 'local_ip' - Specifies the IP address that will be used for accessing + * the network (string)</li> + * <li> 'proxy_type' - Proxy type, 'http' or 'socks5' (string)</li> + * <li> 'proxy_host' - Proxy server host (string)</li> + * <li> 'proxy_port' - Proxy server port (integer)</li> + * <li> 'proxy_user' - Proxy auth username (string)</li> + * <li> 'proxy_password' - Proxy auth password (string)</li> + * <li> 'proxy_auth_scheme' - Proxy auth scheme, one of HTTP_Request2::AUTH_* constants (string)</li> + * <li> 'proxy' - Shorthand for proxy_* parameters, proxy given as URL, + * e.g. 'socks5://localhost:1080/' (string)</li> + * <li> 'ssl_verify_peer' - Whether to verify peer's SSL certificate (bool)</li> + * <li> 'ssl_verify_host' - Whether to check that Common Name in SSL + * certificate matches host name (bool)</li> + * <li> 'ssl_cafile' - Cerificate Authority file to verify the peer + * with (use with 'ssl_verify_peer') (string)</li> + * <li> 'ssl_capath' - Directory holding multiple Certificate + * Authority files (string)</li> + * <li> 'ssl_local_cert' - Name of a file containing local cerificate (string)</li> + * <li> 'ssl_passphrase' - Passphrase with which local certificate + * was encoded (string)</li> + * <li> 'digest_compat_ie' - Whether to imitate behaviour of MSIE 5 and 6 + * in using URL without query string in digest + * authentication (boolean)</li> + * <li> 'follow_redirects' - Whether to automatically follow HTTP Redirects (boolean)</li> + * <li> 'max_redirects' - Maximum number of redirects to follow (integer)</li> + * <li> 'strict_redirects' - Whether to keep request method on redirects via status 301 and + * 302 (true, needed for compatibility with RFC 2616) + * or switch to GET (false, needed for compatibility with most + * browsers) (boolean)</li> + * </ul> + * + * @param string|array $nameOrConfig configuration parameter name or array + * ('parameter name' => 'parameter value') + * @param mixed $value parameter value if $nameOrConfig is not an array + * + * @return HTTP_Request2 + * @throws HTTP_Request2_LogicException If the parameter is unknown + */ + public function setConfig($nameOrConfig, $value = null) + { + if (is_array($nameOrConfig)) { + foreach ($nameOrConfig as $name => $value) { + $this->setConfig($name, $value); + } + + } elseif ('proxy' == $nameOrConfig) { + $url = new Net_URL2($value); + $this->setConfig(array( + 'proxy_type' => $url->getScheme(), + 'proxy_host' => $url->getHost(), + 'proxy_port' => $url->getPort(), + 'proxy_user' => rawurldecode($url->getUser()), + 'proxy_password' => rawurldecode($url->getPassword()) + )); + + } else { + if (!array_key_exists($nameOrConfig, $this->config)) { + throw new HTTP_Request2_LogicException( + "Unknown configuration parameter '{$nameOrConfig}'", + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + $this->config[$nameOrConfig] = $value; + } + + return $this; + } + + /** + * Returns the value(s) of the configuration parameter(s) + * + * @param string $name parameter name + * + * @return mixed value of $name parameter, array of all configuration + * parameters if $name is not given + * @throws HTTP_Request2_LogicException If the parameter is unknown + */ + public function getConfig($name = null) + { + if (null === $name) { + return $this->config; + } elseif (!array_key_exists($name, $this->config)) { + throw new HTTP_Request2_LogicException( + "Unknown configuration parameter '{$name}'", + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + return $this->config[$name]; + } + + /** + * Sets the autentification data + * + * @param string $user user name + * @param string $password password + * @param string $scheme authentication scheme + * + * @return HTTP_Request2 + */ + public function setAuth($user, $password = '', $scheme = self::AUTH_BASIC) + { + if (empty($user)) { + $this->auth = null; + } else { + $this->auth = array( + 'user' => (string)$user, + 'password' => (string)$password, + 'scheme' => $scheme + ); + } + + return $this; + } + + /** + * Returns the authentication data + * + * The array has the keys 'user', 'password' and 'scheme', where 'scheme' + * is one of the HTTP_Request2::AUTH_* constants. + * + * @return array + */ + public function getAuth() + { + return $this->auth; + } + + /** + * Sets request header(s) + * + * The first parameter may be either a full header string 'header: value' or + * header name. In the former case $value parameter is ignored, in the latter + * the header's value will either be set to $value or the header will be + * removed if $value is null. The first parameter can also be an array of + * headers, in that case method will be called recursively. + * + * Note that headers are treated case insensitively as per RFC 2616. + * + * <code> + * $req->setHeader('Foo: Bar'); // sets the value of 'Foo' header to 'Bar' + * $req->setHeader('FoO', 'Baz'); // sets the value of 'Foo' header to 'Baz' + * $req->setHeader(array('foo' => 'Quux')); // sets the value of 'Foo' header to 'Quux' + * $req->setHeader('FOO'); // removes 'Foo' header from request + * </code> + * + * @param string|array $name header name, header string ('Header: value') + * or an array of headers + * @param string|array|null $value header value if $name is not an array, + * header will be removed if value is null + * @param bool $replace whether to replace previous header with the + * same name or append to its value + * + * @return HTTP_Request2 + * @throws HTTP_Request2_LogicException + */ + public function setHeader($name, $value = null, $replace = true) + { + if (is_array($name)) { + foreach ($name as $k => $v) { + if (is_string($k)) { + $this->setHeader($k, $v, $replace); + } else { + $this->setHeader($v, null, $replace); + } + } + } else { + if (null === $value && strpos($name, ':')) { + list($name, $value) = array_map('trim', explode(':', $name, 2)); + } + // Header name should be a token: http://tools.ietf.org/html/rfc2616#section-4.2 + if (preg_match(self::REGEXP_INVALID_TOKEN, $name)) { + throw new HTTP_Request2_LogicException( + "Invalid header name '{$name}'", + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + // Header names are case insensitive anyway + $name = strtolower($name); + if (null === $value) { + unset($this->headers[$name]); + + } else { + if (is_array($value)) { + $value = implode(', ', array_map('trim', $value)); + } elseif (is_string($value)) { + $value = trim($value); + } + if (!isset($this->headers[$name]) || $replace) { + $this->headers[$name] = $value; + } else { + $this->headers[$name] .= ', ' . $value; + } + } + } + + return $this; + } + + /** + * Returns the request headers + * + * The array is of the form ('header name' => 'header value'), header names + * are lowercased + * + * @return array + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * Adds a cookie to the request + * + * If the request does not have a CookieJar object set, this method simply + * appends a cookie to "Cookie:" header. + * + * If a CookieJar object is available, the cookie is stored in that object. + * Data from request URL will be used for setting its 'domain' and 'path' + * parameters, 'expires' and 'secure' will be set to null and false, + * respectively. If you need further control, use CookieJar's methods. + * + * @param string $name cookie name + * @param string $value cookie value + * + * @return HTTP_Request2 + * @throws HTTP_Request2_LogicException + * @see setCookieJar() + */ + public function addCookie($name, $value) + { + if (!empty($this->cookieJar)) { + $this->cookieJar->store( + array('name' => $name, 'value' => $value), $this->url + ); + + } else { + $cookie = $name . '=' . $value; + if (preg_match(self::REGEXP_INVALID_COOKIE, $cookie)) { + throw new HTTP_Request2_LogicException( + "Invalid cookie: '{$cookie}'", + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + $cookies = empty($this->headers['cookie'])? '': $this->headers['cookie'] . '; '; + $this->setHeader('cookie', $cookies . $cookie); + } + + return $this; + } + + /** + * Sets the request body + * + * If you provide file pointer rather than file name, it should support + * fstat() and rewind() operations. + * + * @param string|resource|HTTP_Request2_MultipartBody $body Either a + * string with the body or filename containing body or + * pointer to an open file or object with multipart body data + * @param bool $isFilename Whether + * first parameter is a filename + * + * @return HTTP_Request2 + * @throws HTTP_Request2_LogicException + */ + public function setBody($body, $isFilename = false) + { + if (!$isFilename && !is_resource($body)) { + if (!$body instanceof HTTP_Request2_MultipartBody) { + $this->body = (string)$body; + } else { + $this->body = $body; + } + } else { + $fileData = $this->fopenWrapper($body, empty($this->headers['content-type'])); + $this->body = $fileData['fp']; + if (empty($this->headers['content-type'])) { + $this->setHeader('content-type', $fileData['type']); + } + } + $this->postParams = $this->uploads = array(); + + return $this; + } + + /** + * Returns the request body + * + * @return string|resource|HTTP_Request2_MultipartBody + */ + public function getBody() + { + if (self::METHOD_POST == $this->method + && (!empty($this->postParams) || !empty($this->uploads)) + ) { + if (0 === strpos($this->headers['content-type'], 'application/x-www-form-urlencoded')) { + $body = http_build_query($this->postParams, '', '&'); + if (!$this->getConfig('use_brackets')) { + $body = preg_replace('/%5B\d+%5D=/', '=', $body); + } + // support RFC 3986 by not encoding '~' symbol (request #15368) + return str_replace('%7E', '~', $body); + + } elseif (0 === strpos($this->headers['content-type'], 'multipart/form-data')) { + require_once 'HTTP/Request2/MultipartBody.php'; + return new HTTP_Request2_MultipartBody( + $this->postParams, $this->uploads, $this->getConfig('use_brackets') + ); + } + } + return $this->body; + } + + /** + * Adds a file to form-based file upload + * + * Used to emulate file upload via a HTML form. The method also sets + * Content-Type of HTTP request to 'multipart/form-data'. + * + * If you just want to send the contents of a file as the body of HTTP + * request you should use setBody() method. + * + * If you provide file pointers rather than file names, they should support + * fstat() and rewind() operations. + * + * @param string $fieldName name of file-upload field + * @param string|resource|array $filename full name of local file, + * pointer to open file or an array of files + * @param string $sendFilename filename to send in the request + * @param string $contentType content-type of file being uploaded + * + * @return HTTP_Request2 + * @throws HTTP_Request2_LogicException + */ + public function addUpload( + $fieldName, $filename, $sendFilename = null, $contentType = null + ) { + if (!is_array($filename)) { + $fileData = $this->fopenWrapper($filename, empty($contentType)); + $this->uploads[$fieldName] = array( + 'fp' => $fileData['fp'], + 'filename' => !empty($sendFilename)? $sendFilename + :(is_string($filename)? basename($filename): 'anonymous.blob') , + 'size' => $fileData['size'], + 'type' => empty($contentType)? $fileData['type']: $contentType + ); + } else { + $fps = $names = $sizes = $types = array(); + foreach ($filename as $f) { + if (!is_array($f)) { + $f = array($f); + } + $fileData = $this->fopenWrapper($f[0], empty($f[2])); + $fps[] = $fileData['fp']; + $names[] = !empty($f[1])? $f[1] + :(is_string($f[0])? basename($f[0]): 'anonymous.blob'); + $sizes[] = $fileData['size']; + $types[] = empty($f[2])? $fileData['type']: $f[2]; + } + $this->uploads[$fieldName] = array( + 'fp' => $fps, 'filename' => $names, 'size' => $sizes, 'type' => $types + ); + } + if (empty($this->headers['content-type']) + || 'application/x-www-form-urlencoded' == $this->headers['content-type'] + ) { + $this->setHeader('content-type', 'multipart/form-data'); + } + + return $this; + } + + /** + * Adds POST parameter(s) to the request. + * + * @param string|array $name parameter name or array ('name' => 'value') + * @param mixed $value parameter value (can be an array) + * + * @return HTTP_Request2 + */ + public function addPostParameter($name, $value = null) + { + if (!is_array($name)) { + $this->postParams[$name] = $value; + } else { + foreach ($name as $k => $v) { + $this->addPostParameter($k, $v); + } + } + if (empty($this->headers['content-type'])) { + $this->setHeader('content-type', 'application/x-www-form-urlencoded'); + } + + return $this; + } + + /** + * Attaches a new observer + * + * @param SplObserver $observer any object implementing SplObserver + */ + public function attach(SplObserver $observer) + { + foreach ($this->observers as $attached) { + if ($attached === $observer) { + return; + } + } + $this->observers[] = $observer; + } + + /** + * Detaches an existing observer + * + * @param SplObserver $observer any object implementing SplObserver + */ + public function detach(SplObserver $observer) + { + foreach ($this->observers as $key => $attached) { + if ($attached === $observer) { + unset($this->observers[$key]); + return; + } + } + } + + /** + * Notifies all observers + */ + public function notify() + { + foreach ($this->observers as $observer) { + $observer->update($this); + } + } + + /** + * Sets the last event + * + * Adapters should use this method to set the current state of the request + * and notify the observers. + * + * @param string $name event name + * @param mixed $data event data + */ + public function setLastEvent($name, $data = null) + { + $this->lastEvent = array( + 'name' => $name, + 'data' => $data + ); + $this->notify(); + } + + /** + * Returns the last event + * + * Observers should use this method to access the last change in request. + * The following event names are possible: + * <ul> + * <li>'connect' - after connection to remote server, + * data is the destination (string)</li> + * <li>'disconnect' - after disconnection from server</li> + * <li>'sentHeaders' - after sending the request headers, + * data is the headers sent (string)</li> + * <li>'sentBodyPart' - after sending a part of the request body, + * data is the length of that part (int)</li> + * <li>'sentBody' - after sending the whole request body, + * data is request body length (int)</li> + * <li>'receivedHeaders' - after receiving the response headers, + * data is HTTP_Request2_Response object</li> + * <li>'receivedBodyPart' - after receiving a part of the response + * body, data is that part (string)</li> + * <li>'receivedEncodedBodyPart' - as 'receivedBodyPart', but data is still + * encoded by Content-Encoding</li> + * <li>'receivedBody' - after receiving the complete response + * body, data is HTTP_Request2_Response object</li> + * <li>'warning' - a problem arose during the request + * that is not severe enough to throw + * an Exception, data is the warning + * message (string). Currently dispatched if + * response body was received incompletely.</li> + * </ul> + * Different adapters may not send all the event types. Mock adapter does + * not send any events to the observers. + * + * @return array The array has two keys: 'name' and 'data' + */ + public function getLastEvent() + { + return $this->lastEvent; + } + + /** + * Sets the adapter used to actually perform the request + * + * You can pass either an instance of a class implementing HTTP_Request2_Adapter + * or a class name. The method will only try to include a file if the class + * name starts with HTTP_Request2_Adapter_, it will also try to prepend this + * prefix to the class name if it doesn't contain any underscores, so that + * <code> + * $request->setAdapter('curl'); + * </code> + * will work. + * + * @param string|HTTP_Request2_Adapter $adapter Adapter to use + * + * @return HTTP_Request2 + * @throws HTTP_Request2_LogicException + */ + public function setAdapter($adapter) + { + if (is_string($adapter)) { + if (!class_exists($adapter, false)) { + if (false === strpos($adapter, '_')) { + $adapter = 'HTTP_Request2_Adapter_' . ucfirst($adapter); + } + if (!class_exists($adapter, false) + && preg_match('/^HTTP_Request2_Adapter_([a-zA-Z0-9]+)$/', $adapter) + ) { + include_once str_replace('_', DIRECTORY_SEPARATOR, $adapter) . '.php'; + } + if (!class_exists($adapter, false)) { + throw new HTTP_Request2_LogicException( + "Class {$adapter} not found", + HTTP_Request2_Exception::MISSING_VALUE + ); + } + } + $adapter = new $adapter; + } + if (!$adapter instanceof HTTP_Request2_Adapter) { + throw new HTTP_Request2_LogicException( + 'Parameter is not a HTTP request adapter', + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + $this->adapter = $adapter; + + return $this; + } + + /** + * Sets the cookie jar + * + * A cookie jar is used to maintain cookies across HTTP requests and + * responses. Cookies from jar will be automatically added to the request + * headers based on request URL. + * + * @param HTTP_Request2_CookieJar|bool $jar Existing CookieJar object, true to + * create a new one, false to remove + * + * @return HTTP_Request2 + * @throws HTTP_Request2_LogicException + */ + public function setCookieJar($jar = true) + { + if (!class_exists('HTTP_Request2_CookieJar', false)) { + require_once 'HTTP/Request2/CookieJar.php'; + } + + if ($jar instanceof HTTP_Request2_CookieJar) { + $this->cookieJar = $jar; + } elseif (true === $jar) { + $this->cookieJar = new HTTP_Request2_CookieJar(); + } elseif (!$jar) { + $this->cookieJar = null; + } else { + throw new HTTP_Request2_LogicException( + 'Invalid parameter passed to setCookieJar()', + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + + return $this; + } + + /** + * Returns current CookieJar object or null if none + * + * @return HTTP_Request2_CookieJar|null + */ + public function getCookieJar() + { + return $this->cookieJar; + } + + /** + * Sends the request and returns the response + * + * @throws HTTP_Request2_Exception + * @return HTTP_Request2_Response + */ + public function send() + { + // Sanity check for URL + if (!$this->url instanceof Net_URL2 + || !$this->url->isAbsolute() + || !in_array(strtolower($this->url->getScheme()), array('https', 'http')) + ) { + throw new HTTP_Request2_LogicException( + 'HTTP_Request2 needs an absolute HTTP(S) request URL, ' + . ($this->url instanceof Net_URL2 + ? "'" . $this->url->__toString() . "'" : 'none') + . ' given', + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + if (empty($this->adapter)) { + $this->setAdapter($this->getConfig('adapter')); + } + // magic_quotes_runtime may break file uploads and chunked response + // processing; see bug #4543. Don't use ini_get() here; see bug #16440. + if ($magicQuotes = get_magic_quotes_runtime()) { + set_magic_quotes_runtime(false); + } + // force using single byte encoding if mbstring extension overloads + // strlen() and substr(); see bug #1781, bug #10605 + if (extension_loaded('mbstring') && (2 & ini_get('mbstring.func_overload'))) { + $oldEncoding = mb_internal_encoding(); + mb_internal_encoding('8bit'); + } + + try { + $response = $this->adapter->sendRequest($this); + } catch (Exception $e) { + } + // cleanup in either case (poor man's "finally" clause) + if ($magicQuotes) { + set_magic_quotes_runtime(true); + } + if (!empty($oldEncoding)) { + mb_internal_encoding($oldEncoding); + } + // rethrow the exception + if (!empty($e)) { + throw $e; + } + return $response; + } + + /** + * Wrapper around fopen()/fstat() used by setBody() and addUpload() + * + * @param string|resource $file file name or pointer to open file + * @param bool $detectType whether to try autodetecting MIME + * type of file, will only work if $file is a + * filename, not pointer + * + * @return array array('fp' => file pointer, 'size' => file size, 'type' => MIME type) + * @throws HTTP_Request2_LogicException + */ + protected function fopenWrapper($file, $detectType = false) + { + if (!is_string($file) && !is_resource($file)) { + throw new HTTP_Request2_LogicException( + "Filename or file pointer resource expected", + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + $fileData = array( + 'fp' => is_string($file)? null: $file, + 'type' => 'application/octet-stream', + 'size' => 0 + ); + if (is_string($file)) { + if (!($fileData['fp'] = @fopen($file, 'rb'))) { + $error = error_get_last(); + throw new HTTP_Request2_LogicException( + $error['message'], HTTP_Request2_Exception::READ_ERROR + ); + } + if ($detectType) { + $fileData['type'] = self::detectMimeType($file); + } + } + if (!($stat = fstat($fileData['fp']))) { + throw new HTTP_Request2_LogicException( + "fstat() call failed", HTTP_Request2_Exception::READ_ERROR + ); + } + $fileData['size'] = $stat['size']; + + return $fileData; + } + + /** + * Tries to detect MIME type of a file + * + * The method will try to use fileinfo extension if it is available, + * deprecated mime_content_type() function in the other case. If neither + * works, default 'application/octet-stream' MIME type is returned + * + * @param string $filename file name + * + * @return string file MIME type + */ + protected static function detectMimeType($filename) + { + // finfo extension from PECL available + if (function_exists('finfo_open')) { + if (!isset(self::$_fileinfoDb)) { + self::$_fileinfoDb = @finfo_open(FILEINFO_MIME); + } + if (self::$_fileinfoDb) { + $info = finfo_file(self::$_fileinfoDb, $filename); + } + } + // (deprecated) mime_content_type function available + if (empty($info) && function_exists('mime_content_type')) { + $info = mime_content_type($filename); + } + return empty($info)? 'application/octet-stream': $info; + } +} +?> diff --git a/bundled-libs/HTTP/Request2/Adapter.php b/bundled-libs/HTTP/Request2/Adapter.php index 2b29fcef..03563279 100644 --- a/bundled-libs/HTTP/Request2/Adapter.php +++ b/bundled-libs/HTTP/Request2/Adapter.php @@ -1,137 +1,137 @@ -<?php -/** - * Base class for HTTP_Request2 adapters - * - * PHP version 5 - * - * LICENSE - * - * This source file is subject to BSD 3-Clause License that is bundled - * with this package in the file LICENSE and available at the URL - * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @copyright 2008-2014 Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** - * Class representing a HTTP response - */ -require_once 'HTTP/Request2/Response.php'; - -/** - * Base class for HTTP_Request2 adapters - * - * HTTP_Request2 class itself only defines methods for aggregating the request - * data, all actual work of sending the request to the remote server and - * receiving its response is performed by adapters. - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - */ -abstract class HTTP_Request2_Adapter -{ - /** - * A list of methods that MUST NOT have a request body, per RFC 2616 - * @var array - */ - protected static $bodyDisallowed = array('TRACE'); - - /** - * Methods having defined semantics for request body - * - * Content-Length header (indicating that the body follows, section 4.3 of - * RFC 2616) will be sent for these methods even if no body was added - * - * @var array - * @link http://pear.php.net/bugs/bug.php?id=12900 - * @link http://pear.php.net/bugs/bug.php?id=14740 - */ - protected static $bodyRequired = array('POST', 'PUT'); - - /** - * Request being sent - * @var HTTP_Request2 - */ - protected $request; - - /** - * Request body - * @var string|resource|HTTP_Request2_MultipartBody - * @see HTTP_Request2::getBody() - */ - protected $requestBody; - - /** - * Length of the request body - * @var integer - */ - protected $contentLength; - - /** - * Sends request to the remote server and returns its response - * - * @param HTTP_Request2 $request HTTP request message - * - * @return HTTP_Request2_Response - * @throws HTTP_Request2_Exception - */ - abstract public function sendRequest(HTTP_Request2 $request); - - /** - * Calculates length of the request body, adds proper headers - * - * @param array &$headers associative array of request headers, this method - * will add proper 'Content-Length' and 'Content-Type' - * headers to this array (or remove them if not needed) - */ - protected function calculateRequestLength(&$headers) - { - $this->requestBody = $this->request->getBody(); - - if (is_string($this->requestBody)) { - $this->contentLength = strlen($this->requestBody); - } elseif (is_resource($this->requestBody)) { - $stat = fstat($this->requestBody); - $this->contentLength = $stat['size']; - rewind($this->requestBody); - } else { - $this->contentLength = $this->requestBody->getLength(); - $headers['content-type'] = 'multipart/form-data; boundary=' . - $this->requestBody->getBoundary(); - $this->requestBody->rewind(); - } - - if (in_array($this->request->getMethod(), self::$bodyDisallowed) - || 0 == $this->contentLength - ) { - // No body: send a Content-Length header nonetheless (request #12900), - // but do that only for methods that require a body (bug #14740) - if (in_array($this->request->getMethod(), self::$bodyRequired)) { - $headers['content-length'] = 0; - } else { - unset($headers['content-length']); - // if the method doesn't require a body and doesn't have a - // body, don't send a Content-Type header. (request #16799) - unset($headers['content-type']); - } - } else { - if (empty($headers['content-type'])) { - $headers['content-type'] = 'application/x-www-form-urlencoded'; - } - // Content-Length should not be sent for chunked Transfer-Encoding (bug #20125) - if (!isset($headers['transfer-encoding'])) { - $headers['content-length'] = $this->contentLength; - } - } - } -} -?> +<?php +/** + * Base class for HTTP_Request2 adapters + * + * PHP version 5 + * + * LICENSE + * + * This source file is subject to BSD 3-Clause License that is bundled + * with this package in the file LICENSE and available at the URL + * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @copyright 2008-2016 Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** + * Class representing a HTTP response + */ +require_once 'HTTP/Request2/Response.php'; + +/** + * Base class for HTTP_Request2 adapters + * + * HTTP_Request2 class itself only defines methods for aggregating the request + * data, all actual work of sending the request to the remote server and + * receiving its response is performed by adapters. + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +abstract class HTTP_Request2_Adapter +{ + /** + * A list of methods that MUST NOT have a request body, per RFC 2616 + * @var array + */ + protected static $bodyDisallowed = array('TRACE'); + + /** + * Methods having defined semantics for request body + * + * Content-Length header (indicating that the body follows, section 4.3 of + * RFC 2616) will be sent for these methods even if no body was added + * + * @var array + * @link http://pear.php.net/bugs/bug.php?id=12900 + * @link http://pear.php.net/bugs/bug.php?id=14740 + */ + protected static $bodyRequired = array('POST', 'PUT'); + + /** + * Request being sent + * @var HTTP_Request2 + */ + protected $request; + + /** + * Request body + * @var string|resource|HTTP_Request2_MultipartBody + * @see HTTP_Request2::getBody() + */ + protected $requestBody; + + /** + * Length of the request body + * @var integer + */ + protected $contentLength; + + /** + * Sends request to the remote server and returns its response + * + * @param HTTP_Request2 $request HTTP request message + * + * @return HTTP_Request2_Response + * @throws HTTP_Request2_Exception + */ + abstract public function sendRequest(HTTP_Request2 $request); + + /** + * Calculates length of the request body, adds proper headers + * + * @param array &$headers associative array of request headers, this method + * will add proper 'Content-Length' and 'Content-Type' + * headers to this array (or remove them if not needed) + */ + protected function calculateRequestLength(&$headers) + { + $this->requestBody = $this->request->getBody(); + + if (is_string($this->requestBody)) { + $this->contentLength = strlen($this->requestBody); + } elseif (is_resource($this->requestBody)) { + $stat = fstat($this->requestBody); + $this->contentLength = $stat['size']; + rewind($this->requestBody); + } else { + $this->contentLength = $this->requestBody->getLength(); + $headers['content-type'] = 'multipart/form-data; boundary=' . + $this->requestBody->getBoundary(); + $this->requestBody->rewind(); + } + + if (in_array($this->request->getMethod(), self::$bodyDisallowed) + || 0 == $this->contentLength + ) { + // No body: send a Content-Length header nonetheless (request #12900), + // but do that only for methods that require a body (bug #14740) + if (in_array($this->request->getMethod(), self::$bodyRequired)) { + $headers['content-length'] = 0; + } else { + unset($headers['content-length']); + // if the method doesn't require a body and doesn't have a + // body, don't send a Content-Type header. (request #16799) + unset($headers['content-type']); + } + } else { + if (empty($headers['content-type'])) { + $headers['content-type'] = 'application/x-www-form-urlencoded'; + } + // Content-Length should not be sent for chunked Transfer-Encoding (bug #20125) + if (!isset($headers['transfer-encoding'])) { + $headers['content-length'] = $this->contentLength; + } + } + } +} +?> diff --git a/bundled-libs/HTTP/Request2/Adapter/Curl.php b/bundled-libs/HTTP/Request2/Adapter/Curl.php index 4fb8eb54..13d4a299 100644 --- a/bundled-libs/HTTP/Request2/Adapter/Curl.php +++ b/bundled-libs/HTTP/Request2/Adapter/Curl.php @@ -1,567 +1,577 @@ -<?php -/** - * Adapter for HTTP_Request2 wrapping around cURL extension - * - * PHP version 5 - * - * LICENSE - * - * This source file is subject to BSD 3-Clause License that is bundled - * with this package in the file LICENSE and available at the URL - * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @copyright 2008-2014 Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** - * Base class for HTTP_Request2 adapters - */ -require_once 'HTTP/Request2/Adapter.php'; - -/** - * Adapter for HTTP_Request2 wrapping around cURL extension - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - */ -class HTTP_Request2_Adapter_Curl extends HTTP_Request2_Adapter -{ - /** - * Mapping of header names to cURL options - * @var array - */ - protected static $headerMap = array( - 'accept-encoding' => CURLOPT_ENCODING, - 'cookie' => CURLOPT_COOKIE, - 'referer' => CURLOPT_REFERER, - 'user-agent' => CURLOPT_USERAGENT - ); - - /** - * Mapping of SSL context options to cURL options - * @var array - */ - protected static $sslContextMap = array( - 'ssl_verify_peer' => CURLOPT_SSL_VERIFYPEER, - 'ssl_cafile' => CURLOPT_CAINFO, - 'ssl_capath' => CURLOPT_CAPATH, - 'ssl_local_cert' => CURLOPT_SSLCERT, - 'ssl_passphrase' => CURLOPT_SSLCERTPASSWD - ); - - /** - * Mapping of CURLE_* constants to Exception subclasses and error codes - * @var array - */ - protected static $errorMap = array( - CURLE_UNSUPPORTED_PROTOCOL => array('HTTP_Request2_MessageException', - HTTP_Request2_Exception::NON_HTTP_REDIRECT), - CURLE_COULDNT_RESOLVE_PROXY => array('HTTP_Request2_ConnectionException'), - CURLE_COULDNT_RESOLVE_HOST => array('HTTP_Request2_ConnectionException'), - CURLE_COULDNT_CONNECT => array('HTTP_Request2_ConnectionException'), - // error returned from write callback - CURLE_WRITE_ERROR => array('HTTP_Request2_MessageException', - HTTP_Request2_Exception::NON_HTTP_REDIRECT), - CURLE_OPERATION_TIMEOUTED => array('HTTP_Request2_MessageException', - HTTP_Request2_Exception::TIMEOUT), - CURLE_HTTP_RANGE_ERROR => array('HTTP_Request2_MessageException'), - CURLE_SSL_CONNECT_ERROR => array('HTTP_Request2_ConnectionException'), - CURLE_LIBRARY_NOT_FOUND => array('HTTP_Request2_LogicException', - HTTP_Request2_Exception::MISCONFIGURATION), - CURLE_FUNCTION_NOT_FOUND => array('HTTP_Request2_LogicException', - HTTP_Request2_Exception::MISCONFIGURATION), - CURLE_ABORTED_BY_CALLBACK => array('HTTP_Request2_MessageException', - HTTP_Request2_Exception::NON_HTTP_REDIRECT), - CURLE_TOO_MANY_REDIRECTS => array('HTTP_Request2_MessageException', - HTTP_Request2_Exception::TOO_MANY_REDIRECTS), - CURLE_SSL_PEER_CERTIFICATE => array('HTTP_Request2_ConnectionException'), - CURLE_GOT_NOTHING => array('HTTP_Request2_MessageException'), - CURLE_SSL_ENGINE_NOTFOUND => array('HTTP_Request2_LogicException', - HTTP_Request2_Exception::MISCONFIGURATION), - CURLE_SSL_ENGINE_SETFAILED => array('HTTP_Request2_LogicException', - HTTP_Request2_Exception::MISCONFIGURATION), - CURLE_SEND_ERROR => array('HTTP_Request2_MessageException'), - CURLE_RECV_ERROR => array('HTTP_Request2_MessageException'), - CURLE_SSL_CERTPROBLEM => array('HTTP_Request2_LogicException', - HTTP_Request2_Exception::INVALID_ARGUMENT), - CURLE_SSL_CIPHER => array('HTTP_Request2_ConnectionException'), - CURLE_SSL_CACERT => array('HTTP_Request2_ConnectionException'), - CURLE_BAD_CONTENT_ENCODING => array('HTTP_Request2_MessageException'), - ); - - /** - * Response being received - * @var HTTP_Request2_Response - */ - protected $response; - - /** - * Whether 'sentHeaders' event was sent to observers - * @var boolean - */ - protected $eventSentHeaders = false; - - /** - * Whether 'receivedHeaders' event was sent to observers - * @var boolean - */ - protected $eventReceivedHeaders = false; - - /** - * Position within request body - * @var integer - * @see callbackReadBody() - */ - protected $position = 0; - - /** - * Information about last transfer, as returned by curl_getinfo() - * @var array - */ - protected $lastInfo; - - /** - * Creates a subclass of HTTP_Request2_Exception from curl error data - * - * @param resource $ch curl handle - * - * @return HTTP_Request2_Exception - */ - protected static function wrapCurlError($ch) - { - $nativeCode = curl_errno($ch); - $message = 'Curl error: ' . curl_error($ch); - if (!isset(self::$errorMap[$nativeCode])) { - return new HTTP_Request2_Exception($message, 0, $nativeCode); - } else { - $class = self::$errorMap[$nativeCode][0]; - $code = empty(self::$errorMap[$nativeCode][1]) - ? 0 : self::$errorMap[$nativeCode][1]; - return new $class($message, $code, $nativeCode); - } - } - - /** - * Sends request to the remote server and returns its response - * - * @param HTTP_Request2 $request HTTP request message - * - * @return HTTP_Request2_Response - * @throws HTTP_Request2_Exception - */ - public function sendRequest(HTTP_Request2 $request) - { - if (!extension_loaded('curl')) { - throw new HTTP_Request2_LogicException( - 'cURL extension not available', HTTP_Request2_Exception::MISCONFIGURATION - ); - } - - $this->request = $request; - $this->response = null; - $this->position = 0; - $this->eventSentHeaders = false; - $this->eventReceivedHeaders = false; - - try { - if (false === curl_exec($ch = $this->createCurlHandle())) { - $e = self::wrapCurlError($ch); - } - } catch (Exception $e) { - } - if (isset($ch)) { - $this->lastInfo = curl_getinfo($ch); - curl_close($ch); - } - - $response = $this->response; - unset($this->request, $this->requestBody, $this->response); - - if (!empty($e)) { - throw $e; - } - - if ($jar = $request->getCookieJar()) { - $jar->addCookiesFromResponse($response, $request->getUrl()); - } - - if (0 < $this->lastInfo['size_download']) { - $request->setLastEvent('receivedBody', $response); - } - return $response; - } - - /** - * Returns information about last transfer - * - * @return array associative array as returned by curl_getinfo() - */ - public function getInfo() - { - return $this->lastInfo; - } - - /** - * Creates a new cURL handle and populates it with data from the request - * - * @return resource a cURL handle, as created by curl_init() - * @throws HTTP_Request2_LogicException - * @throws HTTP_Request2_NotImplementedException - */ - protected function createCurlHandle() - { - $ch = curl_init(); - - curl_setopt_array($ch, array( - // setup write callbacks - CURLOPT_HEADERFUNCTION => array($this, 'callbackWriteHeader'), - CURLOPT_WRITEFUNCTION => array($this, 'callbackWriteBody'), - // buffer size - CURLOPT_BUFFERSIZE => $this->request->getConfig('buffer_size'), - // connection timeout - CURLOPT_CONNECTTIMEOUT => $this->request->getConfig('connect_timeout'), - // save full outgoing headers, in case someone is interested - CURLINFO_HEADER_OUT => true, - // request url - CURLOPT_URL => $this->request->getUrl()->getUrl() - )); - - // set up redirects - if (!$this->request->getConfig('follow_redirects')) { - curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); - } else { - if (!@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true)) { - throw new HTTP_Request2_LogicException( - 'Redirect support in curl is unavailable due to open_basedir or safe_mode setting', - HTTP_Request2_Exception::MISCONFIGURATION - ); - } - curl_setopt($ch, CURLOPT_MAXREDIRS, $this->request->getConfig('max_redirects')); - // limit redirects to http(s), works in 5.2.10+ - if (defined('CURLOPT_REDIR_PROTOCOLS')) { - curl_setopt($ch, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); - } - // works in 5.3.2+, http://bugs.php.net/bug.php?id=49571 - if ($this->request->getConfig('strict_redirects') && defined('CURLOPT_POSTREDIR')) { - curl_setopt($ch, CURLOPT_POSTREDIR, 3); - } - } - - // set local IP via CURLOPT_INTERFACE (request #19515) - if ($ip = $this->request->getConfig('local_ip')) { - curl_setopt($ch, CURLOPT_INTERFACE, $ip); - } - - // request timeout - if ($timeout = $this->request->getConfig('timeout')) { - curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); - } - - // set HTTP version - switch ($this->request->getConfig('protocol_version')) { - case '1.0': - curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); - break; - case '1.1': - curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); - } - - // set request method - switch ($this->request->getMethod()) { - case HTTP_Request2::METHOD_GET: - curl_setopt($ch, CURLOPT_HTTPGET, true); - break; - case HTTP_Request2::METHOD_POST: - curl_setopt($ch, CURLOPT_POST, true); - break; - case HTTP_Request2::METHOD_HEAD: - curl_setopt($ch, CURLOPT_NOBODY, true); - break; - case HTTP_Request2::METHOD_PUT: - curl_setopt($ch, CURLOPT_UPLOAD, true); - break; - default: - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->request->getMethod()); - } - - // set proxy, if needed - if ($host = $this->request->getConfig('proxy_host')) { - if (!($port = $this->request->getConfig('proxy_port'))) { - throw new HTTP_Request2_LogicException( - 'Proxy port not provided', HTTP_Request2_Exception::MISSING_VALUE - ); - } - curl_setopt($ch, CURLOPT_PROXY, $host . ':' . $port); - if ($user = $this->request->getConfig('proxy_user')) { - curl_setopt( - $ch, CURLOPT_PROXYUSERPWD, - $user . ':' . $this->request->getConfig('proxy_password') - ); - switch ($this->request->getConfig('proxy_auth_scheme')) { - case HTTP_Request2::AUTH_BASIC: - curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_BASIC); - break; - case HTTP_Request2::AUTH_DIGEST: - curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_DIGEST); - } - } - if ($type = $this->request->getConfig('proxy_type')) { - switch ($type) { - case 'http': - curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); - break; - case 'socks5': - curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); - break; - default: - throw new HTTP_Request2_NotImplementedException( - "Proxy type '{$type}' is not supported" - ); - } - } - } - - // set authentication data - if ($auth = $this->request->getAuth()) { - curl_setopt($ch, CURLOPT_USERPWD, $auth['user'] . ':' . $auth['password']); - switch ($auth['scheme']) { - case HTTP_Request2::AUTH_BASIC: - curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); - break; - case HTTP_Request2::AUTH_DIGEST: - curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST); - } - } - - // set SSL options - foreach ($this->request->getConfig() as $name => $value) { - if ('ssl_verify_host' == $name && null !== $value) { - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $value? 2: 0); - } elseif (isset(self::$sslContextMap[$name]) && null !== $value) { - curl_setopt($ch, self::$sslContextMap[$name], $value); - } - } - - $headers = $this->request->getHeaders(); - // make cURL automagically send proper header - if (!isset($headers['accept-encoding'])) { - $headers['accept-encoding'] = ''; - } - - if (($jar = $this->request->getCookieJar()) - && ($cookies = $jar->getMatching($this->request->getUrl(), true)) - ) { - $headers['cookie'] = (empty($headers['cookie'])? '': $headers['cookie'] . '; ') . $cookies; - } - - // set headers having special cURL keys - foreach (self::$headerMap as $name => $option) { - if (isset($headers[$name])) { - curl_setopt($ch, $option, $headers[$name]); - unset($headers[$name]); - } - } - - $this->calculateRequestLength($headers); - if (isset($headers['content-length']) || isset($headers['transfer-encoding'])) { - $this->workaroundPhpBug47204($ch, $headers); - } - - // set headers not having special keys - $headersFmt = array(); - foreach ($headers as $name => $value) { - $canonicalName = implode('-', array_map('ucfirst', explode('-', $name))); - $headersFmt[] = $canonicalName . ': ' . $value; - } - curl_setopt($ch, CURLOPT_HTTPHEADER, $headersFmt); - - return $ch; - } - - /** - * Workaround for PHP bug #47204 that prevents rewinding request body - * - * The workaround consists of reading the entire request body into memory - * and setting it as CURLOPT_POSTFIELDS, so it isn't recommended for large - * file uploads, use Socket adapter instead. - * - * @param resource $ch cURL handle - * @param array &$headers Request headers - */ - protected function workaroundPhpBug47204($ch, &$headers) - { - // no redirects, no digest auth -> probably no rewind needed - if (!$this->request->getConfig('follow_redirects') - && (!($auth = $this->request->getAuth()) - || HTTP_Request2::AUTH_DIGEST != $auth['scheme']) - ) { - curl_setopt($ch, CURLOPT_READFUNCTION, array($this, 'callbackReadBody')); - - } else { - // rewind may be needed, read the whole body into memory - if ($this->requestBody instanceof HTTP_Request2_MultipartBody) { - $this->requestBody = $this->requestBody->__toString(); - - } elseif (is_resource($this->requestBody)) { - $fp = $this->requestBody; - $this->requestBody = ''; - while (!feof($fp)) { - $this->requestBody .= fread($fp, 16384); - } - } - // curl hangs up if content-length is present - unset($headers['content-length']); - curl_setopt($ch, CURLOPT_POSTFIELDS, $this->requestBody); - } - } - - /** - * Callback function called by cURL for reading the request body - * - * @param resource $ch cURL handle - * @param resource $fd file descriptor (not used) - * @param integer $length maximum length of data to return - * - * @return string part of the request body, up to $length bytes - */ - protected function callbackReadBody($ch, $fd, $length) - { - if (!$this->eventSentHeaders) { - $this->request->setLastEvent( - 'sentHeaders', curl_getinfo($ch, CURLINFO_HEADER_OUT) - ); - $this->eventSentHeaders = true; - } - if (in_array($this->request->getMethod(), self::$bodyDisallowed) - || 0 == $this->contentLength || $this->position >= $this->contentLength - ) { - return ''; - } - if (is_string($this->requestBody)) { - $string = substr($this->requestBody, $this->position, $length); - } elseif (is_resource($this->requestBody)) { - $string = fread($this->requestBody, $length); - } else { - $string = $this->requestBody->read($length); - } - $this->request->setLastEvent('sentBodyPart', strlen($string)); - $this->position += strlen($string); - return $string; - } - - /** - * Callback function called by cURL for saving the response headers - * - * @param resource $ch cURL handle - * @param string $string response header (with trailing CRLF) - * - * @return integer number of bytes saved - * @see HTTP_Request2_Response::parseHeaderLine() - */ - protected function callbackWriteHeader($ch, $string) - { - // we may receive a second set of headers if doing e.g. digest auth - if ($this->eventReceivedHeaders || !$this->eventSentHeaders) { - // don't bother with 100-Continue responses (bug #15785) - if (!$this->eventSentHeaders - || $this->response->getStatus() >= 200 - ) { - $this->request->setLastEvent( - 'sentHeaders', curl_getinfo($ch, CURLINFO_HEADER_OUT) - ); - } - $upload = curl_getinfo($ch, CURLINFO_SIZE_UPLOAD); - // if body wasn't read by a callback, send event with total body size - if ($upload > $this->position) { - $this->request->setLastEvent( - 'sentBodyPart', $upload - $this->position - ); - $this->position = $upload; - } - if ($upload && (!$this->eventSentHeaders - || $this->response->getStatus() >= 200) - ) { - $this->request->setLastEvent('sentBody', $upload); - } - $this->eventSentHeaders = true; - // we'll need a new response object - if ($this->eventReceivedHeaders) { - $this->eventReceivedHeaders = false; - $this->response = null; - } - } - if (empty($this->response)) { - $this->response = new HTTP_Request2_Response( - $string, false, curl_getinfo($ch, CURLINFO_EFFECTIVE_URL) - ); - } else { - $this->response->parseHeaderLine($string); - if ('' == trim($string)) { - // don't bother with 100-Continue responses (bug #15785) - if (200 <= $this->response->getStatus()) { - $this->request->setLastEvent('receivedHeaders', $this->response); - } - - if ($this->request->getConfig('follow_redirects') && $this->response->isRedirect()) { - $redirectUrl = new Net_URL2($this->response->getHeader('location')); - - // for versions lower than 5.2.10, check the redirection URL protocol - if (!defined('CURLOPT_REDIR_PROTOCOLS') && $redirectUrl->isAbsolute() - && !in_array($redirectUrl->getScheme(), array('http', 'https')) - ) { - return -1; - } - - if ($jar = $this->request->getCookieJar()) { - $jar->addCookiesFromResponse($this->response, $this->request->getUrl()); - if (!$redirectUrl->isAbsolute()) { - $redirectUrl = $this->request->getUrl()->resolve($redirectUrl); - } - if ($cookies = $jar->getMatching($redirectUrl, true)) { - curl_setopt($ch, CURLOPT_COOKIE, $cookies); - } - } - } - $this->eventReceivedHeaders = true; - } - } - return strlen($string); - } - - /** - * Callback function called by cURL for saving the response body - * - * @param resource $ch cURL handle (not used) - * @param string $string part of the response body - * - * @return integer number of bytes saved - * @throws HTTP_Request2_MessageException - * @see HTTP_Request2_Response::appendBody() - */ - protected function callbackWriteBody($ch, $string) - { - // cURL calls WRITEFUNCTION callback without calling HEADERFUNCTION if - // response doesn't start with proper HTTP status line (see bug #15716) - if (empty($this->response)) { - throw new HTTP_Request2_MessageException( - "Malformed response: {$string}", - HTTP_Request2_Exception::MALFORMED_RESPONSE - ); - } - if ($this->request->getConfig('store_body')) { - $this->response->appendBody($string); - } - $this->request->setLastEvent('receivedBodyPart', $string); - return strlen($string); - } -} -?> +<?php +/** + * Adapter for HTTP_Request2 wrapping around cURL extension + * + * PHP version 5 + * + * LICENSE + * + * This source file is subject to BSD 3-Clause License that is bundled + * with this package in the file LICENSE and available at the URL + * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @copyright 2008-2016 Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** + * Base class for HTTP_Request2 adapters + */ +require_once 'HTTP/Request2/Adapter.php'; + +/** + * Adapter for HTTP_Request2 wrapping around cURL extension + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_Adapter_Curl extends HTTP_Request2_Adapter +{ + /** + * Mapping of header names to cURL options + * @var array + */ + protected static $headerMap = array( + 'accept-encoding' => CURLOPT_ENCODING, + 'cookie' => CURLOPT_COOKIE, + 'referer' => CURLOPT_REFERER, + 'user-agent' => CURLOPT_USERAGENT + ); + + /** + * Mapping of SSL context options to cURL options + * @var array + */ + protected static $sslContextMap = array( + 'ssl_verify_peer' => CURLOPT_SSL_VERIFYPEER, + 'ssl_cafile' => CURLOPT_CAINFO, + 'ssl_capath' => CURLOPT_CAPATH, + 'ssl_local_cert' => CURLOPT_SSLCERT, + 'ssl_passphrase' => CURLOPT_SSLCERTPASSWD + ); + + /** + * Mapping of CURLE_* constants to Exception subclasses and error codes + * @var array + */ + protected static $errorMap = array( + CURLE_UNSUPPORTED_PROTOCOL => array('HTTP_Request2_MessageException', + HTTP_Request2_Exception::NON_HTTP_REDIRECT), + CURLE_COULDNT_RESOLVE_PROXY => array('HTTP_Request2_ConnectionException'), + CURLE_COULDNT_RESOLVE_HOST => array('HTTP_Request2_ConnectionException'), + CURLE_COULDNT_CONNECT => array('HTTP_Request2_ConnectionException'), + // error returned from write callback + CURLE_WRITE_ERROR => array('HTTP_Request2_MessageException', + HTTP_Request2_Exception::NON_HTTP_REDIRECT), + CURLE_OPERATION_TIMEOUTED => array('HTTP_Request2_MessageException', + HTTP_Request2_Exception::TIMEOUT), + CURLE_HTTP_RANGE_ERROR => array('HTTP_Request2_MessageException'), + CURLE_SSL_CONNECT_ERROR => array('HTTP_Request2_ConnectionException'), + CURLE_LIBRARY_NOT_FOUND => array('HTTP_Request2_LogicException', + HTTP_Request2_Exception::MISCONFIGURATION), + CURLE_FUNCTION_NOT_FOUND => array('HTTP_Request2_LogicException', + HTTP_Request2_Exception::MISCONFIGURATION), + CURLE_ABORTED_BY_CALLBACK => array('HTTP_Request2_MessageException', + HTTP_Request2_Exception::NON_HTTP_REDIRECT), + CURLE_TOO_MANY_REDIRECTS => array('HTTP_Request2_MessageException', + HTTP_Request2_Exception::TOO_MANY_REDIRECTS), + CURLE_SSL_PEER_CERTIFICATE => array('HTTP_Request2_ConnectionException'), + CURLE_GOT_NOTHING => array('HTTP_Request2_MessageException'), + CURLE_SSL_ENGINE_NOTFOUND => array('HTTP_Request2_LogicException', + HTTP_Request2_Exception::MISCONFIGURATION), + CURLE_SSL_ENGINE_SETFAILED => array('HTTP_Request2_LogicException', + HTTP_Request2_Exception::MISCONFIGURATION), + CURLE_SEND_ERROR => array('HTTP_Request2_MessageException'), + CURLE_RECV_ERROR => array('HTTP_Request2_MessageException'), + CURLE_SSL_CERTPROBLEM => array('HTTP_Request2_LogicException', + HTTP_Request2_Exception::INVALID_ARGUMENT), + CURLE_SSL_CIPHER => array('HTTP_Request2_ConnectionException'), + CURLE_SSL_CACERT => array('HTTP_Request2_ConnectionException'), + CURLE_BAD_CONTENT_ENCODING => array('HTTP_Request2_MessageException'), + ); + + /** + * Response being received + * @var HTTP_Request2_Response + */ + protected $response; + + /** + * Whether 'sentHeaders' event was sent to observers + * @var boolean + */ + protected $eventSentHeaders = false; + + /** + * Whether 'receivedHeaders' event was sent to observers + * @var boolean + */ + protected $eventReceivedHeaders = false; + + /** + * Whether 'sentBoody' event was sent to observers + * @var boolean + */ + protected $eventSentBody = false; + + /** + * Position within request body + * @var integer + * @see callbackReadBody() + */ + protected $position = 0; + + /** + * Information about last transfer, as returned by curl_getinfo() + * @var array + */ + protected $lastInfo; + + /** + * Creates a subclass of HTTP_Request2_Exception from curl error data + * + * @param resource $ch curl handle + * + * @return HTTP_Request2_Exception + */ + protected static function wrapCurlError($ch) + { + $nativeCode = curl_errno($ch); + $message = 'Curl error: ' . curl_error($ch); + if (!isset(self::$errorMap[$nativeCode])) { + return new HTTP_Request2_Exception($message, 0, $nativeCode); + } else { + $class = self::$errorMap[$nativeCode][0]; + $code = empty(self::$errorMap[$nativeCode][1]) + ? 0 : self::$errorMap[$nativeCode][1]; + return new $class($message, $code, $nativeCode); + } + } + + /** + * Sends request to the remote server and returns its response + * + * @param HTTP_Request2 $request HTTP request message + * + * @return HTTP_Request2_Response + * @throws HTTP_Request2_Exception + */ + public function sendRequest(HTTP_Request2 $request) + { + if (!extension_loaded('curl')) { + throw new HTTP_Request2_LogicException( + 'cURL extension not available', HTTP_Request2_Exception::MISCONFIGURATION + ); + } + + $this->request = $request; + $this->response = null; + $this->position = 0; + $this->eventSentHeaders = false; + $this->eventReceivedHeaders = false; + $this->eventSentBody = false; + + try { + if (false === curl_exec($ch = $this->createCurlHandle())) { + $e = self::wrapCurlError($ch); + } + } catch (Exception $e) { + } + if (isset($ch)) { + $this->lastInfo = curl_getinfo($ch); + if (CURLE_OK !== curl_errno($ch)) { + $this->request->setLastEvent('warning', curl_error($ch)); + } + curl_close($ch); + } + + $response = $this->response; + unset($this->request, $this->requestBody, $this->response); + + if (!empty($e)) { + throw $e; + } + + if ($jar = $request->getCookieJar()) { + $jar->addCookiesFromResponse($response); + } + + if (0 < $this->lastInfo['size_download']) { + $request->setLastEvent('receivedBody', $response); + } + return $response; + } + + /** + * Returns information about last transfer + * + * @return array associative array as returned by curl_getinfo() + */ + public function getInfo() + { + return $this->lastInfo; + } + + /** + * Creates a new cURL handle and populates it with data from the request + * + * @return resource a cURL handle, as created by curl_init() + * @throws HTTP_Request2_LogicException + * @throws HTTP_Request2_NotImplementedException + */ + protected function createCurlHandle() + { + $ch = curl_init(); + + curl_setopt_array($ch, array( + // setup write callbacks + CURLOPT_HEADERFUNCTION => array($this, 'callbackWriteHeader'), + CURLOPT_WRITEFUNCTION => array($this, 'callbackWriteBody'), + // buffer size + CURLOPT_BUFFERSIZE => $this->request->getConfig('buffer_size'), + // connection timeout + CURLOPT_CONNECTTIMEOUT => $this->request->getConfig('connect_timeout'), + // save full outgoing headers, in case someone is interested + CURLINFO_HEADER_OUT => true, + // request url + CURLOPT_URL => $this->request->getUrl()->getUrl() + )); + + // set up redirects + if (!$this->request->getConfig('follow_redirects')) { + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); + } else { + if (!@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true)) { + throw new HTTP_Request2_LogicException( + 'Redirect support in curl is unavailable due to open_basedir or safe_mode setting', + HTTP_Request2_Exception::MISCONFIGURATION + ); + } + curl_setopt($ch, CURLOPT_MAXREDIRS, $this->request->getConfig('max_redirects')); + // limit redirects to http(s), works in 5.2.10+ + if (defined('CURLOPT_REDIR_PROTOCOLS')) { + curl_setopt($ch, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); + } + // works in 5.3.2+, http://bugs.php.net/bug.php?id=49571 + if ($this->request->getConfig('strict_redirects') && defined('CURLOPT_POSTREDIR')) { + curl_setopt($ch, CURLOPT_POSTREDIR, 3); + } + } + + // set local IP via CURLOPT_INTERFACE (request #19515) + if ($ip = $this->request->getConfig('local_ip')) { + curl_setopt($ch, CURLOPT_INTERFACE, $ip); + } + + // request timeout + if ($timeout = $this->request->getConfig('timeout')) { + curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); + } + + // set HTTP version + switch ($this->request->getConfig('protocol_version')) { + case '1.0': + curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); + break; + case '1.1': + curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); + } + + // set request method + switch ($this->request->getMethod()) { + case HTTP_Request2::METHOD_GET: + curl_setopt($ch, CURLOPT_HTTPGET, true); + break; + case HTTP_Request2::METHOD_POST: + curl_setopt($ch, CURLOPT_POST, true); + break; + case HTTP_Request2::METHOD_HEAD: + curl_setopt($ch, CURLOPT_NOBODY, true); + break; + case HTTP_Request2::METHOD_PUT: + curl_setopt($ch, CURLOPT_UPLOAD, true); + break; + default: + curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->request->getMethod()); + } + + // set proxy, if needed + if ($host = $this->request->getConfig('proxy_host')) { + if (!($port = $this->request->getConfig('proxy_port'))) { + throw new HTTP_Request2_LogicException( + 'Proxy port not provided', HTTP_Request2_Exception::MISSING_VALUE + ); + } + curl_setopt($ch, CURLOPT_PROXY, $host . ':' . $port); + if ($user = $this->request->getConfig('proxy_user')) { + curl_setopt( + $ch, CURLOPT_PROXYUSERPWD, + $user . ':' . $this->request->getConfig('proxy_password') + ); + switch ($this->request->getConfig('proxy_auth_scheme')) { + case HTTP_Request2::AUTH_BASIC: + curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_BASIC); + break; + case HTTP_Request2::AUTH_DIGEST: + curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_DIGEST); + } + } + if ($type = $this->request->getConfig('proxy_type')) { + switch ($type) { + case 'http': + curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); + break; + case 'socks5': + curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); + break; + default: + throw new HTTP_Request2_NotImplementedException( + "Proxy type '{$type}' is not supported" + ); + } + } + } + + // set authentication data + if ($auth = $this->request->getAuth()) { + curl_setopt($ch, CURLOPT_USERPWD, $auth['user'] . ':' . $auth['password']); + switch ($auth['scheme']) { + case HTTP_Request2::AUTH_BASIC: + curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); + break; + case HTTP_Request2::AUTH_DIGEST: + curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST); + } + } + + // set SSL options + foreach ($this->request->getConfig() as $name => $value) { + if ('ssl_verify_host' == $name && null !== $value) { + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $value? 2: 0); + } elseif (isset(self::$sslContextMap[$name]) && null !== $value) { + curl_setopt($ch, self::$sslContextMap[$name], $value); + } + } + + $headers = $this->request->getHeaders(); + // make cURL automagically send proper header + if (!isset($headers['accept-encoding'])) { + $headers['accept-encoding'] = ''; + } + + if (($jar = $this->request->getCookieJar()) + && ($cookies = $jar->getMatching($this->request->getUrl(), true)) + ) { + $headers['cookie'] = (empty($headers['cookie'])? '': $headers['cookie'] . '; ') . $cookies; + } + + // set headers having special cURL keys + foreach (self::$headerMap as $name => $option) { + if (isset($headers[$name])) { + curl_setopt($ch, $option, $headers[$name]); + unset($headers[$name]); + } + } + + $this->calculateRequestLength($headers); + if (isset($headers['content-length']) || isset($headers['transfer-encoding'])) { + $this->workaroundPhpBug47204($ch, $headers); + } + + // set headers not having special keys + $headersFmt = array(); + foreach ($headers as $name => $value) { + $canonicalName = implode('-', array_map('ucfirst', explode('-', $name))); + $headersFmt[] = $canonicalName . ': ' . $value; + } + curl_setopt($ch, CURLOPT_HTTPHEADER, $headersFmt); + + return $ch; + } + + /** + * Workaround for PHP bug #47204 that prevents rewinding request body + * + * The workaround consists of reading the entire request body into memory + * and setting it as CURLOPT_POSTFIELDS, so it isn't recommended for large + * file uploads, use Socket adapter instead. + * + * @param resource $ch cURL handle + * @param array &$headers Request headers + */ + protected function workaroundPhpBug47204($ch, &$headers) + { + // no redirects, no digest auth -> probably no rewind needed + // also apply workaround only for POSTs, othrerwise we get + // https://pear.php.net/bugs/bug.php?id=20440 for PUTs + if (!$this->request->getConfig('follow_redirects') + && (!($auth = $this->request->getAuth()) + || HTTP_Request2::AUTH_DIGEST != $auth['scheme']) + || HTTP_Request2::METHOD_POST !== $this->request->getMethod() + ) { + curl_setopt($ch, CURLOPT_READFUNCTION, array($this, 'callbackReadBody')); + + } else { + // rewind may be needed, read the whole body into memory + if ($this->requestBody instanceof HTTP_Request2_MultipartBody) { + $this->requestBody = $this->requestBody->__toString(); + + } elseif (is_resource($this->requestBody)) { + $fp = $this->requestBody; + $this->requestBody = ''; + while (!feof($fp)) { + $this->requestBody .= fread($fp, 16384); + } + } + // curl hangs up if content-length is present + unset($headers['content-length']); + curl_setopt($ch, CURLOPT_POSTFIELDS, $this->requestBody); + } + } + + /** + * Callback function called by cURL for reading the request body + * + * @param resource $ch cURL handle + * @param resource $fd file descriptor (not used) + * @param integer $length maximum length of data to return + * + * @return string part of the request body, up to $length bytes + */ + protected function callbackReadBody($ch, $fd, $length) + { + if (!$this->eventSentHeaders) { + $this->request->setLastEvent( + 'sentHeaders', curl_getinfo($ch, CURLINFO_HEADER_OUT) + ); + $this->eventSentHeaders = true; + } + if (in_array($this->request->getMethod(), self::$bodyDisallowed) + || 0 == $this->contentLength || $this->position >= $this->contentLength + ) { + return ''; + } + if (is_string($this->requestBody)) { + $string = substr($this->requestBody, $this->position, $length); + } elseif (is_resource($this->requestBody)) { + $string = fread($this->requestBody, $length); + } else { + $string = $this->requestBody->read($length); + } + $this->request->setLastEvent('sentBodyPart', strlen($string)); + $this->position += strlen($string); + return $string; + } + + /** + * Callback function called by cURL for saving the response headers + * + * @param resource $ch cURL handle + * @param string $string response header (with trailing CRLF) + * + * @return integer number of bytes saved + * @see HTTP_Request2_Response::parseHeaderLine() + */ + protected function callbackWriteHeader($ch, $string) + { + if (!$this->eventSentHeaders + // we may receive a second set of headers if doing e.g. digest auth + // but don't bother with 100-Continue responses (bug #15785) + || $this->eventReceivedHeaders && $this->response->getStatus() >= 200 + ) { + $this->request->setLastEvent( + 'sentHeaders', curl_getinfo($ch, CURLINFO_HEADER_OUT) + ); + } + if (!$this->eventSentBody) { + $upload = curl_getinfo($ch, CURLINFO_SIZE_UPLOAD); + // if body wasn't read by the callback, send event with total body size + if ($upload > $this->position) { + $this->request->setLastEvent( + 'sentBodyPart', $upload - $this->position + ); + } + if ($upload > 0) { + $this->request->setLastEvent('sentBody', $upload); + } + } + $this->eventSentHeaders = true; + $this->eventSentBody = true; + + if ($this->eventReceivedHeaders || empty($this->response)) { + $this->eventReceivedHeaders = false; + $this->response = new HTTP_Request2_Response( + $string, false, curl_getinfo($ch, CURLINFO_EFFECTIVE_URL) + ); + + } else { + $this->response->parseHeaderLine($string); + if ('' == trim($string)) { + // don't bother with 100-Continue responses (bug #15785) + if (200 <= $this->response->getStatus()) { + $this->request->setLastEvent('receivedHeaders', $this->response); + } + + if ($this->request->getConfig('follow_redirects') && $this->response->isRedirect()) { + $redirectUrl = new Net_URL2($this->response->getHeader('location')); + + // for versions lower than 5.2.10, check the redirection URL protocol + if (!defined('CURLOPT_REDIR_PROTOCOLS') && $redirectUrl->isAbsolute() + && !in_array($redirectUrl->getScheme(), array('http', 'https')) + ) { + return -1; + } + + if ($jar = $this->request->getCookieJar()) { + $jar->addCookiesFromResponse($this->response); + if (!$redirectUrl->isAbsolute()) { + $redirectUrl = $this->request->getUrl()->resolve($redirectUrl); + } + if ($cookies = $jar->getMatching($redirectUrl, true)) { + curl_setopt($ch, CURLOPT_COOKIE, $cookies); + } + } + } + $this->eventReceivedHeaders = true; + $this->eventSentBody = false; + } + } + return strlen($string); + } + + /** + * Callback function called by cURL for saving the response body + * + * @param resource $ch cURL handle (not used) + * @param string $string part of the response body + * + * @return integer number of bytes saved + * @throws HTTP_Request2_MessageException + * @see HTTP_Request2_Response::appendBody() + */ + protected function callbackWriteBody($ch, $string) + { + // cURL calls WRITEFUNCTION callback without calling HEADERFUNCTION if + // response doesn't start with proper HTTP status line (see bug #15716) + if (empty($this->response)) { + throw new HTTP_Request2_MessageException( + "Malformed response: {$string}", + HTTP_Request2_Exception::MALFORMED_RESPONSE + ); + } + if ($this->request->getConfig('store_body')) { + $this->response->appendBody($string); + } + $this->request->setLastEvent('receivedBodyPart', $string); + return strlen($string); + } +} +?> diff --git a/bundled-libs/HTTP/Request2/Adapter/Mock.php b/bundled-libs/HTTP/Request2/Adapter/Mock.php index 9659e621..22b42824 100644 --- a/bundled-libs/HTTP/Request2/Adapter/Mock.php +++ b/bundled-libs/HTTP/Request2/Adapter/Mock.php @@ -1,166 +1,166 @@ -<?php -/** - * Mock adapter intended for testing - * - * PHP version 5 - * - * LICENSE - * - * This source file is subject to BSD 3-Clause License that is bundled - * with this package in the file LICENSE and available at the URL - * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @copyright 2008-2014 Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** - * Base class for HTTP_Request2 adapters - */ -require_once 'HTTP/Request2/Adapter.php'; - -/** - * Mock adapter intended for testing - * - * Can be used to test applications depending on HTTP_Request2 package without - * actually performing any HTTP requests. This adapter will return responses - * previously added via addResponse() - * <code> - * $mock = new HTTP_Request2_Adapter_Mock(); - * $mock->addResponse("HTTP/1.1 ... "); - * - * $request = new HTTP_Request2(); - * $request->setAdapter($mock); - * - * // This will return the response set above - * $response = $req->send(); - * </code> - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - */ -class HTTP_Request2_Adapter_Mock extends HTTP_Request2_Adapter -{ - /** - * A queue of responses to be returned by sendRequest() - * @var array - */ - protected $responses = array(); - - /** - * Returns the next response from the queue built by addResponse() - * - * Only responses without explicit URLs or with URLs equal to request URL - * will be considered. If matching response is not found or the queue is - * empty then default empty response with status 400 will be returned, - * if an Exception object was added to the queue it will be thrown. - * - * @param HTTP_Request2 $request HTTP request message - * - * @return HTTP_Request2_Response - * @throws Exception - */ - public function sendRequest(HTTP_Request2 $request) - { - $requestUrl = (string)$request->getUrl(); - $response = null; - foreach ($this->responses as $k => $v) { - if (!$v[1] || $requestUrl == $v[1]) { - $response = $v[0]; - array_splice($this->responses, $k, 1); - break; - } - } - if (!$response) { - return self::createResponseFromString("HTTP/1.1 400 Bad Request\r\n\r\n"); - - } elseif ($response instanceof HTTP_Request2_Response) { - return $response; - - } else { - // rethrow the exception - $class = get_class($response); - $message = $response->getMessage(); - $code = $response->getCode(); - throw new $class($message, $code); - } - } - - /** - * Adds response to the queue - * - * @param mixed $response either a string, a pointer to an open file, - * an instance of HTTP_Request2_Response or Exception - * @param string $url A request URL this response should be valid for - * (see {@link http://pear.php.net/bugs/bug.php?id=19276}) - * - * @throws HTTP_Request2_Exception - */ - public function addResponse($response, $url = null) - { - if (is_string($response)) { - $response = self::createResponseFromString($response); - } elseif (is_resource($response)) { - $response = self::createResponseFromFile($response); - } elseif (!$response instanceof HTTP_Request2_Response && - !$response instanceof Exception - ) { - throw new HTTP_Request2_Exception('Parameter is not a valid response'); - } - $this->responses[] = array($response, $url); - } - - /** - * Creates a new HTTP_Request2_Response object from a string - * - * @param string $str string containing HTTP response message - * - * @return HTTP_Request2_Response - * @throws HTTP_Request2_Exception - */ - public static function createResponseFromString($str) - { - $parts = preg_split('!(\r?\n){2}!m', $str, 2); - $headerLines = explode("\n", $parts[0]); - $response = new HTTP_Request2_Response(array_shift($headerLines)); - foreach ($headerLines as $headerLine) { - $response->parseHeaderLine($headerLine); - } - $response->parseHeaderLine(''); - if (isset($parts[1])) { - $response->appendBody($parts[1]); - } - return $response; - } - - /** - * Creates a new HTTP_Request2_Response object from a file - * - * @param resource $fp file pointer returned by fopen() - * - * @return HTTP_Request2_Response - * @throws HTTP_Request2_Exception - */ - public static function createResponseFromFile($fp) - { - $response = new HTTP_Request2_Response(fgets($fp)); - do { - $headerLine = fgets($fp); - $response->parseHeaderLine($headerLine); - } while ('' != trim($headerLine)); - - while (!feof($fp)) { - $response->appendBody(fread($fp, 8192)); - } - return $response; - } -} +<?php +/** + * Mock adapter intended for testing + * + * PHP version 5 + * + * LICENSE + * + * This source file is subject to BSD 3-Clause License that is bundled + * with this package in the file LICENSE and available at the URL + * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @copyright 2008-2016 Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** + * Base class for HTTP_Request2 adapters + */ +require_once 'HTTP/Request2/Adapter.php'; + +/** + * Mock adapter intended for testing + * + * Can be used to test applications depending on HTTP_Request2 package without + * actually performing any HTTP requests. This adapter will return responses + * previously added via addResponse() + * <code> + * $mock = new HTTP_Request2_Adapter_Mock(); + * $mock->addResponse("HTTP/1.1 ... "); + * + * $request = new HTTP_Request2(); + * $request->setAdapter($mock); + * + * // This will return the response set above + * $response = $req->send(); + * </code> + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_Adapter_Mock extends HTTP_Request2_Adapter +{ + /** + * A queue of responses to be returned by sendRequest() + * @var array + */ + protected $responses = array(); + + /** + * Returns the next response from the queue built by addResponse() + * + * Only responses without explicit URLs or with URLs equal to request URL + * will be considered. If matching response is not found or the queue is + * empty then default empty response with status 400 will be returned, + * if an Exception object was added to the queue it will be thrown. + * + * @param HTTP_Request2 $request HTTP request message + * + * @return HTTP_Request2_Response + * @throws Exception + */ + public function sendRequest(HTTP_Request2 $request) + { + $requestUrl = (string)$request->getUrl(); + $response = null; + foreach ($this->responses as $k => $v) { + if (!$v[1] || $requestUrl == $v[1]) { + $response = $v[0]; + array_splice($this->responses, $k, 1); + break; + } + } + if (!$response) { + return self::createResponseFromString("HTTP/1.1 400 Bad Request\r\n\r\n"); + + } elseif ($response instanceof HTTP_Request2_Response) { + return $response; + + } else { + // rethrow the exception + $class = get_class($response); + $message = $response->getMessage(); + $code = $response->getCode(); + throw new $class($message, $code); + } + } + + /** + * Adds response to the queue + * + * @param mixed $response either a string, a pointer to an open file, + * an instance of HTTP_Request2_Response or Exception + * @param string $url A request URL this response should be valid for + * (see {@link http://pear.php.net/bugs/bug.php?id=19276}) + * + * @throws HTTP_Request2_Exception + */ + public function addResponse($response, $url = null) + { + if (is_string($response)) { + $response = self::createResponseFromString($response); + } elseif (is_resource($response)) { + $response = self::createResponseFromFile($response); + } elseif (!$response instanceof HTTP_Request2_Response && + !$response instanceof Exception + ) { + throw new HTTP_Request2_Exception('Parameter is not a valid response'); + } + $this->responses[] = array($response, $url); + } + + /** + * Creates a new HTTP_Request2_Response object from a string + * + * @param string $str string containing HTTP response message + * + * @return HTTP_Request2_Response + * @throws HTTP_Request2_Exception + */ + public static function createResponseFromString($str) + { + $parts = preg_split('!(\r?\n){2}!m', $str, 2); + $headerLines = explode("\n", $parts[0]); + $response = new HTTP_Request2_Response(array_shift($headerLines)); + foreach ($headerLines as $headerLine) { + $response->parseHeaderLine($headerLine); + } + $response->parseHeaderLine(''); + if (isset($parts[1])) { + $response->appendBody($parts[1]); + } + return $response; + } + + /** + * Creates a new HTTP_Request2_Response object from a file + * + * @param resource $fp file pointer returned by fopen() + * + * @return HTTP_Request2_Response + * @throws HTTP_Request2_Exception + */ + public static function createResponseFromFile($fp) + { + $response = new HTTP_Request2_Response(fgets($fp)); + do { + $headerLine = fgets($fp); + $response->parseHeaderLine($headerLine); + } while ('' != trim($headerLine)); + + while (!feof($fp)) { + $response->appendBody(fread($fp, 8192)); + } + return $response; + } +} ?> \ No newline at end of file diff --git a/bundled-libs/HTTP/Request2/Adapter/Socket.php b/bundled-libs/HTTP/Request2/Adapter/Socket.php index 62507fd7..3a1d1860 100644 --- a/bundled-libs/HTTP/Request2/Adapter/Socket.php +++ b/bundled-libs/HTTP/Request2/Adapter/Socket.php @@ -1,1121 +1,1138 @@ -<?php -/** - * Socket-based adapter for HTTP_Request2 - * - * PHP version 5 - * - * LICENSE - * - * This source file is subject to BSD 3-Clause License that is bundled - * with this package in the file LICENSE and available at the URL - * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @copyright 2008-2014 Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** Base class for HTTP_Request2 adapters */ -require_once 'HTTP/Request2/Adapter.php'; - -/** Socket wrapper class */ -require_once 'HTTP/Request2/SocketWrapper.php'; - -/** - * Socket-based adapter for HTTP_Request2 - * - * This adapter uses only PHP sockets and will work on almost any PHP - * environment. Code is based on original HTTP_Request PEAR package. - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - */ -class HTTP_Request2_Adapter_Socket extends HTTP_Request2_Adapter -{ - /** - * Regular expression for 'token' rule from RFC 2616 - */ - const REGEXP_TOKEN = '[^\x00-\x1f\x7f-\xff()<>@,;:\\\\"/\[\]?={}\s]+'; - - /** - * Regular expression for 'quoted-string' rule from RFC 2616 - */ - const REGEXP_QUOTED_STRING = '"(?>[^"\\\\]+|\\\\.)*"'; - - /** - * Connected sockets, needed for Keep-Alive support - * @var array - * @see connect() - */ - protected static $sockets = array(); - - /** - * Data for digest authentication scheme - * - * The keys for the array are URL prefixes. - * - * The values are associative arrays with data (realm, nonce, nonce-count, - * opaque...) needed for digest authentication. Stored here to prevent making - * duplicate requests to digest-protected resources after we have already - * received the challenge. - * - * @var array - */ - protected static $challenges = array(); - - /** - * Connected socket - * @var HTTP_Request2_SocketWrapper - * @see connect() - */ - protected $socket; - - /** - * Challenge used for server digest authentication - * @var array - */ - protected $serverChallenge; - - /** - * Challenge used for proxy digest authentication - * @var array - */ - protected $proxyChallenge; - - /** - * Remaining length of the current chunk, when reading chunked response - * @var integer - * @see readChunked() - */ - protected $chunkLength = 0; - - /** - * Remaining amount of redirections to follow - * - * Starts at 'max_redirects' configuration parameter and is reduced on each - * subsequent redirect. An Exception will be thrown once it reaches zero. - * - * @var integer - */ - protected $redirectCountdown = null; - - /** - * Whether to wait for "100 Continue" response before sending request body - * @var bool - */ - protected $expect100Continue = false; - - /** - * Sends request to the remote server and returns its response - * - * @param HTTP_Request2 $request HTTP request message - * - * @return HTTP_Request2_Response - * @throws HTTP_Request2_Exception - */ - public function sendRequest(HTTP_Request2 $request) - { - $this->request = $request; - - try { - $keepAlive = $this->connect(); - $headers = $this->prepareHeaders(); - $this->socket->write($headers); - // provide request headers to the observer, see request #7633 - $this->request->setLastEvent('sentHeaders', $headers); - - if (!$this->expect100Continue) { - $this->writeBody(); - $response = $this->readResponse(); - - } else { - $response = $this->readResponse(); - if (!$response || 100 == $response->getStatus()) { - $this->expect100Continue = false; - // either got "100 Continue" or timed out -> send body - $this->writeBody(); - $response = $this->readResponse(); - } - } - - - if ($jar = $request->getCookieJar()) { - $jar->addCookiesFromResponse($response, $request->getUrl()); - } - - if (!$this->canKeepAlive($keepAlive, $response)) { - $this->disconnect(); - } - - if ($this->shouldUseProxyDigestAuth($response)) { - return $this->sendRequest($request); - } - if ($this->shouldUseServerDigestAuth($response)) { - return $this->sendRequest($request); - } - if ($authInfo = $response->getHeader('authentication-info')) { - $this->updateChallenge($this->serverChallenge, $authInfo); - } - if ($proxyInfo = $response->getHeader('proxy-authentication-info')) { - $this->updateChallenge($this->proxyChallenge, $proxyInfo); - } - - } catch (Exception $e) { - $this->disconnect(); - } - - unset($this->request, $this->requestBody); - - if (!empty($e)) { - $this->redirectCountdown = null; - throw $e; - } - - if (!$request->getConfig('follow_redirects') || !$response->isRedirect()) { - $this->redirectCountdown = null; - return $response; - } else { - return $this->handleRedirect($request, $response); - } - } - - /** - * Connects to the remote server - * - * @return bool whether the connection can be persistent - * @throws HTTP_Request2_Exception - */ - protected function connect() - { - $secure = 0 == strcasecmp($this->request->getUrl()->getScheme(), 'https'); - $tunnel = HTTP_Request2::METHOD_CONNECT == $this->request->getMethod(); - $headers = $this->request->getHeaders(); - $reqHost = $this->request->getUrl()->getHost(); - if (!($reqPort = $this->request->getUrl()->getPort())) { - $reqPort = $secure? 443: 80; - } - - $httpProxy = $socksProxy = false; - if (!($host = $this->request->getConfig('proxy_host'))) { - $host = $reqHost; - $port = $reqPort; - } else { - if (!($port = $this->request->getConfig('proxy_port'))) { - throw new HTTP_Request2_LogicException( - 'Proxy port not provided', - HTTP_Request2_Exception::MISSING_VALUE - ); - } - if ('http' == ($type = $this->request->getConfig('proxy_type'))) { - $httpProxy = true; - } elseif ('socks5' == $type) { - $socksProxy = true; - } else { - throw new HTTP_Request2_NotImplementedException( - "Proxy type '{$type}' is not supported" - ); - } - } - - if ($tunnel && !$httpProxy) { - throw new HTTP_Request2_LogicException( - "Trying to perform CONNECT request without proxy", - HTTP_Request2_Exception::MISSING_VALUE - ); - } - if ($secure && !in_array('ssl', stream_get_transports())) { - throw new HTTP_Request2_LogicException( - 'Need OpenSSL support for https:// requests', - HTTP_Request2_Exception::MISCONFIGURATION - ); - } - - // RFC 2068, section 19.7.1: A client MUST NOT send the Keep-Alive - // connection token to a proxy server... - if ($httpProxy && !$secure && !empty($headers['connection']) - && 'Keep-Alive' == $headers['connection'] - ) { - $this->request->setHeader('connection'); - } - - $keepAlive = ('1.1' == $this->request->getConfig('protocol_version') && - empty($headers['connection'])) || - (!empty($headers['connection']) && - 'Keep-Alive' == $headers['connection']); - - $options = array(); - if ($ip = $this->request->getConfig('local_ip')) { - $options['socket'] = array( - 'bindto' => (false === strpos($ip, ':') ? $ip : '[' . $ip . ']') . ':0' - ); - } - if ($secure || $tunnel) { - $options['ssl'] = array(); - foreach ($this->request->getConfig() as $name => $value) { - if ('ssl_' == substr($name, 0, 4) && null !== $value) { - if ('ssl_verify_host' == $name) { - if ($value) { - $options['ssl']['CN_match'] = $reqHost; - } - } else { - $options['ssl'][substr($name, 4)] = $value; - } - } - } - ksort($options['ssl']); - } - - // Use global request timeout if given, see feature requests #5735, #8964 - if ($timeout = $this->request->getConfig('timeout')) { - $deadline = time() + $timeout; - } else { - $deadline = null; - } - - // Changing SSL context options after connection is established does *not* - // work, we need a new connection if options change - $remote = ((!$secure || $httpProxy || $socksProxy)? 'tcp://': 'ssl://') - . $host . ':' . $port; - $socketKey = $remote . ( - ($secure && $httpProxy || $socksProxy) - ? "->{$reqHost}:{$reqPort}" : '' - ) . (empty($options)? '': ':' . serialize($options)); - unset($this->socket); - - // We use persistent connections and have a connected socket? - // Ensure that the socket is still connected, see bug #16149 - if ($keepAlive && !empty(self::$sockets[$socketKey]) - && !self::$sockets[$socketKey]->eof() - ) { - $this->socket =& self::$sockets[$socketKey]; - - } else { - if ($socksProxy) { - require_once 'HTTP/Request2/SOCKS5.php'; - - $this->socket = new HTTP_Request2_SOCKS5( - $remote, $this->request->getConfig('connect_timeout'), - $options, $this->request->getConfig('proxy_user'), - $this->request->getConfig('proxy_password') - ); - // handle request timeouts ASAP - $this->socket->setDeadline($deadline, $this->request->getConfig('timeout')); - $this->socket->connect($reqHost, $reqPort); - if (!$secure) { - $conninfo = "tcp://{$reqHost}:{$reqPort} via {$remote}"; - } else { - $this->socket->enableCrypto(); - $conninfo = "ssl://{$reqHost}:{$reqPort} via {$remote}"; - } - - } elseif ($secure && $httpProxy && !$tunnel) { - $this->establishTunnel(); - $conninfo = "ssl://{$reqHost}:{$reqPort} via {$remote}"; - - } else { - $this->socket = new HTTP_Request2_SocketWrapper( - $remote, $this->request->getConfig('connect_timeout'), $options - ); - } - $this->request->setLastEvent('connect', empty($conninfo)? $remote: $conninfo); - self::$sockets[$socketKey] =& $this->socket; - } - $this->socket->setDeadline($deadline, $this->request->getConfig('timeout')); - return $keepAlive; - } - - /** - * Establishes a tunnel to a secure remote server via HTTP CONNECT request - * - * This method will fail if 'ssl_verify_peer' is enabled. Probably because PHP - * sees that we are connected to a proxy server (duh!) rather than the server - * that presents its certificate. - * - * @link http://tools.ietf.org/html/rfc2817#section-5.2 - * @throws HTTP_Request2_Exception - */ - protected function establishTunnel() - { - $donor = new self; - $connect = new HTTP_Request2( - $this->request->getUrl(), HTTP_Request2::METHOD_CONNECT, - array_merge($this->request->getConfig(), array('adapter' => $donor)) - ); - $response = $connect->send(); - // Need any successful (2XX) response - if (200 > $response->getStatus() || 300 <= $response->getStatus()) { - throw new HTTP_Request2_ConnectionException( - 'Failed to connect via HTTPS proxy. Proxy response: ' . - $response->getStatus() . ' ' . $response->getReasonPhrase() - ); - } - $this->socket = $donor->socket; - $this->socket->enableCrypto(); - } - - /** - * Checks whether current connection may be reused or should be closed - * - * @param boolean $requestKeepAlive whether connection could - * be persistent in the first place - * @param HTTP_Request2_Response $response response object to check - * - * @return boolean - */ - protected function canKeepAlive($requestKeepAlive, HTTP_Request2_Response $response) - { - // Do not close socket on successful CONNECT request - if (HTTP_Request2::METHOD_CONNECT == $this->request->getMethod() - && 200 <= $response->getStatus() && 300 > $response->getStatus() - ) { - return true; - } - - $lengthKnown = 'chunked' == strtolower($response->getHeader('transfer-encoding')) - || null !== $response->getHeader('content-length') - // no body possible for such responses, see also request #17031 - || HTTP_Request2::METHOD_HEAD == $this->request->getMethod() - || in_array($response->getStatus(), array(204, 304)); - $persistent = 'keep-alive' == strtolower($response->getHeader('connection')) || - (null === $response->getHeader('connection') && - '1.1' == $response->getVersion()); - return $requestKeepAlive && $lengthKnown && $persistent; - } - - /** - * Disconnects from the remote server - */ - protected function disconnect() - { - if (!empty($this->socket)) { - $this->socket = null; - $this->request->setLastEvent('disconnect'); - } - } - - /** - * Handles HTTP redirection - * - * This method will throw an Exception if redirect to a non-HTTP(S) location - * is attempted, also if number of redirects performed already is equal to - * 'max_redirects' configuration parameter. - * - * @param HTTP_Request2 $request Original request - * @param HTTP_Request2_Response $response Response containing redirect - * - * @return HTTP_Request2_Response Response from a new location - * @throws HTTP_Request2_Exception - */ - protected function handleRedirect( - HTTP_Request2 $request, HTTP_Request2_Response $response - ) { - if (is_null($this->redirectCountdown)) { - $this->redirectCountdown = $request->getConfig('max_redirects'); - } - if (0 == $this->redirectCountdown) { - $this->redirectCountdown = null; - // Copying cURL behaviour - throw new HTTP_Request2_MessageException( - 'Maximum (' . $request->getConfig('max_redirects') . ') redirects followed', - HTTP_Request2_Exception::TOO_MANY_REDIRECTS - ); - } - $redirectUrl = new Net_URL2( - $response->getHeader('location'), - array(Net_URL2::OPTION_USE_BRACKETS => $request->getConfig('use_brackets')) - ); - // refuse non-HTTP redirect - if ($redirectUrl->isAbsolute() - && !in_array($redirectUrl->getScheme(), array('http', 'https')) - ) { - $this->redirectCountdown = null; - throw new HTTP_Request2_MessageException( - 'Refusing to redirect to a non-HTTP URL ' . $redirectUrl->__toString(), - HTTP_Request2_Exception::NON_HTTP_REDIRECT - ); - } - // Theoretically URL should be absolute (see http://tools.ietf.org/html/rfc2616#section-14.30), - // but in practice it is often not - if (!$redirectUrl->isAbsolute()) { - $redirectUrl = $request->getUrl()->resolve($redirectUrl); - } - $redirect = clone $request; - $redirect->setUrl($redirectUrl); - if (303 == $response->getStatus() - || (!$request->getConfig('strict_redirects') - && in_array($response->getStatus(), array(301, 302))) - ) { - $redirect->setMethod(HTTP_Request2::METHOD_GET); - $redirect->setBody(''); - } - - if (0 < $this->redirectCountdown) { - $this->redirectCountdown--; - } - return $this->sendRequest($redirect); - } - - /** - * Checks whether another request should be performed with server digest auth - * - * Several conditions should be satisfied for it to return true: - * - response status should be 401 - * - auth credentials should be set in the request object - * - response should contain WWW-Authenticate header with digest challenge - * - there is either no challenge stored for this URL or new challenge - * contains stale=true parameter (in other case we probably just failed - * due to invalid username / password) - * - * The method stores challenge values in $challenges static property - * - * @param HTTP_Request2_Response $response response to check - * - * @return boolean whether another request should be performed - * @throws HTTP_Request2_Exception in case of unsupported challenge parameters - */ - protected function shouldUseServerDigestAuth(HTTP_Request2_Response $response) - { - // no sense repeating a request if we don't have credentials - if (401 != $response->getStatus() || !$this->request->getAuth()) { - return false; - } - if (!$challenge = $this->parseDigestChallenge($response->getHeader('www-authenticate'))) { - return false; - } - - $url = $this->request->getUrl(); - $scheme = $url->getScheme(); - $host = $scheme . '://' . $url->getHost(); - if ($port = $url->getPort()) { - if ((0 == strcasecmp($scheme, 'http') && 80 != $port) - || (0 == strcasecmp($scheme, 'https') && 443 != $port) - ) { - $host .= ':' . $port; - } - } - - if (!empty($challenge['domain'])) { - $prefixes = array(); - foreach (preg_split('/\\s+/', $challenge['domain']) as $prefix) { - // don't bother with different servers - if ('/' == substr($prefix, 0, 1)) { - $prefixes[] = $host . $prefix; - } - } - } - if (empty($prefixes)) { - $prefixes = array($host . '/'); - } - - $ret = true; - foreach ($prefixes as $prefix) { - if (!empty(self::$challenges[$prefix]) - && (empty($challenge['stale']) || strcasecmp('true', $challenge['stale'])) - ) { - // probably credentials are invalid - $ret = false; - } - self::$challenges[$prefix] =& $challenge; - } - return $ret; - } - - /** - * Checks whether another request should be performed with proxy digest auth - * - * Several conditions should be satisfied for it to return true: - * - response status should be 407 - * - proxy auth credentials should be set in the request object - * - response should contain Proxy-Authenticate header with digest challenge - * - there is either no challenge stored for this proxy or new challenge - * contains stale=true parameter (in other case we probably just failed - * due to invalid username / password) - * - * The method stores challenge values in $challenges static property - * - * @param HTTP_Request2_Response $response response to check - * - * @return boolean whether another request should be performed - * @throws HTTP_Request2_Exception in case of unsupported challenge parameters - */ - protected function shouldUseProxyDigestAuth(HTTP_Request2_Response $response) - { - if (407 != $response->getStatus() || !$this->request->getConfig('proxy_user')) { - return false; - } - if (!($challenge = $this->parseDigestChallenge($response->getHeader('proxy-authenticate')))) { - return false; - } - - $key = 'proxy://' . $this->request->getConfig('proxy_host') . - ':' . $this->request->getConfig('proxy_port'); - - if (!empty(self::$challenges[$key]) - && (empty($challenge['stale']) || strcasecmp('true', $challenge['stale'])) - ) { - $ret = false; - } else { - $ret = true; - } - self::$challenges[$key] = $challenge; - return $ret; - } - - /** - * Extracts digest method challenge from (WWW|Proxy)-Authenticate header value - * - * There is a problem with implementation of RFC 2617: several of the parameters - * are defined as quoted-string there and thus may contain backslash escaped - * double quotes (RFC 2616, section 2.2). However, RFC 2617 defines unq(X) as - * just value of quoted-string X without surrounding quotes, it doesn't speak - * about removing backslash escaping. - * - * Now realm parameter is user-defined and human-readable, strange things - * happen when it contains quotes: - * - Apache allows quotes in realm, but apparently uses realm value without - * backslashes for digest computation - * - Squid allows (manually escaped) quotes there, but it is impossible to - * authorize with either escaped or unescaped quotes used in digest, - * probably it can't parse the response (?) - * - Both IE and Firefox display realm value with backslashes in - * the password popup and apparently use the same value for digest - * - * HTTP_Request2 follows IE and Firefox (and hopefully RFC 2617) in - * quoted-string handling, unfortunately that means failure to authorize - * sometimes - * - * @param string $headerValue value of WWW-Authenticate or Proxy-Authenticate header - * - * @return mixed associative array with challenge parameters, false if - * no challenge is present in header value - * @throws HTTP_Request2_NotImplementedException in case of unsupported challenge parameters - */ - protected function parseDigestChallenge($headerValue) - { - $authParam = '(' . self::REGEXP_TOKEN . ')\\s*=\\s*(' . - self::REGEXP_TOKEN . '|' . self::REGEXP_QUOTED_STRING . ')'; - $challenge = "!(?<=^|\\s|,)Digest ({$authParam}\\s*(,\\s*|$))+!"; - if (!preg_match($challenge, $headerValue, $matches)) { - return false; - } - - preg_match_all('!' . $authParam . '!', $matches[0], $params); - $paramsAry = array(); - $knownParams = array('realm', 'domain', 'nonce', 'opaque', 'stale', - 'algorithm', 'qop'); - for ($i = 0; $i < count($params[0]); $i++) { - // section 3.2.1: Any unrecognized directive MUST be ignored. - if (in_array($params[1][$i], $knownParams)) { - if ('"' == substr($params[2][$i], 0, 1)) { - $paramsAry[$params[1][$i]] = substr($params[2][$i], 1, -1); - } else { - $paramsAry[$params[1][$i]] = $params[2][$i]; - } - } - } - // we only support qop=auth - if (!empty($paramsAry['qop']) - && !in_array('auth', array_map('trim', explode(',', $paramsAry['qop']))) - ) { - throw new HTTP_Request2_NotImplementedException( - "Only 'auth' qop is currently supported in digest authentication, " . - "server requested '{$paramsAry['qop']}'" - ); - } - // we only support algorithm=MD5 - if (!empty($paramsAry['algorithm']) && 'MD5' != $paramsAry['algorithm']) { - throw new HTTP_Request2_NotImplementedException( - "Only 'MD5' algorithm is currently supported in digest authentication, " . - "server requested '{$paramsAry['algorithm']}'" - ); - } - - return $paramsAry; - } - - /** - * Parses [Proxy-]Authentication-Info header value and updates challenge - * - * @param array &$challenge challenge to update - * @param string $headerValue value of [Proxy-]Authentication-Info header - * - * @todo validate server rspauth response - */ - protected function updateChallenge(&$challenge, $headerValue) - { - $authParam = '!(' . self::REGEXP_TOKEN . ')\\s*=\\s*(' . - self::REGEXP_TOKEN . '|' . self::REGEXP_QUOTED_STRING . ')!'; - $paramsAry = array(); - - preg_match_all($authParam, $headerValue, $params); - for ($i = 0; $i < count($params[0]); $i++) { - if ('"' == substr($params[2][$i], 0, 1)) { - $paramsAry[$params[1][$i]] = substr($params[2][$i], 1, -1); - } else { - $paramsAry[$params[1][$i]] = $params[2][$i]; - } - } - // for now, just update the nonce value - if (!empty($paramsAry['nextnonce'])) { - $challenge['nonce'] = $paramsAry['nextnonce']; - $challenge['nc'] = 1; - } - } - - /** - * Creates a value for [Proxy-]Authorization header when using digest authentication - * - * @param string $user user name - * @param string $password password - * @param string $url request URL - * @param array &$challenge digest challenge parameters - * - * @return string value of [Proxy-]Authorization request header - * @link http://tools.ietf.org/html/rfc2617#section-3.2.2 - */ - protected function createDigestResponse($user, $password, $url, &$challenge) - { - if (false !== ($q = strpos($url, '?')) - && $this->request->getConfig('digest_compat_ie') - ) { - $url = substr($url, 0, $q); - } - - $a1 = md5($user . ':' . $challenge['realm'] . ':' . $password); - $a2 = md5($this->request->getMethod() . ':' . $url); - - if (empty($challenge['qop'])) { - $digest = md5($a1 . ':' . $challenge['nonce'] . ':' . $a2); - } else { - $challenge['cnonce'] = 'Req2.' . rand(); - if (empty($challenge['nc'])) { - $challenge['nc'] = 1; - } - $nc = sprintf('%08x', $challenge['nc']++); - $digest = md5( - $a1 . ':' . $challenge['nonce'] . ':' . $nc . ':' . - $challenge['cnonce'] . ':auth:' . $a2 - ); - } - return 'Digest username="' . str_replace(array('\\', '"'), array('\\\\', '\\"'), $user) . '", ' . - 'realm="' . $challenge['realm'] . '", ' . - 'nonce="' . $challenge['nonce'] . '", ' . - 'uri="' . $url . '", ' . - 'response="' . $digest . '"' . - (!empty($challenge['opaque'])? - ', opaque="' . $challenge['opaque'] . '"': - '') . - (!empty($challenge['qop'])? - ', qop="auth", nc=' . $nc . ', cnonce="' . $challenge['cnonce'] . '"': - ''); - } - - /** - * Adds 'Authorization' header (if needed) to request headers array - * - * @param array &$headers request headers - * @param string $requestHost request host (needed for digest authentication) - * @param string $requestUrl request URL (needed for digest authentication) - * - * @throws HTTP_Request2_NotImplementedException - */ - protected function addAuthorizationHeader(&$headers, $requestHost, $requestUrl) - { - if (!($auth = $this->request->getAuth())) { - return; - } - switch ($auth['scheme']) { - case HTTP_Request2::AUTH_BASIC: - $headers['authorization'] = 'Basic ' . base64_encode( - $auth['user'] . ':' . $auth['password'] - ); - break; - - case HTTP_Request2::AUTH_DIGEST: - unset($this->serverChallenge); - $fullUrl = ('/' == $requestUrl[0])? - $this->request->getUrl()->getScheme() . '://' . - $requestHost . $requestUrl: - $requestUrl; - foreach (array_keys(self::$challenges) as $key) { - if ($key == substr($fullUrl, 0, strlen($key))) { - $headers['authorization'] = $this->createDigestResponse( - $auth['user'], $auth['password'], - $requestUrl, self::$challenges[$key] - ); - $this->serverChallenge =& self::$challenges[$key]; - break; - } - } - break; - - default: - throw new HTTP_Request2_NotImplementedException( - "Unknown HTTP authentication scheme '{$auth['scheme']}'" - ); - } - } - - /** - * Adds 'Proxy-Authorization' header (if needed) to request headers array - * - * @param array &$headers request headers - * @param string $requestUrl request URL (needed for digest authentication) - * - * @throws HTTP_Request2_NotImplementedException - */ - protected function addProxyAuthorizationHeader(&$headers, $requestUrl) - { - if (!$this->request->getConfig('proxy_host') - || !($user = $this->request->getConfig('proxy_user')) - || (0 == strcasecmp('https', $this->request->getUrl()->getScheme()) - && HTTP_Request2::METHOD_CONNECT != $this->request->getMethod()) - ) { - return; - } - - $password = $this->request->getConfig('proxy_password'); - switch ($this->request->getConfig('proxy_auth_scheme')) { - case HTTP_Request2::AUTH_BASIC: - $headers['proxy-authorization'] = 'Basic ' . base64_encode( - $user . ':' . $password - ); - break; - - case HTTP_Request2::AUTH_DIGEST: - unset($this->proxyChallenge); - $proxyUrl = 'proxy://' . $this->request->getConfig('proxy_host') . - ':' . $this->request->getConfig('proxy_port'); - if (!empty(self::$challenges[$proxyUrl])) { - $headers['proxy-authorization'] = $this->createDigestResponse( - $user, $password, - $requestUrl, self::$challenges[$proxyUrl] - ); - $this->proxyChallenge =& self::$challenges[$proxyUrl]; - } - break; - - default: - throw new HTTP_Request2_NotImplementedException( - "Unknown HTTP authentication scheme '" . - $this->request->getConfig('proxy_auth_scheme') . "'" - ); - } - } - - - /** - * Creates the string with the Request-Line and request headers - * - * @return string - * @throws HTTP_Request2_Exception - */ - protected function prepareHeaders() - { - $headers = $this->request->getHeaders(); - $url = $this->request->getUrl(); - $connect = HTTP_Request2::METHOD_CONNECT == $this->request->getMethod(); - $host = $url->getHost(); - - $defaultPort = 0 == strcasecmp($url->getScheme(), 'https')? 443: 80; - if (($port = $url->getPort()) && $port != $defaultPort || $connect) { - $host .= ':' . (empty($port)? $defaultPort: $port); - } - // Do not overwrite explicitly set 'Host' header, see bug #16146 - if (!isset($headers['host'])) { - $headers['host'] = $host; - } - - if ($connect) { - $requestUrl = $host; - - } else { - if (!$this->request->getConfig('proxy_host') - || 'http' != $this->request->getConfig('proxy_type') - || 0 == strcasecmp($url->getScheme(), 'https') - ) { - $requestUrl = ''; - } else { - $requestUrl = $url->getScheme() . '://' . $host; - } - $path = $url->getPath(); - $query = $url->getQuery(); - $requestUrl .= (empty($path)? '/': $path) . (empty($query)? '': '?' . $query); - } - - if ('1.1' == $this->request->getConfig('protocol_version') - && extension_loaded('zlib') && !isset($headers['accept-encoding']) - ) { - $headers['accept-encoding'] = 'gzip, deflate'; - } - if (($jar = $this->request->getCookieJar()) - && ($cookies = $jar->getMatching($this->request->getUrl(), true)) - ) { - $headers['cookie'] = (empty($headers['cookie'])? '': $headers['cookie'] . '; ') . $cookies; - } - - $this->addAuthorizationHeader($headers, $host, $requestUrl); - $this->addProxyAuthorizationHeader($headers, $requestUrl); - $this->calculateRequestLength($headers); - if ('1.1' == $this->request->getConfig('protocol_version')) { - $this->updateExpectHeader($headers); - } else { - $this->expect100Continue = false; - } - - $headersStr = $this->request->getMethod() . ' ' . $requestUrl . ' HTTP/' . - $this->request->getConfig('protocol_version') . "\r\n"; - foreach ($headers as $name => $value) { - $canonicalName = implode('-', array_map('ucfirst', explode('-', $name))); - $headersStr .= $canonicalName . ': ' . $value . "\r\n"; - } - return $headersStr . "\r\n"; - } - - /** - * Adds or removes 'Expect: 100-continue' header from request headers - * - * Also sets the $expect100Continue property. Parsing of existing header - * is somewhat needed due to its complex structure and due to the - * requirement in section 8.2.3 of RFC 2616: - * > A client MUST NOT send an Expect request-header field (section - * > 14.20) with the "100-continue" expectation if it does not intend - * > to send a request body. - * - * @param array &$headers Array of headers prepared for the request - * - * @throws HTTP_Request2_LogicException - * @link http://pear.php.net/bugs/bug.php?id=19233 - * @link http://tools.ietf.org/html/rfc2616#section-8.2.3 - */ - protected function updateExpectHeader(&$headers) - { - $this->expect100Continue = false; - $expectations = array(); - if (isset($headers['expect'])) { - if ('' === $headers['expect']) { - // empty 'Expect' header is technically invalid, so just get rid of it - unset($headers['expect']); - return; - } - // build regexp to parse the value of existing Expect header - $expectParam = ';\s*' . self::REGEXP_TOKEN . '(?:\s*=\s*(?:' - . self::REGEXP_TOKEN . '|' - . self::REGEXP_QUOTED_STRING . '))?\s*'; - $expectExtension = self::REGEXP_TOKEN . '(?:\s*=\s*(?:' - . self::REGEXP_TOKEN . '|' - . self::REGEXP_QUOTED_STRING . ')\s*(?:' - . $expectParam . ')*)?'; - $expectItem = '!(100-continue|' . $expectExtension . ')!A'; - - $pos = 0; - $length = strlen($headers['expect']); - - while ($pos < $length) { - $pos += strspn($headers['expect'], " \t", $pos); - if (',' === substr($headers['expect'], $pos, 1)) { - $pos++; - continue; - - } elseif (!preg_match($expectItem, $headers['expect'], $m, 0, $pos)) { - throw new HTTP_Request2_LogicException( - "Cannot parse value '{$headers['expect']}' of Expect header", - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - - } else { - $pos += strlen($m[0]); - if (strcasecmp('100-continue', $m[0])) { - $expectations[] = $m[0]; - } - } - } - } - - if (1024 < $this->contentLength) { - $expectations[] = '100-continue'; - $this->expect100Continue = true; - } - - if (empty($expectations)) { - unset($headers['expect']); - } else { - $headers['expect'] = implode(',', $expectations); - } - } - - /** - * Sends the request body - * - * @throws HTTP_Request2_MessageException - */ - protected function writeBody() - { - if (in_array($this->request->getMethod(), self::$bodyDisallowed) - || 0 == $this->contentLength - ) { - return; - } - - $position = 0; - $bufferSize = $this->request->getConfig('buffer_size'); - $headers = $this->request->getHeaders(); - $chunked = isset($headers['transfer-encoding']); - while ($position < $this->contentLength) { - if (is_string($this->requestBody)) { - $str = substr($this->requestBody, $position, $bufferSize); - } elseif (is_resource($this->requestBody)) { - $str = fread($this->requestBody, $bufferSize); - } else { - $str = $this->requestBody->read($bufferSize); - } - if (!$chunked) { - $this->socket->write($str); - } else { - $this->socket->write(dechex(strlen($str)) . "\r\n{$str}\r\n"); - } - // Provide the length of written string to the observer, request #7630 - $this->request->setLastEvent('sentBodyPart', strlen($str)); - $position += strlen($str); - } - - // write zero-length chunk - if ($chunked) { - $this->socket->write("0\r\n\r\n"); - } - $this->request->setLastEvent('sentBody', $this->contentLength); - } - - /** - * Reads the remote server's response - * - * @return HTTP_Request2_Response - * @throws HTTP_Request2_Exception - */ - protected function readResponse() - { - $bufferSize = $this->request->getConfig('buffer_size'); - // http://tools.ietf.org/html/rfc2616#section-8.2.3 - // ...the client SHOULD NOT wait for an indefinite period before sending the request body - $timeout = $this->expect100Continue ? 1 : null; - - do { - try { - $response = new HTTP_Request2_Response( - $this->socket->readLine($bufferSize, $timeout), true, $this->request->getUrl() - ); - do { - $headerLine = $this->socket->readLine($bufferSize); - $response->parseHeaderLine($headerLine); - } while ('' != $headerLine); - - } catch (HTTP_Request2_MessageException $e) { - if (HTTP_Request2_Exception::TIMEOUT === $e->getCode() - && $this->expect100Continue - ) { - return null; - } - throw $e; - } - if ($this->expect100Continue && 100 == $response->getStatus()) { - return $response; - } - } while (in_array($response->getStatus(), array(100, 101))); - - $this->request->setLastEvent('receivedHeaders', $response); - - // No body possible in such responses - if (HTTP_Request2::METHOD_HEAD == $this->request->getMethod() - || (HTTP_Request2::METHOD_CONNECT == $this->request->getMethod() - && 200 <= $response->getStatus() && 300 > $response->getStatus()) - || in_array($response->getStatus(), array(204, 304)) - ) { - return $response; - } - - $chunked = 'chunked' == $response->getHeader('transfer-encoding'); - $length = $response->getHeader('content-length'); - $hasBody = false; - if ($chunked || null === $length || 0 < intval($length)) { - // RFC 2616, section 4.4: - // 3. ... If a message is received with both a - // Transfer-Encoding header field and a Content-Length header field, - // the latter MUST be ignored. - $toRead = ($chunked || null === $length)? null: $length; - $this->chunkLength = 0; - - while (!$this->socket->eof() && (is_null($toRead) || 0 < $toRead)) { - if ($chunked) { - $data = $this->readChunked($bufferSize); - } elseif (is_null($toRead)) { - $data = $this->socket->read($bufferSize); - } else { - $data = $this->socket->read(min($toRead, $bufferSize)); - $toRead -= strlen($data); - } - if ('' == $data && (!$this->chunkLength || $this->socket->eof())) { - break; - } - - $hasBody = true; - if ($this->request->getConfig('store_body')) { - $response->appendBody($data); - } - if (!in_array($response->getHeader('content-encoding'), array('identity', null))) { - $this->request->setLastEvent('receivedEncodedBodyPart', $data); - } else { - $this->request->setLastEvent('receivedBodyPart', $data); - } - } - } - - if ($hasBody) { - $this->request->setLastEvent('receivedBody', $response); - } - return $response; - } - - /** - * Reads a part of response body encoded with chunked Transfer-Encoding - * - * @param int $bufferSize buffer size to use for reading - * - * @return string - * @throws HTTP_Request2_MessageException - */ - protected function readChunked($bufferSize) - { - // at start of the next chunk? - if (0 == $this->chunkLength) { - $line = $this->socket->readLine($bufferSize); - if (!preg_match('/^([0-9a-f]+)/i', $line, $matches)) { - throw new HTTP_Request2_MessageException( - "Cannot decode chunked response, invalid chunk length '{$line}'", - HTTP_Request2_Exception::DECODE_ERROR - ); - } else { - $this->chunkLength = hexdec($matches[1]); - // Chunk with zero length indicates the end - if (0 == $this->chunkLength) { - $this->socket->readLine($bufferSize); - return ''; - } - } - } - $data = $this->socket->read(min($this->chunkLength, $bufferSize)); - $this->chunkLength -= strlen($data); - if (0 == $this->chunkLength) { - $this->socket->readLine($bufferSize); // Trailing CRLF - } - return $data; - } -} - +<?php +/** + * Socket-based adapter for HTTP_Request2 + * + * PHP version 5 + * + * LICENSE + * + * This source file is subject to BSD 3-Clause License that is bundled + * with this package in the file LICENSE and available at the URL + * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @copyright 2008-2016 Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** Base class for HTTP_Request2 adapters */ +require_once 'HTTP/Request2/Adapter.php'; + +/** Socket wrapper class */ +require_once 'HTTP/Request2/SocketWrapper.php'; + +/** + * Socket-based adapter for HTTP_Request2 + * + * This adapter uses only PHP sockets and will work on almost any PHP + * environment. Code is based on original HTTP_Request PEAR package. + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_Adapter_Socket extends HTTP_Request2_Adapter +{ + /** + * Regular expression for 'token' rule from RFC 2616 + */ + const REGEXP_TOKEN = '[^\x00-\x1f\x7f-\xff()<>@,;:\\\\"/\[\]?={}\s]+'; + + /** + * Regular expression for 'quoted-string' rule from RFC 2616 + */ + const REGEXP_QUOTED_STRING = '"(?>[^"\\\\]+|\\\\.)*"'; + + /** + * Connected sockets, needed for Keep-Alive support + * @var array + * @see connect() + */ + protected static $sockets = array(); + + /** + * Data for digest authentication scheme + * + * The keys for the array are URL prefixes. + * + * The values are associative arrays with data (realm, nonce, nonce-count, + * opaque...) needed for digest authentication. Stored here to prevent making + * duplicate requests to digest-protected resources after we have already + * received the challenge. + * + * @var array + */ + protected static $challenges = array(); + + /** + * Connected socket + * @var HTTP_Request2_SocketWrapper + * @see connect() + */ + protected $socket; + + /** + * Challenge used for server digest authentication + * @var array + */ + protected $serverChallenge; + + /** + * Challenge used for proxy digest authentication + * @var array + */ + protected $proxyChallenge; + + /** + * Remaining length of the current chunk, when reading chunked response + * @var integer + * @see readChunked() + */ + protected $chunkLength = 0; + + /** + * Remaining amount of redirections to follow + * + * Starts at 'max_redirects' configuration parameter and is reduced on each + * subsequent redirect. An Exception will be thrown once it reaches zero. + * + * @var integer + */ + protected $redirectCountdown = null; + + /** + * Whether to wait for "100 Continue" response before sending request body + * @var bool + */ + protected $expect100Continue = false; + + /** + * Sends request to the remote server and returns its response + * + * @param HTTP_Request2 $request HTTP request message + * + * @return HTTP_Request2_Response + * @throws HTTP_Request2_Exception + */ + public function sendRequest(HTTP_Request2 $request) + { + $this->request = $request; + + try { + $keepAlive = $this->connect(); + $headers = $this->prepareHeaders(); + $this->socket->write($headers); + // provide request headers to the observer, see request #7633 + $this->request->setLastEvent('sentHeaders', $headers); + + if (!$this->expect100Continue) { + $this->writeBody(); + $response = $this->readResponse(); + + } else { + $response = $this->readResponse(); + if (!$response || 100 == $response->getStatus()) { + $this->expect100Continue = false; + // either got "100 Continue" or timed out -> send body + $this->writeBody(); + $response = $this->readResponse(); + } + } + + + if ($jar = $request->getCookieJar()) { + $jar->addCookiesFromResponse($response); + } + + if (!$this->canKeepAlive($keepAlive, $response)) { + $this->disconnect(); + } + + if ($this->shouldUseProxyDigestAuth($response)) { + return $this->sendRequest($request); + } + if ($this->shouldUseServerDigestAuth($response)) { + return $this->sendRequest($request); + } + if ($authInfo = $response->getHeader('authentication-info')) { + $this->updateChallenge($this->serverChallenge, $authInfo); + } + if ($proxyInfo = $response->getHeader('proxy-authentication-info')) { + $this->updateChallenge($this->proxyChallenge, $proxyInfo); + } + + } catch (Exception $e) { + $this->disconnect(); + } + + unset($this->request, $this->requestBody); + + if (!empty($e)) { + $this->redirectCountdown = null; + throw $e; + } + + if (!$request->getConfig('follow_redirects') || !$response->isRedirect()) { + $this->redirectCountdown = null; + return $response; + } else { + return $this->handleRedirect($request, $response); + } + } + + /** + * Connects to the remote server + * + * @return bool whether the connection can be persistent + * @throws HTTP_Request2_Exception + */ + protected function connect() + { + $secure = 0 == strcasecmp($this->request->getUrl()->getScheme(), 'https'); + $tunnel = HTTP_Request2::METHOD_CONNECT == $this->request->getMethod(); + $headers = $this->request->getHeaders(); + $reqHost = $this->request->getUrl()->getHost(); + if (!($reqPort = $this->request->getUrl()->getPort())) { + $reqPort = $secure? 443: 80; + } + + $httpProxy = $socksProxy = false; + if (!($host = $this->request->getConfig('proxy_host'))) { + $host = $reqHost; + $port = $reqPort; + } else { + if (!($port = $this->request->getConfig('proxy_port'))) { + throw new HTTP_Request2_LogicException( + 'Proxy port not provided', + HTTP_Request2_Exception::MISSING_VALUE + ); + } + if ('http' == ($type = $this->request->getConfig('proxy_type'))) { + $httpProxy = true; + } elseif ('socks5' == $type) { + $socksProxy = true; + } else { + throw new HTTP_Request2_NotImplementedException( + "Proxy type '{$type}' is not supported" + ); + } + } + + if ($tunnel && !$httpProxy) { + throw new HTTP_Request2_LogicException( + "Trying to perform CONNECT request without proxy", + HTTP_Request2_Exception::MISSING_VALUE + ); + } + if ($secure && !in_array('ssl', stream_get_transports())) { + throw new HTTP_Request2_LogicException( + 'Need OpenSSL support for https:// requests', + HTTP_Request2_Exception::MISCONFIGURATION + ); + } + + // RFC 2068, section 19.7.1: A client MUST NOT send the Keep-Alive + // connection token to a proxy server... + if ($httpProxy && !$secure && !empty($headers['connection']) + && 'Keep-Alive' == $headers['connection'] + ) { + $this->request->setHeader('connection'); + } + + $keepAlive = ('1.1' == $this->request->getConfig('protocol_version') && + empty($headers['connection'])) || + (!empty($headers['connection']) && + 'Keep-Alive' == $headers['connection']); + + $options = array(); + if ($ip = $this->request->getConfig('local_ip')) { + $options['socket'] = array( + 'bindto' => (false === strpos($ip, ':') ? $ip : '[' . $ip . ']') . ':0' + ); + } + if ($secure || $tunnel) { + $options['ssl'] = array(); + foreach ($this->request->getConfig() as $name => $value) { + if ('ssl_' == substr($name, 0, 4) && null !== $value) { + if ('ssl_verify_host' == $name) { + if (version_compare(phpversion(), '5.6', '<')) { + if ($value) { + $options['ssl']['CN_match'] = $reqHost; + } + + } else { + $options['ssl']['verify_peer_name'] = $value; + $options['ssl']['peer_name'] = $reqHost; + } + + } else { + $options['ssl'][substr($name, 4)] = $value; + } + } + } + ksort($options['ssl']); + } + + // Use global request timeout if given, see feature requests #5735, #8964 + if ($timeout = $this->request->getConfig('timeout')) { + $deadline = time() + $timeout; + } else { + $deadline = null; + } + + // Changing SSL context options after connection is established does *not* + // work, we need a new connection if options change + $remote = ((!$secure || $httpProxy || $socksProxy)? 'tcp://': 'tls://') + . $host . ':' . $port; + $socketKey = $remote . ( + ($secure && $httpProxy || $socksProxy) + ? "->{$reqHost}:{$reqPort}" : '' + ) . (empty($options)? '': ':' . serialize($options)); + unset($this->socket); + + // We use persistent connections and have a connected socket? + // Ensure that the socket is still connected, see bug #16149 + if ($keepAlive && !empty(self::$sockets[$socketKey]) + && !self::$sockets[$socketKey]->eof() + ) { + $this->socket =& self::$sockets[$socketKey]; + + } else { + if ($socksProxy) { + require_once 'HTTP/Request2/SOCKS5.php'; + + $this->socket = new HTTP_Request2_SOCKS5( + $remote, $this->request->getConfig('connect_timeout'), + $options, $this->request->getConfig('proxy_user'), + $this->request->getConfig('proxy_password') + ); + // handle request timeouts ASAP + $this->socket->setDeadline($deadline, $this->request->getConfig('timeout')); + $this->socket->connect($reqHost, $reqPort); + if (!$secure) { + $conninfo = "tcp://{$reqHost}:{$reqPort} via {$remote}"; + } else { + $this->socket->enableCrypto(); + $conninfo = "tls://{$reqHost}:{$reqPort} via {$remote}"; + } + + } elseif ($secure && $httpProxy && !$tunnel) { + $this->establishTunnel(); + $conninfo = "tls://{$reqHost}:{$reqPort} via {$remote}"; + + } else { + $this->socket = new HTTP_Request2_SocketWrapper( + $remote, $this->request->getConfig('connect_timeout'), $options + ); + } + $this->request->setLastEvent('connect', empty($conninfo)? $remote: $conninfo); + self::$sockets[$socketKey] =& $this->socket; + } + $this->socket->setDeadline($deadline, $this->request->getConfig('timeout')); + return $keepAlive; + } + + /** + * Establishes a tunnel to a secure remote server via HTTP CONNECT request + * + * This method will fail if 'ssl_verify_peer' is enabled. Probably because PHP + * sees that we are connected to a proxy server (duh!) rather than the server + * that presents its certificate. + * + * @link http://tools.ietf.org/html/rfc2817#section-5.2 + * @throws HTTP_Request2_Exception + */ + protected function establishTunnel() + { + $donor = new self; + $connect = new HTTP_Request2( + $this->request->getUrl(), HTTP_Request2::METHOD_CONNECT, + array_merge($this->request->getConfig(), array('adapter' => $donor)) + ); + $response = $connect->send(); + // Need any successful (2XX) response + if (200 > $response->getStatus() || 300 <= $response->getStatus()) { + throw new HTTP_Request2_ConnectionException( + 'Failed to connect via HTTPS proxy. Proxy response: ' . + $response->getStatus() . ' ' . $response->getReasonPhrase() + ); + } + $this->socket = $donor->socket; + $this->socket->enableCrypto(); + } + + /** + * Checks whether current connection may be reused or should be closed + * + * @param boolean $requestKeepAlive whether connection could + * be persistent in the first place + * @param HTTP_Request2_Response $response response object to check + * + * @return boolean + */ + protected function canKeepAlive($requestKeepAlive, HTTP_Request2_Response $response) + { + // Do not close socket on successful CONNECT request + if (HTTP_Request2::METHOD_CONNECT == $this->request->getMethod() + && 200 <= $response->getStatus() && 300 > $response->getStatus() + ) { + return true; + } + + $lengthKnown = 'chunked' == strtolower($response->getHeader('transfer-encoding')) + || null !== $response->getHeader('content-length') + // no body possible for such responses, see also request #17031 + || HTTP_Request2::METHOD_HEAD == $this->request->getMethod() + || in_array($response->getStatus(), array(204, 304)); + $persistent = 'keep-alive' == strtolower($response->getHeader('connection')) || + (null === $response->getHeader('connection') && + '1.1' == $response->getVersion()); + return $requestKeepAlive && $lengthKnown && $persistent; + } + + /** + * Disconnects from the remote server + */ + protected function disconnect() + { + if (!empty($this->socket)) { + $this->socket = null; + $this->request->setLastEvent('disconnect'); + } + } + + /** + * Handles HTTP redirection + * + * This method will throw an Exception if redirect to a non-HTTP(S) location + * is attempted, also if number of redirects performed already is equal to + * 'max_redirects' configuration parameter. + * + * @param HTTP_Request2 $request Original request + * @param HTTP_Request2_Response $response Response containing redirect + * + * @return HTTP_Request2_Response Response from a new location + * @throws HTTP_Request2_Exception + */ + protected function handleRedirect( + HTTP_Request2 $request, HTTP_Request2_Response $response + ) { + if (is_null($this->redirectCountdown)) { + $this->redirectCountdown = $request->getConfig('max_redirects'); + } + if (0 == $this->redirectCountdown) { + $this->redirectCountdown = null; + // Copying cURL behaviour + throw new HTTP_Request2_MessageException( + 'Maximum (' . $request->getConfig('max_redirects') . ') redirects followed', + HTTP_Request2_Exception::TOO_MANY_REDIRECTS + ); + } + $redirectUrl = new Net_URL2( + $response->getHeader('location'), + array(Net_URL2::OPTION_USE_BRACKETS => $request->getConfig('use_brackets')) + ); + // refuse non-HTTP redirect + if ($redirectUrl->isAbsolute() + && !in_array($redirectUrl->getScheme(), array('http', 'https')) + ) { + $this->redirectCountdown = null; + throw new HTTP_Request2_MessageException( + 'Refusing to redirect to a non-HTTP URL ' . $redirectUrl->__toString(), + HTTP_Request2_Exception::NON_HTTP_REDIRECT + ); + } + // Theoretically URL should be absolute (see http://tools.ietf.org/html/rfc2616#section-14.30), + // but in practice it is often not + if (!$redirectUrl->isAbsolute()) { + $redirectUrl = $request->getUrl()->resolve($redirectUrl); + } + $redirect = clone $request; + $redirect->setUrl($redirectUrl); + if (303 == $response->getStatus() + || (!$request->getConfig('strict_redirects') + && in_array($response->getStatus(), array(301, 302))) + ) { + $redirect->setMethod(HTTP_Request2::METHOD_GET); + $redirect->setBody(''); + } + + if (0 < $this->redirectCountdown) { + $this->redirectCountdown--; + } + return $this->sendRequest($redirect); + } + + /** + * Checks whether another request should be performed with server digest auth + * + * Several conditions should be satisfied for it to return true: + * - response status should be 401 + * - auth credentials should be set in the request object + * - response should contain WWW-Authenticate header with digest challenge + * - there is either no challenge stored for this URL or new challenge + * contains stale=true parameter (in other case we probably just failed + * due to invalid username / password) + * + * The method stores challenge values in $challenges static property + * + * @param HTTP_Request2_Response $response response to check + * + * @return boolean whether another request should be performed + * @throws HTTP_Request2_Exception in case of unsupported challenge parameters + */ + protected function shouldUseServerDigestAuth(HTTP_Request2_Response $response) + { + // no sense repeating a request if we don't have credentials + if (401 != $response->getStatus() || !$this->request->getAuth()) { + return false; + } + if (!$challenge = $this->parseDigestChallenge($response->getHeader('www-authenticate'))) { + return false; + } + + $url = $this->request->getUrl(); + $scheme = $url->getScheme(); + $host = $scheme . '://' . $url->getHost(); + if ($port = $url->getPort()) { + if ((0 == strcasecmp($scheme, 'http') && 80 != $port) + || (0 == strcasecmp($scheme, 'https') && 443 != $port) + ) { + $host .= ':' . $port; + } + } + + if (!empty($challenge['domain'])) { + $prefixes = array(); + foreach (preg_split('/\\s+/', $challenge['domain']) as $prefix) { + // don't bother with different servers + if ('/' == substr($prefix, 0, 1)) { + $prefixes[] = $host . $prefix; + } + } + } + if (empty($prefixes)) { + $prefixes = array($host . '/'); + } + + $ret = true; + foreach ($prefixes as $prefix) { + if (!empty(self::$challenges[$prefix]) + && (empty($challenge['stale']) || strcasecmp('true', $challenge['stale'])) + ) { + // probably credentials are invalid + $ret = false; + } + self::$challenges[$prefix] =& $challenge; + } + return $ret; + } + + /** + * Checks whether another request should be performed with proxy digest auth + * + * Several conditions should be satisfied for it to return true: + * - response status should be 407 + * - proxy auth credentials should be set in the request object + * - response should contain Proxy-Authenticate header with digest challenge + * - there is either no challenge stored for this proxy or new challenge + * contains stale=true parameter (in other case we probably just failed + * due to invalid username / password) + * + * The method stores challenge values in $challenges static property + * + * @param HTTP_Request2_Response $response response to check + * + * @return boolean whether another request should be performed + * @throws HTTP_Request2_Exception in case of unsupported challenge parameters + */ + protected function shouldUseProxyDigestAuth(HTTP_Request2_Response $response) + { + if (407 != $response->getStatus() || !$this->request->getConfig('proxy_user')) { + return false; + } + if (!($challenge = $this->parseDigestChallenge($response->getHeader('proxy-authenticate')))) { + return false; + } + + $key = 'proxy://' . $this->request->getConfig('proxy_host') . + ':' . $this->request->getConfig('proxy_port'); + + if (!empty(self::$challenges[$key]) + && (empty($challenge['stale']) || strcasecmp('true', $challenge['stale'])) + ) { + $ret = false; + } else { + $ret = true; + } + self::$challenges[$key] = $challenge; + return $ret; + } + + /** + * Extracts digest method challenge from (WWW|Proxy)-Authenticate header value + * + * There is a problem with implementation of RFC 2617: several of the parameters + * are defined as quoted-string there and thus may contain backslash escaped + * double quotes (RFC 2616, section 2.2). However, RFC 2617 defines unq(X) as + * just value of quoted-string X without surrounding quotes, it doesn't speak + * about removing backslash escaping. + * + * Now realm parameter is user-defined and human-readable, strange things + * happen when it contains quotes: + * - Apache allows quotes in realm, but apparently uses realm value without + * backslashes for digest computation + * - Squid allows (manually escaped) quotes there, but it is impossible to + * authorize with either escaped or unescaped quotes used in digest, + * probably it can't parse the response (?) + * - Both IE and Firefox display realm value with backslashes in + * the password popup and apparently use the same value for digest + * + * HTTP_Request2 follows IE and Firefox (and hopefully RFC 2617) in + * quoted-string handling, unfortunately that means failure to authorize + * sometimes + * + * @param string $headerValue value of WWW-Authenticate or Proxy-Authenticate header + * + * @return mixed associative array with challenge parameters, false if + * no challenge is present in header value + * @throws HTTP_Request2_NotImplementedException in case of unsupported challenge parameters + */ + protected function parseDigestChallenge($headerValue) + { + $authParam = '(' . self::REGEXP_TOKEN . ')\\s*=\\s*(' . + self::REGEXP_TOKEN . '|' . self::REGEXP_QUOTED_STRING . ')'; + $challenge = "!(?<=^|\\s|,)Digest ({$authParam}\\s*(,\\s*|$))+!"; + if (!preg_match($challenge, $headerValue, $matches)) { + return false; + } + + preg_match_all('!' . $authParam . '!', $matches[0], $params); + $paramsAry = array(); + $knownParams = array('realm', 'domain', 'nonce', 'opaque', 'stale', + 'algorithm', 'qop'); + for ($i = 0; $i < count($params[0]); $i++) { + // section 3.2.1: Any unrecognized directive MUST be ignored. + if (in_array($params[1][$i], $knownParams)) { + if ('"' == substr($params[2][$i], 0, 1)) { + $paramsAry[$params[1][$i]] = substr($params[2][$i], 1, -1); + } else { + $paramsAry[$params[1][$i]] = $params[2][$i]; + } + } + } + // we only support qop=auth + if (!empty($paramsAry['qop']) + && !in_array('auth', array_map('trim', explode(',', $paramsAry['qop']))) + ) { + throw new HTTP_Request2_NotImplementedException( + "Only 'auth' qop is currently supported in digest authentication, " . + "server requested '{$paramsAry['qop']}'" + ); + } + // we only support algorithm=MD5 + if (!empty($paramsAry['algorithm']) && 'MD5' != $paramsAry['algorithm']) { + throw new HTTP_Request2_NotImplementedException( + "Only 'MD5' algorithm is currently supported in digest authentication, " . + "server requested '{$paramsAry['algorithm']}'" + ); + } + + return $paramsAry; + } + + /** + * Parses [Proxy-]Authentication-Info header value and updates challenge + * + * @param array &$challenge challenge to update + * @param string $headerValue value of [Proxy-]Authentication-Info header + * + * @todo validate server rspauth response + */ + protected function updateChallenge(&$challenge, $headerValue) + { + $authParam = '!(' . self::REGEXP_TOKEN . ')\\s*=\\s*(' . + self::REGEXP_TOKEN . '|' . self::REGEXP_QUOTED_STRING . ')!'; + $paramsAry = array(); + + preg_match_all($authParam, $headerValue, $params); + for ($i = 0; $i < count($params[0]); $i++) { + if ('"' == substr($params[2][$i], 0, 1)) { + $paramsAry[$params[1][$i]] = substr($params[2][$i], 1, -1); + } else { + $paramsAry[$params[1][$i]] = $params[2][$i]; + } + } + // for now, just update the nonce value + if (!empty($paramsAry['nextnonce'])) { + $challenge['nonce'] = $paramsAry['nextnonce']; + $challenge['nc'] = 1; + } + } + + /** + * Creates a value for [Proxy-]Authorization header when using digest authentication + * + * @param string $user user name + * @param string $password password + * @param string $url request URL + * @param array &$challenge digest challenge parameters + * + * @return string value of [Proxy-]Authorization request header + * @link http://tools.ietf.org/html/rfc2617#section-3.2.2 + */ + protected function createDigestResponse($user, $password, $url, &$challenge) + { + if (false !== ($q = strpos($url, '?')) + && $this->request->getConfig('digest_compat_ie') + ) { + $url = substr($url, 0, $q); + } + + $a1 = md5($user . ':' . $challenge['realm'] . ':' . $password); + $a2 = md5($this->request->getMethod() . ':' . $url); + + if (empty($challenge['qop'])) { + $digest = md5($a1 . ':' . $challenge['nonce'] . ':' . $a2); + } else { + $challenge['cnonce'] = 'Req2.' . rand(); + if (empty($challenge['nc'])) { + $challenge['nc'] = 1; + } + $nc = sprintf('%08x', $challenge['nc']++); + $digest = md5( + $a1 . ':' . $challenge['nonce'] . ':' . $nc . ':' . + $challenge['cnonce'] . ':auth:' . $a2 + ); + } + return 'Digest username="' . str_replace(array('\\', '"'), array('\\\\', '\\"'), $user) . '", ' . + 'realm="' . $challenge['realm'] . '", ' . + 'nonce="' . $challenge['nonce'] . '", ' . + 'uri="' . $url . '", ' . + 'response="' . $digest . '"' . + (!empty($challenge['opaque'])? + ', opaque="' . $challenge['opaque'] . '"': + '') . + (!empty($challenge['qop'])? + ', qop="auth", nc=' . $nc . ', cnonce="' . $challenge['cnonce'] . '"': + ''); + } + + /** + * Adds 'Authorization' header (if needed) to request headers array + * + * @param array &$headers request headers + * @param string $requestHost request host (needed for digest authentication) + * @param string $requestUrl request URL (needed for digest authentication) + * + * @throws HTTP_Request2_NotImplementedException + */ + protected function addAuthorizationHeader(&$headers, $requestHost, $requestUrl) + { + if (!($auth = $this->request->getAuth())) { + return; + } + switch ($auth['scheme']) { + case HTTP_Request2::AUTH_BASIC: + $headers['authorization'] = 'Basic ' . base64_encode( + $auth['user'] . ':' . $auth['password'] + ); + break; + + case HTTP_Request2::AUTH_DIGEST: + unset($this->serverChallenge); + $fullUrl = ('/' == $requestUrl[0])? + $this->request->getUrl()->getScheme() . '://' . + $requestHost . $requestUrl: + $requestUrl; + foreach (array_keys(self::$challenges) as $key) { + if ($key == substr($fullUrl, 0, strlen($key))) { + $headers['authorization'] = $this->createDigestResponse( + $auth['user'], $auth['password'], + $requestUrl, self::$challenges[$key] + ); + $this->serverChallenge =& self::$challenges[$key]; + break; + } + } + break; + + default: + throw new HTTP_Request2_NotImplementedException( + "Unknown HTTP authentication scheme '{$auth['scheme']}'" + ); + } + } + + /** + * Adds 'Proxy-Authorization' header (if needed) to request headers array + * + * @param array &$headers request headers + * @param string $requestUrl request URL (needed for digest authentication) + * + * @throws HTTP_Request2_NotImplementedException + */ + protected function addProxyAuthorizationHeader(&$headers, $requestUrl) + { + if (!$this->request->getConfig('proxy_host') + || !($user = $this->request->getConfig('proxy_user')) + || (0 == strcasecmp('https', $this->request->getUrl()->getScheme()) + && HTTP_Request2::METHOD_CONNECT != $this->request->getMethod()) + ) { + return; + } + + $password = $this->request->getConfig('proxy_password'); + switch ($this->request->getConfig('proxy_auth_scheme')) { + case HTTP_Request2::AUTH_BASIC: + $headers['proxy-authorization'] = 'Basic ' . base64_encode( + $user . ':' . $password + ); + break; + + case HTTP_Request2::AUTH_DIGEST: + unset($this->proxyChallenge); + $proxyUrl = 'proxy://' . $this->request->getConfig('proxy_host') . + ':' . $this->request->getConfig('proxy_port'); + if (!empty(self::$challenges[$proxyUrl])) { + $headers['proxy-authorization'] = $this->createDigestResponse( + $user, $password, + $requestUrl, self::$challenges[$proxyUrl] + ); + $this->proxyChallenge =& self::$challenges[$proxyUrl]; + } + break; + + default: + throw new HTTP_Request2_NotImplementedException( + "Unknown HTTP authentication scheme '" . + $this->request->getConfig('proxy_auth_scheme') . "'" + ); + } + } + + + /** + * Creates the string with the Request-Line and request headers + * + * @return string + * @throws HTTP_Request2_Exception + */ + protected function prepareHeaders() + { + $headers = $this->request->getHeaders(); + $url = $this->request->getUrl(); + $connect = HTTP_Request2::METHOD_CONNECT == $this->request->getMethod(); + $host = $url->getHost(); + + $defaultPort = 0 == strcasecmp($url->getScheme(), 'https')? 443: 80; + if (($port = $url->getPort()) && $port != $defaultPort || $connect) { + $host .= ':' . (empty($port)? $defaultPort: $port); + } + // Do not overwrite explicitly set 'Host' header, see bug #16146 + if (!isset($headers['host'])) { + $headers['host'] = $host; + } + + if ($connect) { + $requestUrl = $host; + + } else { + if (!$this->request->getConfig('proxy_host') + || 'http' != $this->request->getConfig('proxy_type') + || 0 == strcasecmp($url->getScheme(), 'https') + ) { + $requestUrl = ''; + } else { + $requestUrl = $url->getScheme() . '://' . $host; + } + $path = $url->getPath(); + $query = $url->getQuery(); + $requestUrl .= (empty($path)? '/': $path) . (empty($query)? '': '?' . $query); + } + + if ('1.1' == $this->request->getConfig('protocol_version') + && extension_loaded('zlib') && !isset($headers['accept-encoding']) + ) { + $headers['accept-encoding'] = 'gzip, deflate'; + } + if (($jar = $this->request->getCookieJar()) + && ($cookies = $jar->getMatching($this->request->getUrl(), true)) + ) { + $headers['cookie'] = (empty($headers['cookie'])? '': $headers['cookie'] . '; ') . $cookies; + } + + $this->addAuthorizationHeader($headers, $host, $requestUrl); + $this->addProxyAuthorizationHeader($headers, $requestUrl); + $this->calculateRequestLength($headers); + if ('1.1' == $this->request->getConfig('protocol_version')) { + $this->updateExpectHeader($headers); + } else { + $this->expect100Continue = false; + } + + $headersStr = $this->request->getMethod() . ' ' . $requestUrl . ' HTTP/' . + $this->request->getConfig('protocol_version') . "\r\n"; + foreach ($headers as $name => $value) { + $canonicalName = implode('-', array_map('ucfirst', explode('-', $name))); + $headersStr .= $canonicalName . ': ' . $value . "\r\n"; + } + return $headersStr . "\r\n"; + } + + /** + * Adds or removes 'Expect: 100-continue' header from request headers + * + * Also sets the $expect100Continue property. Parsing of existing header + * is somewhat needed due to its complex structure and due to the + * requirement in section 8.2.3 of RFC 2616: + * > A client MUST NOT send an Expect request-header field (section + * > 14.20) with the "100-continue" expectation if it does not intend + * > to send a request body. + * + * @param array &$headers Array of headers prepared for the request + * + * @throws HTTP_Request2_LogicException + * @link http://pear.php.net/bugs/bug.php?id=19233 + * @link http://tools.ietf.org/html/rfc2616#section-8.2.3 + */ + protected function updateExpectHeader(&$headers) + { + $this->expect100Continue = false; + $expectations = array(); + if (isset($headers['expect'])) { + if ('' === $headers['expect']) { + // empty 'Expect' header is technically invalid, so just get rid of it + unset($headers['expect']); + return; + } + // build regexp to parse the value of existing Expect header + $expectParam = ';\s*' . self::REGEXP_TOKEN . '(?:\s*=\s*(?:' + . self::REGEXP_TOKEN . '|' + . self::REGEXP_QUOTED_STRING . '))?\s*'; + $expectExtension = self::REGEXP_TOKEN . '(?:\s*=\s*(?:' + . self::REGEXP_TOKEN . '|' + . self::REGEXP_QUOTED_STRING . ')\s*(?:' + . $expectParam . ')*)?'; + $expectItem = '!(100-continue|' . $expectExtension . ')!A'; + + $pos = 0; + $length = strlen($headers['expect']); + + while ($pos < $length) { + $pos += strspn($headers['expect'], " \t", $pos); + if (',' === substr($headers['expect'], $pos, 1)) { + $pos++; + continue; + + } elseif (!preg_match($expectItem, $headers['expect'], $m, 0, $pos)) { + throw new HTTP_Request2_LogicException( + "Cannot parse value '{$headers['expect']}' of Expect header", + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + + } else { + $pos += strlen($m[0]); + if (strcasecmp('100-continue', $m[0])) { + $expectations[] = $m[0]; + } + } + } + } + + if (1024 < $this->contentLength) { + $expectations[] = '100-continue'; + $this->expect100Continue = true; + } + + if (empty($expectations)) { + unset($headers['expect']); + } else { + $headers['expect'] = implode(',', $expectations); + } + } + + /** + * Sends the request body + * + * @throws HTTP_Request2_MessageException + */ + protected function writeBody() + { + if (in_array($this->request->getMethod(), self::$bodyDisallowed) + || 0 == $this->contentLength + ) { + return; + } + + $position = 0; + $bufferSize = $this->request->getConfig('buffer_size'); + $headers = $this->request->getHeaders(); + $chunked = isset($headers['transfer-encoding']); + while ($position < $this->contentLength) { + if (is_string($this->requestBody)) { + $str = substr($this->requestBody, $position, $bufferSize); + } elseif (is_resource($this->requestBody)) { + $str = fread($this->requestBody, $bufferSize); + } else { + $str = $this->requestBody->read($bufferSize); + } + if (!$chunked) { + $this->socket->write($str); + } else { + $this->socket->write(dechex(strlen($str)) . "\r\n{$str}\r\n"); + } + // Provide the length of written string to the observer, request #7630 + $this->request->setLastEvent('sentBodyPart', strlen($str)); + $position += strlen($str); + } + + // write zero-length chunk + if ($chunked) { + $this->socket->write("0\r\n\r\n"); + } + $this->request->setLastEvent('sentBody', $this->contentLength); + } + + /** + * Reads the remote server's response + * + * @return HTTP_Request2_Response + * @throws HTTP_Request2_Exception + */ + protected function readResponse() + { + $bufferSize = $this->request->getConfig('buffer_size'); + // http://tools.ietf.org/html/rfc2616#section-8.2.3 + // ...the client SHOULD NOT wait for an indefinite period before sending the request body + $timeout = $this->expect100Continue ? 1 : null; + + do { + try { + $response = new HTTP_Request2_Response( + $this->socket->readLine($bufferSize, $timeout), true, $this->request->getUrl() + ); + do { + $headerLine = $this->socket->readLine($bufferSize); + $response->parseHeaderLine($headerLine); + } while ('' != $headerLine); + + } catch (HTTP_Request2_MessageException $e) { + if (HTTP_Request2_Exception::TIMEOUT === $e->getCode() + && $this->expect100Continue + ) { + return null; + } + throw $e; + } + if ($this->expect100Continue && 100 == $response->getStatus()) { + return $response; + } + } while (in_array($response->getStatus(), array(100, 101))); + + $this->request->setLastEvent('receivedHeaders', $response); + + // No body possible in such responses + if (HTTP_Request2::METHOD_HEAD == $this->request->getMethod() + || (HTTP_Request2::METHOD_CONNECT == $this->request->getMethod() + && 200 <= $response->getStatus() && 300 > $response->getStatus()) + || in_array($response->getStatus(), array(204, 304)) + ) { + return $response; + } + + $chunked = 'chunked' == $response->getHeader('transfer-encoding'); + $length = $response->getHeader('content-length'); + $hasBody = false; + // RFC 2616, section 4.4: + // 3. ... If a message is received with both a + // Transfer-Encoding header field and a Content-Length header field, + // the latter MUST be ignored. + $toRead = ($chunked || null === $length)? null: $length; + $this->chunkLength = 0; + + if ($chunked || null === $length || 0 < intval($length)) { + while (!$this->socket->eof() && (is_null($toRead) || 0 < $toRead)) { + if ($chunked) { + $data = $this->readChunked($bufferSize); + } elseif (is_null($toRead)) { + $data = $this->socket->read($bufferSize); + } else { + $data = $this->socket->read(min($toRead, $bufferSize)); + $toRead -= strlen($data); + } + if ('' == $data && (!$this->chunkLength || $this->socket->eof())) { + break; + } + + $hasBody = true; + if ($this->request->getConfig('store_body')) { + $response->appendBody($data); + } + if (!in_array($response->getHeader('content-encoding'), array('identity', null))) { + $this->request->setLastEvent('receivedEncodedBodyPart', $data); + } else { + $this->request->setLastEvent('receivedBodyPart', $data); + } + } + } + if (0 !== $this->chunkLength || null !== $toRead && $toRead > 0) { + $this->request->setLastEvent( + 'warning', 'transfer closed with outstanding read data remaining' + ); + } + + if ($hasBody) { + $this->request->setLastEvent('receivedBody', $response); + } + return $response; + } + + /** + * Reads a part of response body encoded with chunked Transfer-Encoding + * + * @param int $bufferSize buffer size to use for reading + * + * @return string + * @throws HTTP_Request2_MessageException + */ + protected function readChunked($bufferSize) + { + // at start of the next chunk? + if (0 == $this->chunkLength) { + $line = $this->socket->readLine($bufferSize); + if ('' === $line && $this->socket->eof()) { + $this->chunkLength = -1; // indicate missing chunk + return ''; + + } elseif (!preg_match('/^([0-9a-f]+)/i', $line, $matches)) { + throw new HTTP_Request2_MessageException( + "Cannot decode chunked response, invalid chunk length '{$line}'", + HTTP_Request2_Exception::DECODE_ERROR + ); + + } else { + $this->chunkLength = hexdec($matches[1]); + // Chunk with zero length indicates the end + if (0 == $this->chunkLength) { + $this->socket->readLine($bufferSize); + return ''; + } + } + } + $data = $this->socket->read(min($this->chunkLength, $bufferSize)); + $this->chunkLength -= strlen($data); + if (0 == $this->chunkLength) { + $this->socket->readLine($bufferSize); // Trailing CRLF + } + return $data; + } +} + ?> \ No newline at end of file diff --git a/bundled-libs/HTTP/Request2/CookieJar.php b/bundled-libs/HTTP/Request2/CookieJar.php index ed6352eb..f191e255 100644 --- a/bundled-libs/HTTP/Request2/CookieJar.php +++ b/bundled-libs/HTTP/Request2/CookieJar.php @@ -1,494 +1,547 @@ -<?php -/** - * Stores cookies and passes them between HTTP requests - * - * PHP version 5 - * - * LICENSE - * - * This source file is subject to BSD 3-Clause License that is bundled - * with this package in the file LICENSE and available at the URL - * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @copyright 2008-2014 Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** Class representing a HTTP request message */ -require_once 'HTTP/Request2.php'; - -/** - * Stores cookies and passes them between HTTP requests - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: @package_version@ - * @link http://pear.php.net/package/HTTP_Request2 - */ -class HTTP_Request2_CookieJar implements Serializable -{ - /** - * Array of stored cookies - * - * The array is indexed by domain, path and cookie name - * .example.com - * / - * some_cookie => cookie data - * /subdir - * other_cookie => cookie data - * .example.org - * ... - * - * @var array - */ - protected $cookies = array(); - - /** - * Whether session cookies should be serialized when serializing the jar - * @var bool - */ - protected $serializeSession = false; - - /** - * Whether Public Suffix List should be used for domain matching - * @var bool - */ - protected $useList = true; - - /** - * Array with Public Suffix List data - * @var array - * @link http://publicsuffix.org/ - */ - protected static $psl = array(); - - /** - * Class constructor, sets various options - * - * @param bool $serializeSessionCookies Controls serializing session cookies, - * see {@link serializeSessionCookies()} - * @param bool $usePublicSuffixList Controls using Public Suffix List, - * see {@link usePublicSuffixList()} - */ - public function __construct( - $serializeSessionCookies = false, $usePublicSuffixList = true - ) { - $this->serializeSessionCookies($serializeSessionCookies); - $this->usePublicSuffixList($usePublicSuffixList); - } - - /** - * Returns current time formatted in ISO-8601 at UTC timezone - * - * @return string - */ - protected function now() - { - $dt = new DateTime(); - $dt->setTimezone(new DateTimeZone('UTC')); - return $dt->format(DateTime::ISO8601); - } - - /** - * Checks cookie array for correctness, possibly updating its 'domain', 'path' and 'expires' fields - * - * The checks are as follows: - * - cookie array should contain 'name' and 'value' fields; - * - name and value should not contain disallowed symbols; - * - 'expires' should be either empty parseable by DateTime; - * - 'domain' and 'path' should be either not empty or an URL where - * cookie was set should be provided. - * - if $setter is provided, then document at that URL should be allowed - * to set a cookie for that 'domain'. If $setter is not provided, - * then no domain checks will be made. - * - * 'expires' field will be converted to ISO8601 format from COOKIE format, - * 'domain' and 'path' will be set from setter URL if empty. - * - * @param array $cookie cookie data, as returned by - * {@link HTTP_Request2_Response::getCookies()} - * @param Net_URL2 $setter URL of the document that sent Set-Cookie header - * - * @return array Updated cookie array - * @throws HTTP_Request2_LogicException - * @throws HTTP_Request2_MessageException - */ - protected function checkAndUpdateFields(array $cookie, Net_URL2 $setter = null) - { - if ($missing = array_diff(array('name', 'value'), array_keys($cookie))) { - throw new HTTP_Request2_LogicException( - "Cookie array should contain 'name' and 'value' fields", - HTTP_Request2_Exception::MISSING_VALUE - ); - } - if (preg_match(HTTP_Request2::REGEXP_INVALID_COOKIE, $cookie['name'])) { - throw new HTTP_Request2_LogicException( - "Invalid cookie name: '{$cookie['name']}'", - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - if (preg_match(HTTP_Request2::REGEXP_INVALID_COOKIE, $cookie['value'])) { - throw new HTTP_Request2_LogicException( - "Invalid cookie value: '{$cookie['value']}'", - HTTP_Request2_Exception::INVALID_ARGUMENT - ); - } - $cookie += array('domain' => '', 'path' => '', 'expires' => null, 'secure' => false); - - // Need ISO-8601 date @ UTC timezone - if (!empty($cookie['expires']) - && !preg_match('/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\+0000$/', $cookie['expires']) - ) { - try { - $dt = new DateTime($cookie['expires']); - $dt->setTimezone(new DateTimeZone('UTC')); - $cookie['expires'] = $dt->format(DateTime::ISO8601); - } catch (Exception $e) { - throw new HTTP_Request2_LogicException($e->getMessage()); - } - } - - if (empty($cookie['domain']) || empty($cookie['path'])) { - if (!$setter) { - throw new HTTP_Request2_LogicException( - 'Cookie misses domain and/or path component, cookie setter URL needed', - HTTP_Request2_Exception::MISSING_VALUE - ); - } - if (empty($cookie['domain'])) { - if ($host = $setter->getHost()) { - $cookie['domain'] = $host; - } else { - throw new HTTP_Request2_LogicException( - 'Setter URL does not contain host part, can\'t set cookie domain', - HTTP_Request2_Exception::MISSING_VALUE - ); - } - } - if (empty($cookie['path'])) { - $path = $setter->getPath(); - $cookie['path'] = empty($path)? '/': substr($path, 0, strrpos($path, '/') + 1); - } - } - - if ($setter && !$this->domainMatch($setter->getHost(), $cookie['domain'])) { - throw new HTTP_Request2_MessageException( - "Domain " . $setter->getHost() . " cannot set cookies for " - . $cookie['domain'] - ); - } - - return $cookie; - } - - /** - * Stores a cookie in the jar - * - * @param array $cookie cookie data, as returned by - * {@link HTTP_Request2_Response::getCookies()} - * @param Net_URL2 $setter URL of the document that sent Set-Cookie header - * - * @throws HTTP_Request2_Exception - */ - public function store(array $cookie, Net_URL2 $setter = null) - { - $cookie = $this->checkAndUpdateFields($cookie, $setter); - - if (strlen($cookie['value']) - && (is_null($cookie['expires']) || $cookie['expires'] > $this->now()) - ) { - if (!isset($this->cookies[$cookie['domain']])) { - $this->cookies[$cookie['domain']] = array(); - } - if (!isset($this->cookies[$cookie['domain']][$cookie['path']])) { - $this->cookies[$cookie['domain']][$cookie['path']] = array(); - } - $this->cookies[$cookie['domain']][$cookie['path']][$cookie['name']] = $cookie; - - } elseif (isset($this->cookies[$cookie['domain']][$cookie['path']][$cookie['name']])) { - unset($this->cookies[$cookie['domain']][$cookie['path']][$cookie['name']]); - } - } - - /** - * Adds cookies set in HTTP response to the jar - * - * @param HTTP_Request2_Response $response HTTP response message - * @param Net_URL2 $setter original request URL, needed for - * setting default domain/path - */ - public function addCookiesFromResponse(HTTP_Request2_Response $response, Net_URL2 $setter) - { - foreach ($response->getCookies() as $cookie) { - $this->store($cookie, $setter); - } - } - - /** - * Returns all cookies matching a given request URL - * - * The following checks are made: - * - cookie domain should match request host - * - cookie path should be a prefix for request path - * - 'secure' cookies will only be sent for HTTPS requests - * - * @param Net_URL2 $url Request url - * @param bool $asString Whether to return cookies as string for "Cookie: " header - * - * @return array|string Matching cookies - */ - public function getMatching(Net_URL2 $url, $asString = false) - { - $host = $url->getHost(); - $path = $url->getPath(); - $secure = 0 == strcasecmp($url->getScheme(), 'https'); - - $matched = $ret = array(); - foreach (array_keys($this->cookies) as $domain) { - if ($this->domainMatch($host, $domain)) { - foreach (array_keys($this->cookies[$domain]) as $cPath) { - if (0 === strpos($path, $cPath)) { - foreach ($this->cookies[$domain][$cPath] as $name => $cookie) { - if (!$cookie['secure'] || $secure) { - $matched[$name][strlen($cookie['path'])] = $cookie; - } - } - } - } - } - } - foreach ($matched as $cookies) { - krsort($cookies); - $ret = array_merge($ret, $cookies); - } - if (!$asString) { - return $ret; - } else { - $str = ''; - foreach ($ret as $c) { - $str .= (empty($str)? '': '; ') . $c['name'] . '=' . $c['value']; - } - return $str; - } - } - - /** - * Returns all cookies stored in a jar - * - * @return array - */ - public function getAll() - { - $cookies = array(); - foreach (array_keys($this->cookies) as $domain) { - foreach (array_keys($this->cookies[$domain]) as $path) { - foreach ($this->cookies[$domain][$path] as $name => $cookie) { - $cookies[] = $cookie; - } - } - } - return $cookies; - } - - /** - * Sets whether session cookies should be serialized when serializing the jar - * - * @param boolean $serialize serialize? - */ - public function serializeSessionCookies($serialize) - { - $this->serializeSession = (bool)$serialize; - } - - /** - * Sets whether Public Suffix List should be used for restricting cookie-setting - * - * Without PSL {@link domainMatch()} will only prevent setting cookies for - * top-level domains like '.com' or '.org'. However, it will not prevent - * setting a cookie for '.co.uk' even though only third-level registrations - * are possible in .uk domain. - * - * With the List it is possible to find the highest level at which a domain - * may be registered for a particular top-level domain and consequently - * prevent cookies set for '.co.uk' or '.msk.ru'. The same list is used by - * Firefox, Chrome and Opera browsers to restrict cookie setting. - * - * Note that PSL is licensed differently to HTTP_Request2 package (refer to - * the license information in public-suffix-list.php), so you can disable - * its use if this is an issue for you. - * - * @param boolean $useList use the list? - * - * @link http://publicsuffix.org/learn/ - */ - public function usePublicSuffixList($useList) - { - $this->useList = (bool)$useList; - } - - /** - * Returns string representation of object - * - * @return string - * - * @see Serializable::serialize() - */ - public function serialize() - { - $cookies = $this->getAll(); - if (!$this->serializeSession) { - for ($i = count($cookies) - 1; $i >= 0; $i--) { - if (empty($cookies[$i]['expires'])) { - unset($cookies[$i]); - } - } - } - return serialize(array( - 'cookies' => $cookies, - 'serializeSession' => $this->serializeSession, - 'useList' => $this->useList - )); - } - - /** - * Constructs the object from serialized string - * - * @param string $serialized string representation - * - * @see Serializable::unserialize() - */ - public function unserialize($serialized) - { - $data = unserialize($serialized); - $now = $this->now(); - $this->serializeSessionCookies($data['serializeSession']); - $this->usePublicSuffixList($data['useList']); - foreach ($data['cookies'] as $cookie) { - if (!empty($cookie['expires']) && $cookie['expires'] <= $now) { - continue; - } - if (!isset($this->cookies[$cookie['domain']])) { - $this->cookies[$cookie['domain']] = array(); - } - if (!isset($this->cookies[$cookie['domain']][$cookie['path']])) { - $this->cookies[$cookie['domain']][$cookie['path']] = array(); - } - $this->cookies[$cookie['domain']][$cookie['path']][$cookie['name']] = $cookie; - } - } - - /** - * Checks whether a cookie domain matches a request host. - * - * The method is used by {@link store()} to check for whether a document - * at given URL can set a cookie with a given domain attribute and by - * {@link getMatching()} to find cookies matching the request URL. - * - * @param string $requestHost request host - * @param string $cookieDomain cookie domain - * - * @return bool match success - */ - public function domainMatch($requestHost, $cookieDomain) - { - if ($requestHost == $cookieDomain) { - return true; - } - // IP address, we require exact match - if (preg_match('/^(?:\d{1,3}\.){3}\d{1,3}$/', $requestHost)) { - return false; - } - if ('.' != $cookieDomain[0]) { - $cookieDomain = '.' . $cookieDomain; - } - // prevents setting cookies for '.com' and similar domains - if (!$this->useList && substr_count($cookieDomain, '.') < 2 - || $this->useList && !self::getRegisteredDomain($cookieDomain) - ) { - return false; - } - return substr('.' . $requestHost, -strlen($cookieDomain)) == $cookieDomain; - } - - /** - * Removes subdomains to get the registered domain (the first after top-level) - * - * The method will check Public Suffix List to find out where top-level - * domain ends and registered domain starts. It will remove domain parts - * to the left of registered one. - * - * @param string $domain domain name - * - * @return string|bool registered domain, will return false if $domain is - * either invalid or a TLD itself - */ - public static function getRegisteredDomain($domain) - { - $domainParts = explode('.', ltrim($domain, '.')); - - // load the list if needed - if (empty(self::$psl)) { - $path = '@data_dir@' . DIRECTORY_SEPARATOR . 'HTTP_Request2'; - if (0 === strpos($path, '@' . 'data_dir@')) { - $path = realpath( - dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' - . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'data' - ); - } - self::$psl = include_once $path . DIRECTORY_SEPARATOR . 'public-suffix-list.php'; - } - - if (!($result = self::checkDomainsList($domainParts, self::$psl))) { - // known TLD, invalid domain name - return false; - } - - // unknown TLD - if (!strpos($result, '.')) { - // fallback to checking that domain "has at least two dots" - if (2 > ($count = count($domainParts))) { - return false; - } - return $domainParts[$count - 2] . '.' . $domainParts[$count - 1]; - } - return $result; - } - - /** - * Recursive helper method for {@link getRegisteredDomain()} - * - * @param array $domainParts remaining domain parts - * @param mixed $listNode node in {@link HTTP_Request2_CookieJar::$psl} to check - * - * @return string|null concatenated domain parts, null in case of error - */ - protected static function checkDomainsList(array $domainParts, $listNode) - { - $sub = array_pop($domainParts); - $result = null; - - if (!is_array($listNode) || is_null($sub) - || array_key_exists('!' . $sub, $listNode) - ) { - return $sub; - - } elseif (array_key_exists($sub, $listNode)) { - $result = self::checkDomainsList($domainParts, $listNode[$sub]); - - } elseif (array_key_exists('*', $listNode)) { - $result = self::checkDomainsList($domainParts, $listNode['*']); - - } else { - return $sub; - } - - return (strlen($result) > 0) ? ($result . '.' . $sub) : null; - } -} +<?php +/** + * Stores cookies and passes them between HTTP requests + * + * PHP version 5 + * + * LICENSE + * + * This source file is subject to BSD 3-Clause License that is bundled + * with this package in the file LICENSE and available at the URL + * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @copyright 2008-2016 Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** Class representing a HTTP request message */ +require_once 'HTTP/Request2.php'; + +/** + * Stores cookies and passes them between HTTP requests + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: @package_version@ + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_CookieJar implements Serializable +{ + /** + * Array of stored cookies + * + * The array is indexed by domain, path and cookie name + * .example.com + * / + * some_cookie => cookie data + * /subdir + * other_cookie => cookie data + * .example.org + * ... + * + * @var array + */ + protected $cookies = array(); + + /** + * Whether session cookies should be serialized when serializing the jar + * @var bool + */ + protected $serializeSession = false; + + /** + * Whether Public Suffix List should be used for domain matching + * @var bool + */ + protected $useList = true; + + /** + * Whether an attempt to store an invalid cookie should be ignored, rather than cause an Exception + * @var bool + */ + protected $ignoreInvalid = false; + + /** + * Array with Public Suffix List data + * @var array + * @link http://publicsuffix.org/ + */ + protected static $psl = array(); + + /** + * Class constructor, sets various options + * + * @param bool $serializeSessionCookies Controls serializing session cookies, + * see {@link serializeSessionCookies()} + * @param bool $usePublicSuffixList Controls using Public Suffix List, + * see {@link usePublicSuffixList()} + * @param bool $ignoreInvalidCookies Whether invalid cookies should be ignored, + * see {@link ignoreInvalidCookies()} + */ + public function __construct( + $serializeSessionCookies = false, $usePublicSuffixList = true, + $ignoreInvalidCookies = false + ) { + $this->serializeSessionCookies($serializeSessionCookies); + $this->usePublicSuffixList($usePublicSuffixList); + $this->ignoreInvalidCookies($ignoreInvalidCookies); + } + + /** + * Returns current time formatted in ISO-8601 at UTC timezone + * + * @return string + */ + protected function now() + { + $dt = new DateTime(); + $dt->setTimezone(new DateTimeZone('UTC')); + return $dt->format(DateTime::ISO8601); + } + + /** + * Checks cookie array for correctness, possibly updating its 'domain', 'path' and 'expires' fields + * + * The checks are as follows: + * - cookie array should contain 'name' and 'value' fields; + * - name and value should not contain disallowed symbols; + * - 'expires' should be either empty parseable by DateTime; + * - 'domain' and 'path' should be either not empty or an URL where + * cookie was set should be provided. + * - if $setter is provided, then document at that URL should be allowed + * to set a cookie for that 'domain'. If $setter is not provided, + * then no domain checks will be made. + * + * 'expires' field will be converted to ISO8601 format from COOKIE format, + * 'domain' and 'path' will be set from setter URL if empty. + * + * @param array $cookie cookie data, as returned by + * {@link HTTP_Request2_Response::getCookies()} + * @param Net_URL2 $setter URL of the document that sent Set-Cookie header + * + * @return array Updated cookie array + * @throws HTTP_Request2_LogicException + * @throws HTTP_Request2_MessageException + */ + protected function checkAndUpdateFields(array $cookie, Net_URL2 $setter = null) + { + if ($missing = array_diff(array('name', 'value'), array_keys($cookie))) { + throw new HTTP_Request2_LogicException( + "Cookie array should contain 'name' and 'value' fields", + HTTP_Request2_Exception::MISSING_VALUE + ); + } + if (preg_match(HTTP_Request2::REGEXP_INVALID_COOKIE, $cookie['name'])) { + throw new HTTP_Request2_LogicException( + "Invalid cookie name: '{$cookie['name']}'", + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + if (preg_match(HTTP_Request2::REGEXP_INVALID_COOKIE, $cookie['value'])) { + throw new HTTP_Request2_LogicException( + "Invalid cookie value: '{$cookie['value']}'", + HTTP_Request2_Exception::INVALID_ARGUMENT + ); + } + $cookie += array('domain' => '', 'path' => '', 'expires' => null, 'secure' => false); + + // Need ISO-8601 date @ UTC timezone + if (!empty($cookie['expires']) + && !preg_match('/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\+0000$/', $cookie['expires']) + ) { + try { + $dt = new DateTime($cookie['expires']); + $dt->setTimezone(new DateTimeZone('UTC')); + $cookie['expires'] = $dt->format(DateTime::ISO8601); + } catch (Exception $e) { + throw new HTTP_Request2_LogicException($e->getMessage()); + } + } + + if (empty($cookie['domain']) || empty($cookie['path'])) { + if (!$setter) { + throw new HTTP_Request2_LogicException( + 'Cookie misses domain and/or path component, cookie setter URL needed', + HTTP_Request2_Exception::MISSING_VALUE + ); + } + if (empty($cookie['domain'])) { + if ($host = $setter->getHost()) { + $cookie['domain'] = $host; + } else { + throw new HTTP_Request2_LogicException( + 'Setter URL does not contain host part, can\'t set cookie domain', + HTTP_Request2_Exception::MISSING_VALUE + ); + } + } + if (empty($cookie['path'])) { + $path = $setter->getPath(); + $cookie['path'] = empty($path)? '/': substr($path, 0, strrpos($path, '/') + 1); + } + } + + if ($setter && !$this->domainMatch($setter->getHost(), $cookie['domain'])) { + throw new HTTP_Request2_MessageException( + "Domain " . $setter->getHost() . " cannot set cookies for " + . $cookie['domain'] + ); + } + + return $cookie; + } + + /** + * Stores a cookie in the jar + * + * @param array $cookie cookie data, as returned by + * {@link HTTP_Request2_Response::getCookies()} + * @param Net_URL2 $setter URL of the document that sent Set-Cookie header + * + * @return bool whether the cookie was successfully stored + * @throws HTTP_Request2_Exception + */ + public function store(array $cookie, Net_URL2 $setter = null) + { + try { + $cookie = $this->checkAndUpdateFields($cookie, $setter); + } catch (HTTP_Request2_Exception $e) { + if ($this->ignoreInvalid) { + return false; + } else { + throw $e; + } + } + + if (strlen($cookie['value']) + && (is_null($cookie['expires']) || $cookie['expires'] > $this->now()) + ) { + if (!isset($this->cookies[$cookie['domain']])) { + $this->cookies[$cookie['domain']] = array(); + } + if (!isset($this->cookies[$cookie['domain']][$cookie['path']])) { + $this->cookies[$cookie['domain']][$cookie['path']] = array(); + } + $this->cookies[$cookie['domain']][$cookie['path']][$cookie['name']] = $cookie; + + } elseif (isset($this->cookies[$cookie['domain']][$cookie['path']][$cookie['name']])) { + unset($this->cookies[$cookie['domain']][$cookie['path']][$cookie['name']]); + } + + return true; + } + + /** + * Adds cookies set in HTTP response to the jar + * + * @param HTTP_Request2_Response $response HTTP response message + * @param Net_URL2 $setter original request URL, needed for + * setting default domain/path. If not given, + * effective URL from response will be used. + * + * @return bool whether all cookies were successfully stored + * @throws HTTP_Request2_LogicException + */ + public function addCookiesFromResponse(HTTP_Request2_Response $response, Net_URL2 $setter = null) + { + if (null === $setter) { + if (!($effectiveUrl = $response->getEffectiveUrl())) { + throw new HTTP_Request2_LogicException( + 'Response URL required for adding cookies from response', + HTTP_Request2_Exception::MISSING_VALUE + ); + } + $setter = new Net_URL2($effectiveUrl); + } + + $success = true; + foreach ($response->getCookies() as $cookie) { + $success = $this->store($cookie, $setter) && $success; + } + return $success; + } + + /** + * Returns all cookies matching a given request URL + * + * The following checks are made: + * - cookie domain should match request host + * - cookie path should be a prefix for request path + * - 'secure' cookies will only be sent for HTTPS requests + * + * @param Net_URL2 $url Request url + * @param bool $asString Whether to return cookies as string for "Cookie: " header + * + * @return array|string Matching cookies + */ + public function getMatching(Net_URL2 $url, $asString = false) + { + $host = $url->getHost(); + $path = $url->getPath(); + $secure = 0 == strcasecmp($url->getScheme(), 'https'); + + $matched = $ret = array(); + foreach (array_keys($this->cookies) as $domain) { + if ($this->domainMatch($host, $domain)) { + foreach (array_keys($this->cookies[$domain]) as $cPath) { + if (0 === strpos($path, $cPath)) { + foreach ($this->cookies[$domain][$cPath] as $name => $cookie) { + if (!$cookie['secure'] || $secure) { + $matched[$name][strlen($cookie['path'])] = $cookie; + } + } + } + } + } + } + foreach ($matched as $cookies) { + krsort($cookies); + $ret = array_merge($ret, $cookies); + } + if (!$asString) { + return $ret; + } else { + $str = ''; + foreach ($ret as $c) { + $str .= (empty($str)? '': '; ') . $c['name'] . '=' . $c['value']; + } + return $str; + } + } + + /** + * Returns all cookies stored in a jar + * + * @return array + */ + public function getAll() + { + $cookies = array(); + foreach (array_keys($this->cookies) as $domain) { + foreach (array_keys($this->cookies[$domain]) as $path) { + foreach ($this->cookies[$domain][$path] as $name => $cookie) { + $cookies[] = $cookie; + } + } + } + return $cookies; + } + + /** + * Sets whether session cookies should be serialized when serializing the jar + * + * @param boolean $serialize serialize? + */ + public function serializeSessionCookies($serialize) + { + $this->serializeSession = (bool)$serialize; + } + + /** + * Sets whether invalid cookies should be silently ignored or cause an Exception + * + * @param boolean $ignore ignore? + * @link http://pear.php.net/bugs/bug.php?id=19937 + * @link http://pear.php.net/bugs/bug.php?id=20401 + */ + public function ignoreInvalidCookies($ignore) + { + $this->ignoreInvalid = (bool)$ignore; + } + + /** + * Sets whether Public Suffix List should be used for restricting cookie-setting + * + * Without PSL {@link domainMatch()} will only prevent setting cookies for + * top-level domains like '.com' or '.org'. However, it will not prevent + * setting a cookie for '.co.uk' even though only third-level registrations + * are possible in .uk domain. + * + * With the List it is possible to find the highest level at which a domain + * may be registered for a particular top-level domain and consequently + * prevent cookies set for '.co.uk' or '.msk.ru'. The same list is used by + * Firefox, Chrome and Opera browsers to restrict cookie setting. + * + * Note that PSL is licensed differently to HTTP_Request2 package (refer to + * the license information in public-suffix-list.php), so you can disable + * its use if this is an issue for you. + * + * @param boolean $useList use the list? + * + * @link http://publicsuffix.org/learn/ + */ + public function usePublicSuffixList($useList) + { + $this->useList = (bool)$useList; + } + + /** + * Returns string representation of object + * + * @return string + * + * @see Serializable::serialize() + */ + public function serialize() + { + $cookies = $this->getAll(); + if (!$this->serializeSession) { + for ($i = count($cookies) - 1; $i >= 0; $i--) { + if (empty($cookies[$i]['expires'])) { + unset($cookies[$i]); + } + } + } + return serialize(array( + 'cookies' => $cookies, + 'serializeSession' => $this->serializeSession, + 'useList' => $this->useList, + 'ignoreInvalid' => $this->ignoreInvalid + )); + } + + /** + * Constructs the object from serialized string + * + * @param string $serialized string representation + * + * @see Serializable::unserialize() + */ + public function unserialize($serialized) + { + $data = unserialize($serialized); + $now = $this->now(); + $this->serializeSessionCookies($data['serializeSession']); + $this->usePublicSuffixList($data['useList']); + if (array_key_exists('ignoreInvalid', $data)) { + $this->ignoreInvalidCookies($data['ignoreInvalid']); + } + foreach ($data['cookies'] as $cookie) { + if (!empty($cookie['expires']) && $cookie['expires'] <= $now) { + continue; + } + if (!isset($this->cookies[$cookie['domain']])) { + $this->cookies[$cookie['domain']] = array(); + } + if (!isset($this->cookies[$cookie['domain']][$cookie['path']])) { + $this->cookies[$cookie['domain']][$cookie['path']] = array(); + } + $this->cookies[$cookie['domain']][$cookie['path']][$cookie['name']] = $cookie; + } + } + + /** + * Checks whether a cookie domain matches a request host. + * + * The method is used by {@link store()} to check for whether a document + * at given URL can set a cookie with a given domain attribute and by + * {@link getMatching()} to find cookies matching the request URL. + * + * @param string $requestHost request host + * @param string $cookieDomain cookie domain + * + * @return bool match success + */ + public function domainMatch($requestHost, $cookieDomain) + { + if ($requestHost == $cookieDomain) { + return true; + } + // IP address, we require exact match + if (preg_match('/^(?:\d{1,3}\.){3}\d{1,3}$/', $requestHost)) { + return false; + } + if ('.' != $cookieDomain[0]) { + $cookieDomain = '.' . $cookieDomain; + } + // prevents setting cookies for '.com' and similar domains + if (!$this->useList && substr_count($cookieDomain, '.') < 2 + || $this->useList && !self::getRegisteredDomain($cookieDomain) + ) { + return false; + } + return substr('.' . $requestHost, -strlen($cookieDomain)) == $cookieDomain; + } + + /** + * Removes subdomains to get the registered domain (the first after top-level) + * + * The method will check Public Suffix List to find out where top-level + * domain ends and registered domain starts. It will remove domain parts + * to the left of registered one. + * + * @param string $domain domain name + * + * @return string|bool registered domain, will return false if $domain is + * either invalid or a TLD itself + */ + public static function getRegisteredDomain($domain) + { + $domainParts = explode('.', ltrim($domain, '.')); + + // load the list if needed + if (empty(self::$psl)) { + $path = '@data_dir@' . DIRECTORY_SEPARATOR . 'HTTP_Request2'; + if (0 === strpos($path, '@' . 'data_dir@')) { + $path = realpath( + dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' + . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'data' + ); + } + self::$psl = include_once $path . DIRECTORY_SEPARATOR . 'public-suffix-list.php'; + } + + if (!($result = self::checkDomainsList($domainParts, self::$psl))) { + // known TLD, invalid domain name + return false; + } + + // unknown TLD + if (!strpos($result, '.')) { + // fallback to checking that domain "has at least two dots" + if (2 > ($count = count($domainParts))) { + return false; + } + return $domainParts[$count - 2] . '.' . $domainParts[$count - 1]; + } + return $result; + } + + /** + * Recursive helper method for {@link getRegisteredDomain()} + * + * @param array $domainParts remaining domain parts + * @param mixed $listNode node in {@link HTTP_Request2_CookieJar::$psl} to check + * + * @return string|null concatenated domain parts, null in case of error + */ + protected static function checkDomainsList(array $domainParts, $listNode) + { + $sub = array_pop($domainParts); + $result = null; + + if (!is_array($listNode) || is_null($sub) + || array_key_exists('!' . $sub, $listNode) + ) { + return $sub; + + } elseif (array_key_exists($sub, $listNode)) { + $result = self::checkDomainsList($domainParts, $listNode[$sub]); + + } elseif (array_key_exists('*', $listNode)) { + $result = self::checkDomainsList($domainParts, $listNode['*']); + + } else { + return $sub; + } + + return (strlen($result) > 0) ? ($result . '.' . $sub) : null; + } +} ?> \ No newline at end of file diff --git a/bundled-libs/HTTP/Request2/Exception.php b/bundled-libs/HTTP/Request2/Exception.php index 5fcd6917..de9432df 100644 --- a/bundled-libs/HTTP/Request2/Exception.php +++ b/bundled-libs/HTTP/Request2/Exception.php @@ -1,160 +1,160 @@ -<?php -/** - * Exception classes for HTTP_Request2 package - * - * PHP version 5 - * - * LICENSE - * - * This source file is subject to BSD 3-Clause License that is bundled - * with this package in the file LICENSE and available at the URL - * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @copyright 2008-2014 Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** - * Base class for exceptions in PEAR - */ -require_once 'PEAR/Exception.php'; - -/** - * Base exception class for HTTP_Request2 package - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=132 - */ -class HTTP_Request2_Exception extends PEAR_Exception -{ - /** An invalid argument was passed to a method */ - const INVALID_ARGUMENT = 1; - /** Some required value was not available */ - const MISSING_VALUE = 2; - /** Request cannot be processed due to errors in PHP configuration */ - const MISCONFIGURATION = 3; - /** Error reading the local file */ - const READ_ERROR = 4; - - /** Server returned a response that does not conform to HTTP protocol */ - const MALFORMED_RESPONSE = 10; - /** Failure decoding Content-Encoding or Transfer-Encoding of response */ - const DECODE_ERROR = 20; - /** Operation timed out */ - const TIMEOUT = 30; - /** Number of redirects exceeded 'max_redirects' configuration parameter */ - const TOO_MANY_REDIRECTS = 40; - /** Redirect to a protocol other than http(s):// */ - const NON_HTTP_REDIRECT = 50; - - /** - * Native error code - * @var int - */ - private $_nativeCode; - - /** - * Constructor, can set package error code and native error code - * - * @param string $message exception message - * @param int $code package error code, one of class constants - * @param int $nativeCode error code from underlying PHP extension - */ - public function __construct($message = null, $code = null, $nativeCode = null) - { - parent::__construct($message, $code); - $this->_nativeCode = $nativeCode; - } - - /** - * Returns error code produced by underlying PHP extension - * - * For Socket Adapter this may contain error number returned by - * stream_socket_client(), for Curl Adapter this will contain error number - * returned by curl_errno() - * - * @return integer - */ - public function getNativeCode() - { - return $this->_nativeCode; - } -} - -/** - * Exception thrown in case of missing features - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - */ -class HTTP_Request2_NotImplementedException extends HTTP_Request2_Exception -{ -} - -/** - * Exception that represents error in the program logic - * - * This exception usually implies a programmer's error, like passing invalid - * data to methods or trying to use PHP extensions that weren't installed or - * enabled. Usually exceptions of this kind will be thrown before request even - * starts. - * - * The exception will usually contain a package error code. - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - */ -class HTTP_Request2_LogicException extends HTTP_Request2_Exception -{ -} - -/** - * Exception thrown when connection to a web or proxy server fails - * - * The exception will not contain a package error code, but will contain - * native error code, as returned by stream_socket_client() or curl_errno(). - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - */ -class HTTP_Request2_ConnectionException extends HTTP_Request2_Exception -{ -} - -/** - * Exception thrown when sending or receiving HTTP message fails - * - * The exception may contain both package error code and native error code. - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - */ -class HTTP_Request2_MessageException extends HTTP_Request2_Exception -{ -} +<?php +/** + * Exception classes for HTTP_Request2 package + * + * PHP version 5 + * + * LICENSE + * + * This source file is subject to BSD 3-Clause License that is bundled + * with this package in the file LICENSE and available at the URL + * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @copyright 2008-2016 Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** + * Base class for exceptions in PEAR + */ +require_once 'PEAR/Exception.php'; + +/** + * Base exception class for HTTP_Request2 package + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=132 + */ +class HTTP_Request2_Exception extends PEAR_Exception +{ + /** An invalid argument was passed to a method */ + const INVALID_ARGUMENT = 1; + /** Some required value was not available */ + const MISSING_VALUE = 2; + /** Request cannot be processed due to errors in PHP configuration */ + const MISCONFIGURATION = 3; + /** Error reading the local file */ + const READ_ERROR = 4; + + /** Server returned a response that does not conform to HTTP protocol */ + const MALFORMED_RESPONSE = 10; + /** Failure decoding Content-Encoding or Transfer-Encoding of response */ + const DECODE_ERROR = 20; + /** Operation timed out */ + const TIMEOUT = 30; + /** Number of redirects exceeded 'max_redirects' configuration parameter */ + const TOO_MANY_REDIRECTS = 40; + /** Redirect to a protocol other than http(s):// */ + const NON_HTTP_REDIRECT = 50; + + /** + * Native error code + * @var int + */ + private $_nativeCode; + + /** + * Constructor, can set package error code and native error code + * + * @param string $message exception message + * @param int $code package error code, one of class constants + * @param int $nativeCode error code from underlying PHP extension + */ + public function __construct($message = null, $code = null, $nativeCode = null) + { + parent::__construct($message, $code); + $this->_nativeCode = $nativeCode; + } + + /** + * Returns error code produced by underlying PHP extension + * + * For Socket Adapter this may contain error number returned by + * stream_socket_client(), for Curl Adapter this will contain error number + * returned by curl_errno() + * + * @return integer + */ + public function getNativeCode() + { + return $this->_nativeCode; + } +} + +/** + * Exception thrown in case of missing features + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_NotImplementedException extends HTTP_Request2_Exception +{ +} + +/** + * Exception that represents error in the program logic + * + * This exception usually implies a programmer's error, like passing invalid + * data to methods or trying to use PHP extensions that weren't installed or + * enabled. Usually exceptions of this kind will be thrown before request even + * starts. + * + * The exception will usually contain a package error code. + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_LogicException extends HTTP_Request2_Exception +{ +} + +/** + * Exception thrown when connection to a web or proxy server fails + * + * The exception will not contain a package error code, but will contain + * native error code, as returned by stream_socket_client() or curl_errno(). + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_ConnectionException extends HTTP_Request2_Exception +{ +} + +/** + * Exception thrown when sending or receiving HTTP message fails + * + * The exception may contain both package error code and native error code. + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_MessageException extends HTTP_Request2_Exception +{ +} ?> \ No newline at end of file diff --git a/bundled-libs/HTTP/Request2/MultipartBody.php b/bundled-libs/HTTP/Request2/MultipartBody.php index 198f563b..e5a38459 100644 --- a/bundled-libs/HTTP/Request2/MultipartBody.php +++ b/bundled-libs/HTTP/Request2/MultipartBody.php @@ -1,268 +1,268 @@ -<?php -/** - * Helper class for building multipart/form-data request body - * - * PHP version 5 - * - * LICENSE - * - * This source file is subject to BSD 3-Clause License that is bundled - * with this package in the file LICENSE and available at the URL - * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @copyright 2008-2014 Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** Exception class for HTTP_Request2 package */ -require_once 'HTTP/Request2/Exception.php'; - -/** - * Class for building multipart/form-data request body - * - * The class helps to reduce memory consumption by streaming large file uploads - * from disk, it also allows monitoring of upload progress (see request #7630) - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - * @link http://tools.ietf.org/html/rfc1867 - */ -class HTTP_Request2_MultipartBody -{ - /** - * MIME boundary - * @var string - */ - private $_boundary; - - /** - * Form parameters added via {@link HTTP_Request2::addPostParameter()} - * @var array - */ - private $_params = array(); - - /** - * File uploads added via {@link HTTP_Request2::addUpload()} - * @var array - */ - private $_uploads = array(); - - /** - * Header for parts with parameters - * @var string - */ - private $_headerParam = "--%s\r\nContent-Disposition: form-data; name=\"%s\"\r\n\r\n"; - - /** - * Header for parts with uploads - * @var string - */ - private $_headerUpload = "--%s\r\nContent-Disposition: form-data; name=\"%s\"; filename=\"%s\"\r\nContent-Type: %s\r\n\r\n"; - - /** - * Current position in parameter and upload arrays - * - * First number is index of "current" part, second number is position within - * "current" part - * - * @var array - */ - private $_pos = array(0, 0); - - - /** - * Constructor. Sets the arrays with POST data. - * - * @param array $params values of form fields set via - * {@link HTTP_Request2::addPostParameter()} - * @param array $uploads file uploads set via - * {@link HTTP_Request2::addUpload()} - * @param bool $useBrackets whether to append brackets to array variable names - */ - public function __construct(array $params, array $uploads, $useBrackets = true) - { - $this->_params = self::_flattenArray('', $params, $useBrackets); - foreach ($uploads as $fieldName => $f) { - if (!is_array($f['fp'])) { - $this->_uploads[] = $f + array('name' => $fieldName); - } else { - for ($i = 0; $i < count($f['fp']); $i++) { - $upload = array( - 'name' => ($useBrackets? $fieldName . '[' . $i . ']': $fieldName) - ); - foreach (array('fp', 'filename', 'size', 'type') as $key) { - $upload[$key] = $f[$key][$i]; - } - $this->_uploads[] = $upload; - } - } - } - } - - /** - * Returns the length of the body to use in Content-Length header - * - * @return integer - */ - public function getLength() - { - $boundaryLength = strlen($this->getBoundary()); - $headerParamLength = strlen($this->_headerParam) - 4 + $boundaryLength; - $headerUploadLength = strlen($this->_headerUpload) - 8 + $boundaryLength; - $length = $boundaryLength + 6; - foreach ($this->_params as $p) { - $length += $headerParamLength + strlen($p[0]) + strlen($p[1]) + 2; - } - foreach ($this->_uploads as $u) { - $length += $headerUploadLength + strlen($u['name']) + strlen($u['type']) + - strlen($u['filename']) + $u['size'] + 2; - } - return $length; - } - - /** - * Returns the boundary to use in Content-Type header - * - * @return string - */ - public function getBoundary() - { - if (empty($this->_boundary)) { - $this->_boundary = '--' . md5('PEAR-HTTP_Request2-' . microtime()); - } - return $this->_boundary; - } - - /** - * Returns next chunk of request body - * - * @param integer $length Number of bytes to read - * - * @return string Up to $length bytes of data, empty string if at end - * @throws HTTP_Request2_LogicException - */ - public function read($length) - { - $ret = ''; - $boundary = $this->getBoundary(); - $paramCount = count($this->_params); - $uploadCount = count($this->_uploads); - while ($length > 0 && $this->_pos[0] <= $paramCount + $uploadCount) { - $oldLength = $length; - if ($this->_pos[0] < $paramCount) { - $param = sprintf( - $this->_headerParam, $boundary, $this->_params[$this->_pos[0]][0] - ) . $this->_params[$this->_pos[0]][1] . "\r\n"; - $ret .= substr($param, $this->_pos[1], $length); - $length -= min(strlen($param) - $this->_pos[1], $length); - - } elseif ($this->_pos[0] < $paramCount + $uploadCount) { - $pos = $this->_pos[0] - $paramCount; - $header = sprintf( - $this->_headerUpload, $boundary, $this->_uploads[$pos]['name'], - $this->_uploads[$pos]['filename'], $this->_uploads[$pos]['type'] - ); - if ($this->_pos[1] < strlen($header)) { - $ret .= substr($header, $this->_pos[1], $length); - $length -= min(strlen($header) - $this->_pos[1], $length); - } - $filePos = max(0, $this->_pos[1] - strlen($header)); - if ($filePos < $this->_uploads[$pos]['size']) { - while ($length > 0 && !feof($this->_uploads[$pos]['fp'])) { - if (false === ($chunk = fread($this->_uploads[$pos]['fp'], $length))) { - throw new HTTP_Request2_LogicException( - 'Failed reading file upload', HTTP_Request2_Exception::READ_ERROR - ); - } - $ret .= $chunk; - $length -= strlen($chunk); - } - } - if ($length > 0) { - $start = $this->_pos[1] + ($oldLength - $length) - - strlen($header) - $this->_uploads[$pos]['size']; - $ret .= substr("\r\n", $start, $length); - $length -= min(2 - $start, $length); - } - - } else { - $closing = '--' . $boundary . "--\r\n"; - $ret .= substr($closing, $this->_pos[1], $length); - $length -= min(strlen($closing) - $this->_pos[1], $length); - } - if ($length > 0) { - $this->_pos = array($this->_pos[0] + 1, 0); - } else { - $this->_pos[1] += $oldLength; - } - } - return $ret; - } - - /** - * Sets the current position to the start of the body - * - * This allows reusing the same body in another request - */ - public function rewind() - { - $this->_pos = array(0, 0); - foreach ($this->_uploads as $u) { - rewind($u['fp']); - } - } - - /** - * Returns the body as string - * - * Note that it reads all file uploads into memory so it is a good idea not - * to use this method with large file uploads and rely on read() instead. - * - * @return string - */ - public function __toString() - { - $this->rewind(); - return $this->read($this->getLength()); - } - - - /** - * Helper function to change the (probably multidimensional) associative array - * into the simple one. - * - * @param string $name name for item - * @param mixed $values item's values - * @param bool $useBrackets whether to append [] to array variables' names - * - * @return array array with the following items: array('item name', 'item value'); - */ - private static function _flattenArray($name, $values, $useBrackets) - { - if (!is_array($values)) { - return array(array($name, $values)); - } else { - $ret = array(); - foreach ($values as $k => $v) { - if (empty($name)) { - $newName = $k; - } elseif ($useBrackets) { - $newName = $name . '[' . $k . ']'; - } else { - $newName = $name; - } - $ret = array_merge($ret, self::_flattenArray($newName, $v, $useBrackets)); - } - return $ret; - } - } -} -?> +<?php +/** + * Helper class for building multipart/form-data request body + * + * PHP version 5 + * + * LICENSE + * + * This source file is subject to BSD 3-Clause License that is bundled + * with this package in the file LICENSE and available at the URL + * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @copyright 2008-2016 Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** Exception class for HTTP_Request2 package */ +require_once 'HTTP/Request2/Exception.php'; + +/** + * Class for building multipart/form-data request body + * + * The class helps to reduce memory consumption by streaming large file uploads + * from disk, it also allows monitoring of upload progress (see request #7630) + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + * @link http://tools.ietf.org/html/rfc1867 + */ +class HTTP_Request2_MultipartBody +{ + /** + * MIME boundary + * @var string + */ + private $_boundary; + + /** + * Form parameters added via {@link HTTP_Request2::addPostParameter()} + * @var array + */ + private $_params = array(); + + /** + * File uploads added via {@link HTTP_Request2::addUpload()} + * @var array + */ + private $_uploads = array(); + + /** + * Header for parts with parameters + * @var string + */ + private $_headerParam = "--%s\r\nContent-Disposition: form-data; name=\"%s\"\r\n\r\n"; + + /** + * Header for parts with uploads + * @var string + */ + private $_headerUpload = "--%s\r\nContent-Disposition: form-data; name=\"%s\"; filename=\"%s\"\r\nContent-Type: %s\r\n\r\n"; + + /** + * Current position in parameter and upload arrays + * + * First number is index of "current" part, second number is position within + * "current" part + * + * @var array + */ + private $_pos = array(0, 0); + + + /** + * Constructor. Sets the arrays with POST data. + * + * @param array $params values of form fields set via + * {@link HTTP_Request2::addPostParameter()} + * @param array $uploads file uploads set via + * {@link HTTP_Request2::addUpload()} + * @param bool $useBrackets whether to append brackets to array variable names + */ + public function __construct(array $params, array $uploads, $useBrackets = true) + { + $this->_params = self::_flattenArray('', $params, $useBrackets); + foreach ($uploads as $fieldName => $f) { + if (!is_array($f['fp'])) { + $this->_uploads[] = $f + array('name' => $fieldName); + } else { + for ($i = 0; $i < count($f['fp']); $i++) { + $upload = array( + 'name' => ($useBrackets? $fieldName . '[' . $i . ']': $fieldName) + ); + foreach (array('fp', 'filename', 'size', 'type') as $key) { + $upload[$key] = $f[$key][$i]; + } + $this->_uploads[] = $upload; + } + } + } + } + + /** + * Returns the length of the body to use in Content-Length header + * + * @return integer + */ + public function getLength() + { + $boundaryLength = strlen($this->getBoundary()); + $headerParamLength = strlen($this->_headerParam) - 4 + $boundaryLength; + $headerUploadLength = strlen($this->_headerUpload) - 8 + $boundaryLength; + $length = $boundaryLength + 6; + foreach ($this->_params as $p) { + $length += $headerParamLength + strlen($p[0]) + strlen($p[1]) + 2; + } + foreach ($this->_uploads as $u) { + $length += $headerUploadLength + strlen($u['name']) + strlen($u['type']) + + strlen($u['filename']) + $u['size'] + 2; + } + return $length; + } + + /** + * Returns the boundary to use in Content-Type header + * + * @return string + */ + public function getBoundary() + { + if (empty($this->_boundary)) { + $this->_boundary = '--' . md5('PEAR-HTTP_Request2-' . microtime()); + } + return $this->_boundary; + } + + /** + * Returns next chunk of request body + * + * @param integer $length Number of bytes to read + * + * @return string Up to $length bytes of data, empty string if at end + * @throws HTTP_Request2_LogicException + */ + public function read($length) + { + $ret = ''; + $boundary = $this->getBoundary(); + $paramCount = count($this->_params); + $uploadCount = count($this->_uploads); + while ($length > 0 && $this->_pos[0] <= $paramCount + $uploadCount) { + $oldLength = $length; + if ($this->_pos[0] < $paramCount) { + $param = sprintf( + $this->_headerParam, $boundary, $this->_params[$this->_pos[0]][0] + ) . $this->_params[$this->_pos[0]][1] . "\r\n"; + $ret .= substr($param, $this->_pos[1], $length); + $length -= min(strlen($param) - $this->_pos[1], $length); + + } elseif ($this->_pos[0] < $paramCount + $uploadCount) { + $pos = $this->_pos[0] - $paramCount; + $header = sprintf( + $this->_headerUpload, $boundary, $this->_uploads[$pos]['name'], + $this->_uploads[$pos]['filename'], $this->_uploads[$pos]['type'] + ); + if ($this->_pos[1] < strlen($header)) { + $ret .= substr($header, $this->_pos[1], $length); + $length -= min(strlen($header) - $this->_pos[1], $length); + } + $filePos = max(0, $this->_pos[1] - strlen($header)); + if ($filePos < $this->_uploads[$pos]['size']) { + while ($length > 0 && !feof($this->_uploads[$pos]['fp'])) { + if (false === ($chunk = fread($this->_uploads[$pos]['fp'], $length))) { + throw new HTTP_Request2_LogicException( + 'Failed reading file upload', HTTP_Request2_Exception::READ_ERROR + ); + } + $ret .= $chunk; + $length -= strlen($chunk); + } + } + if ($length > 0) { + $start = $this->_pos[1] + ($oldLength - $length) - + strlen($header) - $this->_uploads[$pos]['size']; + $ret .= substr("\r\n", $start, $length); + $length -= min(2 - $start, $length); + } + + } else { + $closing = '--' . $boundary . "--\r\n"; + $ret .= substr($closing, $this->_pos[1], $length); + $length -= min(strlen($closing) - $this->_pos[1], $length); + } + if ($length > 0) { + $this->_pos = array($this->_pos[0] + 1, 0); + } else { + $this->_pos[1] += $oldLength; + } + } + return $ret; + } + + /** + * Sets the current position to the start of the body + * + * This allows reusing the same body in another request + */ + public function rewind() + { + $this->_pos = array(0, 0); + foreach ($this->_uploads as $u) { + rewind($u['fp']); + } + } + + /** + * Returns the body as string + * + * Note that it reads all file uploads into memory so it is a good idea not + * to use this method with large file uploads and rely on read() instead. + * + * @return string + */ + public function __toString() + { + $this->rewind(); + return $this->read($this->getLength()); + } + + + /** + * Helper function to change the (probably multidimensional) associative array + * into the simple one. + * + * @param string $name name for item + * @param mixed $values item's values + * @param bool $useBrackets whether to append [] to array variables' names + * + * @return array array with the following items: array('item name', 'item value'); + */ + private static function _flattenArray($name, $values, $useBrackets) + { + if (!is_array($values)) { + return array(array($name, $values)); + } else { + $ret = array(); + foreach ($values as $k => $v) { + if (empty($name)) { + $newName = $k; + } elseif ($useBrackets) { + $newName = $name . '[' . $k . ']'; + } else { + $newName = $name; + } + $ret = array_merge($ret, self::_flattenArray($newName, $v, $useBrackets)); + } + return $ret; + } + } +} +?> diff --git a/bundled-libs/HTTP/Request2/Observer/Log.php b/bundled-libs/HTTP/Request2/Observer/Log.php index 96733de5..069baf8e 100644 --- a/bundled-libs/HTTP/Request2/Observer/Log.php +++ b/bundled-libs/HTTP/Request2/Observer/Log.php @@ -1,192 +1,192 @@ -<?php -/** - * An observer useful for debugging / testing. - * - * PHP version 5 - * - * LICENSE - * - * This source file is subject to BSD 3-Clause License that is bundled - * with this package in the file LICENSE and available at the URL - * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE - * - * @category HTTP - * @package HTTP_Request2 - * @author David Jean Louis <izi@php.net> - * @author Alexey Borzov <avb@php.net> - * @copyright 2008-2014 Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** - * Exception class for HTTP_Request2 package - */ -require_once 'HTTP/Request2/Exception.php'; - -/** - * A debug observer useful for debugging / testing. - * - * This observer logs to a log target data corresponding to the various request - * and response events, it logs by default to php://output but can be configured - * to log to a file or via the PEAR Log package. - * - * A simple example: - * <code> - * require_once 'HTTP/Request2.php'; - * require_once 'HTTP/Request2/Observer/Log.php'; - * - * $request = new HTTP_Request2('http://www.example.com'); - * $observer = new HTTP_Request2_Observer_Log(); - * $request->attach($observer); - * $request->send(); - * </code> - * - * A more complex example with PEAR Log: - * <code> - * require_once 'HTTP/Request2.php'; - * require_once 'HTTP/Request2/Observer/Log.php'; - * require_once 'Log.php'; - * - * $request = new HTTP_Request2('http://www.example.com'); - * // we want to log with PEAR log - * $observer = new HTTP_Request2_Observer_Log(Log::factory('console')); - * - * // we only want to log received headers - * $observer->events = array('receivedHeaders'); - * - * $request->attach($observer); - * $request->send(); - * </code> - * - * @category HTTP - * @package HTTP_Request2 - * @author David Jean Louis <izi@php.net> - * @author Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - */ -class HTTP_Request2_Observer_Log implements SplObserver -{ - // properties {{{ - - /** - * The log target, it can be a a resource or a PEAR Log instance. - * - * @var resource|Log $target - */ - protected $target = null; - - /** - * The events to log. - * - * @var array $events - */ - public $events = array( - 'connect', - 'sentHeaders', - 'sentBody', - 'receivedHeaders', - 'receivedBody', - 'disconnect', - ); - - // }}} - // __construct() {{{ - - /** - * Constructor. - * - * @param mixed $target Can be a file path (default: php://output), a resource, - * or an instance of the PEAR Log class. - * @param array $events Array of events to listen to (default: all events) - * - * @return void - */ - public function __construct($target = 'php://output', array $events = array()) - { - if (!empty($events)) { - $this->events = $events; - } - if (is_resource($target) || $target instanceof Log) { - $this->target = $target; - } elseif (false === ($this->target = @fopen($target, 'ab'))) { - throw new HTTP_Request2_Exception("Unable to open '{$target}'"); - } - } - - // }}} - // update() {{{ - - /** - * Called when the request notifies us of an event. - * - * @param HTTP_Request2 $subject The HTTP_Request2 instance - * - * @return void - */ - public function update(SplSubject $subject) - { - $event = $subject->getLastEvent(); - if (!in_array($event['name'], $this->events)) { - return; - } - - switch ($event['name']) { - case 'connect': - $this->log('* Connected to ' . $event['data']); - break; - case 'sentHeaders': - $headers = explode("\r\n", $event['data']); - array_pop($headers); - foreach ($headers as $header) { - $this->log('> ' . $header); - } - break; - case 'sentBody': - $this->log('> ' . $event['data'] . ' byte(s) sent'); - break; - case 'receivedHeaders': - $this->log(sprintf( - '< HTTP/%s %s %s', $event['data']->getVersion(), - $event['data']->getStatus(), $event['data']->getReasonPhrase() - )); - $headers = $event['data']->getHeader(); - foreach ($headers as $key => $val) { - $this->log('< ' . $key . ': ' . $val); - } - $this->log('< '); - break; - case 'receivedBody': - $this->log($event['data']->getBody()); - break; - case 'disconnect': - $this->log('* Disconnected'); - break; - } - } - - // }}} - // log() {{{ - - /** - * Logs the given message to the configured target. - * - * @param string $message Message to display - * - * @return void - */ - protected function log($message) - { - if ($this->target instanceof Log) { - $this->target->debug($message); - } elseif (is_resource($this->target)) { - fwrite($this->target, $message . "\r\n"); - } - } - - // }}} -} - +<?php +/** + * An observer useful for debugging / testing. + * + * PHP version 5 + * + * LICENSE + * + * This source file is subject to BSD 3-Clause License that is bundled + * with this package in the file LICENSE and available at the URL + * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE + * + * @category HTTP + * @package HTTP_Request2 + * @author David Jean Louis <izi@php.net> + * @author Alexey Borzov <avb@php.net> + * @copyright 2008-2016 Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** + * Exception class for HTTP_Request2 package + */ +require_once 'HTTP/Request2/Exception.php'; + +/** + * A debug observer useful for debugging / testing. + * + * This observer logs to a log target data corresponding to the various request + * and response events, it logs by default to php://output but can be configured + * to log to a file or via the PEAR Log package. + * + * A simple example: + * <code> + * require_once 'HTTP/Request2.php'; + * require_once 'HTTP/Request2/Observer/Log.php'; + * + * $request = new HTTP_Request2('http://www.example.com'); + * $observer = new HTTP_Request2_Observer_Log(); + * $request->attach($observer); + * $request->send(); + * </code> + * + * A more complex example with PEAR Log: + * <code> + * require_once 'HTTP/Request2.php'; + * require_once 'HTTP/Request2/Observer/Log.php'; + * require_once 'Log.php'; + * + * $request = new HTTP_Request2('http://www.example.com'); + * // we want to log with PEAR log + * $observer = new HTTP_Request2_Observer_Log(Log::factory('console')); + * + * // we only want to log received headers + * $observer->events = array('receivedHeaders'); + * + * $request->attach($observer); + * $request->send(); + * </code> + * + * @category HTTP + * @package HTTP_Request2 + * @author David Jean Louis <izi@php.net> + * @author Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_Observer_Log implements SplObserver +{ + // properties {{{ + + /** + * The log target, it can be a a resource or a PEAR Log instance. + * + * @var resource|Log $target + */ + protected $target = null; + + /** + * The events to log. + * + * @var array $events + */ + public $events = array( + 'connect', + 'sentHeaders', + 'sentBody', + 'receivedHeaders', + 'receivedBody', + 'disconnect', + ); + + // }}} + // __construct() {{{ + + /** + * Constructor. + * + * @param mixed $target Can be a file path (default: php://output), a resource, + * or an instance of the PEAR Log class. + * @param array $events Array of events to listen to (default: all events) + * + * @return void + */ + public function __construct($target = 'php://output', array $events = array()) + { + if (!empty($events)) { + $this->events = $events; + } + if (is_resource($target) || $target instanceof Log) { + $this->target = $target; + } elseif (false === ($this->target = @fopen($target, 'ab'))) { + throw new HTTP_Request2_Exception("Unable to open '{$target}'"); + } + } + + // }}} + // update() {{{ + + /** + * Called when the request notifies us of an event. + * + * @param HTTP_Request2 $subject The HTTP_Request2 instance + * + * @return void + */ + public function update(SplSubject $subject) + { + $event = $subject->getLastEvent(); + if (!in_array($event['name'], $this->events)) { + return; + } + + switch ($event['name']) { + case 'connect': + $this->log('* Connected to ' . $event['data']); + break; + case 'sentHeaders': + $headers = explode("\r\n", $event['data']); + array_pop($headers); + foreach ($headers as $header) { + $this->log('> ' . $header); + } + break; + case 'sentBody': + $this->log('> ' . $event['data'] . ' byte(s) sent'); + break; + case 'receivedHeaders': + $this->log(sprintf( + '< HTTP/%s %s %s', $event['data']->getVersion(), + $event['data']->getStatus(), $event['data']->getReasonPhrase() + )); + $headers = $event['data']->getHeader(); + foreach ($headers as $key => $val) { + $this->log('< ' . $key . ': ' . $val); + } + $this->log('< '); + break; + case 'receivedBody': + $this->log($event['data']->getBody()); + break; + case 'disconnect': + $this->log('* Disconnected'); + break; + } + } + + // }}} + // log() {{{ + + /** + * Logs the given message to the configured target. + * + * @param string $message Message to display + * + * @return void + */ + protected function log($message) + { + if ($this->target instanceof Log) { + $this->target->debug($message); + } elseif (is_resource($this->target)) { + fwrite($this->target, $message . "\r\n"); + } + } + + // }}} +} + ?> \ No newline at end of file diff --git a/bundled-libs/HTTP/Request2/Observer/UncompressingDownload.php b/bundled-libs/HTTP/Request2/Observer/UncompressingDownload.php new file mode 100644 index 00000000..8a3430a0 --- /dev/null +++ b/bundled-libs/HTTP/Request2/Observer/UncompressingDownload.php @@ -0,0 +1,265 @@ +<?php +/** + * An observer that saves response body to stream, possibly uncompressing it + * + * PHP version 5 + * + * LICENSE + * + * This source file is subject to BSD 3-Clause License that is bundled + * with this package in the file LICENSE and available at the URL + * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE + * + * @category HTTP + * @package HTTP_Request2 + * @author Delian Krustev <krustev@krustev.net> + * @author Alexey Borzov <avb@php.net> + * @copyright 2008-2016 Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +require_once 'HTTP/Request2/Response.php'; + +/** + * An observer that saves response body to stream, possibly uncompressing it + * + * This Observer is written in compliment to pear's HTTP_Request2 in order to + * avoid reading the whole response body in memory. Instead it writes the body + * to a stream. If the body is transferred with content-encoding set to + * "deflate" or "gzip" it is decoded on the fly. + * + * The constructor accepts an already opened (for write) stream (file_descriptor). + * If the response is deflate/gzip encoded a "zlib.inflate" filter is applied + * to the stream. When the body has been read from the request and written to + * the stream ("receivedBody" event) the filter is removed from the stream. + * + * The "zlib.inflate" filter works fine with pure "deflate" encoding. It does + * not understand the "deflate+zlib" and "gzip" headers though, so they have to + * be removed prior to being passed to the stream. This is done in the "update" + * method. + * + * It is also possible to limit the size of written extracted bytes by passing + * "max_bytes" to the constructor. This is important because e.g. 1GB of + * zeroes take about a MB when compressed. + * + * Exceptions are being thrown if data could not be written to the stream or + * the written bytes have already exceeded the requested maximum. If the "gzip" + * header is malformed or could not be parsed an exception will be thrown too. + * + * Example usage follows: + * + * <code> + * require_once 'HTTP/Request2.php'; + * require_once 'HTTP/Request2/Observer/UncompressingDownload.php'; + * + * #$inPath = 'http://carsten.codimi.de/gzip.yaws/daniels.html'; + * #$inPath = 'http://carsten.codimi.de/gzip.yaws/daniels.html?deflate=on'; + * $inPath = 'http://carsten.codimi.de/gzip.yaws/daniels.html?deflate=on&zlib=on'; + * #$outPath = "/dev/null"; + * $outPath = "delme"; + * + * $stream = fopen($outPath, 'wb'); + * if (!$stream) { + * throw new Exception('fopen failed'); + * } + * + * $request = new HTTP_Request2( + * $inPath, + * HTTP_Request2::METHOD_GET, + * array( + * 'store_body' => false, + * 'connect_timeout' => 5, + * 'timeout' => 10, + * 'ssl_verify_peer' => true, + * 'ssl_verify_host' => true, + * 'ssl_cafile' => null, + * 'ssl_capath' => '/etc/ssl/certs', + * 'max_redirects' => 10, + * 'follow_redirects' => true, + * 'strict_redirects' => false + * ) + * ); + * + * $observer = new HTTP_Request2_Observer_UncompressingDownload($stream, 9999999); + * $request->attach($observer); + * + * $response = $request->send(); + * + * fclose($stream); + * echo "OK\n"; + * </code> + * + * @category HTTP + * @package HTTP_Request2 + * @author Delian Krustev <krustev@krustev.net> + * @author Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + */ +class HTTP_Request2_Observer_UncompressingDownload implements SplObserver +{ + /** + * The stream to write response body to + * @var resource + */ + private $_stream; + + /** + * zlib.inflate filter possibly added to stream + * @var resource + */ + private $_streamFilter; + + /** + * The value of response's Content-Encoding header + * @var string + */ + private $_encoding; + + /** + * Whether the observer is still waiting for gzip/deflate header + * @var bool + */ + private $_processingHeader = true; + + /** + * Starting position in the stream observer writes to + * @var int + */ + private $_startPosition = 0; + + /** + * Maximum bytes to write + * @var int|null + */ + private $_maxDownloadSize; + + /** + * Whether response being received is a redirect + * @var bool + */ + private $_redirect = false; + + /** + * Accumulated body chunks that may contain (gzip) header + * @var string + */ + private $_possibleHeader = ''; + + /** + * Class constructor + * + * Note that there might be problems with max_bytes and files bigger + * than 2 GB on 32bit platforms + * + * @param resource $stream a stream (or file descriptor) opened for writing. + * @param int $maxDownloadSize maximum bytes to write + */ + public function __construct($stream, $maxDownloadSize = null) + { + $this->_stream = $stream; + if ($maxDownloadSize) { + $this->_maxDownloadSize = $maxDownloadSize; + $this->_startPosition = ftell($this->_stream); + } + } + + /** + * Called when the request notifies us of an event. + * + * @param SplSubject $request The HTTP_Request2 instance + * + * @return void + * @throws HTTP_Request2_MessageException + */ + public function update(SplSubject $request) + { + /* @var $request HTTP_Request2 */ + $event = $request->getLastEvent(); + $encoded = false; + + /* @var $event['data'] HTTP_Request2_Response */ + switch ($event['name']) { + case 'receivedHeaders': + $this->_processingHeader = true; + $this->_redirect = $event['data']->isRedirect(); + $this->_encoding = strtolower($event['data']->getHeader('content-encoding')); + $this->_possibleHeader = ''; + break; + + case 'receivedEncodedBodyPart': + if (!$this->_streamFilter + && ($this->_encoding === 'deflate' || $this->_encoding === 'gzip') + ) { + $this->_streamFilter = stream_filter_append( + $this->_stream, 'zlib.inflate', STREAM_FILTER_WRITE + ); + } + $encoded = true; + // fall-through is intentional + + case 'receivedBodyPart': + if ($this->_redirect) { + break; + } + + if (!$encoded || !$this->_processingHeader) { + $bytes = fwrite($this->_stream, $event['data']); + + } else { + $offset = 0; + $this->_possibleHeader .= $event['data']; + if ('deflate' === $this->_encoding) { + if (2 > strlen($this->_possibleHeader)) { + break; + } + $header = unpack('n', substr($this->_possibleHeader, 0, 2)); + if (0 == $header[1] % 31) { + $offset = 2; + } + + } elseif ('gzip' === $this->_encoding) { + if (10 > strlen($this->_possibleHeader)) { + break; + } + try { + $offset = HTTP_Request2_Response::parseGzipHeader($this->_possibleHeader, false); + + } catch (HTTP_Request2_MessageException $e) { + // need more data? + if (false !== strpos($e->getMessage(), 'data too short')) { + break; + } + throw $e; + } + } + + $this->_processingHeader = false; + $bytes = fwrite($this->_stream, substr($this->_possibleHeader, $offset)); + } + + if (false === $bytes) { + throw new HTTP_Request2_MessageException('fwrite failed.'); + } + + if ($this->_maxDownloadSize + && ftell($this->_stream) - $this->_startPosition > $this->_maxDownloadSize + ) { + throw new HTTP_Request2_MessageException(sprintf( + 'Body length limit (%d bytes) reached', + $this->_maxDownloadSize + )); + } + break; + + case 'receivedBody': + if ($this->_streamFilter) { + stream_filter_remove($this->_streamFilter); + $this->_streamFilter = null; + } + break; + } + } +} diff --git a/bundled-libs/HTTP/Request2/Response.php b/bundled-libs/HTTP/Request2/Response.php index 7acbeaa3..b144fdae 100644 --- a/bundled-libs/HTTP/Request2/Response.php +++ b/bundled-libs/HTTP/Request2/Response.php @@ -1,631 +1,680 @@ -<?php -/** - * Class representing a HTTP response - * - * PHP version 5 - * - * LICENSE - * - * This source file is subject to BSD 3-Clause License that is bundled - * with this package in the file LICENSE and available at the URL - * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @copyright 2008-2014 Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** - * Exception class for HTTP_Request2 package - */ -require_once 'HTTP/Request2/Exception.php'; - -/** - * Class representing a HTTP response - * - * The class is designed to be used in "streaming" scenario, building the - * response as it is being received: - * <code> - * $statusLine = read_status_line(); - * $response = new HTTP_Request2_Response($statusLine); - * do { - * $headerLine = read_header_line(); - * $response->parseHeaderLine($headerLine); - * } while ($headerLine != ''); - * - * while ($chunk = read_body()) { - * $response->appendBody($chunk); - * } - * - * var_dump($response->getHeader(), $response->getCookies(), $response->getBody()); - * </code> - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - * @link http://tools.ietf.org/html/rfc2616#section-6 - */ -class HTTP_Request2_Response -{ - /** - * HTTP protocol version (e.g. 1.0, 1.1) - * @var string - */ - protected $version; - - /** - * Status code - * @var integer - * @link http://tools.ietf.org/html/rfc2616#section-6.1.1 - */ - protected $code; - - /** - * Reason phrase - * @var string - * @link http://tools.ietf.org/html/rfc2616#section-6.1.1 - */ - protected $reasonPhrase; - - /** - * Effective URL (may be different from original request URL in case of redirects) - * @var string - */ - protected $effectiveUrl; - - /** - * Associative array of response headers - * @var array - */ - protected $headers = array(); - - /** - * Cookies set in the response - * @var array - */ - protected $cookies = array(); - - /** - * Name of last header processed by parseHederLine() - * - * Used to handle the headers that span multiple lines - * - * @var string - */ - protected $lastHeader = null; - - /** - * Response body - * @var string - */ - protected $body = ''; - - /** - * Whether the body is still encoded by Content-Encoding - * - * cURL provides the decoded body to the callback; if we are reading from - * socket the body is still gzipped / deflated - * - * @var bool - */ - protected $bodyEncoded; - - /** - * Associative array of HTTP status code / reason phrase. - * - * @var array - * @link http://tools.ietf.org/html/rfc2616#section-10 - */ - protected static $phrases = array( - - // 1xx: Informational - Request received, continuing process - 100 => 'Continue', - 101 => 'Switching Protocols', - - // 2xx: Success - The action was successfully received, understood and - // accepted - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - - // 3xx: Redirection - Further action must be taken in order to complete - // the request - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', // 1.1 - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 307 => 'Temporary Redirect', - - // 4xx: Client Error - The request contains bad syntax or cannot be - // fulfilled - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Timeout', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Long', - 415 => 'Unsupported Media Type', - 416 => 'Requested Range Not Satisfiable', - 417 => 'Expectation Failed', - - // 5xx: Server Error - The server failed to fulfill an apparently - // valid request - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported', - 509 => 'Bandwidth Limit Exceeded', - - ); - - /** - * Returns the default reason phrase for the given code or all reason phrases - * - * @param int $code Response code - * - * @return string|array|null Default reason phrase for $code if $code is given - * (null if no phrase is available), array of all - * reason phrases if $code is null - * @link http://pear.php.net/bugs/18716 - */ - public static function getDefaultReasonPhrase($code = null) - { - if (null === $code) { - return self::$phrases; - } else { - return isset(self::$phrases[$code]) ? self::$phrases[$code] : null; - } - } - - /** - * Constructor, parses the response status line - * - * @param string $statusLine Response status line (e.g. "HTTP/1.1 200 OK") - * @param bool $bodyEncoded Whether body is still encoded by Content-Encoding - * @param string $effectiveUrl Effective URL of the response - * - * @throws HTTP_Request2_MessageException if status line is invalid according to spec - */ - public function __construct($statusLine, $bodyEncoded = true, $effectiveUrl = null) - { - if (!preg_match('!^HTTP/(\d\.\d) (\d{3})(?: (.+))?!', $statusLine, $m)) { - throw new HTTP_Request2_MessageException( - "Malformed response: {$statusLine}", - HTTP_Request2_Exception::MALFORMED_RESPONSE - ); - } - $this->version = $m[1]; - $this->code = intval($m[2]); - $this->reasonPhrase = !empty($m[3]) ? trim($m[3]) : self::getDefaultReasonPhrase($this->code); - $this->bodyEncoded = (bool)$bodyEncoded; - $this->effectiveUrl = (string)$effectiveUrl; - } - - /** - * Parses the line from HTTP response filling $headers array - * - * The method should be called after reading the line from socket or receiving - * it into cURL callback. Passing an empty string here indicates the end of - * response headers and triggers additional processing, so be sure to pass an - * empty string in the end. - * - * @param string $headerLine Line from HTTP response - */ - public function parseHeaderLine($headerLine) - { - $headerLine = trim($headerLine, "\r\n"); - - if ('' == $headerLine) { - // empty string signals the end of headers, process the received ones - if (!empty($this->headers['set-cookie'])) { - $cookies = is_array($this->headers['set-cookie'])? - $this->headers['set-cookie']: - array($this->headers['set-cookie']); - foreach ($cookies as $cookieString) { - $this->parseCookie($cookieString); - } - unset($this->headers['set-cookie']); - } - foreach (array_keys($this->headers) as $k) { - if (is_array($this->headers[$k])) { - $this->headers[$k] = implode(', ', $this->headers[$k]); - } - } - - } elseif (preg_match('!^([^\x00-\x1f\x7f-\xff()<>@,;:\\\\"/\[\]?={}\s]+):(.+)$!', $headerLine, $m)) { - // string of the form header-name: header value - $name = strtolower($m[1]); - $value = trim($m[2]); - if (empty($this->headers[$name])) { - $this->headers[$name] = $value; - } else { - if (!is_array($this->headers[$name])) { - $this->headers[$name] = array($this->headers[$name]); - } - $this->headers[$name][] = $value; - } - $this->lastHeader = $name; - - } elseif (preg_match('!^\s+(.+)$!', $headerLine, $m) && $this->lastHeader) { - // continuation of a previous header - if (!is_array($this->headers[$this->lastHeader])) { - $this->headers[$this->lastHeader] .= ' ' . trim($m[1]); - } else { - $key = count($this->headers[$this->lastHeader]) - 1; - $this->headers[$this->lastHeader][$key] .= ' ' . trim($m[1]); - } - } - } - - /** - * Parses a Set-Cookie header to fill $cookies array - * - * @param string $cookieString value of Set-Cookie header - * - * @link http://web.archive.org/web/20080331104521/http://cgi.netscape.com/newsref/std/cookie_spec.html - */ - protected function parseCookie($cookieString) - { - $cookie = array( - 'expires' => null, - 'domain' => null, - 'path' => null, - 'secure' => false - ); - - if (!strpos($cookieString, ';')) { - // Only a name=value pair - $pos = strpos($cookieString, '='); - $cookie['name'] = trim(substr($cookieString, 0, $pos)); - $cookie['value'] = trim(substr($cookieString, $pos + 1)); - - } else { - // Some optional parameters are supplied - $elements = explode(';', $cookieString); - $pos = strpos($elements[0], '='); - $cookie['name'] = trim(substr($elements[0], 0, $pos)); - $cookie['value'] = trim(substr($elements[0], $pos + 1)); - - for ($i = 1; $i < count($elements); $i++) { - if (false === strpos($elements[$i], '=')) { - $elName = trim($elements[$i]); - $elValue = null; - } else { - list ($elName, $elValue) = array_map('trim', explode('=', $elements[$i])); - } - $elName = strtolower($elName); - if ('secure' == $elName) { - $cookie['secure'] = true; - } elseif ('expires' == $elName) { - $cookie['expires'] = str_replace('"', '', $elValue); - } elseif ('path' == $elName || 'domain' == $elName) { - $cookie[$elName] = urldecode($elValue); - } else { - $cookie[$elName] = $elValue; - } - } - } - $this->cookies[] = $cookie; - } - - /** - * Appends a string to the response body - * - * @param string $bodyChunk part of response body - */ - public function appendBody($bodyChunk) - { - $this->body .= $bodyChunk; - } - - /** - * Returns the effective URL of the response - * - * This may be different from the request URL if redirects were followed. - * - * @return string - * @link http://pear.php.net/bugs/bug.php?id=18412 - */ - public function getEffectiveUrl() - { - return $this->effectiveUrl; - } - - /** - * Returns the status code - * - * @return integer - */ - public function getStatus() - { - return $this->code; - } - - /** - * Returns the reason phrase - * - * @return string - */ - public function getReasonPhrase() - { - return $this->reasonPhrase; - } - - /** - * Whether response is a redirect that can be automatically handled by HTTP_Request2 - * - * @return bool - */ - public function isRedirect() - { - return in_array($this->code, array(300, 301, 302, 303, 307)) - && isset($this->headers['location']); - } - - /** - * Returns either the named header or all response headers - * - * @param string $headerName Name of header to return - * - * @return string|array Value of $headerName header (null if header is - * not present), array of all response headers if - * $headerName is null - */ - public function getHeader($headerName = null) - { - if (null === $headerName) { - return $this->headers; - } else { - $headerName = strtolower($headerName); - return isset($this->headers[$headerName])? $this->headers[$headerName]: null; - } - } - - /** - * Returns cookies set in response - * - * @return array - */ - public function getCookies() - { - return $this->cookies; - } - - /** - * Returns the body of the response - * - * @return string - * @throws HTTP_Request2_Exception if body cannot be decoded - */ - public function getBody() - { - if (0 == strlen($this->body) || !$this->bodyEncoded - || !in_array(strtolower($this->getHeader('content-encoding')), array('gzip', 'deflate')) - ) { - return $this->body; - - } else { - if (extension_loaded('mbstring') && (2 & ini_get('mbstring.func_overload'))) { - $oldEncoding = mb_internal_encoding(); - mb_internal_encoding('8bit'); - } - - try { - switch (strtolower($this->getHeader('content-encoding'))) { - case 'gzip': - $decoded = self::decodeGzip($this->body); - break; - case 'deflate': - $decoded = self::decodeDeflate($this->body); - } - } catch (Exception $e) { - } - - if (!empty($oldEncoding)) { - mb_internal_encoding($oldEncoding); - } - if (!empty($e)) { - throw $e; - } - return $decoded; - } - } - - /** - * Get the HTTP version of the response - * - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Decodes the message-body encoded by gzip - * - * The real decoding work is done by gzinflate() built-in function, this - * method only parses the header and checks data for compliance with - * RFC 1952 - * - * @param string $data gzip-encoded data - * - * @return string decoded data - * @throws HTTP_Request2_LogicException - * @throws HTTP_Request2_MessageException - * @link http://tools.ietf.org/html/rfc1952 - */ - public static function decodeGzip($data) - { - $length = strlen($data); - // If it doesn't look like gzip-encoded data, don't bother - if (18 > $length || strcmp(substr($data, 0, 2), "\x1f\x8b")) { - return $data; - } - if (!function_exists('gzinflate')) { - throw new HTTP_Request2_LogicException( - 'Unable to decode body: gzip extension not available', - HTTP_Request2_Exception::MISCONFIGURATION - ); - } - $method = ord(substr($data, 2, 1)); - if (8 != $method) { - throw new HTTP_Request2_MessageException( - 'Error parsing gzip header: unknown compression method', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - $flags = ord(substr($data, 3, 1)); - if ($flags & 224) { - throw new HTTP_Request2_MessageException( - 'Error parsing gzip header: reserved bits are set', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - - // header is 10 bytes minimum. may be longer, though. - $headerLength = 10; - // extra fields, need to skip 'em - if ($flags & 4) { - if ($length - $headerLength - 2 < 8) { - throw new HTTP_Request2_MessageException( - 'Error parsing gzip header: data too short', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - $extraLength = unpack('v', substr($data, 10, 2)); - if ($length - $headerLength - 2 - $extraLength[1] < 8) { - throw new HTTP_Request2_MessageException( - 'Error parsing gzip header: data too short', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - $headerLength += $extraLength[1] + 2; - } - // file name, need to skip that - if ($flags & 8) { - if ($length - $headerLength - 1 < 8) { - throw new HTTP_Request2_MessageException( - 'Error parsing gzip header: data too short', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - $filenameLength = strpos(substr($data, $headerLength), chr(0)); - if (false === $filenameLength || $length - $headerLength - $filenameLength - 1 < 8) { - throw new HTTP_Request2_MessageException( - 'Error parsing gzip header: data too short', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - $headerLength += $filenameLength + 1; - } - // comment, need to skip that also - if ($flags & 16) { - if ($length - $headerLength - 1 < 8) { - throw new HTTP_Request2_MessageException( - 'Error parsing gzip header: data too short', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - $commentLength = strpos(substr($data, $headerLength), chr(0)); - if (false === $commentLength || $length - $headerLength - $commentLength - 1 < 8) { - throw new HTTP_Request2_MessageException( - 'Error parsing gzip header: data too short', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - $headerLength += $commentLength + 1; - } - // have a CRC for header. let's check - if ($flags & 2) { - if ($length - $headerLength - 2 < 8) { - throw new HTTP_Request2_MessageException( - 'Error parsing gzip header: data too short', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - $crcReal = 0xffff & crc32(substr($data, 0, $headerLength)); - $crcStored = unpack('v', substr($data, $headerLength, 2)); - if ($crcReal != $crcStored[1]) { - throw new HTTP_Request2_MessageException( - 'Header CRC check failed', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - $headerLength += 2; - } - // unpacked data CRC and size at the end of encoded data - $tmp = unpack('V2', substr($data, -8)); - $dataCrc = $tmp[1]; - $dataSize = $tmp[2]; - - // finally, call the gzinflate() function - // don't pass $dataSize to gzinflate, see bugs #13135, #14370 - $unpacked = gzinflate(substr($data, $headerLength, -8)); - if (false === $unpacked) { - throw new HTTP_Request2_MessageException( - 'gzinflate() call failed', - HTTP_Request2_Exception::DECODE_ERROR - ); - } elseif ($dataSize != strlen($unpacked)) { - throw new HTTP_Request2_MessageException( - 'Data size check failed', - HTTP_Request2_Exception::DECODE_ERROR - ); - } elseif ((0xffffffff & $dataCrc) != (0xffffffff & crc32($unpacked))) { - throw new HTTP_Request2_Exception( - 'Data CRC check failed', - HTTP_Request2_Exception::DECODE_ERROR - ); - } - return $unpacked; - } - - /** - * Decodes the message-body encoded by deflate - * - * @param string $data deflate-encoded data - * - * @return string decoded data - * @throws HTTP_Request2_LogicException - */ - public static function decodeDeflate($data) - { - if (!function_exists('gzuncompress')) { - throw new HTTP_Request2_LogicException( - 'Unable to decode body: gzip extension not available', - HTTP_Request2_Exception::MISCONFIGURATION - ); - } - // RFC 2616 defines 'deflate' encoding as zlib format from RFC 1950, - // while many applications send raw deflate stream from RFC 1951. - // We should check for presence of zlib header and use gzuncompress() or - // gzinflate() as needed. See bug #15305 - $header = unpack('n', substr($data, 0, 2)); - return (0 == $header[1] % 31)? gzuncompress($data): gzinflate($data); - } -} +<?php +/** + * Class representing a HTTP response + * + * PHP version 5 + * + * LICENSE + * + * This source file is subject to BSD 3-Clause License that is bundled + * with this package in the file LICENSE and available at the URL + * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @copyright 2008-2016 Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** + * Exception class for HTTP_Request2 package + */ +require_once 'HTTP/Request2/Exception.php'; + +/** + * Class representing a HTTP response + * + * The class is designed to be used in "streaming" scenario, building the + * response as it is being received: + * <code> + * $statusLine = read_status_line(); + * $response = new HTTP_Request2_Response($statusLine); + * do { + * $headerLine = read_header_line(); + * $response->parseHeaderLine($headerLine); + * } while ($headerLine != ''); + * + * while ($chunk = read_body()) { + * $response->appendBody($chunk); + * } + * + * var_dump($response->getHeader(), $response->getCookies(), $response->getBody()); + * </code> + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + * @link http://tools.ietf.org/html/rfc2616#section-6 + */ +class HTTP_Request2_Response +{ + /** + * HTTP protocol version (e.g. 1.0, 1.1) + * @var string + */ + protected $version; + + /** + * Status code + * @var integer + * @link http://tools.ietf.org/html/rfc2616#section-6.1.1 + */ + protected $code; + + /** + * Reason phrase + * @var string + * @link http://tools.ietf.org/html/rfc2616#section-6.1.1 + */ + protected $reasonPhrase; + + /** + * Effective URL (may be different from original request URL in case of redirects) + * @var string + */ + protected $effectiveUrl; + + /** + * Associative array of response headers + * @var array + */ + protected $headers = array(); + + /** + * Cookies set in the response + * @var array + */ + protected $cookies = array(); + + /** + * Name of last header processed by parseHederLine() + * + * Used to handle the headers that span multiple lines + * + * @var string + */ + protected $lastHeader = null; + + /** + * Response body + * @var string + */ + protected $body = ''; + + /** + * Whether the body is still encoded by Content-Encoding + * + * cURL provides the decoded body to the callback; if we are reading from + * socket the body is still gzipped / deflated + * + * @var bool + */ + protected $bodyEncoded; + + /** + * Associative array of HTTP status code / reason phrase. + * + * @var array + * @link http://tools.ietf.org/html/rfc2616#section-10 + */ + protected static $phrases = array( + + // 1xx: Informational - Request received, continuing process + 100 => 'Continue', + 101 => 'Switching Protocols', + + // 2xx: Success - The action was successfully received, understood and + // accepted + 200 => 'OK', + 201 => 'Created', + 202 => 'Accepted', + 203 => 'Non-Authoritative Information', + 204 => 'No Content', + 205 => 'Reset Content', + 206 => 'Partial Content', + + // 3xx: Redirection - Further action must be taken in order to complete + // the request + 300 => 'Multiple Choices', + 301 => 'Moved Permanently', + 302 => 'Found', // 1.1 + 303 => 'See Other', + 304 => 'Not Modified', + 305 => 'Use Proxy', + 307 => 'Temporary Redirect', + + // 4xx: Client Error - The request contains bad syntax or cannot be + // fulfilled + 400 => 'Bad Request', + 401 => 'Unauthorized', + 402 => 'Payment Required', + 403 => 'Forbidden', + 404 => 'Not Found', + 405 => 'Method Not Allowed', + 406 => 'Not Acceptable', + 407 => 'Proxy Authentication Required', + 408 => 'Request Timeout', + 409 => 'Conflict', + 410 => 'Gone', + 411 => 'Length Required', + 412 => 'Precondition Failed', + 413 => 'Request Entity Too Large', + 414 => 'Request-URI Too Long', + 415 => 'Unsupported Media Type', + 416 => 'Requested Range Not Satisfiable', + 417 => 'Expectation Failed', + + // 5xx: Server Error - The server failed to fulfill an apparently + // valid request + 500 => 'Internal Server Error', + 501 => 'Not Implemented', + 502 => 'Bad Gateway', + 503 => 'Service Unavailable', + 504 => 'Gateway Timeout', + 505 => 'HTTP Version Not Supported', + 509 => 'Bandwidth Limit Exceeded', + + ); + + /** + * Returns the default reason phrase for the given code or all reason phrases + * + * @param int $code Response code + * + * @return string|array|null Default reason phrase for $code if $code is given + * (null if no phrase is available), array of all + * reason phrases if $code is null + * @link http://pear.php.net/bugs/18716 + */ + public static function getDefaultReasonPhrase($code = null) + { + if (null === $code) { + return self::$phrases; + } else { + return isset(self::$phrases[$code]) ? self::$phrases[$code] : null; + } + } + + /** + * Constructor, parses the response status line + * + * @param string $statusLine Response status line (e.g. "HTTP/1.1 200 OK") + * @param bool $bodyEncoded Whether body is still encoded by Content-Encoding + * @param string $effectiveUrl Effective URL of the response + * + * @throws HTTP_Request2_MessageException if status line is invalid according to spec + */ + public function __construct($statusLine, $bodyEncoded = true, $effectiveUrl = null) + { + if (!preg_match('!^HTTP/(\d\.\d) (\d{3})(?: (.+))?!', $statusLine, $m)) { + throw new HTTP_Request2_MessageException( + "Malformed response: {$statusLine}", + HTTP_Request2_Exception::MALFORMED_RESPONSE + ); + } + $this->version = $m[1]; + $this->code = intval($m[2]); + $this->reasonPhrase = !empty($m[3]) ? trim($m[3]) : self::getDefaultReasonPhrase($this->code); + $this->bodyEncoded = (bool)$bodyEncoded; + $this->effectiveUrl = (string)$effectiveUrl; + } + + /** + * Parses the line from HTTP response filling $headers array + * + * The method should be called after reading the line from socket or receiving + * it into cURL callback. Passing an empty string here indicates the end of + * response headers and triggers additional processing, so be sure to pass an + * empty string in the end. + * + * @param string $headerLine Line from HTTP response + */ + public function parseHeaderLine($headerLine) + { + $headerLine = trim($headerLine, "\r\n"); + + if ('' == $headerLine) { + // empty string signals the end of headers, process the received ones + if (!empty($this->headers['set-cookie'])) { + $cookies = is_array($this->headers['set-cookie'])? + $this->headers['set-cookie']: + array($this->headers['set-cookie']); + foreach ($cookies as $cookieString) { + $this->parseCookie($cookieString); + } + unset($this->headers['set-cookie']); + } + foreach (array_keys($this->headers) as $k) { + if (is_array($this->headers[$k])) { + $this->headers[$k] = implode(', ', $this->headers[$k]); + } + } + + } elseif (preg_match('!^([^\x00-\x1f\x7f-\xff()<>@,;:\\\\"/\[\]?={}\s]+):(.+)$!', $headerLine, $m)) { + // string of the form header-name: header value + $name = strtolower($m[1]); + $value = trim($m[2]); + if (empty($this->headers[$name])) { + $this->headers[$name] = $value; + } else { + if (!is_array($this->headers[$name])) { + $this->headers[$name] = array($this->headers[$name]); + } + $this->headers[$name][] = $value; + } + $this->lastHeader = $name; + + } elseif (preg_match('!^\s+(.+)$!', $headerLine, $m) && $this->lastHeader) { + // continuation of a previous header + if (!is_array($this->headers[$this->lastHeader])) { + $this->headers[$this->lastHeader] .= ' ' . trim($m[1]); + } else { + $key = count($this->headers[$this->lastHeader]) - 1; + $this->headers[$this->lastHeader][$key] .= ' ' . trim($m[1]); + } + } + } + + /** + * Parses a Set-Cookie header to fill $cookies array + * + * @param string $cookieString value of Set-Cookie header + * + * @link http://web.archive.org/web/20080331104521/http://cgi.netscape.com/newsref/std/cookie_spec.html + */ + protected function parseCookie($cookieString) + { + $cookie = array( + 'expires' => null, + 'domain' => null, + 'path' => null, + 'secure' => false + ); + + if (!strpos($cookieString, ';')) { + // Only a name=value pair + $pos = strpos($cookieString, '='); + $cookie['name'] = trim(substr($cookieString, 0, $pos)); + $cookie['value'] = trim(substr($cookieString, $pos + 1)); + + } else { + // Some optional parameters are supplied + $elements = explode(';', $cookieString); + $pos = strpos($elements[0], '='); + $cookie['name'] = trim(substr($elements[0], 0, $pos)); + $cookie['value'] = trim(substr($elements[0], $pos + 1)); + + for ($i = 1; $i < count($elements); $i++) { + if (false === strpos($elements[$i], '=')) { + $elName = trim($elements[$i]); + $elValue = null; + } else { + list ($elName, $elValue) = array_map('trim', explode('=', $elements[$i])); + } + $elName = strtolower($elName); + if ('secure' == $elName) { + $cookie['secure'] = true; + } elseif ('expires' == $elName) { + $cookie['expires'] = str_replace('"', '', $elValue); + } elseif ('path' == $elName || 'domain' == $elName) { + $cookie[$elName] = urldecode($elValue); + } else { + $cookie[$elName] = $elValue; + } + } + } + $this->cookies[] = $cookie; + } + + /** + * Appends a string to the response body + * + * @param string $bodyChunk part of response body + */ + public function appendBody($bodyChunk) + { + $this->body .= $bodyChunk; + } + + /** + * Returns the effective URL of the response + * + * This may be different from the request URL if redirects were followed. + * + * @return string + * @link http://pear.php.net/bugs/bug.php?id=18412 + */ + public function getEffectiveUrl() + { + return $this->effectiveUrl; + } + + /** + * Returns the status code + * + * @return integer + */ + public function getStatus() + { + return $this->code; + } + + /** + * Returns the reason phrase + * + * @return string + */ + public function getReasonPhrase() + { + return $this->reasonPhrase; + } + + /** + * Whether response is a redirect that can be automatically handled by HTTP_Request2 + * + * @return bool + */ + public function isRedirect() + { + return in_array($this->code, array(300, 301, 302, 303, 307)) + && isset($this->headers['location']); + } + + /** + * Returns either the named header or all response headers + * + * @param string $headerName Name of header to return + * + * @return string|array Value of $headerName header (null if header is + * not present), array of all response headers if + * $headerName is null + */ + public function getHeader($headerName = null) + { + if (null === $headerName) { + return $this->headers; + } else { + $headerName = strtolower($headerName); + return isset($this->headers[$headerName])? $this->headers[$headerName]: null; + } + } + + /** + * Returns cookies set in response + * + * @return array + */ + public function getCookies() + { + return $this->cookies; + } + + /** + * Returns the body of the response + * + * @return string + * @throws HTTP_Request2_Exception if body cannot be decoded + */ + public function getBody() + { + if (0 == strlen($this->body) || !$this->bodyEncoded + || !in_array(strtolower($this->getHeader('content-encoding')), array('gzip', 'deflate')) + ) { + return $this->body; + + } else { + if (extension_loaded('mbstring') && (2 & ini_get('mbstring.func_overload'))) { + $oldEncoding = mb_internal_encoding(); + mb_internal_encoding('8bit'); + } + + try { + switch (strtolower($this->getHeader('content-encoding'))) { + case 'gzip': + $decoded = self::decodeGzip($this->body); + break; + case 'deflate': + $decoded = self::decodeDeflate($this->body); + } + } catch (Exception $e) { + } + + if (!empty($oldEncoding)) { + mb_internal_encoding($oldEncoding); + } + if (!empty($e)) { + throw $e; + } + return $decoded; + } + } + + /** + * Get the HTTP version of the response + * + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Checks whether data starts with GZIP format identification bytes from RFC 1952 + * + * @param string $data gzip-encoded (presumably) data + * + * @return bool + */ + public static function hasGzipIdentification($data) + { + return 0 === strcmp(substr($data, 0, 2), "\x1f\x8b"); + } + + /** + * Tries to parse GZIP format header in the given string + * + * If the header conforms to RFC 1952, its length is returned. If any + * sanity check fails, HTTP_Request2_MessageException is thrown. + * + * Note: This function might be usable outside of HTTP_Request2 so it might + * be good idea to be moved to some common package. (Delian Krustev) + * + * @param string $data Either the complete response body or + * the leading part of it + * @param boolean $dataComplete Whether $data contains complete response body + * + * @return int gzip header length in bytes + * @throws HTTP_Request2_MessageException + * @link http://tools.ietf.org/html/rfc1952 + */ + public static function parseGzipHeader($data, $dataComplete = false) + { + // if data is complete, trailing 8 bytes should be present for size and crc32 + $length = strlen($data) - ($dataComplete ? 8 : 0); + + if ($length < 10 || !self::hasGzipIdentification($data)) { + throw new HTTP_Request2_MessageException( + 'The data does not seem to contain a valid gzip header', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + + $method = ord(substr($data, 2, 1)); + if (8 != $method) { + throw new HTTP_Request2_MessageException( + 'Error parsing gzip header: unknown compression method', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + $flags = ord(substr($data, 3, 1)); + if ($flags & 224) { + throw new HTTP_Request2_MessageException( + 'Error parsing gzip header: reserved bits are set', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + + // header is 10 bytes minimum. may be longer, though. + $headerLength = 10; + // extra fields, need to skip 'em + if ($flags & 4) { + if ($length - $headerLength - 2 < 0) { + throw new HTTP_Request2_MessageException( + 'Error parsing gzip header: data too short', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + $extraLength = unpack('v', substr($data, 10, 2)); + if ($length - $headerLength - 2 - $extraLength[1] < 0) { + throw new HTTP_Request2_MessageException( + 'Error parsing gzip header: data too short', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + $headerLength += $extraLength[1] + 2; + } + // file name, need to skip that + if ($flags & 8) { + if ($length - $headerLength - 1 < 0) { + throw new HTTP_Request2_MessageException( + 'Error parsing gzip header: data too short', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + $filenameLength = strpos(substr($data, $headerLength), chr(0)); + if (false === $filenameLength + || $length - $headerLength - $filenameLength - 1 < 0 + ) { + throw new HTTP_Request2_MessageException( + 'Error parsing gzip header: data too short', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + $headerLength += $filenameLength + 1; + } + // comment, need to skip that also + if ($flags & 16) { + if ($length - $headerLength - 1 < 0) { + throw new HTTP_Request2_MessageException( + 'Error parsing gzip header: data too short', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + $commentLength = strpos(substr($data, $headerLength), chr(0)); + if (false === $commentLength + || $length - $headerLength - $commentLength - 1 < 0 + ) { + throw new HTTP_Request2_MessageException( + 'Error parsing gzip header: data too short', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + $headerLength += $commentLength + 1; + } + // have a CRC for header. let's check + if ($flags & 2) { + if ($length - $headerLength - 2 < 0) { + throw new HTTP_Request2_MessageException( + 'Error parsing gzip header: data too short', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + $crcReal = 0xffff & crc32(substr($data, 0, $headerLength)); + $crcStored = unpack('v', substr($data, $headerLength, 2)); + if ($crcReal != $crcStored[1]) { + throw new HTTP_Request2_MessageException( + 'Header CRC check failed', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + $headerLength += 2; + } + return $headerLength; + } + + /** + * Decodes the message-body encoded by gzip + * + * The real decoding work is done by gzinflate() built-in function, this + * method only parses the header and checks data for compliance with + * RFC 1952 + * + * @param string $data gzip-encoded data + * + * @return string decoded data + * @throws HTTP_Request2_LogicException + * @throws HTTP_Request2_MessageException + * @link http://tools.ietf.org/html/rfc1952 + */ + public static function decodeGzip($data) + { + // If it doesn't look like gzip-encoded data, don't bother + if (!self::hasGzipIdentification($data)) { + return $data; + } + if (!function_exists('gzinflate')) { + throw new HTTP_Request2_LogicException( + 'Unable to decode body: gzip extension not available', + HTTP_Request2_Exception::MISCONFIGURATION + ); + } + + // unpacked data CRC and size at the end of encoded data + $tmp = unpack('V2', substr($data, -8)); + $dataCrc = $tmp[1]; + $dataSize = $tmp[2]; + + $headerLength = self::parseGzipHeader($data, true); + + // don't pass $dataSize to gzinflate, see bugs #13135, #14370 + $unpacked = gzinflate(substr($data, $headerLength, -8)); + if (false === $unpacked) { + throw new HTTP_Request2_MessageException( + 'gzinflate() call failed', + HTTP_Request2_Exception::DECODE_ERROR + ); + } elseif ($dataSize != strlen($unpacked)) { + throw new HTTP_Request2_MessageException( + 'Data size check failed', + HTTP_Request2_Exception::DECODE_ERROR + ); + } elseif ((0xffffffff & $dataCrc) != (0xffffffff & crc32($unpacked))) { + throw new HTTP_Request2_MessageException( + 'Data CRC check failed', + HTTP_Request2_Exception::DECODE_ERROR + ); + } + return $unpacked; + } + + /** + * Decodes the message-body encoded by deflate + * + * @param string $data deflate-encoded data + * + * @return string decoded data + * @throws HTTP_Request2_LogicException + */ + public static function decodeDeflate($data) + { + if (!function_exists('gzuncompress')) { + throw new HTTP_Request2_LogicException( + 'Unable to decode body: gzip extension not available', + HTTP_Request2_Exception::MISCONFIGURATION + ); + } + // RFC 2616 defines 'deflate' encoding as zlib format from RFC 1950, + // while many applications send raw deflate stream from RFC 1951. + // We should check for presence of zlib header and use gzuncompress() or + // gzinflate() as needed. See bug #15305 + $header = unpack('n', substr($data, 0, 2)); + return (0 == $header[1] % 31)? gzuncompress($data): gzinflate($data); + } +} ?> \ No newline at end of file diff --git a/bundled-libs/HTTP/Request2/SOCKS5.php b/bundled-libs/HTTP/Request2/SOCKS5.php index 0b86445c..2a782ced 100644 --- a/bundled-libs/HTTP/Request2/SOCKS5.php +++ b/bundled-libs/HTTP/Request2/SOCKS5.php @@ -1,135 +1,135 @@ -<?php -/** - * SOCKS5 proxy connection class - * - * PHP version 5 - * - * LICENSE - * - * This source file is subject to BSD 3-Clause License that is bundled - * with this package in the file LICENSE and available at the URL - * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @copyright 2008-2014 Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** Socket wrapper class used by Socket Adapter */ -require_once 'HTTP/Request2/SocketWrapper.php'; - -/** - * SOCKS5 proxy connection class (used by Socket Adapter) - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - * @link http://pear.php.net/bugs/bug.php?id=19332 - * @link http://tools.ietf.org/html/rfc1928 - */ -class HTTP_Request2_SOCKS5 extends HTTP_Request2_SocketWrapper -{ - /** - * Constructor, tries to connect and authenticate to a SOCKS5 proxy - * - * @param string $address Proxy address, e.g. 'tcp://localhost:1080' - * @param int $timeout Connection timeout (seconds) - * @param array $contextOptions Stream context options - * @param string $username Proxy user name - * @param string $password Proxy password - * - * @throws HTTP_Request2_LogicException - * @throws HTTP_Request2_ConnectionException - * @throws HTTP_Request2_MessageException - */ - public function __construct( - $address, $timeout = 10, array $contextOptions = array(), - $username = null, $password = null - ) { - parent::__construct($address, $timeout, $contextOptions); - - if (strlen($username)) { - $request = pack('C4', 5, 2, 0, 2); - } else { - $request = pack('C3', 5, 1, 0); - } - $this->write($request); - $response = unpack('Cversion/Cmethod', $this->read(3)); - if (5 != $response['version']) { - throw new HTTP_Request2_MessageException( - 'Invalid version received from SOCKS5 proxy: ' . $response['version'], - HTTP_Request2_Exception::MALFORMED_RESPONSE - ); - } - switch ($response['method']) { - case 2: - $this->performAuthentication($username, $password); - case 0: - break; - default: - throw new HTTP_Request2_ConnectionException( - "Connection rejected by proxy due to unsupported auth method" - ); - } - } - - /** - * Performs username/password authentication for SOCKS5 - * - * @param string $username Proxy user name - * @param string $password Proxy password - * - * @throws HTTP_Request2_ConnectionException - * @throws HTTP_Request2_MessageException - * @link http://tools.ietf.org/html/rfc1929 - */ - protected function performAuthentication($username, $password) - { - $request = pack('C2', 1, strlen($username)) . $username - . pack('C', strlen($password)) . $password; - - $this->write($request); - $response = unpack('Cvn/Cstatus', $this->read(3)); - if (1 != $response['vn'] || 0 != $response['status']) { - throw new HTTP_Request2_ConnectionException( - 'Connection rejected by proxy due to invalid username and/or password' - ); - } - } - - /** - * Connects to a remote host via proxy - * - * @param string $remoteHost Remote host - * @param int $remotePort Remote port - * - * @throws HTTP_Request2_ConnectionException - * @throws HTTP_Request2_MessageException - */ - public function connect($remoteHost, $remotePort) - { - $request = pack('C5', 0x05, 0x01, 0x00, 0x03, strlen($remoteHost)) - . $remoteHost . pack('n', $remotePort); - - $this->write($request); - $response = unpack('Cversion/Creply/Creserved', $this->read(1024)); - if (5 != $response['version'] || 0 != $response['reserved']) { - throw new HTTP_Request2_MessageException( - 'Invalid response received from SOCKS5 proxy', - HTTP_Request2_Exception::MALFORMED_RESPONSE - ); - } elseif (0 != $response['reply']) { - throw new HTTP_Request2_ConnectionException( - "Unable to connect to {$remoteHost}:{$remotePort} through SOCKS5 proxy", - 0, $response['reply'] - ); - } - } -} +<?php +/** + * SOCKS5 proxy connection class + * + * PHP version 5 + * + * LICENSE + * + * This source file is subject to BSD 3-Clause License that is bundled + * with this package in the file LICENSE and available at the URL + * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @copyright 2008-2016 Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** Socket wrapper class used by Socket Adapter */ +require_once 'HTTP/Request2/SocketWrapper.php'; + +/** + * SOCKS5 proxy connection class (used by Socket Adapter) + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + * @link http://pear.php.net/bugs/bug.php?id=19332 + * @link http://tools.ietf.org/html/rfc1928 + */ +class HTTP_Request2_SOCKS5 extends HTTP_Request2_SocketWrapper +{ + /** + * Constructor, tries to connect and authenticate to a SOCKS5 proxy + * + * @param string $address Proxy address, e.g. 'tcp://localhost:1080' + * @param int $timeout Connection timeout (seconds) + * @param array $contextOptions Stream context options + * @param string $username Proxy user name + * @param string $password Proxy password + * + * @throws HTTP_Request2_LogicException + * @throws HTTP_Request2_ConnectionException + * @throws HTTP_Request2_MessageException + */ + public function __construct( + $address, $timeout = 10, array $contextOptions = array(), + $username = null, $password = null + ) { + parent::__construct($address, $timeout, $contextOptions); + + if (strlen($username)) { + $request = pack('C4', 5, 2, 0, 2); + } else { + $request = pack('C3', 5, 1, 0); + } + $this->write($request); + $response = unpack('Cversion/Cmethod', $this->read(3)); + if (5 != $response['version']) { + throw new HTTP_Request2_MessageException( + 'Invalid version received from SOCKS5 proxy: ' . $response['version'], + HTTP_Request2_Exception::MALFORMED_RESPONSE + ); + } + switch ($response['method']) { + case 2: + $this->performAuthentication($username, $password); + case 0: + break; + default: + throw new HTTP_Request2_ConnectionException( + "Connection rejected by proxy due to unsupported auth method" + ); + } + } + + /** + * Performs username/password authentication for SOCKS5 + * + * @param string $username Proxy user name + * @param string $password Proxy password + * + * @throws HTTP_Request2_ConnectionException + * @throws HTTP_Request2_MessageException + * @link http://tools.ietf.org/html/rfc1929 + */ + protected function performAuthentication($username, $password) + { + $request = pack('C2', 1, strlen($username)) . $username + . pack('C', strlen($password)) . $password; + + $this->write($request); + $response = unpack('Cvn/Cstatus', $this->read(3)); + if (1 != $response['vn'] || 0 != $response['status']) { + throw new HTTP_Request2_ConnectionException( + 'Connection rejected by proxy due to invalid username and/or password' + ); + } + } + + /** + * Connects to a remote host via proxy + * + * @param string $remoteHost Remote host + * @param int $remotePort Remote port + * + * @throws HTTP_Request2_ConnectionException + * @throws HTTP_Request2_MessageException + */ + public function connect($remoteHost, $remotePort) + { + $request = pack('C5', 0x05, 0x01, 0x00, 0x03, strlen($remoteHost)) + . $remoteHost . pack('n', $remotePort); + + $this->write($request); + $response = unpack('Cversion/Creply/Creserved', $this->read(1024)); + if (5 != $response['version'] || 0 != $response['reserved']) { + throw new HTTP_Request2_MessageException( + 'Invalid response received from SOCKS5 proxy', + HTTP_Request2_Exception::MALFORMED_RESPONSE + ); + } elseif (0 != $response['reply']) { + throw new HTTP_Request2_ConnectionException( + "Unable to connect to {$remoteHost}:{$remotePort} through SOCKS5 proxy", + 0, $response['reply'] + ); + } + } +} ?> \ No newline at end of file diff --git a/bundled-libs/HTTP/Request2/SocketWrapper.php b/bundled-libs/HTTP/Request2/SocketWrapper.php index 388c1b65..2cf4257d 100644 --- a/bundled-libs/HTTP/Request2/SocketWrapper.php +++ b/bundled-libs/HTTP/Request2/SocketWrapper.php @@ -1,297 +1,320 @@ -<?php -/** - * Socket wrapper class used by Socket Adapter - * - * PHP version 5 - * - * LICENSE - * - * This source file is subject to BSD 3-Clause License that is bundled - * with this package in the file LICENSE and available at the URL - * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @copyright 2008-2014 Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @link http://pear.php.net/package/HTTP_Request2 - */ - -/** Exception classes for HTTP_Request2 package */ -require_once 'HTTP/Request2/Exception.php'; - -/** - * Socket wrapper class used by Socket Adapter - * - * Needed to properly handle connection errors, global timeout support and - * similar things. Loosely based on Net_Socket used by older HTTP_Request. - * - * @category HTTP - * @package HTTP_Request2 - * @author Alexey Borzov <avb@php.net> - * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License - * @version Release: 2.2.1 - * @link http://pear.php.net/package/HTTP_Request2 - * @link http://pear.php.net/bugs/bug.php?id=19332 - * @link http://tools.ietf.org/html/rfc1928 - */ -class HTTP_Request2_SocketWrapper -{ - /** - * PHP warning messages raised during stream_socket_client() call - * @var array - */ - protected $connectionWarnings = array(); - - /** - * Connected socket - * @var resource - */ - protected $socket; - - /** - * Sum of start time and global timeout, exception will be thrown if request continues past this time - * @var integer - */ - protected $deadline; - - /** - * Global timeout value, mostly for exception messages - * @var integer - */ - protected $timeout; - - /** - * Class constructor, tries to establish connection - * - * @param string $address Address for stream_socket_client() call, - * e.g. 'tcp://localhost:80' - * @param int $timeout Connection timeout (seconds) - * @param array $contextOptions Context options - * - * @throws HTTP_Request2_LogicException - * @throws HTTP_Request2_ConnectionException - */ - public function __construct($address, $timeout, array $contextOptions = array()) - { - if (!empty($contextOptions) - && !isset($contextOptions['socket']) && !isset($contextOptions['ssl']) - ) { - // Backwards compatibility with 2.1.0 and 2.1.1 releases - $contextOptions = array('ssl' => $contextOptions); - } - $context = stream_context_create(); - foreach ($contextOptions as $wrapper => $options) { - foreach ($options as $name => $value) { - if (!stream_context_set_option($context, $wrapper, $name, $value)) { - throw new HTTP_Request2_LogicException( - "Error setting '{$wrapper}' wrapper context option '{$name}'" - ); - } - } - } - set_error_handler(array($this, 'connectionWarningsHandler')); - $this->socket = stream_socket_client( - $address, $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $context - ); - restore_error_handler(); - // if we fail to bind to a specified local address (see request #19515), - // connection still succeeds, albeit with a warning. Throw an Exception - // with the warning text in this case as that connection is unlikely - // to be what user wants and as Curl throws an error in similar case. - if ($this->connectionWarnings) { - if ($this->socket) { - fclose($this->socket); - } - $error = $errstr ? $errstr : implode("\n", $this->connectionWarnings); - throw new HTTP_Request2_ConnectionException( - "Unable to connect to {$address}. Error: {$error}", 0, $errno - ); - } - } - - /** - * Destructor, disconnects socket - */ - public function __destruct() - { - fclose($this->socket); - } - - /** - * Wrapper around fread(), handles global request timeout - * - * @param int $length Reads up to this number of bytes - * - * @return string Data read from socket - * @throws HTTP_Request2_MessageException In case of timeout - */ - public function read($length) - { - if ($this->deadline) { - stream_set_timeout($this->socket, max($this->deadline - time(), 1)); - } - $data = fread($this->socket, $length); - $this->checkTimeout(); - return $data; - } - - /** - * Reads until either the end of the socket or a newline, whichever comes first - * - * Strips the trailing newline from the returned data, handles global - * request timeout. Method idea borrowed from Net_Socket PEAR package. - * - * @param int $bufferSize buffer size to use for reading - * @param int $localTimeout timeout value to use just for this call - * (used when waiting for "100 Continue" response) - * - * @return string Available data up to the newline (not including newline) - * @throws HTTP_Request2_MessageException In case of timeout - */ - public function readLine($bufferSize, $localTimeout = null) - { - $line = ''; - while (!feof($this->socket)) { - if (null !== $localTimeout) { - stream_set_timeout($this->socket, $localTimeout); - } elseif ($this->deadline) { - stream_set_timeout($this->socket, max($this->deadline - time(), 1)); - } - - $line .= @fgets($this->socket, $bufferSize); - - if (null === $localTimeout) { - $this->checkTimeout(); - - } else { - $info = stream_get_meta_data($this->socket); - // reset socket timeout if we don't have request timeout specified, - // prevents further calls failing with a bogus Exception - if (!$this->deadline) { - $default = (int)@ini_get('default_socket_timeout'); - stream_set_timeout($this->socket, $default > 0 ? $default : PHP_INT_MAX); - } - if ($info['timed_out']) { - throw new HTTP_Request2_MessageException( - "readLine() call timed out", HTTP_Request2_Exception::TIMEOUT - ); - } - } - if (substr($line, -1) == "\n") { - return rtrim($line, "\r\n"); - } - } - return $line; - } - - /** - * Wrapper around fwrite(), handles global request timeout - * - * @param string $data String to be written - * - * @return int - * @throws HTTP_Request2_MessageException - */ - public function write($data) - { - if ($this->deadline) { - stream_set_timeout($this->socket, max($this->deadline - time(), 1)); - } - $written = fwrite($this->socket, $data); - $this->checkTimeout(); - // http://www.php.net/manual/en/function.fwrite.php#96951 - if ($written < strlen($data)) { - throw new HTTP_Request2_MessageException('Error writing request'); - } - return $written; - } - - /** - * Tests for end-of-file on a socket - * - * @return bool - */ - public function eof() - { - return feof($this->socket); - } - - /** - * Sets request deadline - * - * @param int $deadline Exception will be thrown if request continues - * past this time - * @param int $timeout Original request timeout value, to use in - * Exception message - */ - public function setDeadline($deadline, $timeout) - { - $this->deadline = $deadline; - $this->timeout = $timeout; - } - - /** - * Turns on encryption on a socket - * - * @throws HTTP_Request2_ConnectionException - */ - public function enableCrypto() - { - $modes = array( - STREAM_CRYPTO_METHOD_TLS_CLIENT, - STREAM_CRYPTO_METHOD_SSLv3_CLIENT, - STREAM_CRYPTO_METHOD_SSLv23_CLIENT, - STREAM_CRYPTO_METHOD_SSLv2_CLIENT - ); - - foreach ($modes as $mode) { - if (stream_socket_enable_crypto($this->socket, true, $mode)) { - return; - } - } - throw new HTTP_Request2_ConnectionException( - 'Failed to enable secure connection when connecting through proxy' - ); - } - - /** - * Throws an Exception if stream timed out - * - * @throws HTTP_Request2_MessageException - */ - protected function checkTimeout() - { - $info = stream_get_meta_data($this->socket); - if ($info['timed_out'] || $this->deadline && time() > $this->deadline) { - $reason = $this->deadline - ? "after {$this->timeout} second(s)" - : 'due to default_socket_timeout php.ini setting'; - throw new HTTP_Request2_MessageException( - "Request timed out {$reason}", HTTP_Request2_Exception::TIMEOUT - ); - } - } - - /** - * Error handler to use during stream_socket_client() call - * - * One stream_socket_client() call may produce *multiple* PHP warnings - * (especially OpenSSL-related), we keep them in an array to later use for - * the message of HTTP_Request2_ConnectionException - * - * @param int $errno error level - * @param string $errstr error message - * - * @return bool - */ - protected function connectionWarningsHandler($errno, $errstr) - { - if ($errno & E_WARNING) { - array_unshift($this->connectionWarnings, $errstr); - } - return true; - } -} -?> +<?php +/** + * Socket wrapper class used by Socket Adapter + * + * PHP version 5 + * + * LICENSE + * + * This source file is subject to BSD 3-Clause License that is bundled + * with this package in the file LICENSE and available at the URL + * https://raw.github.com/pear/HTTP_Request2/trunk/docs/LICENSE + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @copyright 2008-2016 Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @link http://pear.php.net/package/HTTP_Request2 + */ + +/** Exception classes for HTTP_Request2 package */ +require_once 'HTTP/Request2/Exception.php'; + +/** + * Socket wrapper class used by Socket Adapter + * + * Needed to properly handle connection errors, global timeout support and + * similar things. Loosely based on Net_Socket used by older HTTP_Request. + * + * @category HTTP + * @package HTTP_Request2 + * @author Alexey Borzov <avb@php.net> + * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License + * @version Release: 2.3.0 + * @link http://pear.php.net/package/HTTP_Request2 + * @link http://pear.php.net/bugs/bug.php?id=19332 + * @link http://tools.ietf.org/html/rfc1928 + */ +class HTTP_Request2_SocketWrapper +{ + /** + * PHP warning messages raised during stream_socket_client() call + * @var array + */ + protected $connectionWarnings = array(); + + /** + * Connected socket + * @var resource + */ + protected $socket; + + /** + * Sum of start time and global timeout, exception will be thrown if request continues past this time + * @var integer + */ + protected $deadline; + + /** + * Global timeout value, mostly for exception messages + * @var integer + */ + protected $timeout; + + /** + * Class constructor, tries to establish connection + * + * @param string $address Address for stream_socket_client() call, + * e.g. 'tcp://localhost:80' + * @param int $timeout Connection timeout (seconds) + * @param array $contextOptions Context options + * + * @throws HTTP_Request2_LogicException + * @throws HTTP_Request2_ConnectionException + */ + public function __construct($address, $timeout, array $contextOptions = array()) + { + if (!empty($contextOptions) + && !isset($contextOptions['socket']) && !isset($contextOptions['ssl']) + ) { + // Backwards compatibility with 2.1.0 and 2.1.1 releases + $contextOptions = array('ssl' => $contextOptions); + } + if (isset($contextOptions['ssl'])) { + $contextOptions['ssl'] += array( + // Using "Intermediate compatibility" cipher bundle from + // https://wiki.mozilla.org/Security/Server_Side_TLS + 'ciphers' => 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:' + . 'ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:' + . 'DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:' + . 'ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:' + . 'ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:' + . 'ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:' + . 'ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:' + . 'DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:' + . 'DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:' + . 'ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:' + . 'AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:' + . 'AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:' + . '!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA' + ); + if (version_compare(phpversion(), '5.4.13', '>=')) { + $contextOptions['ssl']['disable_compression'] = true; + if (version_compare(phpversion(), '5.6', '>=')) { + $contextOptions['ssl']['crypto_method'] = STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT + | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT; + } + } + } + $context = stream_context_create(); + foreach ($contextOptions as $wrapper => $options) { + foreach ($options as $name => $value) { + if (!stream_context_set_option($context, $wrapper, $name, $value)) { + throw new HTTP_Request2_LogicException( + "Error setting '{$wrapper}' wrapper context option '{$name}'" + ); + } + } + } + set_error_handler(array($this, 'connectionWarningsHandler')); + $this->socket = stream_socket_client( + $address, $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $context + ); + restore_error_handler(); + // if we fail to bind to a specified local address (see request #19515), + // connection still succeeds, albeit with a warning. Throw an Exception + // with the warning text in this case as that connection is unlikely + // to be what user wants and as Curl throws an error in similar case. + if ($this->connectionWarnings) { + if ($this->socket) { + fclose($this->socket); + } + $error = $errstr ? $errstr : implode("\n", $this->connectionWarnings); + throw new HTTP_Request2_ConnectionException( + "Unable to connect to {$address}. Error: {$error}", 0, $errno + ); + } + } + + /** + * Destructor, disconnects socket + */ + public function __destruct() + { + fclose($this->socket); + } + + /** + * Wrapper around fread(), handles global request timeout + * + * @param int $length Reads up to this number of bytes + * + * @return string Data read from socket + * @throws HTTP_Request2_MessageException In case of timeout + */ + public function read($length) + { + if ($this->deadline) { + stream_set_timeout($this->socket, max($this->deadline - time(), 1)); + } + $data = fread($this->socket, $length); + $this->checkTimeout(); + return $data; + } + + /** + * Reads until either the end of the socket or a newline, whichever comes first + * + * Strips the trailing newline from the returned data, handles global + * request timeout. Method idea borrowed from Net_Socket PEAR package. + * + * @param int $bufferSize buffer size to use for reading + * @param int $localTimeout timeout value to use just for this call + * (used when waiting for "100 Continue" response) + * + * @return string Available data up to the newline (not including newline) + * @throws HTTP_Request2_MessageException In case of timeout + */ + public function readLine($bufferSize, $localTimeout = null) + { + $line = ''; + while (!feof($this->socket)) { + if (null !== $localTimeout) { + stream_set_timeout($this->socket, $localTimeout); + } elseif ($this->deadline) { + stream_set_timeout($this->socket, max($this->deadline - time(), 1)); + } + + $line .= @fgets($this->socket, $bufferSize); + + if (null === $localTimeout) { + $this->checkTimeout(); + + } else { + $info = stream_get_meta_data($this->socket); + // reset socket timeout if we don't have request timeout specified, + // prevents further calls failing with a bogus Exception + if (!$this->deadline) { + $default = (int)@ini_get('default_socket_timeout'); + stream_set_timeout($this->socket, $default > 0 ? $default : PHP_INT_MAX); + } + if ($info['timed_out']) { + throw new HTTP_Request2_MessageException( + "readLine() call timed out", HTTP_Request2_Exception::TIMEOUT + ); + } + } + if (substr($line, -1) == "\n") { + return rtrim($line, "\r\n"); + } + } + return $line; + } + + /** + * Wrapper around fwrite(), handles global request timeout + * + * @param string $data String to be written + * + * @return int + * @throws HTTP_Request2_MessageException + */ + public function write($data) + { + if ($this->deadline) { + stream_set_timeout($this->socket, max($this->deadline - time(), 1)); + } + $written = fwrite($this->socket, $data); + $this->checkTimeout(); + // http://www.php.net/manual/en/function.fwrite.php#96951 + if ($written < strlen($data)) { + throw new HTTP_Request2_MessageException('Error writing request'); + } + return $written; + } + + /** + * Tests for end-of-file on a socket + * + * @return bool + */ + public function eof() + { + return feof($this->socket); + } + + /** + * Sets request deadline + * + * @param int $deadline Exception will be thrown if request continues + * past this time + * @param int $timeout Original request timeout value, to use in + * Exception message + */ + public function setDeadline($deadline, $timeout) + { + $this->deadline = $deadline; + $this->timeout = $timeout; + } + + /** + * Turns on encryption on a socket + * + * @throws HTTP_Request2_ConnectionException + */ + public function enableCrypto() + { + if (version_compare(phpversion(), '5.6', '<')) { + $cryptoMethod = STREAM_CRYPTO_METHOD_TLS_CLIENT; + } else { + $cryptoMethod = STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT + | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT; + } + + if (!stream_socket_enable_crypto($this->socket, true, $cryptoMethod)) { + throw new HTTP_Request2_ConnectionException( + 'Failed to enable secure connection when connecting through proxy' + ); + } + } + + /** + * Throws an Exception if stream timed out + * + * @throws HTTP_Request2_MessageException + */ + protected function checkTimeout() + { + $info = stream_get_meta_data($this->socket); + if ($info['timed_out'] || $this->deadline && time() > $this->deadline) { + $reason = $this->deadline + ? "after {$this->timeout} second(s)" + : 'due to default_socket_timeout php.ini setting'; + throw new HTTP_Request2_MessageException( + "Request timed out {$reason}", HTTP_Request2_Exception::TIMEOUT + ); + } + } + + /** + * Error handler to use during stream_socket_client() call + * + * One stream_socket_client() call may produce *multiple* PHP warnings + * (especially OpenSSL-related), we keep them in an array to later use for + * the message of HTTP_Request2_ConnectionException + * + * @param int $errno error level + * @param string $errstr error message + * + * @return bool + */ + protected function connectionWarningsHandler($errno, $errstr) + { + if ($errno & E_WARNING) { + array_unshift($this->connectionWarnings, $errstr); + } + return true; + } +} +?> diff --git a/bundled-libs/Net/DNS2.php b/bundled-libs/Net/DNS2.php new file mode 100644 index 00000000..7a1ef2f4 --- /dev/null +++ b/bundled-libs/Net/DNS2.php @@ -0,0 +1,1427 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/* + * register the auto-load function + * + */ +spl_autoload_register('Net_DNS2::autoload'); + +/** + * This is the base class for the Net_DNS2_Resolver and Net_DNS2_Updater + * classes. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Resolver, Net_DNS2_Updater + * + */ +class Net_DNS2 +{ + /* + * the current version of this library + */ + const VERSION = '1.4.3'; + + /* + * the default path to a resolv.conf file + */ + const RESOLV_CONF = '/etc/resolv.conf'; + + /* + * override options from the resolv.conf file + * + * if this is set, then certain values from the resolv.conf file will override + * local settings. This is disabled by default to remain backwards compatible. + * + */ + public $use_resolv_options = false; + + /* + * use TCP only (true/false) + */ + public $use_tcp = false; + + /* + * DNS Port to use (53) + */ + public $dns_port = 53; + + /* + * the ip/port for use as a local socket + */ + public $local_host = ''; + public $local_port = 0; + + /* + * timeout value for socket connections + */ + public $timeout = 5; + + /* + * randomize the name servers list + */ + public $ns_random = false; + + /* + * default domains + */ + public $domain = ''; + + /* + * domain search list - not actually used right now + */ + public $search_list = array(); + + /* + * enable cache; either "shared", "file" or "none" + */ + public $cache_type = 'none'; + + /* + * file name to use for shared memory segment or file cache + */ + public $cache_file = '/tmp/net_dns2.cache'; + + /* + * the max size of the cache file (in bytes) + */ + public $cache_size = 50000; + + /* + * the method to use for storing cache data; either "serialize" or "json" + * + * json is faster, but can't remember the class names (everything comes back + * as a "stdClass Object"; all the data is the same though. serialize is + * slower, but will have all the class info. + * + * defaults to 'serialize' + */ + public $cache_serializer = 'serialize'; + + /* + * by default, according to RFC 1034 + * + * CNAME RRs cause special action in DNS software. When a name server + * fails to find a desired RR in the resource set associated with the + * domain name, it checks to see if the resource set consists of a CNAME + * record with a matching class. If so, the name server includes the CNAME + * record in the response and restarts the query at the domain name + * specified in the data field of the CNAME record. + * + * this can cause "unexpected" behavious, since i'm sure *most* people + * don't know DNS does this; there may be cases where Net_DNS2 returns a + * positive response, even though the hostname the user looked up did not + * actually exist. + * + * strict_query_mode means that if the hostname that was looked up isn't + * actually in the answer section of the response, Net_DNS2 will return an + * empty answer section, instead of an answer section that could contain + * CNAME records. + * + */ + public $strict_query_mode = false; + + /* + * if we should set the recursion desired bit to 1 or 0. + * + * by default this is set to true, we want the DNS server to perform a recursive + * request. If set to false, the RD bit will be set to 0, and the server will + * not perform recursion on the request. + */ + public $recurse = true; + + /* + * request DNSSEC values, by setting the DO flag to 1; this actually makes + * the resolver add a OPT RR to the additional section, and sets the DO flag + * in this RR to 1 + * + */ + public $dnssec = false; + + /* + * set the DNSSEC AD (Authentic Data) bit on/off; the AD bit on the request + * side was previously undefined, and resolvers we instructed to always clear + * the AD bit when sending a request. + * + * RFC6840 section 5.7 defines setting the AD bit in the query as a signal to + * the server that it wants the value of the AD bit, without needed to request + * all the DNSSEC data via the DO bit. + * + */ + public $dnssec_ad_flag = false; + + /* + * set the DNSSEC CD (Checking Disabled) bit on/off; turning this off, means + * that the DNS resolver will perform it's own signature validation- so the DNS + * servers simply pass through all the details. + * + */ + public $dnssec_cd_flag = false; + + /* + * the EDNS(0) UDP payload size to use when making DNSSEC requests + * see RFC 4035 section 4.1 - EDNS Support. + * + * there is some different ideas on the suggest size to supprt; but it seems to + * be "at least 1220 bytes, but SHOULD support 4000 bytes. + * + * we'll just support 4000 + * + */ + public $dnssec_payload_size = 4000; + + /* + * the last exeception that was generated + */ + public $last_exception = null; + + /* + * the list of exceptions by name server + */ + public $last_exception_list = array(); + + /* + * name server list + */ + public $nameservers = array(); + + /* + * local sockets + */ + protected $sock = array(Net_DNS2_Socket::SOCK_DGRAM => array(), Net_DNS2_Socket::SOCK_STREAM => array()); + + /* + * if the socket extension is loaded + */ + protected $sockets_enabled = false; + + /* + * the TSIG or SIG RR object for authentication + */ + protected $auth_signature = null; + + /* + * the shared memory segment id for the local cache + */ + protected $cache = null; + + /* + * internal setting for enabling cache + */ + protected $use_cache = false; + + /** + * Constructor - base constructor for the Resolver and Updater + * + * @param mixed $options array of options or null for none + * + * @throws Net_DNS2_Exception + * @access public + * + */ + public function __construct(array $options = null) + { + // + // check for the sockets extension; we no longer support the sockets library under + // windows- there have been too many errors related to sockets under windows- + // specifically inconsistent socket defines between versions of windows- + // + // and since I can't seem to find a way to get the actual windows version, it + // doesn't seem fixable in the code. + // + if ( (extension_loaded('sockets') == true) && (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') ) { + + $this->sockets_enabled = true; + } + + // + // load any options that were provided + // + if (!empty($options)) { + + foreach ($options as $key => $value) { + + if ($key == 'nameservers') { + + $this->setServers($value); + } else { + + $this->$key = $value; + } + } + } + + // + // if we're set to use the local shared memory cache, then + // make sure it's been initialized + // + switch($this->cache_type) { + case 'shared': + if (extension_loaded('shmop')) { + + $this->cache = new Net_DNS2_Cache_Shm; + $this->use_cache = true; + } else { + + throw new Net_DNS2_Exception( + 'shmop library is not available for cache', + Net_DNS2_Lookups::E_CACHE_SHM_UNAVAIL + ); + } + break; + case 'file': + + $this->cache = new Net_DNS2_Cache_File; + $this->use_cache = true; + + break; + case 'none': + $this->use_cache = false; + break; + default: + + throw new Net_DNS2_Exception( + 'un-supported cache type: ' . $this->cache_type, + Net_DNS2_Lookups::E_CACHE_UNSUPPORTED + ); + } + } + + /** + * autoload call-back function; used to auto-load classes + * + * @param string $name the name of the class + * + * @return void + * @access public + * + */ + static public function autoload($name) + { + // + // only auto-load our classes + // + if (strncmp($name, 'Net_DNS2', 8) == 0) { + + include str_replace('_', '/', $name) . '.php'; + } + + return; + } + + /** + * sets the name servers to be used + * + * @param mixed $nameservers either an array of name servers, or a file name + * to parse, assuming it's in the resolv.conf format + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function setServers($nameservers) + { + // + // if it's an array, then use it directly + // + // otherwise, see if it's a path to a resolv.conf file and if so, load it + // + if (is_array($nameservers)) { + + $this->nameservers = $nameservers; + + } else { + + // + // temporary list of name servers; do it this way rather than just + // resetting the local nameservers value, just incase an exception + // is thrown here; this way we might avoid ending up with an empty + // namservers list. + // + $ns = array(); + + // + // check to see if the file is readable + // + if (is_readable($nameservers) === true) { + + $data = file_get_contents($nameservers); + if ($data === false) { + throw new Net_DNS2_Exception( + 'failed to read contents of file: ' . $nameservers, + Net_DNS2_Lookups::E_NS_INVALID_FILE + ); + } + + $lines = explode("\n", $data); + + foreach ($lines as $line) { + + $line = trim($line); + + // + // ignore empty lines, and lines that are commented out + // + if ( (strlen($line) == 0) + || ($line[0] == '#') + || ($line[0] == ';') + ) { + continue; + } + + // + // ignore lines with no spaces in them. + // + if (strpos($line, ' ') === false) { + continue; + } + + list($key, $value) = preg_split('/\s+/', $line, 2); + + $key = trim(strtolower($key)); + $value = trim(strtolower($value)); + + switch($key) { + case 'nameserver': + + // + // nameserver can be a IPv4 or IPv6 address + // + if ( (self::isIPv4($value) == true) + || (self::isIPv6($value) == true) + ) { + + $ns[] = $value; + } else { + + throw new Net_DNS2_Exception( + 'invalid nameserver entry: ' . $value, + Net_DNS2_Lookups::E_NS_INVALID_ENTRY + ); + } + break; + + case 'domain': + $this->domain = $value; + break; + + case 'search': + $this->search_list = preg_split('/\s+/', $value); + break; + + case 'options': + $this->parseOptions($value); + break; + + default: + ; + } + } + + // + // if we don't have a domain, but we have a search list, then + // take the first entry on the search list as the domain + // + if ( (strlen($this->domain) == 0) + && (count($this->search_list) > 0) + ) { + $this->domain = $this->search_list[0]; + } + + } else { + throw new Net_DNS2_Exception( + 'resolver file file provided is not readable: ' . $nameservers, + Net_DNS2_Lookups::E_NS_INVALID_FILE + ); + } + + // + // store the name servers locally + // + if (count($ns) > 0) { + $this->nameservers = $ns; + } + } + + // + // remove any duplicates; not sure if we should bother with this- if people + // put duplicate name servers, who I am to stop them? + // + $this->nameservers = array_unique($this->nameservers); + + // + // check the name servers + // + $this->checkServers(); + + return true; + } + + /** + * parses the options line from a resolv.conf file; we don't support all the options + * yet, and using them is optional. + * + * @param string $value is the options string from the resolv.conf file. + * + * @return boolean + * @access private + * + */ + private function parseOptions($value) + { + // + // if overrides are disabled (the default), or the options list is empty for some + // reason, then we don't need to do any of this work. + // + if ( ($this->use_resolv_options == false) || (strlen($value) == 0) ) { + + return true; + } + + $options = preg_split('/\s+/', strtolower($value)); + + foreach ($options as $option) { + + // + // override the timeout value from the resolv.conf file. + // + if ( (strncmp($option, 'timeout', 7) == 0) && (strpos($option, ':') !== false) ) { + + list($key, $val) = explode(':', $option); + + if ( ($val > 0) && ($val <= 30) ) { + + $this->timeout = $val; + } + + // + // the rotate option just enabled the ns_random option + // + } else if (strncmp($option, 'rotate', 6) == 0) { + + $this->ns_random = true; + } + } + + return true; + } + + /** + * checks the list of name servers to make sure they're set + * + * @param mixed $default a path to a resolv.conf file or an array of servers. + * + * @return boolean + * @throws Net_DNS2_Exception + * @access protected + * + */ + protected function checkServers($default = null) + { + if (empty($this->nameservers)) { + + if (isset($default)) { + + $this->setServers($default); + } else { + + throw new Net_DNS2_Exception( + 'empty name servers list; you must provide a list of name '. + 'servers, or the path to a resolv.conf file.', + Net_DNS2_Lookups::E_NS_INVALID_ENTRY + ); + } + } + + return true; + } + + /** + * adds a TSIG RR object for authentication + * + * @param string $keyname the key name to use for the TSIG RR + * @param string $signature the key to sign the request. + * @param string $algorithm the algorithm to use + * + * @return boolean + * @access public + * @since function available since release 1.1.0 + * + */ + public function signTSIG( + $keyname, $signature = '', $algorithm = Net_DNS2_RR_TSIG::HMAC_MD5 + ) { + // + // if the TSIG was pre-created and passed in, then we can just used + // it as provided. + // + if ($keyname instanceof Net_DNS2_RR_TSIG) { + + $this->auth_signature = $keyname; + + } else { + + // + // otherwise create the TSIG RR, but don't add it just yet; TSIG needs + // to be added as the last additional entry- so we'll add it just + // before we send. + // + $this->auth_signature = Net_DNS2_RR::fromString( + strtolower(trim($keyname)) . + ' TSIG '. $signature + ); + + // + // set the algorithm to use + // + $this->auth_signature->algorithm = $algorithm; + } + + return true; + } + + /** + * adds a SIG RR object for authentication + * + * @param string $filename the name of a file to load the signature from. + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * @since function available since release 1.1.0 + * + */ + public function signSIG0($filename) + { + // + // check for OpenSSL + // + if (extension_loaded('openssl') === false) { + + throw new Net_DNS2_Exception( + 'the OpenSSL extension is required to use SIG(0).', + Net_DNS2_Lookups::E_OPENSSL_UNAVAIL + ); + } + + // + // if the SIG was pre-created, then use it as-is + // + if ($filename instanceof Net_DNS2_RR_SIG) { + + $this->auth_signature = $filename; + + } else { + + // + // otherwise, it's filename which needs to be parsed and processed. + // + $private = new Net_DNS2_PrivateKey($filename); + + // + // create a new Net_DNS2_RR_SIG object + // + $this->auth_signature = new Net_DNS2_RR_SIG(); + + // + // reset some values + // + $this->auth_signature->name = $private->signname; + $this->auth_signature->ttl = 0; + $this->auth_signature->class = 'ANY'; + + // + // these values are pulled from the private key + // + $this->auth_signature->algorithm = $private->algorithm; + $this->auth_signature->keytag = $private->keytag; + $this->auth_signature->signname = $private->signname; + + // + // these values are hard-coded for SIG0 + // + $this->auth_signature->typecovered = 'SIG0'; + $this->auth_signature->labels = 0; + $this->auth_signature->origttl = 0; + + // + // generate the dates + // + $t = time(); + + $this->auth_signature->sigincep = gmdate('YmdHis', $t); + $this->auth_signature->sigexp = gmdate('YmdHis', $t + 500); + + // + // store the private key in the SIG object for later. + // + $this->auth_signature->private_key = $private; + } + + // + // only RSA algorithms are supported for SIG(0) + // + switch($this->auth_signature->algorithm) { + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSAMD5: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA1: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA256: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA512: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_DSA: + break; + default: + throw new Net_DNS2_Exception( + 'only asymmetric algorithms work with SIG(0)!', + Net_DNS2_Lookups::E_OPENSSL_INV_ALGO + ); + } + + return true; + } + + /** + * a simple function to determine if the RR type is cacheable + * + * @param stream $_type the RR type string + * + * @return bool returns true/false if the RR type if cachable + * @access public + * + */ + public function cacheable($_type) + { + switch($_type) { + case 'AXFR': + case 'OPT': + return false; + } + + return true; + } + + /** + * PHP doesn't support unsigned integers, but many of the RR's return + * unsigned values (like SOA), so there is the possibility that the + * value will overrun on 32bit systems, and you'll end up with a + * negative value. + * + * 64bit systems are not affected, as their PHP_IN_MAX value should + * be 64bit (ie 9223372036854775807) + * + * This function returns a negative integer value, as a string, with + * the correct unsigned value. + * + * @param string $_int the unsigned integer value to check + * + * @return string returns the unsigned value as a string. + * @access public + * + */ + public static function expandUint32($_int) + { + if ( ($_int < 0) && (PHP_INT_MAX == 2147483647) ) { + return sprintf('%u', $_int); + } else { + return $_int; + } + } + + /** + * returns true/false if the given address is a valid IPv4 address + * + * @param string $_address the IPv4 address to check + * + * @return boolean returns true/false if the address is IPv4 address + * @access public + * + */ + public static function isIPv4($_address) + { + // + // use filter_var() if it's available; it's faster than preg + // + if (extension_loaded('filter') == true) { + + if (filter_var($_address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) == false) { + return false; + } + } else { + + // + // do the main check here; + // + if (inet_pton($_address) === false) { + return false; + } + + // + // then make sure we're not a IPv6 address + // + if (preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $_address) == 0) { + return false; + } + } + + return true; + } + + /** + * returns true/false if the given address is a valid IPv6 address + * + * @param string $_address the IPv6 address to check + * + * @return boolean returns true/false if the address is IPv6 address + * @access public + * + */ + public static function isIPv6($_address) + { + // + // use filter_var() if it's available; it's faster than preg + // + if (extension_loaded('filter') == true) { + if (filter_var($_address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) == false) { + return false; + } + } else { + + // + // do the main check here + // + if (inet_pton($_address) === false) { + return false; + } + + // + // then make sure it doesn't match a IPv4 address + // + if (preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/', $_address) == 1) { + return false; + } + } + + return true; + } + + /** + * formats the given IPv6 address as a fully expanded IPv6 address + * + * @param string $_address the IPv6 address to expand + * + * @return string the fully expanded IPv6 address + * @access public + * + */ + public static function expandIPv6($_address) + { + $hex = unpack('H*hex', inet_pton($_address)); + + return substr(preg_replace('/([A-f0-9]{4})/', "$1:", $hex['hex']), 0, -1); + } + + /** + * sends a standard Net_DNS2_Packet_Request packet + * + * @param Net_DNS2_Packet $request a Net_DNS2_Packet_Request object + * @param boolean $use_tcp true/false if the function should + * use TCP for the request + * + * @return mixed returns a Net_DNS2_Packet_Response object, or false on error + * @throws Net_DNS2_Exception + * @access protected + * + */ + protected function sendPacket(Net_DNS2_Packet $request, $use_tcp) + { + // + // get the data from the packet + // + $data = $request->get(); + if (strlen($data) < Net_DNS2_Lookups::DNS_HEADER_SIZE) { + + throw new Net_DNS2_Exception( + 'invalid or empty packet for sending!', + Net_DNS2_Lookups::E_PACKET_INVALID, + null, + $request + ); + } + + reset($this->nameservers); + + // + // randomize the name server list if it's asked for + // + if ($this->ns_random == true) { + + shuffle($this->nameservers); + } + + // + // loop so we can handle server errors + // + $response = null; + $ns = ''; + + while (1) { + + // + // grab the next DNS server + // + $ns = each($this->nameservers); + if ($ns === false) { + + if (is_null($this->last_exception) == false) { + + throw $this->last_exception; + } else { + + throw new Net_DNS2_Exception( + 'every name server provided has failed', + Net_DNS2_Lookups::E_NS_FAILED + ); + } + } + + $ns = $ns[1]; + + // + // if the use TCP flag (force TCP) is set, or the packet is bigger than our + // max allowed UDP size- which is either 512, or if this is DNSSEC request, + // then whatever the configured dnssec_payload_size is. + // + $max_udp_size = Net_DNS2_Lookups::DNS_MAX_UDP_SIZE; + if ($this->dnssec == true) + { + $max_udp_size = $this->dnssec_payload_size; + } + + if ( ($use_tcp == true) || (strlen($data) > $max_udp_size) ) { + + try + { + $response = $this->sendTCPRequest($ns, $data, ($request->question[0]->qtype == 'AXFR') ? true : false); + + } catch(Net_DNS2_Exception $e) { + + $this->last_exception = $e; + $this->last_exception_list[$ns] = $e; + + continue; + } + + // + // otherwise, send it using UDP + // + } else { + + try + { + $response = $this->sendUDPRequest($ns, $data); + + // + // check the packet header for a trucated bit; if it was truncated, + // then re-send the request as TCP. + // + if ($response->header->tc == 1) { + + $response = $this->sendTCPRequest($ns, $data); + } + + } catch(Net_DNS2_Exception $e) { + + $this->last_exception = $e; + $this->last_exception_list[$ns] = $e; + + continue; + } + } + + // + // make sure header id's match between the request and response + // + if ($request->header->id != $response->header->id) { + + $this->last_exception = new Net_DNS2_Exception( + + 'invalid header: the request and response id do not match.', + Net_DNS2_Lookups::E_HEADER_INVALID, + null, + $request, + $response + ); + + $this->last_exception_list[$ns] = $this->last_exception; + continue; + } + + // + // make sure the response is actually a response + // + // 0 = query, 1 = response + // + if ($response->header->qr != Net_DNS2_Lookups::QR_RESPONSE) { + + $this->last_exception = new Net_DNS2_Exception( + + 'invalid header: the response provided is not a response packet.', + Net_DNS2_Lookups::E_HEADER_INVALID, + null, + $request, + $response + ); + + $this->last_exception_list[$ns] = $this->last_exception; + continue; + } + + // + // make sure the response code in the header is ok + // + if ($response->header->rcode != Net_DNS2_Lookups::RCODE_NOERROR) { + + $this->last_exception = new Net_DNS2_Exception( + + 'DNS request failed: ' . + Net_DNS2_Lookups::$result_code_messages[$response->header->rcode], + $response->header->rcode, + null, + $request, + $response + ); + + $this->last_exception_list[$ns] = $this->last_exception; + continue; + } + + break; + } + + return $response; + } + + /** + * cleans up a failed socket and throws the given exception + * + * @param string $_proto the protocol of the socket + * @param string $_ns the name server to use for the request + * @param string $_error the error message to throw at the end of the function + * + * @throws Net_DNS2_Exception + * @access private + * + */ + private function generateError($_proto, $_ns, $_error) + { + if (isset($this->sock[$_proto][$_ns]) == false) + { + throw new Net_DNS2_Exception('invalid socket referenced', Net_DNS2_Lookups::E_NS_INVALID_SOCKET); + } + + // + // grab the last error message off the socket + // + $last_error = $this->sock[$_proto][$_ns]->last_error; + + // + // close it + // + $this->sock[$_proto][$_ns]->close(); + + // + // remove it from the socket cache + // + unset($this->sock[$_proto][$_ns]); + + // + // throw the error provided + // + throw new Net_DNS2_Exception($last_error, $_error); + } + + /** + * sends a DNS request using TCP + * + * @param string $_ns the name server to use for the request + * @param string $_data the raw DNS packet data + * @param boolean $_axfr if this is a zone transfer request + * + * @return Net_DNS2_Packet_Response the reponse object + * @throws Net_DNS2_Exception + * @access private + * + */ + private function sendTCPRequest($_ns, $_data, $_axfr = false) + { + // + // grab the start time + // + $start_time = microtime(true); + + // + // see if we already have an open socket from a previous request; if so, try to use + // that instead of opening a new one. + // + if ( (!isset($this->sock[Net_DNS2_Socket::SOCK_STREAM][$_ns])) + || (!($this->sock[Net_DNS2_Socket::SOCK_STREAM][$_ns] instanceof Net_DNS2_Socket)) + ) { + + // + // if the socket library is available, then use that + // + if ($this->sockets_enabled === true) { + + $this->sock[Net_DNS2_Socket::SOCK_STREAM][$_ns] = new Net_DNS2_Socket_Sockets( + Net_DNS2_Socket::SOCK_STREAM, $_ns, $this->dns_port, $this->timeout + ); + + // + // otherwise the streams library + // + } else { + + $this->sock[Net_DNS2_Socket::SOCK_STREAM][$_ns] = new Net_DNS2_Socket_Streams( + Net_DNS2_Socket::SOCK_STREAM, $_ns, $this->dns_port, $this->timeout + ); + } + + // + // if a local IP address / port is set, then add it + // + if (strlen($this->local_host) > 0) { + + $this->sock[Net_DNS2_Socket::SOCK_STREAM][$_ns]->bindAddress( + $this->local_host, $this->local_port + ); + } + + // + // open the socket + // + if ($this->sock[Net_DNS2_Socket::SOCK_STREAM][$_ns]->open() === false) { + + $this->generateError(Net_DNS2_Socket::SOCK_STREAM, $_ns, Net_DNS2_Lookups::E_NS_SOCKET_FAILED); + } + } + + // + // write the data to the socket; if it fails, continue on + // the while loop + // + if ($this->sock[Net_DNS2_Socket::SOCK_STREAM][$_ns]->write($_data) === false) { + + $this->generateError(Net_DNS2_Socket::SOCK_STREAM, $_ns, Net_DNS2_Lookups::E_NS_SOCKET_FAILED); + } + + // + // read the content, using select to wait for a response + // + $size = 0; + $result = null; + $response = null; + + // + // handle zone transfer requests differently than other requests. + // + if ($_axfr == true) { + + $soa_count = 0; + + while (1) { + + // + // read the data off the socket + // + $result = $this->sock[Net_DNS2_Socket::SOCK_STREAM][$_ns]->read($size, ($this->dnssec == true) ? $this->dnssec_payload_size : Net_DNS2_Lookups::DNS_MAX_UDP_SIZE); + if ( ($result === false) || ($size < Net_DNS2_Lookups::DNS_HEADER_SIZE) ) { + + // + // if we get an error, then keeping this socket around for a future request, could cause + // an error- for example, https://github.com/mikepultz/netdns2/issues/61 + // + // in this case, the connection was timing out, which once it did finally respond, left + // data on the socket, which could be captured on a subsequent request. + // + // since there's no way to "reset" a socket, the only thing we can do it close it. + // + $this->generateError(Net_DNS2_Socket::SOCK_STREAM, $_ns, Net_DNS2_Lookups::E_NS_SOCKET_FAILED); + } + + // + // parse the first chunk as a packet + // + $chunk = new Net_DNS2_Packet_Response($result, $size); + + // + // if this is the first packet, then clone it directly, then + // go through it to see if there are two SOA records + // (indicating that it's the only packet) + // + if (is_null($response) == true) { + + $response = clone $chunk; + + // + // look for a failed response; if the zone transfer + // failed, then we don't need to do anything else at this + // point, and we should just break out. + // + if ($response->header->rcode != Net_DNS2_Lookups::RCODE_NOERROR) { + break; + } + + // + // go through each answer + // + foreach ($response->answer as $index => $rr) { + + // + // count the SOA records + // + if ($rr->type == 'SOA') { + $soa_count++; + } + } + + // + // if we have 2 or more SOA records, then we're done; + // otherwise continue out so we read the rest of the + // packets off the socket + // + if ($soa_count >= 2) { + break; + } else { + continue; + } + + } else { + + // + // go through all these answers, and look for SOA records + // + foreach ($chunk->answer as $index => $rr) { + + // + // count the number of SOA records we find + // + if ($rr->type == 'SOA') { + $soa_count++; + } + + // + // add the records to a single response object + // + $response->answer[] = $rr; + } + + // + // if we've found the second SOA record, we're done + // + if ($soa_count >= 2) { + break; + } + } + } + + // + // everything other than a AXFR + // + } else { + + $result = $this->sock[Net_DNS2_Socket::SOCK_STREAM][$_ns]->read($size, ($this->dnssec == true) ? $this->dnssec_payload_size : Net_DNS2_Lookups::DNS_MAX_UDP_SIZE); + if ( ($result === false) || ($size < Net_DNS2_Lookups::DNS_HEADER_SIZE) ) { + + $this->generateError(Net_DNS2_Socket::SOCK_STREAM, $_ns, Net_DNS2_Lookups::E_NS_SOCKET_FAILED); + } + + // + // create the packet object + // + $response = new Net_DNS2_Packet_Response($result, $size); + } + + // + // store the query time + // + $response->response_time = microtime(true) - $start_time; + + // + // add the name server that the response came from to the response object, + // and the socket type that was used. + // + $response->answer_from = $_ns; + $response->answer_socket_type = Net_DNS2_Socket::SOCK_STREAM; + + // + // return the Net_DNS2_Packet_Response object + // + return $response; + } + + /** + * sends a DNS request using UDP + * + * @param string $_ns the name server to use for the request + * @param string $_data the raw DNS packet data + * + * @return Net_DNS2_Packet_Response the reponse object + * @throws Net_DNS2_Exception + * @access private + * + */ + private function sendUDPRequest($_ns, $_data) + { + // + // grab the start time + // + $start_time = microtime(true); + + // + // see if we already have an open socket from a previous request; if so, try to use + // that instead of opening a new one. + // + if ( (!isset($this->sock[Net_DNS2_Socket::SOCK_DGRAM][$_ns])) + || (!($this->sock[Net_DNS2_Socket::SOCK_DGRAM][$_ns] instanceof Net_DNS2_Socket)) + ) { + + // + // if the socket library is available, then use that + // + if ($this->sockets_enabled === true) { + + $this->sock[Net_DNS2_Socket::SOCK_DGRAM][$_ns] = new Net_DNS2_Socket_Sockets( + Net_DNS2_Socket::SOCK_DGRAM, $_ns, $this->dns_port, $this->timeout + ); + + // + // otherwise the streams library + // + } else { + + $this->sock[Net_DNS2_Socket::SOCK_DGRAM][$_ns] = new Net_DNS2_Socket_Streams( + Net_DNS2_Socket::SOCK_DGRAM, $_ns, $this->dns_port, $this->timeout + ); + } + + // + // if a local IP address / port is set, then add it + // + if (strlen($this->local_host) > 0) { + + $this->sock[Net_DNS2_Socket::SOCK_DGRAM][$_ns]->bindAddress( + $this->local_host, $this->local_port + ); + } + + // + // open the socket + // + if ($this->sock[Net_DNS2_Socket::SOCK_DGRAM][$_ns]->open() === false) { + + $this->generateError(Net_DNS2_Socket::SOCK_DGRAM, $_ns, Net_DNS2_Lookups::E_NS_SOCKET_FAILED); + } + } + + // + // write the data to the socket + // + if ($this->sock[Net_DNS2_Socket::SOCK_DGRAM][$_ns]->write($_data) === false) { + + $this->generateError(Net_DNS2_Socket::SOCK_DGRAM, $_ns, Net_DNS2_Lookups::E_NS_SOCKET_FAILED); + } + + // + // read the content, using select to wait for a response + // + $size = 0; + + $result = $this->sock[Net_DNS2_Socket::SOCK_DGRAM][$_ns]->read($size, ($this->dnssec == true) ? $this->dnssec_payload_size : Net_DNS2_Lookups::DNS_MAX_UDP_SIZE); + if (( $result === false) || ($size < Net_DNS2_Lookups::DNS_HEADER_SIZE)) { + + $this->generateError(Net_DNS2_Socket::SOCK_DGRAM, $_ns, Net_DNS2_Lookups::E_NS_SOCKET_FAILED); + } + + // + // create the packet object + // + $response = new Net_DNS2_Packet_Response($result, $size); + + // + // store the query time + // + $response->response_time = microtime(true) - $start_time; + + // + // add the name server that the response came from to the response object, + // and the socket type that was used. + // + $response->answer_from = $_ns; + $response->answer_socket_type = Net_DNS2_Socket::SOCK_DGRAM; + + // + // return the Net_DNS2_Packet_Response object + // + return $response; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/BitMap.php b/bundled-libs/Net/DNS2/BitMap.php new file mode 100644 index 00000000..8b42649f --- /dev/null +++ b/bundled-libs/Net/DNS2/BitMap.php @@ -0,0 +1,254 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * a class to handle converting RR bitmaps to arrays and back; used on NSEC + * and NSEC3 RR's + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Packet + * + */ +class Net_DNS2_BitMap +{ + /** + * parses a RR bitmap field defined in RFC3845, into an array of RR names. + * + * Type Bit Map(s) Field = ( Window Block # | Bitmap Length | Bitmap ) + + * + * @param string $data a bitmap stringto parse + * + * @return array + * @access public + * + */ + public static function bitMapToArray($data) + { + if (strlen($data) == 0) { + return null; + } + + $output = array(); + $offset = 0; + $length = strlen($data); + + while ($offset < $length) { + + // + // unpack the window and length values + // + $x = unpack('@' . $offset . '/Cwindow/Clength', $data); + $offset += 2; + + // + // copy out the bitmap value + // + $bitmap = unpack('C*', substr($data, $offset, $x['length'])); + $offset += $x['length']; + + // + // I'm not sure if there's a better way of doing this, but PHP doesn't + // have a 'B' flag for unpack() + // + $bitstr = ''; + foreach ($bitmap as $r) { + + $bitstr .= sprintf('%08b', $r); + } + + $blen = strlen($bitstr); + for ($i=0; $i<$blen; $i++) { + + if ($bitstr[$i] == '1') { + + $type = $x['window'] * 256 + $i; + + if (isset(Net_DNS2_Lookups::$rr_types_by_id[$type])) { + + $output[] = Net_DNS2_Lookups::$rr_types_by_id[$type]; + } else { + + $output[] = 'TYPE' . $type; + } + } + } + } + + return $output; + } + + /** + * builds a RR Bit map from an array of RR type names + * + * @param array $data a list of RR names + * + * @return string + * @access public + * + */ + public static function arrayToBitMap(array $data) + { + if (count($data) == 0) { + return null; + } + + $current_window = 0; + + // + // go through each RR + // + $max = 0; + $bm = array(); + + foreach ($data as $rr) { + + $rr = strtoupper($rr); + + // + // get the type id for the RR + // + $type = @Net_DNS2_Lookups::$rr_types_by_name[$rr]; + if (isset($type)) { + + // + // skip meta types or qtypes + // + if ( (isset(Net_DNS2_Lookups::$rr_qtypes_by_id[$type])) + || (isset(Net_DNS2_Lookups::$rr_metatypes_by_id[$type])) + ) { + continue; + } + + } else { + + // + // if it's not found, then it must be defined as TYPE<id>, per + // RFC3845 section 2.2, if it's not, we ignore it. + // + list($name, $type) = explode('TYPE', $rr); + if (!isset($type)) { + + continue; + } + } + + // + // build the current window + // + $current_window = (int)($type / 256); + + $val = $type - $current_window * 256.0; + if ($val > $max) { + $max = $val; + } + + $bm[$current_window][$val] = 1; + $bm[$current_window]['length'] = ceil(($max + 1) / 8); + } + + $output = ''; + + foreach ($bm as $window => $bitdata) { + + $bitstr = ''; + + for ($i=0; $i<$bm[$window]['length'] * 8; $i++) { + if (isset($bm[$window][$i])) { + $bitstr .= '1'; + } else { + $bitstr .= '0'; + } + } + + $output .= pack('CC', $window, $bm[$window]['length']); + $output .= pack('H*', self::bigBaseConvert($bitstr)); + } + + return $output; + } + + /** + * a base_convert that handles large numbers; forced to 2/16 + * + * @param string $number a bit string + * + * @return string + * @access public + * + */ + public static function bigBaseConvert($number) + { + $result = ''; + + $bin = substr(chunk_split(strrev($number), 4, '-'), 0, -1); + $temp = preg_split('[-]', $bin, -1, PREG_SPLIT_DELIM_CAPTURE); + + for ($i = count($temp)-1;$i >= 0;$i--) { + + $result = $result . base_convert(strrev($temp[$i]), 2, 16); + } + + return strtoupper($result); + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Cache.php b/bundled-libs/Net/DNS2/Cache.php new file mode 100644 index 00000000..1abbd015 --- /dev/null +++ b/bundled-libs/Net/DNS2/Cache.php @@ -0,0 +1,311 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.1.0 + * + */ + +/** + * A class to provide simple dns lookup caching. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Packet + * + */ +class Net_DNS2_Cache +{ + /* + * the filename of the cache file + */ + protected $cache_file = ''; + + /* + * the local data store for the cache + */ + protected $cache_data = array(); + + /* + * the size of the cache to use + */ + protected $cache_size = 0; + + /* + * the cache serializer + */ + protected $cache_serializer; + + /* + * an internal flag to make sure we don't load the cache content more + * than once per instance. + */ + protected $cache_opened = false; + + /** + * returns true/false if the provided key is defined in the cache + * + * @param string $key the key to lookup in the local cache + * + * @return boolean + * @access public + * + */ + public function has($key) + { + return isset($this->cache_data[$key]); + } + + /** + * returns the value for the given key + * + * @param string $key the key to lookup in the local cache + * + * @return mixed returns the cache data on sucess, false on error + * @access public + * + */ + public function get($key) + { + if (isset($this->cache_data[$key])) { + + if ($this->cache_serializer == 'json') { + return json_decode($this->cache_data[$key]['object']); + } else { + return unserialize($this->cache_data[$key]['object']); + } + } else { + + return false; + } + } + + /** + * adds a new key/value pair to the cache + * + * @param string $key the key for the new cache entry + * @param mixed $data the data to store in cache + * + * @return void + * @access public + * + */ + public function put($key, $data) + { + $ttl = 86400 * 365; + + // + // clear the rdata values + // + $data->rdata = ''; + $data->rdlength = 0; + + // + // find the lowest TTL, and use that as the TTL for the whole cached + // object. The downside to using one TTL for the whole object, is that + // we'll invalidate entries before they actuall expire, causing a + // real lookup to happen. + // + // The upside is that we don't need to require() each RR type in the + // cache, so we can look at their individual TTL's on each run- we only + // unserialize the actual RR object when it's get() from the cache. + // + foreach ($data->answer as $index => $rr) { + + if ($rr->ttl < $ttl) { + $ttl = $rr->ttl; + } + + $rr->rdata = ''; + $rr->rdlength = 0; + } + foreach ($data->authority as $index => $rr) { + + if ($rr->ttl < $ttl) { + $ttl = $rr->ttl; + } + + $rr->rdata = ''; + $rr->rdlength = 0; + } + foreach ($data->additional as $index => $rr) { + + if ($rr->ttl < $ttl) { + $ttl = $rr->ttl; + } + + $rr->rdata = ''; + $rr->rdlength = 0; + } + + $this->cache_data[$key] = array( + + 'cache_date' => time(), + 'ttl' => $ttl + ); + + if ($this->cache_serializer == 'json') { + $this->cache_data[$key]['object'] = json_encode($data); + } else { + $this->cache_data[$key]['object'] = serialize($data); + } + } + + /** + * runs a clean up process on the cache data + * + * @return void + * @access protected + * + */ + protected function clean() + { + if (count($this->cache_data) > 0) { + + // + // go through each entry and adjust their TTL, and remove entries that + // have expired + // + $now = time(); + + foreach ($this->cache_data as $key => $data) { + + $diff = $now - $data['cache_date']; + + if ($data['ttl'] <= $diff) { + + unset($this->cache_data[$key]); + } else { + + $this->cache_data[$key]['ttl'] -= $diff; + $this->cache_data[$key]['cache_date'] = $now; + } + } + } + } + + /** + * runs a clean up process on the cache data + * + * @return mixed + * @access protected + * + */ + protected function resize() + { + if (count($this->cache_data) > 0) { + + // + // serialize the cache data + // + if ($this->cache_serializer == 'json') { + $cache = json_encode($this->cache_data); + } else { + $cache = serialize($this->cache_data); + } + + // + // only do this part if the size allocated to the cache storage + // is smaller than the actual cache data + // + if (strlen($cache) > $this->cache_size) { + + while (strlen($cache) > $this->cache_size) { + + // + // go through the data, and remove the entries closed to + // their expiration date. + // + $smallest_ttl = time(); + $smallest_key = null; + + foreach ($this->cache_data as $key => $data) { + + if ($data['ttl'] < $smallest_ttl) { + + $smallest_ttl = $data['ttl']; + $smallest_key = $key; + } + } + + // + // unset the key with the smallest TTL + // + unset($this->cache_data[$smallest_key]); + + // + // re-serialize + // + if ($this->cache_serializer == 'json') { + $cache = json_encode($this->cache_data); + } else { + $cache = serialize($this->cache_data); + } + } + } + + if ( ($cache == 'a:0:{}') || ($cache == '{}') ) { + return null; + } else { + return $cache; + } + } + + return null; + } +}; + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Cache/File.php b/bundled-libs/Net/DNS2/Cache/File.php new file mode 100644 index 00000000..92fdcc27 --- /dev/null +++ b/bundled-libs/Net/DNS2/Cache/File.php @@ -0,0 +1,247 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.1.0 + * + */ + +/** + * File-based caching for the Net_DNS2_Cache class + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Packet + * + */ +class Net_DNS2_Cache_File extends Net_DNS2_Cache +{ + /** + * open a cache object + * + * @param string $cache_file path to a file to use for cache storage + * @param integer $size the size of the shared memory segment to create + * @param string $serializer the name of the cache serialize to use + * + * @throws Net_DNS2_Exception + * @access public + * @return void + * + */ + public function open($cache_file, $size, $serializer) + { + $this->cache_size = $size; + $this->cache_file = $cache_file; + $this->cache_serializer = $serializer; + + // + // check that the file exists first + // + if ( ($this->cache_opened == false) + && (file_exists($this->cache_file) == true) + && (filesize($this->cache_file) > 0) + ) { + // + // open the file for reading + // + $fp = @fopen($this->cache_file, 'r'); + if ($fp !== false) { + + // + // lock the file just in case + // + flock($fp, LOCK_EX); + + // + // read the file contents + // + $data = fread($fp, filesize($this->cache_file)); + + $decoded = null; + + if ($this->cache_serializer == 'json') { + + $decoded = json_decode($data, true); + } else { + + $decoded = unserialize($data); + } + + if (is_array($decoded) == true) { + + $this->cache_data = $decoded; + } else { + + $this->cache_data = array(); + } + + // + // unlock + // + flock($fp, LOCK_UN); + + // + // close the file + // + fclose($fp); + + // + // clean up the data + // + $this->clean(); + + // + // mark this so we don't read this contents more than once per instance. + // + $this->cache_opened = true; + } + } + } + + /** + * Destructor + * + * @access public + * + */ + public function __destruct() + { + // + // if there's no cache file set, then there's nothing to do + // + if (strlen($this->cache_file) == 0) { + return; + } + + // + // open the file for reading/writing + // + $fp = fopen($this->cache_file, 'a+'); + if ($fp !== false) { + + // + // lock the file just in case + // + flock($fp, LOCK_EX); + + // + // seek to the start of the file to read + // + fseek($fp, 0, SEEK_SET); + + // + // read the file contents + // + $data = @fread($fp, filesize($this->cache_file)); + if ( ($data !== false) && (strlen($data) > 0) ) { + + // + // unserialize and store the data + // + $c = $this->cache_data; + + $decoded = null; + + if ($this->cache_serializer == 'json') { + + $decoded = json_decode($data, true); + } else { + + $decoded = unserialize($data); + } + + if (is_array($decoded) == true) { + + $this->cache_data = array_merge($c, $decoded); + } + } + + // + // trucate the file + // + ftruncate($fp, 0); + + // + // clean the data + // + $this->clean(); + + // + // resize the data + // + $data = $this->resize(); + if (!is_null($data)) { + + // + // write the file contents + // + fwrite($fp, $data); + } + + // + // unlock + // + flock($fp, LOCK_UN); + + // + // close the file + // + fclose($fp); + } + } +}; + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Cache/Shm.php b/bundled-libs/Net/DNS2/Cache/Shm.php new file mode 100644 index 00000000..2abfa4fb --- /dev/null +++ b/bundled-libs/Net/DNS2/Cache/Shm.php @@ -0,0 +1,318 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.1.0 + * + */ + +/** + * Shared Memory-based caching for the Net_DNS2_Cache class + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Packet + * + */ +class Net_DNS2_Cache_Shm extends Net_DNS2_Cache +{ + /* + * resource id of the shared memory cache + */ + private $_cache_id = false; + + /* + * the IPC key + */ + private $_cache_file_tok = -1; + + /** + * open a cache object + * + * @param string $cache_file path to a file to use for cache storage + * @param integer $size the size of the shared memory segment to create + * @param string $serializer the name of the cache serialize to use + * + * @throws Net_DNS2_Exception + * @access public + * @return void + * + */ + public function open($cache_file, $size, $serializer) + { + $this->cache_size = $size; + $this->cache_file = $cache_file; + $this->cache_serializer = $serializer; + + // + // if we've already loaded the cache data, then just return right away + // + if ($this->cache_opened == true) + { + return; + } + + // + // make sure the file exists first + // + if (!file_exists($cache_file)) { + + if (file_put_contents($cache_file, '') === false) { + + throw new Net_DNS2_Exception( + 'failed to create empty SHM file: ' . $cache_file, + Net_DNS2_Lookups::E_CACHE_SHM_FILE + ); + } + } + + // + // convert the filename to a IPC key + // + $this->_cache_file_tok = ftok($cache_file, 't'); + if ($this->_cache_file_tok == -1) { + + throw new Net_DNS2_Exception( + 'failed on ftok() file: ' . $this->_cache_file_tok, + Net_DNS2_Lookups::E_CACHE_SHM_FILE + ); + } + + // + // try to open an existing cache; if it doesn't exist, then there's no + // cache, and nothing to do. + // + $this->_cache_id = @shmop_open($this->_cache_file_tok, 'w', 0, 0); + if ($this->_cache_id !== false) { + + // + // this returns the size allocated, and not the size used, but it's + // still a good check to make sure there's space allocated. + // + $allocated = shmop_size($this->_cache_id); + if ($allocated > 0) { + + // + // read the data from the shared memory segment + // + $data = trim(shmop_read($this->_cache_id, 0, $allocated)); + if ( ($data !== false) && (strlen($data) > 0) ) { + + // + // unserialize and store the data + // + $decoded = null; + + if ($this->cache_serializer == 'json') { + + $decoded = json_decode($data, true); + } else { + + $decoded = unserialize($data); + } + + if (is_array($decoded) == true) { + + $this->cache_data = $decoded; + } else { + + $this->cache_data = array(); + } + + // + // call clean to clean up old entries + // + $this->clean(); + + // + // mark the cache as loaded, so we don't load it more than once + // + $this->cache_opened = true; + } + } + } + } + + /** + * Destructor + * + * @access public + * + */ + public function __destruct() + { + // + // if there's no cache file set, then there's nothing to do + // + if (strlen($this->cache_file) == 0) { + return; + } + + $fp = fopen($this->cache_file, 'r'); + if ($fp !== false) { + + // + // lock the file + // + flock($fp, LOCK_EX); + + // + // check to see if we have an open shm segment + // + if ($this->_cache_id === false) { + + // + // try opening it again, incase it was created by another + // process in the mean time + // + $this->_cache_id = @shmop_open( + $this->_cache_file_tok, 'w', 0, 0 + ); + if ($this->_cache_id === false) { + + // + // otherwise, create it. + // + $this->_cache_id = @shmop_open( + $this->_cache_file_tok, 'c', 0, $this->cache_size + ); + } + } + + // + // get the size allocated to the segment + // + $allocated = shmop_size($this->_cache_id); + + // + // read the contents + // + $data = trim(shmop_read($this->_cache_id, 0, $allocated)); + + // + // if there was some data + // + if ( ($data !== false) && (strlen($data) > 0) ) { + + // + // unserialize and store the data + // + $c = $this->cache_data; + + $decoded = null; + + if ($this->cache_serializer == 'json') { + + $decoded = json_decode($data, true); + } else { + + $decoded = unserialize($data); + } + + if (is_array($decoded) == true) { + + $this->cache_data = array_merge($c, $decoded); + } + } + + // + // delete the segment + // + shmop_delete($this->_cache_id); + + // + // clean the data + // + $this->clean(); + + // + // clean up and write the data + // + $data = $this->resize(); + if (!is_null($data)) { + + // + // re-create segment + // + $this->_cache_id = @shmop_open( + $this->_cache_file_tok, 'c', 0644, $this->cache_size + ); + if ($this->_cache_id === false) { + return; + } + + $o = shmop_write($this->_cache_id, $data, 0); + } + + // + // close the segment + // + shmop_close($this->_cache_id); + + // + // unlock + // + flock($fp, LOCK_UN); + + // + // close the file + // + fclose($fp); + } + } +}; + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Exception.php b/bundled-libs/Net/DNS2/Exception.php new file mode 100644 index 00000000..196223d1 --- /dev/null +++ b/bundled-libs/Net/DNS2/Exception.php @@ -0,0 +1,142 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + */ + +/** + * Exception handler used by Net_DNS2 + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * + */ +class Net_DNS2_Exception extends Exception +{ + private $_request; + private $_response; + + /** + * Constructor - overload the constructor so we can pass in the request + * and response object (when it's available) + * + * @param string $message the exception message + * @param int $code the exception code + * @param object $previous the previous Exception object + * @param object $request the Net_DNS2_Packet_Request object for this request + * @param object $response the Net_DNS2_Packet_Response object for this request + * + * @access public + * + */ + public function __construct( + $message = '', + $code = 0, + $previous = null, + Net_DNS2_Packet_Request $request = null, + Net_DNS2_Packet_Response $response = null + ) { + // + // store the request/response objects (if passed) + // + $this->_request = $request; + $this->_response = $response; + + // + // call the parent constructor + // + // the "previous" argument was added in PHP 5.3.0 + // + // https://code.google.com/p/netdns2/issues/detail?id=25 + // + if (version_compare(PHP_VERSION, '5.3.0', '>=') == true) { + + parent::__construct($message, $code, $previous); + } else { + + parent::__construct($message, $code); + } + } + + /** + * returns the Net_DNS2_Packet_Request object (if available) + * + * @return Net_DNS2_Packet_Request object + * @access public + * @since function available since release 1.3.1 + * + */ + public function getRequest() + { + return $this->_request; + } + + /** + * returns the Net_DNS2_Packet_Response object (if available) + * + * @return Net_DNS2_Packet_Response object + * @access public + * @since function available since release 1.3.1 + * + */ + public function getResponse() + { + return $this->_response; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Header.php b/bundled-libs/Net/DNS2/Header.php new file mode 100644 index 00000000..511b62c2 --- /dev/null +++ b/bundled-libs/Net/DNS2/Header.php @@ -0,0 +1,277 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + + +/** + * DNS Packet Header class + * + * This class handles parsing and constructing DNS Packet Headers as defined + * by section 4.1.1 of RFC1035. + * + * DNS header format - RFC1035 section 4.1.1 + * DNS header format - RFC4035 section 3.2 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ID | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * |QR| Opcode |AA|TC|RD|RA| Z|AD|CD| RCODE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | QDCOUNT | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ANCOUNT | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | NSCOUNT | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ARCOUNT | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * + */ +class Net_DNS2_Header +{ + public $id; // 16 bit - identifier + public $qr; // 1 bit - 0 = query, 1 = response + public $opcode; // 4 bit - op code + public $aa; // 1 bit - Authoritative Answer + public $tc; // 1 bit - TrunCation + public $rd; // 1 bit - Recursion Desired + public $ra; // 1 bit - Recursion Available + public $z; // 1 bit - Reserved + public $ad; // 1 bit - Authentic Data (RFC4035) + public $cd; // 1 bit - Checking Disabled (RFC4035) + public $rcode; // 4 bit - Response code + public $qdcount; // 16 bit - entries in the question section + public $ancount; // 16 bit - resource records in the answer section + public $nscount; // 16 bit - name server rr in the authority records section + public $arcount; // 16 bit - rr's in the additional records section + + /** + * Constructor - builds a new Net_DNS2_Header object + * + * @param mixed &$packet either a Net_DNS2_Packet object or null + * + * @throws Net_DNS2_Exception + * @access public + * + */ + public function __construct(Net_DNS2_Packet &$packet = null) + { + if (!is_null($packet)) { + + $this->set($packet); + } else { + + $this->id = $this->nextPacketId(); + $this->qr = Net_DNS2_Lookups::QR_QUERY; + $this->opcode = Net_DNS2_Lookups::OPCODE_QUERY; + $this->aa = 0; + $this->tc = 0; + $this->rd = 1; + $this->ra = 0; + $this->z = 0; + $this->ad = 0; + $this->cd = 0; + $this->rcode = Net_DNS2_Lookups::RCODE_NOERROR; + $this->qdcount = 1; + $this->ancount = 0; + $this->nscount = 0; + $this->arcount = 0; + } + } + + /** + * returns the next available packet id + * + * @return integer + * @access public + * + */ + public function nextPacketId() + { + if (++Net_DNS2_Lookups::$next_packet_id > 65535) { + + Net_DNS2_Lookups::$next_packet_id = 1; + } + + return Net_DNS2_Lookups::$next_packet_id; + } + + /** + * magic __toString() method to return the header as a string + * + * @return string + * @access public + * + */ + public function __toString() + { + $output = ";;\n;; Header:\n"; + + $output .= ";;\t id = " . $this->id . "\n"; + $output .= ";;\t qr = " . $this->qr . "\n"; + $output .= ";;\t opcode = " . $this->opcode . "\n"; + $output .= ";;\t aa = " . $this->aa . "\n"; + $output .= ";;\t tc = " . $this->tc . "\n"; + $output .= ";;\t rd = " . $this->rd . "\n"; + $output .= ";;\t ra = " . $this->ra . "\n"; + $output .= ";;\t z = " . $this->z . "\n"; + $output .= ";;\t ad = " . $this->ad . "\n"; + $output .= ";;\t cd = " . $this->cd . "\n"; + $output .= ";;\t rcode = " . $this->rcode . "\n"; + $output .= ";;\t qdcount = " . $this->qdcount . "\n"; + $output .= ";;\t ancount = " . $this->ancount . "\n"; + $output .= ";;\t nscount = " . $this->nscount . "\n"; + $output .= ";;\t arcount = " . $this->arcount . "\n"; + + return $output; + } + + /** + * constructs a Net_DNS2_Header from a Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet Object + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function set(Net_DNS2_Packet &$packet) + { + // + // the header must be at least 12 bytes long. + // + if ($packet->rdlength < Net_DNS2_Lookups::DNS_HEADER_SIZE) { + + throw new Net_DNS2_Exception( + 'invalid header data provided; to small', + Net_DNS2_Lookups::E_HEADER_INVALID + ); + } + + $offset = 0; + + // + // parse the values + // + $this->id = ord($packet->rdata[$offset]) << 8 | + ord($packet->rdata[++$offset]); + + ++$offset; + $this->qr = (ord($packet->rdata[$offset]) >> 7) & 0x1; + $this->opcode = (ord($packet->rdata[$offset]) >> 3) & 0xf; + $this->aa = (ord($packet->rdata[$offset]) >> 2) & 0x1; + $this->tc = (ord($packet->rdata[$offset]) >> 1) & 0x1; + $this->rd = ord($packet->rdata[$offset]) & 0x1; + + ++$offset; + $this->ra = (ord($packet->rdata[$offset]) >> 7) & 0x1; + $this->z = (ord($packet->rdata[$offset]) >> 6) & 0x1; + $this->ad = (ord($packet->rdata[$offset]) >> 5) & 0x1; + $this->cd = (ord($packet->rdata[$offset]) >> 4) & 0x1; + $this->rcode = ord($packet->rdata[$offset]) & 0xf; + + $this->qdcount = ord($packet->rdata[++$offset]) << 8 | + ord($packet->rdata[++$offset]); + $this->ancount = ord($packet->rdata[++$offset]) << 8 | + ord($packet->rdata[++$offset]); + $this->nscount = ord($packet->rdata[++$offset]) << 8 | + ord($packet->rdata[++$offset]); + $this->arcount = ord($packet->rdata[++$offset]) << 8 | + ord($packet->rdata[++$offset]); + + // + // increment the internal offset + // + $packet->offset += Net_DNS2_Lookups::DNS_HEADER_SIZE; + + return true; + } + + /** + * returns a binary packed DNS Header + * + * @param Net_DNS2_Packet &$packet Object + * + * @return string + * @access public + * + */ + public function get(Net_DNS2_Packet &$packet) + { + $packet->offset += Net_DNS2_Lookups::DNS_HEADER_SIZE; + + return pack('n', $this->id) . + chr( + ($this->qr << 7) | ($this->opcode << 3) | + ($this->aa << 2) | ($this->tc << 1) | ($this->rd) + ) . + chr( + ($this->ra << 7) | ($this->ad << 5) | ($this->cd << 4) | $this->rcode + ) . + pack('n4', $this->qdcount, $this->ancount, $this->nscount, $this->arcount); + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Lookups.php b/bundled-libs/Net/DNS2/Lookups.php new file mode 100644 index 00000000..d4898a28 --- /dev/null +++ b/bundled-libs/Net/DNS2/Lookups.php @@ -0,0 +1,578 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +// +// initalize the packet id value +// +Net_DNS2_Lookups::$next_packet_id = mt_rand(0, 65535); + +// +// build the reverse lookup tables; this is just so we don't have to +// have duplicate static content laying around. +// +Net_DNS2_Lookups::$rr_types_by_id = array_flip(Net_DNS2_Lookups::$rr_types_by_name); +Net_DNS2_Lookups::$classes_by_id = array_flip(Net_DNS2_Lookups::$classes_by_name); +Net_DNS2_Lookups::$rr_types_class_to_id = array_flip(Net_DNS2_Lookups::$rr_types_id_to_class); +Net_DNS2_Lookups::$algorithm_name_to_id = array_flip(Net_DNS2_Lookups::$algorithm_id_to_name); +Net_DNS2_Lookups::$digest_name_to_id = array_flip(Net_DNS2_Lookups::$digest_id_to_name); +Net_DNS2_Lookups::$rr_qtypes_by_id = array_flip(Net_DNS2_Lookups::$rr_qtypes_by_name); +Net_DNS2_Lookups::$rr_metatypes_by_id = array_flip(Net_DNS2_Lookups::$rr_metatypes_by_name); +Net_DNS2_Lookups::$protocol_by_id = array_flip(Net_DNS2_Lookups::$protocol_by_name); + +/** + * This class provides simple lookups used througout the Net_DNS2 code + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * + */ +class Net_DNS2_Lookups +{ + /* + * size (in bytes) of a header in a standard DNS packet + */ + const DNS_HEADER_SIZE = 12; + + /* + * max size of a UDP packet + */ + const DNS_MAX_UDP_SIZE = 512; + + /* + * Query/Response flag + */ + const QR_QUERY = 0; // RFC 1035 + const QR_RESPONSE = 1; // RFC 1035 + + /* + * DNS Op Codes + */ + const OPCODE_QUERY = 0; // RFC 1035 + const OPCODE_IQUERY = 1; // RFC 1035, RFC 3425 + const OPCODE_STATUS = 2; // RFC 1035 + const OPCODE_NOTIFY = 4; // RFC 1996 + const OPCODE_UPDATE = 5; // RFC 2136 + + /* + * Resource Record Classes + */ + const RR_CLASS_IN = 1; // RFC 1035 + const RR_CLASS_CH = 3; // RFC 1035 + const RR_CLASS_HS = 4; // RFC 1035 + const RR_CLASS_NONE = 254; // RFC 2136 + const RR_CLASS_ANY = 255; // RFC 1035 + + /* + * DNS Response Codes + */ + const RCODE_NOERROR = 0; // RFC 1035 + const RCODE_FORMERR = 1; // RFC 1035 + const RCODE_SERVFAIL = 2; // RFC 1035 + const RCODE_NXDOMAIN = 3; // RFC 1035 + const RCODE_NOTIMP = 4; // RFC 1035 + const RCODE_REFUSED = 5; // RFC 1035 + const RCODE_YXDOMAIN = 6; // RFC 2136 + const RCODE_YXRRSET = 7; // RFC 2136 + const RCODE_NXRRSET = 8; // RFC 2136 + const RCODE_NOTAUTH = 9; // RFC 2136 + const RCODE_NOTZONE = 10; // RFC 2136 + + // 11-15 reserved + + const RCODE_BADSIG = 16; // RFC 2845 + const RCODE_BADVERS = 16; // RFC 6891 + const RCODE_BADKEY = 17; // RFC 2845 + const RCODE_BADTIME = 18; // RFC 2845 + const RCODE_BADMODE = 19; // RFC 2930 + const RCODE_BADNAME = 20; // RFC 2930 + const RCODE_BADALG = 21; // RFC 2930 + const RCODE_BADTRUNC = 22; // RFC 4635 + const RCODE_BADCOOKIE = 23; // RFC 7873 + + /* + * internal errors codes returned by the exceptions class + */ + const E_NONE = 0; + const E_DNS_FORMERR = self::RCODE_FORMERR; + const E_DNS_SERVFAIL = self::RCODE_SERVFAIL; + const E_DNS_NXDOMAIN = self::RCODE_NXDOMAIN; + const E_DNS_NOTIMP = self::RCODE_NOTIMP; + const E_DNS_REFUSED = self::RCODE_REFUSED; + const E_DNS_YXDOMAIN = self::RCODE_YXDOMAIN; + const E_DNS_YXRRSET = self::RCODE_YXRRSET; + const E_DNS_NXRRSET = self::RCODE_NXRRSET; + const E_DNS_NOTAUTH = self::RCODE_NOTAUTH; + const E_DNS_NOTZONE = self::RCODE_NOTZONE; + + // 11-15 reserved + + const E_DNS_BADSIG = self::RCODE_BADSIG; + const E_DNS_BADKEY = self::RCODE_BADKEY; + const E_DNS_BADTIME = self::RCODE_BADTIME; + const E_DNS_BADMODE = self::RCODE_BADMODE; + const E_DNS_BADNAME = self::RCODE_BADNAME; + const E_DNS_BADALG = self::RCODE_BADALG; + const E_DNS_BADTRUNC = self::RCODE_BADTRUNC; + const E_DNS_BADCOOKIE = self::RCODE_BADCOOKIE; + + // other error conditions + + const E_NS_INVALID_FILE = 200; + const E_NS_INVALID_ENTRY = 201; + const E_NS_FAILED = 202; + const E_NS_SOCKET_FAILED = 203; + const E_NS_INVALID_SOCKET = 204; + + const E_PACKET_INVALID = 300; + const E_PARSE_ERROR = 301; + const E_HEADER_INVALID = 302; + const E_QUESTION_INVALID = 303; + const E_RR_INVALID = 304; + + const E_OPENSSL_ERROR = 400; + const E_OPENSSL_UNAVAIL = 401; + const E_OPENSSL_INV_PKEY = 402; + const E_OPENSSL_INV_ALGO = 403; + + const E_CACHE_UNSUPPORTED = 500; + const E_CACHE_SHM_FILE = 501; + const E_CACHE_SHM_UNAVAIL = 502; + + /* + * EDNS0 Option Codes (OPT) + */ + // 0 - Reserved + const EDNS0_OPT_LLQ = 1; + const EDNS0_OPT_UL = 2; + const EDNS0_OPT_NSID = 3; + // 4 - Reserved + const EDNS0_OPT_DAU = 5; + const EDNS0_OPT_DHU = 6; + const EDNS0_OPT_N3U = 7; + const EDNS0_OPT_CLIENT_SUBNET = 8; + const EDNS0_OPT_EXPIRE = 9; + const EDNS0_OPT_COOKIE = 10; + const EDNS0_OPT_TCP_KEEPALIVE = 11; + const EDNS0_OPT_PADDING = 12; + const EDNS0_OPT_CHAIN = 13; + + /* + * DNSSEC Algorithms + */ + const DNSSEC_ALGORITHM_RES = 0; + const DNSSEC_ALGORITHM_RSAMD5 = 1; + const DNSSEC_ALGORITHM_DH = 2; + const DNSSEC_ALGORITHM_DSA = 3; + const DNSSEC_ALGORITHM_ECC = 4; + const DNSSEC_ALGORITHM_RSASHA1 = 5; + const DNSSEC_ALGORITHM_DSANSEC3SHA1 = 6; + const DSNSEC_ALGORITHM_RSASHA1NSEC3SHA1 = 7; + const DNSSEC_ALGORITHM_RSASHA256 = 8; + const DNSSEC_ALGORITHM_RSASHA512 = 10; + const DNSSEC_ALGORITHM_ECCGOST = 12; + const DNSSEC_ALGORITHM_INDIRECT = 252; + const DNSSEC_ALGORITHM_PRIVATEDNS = 253; + const DNSSEC_ALGORITHM_PRIVATEOID = 254; + + /* + * DNSSEC Digest Types + */ + const DNSSEC_DIGEST_RES = 0; + const DNSSEC_DIGEST_SHA1 = 1; + + /* + * The packet id used when sending requests + */ + public static $next_packet_id; + + /* + * Used to map resource record types to their id's, and back + */ + public static $rr_types_by_id = array(); + public static $rr_types_by_name = array( + + 'SIG0' => 0, // RFC 2931 pseudo type + 'A' => 1, // RFC 1035 + 'NS' => 2, // RFC 1035 + 'MD' => 3, // RFC 1035 - obsolete, Not implemented + 'MF' => 4, // RFC 1035 - obsolete, Not implemented + 'CNAME' => 5, // RFC 1035 + 'SOA' => 6, // RFC 1035 + 'MB' => 7, // RFC 1035 - obsolete, Not implemented + 'MG' => 8, // RFC 1035 - obsolete, Not implemented + 'MR' => 9, // RFC 1035 - obsolete, Not implemented + 'NULL' => 10, // RFC 1035 - obsolete, Not implemented + 'WKS' => 11, // RFC 1035 + 'PTR' => 12, // RFC 1035 + 'HINFO' => 13, // RFC 1035 + 'MINFO' => 14, // RFC 1035 - obsolete, Not implemented + 'MX' => 15, // RFC 1035 + 'TXT' => 16, // RFC 1035 + 'RP' => 17, // RFC 1183 + 'AFSDB' => 18, // RFC 1183 + 'X25' => 19, // RFC 1183 + 'ISDN' => 20, // RFC 1183 + 'RT' => 21, // RFC 1183 + 'NSAP' => 22, // RFC 1706 + 'NSAP_PTR' => 23, // RFC 1348 - obsolete, Not implemented + 'SIG' => 24, // RFC 2535 + 'KEY' => 25, // RFC 2535, RFC 2930 + 'PX' => 26, // RFC 2163 + 'GPOS' => 27, // RFC 1712 - Not implemented + 'AAAA' => 28, // RFC 3596 + 'LOC' => 29, // RFC 1876 + 'NXT' => 30, // RFC 2065, obsoleted by by RFC 3755 + 'EID' => 31, // [Patton][Patton1995] + 'NIMLOC' => 32, // [Patton][Patton1995] + 'SRV' => 33, // RFC 2782 + 'ATMA' => 34, // Windows only + 'NAPTR' => 35, // RFC 2915 + 'KX' => 36, // RFC 2230 + 'CERT' => 37, // RFC 4398 + 'A6' => 38, // downgraded to experimental by RFC 3363 + 'DNAME' => 39, // RFC 2672 + 'SINK' => 40, // Not implemented + 'OPT' => 41, // RFC 2671 + 'APL' => 42, // RFC 3123 + 'DS' => 43, // RFC 4034 + 'SSHFP' => 44, // RFC 4255 + 'IPSECKEY' => 45, // RFC 4025 + 'RRSIG' => 46, // RFC 4034 + 'NSEC' => 47, // RFC 4034 + 'DNSKEY' => 48, // RFC 4034 + 'DHCID' => 49, // RFC 4701 + 'NSEC3' => 50, // RFC 5155 + 'NSEC3PARAM' => 51, // RFC 5155 + 'TLSA' => 52, // RFC 6698 + 'SMIMEA' => 53, // draft-ietf-dane-smime-10 + + // 54 unassigned + + 'HIP' => 55, // RFC 5205 + 'NINFO' => 56, // Not implemented + 'RKEY' => 57, // Not implemented + 'TALINK' => 58, // + 'CDS' => 59, // RFC 7344 + 'CDNSKEY' => 60, // RFC 7344 + 'OPENPGPKEY' => 61, // RFC 7929 + 'CSYNC' => 62, // RFC 7477 + + // 63 - 98 unassigned + + 'SPF' => 99, // RFC 4408 + 'UINFO' => 100, // no RFC, Not implemented + 'UID' => 101, // no RFC, Not implemented + 'GID' => 102, // no RFC, Not implemented + 'UNSPEC' => 103, // no RFC, Not implemented + 'NID' => 104, // RFC 6742 + 'L32' => 105, // RFC 6742 + 'L64' => 106, // RFC 6742 + 'LP' => 107, // RFC 6742 + 'EUI48' => 108, // RFC 7043 + 'EUI64' => 109, // RFC 7043 + + // 110 - 248 unassigned + + 'TKEY' => 249, // RFC 2930 + 'TSIG' => 250, // RFC 2845 + 'IXFR' => 251, // RFC 1995 - only a full (AXFR) is supported + 'AXFR' => 252, // RFC 1035 + 'MAILB' => 253, // RFC 883, Not implemented + 'MAILA' => 254, // RFC 973, Not implemented + 'ANY' => 255, // RFC 1035 - we support both 'ANY' and '*' + 'URI' => 256, // tools.ietf.org/html/draft-faltstrom-uri-06 + 'CAA' => 257, // tools.ietf.org/html/draft-ietf-pkix-caa-03 + 'AVC' => 258, // Application Visibility and Control + + // 259 - 32767 unassigned + + 'TA' => 32768, // same as DS + 'DLV' => 32769 // RFC 4431 + ); + + /* + * Qtypes and Metatypes - defined in RFC2929 section 3.1 + */ + public static $rr_qtypes_by_id = array(); + public static $rr_qtypes_by_name = array( + + 'IXFR' => 251, // RFC 1995 - only a full (AXFR) is supported + 'AXFR' => 252, // RFC 1035 + 'MAILB' => 253, // RFC 883, Not implemented + 'MAILA' => 254, // RFC 973, Not implemented + 'ANY' => 255 // RFC 1035 - we support both 'ANY' and '*' + ); + + public static $rr_metatypes_by_id = array(); + public static $rr_metatypes_by_name = array( + + 'OPT' => 41, // RFC 2671 + 'TKEY' => 249, // RFC 2930 + 'TSIG' => 250 // RFC 2845 + ); + + /* + * used to map resource record id's to RR class names + */ + public static $rr_types_class_to_id = array(); + public static $rr_types_id_to_class = array( + + 1 => 'Net_DNS2_RR_A', + 2 => 'Net_DNS2_RR_NS', + 5 => 'Net_DNS2_RR_CNAME', + 6 => 'Net_DNS2_RR_SOA', + 11 => 'Net_DNS2_RR_WKS', + 12 => 'Net_DNS2_RR_PTR', + 13 => 'Net_DNS2_RR_HINFO', + 15 => 'Net_DNS2_RR_MX', + 16 => 'Net_DNS2_RR_TXT', + 17 => 'Net_DNS2_RR_RP', + 18 => 'Net_DNS2_RR_AFSDB', + 19 => 'Net_DNS2_RR_X25', + 20 => 'Net_DNS2_RR_ISDN', + 21 => 'Net_DNS2_RR_RT', + 22 => 'Net_DNS2_RR_NSAP', + 24 => 'Net_DNS2_RR_SIG', + 25 => 'Net_DNS2_RR_KEY', + 26 => 'Net_DNS2_RR_PX', + 28 => 'Net_DNS2_RR_AAAA', + 29 => 'Net_DNS2_RR_LOC', + 31 => 'Net_DNS2_RR_EID', + 32 => 'Net_DNS2_RR_NIMLOC', + 33 => 'Net_DNS2_RR_SRV', + 34 => 'Net_DNS2_RR_ATMA', + 35 => 'Net_DNS2_RR_NAPTR', + 36 => 'Net_DNS2_RR_KX', + 37 => 'Net_DNS2_RR_CERT', + 39 => 'Net_DNS2_RR_DNAME', + 41 => 'Net_DNS2_RR_OPT', + 42 => 'Net_DNS2_RR_APL', + 43 => 'Net_DNS2_RR_DS', + 44 => 'Net_DNS2_RR_SSHFP', + 45 => 'Net_DNS2_RR_IPSECKEY', + 46 => 'Net_DNS2_RR_RRSIG', + 47 => 'Net_DNS2_RR_NSEC', + 48 => 'Net_DNS2_RR_DNSKEY', + 49 => 'Net_DNS2_RR_DHCID', + 50 => 'Net_DNS2_RR_NSEC3', + 51 => 'Net_DNS2_RR_NSEC3PARAM', + 52 => 'Net_DNS2_RR_TLSA', + 53 => 'Net_DNS2_RR_SMIMEA', + 55 => 'Net_DNS2_RR_HIP', + 58 => 'Net_DNS2_RR_TALINK', + 59 => 'Net_DNS2_RR_CDS', + 60 => 'Net_DNS2_RR_CDNSKEY', + 61 => 'Net_DNS2_RR_OPENPGPKEY', + 62 => 'Net_DNS2_RR_CSYNC', + 99 => 'Net_DNS2_RR_SPF', + 104 => 'Net_DNS2_RR_NID', + 105 => 'Net_DNS2_RR_L32', + 106 => 'Net_DNS2_RR_L64', + 107 => 'Net_DNS2_RR_LP', + 108 => 'Net_DNS2_RR_EUI48', + 109 => 'Net_DNS2_RR_EUI64', + + 249 => 'Net_DNS2_RR_TKEY', + 250 => 'Net_DNS2_RR_TSIG', + + // 251 - IXFR - handled as a full zone transfer (252) + // 252 - AXFR - handled as a function call + + 255 => 'Net_DNS2_RR_ANY', + 256 => 'Net_DNS2_RR_URI', + 257 => 'Net_DNS2_RR_CAA', + 258 => 'Net_DNS2_RR_AVC', + 32768 => 'Net_DNS2_RR_TA', + 32769 => 'Net_DNS2_RR_DLV' + ); + + /* + * used to map resource record class names to their id's, and back + */ + public static $classes_by_id = array(); + public static $classes_by_name = array( + + 'IN' => self::RR_CLASS_IN, // RFC 1035 + 'CH' => self::RR_CLASS_CH, // RFC 1035 + 'HS' => self::RR_CLASS_HS, // RFC 1035 + 'NONE' => self::RR_CLASS_NONE, // RFC 2136 + 'ANY' => self::RR_CLASS_ANY // RFC 1035 + ); + + /* + * maps response codes to error messages + */ + public static $result_code_messages = array( + + self::RCODE_NOERROR => 'The request completed successfully.', + self::RCODE_FORMERR => 'The name server was unable to interpret the query.', + self::RCODE_SERVFAIL => 'The name server was unable to process this query due to a problem with the name server.', + self::RCODE_NXDOMAIN => 'The domain name referenced in the query does not exist.', + self::RCODE_NOTIMP => 'The name server does not support the requested kind of query.', + self::RCODE_REFUSED => 'The name server refuses to perform the specified operation for policy reasons.', + self::RCODE_YXDOMAIN => 'Name Exists when it should not.', + self::RCODE_YXRRSET => 'RR Set Exists when it should not.', + self::RCODE_NXRRSET => 'RR Set that should exist does not.', + self::RCODE_NOTAUTH => 'Server Not Authoritative for zone.', + self::RCODE_NOTZONE => 'Name not contained in zone.', + + self::RCODE_BADSIG => 'TSIG Signature Failure.', + self::RCODE_BADKEY => 'Key not recognized.', + self::RCODE_BADTIME => 'Signature out of time window.', + self::RCODE_BADMODE => 'Bad TKEY Mode.', + self::RCODE_BADNAME => 'Duplicate key name.', + self::RCODE_BADALG => 'Algorithm not supported.', + self::RCODE_BADTRUNC => 'Bad truncation.' + ); + + /* + * maps DNS SEC alrorithms to their mnemonics + */ + public static $algorithm_name_to_id = array(); + public static $algorithm_id_to_name = array( + + self::DNSSEC_ALGORITHM_RES => 'RES', + self::DNSSEC_ALGORITHM_RSAMD5 => 'RSAMD5', + self::DNSSEC_ALGORITHM_DH => 'DH', + self::DNSSEC_ALGORITHM_DSA => 'DSA', + self::DNSSEC_ALGORITHM_ECC => 'ECC', + self::DNSSEC_ALGORITHM_RSASHA1 => 'RSASHA1', + self::DNSSEC_ALGORITHM_DSANSEC3SHA1 => 'DSA-NSEC3-SHA1', + self::DSNSEC_ALGORITHM_RSASHA1NSEC3SHA1 => 'RSASHA1-NSEC3-SHA1', + self::DNSSEC_ALGORITHM_RSASHA256 => 'RSASHA256', + self::DNSSEC_ALGORITHM_RSASHA512 => 'RSASHA512', + self::DNSSEC_ALGORITHM_ECCGOST => 'ECC-GOST', + self::DNSSEC_ALGORITHM_INDIRECT => 'INDIRECT', + self::DNSSEC_ALGORITHM_PRIVATEDNS => 'PRIVATEDNS', + self::DNSSEC_ALGORITHM_PRIVATEOID => 'PRIVATEOID' + ); + + /* + * maps DNSSEC digest types to their mnemonics + */ + public static $digest_name_to_id = array(); + public static $digest_id_to_name = array( + + self::DNSSEC_DIGEST_RES => 'RES', + self::DNSSEC_DIGEST_SHA1 => 'SHA-1' + ); + + /* + * Protocols names - RFC 1010 + */ + public static $protocol_by_id = array(); + public static $protocol_by_name = array( + + 'ICMP' => 1, + 'IGMP' => 2, + 'GGP' => 3, + 'ST' => 5, + 'TCP' => 6, + 'UCL' => 7, + 'EGP' => 8, + 'IGP' => 9, + 'BBN-RCC-MON' => 10, + 'NVP-II' => 11, + 'PUP' => 12, + 'ARGUS' => 13, + 'EMCON' => 14, + 'XNET' => 15, + 'CHAOS' => 16, + 'UDP' => 17, + 'MUX' => 18, + 'DCN-MEAS' => 19, + 'HMP' => 20, + 'PRM' => 21, + 'XNS-IDP' => 22, + 'TRUNK-1' => 23, + 'TRUNK-2' => 24, + 'LEAF-1' => 25, + 'LEAF-2' => 26, + 'RDP' => 27, + 'IRTP' => 28, + 'ISO-TP4' => 29, + 'NETBLT' => 30, + 'MFE-NSP' => 31, + 'MERIT-INP' => 32, + 'SEP' => 33, + // 34 - 60 - Unassigned + // 61 - any host internal protocol + 'CFTP' => 62, + // 63 - any local network + 'SAT-EXPAK' => 64, + 'MIT-SUBNET' => 65, + 'RVD' => 66, + 'IPPC' => 67, + // 68 - any distributed file system + 'SAT-MON' => 69, + // 70 - Unassigned + 'IPCV' => 71, + // 72 - 75 - Unassigned + 'BR-SAT-MON' => 76, + // 77 - Unassigned + 'WB-MON' => 78, + 'WB-EXPAK' => 79 + // 80 - 254 - Unassigned + // 255 - Reserved + ); +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Packet.php b/bundled-libs/Net/DNS2/Packet.php new file mode 100644 index 00000000..08e9bf8a --- /dev/null +++ b/bundled-libs/Net/DNS2/Packet.php @@ -0,0 +1,434 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + * This file contains code based off the Net::DNS Perl module by + * Michael Fuhr. + * + * This is the copyright notice from the PERL Net::DNS module: + * + * Copyright (c) 1997-2000 Michael Fuhr. All rights reserved. This + * program is free software; you can redistribute it and/or modify it + * under the same terms as Perl itself. + * + */ + +/** + * This is the base class that holds a standard DNS packet. + * + * The Net_DNS2_Packet_Request and Net_DNS2_Packet_Response classes extend this + * class. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Packet_Request, Net_DNS2_Packet_Response + * + */ +class Net_DNS2_Packet +{ + /* + * the full binary data and length for this packet + */ + public $rdata; + public $rdlength; + + /* + * the offset pointer used when building/parsing packets + */ + public $offset = 0; + + /* + * Net_DNS2_Header object with the DNS packet header + */ + public $header; + + /* + * array of Net_DNS2_Question objects + * + * used as "zone" for updates per RFC2136 + * + */ + public $question = array(); + + /* + * array of Net_DNS2_RR Objects for Answers + * + * used as "prerequisite" for updates per RFC2136 + * + */ + public $answer = array(); + + /* + * array of Net_DNS2_RR Objects for Authority + * + * used as "update" for updates per RFC2136 + * + */ + public $authority = array(); + + /* + * array of Net_DNS2_RR Objects for Addtitional + */ + public $additional = array(); + + /* + * array of compressed labeles + */ + private $_compressed = array(); + + /** + * magic __toString() method to return the Net_DNS2_Packet as a string + * + * @return string + * @access public + * + */ + public function __toString() + { + $output = $this->header->__toString(); + + foreach ($this->question as $x) { + + $output .= $x->__toString() . "\n"; + } + foreach ($this->answer as $x) { + + $output .= $x->__toString() . "\n"; + } + foreach ($this->authority as $x) { + + $output .= $x->__toString() . "\n"; + } + foreach ($this->additional as $x) { + + $output .= $x->__toString() . "\n"; + } + + return $output; + } + + /** + * returns a full binary DNS packet + * + * @return string + * @throws Net_DNS2_Exception + * @access public + * + */ + public function get() + { + $data = $this->header->get($this); + + foreach ($this->question as $x) { + + $data .= $x->get($this); + } + foreach ($this->answer as $x) { + + $data .= $x->get($this); + } + foreach ($this->authority as $x) { + + $data .= $x->get($this); + } + foreach ($this->additional as $x) { + + $data .= $x->get($this); + } + + return $data; + } + + /** + * applies a standard DNS name compression on the given name/offset + * + * This logic was based on the Net::DNS::Packet::dn_comp() function + * by Michanel Fuhr + * + * @param string $name the name to be compressed + * @param integer &$offset the offset into the given packet object + * + * @return string + * @access public + * + */ + public function compress($name, &$offset) + { + $names = explode('.', $name); + $compname = ''; + + while (!empty($names)) { + + $dname = join('.', $names); + + if (isset($this->_compressed[$dname])) { + + $compname .= pack('n', 0xc000 | $this->_compressed[$dname]); + $offset += 2; + + break; + } + + $this->_compressed[$dname] = $offset; + $first = array_shift($names); + + $length = strlen($first); + if ($length <= 0) { + continue; + } + + // + // truncate see RFC1035 2.3.1 + // + if ($length > 63) { + + $length = 63; + $first = substr($first, 0, $length); + } + + $compname .= pack('Ca*', $length, $first); + $offset += $length + 1; + } + + if (empty($names)) { + + $compname .= pack('C', 0); + $offset++; + } + + return $compname; + } + + /** + * applies a standard DNS name compression on the given name/offset + * + * This logic was based on the Net::DNS::Packet::dn_comp() function + * by Michanel Fuhr + * + * @param string $name the name to be compressed + * + * @return string + * @access public + * + */ + public static function pack($name) + { + $offset = 0; + $names = explode('.', $name); + $compname = ''; + + while (!empty($names)) { + + $first = array_shift($names); + $length = strlen($first); + + $compname .= pack('Ca*', $length, $first); + $offset += $length + 1; + } + + $compname .= "\0"; + $offset++; + + return $compname; + } + + /** + * expands the domain name stored at a given offset in a DNS Packet + * + * This logic was based on the Net::DNS::Packet::dn_expand() function + * by Michanel Fuhr + * + * @param Net_DNS2_Packet &$packet the DNS packet to look in for the domain name + * @param integer &$offset the offset into the given packet object + * + * @return mixed either the domain name or null if it's not found. + * @access public + * + */ + public static function expand(Net_DNS2_Packet &$packet, &$offset) + { + $name = ''; + + while (1) { + if ($packet->rdlength < ($offset + 1)) { + return null; + } + + $xlen = ord($packet->rdata[$offset]); + if ($xlen == 0) { + + ++$offset; + break; + + } else if (($xlen & 0xc0) == 0xc0) { + if ($packet->rdlength < ($offset + 2)) { + + return null; + } + + $ptr = ord($packet->rdata[$offset]) << 8 | + ord($packet->rdata[$offset+1]); + $ptr = $ptr & 0x3fff; + + $name2 = Net_DNS2_Packet::expand($packet, $ptr); + if (is_null($name2)) { + + return null; + } + + $name .= $name2; + $offset += 2; + + break; + } else { + ++$offset; + + if ($packet->rdlength < ($offset + $xlen)) { + + return null; + } + + $elem = ''; + $elem = substr($packet->rdata, $offset, $xlen); + $name .= $elem . '.'; + $offset += $xlen; + } + } + + return trim($name, '.'); + } + + /** + * parses a domain label from a DNS Packet at the given offset + * + * @param Net_DNS2_Packet &$packet the DNS packet to look in for the domain name + * @param integer &$offset the offset into the given packet object + * + * @return mixed either the domain name or null if it's not found. + * @access public + * + */ + public static function label(Net_DNS2_Packet &$packet, &$offset) + { + $name = ''; + + if ($packet->rdlength < ($offset + 1)) { + + return null; + } + + $xlen = ord($packet->rdata[$offset]); + ++$offset; + + if (($xlen + $offset) > $packet->rdlength) { + + $name = substr($packet->rdata, $offset); + $offset = $packet->rdlength; + } else { + + $name = substr($packet->rdata, $offset, $xlen); + $offset += $xlen; + } + + return $name; + } + + /** + * copies the contents of the given packet, to the local packet object. this + * function intentionally ignores some of the packet data. + * + * @param Net_DNS2_Packet $packet the DNS packet to copy the data from + * + * @return boolean + * @access public + * + */ + public function copy(Net_DNS2_Packet $packet) + { + $this->header = $packet->header; + $this->question = $packet->question; + $this->answer = $packet->answer; + $this->authority = $packet->authority; + $this->additional = $packet->additional; + + return true; + } + + /** + * resets the values in the current packet object + * + * @return boolean + * @access public + * + */ + public function reset() + { + $this->header->id = $this->header->nextPacketId(); + $this->rdata = ''; + $this->rdlength = 0; + $this->offset = 0; + $this->answer = array(); + $this->authority = array(); + $this->additional = array(); + $this->_compressed = array(); + + return true; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Packet/Request.php b/bundled-libs/Net/DNS2/Packet/Request.php new file mode 100644 index 00000000..2e013aec --- /dev/null +++ b/bundled-libs/Net/DNS2/Packet/Request.php @@ -0,0 +1,217 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + + +/** + * This class handles building new DNS request packets; packets used for DNS + * queries and updates. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Packet + * + */ +class Net_DNS2_Packet_Request extends Net_DNS2_Packet +{ + /** + * Constructor - builds a new Net_DNS2_Packet_Request object + * + * @param string $name the domain name for the packet + * @param string $type the DNS RR type for the packet + * @param string $class the DNS class for the packet + * + * @throws Net_DNS2_Exception + * @access public + * + */ + public function __construct($name, $type = null, $class = null) + { + $this->set($name, $type, $class); + } + + /** + * builds a new Net_DNS2_Packet_Request object + * + * @param string $name the domain name for the packet + * @param string $type the DNS RR type for the packet + * @param string $class the DNS class for the packet + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function set($name, $type = 'A', $class = 'IN') + { + // + // generate a new header + // + $this->header = new Net_DNS2_Header; + + // + // add a new question + // + $q = new Net_DNS2_Question(); + + // + // allow queries directly to . for the root name servers + // + if ($name != '.') { + $name = trim(strtolower($name), " \t\n\r\0\x0B."); + } + + $type = strtoupper(trim($type)); + $class = strtoupper(trim($class)); + + // + // check that the input string has some data in it + // + if (empty($name)) { + + throw new Net_DNS2_Exception( + 'empty query string provided', + Net_DNS2_Lookups::E_PACKET_INVALID + ); + } + + // + // if the type is "*", rename it to "ANY"- both are acceptable. + // + if ($type == '*') { + + $type = 'ANY'; + } + + // + // check that the type and class are valid + // + if ( (!isset(Net_DNS2_Lookups::$rr_types_by_name[$type])) + || (!isset(Net_DNS2_Lookups::$classes_by_name[$class])) + ) { + throw new Net_DNS2_Exception( + 'invalid type (' . $type . ') or class (' . $class . ') specified.', + Net_DNS2_Lookups::E_PACKET_INVALID + ); + } + + if ($type == 'PTR') { + + // + // if it's a PTR request for an IP address, then make sure we tack on + // the arpa domain. + // + // there are other types of PTR requests, so if an IP adress doesn't match, + // then just let it flow through and assume it's a hostname + // + if (Net_DNS2::isIPv4($name) == true) { + + // + // IPv4 + // + $name = implode('.', array_reverse(explode('.', $name))); + $name .= '.in-addr.arpa'; + + } else if (Net_DNS2::isIPv6($name) == true) { + + // + // IPv6 + // + $e = Net_DNS2::expandIPv6($name); + if ($e !== false) { + + $name = implode( + '.', array_reverse(str_split(str_replace(':', '', $e))) + ); + + $name .= '.ip6.arpa'; + + } else { + + throw new Net_DNS2_Exception( + 'unsupported PTR value: ' . $name, + Net_DNS2_Lookups::E_PACKET_INVALID + ); + } + } + } + + // + // store the data + // + $q->qname = $name; + $q->qtype = $type; + $q->qclass = $class; + + $this->question[] = $q; + + // + // the answer, authority and additional are empty; they can be modified + // after the request is created for UPDATE requests if needed. + // + $this->answer = array(); + $this->authority = array(); + $this->additional = array(); + + return true; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Packet/Response.php b/bundled-libs/Net/DNS2/Packet/Response.php new file mode 100644 index 00000000..604a4392 --- /dev/null +++ b/bundled-libs/Net/DNS2/Packet/Response.php @@ -0,0 +1,194 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + + +/** + * This class handles building new DNS response packets; it parses binary packed + * packets that come off the wire + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Packet + * + */ +class Net_DNS2_Packet_Response extends Net_DNS2_Packet +{ + /* + * The name servers that this response came from + */ + public $answer_from; + + /* + * The socket type the answer came from (TCP/UDP) + */ + public $answer_socket_type; + + /* + * The query response time in microseconds + */ + public $response_time = 0; + + /** + * Constructor - builds a new Net_DNS2_Packet_Response object + * + * @param string $data binary DNS packet + * @param integer $size the length of the DNS packet + * + * @throws Net_DNS2_Exception + * @access public + * + */ + public function __construct($data, $size) + { + $this->set($data, $size); + } + + /** + * builds a new Net_DNS2_Packet_Response object + * + * @param string $data binary DNS packet + * @param integer $size the length of the DNS packet + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function set($data, $size) + { + // + // store the full packet + // + $this->rdata = $data; + $this->rdlength = $size; + + // + // parse the header + // + // we don't bother checking the size earlier, because the first thing the + // header class does, is check the size and throw and exception if it's + // invalid. + // + $this->header = new Net_DNS2_Header($this); + + // + // if the truncation bit is set, then just return right here, because the + // rest of the packet is probably empty; and there's no point in processing + // anything else. + // + // we also don't need to worry about checking to see if the the header is + // null or not, since the Net_DNS2_Header() constructor will throw an + // exception if the packet is invalid. + // + if ($this->header->tc == 1) { + + return false; + } + + // + // parse the questions + // + for ($x = 0; $x < $this->header->qdcount; ++$x) { + + $this->question[$x] = new Net_DNS2_Question($this); + } + + // + // parse the answers + // + for ($x = 0; $x < $this->header->ancount; ++$x) { + + $o = Net_DNS2_RR::parse($this); + if (!is_null($o)) { + + $this->answer[] = $o; + } + } + + // + // parse the authority section + // + for ($x = 0; $x < $this->header->nscount; ++$x) { + + $o = Net_DNS2_RR::parse($this); + if (!is_null($o)) { + + $this->authority[] = $o; + } + } + + // + // parse the additional section + // + for ($x = 0; $x < $this->header->arcount; ++$x) { + + $o = Net_DNS2_RR::parse($this); + if (!is_null($o)) { + + $this->additional[] = $o; + } + } + + return true; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/PrivateKey.php b/bundled-libs/Net/DNS2/PrivateKey.php new file mode 100644 index 00000000..35ac58bc --- /dev/null +++ b/bundled-libs/Net/DNS2/PrivateKey.php @@ -0,0 +1,424 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2011 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.1.0 + * + */ + +/** + * SSL Private Key container class + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * + */ +class Net_DNS2_PrivateKey +{ + /* + * the filename that was loaded; stored for reference + */ + public $filename; + + /* + * the keytag for the signature + */ + public $keytag; + + /* + * the sign name for the signature + */ + public $signname; + + /* + * the algorithm used for the signature + */ + public $algorithm; + + /* + * the key format fo the signature + */ + public $key_format; + + /* + * the openssl private key id + */ + public $instance; + + /* + * RSA: modulus + */ + private $_modulus; + + /* + * RSA: public exponent + */ + private $_public_exponent; + + /* + * RSA: rivate exponent + */ + private $_private_exponent; + + /* + * RSA: prime1 + */ + private $_prime1; + + /* + * RSA: prime2 + */ + private $_prime2; + + /* + * RSA: exponent 1 + */ + private $_exponent1; + + /* + * RSA: exponent 2 + */ + private $_exponent2; + + /* + * RSA: coefficient + */ + private $_coefficient; + + /* + * DSA: prime + */ + public $prime; + + /* + * DSA: subprime + */ + public $subprime; + + /* + * DSA: base + */ + public $base; + + /* + * DSA: private value + */ + public $private_value; + + /* + * DSA: public value + */ + public $public_value; + + /** + * Constructor - base constructor the private key container class + * + * @param string $file path to a private-key file to parse and load + * + * @throws Net_DNS2_Exception + * @access public + * + */ + public function __construct($file = null) + { + if (isset($file)) { + $this->parseFile($file); + } + } + + /** + * parses a private key file generated by dnssec-keygen + * + * @param string $file path to a private-key file to parse and load + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function parseFile($file) + { + // + // check for OpenSSL + // + if (extension_loaded('openssl') === false) { + + throw new Net_DNS2_Exception( + 'the OpenSSL extension is required to use parse private key.', + Net_DNS2_Lookups::E_OPENSSL_UNAVAIL + ); + } + + // + // check to make sure the file exists + // + if (is_readable($file) == false) { + + throw new Net_DNS2_Exception( + 'invalid private key file: ' . $file, + Net_DNS2_Lookups::E_OPENSSL_INV_PKEY + ); + } + + // + // get the base filename, and parse it for the local value + // + $keyname = basename($file); + if (strlen($keyname) == 0) { + + throw new Net_DNS2_Exception( + 'failed to get basename() for: ' . $file, + Net_DNS2_Lookups::E_OPENSSL_INV_PKEY + ); + } + + // + // parse the keyname + // + if (preg_match("/K(.*)\.\+(\d{3})\+(\d*)\.private/", $keyname, $matches)) { + + $this->signname = $matches[1]; + $this->algorithm = intval($matches[2]); + $this->keytag = intval($matches[3]); + + } else { + + throw new Net_DNS2_Exception( + 'file ' . $keyname . ' does not look like a private key file!', + Net_DNS2_Lookups::E_OPENSSL_INV_PKEY + ); + } + + // + // read all the data from the + // + $data = file($file, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES); + if (count($data) == 0) { + + throw new Net_DNS2_Exception( + 'file ' . $keyname . ' is empty!', + Net_DNS2_Lookups::E_OPENSSL_INV_PKEY + ); + } + + foreach ($data as $line) { + + list($key, $value) = explode(':', $line); + + $key = trim($key); + $value = trim($value); + + switch(strtolower($key)) { + + case 'private-key-format': + $this->_key_format = $value; + break; + + case 'algorithm': + if ($this->algorithm != $value) { + throw new Net_DNS2_Exception( + 'Algorithm mis-match! filename is ' . $this->algorithm . + ', contents say ' . $value, + Net_DNS2_Lookups::E_OPENSSL_INV_ALGO + ); + } + break; + + // + // RSA + // + case 'modulus': + $this->_modulus = $value; + break; + + case 'publicexponent': + $this->_public_exponent = $value; + break; + + case 'privateexponent': + $this->_private_exponent = $value; + break; + + case 'prime1': + $this->_prime1 = $value; + break; + + case 'prime2': + $this->_prime2 = $value; + break; + + case 'exponent1': + $this->_exponent1 = $value; + break; + + case 'exponent2': + $this->_exponent2 = $value; + break; + + case 'coefficient': + $this->_coefficient = $value; + break; + + // + // DSA - this won't work in PHP until the OpenSSL extension is better + // + case 'prime(p)': + $this->prime = $value; + break; + + case 'subprime(q)': + $this->subprime = $value; + break; + + case 'base(g)': + $this->base = $value; + break; + + case 'private_value(x)': + $this->private_value = $value; + break; + + case 'public_value(y)': + $this->public_value = $value; + break; + + default: + throw new Net_DNS2_Exception( + 'unknown private key data: ' . $key . ': ' . $value, + Net_DNS2_Lookups::E_OPENSSL_INV_PKEY + ); + } + } + + // + // generate the private key + // + $args = array(); + + switch($this->algorithm) { + + // + // RSA + // + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSAMD5: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA1: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA256: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA512: + + $args = array( + + 'rsa' => array( + + 'n' => base64_decode($this->_modulus), + 'e' => base64_decode($this->_public_exponent), + 'd' => base64_decode($this->_private_exponent), + 'p' => base64_decode($this->_prime1), + 'q' => base64_decode($this->_prime2), + 'dmp1' => base64_decode($this->_exponent1), + 'dmq1' => base64_decode($this->_exponent2), + 'iqmp' => base64_decode($this->_coefficient) + ) + ); + + break; + + // + // DSA - this won't work in PHP until the OpenSSL extension is better + // + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_DSA: + + $args = array( + + 'dsa' => array( + + 'p' => base64_decode($this->prime), + 'q' => base64_decode($this->subprime), + 'g' => base64_decode($this->base), + 'priv_key' => base64_decode($this->private_value), + 'pub_key' => base64_decode($this->public_value) + ) + ); + + break; + + default: + throw new Net_DNS2_Exception( + 'we only currently support RSAMD5 and RSASHA1 encryption.', + Net_DNS2_Lookups::E_OPENSSL_INV_PKEY + ); + } + + // + // generate and store the key + // + $this->instance = openssl_pkey_new($args); + if ($this->instance === false) { + throw new Net_DNS2_Exception( + openssl_error_string(), + Net_DNS2_Lookups::E_OPENSSL_ERROR + ); + } + + // + // store the filename incase we need it for something + // + $this->filename = $file; + + return true; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Question.php b/bundled-libs/Net/DNS2/Question.php new file mode 100644 index 00000000..893f0c93 --- /dev/null +++ b/bundled-libs/Net/DNS2/Question.php @@ -0,0 +1,244 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * This class handles parsing and constructing the question sectino of DNS + * packets. + * + * This is referred to as the "zone" for update per RFC2136 + * + * DNS question format - RFC1035 section 4.1.2 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | | + * / QNAME / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | QTYPE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | QCLASS | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Packet + * + */ +class Net_DNS2_Question +{ + /* + * The name of the question + * + * referred to as "zname" for updates per RFC2136 + * + */ + public $qname; + + /* + * The RR type for the questino + * + * referred to as "ztype" for updates per RFC2136 + * + */ + public $qtype; + + /* + * The RR class for the questino + * + * referred to as "zclass" for updates per RFC2136 + * + */ + public $qclass; + + /** + * Constructor - builds a new Net_DNS2_Question object + * + * @param mixed &$packet either a Net_DNS2_Packet object, or null to + * build an empty object + * + * @throws Net_DNS2_Exception + * @access public + * + */ + public function __construct(Net_DNS2_Packet &$packet = null) + { + if (!is_null($packet)) { + + $this->set($packet); + } else { + + $this->qname = ''; + $this->qtype = 'A'; + $this->qclass = 'IN'; + } + } + + /** + * magic __toString() function to return the Net_DNS2_Question object as a string + * + * @return string + * @access public + * + */ + public function __toString() + { + return ";;\n;; Question:\n;;\t " . $this->qname . '. ' . + $this->qtype . ' ' . $this->qclass . "\n"; + } + + /** + * builds a new Net_DNS2_Header object from a Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet object + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function set(Net_DNS2_Packet &$packet) + { + // + // expand the name + // + $this->qname = $packet->expand($packet, $packet->offset); + if ($packet->rdlength < ($packet->offset + 4)) { + + throw new Net_DNS2_Exception( + 'invalid question section: to small', + Net_DNS2_Lookups::E_QUESTION_INVALID + ); + } + + // + // unpack the type and class + // + $type = ord($packet->rdata[$packet->offset++]) << 8 | + ord($packet->rdata[$packet->offset++]); + $class = ord($packet->rdata[$packet->offset++]) << 8 | + ord($packet->rdata[$packet->offset++]); + + // + // validate it + // + $type_name = Net_DNS2_Lookups::$rr_types_by_id[$type]; + $class_name = Net_DNS2_Lookups::$classes_by_id[$class]; + + if ( (!isset($type_name)) || (!isset($class_name)) ) { + + throw new Net_DNS2_Exception( + 'invalid question section: invalid type (' . $type . + ') or class (' . $class . ') specified.', + Net_DNS2_Lookups::E_QUESTION_INVALID + ); + } + + // + // store it + // + $this->qtype = $type_name; + $this->qclass = $class_name; + + return true; + } + + /** + * returns a binary packed Net_DNS2_Question object + * + * @param Net_DNS2_Packet &$packet the Net_DNS2_Packet object this question is + * part of. This needs to be passed in so that + * the compressed qname value can be packed in + * with the names of the other parts of the + * packet. + * + * @return string + * @throws Net_DNS2_Exception + * @access public + * + */ + public function get(Net_DNS2_Packet &$packet) + { + // + // validate the type and class + // + $type = Net_DNS2_Lookups::$rr_types_by_name[$this->qtype]; + $class = Net_DNS2_Lookups::$classes_by_name[$this->qclass]; + + if ( (!isset($type)) || (!isset($class)) ) { + + throw new Net_DNS2_Exception( + 'invalid question section: invalid type (' . $this->qtype . + ') or class (' . $this->qclass . ') specified.', + Net_DNS2_Lookups::E_QUESTION_INVALID + ); + } + + $data = $packet->compress($this->qname, $packet->offset); + + $data .= chr($type >> 8) . chr($type) . chr($class >> 8) . chr($class); + $packet->offset += 4; + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR.php b/bundled-libs/Net/DNS2/RR.php new file mode 100644 index 00000000..876205fa --- /dev/null +++ b/bundled-libs/Net/DNS2/RR.php @@ -0,0 +1,644 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + + +/** + * This is the base class for DNS Resource Records + * + * Each resource record type (defined in RR/*.php) extends this class for + * base functionality. + * + * This class handles parsing and constructing the common parts of the DNS + * resource records, while the RR specific functionality is handled in each + * child class. + * + * DNS resource record format - RFC1035 section 4.1.3 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | | + * / / + * / NAME / + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | TYPE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | CLASS | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | TTL | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | RDLENGTH | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| + * / RDATA / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * + */ +abstract class Net_DNS2_RR +{ + /* + * The name of the resource record + */ + public $name; + + /* + * The resource record type + */ + public $type; + + /* + * The resouce record class + */ + public $class; + + /* + * The time to live for this resource record + */ + public $ttl; + + /* + * The length of the rdata field + */ + public $rdlength; + + /* + * The resource record specific data as a packed binary string + */ + public $rdata; + + /** + * abstract definition - method to return a RR as a string; not to + * be confused with the __toString() magic method. + * + * @return string + * @access protected + * + */ + abstract protected function rrToString(); + + /** + * abstract definition - parses a RR from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + abstract protected function rrFromString(array $rdata); + + /** + * abstract definition - sets a Net_DNS2_RR from a Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + abstract protected function rrSet(Net_DNS2_Packet &$packet); + + /** + * abstract definition - returns a binary packet DNS RR object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed string or + * null on failure + * @access protected + * + */ + abstract protected function rrGet(Net_DNS2_Packet &$packet); + + /** + * Constructor - builds a new Net_DNS2_RR object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet or null to create + * an empty object + * @param array $rr an array with RR parse values or null to + * create an empty object + * + * @throws Net_DNS2_Exception + * @access public + * + */ + public function __construct(Net_DNS2_Packet &$packet = null, array $rr = null) + { + if ( (!is_null($packet)) && (!is_null($rr)) ) { + + if ($this->set($packet, $rr) == false) { + + throw new Net_DNS2_Exception( + 'failed to generate resource record', + Net_DNS2_Lookups::E_RR_INVALID + ); + } + } else { + + $class = Net_DNS2_Lookups::$rr_types_class_to_id[get_class($this)]; + if (isset($class)) { + + $this->type = Net_DNS2_Lookups::$rr_types_by_id[$class]; + } + + $this->class = 'IN'; + $this->ttl = 86400; + } + } + + /** + * magic __toString() method to return the Net_DNS2_RR object object as a string + * + * @return string + * @access public + * + */ + public function __toString() + { + return $this->name . '. ' . $this->ttl . ' ' . $this->class . + ' ' . $this->type . ' ' . $this->rrToString(); + } + + /** + * return a formatted string; if a string has spaces in it, then return + * it with double quotes around it, otherwise, return it as it was passed in. + * + * @param string $string the string to format + * + * @return string + * @access protected + * + */ + protected function formatString($string) + { + return '"' . str_replace('"', '\"', trim($string, '"')) . '"'; + } + + /** + * builds an array of strings from an array of chunks of text split by spaces + * + * @param array $chunks an array of chunks of text split by spaces + * + * @return array + * @access protected + * + */ + protected function buildString(array $chunks) + { + $data = array(); + $c = 0; + $in = false; + + foreach ($chunks as $r) { + + $r = trim($r); + if (strlen($r) == 0) { + continue; + } + + if ( ($r[0] == '"') + && ($r[strlen($r) - 1] == '"') + && ($r[strlen($r) - 2] != '\\') + ) { + + $data[$c] = $r; + ++$c; + $in = false; + + } else if ($r[0] == '"') { + + $data[$c] = $r; + $in = true; + + } else if ( ($r[strlen($r) - 1] == '"') + && ($r[strlen($r) - 2] != '\\') + ) { + + $data[$c] .= ' ' . $r; + ++$c; + $in = false; + + } else { + + if ($in == true) { + $data[$c] .= ' ' . $r; + } else { + $data[$c++] = $r; + } + } + } + + foreach ($data as $index => $string) { + + $data[$index] = str_replace('\"', '"', trim($string, '"')); + } + + return $data; + } + + /** + * builds a new Net_DNS2_RR object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet or null to create + * an empty object + * @param array $rr an array with RR parse values or null to + * create an empty object + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function set(Net_DNS2_Packet &$packet, array $rr) + { + $this->name = $rr['name']; + $this->type = Net_DNS2_Lookups::$rr_types_by_id[$rr['type']]; + + // + // for RR OPT (41), the class value includes the requestors UDP payload size, + // and not a class value + // + if ($this->type == 'OPT') { + $this->class = $rr['class']; + } else { + $this->class = Net_DNS2_Lookups::$classes_by_id[$rr['class']]; + } + + $this->ttl = $rr['ttl']; + $this->rdlength = $rr['rdlength']; + $this->rdata = substr($packet->rdata, $packet->offset, $rr['rdlength']); + + return $this->rrSet($packet); + } + + /** + * returns a binary packed DNS RR object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet used for + * compressing names + * + * @return string + * @throws Net_DNS2_Exception + * @access public + * + */ + public function get(Net_DNS2_Packet &$packet) + { + $data = ''; + $rdata = ''; + + // + // pack the name + // + $data = $packet->compress($this->name, $packet->offset); + + // + // pack the main values + // + if ($this->type == 'OPT') { + + // + // pre-build the TTL value + // + $this->preBuild(); + + // + // the class value is different for OPT types + // + $data .= pack( + 'nnN', + Net_DNS2_Lookups::$rr_types_by_name[$this->type], + $this->class, + $this->ttl + ); + } else { + + $data .= pack( + 'nnN', + Net_DNS2_Lookups::$rr_types_by_name[$this->type], + Net_DNS2_Lookups::$classes_by_name[$this->class], + $this->ttl + ); + } + + // + // increase the offset, and allow for the rdlength + // + $packet->offset += 10; + + // + // get the RR specific details + // + if ($this->rdlength != -1) { + + $rdata = $this->rrGet($packet); + } + + // + // add the RR + // + $data .= pack('n', strlen($rdata)) . $rdata; + + return $data; + } + + /** + * parses a binary packet, and returns the appropriate Net_DNS2_RR object, + * based on the RR type of the binary content. + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet used for + * decompressing names + * + * @return mixed returns a new Net_DNS2_RR_* object for + * the given RR + * @throws Net_DNS2_Exception + * @access public + * + */ + public static function parse(Net_DNS2_Packet &$packet) + { + $object = array(); + + // + // expand the name + // + $object['name'] = $packet->expand($packet, $packet->offset); + if (is_null($object['name'])) { + + throw new Net_DNS2_Exception( + 'failed to parse resource record: failed to expand name.', + Net_DNS2_Lookups::E_PARSE_ERROR + ); + } + if ($packet->rdlength < ($packet->offset + 10)) { + + throw new Net_DNS2_Exception( + 'failed to parse resource record: packet too small.', + Net_DNS2_Lookups::E_PARSE_ERROR + ); + } + + // + // unpack the RR details + // + $object['type'] = ord($packet->rdata[$packet->offset++]) << 8 | + ord($packet->rdata[$packet->offset++]); + $object['class'] = ord($packet->rdata[$packet->offset++]) << 8 | + ord($packet->rdata[$packet->offset++]); + + $object['ttl'] = ord($packet->rdata[$packet->offset++]) << 24 | + ord($packet->rdata[$packet->offset++]) << 16 | + ord($packet->rdata[$packet->offset++]) << 8 | + ord($packet->rdata[$packet->offset++]); + + $object['rdlength'] = ord($packet->rdata[$packet->offset++]) << 8 | + ord($packet->rdata[$packet->offset++]); + + if ($packet->rdlength < ($packet->offset + $object['rdlength'])) { + return null; + } + + // + // lookup the class to use + // + $o = null; + $class = Net_DNS2_Lookups::$rr_types_id_to_class[$object['type']]; + + if (isset($class)) { + + $o = new $class($packet, $object); + if ($o) { + + $packet->offset += $object['rdlength']; + } + } else { + + throw new Net_DNS2_Exception( + 'un-implemented resource record type: ' . $object['type'], + Net_DNS2_Lookups::E_RR_INVALID + ); + } + + return $o; + } + + /** + * cleans up some RR data + * + * @param string $data the text string to clean + * + * @return string returns the cleaned string + * + * @access public + * + */ + public function cleanString($data) + { + return strtolower(rtrim($data, '.')); + } + + /** + * parses a standard RR format lines, as defined by rfc1035 (kinda) + * + * In our implementation, the domain *must* be specified- format must be + * + * <name> [<ttl>] [<class>] <type> <rdata> + * or + * <name> [<class>] [<ttl>] <type> <rdata> + * + * name, title, class and type are parsed by this function, rdata is passed + * to the RR specific classes for parsing. + * + * @param string $line a standard DNS config line + * + * @return mixed returns a new Net_DNS2_RR_* object for the given RR + * @throws Net_DNS2_Exception + * @access public + * + */ + public static function fromString($line) + { + if (strlen($line) == 0) { + throw new Net_DNS2_Exception( + 'empty config line provided.', + Net_DNS2_Lookups::E_PARSE_ERROR + ); + } + + $name = ''; + $type = ''; + $class = 'IN'; + $ttl = 86400; + + // + // split the line by spaces + // + $values = preg_split('/[\s]+/', $line); + if (count($values) < 3) { + + throw new Net_DNS2_Exception( + 'failed to parse config: minimum of name, type and rdata required.', + Net_DNS2_Lookups::E_PARSE_ERROR + ); + } + + // + // assume the first value is the name + // + $name = trim(strtolower(array_shift($values)), '.'); + + // + // The next value is either a TTL, Class or Type + // + foreach ($values as $value) { + + switch(true) { + case is_numeric($value): + + $ttl = array_shift($values); + break; + + // + // this is here because of a bug in is_numeric() in certain versions of + // PHP on windows. + // + case ($value === 0): + + $ttl = array_shift($values); + break; + + case isset(Net_DNS2_Lookups::$classes_by_name[strtoupper($value)]): + + $class = strtoupper(array_shift($values)); + break; + + case isset(Net_DNS2_Lookups::$rr_types_by_name[strtoupper($value)]): + + $type = strtoupper(array_shift($values)); + break 2; + break; + + default: + + throw new Net_DNS2_Exception( + 'invalid config line provided: unknown file: ' . $value, + Net_DNS2_Lookups::E_PARSE_ERROR + ); + } + } + + // + // lookup the class to use + // + $o = null; + $class_name = Net_DNS2_Lookups::$rr_types_id_to_class[ + Net_DNS2_Lookups::$rr_types_by_name[$type] + ]; + + if (isset($class_name)) { + + $o = new $class_name; + if (!is_null($o)) { + + // + // set the parsed values + // + $o->name = $name; + $o->class = $class; + $o->ttl = $ttl; + + // + // parse the rdata + // + if ($o->rrFromString($values) === false) { + + throw new Net_DNS2_Exception( + 'failed to parse rdata for config: ' . $line, + Net_DNS2_Lookups::E_PARSE_ERROR + ); + } + + } else { + + throw new Net_DNS2_Exception( + 'failed to create new RR record for type: ' . $type, + Net_DNS2_Lookups::E_RR_INVALID + ); + } + + } else { + + throw new Net_DNS2_Exception( + 'un-implemented resource record type: '. $type, + Net_DNS2_Lookups::E_RR_INVALID + ); + } + + return $o; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/A.php b/bundled-libs/Net/DNS2/RR/A.php new file mode 100644 index 00000000..0e8ed33f --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/A.php @@ -0,0 +1,156 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * A Resource Record - RFC1035 section 3.4.1 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ADDRESS | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_A extends Net_DNS2_RR +{ + /* + * The IPv4 address in quad-dotted notation + */ + public $address; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->address; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $value = array_shift($rdata); + + if (Net_DNS2::isIPv4($value) == true) { + + $this->address = $value; + return true; + } + + return false; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $this->address = inet_ntop($this->rdata); + if ($this->address !== false) { + + return true; + } + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + $packet->offset += 4; + return inet_pton($this->address); + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/AAAA.php b/bundled-libs/Net/DNS2/RR/AAAA.php new file mode 100644 index 00000000..df81370f --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/AAAA.php @@ -0,0 +1,177 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * A Resource Record - RFC1035 section 3.4.1 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | | + * | | + * | | + * | ADDRESS | + * | | + * | (128 bit) | + * | | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_AAAA extends Net_DNS2_RR +{ + /* + * the IPv6 address in the preferred hexadecimal values of the eight + * 16-bit pieces + * per RFC1884 + * + */ + public $address; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->address; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + // + // expand out compressed formats + // + $value = array_shift($rdata); + if (Net_DNS2::isIPv6($value) == true) { + + $this->address = $value; + return true; + } + + return false; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + // + // must be 8 x 16bit chunks, or 16 x 8bit + // + if ($this->rdlength == 16) { + + // + // PHP's inet_ntop returns IPv6 addresses in their compressed form, + // but we want to keep with the preferred standard, so we'll parse + // it manually. + // + $x = unpack('n8', $this->rdata); + if (count($x) == 8) { + + $this->address = vsprintf('%x:%x:%x:%x:%x:%x:%x:%x', $x); + return true; + } + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + $packet->offset += 16; + return inet_pton($this->address); + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/AFSDB.php b/bundled-libs/Net/DNS2/RR/AFSDB.php new file mode 100644 index 00000000..724f87f8 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/AFSDB.php @@ -0,0 +1,174 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * AFSDB Resource Record - RFC1183 section 1 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | SUBTYPE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / HOSTNAME / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_AFSDB extends Net_DNS2_RR +{ + /* + * The AFSDB sub type + */ + public $subtype; + + /* + * The AFSDB hostname + */ + public $hostname; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->subtype . ' ' . $this->cleanString($this->hostname) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->subtype = array_shift($rdata); + $this->hostname = $this->cleanString(array_shift($rdata)); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the subtype + // + $x = unpack('nsubtype', $this->rdata); + + $this->subtype = $x['subtype']; + $offset = $packet->offset + 2; + + $this->hostname = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->hostname) > 0) { + + $data = pack('n', $this->subtype); + $packet->offset += 2; + + $data .= $packet->compress($this->hostname, $packet->offset); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/ANY.php b/bundled-libs/Net/DNS2/RR/ANY.php new file mode 100644 index 00000000..617bb3e9 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/ANY.php @@ -0,0 +1,129 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * This is only used for generating an empty ANY RR. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_ANY extends Net_DNS2_RR +{ + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return ''; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + return true; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + return ''; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/APL.php b/bundled-libs/Net/DNS2/RR/APL.php new file mode 100644 index 00000000..15842104 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/APL.php @@ -0,0 +1,343 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.0.0 + * + */ + +/** + * APL Resource Record - RFC3123 + * + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * | ADDRESSFAMILY | + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * | PREFIX | N | AFDLENGTH | + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * / AFDPART / + * | | + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_APL extends Net_DNS2_RR +{ + /* + * a list of all the address prefix list items + */ + public $apl_items = array(); + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $out = ''; + + foreach ($this->apl_items as $item) { + + if ($item['n'] == 1) { + + $out .= '!'; + } + + $out .= $item['address_family'] . ':' . + $item['afd_part'] . '/' . $item['prefix'] . ' '; + } + + return trim($out); + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + foreach ($rdata as $item) { + + if (preg_match('/^(!?)([1|2])\:([^\/]*)\/([0-9]{1,3})$/', $item, $m)) { + + $i = array( + + 'address_family' => $m[2], + 'prefix' => $m[4], + 'n' => ($m[1] == '!') ? 1 : 0, + 'afd_part' => strtolower($m[3]) + ); + + $address = $this->_trimZeros( + $i['address_family'], $i['afd_part'] + ); + + $i['afd_length'] = count(explode('.', $address)); + + $this->apl_items[] = $i; + } + } + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $offset = 0; + + while ($offset < $this->rdlength) { + + // + // unpack the family, prefix, negate and length values + // + $x = unpack( + 'naddress_family/Cprefix/Cextra', substr($this->rdata, $offset) + ); + + $item = array( + + 'address_family' => $x['address_family'], + 'prefix' => $x['prefix'], + 'n' => ($x['extra'] >> 7) & 0x1, + 'afd_length' => $x['extra'] & 0xf + ); + + switch($item['address_family']) { + + case 1: + $r = unpack( + 'C*', substr($this->rdata, $offset + 4, $item['afd_length']) + ); + if (count($r) < 4) { + + for ($c=count($r)+1; $c<4+1; $c++) { + + $r[$c] = 0; + } + } + + $item['afd_part'] = implode('.', $r); + + break; + case 2: + $r = unpack( + 'C*', substr($this->rdata, $offset + 4, $item['afd_length']) + ); + if (count($r) < 8) { + + for ($c=count($r)+1; $c<8+1; $c++) { + + $r[$c] = 0; + } + } + + $item['afd_part'] = sprintf( + '%x:%x:%x:%x:%x:%x:%x:%x', + $r[1], $r[2], $r[3], $r[4], $r[5], $r[6], $r[7], $r[8] + ); + + break; + default: + return false; + } + + $this->apl_items[] = $item; + + $offset += 4 + $item['afd_length']; + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (count($this->apl_items) > 0) { + + $data = ''; + + foreach ($this->apl_items as $item) { + + // + // pack the address_family and prefix values + // + $data .= pack( + 'nCC', + $item['address_family'], + $item['prefix'], + ($item['n'] << 7) | $item['afd_length'] + ); + + switch($item['address_family']) { + case 1: + $address = explode( + '.', + $this->_trimZeros($item['address_family'], $item['afd_part']) + ); + + foreach ($address as $b) { + $data .= chr($b); + } + break; + case 2: + $address = explode( + ':', + $this->_trimZeros($item['address_family'], $item['afd_part']) + ); + + foreach ($address as $b) { + $data .= pack('H', $b); + } + break; + default: + return null; + } + } + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } + + /** + * returns an IP address with the right-hand zero's trimmed + * + * @param integer $family the IP address family from the rdata + * @param string $address the IP address + * + * @return string the trimmed IP addresss. + * + * @access private + * + */ + private function _trimZeros($family, $address) + { + $a = array(); + + switch($family) { + case 1: + $a = array_reverse(explode('.', $address)); + break; + case 2: + $a = array_reverse(explode(':', $address)); + break; + default: + return ''; + } + + foreach ($a as $value) { + + if ($value === '0') { + + array_shift($a); + } + } + + $out = ''; + + switch($family) { + case 1: + $out = implode('.', array_reverse($a)); + break; + case 2: + $out = implode(':', array_reverse($a)); + break; + default: + return ''; + } + + return $out; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/ATMA.php b/bundled-libs/Net/DNS2/RR/ATMA.php new file mode 100644 index 00000000..4eeca9f1 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/ATMA.php @@ -0,0 +1,210 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.1.0 + * + */ + +/** + * ATMA Resource Record + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | FORMAT | | + * | +--+--+--+--+--+--+--+--+ + * / ADDRESS / + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_ATMA extends Net_DNS2_RR +{ + /* + * One octet that indicates the format of ADDRESS. The two possible values + * for FORMAT are value 0 indicating ATM End System Address (AESA) format + * and value 1 indicating E.164 format + */ + public $format; + + /* + * The IPv4 address in quad-dotted notation + */ + public $address; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->address; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $value = array_shift($rdata); + + if (ctype_xdigit($value) == true) { + + $this->format = 0; + $this->address = $value; + + } else if (is_numeric($value) == true) { + + $this->format = 1; + $this->address = $value; + + } else { + + return false; + } + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the format + // + $x = unpack('Cformat/N*address', $this->rdata); + + $this->format = $x['format']; + + if ($this->format == 0) { + + $a = unpack('@1/H*address', $this->rdata); + + $this->address = $a['address']; + + } else if ($this->format == 1) { + + $this->address = substr($this->rdata, 1, $this->rdlength - 1); + + } else { + + return false; + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + $data = chr($this->format); + + if ($this->format == 0) { + + $data .= pack('H*', $this->address); + + } else if ($this->format == 1) { + + $data .= $this->address; + + } else { + + return null; + } + + $packet->offset += strlen($data); + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/AVC.php b/bundled-libs/Net/DNS2/RR/AVC.php new file mode 100644 index 00000000..851d87a4 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/AVC.php @@ -0,0 +1,75 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2016, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2016 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.4.2 + * + */ + +/** + * The AVC RR is implemented exactly like the TXT record, so + * for now we just extend the TXT RR and use it. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_AVC extends Net_DNS2_RR_TXT +{ +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/CAA.php b/bundled-libs/Net/DNS2/RR/CAA.php new file mode 100644 index 00000000..05cfba18 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/CAA.php @@ -0,0 +1,179 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2011, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2011 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.2.0 + * + */ + +/** + * CAA Resource Record - http://tools.ietf.org/html/draft-ietf-pkix-caa-03 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | FLAGS | TAG LENGTH | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / TAG / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / DATA / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_CAA extends Net_DNS2_RR +{ + /* + * The critcal flag + */ + public $flags; + + /* + * The property identifier + */ + public $tag; + + /* + * The property value + */ + public $value; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->flags . ' ' . $this->tag . ' "' . + trim($this->cleanString($this->value), '"') . '"'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->flags = array_shift($rdata); + $this->tag = array_shift($rdata); + + $this->value = trim($this->cleanString(implode($rdata, ' ')), '"'); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the flags and tag length + // + $x = unpack('Cflags/Ctag_length', $this->rdata); + + $this->flags = $x['flags']; + $offset = 2; + + $this->tag = substr($this->rdata, $offset, $x['tag_length']); + $offset += $x['tag_length']; + + $this->value = substr($this->rdata, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->value) > 0) { + + $data = chr($this->flags); + $data .= chr(strlen($this->tag)) . $this->tag . $this->value; + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +?> diff --git a/bundled-libs/Net/DNS2/RR/CDNSKEY.php b/bundled-libs/Net/DNS2/RR/CDNSKEY.php new file mode 100644 index 00000000..d3b331c8 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/CDNSKEY.php @@ -0,0 +1,77 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2014, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2014 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.4.0 + * + */ + +/** + * The CDNSKEY RR is implemented exactly like the DNSKEY record, so + * for now we just extend the DNSKEY RR and use it. + * + * http://www.rfc-editor.org/rfc/rfc7344.txt + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_CDNSKEY extends Net_DNS2_RR_DNSKEY +{ +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/CDS.php b/bundled-libs/Net/DNS2/RR/CDS.php new file mode 100644 index 00000000..4f24367d --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/CDS.php @@ -0,0 +1,77 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2011, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2011 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.2.0 + * + */ + +/** + * The CDS RR is implemented exactly like the DS record, so + * for now we just extend the DS RR and use it. + * + * http://www.rfc-editor.org/rfc/rfc7344.txt + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_CDS extends Net_DNS2_RR_DS +{ +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/CERT.php b/bundled-libs/Net/DNS2/RR/CERT.php new file mode 100644 index 00000000..c6748310 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/CERT.php @@ -0,0 +1,292 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * CERT Resource Record - RFC4398 section 2 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | format | key tag | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | algorithm | / + * +---------------+ certificate or CRL / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_CERT extends Net_DNS2_RR +{ + /* + * format's allowed for certificates + */ + const CERT_FORMAT_RES = 0; + const CERT_FORMAT_PKIX = 1; + const CERT_FORMAT_SPKI = 2; + const CERT_FORMAT_PGP = 3; + const CERT_FORMAT_IPKIX = 4; + const CERT_FORMAT_ISPKI = 5; + const CERT_FORMAT_IPGP = 6; + const CERT_FORMAT_ACPKIX = 7; + const CERT_FORMAT_IACPKIX = 8; + const CERT_FORMAT_URI = 253; + const CERT_FORMAT_OID = 254; + + public $cert_format_name_to_id = array(); + public $cert_format_id_to_name = array( + + self::CERT_FORMAT_RES => 'Reserved', + self::CERT_FORMAT_PKIX => 'PKIX', + self::CERT_FORMAT_SPKI => 'SPKI', + self::CERT_FORMAT_PGP => 'PGP', + self::CERT_FORMAT_IPKIX => 'IPKIX', + self::CERT_FORMAT_ISPKI => 'ISPKI', + self::CERT_FORMAT_IPGP => 'IPGP', + self::CERT_FORMAT_ACPKIX => 'ACPKIX', + self::CERT_FORMAT_IACPKIX => 'IACPKIX', + self::CERT_FORMAT_URI => 'URI', + self::CERT_FORMAT_OID => 'OID' + ); + + /* + * certificate format + */ + public $format; + + /* + * key tag + */ + public $keytag; + + /* + * The algorithm used for the CERt + */ + public $algorithm; + + /* + * certificate + */ + public $certificate; + + /** + * we have our own constructor so that we can load our certificate + * information for parsing. + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * @param array $rr a array with parsed RR values + * + * @return + * + */ + public function __construct(Net_DNS2_Packet &$packet = null, array $rr = null) + { + parent::__construct($packet, $rr); + + // + // load the lookup values + // + $this->cert_format_name_to_id = array_flip($this->cert_format_id_to_name); + } + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->format . ' ' . $this->keytag . ' ' . $this->algorithm . + ' ' . base64_encode($this->certificate); + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + // + // load and check the format; can be an int, or a mnemonic symbol + // + $this->format = array_shift($rdata); + if (!is_numeric($this->format)) { + + $mnemonic = strtoupper(trim($this->format)); + if (!isset($this->cert_format_name_to_id[$mnemonic])) { + + return false; + } + + $this->format = $this->cert_format_name_to_id[$mnemonic]; + } else { + + if (!isset($this->cert_format_id_to_name[$this->format])) { + + return false; + } + } + + $this->keytag = array_shift($rdata); + + // + // parse and check the algorithm; can be an int, or a mnemonic symbol + // + $this->algorithm = array_shift($rdata); + if (!is_numeric($this->algorithm)) { + + $mnemonic = strtoupper(trim($this->algorithm)); + if (!isset(Net_DNS2_Lookups::$algorithm_name_to_id[$mnemonic])) { + + return false; + } + + $this->algorithm = Net_DNS2_Lookups::$algorithm_name_to_id[ + $mnemonic + ]; + } else { + + if (!isset(Net_DNS2_Lookups::$algorithm_id_to_name[$this->algorithm])) { + return false; + } + } + + // + // parse and base64 decode the certificate + // + // certificates MUST be provided base64 encoded, if not, everything will + // be broken after this point, as we assume it's base64 encoded. + // + $this->certificate = base64_decode(implode(' ', $rdata)); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the format, keytag and algorithm + // + $x = unpack('nformat/nkeytag/Calgorithm', $this->rdata); + + $this->format = $x['format']; + $this->keytag = $x['keytag']; + $this->algorithm = $x['algorithm']; + + // + // copy the certificate + // + $this->certificate = substr($this->rdata, 5, $this->rdlength - 5); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->certificate) > 0) { + + $data = pack('nnC', $this->format, $this->keytag, $this->algorithm) . + $this->certificate; + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/CNAME.php b/bundled-libs/Net/DNS2/RR/CNAME.php new file mode 100644 index 00000000..fcd37917 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/CNAME.php @@ -0,0 +1,153 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * CNAME Resource Record - RFC1035 section 3.3.1 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / CNAME / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_CNAME extends Net_DNS2_RR +{ + /* + * The canonical name + */ + public $cname; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->cleanString($this->cname) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->cname = $this->cleanString(array_shift($rdata)); + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $offset = $packet->offset; + $this->cname = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->cname) > 0) { + + return $packet->compress($this->cname, $packet->offset); + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/CSYNC.php b/bundled-libs/Net/DNS2/RR/CSYNC.php new file mode 100644 index 00000000..c19929b1 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/CSYNC.php @@ -0,0 +1,203 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2015, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2015 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.4.1 + * + */ + +/** + * CSYNC Resource Record - RFC 7477 seciond 2.1.1 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | SOA Serial | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | Flags | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / Type Bit Map / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_CSYNC extends Net_DNS2_RR +{ + /* + * serial number + */ + public $serial; + + /* + * flags + */ + public $flags; + + /* + * array of RR type names + */ + public $type_bit_maps = array(); + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $out = $this->serial . ' ' . $this->flags; + + // + // show the RR's + // + foreach ($this->type_bit_maps as $rr) { + + $out .= ' ' . strtoupper($rr); + } + + return $out; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->serial = array_shift($rdata); + $this->flags = array_shift($rdata); + + $this->type_bit_maps = $rdata; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the serial and flags values + // + $x = unpack('@' . $packet->offset . '/Nserial/nflags', $packet->rdata); + + $this->serial = Net_DNS2::expandUint32($x['serial']); + $this->flags = $x['flags']; + + // + // parse out the RR bitmap + // + $this->type_bit_maps = Net_DNS2_BitMap::bitMapToArray( + substr($this->rdata, 6) + ); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + // + // pack the serial and flags values + // + $data = pack('Nn', $this->serial, $this->flags); + + // + // convert the array of RR names to a type bitmap + // + $data .= Net_DNS2_BitMap::arrayToBitMap($this->type_bit_maps); + + // + // advance the offset + // + $packet->offset += strlen($data); + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/DHCID.php b/bundled-libs/Net/DNS2/RR/DHCID.php new file mode 100644 index 00000000..5c9d65cd --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/DHCID.php @@ -0,0 +1,207 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * DHCID Resource Record - RFC4701 section 3.1 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ID Type Code | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | Digest Type | / + * +--+--+--+--+--+--+--+--+ / + * / / + * / Digest / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_DHCID extends Net_DNS2_RR +{ + /* + * Identifier type + */ + public $id_type; + + /* + * Digest Type + */ + public $digest_type; + + /* + * The digest + */ + public $digest; + + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $out = pack('nC', $this->id_type, $this->digest_type); + $out .= base64_decode($this->digest); + + return base64_encode($out); + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $data = base64_decode(array_shift($rdata)); + if (strlen($data) > 0) { + + // + // unpack the id type and digest type + // + $x = unpack('nid_type/Cdigest_type', $data); + + $this->id_type = $x['id_type']; + $this->digest_type = $x['digest_type']; + + // + // copy out the digest + // + $this->digest = base64_encode(substr($data, 3, strlen($data) - 3)); + + return true; + } + + return false; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the id type and digest type + // + $x = unpack('nid_type/Cdigest_type', $this->rdata); + + $this->id_type = $x['id_type']; + $this->digest_type = $x['digest_type']; + + // + // copy out the digest + // + $this->digest = base64_encode( + substr($this->rdata, 3, $this->rdlength - 3) + ); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->digest) > 0) { + + $data = pack('nC', $this->id_type, $this->digest_type) . + base64_decode($this->digest); + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/DLV.php b/bundled-libs/Net/DNS2/RR/DLV.php new file mode 100644 index 00000000..d362e78a --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/DLV.php @@ -0,0 +1,75 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * The DLV RR is implemented exactly like the DS RR; so we just extend that + * class, and use all of it's methods + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_DLV extends Net_DNS2_RR_DS +{ +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/DNAME.php b/bundled-libs/Net/DNS2/RR/DNAME.php new file mode 100644 index 00000000..139b211c --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/DNAME.php @@ -0,0 +1,153 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * DNAME Resource Record - RFC2672 section 3 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / DNAME / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_DNAME extends Net_DNS2_RR +{ + /* + * The target name + */ + public $dname; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->cleanString($this->dname) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->dname = $this->cleanString(array_shift($rdata)); + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $offset = $packet->offset; + $this->dname = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->dname) > 0) { + + return $packet->compress($this->dname, $packet->offset); + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/DNSKEY.php b/bundled-libs/Net/DNS2/RR/DNSKEY.php new file mode 100644 index 00000000..db79205f --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/DNSKEY.php @@ -0,0 +1,198 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * DNSKEY Resource Record - RFC4034 sction 2.1 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Flags | Protocol | Algorithm | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * / / + * / Public Key / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_DNSKEY extends Net_DNS2_RR +{ + /* + * flags + */ + public $flags; + + /* + * protocol + */ + public $protocol; + + /* + * algorithm used + */ + public $algorithm; + + /* + * the public key + */ + public $key; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->flags . ' ' . $this->protocol . ' ' . + $this->algorithm . ' ' . $this->key; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->flags = array_shift($rdata); + $this->protocol = array_shift($rdata); + $this->algorithm = array_shift($rdata); + $this->key = implode(' ', $rdata); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the flags, protocol and algorithm + // + $x = unpack('nflags/Cprotocol/Calgorithm', $this->rdata); + + // + // TODO: right now we're just displaying what's in DNS; we really + // should be parsing bit 7 and bit 15 of the flags field, and store + // those separately. + // + // right now the DNSSEC implementation is really just for display, + // we don't validate or handle any of the keys + // + $this->flags = $x['flags']; + $this->protocol = $x['protocol']; + $this->algorithm = $x['algorithm']; + + $this->key = base64_encode(substr($this->rdata, 4)); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->key) > 0) { + + $data = pack('nCC', $this->flags, $this->protocol, $this->algorithm); + $data .= base64_decode($this->key); + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/DS.php b/bundled-libs/Net/DNS2/RR/DS.php new file mode 100644 index 00000000..4914c692 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/DS.php @@ -0,0 +1,209 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * DS Resource Record - RFC4034 sction 5.1 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Key Tag | Algorithm | Digest Type | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * / / + * / Digest / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_DS extends Net_DNS2_RR +{ + /* + * key tag + */ + public $keytag; + + /* + * algorithm number + */ + public $algorithm; + + /* + * algorithm used to construct the digest + */ + public $digesttype; + + /* + * the digest data + */ + public $digest; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->keytag . ' ' . $this->algorithm . ' ' . + $this->digesttype . ' ' . $this->digest; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->keytag = array_shift($rdata); + $this->algorithm = array_shift($rdata); + $this->digesttype = array_shift($rdata); + $this->digest = implode('', $rdata); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the keytag, algorithm and digesttype + // + $x = unpack('nkeytag/Calgorithm/Cdigesttype', $this->rdata); + + $this->keytag = $x['keytag']; + $this->algorithm = $x['algorithm']; + $this->digesttype = $x['digesttype']; + + // + // figure out the digest size + // + $digest_size = 0; + if ($this->digesttype == 1) { + + $digest_size = 20; // SHA1 + + } else if ($this->digesttype == 2) { + + $digest_size = 32; // SHA256 + } + + // + // copy the digest + // + $x = unpack('H*', substr($this->rdata, 4, $digest_size)); + $this->digest = $x[1]; + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->digest) > 0) { + + $data = pack( + 'nCCH*', + $this->keytag, $this->algorithm, $this->digesttype, $this->digest + ); + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/EID.php b/bundled-libs/Net/DNS2/RR/EID.php new file mode 100644 index 00000000..6bc0e4a3 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/EID.php @@ -0,0 +1,130 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * EID Resource Record - undefined; the rdata is simply used as-is in it's + * binary format, so not process has to be done. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_EID extends Net_DNS2_RR +{ + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return ''; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + return true; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + return $this->rdata; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/EUI48.php b/bundled-libs/Net/DNS2/RR/EUI48.php new file mode 100644 index 00000000..7c296d20 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/EUI48.php @@ -0,0 +1,187 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2013, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2013 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.3.2 + * + */ + +/** + * EUI48 Resource Record - RFC7043 section 3.1 + * + * 0 1 2 3 + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | EUI-48 Address | + * | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_EUI48 extends Net_DNS2_RR +{ + /* + * The EUI48 address, in hex format + */ + public $address; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->address; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $value = array_shift($rdata); + + // + // re: RFC 7043, the field must be represented as six two-digit hex numbers + // separated by hyphens. + // + $a = explode('-', $value); + if (count($a) != 6) { + + return false; + } + + // + // make sure they're all hex values + // + foreach ($a as $i) { + if (ctype_xdigit($i) == false) { + return false; + } + } + + // + // store it + // + $this->address = strtolower($value); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $x = unpack('C6', $this->rdata); + if (count($x) == 6) { + + $this->address = vsprintf('%02x-%02x-%02x-%02x-%02x-%02x', $x); + return true; + } + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + $data = ''; + + $a = explode('-', $this->address); + foreach ($a as $b) { + + $data .= chr(hexdec($b)); + } + + $packet->offset += 6; + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/EUI64.php b/bundled-libs/Net/DNS2/RR/EUI64.php new file mode 100644 index 00000000..4323ccad --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/EUI64.php @@ -0,0 +1,188 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2013, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2013 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.3.2 + * + */ + +/** + * EUI64 Resource Record - RFC7043 section 4.1 + * + * 0 1 2 3 + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | EUI-48 Address | + * | | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_EUI64 extends Net_DNS2_RR +{ + /* + * The EUI64 address, in hex format + */ + public $address; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->address; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $value = array_shift($rdata); + + // + // re: RFC 7043, the field must be represented as 8 two-digit hex numbers + // separated by hyphens. + // + $a = explode('-', $value); + if (count($a) != 8) { + + return false; + } + + // + // make sure they're all hex values + // + foreach ($a as $i) { + if (ctype_xdigit($i) == false) { + return false; + } + } + + // + // store it + // + $this->address = strtolower($value); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $x = unpack('C8', $this->rdata); + if (count($x) == 8) { + + $this->address = vsprintf( + '%02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x', $x + ); + return true; + } + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + $data = ''; + + $a = explode('-', $this->address); + foreach ($a as $b) { + + $data .= chr(hexdec($b)); + } + + $packet->offset += 8; + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/HINFO.php b/bundled-libs/Net/DNS2/RR/HINFO.php new file mode 100644 index 00000000..e2faf2ce --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/HINFO.php @@ -0,0 +1,175 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * HINFO Resource Record - RFC1035 section 3.3.2 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / CPU / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / OS / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_HINFO extends Net_DNS2_RR +{ + /* + * computer informatino + */ + public $cpu; + + /* + * operataing system + */ + public $os; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->formatString($this->cpu) . ' ' . + $this->formatString($this->os); + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $data = $this->buildString($rdata); + if (count($data) == 2) { + + $this->cpu = $data[0]; + $this->os = $data[1]; + + return true; + } + + return false; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $offset = $packet->offset; + + $this->cpu = trim(Net_DNS2_Packet::label($packet, $offset), '"'); + $this->os = trim(Net_DNS2_Packet::label($packet, $offset), '"'); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->cpu) > 0) { + + $data = chr(strlen($this->cpu)) . $this->cpu; + $data .= chr(strlen($this->os)) . $this->os; + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/HIP.php b/bundled-libs/Net/DNS2/RR/HIP.php new file mode 100644 index 00000000..4beb95ee --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/HIP.php @@ -0,0 +1,287 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.0.0 + * + */ + +/** + * HIP Resource Record - RFC5205 section 5 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | HIT length | PK algorithm | PK length | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | + * ~ HIT ~ + * | | + * + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | | + * +-+-+-+-+-+-+-+-+-+-+-+ + + * | Public Key | + * ~ ~ + * | | + * + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + + * | | + * ~ Rendezvous Servers ~ + * | | + * + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | + * +-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_HIP extends Net_DNS2_RR +{ + /* + * The length of the HIT field + */ + public $hit_length; + + /* + * the public key cryptographic algorithm + */ + public $pk_algorithm; + + /* + * the length of the public key field + */ + public $pk_length; + + /* + * The HIT is stored as a binary value in network byte order. + */ + public $hit; + + /* + * The public key + */ + public $public_key; + + /* + * a list of rendezvous servers + */ + public $rendezvous_servers = array(); + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $out = $this->pk_algorithm . ' ' . + $this->hit . ' ' . $this->public_key . ' '; + + foreach ($this->rendezvous_servers as $index => $server) { + + $out .= $server . '. '; + } + + return trim($out); + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->pk_algorithm = array_shift($rdata); + $this->hit = strtoupper(array_shift($rdata)); + $this->public_key = array_shift($rdata); + + // + // anything left on the array, must be one or more rendezevous servers. add + // them and strip off the trailing dot + // + if (count($rdata) > 0) { + + $this->rendezvous_servers = preg_replace('/\.$/', '', $rdata); + } + + // + // store the lengths; + // + $this->hit_length = strlen(pack('H*', $this->hit)); + $this->pk_length = strlen(base64_decode($this->public_key)); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the algorithm and length values + // + $x = unpack('Chit_length/Cpk_algorithm/npk_length', $this->rdata); + + $this->hit_length = $x['hit_length']; + $this->pk_algorithm = $x['pk_algorithm']; + $this->pk_length = $x['pk_length']; + + $offset = 4; + + // + // copy out the HIT value + // + $hit = unpack('H*', substr($this->rdata, $offset, $this->hit_length)); + + $this->hit = strtoupper($hit[1]); + $offset += $this->hit_length; + + // + // copy out the public key + // + $this->public_key = base64_encode( + substr($this->rdata, $offset, $this->pk_length) + ); + $offset += $this->pk_length; + + // + // copy out any possible rendezvous servers + // + $offset = $packet->offset + $offset; + + while ( ($offset - $packet->offset) < $this->rdlength) { + + $this->rendezvous_servers[] = Net_DNS2_Packet::expand( + $packet, $offset + ); + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if ( (strlen($this->hit) > 0) && (strlen($this->public_key) > 0) ) { + + // + // pack the length, algorithm and HIT values + // + $data = pack( + 'CCnH*', + $this->hit_length, + $this->pk_algorithm, + $this->pk_length, + $this->hit + ); + + // + // add the public key + // + $data .= base64_decode($this->public_key); + + // + // add the offset + // + $packet->offset += strlen($data); + + // + // add each rendezvous server + // + foreach ($this->rendezvous_servers as $index => $server) { + + $data .= $packet->compress($server, $packet->offset); + } + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/IPSECKEY.php b/bundled-libs/Net/DNS2/RR/IPSECKEY.php new file mode 100644 index 00000000..a56d1a64 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/IPSECKEY.php @@ -0,0 +1,386 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * IPSECKEY Resource Record - RFC4025 section 2.1 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | precedence | gateway type | algorithm | gateway | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-------------+ + + * ~ gateway ~ + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | / + * / public key / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_IPSECKEY extends Net_DNS2_RR +{ + const GATEWAY_TYPE_NONE = 0; + const GATEWAY_TYPE_IPV4 = 1; + const GATEWAY_TYPE_IPV6 = 2; + const GATEWAY_TYPE_DOMAIN = 3; + + const ALGORITHM_NONE = 0; + const ALGORITHM_DSA = 1; + const ALGORITHM_RSA = 2; + + /* + * Precedence (used the same was as a preference field) + */ + public $precedence; + + /* + * Gateway type - specifies the format of the gataway information + * This can be either: + * + * 0 No Gateway + * 1 IPv4 address + * 2 IPV6 address + * 3 wire-encoded domain name (not compressed) + * + */ + public $gateway_type; + + /* + * The algorithm used + * + * This can be: + * + * 0 No key is present + * 1 DSA key is present + * 2 RSA key is present + * + */ + public $algorithm; + + /* + * The gatway information + */ + public $gateway; + + /* + * the public key + */ + public $key; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $out = $this->precedence . ' ' . $this->gateway_type . ' ' . + $this->algorithm . ' '; + + switch($this->gateway_type) { + case self::GATEWAY_TYPE_NONE: + $out .= '. '; + break; + + case self::GATEWAY_TYPE_IPV4: + case self::GATEWAY_TYPE_IPV6: + $out .= $this->gateway . ' '; + break; + + case self::GATEWAY_TYPE_DOMAIN: + $out .= $this->gateway . '. '; + break; + } + + $out .= $this->key; + return $out; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + // + // load the data + // + $precedence = array_shift($rdata); + $gateway_type = array_shift($rdata); + $algorithm = array_shift($rdata); + $gateway = strtolower(trim(array_shift($rdata))); + $key = array_shift($rdata); + + // + // validate it + // + switch($gateway_type) { + case self::GATEWAY_TYPE_NONE: + $gateway = ''; + break; + + case self::GATEWAY_TYPE_IPV4: + if (Net_DNS2::isIPv4($gateway) == false) { + return false; + } + break; + + case self::GATEWAY_TYPE_IPV6: + if (Net_DNS2::isIPv6($gateway) == false) { + return false; + } + break; + + case self::GATEWAY_TYPE_DOMAIN: + ; // do nothing + break; + + default: + return false; + } + + // + // check the algorithm and key + // + switch($algorithm) { + case self::ALGORITHM_NONE: + $key = ''; + break; + + case self::ALGORITHM_DSA: + case self::ALGORITHM_RSA: + ; // do nothing + break; + + default: + return false; + } + + // + // store the values + // + $this->precedence = $precedence; + $this->gateway_type = $gateway_type; + $this->algorithm = $algorithm; + $this->gateway = $gateway; + $this->key = $key; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // parse off the precedence, gateway type and algorithm + // + $x = unpack('Cprecedence/Cgateway_type/Calgorithm', $this->rdata); + + $this->precedence = $x['precedence']; + $this->gateway_type = $x['gateway_type']; + $this->algorithm = $x['algorithm']; + + $offset = 3; + + // + // extract the gatway based on the type + // + switch($this->gateway_type) { + case self::GATEWAY_TYPE_NONE: + $this->gateway = ''; + break; + + case self::GATEWAY_TYPE_IPV4: + $this->gateway = inet_ntop(substr($this->rdata, $offset, 4)); + $offset += 4; + break; + + case self::GATEWAY_TYPE_IPV6: + $ip = unpack('n8', substr($this->rdata, $offset, 16)); + if (count($ip) == 8) { + + $this->gateway = vsprintf('%x:%x:%x:%x:%x:%x:%x:%x', $ip); + $offset += 16; + } else { + + return false; + } + break; + + case self::GATEWAY_TYPE_DOMAIN: + + $doffset = $offset + $packet->offset; + $this->gateway = Net_DNS2_Packet::expand($packet, $doffset); + $offset = ($doffset - $packet->offset); + break; + + default: + return false; + } + + // + // extract the key + // + switch($this->algorithm) { + case self::ALGORITHM_NONE: + $this->key = ''; + break; + + case self::ALGORITHM_DSA: + case self::ALGORITHM_RSA: + $this->key = base64_encode(substr($this->rdata, $offset)); + break; + + default: + return false; + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + // + // pack the precedence, gateway type and algorithm + // + $data = pack( + 'CCC', $this->precedence, $this->gateway_type, $this->algorithm + ); + + // + // add the gateway based on the type + // + switch($this->gateway_type) { + case self::GATEWAY_TYPE_NONE: + ; // add nothing + break; + + case self::GATEWAY_TYPE_IPV4: + case self::GATEWAY_TYPE_IPV6: + $data .= inet_pton($this->gateway); + break; + + case self::GATEWAY_TYPE_DOMAIN: + $data .= chr(strlen($this->gateway)) . $this->gateway; + break; + + default: + return null; + } + + // + // add the key if there's one specified + // + switch($this->algorithm) { + case self::ALGORITHM_NONE: + ; // add nothing + break; + + case self::ALGORITHM_DSA: + case self::ALGORITHM_RSA: + $data .= base64_decode($this->key); + break; + + default: + return null; + } + + $packet->offset += strlen($data); + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/ISDN.php b/bundled-libs/Net/DNS2/RR/ISDN.php new file mode 100644 index 00000000..17b3eb31 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/ISDN.php @@ -0,0 +1,190 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * ISDN Resource Record - RFC1183 section 3.2 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / ISDN-address / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / SA / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_ISDN extends Net_DNS2_RR +{ + /* + * ISDN Number + */ + public $isdnaddress; + + /* + * Sub-Address + */ + public $sa; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->formatString($this->isdnaddress) . ' ' . + $this->formatString($this->sa); + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $data = $this->buildString($rdata); + if (count($data) >= 1) { + + $this->isdnaddress = $data[0]; + if (isset($data[1])) { + + $this->sa = $data[1]; + } + + return true; + } + + return false; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $this->isdnaddress = Net_DNS2_Packet::label($packet, $packet->offset); + + // + // look for a SA (sub address) - it's optional + // + if ( (strlen($this->isdnaddress) + 1) < $this->rdlength) { + + $this->sa = Net_DNS2_Packet::label($packet, $packet->offset); + } else { + + $this->sa = ''; + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->isdnaddress) > 0) { + + $data = chr(strlen($this->isdnaddress)) . $this->isdnaddress; + if (!empty($this->sa)) { + + $data .= chr(strlen($this->sa)); + $data .= $this->sa; + } + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/KEY.php b/bundled-libs/Net/DNS2/RR/KEY.php new file mode 100644 index 00000000..4c1a3747 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/KEY.php @@ -0,0 +1,85 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * the KEY RR is implemented the same as the DNSKEY RR, the only difference + * is how the flags data is parsed. + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * | A/C | Z | XT| Z | Z | NAMTYP| Z | Z | Z | Z | SIG | + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * + * DNSKEY only uses bits 7 and 15 + * + * We're not doing anything with these flags right now, so duplicating the + * class like this is fine. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_KEY extends Net_DNS2_RR_DNSKEY +{ +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/KX.php b/bundled-libs/Net/DNS2/RR/KX.php new file mode 100644 index 00000000..9b90fc7f --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/KX.php @@ -0,0 +1,179 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * KX Resource Record - RFC2230 section 3.1 + * + * This class is almost identical to MX, except that the the exchanger + * domain is not compressed, it's added as a label + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | PREFERENCE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / EXCHANGER / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_KX extends Net_DNS2_RR +{ + /* + * the preference for this mail exchanger + */ + public $preference; + + /* + * the hostname of the mail exchanger + */ + public $exchange; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->preference . ' ' . $this->cleanString($this->exchange) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->preference = array_shift($rdata); + $this->exchange = $this->cleanString(array_shift($rdata)); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // parse the preference + // + $x = unpack('npreference', $this->rdata); + $this->preference = $x['preference']; + + // + // get the exchange entry server) + // + $offset = $packet->offset + 2; + $this->exchange = Net_DNS2_Packet::label($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->exchange) > 0) { + + $data = pack('nC', $this->preference, strlen($this->exchange)) . + $this->exchange; + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/L32.php b/bundled-libs/Net/DNS2/RR/L32.php new file mode 100644 index 00000000..db4a10cd --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/L32.php @@ -0,0 +1,180 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2013, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2013 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.3.1 + * + */ + +/** + * L32 Resource Record - RFC6742 section 2.2 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Preference | Locator32 (16 MSBs) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Locator32 (16 LSBs) | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_L32 extends Net_DNS2_RR +{ + /* + * The preference + */ + public $preference; + + /* + * The locator32 field + */ + public $locator32; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->preference . ' ' . $this->locator32; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->preference = array_shift($rdata); + $this->locator32 = array_shift($rdata); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the values + // + $x = unpack('npreference/C4locator', $this->rdata); + + $this->preference = $x['preference']; + + // + // build the locator value + // + $this->locator32 = $x['locator1'] . '.' . $x['locator2'] . '.' . + $x['locator3'] . '.' . $x['locator4']; + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->locator32) > 0) { + + // + // break out the locator value + // + $n = explode('.', $this->locator32); + + // + // pack the data + // + return pack('nC4', $this->preference, $n[0], $n[1], $n[2], $n[3]); + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/L64.php b/bundled-libs/Net/DNS2/RR/L64.php new file mode 100644 index 00000000..26931964 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/L64.php @@ -0,0 +1,187 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2013, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2013 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.3.1 + * + */ + +/** + * L64 Resource Record - RFC6742 section 2.3 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Preference | | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + + * | Locator64 | + * + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_L64 extends Net_DNS2_RR +{ + /* + * The preference + */ + public $preference; + + /* + * The locator64 field + */ + public $locator64; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->preference . ' ' . $this->locator64; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->preference = array_shift($rdata); + $this->locator64 = array_shift($rdata); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the values + // + $x = unpack('npreference/n4locator', $this->rdata); + + $this->preference = $x['preference']; + + // + // build the locator64 + // + $this->locator64 = dechex($x['locator1']) . ':' . + dechex($x['locator2']) . ':' . + dechex($x['locator3']) . ':' . + dechex($x['locator4']); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->locator64) > 0) { + + // + // break out the locator64 + // + $n = explode(':', $this->locator64); + + // + // pack the data + // + return pack( + 'n5', $this->preference, hexdec($n[0]), hexdec($n[1]), + hexdec($n[2]), hexdec($n[3]) + ); + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/LOC.php b/bundled-libs/Net/DNS2/RR/LOC.php new file mode 100644 index 00000000..85ab0765 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/LOC.php @@ -0,0 +1,440 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * LOC Resource Record - RFC1876 section 2 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | VERSION | SIZE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | HORIZ PRE | VERT PRE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | LATITUDE | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | LONGITUDE | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ALTITUDE | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_LOC extends Net_DNS2_RR +{ + /* + * the LOC version- should only ever be 0 + */ + public $version; + + /* + * The diameter of a sphere enclosing the described entity + */ + public $size; + + /* + * The horizontal precision of the data + */ + public $horiz_pre; + + /* + * The vertical precision of the data + */ + public $vert_pre; + + /* + * The latitude - stored in decimal degrees + */ + public $latitude; + + /* + * The longitude - stored in decimal degrees + */ + public $longitude; + + /* + * The altitude - stored in decimal + */ + public $altitude; + + /* + * used for quick power-of-ten lookups + */ + private $_powerOfTen = array(1, 10, 100, 1000, 10000, 100000, + 1000000,10000000,100000000,1000000000); + + /* + * some conversion values + */ + const CONV_SEC = 1000; + const CONV_MIN = 60000; + const CONV_DEG = 3600000; + + const REFERENCE_ALT = 10000000; + const REFERENCE_LATLON = 2147483648; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + if ($this->version == 0) { + + return $this->_d2Dms($this->latitude, 'LAT') . ' ' . + $this->_d2Dms($this->longitude, 'LNG') . ' ' . + sprintf('%.2fm', $this->altitude) . ' ' . + sprintf('%.2fm', $this->size) . ' ' . + sprintf('%.2fm', $this->horiz_pre) . ' ' . + sprintf('%.2fm', $this->vert_pre); + } + + return ''; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + // + // format as defined by RFC1876 section 3 + // + // d1 [m1 [s1]] {"N"|"S"} d2 [m2 [s2]] {"E"|"W"} alt["m"] + // [siz["m"] [hp["m"] [vp["m"]]]] + // + $res = preg_match( + '/^(\d+) \s+((\d+) \s+)?(([\d.]+) \s+)?(N|S) \s+(\d+) ' . + '\s+((\d+) \s+)?(([\d.]+) \s+)?(E|W) \s+(-?[\d.]+) m?(\s+ ' . + '([\d.]+) m?)?(\s+ ([\d.]+) m?)?(\s+ ([\d.]+) m?)?/ix', + implode(' ', $rdata), $x + ); + + if ($res) { + + // + // latitude + // + $latdeg = $x[1]; + $latmin = (isset($x[3])) ? $x[3] : 0; + $latsec = (isset($x[5])) ? $x[5] : 0; + $lathem = strtoupper($x[6]); + + $this->latitude = $this->_dms2d($latdeg, $latmin, $latsec, $lathem); + + // + // longitude + // + $londeg = $x[7]; + $lonmin = (isset($x[9])) ? $x[9] : 0; + $lonsec = (isset($x[11])) ? $x[11] : 0; + $lonhem = strtoupper($x[12]); + + $this->longitude = $this->_dms2d($londeg, $lonmin, $lonsec, $lonhem); + + // + // the rest of teh values + // + $version = 0; + + $this->size = (isset($x[15])) ? $x[15] : 1; + $this->horiz_pre = ((isset($x[17])) ? $x[17] : 10000); + $this->vert_pre = ((isset($x[19])) ? $x[19] : 10); + $this->altitude = $x[13]; + + return true; + } + + return false; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack all the values + // + $x = unpack( + 'Cver/Csize/Choriz_pre/Cvert_pre/Nlatitude/Nlongitude/Naltitude', + $this->rdata + ); + + // + // version must be 0 per RFC 1876 section 2 + // + $this->version = $x['ver']; + if ($this->version == 0) { + + $this->size = $this->_precsizeNtoA($x['size']); + $this->horiz_pre = $this->_precsizeNtoA($x['horiz_pre']); + $this->vert_pre = $this->_precsizeNtoA($x['vert_pre']); + + // + // convert the latitude and longitude to degress in decimal + // + if ($x['latitude'] < 0) { + + $this->latitude = ($x['latitude'] + + self::REFERENCE_LATLON) / self::CONV_DEG; + } else { + + $this->latitude = ($x['latitude'] - + self::REFERENCE_LATLON) / self::CONV_DEG; + } + + if ($x['longitude'] < 0) { + + $this->longitude = ($x['longitude'] + + self::REFERENCE_LATLON) / self::CONV_DEG; + } else { + + $this->longitude = ($x['longitude'] - + self::REFERENCE_LATLON) / self::CONV_DEG; + } + + // + // convert down the altitude + // + $this->altitude = ($x['altitude'] - self::REFERENCE_ALT) / 100; + + return true; + + } else { + + return false; + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if ($this->version == 0) { + + $lat = 0; + $lng = 0; + + if ($this->latitude < 0) { + + $lat = ($this->latitude * self::CONV_DEG) - self::REFERENCE_LATLON; + } else { + + $lat = ($this->latitude * self::CONV_DEG) + self::REFERENCE_LATLON; + } + + if ($this->longitude < 0) { + + $lng = ($this->longitude * self::CONV_DEG) - self::REFERENCE_LATLON; + } else { + + $lng = ($this->longitude * self::CONV_DEG) + self::REFERENCE_LATLON; + } + + $packet->offset += 16; + + return pack( + 'CCCCNNN', + $this->version, + $this->_precsizeAtoN($this->size), + $this->_precsizeAtoN($this->horiz_pre), + $this->_precsizeAtoN($this->vert_pre), + $lat, $lng, + ($this->altitude * 100) + self::REFERENCE_ALT + ); + } + + return null; + } + + /** + * takes an XeY precision/size value, returns a string representation. + * shamlessly stolen from RFC1876 Appendix A + * + * @param integer $prec the value to convert + * + * @return string + * @access private + * + */ + private function _precsizeNtoA($prec) + { + $mantissa = (($prec >> 4) & 0x0f) % 10; + $exponent = (($prec >> 0) & 0x0f) % 10; + + return $mantissa * $this->_powerOfTen[$exponent]; + } + + /** + * converts ascii size/precision X * 10**Y(cm) to 0xXY. + * shamlessly stolen from RFC1876 Appendix A + * + * @param string $prec the value to convert + * + * @return integer + * @access private + * + */ + private function _precsizeAtoN($prec) + { + $exponent = 0; + while ($prec >= 10) { + + $prec /= 10; + ++$exponent; + } + + return ($prec << 4) | ($exponent & 0x0f); + } + + /** + * convert lat/lng in deg/min/sec/hem to decimal value + * + * @param integer $deg the degree value + * @param integer $min the minutes value + * @param integer $sec the seconds value + * @param string $hem the hemisphere (N/E/S/W) + * + * @return float the decinmal value + * @access private + * + */ + private function _dms2d($deg, $min, $sec, $hem) + { + $deg = $deg - 0; + $min = $min - 0; + + $sign = ($hem == 'W' || $hem == 'S') ? -1 : 1; + return ((($sec/60+$min)/60)+$deg) * $sign; + } + + /** + * convert lat/lng in decimal to deg/min/sec/hem + * + * @param float $data the decimal value + * @param string $latlng either LAT or LNG so we can determine the HEM value + * + * @return string + * @access private + * + */ + private function _d2Dms($data, $latlng) + { + $deg = 0; + $min = 0; + $sec = 0; + $msec = 0; + $hem = ''; + + if ($latlng == 'LAT') { + $hem = ($data > 0) ? 'N' : 'S'; + } else { + $hem = ($data > 0) ? 'E' : 'W'; + } + + $data = abs($data); + + $deg = (int)$data; + $min = (int)(($data - $deg) * 60); + $sec = (int)(((($data - $deg) * 60) - $min) * 60); + $msec = round((((((($data - $deg) * 60) - $min) * 60) - $sec) * 1000)); + + return sprintf('%d %02d %02d.%03d %s', $deg, $min, $sec, round($msec), $hem); + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/LP.php b/bundled-libs/Net/DNS2/RR/LP.php new file mode 100644 index 00000000..f1dc4fa6 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/LP.php @@ -0,0 +1,177 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2013, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2013 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.3.1 + * + */ + +/** + * LP Resource Record - RFC6742 section 2.4 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Preference | / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ / + * / / + * / FQDN / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_LP extends Net_DNS2_RR +{ + /* + * The preference + */ + public $preference; + + /* + * The fdqn field + */ + public $fqdn; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->preference . ' ' . $this->fqdn . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->preference = array_shift($rdata); + $this->fqdn = trim(array_shift($rdata), '.'); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // parse the preference + // + $x = unpack('npreference', $this->rdata); + $this->preference = $x['preference']; + $offset = $packet->offset + 2; + + // + // get the hostname + // + $this->fqdn = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->fqdn) > 0) { + + $data = pack('n', $this->preference); + $packet->offset += 2; + + $data .= $packet->compress($this->fqdn, $packet->offset); + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/MX.php b/bundled-libs/Net/DNS2/RR/MX.php new file mode 100644 index 00000000..fad09b91 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/MX.php @@ -0,0 +1,175 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * MX Resource Record - RFC1035 section 3.3.9 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | PREFERENCE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / EXCHANGE / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_MX extends Net_DNS2_RR +{ + /* + * the preference for this mail exchanger + */ + public $preference; + + /* + * the hostname of the mail exchanger + */ + public $exchange; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->preference . ' ' . $this->cleanString($this->exchange) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->preference = array_shift($rdata); + $this->exchange = $this->cleanString(array_shift($rdata)); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // parse the preference + // + $x = unpack('npreference', $this->rdata); + $this->preference = $x['preference']; + + // + // get the exchange entry server) + // + $offset = $packet->offset + 2; + $this->exchange = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->exchange) > 0) { + + $data = pack('n', $this->preference); + $packet->offset += 2; + + $data .= $packet->compress($this->exchange, $packet->offset); + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/NAPTR.php b/bundled-libs/Net/DNS2/RR/NAPTR.php new file mode 100644 index 00000000..37e3d5eb --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/NAPTR.php @@ -0,0 +1,231 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * NAPTR Resource Record - RFC2915 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ORDER | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | PREFERENCE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / FLAGS / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / SERVICES / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / REGEXP / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / REPLACEMENT / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_NAPTR extends Net_DNS2_RR +{ + /* + * the order in which the NAPTR records MUST be processed + */ + public $order; + + /* + * specifies the order in which NAPTR records with equal "order" + * values SHOULD be processed + */ + public $preference; + + /* + * rewrite flags + */ + public $flags; + + /* + * Specifies the service(s) available down this rewrite path + */ + public $services; + + /* + * regular expression + */ + public $regexp; + + /* + * The next NAME to query for NAPTR, SRV, or address records + * depending on the value of the flags field + */ + public $replacement; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->order . ' ' . $this->preference . ' ' . + $this->formatString($this->flags) . ' ' . + $this->formatString($this->services) . ' ' . + $this->formatString($this->regexp) . ' ' . + $this->cleanString($this->replacement) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->order = array_shift($rdata); + $this->preference = array_shift($rdata); + + $data = $this->buildString($rdata); + if (count($data) == 4) { + + $this->flags = $data[0]; + $this->services = $data[1]; + $this->regexp = $data[2]; + $this->replacement = $this->cleanString($data[3]); + + return true; + } + + return false; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the order and preference + // + $x = unpack('norder/npreference', $this->rdata); + + $this->order = $x['order']; + $this->preference = $x['preference']; + + $offset = $packet->offset + 4; + + $this->flags = Net_DNS2_Packet::label($packet, $offset); + $this->services = Net_DNS2_Packet::label($packet, $offset); + $this->regexp = Net_DNS2_Packet::label($packet, $offset); + + $this->replacement = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if ( (isset($this->order)) && (strlen($this->services) > 0) ) { + + $data = pack('nn', $this->order, $this->preference); + + $data .= chr(strlen($this->flags)) . $this->flags; + $data .= chr(strlen($this->services)) . $this->services; + $data .= chr(strlen($this->regexp)) . $this->regexp; + + $packet->offset += strlen($data); + + $data .= $packet->compress($this->replacement, $packet->offset); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/NID.php b/bundled-libs/Net/DNS2/RR/NID.php new file mode 100644 index 00000000..f01c504c --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/NID.php @@ -0,0 +1,187 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2013, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2013 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.3.1 + * + */ + +/** + * NID Resource Record - RFC6742 section 2.1 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Preference | | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + + * | NodeID | + * + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_NID extends Net_DNS2_RR +{ + /* + * The preference + */ + public $preference; + + /* + * The node ID field + */ + public $nodeid; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->preference . ' ' . $this->nodeid; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->preference = array_shift($rdata); + $this->nodeid = array_shift($rdata); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the values + // + $x = unpack('npreference/n4nodeid', $this->rdata); + + $this->preference = $x['preference']; + + // + // build the node id + // + $this->nodeid = dechex($x['nodeid1']) . ':' . + dechex($x['nodeid2']) . ':' . + dechex($x['nodeid3']) . ':' . + dechex($x['nodeid4']); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->nodeid) > 0) { + + // + // break out the node id + // + $n = explode(':', $this->nodeid); + + // + // pack the data + // + return pack( + 'n5', $this->preference, hexdec($n[0]), hexdec($n[1]), + hexdec($n[2]), hexdec($n[3]) + ); + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/NIMLOC.php b/bundled-libs/Net/DNS2/RR/NIMLOC.php new file mode 100644 index 00000000..fdc14a62 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/NIMLOC.php @@ -0,0 +1,130 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * NIMLOCK Resource Record - undefined; the rdata is simply used as-is in it's + * binary format, so not process has to be done. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_NIMLOCK extends Net_DNS2_RR +{ + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return ''; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + return true; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + return $this->rdata; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/NS.php b/bundled-libs/Net/DNS2/RR/NS.php new file mode 100644 index 00000000..490fb75c --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/NS.php @@ -0,0 +1,153 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * NS Resource Record - RFC1035 section 3.3.11 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / NSDNAME / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_NS extends Net_DNS2_RR +{ + /* + * the hostname of the DNS server + */ + public $nsdname; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->cleanString($this->nsdname) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->nsdname = $this->cleanString(array_shift($rdata)); + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $offset = $packet->offset; + $this->nsdname = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->nsdname) > 0) { + + return $packet->compress($this->nsdname, $packet->offset); + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/NSAP.php b/bundled-libs/Net/DNS2/RR/NSAP.php new file mode 100644 index 00000000..b9d8a856 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/NSAP.php @@ -0,0 +1,262 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * NSAP Resource Record - RFC1706 + * + * |--------------| + * | <-- IDP --> | + * |--------------|-------------------------------------| + * | AFI | IDI | <-- DSP --> | + * |-----|--------|-------------------------------------| + * | 47 | 0005 | DFI | AA |Rsvd | RD |Area | ID |Sel | + * |-----|--------|-----|----|-----|----|-----|----|----| + * octets | 1 | 2 | 1 | 3 | 2 | 2 | 2 | 6 | 1 | + * |-----|--------|-----|----|-----|----|-----|----|----| + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_NSAP extends Net_DNS2_RR +{ + public $afi; + public $idi; + public $dfi; + public $aa; + public $rsvd; + public $rd; + public $area; + public $id; + public $sel; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->cleanString($this->afi) . '.' . + $this->cleanString($this->idi) . '.' . + $this->cleanString($this->dfi) . '.' . + $this->cleanString($this->aa) . '.' . + $this->cleanString($this->rsvd) . '.' . + $this->cleanString($this->rd) . '.' . + $this->cleanString($this->area) . '.' . + $this->cleanString($this->id) . '.' . + $this->sel; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $data = strtolower(trim(array_shift($rdata))); + + // + // there is no real standard for format, so we can't rely on the fact that + // the value will come in with periods separating the values- so strip + // them out if they're included, and parse without them. + // + $data = str_replace(array('.', '0x'), '', $data); + + // + // unpack it as ascii characters + // + $x = unpack('A2afi/A4idi/A2dfi/A6aa/A4rsvd/A4rd/A4area/A12id/A2sel', $data); + + // + // make sure the afi value is 47 + // + if ($x['afi'] == '47') { + + $this->afi = '0x' . $x['afi']; + $this->idi = $x['idi']; + $this->dfi = $x['dfi']; + $this->aa = $x['aa']; + $this->rsvd = $x['rsvd']; + $this->rd = $x['rd']; + $this->area = $x['area']; + $this->id = $x['id']; + $this->sel = $x['sel']; + + return true; + } + + return false; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength == 20) { + + // + // get the AFI value + // + $this->afi = dechex(ord($this->rdata[0])); + + // + // we only support AFI 47- there arent' any others defined. + // + if ($this->afi == '47') { + + // + // unpack the rest of the values + // + $x = unpack( + 'Cafi/nidi/Cdfi/C3aa/nrsvd/nrd/narea/Nidh/nidl/Csel', + $this->rdata + ); + + $this->afi = sprintf('0x%02x', $x['afi']); + $this->idi = sprintf('%04x', $x['idi']); + $this->dfi = sprintf('%02x', $x['dfi']); + $this->aa = sprintf( + '%06x', $x['aa1'] << 16 | $x['aa2'] << 8 | $x['aa3'] + ); + $this->rsvd = sprintf('%04x', $x['rsvd']); + $this->rd = sprintf('%04x', $x['rd']); + $this->area = sprintf('%04x', $x['area']); + $this->id = sprintf('%08x', $x['idh']) . + sprintf('%04x', $x['idl']); + $this->sel = sprintf('%02x', $x['sel']); + + return true; + } + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if ($this->afi == '0x47') { + + // + // build the aa field + // + $aa = unpack('A2x/A2y/A2z', $this->aa); + + // + // build the id field + // + $id = unpack('A8a/A4b', $this->id); + + // + $data = pack( + 'CnCCCCnnnNnC', + hexdec($this->afi), + hexdec($this->idi), + hexdec($this->dfi), + hexdec($aa['x']), + hexdec($aa['y']), + hexdec($aa['z']), + hexdec($this->rsvd), + hexdec($this->rd), + hexdec($this->area), + hexdec($id['a']), + hexdec($id['b']), + hexdec($this->sel) + ); + + if (strlen($data) == 20) { + + $packet->offset += 20; + return $data; + } + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/NSEC.php b/bundled-libs/Net/DNS2/RR/NSEC.php new file mode 100644 index 00000000..0559641c --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/NSEC.php @@ -0,0 +1,184 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * NSEC Resource Record - RFC3845 section 2.1 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * / Next Domain Name / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * / List of Type Bit Map(s) / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_NSEC extends Net_DNS2_RR +{ + /* + * The next owner name + */ + public $next_domain_name; + + /* + * identifies the RRset types that exist at the NSEC RR's owner name. + */ + public $type_bit_maps = array(); + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $data = $this->cleanString($this->next_domain_name) . '.'; + + foreach ($this->type_bit_maps as $rr) { + + $data .= ' ' . $rr; + } + + return $data; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->next_domain_name = $this->cleanString(array_shift($rdata)); + $this->type_bit_maps = $rdata; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // expand the next domain name + // + $offset = $packet->offset; + $this->next_domain_name = Net_DNS2_Packet::expand($packet, $offset); + + // + // parse out the RR's from the bitmap + // + $this->type_bit_maps = Net_DNS2_BitMap::bitMapToArray( + substr($this->rdata, $offset - $packet->offset) + ); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->next_domain_name) > 0) { + + $data = $packet->compress($this->next_domain_name, $packet->offset); + $bitmap = Net_DNS2_BitMap::arrayToBitMap($this->type_bit_maps); + + $packet->offset += strlen($bitmap); + + return $data . $bitmap; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/NSEC3.php b/bundled-libs/Net/DNS2/RR/NSEC3.php new file mode 100644 index 00000000..ff0a678b --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/NSEC3.php @@ -0,0 +1,310 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * NSEC3 Resource Record - RFC5155 section 3.2 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Hash Alg. | Flags | Iterations | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Salt Length | Salt / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Hash Length | Next Hashed Owner Name / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * / Type Bit Maps / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_NSEC3 extends Net_DNS2_RR +{ + /* + * Algorithm to use + */ + public $algorithm; + + /* + * flags + */ + public $flags; + + /* + * defines the number of additional times the hash is performed. + */ + public $iterations; + + /* + * the length of the salt- not displayed + */ + public $salt_length; + + /* + * the salt + */ + public $salt; + + /* + * the length of the hash value + */ + public $hash_length; + + /* + * the hashed value of the owner name + */ + public $hashed_owner_name; + + /* + * array of RR type names + */ + public $type_bit_maps = array(); + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $out = $this->algorithm . ' ' . $this->flags . ' ' . $this->iterations . ' '; + + // + // per RFC5155, the salt_length value isn't displayed, and if the salt + // is empty, the salt is displayed as '-' + // + if ($this->salt_length > 0) { + + $out .= $this->salt; + } else { + + $out .= '-'; + } + + // + // per RFC5255 the hash length isn't shown + // + $out .= ' ' . $this->hashed_owner_name; + + // + // show the RR's + // + foreach ($this->type_bit_maps as $rr) { + + $out .= ' ' . strtoupper($rr); + } + + return $out; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->algorithm = array_shift($rdata); + $this->flags = array_shift($rdata); + $this->iterations = array_shift($rdata); + + // + // an empty salt is represented as '-' per RFC5155 section 3.3 + // + $salt = array_shift($rdata); + if ($salt == '-') { + + $this->salt_length = 0; + $this->salt = ''; + } else { + + $this->salt_length = strlen(pack('H*', $salt)); + $this->salt = strtoupper($salt); + } + + $this->hashed_owner_name = array_shift($rdata); + $this->hash_length = strlen(base64_decode($this->hashed_owner_name)); + + $this->type_bit_maps = $rdata; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the first values + // + $x = unpack('Calgorithm/Cflags/niterations/Csalt_length', $this->rdata); + + $this->algorithm = $x['algorithm']; + $this->flags = $x['flags']; + $this->iterations = $x['iterations']; + $this->salt_length = $x['salt_length']; + + $offset = 5; + + if ($this->salt_length > 0) { + + $x = unpack('H*', substr($this->rdata, $offset, $this->salt_length)); + $this->salt = strtoupper($x[1]); + $offset += $this->salt_length; + } + + // + // unpack the hash length + // + $x = unpack('@' . $offset . '/Chash_length', $this->rdata); + $offset++; + + // + // copy out the hash + // + $this->hash_length = $x['hash_length']; + if ($this->hash_length > 0) { + + $this->hashed_owner_name = base64_encode( + substr($this->rdata, $offset, $this->hash_length) + ); + $offset += $this->hash_length; + } + + // + // parse out the RR bitmap + // + $this->type_bit_maps = Net_DNS2_BitMap::bitMapToArray( + substr($this->rdata, $offset) + ); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + // + // pull the salt and build the length + // + $salt = pack('H*', $this->salt); + $this->salt_length = strlen($salt); + + // + // pack the algorithm, flags, iterations and salt length + // + $data = pack( + 'CCnC', + $this->algorithm, $this->flags, $this->iterations, $this->salt_length + ); + $data .= $salt; + + // + // add the hash length and hash + // + $data .= chr($this->hash_length); + if ($this->hash_length > 0) { + + $data .= base64_decode($this->hashed_owner_name); + } + + // + // conver the array of RR names to a type bitmap + // + $data .= Net_DNS2_BitMap::arrayToBitMap($this->type_bit_maps); + + $packet->offset += strlen($data); + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/NSEC3PARAM.php b/bundled-libs/Net/DNS2/RR/NSEC3PARAM.php new file mode 100644 index 00000000..f16e7ae3 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/NSEC3PARAM.php @@ -0,0 +1,220 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * NSEC3PARAM Resource Record - RFC5155 section 4.2 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Hash Alg. | Flags | Iterations | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Salt Length | Salt / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_NSEC3PARAM extends Net_DNS2_RR +{ + /* + * Algorithm to use + * + * TODO: same as the NSEC3 + */ + public $algorithm; + + /* + * flags + */ + public $flags; + + /* + * defines the number of additional times the hash is performed. + */ + public $iterations; + + /* + * the length of the salt- not displayed + */ + public $salt_length; + + /* + * the salt + */ + public $salt; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $out = $this->algorithm . ' ' . $this->flags . ' ' . $this->iterations . ' '; + + // + // per RFC5155, the salt_length value isn't displayed, and if the salt + // is empty, the salt is displayed as "-" + // + if ($this->salt_length > 0) { + + $out .= $this->salt; + } else { + + $out .= '-'; + } + + return $out; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->algorithm = array_shift($rdata); + $this->flags = array_shift($rdata); + $this->iterations = array_shift($rdata); + + $salt = array_shift($rdata); + if ($salt == '-') { + + $this->salt_length = 0; + $this->salt = ''; + } else { + + $this->salt_length = strlen(pack('H*', $salt)); + $this->salt = strtoupper($salt); + } + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $x = unpack('Calgorithm/Cflags/niterations/Csalt_length', $this->rdata); + + $this->algorithm = $x['algorithm']; + $this->flags = $x['flags']; + $this->iterations = $x['iterations']; + $this->salt_length = $x['salt_length']; + + if ($this->salt_length > 0) { + + $x = unpack('H*', substr($this->rdata, 5, $this->salt_length)); + $this->salt = strtoupper($x[1]); + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + $salt = pack('H*', $this->salt); + $this->salt_length = strlen($salt); + + $data = pack( + 'CCnC', + $this->algorithm, $this->flags, $this->iterations, $this->salt_length + ) . $salt; + + $packet->offset += strlen($data); + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/OPENPGPKEY.php b/bundled-libs/Net/DNS2/RR/OPENPGPKEY.php new file mode 100644 index 00000000..e38c7388 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/OPENPGPKEY.php @@ -0,0 +1,159 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2014, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2014 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.4.0 + * + */ + +/** + * OPENPGPKEY Resource Record - https://tools.ietf.org/html/draft-ietf-dane-openpgpkey-01 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * / / + * / OpenPGP Public KeyRing / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_OPENPGPKEY extends Net_DNS2_RR +{ + /* + * the public key + */ + public $key; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->key; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->key = array_shift($rdata); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $this->key = base64_encode(substr($this->rdata, 0, $this->rdlength)); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->key) > 0) { + + $data = base64_decode($this->key); + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/OPT.php b/bundled-libs/Net/DNS2/RR/OPT.php new file mode 100644 index 00000000..70c5fcc2 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/OPT.php @@ -0,0 +1,292 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.0.0 + * + */ + +/** + * OPT Resource Record - RFC2929 section 3.1 + * + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * | OPTION-CODE | + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * | OPTION-LENGTH | + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * | | + * / OPTION-DATA / + * / / + * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_OPT extends Net_DNS2_RR +{ + /* + * option code - assigned by IANA + */ + public $option_code; + + /* + * the length of the option data + */ + public $option_length; + + /* + * the option data + */ + public $option_data; + + /* + * the extended response code stored in the TTL + */ + public $extended_rcode; + + /* + * the implementation level + */ + public $version; + + /* + * the DO bit used for DNSSEC - RFC3225 + */ + public $do; + + /* + * the extended flags + */ + public $z; + + /** + * Constructor - builds a new Net_DNS2_RR_OPT object; normally you wouldn't call + * this directly, but OPT RR's are a little different + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet or null to create + * an empty object + * @param array $rr an array with RR parse values or null to + * create an empty object + * + * @throws Net_DNS2_Exception + * @access public + * + */ + public function __construct(Net_DNS2_Packet &$packet = null, array $rr = null) + { + // + // this is for when we're manually building an OPT RR object; we aren't + // passing in binary data to parse, we just want a clean/empty object. + // + $this->type = 'OPT'; + $this->rdlength = 0; + + $this->option_length = 0; + $this->extended_rcode = 0; + $this->version = 0; + $this->do = 0; + $this->z = 0; + + // + // everthing else gets passed through to the parent. + // + if ( (!is_null($packet)) && (!is_null($rr)) ) { + + parent::__construct($packet, $rr); + } + } + + /** + * method to return the rdata portion of the packet as a string. There is no + * defintion for returning an OPT RR by string- this is just here to validate + * the binary parsing / building routines. + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->option_code . ' ' . $this->option_data; + } + + /** + * parses the rdata portion from a standard DNS config line. There is no + * definition for parsing a OPT RR by string- this is just here to validate + * the binary parsing / building routines. + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->option_code = array_shift($rdata); + $this->option_data = array_shift($rdata); + $this->option_length = strlen($this->option_data); + + $x = unpack('Cextended/Cversion/Cdo/Cz', pack('N', $this->ttl)); + + $this->extended_rcode = $x['extended']; + $this->version = $x['version']; + $this->do = ($x['do'] >> 7); + $this->z = $x['z']; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + // + // parse out the TTL value + // + $x = unpack('Cextended/Cversion/Cdo/Cz', pack('N', $this->ttl)); + + $this->extended_rcode = $x['extended']; + $this->version = $x['version']; + $this->do = ($x['do'] >> 7); + $this->z = $x['z']; + + // + // parse the data, if there is any + // + if ($this->rdlength > 0) { + + // + // unpack the code and length + // + $x = unpack('noption_code/noption_length', $this->rdata); + + $this->option_code = $x['option_code']; + $this->option_length = $x['option_length']; + + // + // copy out the data based on the length + // + $this->option_data = substr($this->rdata, 4); + } + + return true; + } + + /** + * pre-builds the TTL value for this record; we needed to separate this out + * from the rrGet() function, as the logic in the Net_DNS2_RR packs the TTL + * value before it builds the rdata value. + * + * @return void + * @access protected + * + */ + protected function preBuild() + { + // + // build the TTL value based on the local values + // + $ttl = unpack( + 'N', + pack('CCCC', $this->extended_rcode, $this->version, ($this->do << 7), 0) + ); + + $this->ttl = $ttl[1]; + + return; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + // + // if there is an option code, then pack that data too + // + if ($this->option_code) { + + $data = pack('nn', $this->option_code, $this->option_length) . + $this->option_data; + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/PTR.php b/bundled-libs/Net/DNS2/RR/PTR.php new file mode 100644 index 00000000..6926d77a --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/PTR.php @@ -0,0 +1,152 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * PTR Resource Record - RFC1035 section 3.3.12 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / PTRDNAME / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_PTR extends Net_DNS2_RR +{ + /* + * the hostname of the PTR entry + */ + public $ptrdname; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return rtrim($this->ptrdname, '.') . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->ptrdname = rtrim(implode(' ', $rdata), '.'); + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $offset = $packet->offset; + $this->ptrdname = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->ptrdname) > 0) { + + return $packet->compress($this->ptrdname, $packet->offset); + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/PX.php b/bundled-libs/Net/DNS2/RR/PX.php new file mode 100644 index 00000000..ae4f05ec --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/PX.php @@ -0,0 +1,186 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * PX Resource Record - RFC2163 section 4 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | PREFERENCE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / MAP822 / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / MAPX400 / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-- + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_PX extends Net_DNS2_RR +{ + /* + * preference + */ + public $preference; + + /* + * the RFC822 part of the MCGAM + */ + public $map822; + + /* + * the X.400 part of the MCGAM + */ + public $mapx400; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->preference . ' ' . $this->cleanString($this->map822) . '. ' . + $this->cleanString($this->mapx400) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->preference = $rdata[0]; + $this->map822 = $this->cleanString($rdata[1]); + $this->mapx400 = $this->cleanString($rdata[2]); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // parse the preference + // + $x = unpack('npreference', $this->rdata); + $this->preference = $x['preference']; + + $offset = $packet->offset + 2; + + $this->map822 = Net_DNS2_Packet::expand($packet, $offset); + $this->mapx400 = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->map822) > 0) { + + $data = pack('n', $this->preference); + $packet->offset += 2; + + $data .= $packet->compress($this->map822, $packet->offset); + $data .= $packet->compress($this->mapx400, $packet->offset); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/RP.php b/bundled-libs/Net/DNS2/RR/RP.php new file mode 100644 index 00000000..b3fae4e3 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/RP.php @@ -0,0 +1,167 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * RP Resource Record - RFC1183 section 2.2 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / mboxdname / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / txtdname / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_RP extends Net_DNS2_RR +{ + /* + * mailbox for the responsible person + */ + public $mboxdname; + + /* + * is a domain name for which TXT RR's exists + */ + public $txtdname; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->cleanString($this->mboxdname) . '. ' . + $this->cleanString($this->txtdname) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->mboxdname = $this->cleanString($rdata[0]); + $this->txtdname = $this->cleanString($rdata[1]); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $offset = $packet->offset; + + $this->mboxdname = Net_DNS2_Packet::expand($packet, $offset); + $this->txtdname = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->mboxdname) > 0) { + + return $packet->compress($this->mboxdname, $packet->offset) . + $packet->compress($this->txtdname, $packet->offset); + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/RRSIG.php b/bundled-libs/Net/DNS2/RR/RRSIG.php new file mode 100644 index 00000000..0997aff0 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/RRSIG.php @@ -0,0 +1,329 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + * This file contains code based off the Net::DNS::SEC Perl module by + * Olaf M. Kolkman + * + * This is the copyright notice from the PERL Net::DNS::SEC module: + * + * Copyright (c) 2001 - 2005 RIPE NCC. Author Olaf M. Kolkman + * Copyright (c) 2007 - 2008 NLnet Labs. Author Olaf M. Kolkman + * <olaf@net-dns.org> + * + * All Rights Reserved + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation, and that the name of the author not be + * used in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. + * + * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL + * AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY + * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +/** + * RRSIG Resource Record - RFC4034 sction 3.1 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Type Covered | Algorithm | Labels | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Original TTL | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Signature Expiration | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Signature Inception | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Key Tag | / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Signer's Name / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * / / + * / Signature / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_RRSIG extends Net_DNS2_RR +{ + /* + * the RR type covered by this signature + */ + public $typecovered; + + /* + * the algorithm used for the signature + */ + public $algorithm; + + /* + * the number of labels in the name + */ + public $labels; + + /* + * the original TTL + */ + public $origttl; + + /* + * the signature expiration + */ + public $sigexp; + + /* + * the inception of the signature + */ + public $sigincep; + + /* + * the keytag used + */ + public $keytag; + + /* + * the signer's name + */ + public $signname; + + /* + * the signature + */ + public $signature; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->typecovered . ' ' . $this->algorithm . ' ' . + $this->labels . ' ' . $this->origttl . ' ' . + $this->sigexp . ' ' . $this->sigincep . ' ' . + $this->keytag . ' ' . $this->cleanString($this->signname) . '. ' . + $this->signature; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->typecovered = strtoupper(array_shift($rdata)); + $this->algorithm = array_shift($rdata); + $this->labels = array_shift($rdata); + $this->origttl = array_shift($rdata); + $this->sigexp = array_shift($rdata); + $this->sigincep = array_shift($rdata); + $this->keytag = array_shift($rdata); + $this->signname = $this->cleanString(array_shift($rdata)); + + foreach ($rdata as $line) { + + $this->signature .= $line; + } + + $this->signature = trim($this->signature); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack + // + $x = unpack( + 'ntc/Calgorithm/Clabels/Norigttl/Nsigexp/Nsigincep/nkeytag', + $this->rdata + ); + + $this->typecovered = Net_DNS2_Lookups::$rr_types_by_id[$x['tc']]; + $this->algorithm = $x['algorithm']; + $this->labels = $x['labels']; + $this->origttl = Net_DNS2::expandUint32($x['origttl']); + + // + // the dates are in GM time + // + $this->sigexp = gmdate('YmdHis', $x['sigexp']); + $this->sigincep = gmdate('YmdHis', $x['sigincep']); + + // + // get the keytag + // + $this->keytag = $x['keytag']; + + // + // get teh signers name and signature + // + $offset = $packet->offset + 18; + $sigoffset = $offset; + + $this->signname = strtolower( + Net_DNS2_Packet::expand($packet, $sigoffset) + ); + $this->signature = base64_encode( + substr($this->rdata, 18 + ($sigoffset - $offset)) + ); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->signature) > 0) { + + // + // parse the values out of the dates + // + preg_match( + '/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/', $this->sigexp, $e + ); + preg_match( + '/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/', $this->sigincep, $i + ); + + // + // pack the value + // + $data = pack( + 'nCCNNNn', + Net_DNS2_Lookups::$rr_types_by_name[$this->typecovered], + $this->algorithm, + $this->labels, + $this->origttl, + gmmktime($e[4], $e[5], $e[6], $e[2], $e[3], $e[1]), + gmmktime($i[4], $i[5], $i[6], $i[2], $i[3], $i[1]), + $this->keytag + ); + + // + // the signer name is special; it's not allowed to be compressed + // (see section 3.1.7) + // + $names = explode('.', strtolower($this->signname)); + foreach ($names as $name) { + + $data .= chr(strlen($name)); + $data .= $name; + } + $data .= "\0"; + + // + // add the signature + // + $data .= base64_decode($this->signature); + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/RT.php b/bundled-libs/Net/DNS2/RR/RT.php new file mode 100644 index 00000000..6128381e --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/RT.php @@ -0,0 +1,175 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * RT Resource Record - RFC1183 section 3.3 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | preference | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / intermediate-host / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_RT extends Net_DNS2_RR +{ + /* + * the preference of this route + */ + public $preference; + + /* + * host which will servce as an intermediate in reaching the owner host + */ + public $intermediatehost; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->preference . ' ' . + $this->cleanString($this->intermediatehost) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->preference = $rdata[0]; + $this->intermediatehost = $this->cleanString($rdata[1]); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the preference + // + $x = unpack('npreference', $this->rdata); + + $this->preference = $x['preference']; + $offset = $packet->offset + 2; + + $this->intermediatehost = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->intermediatehost) > 0) { + + $data = pack('n', $this->preference); + $packet->offset += 2; + + $data .= $packet->compress($this->intermediatehost, $packet->offset); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/SIG.php b/bundled-libs/Net/DNS2/RR/SIG.php new file mode 100644 index 00000000..b887a8eb --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/SIG.php @@ -0,0 +1,459 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + * This file contains code based off the Net::DNS::SEC Perl module by + * Olaf M. Kolkman + * + * This is the copyright notice from the PERL Net::DNS::SEC module: + * + * Copyright (c) 2001 - 2005 RIPE NCC. Author Olaf M. Kolkman + * Copyright (c) 2007 - 2008 NLnet Labs. Author Olaf M. Kolkman + * <olaf@net-dns.org> + * + * All Rights Reserved + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, + * provided that the above copyright notice appear in all copies and that + * both that copyright notice and this permission notice appear in + * supporting documentation, and that the name of the author not be + * used in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. + * + * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS; IN NO EVENT SHALL + * AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY + * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ + +/** + * SIG Resource Record - RFC2535 section 4.1 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Type Covered | Algorithm | Labels | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Original TTL | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Signature Expiration | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Signature Inception | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Key Tag | / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Signer's Name / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * / / + * / Signature / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_SIG extends Net_DNS2_RR +{ + /* + * and instance of a Net_DNS2_PrivateKey object + */ + public $private_key = null; + + /* + * the RR type covered by this signature + */ + public $typecovered; + + /* + * the algorithm used for the signature + */ + public $algorithm; + + /* + * the number of labels in the name + */ + public $labels; + + /* + * the original TTL + */ + public $origttl; + + /* + * the signature expiration + */ + public $sigexp; + + /* + * the inception of the signature + */ + public $sigincep; + + /* + * the keytag used + */ + public $keytag; + + /* + * the signer's name + */ + public $signname; + + /* + * the signature + */ + public $signature; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->typecovered . ' ' . $this->algorithm . ' ' . + $this->labels . ' ' . $this->origttl . ' ' . + $this->sigexp . ' ' . $this->sigincep . ' ' . + $this->keytag . ' ' . $this->cleanString($this->signname) . '. ' . + $this->signature; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->typecovered = strtoupper(array_shift($rdata)); + $this->algorithm = array_shift($rdata); + $this->labels = array_shift($rdata); + $this->origttl = array_shift($rdata); + $this->sigexp = array_shift($rdata); + $this->sigincep = array_shift($rdata); + $this->keytag = array_shift($rdata); + $this->signname = $this->cleanString(array_shift($rdata)); + + foreach ($rdata as $line) { + + $this->signature .= $line; + } + + $this->signature = trim($this->signature); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack + // + $x = unpack( + 'ntc/Calgorithm/Clabels/Norigttl/Nsigexp/Nsigincep/nkeytag', + $this->rdata + ); + + $this->typecovered = Net_DNS2_Lookups::$rr_types_by_id[$x['tc']]; + $this->algorithm = $x['algorithm']; + $this->labels = $x['labels']; + $this->origttl = Net_DNS2::expandUint32($x['origttl']); + + // + // the dates are in GM time + // + $this->sigexp = gmdate('YmdHis', $x['sigexp']); + $this->sigincep = gmdate('YmdHis', $x['sigincep']); + + // + // get the keytag + // + $this->keytag = $x['keytag']; + + // + // get teh signers name and signature + // + $offset = $packet->offset + 18; + $sigoffset = $offset; + + $this->signname = strtolower( + Net_DNS2_Packet::expand($packet, $sigoffset) + ); + $this->signature = base64_encode( + substr($this->rdata, 18 + ($sigoffset - $offset)) + ); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + // + // parse the values out of the dates + // + preg_match( + '/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/', $this->sigexp, $e + ); + preg_match( + '/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/', $this->sigincep, $i + ); + + // + // pack the value + // + $data = pack( + 'nCCNNNn', + Net_DNS2_Lookups::$rr_types_by_name[$this->typecovered], + $this->algorithm, + $this->labels, + $this->origttl, + gmmktime($e[4], $e[5], $e[6], $e[2], $e[3], $e[1]), + gmmktime($i[4], $i[5], $i[6], $i[2], $i[3], $i[1]), + $this->keytag + ); + + // + // the signer name is special; it's not allowed to be compressed + // (see section 3.1.7) + // + $names = explode('.', strtolower($this->signname)); + foreach ($names as $name) { + + $data .= chr(strlen($name)); + $data .= $name; + } + + $data .= chr('0'); + + // + // if the signature is empty, and $this->private_key is an instance of a + // private key object, and we have access to openssl, then assume this + // is a SIG(0), and generate a new signature + // + if ( (strlen($this->signature) == 0) + && ($this->private_key instanceof Net_DNS2_PrivateKey) + && (extension_loaded('openssl') === true) + ) { + + // + // create a new packet for the signature- + // + $new_packet = new Net_DNS2_Packet_Request('example.com', 'SOA', 'IN'); + + // + // copy the packet data over + // + $new_packet->copy($packet); + + // + // remove the SIG object from the additional list + // + array_pop($new_packet->additional); + $new_packet->header->arcount = count($new_packet->additional); + + // + // copy out the data + // + $sigdata = $data . $new_packet->get(); + + // + // based on the algorithm + // + $algorithm = 0; + + switch($this->algorithm) { + + // + // MD5 + // + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSAMD5: + + $algorithm = OPENSSL_ALGO_MD5; + break; + + // + // SHA1 + // + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA1: + + $algorithm = OPENSSL_ALGO_SHA1; + break; + + // + // SHA256 (PHP 5.4.8 or higher) + // + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA256: + + if (version_compare(PHP_VERSION, '5.4.8', '<') == true) { + + throw new Net_DNS2_Exception( + 'SHA256 support is only available in PHP >= 5.4.8', + Net_DNS2_Lookups::E_OPENSSL_INV_ALGO + ); + } + + $algorithm = OPENSSL_ALGO_SHA256; + break; + + // + // SHA512 (PHP 5.4.8 or higher) + // + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA512: + + if (version_compare(PHP_VERSION, '5.4.8', '<') == true) { + + throw new Net_DNS2_Exception( + 'SHA512 support is only available in PHP >= 5.4.8', + Net_DNS2_Lookups::E_OPENSSL_INV_ALGO + ); + } + + $algorithm = OPENSSL_ALGO_SHA512; + break; + + // + // unsupported at the moment + // + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_DSA: + case Net_DNS2_Lookups::DSNSEC_ALGORITHM_RSASHA1NSEC3SHA1: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_DSANSEC3SHA1: + default: + throw new Net_DNS2_Exception( + 'invalid or unsupported algorithm', + Net_DNS2_Lookups::E_OPENSSL_INV_ALGO + ); + break; + } + + // + // sign the data + // + if (openssl_sign($sigdata, $this->signature, $this->private_key->instance, $algorithm) == false) { + + throw new Net_DNS2_Exception( + openssl_error_string(), + Net_DNS2_Lookups::E_OPENSSL_ERROR + ); + } + + // + // build the signature value based + // + switch($this->algorithm) { + + // + // RSA- add it directly + // + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSAMD5: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA1: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA256: + case Net_DNS2_Lookups::DNSSEC_ALGORITHM_RSASHA512: + + $this->signature = base64_encode($this->signature); + break; + } + } + + // + // add the signature + // + $data .= base64_decode($this->signature); + + $packet->offset += strlen($data); + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/SMIMEA.php b/bundled-libs/Net/DNS2/RR/SMIMEA.php new file mode 100644 index 00000000..57c0dde4 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/SMIMEA.php @@ -0,0 +1,75 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2016, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2016 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.4.2 + * + */ + +/** + * The SMIMEA RR is implemented exactly like the TLSA record, so + * for now we just extend the TLSA RR and use it. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_SMIMEA extends Net_DNS2_RR_TLSA +{ +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/SOA.php b/bundled-libs/Net/DNS2/RR/SOA.php new file mode 100644 index 00000000..0a3d6e03 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/SOA.php @@ -0,0 +1,240 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * SOA Resource Record - RFC1035 section 3.3.13 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / MNAME / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / RNAME / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | SERIAL | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | REFRESH | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | RETRY | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | EXPIRE | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | MINIMUM | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_SOA extends Net_DNS2_RR +{ + /* + * The master DNS server + */ + public $mname; + + /* + * mailbox of the responsible person + */ + public $rname; + + /* + * serial number + */ + public $serial; + + /* + * refresh time + */ + public $refresh; + + /* + * retry interval + */ + public $retry; + + /* + * expire time + */ + public $expire; + + /* + * minimum TTL for any RR in this zone + */ + public $minimum; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->cleanString($this->mname) . '. ' . + $this->cleanString($this->rname) . '. ' . + $this->serial . ' ' . $this->refresh . ' ' . $this->retry . ' ' . + $this->expire . ' ' . $this->minimum; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->mname = $this->cleanString($rdata[0]); + $this->rname = $this->cleanString($rdata[1]); + + $this->serial = $rdata[2]; + $this->refresh = $rdata[3]; + $this->retry = $rdata[4]; + $this->expire = $rdata[5]; + $this->minimum = $rdata[6]; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // parse the + // + $offset = $packet->offset; + + $this->mname = Net_DNS2_Packet::expand($packet, $offset); + $this->rname = Net_DNS2_Packet::expand($packet, $offset); + + // + // get the SOA values + // + $x = unpack( + '@' . $offset . '/Nserial/Nrefresh/Nretry/Nexpire/Nminimum/', + $packet->rdata + ); + + $this->serial = Net_DNS2::expandUint32($x['serial']); + $this->refresh = Net_DNS2::expandUint32($x['refresh']); + $this->retry = Net_DNS2::expandUint32($x['retry']); + $this->expire = Net_DNS2::expandUint32($x['expire']); + $this->minimum = Net_DNS2::expandUint32($x['minimum']); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->mname) > 0) { + + $data = $packet->compress($this->mname, $packet->offset); + $data .= $packet->compress($this->rname, $packet->offset); + + $data .= pack( + 'N5', $this->serial, $this->refresh, $this->retry, + $this->expire, $this->minimum + ); + + $packet->offset += 20; + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/SPF.php b/bundled-libs/Net/DNS2/RR/SPF.php new file mode 100644 index 00000000..fca44779 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/SPF.php @@ -0,0 +1,75 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * The SPF RR is implemented exactly like the TXT record, so + * for now we just extend the TXT RR and use it. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_SPF extends Net_DNS2_RR_TXT +{ +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/SRV.php b/bundled-libs/Net/DNS2/RR/SRV.php new file mode 100644 index 00000000..37923810 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/SRV.php @@ -0,0 +1,186 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * SRV Resource Record - RFC2782 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | PRIORITY | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | WEIGHT | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | PORT | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / TARGET / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_SRV extends Net_DNS2_RR +{ + /* + * The priority of this target host. + */ + public $priority; + + /* + * a relative weight for entries with the same priority + */ + public $weight; + + /* + * The port on this target host of this service. + */ + public $port; + + /* + * The domain name of the target host + */ + public $target; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->priority . ' ' . $this->weight . ' ' . + $this->port . ' ' . $this->cleanString($this->target) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->priority = $rdata[0]; + $this->weight = $rdata[1]; + $this->port = $rdata[2]; + + $this->target = $this->cleanString($rdata[3]); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the priority, weight and port + // + $x = unpack('npriority/nweight/nport', $this->rdata); + + $this->priority = $x['priority']; + $this->weight = $x['weight']; + $this->port = $x['port']; + + $offset = $packet->offset + 6; + $this->target = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->target) > 0) { + + $data = pack('nnn', $this->priority, $this->weight, $this->port); + $packet->offset += 6; + + $data .= $packet->compress($this->target, $packet->offset); + + return $data; + } + + return null; + } +} + +?> diff --git a/bundled-libs/Net/DNS2/RR/SSHFP.php b/bundled-libs/Net/DNS2/RR/SSHFP.php new file mode 100644 index 00000000..c5de2d67 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/SSHFP.php @@ -0,0 +1,250 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * SSHFP Resource Record - RFC4255 section 3.1 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | algorithm | fp type | / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ / + * / / + * / fingerprint / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_SSHFP extends Net_DNS2_RR +{ + /* + * the algorithm used + */ + public $algorithm; + + /* + * The finger print type + */ + public $fp_type; + + /* + * the finger print data + */ + public $fingerprint; + + /* + * Algorithms + */ + const SSHFP_ALGORITHM_RES = 0; + const SSHFP_ALGORITHM_RSA = 1; + const SSHFP_ALGORITHM_DSS = 2; + const SSHFP_ALGORITHM_ECDSA = 3; + + /* + * Fingerprint Types + */ + const SSHFP_FPTYPE_RES = 0; + const SSHFP_FPTYPE_SHA1 = 1; + const SSHFP_FPTYPE_SHA256 = 2; + + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->algorithm . ' ' . $this->fp_type . ' ' . $this->fingerprint; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + // + // "The use of mnemonics instead of numbers is not allowed." + // + // RFC4255 section 3.2 + // + $algorithm = array_shift($rdata); + $fp_type = array_shift($rdata); + $fingerprint = strtolower(implode('', $rdata)); + + // + // There are only two algorithm's defined + // + if ( ($algorithm != self::SSHFP_ALGORITHM_RSA) + && ($algorithm != self::SSHFP_ALGORITHM_DSS) + && ($algorithm != self::SSHFP_ALGORITHM_ECDSA) + ) { + return false; + } + + // + // there are only two fingerprints defined + // + if ( ($fp_type != self::SSHFP_FPTYPE_SHA1) + && ($fp_type != self::SSHFP_FPTYPE_SHA256) + ) { + return false; + } + + $this->algorithm = $algorithm; + $this->fp_type = $fp_type; + $this->fingerprint = $fingerprint; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the algorithm and finger print type + // + $x = unpack('Calgorithm/Cfp_type', $this->rdata); + + $this->algorithm = $x['algorithm']; + $this->fp_type = $x['fp_type']; + + // + // There are only three algorithm's defined + // + if ( ($this->algorithm != self::SSHFP_ALGORITHM_RSA) + && ($this->algorithm != self::SSHFP_ALGORITHM_DSS) + && ($this->algorithm != self::SSHFP_ALGORITHM_ECDSA) + ) { + return false; + } + + // + // there are only two fingerprints defined + // + if ( ($this->fp_type != self::SSHFP_FPTYPE_SHA1) + && ($this->fp_type != self::SSHFP_FPTYPE_SHA256) + ) { + return false; + } + + // + // parse the finger print; this assumes SHA-1 + // + $fp = unpack('H*a', substr($this->rdata, 2)); + $this->fingerprint = strtolower($fp['a']); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->fingerprint) > 0) { + + $data = pack( + 'CCH*', $this->algorithm, $this->fp_type, $this->fingerprint + ); + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/TA.php b/bundled-libs/Net/DNS2/RR/TA.php new file mode 100644 index 00000000..da59750c --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/TA.php @@ -0,0 +1,75 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2011, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2011 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.2.0 + * + */ + +/** + * The TA RR is implemented exactly like the DS record, so + * for now we just extend the DS RR and use it. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_TA extends Net_DNS2_RR_DS +{ +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/TALINK.php b/bundled-libs/Net/DNS2/RR/TALINK.php new file mode 100644 index 00000000..dfb96735 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/TALINK.php @@ -0,0 +1,171 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2011, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2011 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.2.0 + * + */ + +/** + * TALINK Resource Record - DNSSEC Trust Anchor + * + * http://tools.ietf.org/id/draft-ietf-dnsop-dnssec-trust-history-00.txt + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / PREVIOUS / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / NEXT / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_TALINK extends Net_DNS2_RR +{ + /* + * the previous domain name + */ + public $previous; + + /* + * the next domain name + */ + public $next; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->cleanString($this->previous) . '. ' . + $this->cleanString($this->next) . '.'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->previous = $this->cleanString($rdata[0]); + $this->next = $this->cleanString($rdata[1]); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $offset = $packet->offset; + + $this->previous = Net_DNS2_Packet::label($packet, $offset); + $this->next = Net_DNS2_Packet::label($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if ( (strlen($this->previous) > 0) || (strlen($this->next) > 0) ) { + + $data = chr(strlen($this->previous)) . $this->previous . + chr(strlen($this->next)) . $this->next; + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/TKEY.php b/bundled-libs/Net/DNS2/RR/TKEY.php new file mode 100644 index 00000000..31c08cd9 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/TKEY.php @@ -0,0 +1,307 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * TKEY Resource Record - RFC 2930 section 2 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / ALGORITHM / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | INCEPTION | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | EXPIRATION | + * | | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | MODE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ERROR | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | KEY SIZE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / KEY DATA / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | OTHER SIZE | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / OTHER DATA / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_TKEY extends Net_DNS2_RR +{ + public $algorithm; + public $inception; + public $expiration; + public $mode; + public $error; + public $key_size; + public $key_data; + public $other_size; + public $other_data; + + /* + * TSIG Modes + */ + const TSIG_MODE_RES = 0; + const TSIG_MODE_SERV_ASSIGN = 1; + const TSIG_MODE_DH = 2; + const TSIG_MODE_GSS_API = 3; + const TSIG_MODE_RESV_ASSIGN = 4; + const TSIG_MODE_KEY_DELE = 5; + + /* + * map the mod id's to names so we can validate + */ + public $tsgi_mode_id_to_name = array( + + self::TSIG_MODE_RES => 'Reserved', + self::TSIG_MODE_SERV_ASSIGN => 'Server Assignment', + self::TSIG_MODE_DH => 'Diffie-Hellman', + self::TSIG_MODE_GSS_API => 'GSS-API', + self::TSIG_MODE_RESV_ASSIGN => 'Resolver Assignment', + self::TSIG_MODE_KEY_DELE => 'Key Deletion' + ); + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $out = $this->cleanString($this->algorithm) . '. ' . $this->mode; + if ($this->key_size > 0) { + + $out .= ' ' . trim($this->key_data, '.') . '.'; + } else { + + $out .= ' .'; + } + + return $out; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + // + // data passed in is assumed: <algorithm> <mode> <key> + // + $this->algorithm = $this->cleanString(array_shift($rdata)); + $this->mode = array_shift($rdata); + $this->key_data = trim(array_shift($rdata), '.'); + + // + // the rest of the data is set manually + // + $this->inception = time(); + $this->expiration = time() + 86400; // 1 day + $this->error = 0; + $this->key_size = strlen($this->key_data); + $this->other_size = 0; + $this->other_data = ''; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // expand the algorithm + // + $offset = $packet->offset; + $this->algorithm = Net_DNS2_Packet::expand($packet, $offset); + + // + // unpack inception, expiration, mode, error and key size + // + $x = unpack( + '@' . $offset . '/Ninception/Nexpiration/nmode/nerror/nkey_size', + $packet->rdata + ); + + $this->inception = Net_DNS2::expandUint32($x['inception']); + $this->expiration = Net_DNS2::expandUint32($x['expiration']); + $this->mode = $x['mode']; + $this->error = $x['error']; + $this->key_size = $x['key_size']; + + $offset += 14; + + // + // if key_size > 0, then copy out the key + // + if ($this->key_size > 0) { + + $this->key_data = substr($packet->rdata, $offset, $this->key_size); + $offset += $this->key_size; + } + + // + // unpack the other length + // + $x = unpack('@' . $offset . '/nother_size', $packet->rdata); + + $this->other_size = $x['other_size']; + $offset += 2; + + // + // if other_size > 0, then copy out the data + // + if ($this->other_size > 0) { + + $this->other_data = substr( + $packet->rdata, $offset, $this->other_size + ); + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->algorithm) > 0) { + + // + // make sure the size values are correct + // + $this->key_size = strlen($this->key_data); + $this->other_size = strlen($this->other_data); + + // + // add the algorithm without compression + // + $data = Net_DNS2_Packet::pack($this->algorithm); + + // + // pack in the inception, expiration, mode, error and key size + // + $data .= pack( + 'NNnnn', $this->inception, $this->expiration, + $this->mode, 0, $this->key_size + ); + + // + // if the key_size > 0, then add the key + // + if ($this->key_size > 0) { + + $data .= $this->key_data; + } + + // + // pack in the other size + // + $data .= pack('n', $this->other_size); + if ($this->other_size > 0) { + + $data .= $this->other_data; + } + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/TLSA.php b/bundled-libs/Net/DNS2/RR/TLSA.php new file mode 100644 index 00000000..d3ed74dc --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/TLSA.php @@ -0,0 +1,194 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2012, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2012 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.2.5 + * + */ + +/** + * TLSA Resource Record - RFC 6698 + * + * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | Cert. Usage | Selector | Matching Type | / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ / + * / / + * / Certificate Association Data / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_TLSA extends Net_DNS2_RR +{ + /* + * The Certificate Usage Field + */ + public $cert_usage; + + /* + * The Selector Field + */ + public $selector; + + /* + * The Matching Type Field + */ + public $matching_type; + + /* + * The Certificate Association Data Field + */ + public $certificate; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->cert_usage . ' ' . $this->selector . ' ' . + $this->matching_type . ' ' . base64_encode($this->certificate); + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->cert_usage = array_shift($rdata); + $this->selector = array_shift($rdata); + $this->matching_type = array_shift($rdata); + $this->certificate = base64_decode(implode('', $rdata)); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the format, keytag and algorithm + // + $x = unpack('Cusage/Cselector/Ctype', $this->rdata); + + $this->cert_usage = $x['usage']; + $this->selector = $x['selector']; + $this->matching_type = $x['type']; + + // + // copy the certificate + // + $this->certificate = substr($this->rdata, 3, $this->rdlength - 3); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->certificate) > 0) { + + $data = pack( + 'CCC', $this->cert_usage, $this->selector, $this->matching_type + ) . $this->certificate; + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/TSIG.php b/bundled-libs/Net/DNS2/RR/TSIG.php new file mode 100644 index 00000000..9366da86 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/TSIG.php @@ -0,0 +1,504 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * TSIG Resource Record - RFC 2845 + * + * 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * / algorithm / + * / / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | time signed | + * | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | | fudge | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | mac size | / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ / + * / mac / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | original id | error | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | other length | / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ / + * / other data / + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_TSIG extends Net_DNS2_RR +{ + /* + * TSIG Algorithm Identifiers + */ + const HMAC_MD5 = 'hmac-md5.sig-alg.reg.int'; // RFC 2845, required + const GSS_TSIG = 'gss-tsig'; // unsupported, optional + const HMAC_SHA1 = 'hmac-sha1'; // RFC 4635, required + const HMAC_SHA224 = 'hmac-sha224'; // RFC 4635, optional + const HMAC_SHA256 = 'hmac-sha256'; // RFC 4635, required + const HMAC_SHA384 = 'hmac-sha384'; // RFC 4635, optional + const HMAC_SHA512 = 'hmac-sha512'; // RFC 4635, optional + + /* + * the map of hash values to names + */ + public static $hash_algorithms = array( + + self::HMAC_MD5 => 'md5', + self::HMAC_SHA1 => 'sha1', + self::HMAC_SHA224 => 'sha224', + self::HMAC_SHA256 => 'sha256', + self::HMAC_SHA384 => 'sha384', + self::HMAC_SHA512 => 'sha512' + ); + + /* + * algorithm used; only supports HMAC-MD5 + */ + public $algorithm; + + /* + * The time it was signed + */ + public $time_signed; + + /* + * fudge- allowed offset from the time signed + */ + public $fudge; + + /* + * size of the digest + */ + public $mac_size; + + /* + * the digest data + */ + public $mac; + + /* + * the original id of the request + */ + public $original_id; + + /* + * additional error code + */ + public $error; + + /* + * length of the "other" data, should only ever be 0 when there is + * no error, or 6 when there is the error RCODE_BADTIME + */ + public $other_length; + + /* + * the other data; should only ever be a timestamp when there is the + * error RCODE_BADTIME + */ + public $other_data; + + /* + * the key to use for signing - passed in, not included in the rdata + */ + public $key; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $out = $this->cleanString($this->algorithm) . '. ' . + $this->time_signed . ' ' . + $this->fudge . ' ' . $this->mac_size . ' ' . + base64_encode($this->mac) . ' ' . $this->original_id . ' ' . + $this->error . ' '. $this->other_length; + + if ($this->other_length > 0) { + + $out .= ' ' . $this->other_data; + } + + return $out; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + // + // the only value passed in is the key- + // + // this assumes it's passed in base64 encoded. + // + $this->key = preg_replace('/\s+/', '', array_shift($rdata)); + + // + // the rest of the data is set to default + // + $this->algorithm = self::HMAC_MD5; + $this->time_signed = time(); + $this->fudge = 300; + $this->mac_size = 0; + $this->mac = ''; + $this->original_id = 0; + $this->error = 0; + $this->other_length = 0; + $this->other_data = ''; + + // + // per RFC 2845 section 2.3 + // + $this->class = 'ANY'; + $this->ttl = 0; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // expand the algorithm + // + $newoffset = $packet->offset; + $this->algorithm = Net_DNS2_Packet::expand($packet, $newoffset); + $offset = $newoffset - $packet->offset; + + // + // unpack time, fudge and mac_size + // + $x = unpack( + '@' . $offset . '/ntime_high/Ntime_low/nfudge/nmac_size', + $this->rdata + ); + + $this->time_signed = Net_DNS2::expandUint32($x['time_low']); + $this->fudge = $x['fudge']; + $this->mac_size = $x['mac_size']; + + $offset += 10; + + // + // copy out the mac + // + if ($this->mac_size > 0) { + + $this->mac = substr($this->rdata, $offset, $this->mac_size); + $offset += $this->mac_size; + } + + // + // unpack the original id, error, and other_length values + // + $x = unpack( + '@' . $offset . '/noriginal_id/nerror/nother_length', + $this->rdata + ); + + $this->original_id = $x['original_id']; + $this->error = $x['error']; + $this->other_length = $x['other_length']; + + // + // the only time there is actually any "other data", is when there's + // a BADTIME error code. + // + // The other length should be 6, and the other data field includes the + // servers current time - per RFC 2845 section 4.5.2 + // + if ($this->error == Net_DNS2_Lookups::RCODE_BADTIME) { + + if ($this->other_length != 6) { + + return false; + } + + // + // other data is a 48bit timestamp + // + $x = unpack( + 'nhigh/nlow', + substr($this->rdata, $offset + 6, $this->other_length) + ); + $this->other_data = $x['low']; + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->key) > 0) { + + // + // create a new packet for the signature- + // + $new_packet = new Net_DNS2_Packet_Request('example.com', 'SOA', 'IN'); + + // + // copy the packet data over + // + $new_packet->copy($packet); + + // + // remove the TSIG object from the additional list + // + array_pop($new_packet->additional); + $new_packet->header->arcount = count($new_packet->additional); + + // + // copy out the data + // + $sig_data = $new_packet->get(); + + // + // add the name without compressing + // + $sig_data .= Net_DNS2_Packet::pack($this->name); + + // + // add the class and TTL + // + $sig_data .= pack( + 'nN', Net_DNS2_Lookups::$classes_by_name[$this->class], $this->ttl + ); + + // + // add the algorithm name without compression + // + $sig_data .= Net_DNS2_Packet::pack(strtolower($this->algorithm)); + + // + // add the rest of the values + // + $sig_data .= pack( + 'nNnnn', 0, $this->time_signed, $this->fudge, + $this->error, $this->other_length + ); + if ($this->other_length > 0) { + + $sig_data .= pack('nN', 0, $this->other_data); + } + + // + // sign the data + // + $this->mac = $this->_signHMAC( + $sig_data, base64_decode($this->key), $this->algorithm + ); + $this->mac_size = strlen($this->mac); + + // + // compress the algorithm + // + $data = Net_DNS2_Packet::pack(strtolower($this->algorithm)); + + // + // pack the time, fudge and mac size + // + $data .= pack( + 'nNnn', 0, $this->time_signed, $this->fudge, $this->mac_size + ); + $data .= $this->mac; + + // + // check the error and other_length + // + if ($this->error == Net_DNS2_Lookups::RCODE_BADTIME) { + + $this->other_length = strlen($this->other_data); + if ($this->other_length != 6) { + + return null; + } + } else { + + $this->other_length = 0; + $this->other_data = ''; + } + + // + // pack the id, error and other_length + // + $data .= pack( + 'nnn', $packet->header->id, $this->error, $this->other_length + ); + if ($this->other_length > 0) { + + $data .= pack('nN', 0, $this->other_data); + } + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } + + /** + * signs the given data with the given key, and returns the result + * + * @param string $data the data to sign + * @param string $key key to use for signing + * @param string $algorithm the algorithm to use; defaults to MD5 + * + * @return string the signed digest + * @throws Net_DNS2_Exception + * @access private + * + */ + private function _signHMAC($data, $key = null, $algorithm = self::HMAC_MD5) + { + // + // use the hash extension; this is included by default in >= 5.1.2 which + // is our dependent version anyway- so it's easy to switch to it. + // + if (extension_loaded('hash')) { + + if (!isset(self::$hash_algorithms[$algorithm])) { + + throw new Net_DNS2_Exception( + 'invalid or unsupported algorithm', + Net_DNS2_Lookups::E_PARSE_ERROR + ); + } + + return hash_hmac(self::$hash_algorithms[$algorithm], $data, $key, true); + } + + // + // if the hash extension isn't loaded, and they selected something other + // than MD5, throw an exception + // + if ($algorithm != self::HMAC_MD5) { + + throw new Net_DNS2_Exception( + 'only HMAC-MD5 supported. please install the php-extension ' . + '"hash" in order to use the sha-family', + Net_DNS2_Lookups::E_PARSE_ERROR + ); + } + + // + // otherwise, do it ourselves + // + if (is_null($key)) { + + return pack('H*', md5($data)); + } + + $key = str_pad($key, 64, chr(0x00)); + if (strlen($key) > 64) { + + $key = pack('H*', md5($key)); + } + + $k_ipad = $key ^ str_repeat(chr(0x36), 64); + $k_opad = $key ^ str_repeat(chr(0x5c), 64); + + return $this->_signHMAC( + $k_opad . pack('H*', md5($k_ipad . $data)), null, $algorithm + ); + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/TXT.php b/bundled-libs/Net/DNS2/RR/TXT.php new file mode 100644 index 00000000..bd106c03 --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/TXT.php @@ -0,0 +1,177 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * TXT Resource Record - RFC1035 section 3.3.14 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / TXT-DATA / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_TXT extends Net_DNS2_RR +{ + /* + * an array of the text strings + */ + public $text = array(); + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + if (count($this->text) == 0) { + return '""'; + } + + $data = ''; + + foreach ($this->text as $t) { + + $data .= $this->formatString($t) . ' '; + } + + return trim($data); + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $data = $this->buildString($rdata); + if (count($data) > 0) { + + $this->text = $data; + } + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $length = $packet->offset + $this->rdlength; + $offset = $packet->offset; + + while ($length > $offset) { + + $this->text[] = Net_DNS2_Packet::label($packet, $offset); + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + $data = null; + + foreach ($this->text as $t) { + + $data .= chr(strlen($t)) . $t; + } + + $packet->offset += strlen($data); + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/URI.php b/bundled-libs/Net/DNS2/RR/URI.php new file mode 100644 index 00000000..7c21ec9a --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/URI.php @@ -0,0 +1,183 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2011, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2011 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.2.0 + * + */ + +/** + * URI Resource Record - http://tools.ietf.org/html/draft-faltstrom-uri-06 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | PRIORITY | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | WEIGHT | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / TARGET / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_URI extends Net_DNS2_RR +{ + /* + * The priority of this target host. + */ + public $priority; + + /* + * a relative weight for entries with the same priority + */ + public $weight; + + /* + * The domain name of the target host + */ + public $target; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + // + // presentation format has double quotes (") around the target. + // + return $this->priority . ' ' . $this->weight . ' "' . + $this->cleanString($this->target) . '"'; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->priority = $rdata[0]; + $this->weight = $rdata[1]; + + // + // make sure to trim the lead/trailing double quote if it's there. + // + $this->target = trim($this->cleanString($rdata[2]), '"'); + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // unpack the priority and weight + // + $x = unpack('npriority/nweight', $this->rdata); + + $this->priority = $x['priority']; + $this->weight = $x['weight']; + + $offset = $packet->offset + 4; + $this->target = Net_DNS2_Packet::expand($packet, $offset); + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->target) > 0) { + + $data = pack('nn', $this->priority, $this->weight); + $packet->offset += 4; + + $data .= $packet->compress(trim($this->target, '"'), $packet->offset); + + return $data; + } + + return null; + } +} + +?> diff --git a/bundled-libs/Net/DNS2/RR/WKS.php b/bundled-libs/Net/DNS2/RR/WKS.php new file mode 100644 index 00000000..a954368a --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/WKS.php @@ -0,0 +1,235 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 1.0.1 + * + */ + +/** + * WKS Resource Record - RFC1035 section 3.4.2 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | ADDRESS | + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * | PROTOCOL | | + * +--+--+--+--+--+--+--+--+ | + * | | + * / <BIT MAP> / + * / / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_WKS extends Net_DNS2_RR +{ + /* + * The IP address of the service + */ + public $address; + + /* + * The protocol of the service + */ + public $protocol; + + /* + * bitmap + */ + public $bitmap = array(); + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + $data = $this->address . ' ' . $this->protocol; + + foreach ($this->bitmap as $port) { + $data .= ' ' . $port; + } + + return $data; + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $this->address = strtolower(trim(array_shift($rdata), '.')); + $this->protocol = array_shift($rdata); + $this->bitmap = $rdata; + + return true; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + // + // get the address and protocol value + // + $x = unpack('Naddress/Cprotocol', $this->rdata); + + $this->address = long2ip($x['address']); + $this->protocol = $x['protocol']; + + // + // unpack the port list bitmap + // + $port = 0; + foreach (unpack('@5/C*', $this->rdata) as $set) { + + $s = sprintf('%08b', $set); + + for ($i=0; $i<8; $i++, $port++) { + if ($s[$i] == '1') { + $this->bitmap[] = $port; + } + } + } + + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->address) > 0) { + + $data = pack('NC', ip2long($this->address), $this->protocol); + + $ports = array(); + + $n = 0; + foreach ($this->bitmap as $port) { + $ports[$port] = 1; + + if ($port > $n) { + $n = $port; + } + } + for ($i=0; $i<ceil($n/8)*8; $i++) { + if (!isset($ports[$i])) { + $ports[$i] = 0; + } + } + + ksort($ports); + + $string = ''; + $n = 0; + + foreach ($ports as $s) { + + $string .= $s; + $n++; + + if ($n == 8) { + + $data .= chr(bindec($string)); + $string = ''; + $n = 0; + } + } + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/RR/X25.php b/bundled-libs/Net/DNS2/RR/X25.php new file mode 100644 index 00000000..4a239e2c --- /dev/null +++ b/bundled-libs/Net/DNS2/RR/X25.php @@ -0,0 +1,160 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * X25 Resource Record - RFC1183 section 3.1 + * + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * / PSDN-address / + * +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_RR + * + */ +class Net_DNS2_RR_X25 extends Net_DNS2_RR +{ + /* + * The PSDN address + */ + public $psdnaddress; + + /** + * method to return the rdata portion of the packet as a string + * + * @return string + * @access protected + * + */ + protected function rrToString() + { + return $this->formatString($this->psdnaddress); + } + + /** + * parses the rdata portion from a standard DNS config line + * + * @param array $rdata a string split line of values for the rdata + * + * @return boolean + * @access protected + * + */ + protected function rrFromString(array $rdata) + { + $data = $this->buildString($rdata); + if (count($data) == 1) { + + $this->psdnaddress = $data[0]; + return true; + } + + return false; + } + + /** + * parses the rdata of the Net_DNS2_Packet object + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from + * + * @return boolean + * @access protected + * + */ + protected function rrSet(Net_DNS2_Packet &$packet) + { + if ($this->rdlength > 0) { + + $this->psdnaddress = Net_DNS2_Packet::label($packet, $packet->offset); + return true; + } + + return false; + } + + /** + * returns the rdata portion of the DNS packet + * + * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet use for + * compressed names + * + * @return mixed either returns a binary packed + * string or null on failure + * @access protected + * + */ + protected function rrGet(Net_DNS2_Packet &$packet) + { + if (strlen($this->psdnaddress) > 0) { + + $data = chr(strlen($this->psdnaddress)) . $this->psdnaddress; + + $packet->offset += strlen($data); + + return $data; + } + + return null; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Resolver.php b/bundled-libs/Net/DNS2/Resolver.php new file mode 100644 index 00000000..9c75ee49 --- /dev/null +++ b/bundled-libs/Net/DNS2/Resolver.php @@ -0,0 +1,332 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * This is the main resolver class, providing DNS query functions. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2 + * + */ +class Net_DNS2_Resolver extends Net_DNS2 +{ + /** + * Constructor - creates a new Net_DNS2_Resolver object + * + * @param mixed $options either an array with options or null + * + * @access public + * + */ + public function __construct(array $options = null) + { + parent::__construct($options); + } + + /** + * does a basic DNS lookup query + * + * @param string $name the DNS name to loookup + * @param string $type the name of the RR type to lookup + * @param string $class the name of the RR class to lookup + * + * @return Net_DNS2_RR object + * @throws Net_DNS2_Exception + * @access public + * + */ + public function query($name, $type = 'A', $class = 'IN') + { + // + // make sure we have some name servers set + // + $this->checkServers(Net_DNS2::RESOLV_CONF); + + // + // we dont' support incremental zone tranfers; so if it's requested, a full + // zone transfer can be returned + // + if ($type == 'IXFR') { + + $type = 'AXFR'; + } + + // + // if the name *looks* too short, then append the domain from the config + // + if ( (strpos($name, '.') === false) && ($type != 'PTR') ) { + + $name .= '.' . strtolower($this->domain); + } + + // + // create a new packet based on the input + // + $packet = new Net_DNS2_Packet_Request($name, $type, $class); + + // + // check for an authentication method; either TSIG or SIG + // + if ( ($this->auth_signature instanceof Net_DNS2_RR_TSIG) + || ($this->auth_signature instanceof Net_DNS2_RR_SIG) + ) { + $packet->additional[] = $this->auth_signature; + $packet->header->arcount = count($packet->additional); + } + + // + // check for the DNSSEC flag, and if it's true, then add an OPT + // RR to the additional section, and set the DO flag to 1. + // + if ($this->dnssec == true) { + + // + // create a new OPT RR + // + $opt = new Net_DNS2_RR_OPT(); + + // + // set the DO flag, and the other values + // + $opt->do = 1; + $opt->class = $this->dnssec_payload_size; + + // + // add the RR to the additional section. + // + $packet->additional[] = $opt; + $packet->header->arcount = count($packet->additional); + } + + // + // set the DNSSEC AD or CD bits + // + if ($this->dnssec_ad_flag == true) { + + $packet->header->ad = 1; + } + if ($this->dnssec_cd_flag == true) { + + $packet->header->cd = 1; + } + + // + // if caching is turned on, then check then hash the question, and + // do a cache lookup. + // + // don't use the cache for zone transfers + // + $packet_hash = ''; + + if ( ($this->use_cache == true) && ($this->cacheable($type) == true) ) { + + // + // open the cache + // + $this->cache->open( + $this->cache_file, $this->cache_size, $this->cache_serializer + ); + + // + // build the key and check for it in the cache. + // + $packet_hash = md5( + $packet->question[0]->qname . '|' . $packet->question[0]->qtype + ); + + if ($this->cache->has($packet_hash)) { + + return $this->cache->get($packet_hash); + } + } + + // + // set the RD (recursion desired) bit to 1 / 0 depending on the config + // setting. + // + if ($this->recurse == false) { + $packet->header->rd = 0; + } else { + $packet->header->rd = 1; + } + + // + // send the packet and get back the response + // + // *always* use TCP for zone transfers- does this cause any problems? + // + $response = $this->sendPacket( + $packet, ($type == 'AXFR') ? true : $this->use_tcp + ); + + // + // if strict mode is enabled, then make sure that the name that was + // looked up is *actually* in the response object. + // + // only do this is strict_query_mode is turned on, AND we've received + // some answers; no point doing any else if there were no answers. + // + if ( ($this->strict_query_mode == true) + && ($response->header->ancount > 0) + ) { + + $found = false; + + // + // look for the requested name/type/class + // + foreach ($response->answer as $index => $object) { + + if ( (strcasecmp(trim($object->name, '.'), trim($packet->question[0]->qname, '.')) == 0) + && ($object->type == $packet->question[0]->qtype) + && ($object->class == $packet->question[0]->qclass) + ) { + $found = true; + break; + } + } + + // + // if it's not found, then unset the answer section; it's not correct to + // throw an exception here; if the hostname didn't exist, then + // sendPacket() would have already thrown an NXDOMAIN error- so the host + // *exists*, but just not the request type/class. + // + // the correct response in this case, is an empty answer section; the + // authority section may still have usual information, like a SOA record. + // + if ($found == false) { + + $response->answer = array(); + $response->header->ancount = 0; + } + } + + // + // cache the response object + // + if ( ($this->use_cache == true) && ($this->cacheable($type) == true) ) { + + $this->cache->put($packet_hash, $response); + } + + return $response; + } + + /** + * does an inverse query for the given RR; most DNS servers do not implement + * inverse queries, but they should be able to return "not implemented" + * + * @param Net_DNS2_RR $rr the RR object to lookup + * + * @return Net_DNS2_RR object + * @throws Net_DNS2_Exception + * @access public + * + */ + public function iquery(Net_DNS2_RR $rr) + { + // + // make sure we have some name servers set + // + $this->checkServers(Net_DNS2::RESOLV_CONF); + + // + // create an empty packet + // + $packet = new Net_DNS2_Packet_Request($rr->name, 'A', 'IN'); + + // + // unset the question + // + $packet->question = array(); + $packet->header->qdcount = 0; + + // + // set the opcode to IQUERY + // + $packet->header->opcode = Net_DNS2_Lookups::OPCODE_IQUERY; + + // + // add the given RR as the answer + // + $packet->answer[] = $rr; + $packet->header->ancount = 1; + + // + // check for an authentication method; either TSIG or SIG + // + if ( ($this->auth_signature instanceof Net_DNS2_RR_TSIG) + || ($this->auth_signature instanceof Net_DNS2_RR_SIG) + ) { + $packet->additional[] = $this->auth_signature; + $packet->header->arcount = count($packet->additional); + } + + // + // send the packet and get back the response + // + return $this->sendPacket($packet, $this->use_tcp); + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Socket.php b/bundled-libs/Net/DNS2/Socket.php new file mode 100644 index 00000000..0e4255c8 --- /dev/null +++ b/bundled-libs/Net/DNS2/Socket.php @@ -0,0 +1,190 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/* + * check to see if the socket defines exist; if they don't, then define them + */ +if (defined('SOCK_STREAM') == false) { + define('SOCK_STREAM', 1); +} +if (defined('SOCK_DGRAM') == false) { + define('SOCK_DGRAM', 2); +} + +/** + * This is the abstract base class for the two sockets classes; this simply + * provides the class definition for the two sockets classes. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Socket_Sockets, Net_DNS2_Socket_Streams + * + */ +abstract class Net_DNS2_Socket +{ + protected $sock; + protected $type; + protected $host; + protected $port; + protected $timeout; + + protected $local_host; + protected $local_port; + + public $last_error; + + /* + * type of sockets + */ + const SOCK_STREAM = SOCK_STREAM; + const SOCK_DGRAM = SOCK_DGRAM; + + /** + * constructor - set the port details + * + * @param integer $type the socket type + * @param string $host the IP address of the DNS server to connect to + * @param integer $port the port of the DNS server to connect to + * @param integer $timeout the timeout value to use for socket functions + * + * @access public + * + */ + public function __construct($type, $host, $port, $timeout) + { + $this->type = $type; + $this->host = $host; + $this->port = $port; + $this->timeout = $timeout; + } + + /** + * destructor + * + * @access public + */ + public function __destruct() + { + $this->close(); + } + + /** + * sets the local address/port for the socket to bind to + * + * @param string $address the local IP address to bind to + * @param mixed $port the local port to bind to, or 0 to let the socket + * function select a port + * + * @return boolean + * @access public + * + */ + public function bindAddress($address, $port = 0) + { + $this->local_host = $address; + $this->local_port = $port; + + return true; + } + + /** + * opens a socket connection to the DNS server + * + * @return boolean + * @access public + * + */ + abstract public function open(); + + /** + * closes a socket connection to the DNS server + * + * @return boolean + * @access public + * + */ + abstract public function close(); + + /** + * writes the given string to the DNS server socket + * + * @param string $data a binary packed DNS packet + * + * @return boolean + * @access public + * + */ + abstract public function write($data); + + /** + * reads a response from a DNS server + * + * @param integer &$size the size of the DNS packet read is passed back + * @param integer $max_size the max data size returned. + * + * @return mixed returns the data on success and false on error + * @access public + * + */ + abstract public function read(&$size, $max_size); +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Socket/Sockets.php b/bundled-libs/Net/DNS2/Socket/Sockets.php new file mode 100644 index 00000000..707b6532 --- /dev/null +++ b/bundled-libs/Net/DNS2/Socket/Sockets.php @@ -0,0 +1,364 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * Socket handling class using the PHP sockets extension + * + * The sockets extension is faster than the stream functions in PHP, but it's + * not standard. So if the extension is loaded, then this class is used, if + * it's not, then the Net_DNS2_Socket_Streams class is used. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Socket + * + */ +class Net_DNS2_Socket_Sockets extends Net_DNS2_Socket +{ + /** + * opens a socket connection to the DNS server + * + * @return boolean + * @access public + * + */ + public function open() + { + // + // create the socket + // + if (Net_DNS2::isIPv4($this->host) == true) { + + $this->sock = @socket_create( + AF_INET, $this->type, + ($this->type == Net_DNS2_Socket::SOCK_STREAM) ? SOL_TCP : SOL_UDP + ); + + } else if (Net_DNS2::isIPv6($this->host) == true) { + + $this->sock = @socket_create( + AF_INET6, $this->type, + ($this->type == Net_DNS2_Socket::SOCK_STREAM) ? SOL_TCP : SOL_UDP + ); + + } else { + + $this->last_error = 'invalid address type: ' . $this->host; + return false; + } + + if ($this->sock === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + } + + @socket_set_option($this->sock, SOL_SOCKET, SO_REUSEADDR, 1); + + // + // bind to a local IP/port if it's set + // + if (strlen($this->local_host) > 0) { + + $result = @socket_bind( + $this->sock, $this->local_host, + ($this->local_port > 0) ? $this->local_port : null + ); + if ($result === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + } + } + + // + // mark the socket as non-blocking + // + if (@socket_set_nonblock($this->sock) === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + } + + // + // connect to the socket; don't check for status here, we'll check it on the + // socket_select() call so we can handle timeouts properly + // + @socket_connect($this->sock, $this->host, $this->port); + + $read = null; + $write = array($this->sock); + $except = null; + + // + // select on write to check if the call to connect worked + // + $result = @socket_select($read, $write, $except, $this->timeout); + if ($result === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + + } else if ($result == 0) { + + $this->last_error = 'timeout on write select for connect()'; + return false; + } + + return true; + } + + /** + * closes a socket connection to the DNS server + * + * @return boolean + * @access public + * + */ + public function close() + { + if (is_resource($this->sock) === true) { + + @socket_close($this->sock); + } + return true; + } + + /** + * writes the given string to the DNS server socket + * + * @param string $data a binary packed DNS packet + * + * @return boolean + * @access public + * + */ + public function write($data) + { + $length = strlen($data); + if ($length == 0) { + + $this->last_error = 'empty data on write()'; + return false; + } + + $read = null; + $write = array($this->sock); + $except = null; + + // + // select on write + // + $result = @socket_select($read, $write, $except, $this->timeout); + if ($result === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + + } else if ($result == 0) { + + $this->last_error = 'timeout on write select()'; + return false; + } + + // + // if it's a TCP socket, then we need to packet and send the length of the + // data as the first 16bit of data. + // + if ($this->type == Net_DNS2_Socket::SOCK_STREAM) { + + $s = chr($length >> 8) . chr($length); + + if (@socket_write($this->sock, $s) === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + } + } + + // + // write the data to the socket + // + $size = @socket_write($this->sock, $data); + if ( ($size === false) || ($size != $length) ) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + } + + return true; + } + + /** + * reads a response from a DNS server + * + * @param integer &$size the size of the DNS packet read is passed back + * + * @return mixed returns the data on success and false on error + * @access public + * + */ + public function read(&$size, $max_size) + { + $read = array($this->sock); + $write = null; + $except = null; + + // + // make sure our socket is non-blocking + // + if (@socket_set_nonblock($this->sock) === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + } + + // + // select on read + // + $result = @socket_select($read, $write, $except, $this->timeout); + if ($result === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + + } else if ($result == 0) { + + $this->last_error = 'timeout on read select()'; + return false; + } + + $data = ''; + $length = $max_size; + + // + // if it's a TCP socket, then the first two bytes is the length of the DNS + // packet- we need to read that off first, then use that value for the + // packet read. + // + if ($this->type == Net_DNS2_Socket::SOCK_STREAM) { + + if (($size = @socket_recv($this->sock, $data, 2, 0)) === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + } + + $length = ord($data[0]) << 8 | ord($data[1]); + if ($length < Net_DNS2_Lookups::DNS_HEADER_SIZE) { + + return false; + } + } + + // + // at this point, we know that there is data on the socket to be read, + // because we've already extracted the length from the first two bytes. + // + // so the easiest thing to do, is just turn off socket blocking, and + // wait for the data. + // + if (@socket_set_block($this->sock) === false) { + + $this->last_error = socket_strerror(socket_last_error()); + return false; + } + + // + // read the data from the socket + // + // loop while reading since some OS's (specifically Win < 2003) don't support + // MSG_WAITALL properly, so they may return with less data than is available. + // + // According to M$, XP and below don't support MSG_WAITALL at all; and there + // also seems to be some issue in 2003 and 2008 where the MSG_WAITALL is + // defined as 0, but if you actually pass 8 (which is the correct defined + // value), it works as it's supposed to- so in these cases, it's just the + // define that's incorrect- this is likely a PHP issue. + // + $data = ''; + $size = 0; + + while (1) { + + $chunk_size = @socket_recv($this->sock, $chunk, $length, MSG_WAITALL); + if ($chunk_size === false) { + + $size = $chunk_size; + $this->last_error = socket_strerror(socket_last_error()); + + return false; + } + + $data .= $chunk; + $size += $chunk_size; + + $length -= $chunk_size; + if ( ($length <= 0) || ($this->type == Net_DNS2_Socket::SOCK_DGRAM) ) { + break; + } + } + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Socket/Streams.php b/bundled-libs/Net/DNS2/Socket/Streams.php new file mode 100644 index 00000000..4cd11fd5 --- /dev/null +++ b/bundled-libs/Net/DNS2/Socket/Streams.php @@ -0,0 +1,389 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * Socket handling class using the PHP Streams + * + * The sockets extension is faster than the stream functions in PHP, but it's + * not standard. So if the extension is loaded, then the Net_DNS2_Socket_Sockets + * class it used, otherwise, this class it used. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2_Socket + * + */ +class Net_DNS2_Socket_Streams extends Net_DNS2_Socket +{ + private $_context; + + /** + * opens a socket connection to the DNS server + * + * @return boolean + * @access public + * + */ + public function open() + { + // + // create a list of options for the context + // + $opts = array('socket' => array()); + + // + // bind to a local IP/port if it's set + // + if (strlen($this->local_host) > 0) { + + $opts['socket']['bindto'] = $this->local_host; + if ($this->local_port > 0) { + + $opts['socket']['bindto'] .= ':' . $this->local_port; + } + } + + // + // create the context + // + $this->_context = @stream_context_create($opts); + + // + // create socket + // + $errno; + $errstr; + + switch($this->type) { + case Net_DNS2_Socket::SOCK_STREAM: + + if (Net_DNS2::isIPv4($this->host) == true) { + + $this->sock = @stream_socket_client( + 'tcp://' . $this->host . ':' . $this->port, + $errno, $errstr, $this->timeout, + STREAM_CLIENT_CONNECT, $this->_context + ); + } else if (Net_DNS2::isIPv6($this->host) == true) { + + $this->sock = @stream_socket_client( + 'tcp://[' . $this->host . ']:' . $this->port, + $errno, $errstr, $this->timeout, + STREAM_CLIENT_CONNECT, $this->_context + ); + } else { + + $this->last_error = 'invalid address type: ' . $this->host; + return false; + } + + break; + + case Net_DNS2_Socket::SOCK_DGRAM: + + if (Net_DNS2::isIPv4($this->host) == true) { + + $this->sock = @stream_socket_client( + 'udp://' . $this->host . ':' . $this->port, + $errno, $errstr, $this->timeout, + STREAM_CLIENT_CONNECT, $this->_context + ); + } else if (Net_DNS2::isIPv6($this->host) == true) { + + $this->sock = @stream_socket_client( + 'udp://[' . $this->host . ']:' . $this->port, + $errno, $errstr, $this->timeout, + STREAM_CLIENT_CONNECT, $this->_context + ); + } else { + + $this->last_error = 'invalid address type: ' . $this->host; + return false; + } + + break; + + default: + $this->last_error = 'Invalid socket type: ' . $this->type; + return false; + } + + if ($this->sock === false) { + + $this->last_error = $errstr; + return false; + } + + // + // set it to non-blocking and set the timeout + // + @stream_set_blocking($this->sock, 0); + @stream_set_timeout($this->sock, $this->timeout); + + return true; + } + + /** + * closes a socket connection to the DNS server + * + * @return boolean + * @access public + * + */ + public function close() + { + if (is_resource($this->sock) === true) { + + @fclose($this->sock); + } + return true; + } + + /** + * writes the given string to the DNS server socket + * + * @param string $data a binary packed DNS packet + * + * @return boolean + * @access public + * + */ + public function write($data) + { + $length = strlen($data); + if ($length == 0) { + + $this->last_error = 'empty data on write()'; + return false; + } + + $read = null; + $write = array($this->sock); + $except = null; + + // + // select on write + // + $result = stream_select($read, $write, $except, $this->timeout); + if ($result === false) { + + $this->last_error = 'failed on write select()'; + return false; + + } else if ($result == 0) { + + $this->last_error = 'timeout on write select()'; + return false; + } + + // + // if it's a TCP socket, then we need to packet and send the length of the + // data as the first 16bit of data. + // + if ($this->type == Net_DNS2_Socket::SOCK_STREAM) { + + $s = chr($length >> 8) . chr($length); + + if (@fwrite($this->sock, $s) === false) { + + $this->last_error = 'failed to fwrite() 16bit length'; + return false; + } + } + + // + // write the data to the socket + // + $size = @fwrite($this->sock, $data); + if ( ($size === false) || ($size != $length) ) { + + $this->last_error = 'failed to fwrite() packet'; + return false; + } + + return true; + } + + /** + * reads a response from a DNS server + * + * @param integer &$size the size of the DNS packet read is passed back + * + * @return mixed returns the data on success and false on error + * @access public + * + */ + public function read(&$size, $max_size) + { + $read = array($this->sock); + $write = null; + $except = null; + + // + // make sure our socket is non-blocking + // + @stream_set_blocking($this->sock, 0); + + // + // select on read + // + $result = stream_select($read, $write, $except, $this->timeout); + if ($result === false) { + + $this->last_error = 'error on read select()'; + return false; + + } else if ($result == 0) { + + $this->last_error = 'timeout on read select()'; + return false; + } + + $data = ''; + $length = $max_size; + + // + // if it's a TCP socket, then the first two bytes is the length of the DNS + // packet- we need to read that off first, then use that value for the + // packet read. + // + if ($this->type == Net_DNS2_Socket::SOCK_STREAM) { + + if (($data = fread($this->sock, 2)) === false) { + + $this->last_error = 'failed on fread() for data length'; + return false; + } + + $length = ord($data[0]) << 8 | ord($data[1]); + if ($length < Net_DNS2_Lookups::DNS_HEADER_SIZE) { + + return false; + } + } + + // + // at this point, we know that there is data on the socket to be read, + // because we've already extracted the length from the first two bytes. + // + // so the easiest thing to do, is just turn off socket blocking, and + // wait for the data. + // + @stream_set_blocking($this->sock, 1); + + // + // read the data from the socket + // + $data = ''; + + // + // the streams socket is weird for TCP sockets; it doesn't seem to always + // return all the data properly; but the looping code I added broke UDP + // packets- my fault- + // + // the sockets library works much better. + // + if ($this->type == Net_DNS2_Socket::SOCK_STREAM) { + + $chunk = ''; + $chunk_size = $length; + + // + // loop so we make sure we read all the data + // + while (1) { + + $chunk = fread($this->sock, $chunk_size); + if ($chunk === false) { + + $this->last_error = 'failed on fread() for data'; + return false; + } + + $data .= $chunk; + $chunk_size -= strlen($chunk); + + if (strlen($data) >= $length) { + break; + } + } + + } else { + + // + // if it's UDP, it's a single fixed-size frame, and the streams library + // doesn't seem to have a problem reading it. + // + $data = fread($this->sock, $length); + if ($length === false) { + + $this->last_error = 'failed on fread() for data'; + return false; + } + } + + $size = strlen($data); + + return $data; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNS2/Updater.php b/bundled-libs/Net/DNS2/Updater.php new file mode 100644 index 00000000..7d1b2cf0 --- /dev/null +++ b/bundled-libs/Net/DNS2/Updater.php @@ -0,0 +1,654 @@ +<?php +/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ + +/** + * DNS Library for handling lookups and updates. + * + * PHP Version 5 + * + * Copyright (c) 2010, Mike Pultz <mike@mikepultz.com>. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Mike Pultz nor the names of his contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRIC + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @copyright 2010 Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @version SVN: $Id$ + * @link http://pear.php.net/package/Net_DNS2 + * @since File available since Release 0.6.0 + * + */ + +/** + * The main dynamic DNS updater class. + * + * This class provices functions to handle all defined dynamic DNS update + * requests as defined by RFC 2136. + * + * This is separate from the Net_DNS2_Resolver class, as while the underlying + * protocol is the same, the functionality is completely different. + * + * Generally, query (recursive) lookups are done against caching server, while + * update requests are done against authoratative servers. + * + * @category Networking + * @package Net_DNS2 + * @author Mike Pultz <mike@mikepultz.com> + * @license http://www.opensource.org/licenses/bsd-license.php BSD License + * @link http://pear.php.net/package/Net_DNS2 + * @see Net_DNS2 + * + */ +class Net_DNS2_Updater extends Net_DNS2 +{ + /* + * a Net_DNS2_Packet_Request object used for the update request + */ + private $_packet; + + /** + * Constructor - builds a new Net_DNS2_Updater objected used for doing + * dynamic DNS updates + * + * @param string $zone the domain name to use for DNS updates + * @param mixed $options an array of config options or null + * + * @throws Net_DNS2_Exception + * @access public + * + */ + public function __construct($zone, array $options = null) + { + parent::__construct($options); + + // + // create the packet + // + $this->_packet = new Net_DNS2_Packet_Request( + strtolower(trim($zone, " \n\r\t.")), 'SOA', 'IN' + ); + + // + // make sure the opcode on the packet is set to UPDATE + // + $this->_packet->header->opcode = Net_DNS2_Lookups::OPCODE_UPDATE; + } + + /** + * checks that the given name matches the name for the zone we're updating + * + * @param string $name The name to be checked. + * + * @return boolean + * @throws Net_DNS2_Exception + * @access private + * + */ + private function _checkName($name) + { + if (!preg_match('/' . $this->_packet->question[0]->qname . '$/', $name)) { + + throw new Net_DNS2_Exception( + 'name provided (' . $name . ') does not match zone name (' . + $this->_packet->question[0]->qname . ')', + Net_DNS2_Lookups::E_PACKET_INVALID + ); + } + + return true; + } + + /** + * add a signature to the request for authentication + * + * @param string $keyname the key name to use for the TSIG RR + * @param string $signature the key to sign the request. + * + * @return boolean + * @access public + * @see Net_DNS2::signTSIG() + * @deprecated function deprecated in 1.1.0 + * + */ + public function signature($keyname, $signature) + { + return $this->signTSIG($keyname, $signature); + } + + /** + * 2.5.1 - Add To An RRset + * + * RRs are added to the Update Section whose NAME, TYPE, TTL, RDLENGTH + * and RDATA are those being added, and CLASS is the same as the zone + * class. Any duplicate RRs will be silently ignored by the primary + * master. + * + * @param Net_DNS2_RR $rr the Net_DNS2_RR object to be added to the zone + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function add(Net_DNS2_RR $rr) + { + $this->_checkName($rr->name); + + // + // add the RR to the "update" section + // + if (!in_array($rr, $this->_packet->authority)) { + $this->_packet->authority[] = $rr; + } + + return true; + } + + /** + * 2.5.4 - Delete An RR From An RRset + * + * RRs to be deleted are added to the Update Section. The NAME, TYPE, + * RDLENGTH and RDATA must match the RR being deleted. TTL must be + * specified as zero (0) and will otherwise be ignored by the primary + * master. CLASS must be specified as NONE to distinguish this from an + * RR addition. If no such RRs exist, then this Update RR will be + * silently ignored by the primary master. + * + * @param Net_DNS2_RR $rr the Net_DNS2_RR object to be deleted from the zone + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function delete(Net_DNS2_RR $rr) + { + $this->_checkName($rr->name); + + $rr->ttl = 0; + $rr->class = 'NONE'; + + // + // add the RR to the "update" section + // + if (!in_array($rr, $this->_packet->authority)) { + $this->_packet->authority[] = $rr; + } + + return true; + } + + /** + * 2.5.2 - Delete An RRset + * + * One RR is added to the Update Section whose NAME and TYPE are those + * of the RRset to be deleted. TTL must be specified as zero (0) and is + * otherwise not used by the primary master. CLASS must be specified as + * ANY. RDLENGTH must be zero (0) and RDATA must therefore be empty. + * If no such RRset exists, then this Update RR will be silently ignored + * by the primary master + * + * @param string $name the RR name to be removed from the zone + * @param string $type the RR type to be removed from the zone + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function deleteAny($name, $type) + { + $this->_checkName($name); + + $class = Net_DNS2_Lookups::$rr_types_id_to_class[ + Net_DNS2_Lookups::$rr_types_by_name[$type] + ]; + if (!isset($class)) { + + throw new Net_DNS2_Exception( + 'unknown or un-supported resource record type: ' . $type, + Net_DNS2_Lookups::E_RR_INVALID + ); + } + + $rr = new $class; + + $rr->name = $name; + $rr->ttl = 0; + $rr->class = 'ANY'; + $rr->rdlength = -1; + $rr->rdata = ''; + + // + // add the RR to the "update" section + // + if (!in_array($rr, $this->_packet->authority)) { + $this->_packet->authority[] = $rr; + } + + return true; + } + + /** + * 2.5.3 - Delete All RRsets From A Name + * + * One RR is added to the Update Section whose NAME is that of the name + * to be cleansed of RRsets. TYPE must be specified as ANY. TTL must + * be specified as zero (0) and is otherwise not used by the primary + * master. CLASS must be specified as ANY. RDLENGTH must be zero (0) + * and RDATA must therefore be empty. If no such RRsets exist, then + * this Update RR will be silently ignored by the primary master. + * + * @param string $name the RR name to be removed from the zone + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function deleteAll($name) + { + $this->_checkName($name); + + // + // the Net_DNS2_RR_ANY class is just an empty stub class used for these + // cases only + // + $rr = new Net_DNS2_RR_ANY; + + $rr->name = $name; + $rr->ttl = 0; + $rr->type = 'ANY'; + $rr->class = 'ANY'; + $rr->rdlength = -1; + $rr->rdata = ''; + + // + // add the RR to the "update" section + // + if (!in_array($rr, $this->_packet->authority)) { + $this->_packet->authority[] = $rr; + } + + return true; + } + + /** + * 2.4.1 - RRset Exists (Value Independent) + * + * At least one RR with a specified NAME and TYPE (in the zone and class + * specified in the Zone Section) must exist. + * + * For this prerequisite, a requestor adds to the section a single RR + * whose NAME and TYPE are equal to that of the zone RRset whose + * existence is required. RDLENGTH is zero and RDATA is therefore + * empty. CLASS must be specified as ANY to differentiate this + * condition from that of an actual RR whose RDLENGTH is naturally zero + * (0) (e.g., NULL). TTL is specified as zero (0). + * + * @param string $name the RR name for the prerequisite + * @param string $type the RR type for the prerequisite + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function checkExists($name, $type) + { + $this->_checkName($name); + + $class = Net_DNS2_Lookups::$rr_types_id_to_class[ + Net_DNS2_Lookups::$rr_types_by_name[$type] + ]; + if (!isset($class)) { + + throw new Net_DNS2_Exception( + 'unknown or un-supported resource record type: ' . $type, + Net_DNS2_Lookups::E_RR_INVALID + ); + } + + $rr = new $class; + + $rr->name = $name; + $rr->ttl = 0; + $rr->class = 'ANY'; + $rr->rdlength = -1; + $rr->rdata = ''; + + // + // add the RR to the "prerequisite" section + // + if (!in_array($rr, $this->_packet->answer)) { + $this->_packet->answer[] = $rr; + } + + return true; + } + + /** + * 2.4.2 - RRset Exists (Value Dependent) + * + * A set of RRs with a specified NAME and TYPE exists and has the same + * members with the same RDATAs as the RRset specified here in this + * section. While RRset ordering is undefined and therefore not + * significant to this comparison, the sets be identical in their + * extent. + * + * For this prerequisite, a requestor adds to the section an entire + * RRset whose preexistence is required. NAME and TYPE are that of the + * RRset being denoted. CLASS is that of the zone. TTL must be + * specified as zero (0) and is ignored when comparing RRsets for + * identity. + * + * @param Net_DNS2_RR $rr the RR object to be used as a prerequisite + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function checkValueExists(Net_DNS2_RR $rr) + { + $this->_checkName($rr->name); + + $rr->ttl = 0; + + // + // add the RR to the "prerequisite" section + // + if (!in_array($rr, $this->_packet->answer)) { + $this->_packet->answer[] = $rr; + } + + return true; + } + + /** + * 2.4.3 - RRset Does Not Exist + * + * No RRs with a specified NAME and TYPE (in the zone and class denoted + * by the Zone Section) can exist. + * + * For this prerequisite, a requestor adds to the section a single RR + * whose NAME and TYPE are equal to that of the RRset whose nonexistence + * is required. The RDLENGTH of this record is zero (0), and RDATA + * field is therefore empty. CLASS must be specified as NONE in order + * to distinguish this condition from a valid RR whose RDLENGTH is + * naturally zero (0) (for example, the NULL RR). TTL must be specified + * as zero (0). + * + * @param string $name the RR name for the prerequisite + * @param string $type the RR type for the prerequisite + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function checkNotExists($name, $type) + { + $this->_checkName($name); + + $class = Net_DNS2_Lookups::$rr_types_id_to_class[ + Net_DNS2_Lookups::$rr_types_by_name[$type] + ]; + if (!isset($class)) { + + throw new Net_DNS2_Exception( + 'unknown or un-supported resource record type: ' . $type, + Net_DNS2_Lookups::E_RR_INVALID + ); + } + + $rr = new $class; + + $rr->name = $name; + $rr->ttl = 0; + $rr->class = 'NONE'; + $rr->rdlength = -1; + $rr->rdata = ''; + + // + // add the RR to the "prerequisite" section + // + if (!in_array($rr, $this->_packet->answer)) { + $this->_packet->answer[] = $rr; + } + + return true; + } + + /** + * 2.4.4 - Name Is In Use + * + * Name is in use. At least one RR with a specified NAME (in the zone + * and class specified by the Zone Section) must exist. Note that this + * prerequisite is NOT satisfied by empty nonterminals. + * + * For this prerequisite, a requestor adds to the section a single RR + * whose NAME is equal to that of the name whose ownership of an RR is + * required. RDLENGTH is zero and RDATA is therefore empty. CLASS must + * be specified as ANY to differentiate this condition from that of an + * actual RR whose RDLENGTH is naturally zero (0) (e.g., NULL). TYPE + * must be specified as ANY to differentiate this case from that of an + * RRset existence test. TTL is specified as zero (0). + * + * @param string $name the RR name for the prerequisite + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function checkNameInUse($name) + { + $this->_checkName($name); + + // + // the Net_DNS2_RR_ANY class is just an empty stub class used for these + // cases only + // + $rr = new Net_DNS2_RR_ANY; + + $rr->name = $name; + $rr->ttl = 0; + $rr->type = 'ANY'; + $rr->class = 'ANY'; + $rr->rdlength = -1; + $rr->rdata = ''; + + // + // add the RR to the "prerequisite" section + // + if (!in_array($rr, $this->_packet->answer)) { + $this->_packet->answer[] = $rr; + } + + return true; + } + + /** + * 2.4.5 - Name Is Not In Use + * + * Name is not in use. No RR of any type is owned by a specified NAME. + * Note that this prerequisite IS satisfied by empty nonterminals. + * + * For this prerequisite, a requestor adds to the section a single RR + * whose NAME is equal to that of the name whose nonownership of any RRs + * is required. RDLENGTH is zero and RDATA is therefore empty. CLASS + * must be specified as NONE. TYPE must be specified as ANY. TTL must + * be specified as zero (0). + * + * @param string $name the RR name for the prerequisite + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function checkNameNotInUse($name) + { + $this->_checkName($name); + + // + // the Net_DNS2_RR_ANY class is just an empty stub class used for these + // cases only + // + $rr = new Net_DNS2_RR_ANY; + + $rr->name = $name; + $rr->ttl = 0; + $rr->type = 'ANY'; + $rr->class = 'NONE'; + $rr->rdlength = -1; + $rr->rdata = ''; + + // + // add the RR to the "prerequisite" section + // + if (!in_array($rr, $this->_packet->answer)) { + $this->_packet->answer[] = $rr; + } + + return true; + } + + /** + * returns the current internal packet object. + * + * @return Net_DNS2_Packet_Request + * @access public + # + */ + public function packet() + { + // + // take a copy + // + $p = $this->_packet; + + // + // check for an authentication method; either TSIG or SIG + // + if ( ($this->auth_signature instanceof Net_DNS2_RR_TSIG) + || ($this->auth_signature instanceof Net_DNS2_RR_SIG) + ) { + $p->additional[] = $this->auth_signature; + } + + // + // update the counts + // + $p->header->qdcount = count($p->question); + $p->header->ancount = count($p->answer); + $p->header->nscount = count($p->authority); + $p->header->arcount = count($p->additional); + + return $p; + } + + /** + * executes the update request with the object informaton + * + * @param Net_DNS2_Packet_Response &$response ref to the response object + * + * @return boolean + * @throws Net_DNS2_Exception + * @access public + * + */ + public function update(&$response = null) + { + // + // make sure we have some name servers set + // + $this->checkServers(Net_DNS2::RESOLV_CONF); + + // + // check for an authentication method; either TSIG or SIG + // + if ( ($this->auth_signature instanceof Net_DNS2_RR_TSIG) + || ($this->auth_signature instanceof Net_DNS2_RR_SIG) + ) { + $this->_packet->additional[] = $this->auth_signature; + } + + // + // update the counts + // + $this->_packet->header->qdcount = count($this->_packet->question); + $this->_packet->header->ancount = count($this->_packet->answer); + $this->_packet->header->nscount = count($this->_packet->authority); + $this->_packet->header->arcount = count($this->_packet->additional); + + // + // make sure we have some data to send + // + if ( ($this->_packet->header->qdcount == 0) + || ($this->_packet->header->nscount == 0) + ) { + throw new Net_DNS2_Exception( + 'empty headers- nothing to send!', + Net_DNS2_Lookups::E_PACKET_INVALID + ); + } + + // + // send the packet and get back the response + // + $response = $this->sendPacket($this->_packet, $this->use_tcp); + + // + // clear the internal packet so if we make another request, we don't have + // old data being sent. + // + $this->_packet->reset(); + + // + // for updates, we just need to know it worked- we don't actualy need to + // return the response object + // + return true; + } +} + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * c-hanging-comment-ender-p: nil + * End: + */ +?> diff --git a/bundled-libs/Net/DNSBL.php b/bundled-libs/Net/DNSBL.php index 3091dab3..72573956 100644 --- a/bundled-libs/Net/DNSBL.php +++ b/bundled-libs/Net/DNSBL.php @@ -1,22 +1,6 @@ <?php + /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ -// +----------------------------------------------------------------------+ -// | PEAR::Net_DNSBL | -// +----------------------------------------------------------------------+ -// | Copyright (c) 2004 Sebastian Nohn <sebastian@nohn.net> | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 3.0 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available through the world-wide-web at the following url: | -// | http://www.php.net/license/3_0.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | license@php.net so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Authors: Sebastian Nohn <sebastian@nohn.net> | -// +----------------------------------------------------------------------+ -// -// $Id: DNSBL.php,v 1.4 2004/12/02 14:23:51 nohn Exp $ /** * PEAR::Net_DNSBL @@ -24,17 +8,49 @@ * This class acts as interface to generic Realtime Blocking Lists * (RBL) * - * Net_RBL looks up an supplied host if it's listed in 1-n supplied + * PHP versions 5 + * + * LICENSE: This source file is subject to version 3.01 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_01.txt. If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * Net_DNSBL looks up an supplied host if it's listed in 1-n supplied * Blacklists * - * @author Sebastian Nohn <sebastian@nohn.net> - * @package Net_DNSBL - * @license http://www.php.net/license/3_0.txt - * @version 0.5.3 + * @category Net + * @package Net_DNSBL + * @author Sebastian Nohn <sebastian@nohn.net> + * @author Ammar Ibrahim <fixxme@fixme.com> + * @copyright 2004-2012 Sebastian Nohn <sebastian@nohn.net> + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @version CVS: $Id: DNSBL.php 325344 2012-04-20 04:31:30Z nohn $ + * @link http://pear.php.net/package/Net_DNSBL + * @see Net_DNS + * @since File available since Release 1.0.0 */ -require_once dirname(__FILE__) . '/CheckIP.php'; -class Net_DNSBL { +require_once 'Net/DNS2.php'; + +/** + * PEAR::Net_DNSBL + * + * This class acts as interface to DNSBLs + * + * Net_DNSBL looks up an supplied IP if it's listed in a + * DNS Blacklist. + * + * @category Net + * @package Net_DNSBL + * @author Sebastian Nohn <sebastian@nohn.net> + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @version Release: 1.3.7 + * @link http://pear.php.net/package/net_dnsbl Package Home + */ + +class Net_DNSBL +{ /** * Array of blacklists. @@ -44,17 +60,26 @@ class Net_DNSBL { * @var array * @access protected */ - var $blacklists = array('sbl-xbl.spamhaus.net', - 'bl.spamcop.net'); + protected $blacklists = array('sbl-xbl.spamhaus.org', + 'bl.spamcop.net'); + + /** + * Array of Results + * + * @var array + * @access protected + */ + protected $results = array(); /** * Set the blacklist to a desired blacklist. * - * @param array Array of blacklists to use. May contain only one element. + * @param array $blacklists Array of blacklists to use. + * * @access public * @return bool true if the operation was successful */ - function setBlacklists($blacklists) + public function setBlacklists($blacklists) { if (is_array($blacklists)) { $this->blacklists = $blacklists; @@ -70,32 +95,181 @@ class Net_DNSBL { * @access public * @return array Currently set blacklists. */ - function getBlacklists() + public function getBlacklists() { return $this->blacklists; } + /** + * Returns Blacklist and Reply from the Blacklist, a host is listed in. + * + * @param string $host Host to check + * + * @access public + * @return array result. $result['dnsbl'] contains DNSBL, + * $result['record'] contains returned DNS record. + */ + public function getDetails($host) + { + if (isset($this->results[$host])) { + return $this->results[$host]; + } else { + return false; + } + } // function + + /** + * Returns Blacklist, host is listed in. + * + * @param string $host Host to check + * + * @access public + * @return bl, a host is listed in or false + */ + public function getListingBl($host) + { + if (isset($this->results[$host]['dnsbl'])) { + return $this->results[$host]['dnsbl']; + } + + if (isset($this->results[$host]) && is_array($this->results[$host])) { + $result = array_keys($this->results[$host]); + if ($result == null) { + return false; + } + + return 'multiple ('.implode(', ', $result).')'; + } + return false; + } // function + + /** + * Returns Blacklists, host is listed in. isListed() must have + * been called with checkall = true + * + * @param string $host Host to check + * + * @access public + * @return array blacklists, a host is listed in or false + */ + public function getListingBls($host) + { + if (isset($this->results[$host]) && is_array($this->results[$host])) { + $result = array_keys($this->results[$host]); + if ($result == null) { + return false; + } + + return $result; + } + + return false; + + } // function + + /** + * Returns result, when a host is listed. + * + * @param string $host Host to check + * + * @access public + * @return bl, a host is listed in or false + */ + public function getListingRecord($host) + { + if (isset($this->results[$host]['record'])) { + return $this->results[$host]['record']; + } else { + return false; + } + } // function + + /** + * Returns TXT-Records, when a host is listed. + * + * @param string $host Host to check + * + * @access public + * @return array TXT-Records for this host + */ + public function getTxt($host) + { + if (isset($this->results[$host]['txt'])) { + return $this->results[$host]['txt']; + } else { + return false; + } + } // function + /** * Checks if the supplied Host is listed in one or more of the * RBLs. * - * @param string Host to check for being listed. + * @param string $host Host to check for being listed. + * @param boolean $checkall Iterate through all blacklists and + * return all A records or stop after + * the first hit? + * * @access public * @return boolean true if the checked host is listed in a blacklist. */ - function isListed($host) + public function isListed($host, $checkall = false) { - $isListed = false; - + $resolver = new Net_DNS2_Resolver; + + if (!is_string($host)) { + return false; + } + foreach ($this->blacklists as $blacklist) { - $result = gethostbyname($this->getHostForLookup($host, $blacklist)); - if ($result != $this->getHostForLookup($host, $blacklist)) { + $response = null; + try { + $response = $resolver->query($this->getHostForLookup($host, $blacklist)); + } catch (Net_DNS2_Exception $e) { + $response = null; + } + if ($response) { $isListed = true; - - //if the Host was listed we don't need to check other RBLs, - break; - + if ($checkall) { + $this->results[$host][$blacklist] = array(); + foreach ($response->answer as $answer) { + $this->results[$host][$blacklist]['record'][] + = $answer->address; + } + $response_txt + = $resolver->query( + $this->getHostForLookup( + $host, + $blacklist + ), + 'TXT' + ); + if (isset($response_txt->answer)) { + foreach ($response_txt->answer as $txt) { + $this->results[$host][$blacklist]['txt'][] + = $txt->text[0]; + } + } + } else { + $this->results[$host]['dnsbl'] = $blacklist; + $this->results[$host]['record'] = $response->answer[0]->address; + $response_txt + = $resolver->query( + $this->getHostForLookup( + $host, + $blacklist + ), + 'TXT' + ); + if ((isset($response_txt)) && ($response_txt != false)) { + foreach ($response_txt->answer as $txt) { + $this->results[$host]['txt'][] = $txt->text[0]; + } + } + // if the Host was listed we don't need to check other RBLs, + break; + } } // if } // foreach @@ -106,18 +280,25 @@ class Net_DNSBL { * Get host to lookup. Lookup a host if neccessary and get the * complete FQDN to lookup. * - * @param string Host OR IP to use for building the lookup. - * @param string Blacklist to use for building the lookup. + * @param string $host Host OR IP to use for building the lookup. + * @param string $blacklist Blacklist to use for building the lookup. + * * @access protected * @return string Ready to use host to lookup */ - function getHostForLookup($host, $blacklist) + protected function getHostForLookup($host, $blacklist) { // Currently only works for v4 addresses. - if (!Net_CheckIP::check_ip($host)) { - $ip = gethostbyname($host); + if (filter_var($host, FILTER_VALIDATE_IP)) { + $ip = $host; } else { - $ip = $host; + $resolver = new Net_DNS2_Resolver; + $response = $resolver->query($host); + $ip = isset($response->answer[0]->address) ? + $response->answer[0]->address : null; + } + if (!$ip || !filter_var($ip, FILTER_VALIDATE_IP)) { + return; } return $this->buildLookUpHost($ip, $blacklist); @@ -126,12 +307,13 @@ class Net_DNSBL { /** * Build the host to lookup from an IP. * - * @param string IP to use for building the lookup. - * @param string Blacklist to use for building the lookup. + * @param string $ip IP to use for building the lookup. + * @param string $blacklist Blacklist to use for building the lookup. + * * @access protected * @return string Ready to use host to lookup */ - function buildLookUpHost($ip, $blacklist) + protected function buildLookUpHost($ip, $blacklist) { return $this->reverseIp($ip).'.'.$blacklist; } // function @@ -140,14 +322,14 @@ class Net_DNSBL { * Reverse the order of an IP. 127.0.0.1 -> 1.0.0.127. Currently * only works for v4-adresses * - * @param string IP to reverse. + * @param string $ip IP address to reverse. + * * @access protected * @return string Reversed IP */ - function reverseIp($ip) + protected function reverseIp($ip) { return implode('.', array_reverse(explode('.', $ip))); } // function - } // class -?> \ No newline at end of file +?> diff --git a/bundled-libs/Net/DNSBL/SURBL.php b/bundled-libs/Net/DNSBL/SURBL.php index 9fe4b448..4b874741 100644 --- a/bundled-libs/Net/DNSBL/SURBL.php +++ b/bundled-libs/Net/DNSBL/SURBL.php @@ -1,22 +1,39 @@ <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ -// +----------------------------------------------------------------------+ -// | PEAR::Net_DNSBL_SURBL | -// +----------------------------------------------------------------------+ -// | Copyright (c) 2004 Sebastian Nohn <sebastian@nohn.net> | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 3.0 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available through the world-wide-web at the following url: | -// | http://www.php.net/license/3_0.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | license@php.net so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Authors: Sebastian Nohn <sebastian@nohn.net> | -// +----------------------------------------------------------------------+ -// -// $Id: SURBL.php,v 1.4 2004/12/02 14:23:51 nohn Exp $ + +/** + * PEAR::Net_DNSBL + * + * This class acts as interface to generic Realtime Blocking Lists + * (RBL) + * + * PHP versions 5 + * + * LICENSE: This source file is subject to version 3.01 of the PHP license + * that is available through the world-wide-web at the following URI: + * http://www.php.net/license/3_01.txt. If you did not receive a copy of + * the PHP License and are unable to obtain it through the web, please + * send a note to license@php.net so we can mail you a copy immediately. + * + * Net_DNSBL looks up an supplied host if it's listed in 1-n supplied + * Blacklists + * + * @category Net + * @package Net_DNSBL + * @author Sebastian Nohn <sebastian@nohn.net> + * @author Ammar Ibrahim <fixxme@fixme.com> + * @copyright 2004-2012 Sebastian Nohn <sebastian@nohn.net> + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @version CVS: $Id: SURBL.php 325344 2012-04-20 04:31:30Z nohn $ + * @link http://pear.php.net/package/Net_DNSBL + * @see Net_DNS2 + * @since File available since Release 1.0.0 + */ + +require_once 'Cache/Lite.php'; +require_once 'HTTP/Request2.php'; +require_once 'Net/DNSBL.php'; +require_once 'PEAR.php'; /** * PEAR::Net_DNSBL_SURBL @@ -26,17 +43,16 @@ * Services_SURBL looks up an supplied URI if it's listed in a * Spam URI Realtime Blocklists. * - * @author Sebastian Nohn <sebastian@nohn.net> - * @package Net_DNSBL - * @license http://www.php.net/license/3_0.txt - * @version 0.5.4 + * @category Net + * @package Net_DNSBL + * @author Sebastian Nohn <sebastian@nohn.net> + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @version Release: 1.3.7 + * @link http://pear.php.net/package/net_dnsbl Package Home */ -require_once dirname(__FILE__) . '/../../Cache/Lite.php'; -require_once dirname(__FILE__) . '/../../HTTP/Request.php'; -require_once dirname(__FILE__) . '/../CheckIP.php'; -require_once dirname(__FILE__) . '/../DNSBL.php'; -class Net_DNSBL_SURBL extends Net_DNSBL { +class Net_DNSBL_SURBL extends Net_DNSBL +{ /** * Array of blacklists. @@ -46,7 +62,7 @@ class Net_DNSBL_SURBL extends Net_DNSBL { * @var string[] * @access protected */ - var $blacklists = array('multi.surbl.org'); + protected $blacklists = array('multi.surbl.org'); /** * File containing whitelisted hosts. @@ -59,41 +75,33 @@ class Net_DNSBL_SURBL extends Net_DNSBL { * @see $twoLevelCcTld * @access protected */ - var $doubleCcTldFile = 'http://spamcheck.freeapp.net/two-level-tlds'; - - /** - * Array of whitelisted hosts. - * - * @var array - * @see $twoLevelCcTldFile - * @access private - */ - var $twoLevelCcTld = array(); + protected $doubleCcTldFile = 'http://george.surbl.org/two-level-tlds'; /** * Check if the last two parts of the FQDN are whitelisted. * - * @param string Host to check if it is whitelisted + * @param string $fqdn Host to check if it is whitelisted. + * * @access protected * @return boolean True if the host is whitelisted */ - function isDoubleCcTld($fqdn) + protected function isDoubleCcTld($fqdn) { // 30 Days should be way enough $options = array( 'lifeTime' => '2592000', 'automaticSerialization' => true ); - $id = md5($this->doubleCcTldFile); + $id = md5($this->doubleCcTldFile); $cache = new Cache_Lite($options); if ($data = $cache->get($id)) { // Cache hit } else { // Cache miss - $http = new HTTP_Request($this->doubleCcTldFile); - if (!PEAR::isError($http->sendRequest())) { - $data = $http->getResponseBody(); + $http = new HTTP_Request2($this->doubleCcTldFile); + if (!PEAR::isError($http->send())) { + $data = $http->getBody(); } $data = explode("\n", $data); $data = array_flip($data); @@ -119,18 +127,25 @@ class Net_DNSBL_SURBL extends Net_DNSBL { * (3b2) IS_NOT_2LEVEL: we want the last two names * (4) return the FQDN to query. * - * @param string URL to check. + * @param string $uri URL to check. + * @param string $blacklist Blacklist to check against. + * * @access protected * @return string Host to lookup */ - function getHostForLookup($uri, $blacklist) + protected function getHostForLookup($uri, $blacklist) { - $host = ''; // (1) Extract the hostname from the given URI + $host = ''; $parsed_uri = parse_url($uri); - $host = $parsed_uri['host']; + + if (empty($parsed_uri['host'])) { + return false; + } + + $host = urldecode($parsed_uri['host']); // (2) Check if the "hostname" is an ip - if (Net_CheckIP::check_ip($host)) { + if (filter_var($host, FILTER_VALIDATE_IP)) { // (3a) IS_IP Reverse the IP (1.2.3.4 -> 4.3.2.1) $host = $this->reverseIp($host); } else { @@ -139,13 +154,13 @@ class Net_DNSBL_SURBL extends Net_DNSBL { array_shift($host_elements); } // while $host_3_elements = implode('.', $host_elements); - + $host_elements = explode('.', $host); while (count($host_elements) > 2) { array_shift($host_elements); } // while $host_2_elements = implode('.', $host_elements); - + // (3b) IS_FQDN Check if is in "CC-2-level-TLD" if ($this->isDoubleCcTld($host_2_elements)) { // (3b1) IS_IN_2LEVEL: we want the last three names @@ -156,9 +171,9 @@ class Net_DNSBL_SURBL extends Net_DNSBL { } // if } // if // (4) return the FQDN to query - $host .= '.'.$blacklist; + $host .= '.'.$blacklist; return $host; } // function - + } // class -?> \ No newline at end of file +?> diff --git a/bundled-libs/Onyx/RSS.php b/bundled-libs/Onyx/RSS.php index 827d4290..901a548e 100644 --- a/bundled-libs/Onyx/RSS.php +++ b/bundled-libs/Onyx/RSS.php @@ -123,19 +123,28 @@ class ONYX_RSS { clearstatcache(); - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; serendipity_request_start(); - $req = new HTTP_Request($uri, array('allowRedirects' => true, 'maxRedirects' => 5)); - $res = $req->sendRequest(); + $options = array('follow_redirects' => true, 'max_redirects' => 5); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($uri, HTTP_Request2::METHOD_GET, $options); + try { + $res = $req->send(); - if (PEAR::isError($res) || $req->getResponseCode() != '200') - { + if ($res->getStatus() != '200') { + throw new HTTP_Request2_Exception('unable to fetch feed: status code != 200'); + } + + } catch (HTTP_Request2_Exception $e) { serendipity_request_end(); - $this->raiseError((__LINE__-2), ONYX_ERR_INVALID_URI . ' (#' . $req->getResponseCode() . ')'); + $this->raiseError((__LINE__-2), ONYX_ERR_INVALID_URI . ' (#' . $res->getStatus() . ')'); return false; } - $fContent = $req->getResponseBody(); + $fContent = $res->getBody(); serendipity_request_end(); if (@preg_match('@<?xml[^>]*encoding="([^"]+)"@i', $fContent, $xml_encoding)) { $this->rss['encoding'] = strtolower($xml_encoding[1]); @@ -342,16 +351,26 @@ class ONYX_RSS { if (function_exists('version_compare') && version_compare(phpversion(), '4.3.0') >= 0) { - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; serendipity_request_start(); - $req = new HTTP_Request($uri); + $options = array(); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($uri, HTTP_Request2::METHOD_GET, $options); - if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') { + try { + $response = $req->send(); + if ($response->getStatus() != '200') { + throw new HTTP_Request2_Exception('could not fetch url: status code != 200'); + } + } catch (HTTP_Request2_Exception $e) { serendipity_request_end(); return false; } - $fHeader = $req->getResponseHeader(); + $fHeader = $response->getHeader(); if (isset($fHeader['last-modified'])) { $modtime = $fHeader['last-modified']; } diff --git a/bundled-libs/PEAR.php b/bundled-libs/PEAR.php index 0487cb16..d661cc21 100644 --- a/bundled-libs/PEAR.php +++ b/bundled-libs/PEAR.php @@ -14,17 +14,10 @@ * @author Greg Beaver <cellog@php.net> * @copyright 1997-2010 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id$ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ -// Serendipity-Patch -if (defined('PEAR_ERROR_RETURN')) { - return false; -} -// Serendipity-Patch end - /**#@+ * ERROR constants */ @@ -39,8 +32,6 @@ define('PEAR_ERROR_CALLBACK', 16); */ define('PEAR_ERROR_EXCEPTION', 32); /**#@-*/ -define('PEAR_ZE2', (function_exists('version_compare') && - version_compare(zend_version(), "2-dev", "ge"))); if (substr(PHP_OS, 0, 3) == 'WIN') { define('OS_WINDOWS', true); @@ -84,7 +75,7 @@ $GLOBALS['_PEAR_error_handler_stack'] = array(); * @author Greg Beaver <cellog@php.net> * @copyright 1997-2006 The PHP Group * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.5 + * @version Release: 1.10.1 * @link http://pear.php.net/package/PEAR * @see PEAR_Error * @since Class available since PHP 4.0.2 @@ -142,6 +133,18 @@ class PEAR */ var $_expected_errors = array(); + /** + * List of methods that can be called both statically and non-statically. + * @var array + */ + protected static $bivalentMethods = array( + 'setErrorHandling' => true, + 'raiseError' => true, + 'throwError' => true, + 'pushErrorHandling' => true, + 'popErrorHandling' => true, + ); + /** * Constructor. Registers this object in * $_PEAR_destructor_object_list for destructor emulation if a @@ -152,7 +155,7 @@ class PEAR * @access public * @return void */ - function PEAR($error_class = null) + function __construct($error_class = null) { $classname = strtolower(get_class($this)); if ($this->_debug) { @@ -179,6 +182,18 @@ class PEAR } } + /** + * Only here for backwards compatibility. + * E.g. Archive_Tar calls $this->PEAR() in its constructor. + * + * @param string $error_class Which class to use for error objects, + * defaults to PEAR_Error. + */ + public function PEAR($error_class = null) + { + self::__construct($error_class); + } + /** * Destructor (the emulated type of...). Does nothing right now, * but is included for forward compatibility, so subclass @@ -196,19 +211,44 @@ class PEAR } } + public function __call($method, $arguments) + { + if (!isset(self::$bivalentMethods[$method])) { + trigger_error( + 'Call to undefined method PEAR::' . $method . '()', E_USER_ERROR + ); + } + return call_user_func_array( + array(get_class(), '_' . $method), + array_merge(array($this), $arguments) + ); + } + + public static function __callStatic($method, $arguments) + { + if (!isset(self::$bivalentMethods[$method])) { + trigger_error( + 'Call to undefined method PEAR::' . $method . '()', E_USER_ERROR + ); + } + return call_user_func_array( + array(get_class(), '_' . $method), + array_merge(array(null), $arguments) + ); + } + /** * If you have a class that's mostly/entirely static, and you need static * properties, you can use this method to simulate them. Eg. in your method(s) * do this: $myVar = &PEAR::getStaticProperty('myclass', 'myVar'); * You MUST use a reference, or they will not persist! * - * @access public * @param string $class The calling classname, to prevent clashes * @param string $var The variable to retrieve. * @return mixed A reference to the variable. If not set it will be * auto initialised to NULL. */ - function &getStaticProperty($class, $var) + public static function &getStaticProperty($class, $var) { static $properties; if (!isset($properties[$class])) { @@ -226,12 +266,12 @@ class PEAR * Use this function to register a shutdown method for static * classes. * - * @access public * @param mixed $func The function name (or array of class/method) to call * @param mixed $args The arguments to pass to the function + * * @return void */ - function registerShutdownFunc($func, $args = array()) + public static function registerShutdownFunc($func, $args = array()) { // if we are called statically, there is a potential // that no shutdown func is registered. Bug #6445 @@ -250,10 +290,10 @@ class PEAR * only if $code is a string and * $obj->getMessage() == $code or * $code is an integer and $obj->getCode() == $code - * @access public + * * @return bool true if parameter is an error */ - static function isError($data, $code = null) + public static function isError($data, $code = null) { if (!is_a($data, 'PEAR_Error')) { return false; @@ -275,6 +315,9 @@ class PEAR * PEAR objects. If called in an object, setErrorHandling sets * the default behaviour for that object. * + * @param object $object + * Object the method was called on (non-static mode) + * * @param int $mode * One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT, * PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE, @@ -306,11 +349,12 @@ class PEAR * * @since PHP 4.0.5 */ - function setErrorHandling($mode = null, $options = null) - { - if (isset($this) && is_a($this, 'PEAR')) { - $setmode = &$this->_default_error_mode; - $setoptions = &$this->_default_error_options; + protected static function _setErrorHandling( + $object, $mode = null, $options = null + ) { + if ($object !== null) { + $setmode = &$object->_default_error_mode; + $setoptions = &$object->_default_error_options; } else { $setmode = &$GLOBALS['_PEAR_default_error_mode']; $setoptions = &$GLOBALS['_PEAR_default_error_options']; @@ -470,12 +514,12 @@ class PEAR * @param bool $skipmsg If true, raiseError will only pass error codes, * the error message parameter will be dropped. * - * @access public * @return object a PEAR error object * @see PEAR::setErrorHandling * @since PHP 4.0.5 */ - static function &raiseError($message = null, + protected static function _raiseError($object, + $message = null, $code = null, $mode = null, $options = null, @@ -493,10 +537,10 @@ class PEAR } if ( - isset($this) && - isset($this->_expected_errors) && - count($this->_expected_errors) > 0 && - count($exp = end($this->_expected_errors)) + $object !== null && + isset($object->_expected_errors) && + count($object->_expected_errors) > 0 && + count($exp = end($object->_expected_errors)) ) { if ($exp[0] == "*" || (is_int(reset($exp)) && in_array($code, $exp)) || @@ -509,9 +553,9 @@ class PEAR // No mode given, try global ones if ($mode === null) { // Class error handler - if (isset($this) && isset($this->_default_error_mode)) { - $mode = $this->_default_error_mode; - $options = $this->_default_error_options; + if ($object !== null && isset($object->_default_error_mode)) { + $mode = $object->_default_error_mode; + $options = $object->_default_error_options; // Global error handler } elseif (isset($GLOBALS['_PEAR_default_error_mode'])) { $mode = $GLOBALS['_PEAR_default_error_mode']; @@ -521,18 +565,12 @@ class PEAR if ($error_class !== null) { $ec = $error_class; - } elseif (isset($this) && isset($this->_error_class)) { - $ec = $this->_error_class; + } elseif ($object !== null && isset($object->_error_class)) { + $ec = $object->_error_class; } else { $ec = 'PEAR_Error'; } - if (intval(PHP_VERSION) < 5) { - // little non-eval hack to fix bug #12147 - include 'PEAR/FixPHP5PEARWarnings.php'; - return $a; - } - if ($skipmsg) { $a = new $ec($code, $mode, $options, $userinfo); } else { @@ -554,14 +592,13 @@ class PEAR * @param string $userinfo If you need to pass along for example debug * information, this parameter is meant for that. * - * @access public * @return object a PEAR error object * @see PEAR::raiseError */ - function &throwError($message = null, $code = null, $userinfo = null) + protected static function _throwError($object, $message = null, $code = null, $userinfo = null) { - if (isset($this) && is_a($this, 'PEAR')) { - $a = &$this->raiseError($message, $code, null, null, $userinfo); + if ($object !== null) { + $a = &$object->raiseError($message, $code, null, null, $userinfo); return $a; } @@ -569,7 +606,7 @@ class PEAR return $a; } - function staticPushErrorHandling($mode, $options = null) + public static function staticPushErrorHandling($mode, $options = null) { $stack = &$GLOBALS['_PEAR_error_handler_stack']; $def_mode = &$GLOBALS['_PEAR_default_error_mode']; @@ -604,7 +641,7 @@ class PEAR return true; } - function staticPopErrorHandling() + public static function staticPopErrorHandling() { $stack = &$GLOBALS['_PEAR_error_handler_stack']; $setmode = &$GLOBALS['_PEAR_default_error_mode']; @@ -652,20 +689,20 @@ class PEAR * * @see PEAR::setErrorHandling */ - function pushErrorHandling($mode, $options = null) + protected static function _pushErrorHandling($object, $mode, $options = null) { $stack = &$GLOBALS['_PEAR_error_handler_stack']; - if (isset($this) && is_a($this, 'PEAR')) { - $def_mode = &$this->_default_error_mode; - $def_options = &$this->_default_error_options; + if ($object !== null) { + $def_mode = &$object->_default_error_mode; + $def_options = &$object->_default_error_options; } else { $def_mode = &$GLOBALS['_PEAR_default_error_mode']; $def_options = &$GLOBALS['_PEAR_default_error_options']; } $stack[] = array($def_mode, $def_options); - if (isset($this) && is_a($this, 'PEAR')) { - $this->setErrorHandling($mode, $options); + if ($object !== null) { + $object->setErrorHandling($mode, $options); } else { PEAR::setErrorHandling($mode, $options); } @@ -680,14 +717,14 @@ class PEAR * * @see PEAR::pushErrorHandling */ - function popErrorHandling() + protected static function _popErrorHandling($object) { $stack = &$GLOBALS['_PEAR_error_handler_stack']; array_pop($stack); list($mode, $options) = $stack[sizeof($stack) - 1]; array_pop($stack); - if (isset($this) && is_a($this, 'PEAR')) { - $this->setErrorHandling($mode, $options); + if ($object !== null) { + $object->setErrorHandling($mode, $options); } else { PEAR::setErrorHandling($mode, $options); } @@ -701,7 +738,7 @@ class PEAR * @param string $ext The extension name * @return bool Success or not on the dl() call */ - function loadExtension($ext) + public static function loadExtension($ext) { if (extension_loaded($ext)) { return true; @@ -710,8 +747,7 @@ class PEAR // if either returns true dl() will produce a FATAL error, stop that if ( function_exists('dl') === false || - ini_get('enable_dl') != 1 || - ini_get('safe_mode') == 1 + ini_get('enable_dl') != 1 ) { return false; } @@ -732,10 +768,6 @@ class PEAR } } -if (PEAR_ZE2) { - include_once S9Y_PEAR_PATH . 'PEAR5.php'; -} - function _PEAR_call_destructors() { global $_PEAR_destructor_object_list; @@ -743,11 +775,8 @@ function _PEAR_call_destructors() sizeof($_PEAR_destructor_object_list)) { reset($_PEAR_destructor_object_list); - if (PEAR_ZE2) { - $destructLifoExists = PEAR5::getStaticProperty('PEAR', 'destructlifo'); - } else { - $destructLifoExists = PEAR::getStaticProperty('PEAR', 'destructlifo'); - } + + $destructLifoExists = PEAR::getStaticProperty('PEAR', 'destructlifo'); if ($destructLifoExists) { $_PEAR_destructor_object_list = array_reverse($_PEAR_destructor_object_list); @@ -794,7 +823,7 @@ function _PEAR_call_destructors() * @author Gregory Beaver <cellog@php.net> * @copyright 1997-2006 The PHP Group * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.5 + * @version Release: 1.10.1 * @link http://pear.php.net/manual/en/core.pear.pear-error.php * @see PEAR::raiseError(), PEAR::throwError() * @since Class available since PHP 4.0.2 @@ -829,7 +858,7 @@ class PEAR_Error * @access public * */ - function PEAR_Error($message = 'unknown error', $code = null, + function __construct($message = 'unknown error', $code = null, $mode = null, $options = null, $userinfo = null) { if ($mode === null) { @@ -840,11 +869,7 @@ class PEAR_Error $this->mode = $mode; $this->userinfo = $userinfo; - if (PEAR_ZE2) { - $skiptrace = PEAR5::getStaticProperty('PEAR_Error', 'skiptrace'); - } else { - $skiptrace = PEAR::getStaticProperty('PEAR_Error', 'skiptrace'); - } + $skiptrace = PEAR::getStaticProperty('PEAR_Error', 'skiptrace'); if (!$skiptrace) { $this->backtrace = debug_backtrace(); @@ -902,6 +927,24 @@ class PEAR_Error } } + /** + * Only here for backwards compatibility. + * + * Class "Cache_Error" still uses it, among others. + * + * @param string $message Message + * @param int $code Error code + * @param int $mode Error mode + * @param mixed $options See __construct() + * @param string $userinfo Additional user/debug info + */ + public function PEAR_Error( + $message = 'unknown error', $code = null, $mode = null, + $options = null, $userinfo = null + ) { + self::__construct($message, $code, $mode, $options, $userinfo); + } + /** * Get the error mode from an error object. * diff --git a/bundled-libs/PEAR/Exception.php b/bundled-libs/PEAR/Exception.php index 4a0e7b86..5abf4f84 100644 --- a/bundled-libs/PEAR/Exception.php +++ b/bundled-libs/PEAR/Exception.php @@ -3,19 +3,18 @@ /** * PEAR_Exception * - * PHP versions 4 and 5 + * PHP version 5 * - * @category pear - * @package PEAR - * @author Tomas V. V. Cox <cox@idecnet.com> - * @author Hans Lellelid <hans@velum.net> - * @author Bertrand Mansion <bmansion@mamasam.com> - * @author Greg Beaver <cellog@php.net> - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Exception.php 313023 2011-07-06 19:17:11Z dufuz $ - * @link http://pear.php.net/package/PEAR - * @since File available since Release 1.3.3 + * @category PEAR + * @package PEAR_Exception + * @author Tomas V. V. Cox <cox@idecnet.com> + * @author Hans Lellelid <hans@velum.net> + * @author Bertrand Mansion <bmansion@mamasam.com> + * @author Greg Beaver <cellog@php.net> + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @link http://pear.php.net/package/PEAR_Exception + * @since File available since Release 1.0.0 */ @@ -81,18 +80,17 @@ * } * </code> * - * @category pear - * @package PEAR - * @author Tomas V.V.Cox <cox@idecnet.com> - * @author Hans Lellelid <hans@velum.net> - * @author Bertrand Mansion <bmansion@mamasam.com> - * @author Greg Beaver <cellog@php.net> - * @copyright 1997-2009 The Authors - * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 - * @link http://pear.php.net/package/PEAR - * @since Class available since Release 1.3.3 - * + * @category PEAR + * @package PEAR_Exception + * @author Tomas V.V.Cox <cox@idecnet.com> + * @author Hans Lellelid <hans@velum.net> + * @author Bertrand Mansion <bmansion@mamasam.com> + * @author Greg Beaver <cellog@php.net> + * @copyright 1997-2009 The Authors + * @license http://opensource.org/licenses/bsd-license.php New BSD License + * @version Release: @package_version@ + * @link http://pear.php.net/package/PEAR_Exception + * @since Class available since Release 1.0.0 */ class PEAR_Exception extends Exception { @@ -114,9 +112,10 @@ class PEAR_Exception extends Exception * - PEAR_Exception(string $message, PEAR_Error $cause, int $code); * - PEAR_Exception(string $message, array $causes); * - PEAR_Exception(string $message, array $causes, int $code); - * @param string exception message - * @param int|Exception|PEAR_Error|array|null exception cause - * @param int|null exception code or null + * + * @param string $message exception message + * @param int|Exception|PEAR_Error|array|null $p2 exception cause + * @param int|null $p3 exception code or null */ public function __construct($message, $p2 = null, $p3 = null) { @@ -127,8 +126,10 @@ class PEAR_Exception extends Exception // using is_object allows both Exception and PEAR_Error if (is_object($p2) && !($p2 instanceof Exception)) { if (!class_exists('PEAR_Error') || !($p2 instanceof PEAR_Error)) { - throw new PEAR_Exception('exception cause must be Exception, ' . - 'array, or PEAR_Error'); + throw new PEAR_Exception( + 'exception cause must be Exception, ' . + 'array, or PEAR_Error' + ); } } $code = $p3; @@ -146,24 +147,37 @@ class PEAR_Exception extends Exception } /** - * @param mixed $callback - A valid php callback, see php func is_callable() + * Add an exception observer + * + * @param mixed $callback - A valid php callback, see php func is_callable() * - A PEAR_Exception::OBSERVER_* constant * - An array(const PEAR_Exception::OBSERVER_*, * mixed $options) * @param string $label The name of the observer. Use this if you want * to remove it later with removeObserver() + * + * @return void */ public static function addObserver($callback, $label = 'default') { self::$_observers[$label] = $callback; } + /** + * Remove an exception observer + * + * @param string $label Name of the observer + * + * @return void + */ public static function removeObserver($label = 'default') { unset(self::$_observers[$label]); } /** + * Generate a unique ID for an observer + * * @return int unique identifier for an observer */ public static function getUniqueId() @@ -171,7 +185,12 @@ class PEAR_Exception extends Exception return self::$_uniqueid++; } - private function signal() + /** + * Send a signal to all observers + * + * @return void + */ + protected function signal() { foreach (self::$_observers as $func) { if (is_callable($func)) { @@ -180,20 +199,20 @@ class PEAR_Exception extends Exception } settype($func, 'array'); switch ($func[0]) { - case self::OBSERVER_PRINT : - $f = (isset($func[1])) ? $func[1] : '%s'; - printf($f, $this->getMessage()); - break; - case self::OBSERVER_TRIGGER : - $f = (isset($func[1])) ? $func[1] : E_USER_NOTICE; - trigger_error($this->getMessage(), $f); - break; - case self::OBSERVER_DIE : - $f = (isset($func[1])) ? $func[1] : '%s'; - die(printf($f, $this->getMessage())); - break; - default: - trigger_error('invalid observer type', E_USER_WARNING); + case self::OBSERVER_PRINT : + $f = (isset($func[1])) ? $func[1] : '%s'; + printf($f, $this->getMessage()); + break; + case self::OBSERVER_TRIGGER : + $f = (isset($func[1])) ? $func[1] : E_USER_NOTICE; + trigger_error($this->getMessage(), $f); + break; + case self::OBSERVER_DIE : + $f = (isset($func[1])) ? $func[1] : '%s'; + die(printf($f, $this->getMessage())); + break; + default: + trigger_error('invalid observer type', E_USER_WARNING); } } } @@ -210,6 +229,7 @@ class PEAR_Exception extends Exception * <pre> * array('name' => $name, 'context' => array(...)) * </pre> + * * @return array */ public function getErrorData() @@ -219,7 +239,7 @@ class PEAR_Exception extends Exception /** * Returns the exception that caused this exception to be thrown - * @access public + * * @return Exception|array The context of the exception */ public function getCause() @@ -229,7 +249,10 @@ class PEAR_Exception extends Exception /** * Function must be public to call on caused exceptions - * @param array + * + * @param array $causes Array that gets filled. + * + * @return void */ public function getCauseMessage(&$causes) { @@ -266,7 +289,9 @@ class PEAR_Exception extends Exception 'message' => $cause->getMessage(), 'file' => $cause->getFile(), 'line' => $cause->getLine()); - } elseif (class_exists('PEAR_Error') && $cause instanceof PEAR_Error) { + } elseif (class_exists('PEAR_Error') + && $cause instanceof PEAR_Error + ) { $causes[] = array('class' => get_class($cause), 'message' => $cause->getMessage(), 'file' => 'unknown', @@ -288,6 +313,11 @@ class PEAR_Exception extends Exception } } + /** + * Build a backtrace and return it + * + * @return array Backtrace + */ public function getTraceSafe() { if (!isset($this->_trace)) { @@ -300,18 +330,36 @@ class PEAR_Exception extends Exception return $this->_trace; } + /** + * Gets the first class of the backtrace + * + * @return string Class name + */ public function getErrorClass() { $trace = $this->getTraceSafe(); return $trace[0]['class']; } + /** + * Gets the first method of the backtrace + * + * @return string Method/function name + */ public function getErrorMethod() { $trace = $this->getTraceSafe(); return $trace[0]['function']; } + /** + * Converts the exception to a string (HTML or plain text) + * + * @return string String representation + * + * @see toHtml() + * @see toText() + */ public function __toString() { if (isset($_SERVER['REQUEST_URI'])) { @@ -320,6 +368,11 @@ class PEAR_Exception extends Exception return $this->toText(); } + /** + * Generates a HTML representation of the exception + * + * @return string HTML code + */ public function toHtml() { $trace = $this->getTraceSafe(); @@ -329,7 +382,8 @@ class PEAR_Exception extends Exception foreach ($causes as $i => $cause) { $html .= '<tr><td colspan="3" style="background: #ff9999">' . str_repeat('-', $i) . ' <b>' . $cause['class'] . '</b>: ' - . htmlspecialchars($cause['message']) . ' in <b>' . $cause['file'] . '</b> ' + . htmlspecialchars($cause['message']) + . ' in <b>' . $cause['file'] . '</b> ' . 'on line <b>' . $cause['line'] . '</b>' . "</td></tr>\n"; } @@ -348,20 +402,27 @@ class PEAR_Exception extends Exception $args = array(); if (!empty($v['args'])) { foreach ($v['args'] as $arg) { - if (is_null($arg)) $args[] = 'null'; - elseif (is_array($arg)) $args[] = 'Array'; - elseif (is_object($arg)) $args[] = 'Object('.get_class($arg).')'; - elseif (is_bool($arg)) $args[] = $arg ? 'true' : 'false'; - elseif (is_int($arg) || is_double($arg)) $args[] = $arg; - else { + if (is_null($arg)) { + $args[] = 'null'; + } else if (is_array($arg)) { + $args[] = 'Array'; + } else if (is_object($arg)) { + $args[] = 'Object('.get_class($arg).')'; + } else if (is_bool($arg)) { + $args[] = $arg ? 'true' : 'false'; + } else if (is_int($arg) || is_double($arg)) { + $args[] = $arg; + } else { $arg = (string)$arg; $str = htmlspecialchars(substr($arg, 0, 16)); - if (strlen($arg) > 16) $str .= '…'; + if (strlen($arg) > 16) { + $str .= '…'; + } $args[] = "'" . $str . "'"; } } } - $html .= '(' . implode(', ',$args) . ')' + $html .= '(' . implode(', ', $args) . ')' . '</td>' . '<td>' . (isset($v['file']) ? $v['file'] : 'unknown') . ':' . (isset($v['line']) ? $v['line'] : 'unknown') @@ -374,6 +435,11 @@ class PEAR_Exception extends Exception return $html; } + /** + * Generates text representation of the exception and stack trace + * + * @return string + */ public function toText() { $causes = array(); @@ -386,4 +452,5 @@ class PEAR_Exception extends Exception } return $causeMsg . $this->getTraceAsString(); } -} \ No newline at end of file +} +?> diff --git a/comment.php b/comment.php index fd4e96f7..9c324b34 100644 --- a/comment.php +++ b/comment.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details @@ -9,16 +9,16 @@ include S9Y_INCLUDE_PATH . 'include/functions_entries_admin.inc.php'; header('Content-Type: text/html; charset=' . LANG_CHARSET); -if (isset($serendipity['GET']['delete'], $serendipity['GET']['entry'], $serendipity['GET']['type'])) { +if (isset($serendipity['GET']['delete'], $serendipity['GET']['entry'], $serendipity['GET']['type']) && serendipity_checkFormToken()) { serendipity_deleteComment($serendipity['GET']['delete'], $serendipity['GET']['entry'], $serendipity['GET']['type']); - if (serendipity_isResponseClean($_SERVER['HTTP_REFERER'])) { + if (serendipity_isResponseClean($_SERVER['HTTP_REFERER']) && preg_match('@^https?://' . preg_quote($_SERVER['HTTP_HOST'], '@') . '@imsU', $_SERVER['HTTP_REFERER'])) { header('Status: 302 Found'); header('Location: '. $_SERVER['HTTP_REFERER']); exit; } } -if (isset($serendipity['GET']['switch'], $serendipity['GET']['entry'])) { +if (isset($serendipity['GET']['switch'], $serendipity['GET']['entry']) && serendipity_checkFormToken()) { serendipity_allowCommentsToggle($serendipity['GET']['entry'], $serendipity['GET']['switch']); } diff --git a/composer.json b/composer.json index 8b994d3f..c07459c0 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "repositories": [ { "type": "composer", - "url": "http://packages.zendframework.com/" + "url": "https://packages.zendframework.com/" } ], "require": { diff --git a/composer.phar b/composer.phar index 4d369077..d08763b3 100755 Binary files a/composer.phar and b/composer.phar differ diff --git a/deployment/comment.php b/deployment/comment.php index 66a792c4..f833db47 100644 --- a/deployment/comment.php +++ b/deployment/comment.php @@ -1,8 +1,9 @@ -<?php # $Id$ +<?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details # Serendipity is provided in managed mode here require_once 's9y/comment.php'; + /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/deployment/exit.php b/deployment/exit.php index 9746d103..8f14f817 100644 --- a/deployment/exit.php +++ b/deployment/exit.php @@ -1,8 +1,9 @@ -<?php # $Id$ +<?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details # Serendipity is provided in managed mode here require_once 's9y/exit.php'; + /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/deployment/index.php b/deployment/index.php index c3d46a68..009e7982 100644 --- a/deployment/index.php +++ b/deployment/index.php @@ -1,8 +1,9 @@ -<?php # $Id$ +<?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details # Serendipity is provided in managed mode here require_once 's9y/index.php'; + /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/deployment/rss.php b/deployment/rss.php index e97447e1..1a700509 100644 --- a/deployment/rss.php +++ b/deployment/rss.php @@ -1,8 +1,9 @@ -<?php # $Id$ +<?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details # Serendipity is provided in managed mode here require_once 's9y/rss.php'; + /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/deployment/serendipity.css.php b/deployment/serendipity.css.php index 806a762a..d5f0de20 100644 --- a/deployment/serendipity.css.php +++ b/deployment/serendipity.css.php @@ -1,8 +1,9 @@ -<?php # $Id$ +<?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details # Serendipity is provided in managed mode here require_once 's9y/serendipity.css.php'; + /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/deployment/serendipity_admin.php b/deployment/serendipity_admin.php index 749b5bf8..02220cd3 100644 --- a/deployment/serendipity_admin.php +++ b/deployment/serendipity_admin.php @@ -1,8 +1,9 @@ -<?php # $Id$ +<?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details # Serendipity is provided in managed mode here require_once 's9y/serendipity_admin.php'; + /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/deployment/serendipity_admin_image_selector.php b/deployment/serendipity_admin_image_selector.php index 677c1dbe..435cf181 100644 --- a/deployment/serendipity_admin_image_selector.php +++ b/deployment/serendipity_admin_image_selector.php @@ -1,8 +1,9 @@ -<?php # $Id$ +<?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details # Serendipity is provided in managed mode here require_once 's9y/serendipity_admin_image_selector.php'; + /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/deployment/serendipity_config.inc.php b/deployment/serendipity_config.inc.php index 506f4cf1..74a4e807 100644 --- a/deployment/serendipity_config.inc.php +++ b/deployment/serendipity_config.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details # Serendipity is provided in managed mode here @@ -6,5 +6,6 @@ #@define('S9Y_INCLUDE_PATH', 's9y/'); @define('S9Y_DATA_PATH', dirname( __FILE__)."/"); require_once 's9y/serendipity_config.inc.php'; + /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/deployment/serendipity_xmlrpc.php b/deployment/serendipity_xmlrpc.php index 483d502d..f4789c13 100644 --- a/deployment/serendipity_xmlrpc.php +++ b/deployment/serendipity_xmlrpc.php @@ -1,8 +1,9 @@ -<?php # $Id$ +<?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details # Serendipity is provided in managed mode here require_once 's9y/serendipity_xmlrpc.php'; + /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/deployment/wfwcomment.php b/deployment/wfwcomment.php index 9293ef3b..0b6bd339 100644 --- a/deployment/wfwcomment.php +++ b/deployment/wfwcomment.php @@ -1,8 +1,9 @@ -<?php # $Id$ +<?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details # Serendipity is provided in managed mode here require_once 's9y/wfwcomment.php'; + /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/docs/INSTALL b/docs/INSTALL index c840f517..e0ee6e30 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -1,6 +1,5 @@ -########################### -# INSTALLING SERENDIPITY # -########################### +INSTALLING SERENDIPITY +---------------------- -Please go to http://www.s9y.org/36.html to view a step-by-step -installation guide. +Please go to http://docs.s9y.org/docs/users/getting-started/index.html to view +a step-by-step installation guide. \ No newline at end of file diff --git a/docs/NEWS b/docs/NEWS index afa865d9..8964e75a 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -1,10 +1,186 @@ -Version 2.1 () +Version 2.x.x (major) () ------------------------------------------------------------------------ + + * Adapt .htacess default rules to exclude rewriting documentation + (Issue #521) + + * Add backend_view_entry hook, that is executed for every entry + in the backend entry list + + * Updated entryproperties plugin to support a custom property for + multiple ownership of an article + + * Emit and detect rel=trackback element to find trackback + url, to have a reliable alternative to RDF used so far + + * Merge and rename the two configuration variables to limit + displayed entries in the dashboard (#493): + + $serendipity['dashboardLimit'] and + $serendipity['dashboardDraftLimit'] are now merged into + $serendipity['dashboardEntriesLimit'] - please change your + serendipity_config_local.inc.php accordingly if you used + the former variables. + + The dashboard will now show as many future entries as + configured in "dashboardEntriesLimit"; if there are less + future entries, it will display drafts until + "dashboardEntriesLimit" is reached. + + * Fix a regression in Net/DNSBL regarding + serendipity_event_spamblock_rbl and + serendipity_event_spamblock_surbl by adding Net/DNS2 1.4.3 as a + bundled library to core and patching Net/DNSBL (#497) + + * Add a "delete" button to the backend entry form (#491, #494) + + * Change Spartacus default mirror to github (#489) + +Version 2.1.1 (April 9th, 2017) +------------------------------------------------------------------------ + + * Fixed a regression issue where configuration variables could not + properly be stored when they were set to false. + +Version 2.1.0 (April 8th, 2017) +------------------------------------------------------------------------ + + * Some more PHP7 error catching + + * Fix missing token when updating plugin + + * Fix missing variable name in regular expression match, Issue #442 + +Version 2.1-rc1 (January 26th, 2017) +------------------------------------------------------------------------ + + * Fix issue #437 - Remove the hardcoded media filter only_filename + input field and re-allow the $order_fields['i.name']. + + * Issue #430, fix proper name of new feedShowMail configuration var + in rss.php for showing mail addresses + + * [Security] Enhance CSRF-Tokens for toggling/moderating comments + + * Allow to set a default category for authors (personal preferences) + + * Changed how the hidden password element is displayed to prevent + browsers from autofilling it into the entryproperties plugin + + * [Security] Enhanced media upload check to also check redirects + for local files, thanks to Xu Yue (again!) + + * [Security] Prevent XSS in adding category and directory names, + thanks to Edric Teo @smarterbitbybit. + + * [Security] For multi-deletion of entries, secure the HTTP referrer + output to prevent XSS (Issue #435) + + * [Security] Reject %0D/%0A in exit tracking and other places + (Issue #434) + + * [Security] Redirection of comment.php now checks the referrer + and only allows the blog's host (thanks to Lee Sheldon Victor) + + * [Security] Fix missing integer casting for inserting new categories + (thanks to cdxy) + + * Disabled Selenium test files unless enabled + +Version 2.1-beta2 (September 26th, 2016) +------------------------------------------------------------------------ + * Improved backend accessibility by hiding iconfont icons for + screenreaders (using aria-hidden). + + * Replaced the JS-based equal height solution in the backend with + a modern CSS-only solution based on Flexbox for browsers that + support it. (Browsers that do not support Flexbox or that only + support outdated versions of Flexbox get the old JS solution as + a fallback.) + + * [Security] Prevent moving files by using their directory name. + [Security] Possible SQL injection for entry category assignment + [Security] Possible SQL injection for removing&adding a plugin + + All issues require a valid backend login. + Thanks to Hendrik Buchwald for finding this via their + RIPS source code analyzer (www.ripstech.com) + + * [Security] Add new configuration option to enable fetching + local files for the media uploader. By default this is now + disabled to prevent Server Side Request Forgery (SSRF). + Thanks to Xu Yue for pointing this out! + + * Added new API wrapper serendipity_request_url() to request URLs. + Currently uses HTTP_Request2, might change to curl or others in + the future, but irrelevant to plugins using this function. + + * Removed outdated themes blue, carl_contest, kubrick and wp. They + live on Spartacus now. + + * Added new theme "Skeleton". Skeleton is a responsive, mobile first + HTML5/CSS3 theme built on the Skeleton framework. + + * Fix comaptibility bug preventing Internet Explorer (+Edge) to + clear the entry editor cache when saving an entry + + * Remove backend js from preview_iframe.tpls, makeing entry previews + faster, more accurate and more reliable + + * Introduce new plugin api function + $plugin->getFile($filename, $key = 'serendipityPath'). Other + than parseTemplate($filename) it will not parse the found file + via smarty, and it allows directories inside $filename. Intended + use is finding files like images via the fallback chain, giving + themes the chance to serve custom versions instead. + + * Give theme authors the option to force using a template file from + the frontend, {getFile file=... frontend=true} + + * Fix entry preview by making sure it always uses the correct + template files to generate preview, replacing internal magic + with direct parameters + + * Rewrite and simplification of the file fallback chain in + serendipity_getTemplateFile. Removes templates/default/ from + from the chain, as it was replaced by templates/2k11/ + +Version 2.1-beta1 (June 8th, 2016) +------------------------------------------------------------------------ + + * Added new theme "Timeline". Timeline is a fully responsive, + mobile first HTML5/CSS3 theme built on the Bootstrap + framework. + + * Add new config variable $serendipity['cors'] to allow to set + Access-Control-Allow-Origin: * headers for sensible places + (RSS feeds), to i.e. allow JavaScript's XMLHTTPRequest to read + those feeds. + + * Introduce a section with modern recommended themes in the + themes backend menu. Themes can be included there by setting + Recommended: Yes in their info.txt + + * Merge sidebar and event upgrade pages in one single page + button + + * Add colorpicker as possible plugin option item type, set + type to 'color' to use it + + * Comments made via the backend on own articles don't trigger + the comment notification (thanks to xoxys) + + * Fix missing perm checks for "standard user" in MediaLibrary + + * Fix show Dashboard entries by authors entries + + * Fix show Dashboard comments by authors entries (#385) + * Use CDATA encoded body for ATOM feed * Fix: Ajax upload to ML now also works for non-images - * Added new theme "Clean-Blog". Clean Blog is a fully responsive, + * Added new theme "Clean-Blog". Clean Blog is a fully responsive, mobile first HTML5/CSS3 theme built on the Bootstrap framework. @@ -118,9 +294,9 @@ Version 2.0.3 (January 4th, 2016) * Fix XSS in backend comment editing form for logged-in authors, thanks to Onur Yilmaz and Robert Abela from Netsparker.com - + * Fix some backend entry form related event messages - + Version 2.0.2 (July 24th, 2015) ------------------------------------------------------------------------ @@ -132,7 +308,7 @@ Version 2.0.2 (July 24th, 2015) you have possible untrustworthy authors) - Add proper escaping for comment approval tokens to prevent SQL injection (authenticated authors only) - - Add proper escaping of comment's author names in the + - Add proper escaping of comment's author names in the comment reply form to prevent XSS (2k11 template, javascript based) @@ -164,7 +340,7 @@ Version 2.0.2 (July 24th, 2015) PLEASE NOTE: - 2.0.1 brought in an automatted include of a themes "user.css" + 2.0.1 brought in an automated include of a themes "user.css" file. If you don't want to use such file any more (and you have one), you will have to delete or rename it by hand! @@ -327,7 +503,7 @@ Version 2.0-rc2 (December 23rd, 2014) ------------------------------------------------------------------------ * Fixes escaping of comments in the new backend pane to prevent - XSS. Thanks to Steffen R�emann for reporting! + XSS. Thanks to Steffen R�emann for reporting! * Fix wrong parameter count in serendipity_entity_decode @@ -913,7 +1089,7 @@ Version 1.7 (May 11th, 2013) add that to .tpl files. (garvinhicking) - * Patch by Markus Br�kner: Properly handle files that have no + * Patch by Markus Br�kner: Properly handle files that have no extension in media database * Made Spartacus recognize github.com mirror (garvinhicking) diff --git a/docs/README b/docs/README index 610e8aac..36fcf47e 100644 --- a/docs/README +++ b/docs/README @@ -1,6 +1,5 @@ -####################################################################### -# README # -####################################################################### +README +------ -For the most up-to-date information on documentation, creating styles, -plugins and so on, please visit our wiki on http://www.s9y.org +For the most up-to-date information on documentation, creating styles, plugins +and so on, please visit our website on https://s9y.org \ No newline at end of file diff --git a/docs/RELEASE b/docs/RELEASE index d3391ebc..be245ae1 100644 --- a/docs/RELEASE +++ b/docs/RELEASE @@ -1,2 +1,2 @@ -stable:2.0.3 -beta:2.0.3 +stable:2.1.1 +beta:2.1.1 diff --git a/htmlarea/ckeditor_s9y_config.js b/htmlarea/ckeditor_s9y_config.js index 59af1846..b973bbe9 100644 --- a/htmlarea/ckeditor_s9y_config.js +++ b/htmlarea/ckeditor_s9y_config.js @@ -154,7 +154,7 @@ CKEDITOR.editorConfig = function( config ) { /** SECTION: Certain Plugin Buttons We cheat ckeditor instances by adding all available button names (in s9ypluginbuttons) to "both" toolbar instances, in case of having two textareas. - The instanciation will only take the ones being currently initiated in wysiwyg_init.tpl output, in the source code. + The instantiation will only take the ones being currently initiated in wysiwyg_init.tpl output, in the source code. The hooked and added extraPlugins in wysiwyg_init become not automatically true for preset toolbars (Basic, Standard, Full) like this, but do for the fallback toolbarGroups later on. */ // concat button arrays diff --git a/htmlarea/ckeditor_s9y_plugin.js b/htmlarea/ckeditor_s9y_plugin.js index 1632ec1d..476a6931 100644 --- a/htmlarea/ckeditor_s9y_plugin.js +++ b/htmlarea/ckeditor_s9y_plugin.js @@ -12,7 +12,7 @@ var s9ymediabuttons = []; // Init CKEDITOR added plugins - // Seperate by comma, no whitespace allowed, and keep last comma, since later on concatenated with Serendipity hooked plugins, eg MediaLibrary! + // Separate by comma, no whitespace allowed, and keep last comma, since later on concatenated with Serendipity hooked plugins, eg MediaLibrary! // For some CKEDITOR plugin you need the widget plugin, which is added here. // Plugin Dependencies: widget Add-on Dependencies: Line Utilities and Clipboard // mediaembed is a fast and simple YouTube code CKEditor-Plugin: v. 0.5+ (https://github.com/frozeman/MediaEmbed, 2013-09-12) to avoid ACF restrictions @@ -66,7 +66,7 @@ element.attributes.style = element.attributes.style.replace( /(?:^|\s)height\s*:\s*(\d+)px;?/i , '' ); //element.attributes.height = height; // Do not add to element attribute height, since then the height will be automatically (re-) added to style again by ckeditor or image js - // The current result is now: img alt class src style{width}. That is the only working state to get arround this issue in a relative simple way! + // The current result is now: img alt class src style{width}. That is the only working state to get around this issue in a relative simple way! // Remember: Turning ACF OFF, will leave code alone, but still removes the height="" attribute! (workaround in extraAllowedContent added img[height]!) } } diff --git a/include/admin/comments.inc.php b/include/admin/comments.inc.php index dab1942f..f4c75bc7 100644 --- a/include/admin/comments.inc.php +++ b/include/admin/comments.inc.php @@ -4,32 +4,28 @@ if (IN_serendipity !== true) { die ("Don't hack!"); } -if (!serendipity_checkPermission('adminComments')) { - return; -} - $data = array(); $commentsPerPage = (int)(!empty($serendipity['GET']['filter']['perpage']) ? $serendipity['GET']['filter']['perpage'] : 10); $summaryLength = 200; -$errormsg = ''; -$msg = ''; +$errormsg = array(); +$msg = array(); if ($serendipity['POST']['formAction'] == 'multiDelete' && sizeof($serendipity['POST']['delete']) != 0 && serendipity_checkFormToken()) { if ($serendipity['POST']['togglemoderate'] != '') { foreach ( $serendipity['POST']['delete'] as $k => $v ) { $ac = serendipity_approveComment((int)$k, (int)$v, false, 'flip'); if ($ac > 0) { - $msg .= DONE . ': '. sprintf(COMMENT_APPROVED, (int)$k); + $msg[] = DONE . ': '. sprintf(COMMENT_APPROVED, (int)$k); } else { - $msg .= DONE . ': '. sprintf(COMMENT_MODERATED, (int)$k); + $msg[] = DONE . ': '. sprintf(COMMENT_MODERATED, (int)$k); } } } else { foreach ( $serendipity['POST']['delete'] as $k => $v ) { serendipity_deleteComment($k, $v); - $msg .= DONE . ': '. sprintf(COMMENT_DELETED, (int)$k); + $msg[] = DONE . ': '. sprintf(COMMENT_DELETED, (int)$k); } } } @@ -48,7 +44,7 @@ if (isset($serendipity['GET']['adminAction']) && $serendipity['GET']['adminActio entry_id = " . (int)$serendipity['POST']['entry_id']; serendipity_db_query($sql); serendipity_plugin_api::hook_event('backend_updatecomment', $serendipity['POST'], $serendipity['GET']['id']); - $msg .= COMMENT_EDITED; + $msg[] = COMMENT_EDITED; } /* Submit a new comment */ @@ -60,17 +56,18 @@ if (isset($serendipity['GET']['adminAction']) && $serendipity['GET']['adminActio $comment['email'] = $serendipity['POST']['email']; $comment['subscribe'] = $serendipity['POST']['subscribe']; $comment['parent_id'] = $serendipity['POST']['replyTo']; + if (!empty($comment['comment'])) { if (serendipity_saveComment($serendipity['POST']['entry_id'], $comment, 'NORMAL')) { $data['commentReplied'] = true; echo serendipity_smarty_show('admin/comments.inc.tpl', $data); return true; } else { - $errormsg .= COMMENT_NOT_ADDED; + $errormsg[] = COMMENT_NOT_ADDED; $serendipity['GET']['adminAction'] = 'reply'; } } else { - $errormsg .= COMMENT_NOT_ADDED; + $errormsg[] = COMMENT_NOT_ADDED; $serendipity['GET']['adminAction'] = 'reply'; } } @@ -85,10 +82,10 @@ if (isset($serendipity['GET']['adminAction']) && $serendipity['GET']['adminActio $rs = serendipity_db_query($sql, true); if ($rs === false) { - $errormsg .= ERROR .': '. sprintf(COMMENT_ALREADY_APPROVED, (int)$serendipity['GET']['id']); + $errormsg[] = ERROR .': '. sprintf(COMMENT_ALREADY_APPROVED, (int)$serendipity['GET']['id']); } else { serendipity_approveComment((int)$serendipity['GET']['id'], (int)$rs['entry_id']); - $msg .= DONE . ': '. sprintf(COMMENT_APPROVED, (int)$serendipity['GET']['id']); + $msg[] = DONE . ': '. sprintf(COMMENT_APPROVED, (int)$serendipity['GET']['id']); } } @@ -101,17 +98,17 @@ if (isset($serendipity['GET']['adminAction']) && $serendipity['GET']['adminActio $rs = serendipity_db_query($sql, true); if ($rs === false) { - $errormsg .= ERROR .': '. sprintf(COMMENT_ALREADY_APPROVED, (int)$serendipity['GET']['id']); + $errormsg[] = ERROR .': '. sprintf(COMMENT_ALREADY_APPROVED, (int)$serendipity['GET']['id']); } else { serendipity_approveComment((int)$serendipity['GET']['id'], (int)$rs['entry_id'], true, true); - $msg .= DONE . ': '. sprintf(COMMENT_MODERATED, (int)$serendipity['GET']['id']); + $msg[] = DONE . ': '. sprintf(COMMENT_MODERATED, (int)$serendipity['GET']['id']); } } /* We are asked to delete a comment */ if (isset($serendipity['GET']['adminAction']) && $serendipity['GET']['adminAction'] == 'delete' && serendipity_checkFormToken()) { serendipity_deleteComment($serendipity['GET']['id'], $serendipity['GET']['entry_id']); - $msg .= DONE . ': '. sprintf(COMMENT_DELETED, (int)$serendipity['GET']['id']); + $msg[] = DONE . ': '. sprintf(COMMENT_DELETED, (int)$serendipity['GET']['id']); } /* We are either in edit mode, or preview mode */ @@ -274,17 +271,19 @@ if ($commentsPerPage == COMMENTS_FILTER_ALL) { $limit = serendipity_db_limit_sql(serendipity_db_limit(($page-1)*(int)$commentsPerPage, (int)$commentsPerPage)); } -$sql = serendipity_db_query("SELECT c.*, e.title FROM {$serendipity['dbPrefix']}comments c - LEFT JOIN {$serendipity['dbPrefix']}entries e ON (e.id = c.entry_id) - WHERE 1 = 1 " . ($c_type !== null ? " AND c.type = '$c_type' " : '') . $and - . (!serendipity_checkPermission('adminEntriesMaintainOthers') ? 'AND e.authorid = ' . (int)$serendipity['authorid'] : '') . " +$sql = serendipity_db_query("SELECT c.*, e.title FROM {$serendipity['dbPrefix']}comments c + LEFT JOIN {$serendipity['dbPrefix']}entries e ON (e.id = c.entry_id) + WHERE 1 = 1 " . ($c_type !== null ? " AND c.type = '$c_type' " : '') . $and + . (!serendipity_checkPermission('adminEntriesMaintainOthers') ? 'AND e.authorid = ' . (int)$serendipity['authorid'] : '') . " ORDER BY c.id DESC $limit"); -ob_start(); -# This event has to get send here so the spamblock-plugin can block an author now and the comment_page show that on this pageload -serendipity_plugin_api::hook_event('backend_comments_top', $sql); -$data['backend_comments_top'] = ob_get_contents(); -ob_end_clean(); +if (serendipity_checkPermission('adminComments')) { + ob_start(); + # This event has to get send here so the spamblock-plugin can block an author now and the comment_page show that on this pageload + serendipity_plugin_api::hook_event('backend_comments_top', $sql); + $data['backend_comments_top'] = ob_get_contents(); + ob_end_clean(); +} $data['commentsPerPage'] = $commentsPerPage; $data['totalComments'] = $totalComments; diff --git a/include/admin/configuration.inc.php b/include/admin/configuration.inc.php index c656b654..c87d9e5e 100644 --- a/include/admin/configuration.inc.php +++ b/include/admin/configuration.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details diff --git a/include/admin/entries.inc.php b/include/admin/entries.inc.php index 2af4a8a0..2ea7812b 100644 --- a/include/admin/entries.inc.php +++ b/include/admin/entries.inc.php @@ -159,7 +159,7 @@ switch($serendipity['GET']['adminAction']) { } // serendipity_updertEntry sets this global variable to store the entry id. Couldn't pass this - // by reference or as return value because it affects too many places inside our API and dependant + // by reference or as return value because it affects too many places inside our API and dependent // function calls. if (!empty($serendipity['lastSavedEntry'])) { $entry['id'] = $serendipity['lastSavedEntry']; @@ -269,7 +269,7 @@ switch($serendipity['GET']['adminAction']) { AND specific_catalog = '" . $serendipity['dbName'] . "'"); if (is_array($r) && $r[0]['counter'] > 0) { $term = str_replace('&', '&', $term); - $filter[] = "( + $filter[] = "( to_tsvector('english', title) @@to_tsquery('$term') OR to_tsvector('english', body) @@to_tsquery('$term') OR to_tsvector('english', extended) @@to_tsquery('$term') @@ -354,7 +354,8 @@ switch($serendipity['GET']['adminAction']) { } } - $smartentries[] = array( + + $smartentry = array( 'id' => $ey['id'], 'title' => serendipity_specialchars($ey['title']), 'timestamp' => (int)$ey['timestamp'], @@ -368,6 +369,8 @@ switch($serendipity['GET']['adminAction']) { 'archive_link' => serendipity_archiveURL($ey['id'], $ey['title'], 'serendipityHTTPPath', true, array('timestamp' => $ey['timestamp'])), 'preview_link' => '?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=preview&' . serendipity_setFormToken('url') . '&serendipity[id]=' . $ey['id'] ); + serendipity_plugin_api::hook_event('backend_view_entry', $smartentry); + $smartentries[] = $smartentry; } @@ -402,7 +405,7 @@ switch($serendipity['GET']['adminAction']) { return; // blank content page, but default token check parameter is presenting a XSRF message when false } if (!is_array($serendipity['POST']['multiDelete'])) { - echo '<div class="msg_notice"><span class="icon-attention-circled"></span> ' . sprintf(MULTICHECK_NO_ITEM, $_SERVER['HTTP_REFERER']) . '</div>'."\n"; + echo '<div class="msg_notice"><span class="icon-attention-circled" aria-hidden="true"></span> ' . sprintf(MULTICHECK_NO_ITEM, serendipity_specialchars($_SERVER['HTTP_REFERER'])) . '</div>'."\n"; break; } @@ -445,4 +448,4 @@ if (!isset($data['formtoken'])) $data['formtoken'] = serendipity_setFormToken(); echo serendipity_smarty_show('admin/entries.inc.tpl', $data); -/* vim: set sts=4 ts=4 expandtab : */ +/* vim: set sts=4 ts=4 expandtab : */ \ No newline at end of file diff --git a/include/admin/entries_overview.inc.php b/include/admin/entries_overview.inc.php index 4a15cea9..9bdc9723 100644 --- a/include/admin/entries_overview.inc.php +++ b/include/admin/entries_overview.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php if (IN_serendipity !== true) { die ('Don\'t hack!'); diff --git a/include/admin/images.inc.php b/include/admin/images.inc.php index b6696ab5..16ff24d9 100644 --- a/include/admin/images.inc.php +++ b/include/admin/images.inc.php @@ -74,7 +74,7 @@ switch ($serendipity['GET']['adminAction']) { $messages = array(); $data['case_do_delete'] = true; $messages[] = serendipity_deleteImage($serendipity['GET']['fid']); - $messages[] = sprintf('<span class="msg_notice"><span class="icon-info-circled"></span> ' . RIP_ENTRY . "</span>\n", $serendipity['GET']['fid']); + $messages[] = sprintf('<span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> ' . RIP_ENTRY . "</span>\n", $serendipity['GET']['fid']); $data['messages'] = $messages; unset($messages); @@ -93,7 +93,7 @@ switch ($serendipity['GET']['adminAction']) { if ($id > 0) { $image = serendipity_fetchImageFromDatabase($id); $messages[] = serendipity_deleteImage((int)$id); - $messages[] = sprintf('<span class="msg_notice"><span class="icon-info-circled"></span> ' . RIP_ENTRY . "</span>\n", $image['id'] . ' - ' . serendipity_specialchars($image['realname'])); + $messages[] = sprintf('<span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> ' . RIP_ENTRY . "</span>\n", $image['id'] . ' - ' . serendipity_specialchars($image['realname'])); } } $data['showML'] = showMediaLibrary(); @@ -120,37 +120,33 @@ switch ($serendipity['GET']['adminAction']) { break; case 'multidelete': - if (!serendipity_checkFormToken()) { + if (!serendipity_checkFormToken() || !serendipity_checkPermission('adminImagesDirectories')) { return; // blank content page, but default token check parameter is presenting a XSRF message when false } if (!is_array($serendipity['POST']['multiDelete']) && isset($_POST['toggle_move'])) { - echo '<div class="msg_notice"><span class="icon-attention-circled"></span> ' . sprintf(MULTICHECK_NO_ITEM, $_SERVER['HTTP_REFERER']) . '</div>'."\n"; + echo '<div class="msg_notice"><span class="icon-attention-circled" aria-hidden="true"></span> ' . sprintf(MULTICHECK_NO_ITEM, $_SERVER['HTTP_REFERER']) . '</div>'."\n"; break; } - if (is_array($serendipity['POST']['multiDelete']) && isset($serendipity['POST']['oldDir']) && empty($serendipity['POST']['newDir']) && isset($_POST['toggle_move'])) { - echo '<div class="msg_notice"><span class="icon-attention-circled"></span> ' . sprintf(MULTICHECK_NO_DIR, $_SERVER['HTTP_REFERER']) . '</div>'."\n"; + if (is_array($serendipity['POST']['multiDelete']) && isset($serendipity['POST']['oldDir']) && (! isset($serendipity['POST']['newDir'])) && isset($_POST['toggle_move'])) { + echo '<div class="msg_notice"><span class="icon-attention-circled" aria-hidden="true"></span> ' . sprintf(MULTICHECK_NO_DIR, $_SERVER['HTTP_REFERER']) . '</div>'."\n"; break; } // case bulk multimove (leave the fake oldDir being send as an empty dir) - if (isset($serendipity['POST']['oldDir']) && !empty($serendipity['POST']['newDir'])) { + if (isset($serendipity['POST']['newDir'])) { $messages = array(); $multiMoveImages = $serendipity['POST']['multiDelete']; // The 'multiDelete' key name should better be renamed to 'multiCheck', but this would need to change 2k11/admin/serendipity_editor.js, images.inc.tpl, media_items.tpl, media_pane.tpl and this file unset($serendipity['POST']['multiDelete']); - $oDir = ''; // oldDir is relative to Uploads/, since we can not specify a directory of a ML bulk move directly - $nDir = serendipity_specialchars((string)$serendipity['POST']['newDir']); // relative to Uploads/ + $nDir = serendipity_specialchars(serendipity_dirSlash('end', (string)$serendipity['POST']['newDir'])); // relative to Uploads/ - if ($oDir != $nDir) { - foreach($multiMoveImages AS $mkey => $move_id) { - $file = serendipity_fetchImageFromDatabase((int)$move_id); - $oDir = $file['path']; // this now is the exact oldDir path of this ID - if (serendipity_moveMediaDirectory($oDir, $nDir, 'file', (int)$move_id, $file)) { - $messages[] = sprintf('<span class="msg_success"><span class="icon-ok-circled"></span> ' . MEDIA_DIRECTORY_MOVED . "</span>\n", $nDir); - } else { - $messages[] = sprintf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . MEDIA_DIRECTORY_MOVE_ERROR . "</span>\n", $nDir); - } + foreach($multiMoveImages AS $mkey => $move_id) { + if (serendipity_moveMediaDirectory('', $nDir, 'file', (int)$move_id)) { + $messages[] = sprintf('<span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> ' . MEDIA_DIRECTORY_MOVED . "</span>\n", $nDir); + } else { + $messages[] = sprintf('<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . MEDIA_DIRECTORY_MOVE_ERROR . "</span>\n", $nDir); } } + $data['messages'] = $messages; unset($messages); // remember to return to last selected media library directory @@ -182,21 +178,10 @@ switch ($serendipity['GET']['adminAction']) { case 'rename': $serendipity['GET']['fid'] = (int)$serendipity['GET']['fid']; - $file = serendipity_fetchImageFromDatabase($serendipity['GET']['fid']); - - if (LANG_CHARSET == 'UTF-8') { - // yeah, turn on content to be a real utf-8 string, which it isn't at this point! Else serendipity_makeFilename() can not work! - $serendipity['GET']['newname'] = utf8_encode($serendipity['GET']['newname']); - } - $serendipity['GET']['newname'] = str_replace(' ', '_', $serendipity['GET']['newname']); // keep serendipity_uploadSecure(URL) whitespace convert behaviour, when using serendipity_makeFilename() - $serendipity['GET']['newname'] = serendipity_uploadSecure(serendipity_makeFilename($serendipity['GET']['newname']), true); - - if (!is_array($file) || !serendipity_checkFormToken() || !serendipity_checkPermission('adminImagesDelete') || - (!serendipity_checkPermission('adminImagesMaintainOthers') && $file['authorid'] != '0' && $file['authorid'] != $serendipity['authorid'])) { + if (!serendipity_checkFormToken() || !serendipity_checkPermission('adminImagesDelete')) { return; } - // since this is a javascript action only, all event success/error action messages have moved into js - serendipity_moveMediaDirectory(null, $serendipity['GET']['newname'], 'file', $serendipity['GET']['fid'], $file); + serendipity_renameFile($serendipity['GET']['fid'], $serendipity['GET']['newname']); break; case 'properties': @@ -218,11 +203,11 @@ switch ($serendipity['GET']['adminAction']) { $created_thumbnail = true; //?? $data['showML'] = showMediaLibrary(true); // in this case we do not need the location.href (removed) $propdone = sprintf(MEDIA_PROPERTIES_DONE, $image_id); - $data['messages'] = '<span class="msg_success"><span class="icon-ok-circled"></span> '.DONE.'! ' . $propdone . "</span>\n"; + $data['messages'] = '<span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> '.DONE.'! ' . $propdone . "</span>\n"; break; } - $messages[] = '<span class="msg_notice"><span class="icon-info-circled"></span> ' . ADDING_IMAGE . "</span>\n"; + $messages[] = '<span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> ' . ADDING_IMAGE . "</span>\n"; $authorid = 0; // Only use access-control based on media directories, not images themselves @@ -249,7 +234,7 @@ switch ($serendipity['GET']['adminAction']) { $tfile = serendipity_uploadSecure(serendipity_makeFilename($tfile)); if (serendipity_isActiveFile($tfile)) { - $messages[] = sprintf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_FILE_FORBIDDEN . "</span>\n", $tfile); + $messages[] = sprintf('<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . ERROR_FILE_FORBIDDEN . "</span>\n", $tfile); break; } @@ -257,70 +242,86 @@ switch ($serendipity['GET']['adminAction']) { $target = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $serendipity['POST']['target_directory'][$tindex] . $tfile; if (!serendipity_checkDirUpload($serendipity['POST']['target_directory'][$tindex])) { - $messages[] = '<span class="msg_error"><span class="icon-attention-circled"></span> ' . PERM_DENIED . "</span>\n"; + $messages[] = '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . PERM_DENIED . "</span>\n"; return; } $realname = $tfile; if (file_exists($target)) { - $messages[] = '<span class="msg_error"><span class="icon-attention-circled"></span> ' . $target . ' - ' . ERROR_FILE_EXISTS_ALREADY . "</span>\n"; + $messages[] = '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . $target . ' - ' . ERROR_FILE_EXISTS_ALREADY . "</span>\n"; $realname = serendipity_imageAppend($tfile, $target, $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $serendipity['POST']['target_directory'][$tindex]); } - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; - $options = array('allowRedirects' => true, 'maxRedirects' => 5); + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; + $options = array('follow_redirects' => true, 'max_redirects' => 5); serendipity_plugin_api::hook_event('backend_http_request', $options, 'image'); serendipity_request_start(); - $req = new HTTP_Request($serendipity['POST']['imageurl'], $options); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } - // Try to get the URL - if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') { - $messages[] = sprintf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . REMOTE_FILE_NOT_FOUND . "</span>\n", $serendipity['POST']['imageurl']); + if (!serendipity_url_allowed($serendipity['POST']['imageurl'])) { + $messages[] = sprintf('<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . REMOTE_FILE_INVALID . "</span>\n", $serendipity['POST']['imageurl']); } else { - // Fetch file - $fContent = $req->getResponseBody(); + $req = new HTTP_Request2($serendipity['POST']['imageurl'], HTTP_Request2::METHOD_GET, $options); - if ($serendipity['POST']['imageimporttype'] == 'hotlink') { - $tempfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . '/hotlink_' . time(); - $fp = fopen($tempfile, 'w'); - fwrite($fp, $fContent); - fclose($fp); - - $image_id = @serendipity_insertHotlinkedImageInDatabase($tfile, $serendipity['POST']['imageurl'], $authorid, null, $tempfile); - $messages[] = sprintf('<span class="msg_success"><span class="icon-ok-circled"></span> ' . HOTLINK_DONE . "</span>\n", $serendipity['POST']['imageurl'] , $tfile .''); - serendipity_plugin_api::hook_event('backend_image_addHotlink', $tempfile); - } else { - $fp = fopen($target, 'w'); - fwrite($fp, $fContent); - fclose($fp); - - $messages[] = sprintf('<span class="msg_success"><span class="icon-ok-circled"></span> ' . FILE_FETCHED . "</span>\n", $serendipity['POST']['imageurl'] , $tfile . ''); - - if (serendipity_checkMediaSize($target)) { - $thumbs = array(array( - 'thumbSize' => $serendipity['thumbSize'], - 'thumb' => $serendipity['thumbSuffix'] - )); - serendipity_plugin_api::hook_event('backend_media_makethumb', $thumbs); - - foreach($thumbs as $thumb) { - // Create thumbnail - if ( $created_thumbnail = serendipity_makeThumbnail($tfile, $serendipity['POST']['target_directory'][$tindex], $thumb['thumbSize'], $thumb['thumb']) ) { - $messages[] = '<span class="msg_success"><span class="icon-ok-circled"></span> ' . THUMB_CREATED_DONE . "</span>\n"; - } - } - - // Insert into database - $image_id = serendipity_insertImageInDatabase($tfile, $serendipity['POST']['target_directory'][$tindex], $authorid, null, $realname); - serendipity_plugin_api::hook_event('backend_image_add', $target); - $new_media[] = array( - 'image_id' => $image_id, - 'target' => $target, - 'created_thumbnail' => $created_thumbnail - ); + // Try to get the URL + try { + $response = $req->send(); + if ($response->getStatus() != '200') { + throw new HTTP_Request2_Exception('could not fetch image: status != 200'); } + // Fetch file + $fContent = $response->getBody(); + + $fUrl = $response->getEffectiveUrl(); + if (!serendipity_url_allowed($fUrl)) { + $messages[] = sprintf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . REMOTE_FILE_INVALID . "</span>\n", $fUrl); + } elseif ($serendipity['POST']['imageimporttype'] == 'hotlink') { + $tempfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . '/hotlink_' . time(); + $fp = fopen($tempfile, 'w'); + fwrite($fp, $fContent); + fclose($fp); + + $image_id = @serendipity_insertHotlinkedImageInDatabase($tfile, $serendipity['POST']['imageurl'], $authorid, null, $tempfile); + $messages[] = sprintf('<span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> ' . HOTLINK_DONE . "</span>\n", $serendipity['POST']['imageurl'] , $tfile .''); + serendipity_plugin_api::hook_event('backend_image_addHotlink', $tempfile); + } else { + $fp = fopen($target, 'w'); + fwrite($fp, $fContent); + fclose($fp); + + $messages[] = sprintf('<span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> ' . FILE_FETCHED . "</span>\n", $serendipity['POST']['imageurl'] , $tfile . ''); + + if (serendipity_checkMediaSize($target)) { + $thumbs = array(array( + 'thumbSize' => $serendipity['thumbSize'], + 'thumb' => $serendipity['thumbSuffix'] + )); + serendipity_plugin_api::hook_event('backend_media_makethumb', $thumbs, $tfile); + + foreach($thumbs as $thumb) { + // Create thumbnail + if ( $created_thumbnail = serendipity_makeThumbnail($tfile, $serendipity['POST']['target_directory'][$tindex], $thumb['thumbSize'], $thumb['thumb']) ) { + $messages[] = '<span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> ' . THUMB_CREATED_DONE . "</span>\n"; + } + } + + // Insert into database + $image_id = serendipity_insertImageInDatabase($tfile, $serendipity['POST']['target_directory'][$tindex], $authorid, null, $realname); + serendipity_plugin_api::hook_event('backend_image_add', $target); + $new_media[] = array( + 'image_id' => $image_id, + 'target' => $target, + 'created_thumbnail' => $created_thumbnail + ); + } + } + serendipity_request_end(); + } catch (HTTP_Request2_Exception $e) { + $messages[] = sprintf('<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . REMOTE_FILE_NOT_FOUND . "</span>\n", $serendipity['POST']['imageurl']); } - serendipity_request_end(); } } else { if (!is_array($_FILES['serendipity']['name']['userfile'])) { @@ -352,14 +353,14 @@ switch ($serendipity['GET']['adminAction']) { $tfile = serendipity_uploadSecure(serendipity_makeFilename($tfile)); if (serendipity_isActiveFile($tfile)) { - $messages[] = '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_FILE_FORBIDDEN .' '. $tfile . "</span>\n"; + $messages[] = '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . ERROR_FILE_FORBIDDEN .' '. $tfile . "</span>\n"; continue; } $serendipity['POST']['target_directory'][$idx] = serendipity_uploadSecure($serendipity['POST']['target_directory'][$idx], true, true); if (!serendipity_checkDirUpload($serendipity['POST']['target_directory'][$idx])) { - $messages[] = '<span class="msg_error"><span class="icon-attention-circled"></span> ' . PERM_DENIED . "</span>\n"; + $messages[] = '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . PERM_DENIED . "</span>\n"; continue; } @@ -367,13 +368,13 @@ switch ($serendipity['GET']['adminAction']) { $realname = $tfile; if (file_exists($target)) { - $messages[] = '<span class="msg_error"><span class="icon-attention-circled"></span> ' . $target . ' - ' . ERROR_FILE_EXISTS_ALREADY . "</span>\n"; + $messages[] = '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . $target . ' - ' . ERROR_FILE_EXISTS_ALREADY . "</span>\n"; $realname = serendipity_imageAppend($tfile, $target, $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $serendipity['POST']['target_directory'][$idx]); } // Accept file if (is_uploaded_file($uploadtmp) && serendipity_checkMediaSize($uploadtmp) && move_uploaded_file($uploadtmp, $target)) { - $messages[] = sprintf('<span class="msg_success"><span class="icon-ok-circled"></span> ' . FILE_UPLOADED . "</span>\n", $uploadfile , $target); + $messages[] = sprintf('<span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> ' . FILE_UPLOADED . "</span>\n", $uploadfile , $target); @umask(0000); @chmod($target, 0664); @@ -381,12 +382,12 @@ switch ($serendipity['GET']['adminAction']) { 'thumbSize' => $serendipity['thumbSize'], 'thumb' => $serendipity['thumbSuffix'] )); - serendipity_plugin_api::hook_event('backend_media_makethumb', $thumbs); + serendipity_plugin_api::hook_event('backend_media_makethumb', $thumbs, $target); foreach($thumbs as $thumb) { // Create thumbnail if ( $created_thumbnail = serendipity_makeThumbnail($tfile, $serendipity['POST']['target_directory'][$idx], $thumb['thumbSize'], $thumb['thumb']) ) { - $messages[] = '<span class="msg_success"><span class="icon-ok-circled"></span> ' . THUMB_CREATED_DONE . "</span>\n"; + $messages[] = '<span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> ' . THUMB_CREATED_DONE . "</span>\n"; } } @@ -401,7 +402,7 @@ switch ($serendipity['GET']['adminAction']) { } else { // necessary for the ajax-uplaoder to show upload errors header("Internal Server Error", true, 500); - $messages[] = '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_UNKNOWN_NOUPLOAD . "</span>\n"; + $messages[] = '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . ERROR_UNKNOWN_NOUPLOAD . "</span>\n"; } } } @@ -476,7 +477,7 @@ switch ($serendipity['GET']['adminAction']) { if ($oldDir != $newDir) { //is this possible? Ian: YES! Change an already set directory. ob_start(); - serendipity_moveMediaDirectory($oldDir, $newDir); + serendipity_renameDir($oldDir, $newDir); $data['messages'] = ob_get_contents(); ob_end_clean(); $use_dir = $newDir; @@ -534,7 +535,7 @@ switch ($serendipity['GET']['adminAction']) { /* TODO: check if directory already exist */ if (is_dir($nd) || @mkdir($nd)) { - $data['print_DIRECTORY_CREATED'] = sprintf(DIRECTORY_CREATED, $serendipity['POST']['name']); + $data['print_DIRECTORY_CREATED'] = sprintf(DIRECTORY_CREATED, $new_dir); @umask(0000); @chmod($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $new_dir, 0777); @@ -635,7 +636,8 @@ switch ($serendipity['GET']['adminAction']) { 'maxImgHeight' => $serendipity['maxImgHeight'], 'maxImgWidth' => $serendipity['maxImgWidth'], 'extraParems' => serendipity_generateImageSelectorParems(), - 'manage' => isset($serendipity['GET']['showMediaToolbar']) ? serendipity_db_bool($serendipity['GET']['showMediaToolbar']) : true + 'manage' => isset($serendipity['GET']['showMediaToolbar']) ? serendipity_db_bool($serendipity['GET']['showMediaToolbar']) : true, + 'multiperm' => serendipity_checkPermission('adminImagesDirectories') ); // ToDo later: merge $data and $media $serendipity['smarty']->assign('media', $mediaFiles); @@ -685,7 +687,7 @@ switch ($serendipity['GET']['adminAction']) { $data['case_scale'] = true; // this allows to use the showML fallback too if ($serendipity['GET']['width'] == $file['dimensions_width'] && $serendipity['GET']['height'] == $file['dimensions_height']) { - $data['messages'] = '<span class="msg_notice"><span class="icon-info-circled"></span> ' . MEDIA_RESIZE_EXISTS . '</span>'; + $data['messages'] = '<span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> ' . MEDIA_RESIZE_EXISTS . '</span>'; } else { $data['print_SCALING_IMAGE'] = sprintf( SCALING_IMAGE, @@ -710,7 +712,7 @@ switch ($serendipity['GET']['adminAction']) { if (!is_array($file) || !serendipity_checkPermission('adminImagesDelete') || (!serendipity_checkPermission('adminImagesMaintainOthers') && $file['authorid'] != '0' && $file['authorid'] != $serendipity['authorid'])) { return; } - + $data['extraParems'] = serendipity_generateImageSelectorParems('form'); $data['case_scaleSelect'] = true; $s = getimagesize($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file['path'] . $file['name'] . ($file['extension'] ? '.'. $file['extension'] : "")); @@ -771,4 +773,4 @@ $data['get']['only_path'] = $serendipity['GET']['only_path']; echo serendipity_smarty_show('admin/images.inc.tpl', $data); -/* vim: set sts=4 ts=4 expandtab : */ +/* vim: set sts=4 ts=4 expandtab : */ \ No newline at end of file diff --git a/include/admin/import.inc.php b/include/admin/import.inc.php index 61e517cf..943c5988 100644 --- a/include/admin/import.inc.php +++ b/include/admin/import.inc.php @@ -162,8 +162,8 @@ class Serendipity_Import { * * @access public * @param string SQL Query - * @param ressource DB connection resource - * @return ressource SQL response + * @param resource DB connection resource + * @return resource SQL response */ function &nativeQuery($query, $db = false) { global $serendipity; diff --git a/include/admin/importers/b2evolution.inc.php b/include/admin/importers/b2evolution.inc.php index bb261bc6..c58e73a5 100644 --- a/include/admin/importers/b2evolution.inc.php +++ b/include/admin/importers/b2evolution.inc.php @@ -16,7 +16,7 @@ class Serendipity_Import_b2evolution extends Serendipity_Import { return ''; } - function Serendipity_Import_b2evolution($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/bblog.inc.php b/include/admin/importers/bblog.inc.php index f660c56a..7e2d802f 100644 --- a/include/admin/importers/bblog.inc.php +++ b/include/admin/importers/bblog.inc.php @@ -12,7 +12,7 @@ class Serendipity_Import_bblog extends Serendipity_Import { var $inputFields = array(); var $categories = array(); - function Serendipity_Import_bblog($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/blogger.inc.php b/include/admin/importers/blogger.inc.php index 18b3d8a3..e095bece 100644 --- a/include/admin/importers/blogger.inc.php +++ b/include/admin/importers/blogger.inc.php @@ -6,14 +6,14 @@ * Blogger Importer v0.2, by Jawish Hameed (jawish.org) * ****************************************************************/ -require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; +require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; class Serendipity_Import_Blogger extends Serendipity_Import { var $info = array('software' => 'Blogger.com [using API]'); var $data = array(); var $inputFields = array(); - function Serendipity_Import_Blogger($data) { + function __construct($data) { global $serendipity; $this->data = $data; @@ -56,17 +56,22 @@ class Serendipity_Import_Blogger extends Serendipity_Import { if (!empty($_REQUEST['token'])) { // Prepare session token request - $req = new HTTP_Request('https://www.google.com/accounts/AuthSubSessionToken'); - $req->addHeader('Authorization', 'AuthSub token="'. $_REQUEST['token'] .'"'); + $options = array(); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2('https://www.google.com/accounts/AuthSubSessionToken', HTTP_Request2::METHOD_GET, $options); + $req->setHeader('Authorization', 'AuthSub token="'. $_REQUEST['token'] .'"'); // Request token - $req->sendRequest(); + $response = $req->send(); - // Handle token reponse - if ($req->getResponseCode() != '200') return; + // Handle token response + if ($response->getStatus() != '200') return; // Extract Auth token - preg_match_all('/^(.+)=(.+)$/m', $req->getResponseBody(), $matches); + preg_match_all('/^(.+)=(.+)$/m', $response->getBody(), $matches); $tokens = array_combine($matches[1], $matches[2]); unset($matches); @@ -77,18 +82,18 @@ class Serendipity_Import_Blogger extends Serendipity_Import { 'default' => $tokens['Token'])); // Prepare blog list request - $req = new HTTP_Request('http://www.blogger.com/feeds/default/blogs'); - $req->addHeader('GData-Version', 2); - $req->addHeader('Authorization', 'AuthSub token="'. $tokens['Token'] .'"'); + $req = new HTTP_Request2('http://www.blogger.com/feeds/default/blogs'); + $req->setHeader('GData-Version', 2); + $req->setHeader('Authorization', 'AuthSub token="'. $tokens['Token'] .'"'); // Fetch blog list - $req->sendRequest(); + $response = $req->send(); // Handle errors - if ($req->getResponseCode() != '200') return false; + if ($response->getStatus() != '200') return false; // Load list - $bXml = simplexml_load_string($req->getResponseBody()); + $bXml = simplexml_load_string($response->getBody()); // Generate list of the blogs under the authenticated account $bList = array(); @@ -139,16 +144,16 @@ class Serendipity_Import_Blogger extends Serendipity_Import { $this->getTransTable(); // Prepare export request - $req = new HTTP_Request('http://www.blogger.com/feeds/'. $this->data['bId'] .'/archive'); - $req->addHeader('GData-Version', 2); - $req->addHeader('Authorization', 'AuthSub token="'. $this->data['bAuthToken'] .'"'); + $req = new HTTP_Request2('http://www.blogger.com/feeds/'. $this->data['bId'] .'/archive'); + $req->setHeader('GData-Version', 2); + $req->setHeader('Authorization', 'AuthSub token="'. $this->data['bAuthToken'] .'"'); // Attempt fetch blog export - $req->sendRequest(); + $response = $req->send(); // Handle errors - if ($req->getResponseCode() != '200') { - echo "Error occured while trying to export the blog."; + if ($response->getStatus() != '200') { + echo "Error occurred while trying to export the blog."; return false; } @@ -164,7 +169,7 @@ class Serendipity_Import_Blogger extends Serendipity_Import { unset($s9y_users); // Load export - $bXml = simplexml_load_string($req->getResponseBody()); + $bXml = simplexml_load_string($response->getBody()); // Process entries $entryList = $entryFailList = array(); diff --git a/include/admin/importers/bmachine.inc.php b/include/admin/importers/bmachine.inc.php index 2aed03da..4e3d61be 100644 --- a/include/admin/importers/bmachine.inc.php +++ b/include/admin/importers/bmachine.inc.php @@ -16,7 +16,7 @@ class Serendipity_Import_bmachine extends Serendipity_Import { return ''; } - function Serendipity_Import_bmachine($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/geeklog.inc.php b/include/admin/importers/geeklog.inc.php index bd21bb93..cbb144df 100644 --- a/include/admin/importers/geeklog.inc.php +++ b/include/admin/importers/geeklog.inc.php @@ -16,7 +16,7 @@ class Serendipity_Import_geeklog extends Serendipity_Import { return 'GeekLog has a granular control over access privileges which cannot be migrated to Serendipity. All Users will be migrated as Superusers, you may need to set them to editor or chief users manually after import.'; } - function Serendipity_Import_geeklog($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/generic.inc.php b/include/admin/importers/generic.inc.php index 27aeaedd..bfaa2f6c 100644 --- a/include/admin/importers/generic.inc.php +++ b/include/admin/importers/generic.inc.php @@ -10,7 +10,7 @@ class Serendipity_Import_Generic extends Serendipity_Import { var $inputFields = array(); var $force_recode = false; - function Serendipity_Import_Generic($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => RSS . ' ' . URL, 'type' => 'input', @@ -139,18 +139,26 @@ class Serendipity_Import_Generic extends Serendipity_Import { $serendipity['noautodiscovery'] = 1; $uri = $this->data['url']; - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; serendipity_request_start(); - $req = new HTTP_Request($uri, array('allowRedirects' => true, 'maxRedirects' => 5)); - $res = $req->sendRequest(); - - if (PEAR::isError($res) || $req->getResponseCode() != '200') { + $options = array('follow_redirects' => true, 'max_redirects' => 5); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($uri, HTTP_Request2::METHOD_GET, $options); + try { + $res = $req->send(); + if ($res->getStatus() != '200') { + throw new HTTP_Request2_Exception('could not fetch url: status != 200'); + } + } catch (HTTP_Request2_Exception $e) { serendipity_request_end(); echo '<span class="block_level">' . IMPORT_FAILED . ': ' . serendipity_specialchars($this->data['url']) . '</span>'; return false; } - $fContent = $req->getResponseBody(); + $fContent = $res->getBody(); serendipity_request_end(); echo '<span class="block_level">' . strlen($fContent) . " Bytes</span>"; diff --git a/include/admin/importers/lifetype.inc.php b/include/admin/importers/lifetype.inc.php index 2ea1cef4..10a4c85c 100644 --- a/include/admin/importers/lifetype.inc.php +++ b/include/admin/importers/lifetype.inc.php @@ -16,7 +16,7 @@ class Serendipity_Import_lifetype extends Serendipity_Import { return ''; } - function Serendipity_Import_lifetype($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/livejournal.inc.php b/include/admin/importers/livejournal.inc.php index a2fd6468..a8b7e088 100644 --- a/include/admin/importers/livejournal.inc.php +++ b/include/admin/importers/livejournal.inc.php @@ -11,7 +11,7 @@ class Serendipity_Import_LiveJournalXML extends Serendipity_Import { var $inputFields = array(); var $force_recode = false; - function Serendipity_Import_LiveJournalXML($data) { + function __construct($data) { global $serendipity; $this->data = $data; $this->inputFields = array(array('text' => 'LiveJournal XML', diff --git a/include/admin/importers/movabletype.inc.php b/include/admin/importers/movabletype.inc.php index 6cad6633..f79ce0c3 100644 --- a/include/admin/importers/movabletype.inc.php +++ b/include/admin/importers/movabletype.inc.php @@ -24,7 +24,7 @@ class Serendipity_Import_MovableType extends Serendipity_Import { var $data = array(); var $inputFields = array(); - function Serendipity_Import_MovableType($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => MT_DATA_FILE, 'type' => 'file', diff --git a/include/admin/importers/nucleus.inc.php b/include/admin/importers/nucleus.inc.php index aefff762..2598e058 100644 --- a/include/admin/importers/nucleus.inc.php +++ b/include/admin/importers/nucleus.inc.php @@ -12,7 +12,7 @@ class Serendipity_Import_Nucleus extends Serendipity_Import { var $inputFields = array(); - function Serendipity_Import_Nucleus($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/nuke.inc.php b/include/admin/importers/nuke.inc.php index 47648f3e..c34058ad 100644 --- a/include/admin/importers/nuke.inc.php +++ b/include/admin/importers/nuke.inc.php @@ -16,7 +16,7 @@ class Serendipity_Import_nuke extends Serendipity_Import { return ''; } - function Serendipity_Import_nuke($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/old_blogger.inc.php b/include/admin/importers/old_blogger.inc.php index b0099a54..d8f59e98 100644 --- a/include/admin/importers/old_blogger.inc.php +++ b/include/admin/importers/old_blogger.inc.php @@ -7,7 +7,7 @@ class Serendipity_Import_OldBlogger extends Serendipity_Import { var $data = array(); var $inputFields = array(); - function Serendipity_Import_OldBlogger($data) { + function __construct($data) { global $serendipity; $this->data = $data; diff --git a/include/admin/importers/phpbb.inc.php b/include/admin/importers/phpbb.inc.php index 5c8a35b4..0505930b 100644 --- a/include/admin/importers/phpbb.inc.php +++ b/include/admin/importers/phpbb.inc.php @@ -12,7 +12,7 @@ class Serendipity_Import_phpbb extends Serendipity_Import { var $inputFields = array(); var $categories = array(); - function Serendipity_Import_phpbb($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/pivot.inc.php b/include/admin/importers/pivot.inc.php index cb6a6166..b087062b 100644 --- a/include/admin/importers/pivot.inc.php +++ b/include/admin/importers/pivot.inc.php @@ -10,7 +10,7 @@ class Serendipity_Import_Pivot extends Serendipity_Import { var $data = array(); var $inputFields = array(); - function Serendipity_Import_Pivot($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => PARENT_DIRECTORY, 'type' => 'input', diff --git a/include/admin/importers/pmachine.inc.php b/include/admin/importers/pmachine.inc.php index 751dbcc1..692a9d01 100644 --- a/include/admin/importers/pmachine.inc.php +++ b/include/admin/importers/pmachine.inc.php @@ -12,7 +12,7 @@ class Serendipity_Import_pMachine extends Serendipity_Import { var $inputFields = array(); - function Serendipity_Import_pMachine($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/serendipity.inc.php b/include/admin/importers/serendipity.inc.php index 871b48b2..1be32319 100644 --- a/include/admin/importers/serendipity.inc.php +++ b/include/admin/importers/serendipity.inc.php @@ -24,7 +24,7 @@ class Serendipity_Import_Serendipity extends Serendipity_Import { <p>After these precautions: The importer code generally works very well for me and my purposes. Your mileage may vary.</p>'; } - function Serendipity_Import_Serendipity ($data) { + function __construct($data) { global $serendipity; $this->data = $data; diff --git a/include/admin/importers/smf.inc.php b/include/admin/importers/smf.inc.php index e2690467..28afcede 100644 --- a/include/admin/importers/smf.inc.php +++ b/include/admin/importers/smf.inc.php @@ -16,7 +16,7 @@ class Serendipity_Import_smf extends Serendipity_Import { return '<p>SMF uses salted MD5 passwords that Serendipity cannot import. Thus, those passwords are incompatible with the MD5 hashing of Serendipity. The passwords for all users have been set to a random string. <strong>You need to modify the passwords manually for each user</strong>, we are sorry for that inconvenience.</p>'; } - function Serendipity_Import_smf($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/sunlog.inc.php b/include/admin/importers/sunlog.inc.php index 8a843128..03309d3c 100644 --- a/include/admin/importers/sunlog.inc.php +++ b/include/admin/importers/sunlog.inc.php @@ -17,7 +17,7 @@ class Serendipity_Import_sunlog extends Serendipity_Import { . '<p>Sunlog has a granular control over access privileges which cannot be migrated to Serendipity. All Users will be migrated as Superusers, you may need to set them to editor or chief users manually after import.</p>'; } - function Serendipity_Import_sunlog($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/textpattern.inc.php b/include/admin/importers/textpattern.inc.php index cf7f9dfe..73220eec 100644 --- a/include/admin/importers/textpattern.inc.php +++ b/include/admin/importers/textpattern.inc.php @@ -16,7 +16,7 @@ class Serendipity_Import_textpattern extends Serendipity_Import { return '<p>Textpattern uses MySQLs native PASSWORD() function to save passwords. Thus, those passwords are incompatible with the MD5 hashing of Serendipity. The passwords for all users have been set to "txp". <strong>You need to modify the passwords manually for each user</strong>, we are sorry for that inconvenience.</p>'; } - function Serendipity_Import_textpattern($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/voodoopad.inc.php b/include/admin/importers/voodoopad.inc.php index c5cf82d0..919be871 100755 --- a/include/admin/importers/voodoopad.inc.php +++ b/include/admin/importers/voodoopad.inc.php @@ -41,7 +41,7 @@ class Serendipity_Import_VoodooPad extends Serendipity_Import { var $inputFields = array(); var $force_recode = false; - function Serendipity_Import_VoodooPad($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array( array('text' => IMPORTER_VOODOO_FILEPROMPT, diff --git a/include/admin/importers/wordpress-pg.inc.php b/include/admin/importers/wordpress-pg.inc.php index 5610b8e9..8aa6d368 100644 --- a/include/admin/importers/wordpress-pg.inc.php +++ b/include/admin/importers/wordpress-pg.inc.php @@ -12,7 +12,7 @@ class Serendipity_Import_WordPress_PG extends Serendipity_Import { var $inputFields = array(); - function Serendipity_Import_WordPress_PG($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/importers/wordpress.inc.php b/include/admin/importers/wordpress.inc.php index bd1b663c..dfcd32c2 100644 --- a/include/admin/importers/wordpress.inc.php +++ b/include/admin/importers/wordpress.inc.php @@ -12,7 +12,7 @@ class Serendipity_Import_WordPress extends Serendipity_Import { var $inputFields = array(); - function Serendipity_Import_WordPress($data) { + function __construct($data) { $this->data = $data; $this->inputFields = array(array('text' => INSTALL_DBHOST, 'type' => 'input', diff --git a/include/admin/installer.inc.php b/include/admin/installer.inc.php index 9011ca5c..1edd4b26 100644 --- a/include/admin/installer.inc.php +++ b/include/admin/installer.inc.php @@ -33,7 +33,7 @@ $data['templatePath'] = $serendipity['templatePath']; $data['installerHTTPPath'] = str_replace('//', '/', dirname($_SERVER['PHP_SELF']) . '/'); // since different OS handlers for enddir /** - * Checks a return code constant if it's successfull or an error and return HTML code + * Checks a return code constant if it's successful or an error and return HTML code * * The diagnosis checks return codes of several PHP checks. Depending * on the input, a specially formatted string is returned. @@ -46,7 +46,7 @@ $data['installerHTTPPath'] = str_replace('//', '/', dirname($_SERVER['PHP_SELF'] function serendipity_installerResultDiagnose($result, $s) { global $errorCount, $data; if ( $result === S9Y_I_SUCCESS ) { - $data['i_success'] = true; // we dont need data here explicitely, but we keep it for possible future purposes + $data['i_success'] = true; // we don't need data here explicitly, but we keep it for possible future purposes return '<span class="msg_success">'. $s .'</span>'; } if ( $result === S9Y_I_WARNING ) { @@ -69,7 +69,7 @@ if (!empty($serendipity['POST']['getstep']) && is_numeric($serendipity['POST'][' /* From configuration to install */ if ( sizeof($_POST) > 1 && $serendipity['GET']['step'] == '3' ) { - /* One problem, if the user chose to do an easy install, not all config vars has been transfered + /* One problem, if the user chose to do an easy install, not all config vars has been transferred Therefore we fetch all config vars with their default values, and merge them with our POST data */ $config = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE); diff --git a/include/admin/overview.inc.php b/include/admin/overview.inc.php index 1b5a7235..6eff4ce7 100644 --- a/include/admin/overview.inc.php +++ b/include/admin/overview.inc.php @@ -52,20 +52,17 @@ $data['update'] = version_compare($data['usedVersion'], $data['curVersion' serendipity_plugin_api::hook_event('plugin_dashboard_updater', $output, $data['curVersion']); $data['updateButton'] = $output; -// Can be set through serendipity_config_local.inc.php -if (!isset($serendipity['dashboardCommentsLimit'])) { - $serendipity['dashboardCommentsLimit'] = 5; -} -if (!isset($serendipity['dashboardLimit'])) { - $serendipity['dashboardLimit'] = 5; -} -if (!isset($serendipity['dashboardDraftLimit'])) { - $serendipity['dashboardDraftLimit'] = 5; -} +$cjoin = ($serendipity['serendipityUserlevel'] == USERLEVEL_EDITOR) ? " + LEFT JOIN {$serendipity['dbPrefix']}authors a ON (e.authorid = a.authorid) + WHERE e.authorid = " . (int)$serendipity['authorid'] + : ''; +$cquery = "SELECT c.*, e.title, e.authorid + FROM {$serendipity['dbPrefix']}comments c + LEFT JOIN {$serendipity['dbPrefix']}entries e ON (e.id = c.entry_id) + " . $cjoin ." + ORDER BY c.id DESC LIMIT " . (int)$serendipity['dashboardCommentsLimit']; +$comments = serendipity_db_query($cquery); -$comments = serendipity_db_query("SELECT c.*, e.title FROM {$serendipity['dbPrefix']}comments c - LEFT JOIN {$serendipity['dbPrefix']}entries e ON (e.id = c.entry_id) - ORDER BY c.id DESC LIMIT " . (int)$serendipity['dashboardCommentsLimit']); if (is_array($comments) && count($comments) > 0) { foreach ($comments as &$comment) { $comment['entrylink'] = serendipity_archiveURL($comment['entry_id'], 'comments', 'serendipityHTTPPath', true) . '#c' . $comment['id']; @@ -85,28 +82,31 @@ if (is_array($comments) && count($comments) > 0) { $data['comments'] = $comments; - +$efilter = ($serendipity['serendipityUserlevel'] == USERLEVEL_EDITOR) ? ' AND e.authorid = ' . (int)$serendipity['authorid'] : ''; $entries = serendipity_fetchEntries( false, false, - (int)$serendipity['dashboardLimit'], + (int)$serendipity['dashboardEntriesLimit'], true, false, 'timestamp DESC', - 'e.timestamp >= ' . serendipity_serverOffsetHour() + 'e.timestamp >= ' . serendipity_serverOffsetHour() . $efilter ); -$entriesAmount = count($entries); -if ($entriesAmount < (int)$serendipity['dashboardDraftLimit']) { +$entriesAmount = 0; +if (is_array($entries)) { + $entriesAmount = count($entries); +}; +if ($entriesAmount < (int)$serendipity['dashboardEntriesLimit']) { // there is still space for drafts $drafts = serendipity_fetchEntries( false, false, - (int)$serendipity['dashboardDraftLimit'] - $entriesAmount, + (int)$serendipity['dashboardEntriesLimit'] - $entriesAmount, true, false, 'timestamp DESC', - "isdraft = 'true' AND e.timestamp <= " . serendipity_serverOffsetHour() + "isdraft = 'true' AND e.timestamp <= " . serendipity_serverOffsetHour() . $efilter ); if (is_array($entries) && is_array($drafts)) { $entries = array_merge($entries, $drafts); diff --git a/include/admin/personal.inc.php b/include/admin/personal.inc.php index 338a4592..5e2555cf 100644 --- a/include/admin/personal.inc.php +++ b/include/admin/personal.inc.php @@ -46,7 +46,7 @@ if ($serendipity['GET']['adminAction'] == 'save' && serendipity_checkFormToken() if (in_array('groups', $item['flags'])) { if (serendipity_checkPermission('adminUsersMaintainOthers')) { - // Void, no fixing neccessarry + // Void, no fixing necessarry } elseif (serendipity_checkPermission('adminUsersMaintainSame')) { if (!is_array($_POST[$item['var']])) { diff --git a/include/admin/plugins.inc.php b/include/admin/plugins.inc.php index 36f03bdb..ee2f7885 100644 --- a/include/admin/plugins.inc.php +++ b/include/admin/plugins.inc.php @@ -38,7 +38,7 @@ if (isset($_GET['serendipity']['plugin_to_move']) && isset($_GET['submit']) && s } /* If idx_to_move is still -1 then we never found it (shouldn't happen under normal conditions) - Also make sure the swaping idx is around */ + Also make sure the swapping idx is around */ if ($idx_to_move >= 0 && (($_GET['submit'] == 'move down' && $idx_to_move < (count($plugins)-1)) || ($_GET['submit'] == 'move up' && $idx_to_move > 0))) { /* Swap the one were moving with the one that's in the spot we're moving to */ @@ -150,8 +150,8 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) { $data['license'] = $license; $data['config'] = serendipity_plugin_config($plugin, $bag, $name, $desc, $config_names, true, true, true, true, 'plugin', $config_groups); -} elseif ( $serendipity['GET']['adminAction'] == 'addnew' ) { - +} elseif ( $serendipity['GET']['adminAction'] == 'addnew' && serendipity_checkFormToken()) { + $serendipity['GET']['type'] = $serendipity['GET']['type'] ?: 'sidebar'; $data['adminAction'] = 'addnew'; $data['type'] = $serendipity['GET']['type']; @@ -159,9 +159,26 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) { serendipity_plugin_api::hook_event('backend_plugins_fetchlist', $foreignPlugins); $pluginstack = array_merge((array)$foreignPlugins['pluginstack'], $pluginstack); $errorstack = array_merge((array)$foreignPlugins['errorstack'], $errorstack); + if ($serendipity['GET']['only_group'] == 'UPGRADE') { + // for upgrades, the distinction in sidebar and event-plugins is not useful. We will fetch both and mix the lists + if ($serendipity['GET']['type'] == 'event') { + $serendipity['GET']['type'] = 'sidebar'; + } else { + $serendipity['GET']['type'] = 'event'; + } + $foreignPluginsTemp = array(); + serendipity_plugin_api::hook_event('backend_plugins_fetchlist', $foreignPluginsTemp); + $pluginstack = array_merge((array)$foreignPluginsTemp['pluginstack'], $pluginstack); + $errorstack = array_merge((array)$foreignPluginsTemp['errorstack'], $errorstack); + $foreignPlugins = array_merge($foreignPlugins, $foreignPluginsTemp); + } $plugins = serendipity_plugin_api::get_installed_plugins(); $classes = serendipity_plugin_api::enum_plugin_classes(($serendipity['GET']['type'] === 'event')); + if ($serendipity['GET']['only_group'] == 'UPGRADE') { + $classes = array_merge($classes, serendipity_plugin_api::enum_plugin_classes(!($serendipity['GET']['type'] === 'event'))); + $data['type'] = 'both'; + } usort($classes, 'serendipity_pluginListSort'); $counter = 0; @@ -192,13 +209,20 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) { if (is_array($props)) { if (version_compare($props['version'], $props['upgrade_version'], '<')) { $props['upgradable'] = true; - $props['customURI'] .= $foreignPlugins['baseURI'] . $foreignPlugins['upgradeURI']; + // since we merged sidebar and event plugins before, we can no longer rely on spartacus' $foreignPlugins['baseURI'] + // NOTE: This is not nice and it would be better to move it into the plugins array instead, but that collides with the cache + if (strpos($class_data['name'], 'serendipity_plugin') !== false) { + $baseURI = "&serendipity[spartacus_fetch]=sidebar"; + } else { + $baseURI = "&serendipity[spartacus_fetch]=event"; + } + $props['customURI'] .= $baseURI . $foreignPlugins['upgradeURI']; } $props['installable'] = !($props['stackable'] === false && in_array($class_data['true_name'], $plugins)); $props['requirements'] = unserialize($props['requirements']); - if (empty($props['changelog']) && @file_exists(dirname($plugin->pluginFile) . '/ChangeLog')) { + if (empty($props['changelog']) && @file_exists(dirname($props['plugin_file']) . '/ChangeLog')) { $props['changelog'] = 'plugins/' . $props['pluginPath'] . '/ChangeLog'; } @@ -284,9 +308,7 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) { } } - $data['requirements_failues'] = $requirement_failures; - } elseif ( $serendipity['GET']['adminAction'] == 'renderOverlay' ) { $data['adminAction'] = 'overlay'; } else { @@ -336,7 +358,7 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) { } } - if (isset($serendipity['GET']['install_plugin'])) { + if (isset($serendipity['GET']['install_plugin']) && serendipity_checkFormToken()) { $authorid = $serendipity['authorid']; if (serendipity_checkPermission('adminPluginsMaintainOthers')) { $authorid = '0'; @@ -450,6 +472,7 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) { $data['updateAllMsg'] = isset($serendipity['GET']['updateAllMsg']); } +$data['urltoken'] = serendipity_setFormToken('url'); echo serendipity_smarty_show('admin/plugins.inc.tpl', $data); diff --git a/include/admin/templates.inc.php b/include/admin/templates.inc.php index 03483d56..9e792cca 100644 --- a/include/admin/templates.inc.php +++ b/include/admin/templates.inc.php @@ -10,22 +10,26 @@ if (!serendipity_checkPermission('adminTemplates')) { return; } -class template_option { +class template_option +{ var $config = null; var $values = null; var $keys = null; - function introspect_config_item($item, &$bag) { + function introspect_config_item($item, &$bag) + { foreach($this->config[$item] AS $key => $val) { $bag->add($key, $val); } } - function get_config($item) { + function get_config($item) + { return $this->values[$item]; } - function set_config($item, $value) { + function set_config($item, $value) + { global $serendipity; serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}options @@ -48,12 +52,14 @@ class template_option { return true; } - function import(&$config) { + function import(&$config) + { foreach($config AS $key => $item) { $this->config[$item['var']] = $item; $this->keys[$item['var']] = $item['var']; } } + } $data = array(); @@ -62,7 +68,7 @@ if ($serendipity['GET']['adminAction'] == 'editConfiguration') { $data["adminAction"] = "editConfiguration"; } -if ($serendipity['GET']['adminAction'] == 'install' || $serendipity['GET']['adminAction'] == 'install-frontend' || $serendipity['GET']['adminAction'] == 'install-backend') { +if (($serendipity['GET']['adminAction'] == 'install' || $serendipity['GET']['adminAction'] == 'install-frontend' || $serendipity['GET']['adminAction'] == 'install-backend') && serendipity_checkFormToken()) { serendipity_plugin_api::hook_event('backend_templates_fetchtemplate', $serendipity); $themeInfo = serendipity_fetchTemplateInfo(serendipity_specialchars($serendipity['GET']['theme'])); @@ -98,7 +104,7 @@ $data["cur_template"] = $serendipity['template']; $data["cur_template_backend"] = $serendipity['template_backend']; $data['cur_template_info'] = serendipity_fetchTemplateInfo($serendipity['template']); -// NOTE: config.inc.php currently only applies to frontend configuration. Backend configuration is not planned yet, and would preferrably use a "config_backend.inc.php" file! +// NOTE: config.inc.php currently only applies to frontend configuration. Backend configuration is not planned yet, and would preferably use a "config_backend.inc.php" file! if (file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] . $data['cur_template_info']['custom_config_engine'] . '/config.inc.php')) { serendipity_smarty_init(); $old_template_config_groups = $template_config_groups; @@ -169,13 +175,13 @@ $stack = array(); serendipity_plugin_api::hook_event('backend_templates_fetchlist', $stack); $themes = serendipity_fetchTemplates(); $data['templates'] = array(); +$data['recommended_templates'] = array(); foreach($themes AS $theme) { $stack[$theme] = serendipity_fetchTemplateInfo($theme); } ksort($stack); - foreach ($stack as $theme => $info) { /* Sorry, but we don't display engines */ if ( strtolower($info['engine']) == 'yes') { @@ -187,7 +193,7 @@ foreach ($stack as $theme => $info) { if (file_exists($serendipity["serendipityPath"] . $serendipity["templatePath"] . $theme . "/preview${backendId}_fullsize.jpg")) { $data["templates"][$theme]["fullsize${backendId}_preview"] = $serendipity["baseURL"] . $serendipity["templatePath"] . $theme . "/preview${backendId}_fullsize.jpg"; - } elseif (!empty($info["preview{$backendId}_fullsizeURL"])) { // preview{$backendId}_fullsizeURL is not actually set yet in spartacus + } elseif (!empty($info["preview{$backendId}_fullsizeURL"])) { // preview{$backendId}_fullsizeURL is not actually set in spartacus yet if (file_exists($serendipity["serendipityPath"] . "/templates_c/template_cache/". $theme ."{$backendId}.jpg")) { $data["templates"][$theme]["fullsize${backendId}_preview"] = $serendipity["baseURL"] . "templates_c/template_cache/". $theme ."{$backendId}.jpg"; } else { @@ -216,12 +222,29 @@ foreach ($stack as $theme => $info) { $unmetRequirements[] = 'Serendipity '. $info['require serendipity']; $data['templates'][$theme]['unmetRequirements'] = sprintf(UNMET_REQUIREMENTS, implode(', ', $unmetRequirements)); } + + if ($info['recommended']) { + $data['recommended_templates'][$theme] = $data['templates'][$theme]; + if ($theme != $serendipity['template'] && $theme != $serendipity['template_backend']) { + unset($data['templates'][$theme]); + } + } } +uasort($data['templates'], function($a, $b) { + return strnatcasecmp($a['info']['name'], $b['info']['name']); +}); -$data['cur_tpl'] = $data['templates'][$data['cur_template']]; -$data['cur_tpl_backend'] = $data['templates'][$data['cur_template_backend']]; +$data['cur_tpl'] = $data['templates'][$serendipity['template']]; +$data['cur_tpl_backend'] = $data['templates'][$serendipity['template_backend']]; +$data['urltoken'] = serendipity_setFormToken('url'); -unset($data['templates'][$data['cur_template']]); +unset($data['templates'][$serendipity['template']]); +if ($serendipity['template'] != $serendipity['template_backend'] && isset($data['recommended_templates'][$serendipity['template_backend']]) && isset($data['templates'][$serendipity['template_backend']])) { + // when we could not unset a template because it is a backend template, and when that template is also a recommended template, then it will now + // be in recommended and in the normal tmeplate list. We just detected that and have to remove it + unset($data['templates'][$serendipity['template_backend']]); +} +unset($data['recommended_templates'][$serendipity['template']]); echo serendipity_smarty_show('admin/templates.inc.tpl', $data); diff --git a/include/admin/upgrader.inc.php b/include/admin/upgrader.inc.php index c6070f89..8c083215 100644 --- a/include/admin/upgrader.inc.php +++ b/include/admin/upgrader.inc.php @@ -12,7 +12,7 @@ define('S9Y_U_WARNING', 0); define('S9Y_U_SUCCESS', 1); /** - * Checks a return code constant if it's successfull or an error and return HTML code + * Checks a return code constant if it's successful or an error and return HTML code * * The diagnosis checks return codes of several PHP checks. Depending * on the input, a specially formatted string is returned. @@ -26,7 +26,7 @@ function serendipity_upgraderResultDiagnose($result, $s) { global $errorCount, $data; if ( $result === S9Y_U_SUCCESS ) { - $data['u_success'] = true; // we dont need data here explicitely, but we keep it for possible future purposes + $data['u_success'] = true; // we don't need data here explicitly, but we keep it for possible future purposes return '<span class="msg_success">'. $s .'</span>'; } @@ -266,6 +266,10 @@ $tasks = array(array('version' => '0.5.1', 'arguments' => array(substr($serendipity['serendipityPath'], 0, -1), $dead_files_202, array('internals'), true), 'desc' => 'The following old dead files will be removed from your system.<br><pre>' . implode(', ', $dead_files_202) . '</pre>'), + array('version' => '2.2.0-beta2', + 'function' => 'serendipity_installFiles', + 'title' => 'Update .htaccess file', + 'desc' => 'Adds a new "documentation.*.html" rewrite rule exception to allow calling plugin documentation URLs.'), ); /* Fetch SQL files which needs to be run */ diff --git a/include/admin/users.inc.php b/include/admin/users.inc.php index 829bf457..59c1c068 100644 --- a/include/admin/users.inc.php +++ b/include/admin/users.inc.php @@ -51,7 +51,7 @@ if (isset($_POST['SAVE_NEW']) && serendipity_checkFormToken()) { if (in_array('groups', $item['flags'])) { if (serendipity_checkPermission('adminUsersMaintainOthers')) { - // Void, no fixing neccessarry + // Void, no fixing necessarry } elseif (serendipity_checkPermission('adminUsersMaintainSame')) { // Check that no user may assign groups he's not allowed to. @@ -115,7 +115,7 @@ if (isset($_POST['SAVE_EDIT']) && serendipity_checkFormToken()) { if (in_array('groups', $item['flags'])) { if (serendipity_checkPermission('adminUsersMaintainOthers')) { - // Void, no fixing neccessarry + // Void, no fixing necessarry } elseif (serendipity_checkPermission('adminUsersMaintainSame')) { diff --git a/include/compat.inc.php b/include/compat.inc.php index d5466f3f..0d61f097 100644 --- a/include/compat.inc.php +++ b/include/compat.inc.php @@ -110,7 +110,7 @@ function debug_ErrorLevelType($type) /** - * Set our own exeption handler to convert all errors into exeptions automatically + * Set our own exception handler to convert all errors into exceptions automatically * function_exists() avoids 'cannot redeclare previously declared' fatal errors in XML feed context. * * See Notes about returning false @@ -122,17 +122,22 @@ function debug_ErrorLevelType($type) if (!function_exists('errorToExceptionHandler')) { function errorToExceptionHandler($errNo, $errStr, $errFile = '', $errLine = NULL, $errContext = array()) { global $serendipity; + + // By default, we will continue our process flow, unless: $exit = false; - switch ( $errNo ) { + + switch ($errNo) { case E_ERROR: case E_USER_ERROR: $type = 'Fatal Error'; $exit = true; break; + case E_USER_WARNING: case E_WARNING: $type = 'Warning'; break; + case E_USER_NOTICE: case E_NOTICE: case @E_STRICT: @@ -140,64 +145,82 @@ if (!function_exists('errorToExceptionHandler')) { case @E_USER_DEPRECATED: $type = 'Notice'; break; + case @E_RECOVERABLE_ERROR: $type = 'Catchable'; break; + default: $type = 'Unknown Error'; $exit = true; break; } - $rep = ini_get('error_reporting'); - $args = func_get_args(); - // respect user has set php error_reporting to not display any errors at all - if (!($rep & $errStr)) { return false; } - // user used @ to specify ignoring all errors or $php_errormsg messages returned with error_reporting = 0 - if ($rep == 0) { return false; } - // if not using Serendipity testing and user or ISP has set PHPs display_errors to show no errors at all, respect - if ($serendipity['production'] === true && ini_get('display_errors') == 0) { return false; } + // NOTE: We do NOT use ini_get('error_reporting'), because that would return the global error reporting, + // and not the one in our current content. @-silenced errors would otherwise never be caught on. + $rep = error_reporting(); + + // Bypass error processing because it's @-silenced. + if ($rep == 0) { + return false; + } + + // if not using Serendipity testing and user or ISP has set PHPs display_errors to show no errors at all, respect this: + if ($serendipity['production'] === true && ini_get('display_errors') == 0) { + return false; + } + // Several plugins might not adapt to proper style. This should not completely kill our execution. if ($serendipity['production'] !== 'debug' && preg_match('@Declaration.*should be compatible with@i', $args[1])) { #if (!headers_sent()) echo "<strong>Compatibility warning:</strong> Please upgrade file old '{$args[2]}', it contains incompatible signatures.<br/>Details: {$args[1]}<br/>"; return false; } - // any other errors go here - throw errors as exception - if ($serendipity['production'] === 'debug') { - // We don't want the notices - but everything else ! - echo " == FULL DEBUG ERROR MODE == \n"; - echo '<pre>'; - // trying to be as detailled as possible - but avoid using args containing sensibel data like passwords - if (function_exists('debug_backtrace') && version_compare(PHP_VERSION, '5.3.6') >= 0) { - if ( version_compare(PHP_VERSION, '5.4') >= 0 ) { - $debugbacktrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 8); - } else { - $debugbacktrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); - } - print_r($debugbacktrace); - } - //print_r($args); // debugging [Use with care! Not to public, since holding password and credentials!!!] - // debugbacktrace is nice, but additional it is good to have the verbosity of SPL EXCEPTIONS, except for db connect errors - } - if ($serendipity['production'] === false) { - echo " == TESTING ERROR MODE == \n"; - } - if ($serendipity['production'] !== true) { - if (!$serendipity['dbConn'] || $exit) { - echo '<p><b>' . $type.':</b> '.$errStr . ' in ' . $errFile . ' on line ' . $errLine . '</p>'; - } else { - echo '<pre style="white-space: pre-line;">'; - throw new \ErrorException($type.': '.$errStr, 0, $errNo, $errFile, $errLine); // tracepath = all, if not ini_set('display_errors', 0); - echo '</pre>'; // if using throw new ... this ending tag will not be send and displayed, but it still looks better and browsers don't really care - } - if (!$serendipity['dbConn'] || $exit) exit; // make sure to exit in case of database connection errors. + $args = func_get_args(); + + /* + * $serendipity['production'] can be: + * + * (bool) TRUE: Live-blog, conceal error messages + * (bool) FALSE Beta/alpha builds + * (string) 'debug' Developer build, specifically enabled. + */ + + if ($serendipity['production'] !== 'debug') { + $debug_note = '<br />For more details set $serendipity[\'production\'] = \'debug\' in serendipity_config_local.inc.php to receive a stack-trace.'; } else { - if( $serendipity['serendipityUserlevel'] >= USERLEVEL_ADMIN ) { - // ToDo: enhance for more special serendipity error needs + $debug_note = ''; + } + + // Debug environments shall be verbose... + if ($serendipity['production'] === 'debug') { + echo " == ERROR-REPORT (DEBUGGING ENABLED) == <br />\n"; + echo " == (When you copy this debug output to a forum or other places, make sure to remove your username/passwords, as they may be contained within function calls) == \n"; + echo '<pre>'; + debug_print_backtrace(); // Unlimited output, debugging shall show us everything. + echo "</pre>"; + $debug_note = ''; + } elseif ($serendipity['production'] === false) { + echo " == ERROR-REPORT (BETA/ALPHA-BUILDS) == \n"; + } + + if ($serendipity['production'] !== true) { + // Display error (production: FALSE and production: 'debug') + echo '<p><b>' . $type . ':</b> '.$errStr . ' in ' . $errFile . ' on line ' . $errLine . '.' . $debug_note . '</p>'; + + echo '<pre style="white-space: pre-line;">'; + throw new \ErrorException($type . ': ' . $errStr, 0, $errNo, $errFile, $errLine); // tracepath = all, if not ini_set('display_errors', 0); + + if (!$serendipity['dbConn'] || $exit) { + exit; // make sure to exit in case of database connection errors or fatal errors. + } + } else { + // Only display error (production blog) if an admin is logged in, else we discard the error. + + if ($serendipity['serendipityUserlevel'] >= USERLEVEL_ADMIN) { $str = " == SERENDIPITY ERROR == "; - $str .= '<p>' . $errStr . ' in ' . $errFile . ' on line ' . $errLine . '</p>'; - #var_dump(headers_list()); + $str .= '<p><b>' . $type . ':</b> '.$errStr . ' in ' . $errFile . ' on line ' . $errLine . '.' . $debug_note . '</p>'; + if (headers_sent()) { serendipity_die($str); // case HTTP headers: needs to halt with die() here, else it will path through and gets written underneath blog content, or into streamed js files, which hardly isn't seen by many users } else { @@ -216,6 +239,22 @@ document.body.insertBefore(fragment, document.body.childNodes[0]); } } +if (!function_exists('fatalErrorShutdownHandler')) { + /** + * Make fatal Errors readable + * + * @access public + * + * @return string constant error string as Exception + */ + function fatalErrorShutdownHandler() { + $last_error = error_get_last(); + if ($last_error['type'] === E_ERROR) { + // fatal error send to + errorToExceptionHandler(E_ERROR, $last_error['message'], $last_error['file'], $last_error['line']); + } + } +} if (!function_exists('file_get_contents')) { function file_get_contents($filename, $use_include_path = 0) { @@ -333,7 +372,6 @@ if (ini_get('magic_quotes_gpc')) { } } - // Merge get and post into the serendipity array $serendipity['GET'] = &$_GET['serendipity']; $serendipity['POST'] = &$_POST['serendipity']; diff --git a/include/db/generic.inc.php b/include/db/generic.inc.php index 693fa1f4..e95c9b1b 100644 --- a/include/db/generic.inc.php +++ b/include/db/generic.inc.php @@ -98,7 +98,7 @@ function &serendipity_db_query($sql, $single = false, $result_type = "both", $re /** * Perform a sql-query with the now possible ? syntax for parameters * @param string SQL query to exectue, for example "SELECT * from X where Y = ? - * @param array Paramters to insert into the sql-query + * @param array Parameters to insert into the sql-query * @result mixed Returns the result of the SQL query, depending on the input parameters */ function serendipity_db_query2($sql, $parameters = array()) { @@ -172,7 +172,7 @@ function serendipity_db_escape_string($string) { } /** - * Returns the option to a LIMIT SQL statement, because it varies accross DB systems + * Returns the option to a LIMIT SQL statement, because it varies across DB systems * * @access public * @param int Number of the first row to return data from @@ -203,7 +203,7 @@ function serendipity_db_limit_sql($limitstring) { * Connect to the configured Database * * @access public - * @return ressource connection handle + * @return resource connection handle */ function serendipity_db_connect() { global $serendipity; @@ -240,7 +240,7 @@ function serendipity_db_reconnect() { * * @access public * @param string SQL query with template variables to convert - * @return ressource SQL ressource handle of the executed query + * @return resource SQL resource handle of the executed query */ function serendipity_db_schema_import($query) { global $serendipity; diff --git a/include/db/mysql.inc.php b/include/db/mysql.inc.php index bc9ec6eb..c9c8b6d0 100644 --- a/include/db/mysql.inc.php +++ b/include/db/mysql.inc.php @@ -226,7 +226,7 @@ function serendipity_db_escape_string($string) { } /** - * Returns the option to a LIMIT SQL statement, because it varies accross DB systems + * Returns the option to a LIMIT SQL statement, because it varies across DB systems * * @access public * @param int Number of the first row to return data from @@ -252,7 +252,7 @@ function serendipity_db_limit_sql($limitstring) { * Connect to the configured Database * * @access public - * @return ressource connection handle + * @return resource connection handle */ function serendipity_db_connect() { global $serendipity; @@ -290,7 +290,7 @@ function serendipity_db_reconnect() { * * @access public * @param string SQL query with template variables to convert - * @return ressource SQL ressource handle of the executed query + * @return resource SQL resource handle of the executed query */ function serendipity_db_schema_import($query) { static $search = array('{AUTOINCREMENT}', '{PRIMARY}', diff --git a/include/db/mysqli.inc.php b/include/db/mysqli.inc.php index eb163095..547d2ada 100644 --- a/include/db/mysqli.inc.php +++ b/include/db/mysqli.inc.php @@ -193,7 +193,7 @@ function serendipity_db_escape_string($string) { } /** - * Returns the option to a LIMIT SQL statement, because it varies accross DB systems + * Returns the option to a LIMIT SQL statement, because it varies across DB systems * * @access public * @param int Number of the first row to return data from @@ -219,7 +219,7 @@ function serendipity_db_limit_sql($limitstring) { * Connect to the configured Database * * @access public - * @return ressource connection handle + * @return resource connection handle */ function serendipity_db_connect() { global $serendipity; @@ -260,7 +260,7 @@ function serendipity_db_reconnect() { * * @access public * @param string SQL query with template variables to convert - * @return ressource SQL ressource handle of the executed query + * @return resource SQL resource handle of the executed query */ function serendipity_db_schema_import($query) { static $search = array('{AUTOINCREMENT}', '{PRIMARY}', diff --git a/include/db/pdo-postgres.inc.php b/include/db/pdo-postgres.inc.php index aa47c50d..7d6b1dc3 100644 --- a/include/db/pdo-postgres.inc.php +++ b/include/db/pdo-postgres.inc.php @@ -45,7 +45,7 @@ function serendipity_db_in_sql($col, &$search_ids, $type = ' OR ') { * Connect to the configured Database * * @access public - * @return ressource connection handle + * @return resource connection handle */ function serendipity_db_connect() { global $serendipity; @@ -90,7 +90,7 @@ function serendipity_db_escape_string($string) { } /** - * Returns the option to a LIMIT SQL statement, because it varies accross DB systems + * Returns the option to a LIMIT SQL statement, because it varies across DB systems * * @access public * @param int Number of the first row to return data from @@ -267,7 +267,7 @@ function &serendipity_db_query($sql, $single = false, $result_type = "both", $re * * @access public * @param string SQL query with template variables to convert - * @return ressource SQL ressource handle of the executed query + * @return resource SQL resource handle of the executed query */ function serendipity_db_schema_import($query) { static $search = array('{AUTOINCREMENT}', '{PRIMARY}', '{UNSIGNED}', diff --git a/include/db/pdo-sqlite.inc.php b/include/db/pdo-sqlite.inc.php index f391080c..55cfd601 100644 --- a/include/db/pdo-sqlite.inc.php +++ b/include/db/pdo-sqlite.inc.php @@ -14,9 +14,9 @@ function serendipity_db_logmsg($msgstr) { * Yeah. This sucks. Don't tell me! * * @access private - * @param ressource The row ressource handle + * @param resource The row resource handle * @param int Bitmask to tell whether to fetch numerical/associative arrays - * @return array Propper array containing the ressource results + * @return array Propper array containing the resource results */ function serendipity_db_sqlite_fetch_array($row, $type = PDO::FETCH_ASSOC) { @@ -95,7 +95,7 @@ function serendipity_db_in_sql($col, &$search_ids, $type = ' OR ') { * Connect to the configured Database * * @access public - * @return ressource connection handle + * @return resource connection handle */ function serendipity_db_connect() { global $serendipity; @@ -123,7 +123,7 @@ function serendipity_db_escape_string($string) { } /** - * Returns the option to a LIMIT SQL statement, because it varies accross DB systems + * Returns the option to a LIMIT SQL statement, because it varies across DB systems * * @access public * @param int Number of the first row to return data from @@ -286,7 +286,7 @@ function &serendipity_db_query($sql, $single = false, $result_type = "both", $re * * @access public * @param string SQL query with template variables to convert - * @return ressource SQL ressource handle of the executed query + * @return resource SQL resource handle of the executed query */ function serendipity_db_schema_import($query) { static $search = array('{AUTOINCREMENT}', '{PRIMARY}', '{UNSIGNED}', '{FULLTEXT}', '{BOOLEAN}', '{UTF_8}', '{TEXT}'); diff --git a/include/db/postgres.inc.php b/include/db/postgres.inc.php index 8b2a9297..ec32b383 100644 --- a/include/db/postgres.inc.php +++ b/include/db/postgres.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details @@ -42,7 +42,7 @@ function serendipity_db_in_sql($col, &$search_ids, $type = ' OR ') { * Connect to the configured Database * * @access public - * @return ressource connection handle + * @return resource connection handle */ function serendipity_db_connect() { global $serendipity; @@ -93,7 +93,7 @@ function serendipity_db_escape_string($string) { } /** - * Returns the option to a LIMIT SQL statement, because it varies accross DB systems + * Returns the option to a LIMIT SQL statement, because it varies across DB systems * * @access public * @param int Number of the first row to return data from @@ -278,7 +278,7 @@ function &serendipity_db_query($sql, $single = false, $result_type = "both", $re * * @access public * @param string SQL query with template variables to convert - * @return ressource SQL ressource handle of the executed query + * @return resource SQL resource handle of the executed query */ function serendipity_db_schema_import($query) { static $search = array('{AUTOINCREMENT}', '{PRIMARY}', '{UNSIGNED}', diff --git a/include/db/sqlite.inc.php b/include/db/sqlite.inc.php index f3f40c3e..dff4b844 100644 --- a/include/db/sqlite.inc.php +++ b/include/db/sqlite.inc.php @@ -34,7 +34,7 @@ function serendipity_db_end_transaction($commit){ * Connect to the configured Database * * @access public - * @return ressource connection handle + * @return resource connection handle */ function serendipity_db_connect() { @@ -138,9 +138,9 @@ function serendipity_db_insert_id() * Yeah. This sucks. Don't tell me! * * @access private - * @param ressource The row ressource handle + * @param resource The row resource handle * @param int Bitmask to tell whether to fetch numerical/associative arrays - * @return array Propper array containing the ressource results + * @return array Propper array containing the resource results */ function serendipity_db_sqlite_fetch_array($res, $type = SQLITE_BOTH) { @@ -331,7 +331,7 @@ function serendipity_db_probe($hash, &$errs) * * @access public * @param string SQL query with template variables to convert - * @return ressource SQL ressource handle of the executed query + * @return resource SQL resource handle of the executed query */ function serendipity_db_schema_import($query) { @@ -352,7 +352,7 @@ function serendipity_db_schema_import($query) } /** - * Returns the option to a LIMIT SQL statement, because it varies accross DB systems + * Returns the option to a LIMIT SQL statement, because it varies across DB systems * * @access public * @param int Number of the first row to return data from diff --git a/include/db/sqlite3.inc.php b/include/db/sqlite3.inc.php index 5bc47701..727b1a1f 100644 --- a/include/db/sqlite3.inc.php +++ b/include/db/sqlite3.inc.php @@ -40,7 +40,7 @@ function serendipity_db_end_transaction($commit){ * Connect to the configured Database * * @access public - * @return ressource connection handle + * @return resource connection handle */ function serendipity_db_connect() { @@ -134,9 +134,9 @@ function serendipity_db_insert_id() * Yeah. This sucks. Don't tell me! * * @access private - * @param ressource The row ressource handle + * @param resource The row resource handle * @param int Bitmask to tell whether to fetch numerical/associative arrays - * @return array Propper array containing the ressource results + * @return array Propper array containing the resource results */ function serendipity_db_sqlite_fetch_array($res, $type = SQLITE3_BOTH) { @@ -339,7 +339,7 @@ function serendipity_db_probe($hash, &$errs) * * @access public * @param string SQL query with template variables to convert - * @return ressource SQL ressource handle of the executed query + * @return resource SQL resource handle of the executed query */ function serendipity_db_schema_import($query) { @@ -361,7 +361,7 @@ function serendipity_db_schema_import($query) } /** - * Returns the option to a LIMIT SQL statement, because it varies accross DB systems + * Returns the option to a LIMIT SQL statement, because it varies across DB systems * * @access public * @param int Number of the first row to return data from diff --git a/include/db/sqlite3oo.inc.php b/include/db/sqlite3oo.inc.php index 245ebde5..c2772c8e 100644 --- a/include/db/sqlite3oo.inc.php +++ b/include/db/sqlite3oo.inc.php @@ -40,7 +40,7 @@ function serendipity_db_end_transaction($commit){ * Connect to the configured Database * * @access public - * @return ressource connection handle + * @return resource connection handle */ function serendipity_db_connect() { @@ -134,9 +134,9 @@ function serendipity_db_insert_id() * Yeah. This sucks. Don't tell me! * * @access private - * @param ressource The row ressource handle + * @param resource The row resource handle * @param int Bitmask to tell whether to fetch numerical/associative arrays - * @return array Propper array containing the ressource results + * @return array Propper array containing the resource results */ function serendipity_db_sqlite_fetch_array($res, $type = SQLITE3_BOTH) { @@ -354,7 +354,7 @@ function serendipity_db_probe($hash, &$errs) * * @access public * @param string SQL query with template variables to convert - * @return ressource SQL ressource handle of the executed query + * @return resource SQL resource handle of the executed query */ function serendipity_db_schema_import($query) { @@ -376,7 +376,7 @@ function serendipity_db_schema_import($query) } /** - * Returns the option to a LIMIT SQL statement, because it varies accross DB systems + * Returns the option to a LIMIT SQL statement, because it varies across DB systems * * @access public * @param int Number of the first row to return data from diff --git a/include/db/sqlrelay.inc.php b/include/db/sqlrelay.inc.php index a67e8e75..f67811b5 100644 --- a/include/db/sqlrelay.inc.php +++ b/include/db/sqlrelay.inc.php @@ -361,7 +361,7 @@ function serendipity_db_escape_string($str) { } /** - * Returns the option to a LIMIT SQL statement, because it varies accross DB systems + * Returns the option to a LIMIT SQL statement, because it varies across DB systems * * @access public * @param int Number of the first row to return data from @@ -403,7 +403,7 @@ function serendipity_db_limit_sql($limitstring) { * Connect to the configured Database * * @access public - * @return ressource connection handle + * @return resource connection handle */ function serendipity_db_connect() { global $serendipity; @@ -446,7 +446,7 @@ function serendipity_db_reconnect() { * * @access public * @param string SQL query with template variables to convert - * @return ressource SQL ressource handle of the executed query + * @return resource SQL resource handle of the executed query */ function serendipity_db_schema_import($query) { global $serendipity; diff --git a/include/functions.inc.php b/include/functions.inc.php index 37b7dcaf..1084efe7 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -46,7 +46,10 @@ function serendipity_truncateString($s, $len) { */ function serendipity_gzCompression() { global $serendipity; - if (isset($serendipity['useGzip']) && serendipity_db_bool($serendipity['useGzip']) && function_exists('ob_gzhandler') && extension_loaded('zlib') && serendipity_ini_bool(ini_get('zlib.output_compression')) == false && serendipity_ini_bool(ini_get('session.use_trans_sid')) == false) { + if (isset($serendipity['useGzip']) && serendipity_db_bool($serendipity['useGzip']) + && function_exists('ob_gzhandler') && extension_loaded('zlib') + && serendipity_ini_bool(ini_get('zlib.output_compression')) == false + && serendipity_ini_bool(ini_get('session.use_trans_sid')) == false) { ob_start("ob_gzhandler"); } } @@ -790,7 +793,7 @@ function serendipity_track_referrer($entry = 0) { /** * Garbage Collection for suppressed referrers * - * "Bad" referrers, that only occured once to your entry are put within a + * "Bad" referrers, that only occurred once to your entry are put within a * SUPPRESS database table. Entries contained there will be cleaned up eventually. * * @access public @@ -1020,7 +1023,7 @@ function serendipity_discover_rss($name, $ext) { * @return boolean Return true on success, false on failure */ function serendipity_isResponseClean($d) { - return (strpos($d, "\r") === false && strpos($d, "\n") === false); + return (strpos($d, "\r") === false && strpos($d, "\n") === false && stripos($d, "%0A") === false && stripos($d, "%0D") === false); } /** @@ -1117,6 +1120,114 @@ function serendipity_request_end() { return true; } +/* Request the contents of an URL, API wrapper + * @param $uri string The URL to fetch + * @param $method string HTTP method (GET/POST/PUT/OPTIONS...) + * @param $contenttype string optional HTTP content type + * @param $contenttype mixed optional extra data (i.e. POST body), can be an array + * @param $extra_options array Extra options for HTTP_Request $options array (can override defaults) + * @param $addData string possible extra event addData declaration for 'backend_http_request' hook + * @param $auth array Array with 'user' and 'pass' for HTTP Auth + * @return $content string The URL contents + */ + +function serendipity_request_url($uri, $method = 'GET', $contenttype = null, $data = null, $extra_options = null, $addData = null, $auth = null) { + global $serendipity; + + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; + $options = array('follow_redirects' => true, 'max_redirects' => 5); + + if (is_array($extra_options)) { + foreach($extra_options AS $okey => $oval) { + $options[$okey] = $oval; + } + } + serendipity_plugin_api::hook_event('backend_http_request', $options, $addData); + serendipity_request_start(); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + + switch(strtoupper($method)) { + case 'GET': + $http_method = HTTP_Request2::METHOD_GET; + break; + + case 'PUT': + $http_method = HTTP_Request2::METHOD_PUT; + break; + + case 'OPTIONS': + $http_method = HTTP_Request2::METHOD_OPTIONS; + break; + + case 'HEAD': + $http_method = HTTP_Request2::METHOD_HEAD; + break; + + case 'DELETE': + $http_method = HTTP_Request2::METHOD_DELETE; + break; + + case 'TRACE': + $http_method = HTTP_Request2::METHOD_TRACE; + break; + + case 'CONNECT': + $http_method = HTTP_Request2::METHOD_CONNECT; + break; + + default: + case 'POST': + $http_method = HTTP_Request2::METHOD_POST; + break; + + } + + $req = new HTTP_Request2($uri, $http_method, $options); + if (isset($contenttype) && $contenttype !== null) { + $req->setHeader('Content-Type', $contenttype); + } + + if (is_array($auth)) { + $req->setAuth($auth['user'], $auth['pass']); + } + + if ($data != null) { + if (is_array($data)) { + $req->addPostParameter($data); + } else { + $req->setBody($data); + } + } + + try { + $res = $req->send(); + } catch (HTTP_Request2_Exception $e) { + serendipity_request_end(); + return false; + } + + + $fContent = $res->getBody(); + $serendipity['last_http_request'] = array( + 'responseCode' => $res->getStatus(), + 'effectiveUrl' => $res->getEffectiveUrl(), + 'reasonPhrase' => $res->getReasonPhrase(), + 'isRedirect' => $res->isRedirect(), + 'cookies' => $res->getCookies(), + 'version' => $res->getVersion(), + 'header' => $res->getHeader(), + + 'object' => $res // forward compatibility for possible other checks + ); + + serendipity_request_end(); + return $fContent; +} + + if (!function_exists('microtime_float')) { /** * Get current timestamp as microseconds @@ -1160,7 +1271,8 @@ function serendipity_build_query(&$array, $array_prefix = null, $comb_char = '&a return implode($comb_char, $ret); } -/* Picks a specified key from an array and returns it +/** + * Picks a specified key from an array and returns it * * @access public * @param array The input array @@ -1188,7 +1300,8 @@ function &serendipity_pickKey(&$array, $key, $default) { return $default; } -/* Retrieves the current timestamp but only deals with minutes to optimize Database caching +/** + * Retrieves the current timestamp but only deals with minutes to optimize Database caching * @access public * @return timestamp * @author Matthew Groeninger @@ -1205,23 +1318,61 @@ function serendipity_db_time() { return $ts; } -/* Inits the logger. +/** + * Inits the logger. * @return null */ function serendipity_initLog() { global $serendipity; if (isset($serendipity['logLevel']) && $serendipity['logLevel'] !== 'Off') { - if ($serendipity['logLevel'] == 'debug') { - $log_level = Psr\Log\LogLevel::DEBUG; - } else { - $log_level = Psr\Log\LogLevel::ERROR; - } - - $serendipity['logger'] = new Katzgrau\KLogger\Logger($serendipity['serendipityPath'] . '/templates_c/logs', $log_level); + if ($serendipity['logLevel'] == 'debug') { + $log_level = Psr\Log\LogLevel::DEBUG; + } else { + $log_level = Psr\Log\LogLevel::ERROR; + } + $serendipity['logger'] = new Katzgrau\KLogger\Logger($serendipity['serendipityPath'] . '/templates_c/logs', $log_level); } } - + +/** + * Check whether a given URL is valid to be locally requested + * @return boolean + */ +function serendipity_url_allowed($url) { + global $serendipity; + + if ($serendipity['allowLocalURL']) { + return true; + } + + $parts = @parse_url($url); + if (!is_array($parts) || empty($parts['host'])) { + return false; + } + + $host = trim($parts['host'], '.'); + if (preg_match('@^(([1-9]?\d|1\d\d|25[0-5]|2[0-4]\d)\.){3}([1-9]?\d|1\d\d|25[0-5]|2[0-4]\d)$@imsU', $host)) { + $ip = $host; + } else { + $ip = gethostbyname($host); + if ($ip === $host) { + $ip = false; + } + } + + if ($ip) { + $ipparts = array_map('intval', explode('.', $ip)); + if ( 127 === $ipparts[0] || 10 === $ipparts[0] || 0 === $ipparts[0] + || ( 172 === $ipparts[0] && 16 <= $ipparts[1] && 31 >= $ipparts[1] ) + || ( 192 === $ipparts[0] && 168 === $ipparts[1]) + ) { + return false; + } + } + + return true; +} define("serendipity_FUNCTIONS_LOADED", true); /* vim: set sts=4 ts=4 expandtab : */ diff --git a/include/functions_calendars.inc.php b/include/functions_calendars.inc.php index 72a15101..5aae0b36 100644 --- a/include/functions_calendars.inc.php +++ b/include/functions_calendars.inc.php @@ -13,7 +13,7 @@ if (defined('S9Y_FRAMEWORK_CALENDARS')) { @define('S9Y_FRAMEWORK_CALENDARS', true); /** - * Gregorian to Persian Convertor + * Gregorian to Persian Converter * * @author farsiweb.info * @access public @@ -65,7 +65,7 @@ function g2p($g_y, $g_m, $g_d){ } /** - * Persian to Gregorian Convertor + * Persian to Gregorian Converter * * @author farsiweb.info * @access public diff --git a/include/functions_comments.inc.php b/include/functions_comments.inc.php index 0a44b45c..8c01e79b 100644 --- a/include/functions_comments.inc.php +++ b/include/functions_comments.inc.php @@ -357,14 +357,15 @@ function serendipity_printComments($comments, $parentid = 0, $depth = 0, $trace $_smartyComments = array(); } + $formToken = serendipity_setFormToken('url'); $i = 0; foreach ($comments as $comment) { if ($parentid === VIEWMODE_LINEAR || !isset($comment['parent_id']) || $comment['parent_id'] == $parentid) { $i++; - $comment['comment'] = serendipity_specialchars(strip_tags($comment['body'])); - $comment['url'] = strip_tags($comment['url']); - $comment['link_delete'] = $serendipity['baseURL'] . 'comment.php?serendipity[delete]=' . $comment['id'] . '&serendipity[entry]=' . $comment['entry_id'] . '&serendipity[type]=comments'; + $comment['comment'] = (is_string($comment['body']) ? serendipity_specialchars(strip_tags($comment['body'])) : ''); + $comment['url'] = (is_string($comment['url']) ? strip_tags($comment['url']) : ''); + $comment['link_delete'] = $serendipity['baseURL'] . 'comment.php?serendipity[delete]=' . $comment['id'] . '&serendipity[entry]=' . $comment['entry_id'] . '&serendipity[type]=comments&' . $formToken; /* Fix invalid cases in protocoll part */ if (!empty($comment['url'])) { @@ -438,7 +439,7 @@ function serendipity_printComments($comments, $parentid = 0, $depth = 0, $trace function serendipity_printCommentsByAuthor() { global $serendipity; - $type = serendipity_db_escape_string($serendipity['GET']['commentMode']); + $type = serendipity_db_escape_string($serendipity['GET']['commentMode']); if ($type == 'comments' || empty($type)) { $type = 'NORMAL'; @@ -790,6 +791,11 @@ function serendipity_insertComment($id, $commentInfo, $type = 'NORMAL', $source $commentInfo['status'] = $ca['status']; } + if ($serendipity['serendipityAuthedUser']) { + $authorReply = true; + $authorEmail = $serendipity['serendipityEmail']; + } + $title = serendipity_db_escape_string(isset($commentInfo['title']) ? $commentInfo['title'] : ''); $comments = $commentInfo['comment']; $ip = serendipity_db_escape_string(isset($commentInfo['ip']) ? $commentInfo['ip'] : $_SERVER['REMOTE_ADDR']); @@ -873,7 +879,9 @@ function serendipity_insertComment($id, $commentInfo, $type = 'NORMAL', $source if ($status != 'confirm' && (serendipity_db_bool($ca['moderate_comments']) || ($type == 'NORMAL' && serendipity_db_bool($row['mail_comments'])) || (($type == 'TRACKBACK' || $type == 'PINGBACK') && serendipity_db_bool($row['mail_trackbacks'])))) { - serendipity_sendComment($cid, $row['email'], $name, $email, $url, $id, $row['title'], $comments, $type, serendipity_db_bool($ca['moderate_comments']), $referer); + if (! ($authorReply && $authorEmail == $row['email'])) { + serendipity_sendComment($cid, $row['email'], $name, $email, $url, $id, $row['title'], $comments, $type, serendipity_db_bool($ca['moderate_comments']), $referer); + } } // Approve with force, if moderation is disabled diff --git a/include/functions_config.inc.php b/include/functions_config.inc.php index 1cddf095..bf49b2c4 100644 --- a/include/functions_config.inc.php +++ b/include/functions_config.inc.php @@ -255,50 +255,20 @@ function serendipity_set_user_var($name, $val, $authorid, $copy_to_s9y = true) { * @param string The filename to search for in the selected template * @param string The path selector that tells whether to return a HTTP or realpath * @param bool Enable to include frontend template fallback chaining (used for wysiwyg Editor custom config files, emoticons, etc) - * @param bool Enable to check into $serendipity['template'] or its engine, then fall back to $this->pluginFile dir (used by plugins via parseTemplate() method) * @return string The full path+filename to the requested file */ -function serendipity_getTemplateFile($file, $key = 'serendipityHTTPPath', $force_frontend_fallback = false, $simple_plugin_fallback = false) { +function serendipity_getTemplateFile($file, $key = 'serendipityHTTPPath', $force_frontend_fallback = false) { global $serendipity; $directories = array(); - - if (defined('IN_serendipity_admin') && $serendipity['smarty_preview'] == false) { - if ($force_frontend_fallback) { - // If enabled, even when within the admin suite it will be possible to reference files that - // reside within a frontend-only template directory. - $directories[] = $serendipity['template'] . '/'; - if (isset($serendipity['template_engine']) && $serendipity['template_engine'] != null) { - $p = explode(',', $serendipity['template_engine']); - foreach($p AS $te) { - $directories[] = trim($te) . '/'; - } - } - } - - if (!$simple_plugin_fallback) { - // Backend will always use our default backend (=defaultTemplate) as fallback. - $directories[] = isset($serendipity['template_backend']) ? $serendipity['template_backend'] . '/' : ''; - $directories[] = $serendipity['defaultTemplate'] .'/'; - $directories[] = 'default/'; - } + if ((! defined('IN_serendipity_admin')) || $force_frontend_fallback) { + $directories[] = $serendipity['template'] . '/'; # In the frontend or when forced (=preview_iframe.tpl), use the frontend theme } else { - $directories[] = isset($serendipity['template']) ? $serendipity['template'] . '/' : ''; - if (isset($serendipity['template_engine']) && $serendipity['template_engine'] != null) { - $p = explode(',', $serendipity['template_engine']); - foreach($p AS $te) { - $directories[] = trim($te) . '/'; - } - } - - if (!$simple_plugin_fallback) { - // Frontend templates currently need to fall back to "default" (see "idea"), so that they get the - // output they desire. If templates are based on 2k11, they need to set "Engine: 2k11" in their info.txt - // file. - $directories[] = 'default/'; - $directories[] = $serendipity['defaultTemplate'] .'/'; - } + $directories[] = $serendipity['template_backend'] . '/'; # Since 2.0 s9y can have a independent backend theme } + $directories[] = $serendipity['template_engine'] . '/'; # themes can set an engine, which will be used if they do not have the file + $directories[] = $serendipity['defaultTemplate'] .'/'; # the default theme is the last place we will look in, serving as pure fallback + $directories = array_unique($directories); # save performance by not checking for file existence multiple times in the same directory foreach ($directories as $directory) { $templateFile = $serendipity['templatePath'] . $directory . $file; @@ -307,15 +277,11 @@ function serendipity_getTemplateFile($file, $key = 'serendipityHTTPPath', $force } if (file_exists($serendipity['serendipityPath'] . $templateFile . ".tpl")) { - # catch *.tpl files, used by the backend for serendipity_editor.js.tpl + # catch *.tpl files serving as template, used by the backend for serendipity_editor.js.tpl return $serendipity['baseURL'] . 'index.php?/plugin/' . $file; } } - if (preg_match('@\.(tpl|css|php)@i', $file) && !stristr($file, 'plugin')) { - return $file; - } - return false; } @@ -387,8 +353,8 @@ function serendipity_logout() { function serendipity_session_destroy() { $no_smarty = $_SESSION['no_smarty']; @session_destroy(); - session_regenerate_id(); session_start(); + session_regenerate_id(); $_SESSION['SERVER_GENERATED_SID'] = true; $_SESSION['no_smarty'] = $no_smarty; @@ -514,7 +480,7 @@ function serendipity_checkAutologin($ident, $iv) { } /** - * Set a session cookie which can identify a user accross http/https boundaries + * Set a session cookie which can identify a user across http/https boundaries */ function serendipity_setAuthorToken() { $hash = sha1(uniqid(rand(), true)); @@ -564,7 +530,7 @@ function serendipity_authenticate_author($username = '', $password = '', $is_has } if ($debug) fwrite($fp, date('Y-m-d H:i') . ' - Login username check:' . $username . "\n"); - if ($username != '') { + if (!empty($username) && is_string($username)) { if ($use_external) { serendipity_plugin_api::hook_event('backend_auth', $is_hashed, array('username' => $username, 'password' => $password)); } @@ -587,7 +553,7 @@ function serendipity_authenticate_author($username = '', $password = '', $is_has if (empty($row['hashtype']) || $row['hashtype'] == 0) { if (isset($serendipity['hashkey']) && (time() - $serendipity['hashkey']) >= 15768000) { - die('You can no longer login with an old-style MD5 hash to prevent MD5-Hostage abuse. + die('You can no longer login with an old-style MD5 hash to prevent MD5-Hostage abuse. Please ask the Administrator to set you a new password.'); } @@ -838,7 +804,6 @@ function serendipity_iframe(&$entry, $mode = null) { break; case 'preview': - $serendipity['smarty_preview'] = true; $data['preview'] = serendipity_printEntries(array($entry), ($entry['extended'] != '' ? 1 : 0), true); break; } @@ -930,7 +895,7 @@ function serendipity_probeInstallation($item) { } if (class_exists('SQLite3')) { if ($has_pdo) { - $res['sqlite3oo'] = 'SQLite3 (OO) (Preferrably use PDO-SQlite!)'; + $res['sqlite3oo'] = 'SQLite3 (OO) (Preferably use PDO-SQlite!)'; } else { $res['sqlite3oo'] = 'SQLite3 (OO)'; } @@ -1202,7 +1167,7 @@ function serendipity_getPermissionNames() { * * This function caches all permission chacks in static function variables to not * fetch all permissions time and again. - * The permission checks are performed agains the values of each group. If a privilege + * The permission checks are performed against the values of each group. If a privilege * is set in one of the groups the author is a user of, the function returns true. * If a privilege is not set, the userlevel of an author is checked to act for backwards-compatibility. * @@ -1282,7 +1247,7 @@ function serendipity_checkPermission($permName, $authorid = null, $returnMyGroup * @access public * @param array The array of groups the author should be a member of. All memberships that were present before and not contained in this array will be removed. * @param int The ID of the author to update - * @param boolean If set to true, the groups can only be updated if the user has the adminUsersMaintainOthers privilege. If set to false, group memberships will be changable for any user. + * @param boolean If set to true, the groups can only be updated if the user has the adminUsersMaintainOthers privilege. If set to false, group memberships will be changeable for any user. * @return */ function serendipity_updateGroups($groups, $authorid, $apply_acl = true) { @@ -2013,7 +1978,7 @@ function serendipity_reportXSRF($type = 0, $reset = true, $use_config = false) { // Set this in your serendipity_config_local.inc.php if you want HTTP Referrer blocking: // $serendipity['referrerXSRF'] = true; - $string = '<div class="msg_error XSRF_' . $type . '"><span class="icon-attention"></span> ' . ERROR_XSRF . '</div>'; + $string = '<div class="msg_error XSRF_' . $type . '"><span class="icon-attention" aria-hidden="true"></span> ' . ERROR_XSRF . '</div>'; if ($reset) { // Config key "referrerXSRF" can be set to enable blocking based on HTTP Referrer. Recommended for Paranoia. if (($use_config && isset($serendipity['referrerXSRF']) && $serendipity['referrerXSRF']) || $use_config === false) { @@ -2082,7 +2047,7 @@ function serendipity_setFormToken($type = 'form') { global $serendipity; if ($type == 'form') { - return '<input type="hidden" name="serendipity[token]" value="' . md5(session_id()) . '" />'; + return '<input type="hidden" name="serendipity[token]" value="' . md5(session_id()) . '" />'."\n"; } elseif ($type == 'url') { return 'serendipity[token]=' . md5(session_id()); } else { diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php index d7364bb7..40caf71a 100644 --- a/include/functions_entries.inc.php +++ b/include/functions_entries.inc.php @@ -207,14 +207,15 @@ function &serendipity_fetchEntryCategories($entryid) { function &serendipity_fetchEntries($range = null, $full = true, $limit = '', $fetchDrafts = false, $modified_since = false, $orderby = 'timestamp DESC', $filter_sql = '', $noCache = false, $noSticky = false, $select_key = null, $group_by = null, $returncode = 'array', $joinauthors = true, $joincategories = true, $joinown = null) { global $serendipity; + $initial_args = array_values(func_get_args()); + if ($serendipity['useInternalCache']) { $cache = serendipity_setupCache(); - - $args = func_get_args(); - $args = array_values($args); - $key = md5(serialize($args)); - - if (($entries = $cache->get($key, "fetchEntries")) !== false) { + $key = md5(serialize($initial_args) . $serendipity['short_archives'] . '||' . $serendipity['range'] . '||' . $serendipity['GET']['category'] . '||' . $serendipity['GET']['hide_category'] . '||' . $serendipity['GET']['viewAuthor'] . '||' . $serendipity['GET']['page'] . '||' . $serendipity['fetchLimit'] . '||' . $serendipity['max_fetch_limit'] . '||' . $serendipity['GET']['adminModule'] . '||' . serendipity_checkPermission('adminEntriesMaintainOthers') . '||' .$serendipity['showFutureEntries'] . '||' . $serendipity['archiveSortStable'] . '||' . $serendipity['plugindata']['smartyvars']['uriargs'] ); + + $entries = $cache->get($key, "fetchEntries"); + if ($entries !== false) { + $serendipity['fullCountQuery'] = $cache->get($key . '_fullCountQuery', "fetchEntries"); return unserialize($entries); } } @@ -461,10 +462,10 @@ function &serendipity_fetchEntries($range = null, $full = true, $limit = '', $fe } if ($serendipity['useInternalCache']) { - $args = func_get_args(); - $args = array_values($args); - $key = md5(serialize($args)); + $key = md5(serialize($initial_args) . $serendipity['short_archives'] . '||' . $serendipity['range'] . '||' . $serendipity['GET']['category'] . '||' . $serendipity['GET']['hide_category'] . '||' . $serendipity['GET']['viewAuthor'] . '||' . $serendipity['GET']['page'] . '||' . $serendipity['fetchLimit'] . '||' . $serendipity['max_fetch_limit'] . '||' . $serendipity['GET']['adminModule'] . '||' . serendipity_checkPermission('adminEntriesMaintainOthers') . '||' .$serendipity['showFutureEntries'] . '||' . $serendipity['archiveSortStable'] . '||' . $serendipity['plugindata']['smartyvars']['uriargs']); + $cache->save(serialize($ret), $key, "fetchEntries"); + $cache->save($serendipity['fullCountQuery'], $key . '_fullCountQuery', "fetchEntries"); } return $ret; @@ -522,7 +523,7 @@ function serendipity_fetchEntryData(&$ret) { * @access public * @param string The column to compare $val against (like 'id') * @param string The value of the colum $key to compare with (like '4711') - * @param boolean Indicates if the full entry will be fetched (body+extended: TRUE), or only the body (FALSE). + * @param boolean Indicates if the full entry will be fetched (body+extended: TRUE), or only the body (FALSE). (Unused, keep for compat.) * @param string Indicates whether drafts should be fetched * @return */ @@ -627,7 +628,7 @@ function &serendipity_fetchEntryProperties($id) { * @param string The ACL artifact condition. If set to "write" only categories will be shown that the author can write to. If set to "read", only categories will be show that the author can read or write to. * @return array Returns the array of categories */ -function &serendipity_fetchCategories($authorid = null, $name = null, $order = null, $artifact_mode = 'write') { +function &serendipity_fetchCategories($authorid = null, $name = null, $order = null, $artifact_mode = 'write', $flat = false) { global $serendipity; if ($name === null) { @@ -716,6 +717,16 @@ function &serendipity_fetchCategories($authorid = null, $name = null, $order = n $ret =& serendipity_db_query($querystring); if (is_string($ret)) { echo "Query failed: $ret"; + } else { + if ($flat) { + $cats = serendipity_walkRecursive($ret, 'categoryid', 'parentid', VIEWMODE_THREADED); + $flat_cats = array(); + $flat_cats[0] = NO_CATEGORY; + foreach($cats AS $catidx => $catdata) { + $flat_cats[$catdata['categoryid']] = str_repeat(' ', $catdata['depth']*2) . serendipity_specialchars($catdata['category_name']); + } + return $flat_cats; + } } return $ret; } @@ -1046,7 +1057,7 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false, $sm if (!is_object($serendipity['smarty'])) { serendipity_smarty_init(); // if not set, start Smarty templating to avoid member function "method()" on a non-object errors (was draft preview error, now at line 1239) } - + if ($use_hooks) { $addData = array('extended' => $extended, 'preview' => $preview); serendipity_plugin_api::hook_event('entry_display', $entries, $addData); @@ -1165,8 +1176,9 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false, $sm $entry['link_rdf'] = serendipity_rewriteURL(PATH_FEEDS . '/ei_'. $entry['id'] .'.rdf'); $entry['title_rdf'] = serendipity_specialchars($entry['title_rdf']); - $entry['link_allow_comments'] = $serendipity['baseURL'] . 'comment.php?serendipity[switch]=enable&serendipity[entry]=' . $entry['id']; - $entry['link_deny_comments'] = $serendipity['baseURL'] . 'comment.php?serendipity[switch]=disable&serendipity[entry]=' . $entry['id']; + $formToken = serendipity_setFormToken('url'); + $entry['link_allow_comments'] = $serendipity['baseURL'] . 'comment.php?serendipity[switch]=enable&serendipity[entry]=' . $entry['id'] . '&' . $formToken; + $entry['link_deny_comments'] = $serendipity['baseURL'] . 'comment.php?serendipity[switch]=disable&serendipity[entry]=' . $entry['id'] . '&' . $formToken; $entry['allow_comments'] = serendipity_db_bool($entry['allow_comments']); $entry['moderate_comments'] = serendipity_db_bool($entry['moderate_comments']); $entry['viewmode'] = ($serendipity['GET']['cview'] == VIEWMODE_LINEAR ? VIEWMODE_LINEAR : VIEWMODE_THREADED); @@ -1227,12 +1239,21 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false, $sm 'is_comment_moderate' => (isset($serendipity['GET']['csuccess']) && $serendipity['GET']['csuccess'] == 'moderate' ? true: false) ); + if ($serendipity['serendipityAuthedUser'] === true && !isset($serendipity['POST']['preview'])) { + $userData = array(); + $userData['name'] = $serendipity['realname']; + $userData['email'] = $serendipity['email']; + $userData['url'] = ''; + } else { + $userData = $serendipity['POST']; + } + $serendipity['smarty']->assign($comment_add_data); serendipity_displayCommentForm( $entry['id'], $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?url=' . $entry['commURL'], true, - $serendipity['POST'], + $userData, true, serendipity_db_bool($entry['moderate_comments']), $entry @@ -1253,16 +1274,6 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false, $sm } $serendipity['smarty']->assignByRef('entries', $dategroup); - - if ($serendipity['useInternalCache']) { - $cache = serendipity_setupCache(); - - $args = func_get_args(); - $args = array_values($args); - $key = md5(serialize($args)); - $cache->save(serialize($dategroup), $key, "printEntries"); - } - unset($entries, $dategroup); $serendipity['smarty']->assign(array( @@ -1272,51 +1283,11 @@ function serendipity_printEntries($entries, $extended = 0, $preview = false, $sm if (isset($serendipity['short_archives']) && $serendipity['short_archives']) { return serendipity_smarty_fetch($smarty_block, 'entries_summary.tpl', true); } elseif ($smarty_fetch == true) { - return serendipity_smarty_fetch($smarty_block, 'entries.tpl', true); + return serendipity_smarty_fetch($smarty_block, 'entries.tpl', true, $preview); } } // end function serendipity_printEntries -function serendipity_printEntriesCached($entries, $extended = 0, $preview = false, $smarty_block = 'ENTRIES', $smarty_fetch = true, $use_hooks = true, $use_footer = true, $use_grouped_array = false) { - global $serendipity; - - $cache = serendipity_setupCache(); - - $args = func_get_args(); - $args = array_values($args); - $key = md5(serialize($args)); - - if (($dategroup = $cache->get($key, "printEntries")) !== false) { - $dategroup = unserialize($dategroup); - $serendipity['smarty']->assign('entries', $dategroup); - - # now let plugins do their magic and hope they don't do it twice - foreach($dategroup as $dategroup_idx => $properties) { - foreach($properties['entries'] as $x => $_entry) { - $addData = array('from' => 'functions_entries:printEntries'); - if ($entry['is_cached']) { - $addData['no_scramble'] = true; - } - serendipity_plugin_api::hook_event('frontend_display', $entry, $addData); - - $entry['display_dat'] = ''; - serendipity_plugin_api::hook_event('frontend_display:html:per_entry', $entry); - $entry['plugin_display_dat'] =& $entry['display_dat']; - } - } - - - if (isset($serendipity['short_archives']) && $serendipity['short_archives']) { - serendipity_smarty_fetch($smarty_block, 'entries_summary.tpl', true); - } elseif ($smarty_fetch == true) { - serendipity_smarty_fetch($smarty_block, 'entries.tpl', true); - } - return true; - } else { - return false; - } -} - function serendipity_cleanCache() { include_once 'Cache/Lite.php'; @@ -1330,10 +1301,7 @@ function serendipity_cleanCache() { 'hashedDirectoryLevel' => 2 ); $cache = new Cache_Lite($options); - $successFetch = $cache->clean("fetchEntries"); - $successPrint = $cache->clean("printEntries"); - return $successFetch && $successPrint; - + return $cache->clean("fetchEntries"); } function serendipity_setupCache() { @@ -1473,7 +1441,7 @@ function serendipity_updertEntry($entry) { if (is_numeric($cat)) { serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}entrycat (entryid, categoryid) VALUES ({$entry['id']}, {$cat})"); } elseif (is_array($cat) && !empty($cat['categoryid'])) { - serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}entrycat (entryid, categoryid) VALUES ({$entry['id']}, {$cat['categoryid']})"); + serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}entrycat (entryid, categoryid) VALUES ({$entry['id']}, " . (int)$cat['categoryid'] . ")"); } } } @@ -1504,7 +1472,7 @@ function serendipity_updertEntry($entry) { if (is_array($categories)) { serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}entrycat WHERE entryid={$entry['id']}"); foreach ($categories as $cat) { - serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}entrycat (entryid, categoryid) VALUES ({$entry['id']}, {$cat})"); + serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}entrycat (entryid, categoryid) VALUES ({$entry['id']}, " . (int)$cat . ")"); } } elseif ($had_categories) { // This case actually only happens if an existing entry is edited, and its category assignments are all removed. diff --git a/include/functions_entries_admin.inc.php b/include/functions_entries_admin.inc.php index a98cef1c..1df7f00f 100644 --- a/include/functions_entries_admin.inc.php +++ b/include/functions_entries_admin.inc.php @@ -18,7 +18,7 @@ include_once(S9Y_INCLUDE_PATH . "include/functions_trackbacks.inc.php"); * @param string The URL where the entry form is submitted to * @param array An array of hidden input fields that should be passed on to the HTML FORM * @param array The entry superarray with your entry's contents - * @param string Any error messages that might have occured on the last run + * @param string Any error messages that might have occurred on the last run * @return null */ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = array(), $errMsg = "") { @@ -83,6 +83,8 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr foreach ($entry['categories'] as $cat) { $selected[] = $cat['categoryid']; } + } elseif ($serendipity['categoryDefault'] > 0) { + $selected[] = $serendipity['categoryDefault']; } if (count($selected) > 1 || @@ -117,6 +119,7 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr } $template_vars['formToken'] = serendipity_setFormToken(); + $template_vars['urlToken'] = serendipity_setFormToken('url'); if (isset($serendipity['allowDateManipulation']) && $serendipity['allowDateManipulation']) { $template_vars['allowDateManipulation'] = true; @@ -151,7 +154,7 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr $serendipity['smarty']->assign('admin_view', 'entryform'); serendipity_plugin_api::hook_event('backend_entryform_smarty', $template_vars); $serendipity['smarty']->assignByRef('entry_vars', $template_vars); - return serendipity_smarty_show($template_vars['entry_template']); + return serendipity_smarty_show('admin/entries.tpl'); } function serendipity_emit_htmlarea_code($item, $jsname, $spawnMulti = false) { diff --git a/include/functions_images.inc.php b/include/functions_images.inc.php index a784f1da..c17592fa 100644 --- a/include/functions_images.inc.php +++ b/include/functions_images.inc.php @@ -87,7 +87,7 @@ function serendipity_fetchImagesFromDatabase($start=0, $limit=0, &$total=null, $ $cond['parts']['directory'] = " AND i.path = ''\n"; } } - + if (!empty($filename)) { $cond['parts']['filename'] = " AND (i.name like '%" . serendipity_db_escape_string($filename) . "%' OR i.realname like '%" . serendipity_db_escape_string($filename) . "%')\n"; @@ -329,7 +329,7 @@ function serendipity_deleteImage($id) { $file = serendipity_fetchImageFromDatabase($id); if (!is_array($file)) { - $messages .= sprintf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . FILE_NOT_FOUND . "</span>\n", $id); + $messages .= sprintf('<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . FILE_NOT_FOUND . "</span>\n", $id); //return false; } else { @@ -351,9 +351,9 @@ function serendipity_deleteImage($id) { if (!$file['hotlink']) { if (file_exists($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $dFile)) { if (@unlink($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $dFile)) { - $messages .= sprintf('<span class="msg_success"><span class="icon-ok-circled"></span> ' . DELETE_FILE . "</span>\n", $dFile); + $messages .= sprintf('<span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> ' . DELETE_FILE . "</span>\n", $dFile); } else { - $messages .= sprintf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . DELETE_FILE_FAIL . "</span>\n", $dFile); + $messages .= sprintf('<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . DELETE_FILE_FAIL . "</span>\n", $dFile); } serendipity_plugin_api::hook_event('backend_media_delete', $dThumb); @@ -362,14 +362,14 @@ function serendipity_deleteImage($id) { $dfThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $dfnThumb; if (@unlink($dfThumb)) { - $messages .= sprintf('<span class="msg_success"><span class="icon-ok-circled"></span> ' . DELETE_THUMBNAIL . "</span>\n", $dfnThumb); + $messages .= sprintf('<span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> ' . DELETE_THUMBNAIL . "</span>\n", $dfnThumb); } } } else { - $messages .= sprintf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . FILE_NOT_FOUND . "</span>\n", $dFile); + $messages .= sprintf('<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . FILE_NOT_FOUND . "</span>\n", $dFile); } } else { - $messages .= sprintf('<span class="msg_hint"><span class="icon-help-circled"></span> ' . DELETE_HOTLINK_FILE . "</span>\n", $file['name']); + $messages .= sprintf('<span class="msg_hint"><span class="icon-help-circled" aria-hidden="true"></span> ' . DELETE_HOTLINK_FILE . "</span>\n", $file['name']); } serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}images WHERE id = ". (int)$id); @@ -682,7 +682,7 @@ function serendipity_makeThumbnail($file, $directory = '', $size = false, $thumb } exec($cmd, $output, $result); if ($result != 0) { - echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."</span>\n"; + echo '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."</span>\n"; $r = false; // return failure } else { touch($outfile); @@ -725,7 +725,7 @@ function serendipity_scaleImg($id, $width, $height) { $cmd = escapeshellcmd($serendipity['convert']) . ' -scale ' . serendipity_escapeshellarg($width . 'x' . $height) . ' ' . serendipity_escapeshellarg($infile) . ' ' . serendipity_escapeshellarg($outfile); exec($cmd, $output, $result); if ( $result != 0 ) { - echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."</span>\n"; + echo '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."</span>\n"; return false; } unset($output, $result); @@ -776,7 +776,7 @@ function serendipity_rotateImg($id, $degrees) { $cmd = escapeshellcmd($serendipity['convert']) . ' -rotate ' . serendipity_escapeshellarg($degrees) . ' ' . serendipity_escapeshellarg($infile) . ' ' . serendipity_escapeshellarg($outfile); exec($cmd, $output, $result); if ( $result != 0 ) { - echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."</span>\n"; + echo '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."</span>\n"; } unset($output, $result); @@ -784,7 +784,7 @@ function serendipity_rotateImg($id, $degrees) { $cmd = escapeshellcmd($serendipity['convert']) . ' -rotate ' . serendipity_escapeshellarg($degrees) . ' ' . serendipity_escapeshellarg($infileThumb) . ' ' . serendipity_escapeshellarg($outfileThumb); exec($cmd, $output, $result); if ( $result != 0 ) { - echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."</span>\n"; + echo '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . sprintf(IMAGICK_EXEC_ERROR, $cmd, $output[0], $result) ."</span>\n"; } unset($output, $result); @@ -838,13 +838,13 @@ function serendipity_generateThumbs() { // Only print the resize message the first time if (!$msg_printed) { $resizemedia = sprintf(RESIZE_BLAHBLAH, THUMBNAIL_SHORT); - printf('<span class="msg_notice"><span class="icon-info-circled"></span> ' . $resizemedia . "</span>\n"); + printf('<span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> ' . $resizemedia . "</span>\n"); echo "\n" . '<ul class="serendipityFileList">' . "\n"; $msg_printed = true; } echo '<li>' . $sThumb . ': ' . $returnsize['width'] . 'x' . $returnsize['height'] . "</li>\n"; if (!file_exists($newThumb)) { - printf('<li><span class="msg_error"><span class="icon-attention-circled"></span> ' . THUMBNAIL_FAILED_COPY . '</span></li>' . "\n", $sThumb); + printf('<li><span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . THUMBNAIL_FAILED_COPY . '</span></li>' . "\n", $sThumb); } else { $update = true; } @@ -852,7 +852,7 @@ function serendipity_generateThumbs() { } elseif (!file_exists($oldThumb) && !file_exists($newThumb) && $fdim[0] <= $serendipity['thumbSize'] && $fdim[1] <= $serendipity['thumbSize']) { if (!$msg_printed) { $resizethumb = sprintf(RESIZE_BLAHBLAH, THUMB); - printf('<span class="msg_notice"><span class="icon-info-circled"></span> ' . $resizethumb . "</span>\n"); + printf('<span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> ' . $resizethumb . "</span>\n"); echo "\n" . '<ul class="serendipityFileList">' . "\n"; $msg_printed = true; } @@ -861,7 +861,7 @@ function serendipity_generateThumbs() { printf('<li>' . THUMBNAIL_USING_OWN . '</li>' . "\n", $sThumb); $update = true; } else { - printf('<li><span class="msg_error"><span class="icon-attention-circled"></span> ' . THUMBNAIL_FAILED_COPY . '</span></li>' . "\n", $sThumb); + printf('<li><span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . THUMBNAIL_FAILED_COPY . '</span></li>' . "\n", $sThumb); } } @@ -1113,7 +1113,7 @@ function serendipity_syncThumbs($deleteThumbs = false) { $f = serendipity_parseFileName($files[$x]); if (empty($f[1]) || $f[1] == $files[$x]) { // No extension means bad file most probably. Skip it. - printf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . SKIPPING_FILE_EXTENSION . "</span>\n", $files[$x]); + printf('<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . SKIPPING_FILE_EXTENSION . "</span>\n", $files[$x]); continue; } @@ -1127,7 +1127,7 @@ function serendipity_syncThumbs($deleteThumbs = false) { } if (!is_readable($ffull) || filesize($ffull) == 0) { - printf('<span class="msg_error"><span class="icon-attention-circled"></span> ' . SKIPPING_FILE_UNREADABLE . "</span>\n", $files[$x]); + printf('<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . SKIPPING_FILE_UNREADABLE . "</span>\n", $files[$x]); continue; } @@ -1460,7 +1460,7 @@ function serendipity_displayImageList($page = 0, $lineBreak = NULL, $manage = fa static $debug = false; $extraParems = serendipity_generateImageSelectorParems(); - + $serendipity['GET']['only_path'] = serendipity_uploadSecure($limit_path . $serendipity['GET']['only_path'], true); $serendipity['GET']['only_filename'] = serendipity_specialchars(str_replace(array('*', '?'), array('%', '_'), $serendipity['GET']['only_filename'])); @@ -1796,7 +1796,7 @@ function serendipity_killPath($basedir, $directory = '', $forceDelete = false) { } @closedir($handle); - echo '<span class="msg_notice"><span class="icon-info-circled"></span> '; + echo '<span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> '; printf(CHECKING_DIRECTORY, $directory); echo "</span>"; @@ -1825,14 +1825,14 @@ function serendipity_killPath($basedir, $directory = '', $forceDelete = false) { echo "<ul class='plainList'>\n"; foreach($filestack AS $f => $file) { if ($serious && @unlink($basedir . $file)) { - printf('<li><span class="msg_success"><span class="icon-ok-circled"></span> ' . DELETING_FILE . ' ' . DONE . "</span></li>\n", $file); + printf('<li><span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> ' . DELETING_FILE . ' ' . DONE . "</span></li>\n", $file); } else { - printf('<li><span class="msg_error"><span class="icon-attention-circled"></span> ' . DELETING_FILE . ' ' . ERROR . "</span></li>\n", $file); + printf('<li><span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . DELETING_FILE . ' ' . ERROR . "</span></li>\n", $file); } } echo "</ul>\n"; } else { - echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_DIRECTORY_NOT_EMPTY . "</span>\n"; + echo '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ' . ERROR_DIRECTORY_NOT_EMPTY . "</span>\n"; echo "<ul>\n"; foreach($filestack AS $f => $file) { echo '<li>' . $file . "</li>\n"; @@ -1842,11 +1842,11 @@ function serendipity_killPath($basedir, $directory = '', $forceDelete = false) { } if ($serious && !empty($directory) && !preg_match('@^.?/?$@', $directory) && @rmdir($basedir . $directory)) { - echo '<span class="msg_success"><span class="icon-ok-circled"></span> '; + echo '<span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> '; printf(DIRECTORY_DELETE_SUCCESS, $directory); echo "</span>\n"; } else { - echo '<span class="msg_error"><span class="icon-attention-circled"></span> '; + echo '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> '; printf(DIRECTORY_DELETE_FAILED, $directory); echo "</span>\n"; } @@ -2109,6 +2109,21 @@ function serendipity_escapeshellarg($string) { return escapeshellarg(str_replace('%', '', $string)); } + + +/** + * Move file with all thumbnails to given directory and update database and entries + * */ +function serendipity_moveFileTo($id, $dir) { + global $serendipity; + $file = serendipity_fetchImageFromDatabase($id); + + serendipity_renameFile($id, $file['name'], $dir); + serendipity_updateImageInDatabase(array('path' => $dir), $id); + serendipity_updateImageInEntries($id); + return true; +} + /** * Rename a media directory * @@ -2116,7 +2131,147 @@ function serendipity_escapeshellarg($string) { * @param string Old directory name * @param string New directory name */ -function serendipity_renameDir($old, $new) { +function serendipity_renameDir($oldDir, $newDir) { + global $serendipity; + # Plan: 1. Get id of all images under $oldDir (including those in subdirs) + # 2. Move $oldDir to newDir + # 3. Update image (path) in database + # 3. Update image in entries via serendipity_updateImageInEntries + $imgBase = serendipity_dirSlash('end', $serendipity['serendipityPath'] . $serendipity['uploadPath']); + + $total = null; + $images = serendipity_fetchImagesFromDatabase(0, 0, $total, false, false, $oldDir); + + if (! file_exists("${imgBase}${newDir}")) { + rename("${imgBase}${oldDir}", "${imgBase}${newDir}"); + + foreach($images as $image) { + serendipity_updateImageInDatabase( + array('path' => preg_replace('@' . preg_quote(serendipity_dirSlash('end', $oldDir)) . '@', serendipity_dirSlash('end', $newDir), $image['path'], 1)), // we use preg_replace and not str_replace to be able to limit to exacty one replacement, preventing issues when a path has loops in it + $image['id'] + ); + serendipity_updateImageInEntries($image['id']); + } + + return true; + } + return false; + +} + +/** + * Rename a file in the ML (upload folder and database). Also edit entries to use the new name, and move the thumbnails + * + * @param Id of the image to be renamed + * @param The new name (without extension) + * @path The new path to be prepended to the new name, if the file is also to be moved + * */ +function serendipity_renameFile($id, $newName, $path = null) { + global $serendipity; + $file = serendipity_fetchImageFromDatabase($id); + + if (!is_array($file) || (!serendipity_checkPermission('adminImagesMaintainOthers') && $file['authorid'] != '0' && $file['authorid'] != $serendipity['authorid'])) { + return; + } + $oldName = $file['name']; + + if (LANG_CHARSET == 'UTF-8') { + $newName = utf8_encode($newName); + } + + if ($path === null) { + $path = $file['path']; + } + + $newName = serendipity_uploadSecure(serendipity_makeFilename($newName), true); + $imgBase = $serendipity['serendipityPath'] . $serendipity['uploadPath']; + + $newPath = "{$imgBase}{$path}{$newName}.{$file['extension']}"; + + rename("{$imgBase}{$file['path']}{$file['realname']}", $newPath); + + serendipity_renameThumbnails($id, "{$path}$newName"); + + serendipity_updateImageInDatabase(array('name' => $newName, 'realname' => basename($newPath)), $id); + serendipity_updateImageInEntries($id); +} + +/** + * Rename thumbnails linked to $id + * + * */ +function serendipity_renameThumbnails($id, $newName) { + global $serendipity; + + $file = serendipity_fetchImageFromDatabase($id); + + $thumbnails = serendipity_getThumbnails($id); + foreach($thumbnails as $thumbnail) { + $newThumbnail = str_replace("{$file['path']}{$file['name']}", $newName, $thumbnail); + rename($thumbnail, $newThumbnail); + } + return true; +} + +/** + * Get an array of existing thumbnails linked to the image with the given id + * + * */ +function serendipity_getThumbnails($id) { + global $serendipity; + + $file = serendipity_fetchImageFromDatabase($id); + $name = $file['name']; + + $imagePath = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file['path'] . $file['realname']; + $thumbnailBase = str_replace($file['extension'], '', $imagePath); + $uploadDir = dirname($imagePath); + + return glob("$thumbnailBase*{$file['thumbnail_name']}.{$file['extension']}"); +} + +/** + * Set image references to current path in all articles linking to them via the ML + * */ +function serendipity_updateImageInEntries($id) { + global $serendipity; + + $file = serendipity_fetchImageFromDatabase($id); + $imageHTTPPath = $serendipity['defaultBaseURL'] . $serendipity['uploadHTTPPath'] . $file['path'] . $file['realname']; + $thumbnailHTTPPath = str_replace(".{$file['extension']}", "{$file['thumbnail_name']}.{$file['extension']}", $imageHTTPPath); + + + $q = "SELECT id, body, extended FROM {$serendipity['dbPrefix']}entries + WHERE + body LIKE '%<!-- s9ymdb:$id -->%' OR extended LIKE '%<!-- s9ymdb:$id -->%'"; + + $entries = serendipity_db_query($q, false, 'assoc'); + + if (is_array($entries) && !empty($entries)) { + foreach($entries as $entry) { + $pattern = "@(<!-- s9ymdb:$id -->.*) src=[\"']([^'\"]+)[\"']@"; + + $callback = function($matches) use ($imageHTTPPath, $thumbnailHTTPPath) { + if (strpos($matches[2], "{$file['thumbnail_name']}.{$file['extension']}") === false) { + // the image linked not to the thumbnail + return "{$matches[1]} src='$imageHTTPPath'"; + } else { + return "{$matches[1]} src='$thumbnailHTTPPath'"; + } + }; + + $entry['body'] = preg_replace_callback($pattern, $callback, $entry['body']); + $entry['extended'] = preg_replace_callback($pattern, $callback, $entry['extended']); + + $uq = "UPDATE {$serendipity['dbPrefix']}entries + SET + body = '" . serendipity_db_escape_string($entry['body']) . "' , + extended = '" . serendipity_db_escape_string($entry['extended']) . "' + WHERE + id = " . serendipity_db_escape_string($entry['id']); + serendipity_db_query($uq); + } + } } /** @@ -2225,19 +2380,19 @@ function serendipity_directoryACL(&$paths, $type = 'read') { if ($granted === false) { // We are not allowed to access this element if ($debug) { - echo '<span class="msg_error"><span class="icon-attention-circled"></span> ACL for ' . $info['relpath'] . " DENIED.</span>"; + echo '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ACL for ' . $info['relpath'] . " DENIED.</span>"; } unset($paths[$idx]); } else { if ($debug) { - echo '<span class="msg_success"><span class="icon-ok-circled"></span> ACL for ' . $info['relpath'] . " granted.</span>"; + echo '<span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> ACL for ' . $info['relpath'] . " granted.</span>"; } } } if (count($paths) < $startCount) { if ($debug) { - echo '<span class="msg_error"><span class="icon-attention-circled"></span> ACL denied all.</span>'; + echo '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> ACL denied all.</span>'; } return false; } @@ -2925,10 +3080,11 @@ function serendipity_showMedia(&$file, &$paths, $url = '', $manage = false, $lin } $order_fields = serendipity_getImageFields(); // reset filename for building template filters, since this is hardcoded as 'only_filename' - unset($order_fields['i.name']); + #unset($order_fields['i.name']); $media = array( 'manage' => $manage, + 'multiperm' => serendipity_checkPermission('adminImagesDirectories'), 'lineBreak' => $lineBreak, 'lineBreakP' => round(1/$lineBreak*100), 'url' => $url, @@ -2974,10 +3130,10 @@ function serendipity_showMedia(&$file, &$paths, $url = '', $manage = false, $lin if ($enclose) { serendipity_smarty_fetch('MEDIA_ITEMS', 'admin/media_items.tpl'); - return serendipity_smarty_show(serendipity_getTemplateFile('admin/media_pane.tpl', 'serendipityPath')); + return serendipity_smarty_show('admin/media_pane.tpl'); } else { serendipity_smarty_fetch('MEDIA_ITEMS', 'admin/media_items.tpl'); - return serendipity_smarty_show(serendipity_getTemplateFile('admin/media_properties.tpl', 'serendipityPath')); + return serendipity_smarty_show('admin/media_properties.tpl'); } } @@ -3322,7 +3478,7 @@ function serendipity_imageAppend(&$tfile, &$target, $dir, $echo = true) { $target = $dir . $tfile; if ($echo) { - echo '<span class="msg_success"><span class="icon-ok-circled"></span> <strong>'; + echo '<span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> <strong>'; printf(FILENAME_REASSIGNED . '<br />', serendipity_specialchars($tfile)); echo "</strong></span>\n"; } @@ -3341,7 +3497,7 @@ function serendipity_checkMediaSize($file) { if (!empty($serendipity['maxFileSize'])) { if (filesize($file) > $serendipity['maxFileSize']) { - echo '<span class="msg_error"><span class="icon-attention-circled"></span> '; + echo '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> '; printf(MEDIA_UPLOAD_SIZEERROR . '<br />', (int)$serendipity['maxFileSize']); echo "</span>\n"; return false; @@ -3356,7 +3512,7 @@ function serendipity_checkMediaSize($file) { if (!empty($serendipity['maxImgWidth'])) { if ($dim[0] > $serendipity['maxImgWidth']) { - echo '<span class="msg_error"><span class="icon-attention-circled"></span> '; + echo '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> '; printf(MEDIA_UPLOAD_DIMERROR . '<br />', (int)$serendipity['maxImgWidth'], (int)$serendipity['maxImgHeight']); echo "</span>\n"; return false; @@ -3365,7 +3521,7 @@ function serendipity_checkMediaSize($file) { if (!empty($serendipity['maxImgHeight'])) { if ($dim[1] > $serendipity['maxImgHeight']) { - echo '<span class="msg_error"><span class="icon-attention-circled"></span> '; + echo '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> '; printf(MEDIA_UPLOAD_DIMERROR . '<br />', (int)$serendipity['maxImgWidth'], (int)$serendipity['maxImgHeight']); echo "</span>\n"; return false; @@ -3377,7 +3533,10 @@ function serendipity_checkMediaSize($file) { } /** - * Moves a media directory + * DEPRECATED. Use the functions serendipity_renameDir and serendipity_moveFile instead. This is only + * a wrapper around those, for backwards compatibility + * + * Moves a media directory * * @param string The old directory. * This can be NULL or (an empty / a) STRING for re-name/multiCheck move comparison events @@ -3390,407 +3549,11 @@ function serendipity_checkMediaSize($file) { */ function serendipity_moveMediaDirectory($oldDir, $newDir, $type = 'dir', $item_id = null, $file = null) { global $serendipity; - - // paranoid case for updating an old image id entry - else we have a new entry incrementary - if (is_null($item_id) && isset($file['id']) && $file['id'] > 0) $item_id = $file['id']; - - if (!$item_id || $item_id < 1) { - // only print message if not posting a case_directoryEdit submit - if (empty($serendipity['POST']['save'])) { - echo '<span class="msg_error"><span class="icon-attention-circled"></span> '; - printf(ERROR_FILE_NOT_EXISTS, $item_id); - echo "</span>\n"; - return false; - } - } - - // Prepare data for the database, any hooks and the real file move, by case AREA: - // DIR = Media directory form edit, - // FILE = File rename or File bulk move, - // FILEDIR = Media properties form edit - - // images.inc case 'directoryEdit', which is ML Directories form, via ML case 'directorySelect' if ($type == 'dir') { - - $real_oldDir = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $oldDir; - $real_newDir = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $newDir; - - if (!is_dir($real_oldDir)) { - echo '<span class="msg_error"><span class="icon-attention-circled"></span> '; - printf(ERROR_FILE_NOT_EXISTS, $oldDir); - echo "</span>\n"; - return false; - } - - if (is_dir($real_newDir)) { - echo '<span class="msg_error"><span class="icon-attention-circled"></span> '; - printf(ERROR_FILE_EXISTS, $newDir); - echo "</span>\n"; - return false; - } - - if (!rename($real_oldDir, $real_newDir)) { - echo '<span class="msg_error"><span class="icon-attention-circled"></span> '; - printf(MEDIA_DIRECTORY_MOVE_ERROR, $newDir); - echo "</span>\n"; - return false; - } - - echo '<span class="msg_success"><span class="icon-ok-circled"></span> '; - printf(MEDIA_DIRECTORY_MOVED, $newDir); - echo "</span>\n"; - - $dirs = serendipity_db_query("SELECT id, path - FROM {$serendipity['dbPrefix']}images - WHERE path LIKE '" . serendipity_db_escape_string($oldDir) . "%'", false, 'assoc'); - if (is_array($dirs)) { - foreach($dirs AS $dir) { - $old = $dir['path']; - $new = preg_replace('@^(' . preg_quote($oldDir) . ')@i', $newDir, $old); - serendipity_db_query("UPDATE {$serendipity['dbPrefix']}images - SET path = '" . serendipity_db_escape_string($new) . "' - WHERE id = {$dir['id']}"); - } - } - - $dirs = serendipity_db_query("SELECT groupid, artifact_id, artifact_type, artifact_mode, artifact_index - FROM {$serendipity['dbPrefix']}access - WHERE artifact_type = 'directory' - AND artifact_index LIKE '" . serendipity_db_escape_string($oldDir) . "%'", false, 'assoc'); - if (is_array($dirs)) { - foreach($dirs AS $dir) { - $old = $dir['artifact_index']; - $new = preg_replace('@^(' . preg_quote($oldDir) . ')@i', $newDir, $old); - serendipity_db_query("UPDATE {$serendipity['dbPrefix']}access - SET artifact_index = '" . serendipity_db_escape_string($new) . "' - WHERE groupid = '" . serendipity_db_escape_string($dir['groupid']) . "' - AND artifact_id = '" . serendipity_db_escape_string($dir['artifact_id']) . "' - AND artifact_type = '" . serendipity_db_escape_string($dir['artifact_type']) . "' - AND artifact_mode = '" . serendipity_db_escape_string($dir['artifact_mode']) . "' - AND artifact_index = '" . serendipity_db_escape_string($dir['artifact_index']) . "'"); - } - } - // hook into staticpage for the renaming regex replacements - // first and last two are null - only differ by being set already by their default var for the last two - $renameValues = array(array( - 'from' => null, - 'to' => null, - 'thumb' => $serendipity['thumbSuffix'], - 'fthumb' => null, - 'oldDir' => $oldDir, - 'newDir' => $newDir, - 'type' => $type, - 'item_id' => $item_id, - 'file' => $file - )); - // Changing a ML directory via directoryEdit needs to run through entries too! - serendipity_plugin_api::hook_event('backend_media_rename', $renameValues); - - // case 'rename' OR 'multidelete' (bulk multimove) - } else if ($type == 'file') { - - // active in mean of eval or executable - if (serendipity_isActiveFile(basename($newDir))) { - echo '<span class="msg_error"><span class="icon-attention-circled"></span> '; - printf(ERROR_FILE_FORBIDDEN, serendipity_specialchars($newDir)); - echo "</span>\n"; - return false; - } - if (!empty($file['hotlink'])) { - $newHotlinkFile = (false === strpos($newDir, $file['extension'])) ? $newDir . (empty($file['extension']) ? '' : '.' . $file['extension']) : $newDir; - serendipity_updateImageInDatabase(array('realname' => $newHotlinkFile, 'name' => $newDir), $item_id); - } else { - $parts = pathinfo($newDir); - - // build new, thumb and old file names relative to Serendipity root path - if ($oldDir === null && $newDir != 'uploadRoot') { - - // case single file re-name event (newDir = newName is passed without path!) - $newName = $newDir; // for better readability - // do we really need this? - if ($parts['extension'] != $file['extension']) { - $file_new = $file['path'] . $newName . (empty($file['extension']) ? '' : '.' . $file['extension']); - $file_old = $file['path'] . $file['name'] . (empty($file['extension']) ? '' : '.' . $file['extension']); - } else { - $file_new = $file['path'] . $newName; - $file_old = $file['path'] . $file['name']; - } - // build full thumb file names - $file_newthumb = $file['path'] . $newName . (!empty($file['thumbnail_name']) ? '.' . $file['thumbnail_name'] : '') . (empty($file['extension']) ? '' : '.' . $file['extension']); - $file_oldthumb = $file['path'] . $file['name'] . (!empty($file['thumbnail_name']) ? '.' . $file['thumbnail_name'] : '') . (empty($file['extension']) ? '' : '.' . $file['extension']); - $newThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file_newthumb; - $oldThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file_oldthumb; - - } else { - - // case bulkmove event (newDir is passed inclusive path! and normally w/o the filename, but we better check this though) - $newDir = ($newDir == 'uploadRoot') ? '' : $newDir; // Take care: remove temporary 'uploadRoot' string, in case of moving a subdir file into upload root by bulkmove - $_newDir = str_replace($file['name'] . (empty($file['extension']) ? '' : '.' . $file['extension']), '', $newDir); - // do we really need this? - if ($parts['extension'] != $file['extension']) { - $file_new = $_newDir . $file['name'] . (empty($file['extension']) ? '' : '.' . $file['extension']); - $file_old = $file['path'] . $file['name'] . (empty($file['extension']) ? '' : '.' . $file['extension']); - } else { - $file_new = $_newDir . $file['name']; - $file_old = $file['path'] . $file['name']; - } - - } - - // build full origin and new file path names - $newfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file_new; - $oldfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $file_old; - - // check files existence - if (file_exists($oldfile) && !file_exists($newfile)) { - - // for the paranoid, securely check these build filenames again, since we really need a real file set to continue! - $newparts = pathinfo($newfile); - if ($newparts['dirname'] == '.' || (!empty($file['extension']) && empty($newparts['extension'])) || empty($newparts['filename'])) { - // error new file build mismatch - echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . $newfile . ' ' . ERROR_SOMETHING . "</span>\n"; - return false; - } - - // Case re-name event, keeping a possible moved directory name for a single file - if ($oldDir === null) { - // Move the origin file - @rename($oldfile, $newfile); - // do not re-name again, if item has no thumb name (eg zip object file case) and old thumb actually exists (possible missing pdf preview image on WinOS with IM) - if (($newThumb != $newfile) && file_exists($oldThumb)) { - // the thumb file - @rename($oldThumb, $newThumb); // Keep both rename() error disabled, since we have to avoid any output in renaiming cases - } - - // hook into staticpage for the renaming regex replacements - $renameValues = array(array( - 'from' => $oldfile, - 'to' => $newfile, - 'thumb' => $serendipity['thumbSuffix'], - 'fthumb' => $file['thumbnail_name'], - 'oldDir' => $oldDir, - 'newDir' => $newDir, - 'type' => $type, - 'item_id' => $item_id, - 'file' => $file - )); - serendipity_plugin_api::hook_event('backend_media_rename', $renameValues); - - // renaming filenames has to update mediaproperties if set - $q = "UPDATE {$serendipity['dbPrefix']}mediaproperties - SET value = '" . serendipity_db_escape_string($newName . (empty($file['extension']) ? '' : '.' . $file['extension'])) . "' - WHERE mediaid = " . (int)$item_id . ' AND property = "realname" AND value = "' . $file['realname'] . '"'; - serendipity_db_query($q); - $q = "UPDATE {$serendipity['dbPrefix']}mediaproperties - SET value = '" . serendipity_db_escape_string($newName) . "' - WHERE mediaid = " . (int)$item_id . ' AND property = "name" AND value = "' . $file['name'] .'"'; - serendipity_db_query($q); - $q = "UPDATE {$serendipity['dbPrefix']}mediaproperties - SET value = '" . serendipity_db_escape_string($newName . (empty($file['extension']) ? '' : '.' . $file['extension'])) . "' - WHERE mediaid = " . (int)$item_id . ' AND property = "TITLE" AND value = "' . $file['realname'] .'"'; - serendipity_db_query($q); - - serendipity_updateImageInDatabase(array('thumbnail_name' => $renameValues[0]['thumb'], 'realname' => $newName . (empty($file['extension']) ? '' : '.' . $file['extension']), 'name' => $newName), $item_id); - - // Forward user to overview (we don't want the user's back button to rename things again) ?? What does this do? Check!!! - } - - // Case Move or Bulkmove event - // newDir can now be used for the uploads directory root path too - // Do not allow an empty string or not set newDir for the build call so we do not conflict with rename calls, which are single files only and is done above - // BULKMOVE vars oldfile and newfile are fullpath based see above - elseif (!empty($newfile)) { - - if ($newDir == 'uploadRoot') $newDir = ''; // now move back into root of /uploads dir - - // hook into staticpage for the renaming regex replacements - $renameValues = array(array( - 'from' => $oldfile, - 'to' => $newfile, - 'thumb' => $serendipity['thumbSuffix'], - 'fthumb' => $file['thumbnail_name'], - 'oldDir' => $oldDir, - 'newDir' => $newDir, - 'type' => $type, - 'item_id' => $item_id, - 'file' => $file - )); - serendipity_plugin_api::hook_event('backend_media_rename', $renameValues); // eg. for staticpage entries path regex replacements - - // Move the origin file - try { rename($oldfile, $newfile); } catch (Exception $e) { echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_SOMETHING . ': '.$e->getMessage() . "</span>\n"; } - - // do still need this? YES, it is definitely false, so we would not need the ternary - // Rename newDir + file name in case it is called by the Bulk Move and not by rename - $newDirFile = (false === strpos($newDir, $file['name'])) ? $newDir . $file['name'] : $newDir; - - foreach($renameValues AS $renameData) { - // build full thumb file names - $thisOldThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $renameData['oldDir'] . $file['name'] . (!empty($renameData['fthumb']) ? '.' . $renameData['fthumb'] : '.' . $serendipity['thumbSuffix']) . (empty($file['extension']) ? '' : '.' . $file['extension']); - $thisNewThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $newDirFile . (!empty($file['thumbnail_name']) ? '.' . $renameData['thumb'] : '.' . $serendipity['thumbSuffix']) . (empty($file['extension']) ? '' : '.' . $file['extension']); - // Check for existent old thumb files first, to not need to disable rename by @rename(), then move the thumb file and catch any wrong renaming - if (($thisNewThumb != $newfile) && file_exists($thisOldThumb)) { - // the thumb file and catch any wrong renaming - try { rename($thisOldThumb, $thisNewThumb); } catch (Exception $e) { echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_SOMETHING . ': '.$e->getMessage() . "</span>\n"; } - } - } - - serendipity_updateImageInDatabase(array('thumbnail_name' => $renameValues[0]['thumb'], 'path' => $newDir, 'realname' => $file['realname'], 'name' => $file['name']), $item_id); - // Forward user to overview (we don't want the user's back button to rename things again) - } else { - //void - } - } else { - if (!file_exists($oldfile)) { - echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_FILE_NOT_EXISTS . "</span>\n"; - } elseif (file_exists($newfile)) { - echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_FILE_EXISTS . "</span>\n"; - } else { - echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_SOMETHING . "</span>\n"; - } - - return false; - } - } - - // used solely by serendipity_parsePropertyForm base_properties when changing the file selected path within mediaproperties form - } elseif ($type == 'filedir') { - - serendipity_db_query("UPDATE {$serendipity['dbPrefix']}images - SET path = '" . serendipity_db_escape_string($newDir) . "' - WHERE id = " . (int)$item_id); - $pick = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}images - WHERE id = " . (int)$item_id, true, 'assoc'); - - // Move thumbs - Rebuild full origin and new file path names by the new picked file array - $oldfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $oldDir . $pick['name'] . (empty($pick['extension']) ? '' : '.' . $pick['extension']); - $newfile = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $newDir . $pick['name'] . (empty($pick['extension']) ? '' : '.' . $pick['extension']); - - // hook into staticpage for the renaming regex replacements - $renameValues = array(array( - 'from' => $oldfile, - 'to' => $newfile, - 'thumb' => $serendipity['thumbSuffix'], - 'fthumb' => $pick['thumbnail_name'], - 'oldDir' => $oldDir, - 'newDir' => $newDir, - 'type' => $type, - 'item_id' => $item_id, - 'file' => $pick, - 'name' => $pick['name'] - )); - serendipity_plugin_api::hook_event('backend_media_rename', $renameValues); - - // Move the origin file - try { rename($oldfile, $newfile); } catch (Exception $e) { echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_SOMETHING . ': '.$e->getMessage() . "</span>\n"; } - - foreach($renameValues AS $renameData) { - $thisOldThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $oldDir . $pick['name'] . (!empty($renameData['fthumb']) ? '.' . $renameData['fthumb'] : '') . (empty($pick['extension']) ? '' : '.' . $pick['extension']); - $thisNewThumb = $serendipity['serendipityPath'] . $serendipity['uploadPath'] . $newDir . $pick['name'] . (!empty($pick['thumbnail_name']) ? '.' . $pick['thumbnail_name'] : '') . (empty($pick['extension']) ? '' : '.' . $pick['extension']); - // Check for existent old thumb files first, to not need to disable rename by @rename(),then move the thumb file and catch any wrong renaming - if (($thisNewThumb != $newfile) && file_exists($thisOldThumb)) { - // the thumb file and catch any wrong renaming - try { rename($thisOldThumb, $thisNewThumb); } catch (Exception $e) { echo '<span class="msg_error"><span class="icon-attention-circled"></span> ' . ERROR_SOMETHING . ': '.$e->getMessage() . "</span>\n"; } - } - } - // no need to use serendipity_updateImageInDatabase() here since already done in this case start - // ???? Forward user to overview (we don't want the user's back button to rename things again) - - // prepare for message - $thisnew = (empty($newDir) ? $serendipity['uploadPath'] : '') . $newDir . $pick['name']; - $thisExt = isset($pick['extension']) ? '.'.$pick['extension'] : ''; - - if (file_exists($newfile)) { - echo '<span class="msg_success"><span class="icon-ok-circled"></span> '; - printf(MEDIA_DIRECTORY_MOVED, $thisnew . $thisExt); - echo "</span>\n"; - } - - } // case dir, file, filedir end - - // Entry REPLACEMENT AREA - - // Only MySQL supported, since I don't know how to use REGEXPs differently. // Ian: we should improve this to all! - if ($serendipity['dbType'] != 'mysql' && $serendipity['dbType'] != 'mysqli') { - echo '<span class="msg_notice"><span class="icon-info-circled"></span> ' . MEDIA_DIRECTORY_MOVE_ENTRY . "</span>\n"; - return true; + serendipity_renameDir($oldDir, $newDir); + } else { + return serendipity_moveFileTo($item_id, $newDir); } - - // Prepare the SELECT query for filetypes - if ($type == 'filedir' || $type == 'file') { - - // get the right $file, which is array or null, by type - $_file = ($type == 'filedir') ? $pick : $file; - // check oldDir in bulkmove case - $oldDir = ($type == 'file' && !is_null($oldDir)) ? str_replace($_file['name'].'.'.$_file['extension'], '', $oldDir) : $oldDir; - - // Path patterns to SELECT en detail to not pick path parts in a loop - if ($oldDir === null) {// care for file renaming with oldpath - $oldDirFile = $_file['path'] . $_file['name'] . (($_file['extension']) ? '.'.$_file['extension'] : ''); - $oldDirThumb = $_file['path'] . $_file['name'] . '.' . $_file['thumbnail_name'] . (($_file['extension']) ? '.'.$_file['extension'] : ''); - } else { - $oldDirFile = $oldDir . $_file['name'] . (($_file['extension']) ? '.'.$_file['extension'] : ''); - $oldDirThumb = $oldDir . $_file['name'] . '.' . $_file['thumbnail_name'] . (($_file['extension']) ? '.'.$_file['extension'] : ''); - } - if ($type == 'filedir' && !isset($newDirFile)) { - $newDirFile = (strpos($newDir, $_file['name']) === FALSE) ? $newDir . $_file['name'] : $newDir; - } - if ($type == 'file' && $oldDir === null) { - $newDirFile = (empty($newDirFile)) ? $newDir : $newDirFile; // for file renamings $newDirFile has to be $newDir ( which is subdir and new NAME w/o ext) - } - $ispOldFile = $serendipity['serendipityPath'] . $serendipity['uploadHTTPPath'] . $oldDirFile; - - } elseif($type == 'dir') { - // since this is case 'dir', we do not have a filename and have to rename replacement File vars to oldDir and newDir values for the update preg_replace match - $oldDirFile = $oldDir; - $newDirFile = $newDir; - $ispOldFile = $serendipity['serendipityPath'] . $serendipity['uploadHTTPPath'] . $oldDirFile . (($_file['extension']) ? '.'.$_file['extension'] : ''); - } - - // Please note: imageselectorplus plugin quickblog is either quickblog:FullPath or quickblog:|?(none|plugin|js|_blank)|FullPath - // SELECTing the entries uses a more detailled approach to be as precise as possible, thus we need to reset these vars for the preg_replace later on in some cases - $q = "SELECT id, body, extended - FROM {$serendipity['dbPrefix']}entries - WHERE body REGEXP '(src=|href=|window.open.|<!--quickblog:)(\'|\"|\\\|?(plugin|none|js|_blank)?\\\|?)(" . serendipity_db_escape_String($serendipity['baseURL'] . $serendipity['uploadHTTPPath'] . $oldDirFile) . "|" . serendipity_db_escape_String($serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $oldDirFile) . "|" . serendipity_db_escape_String($serendipity['baseURL'] . $serendipity['uploadHTTPPath'] . $oldDirThumb) . "|" . serendipity_db_escape_String($serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $oldDirThumb) . "|" . serendipity_db_escape_String($ispOldFile) . ")' - OR extended REGEXP '(src=|href=|window.open.)(\'|\")(" . serendipity_db_escape_String($serendipity['baseURL'] . $serendipity['uploadHTTPPath'] . $oldDirFile) . "|" . serendipity_db_escape_String($serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $oldDirFile) . "|" . serendipity_db_escape_String($serendipity['baseURL'] . $serendipity['uploadHTTPPath'] . $oldDirThumb) . "|" . serendipity_db_escape_String($serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $oldDirThumb) . ")' - "; - $entries = serendipity_db_query($q, false, 'assoc'); - - if (is_array($entries) && !empty($entries)) { - // here we need to match thumbs too, so we do not want the extension, see detailled SELECT regex note - if ($type == 'file' && $oldDir === null) { - $_ispOldFile = $oldfile; // these vars are more exact in every case - $_ispNewFile = $newfile; // dito - $oldDirFile = $_file['path'] . $oldDirFile; // oldDirFile is missing a possible subdir path for the preg_replace - $newDirFile = $_file['path'] . $newDirFile; // newDirFile - dito - } else { - $_ispOldFile = $ispOldFile; - $_ispNewFile = $serendipity['serendipityPath'] . $serendipity['uploadHTTPPath'] . $newDirFile . (($_file['extension']) ? '.'.$_file['extension'] : ''); - } - // last paranoidal check - $_oldDirFile = (strpos($oldDirFile, $_file['extension']) === FALSE) ? $oldDirFile : $oldDir . $_file['name']; - - // what we actually need here, is oldDirFile w/o EXT to newDirFile w/o EXT and full ispOldFile path to full ispNewFile path !!! - foreach($entries AS $entry) { - $entry['body'] = preg_replace('@(src=|href=|window.open.)(\'|")(' . preg_quote($serendipity['baseURL'] . $serendipity['uploadHTTPPath'] . $_oldDirFile) . '|' . preg_quote($serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $_oldDirFile) . ')@', '\1\2' . $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $newDirFile, $entry['body']); - $entry['body'] = preg_replace('@(<!--quickblog:)(\\|?(plugin|none|js|_blank)?\\|?)(' . preg_quote($_ispOldFile) . ')@', '\1\2' . $_ispNewFile, $entry['body']); - $entry['extended'] = preg_replace('@(src=|href=|window.open.)(\'|")(' . preg_quote($serendipity['baseURL'] . $serendipity['uploadHTTPPath'] . $_oldDirFile) . '|' . preg_quote($serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $_oldDirFile) . ')@', '\1\2' . $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $newDirFile, $entry['extended']); - - $uq = "UPDATE {$serendipity['dbPrefix']}entries - SET body = '" . serendipity_db_escape_string($entry['body']) . "' , - extended = '" . serendipity_db_escape_string($entry['extended']) . "' - WHERE id = " . serendipity_db_escape_string($entry['id']); - serendipity_db_query($uq); - } - - if ($oldDir !== null){ - $imgmovedtodir = sprintf(MEDIA_DIRECTORY_MOVE_ENTRIES, count($entries)); - echo '<span class="msg_notice"><span class="icon-info-circled"></span> ' . $imgmovedtodir . "</span>\n"; - } - - } - - return true; } /** @@ -3912,4 +3675,4 @@ function serendipity_checkDirUpload($dir) { } return false; -} +} \ No newline at end of file diff --git a/include/functions_installer.inc.php b/include/functions_installer.inc.php index 7fd38646..b51f6250 100644 --- a/include/functions_installer.inc.php +++ b/include/functions_installer.inc.php @@ -83,7 +83,10 @@ function serendipity_updateLocalConfig($dbName, $dbPrefix, $dbHost, $dbUser, $db . "\t/*\n" . "\t Serendipity configuration file\n"; $file_mark = "\n\t// End of Serendipity configuration file" - . "\n\t// You can place your own special variables after here:\n"; + . "\n\t// You can place your own special variables here; see\n" + . "\n\t// <https://docs.s9y.org/docs/developers/code-primer.html#docs-initializing-the-framework-serendipity_configincphp-and-serendipity_config_localincphp>\n" + . "\n\t// for a list. All defaults from serendipity_config.inc.php\n" + . "\n\t// can be changed by re-setting the variables after here:\n"; $file_end = "\n?>"; $file_personal = ''; @@ -637,7 +640,7 @@ function serendipity_checkInstallation() { $errs[] = INSTALL_PASSWORD_INVALID; } - $serendipity['dbType'] = $_POST['dbType']; + $serendipity['dbType'] = preg_replace('@[^a-z0-9-]@imsU', '', $_POST['dbType']); // Probe database // (do it after the dir stuff, as we need to be able to create the sqlite database) include_once(S9Y_INCLUDE_PATH . "include/db/{$serendipity['dbType']}.inc.php"); @@ -679,7 +682,7 @@ function serendipity_installFiles($serendipity_core = '') { } } - if (php_sapi_name() == 'cgi' || php_sapi_name() == 'cgi-fcgi') { + if (substr(php_sapi_name(), 0, 3) == 'cgi') { $htaccess_cgi = '_cgi'; } else { $htaccess_cgi = ''; @@ -1265,4 +1268,4 @@ function serendipity_getCurrentVersion() { return -1; } -/* vim: set sts=4 ts=4 sw=4 expandtab : */ +/* vim: set sts=4 ts=4 sw=4 expandtab : */ \ No newline at end of file diff --git a/include/functions_permalinks.inc.php b/include/functions_permalinks.inc.php index 98f902ae..9861f5bc 100644 --- a/include/functions_permalinks.inc.php +++ b/include/functions_permalinks.inc.php @@ -786,6 +786,7 @@ function serendipity_getUriArguments($uri, $wildcard = false) { if ($args[0] == $indexFile || $args[0] == $serendipity['indexFile']) { unset($args[0]); } + $args = array_unique($args); return $args; } else { return array(); diff --git a/include/functions_plugins_admin.inc.php b/include/functions_plugins_admin.inc.php index a8afae2d..c00a8e8a 100644 --- a/include/functions_plugins_admin.inc.php +++ b/include/functions_plugins_admin.inc.php @@ -114,12 +114,12 @@ function show_plugins($event_only = false, $sidebars = null) $i = 0; foreach ($plugin_placements as $plugin_placement) { if (!$event_only && $plugin_placement == 'NONE') { - $is_invisible = true; + $is_invisible = true; } else { - $is_invisible = false; + $is_invisible = false; } $data['placement'][$plugin_placement]['ptitle'] = $ptitle = $opts[$plugin_placement]; - $data['placement'][$plugin_placement]['pid'] = $pid = $plugin_placement; + $data['placement'][$plugin_placement]['pid'] = $pid = $plugin_placement; if ($is_invisible) { $plugins = $invisible_plugins; @@ -439,6 +439,14 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam break; + case 'color': + $data['ctype'] = 'color'; + $data['input_type'] = 'color'; + $data['cbag_value'] = $cbag->get('value'); + $assign_plugin_config($data); + + break; + case 'hidden': $data['ctype'] = 'hidden'; $data['cbag_value'] = $cbag->get('value'); diff --git a/include/functions_routing.inc.php b/include/functions_routing.inc.php index f692aa1f..cd89a3d8 100644 --- a/include/functions_routing.inc.php +++ b/include/functions_routing.inc.php @@ -22,6 +22,7 @@ function serve404() { global $serendipity; $serendipity['view'] = '404'; $serendipity['viewtype'] = '404_4'; + $serendipity['content_message'] = URL_NOT_FOUND; header('HTTP/1.0 404 Not found'); header('Status: 404 Not found'); include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php'); @@ -292,7 +293,7 @@ function servePlugin($matches) { serendipity_plugin_api::hook_event('external_plugin', $matches[2]); } -function serveFeed() { +function serveFeed($matches) { global $serendipity; $serendipity['view'] = 'feed'; header('Content-Type: text/html; charset=utf-8'); @@ -301,7 +302,6 @@ function serveFeed() { if (preg_match('@/(index|atom[0-9]*|rss|comments|trackbacks|comments_and_trackbacks|opml)\.(rss[0-9]?|rdf|rss|xml|atom)@', $uri, $vmatches)) { list($_GET['version'], $_GET['type']) = serendipity_discover_rss($vmatches[1], $vmatches[2]); } - if (is_array($matches)) { if (preg_match('@(/?' . preg_quote(PATH_FEEDS, '@') . '/)(.+?)(?:\.rss)?$@i', $uri, $uriparts)) { if (strpos($uriparts[2], $serendipity['permalinkCategoriesPath']) === 0) { @@ -339,7 +339,7 @@ function serveEntry($matches) { if (!empty($serendipity['POST']['submit']) && !isset($_REQUEST['serendipity']['csuccess'])) { $comment['url'] = $serendipity['POST']['url']; - $comment['comment'] = trim($serendipity['POST']['comment']); + $comment['comment'] = (is_string($serendipity['POST']['comment']) ? trim($serendipity['POST']['comment']) : ''); $comment['name'] = $serendipity['POST']['name']; $comment['email'] = $serendipity['POST']['email']; $comment['subscribe'] = $serendipity['POST']['subscribe']; diff --git a/include/functions_smarty.inc.php b/include/functions_smarty.inc.php index 75391655..b3918eae 100644 --- a/include/functions_smarty.inc.php +++ b/include/functions_smarty.inc.php @@ -72,12 +72,13 @@ function serendipity_smarty_html5time($timestamp) { * @param string The name of the block to parse data into ("COMMENTS" - virtual variable like {$COMMENTS}) * @param string The name of the template file to fetch. Only filename, the path is auto-detected * @param boolean If true, the output of the smarty parser will be echoed instead of invisibly treated + * @param boolean If true, always use a tpl file from the frontend fallback chain (used for the preview) * @return string The parsed HTML code */ -function &serendipity_smarty_fetch($block, $file, $echo = false) { +function &serendipity_smarty_fetch($block, $file, $echo = false, $force_frontend = false) { global $serendipity; - $output = $serendipity['smarty']->fetch('file:'. serendipity_getTemplateFile($file, 'serendipityPath'), null, null, null, ($echo === true && $serendipity['smarty_raw_mode'])); + $output = $serendipity['smarty']->fetch('file:'. serendipity_getTemplateFile($file, 'serendipityPath', $force_frontend), null, null, null, ($echo === true && $serendipity['smarty_raw_mode'])); $serendipity['smarty']->assignByRef($block, $output); @@ -625,7 +626,7 @@ function serendipity_smarty_printSidebar($params, &$smarty) { * * @access public * @param array Smarty parameter input array: - * file: The filename you want to include (any file within your template directry or the 'default' template if not found) + * file: The filename you want to include (any file within your template directory or the 'default' template if not found) * @param object Smarty object * @return string The requested filename with full path */ @@ -634,7 +635,7 @@ function serendipity_smarty_getFile($params, &$smarty) { trigger_error("Smarty Error: " . __FUNCTION__ .": missing 'file' parameter", E_USER_WARNING); return; } - return serendipity_getTemplateFile($params['file']); + return serendipity_getTemplateFile($params['file'], 'serendipityHTTPPath', $params['frontend']); } function serendipity_smarty_getConfigVar($params, &$smarty) { @@ -1160,7 +1161,7 @@ function serendipity_smarty_purge() { serendipity_smarty_init(); # need initiated smarty to get the compile/cache dir $dir = new RecursiveDirectoryIterator($serendipity['smarty']->getCompileDir()); - $ite = new RecursiveIteratorIterator($dir); + $ite = new RecursiveIteratorIterator($dir, RecursiveIteratorIterator::LEAVES_ONLY, RecursiveIteratorIterator::CATCH_GET_CHILD); $files = new RegexIterator($ite, '@.*\.tpl\.php$@', RegexIterator::GET_MATCH); foreach($files as $file) { if (is_writable($file[0])) { @@ -1215,12 +1216,12 @@ function serendipity_smarty_show($template, $data = null, $debugtype = null, $de $serendipity['smarty']->assign($data); - $tplfile = ($template == 'preview_iframe.tpl') ? serendipity_getTemplateFile($template, 'serendipityPath', true) : serendipity_getTemplateFile($template, 'serendipityPath'); + $tplfile = serendipity_getTemplateFile($template, 'serendipityPath', ($template == 'preview_iframe.tpl')); # for the preview_iframe.tpl, we want to ignore the backend theme if ($debug !== null) { if ($debugtype == "HTML") { - $debug = "<!-- Dynamically fetched " . htmlspecialchars(str_replace($serendipity['serendipityPath'], '', $tplfile)) . " on " . date('Y-m-d H:i') . ", called from: " . $debug . " -->\n"; + $debug = "<!-- Dynamically fetched " . serendipity_specialchars(str_replace($serendipity['serendipityPath'], '', $tplfile)) . " on " . date('Y-m-d H:i') . ", called from: " . $debug . " -->\n"; } else { - $debug = "/* Dynamically fetched " . htmlspecialchars(str_replace($serendipity['serendipityPath'], '', $tplfile)) . " on " . date('Y-m-d H:i') . ", called from: " . $debug . " */\n"; + $debug = "/* Dynamically fetched " . serendipity_specialchars(str_replace($serendipity['serendipityPath'], '', $tplfile)) . " on " . date('Y-m-d H:i') . ", called from: " . $debug . " */\n"; } } diff --git a/include/functions_trackbacks.inc.php b/include/functions_trackbacks.inc.php index 253e18b8..824b5791 100644 --- a/include/functions_trackbacks.inc.php +++ b/include/functions_trackbacks.inc.php @@ -109,7 +109,7 @@ function serendipity_pingback_autodiscover($loc, $body, $url=null) { * @access public * @param string The URL to send a trackback to * @param string The XML data with the trackback contents - * @return string Reponse + * @return string Response */ function _serendipity_send($loc, $data, $contenttype = null) { global $serendipity; @@ -126,25 +126,30 @@ function _serendipity_send($loc, $data, $contenttype = null) { $uri = $target['scheme'] . '://' . $target['host'] . ':' . $target['port'] . $target['path'] . $target['query']; } - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; - $options = array('allowRedirects' => true, 'maxRedirects' => 5, 'method' => 'POST'); + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; + $options = array('follow_redirects' => true, 'max_redirects' => 5); serendipity_plugin_api::hook_event('backend_http_request', $options, 'trackback_send'); serendipity_request_start(); - - $req = new HTTP_Request($uri, $options); - if (isset($contenttype)){ - $req->addHeader('Content-Type', $contenttype); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; } - $req->addRawPostData($data, true); - $res = $req->sendRequest(); + $req = new HTTP_Request2($uri, HTTP_Request2::METHOD_POST, $options); + if (isset($contenttype)){ + $req->setHeader('Content-Type', $contenttype); + } - if (PEAR::isError($res)) { + $req->setBody($data); + try { + $res = $req->send(); + } catch (HTTP_Request2_Exception $e) { serendipity_request_end(); return false; } + - $fContent = $req->getResponseBody(); + $fContent = $res->getBody(); serendipity_request_end(); return $fContent; } @@ -159,7 +164,7 @@ function _serendipity_send($loc, $data, $contenttype = null) { * @param string The author of our entry * @param string The title of our entry * @param string The text of our entry - * @param string A comparsion URL + * @param string A comparison URL * @return string Response */ @@ -167,42 +172,47 @@ function serendipity_trackback_autodiscover($res, $loc, $url, $author, $title, $ $is_wp = false; $wp_check = false; - if (preg_match('@((' . preg_quote($loc, '@') . '|' . preg_quote($loc2, '@') . ')/?trackback/)@i', $res, $wp_loc)) { - // We found a WP-blog that may not advertise RDF-Tags! - $is_wp = true; - } + // the new detection method via rel=trackback should have priority + if (preg_match('@link\s*rel=["\']trackback["\'].*href=["\'](https?:[^"\']+)["\']@i', $res, $matches)) { + $trackURI = trim($matches[1]); + } else { + if (preg_match('@((' . preg_quote($loc, '@') . '|' . preg_quote($loc2, '@') . ')/?trackback/)@i', $res, $wp_loc)) { + // We found a WP-blog that may not advertise RDF-Tags! + $is_wp = true; + } - if (!preg_match('@trackback:ping(\s*rdf:resource)?\s*=\s*["\'](https?:[^"\']+)["\']@i', $res, $matches)) { - $matches = array(); - serendipity_plugin_api::hook_event('backend_trackback_check', $matches, $loc); + if (!preg_match('@trackback:ping(\s*rdf:resource)?\s*=\s*["\'](https?:[^"\']+)["\']@i', $res, $matches)) { + $matches = array(); + serendipity_plugin_api::hook_event('backend_trackback_check', $matches, $loc); - // Plugins may say that a URI is valid, in situations where a blog has no valid RDF metadata - if (empty($matches[2])) { - if ($is_wp) { - $wp_check = true; - } else { - echo '<div>• ' . sprintf(TRACKBACK_FAILED, TRACKBACK_NOT_FOUND) . '</div>'; - return false; + // Plugins may say that a URI is valid, in situations where a blog has no valid RDF metadata + if (empty($matches[2])) { + if ($is_wp) { + $wp_check = true; + } else { + echo '<div>• ' . sprintf(TRACKBACK_FAILED, TRACKBACK_NOT_FOUND) . '</div>'; + return false; + } } } - } - $trackURI = trim($matches[2]); + $trackURI = trim($matches[2]); - if (preg_match('@dc:identifier\s*=\s*["\'](https?:[^\'"]+)["\']@i', $res, $test)) { - if ($loc != $test[1] && $loc2 != $test[1]) { - if ($is_wp) { - $wp_check = true; - } else { - echo '<div>• ' . sprintf(TRACKBACK_FAILED, TRACKBACK_URI_MISMATCH) . '</div>'; - return false; + if (preg_match('@dc:identifier\s*=\s*["\'](https?:[^\'"]+)["\']@i', $res, $test)) { + if ($loc != $test[1] && $loc2 != $test[1]) { + if ($is_wp) { + $wp_check = true; + } else { + echo '<div>• ' . sprintf(TRACKBACK_FAILED, TRACKBACK_URI_MISMATCH) . '</div>'; + return false; + } } } - } - // If $wp_check is set it means no RDF metadata was found, and we simply try the /trackback/ url. - if ($wp_check) { - $trackURI = $wp_loc[0]; + // If $wp_check is set it means no RDF metadata was found, and we simply try the /trackback/ url. + if ($wp_check) { + $trackURI = $wp_loc[0]; + } } $data = 'url=' . rawurlencode($url) @@ -268,20 +278,25 @@ function serendipity_reference_autodiscover($loc, $url, $author, $title, $text) echo '<div>• '. sprintf(TRACKBACK_CHECKING, $loc) .'</div>'; flush(); - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; - $options = array('allowRedirects' => true, 'maxRedirects' => 5, 'method' => 'GET'); + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; + $options = array('follow_redirects' => true, 'max_redirects' => 5); serendipity_plugin_api::hook_event('backend_http_request', $options, 'trackback_detect'); serendipity_request_start(); - $req = new HTTP_Request($parsed_loc, $options); - $res = $req->sendRequest(); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($parsed_loc, HTTP_Request2::METHOD_GET, $options); - if (PEAR::isError($res)) { + try { + $res = $req->send(); + } catch (HTTP_Request2_Exception $e) { echo '<div>• ' . sprintf(TRACKBACK_COULD_NOT_CONNECT, $u['host'], $u['port']) .'</div>'; serendipity_request_end(); return; } - $fContent = $req->getResponseBody(); + $fContent = $res->getBody(); serendipity_request_end(); if (strlen($fContent) != 0) { @@ -533,21 +548,27 @@ function fetchPingbackData(&$comment) { if (isset($serendipity['pingbackFetchPageMaxLength'])){ $fetchPageMaxLength = $serendipity['pingbackFetchPageMaxLength']; } - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; $url = $comment['url']; if (function_exists('serendipity_request_start')) serendipity_request_start(); // Request the page - $req = new HTTP_Request($url, array('allowRedirects' => true, 'maxRedirects' => 5, 'timeout' => 20, 'readTimeout' => array(5,0))); + $options = array('follow_redirects' => true, 'max_redirects' => 5, 'timeout' => 20); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($url, HTTP_Request2::METHOD_GET, $options); // code 200: OK, code 30x: REDIRECTION - $responses = "/(200 OK)|(30[0-9] Found)/"; // |(30[0-9] Moved) - if ((PEAR::isError($req->sendRequest()) || preg_match($responses, $req->getResponseCode()))) { - // nothing to do, - } - else { - $fContent = $req->getResponseBody(); + $responses = "/(200)|(30[0-9])/"; // |(30[0-9] Moved) + try { + $response = $req->send(); + if (preg_match($responses, $response->getStatus())) { + + } + $fContent = $response->getBody(); // Get a title if (preg_match('@<head[^>]*>.*?<title[^>]*>(.*?)</title>.*?</head>@is',$fContent,$matches)) { @@ -571,6 +592,8 @@ function fetchPingbackData(&$comment) { $comment['comment'] = $body . '[..]'; } + } catch (HTTP_Request2_Exception $e) { + } if (function_exists('serendipity_request_end')) serendipity_request_end(); diff --git a/include/functions_upgrader.inc.php b/include/functions_upgrader.inc.php index 41d20908..7a96307f 100644 --- a/include/functions_upgrader.inc.php +++ b/include/functions_upgrader.inc.php @@ -334,7 +334,7 @@ function serendipity_removeDeadFiles_SPL($dir=null, $deadfiles=null, $purgedir=n } catch (Exception $e) { return; } - $iterator = new RecursiveIteratorIterator($_dir, RecursiveIteratorIterator::CHILD_FIRST); + $iterator = new RecursiveIteratorIterator($_dir, RecursiveIteratorIterator::CHILD_FIRST, RecursiveIteratorIterator::CATCH_GET_CHILD); $search = array("\\", '//'); $replace = array('/'); foreach ($iterator as $file) { diff --git a/include/genpage.inc.php b/include/genpage.inc.php index 1c3e6043..f2e399e7 100644 --- a/include/genpage.inc.php +++ b/include/genpage.inc.php @@ -44,10 +44,11 @@ switch ($serendipity['GET']['action']) { $serendipity['smarty']->assign('head_title', $serendipity['head_title']); $serendipity['smarty']->assign('head_subtitle', $serendipity['head_subtitle']); $serendipity['view'] = '404'; + $serendipity['content_message'] = URL_NOT_FOUND; serendipity_header('HTTP/1.0 404 Not found'); serendipity_header('Status: 404 Not found'); } - + serendipity_printEntries($entry, 1); } else { serendipity_printEntries(serendipity_fetchEntries($serendipity['range'], true, $serendipity['fetchLimit'])); @@ -122,17 +123,14 @@ switch ($serendipity['GET']['action']) { // Welcome screen or whatever default: - if ($serendipity['useInternalCache']) { - $entries = serendipity_fetchEntries(null, true, $serendipity['fetchLimit']); - if (! serendipity_printEntriesCached($entries)) { - serendipity_printEntries($entries); - } - } else { - serendipity_printEntries(serendipity_fetchEntries(null, true, $serendipity['fetchLimit'])); - } + serendipity_printEntries(serendipity_fetchEntries(null, true, $serendipity['fetchLimit'])); break; } +if ($serendipity['GET']['action'] != 'search' && !empty($serendipity['content_message'])) { + $serendipity['smarty']->assign('content_message', $serendipity['content_message']); +} + serendipity_smarty_fetch('CONTENT', 'content.tpl'); $serendipity['smarty']->assign('ENTRIES', ''); diff --git a/include/lang.inc.php b/include/lang.inc.php index fc408725..f02c813d 100644 --- a/include/lang.inc.php +++ b/include/lang.inc.php @@ -33,7 +33,7 @@ if (!defined('serendipity_LANG_LOADED') || serendipity_LANG_LOADED !== true) { // Try and include preferred language from the configurated setting if (@include(S9Y_INCLUDE_PATH . 'lang/' . $charset . 'serendipity_lang_'. $serendipity['lang'] .'.inc.php') ) { - // Only here can we truely say the language is loaded + // Only here can we truly say the language is loaded define('serendipity_LANG_LOADED', true); if (function_exists('serendipity_db_reconnect')) { serendipity_db_reconnect(); diff --git a/include/plugin_api.inc.php b/include/plugin_api.inc.php index e57b8d97..d93eab03 100644 --- a/include/plugin_api.inc.php +++ b/include/plugin_api.inc.php @@ -23,7 +23,7 @@ $serendipity['core_events']['backend_header']['jquery'] = 'serendipity_plugin_a // Add jquery to all frontend templates (in noConflict mode) function serendipity_plugin_api_frontend_header($event_name, &$bag, &$eventData, $addData) { - global $serendipity; + global $serendipity; // Only execute if current template (only) does not have its own jquery.js file // jquery can be disabled if a template's config.inc.php or a plugin sets @@ -44,7 +44,7 @@ function serendipity_plugin_api_frontend_header($event_name, &$bag, &$eventData, // Add jquery to all backend templates function serendipity_plugin_api_backend_header($event_name, &$bag, &$eventData, $addData) { - global $serendipity; + global $serendipity; // Only execute if current template does not have its own backend_jquery.js file // jquery can be disabled if a template's config.inc.php or a plugin sets @@ -94,7 +94,7 @@ function errorHandlerCreateDOM(htmlStr) { case 'backend_publish': // this is preview_iframe.tpl updertHooks [ NOT ONLY!! See freetags ] if ($_GET['serendipity']['is_iframe'] == 'true' && $_GET['serendipity']['iframe_mode'] == 'save') { - echo "\n".'<script>document.addEventListener("DOMContentLoaded", function() { if (window.parent.Modernizr.indexedDB) { window.parent.serendipity.eraseEntryEditorCache(); } });</script>'."\n"; + echo "\n".'<script>document.addEventListener("DOMContentLoaded", function() { window.parent.serendipity.eraseEntryEditorCache(); });</script>'."\n"; } break; @@ -206,7 +206,7 @@ class serendipity_plugin_api $rs = serendipity_db_query("SELECT MAX(sort_order) as sort_order_max FROM {$serendipity['dbPrefix']}plugins WHERE placement = '$default_placement'", true, 'num'); - if (is_array($rs)) { + if (is_array($rs) && isset($rs[0]) && !empty($rs[0])) { $nextidx = intval($rs[0] + 1); } else { $nextidx = 0; @@ -214,7 +214,7 @@ class serendipity_plugin_api $serendipity['debug']['pluginload'][] = "Installing plugin: " . print_r(func_get_args(), true); - $iq = "INSERT INTO {$serendipity['dbPrefix']}plugins (name, sort_order, placement, authorid, path) values ('" . serendipity_specialchars($key) . "', $nextidx, '$default_placement', '$authorid', '" . serendipity_specialchars($pluginPath) . "')"; + $iq = "INSERT INTO {$serendipity['dbPrefix']}plugins (name, sort_order, placement, authorid, path) values ('" . serendipity_db_escape_string(serendipity_specialchars($key)) . "', $nextidx, '$default_placement', '$authorid', '" . serendipity_specialchars($pluginPath) . "')"; $serendipity['debug']['pluginload'][] = $iq; serendipity_db_query($iq); serendipity_plugin_api::hook_event('backend_plugins_new_instance', $key, array('default_placement' => $default_placement)); @@ -246,6 +246,8 @@ class serendipity_plugin_api { global $serendipity; + $plugin_instance_id = serendipity_db_escape_string($plugin_instance_id); + $plugin =& serendipity_plugin_api::load_plugin($plugin_instance_id); if (is_object($plugin)) { $bag = new serendipity_property_bag(); @@ -435,7 +437,7 @@ class serendipity_plugin_api * * @access public * @param string The filter for plugins (left|right|hide|event|eventh) - * @param boolean If true, the filtering logic will be reversed an all plugins that are NOT part of the filter will be returned + * @param boolean If true, the filtering logic will be reversed and all plugins that are NOT part of the filter will be returned * @param string Filter by a specific classname (like 'serendipity_plugin_archives'). Can take SQL wildcards. * @param string Filter by a specific plugin instance id * @return array Returns the associative array of found plugins in the database @@ -477,7 +479,7 @@ class serendipity_plugin_api * * @access public * @param string The filter for plugins (left|right|hide|event|eventh) - * @param boolean If true, the filtering logic will be reversed an all plugins that are NOT part of the filter will be evaluated + * @param boolean If true, the filtering logic will be reversed and all plugins that are NOT part of the filter will be evaluated * @return int Number of plugins that were found. */ static function count_plugins($filter = '*', $negate = false) @@ -547,7 +549,7 @@ class serendipity_plugin_api * * @access public * @param string The ID of a plugin - * @param boolean If true, the plugin is a internal plugin (prefixed with '@') + * @param boolean If true, the plugin is a internal plugin (prefixed with '@'). (Unused, keep for compat.) * @return string The classname of the plugin */ static function getClassByInstanceID($instance_id, &$is_internal) @@ -1306,7 +1308,7 @@ class serendipity_plugin * @access public * @return true */ - function serendipity_plugin($instance) + function __construct($instance) { $this->instance = $instance; } @@ -1635,20 +1637,41 @@ class serendipity_plugin * * @access public * @param string template filename (no directory!) - * @param bool Called by a plugin (defaults true), since we do not have a theme using it yet * @return string Parsed Smarty return */ - function &parseTemplate($filename, $plugin = true) { + function &parseTemplate($filename) + { global $serendipity; $filename = basename($filename); - $tfile = serendipity_getTemplateFile($filename, 'serendipityPath', true, $plugin); // use the simple plugin fallback stairway + $tfile = serendipity_getTemplateFile($filename, 'serendipityPath', true); if (!$tfile || $tfile == $filename) { $tfile = dirname($this->pluginFile) . '/' . $filename; } return $serendipity['smarty']->fetch('file:'. $tfile); } + + /** + * Get full path for a filename. Will first look into themes and then in the plugins directory + * @param string relative path to file + * @param string The path selector that tells whether to return a HTTP or realpath + * @return string The full path+filename to the requested file + * */ + function &getFile($filename, $key = 'serendipityPath') + { + global $serendipity; + + $path = serendipity_getTemplateFile($filename, $key, true); + if (!$path) { + if (file_exists(dirname($this->pluginFile) . '/' . $filename)) { + return $serendipity[$key] . 'plugins/' . basename(dirname($this->pluginFile)) . '/' . $filename; + } + } + + return $path; + } + } /** @@ -1668,7 +1691,7 @@ class serendipity_event extends serendipity_plugin * @param string The instance name * @return */ - function serendipity_event($instance) + function __construct($instance) { $this->instance = $instance; } @@ -1736,13 +1759,14 @@ class serendipity_event extends serendipity_plugin */ function event_hook($event, &$bag, &$eventData, $addData = null) { - // Define event hooks here, if you want you plugin to execute those instead of being a sidebar item. - // Look at external plugins 'serendipity_event_mailer' or 'serendipity_event_weblogping' for usage. + // Define event hooks here, if you want your plugin to execute those instead of being a sidebar item. + // Look at in/external plugins 'serendipity_event_mailer' or 'serendipity_event_weblogping' for usage. // Currently available events: // backend_publish [after insertion of a new article in your s9y-backend] // backend_display [after displaying an article in your s9y-backend] // frontend_display [before displaying an article in your s9y-frontend] // frontend_comment [after displaying the "enter comment" dialog] + // ...and some more in the meanwhile...! :) return true; } diff --git a/include/serendipity_smarty_class.inc.php b/include/serendipity_smarty_class.inc.php index 840298dd..c9f67a8a 100644 --- a/include/serendipity_smarty_class.inc.php +++ b/include/serendipity_smarty_class.inc.php @@ -39,7 +39,7 @@ class Serendipity_Smarty_Security_Policy extends Smarty_Security // This allows the fetch() and include calls to pull .tpl files from any directory, // so that symlinked plugin directories outside the s9y path can be included properly. - // TODO / FUTURE: If Smarty will implement a seperation option to dissect fetch() from + // TODO / FUTURE: If Smarty will implement a separation option to dissect fetch() from // {include} calls, we should only apply this workaround to fetch() calls. // Redirecting fetch() as our custom function is too risky and has too high a performance // impact. @@ -107,7 +107,7 @@ class Serendipity_Smarty extends Smarty // some documentary from the smarty forum /* - Adressing a specific $template_dir (see 3.1 release notes) + Addressing a specific $template_dir (see 3.1 release notes) Smarty 3.1 introduces the $template_dir index notation. $smarty->fetch('[foo]bar.tpl') and {include file="[foo]bar.tpl"} require the template bar.tpl to be loaded from $template_dir['foo']; @@ -121,15 +121,15 @@ class Serendipity_Smarty extends Smarty $template_engine = serendipity_get_config_var('template_engine'); $template_dirs = array(); - + + // first add template path + $template_dirs[] = $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template']; + // then fallback engines (which should never be a comma separated list) if ($template_engine) { $p = explode(',', $template_engine); foreach($p AS $te) { $template_dirs[] = $serendipity['serendipityPath'] . $serendipity['templatePath'] . trim($te) . '/'; } - } else { - // this is tested without need actually, but it makes the directory setter fallback chain a little more precise - $template_dirs[] = $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template']; } $template_dirs[] = $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['defaultTemplate']; $template_dirs[] = $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template_backend']; @@ -139,7 +139,7 @@ class Serendipity_Smarty extends Smarty $template_dirs[] = S9Y_TEMPLATE_SECUREDIR; } - // disable plugin dir as added template dir is not adviced, if set security is enabled (backend & frontend need access to fetch plugin templates) + // disable plugin dir as added template dir is not advised, if set security is enabled (backend & frontend need access to fetch plugin templates) $template_dirs[] = $serendipity['serendipityPath'] . 'plugins'; // add default template to addTemplate array, if not already set in engine $template_dirs[] = S9Y_TEMPLATE_FALLBACK; @@ -263,7 +263,7 @@ class Serendipity_Smarty extends Smarty } /** - * wrapper for assign_by_ref - BC mode Smarty 2 -> 3 (Serendipity core uses assignByRef already - and nearly no occurances in additional plugins) + * wrapper for assign_by_ref - BC mode Smarty 2 -> 3 (Serendipity core uses assignByRef already - and nearly no occurrences in additional plugins) * * @param string $tpl_var the template variable name * @param mixed &$value the referenced value to assign diff --git a/include/tpl/config_local.inc.php b/include/tpl/config_local.inc.php index 4c288af6..b928c434 100644 --- a/include/tpl/config_local.inc.php +++ b/include/tpl/config_local.inc.php @@ -187,7 +187,7 @@ array('var' => 'permalinkArchivesPath', 'title' => INSTALL_PERMALINK_ARCHIVESPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'archives', 'permission' => 'siteConfiguration', @@ -195,7 +195,7 @@ array('var' => 'permalinkCategoriesPath', 'title' => INSTALL_PERMALINK_CATEGORIESPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'categories', 'permission' => 'siteConfiguration', @@ -203,7 +203,7 @@ array('var' => 'permalinkAuthorsPath', 'title' => INSTALL_PERMALINK_AUTHORSPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'authors', 'permission' => 'siteConfiguration', @@ -211,7 +211,7 @@ array('var' => 'permalinkUnsubscribePath', 'title' => INSTALL_PERMALINK_UNSUBSCRIBEPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'unsubscribe', 'permission' => 'siteConfiguration', @@ -219,7 +219,7 @@ array('var' => 'permalinkDeletePath', 'title' => INSTALL_PERMALINK_DELETEPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'delete', 'permission' => 'siteConfiguration', @@ -227,7 +227,7 @@ array('var' => 'permalinkApprovePath', 'title' => INSTALL_PERMALINK_APPROVEPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'approve', 'permission' => 'siteConfiguration', @@ -235,7 +235,7 @@ array('var' => 'permalinkFeedsPath', 'title' => INSTALL_PERMALINK_FEEDSPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'feeds', 'permission' => 'siteConfiguration', @@ -243,7 +243,7 @@ array('var' => 'permalinkPluginPath', 'title' => INSTALL_PERMALINK_PLUGINPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'plugin', 'permission' => 'siteConfiguration', @@ -251,7 +251,7 @@ array('var' => 'permalinkAdminPath', 'title' => INSTALL_PERMALINK_ADMINPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'admin', 'permission' => 'siteConfiguration', @@ -259,7 +259,7 @@ array('var' => 'permalinkSearchPath', 'title' => INSTALL_PERMALINK_SEARCHPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'search', 'permission' => 'siteConfiguration', @@ -267,7 +267,7 @@ array('var' => 'permalinkCommentsPath', 'title' => INSTALL_PERMALINK_COMMENTSPATH, - 'description' => '', + 'description' => CONFIG_PERMALINK_PATH_DESC, 'type' => 'string', 'default' => 'comments', 'permission' => 'siteConfiguration', @@ -737,6 +737,13 @@ 'type' => 'textarea', 'permission' => 'blogConfiguration', 'default' => ''), + + array('var' => 'allowLocalURL', + 'title' => CONFIG_ALLOW_LOCAL_URL, + 'description' => CONFIG_ALLOW_LOCAL_URL_DESC, + 'type' => 'bool', + 'permission' => 'siteConfiguration', + 'default' => false), )); return $res; diff --git a/include/tpl/config_personal.inc.php b/include/tpl/config_personal.inc.php index 8d86a17d..70baaf93 100644 --- a/include/tpl/config_personal.inc.php +++ b/include/tpl/config_personal.inc.php @@ -191,6 +191,14 @@ 'permission' => 'personalConfiguration', 'flags' => array('config')), + array('var' => 'categoryDefault', + 'title' => CATEGORY, + 'description' => '', + 'type' => 'list', + 'default' => serendipity_fetchCategories(null, null, null, 'write', true), + 'permission' => 'personalConfiguration', + 'flags' => array('config')), + array('var' => 'use_autosave', 'title' => CONF_USE_AUTOSAVE, 'description' => CONF_USE_AUTOSAVE_DESC, diff --git a/include/tpl/htaccess_cgi_rewrite.tpl b/include/tpl/htaccess_cgi_rewrite.tpl index 4978c2fb..5c8ed1f1 100644 --- a/include/tpl/htaccess_cgi_rewrite.tpl +++ b/include/tpl/htaccess_cgi_rewrite.tpl @@ -6,6 +6,7 @@ Options -MultiViews <IfModule mod_rewrite.c> RewriteEngine On RewriteBase {PREFIX} +RewriteRule ^plugins/.+/documentation.*\.html - [L] RewriteRule ^serendipity_admin.php serendipity_admin.php [NC,L,QSA] RewriteRule ^({PAT_PERMALINK}) {indexFile}?/$1 [NC,L,QSA] RewriteRule ^({PAT_PERMALINK_AUTHORS}) {indexFile}?/$1 [NC,L,QSA] @@ -28,7 +29,6 @@ RewriteRule ^{PAT_CSS}$ {indexFile}?url=/$1 [L,QSA] RewriteRule ^{PAT_JS}$ {indexFile}?url=/$1 [L,QSA] RewriteRule ^index\.(html?|php.+) {indexFile}?url=index.html [L,QSA] RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA] -#RewriteCond %{REQUEST_URI} !-U RewriteRule (.*\.html?) {indexFile}?url=/$1 [L,QSA] </IfModule> diff --git a/include/tpl/htaccess_cgi_rewrite2.tpl b/include/tpl/htaccess_cgi_rewrite2.tpl index 8ced8d3a..42f1c365 100644 --- a/include/tpl/htaccess_cgi_rewrite2.tpl +++ b/include/tpl/htaccess_cgi_rewrite2.tpl @@ -5,6 +5,7 @@ DirectoryIndex {PREFIX}{indexFile} <IfModule mod_rewrite.c> RewriteEngine On RewriteBase {PREFIX} +RewriteRule ^plugins/.+/documentation.*\.html - [L] RewriteRule ^serendipity_admin.php serendipity_admin.php [NC,L,QSA] RewriteRule ^({PAT_PERMALINK}) {indexFile}?/$1 [NC,L,QSA] RewriteRule ^({PAT_PERMALINK_AUTHORS}) {indexFile}?/$1 [NC,L,QSA] @@ -27,7 +28,6 @@ RewriteRule ^{PAT_CSS} {indexFile}?url=/$1 [L,QSA] RewriteRule ^{PAT_JS}$ {indexFile}?url=/$1 [L,QSA] RewriteRule ^index\.(html?|php.+) {indexFile}?url=index.html [L,QSA] RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA] -#RewriteCond %{REQUEST_URI} !-U RewriteRule (.*\.html?) {indexFile}?url=/$1 [L,QSA] </IfModule> diff --git a/include/tpl/htaccess_errordocs.tpl b/include/tpl/htaccess_errordocs.tpl index 32c4b3ca..18955145 100644 --- a/include/tpl/htaccess_errordocs.tpl +++ b/include/tpl/htaccess_errordocs.tpl @@ -1,8 +1,6 @@ # BEGIN s9y ErrorDocument 404 {PREFIX}{indexFile} DirectoryIndex {PREFIX}{indexFile} -php_value session.use_trans_sid 0 -php_value register_globals off <Files *.tpl.php> deny from all diff --git a/include/tpl/htaccess_normal.tpl b/include/tpl/htaccess_normal.tpl index 7bb21a44..8e5b3bcb 100644 --- a/include/tpl/htaccess_normal.tpl +++ b/include/tpl/htaccess_normal.tpl @@ -1,7 +1,5 @@ # BEGIN s9y DirectoryIndex {PREFIX}{indexFile} -php_value session.use_trans_sid 0 -php_value register_globals off <Files *.tpl.php> deny from all diff --git a/include/tpl/htaccess_rewrite.tpl b/include/tpl/htaccess_rewrite.tpl index ce9b7426..5e28c5c1 100644 --- a/include/tpl/htaccess_rewrite.tpl +++ b/include/tpl/htaccess_rewrite.tpl @@ -1,13 +1,12 @@ # BEGIN s9y ErrorDocument 404 {PREFIX}{indexFile} DirectoryIndex {PREFIX}{indexFile} -php_value session.use_trans_sid 0 -php_value register_globals off Options -MultiViews <IfModule mod_rewrite.c> RewriteEngine On RewriteBase {PREFIX} +RewriteRule ^plugins/.+/documentation.*\.html - [L] RewriteRule ^serendipity_admin.php serendipity_admin.php [NC,L,QSA] RewriteRule ^({PAT_PERMALINK}) {indexFile}?/$1 [NC,L,QSA] RewriteRule ^({PAT_PERMALINK_AUTHORS}) {indexFile}?/$1 [NC,L,QSA] @@ -30,7 +29,6 @@ RewriteRule ^{PAT_CSS}$ {indexFile}?url=/$1 [L,QSA] RewriteRule ^{PAT_JS}$ {indexFile}?url=/$1 [L,QSA] RewriteRule ^index\.(html?|php.+) {indexFile}?url=index.html [L,QSA] RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA] -#RewriteCond %{REQUEST_URI} !-U RewriteRule (.*\.html?) {indexFile}?url=/$1 [L,QSA] </IfModule> diff --git a/include/tpl/htaccess_rewrite2.tpl b/include/tpl/htaccess_rewrite2.tpl index 8f0b7603..42f1c365 100644 --- a/include/tpl/htaccess_rewrite2.tpl +++ b/include/tpl/htaccess_rewrite2.tpl @@ -1,12 +1,11 @@ # BEGIN s9y ErrorDocument 404 {PREFIX}{indexFile} DirectoryIndex {PREFIX}{indexFile} -php_value session.use_trans_sid 0 -php_value register_globals off <IfModule mod_rewrite.c> RewriteEngine On RewriteBase {PREFIX} +RewriteRule ^plugins/.+/documentation.*\.html - [L] RewriteRule ^serendipity_admin.php serendipity_admin.php [NC,L,QSA] RewriteRule ^({PAT_PERMALINK}) {indexFile}?/$1 [NC,L,QSA] RewriteRule ^({PAT_PERMALINK_AUTHORS}) {indexFile}?/$1 [NC,L,QSA] @@ -29,7 +28,6 @@ RewriteRule ^{PAT_CSS} {indexFile}?url=/$1 [L,QSA] RewriteRule ^{PAT_JS}$ {indexFile}?url=/$1 [L,QSA] RewriteRule ^index\.(html?|php.+) {indexFile}?url=index.html [L,QSA] RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA] -#RewriteCond %{REQUEST_URI} !-U RewriteRule (.*\.html?) {indexFile}?url=/$1 [L,QSA] </IfModule> diff --git a/index.php b/index.php index 7f42886b..83839358 100644 --- a/index.php +++ b/index.php @@ -74,7 +74,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range isset($_GET['p'])) { serveEntry($matches); } elseif (preg_match(PAT_PERMALINK_FEEDCATEGORIES, $uri, $matches) || preg_match(PAT_PERMALINK_FEEDAUTHORS, $uri, $matches) || preg_match(PAT_FEEDS, $uri)) { - serveFeed(); + serveFeed($matches); exit; } else if (preg_match(PAT_PLUGIN, $uri, $matches)) { servePlugin($matches); diff --git a/lang/UTF-8/plugin_lang.php b/lang/UTF-8/plugin_lang.php index 6c7403ce..e06f2e11 100644 --- a/lang/UTF-8/plugin_lang.php +++ b/lang/UTF-8/plugin_lang.php @@ -92,3 +92,10 @@ foreach($const['missing'] AS $file => $constants) { @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_bg.inc.php b/lang/UTF-8/serendipity_lang_bg.inc.php index b749ab4b..b4e7476d 100644 --- a/lang/UTF-8/serendipity_lang_bg.inc.php +++ b/lang/UTF-8/serendipity_lang_bg.inc.php @@ -1104,3 +1104,10 @@ $i18n_filename_to = array('-', 'a', 'A', 'b', 'B', 'v', 'V', 'g', 'G', 'd', 'D @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_cn.inc.php b/lang/UTF-8/serendipity_lang_cn.inc.php index a4d5395f..d418e6ff 100644 --- a/lang/UTF-8/serendipity_lang_cn.inc.php +++ b/lang/UTF-8/serendipity_lang_cn.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_cs.inc.php b/lang/UTF-8/serendipity_lang_cs.inc.php index 1ab01e54..3a038963 100644 --- a/lang/UTF-8/serendipity_lang_cs.inc.php +++ b/lang/UTF-8/serendipity_lang_cs.inc.php @@ -1143,3 +1143,10 @@ $i18n_filename_to = array ( @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_cz.inc.php b/lang/UTF-8/serendipity_lang_cz.inc.php index 113739da..03c0a0e8 100644 --- a/lang/UTF-8/serendipity_lang_cz.inc.php +++ b/lang/UTF-8/serendipity_lang_cz.inc.php @@ -1144,3 +1144,10 @@ $i18n_filename_to = array ( @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_da.inc.php b/lang/UTF-8/serendipity_lang_da.inc.php index 15f44062..92bd1058 100644 --- a/lang/UTF-8/serendipity_lang_da.inc.php +++ b/lang/UTF-8/serendipity_lang_da.inc.php @@ -1111,3 +1111,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_de.inc.php b/lang/UTF-8/serendipity_lang_de.inc.php index edbbbfb2..9d0c56b4 100644 --- a/lang/UTF-8/serendipity_lang_de.inc.php +++ b/lang/UTF-8/serendipity_lang_de.inc.php @@ -1084,6 +1084,7 @@ @define('USERCONF_WYSIWYG_PRESET_NOCC_FULL', 'Erzwingen: Vollständig'); @define('USERCONF_WYSIWYG_PRESET_NOCC_STANDARD', 'Erzwingen: Alternative'); @define('USERCONF_WYSIWYG_PRESET_NOCC_CKE', 'Erzwingen: CKEditor Vollständig'); + @define('CATEGORY_PLUGIN_SHOWALL', 'Zeige einen Link zu "Alle Kategorien"?'); @define('CATEGORY_PLUGIN_SHOWALL', 'Falls aktiviert wird Besuchern ein Link angezeigt, das Blog ohne Einschränkung der Kategorien darzustellen.'); @define('SERENDIPITY_PHPVERSION_FAIL', 'Serendipity benötigt eine PHP-Version >= %2$s - Sie benutzen eine ältere Version (%1$s) und müssen auf eine neuere upgraden. Die meisten Provider gestatten den Wechsel auf neuere PHP-Versionen über einen Schalter in der Admin-Oberfläche oder eine Anweisung in der .htaccess.'); @@ -1097,18 +1098,26 @@ @define('INSTALL_PASSWORD_INVALID', 'Die eingebenen Administrator-Passwörter stimmen nicht überein.'); @define('INSTALL_BACKENDPOPUP_GRANULAR', 'Popups in speziellen Bereichen erzwingen'); @define('INSTALL_BACKENDPOPUP_GRANULAR_DESC', 'Wenn Popups generell deaktiviert wurden, kann an speziellen Stellen dennoch der Einsatz von Popups forciert werden, indem die Liste jener Stellen hier aufgeführt wird (kommasepariert). Die vollständige Liste ist: '); -@define('START_UPDATE', 'Starting Update ...'); -@define('UPDATE_ALL', 'Update All'); -@define('JS_FAILURE', 'The Serendipity JavaScript-library could not be loaded. This can happen due to PHP or Plugin errors, or even a malformed browser cache. To check the exact error please open <a href="%1$s">%1$s</a> manually in your browser and check for error messages.'); -@define('THEMES_PREVIEW_BLOG', 'See demo on blog.s9y.org'); -@define('SYNDICATION_PLUGIN_XML_DESC', 'Set to "none" if you only want to show a text link.'); -@define('MULTICHECK_NO_ITEM', 'No item selected, please check at least one. <a href="%s">Return to previous page</a>.'); -@define('MULTICHECK_NO_DIR', 'No directory selected, please choose one. <a href="%s">Return to previous page</a>.'); -@define('BULKMOVE_INFO', 'Bulk-move info'); -@define('BULKMOVE_INFO_DESC', 'You can select multiple files to bulk-move them to a new location. <strong>Note:</strong> This action cannot be undone, just like bulk-deletion of multiple files. All checked files will be physically moved, and referring blog entries are rewritten to point to the new location.'); -@define('FIRST_PAGE', 'First Page'); -@define('LAST_PAGE', 'Last Page'); -@define('MEDIA_PROPERTIES_DONE', 'Properties of #%d changed.'); -@define('DIRECTORY_INFO', 'Directory info'); -@define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); -@define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); + +@define('START_UPDATE', 'Starte Update ...'); +@define('UPDATE_ALL', 'Alles updaten'); +@define('JS_FAILURE', 'Die Javascript-Bibliothek von Serendipity konnte nicht geladen werden. Das kann aufgrund von PHP- oder Pluginfehlern, eventuell auch aufgrund eines zerstörten Browsercaches vorkommen. Um die genaue Fehlermeldung zu sehen, öffnen Sie bitte <a href="%1$s">%1$s</a> von Hand im Browser und suchen nach Fehlermeldungen.'); +@define('THEMES_PREVIEW_BLOG', 'Siehe Demo auf blog.s9y.org'); +@define('SYNDICATION_PLUGIN_XML_DESC', 'Auf "none" setzen um nur einen Textlink anzuzeigen.'); +@define('MULTICHECK_NO_ITEM', 'Kein Element ausgewählt, bitte mindestens eins auswählen. <a href="%s">Zurück zur vorigen Seite</a>.'); +@define('MULTICHECK_NO_DIR', 'Kein Verzeichnis ausgewählt, bitte mindestens eins auswählen. <a href="%s">Zurück zur vorigen Seite</a>.'); +@define('BULKMOVE_INFO', 'Gleichzeitiges Verschieben mehrerer Dateien'); +@define('BULKMOVE_INFO_DESC', 'Sie können mehrere Dateien auswählen, um sie gleichzeitig an einen neuen Ort zu verschieben. <strong>Hinweis:</strong> Diese Aktion kann nicht rückgängig gemacht werden, genau wie das gleichzeitige Löschen mehrerer Dateien. Alle ausgewählten Dateien werden physikalisch verschoben; Blogeinträge, welche diese Dateien referenzieren, werden umgeschrieben, um auf den neuen Ort zu verweisen.'); +@define('FIRST_PAGE', 'Erste Seite'); +@define('LAST_PAGE', 'Letzte Seite'); +@define('MEDIA_PROPERTIES_DONE', 'Eigenschaften von #%d geändert.'); +@define('DIRECTORY_INFO', 'Verzeichnis-Info'); +@define('DIRECTORY_INFO_DESC', 'Verzeichnisse entsprechen dem Namen ihrer zugehörigen phsikalischen Ordner. Wollen Sie Verzeichnisse, die Dateien enthalten, ändern oder verschieben, haben Sie zwei Optionen. Sie können entweder das gewünschte Ziel(unter)verzeichnis anlegen, die Elemente über die Medienbibliothek dorthin verschieben und das leere Ursprungsverzeichnis löschen; oder Sie können das gesamte Ursprungsverzeichnis über den Button "Verzeichnis bearbeiten" ändern und frei umbenennen. Letzteres wird alle Unterverzeichnisse und Elemente verschieben und die darauf verweisenden Blogeinträge anpassen.'); +@define('MEDIA_RESIZE_EXISTS', 'Datei-Dimensionen existieren bereits!'); +@define('USE_CACHE', 'Caching aktivieren'); +@define('USE_CACHE_DESC', 'Aktiviert einen internen Cache, um die Wiederholung bestimmter Datenbank-Abfragen zu umgehen. Das reduziert die Last auf Server mit mittlerem bis hohem Traffic und verbessert die Ladezeit der Seite.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Beachten Sie bitte, dass Sie ein Präfix verwenden müssen, damit Serendipity die URL korrekt der richtigen Aktion zuordnen kann. Sie dürfen das Präfix in jeden beliebigen einzigartigen Namen ändern, aber nicht komplett entfernen. Das gilt für alle Definitionen für Pfad-Präfixe.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Erlaube, Daten über lokale URLs abzurufen'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'Standardmäßig ist es aus Sicherheitsgründen verboten, Daten über lokale URLs abzurufen, um Server Side Request Forgers (SSRF) zu vermeiden. Wenn Sie ein lokales Intranet verwenden können sie die Datenabfrage über diese Option explizit erlauben.'); +@define('REMOTE_FILE_INVALID', 'Die angegebene URL scheint eine lokale zu sein und darf nicht abgerufen werden. Sie können dies explizit gestatten, indem Sie in der Konfiguration die Option "Erlaube, Daten über lokale URLs abzurufen" setzen.'); +@define('URL_NOT_FOUND', 'Die angeforderte Seite konnte nicht gefunden werden (404). Dies ist die Standardseite.'); \ No newline at end of file diff --git a/lang/UTF-8/serendipity_lang_en.inc.php b/lang/UTF-8/serendipity_lang_en.inc.php index 198fd4e1..ef579cc0 100644 --- a/lang/UTF-8/serendipity_lang_en.inc.php +++ b/lang/UTF-8/serendipity_lang_en.inc.php @@ -1113,3 +1113,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_es.inc.php b/lang/UTF-8/serendipity_lang_es.inc.php index 6f235658..bc6377b1 100644 --- a/lang/UTF-8/serendipity_lang_es.inc.php +++ b/lang/UTF-8/serendipity_lang_es.inc.php @@ -1130,3 +1130,10 @@ Melvin TODO [20060128]: What spanish word do we use for "referrers" ?? @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_fa.inc.php b/lang/UTF-8/serendipity_lang_fa.inc.php index 7a65a95d..63f13265 100644 --- a/lang/UTF-8/serendipity_lang_fa.inc.php +++ b/lang/UTF-8/serendipity_lang_fa.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_fi.inc.php b/lang/UTF-8/serendipity_lang_fi.inc.php index 9bec73ea..a77de5bf 100644 --- a/lang/UTF-8/serendipity_lang_fi.inc.php +++ b/lang/UTF-8/serendipity_lang_fi.inc.php @@ -1112,3 +1112,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_fr.inc.php b/lang/UTF-8/serendipity_lang_fr.inc.php index 86a775d7..ed833e12 100644 --- a/lang/UTF-8/serendipity_lang_fr.inc.php +++ b/lang/UTF-8/serendipity_lang_fr.inc.php @@ -1119,3 +1119,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_hu.inc.php b/lang/UTF-8/serendipity_lang_hu.inc.php index 3b74bbfc..9462b83e 100644 --- a/lang/UTF-8/serendipity_lang_hu.inc.php +++ b/lang/UTF-8/serendipity_lang_hu.inc.php @@ -1110,3 +1110,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_is.inc.php b/lang/UTF-8/serendipity_lang_is.inc.php index 9a4196c6..99db586c 100644 --- a/lang/UTF-8/serendipity_lang_is.inc.php +++ b/lang/UTF-8/serendipity_lang_is.inc.php @@ -1112,3 +1112,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_it.inc.php b/lang/UTF-8/serendipity_lang_it.inc.php index 2c568ec3..abc8a685 100644 --- a/lang/UTF-8/serendipity_lang_it.inc.php +++ b/lang/UTF-8/serendipity_lang_it.inc.php @@ -1115,3 +1115,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_ja.inc.php b/lang/UTF-8/serendipity_lang_ja.inc.php index d5abe4f6..258024e8 100644 --- a/lang/UTF-8/serendipity_lang_ja.inc.php +++ b/lang/UTF-8/serendipity_lang_ja.inc.php @@ -1116,3 +1116,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_ko.inc.php b/lang/UTF-8/serendipity_lang_ko.inc.php index f586c982..94f4a3fd 100644 --- a/lang/UTF-8/serendipity_lang_ko.inc.php +++ b/lang/UTF-8/serendipity_lang_ko.inc.php @@ -1,8 +1,8 @@ <?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details -# Translated by: Wesley Hwang-Chung <wesley96@gmail.com> -# (c) 2005 http://www.tool-box.info/ +# Translated by: Wesley Woo-Duk Hwang-Chung <wesley96@gmail.com> +# (c) 2005, 2016 http://www.tool-box.info/ /* vim: set sts=4 ts=4 expandtab : */ @define('LANG_CHARSET', 'UTF-8'); @@ -19,7 +19,7 @@ @define('SERENDIPITY_ADMIN_SUITE', '세렌디피티 관리 도구'); @define('HAVE_TO_BE_LOGGED_ON', '이 페이지를 보려면 로그인해야 합니다'); @define('WRONG_USERNAME_OR_PASSWORD', '아이디 또는 암호가 잘못 입력되었습니다'); -@define('APPEARANCE', '시각적 요소'); +@define('APPEARANCE', '외관'); @define('MANAGE_STYLES', '스타일 관리'); @define('CONFIGURE_PLUGINS', '플러그인 설정'); @define('CONFIGURATION', '기능 설정'); @@ -31,9 +31,9 @@ @define('SAVE', '저장'); @define('NAME', '이름'); @define('CREATE_NEW_CAT', '새로운 범주 만들기'); -@define('I_WANT_THUMB', '글에 작은 그림을 적용합니다.'); -@define('I_WANT_BIG_IMAGE', '글에 큰 그림을 적용합니다.'); -@define('I_WANT_NO_LINK', '그림 자체로 보여줍니다'); +@define('I_WANT_THUMB', '글에 작은 그림으로 추가합니다.'); +@define('I_WANT_BIG_IMAGE', '글에 원본 그림으로 추가합니다.'); +@define('I_WANT_NO_LINK', '그림으로만 보여줍니다'); @define('I_WANT_IT_TO_LINK', '그림을 다음 주소의 링크로 만듭니다:'); @define('BACK', '뒤로'); @define('FORWARD', '앞으로'); @@ -51,7 +51,7 @@ @define('SAVE', '저장'); @define('UP', '위로'); @define('DOWN', '아래로'); -@define('ENTRIES', '개의 글'); +@define('ENTRIES', '블로그 글'); @define('NEW_ENTRY', '새로운 글'); @define('EDIT_ENTRIES', '글 편집하기'); @define('CATEGORIES', '범주'); @@ -69,9 +69,9 @@ @define('ADD_COMMENT', '덧글 추가'); @define('NO_COMMENTS', '덧글 없음'); @define('POSTED_BY', '작성자:'); -@define('ON', ':'); -@define('A_NEW_COMMENT_BLAHBLAH', '당신의 블로그 "%s"에 있는 "%s"(이)라는 글에 새로운 덧글이 달렸습니다.'); -@define('A_NEW_TRACKBACK_BLAHBLAH', '"%s"(이)라는 글에 새로운 트랙백이 생성되었습니다.'); +@define('ON', '작성일:'); +@define('A_NEW_COMMENT_BLAHBLAH', '당신의 블로그 "%s"에 있는 글 "%s"에 새로운 덧글이 달렸습니다.'); +@define('A_NEW_TRACKBACK_BLAHBLAH', '블로그 글 "%s"에 새로운 트랙백이 생성되었습니다.'); @define('NO_CATEGORY', '범주 없음'); @define('ENTRY_BODY', '본문'); @define('EXTENDED_BODY', '추가 내용'); @@ -102,14 +102,14 @@ @define('SHOWS_TOP_SITES', '블로그로 가장 자주 링크를 건 사이트 보기'); @define('TOP_EXITS', '상위 진출 링크'); @define('SHOWS_TOP_EXIT', '블로그에서 가장 자주 타고 나간 링크 보기'); -@define('SYNDICATION', '배급'); -@define('SHOWS_RSS_BLAHBLAH', 'RSS 배급 링크 보여주기'); +@define('SYNDICATION', '중개'); +@define('SHOWS_RSS_BLAHBLAH', 'RSS 중개 링크 보여주기'); @define('ADVERTISES_BLAHBLAH', '블로그의 제작 도구를 광고함'); @define('HTML_NUGGET', 'HTML 덩어리'); @define('HOLDS_A_BLAHBLAH', '옆줄에 HTML이 들어있는 덩어리를 넣기'); @define('TITLE_FOR_NUGGET', '덩어리 제목'); @define('THE_NUGGET', 'HTML 덩어리를 넣으세요!'); -@define('SYNDICATE_THIS_BLOG', '블로그 배급받기'); +@define('SYNDICATE_THIS_BLOG', '블로그 중개하기'); @define('YOU_CHOSE', '%s(을)를 골랐습니다'); @define('IMAGE_ROTATE_LEFT', '시계 반대방향으로 90도 회전하기'); @define('IMAGE_ROTATE_RIGHT', '시계 방향으로 90도 회전하기'); @@ -124,20 +124,20 @@ @define('VIEW_TOPICS', '주제 보기'); @define('AT', '입력:'); @define('SET_AS_TEMPLATE', '템플릿으로 지정하기'); -@define('IN', '범주:'); +@define('IN', '다음에 포함:'); @define('EXCERPT', '발췌'); @define('TRACKED', '추적됨'); @define('LINK_TO_ENTRY', '글에 대한 링크'); -@define('LINK_TO_REMOTE_ENTRY', '먼 글에 대한 링크'); +@define('LINK_TO_REMOTE_ENTRY', '원격 글에 대한 링크'); @define('IP_ADDRESS', 'IP 주소'); @define('USER', '사용자'); -@define('THUMBNAIL_USING_OWN', '%s(은)는 이미 충분히 작으므로 그 자체가 작은 그림으로도 사용됩니다.'); +@define('THUMBNAIL_USING_OWN', '%s 파일은 이미 충분히 작으므로 그 자체를 작은 그림으로도 사용합니다.'); @define('THUMBNAIL_FAILED_COPY', '%s 자체를 작은 그림으로 사용하려고 했으나 복사에 실패했습니다.'); @define('AUTHOR', '작성자'); @define('LAST_UPDATED', '최종 업데이트'); @define('TRACKBACK_SPECIFIC', '이 글에 대한 트랙백 전용 URI'); @define('DIRECT_LINK', '이 글에 대한 직접 링크'); -@define('COMMENT_ADDED', '덧글이 성공적으로 달렸습니다. '); +@define('COMMENT_ADDED', '덧글이 성공적으로 달렸습니다.'); @define('COMMENT_ADDED_CLICK', '%s여기를 눌러%s 덧글 목록으로 돌아가거나 %s여기를 눌러%s 이 창을 닫습니다.'); @define('COMMENT_NOT_ADDED_CLICK', '%s여기를 눌러%s 덧글 목록으로 돌아가거나 %s여기를 눌러%s 이 창을 닫습니다.'); @define('COMMENTS_DISABLE', '이 글에 덧글을 금지하기'); @@ -145,10 +145,10 @@ @define('COMMENTS_CLOSED', '작성자가 이 글에 덧글을 금지했습니다'); @define('EMPTY_COMMENT', '덧글 내용이 비어 있으므로 %s돌아가서%s 다시 작성하십시오'); @define('ENTRIES_FOR', '%s: 작성된 글'); -@define('DOCUMENT_NOT_FOUND', '%s라는 문서를 찾지 못했습니다.'); +@define('DOCUMENT_NOT_FOUND', '%s(이)라는 문서를 찾지 못했습니다.'); @define('USERNAME', '아이디'); @define('PASSWORD', '암호'); -@define('AUTOMATIC_LOGIN', '정보 저장'); +@define('AUTOMATIC_LOGIN', '로그인 정보 저장'); @define('SERENDIPITY_INSTALLATION', '세렌디피티 설치'); @define('LEFT', '왼쪽'); @define('RIGHT', '오른쪽'); @@ -168,7 +168,7 @@ @define('CATEGORY_SAVED', '범주가 저장되었습니다'); @define('SELECT_TEMPLATE', '블로그에 사용할 템플릿을 선택하십시오.'); @define('ENTRIES_NOT_SUCCESSFULLY_INSERTED', '글이 성공적으로 삽입되지 않았습니다.'); -@define('MT_DATA_FILE', '이동 가능 형태의 데이터 파일'); +@define('MT_DATA_FILE', '무버블 타입 웹로그용 데이터 파일'); @define('FORCE', '강제로'); @define('CREATE_AUTHOR', '작성자 \'%s\'(을)를 생성합니다.'); @define('CREATE_CATEGORY', '범주 \'%s\'(을)를 생성합니다.'); @@ -204,14 +204,14 @@ @define('RESIZING', '크기 조절중'); @define('RESIZE_DONE', '완료 (%s개의 그림의 크기를 조절함).'); @define('SYNCING', '데이터베이스를 그림 폴더와 동기화합니다'); -@define('SYNC_OPTION_LEGEND', 'Thumbnail Synchronization Options'); -@define('SYNC_OPTION_KEEPTHUMBS', 'Keep all existing thumbnails'); -@define('SYNC_OPTION_SIZECHECKTHUMBS', 'Keep existing thumbnails only if they are the correct size'); -@define('SYNC_OPTION_DELETETHUMBS', 'Regenerate all thumbnails'); +@define('SYNC_OPTION_LEGEND', '작은 그림 동기화 선택사항'); +@define('SYNC_OPTION_KEEPTHUMBS', '기존의 작은 그림 모두 유지'); +@define('SYNC_OPTION_SIZECHECKTHUMBS', '알맞은 크기일 경우일 때만 기존의 작은 그림 유지'); +@define('SYNC_OPTION_DELETETHUMBS', '작은 그림 모두 재생성'); @define('SYNC_DONE', '완료 (%s개의 그림을 동기화함).'); -@define('FILE_NOT_FOUND', '<b>%s</b>라는 이름의 파일을 찾지 못했습니다. 이미 삭제되었을 수 있습니다.'); +@define('FILE_NOT_FOUND', '<b>%s</b>(이)라는 이름의 파일을 찾지 못했습니다. 이미 삭제되었을 수 있습니다.'); @define('ABORT_NOW', '지금 중지'); -@define('REMOTE_FILE_NOT_FOUND', '원격 서버에서 파일을 찾지 못했습니다. <b>%s</b> (이)라는 주소가 정확합니까?'); +@define('REMOTE_FILE_NOT_FOUND', '원격 서버에서 파일을 찾지 못했습니다. <b>%s</b>(이)라는 주소가 정확합니까?'); @define('FILE_FETCHED', '%s(을)를 %s(으)로 가져옴'); @define('FILE_UPLOADED', '파일 %s(이)가 %s(으)로 성공적으로 업로드되었습니다'); @define('WORD_OR', '또는'); @@ -231,8 +231,8 @@ @define('SYNDICATION_PLUGIN_20', 'RSS 2.0 피드'); @define('SYNDICATION_PLUGIN_20c', 'RSS 2.0 덧글'); @define('SYNDICATION_PLUGIN_ATOM03', 'ATOM 0.3 피드'); -@define('SYNDICATION_PLUGIN_MANAGINGEDITOR', '"managingEditor" 필드'); -@define('SYNDICATION_PLUGIN_WEBMASTER', '"webMaster" 필드'); +@define('SYNDICATION_PLUGIN_MANAGINGEDITOR', '"managingEditor"(편집인) 필드'); +@define('SYNDICATION_PLUGIN_WEBMASTER', '"webMaster"(웹마스터) 필드'); @define('SYNDICATION_PLUGIN_BANNERURL', 'RSS 피드를 위한 그림 파일'); @define('SYNDICATION_PLUGIN_BANNERWIDTH', '그림 폭'); @define('SYNDICATION_PLUGIN_BANNERHEIGHT', '그림 높이'); @@ -241,9 +241,9 @@ @define('SYNDICATION_PLUGIN_BANNERURL_DESC', 'GIF/JPEG/PNG로 된 그림 파일의 주소 (빈 상태: 세렌디피티 로고 그림)'); @define('SYNDICATION_PLUGIN_BANNERWIDTH_DESC', '픽셀 단위 (최고 144)'); @define('SYNDICATION_PLUGIN_BANNERHEIGHT_DESC', '픽셀 단위 (최고 400)'); -@define('SYNDICATION_PLUGIN_TTL', '"ttl" 필드 (생존시간)'); +@define('SYNDICATION_PLUGIN_TTL', '"ttl"(생존시간) 필드'); @define('SYNDICATION_PLUGIN_TTL_DESC', '외부 사이트 또는 프로그램에 의해서 더 이상 저장되지 않을 시점을 분 단위로 입력 (빈 상태: 숨김) [RSS 2.0]'); -@define('SYNDICATION_PLUGIN_PUBDATE', '"pubDate" 필드'); +@define('SYNDICATION_PLUGIN_PUBDATE', '"pubDate"(게시일자) 필드'); @define('SYNDICATION_PLUGIN_PUBDATE_DESC', 'RSS 채널에 "pubDate" 필드를 넣어서 최신으로 올라온 글의 날짜를 보여주겠습니까?'); @define('CONTENT', '내용'); @define('TYPE', '종류'); @@ -277,12 +277,12 @@ @define('SORT_ORDER_WIDTH', '그림 폭'); @define('SORT_ORDER_HEIGHT', '그림 높이'); @define('SORT_ORDER_DATE', '업로드 시간'); -@define('SORT_ORDER_ASC', '오름차'); -@define('SORT_ORDER_DESC', '내림차'); +@define('SORT_ORDER_ASC', '오름차순'); +@define('SORT_ORDER_DESC', '내림차순'); @define('THUMBNAIL_SHORT', '작은 그림'); -@define('ORIGINAL_SHORT', '원래 그림'); +@define('ORIGINAL_SHORT', '원본 그림'); @define('APPLY_MARKUP_TO', '%s에 마크업 적용'); -@define('CALENDAR_BEGINNING_OF_WEEK', '한 주의 시작점'); +@define('CALENDAR_BEGINNING_OF_WEEK', '한 주의 시작일'); @define('SERENDIPITY_NEEDS_UPGRADE', '세렌디피티 현재 설치 버전이 %s인 것으로 나타났습니다. 버전 %s로 업그레이드를 계속 진행하려면 <a href="%s">여기</a>를 누르십시오.'); @define('SERENDIPITY_UPGRADER_WELCOME', '세렌디피티 업그레이드 에이전트에 오신 것을 환영합니다.'); @define('SERENDIPITY_UPGRADER_PURPOSE', '설치된 세렌디피티 %s의 업그레이드를 도와드리겠습니다.'); @@ -306,12 +306,12 @@ @define('CREATED_USER', '새로운 사용자 %s(이)가 생성되었습니다'); @define('MODIFIED_USER', '%s의 설정이 변경되었습니다'); @define('USER_LEVEL', '사용자 레벨'); -@define('DELETE_USER', '사용자 %d번인 %s(을)를 삭제하게 됩니다. 계속 하시겠습니까? 이 사용자가 작성한 글이 더 이상 일반 페이지에 나타나지 않게 됩니다.'); -@define('DELETED_USER', '사용자 %d번인 %s(이)가 삭제되었습니다.'); +@define('DELETE_USER', '%d번 사용자인 %s(을)를 삭제하게 됩니다. 계속 하시겠습니까? 이 사용자가 작성한 글이 더 이상 외부 페이지에 나타나지 않게 됩니다.'); +@define('DELETED_USER', '%d번 사용자인 %s(이)가 삭제되었습니다.'); @define('LIMIT_TO_NUMBER', '몇 개의 아이템을 표시하겠습니까?'); @define('ENTRIES_PER_PAGE', '한 페이지에 표시할 글'); @define('XML_IMAGE_TO_DISPLAY', 'XML 버튼'); -@define('XML_IMAGE_TO_DISPLAY_DESC','XML 피드에 이 그림이 나타납니다. 비운 상태면 기본 그림이 보이고 \'none\'을 입력하면 나타나지 않습니다.'); +@define('XML_IMAGE_TO_DISPLAY_DESC','XML 피드에 이 그림이 나타납니다. 비운 상태면 기본 그림이 보이고 \'없음\'을 입력하면 나타나지 않습니다.'); @define('DIRECTORIES_AVAILABLE', '하위 디렉토리 목록에서 디렉토리 이름을 누르면 그 디렉토리 안에 새 디렉토리를 만들 수 있습니다.'); @define('ALL_DIRECTORIES', '모든 디렉토리'); @@ -320,8 +320,8 @@ @define('PARENT_DIRECTORY', '상위 디렉토리'); @define('CONFIRM_DELETE_DIRECTORY', '디렉토리 %s에 포함된 모든 내용을 삭제하겠습니까?'); @define('ERROR_NO_DIRECTORY', '오류: 디렉토리 %s(이)가 존재하지 않습니다'); -@define('CHECKING_DIRECTORY', '디렉토리 %s 내의 파일 점검중'); -@define('DELETING_FILE', '파일 %s 삭제중...'); +@define('CHECKING_DIRECTORY', '디렉토리 %s 내의 파일 점검 중'); +@define('DELETING_FILE', '파일 %s 삭제 중...'); @define('ERROR_DIRECTORY_NOT_EMPTY', '비어 있지 않은 디렉토리를 삭제할 수 없습니다. 남아있는 파일도 제거하려면 "강제 삭제"를 체크하고 다시 시도하십시오. 남아있는 파일은:'); @define('DIRECTORY_DELETE_FAILED', '디렉토리 %s 삭제에 실패했습니다. 권한 설정이나 위의 메시지를 확인하십시오.'); @define('DIRECTORY_DELETE_SUCCESS', '디렉토리 %s(이)가 성공적으로 삭제되었습니다.'); @@ -334,10 +334,10 @@ @define('TOP_LEVEL', '최상위 (본문)'); @define('SYNDICATION_PLUGIN_GENERIC_FEED', '%s 피드'); @define('PERMISSIONS', '권한 설정'); -@define('INTEGRITY', 'Verify Installation Integrity'); -@define('CHECKSUMS_NOT_FOUND', 'Unable to compare checksums! (No checksums.inc.php in main directory)'); -@define('CHECKSUMS_PASS', 'All required files verified.'); -@define('CHECKSUM_FAILED', '%s corrupt or modified: failed verification'); +@define('INTEGRITY', '설치상태 무결성 검증'); +@define('CHECKSUMS_NOT_FOUND', '체크섬을 비교하지 못했습니다! (메인 디렉토리에 checksums.inc.php 파일이 없음)'); +@define('CHECKSUMS_PASS', '필수 파일이 모두 검증되었습니다.'); +@define('CHECKSUM_FAILED', '%s 파일이 손상되거나 수정되었습니다: 검증 실패'); @define('SETTINGS_SAVED_AT', '새로운 설정이 %s에 저장되었습니다'); /* DATABASE SETTINGS */ @@ -358,19 +358,19 @@ /* PATHS */ @define('INSTALL_CAT_PATHS', '경로'); -@define('INSTALL_CAT_PATHS_DESC', '필수 디렉토리 및 파일에 대한 경로를 지정합니다. 디렉토리 끝에 슬래시 추가하는 것을 잊지 마십시오.'); +@define('INSTALL_CAT_PATHS_DESC', '필수 디렉토리 및 파일에 대한 경로를 지정합니다. 디렉토리 끝에 슬래시(/) 추가하는 것을 잊지 마십시오.'); @define('INSTALL_FULLPATH', '전체 경로'); -@define('INSTALL_FULLPATH_DESC', '세렌디피티 설치 위치의 절대 경로'); +@define('INSTALL_FULLPATH_DESC', '세렌디피티 설치 위치의 절대적이고 전체적인 경로'); @define('INSTALL_UPLOADPATH', '업로드 경로'); -@define('INSTALL_UPLOADPATH_DESC', '업로드된 파일이 저장되는 위치로써 \'전체 경로\'에 대한 상대 경로임 - 일반적으로 \'uploads/\''); +@define('INSTALL_UPLOADPATH_DESC', '업로드된 파일이 저장되는 위치로서 \'전체 경로\'에 대한 상대 경로 - 일반적으로 \'uploads/\''); @define('INSTALL_RELPATH', '상대 경로'); -@define('INSTALL_RELPATH_DESC', '브라우저에 나타날 세렌디피티의 경로임 - 일반적으로 \'/serendipity/\''); +@define('INSTALL_RELPATH_DESC', '브라우저에 나타날 세렌디피티의 경로 - 일반적으로 \'/serendipity/\''); @define('INSTALL_RELTEMPLPATH', '템플릿 상대 경로'); -@define('INSTALL_RELTEMPLPATH_DESC', '템플릿이 저장된 디렉토리의 경로로써 \'상대 경로\'에 대한 상대 경로임'); +@define('INSTALL_RELTEMPLPATH_DESC', '템플릿이 저장된 디렉토리의 경로로서 \'상대 경로\'를 기준으로 한 상대 경로'); @define('INSTALL_RELUPLOADPATH', '업로드 상대 경로'); -@define('INSTALL_RELUPLOADPATH_DESC', '브라우저에 나타날 업로드 경로로써 \'상대 경로\'에 대한 상대 경로임'); +@define('INSTALL_RELUPLOADPATH_DESC', '브라우저에 나타날 업로드 경로로서 \'상대 경로\'를 기준으로 한 상대 경로'); @define('INSTALL_URL', '블로그 주소'); -@define('INSTALL_URL_DESC', '세렌디피티 설치가 된 기본 인터넷 주소'); +@define('INSTALL_URL_DESC', '세렌디피티가 설치된 기본 인터넷 주소(URL)'); @define('INSTALL_INDEXFILE', '인덱스 파일'); @define('INSTALL_INDEXFILE_DESC', '세렌디피티 인덱스 파일의 이름'); @@ -390,13 +390,13 @@ @define('INSTALL_BLOGNAME', '블로그 이름'); @define('INSTALL_BLOGNAME_DESC', '블로그에 사용할 제목'); @define('INSTALL_BLOGDESC', '블로그 설명'); -@define('INSTALL_BLOGDESC_DESC', '블로그의 내용을 적음'); +@define('INSTALL_BLOGDESC_DESC', '블로그를 설명하는 내용을 적음'); @define('INSTALL_LANG', '언어'); @define('INSTALL_LANG_DESC', '블로그에 사용할 언어 선택'); /* APPEARANCE AND OPTIONS */ -@define('INSTALL_CAT_DISPLAY', '시각적 요소 및 옵션'); -@define('INSTALL_CAT_DISPLAY_DESC', '세렌디피티의 직관적인 모습과 느낌을 정합니다.'); +@define('INSTALL_CAT_DISPLAY', '외관 및 선택사항'); +@define('INSTALL_CAT_DISPLAY_DESC', '세렌디피티의 겉모습과 인상을 정합니다.'); @define('INSTALL_WYSIWYG', 'WYSIWYG 편집기 사용'); @define('INSTALL_WYSIWYG_DESC', 'WYSIWYG 편집기를 사용하겠습니까? (인터넷 익스플로러 5 이상에서 작동, 모질라 1.3 이상에서 부분 작동)'); @define('INSTALL_XHTML11', 'XHTML 1.1 규격을 강제로 따름'); @@ -406,31 +406,31 @@ @define('INSTALL_EMBED', '세렌디피티가 내장된 형태입니까?'); @define('INSTALL_EMBED_DESC', '일반 페이지 속에 세렌디피티를 내장시키려면 "예"를 선택하여 헤더가 제외된 내용 부분만 출력시키게 합니다. indexFile 옵션을 사용하여 일반적인 웹페이지 헤더에 wrapper 클래스를 적용할 수 있습니다. 보다 자세한 사항은 README 파일을 참조하십시오.'); @define('INSTALL_TOP_AS_LINKS', '상위 진출/진입 사항을 링크로 표시'); -@define('INSTALL_TOP_AS_LINKS_DESC', '"아니오": 구글 스팸을 방지하기 위해 진출 및 진입 사항을 일반 글로 표시합니다. "예": 진출 및 진입 사항에 링크를 겁니다. "기본값": 젠체 설정에 따릅니다(추천).'); -@define('INSTALL_BLOCKREF', '진입 표시 통제'); -@define('INSTALL_BLOCKREF_DESC', '진입 사항에 표시되지 않았으면 하는 호스트가 있을 경우 각 호스트를 \';\'로 분리해서 입력합니다. 표시 통제는 부분 검색을 사용합니다(지정한 이름이 호스트의 일부일 경우 통제됨).'); -@define('INSTALL_REWRITE', '주소 재기록'); -@define('INSTALL_REWRITE_DESC', '주소 생성시 사용할 규칙을 정합니다. 재기록 규칙을 활성화시키면 블로그에 대한 주소가 깔끔해지고 구글과 같은 검색엔진에 의해 인덱싱이 잘 됩니다. 웹서버가 세렌디피티 디렉토리에 대해 mod_rewrite나 "AllowOverride All"을 지원해야 합니다. 기본 설정은 자동 검출됩니다.'); +@define('INSTALL_TOP_AS_LINKS_DESC', '"아니오": 구글 스팸을 방지하기 위해 진출 및 진입 사항을 일반 글로 표시합니다. "예": 진출 및 진입 사항에 링크를 겁니다. "기본값": 전체 설정에 따릅니다(추천).'); +@define('INSTALL_BLOCKREF', '차단된 진입 경로'); +@define('INSTALL_BLOCKREF_DESC', '진입 사항에 표시되지 않았으면 하는 호스트가 있을 경우 각 호스트를 \';\'로 분리해서 입력합니다. 글자 일부분이 일치해도 차단됨에 유의하십시오(지정한 이름이 호스트의 일부일 경우 차단됨).'); +@define('INSTALL_REWRITE', '인터넷 주소(URL) 재작성'); +@define('INSTALL_REWRITE_DESC', '인터넷 주소 생성시 사용할 규칙을 정합니다. 재작성 규칙을 활성화시키면 블로그에 대한 주소가 깔끔해지고 구글과 같은 검색엔진에 의해 인덱싱이 잘 됩니다. 웹서버가 세렌디피티 디렉토리에 대해 mod_rewrite나 "AllowOverride All"을 지원해야 합니다. 기본 설정은 자동 인식됩니다.'); /* IMAGECONVERSION SETTINGS */ @define('INSTALL_CAT_IMAGECONV', '그림 변환 설정'); @define('INSTALL_CAT_IMAGECONV_DESC', '세렌디피티가 그림을 어떻게 다룰지에 대한 정보를 입력합니다.'); @define('INSTALL_IMAGEMAGICK', 'ImageMagick 사용하기'); -@define('INSTALL_IMAGEMAGICK_DESC', 'ImageMagick이 설치되어 있으며 그림 크기를 조절하는데 사용하겠습니까?'); +@define('INSTALL_IMAGEMAGICK_DESC', 'ImageMagick이 설치되어 있으며 이를 그림 크기 조절에 사용하겠습니까?'); @define('INSTALL_IMAGEMAGICKPATH', '변환 바이너리 경로'); -@define('INSTALL_IMAGEMAGICKPATH_DESC', 'ImageMagick의 변환 바이너리(프로그램)의 이름 및 전체 경로'); +@define('INSTALL_IMAGEMAGICKPATH_DESC', 'ImageMagick 변환 바이너리(프로그램)의 이름 및 전체 경로'); @define('INSTALL_THUMBSUFFIX', '작은 그림 접두사'); @define('INSTALL_THUMBSUFFIX_DESC', '작은 그림은 원래이름.[접두사].확장자 식의 이름으로 생성됩니다'); -@define('INSTALL_THUMBWIDTH', '작은 그림 크기'); +@define('INSTALL_THUMBWIDTH', '작은 그림의 최대 크기'); @define('INSTALL_THUMBWIDTH_DESC', '자동 생성되는 작은 그림의 최대 크기'); -@define('INSTALL_THUMBDIM', 'Thumbnail constrained dimension'); -@define('INSTALL_THUMBDIM_LARGEST', 'Largest'); -@define('INSTALL_THUMBDIM_WIDTH', 'Width'); -@define('INSTALL_THUMBDIM_HEIGHT', 'Height'); -@define('INSTALL_THUMBDIM_DESC', 'Dimension to be constrained to the thumbnail max size. The default "' . - INSTALL_THUMBDIM_LARGEST . '" limits both dimensions, so neither can be greater than the max size; "' . - INSTALL_THUMBDIM_WIDTH . '" and "' . INSTALL_THUMBDIM_HEIGHT . - '" only limit the chosen dimension, so the other could be larger than the max size.'); +@define('INSTALL_THUMBDIM', '작은 그림의 최대 크기 제약 기준'); +@define('INSTALL_THUMBDIM_LARGEST', '양방향 모두'); +@define('INSTALL_THUMBDIM_WIDTH', '폭'); +@define('INSTALL_THUMBDIM_HEIGHT', '높이'); +@define('INSTALL_THUMBDIM_DESC', '작은 그림의 최대 크기를 정하기 위한 제약의 기준. 기본값인 "' . + INSTALL_THUMBDIM_LARGEST . '" 선택 시 폭과 높이를 모두 제한하므로 어느 쪽도 최대 크기를 초과할 수 없으며 "' . + INSTALL_THUMBDIM_WIDTH . '"과 "' . INSTALL_THUMBDIM_HEIGHT . + '"는 선택된 방향으로만 제한하므로 다른 한 방향은 최대 크기보다 클 수 있습니다.'); /* Personal details */ @define('USERCONF_CAT_PERSONAL', '사용자의 개인 정보'); @@ -449,7 +449,7 @@ @define('USERCONF_ALLOWPUBLISH_DESC', '이 사용자가 글을 작성할 권한이 있습니까?'); @define('SUCCESS', '성공'); @define('POWERED_BY_SHOW_TEXT', '"세렌디피티"를 텍스트로 출력'); -@define('POWERED_BY_SHOW_TEXT_DESC', '"세렌디피티 웨블로그"를 텍스트로 출력함'); +@define('POWERED_BY_SHOW_TEXT_DESC', '"세렌디피티 웹로그"를 텍스트로 출력함'); @define('POWERED_BY_SHOW_IMAGE', '"세렌디피티"를 로고로 출력'); @define('POWERED_BY_SHOW_IMAGE_DESC', '세렌디피티 로고를 보여줌'); @define('PLUGIN_ITEM_DISPLAY', '아이템이 어디에 표시됩니까?'); @@ -481,7 +481,7 @@ @define('PLUGIN_SUPERUSER_HTTPS', '로그인에 https 사용'); @define('PLUGIN_SUPERUSER_HTTPS_DESC', '로그인 링크가 https 위치로 향하도록 합니다. 웹서버가 이 기능을 지원해야 합니다.'); @define('INSTALL_SHOW_EXTERNAL_LINKS', '외부 링크를 클릭할 수 있게 하기'); -@define('INSTALL_SHOW_EXTERNAL_LINKS_DESC', '"아니오": 확인되지 않은 외부 링크(상위 진출, 상위 진입, 사용자 덧글)는 보여지지 않거나 일반 텍스트로 표시되어 구글 스팸을 방지합니다(추천). "예": 확인되지 않은 외부 링크가 하이퍼링크로 걸립니다. 옆줄 플러그인 설정에서 별도로 정할 수 있습니다.'); +@define('INSTALL_SHOW_EXTERNAL_LINKS_DESC', '"아니오": 확인되지 않은 외부 링크(상위 진출, 상위 진입, 사용자 덧글)는 보여지지 않거나 일반 텍스트로 표시되어 구글 스팸을 방지합니다(추천). "예": 확인되지 않은 외부 링크가 하이퍼링크로 나타납니다. 옆줄 플러그인 설정에서 별도로 정할 수 있습니다.'); @define('PAGE_BROWSE_COMMENTS', '%s번째 페이지 | 총 %s 페이지 | 총 %s개 덧글'); @define('FILTERS', '필터'); @define('FIND_ENTRIES', '글 찾기'); @@ -489,7 +489,7 @@ @define('FIND_MEDIA', '미디어 찾기'); @define('FILTER_DIRECTORY', '디렉토리'); @define('SORT_BY', '정렬 순서'); -@define('TRACKBACK_COULD_NOT_CONNECT', '트랙백이 보내지지 않음: %s에 대해서 포트 %d에서 열 수 없었음'); +@define('TRACKBACK_COULD_NOT_CONNECT', '트랙백이 보내지지 않음: %s애서 %d번 포트를 열 수 없었음'); @define('MEDIA', '미디어'); @define('MEDIA_LIBRARY', '미디어 보관함'); @define('ADD_MEDIA', '미디어 추가'); @@ -525,10 +525,10 @@ @define('TRACKBACK_SENT', '트랙백 성공'); @define('TRACKBACK_FAILED', '트랙백 실패: %s'); @define('TRACKBACK_NOT_FOUND', '트랙백 URI를 찾지 못했습니다.'); -@define('TRACKBACK_URI_MISMATCH', '자동 검색된 트랙백 URI는 목표 URI와 맞지 않습니다.'); +@define('TRACKBACK_URI_MISMATCH', '자동 검색된 트랙백 URI는 대상 URI와 맞지 않습니다.'); @define('TRACKBACK_CHECKING', '트랙백이 있는지 <u>%s</u> 확인중...'); -@define('TRACKBACK_NO_DATA', '목표가 데이터를 담고 있지 않습니다.'); -@define('TRACKBACK_SIZE', '목표 URI가 최개 파일 크기인 %s 바이트를 초과합니다.'); +@define('TRACKBACK_NO_DATA', '대상이 데이터를 담고 있지 않습니다.'); +@define('TRACKBACK_SIZE', '대상 URI가 최대 파일 크기인 %s 바이트를 초과합니다.'); @define('COMMENTS_VIEWMODE_THREADED', '엮은 형태'); @define('COMMENTS_VIEWMODE_LINEAR', '나열 형태'); @define('DISPLAY_COMMENTS_AS', '덧글 표시 방식:'); @@ -543,7 +543,7 @@ @define('MONTHS', '월'); @define('DAYS', '일'); @define('ARCHIVE_FREQUENCY', '표시 아이템의 주기'); -@define('ARCHIVE_FREQUENCY_DESC', '목록에 있는 각 아이템의 달력 상의 주기 단위'); +@define('ARCHIVE_FREQUENCY_DESC', '목록에 있는 각 아이템의 달력 상 주기 단위'); @define('ARCHIVE_COUNT', '목록에 표시될 아이템 수'); @define('ARCHIVE_COUNT_DESC', '표시할 달, 주, 또는 날의 총 개수'); @define('BELOW_IS_A_LIST_OF_INSTALLED_PLUGINS', '설치된 플러그인의 목록입니다.'); @@ -555,9 +555,11 @@ @define('ALREADY_INSTALLED', '이미 설치됨'); @define('SELECT_A_PLUGIN_TO_ADD', '설치하고 싶은 플러그인을 선택하십시오.'); @define('INSTALL_OFFSET', '서버 시간과의 시간 차이'); +@define('INSTALL_OFFSET_ON_SERVER_TIME', '서버 시간대를 기준으로 차이를 설정합니까?'); +@define('INSTALL_OFFSET_ON_SERVER_TIME_DESC', '서버 시간대를 기준으로 글의 표시 시간 차이를 설정할지의 여부를 정합니다. 예를 고르면 서버 시간대를 기준으로 하고 아니오를 고르면 GMT를 기준으로 합니다.'); @define('STICKY_POSTINGS', '꼭대기에 표시할 글'); @define('INSTALL_FETCHLIMIT', '한 페이지에 표시할 글 수'); -@define('INSTALL_FETCHLIMIT_DESC', '일반 페이지 각각에 표시할 글의 수'); +@define('INSTALL_FETCHLIMIT_DESC', '각 외부 페이지에 표시할 글의 수'); @define('IMPORT_ENTRIES', '데이터 불러오기'); @define('EXPORT_ENTRIES', '글 내보내기'); @define('IMPORT_WELCOME', '세렌디피티의 데이터 불러오기 유틸리티입니다'); @@ -576,13 +578,13 @@ @define('ACTIVATE_AUTODISCOVERY', '글 속에 발견된 링크로 트랙백을 보냄'); @define('WELCOME_TO_ADMIN', '세렌디피티 관리 도구에 오신 것을 환영합니다.'); @define('PLEASE_ENTER_CREDENTIALS', '인증 정보를 아래에 입력하십시오.'); -@define('ADMIN_FOOTER_POWERED_BY', '세렌디피티 %s 및 PHP %s로 작성되었습니다.'); +@define('ADMIN_FOOTER_POWERED_BY', '세렌디피티 %s 및 PHP %s(으)로 작성되었습니다.'); @define('INSTALL_USEGZIP', 'Gzip 압축 페이지 사용'); -@define('INSTALL_USEGZIP_DESC', '페이지 전송 속도를 향상시키기 위해, 사용자의 브라우저가 기능 지원을 할 경우 페이지를 압축해서 전송할 수 있습니다. 추천 사항입니다.'); +@define('INSTALL_USEGZIP_DESC', '사용자의 브라우저가 지원을 할 경우 페이지 전송 속도를 향상시키기 위해 페이지를 압축해서 전송할 수 있습니다. 추천 사항입니다.'); @define('INSTALL_SHOWFUTURE', '미래에 작성한 글 보이기'); @define('INSTALL_SHOWFUTURE_DESC', '이 기능을 사용할 경우 작성 날짜가 미래인 글도 모두 블로그에 표시하게 됩니다. 기본값은 이러한 글을 작성 날짜가 다다를 때까지 숨기는 것입니다.'); @define('INSTALL_DBPERSISTENT', '지속적인 접속 사용'); -@define('INSTALL_DBPERSISTENT_DESC', '지속적으로 데이터페이스에 접속하는 기능을 사용합니다. <a href="http://php.net/manual/features.persistent-connections.php" target="_blank">여기에서</a> 자세한 정보를 읽을 수 있습니다. 일반적으로 비추천 사항입니다.'); +@define('INSTALL_DBPERSISTENT_DESC', '지속적으로 데이터페이스에 접속하는 기능을 사용합니다. <a href="http://php.net/manual/features.persistent-connections.php" target="_blank">여기에서</a> 자세한 정보를 읽을 수 있습니다. 일반적으로 추천하지 않습니다.'); @define('NO_IMAGES_FOUND', '그림이 없습니다'); @define('PERSONAL_SETTINGS', '개인 설정'); @define('REFERER', '진입 경로'); @@ -606,7 +608,7 @@ @define('THEY_DONT', '그렇지 않음'); @define('SIMPLE_INSTALLATION', '간단한 설치'); @define('EXPERT_INSTALLATION', '전문가 설치'); -@define('COMPLETE_INSTALLATION', '설치 끝내기'); +@define('COMPLETE_INSTALLATION', '설치 완료하기'); @define('WONT_INSTALL_DB_AGAIN', '데이터베이스를 다시 설치하지 않습니다'); @define('CHECK_DATABASE_EXISTS', '데이터베이스 및 테이블이 이미 존재하는지 확인합니다'); @define('CREATING_PRIMARY_AUTHOR', '기본 작성자 \'%s\' 생성중'); @@ -629,26 +631,26 @@ @define('PROBLEM_PERMISSIONS_HOWTO', '권한 설정은 문제가 발생한 디렉토리에 대해 쉘 명령어 `<em>%s</em>`를 실행하거나 FTP 프로그램을 통해 이를 설정함으로써 바로잡을 수 있습니다.'); @define('WARNING_TEMPLATE_DEPRECATED', '경고: 사용중인 템플릿이 구식 템플릿 방식을 사용하고 있습니다. 가능하다면 업데이트 하십시오.'); @define('ENTRY_PUBLISHED_FUTURE', '이 글은 아직 게시되지 않았습니다.'); -@define('ENTRIES_BY', '%s에 의한 글'); +@define('ENTRIES_BY', '%s의 글'); @define('PREVIOUS', '이전'); @define('NEXT', '다음'); @define('APPROVE', '승인'); @define('DO_MARKUP_DESCRIPTION', '텍스트에 마크업 변환(이모티콘, *, /, _ 등을 활용한 마크업)을 적용합니다. 사용하지 않으면 입력한 HTML 코드가 모두 보존됩니다.'); @define('CATEGORY_ALREADY_EXIST', '"%s"(이)라는 범주가 이미 존재합니다.'); -@define('ERROR_FILE_FORBIDDEN', '액티브 컨텐츠가 담긴 파일을 업로드할 수 없습니다.'); +@define('ERROR_FILE_FORBIDDEN', '사용 중인 내용이 담긴 파일을 업로드할 수 없습니다.'); @define('ADMIN', '관리 사항'); @define('ADMIN_FRONTPAGE', '기본 페이지'); @define('QUOTE', '인용'); @define('IFRAME_SAVE', '세렌디피티가 글을 저장하면서 트랙백을 생성하고 XML-RPC 호출을 수행하는 중입니다. 약간 시간이 걸릴 수 있습니다.'); @define('IFRAME_SAVE_DRAFT', '이 글의 초안이 저장되었습니다.'); @define('IFRAME_PREVIEW', '세렌디피티가 미리보기를 생성하고 있습니다...'); -@define('IFRAME_WARNING', '브라우저가 iframes에 대한 개념을 지원하지 않습니다. serendipity_config.inc.php 파일을 열어서 $serendipity[\'use_iframe\'] 변수를 FALSE로 설정하십시오.'); +@define('IFRAME_WARNING', '브라우저가 iframe에 대한 개념을 지원하지 않습니다. serendipity_config.inc.php 파일을 열어서 $serendipity[\'use_iframe\'] 변수를 FALSE로 설정하십시오.'); @define('NONE', '없음'); @define('USERCONF_CAT_DEFAULT_NEW_ENTRY', '새 글에 대한 기본 설정'); @define('UPGRADE', '업그레이드'); @define('UPGRADE_TO_VERSION', '버전 %s(으)로 업그레이드'); @define('DELETE_DIRECTORY', '디렉토리 삭제'); -@define('DELETE_DIRECTORY_DESC', '미디어 파일이 담긴 디렉토리의 내용을 삭제하려고 합니다. 이 파일들은 본문에 사용중일 수 있습니다.'); +@define('DELETE_DIRECTORY_DESC', '미디어 파일이 담긴 디렉토리의 내용을 삭제하려고 합니다. 이 파일들은 본문에 사용 중일 수 있습니다.'); @define('FORCE_DELETE', '이 디렉토리에 있는 모든 파일 (세렌디피티가 모르는 종류 포함) 삭제'); @define('CREATE_DIRECTORY', '디렉토리 생성'); @define('CREATE_NEW_DIRECTORY', '새 디렉토리 생성'); @@ -664,24 +666,24 @@ @define('RECHECK_INSTALLATION', '설치 상태 재확인 필요'); @define('IMAGICK_EXEC_ERROR', '실행할 수 없음: "%s", 오류: %s, 리턴 변수: %d'); @define('INSTALL_OFFSET_DESC', '웹서버의 시간(현재: %clock%)과 사용자의 시간대와의 차이를 시간 단위로 입력함'); -@define('UNMET_REQUIREMENTS', '요구사항 불충족: %s'); +@define('UNMET_REQUIREMENTS', '요구사항 미달: %s'); @define('CHARSET', '문자열 종류'); @define('AUTOLANG', '방문자의 브라우저 언어 설정을 기본으로 따름'); @define('AUTOLANG_DESC', '사용할 경우 방문자의 브라우저 언어 설정을 확인하여 화면에 표시되는 언어 및 글의 언어를 결정합니다.'); @define('INSTALL_AUTODETECT_URL', '사용된 HTTP 호스트를 자동 감지'); @define('INSTALL_AUTODETECT_URL_DESC', '사용할 경우 방문자가 사용한 HTTP 호스트를 세렌디피티가 기본 인터넷 주소로 쓰게 됩니다. 이렇게 되면 세렌디피티 블로그를 여러 개의 도메인 이름 하에 사용할 수 있게 되며, 해당 도메인을 방문자가 블로그를 방문하는데 사용한 추가 링크에 사용할 수 있게 됩니다.'); -@define('CONVERT_HTMLENTITIES', 'HTML 본체 자동 변환을 시도하겠습니까?'); +@define('CONVERT_HTMLENTITIES', 'HTML 엔티티로 표현된 문자의 자동 변환을 시도하겠습니까?'); @define('EMPTY_SETTING', '"%s"에 대한 유효한 값을 지정하지 않았습니다.'); @define('USERCONF_REALNAME', '실제 이름'); -@define('USERCONF_REALNAME_DESC', '작성자의 실제 이름으로써, 독자가 보게 되는 이름입니다.'); +@define('USERCONF_REALNAME_DESC', '작성자의 실제 이름으로서, 독자가 보게 되는 이름입니다.'); @define('HOTLINK_DONE', '파일이 핫링크 되었습니다.<br />완료.'); @define('ENTER_MEDIA_URL_METHOD', '불러오기 방식:'); -@define('ADD_MEDIA_BLAHBLAH_NOTE', '주의: 서버에서 핫링크를 하게 될 경우, 해당 사이트에서 핫링크 허락을 받아놓거나 자신의 사이트인 경우에 대해 하기 바랍니다. 핫링크를 하게 되면 외부 그림을 따로 저장하지 않고 쓸 수 있게 됩니다.'); +@define('ADD_MEDIA_BLAHBLAH_NOTE', '주의: 서버에서 핫링크 하기는 해당 사이트에서 핫링크 허락을 미리 받아놓거나 자신의 사이트인 경우에 대해 하기 바랍니다. 핫링크를 하게 되면 외부 그림을 따로 저장하지 않고 쓸 수 있게 됩니다.'); @define('MEDIA_HOTLINKED', '핫링크 됨'); @define('FETCH_METHOD_IMAGE', '이쪽 서버로 그림을 다운로드하기'); @define('FETCH_METHOD_HOTLINK', '서버로 핫링크 걸기'); @define('DELETE_HOTLINK_FILE', '<b>%s</b>(이)라는 핫링크 파일 삭제됨'); -@define('SYNDICATION_PLUGIN_SHOW_MAIL', '이메일 주소 표시?'); +@define('SYNDICATION_PLUGIN_SHOW_MAIL', '이메일 주소를 표시합니까?'); @define('IMAGE_MORE_INPUT', '그림 추가'); @define('BACKEND_TITLE', '플러그인 설정 화면에 추가 정보 표시'); @define('BACKEND_TITLE_FOR_NUGGET', '플러그인 설정 화면에 HTML 덩어리 플러그인의 설명과 함께 표시될 별도의 문장을 직접 정할 수 있습니다. 제목이 없는 여러 개의 HTML 덩어리를 쓸 경우 각각을 구별하기 쉽게 됩니다.'); @@ -724,18 +726,18 @@ @define('SYNDICATION_PLUGIN_FEEDBURNERID', '피드버너 아이디'); @define('SYNDICATION_PLUGIN_FEEDBURNERID_DESC', '게시하고자 하는 피드의 아이디'); @define('SYNDICATION_PLUGIN_FEEDBURNERIMG', '피드버너 그림'); -@define('SYNDICATION_PLUGIN_FEEDBURNERIMG_DESC', '표시할 그림(feedburner.com에 존재함)의 이름 (fbapix.gif 형태이며, 비워두면 카운터 표시)'); +@define('SYNDICATION_PLUGIN_FEEDBURNERIMG_DESC', '표시할 그림(feedburner.com에 있음)의 이름 (fbapix.gif 형태이며, 비워두면 카운터 표시)'); @define('SYNDICATION_PLUGIN_FEEDBURNERTITLE', '피드버너 제목'); @define('SYNDICATION_PLUGIN_FEEDBURNERTITLE_DESC', '그림 옆에 표시할 제목 (있을 경우)'); @define('SYNDICATION_PLUGIN_FEEDBURNERALT', '피드버너 그림 설명'); @define('SYNDICATION_PLUGIN_FEEDBURNERALT_DESC', '그림 위에 커서를 댈 때 표시할 설명 (있을 경우)'); @define('INSTALL_DBPORT', '데이터베이스 포트'); @define('INSTALL_DBPORT_DESC', '데이터베이스 서버에 접속할 때 사용하는 포트 번호'); -@define('PLUGIN_GROUP_FRONTEND_EXTERNAL_SERVICES', '일반 페이지: 외부 서비스'); -@define('PLUGIN_GROUP_FRONTEND_FEATURES', '일반 페이지: 부가 기능'); -@define('PLUGIN_GROUP_FRONTEND_FULL_MODS', '일반 페이지: 개조 사항'); -@define('PLUGIN_GROUP_FRONTEND_VIEWS', '일반 페이지: 표시 상태'); -@define('PLUGIN_GROUP_FRONTEND_ENTRY_RELATED', '일반 페이지: 글 관련'); +@define('PLUGIN_GROUP_FRONTEND_EXTERNAL_SERVICES', '외부 페이지: 외부 서비스'); +@define('PLUGIN_GROUP_FRONTEND_FEATURES', '외부 페이지: 부가 기능'); +@define('PLUGIN_GROUP_FRONTEND_FULL_MODS', '외부 페이지: 개조 사항'); +@define('PLUGIN_GROUP_FRONTEND_VIEWS', '외부 페이지: 표시 상태'); +@define('PLUGIN_GROUP_FRONTEND_ENTRY_RELATED', '외부 페이지: 글 관련'); @define('PLUGIN_GROUP_BACKEND_EDITOR', '관리 페이지: 편집기'); @define('PLUGIN_GROUP_BACKEND_USERMANAGEMENT', '관리 페이지: 사용자 관리'); @define('PLUGIN_GROUP_BACKEND_METAINFORMATION', '관리 페이지: 메타 정보'); @@ -780,7 +782,7 @@ @define('CATEGORIES_PARENT_BASE', '하위 범주만 보이기'); @define('CATEGORIES_PARENT_BASE_DESC', '하나의 상위 범주를 골라서 그 아래에 있는 범주만 보이도록 할 수 있습니다.'); @define('CATEGORIES_HIDE_PARALLEL', '범주 트리에 속하지 않는 범주 숨기기'); -@define('CATEGORIES_HIDE_PARALLEL_DESC', '다른 범주 트리에 속해 있는 범주를 보이지 않게 하려면 이것을 사용하십시오. "범주의 속성/템플릿" 플러그인을 적용한 멀티-블로그와 함께 사용할 때 가장 의미가 있습니다.'); +@define('CATEGORIES_HIDE_PARALLEL_DESC', '다른 범주 트리에 속해 있는 범주를 보이지 않게 하려면 이것을 사용하십시오. "범주의 속성/템플릿" 플러그인을 적용한 멀티블로그와 함께 사용할 때 가장 의미가 있습니다.'); @define('PERMISSION_ADMINIMAGESVIEWOTHERS', 'adminImagesViewOthers: 다른 사용자의 미디어 파일 보기'); @define('CHARSET_NATIVE', '지역 전용'); @@ -794,323 +796,330 @@ @define('PERM_DENIED', '권한이 없습니다.'); @define('INSTALL_ACL', '범주에 대한 읽기 권한 적용'); -@define('INSTALL_ACL_DESC', '사용할 경우, 로그인한 사용자가 당신의 블로그를 읽을 때 각 범주에 대해 지정한 사용자 권한 설정이 적용됩니다. 사용하지 않을 경우 범주에 대한 읽기 권한이 적용되지 않게 되지만 블로그 속도가 약간 빨라지는 장점이 있습니다. 그러므로 블로그에 대한 다중 사용자 읽기 권한이 필요 없다면 이 설정을 끄십시오.'); +@define('INSTALL_ACL_DESC', '사용할 경우 로그인한 사용자가 당신의 블로그를 읽을 때 각 범주에 대해 지정한 사용자 권한 설정이 적용됩니다. 사용하지 않을 경우 범주에 대한 읽기 권한이 적용되지 않게 되지만 블로그 속도가 약간 빨라지는 장점이 있습니다. 그러므로 블로그에 대한 다중 사용자 읽기 권한이 필요 없다면 이 설정을 끄십시오.'); @define('PLUGIN_API_VALIDATE_ERROR', '옵션 "%s"에 대한 설정 구문이 잘못되었습니다. "%s" 종류에 해당하는 내용이 필요합니다.'); @define('USERCONF_CHECK_PASSWORD', '이전 암호'); @define('USERCONF_CHECK_PASSWORD_DESC', '위의 적힌 암호를 변경하려면 여기에 현재 사용중인 암호를 적으십시오.'); @define('USERCONF_CHECK_PASSWORD_ERROR', '이전 암호가 올바르지 않으므로 새 암호로 변경할 권한이 없습니다. 설정이 저장되지 않았습니다.'); -@define('ERROR_XSRF', '브라우저가 유효한 HTTP 진입자(referrer) 문자열을 보내지 않았습니다. 브라우저/프록시 설정이 잘못되었거나 당신을 겨냥한 상호 사이트 요청 위조(XSRF) 때문이었을 수 있습니다. 요청한 사항을 처리할 수 없었습니다.'); +@define('ERROR_XSRF', '브라우저가 유효한 HTTP 진입 경로(referrer) 문자열을 보내지 않았습니다. 브라우저/프록시 설정이 잘못되었거나 당신을 겨냥한 상호 사이트 요청 위조(XSRF) 때문이었을 수 있습니다. 요청한 사항을 처리할 수 없었습니다.'); @define('INSTALL_PERMALINK_FEEDAUTHOR_DESC', '특정 사용자의 RSS 피드를 보기 위한 상대적인 인터넷 주소 구조를 %id%, %realname%, %username%, %email% 등의 변수와 일반 글자를 활용해서 정의할 수 있습니다. 전체 주소는 사이트의 기본 주소를 기초로 해서 시작합니다.'); @define('INSTALL_PERMALINK_FEEDAUTHOR', '작성자에 따른 RSS 피드 고정 링크 주소 구조'); -@define('INSTALL_PERMALINK_AUTHORSPATH', '작성자로의 경로'); +@define('INSTALL_PERMALINK_AUTHORSPATH', '작성자로 가는 경로'); @define('AUTHORS', '작성자'); @define('AUTHORS_ALLOW_SELECT', '방문자가 한 번에 여러 작성자의 글을 볼 수 있게 합니까?'); -@define('AUTHORS_ALLOW_SELECT_DESC', '사용할 경우, 이 플러그인에 의해 표시되는 각 작성자 이름 옆에 체크박스가 표시됩니다. 선택 여부에 따라 원하는 조건의 글을 볼 수 있게 됩니다.'); +@define('AUTHORS_ALLOW_SELECT_DESC', '사용할 경우 이 플러그인에 의해 표시되는 각 작성자 이름 옆에 체크박스가 표시됩니다. 선택 여부에 따라 원하는 조건의 글을 볼 수 있게 됩니다.'); @define('AUTHOR_PLUGIN_DESC', '작성자의 목록 보이기'); @define('CATEGORY_PLUGIN_TEMPLATE', '스마티 템플릿 사용'); @define('CATEGORY_PLUGIN_TEMPLATE_DESC', '사용할 경우, 이 플러그인은 스마티 템플릿 기능을 활용하여 범주 목록을 출력하게 됩니다. 구성은 "plugin_categories.tpl" 템플릿 파일을 편집하여 고칠 수 있습니다. 성능 저하를 가져오게 되므로 특화시키지 않을 경우 꺼두십시오.'); -@define('CATEGORY_PLUGIN_SHOWCOUNT', '범주 당 글의 수 보이기'); +@define('CATEGORY_PLUGIN_SHOWCOUNT', '범주 별 글의 수 보이기'); @define('AUTHORS_SHOW_ARTICLE_COUNT', '작성자 이름 옆에 글의 수 보이기'); @define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', '사용할 경우, 각 작성자의 이름 옆 괄호 속에 해당 작성자가 쓴 글의 수를 표시합니다.'); -@define('CUSTOM_ADMIN_INTERFACE', 'Custom admin interface available'); +@define('CUSTOM_ADMIN_INTERFACE', '사용자화된 관리 화면 인터페이스를 사용할 수 있음'); -@define('COMMENT_NOT_ADDED', '덧글 금지가 되어 있어 덧글을 추가하지 못했습니다. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.' -@define('INSTALL_TRACKREF', 'Enable referrer tracking?'); -@define('INSTALL_TRACKREF_DESC', 'Enabling the referrer tracking will show you which sites refer to your articles. Today this is often abused for spamming, so you can disable it if you want.'); -@define('CATEGORIES_HIDE_PARENT', 'Hide the selected parent category?'); -@define('CATEGORIES_HIDE_PARENT_DESC', 'If you restrict the listing of categories to a specific category, by default you will see that parent category within the output listing. If you disable this option, the parent category name will not be displayed.'); -@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.'); -@define('INSTALL_RSSFETCHLIMIT', 'Entries to display in Feeds'); -@define('INSTALL_RSSFETCHLIMIT_DESC', 'Number of entries to display for each page on the RSS Feed.'); -@define('INSTAL_DB_UTF8', 'Enable DB-charset conversion'); -@define('INSTAL_DB_UTF8_DESC', 'Issues a MySQL "SET NAMES" query to indicate the required charset for the database. Turn this on or off, if you see weird characters in your blog.'); -@define('ONTHEFLYSYNCH', 'Enable on-the-fly media synchronization'); -@define('ONTHEFLYSYNCH_DESC', 'If enabled, Serendipity will compare the media database with the files stored on your server and synchronize the database and directory contents.'); -@define('USERCONF_CHECK_USERNAME_ERROR', 'The username cannot be left blank.'); -@define('FURTHER_LINKS', 'Further Links'); -@define('FURTHER_LINKS_S9Y', 'Serendipity Homepage'); -@define('FURTHER_LINKS_S9Y_DOCS', 'Serendipity Documentation'); -@define('FURTHER_LINKS_S9Y_BLOG', 'Official Blog'); -@define('FURTHER_LINKS_S9Y_FORUMS', 'Forums'); -@define('FURTHER_LINKS_S9Y_SPARTACUS', 'Spartacus'); -@define('COMMENT_IS_DELETED', '(Comment removed)'); +@define('COMMENT_NOT_ADDED', '이 글에 덧글 금지가 되어 있거나, 유효하지 않은 데이터를 입력했거나, 스팸방지 기능에 의해 차단되어 덧글을 추가하지 못했습니다. '); +@define('INSTALL_TRACKREF', '진입 경로 추적을 사용하기'); +@define('INSTALL_TRACKREF_DESC', '진입 경로 추적을 사용하면 어떤 사이트가 당신의 글을 참조하고 있는지 볼 수 있습니다. 오늘날 이 기능은 스팸에 악용되는 경우가 많으므로 원할 경우 끌 수 있습니다.'); +@define('CATEGORIES_HIDE_PARENT', '선택한 상위 범주를 숨기기'); +@define('CATEGORIES_HIDE_PARENT_DESC', '범주 목록 나열을 특정 범주로 국한시킬 경우 기본적으로 상위 범주가 목록에 나타납니다. 이 기능을 끄면 상위 범주 이름이 나타나지 않습니다.'); +@define('WARNING_NO_GROUPS_SELECTED', '경고: 아무런 그룹 소속도 선택하지 않았습니다. 이 경우 사용자 그룹 관리에서 강제 퇴장하는 것과 같으므로 그룹 소속을 변경하지 않았습니다.'); +@define('INSTALL_RSSFETCHLIMIT', '피드에 보여줄 글 수'); +@define('INSTALL_RSSFETCHLIMIT_DESC', '각 RSS 피드 페이지에 보여줄 글의 수입니다.'); +@define('INSTAL_DB_UTF8', '데이터베이스-문자열 변환 사용하기'); +@define('INSTAL_DB_UTF8_DESC', '데이터베이스에 필요한 문자열 종류를 지정하기 위해 MySQL "SET NAMES" 질의를 실행합니다. 블로그에 이상한 글자가 보일 경우 이를 켜거나 꺼보십시오.'); +@define('ONTHEFLYSYNCH', '즉각적인 미디어 동기화 사용하기'); +@define('ONTHEFLYSYNCH_DESC', '사용할 경우 세렌디피티가 미디어 데이터베이스와 서버 저장 파일들을 비교하여 데이터베이스 및 디렉토리 내용을 동기화합니다.'); +@define('USERCONF_CHECK_USERNAME_ERROR', '사용자 이름은 비워둘 수 없습니다.'); +@define('FURTHER_LINKS', '추가 링크'); +@define('FURTHER_LINKS_S9Y', '세렌디피티 홈페이지'); +@define('FURTHER_LINKS_S9Y_DOCS', '세렌디피티 사용설명서'); +@define('FURTHER_LINKS_S9Y_BLOG', '공식 블로그'); +@define('FURTHER_LINKS_S9Y_FORUMS', '게시판'); +@define('FURTHER_LINKS_S9Y_SPARTACUS', '스파르타쿠스'); +@define('COMMENT_IS_DELETED', '(덧글 삭제됨)'); -@define('CURRENT_AUTHOR', 'Current author'); +@define('CURRENT_AUTHOR', '현재 작성자'); -@define('WORD_NEW', 'New'); -@define('SHOW_MEDIA_TOOLBAR', 'Show toolbar within media selector popup?'); -@define('MEDIA_KEYWORDS', 'Media keywords'); -@define('MEDIA_KEYWORDS_DESC', 'Enter a list of ";" separated words that you want to use as pre-defined keywords for media items.'); -@define('MEDIA_EXIF', 'Import EXIF/JPEG image data'); -@define('MEDIA_EXIF_DESC', 'If enabled, existing EXIF/JPEG metadata of images will be parsed and stored in the database for display in the media gallery.'); -@define('MEDIA_PROP', 'Media properties'); +@define('WORD_NEW', '신규'); +@define('SHOW_MEDIA_TOOLBAR', '미디어 선택 팝업 안에 툴바 보여주기'); +@define('MEDIA_KEYWORDS', '미디어 키워드'); +@define('MEDIA_KEYWORDS_DESC', '미디어 아이템의 키워드로 사용하기 위해 미리 정의해둘 단어들을 ";"로 하나씩 분리하여 입력합니다'); +@define('MEDIA_EXIF', 'EXIF/JPEG 그림 데이터를 불러오기'); +@define('MEDIA_EXIF_DESC', '사용할 경우 그림에 포함되어 있는 EXIF/JPEG 메타데이터를 불러들여 데이터베이스에 저장하게 되며 차후 미디어 갤러리에서 볼 수 있게 됩니다.'); +@define('MEDIA_PROP', '미디어 등록정보'); -@define('GO_ADD_PROPERTIES', 'Go & enter properties'); -@define('MEDIA_PROPERTY_DPI', 'DPI'); -@define('MEDIA_PROPERTY_COPYRIGHT', 'Copyright'); -@define('MEDIA_PROPERTY_COMMENT1', 'Short Comment'); -@define('MEDIA_PROPERTY_COMMENT2', 'Long Comment'); -@define('MEDIA_PROPERTY_TITLE', 'Title'); -@define('MEDIA_PROP_DESC', 'Enter a list of ";" separated property fields you want to define for each media file'); -@define('MEDIA_PROP_MULTIDESC', '(You can append ":MULTI" after any item to indicate that this item will contain long text instead of just some characters)'); +@define('GO_ADD_PROPERTIES', '등록정보 입력하러 가기'); +@define('MEDIA_PROPERTY_DPI', '밀도(DPI)'); +@define('MEDIA_PROPERTY_COPYRIGHT', '저작권'); +@define('MEDIA_PROPERTY_COMMENT1', '짧은 설명'); +@define('MEDIA_PROPERTY_COMMENT2', '긴 설명'); +@define('MEDIA_PROPERTY_TITLE', '제목'); +@define('MEDIA_PROP_DESC', '각 미디어 파일에 정의하고자 하는 등록정보 필드를 ";"로 하나씩 분리하여 입력합니다'); +@define('MEDIA_PROP_MULTIDESC', '(특정 아이템이 글자 몇 자가 아니라 긴 글이 포함되어 있다는 것을 표시하고자 할 경우 해당 아이템 뒤에 ":MULTI"를 붙일 수 있습니다)'); -@define('STYLE_OPTIONS_NONE', 'This theme/style has no specific options. To see how your template can specify options, read the Technical Documentation on www.s9y.org about "Configuration of Theme options".'); -@define('STYLE_OPTIONS', 'Theme/Style options'); +@define('STYLE_OPTIONS_NONE', '이 템플릿이나 스타일은 별도의 선택사항이 없습니다. 템플릿에 선택사항을 추가할 수 있는 방법은 www.s9y.org에 있는 기술문서(Technical Documentation) 중 "Configuration of Theme options" 항목을 참고하기 바랍니다.'); +@define('STYLE_OPTIONS', '템플릿/스타일 선택사항'); -@define('PLUGIN_AVAILABLE_COUNT', 'Total: %d plugins.'); +@define('PLUGIN_AVAILABLE_COUNT', '총 플러그인 수: %d개.'); -@define('SYNDICATION_RFC2616', 'Activate strict RFC2616 RSS-Feed compliance'); -@define('SYNDICATION_RFC2616_DESC', 'NOT Enforcing RFC2616 means that all Conditional GETs to Serendipity will return entries last modified since the time of the last request. With that setting to "false", your visitors will get all articles since their last request, which is considered a good thing. However, some Agents like Planet act weird, if that happens, at it also violates RFC2616. So if you set this option to "TRUE" you will comply with that RFC, but readers of your RSS feed might miss items in their holidays. So either way, either it hearts Aggregators like Planet, or it hurts actual readers of your blog. If you are facing complaints from either side, you can toggle this option. Reference: <a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1461728&group_id=75065&atid=542822" target="_blank" rel="nofollow">SourceForge</a>'); -@define('MEDIA_PROPERTY_DATE', 'Associated Date'); -@define('MEDIA_PROPERTY_RUN_LENGTH', 'Run-Length'); -@define('FILENAME_REASSIGNED', 'Automagically assigned new file name: %s'); -@define('MEDIA_UPLOAD_SIZE', 'Max. file upload size'); -@define('MEDIA_UPLOAD_SIZE_DESC', 'Enter the maximum filesize for uploaded files in bytes. This setting can be overruled by server-side settings in PHP.ini: upload_max_filesize, post_max_size, max_input_time all take precedence over this option. An empty string means to only use the server-side limits.'); -@define('MEDIA_UPLOAD_SIZEERROR', 'Error: You cannot upload files larger than %s bytes!'); -@define('MEDIA_UPLOAD_MAXWIDTH', 'Max. width of image files for upload'); -@define('MEDIA_UPLOAD_MAXWIDTH_DESC', 'Enter the maximum image width in pixels for uploaded images.'); -@define('MEDIA_UPLOAD_MAXHEIGHT', 'Max. height of image files for upload'); -@define('MEDIA_UPLOAD_MAXHEIGHT_DESC', 'Enter the maximum image height in pixels for uploaded images.'); -@define('MEDIA_UPLOAD_DIMERROR', 'Error: You cannot upload image files larger than %s x %s pixels!'); +@define('SYNDICATION_RFC2616', '엄격한 RFC2616 RSS 피드 준수 사용하기'); +@define('SYNDICATION_RFC2616_DESC', 'RFC2616을 강제하지 않을 경우 조건부 GET 요청을 세렌디피티가 받으면 마지막 요청 이후에 수정된 글을 보내게 됩니다. 그러므로 이 설정을 끄면 방문자들은 마지막 요청 이후 작성된 모든 글을 받게 되어 대부분 좋게 받아들입니다. 하지만 Planet과 같은 일부 에이전트의 경우 이렇게 되면 RFC2616을 위반하기 때문에 이상하게 작동합니다. 이 설정을 켜면 RFC 준수를 하게 되지만 RSS 피드 구독자들이 휴가를 간 동안 놓치는 글이 생길 수 있습니다. 결국 Planet과 같은 곳이나 블로그를 직접 구독하는 사람들 중 한 쪽은 문제가 발생할 것입니다. 어느 한 쪽에서 불만이 있을 경우 이 설정을 변경해 보기 바랍니다. 참조할 내용: <a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1461728&group_id=75065&atid=542822" target="_blank" rel="nofollow">소스포지</a>'); +@define('MEDIA_PROPERTY_DATE', '관계된(작성된) 날짜'); +@define('MEDIA_PROPERTY_RUN_LENGTH', '실행 길이'); +@define('FILENAME_REASSIGNED', '자동으로 새로운 파일 이름을 붙였습니다: %s'); +@define('MEDIA_UPLOAD_SIZE', '올리는 파일의 최대 크기'); +@define('MEDIA_UPLOAD_SIZE_DESC', '올리는 파일의 최대 크기를 바이트 단위로 입력합니다. 이 설정보다 서버 측에 있는 php.ini 내부 설정이 우선됩니다: upload_max_filesize, post_max_size, max_input_time 등이 모두 이 설정보다 우선 적용됩니다. 비워둘 경우 서버 측 설정만 따르게 됩니다.'); +@define('MEDIA_UPLOAD_SIZEERROR', '오류: %s바이트보다 큰 파일을 올릴 수 없습니다!'); +@define('MEDIA_UPLOAD_MAXWIDTH', '올릴 그림 파일의 최대 폭'); +@define('MEDIA_UPLOAD_MAXWIDTH_DESC', '올릴 그림 파일의 최대 폭을 픽셀 단위로 입력합니다.'); +@define('MEDIA_UPLOAD_MAXHEIGHT', '올릴 그림 파일의 최대 높이'); +@define('MEDIA_UPLOAD_MAXHEIGHT_DESC', '올릴 그림 파일의 최대 높이를 픽셀 단위로 입력합니다.'); +@define('MEDIA_UPLOAD_DIMERROR', '오류: %s x %s 픽셀보다 큰 그림 파일을 올릴 수 없습니다!'); -@define('MEDIA_TARGET', 'Target for this link'); -@define('MEDIA_TARGET_JS', 'Popup window (via JavaScript, adaptive size)'); -@define('MEDIA_ENTRY', 'Isolated Entry'); -@define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)'); +@define('MEDIA_TARGET', '이 링크의 표시 대상'); +@define('MEDIA_TARGET_JS', '팝업 창 (자바스크립트 사용, 가변 크기)'); +@define('MEDIA_ENTRY', '독립된 글'); +@define('MEDIA_TARGET_BLANK', '팝업 창 (target=_blank 사용)'); -@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?'); -@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.'); +@define('MEDIA_DYN_RESIZE', '동적 그림 크기 변환을 사용하기'); +@define('MEDIA_DYN_RESIZE_DESC', '사용할 경우 미디어 선택 화면이 GET 변수를 통해 요청한 크기에 맞도록 그림을 불러올 수 있습니다. 생성된 파일은 캐시에 저장되므로 자주 사용할 경우 용량을 많이 차지할 수 있습니다.'); -@define('MEDIA_DIRECTORY_MOVED', 'Directory and files were successfully moved to %s'); -@define('MEDIA_DIRECTORY_MOVE_ERROR', 'Directory and files could not be moved to %s!'); -@define('MEDIA_DIRECTORY_MOVE_ENTRY', 'On Non-MySQL databases, iterating through every article to replace the old directory URLs with new directory URLs is not possible. You will need to manually edit your entries to fix new URLs. You can still move your old directory back to where it was, if that is too cumbersome for you.'); -@define('MEDIA_DIRECTORY_MOVE_ENTRIES', 'Moved the URL of the moved directory in %s entries.'); -@define('PLUGIN_ACTIVE', 'Active'); -@define('PLUGIN_INACTIVE', 'Inactive'); -@define('PREFERENCE_USE_JS', 'Enable advanced JS usage?'); -@define('PREFERENCE_USE_JS_DESC', 'If enabled, advanced JavaScript sections will be enabled for better usability, like in the Plugin Configuration section you can use drag and drop for re-ordering plugins.'); +@define('MEDIA_DIRECTORY_MOVED', '디렉토리와 파일이 %s(으)로 이동하는데 성공했습니다'); +@define('MEDIA_DIRECTORY_MOVE_ERROR', '디렉토리와 파일을 %s(으)로 이동할 수 없었습니다!'); +@define('MEDIA_DIRECTORY_MOVE_ENTRY', 'MySQL이 아닌 데이터베이스에서는 이전 디렉토리 주소를 새 디렉토리 주소로 바꾸기 위해 모든 글을 하나씩 살펴가는 작업을 할 수 없습니다. 수작업으로 각 글에 대해 주소 교체 작업을 해야 합니다. 이것이 너무 번거로울 경우 디렉토리를 원래 위치로 다시 되돌릴 수 있습니다.'); +@define('MEDIA_DIRECTORY_MOVE_ENTRIES', '%s개의 글에서 이동한 디렉토리로 주소를 변경했습니다.'); +@define('PLUGIN_ACTIVE', '사용 중'); +@define('PLUGIN_INACTIVE', '미사용'); +@define('PREFERENCE_USE_JS', '고급 자바스크립트 기능 사용'); +@define('PREFERENCE_USE_JS_DESC', '사용할 경우 고급 자바스크립트 기능 부분을 활용하게 되어 사용성이 향상됩니다. 대표적으로 플러그인 설정에서 플러그인을 끌어서 이동하여 순서를 바꿀 수 있게 됩니다.'); -@define('PREFERENCE_USE_JS_WARNING', '(This page uses advanced JavaScripting. If you are having functionality issues, please disable the use of advanced JS usage in your personal preferences or disable your browser\'s JavaScript)'); +@define('PREFERENCE_USE_JS_WARNING', '(이 페이지는 고급 자바스크립트 기능을 사용합니다. 기능 사용에 문제가 있을 경우 개인 설정에서 고급 자바스크립트 기능을 끄거나 브라우저의 자바스크립트 기능을 끄도록 합니다)'); -@define('INSTALL_PERMALINK_COMMENTSPATH', 'Path to comments'); -@define('PERM_SET_CHILD', 'Set the same permissions on all child directories'); -@define('PERMISSION_FORBIDDEN_PLUGINS', 'Forbidden plugins'); -@define('PERMISSION_FORBIDDEN_HOOKS', 'Forbidden events'); -@define('PERMISSION_FORBIDDEN_ENABLE', 'Enable Plugin ACL for usergroups?'); -@define('PERMISSION_FORBIDDEN_ENABLE_DESC', 'If the option "Plugin ACL for usergroups" is enabled in the configuration, you can specify which usergroups are allowed to execute certain plugins/events.'); -@define('DELETE_SELECTED_ENTRIES', 'Delete selected entries'); -@define('PLUGIN_AUTHORS_MINCOUNT', 'Show only authors with at least X articles'); -@define('FURTHER_LINKS_S9Y_BOOKMARKLET', 'Bookmarklet'); -@define('FURTHER_LINKS_S9Y_BOOKMARKLET_DESC', 'Bookmark this link and then use it on any page you want to blog about to quickly access your Serendipity Blog.'); -@define('IMPORT_WP_PAGES', 'Also fetch attachments and staticpages as normal blog entries?'); -@define('USERCONF_CREATE', 'Disable user / forbid activity?'); -@define('USERCONF_CREATE_DESC', 'If selected, the user will not have any editing or creation possibilities on the blog anymore. When logging in to the backend, he cannot do anything else apart from logging out and viewing his personal configuration.'); -@define('CATEGORY_HIDE_SUB', 'Hide postings made to sub-categories?'); -@define('CATEGORY_HIDE_SUB_DESC', 'By default, when you browse a category also entries of any subcategory are displayed. If this option is turned on, only postings of the currently selected category are displayed.'); -@define('PINGBACK_SENDING', 'Sending pingback to URI %s...'); -@define('PINGBACK_SENT', 'Pingback successful'); -@define('PINGBACK_FAILED', 'Pingback failed: %s'); -@define('PINGBACK_NOT_FOUND', 'No pingback-URI found.'); -@define('CATEGORY_PLUGIN_HIDEZEROCOUNT', 'Hide archives link when no entries were made in that timespan (requires counting entries)'); -@define('RSS_IMPORT_WPXRSS', 'WordPress eXtended RSS import, requires PHP5 and might take up much memory'); -@define('SET_TO_MODERATED', 'Moderate'); -@define('COMMENT_MODERATED', 'Comment #%s has successfully been set as moderated'); -@define('CENTER', 'center'); -@define('FULL_COMMENT_TEXT', 'Yes, with full comment text'); +@define('INSTALL_PERMALINK_COMMENTSPATH', '덧글로 가는 경로'); +@define('PERM_SET_CHILD', '하위 디렉토리에 모두 동일한 권한 설정을 합니다'); +@define('PERMISSION_FORBIDDEN_PLUGINS', '사용 금지된 플러그인'); +@define('PERMISSION_FORBIDDEN_HOOKS', '사용 금지된 이벤트'); +@define('PERMISSION_FORBIDDEN_ENABLE', '사용자 그룹에 대한 플러그인 사용 권한 설정을 사용하기'); +@define('PERMISSION_FORBIDDEN_ENABLE_DESC', '"사용자 그룹에 대한 플러그인 사용 권한 설정"을 사용할 경우 어떤 사용자 그룹이 어떤 플러그인이나 이벤트를 사용할 수 있을지 지정할 수 있게 됩니다.'); +@define('DELETE_SELECTED_ENTRIES', '선택한 글 삭제하기'); +@define('PLUGIN_AUTHORS_MINCOUNT', '최소 X개의 글을 쓴 작성자만 보여주기'); +@define('FURTHER_LINKS_S9Y_BOOKMARKLET', '즐겨찾기'); +@define('FURTHER_LINKS_S9Y_BOOKMARKLET_DESC', '이 링크를 즐겨찾기에 추가한 다음, 적고자 하는 페이지에 사용하면 이 세렌디피티 블로그를 빠르게 찾아올 수 있습니다.'); +@define('IMPORT_WP_PAGES', '첨부 파일과 고정 페이지도 일반 블로그 글처럼 불러옵니까?'); +@define('USERCONF_CREATE', '사용자를 비활성화하거나 활동을 금지하기'); +@define('USERCONF_CREATE_DESC', '사용할 경우 해당 사용자가 블로그에서 더 이상 글을 편집하거나 새로 쓸 수 없게 됩니다. 관리자 화면에 들어오더라도 개인 설정을 확인하거나 다시 빠져나가는 것 밖에 할 수 없습니다.'); +@define('CATEGORY_HIDE_SUB', '하위 범주에서 작성한 글 숨기기'); +@define('CATEGORY_HIDE_SUB_DESC', '기본적으로는 특정 범주의 글을 열람할 때 하위 범주에 속한 글도 같이 나타납니다. 이 설정을 사용할 경우 현재 선택된 범주의 글만 나타납니다.'); +@define('PINGBACK_SENDING', '핑백을 URI %s(으)로 보내는 중...'); +@define('PINGBACK_SENT', '핑백 성공'); +@define('PINGBACK_FAILED', '핑백 실패: %s'); +@define('PINGBACK_NOT_FOUND', '핑백 URI를 찾을 수 없었음.'); +@define('CATEGORY_PLUGIN_HIDEZEROCOUNT', '아무런 글이 작성되지 않은 시간대의 글 목록 링크를 숨김 (글 수를 집계하는 기능을 사용해야 함)'); +@define('RSS_IMPORT_WPXRSS', '워드프레스의 확장 RSS (WordPress eXtended RSS) 불러오기 - PHP5가 필요하며 메모리를 많이 차지할 수 있음'); +@define('SET_TO_MODERATED', '중재하기'); +@define('COMMENT_MODERATED', '%s번 덧글을 성공적으로 중재하기로 설정함'); +@define('CENTER', '중앙'); +@define('FULL_COMMENT_TEXT', '네, 전체 덧글을 포함합니다'); -@define('COMMENT_TOKENS', 'Use Tokens for Comment Moderation?'); -@define('COMMENT_TOKENS_DESC', 'If tokens are used, comments can be approved and deleted by clicking the email links without requiring login access to the blog. Note that this is a convenience feature, and if your mails get hijacked, those people can approve/delete the referenced comment without further authentication.'); -@define('COMMENT_NOTOKENMATCH', 'Moderation link has expired or comment #%s has already been approved or deleted'); -@define('TRACKBACK_NOTOKENMATCH', 'Moderation link has expired or trackback #%s has already been approved or deleted'); -@define('BADTOKEN', 'Invalid Moderation Link'); +@define('COMMENT_TOKENS', '덧글 중재에 토큰 사용'); +@define('COMMENT_TOKENS_DESC', '토큰을 사용할 경우 블로그에 로그인하지 않고도 전자우편 링크를 통해 덧글을 승인하거나 삭제할 수 있습니다. 편의 기능이라는 점에 유의하십시오. 만약 전자우편 계정을 다른 사람이 탈취할 경우 그 사람이 별도의 인증 없이 덧글을 승인하거나 삭제할 수 있게 됩니다.'); +@define('COMMENT_NOTOKENMATCH', '중재 링크의 유효기간이 지났거나 %s번 덧글이 이미 승인 또는 삭제되었습니다'); +@define('TRACKBACK_NOTOKENMATCH', '중재 링크의 유효기간이 지났거나 %s번 트랙백이 이미 승인 또는 삭제되었습니다'); +@define('BADTOKEN', '유효하지 않은 중재 링크'); -@define('CONFIRMATION_MAIL_ALWAYS', "Hello %s,\n\nYou have sent a new comment to \"%s\". Your comment was:\n\n%s\n\nThe owner of the blog has enabled mail verification, so you need to click on the following link to authenticate your comment:\n<%s>\n"); -@define('CONFIRMATION_MAIL_ONCE', "Hello %s,\n\nYou have sent a new comment to \"%s\". Your comment was:\n\n%s\n\nThe owner of the blog has enabled one-time mail verification, so you need to click on the following link to authenticate your comment:\n<%s>\n\nAfter you have done that, you can always post comments on that blog with your username and e-mail address without receiving such notifications."); -@define('INSTALL_SUBSCRIBE_OPTIN', 'Use Double-Opt In for comment subscriptions?'); -@define('INSTALL_SUBSCRIBE_OPTIN_DESC', 'If enabled, when a comment is made where the person wants to be notified via e-mail about new comments to the same entry, he must confirm his subscription to the entry. This Double-Opt In is required by german law, for example.'); -@define('CONFIRMATION_MAIL_SUBSCRIPTION', "Hello %s,\n\nYou have requested to be notified for comments to \"%s\" (<%s>). To approve this subscription (\"Double Opt In\") please click this link:\n<%s>\n."); -@define('NOTIFICATION_CONFIRM_SUBMAIL', 'Your confirmation of your comment subscription has been successfully entered.'); -@define('NOTIFICATION_CONFIRM_MAIL', 'Your confirmation of the comment has been successfully entered.'); -@define('NOTIFICATION_CONFIRM_SUBMAIL_FAIL', 'Your comment subscription could not be confirmed. Please check the link you clicked on for completion. If the link was sent more than 3 weeks ago, you must request a new confirmation mail.'); -@define('NOTIFICATION_CONFIRM_MAIL_FAIL', 'Your comment confirmation could not be confirmed. Please check the link you clicked on for completion. If the link was sent more than 3 weeks ago, you must send your comment again.'); -@define('PLUGIN_DOCUMENTATION', 'Documentation'); -@define('PLUGIN_DOCUMENTATION_LOCAL', 'Local Documentation'); -@define('PLUGIN_DOCUMENTATION_CHANGELOG', 'Version history'); -@define('SYNDICATION_PLUGIN_BIGIMG', 'Big Image'); -@define('SYNDICATION_PLUGIN_BIGIMG_DESC', 'Display a (big) image at the top of the feeds in sidebar, enter full or absolute URL to image file.'); -@define('SYNDICATION_PLUGIN_FEEDNAME', 'Displayed name for "feed"'); -@define('SYNDICATION_PLUGIN_FEEDNAME_DESC', 'Enter an optional custom name for the feeds (defaults to "feed" when empty)'); -@define('SYNDICATION_PLUGIN_COMMENTNAME', 'Displayed name for "comment" feed'); -@define('SYNDICATION_PLUGIN_COMMENTNAME_DESC', 'Enter an optional custom name for the comment feed'); -@define('SYNDICATION_PLUGIN_FEEDBURNERID_FORWARD', '(If you enter an absolute URL with http://... here, this URL will be used as the redirection target in case you have enabled the "Force" option for FeedBurner. Note that this can also be a URL independent to FeedBurner. For new Google FeedBurner feeds, you need to enter http://feeds2.feedburner.com/yourfeedname here)'); +@define('CONFIRMATION_MAIL_ALWAYS', "안녕하세요, %s님.\n\n새로운 덧글을 \"%s\"에 추가하셨습니다. 내용은 다음과 같습니다:\n\n%s\n\n블로그 주인이 전자우편을 통한 인증을 사용하고 있으므로 다음 링크를 눌러서 덧글을 인증하시기 바랍니다:\n<%s>\n"); +@define('CONFIRMATION_MAIL_ONCE', "안녕하세요 %s님.\n\n새로운 덧글을 \"%s\"에 추가하셨습니다. 내용은 다음과 같습니다:\n\n%s\n\n블로그 주인이 1회성 전자우편 인증을 사용하고 있으므로 다음 링크를 눌러서 덧글을 인증하시기 바랍니다:\n<%s>\n\n인증이 된 이후에는 동일한 사용자 이름과 전자우편 주소로 더 이상 인증을 안 거치고 덧글을 달 수 있게 됩니다."); +@define('INSTALL_SUBSCRIBE_OPTIN', '덧글 구독을 위해 2중 사용자 동의 사용'); +@define('INSTALL_SUBSCRIBE_OPTIN_DESC', '사용할 경우 방문자가 덧글을 남긴 후 해당 글에 새 덧글이 달릴 때 전자우편으로 알림을 받기 원하면 그 글에 대한 구독 여부도 동의해야 합니다. 이러한 2중 사용자 동의는 독일 등에서 법적으로 요구하고 있습니다.'); +@define('CONFIRMATION_MAIL_SUBSCRIPTION', "안녕하세요, %s님.\n\n\"%s\" (<%s>)에 대한 덧글이 달릴 경우 알려달라는 요청을 한 바 있습니다. 이 구독사항을 승인하고자 할 경우 (\"2중 사용자 동의\") 다음 링크를 누르기 바랍니다:\n<%s>\n."); +@define('NOTIFICATION_CONFIRM_SUBMAIL', '덧글 구독에 대한 승인절차를 성공적으로 진행했습니다.'); +@define('NOTIFICATION_CONFIRM_MAIL', '덧글에 대한 승인절차를 성공적으로 진행했습니다.'); +@define('NOTIFICATION_CONFIRM_SUBMAIL_FAIL', '덧글 구독 승인 여부를 확인할 수 없었습니다. 승인 완료를 위해 누른 링크의 상태를 확인하기 바랍니다. 만약 링크가 발송된지 3주가 넘었다면 새로운 승인 링크를 담은 전자우편을 요청해야 합니다.'); +@define('NOTIFICATION_CONFIRM_MAIL_FAIL', '덧글의 승인 여부를 확인할 수 없었습니다. 승인 완료를 위해 누른 링크의 상태를 확인하기 바랍니다. 만약 링크가 발송된지 3주가 넘었다면 덧글을 다시 남겨야 합니다.'); +@define('PLUGIN_DOCUMENTATION', '사용설명서(공식문서)'); +@define('PLUGIN_DOCUMENTATION_LOCAL', '내부에 저장된 사용설명서(공식문서)'); +@define('PLUGIN_DOCUMENTATION_CHANGELOG', '버전 이력'); +@define('SYNDICATION_PLUGIN_BIGIMG', '대형 그림'); +@define('SYNDICATION_PLUGIN_BIGIMG_DESC', '옆줄에 나타나는 피드 맨 위에 (대형) 그림을 표시합니다. 그림 파일에 대한 전체 또는 절대 경로를 입력합니다.'); +@define('SYNDICATION_PLUGIN_FEEDNAME', '피드에 표시할 이름'); +@define('SYNDICATION_PLUGIN_FEEDNAME_DESC', '피드에 대한 사용자 정의 이름을 입력할 수 있습니다 (선택 사항이며, 비워둘 경우 "feed"로 자동 표시됨)'); +@define('SYNDICATION_PLUGIN_COMMENTNAME', '덧글 피드에 표시할 이름'); +@define('SYNDICATION_PLUGIN_COMMENTNAME_DESC', '덧글 피드에 대한 사용자 정의 이름을 입력할 수 있습니다 (선택 사항)'); +@define('SYNDICATION_PLUGIN_FEEDBURNERID_FORWARD', '(만약 여기에 http://...로 시작하는 절대 경로를 입력했다면 피드버너 설정에서 "강제로"를 선택했을 때 이 주소를 리다이렉트 대상으로 사용하게 됩니다. 그리고 이 주소는 피드버너와 독립적일 수 있다는 점도 참고하십시오. 신규 구글 피드버너의 경우 http://feeds2.feedburner.com/yourfeedname 식으로 입력해야 합니다.)'); -@define('SYNDICATION_PLUGIN_FEEDBURNERID_FORWARD2', 'If you set this option to "Force" you can forward the RSS feed to any webservice, not only FeedBurner. Look at the option "Feedburner ID" below to enter an absolute URL)'); -@define('COMMENTS_FILTER_NEED_CONFIRM', 'Pending user confirmation'); -@define('NOT_WRITABLE_SPARTACUS', ' (Only required when you plan to use Spartacus plugin for remote plugin download)'); -@define('MEDIA_ALT', 'ALT-Attribute (depiction or short description)'); -@define('MEDIA_PROPERTY_ALT', 'Depiction (summary for ALT-Attribute)'); +@define('SYNDICATION_PLUGIN_FEEDBURNERID_FORWARD2', '이 설정을 "강제로"로 선택했을 경우 피드버너 뿐만 아니라 다른 웹 서비스로도 RSS 피드를 전달할 수 있습니다. 아래의 "피드버너 ID" 설정을 보고 절대 경로를 입력하십시오.'); +@define('COMMENTS_FILTER_NEED_CONFIRM', '사용자 승인 대기 중'); +@define('NOT_WRITABLE_SPARTACUS', ' (스파르타쿠스 플러그인을 통해 원격 플러그인을 내려받을 경우에만 필요함)'); +@define('MEDIA_ALT', 'ALT 속성 (묘사 또는 짧은 설명)'); +@define('MEDIA_PROPERTY_ALT', '묘사 (ALT 속성에 대한 요약)'); -@define('MEDIA_TITLE', 'TITLE-Attribute (will be displayed on mouse over)'); +@define('MEDIA_TITLE', 'TITLE 속성 (마우스 커서를 위에 대면 표시됨)'); -@define('QUICKSEARCH_SORT', 'How should search-results be sorted?'); +@define('QUICKSEARCH_SORT', '검색 결과를 어떻게 정렬하겠습니까?'); -@define('QUICKSEARCH_SORT_RELEVANCE', 'Relevance'); +@define('QUICKSEARCH_SORT_RELEVANCE', '정확도'); -@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author'); +@define('PERMISSION_HIDDENGROUP', '숨겨진 그룹 / 비작성자'); -@define('SEARCH_FULLENTRY', 'Show full entry'); -@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)'); -@define('NAV_LINK_TEXT', 'Enter the navbar link text'); -@define('NAV_LINK_URL', 'Enter the full URL of your link'); -@define('MODERATE_SELECTED_COMMENTS', 'Accept selected comments'); -@define('WEBLOG', 'Weblog'); -@define('ACTIVE_COMMENT_SUBSCRIPTION', 'Subscribed'); -@define('PENDING_COMMENT_SUBSCRIPTION', 'Pending confirmation'); -@define('NO_COMMENT_SUBSCRIPTION', 'Not subscribed'); -@define('SUMMARY', 'Summary'); +@define('SEARCH_FULLENTRY', '글 전체를 보여주기'); +@define('NAVLINK_AMOUNT', '내비게이션에 표시할 링크의 수 입력 (스타일 관리 페이지를 다시 불러들여야 함)'); +@define('NAV_LINK_TEXT', '내비게이션 링크에 표시할 문구 입력'); +@define('NAV_LINK_URL', '링크의 전체 주소(URL) 입력'); +@define('MODERATE_SELECTED_COMMENTS', '선택한 덧글 승인'); +@define('WEBLOG', '웹로그'); +@define('ACTIVE_COMMENT_SUBSCRIPTION', '구독됨'); +@define('PENDING_COMMENT_SUBSCRIPTION', '구독 대기 중'); +@define('NO_COMMENT_SUBSCRIPTION', '구독되지 않음'); +@define('SUMMARY', '요약'); // Next lines were added on 2012/05/29 -@define('ABOUT_TO_DELETE_FILES', 'You are about to delete a bunch of files at once.<br />If you are using these in some of your entries, it will cause dead links or images<br />Are you sure you wish to proceed?<br /><br />'); -@define('ARCHIVE_SORT_STABLE', 'Stable Archives'); -@define('ARCHIVE_SORT_STABLE_DESC', 'Sort the archive-pages descending, so they are stable and search-crawler do not have to reindex them.'); -@define('PLAIN_ASCII_NAMES', '(no special characters, umlauts)'); +@define('ABOUT_TO_DELETE_FILES', '여러 개의 파일을 한꺼번에 지우려고 하고 있습니다.<br />만약 작성했던 글에 이들 중 일부를 사용하고 있다면 깨진 링크나 그림으로 나타날 것입니다.<br />그래도 계속 진행하겠습니까?<br /><br />'); +@define('ARCHIVE_SORT_STABLE', '안정적인 글 목록'); +@define('ARCHIVE_SORT_STABLE_DESC', '글 목록 페이지를 내림차순으로 정렬하여 안정적인 상태를 유지함으로서 검색엔진 봇이 다시 색인하지 않아도 되도록 합니다.'); +@define('PLAIN_ASCII_NAMES', '(특수 문자나 변이부호 등을 쓰지 마십시오)'); // New 2.0 constants -@define('SIMPLE_FILTERS', 'Simplified filters'); -@define('SIMPLE_FILTERS_DESC', 'When enabled, search forms and filter functions are reduced to essential options. When disabled, you will see every possible filter option, i.e. in the media library or the entry editor.'); -@define('TOGGLE_SELECT', 'Mark for selection'); -@define('MORE', 'More'); -@define('ENTRY_STATUS', 'Entry status'); -@define('SCHEDULED', 'Scheduled'); -@define('PUBLISHED', 'Published'); -@define('ENTRY_METADATA', 'Entry metadata'); -@define('NAVIGATION', 'Navigation'); -@define('MAIN_MENU', 'Main menu'); -@define('MENU_PERSONAL', 'Personal menu'); -@define('MENU_DASHBOARD', 'Dashboard'); -@define('MENU_ACTIVITY', 'Activity'); -@define('MENU_SETTINGS', 'Settings'); -@define('MENU_TEMPLATES', 'Templates'); -@define('MENU_PLUGINS', 'Plugins'); -@define('MENU_USERS', 'Users'); -@define('MENU_GROUPS', 'Groups'); -@define('MENU_MAINTENANCE', 'Maintenance'); -@define('ALIGN_TOP', 'Top'); -@define('ALIGN_LEFT', 'Left'); -@define('ALIGN_RIGHT', 'Right'); -@define('SHOW_METADATA', 'Show metadata'); -@define('RANGE_FROM', 'From'); -@define('RANGE_TO', 'To'); -@define('UPLOAD', 'Upload'); -@define('DOWNLOAD', 'Download'); -@define('ENTRY_PUBLISHED', 'Entry #%s published'); -@define('PUBLISH_ERROR', 'Error publishing entry:'); -@define('UPDATE_NOTIFICATION', 'Update notification'); -@define('NEW_VERSION_AVAILABLE', 'New stable Serendipity version available: '); -@define('MOVE', 'Move'); -@define('MOVE_UP', 'Move up'); -@define('MOVE_DOWN', 'Move down'); -@define('INSTALL_NEW_SIDEBAR_PLUGIN', 'Install a new sidebar plugin'); -@define('INSTALL_NEW_EVENT_PLUGIN', 'Install a new event plugin'); -@define('TEMPLATE_OPTIONS', 'Template options'); -@define('CURRENT_TEMPLATE', 'Current Template'); -@define('TEMPLATE_INFO', 'Show template info'); -@define('AVAILABLE_TEMPLATES', 'Available Templates'); -@define('TIMESTAMP_RESET', 'The timestamp has been reset to the current time.'); +@define('SIMPLE_FILTERS', '간소화된 필터'); +@define('SIMPLE_FILTERS_DESC', '사용할 경우 검색 입력창과 필터 기능을 필수요소만 남깁니다. 사용하지 않을 경우 가능한 모든 필터 기능이 다 나타납니다 - 미디어 보관함이나 글 편집기에도 보입니다.'); +@define('TOGGLE_SELECT', '선택사항 표시'); +@define('MORE', '더 보기'); +@define('ENTRY_STATUS', '글의 상태'); +@define('SCHEDULED', '예약됨'); +@define('PUBLISHED', '게시됨'); +@define('ENTRY_METADATA', '글의 메타데이터'); +@define('NAVIGATION', '내비게이션'); +@define('MAIN_MENU', '주 메뉴'); +@define('MENU_PERSONAL', '개인 메뉴'); +@define('MENU_DASHBOARD', '대시보드'); +@define('MENU_ACTIVITY', '활동사항'); +@define('MENU_SETTINGS', '설정'); +@define('MENU_TEMPLATES', '템플릿'); +@define('MENU_PLUGINS', '플러그인'); +@define('MENU_USERS', '사용자'); +@define('MENU_GROUPS', '그룹'); +@define('MENU_MAINTENANCE', '유지관리'); +@define('ALIGN_TOP', '위'); +@define('ALIGN_LEFT', '왼쪽'); +@define('ALIGN_RIGHT', '오른쪽'); +@define('SHOW_METADATA', '메타데이터 표시'); +@define('RANGE_FROM', '시작:'); +@define('RANGE_TO', '끝:'); +@define('UPLOAD', '올려주기(업로드)'); +@define('DOWNLOAD', '내려받기(다운로드)'); +@define('ENTRY_PUBLISHED', '%s번 글을 게시함'); +@define('PUBLISH_ERROR', '글을 게시하는 중 오류 발생:'); +@define('UPDATE_NOTIFICATION', '업데이트 알림'); +@define('NEW_VERSION_AVAILABLE', '세렌디피티의 새로운 안정화 버전이 있습니다: '); +@define('MOVE', '이동'); +@define('MOVE_UP', '위로 이동'); +@define('MOVE_DOWN', '아래로 이동'); +@define('INSTALL_NEW_SIDEBAR_PLUGIN', '새로운 옆줄 플러그인 설치하기'); +@define('INSTALL_NEW_EVENT_PLUGIN', '새로운 이벤트 플러그인 설치하기'); +@define('TEMPLATE_OPTIONS', '템플릿 선택 사항'); +@define('CURRENT_TEMPLATE', '현재 사용 중인 템플릿'); +@define('TEMPLATE_INFO', '템플릿 정보 보기'); +@define('AVAILABLE_TEMPLATES', '사용할 수 있는 템플릿'); +@define('TIMESTAMP_RESET', '작성시간을 현재시간으로 초기화 했습니다.'); -@define('CLEANCOMPILE_PASS', '[smarty clearCompiledTemplate(%s)]'); -@define('CLEANCOMPILE_FAIL', 'No files available for clearing.'); -@define('CLEANCOMPILE_TITLE', 'Clear template cache'); -@define('CLEANCOMPILE_INFO', 'This will purge all compiled template files of the currently active template. Compiled templates will be automatically re-created on demand by the Smarty framework.'); -@define('INSTALLER_KEY', 'Key'); -@define('INSTALLER_VALUE', 'Value'); -@define('CURRENT_TAB', 'Current tab: '); -@define('PINGBACKS', 'Pingbacks'); -@define('NO_PINGBACKS', 'No Pingbacks'); -@define('GROUP_NAME_DESC', "Use as uppercased eg. 'EXAMPLE_GROUP' name, but not as a constant 'USERLEVEL_XYZ' group name."); -@define('INSTALLER_CLI_TOOLS', 'Server-side command line tools'); -@define('INSTALLER_CLI_TOOLNAME', 'CLI tool'); -@define('INSTALLER_CLI_TOOLSTATUS', 'Executable?'); -@define('VIDEO', 'Video'); -@define('RESET_FILTERS', 'Reset filters'); -@define('UPDATE_FAILMSG', 'Check for new Serendipity version failed. This can happen because either the URL https://raw.github.com/s9y/Serendipity/master/docs/RELEASE is down, your server blocks outgoing connections or there are other connection issues.'); -@define('UPDATE_FAILACTION', 'Disable automatic update check'); -@define('UPDATE_NOTIFICATION_DESC', 'Show the update notification in the Dashboard, and for which channel?'); -@define('FRONTEND', 'Frontend'); -@define('BACKEND', 'Backend'); -@define('MEDIA_UPLOAD_RESIZE', 'Resize before Upload'); -@define('MEDIA_UPLOAD_RESIZE_DESC', 'Resize images before the upload using Javascript. This will also change the uploader to use Ajax and thus remove the Property-Button'); -@define('LOG_LEVEL', 'Log Level'); -@define('LOG_LEVEL_DESC', 'At certain places in the Serendipity code we have placed debugging breakpoints. If this option is set to "Debug", it will write this debug output to templates_c/logs/. You should only enable this option if you are experiencing bugs in those areas, or if you are a developer. Setting this option to "Error" will enable logging PHP errors, overwriting the PHP error_log setting.'); -@define('DEBUG', 'Debug'); -@define('CUSTOM_CONFIG', 'Custom configuration file'); -@define('PLUGIN_ALREADY_INSTALLED', 'Plugin already installed, and does not support multiple installation ("stackable").'); -@define('INSTALL_DBPREFIX_INVALID', 'The database table name prefix must not be empty and may only contain letters, numbers and the underscore character.'); -@define('SYNDICATION_PLUGIN_SUBTOME', 'subToMe'); -@define('SYNDICATION_PLUGIN_SUBTOME_DESC', 'Show the subToMe button, a layer to make feed subscription easier'); -@define('SYNDICATE_THIS_BLOG', 'Subscribe'); -@define('SYNDICATION_PLUGIN_BIGIMG_DESC', 'Display a (big) image at the top of the feeds in sidebar, enter full or absolute URL to image file. Set to "none" to show a textlink (the old default)'); -@define('INSTALL_BACKENDPOPUP', 'Enable use of popup windows for the backend'); -@define('INSTALL_BACKENDPOPUP_DESC', 'Do you want to use popup windows for some backend functionality? When disabled (default), inline modal dialogs will be used for e.g. the category selector and media library.'); -@define('UPDATE_STABLE', 'stable'); -@define('UPDATE_BETA', 'beta'); -@define('SYNDICATION_PLUGIN_FEEDFORMAT', 'Feed format'); -@define('SYNDICATION_PLUGIN_FEEDFORMAT_DESC', 'Which format shall be used for all feeds. Both are supported in all common readers'); -@define('SYNDICATION_PLUGIN_COMMENTFEED', 'Comment feed'); -@define('SYNDICATION_PLUGIN_COMMENTFEED_DESC', 'Show an additional link to a comment feed. This should be interesting only to the blogauthor itself'); -@define('SYNDICATION_PLUGIN_FEEDICON', 'Feed icon'); -@define('SYNDICATION_PLUGIN_FEEDICON_DESC', 'Show a (big) icon insteaf of a textlink to the feed. Set to "none" to deactivate, or to "feedburner" to show a feedburner counter if an id is given below'); -@define('SYNDICATION_PLUGIN_CUSTOMURL', 'Custom URL'); -@define('SYNDICATION_PLUGIN_CUSTOMURL_DESC', 'If you want to link to the custom feed specified in the blog configuration, enable this option.'); -@define('FEED_CUSTOM', 'Custom feed URL'); -@define('FEED_CUSTOM_DESC', 'If set, a custom feed URL can be set to forward Feedreaders to a specific URL. Useful for statistical analyzers like Feedburner, in which case you would enter your Feedburner-URL here.'); -@define('FEED_FORCE', 'Force custom feed URL?'); -@define('FEED_FORCE_DESC', 'If enabled, the URL entered above will be mandatory for Feedreaders, and your usual feed cannot be accessed from clients.'); -@define('NO_UPDATES', 'No plugin updates are available'); -@define('PLUGIN_GROUP_ALL', 'All categories'); +@define('CLEANCOMPILE_PASS', '컴파일된 템플릿 비우기-[smarty clearCompiledTemplate(%s)]'); +@define('CLEANCOMPILE_FAIL', '삭제할 파일이 없습니다.'); +@define('CLEANCOMPILE_TITLE', '템플릿 캐시 비우기'); +@define('CLEANCOMPILE_INFO', '현재 사용 중인 템플릿에 대해 컴파일된 템플릿 파일을 모두 삭제하는 기능입니다. 컴파일된 템플릿은 스마티 프레임워크에 의해 필요에 따라 자동으로 재생성됩니다.'); +@define('INSTALLER_KEY', '키'); +@define('INSTALLER_VALUE', '값'); +@define('CURRENT_TAB', '현재 탭: '); +@define('PINGBACKS', '핑백'); +@define('NO_PINGBACKS', '핑백 없음'); +@define('GROUP_NAME_DESC', "언어 파일에서 정의된 상수를 여기에 입력할 경우 (예: 'USERLEVEL_EDITOR_DESC') 이 상수의 번역된 형태가 표시됩니다. 직접 상수를 정의하고 그 이름을 여기에 입력할 수도 있습니다. 번역이 되는 그룹 이름을 사용하지 않으려고 한다면 상수 외의 문자열로 자유롭게 입력하면 됩니다."); +@define('INSTALLER_CLI_TOOLS', '서버측 커맨드라인 도구'); +@define('INSTALLER_CLI_TOOLNAME', '커맨드라인 인터페이스(CLI) 도구'); +@define('INSTALLER_CLI_TOOLSTATUS', '실행 가능 상태입니까?'); +@define('VIDEO', '동영상'); +@define('RESET_FILTERS', '필터 초기화 하기'); +@define('UPDATE_FAILMSG', '새로운 세렌디피티 버전을 확인하는데 실패했습니다. https://raw.github.com/s9y/Serendipity/master/docs/RELEASE 주소에 이상이 생겼거나, 서버가 외부 접속을 차단하고 있거나, 그 외의 접속 문제가 발생한 것으로 보입니다.'); +@define('UPDATE_FAILACTION', '자동 업데이트 확인을 사용하지 않기'); +@define('UPDATE_NOTIFICATION_DESC', '대시보드에 업데이트 알림을 표시하고, 어떤 채널에 나타내겠습니까?'); +@define('FRONTEND', '외부 페이지'); +@define('BACKEND', '관리 페이지'); +@define('MEDIA_UPLOAD_RESIZE', '올리기 전 크기 조절'); +@define('MEDIA_UPLOAD_RESIZE_DESC', '서버에 그림을 올리기 전에 자바스크립트로 크기를 조절합니다. 이 경우 올리는 기능이 Ajax를 쓰게 되므로 등록정보 버튼을 표시하지 않게 됩니다.'); +@define('LOG_LEVEL', '로그 기록 수준'); +@define('LOG_LEVEL_DESC', '세렌디피티 코드 내의 특정 부분에 디버그 중단점을 배치해 두었습니다. 이 설정을 "디버그"로 둘 경우 이러한 위치에서 발생한 디버그 출력내역을 templates_c/logs/에 기록하게 됩니다. 특정 부분에서 버그가 발생하고 있거나 본인이 개발자인 경우에만 이 설정을 사용하기 바랍니다. 이 설정을 "오류"로 두면 PHP 에러를 기록하게 되며 PHP error_log 설정을 덮어씁니다.'); +@define('DEBUG', '디버그'); +@define('CUSTOM_CONFIG', '사용자화된 설정 파일'); +@define('PLUGIN_ALREADY_INSTALLED', '플러그인이 이미 설치되었으며, 다중 설치 ("겹침") 지원을 하지 않습니다.'); +@define('INSTALL_DBPREFIX_INVALID', '데이터베이스 테이블 이름의 접두사는 비워둘 수 없으며 영문자, 숫자, 그리고 밑줄 문자("_")만 허용됩니다.'); +@define('SYNDICATION_PLUGIN_SUBTOME', '서브투미(subToMe)'); +@define('SYNDICATION_PLUGIN_SUBTOME_DESC', '서브투미(subToMe) 버튼을 보여줍니다. 이는 피드 구독을 더 쉽게 하도록 도와주는 계층입니다.'); +@define('SYNDICATE_THIS_BLOG', '구독하기'); +@define('SYNDICATION_PLUGIN_BIGIMG_DESC', '옆줄에 나타나는 피드 맨 위에 (대형) 그림을 표시합니다. 그림 파일에 대한 전체 또는 절대 경로를 입력합니다. "없음"으로 설정하면 문자 링크를 표시합니다(예전 기본 설정).'); +@define('INSTALL_BACKENDPOPUP', '관리 페이지에서 팝업 창을 사용할 수 있게 함'); +@define('INSTALL_BACKENDPOPUP_DESC', '일부 관리 페이지 기능에서 팝업 창을 사용하고자 합니까? 사용하지 않을 경우 (기본값) 인라인 모달 대화상자를 범주 선택, 미디어 보관함 등에 사용하게 됩니다.'); +@define('UPDATE_STABLE', '안정화 버전'); +@define('UPDATE_BETA', '베타 버전'); +@define('SYNDICATION_PLUGIN_FEEDFORMAT', '피드 규격'); +@define('SYNDICATION_PLUGIN_FEEDFORMAT_DESC', '모든 피드에 사용할 규격을 선택합니다. 둘 다 일반적인 리더에서 모두 지원합니다.'); +@define('SYNDICATION_PLUGIN_COMMENTFEED', '덧글 피드'); +@define('SYNDICATION_PLUGIN_COMMENTFEED_DESC', '덧글 피드를 추가로 표시합니다. 대개 블로그 작성자에게만 관심이 갈 것입니다.'); +@define('SYNDICATION_PLUGIN_FEEDICON', '피드 아이콘'); +@define('SYNDICATION_PLUGIN_FEEDICON_DESC', '피드에 문자 링크 대신 (대형) 아이콘을 표시합니다. "없음"으로 설정하면 나타나지 않으며, "피드버너"를 선택할 경우 아래에 ID를 입력하면 피드버너 카운터를 표시합니다.'); +@define('SYNDICATION_PLUGIN_CUSTOMURL', '사용자화된 주소(URL)'); +@define('SYNDICATION_PLUGIN_CUSTOMURL_DESC', '블로그 설정에 지정한 사용자화된 피드로 링크를 할 경우 이 설정을 사용합니다.'); +@define('FEED_CUSTOM', '사용자화된 피드의 주소(URL)'); +@define('FEED_CUSTOM_DESC', '사용할 경우 피드 리더가 특정 주소로 방문하도록 별도의 사용자화된 피드 주소를 설정할 수 있습니다. 피드버너와 같이 통계 분석 기능이 있을 때 유용하며, 이 경우 피드버너 주소(URL)를 입력하면 됩니다.'); +@define('FEED_FORCE', '사용자화된 피드의 주소를 강제로 사용합니까?'); +@define('FEED_FORCE_DESC', '사용할 경우 위에 입력한 주소가 모든 피드 리더에서 의무적으로 사용되며 일반적인 피드는 접근할 수 없게 됩니다.'); +@define('NO_UPDATES', '플러그인 업데이트가 없습니다'); +@define('PLUGIN_GROUP_ALL', '모든 범주'); -@define('CONF_USE_AUTOSAVE', 'Enable autosave-feature'); -@define('CONF_USE_AUTOSAVE_DESC', 'When enabled, the text you enter into blog entries will be periodically saved in your browser\'s session storage. If your browser crashes during writing, the next time you create a new entry, the text will be restored from this autosave.'); -@define('INSTALL_CAT_FEEDS', 'Feed Settings'); -@define('USERCONF_USE_CORE_WYSIWYG_TOOLBAR', 'Toolbar for WYSIWYG editor'); -@define('USERCONF_USE_CORE_WYSIWYG_TOOLBAR_DESC', 'Sets the list of available toolbar buttons for the WYSIWYG-Editor. If you need to further change those presets, you can create a file templates/XXX/admin/ckeditor_custom_config.js. For further details please check out the files htmlarea/ckeditor_s9y_config.js and htmlarea/ckeditor_s9y_plugin.js.'); -@define('USERCONF_WYSIWYG_PRESET_S9Y', 'Serendipity (default)'); -@define('USERCONF_WYSIWYG_PRESET_BASIC', 'Reduced'); -@define('USERCONF_WYSIWYG_PRESET_FULL', 'Full'); -@define('USERCONF_WYSIWYG_PRESET_STANDARD', 'Alternate'); -@define('USERCONF_WYSIWYG_PRESET_CKE', 'CKEditor Full'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_S9Y', 'Force: Serendipity'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_BASIC', 'Force: Reduced'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_FULL', 'Force: Full'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_STANDARD', 'Force: Alternate'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_CKE', 'Force: CKEditor Full'); +@define('CONF_USE_AUTOSAVE', '자동 저장 기능 사용'); +@define('CONF_USE_AUTOSAVE_DESC', '사용할 경우 블로그 글에 입력한 내용을 브라우저의 세션 저장소에 주기적으로 저장하게 됩니다. 글 작성 중 브라우저가 비정상 종료될 경우 다음 번에 새로 글을 작성할 때 본문 내용이 자동 저장에서 복구되어 표시됩니다.'); +@define('INSTALL_CAT_FEEDS', '피드 설정'); +@define('USERCONF_USE_CORE_WYSIWYG_TOOLBAR', 'WYSIWYG 편집기의 도구 모음'); +@define('USERCONF_USE_CORE_WYSIWYG_TOOLBAR_DESC', 'WYSIWYG 편집기에 표시할 수 있는 도구 모음 버튼의 목록을 설정합니다. 기본 설정 묶음(프리셋)을 추가적으로 변경하고자 할 경우 templates/XXX/admin/ckeditor_custom_config.js 파일을 만들면 됩니다. 보다 자세한 사항은 htmlarea/ckeditor_s9y_config.js 및 htmlarea/ckeditor_s9y_plugin.js 파일을 참고하기 바랍니다.'); +@define('USERCONF_WYSIWYG_PRESET_S9Y', '세렌디피티 (기본값)'); +@define('USERCONF_WYSIWYG_PRESET_BASIC', '간소화된 기능'); +@define('USERCONF_WYSIWYG_PRESET_FULL', '전체 기능'); +@define('USERCONF_WYSIWYG_PRESET_STANDARD', '대안 설정'); +@define('USERCONF_WYSIWYG_PRESET_CKE', 'CKEditor 전체 기능'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_S9Y', '강제 사용: 세렌디피티'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_BASIC', '강제 사용: 간소화된 기능'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_FULL', '강제 사용: 전체 기능'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_STANDARD', '강제 사용: 대안 설정'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_CKE', '강제 사용: CKEditor 전체 기능'); -@define('CATEGORY_PLUGIN_SHOWALL', 'Show a link to "All categories"?'); -@define('CATEGORY_PLUGIN_SHOWALL', 'If enabled, a link for the visitor to display the blog with no category restriction will be added.'); -@define('SERENDIPITY_PHPVERSION_FAIL', 'Serendipity requires a PHP version >= %2$s - you are running a lower version (%1$s) and need to upgrade your PHP version. Most providers offer you to switch to newer PHP versions through their admin panels or .htaccess directives.'); -@define('TOGGLE_VIEW', 'Switch category view mode'); -@define('PUBLISH_NOW', 'Publish this entry now (sets current time and date)'); -@define('EDITOR_TAGS', 'Tags'); -@define('EDITOR_NO_TAGS', 'No tags'); -@define('DASHBOARD_ENTRIES', 'In Progress'); -@define('INSTALL_PASSWORD2', 'Admin password (verify)'); -@define('INSTALL_PASSWORD2_DESC', 'Password for admin login, enter again to verify.'); -@define('INSTALL_PASSWORD_INVALID', 'Your entered passwords for the administrator user do not match.'); -@define('INSTALL_BACKENDPOPUP_GRANULAR', 'Force specific backend popups'); -@define('INSTALL_BACKENDPOPUP_GRANULAR_DESC', 'If you generally disable backend popups, you can specifically force using popups for specific places by entering a comma seperated list of places here. Available places are: '); -@define('START_UPDATE', 'Starting Update ...'); -@define('UPDATE_ALL', 'Update All'); -@define('JS_FAILURE', 'The Serendipity JavaScript-library could not be loaded. This can happen due to PHP or Plugin errors, or even a malformed browser cache. To check the exact error please open <a href="%1$s">%1$s</a> manually in your browser and check for error messages.'); -@define('THEMES_PREVIEW_BLOG', 'See demo on blog.s9y.org'); -@define('SYNDICATION_PLUGIN_XML_DESC', 'Set to "none" if you only want to show a text link.'); -@define('MULTICHECK_NO_ITEM', 'No item selected, please check at least one. <a href="%s">Return to previous page</a>.'); -@define('MULTICHECK_NO_DIR', 'No directory selected, please choose one. <a href="%s">Return to previous page</a>.'); -@define('BULKMOVE_INFO', 'Bulk-move info'); -@define('BULKMOVE_INFO_DESC', 'You can select multiple files to bulk-move them to a new location. <strong>Note:</strong> This action cannot be undone, just like bulk-deletion of multiple files. All checked files will be physically moved, and referring blog entries are rewritten to point to the new location.'); -@define('FIRST_PAGE', 'First Page'); -@define('LAST_PAGE', 'Last Page'); -@define('MEDIA_PROPERTIES_DONE', 'Properties of #%d changed.'); -@define('DIRECTORY_INFO', 'Directory info'); -@define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); -@define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('CATEGORY_PLUGIN_SHOWALL', '"모든 범주"에 대한 링크 표시'); +@define('CATEGORY_PLUGIN_SHOWALL', '사용할 경우 범주 제한 없이 블로그를 보여주는 링크를 방문자가 볼 수 있게 추가합니다.'); +@define('SERENDIPITY_PHPVERSION_FAIL', '세렌디피티는 PHP 버전 %2$s 이상이 필요합니다. 현재 시스템은 더 낮은 버전 (%1$s)을 사용하고 있으므로 업그레이드 해야 합니다. 대부분의 호스팅 서비스 제공자들은 관리자 화면이나 .htaccess 지시어 등을 통해 새로운 PHP 버전으로 업그레이드할 수 있는 기능을 제공합니다.'); +@define('TOGGLE_VIEW', '범주 표시 방법 변경'); +@define('PUBLISH_NOW', '이 글을 지금 게시 (현재 날짜와 시간으로 설정)'); +@define('EDITOR_TAGS', '태그'); +@define('EDITOR_NO_TAGS', '태그 없음'); +@define('DASHBOARD_ENTRIES', '작성 중'); +@define('INSTALL_PASSWORD2', '관리자 암호 (다시 입력)'); +@define('INSTALL_PASSWORD2_DESC', '검증을 위해 관리자 로그인을 위한 암호를 다시 입력합니다.'); +@define('INSTALL_PASSWORD_INVALID', '입력한 관리자 암호가 일치하지 않습니다.'); +@define('INSTALL_BACKENDPOPUP_GRANULAR', '특정 관리자 화면 팝업 창을 강제로 표시'); +@define('INSTALL_BACKENDPOPUP_GRANULAR_DESC', '일반적으로 관리자 화면의 팝업 창을 사용하고 있지 않을 경우라도 팝업 창을 강제로 사용하고자 하는 곳이 있으면 여기에 해당 장소들을 각각 쉼표로 분리하여 입력해둘 수 있습니다. 사용 가능한 장소는: '); +@define('START_UPDATE', '업데이트 시작...'); +@define('UPDATE_ALL', '모두 업데이트'); +@define('JS_FAILURE', '세렌디피티의 자바스크립트 라이브러리를 불러들일 수 없습니다. 이는 PHP나 플러그인 오류 때문에 발생할 수도 있고 브라우저 캐시가 비정상적일 경우에도 경험할 수 있습니다. 정확한 상황을 파악하고자 한다면 <a href="%1$s">%1$s</a> 주소를 브라우저에서 수동으로 열고 오류 내용을 확인하기 바랍니다.'); +@define('THEMES_PREVIEW_BLOG', 'blog.s9y.org에서 시연을 확인'); +@define('SYNDICATION_PLUGIN_XML_DESC', '문자 링크만 보여주기를 원할 경우 "없음"으로 설정합니다.'); +@define('MULTICHECK_NO_ITEM', '선택한 아이템이 없습니다. 최소한 한 개를 선택하십시오. <a href="%s">이전 페이지로 돌아가기</a>.'); +@define('MULTICHECK_NO_DIR', '선택한 디렉토리가 없습니다. 최고한 한 군데를 선택하십시오. <a href="%s">이전 페이지로 돌아가기</a>.'); +@define('BULKMOVE_INFO', '대량으로 이동하기'); +@define('BULKMOVE_INFO_DESC', '여러 파일을 선택하여 한꺼번에 새로운 위치로 이동시킬 수 있습니다. <strong>주의:</strong> 이 작업은 여러 파일의 대량 삭제와 마찬가지로 되돌릴 수 없습니다. 선택한 파일은 물리적으로 이동되며 이를 참조하는 블로그 글은 새 위치를 참조하도록 재작성됩니다.'); +@define('FIRST_PAGE', '첫 페이지'); +@define('LAST_PAGE', '마지막 페이지'); +@define('MEDIA_PROPERTIES_DONE', '%d번의 등록정보가 변경되었습니다.'); +@define('DIRECTORY_INFO', '디렉토리 정보'); +@define('DIRECTORY_INFO_DESC', '디렉토리는 물리적인 폴더/디렉토리 이름을 반영합니다. 아이템을 포함하고 있는 디렉토리를 변경하거나 이동할 경우 두 방법 중 하나를 선택해야 합니다. 원하는 디렉토리 또는 하위 디렉토리를 만든 다음 미디어 보관함을 통해 새 디렉토리로 아이템을 이동하고 나면 원래 디렉토리를 삭제하는 것이 한 방법입니다. 다른 방법은 아래의 디렉토리 편집 버튼을 사용하여 원래 디렉토리를 통째로 변경하고서 원하던 다른 이름 (기존 하위 디렉토리/ + 새 이름)으로 바꾸는 것입니다. 이렇게 하면 모든 디렉토리와 아이템을 이동시키고 참조하는 모든 블로그 글을 변경하게 됩니다.'); +@define('MEDIA_RESIZE_EXISTS', '동일한 폭과 높이를 가진 파일이 이미 존재합니다!'); +@define('USE_CACHE', '캐시 사용하기'); +@define('USE_CACHE_DESC', '특정 데이터베이스 질의를 반복하지 않도록 내부 캐시를 사용하도록 합니다. 중간에서 높은 접속량이 걸리는 서버의 부하를 줄이며 페이지를 불러오는 속도를 향상시킵니다.'); +@define('CONFIG_PERMALINK_PATH_DESC', '세렌디피티가 주소(URL)와 작업을 제대로 연동시킬 수 있도록 반드시 접두사를 지정해야 한다는 점에 유의하기 바랍니다. 접두사는 고유한 이름이면 아무렇게나 지정할 수 있지만 비워둘 수는 없습니다. 이는 모든 접두사 지정사항에 대해 동일하게 적용됩니다.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_nl.inc.php b/lang/UTF-8/serendipity_lang_nl.inc.php index ce5fcdf8..babee8fa 100644 --- a/lang/UTF-8/serendipity_lang_nl.inc.php +++ b/lang/UTF-8/serendipity_lang_nl.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_no.inc.php b/lang/UTF-8/serendipity_lang_no.inc.php index 047a1637..9e5dae5d 100644 --- a/lang/UTF-8/serendipity_lang_no.inc.php +++ b/lang/UTF-8/serendipity_lang_no.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_pl.inc.php b/lang/UTF-8/serendipity_lang_pl.inc.php index 0d8007f4..869818ea 100644 --- a/lang/UTF-8/serendipity_lang_pl.inc.php +++ b/lang/UTF-8/serendipity_lang_pl.inc.php @@ -1110,3 +1110,10 @@ $i18n_filename_to = array('_', 'a', 'A', 'a', 'A', 'b', 'B', 'c', 'C', 'c', 'C @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_pt.inc.php b/lang/UTF-8/serendipity_lang_pt.inc.php index c4818b27..40af2baf 100644 --- a/lang/UTF-8/serendipity_lang_pt.inc.php +++ b/lang/UTF-8/serendipity_lang_pt.inc.php @@ -1116,3 +1116,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_pt_PT.inc.php b/lang/UTF-8/serendipity_lang_pt_PT.inc.php index 157b7ea1..8ff54930 100644 --- a/lang/UTF-8/serendipity_lang_pt_PT.inc.php +++ b/lang/UTF-8/serendipity_lang_pt_PT.inc.php @@ -1123,3 +1123,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_ro.inc.php b/lang/UTF-8/serendipity_lang_ro.inc.php index f666a5e9..4830e1c9 100644 --- a/lang/UTF-8/serendipity_lang_ro.inc.php +++ b/lang/UTF-8/serendipity_lang_ro.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_ru.inc.php b/lang/UTF-8/serendipity_lang_ru.inc.php index e70d6ec5..1bf9523e 100644 --- a/lang/UTF-8/serendipity_lang_ru.inc.php +++ b/lang/UTF-8/serendipity_lang_ru.inc.php @@ -1115,3 +1115,10 @@ $i18n_filename_to = array('_', 'a', 'A', 'b', 'B', 'v', 'V', 'g', 'G', 'd', 'D @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_sa.inc.php b/lang/UTF-8/serendipity_lang_sa.inc.php index 1d316ba5..15691e52 100644 --- a/lang/UTF-8/serendipity_lang_sa.inc.php +++ b/lang/UTF-8/serendipity_lang_sa.inc.php @@ -1031,3 +1031,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_se.inc.php b/lang/UTF-8/serendipity_lang_se.inc.php index b47b4fab..c026f6d6 100644 --- a/lang/UTF-8/serendipity_lang_se.inc.php +++ b/lang/UTF-8/serendipity_lang_se.inc.php @@ -1112,3 +1112,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_sk.inc.php b/lang/UTF-8/serendipity_lang_sk.inc.php index 6a698630..86e6c757 100644 --- a/lang/UTF-8/serendipity_lang_sk.inc.php +++ b/lang/UTF-8/serendipity_lang_sk.inc.php @@ -1102,3 +1102,10 @@ $i18n_filename_to = array ( @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_ta.inc.php b/lang/UTF-8/serendipity_lang_ta.inc.php index 8701dd2e..a63f9397 100644 --- a/lang/UTF-8/serendipity_lang_ta.inc.php +++ b/lang/UTF-8/serendipity_lang_ta.inc.php @@ -1111,3 +1111,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_tn.inc.php b/lang/UTF-8/serendipity_lang_tn.inc.php index 72382ca5..f8213b57 100644 --- a/lang/UTF-8/serendipity_lang_tn.inc.php +++ b/lang/UTF-8/serendipity_lang_tn.inc.php @@ -1116,3 +1116,10 @@ $i18n_unknown = 'tw'; @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_tr.inc.php b/lang/UTF-8/serendipity_lang_tr.inc.php index d11c9148..f3d095e3 100644 --- a/lang/UTF-8/serendipity_lang_tr.inc.php +++ b/lang/UTF-8/serendipity_lang_tr.inc.php @@ -1116,3 +1116,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_tw.inc.php b/lang/UTF-8/serendipity_lang_tw.inc.php index 89592c8d..ca902c1e 100644 --- a/lang/UTF-8/serendipity_lang_tw.inc.php +++ b/lang/UTF-8/serendipity_lang_tw.inc.php @@ -1117,3 +1117,10 @@ $i18n_unknown = 'tw'; @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/UTF-8/serendipity_lang_zh.inc.php b/lang/UTF-8/serendipity_lang_zh.inc.php index 2c748917..b8223582 100644 --- a/lang/UTF-8/serendipity_lang_zh.inc.php +++ b/lang/UTF-8/serendipity_lang_zh.inc.php @@ -1112,3 +1112,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/addlang.txt b/lang/addlang.txt index 8067a758..d56113f9 100644 --- a/lang/addlang.txt +++ b/lang/addlang.txt @@ -1,13 +1 @@ -@define('MULTICHECK_NO_ITEM', 'No item selected, please check at least one. <a href="%s">Return to previous page</a>.'); -@define('MULTICHECK_NO_DIR', 'No directory selected, please choose one. <a href="%s">Return to previous page</a>.'); -@define('BULKMOVE_INFO', 'Bulk-move info'); -@define('BULKMOVE_INFO_DESC', 'You can select multiple files to bulk-move them to a new location. <strong>Note:</strong> This action cannot be undone, just like bulk-deletion of multiple files. All checked files will be physically moved, and referring blog entries are rewritten to point to the new location.'); -@define('FIRST_PAGE', 'First Page'); -@define('LAST_PAGE', 'Last Page'); -@define('MEDIA_PROPERTIES_DONE', 'Properties of #%d changed.'); -@define('DIRECTORY_INFO', 'Directory info'); -@define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); -@define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); -@define('HIDE_SUBDIR_FILES', 'Hide Files of Subdirectories'); -@define('USE_CACHE', 'USe Cache'); -@define('USE_CACHE_DESC', 'Use an internal cache to not repeat database reads. This reduces the load on servers with medium to high traffic and improves page load time.'); \ No newline at end of file +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/plugin_lang.php b/lang/plugin_lang.php index 6c7403ce..e06f2e11 100644 --- a/lang/plugin_lang.php +++ b/lang/plugin_lang.php @@ -92,3 +92,10 @@ foreach($const['missing'] AS $file => $constants) { @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_bg.inc.php b/lang/serendipity_lang_bg.inc.php index ef40c6d7..2a6d49e2 100644 --- a/lang/serendipity_lang_bg.inc.php +++ b/lang/serendipity_lang_bg.inc.php @@ -1104,3 +1104,10 @@ $i18n_filename_to = array('-', 'a', 'A', 'b', 'B', 'v', 'V', 'g', 'G', 'd', 'D @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_cn.inc.php b/lang/serendipity_lang_cn.inc.php index a4d5395f..d418e6ff 100644 --- a/lang/serendipity_lang_cn.inc.php +++ b/lang/serendipity_lang_cn.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_cs.inc.php b/lang/serendipity_lang_cs.inc.php index 44038e13..5a8183e9 100644 --- a/lang/serendipity_lang_cs.inc.php +++ b/lang/serendipity_lang_cs.inc.php @@ -1143,3 +1143,10 @@ $i18n_filename_to = array ( @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_cz.inc.php b/lang/serendipity_lang_cz.inc.php index 844ceaaa..b067d31d 100644 --- a/lang/serendipity_lang_cz.inc.php +++ b/lang/serendipity_lang_cz.inc.php @@ -1144,3 +1144,10 @@ $i18n_filename_to = array ( @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_da.inc.php b/lang/serendipity_lang_da.inc.php index 3f375eff..bb3529bd 100644 --- a/lang/serendipity_lang_da.inc.php +++ b/lang/serendipity_lang_da.inc.php @@ -1111,3 +1111,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_de.inc.php b/lang/serendipity_lang_de.inc.php index 151d4c5a..663c6f28 100644 --- a/lang/serendipity_lang_de.inc.php +++ b/lang/serendipity_lang_de.inc.php @@ -1084,6 +1084,7 @@ @define('USERCONF_WYSIWYG_PRESET_NOCC_FULL', 'Erzwingen: Vollst�ndig'); @define('USERCONF_WYSIWYG_PRESET_NOCC_STANDARD', 'Erzwingen: Alternative'); @define('USERCONF_WYSIWYG_PRESET_NOCC_CKE', 'Erzwingen: CKEditor Vollst�ndig'); + @define('CATEGORY_PLUGIN_SHOWALL', 'Zeige einen Link zu "Alle Kategorien"?'); @define('CATEGORY_PLUGIN_SHOWALL', 'Falls aktiviert wird Besuchern ein Link angezeigt, das Blog ohne Einschr�nkung der Kategorien darzustellen.'); @define('SERENDIPITY_PHPVERSION_FAIL', 'Serendipity ben�tigt eine PHP-Version >= %2$s - Sie benutzen eine �ltere Version (%1$s) und m�ssen auf eine neuere upgraden. Die meisten Provider gestatten den Wechsel auf neuere PHP-Versionen �ber einen Schalter in der Admin-Oberfl�che oder eine Anweisung in der .htaccess.'); @@ -1097,18 +1098,26 @@ @define('INSTALL_PASSWORD_INVALID', 'Die eingebenen Administrator-Passw�rter stimmen nicht �berein.'); @define('INSTALL_BACKENDPOPUP_GRANULAR', 'Popups in speziellen Bereichen erzwingen'); @define('INSTALL_BACKENDPOPUP_GRANULAR_DESC', 'Wenn Popups generell deaktiviert wurden, kann an speziellen Stellen dennoch der Einsatz von Popups forciert werden, indem die Liste jener Stellen hier aufgef�hrt wird (kommasepariert). Die vollst�ndige Liste ist: '); -@define('START_UPDATE', 'Starting Update ...'); -@define('UPDATE_ALL', 'Update All'); -@define('JS_FAILURE', 'The Serendipity JavaScript-library could not be loaded. This can happen due to PHP or Plugin errors, or even a malformed browser cache. To check the exact error please open <a href="%1$s">%1$s</a> manually in your browser and check for error messages.'); -@define('THEMES_PREVIEW_BLOG', 'See demo on blog.s9y.org'); -@define('SYNDICATION_PLUGIN_XML_DESC', 'Set to "none" if you only want to show a text link.'); -@define('MULTICHECK_NO_ITEM', 'No item selected, please check at least one. <a href="%s">Return to previous page</a>.'); -@define('MULTICHECK_NO_DIR', 'No directory selected, please choose one. <a href="%s">Return to previous page</a>.'); -@define('BULKMOVE_INFO', 'Bulk-move info'); -@define('BULKMOVE_INFO_DESC', 'You can select multiple files to bulk-move them to a new location. <strong>Note:</strong> This action cannot be undone, just like bulk-deletion of multiple files. All checked files will be physically moved, and referring blog entries are rewritten to point to the new location.'); -@define('FIRST_PAGE', 'First Page'); -@define('LAST_PAGE', 'Last Page'); -@define('MEDIA_PROPERTIES_DONE', 'Properties of #%d changed.'); -@define('DIRECTORY_INFO', 'Directory info'); -@define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); -@define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); + +@define('START_UPDATE', 'Starte Update ...'); +@define('UPDATE_ALL', 'Alles updaten'); +@define('JS_FAILURE', 'Die Javascript-Bibliothek von Serendipity konnte nicht geladen werden. Das kann aufgrund von PHP- oder Pluginfehlern, eventuell auch aufgrund eines zerst�rten Browsercaches vorkommen. Um die genaue Fehlermeldung zu sehen, �ffnen Sie bitte <a href="%1$s">%1$s</a> von Hand im Browser und suchen nach Fehlermeldungen.'); +@define('THEMES_PREVIEW_BLOG', 'Siehe Demo auf blog.s9y.org'); +@define('SYNDICATION_PLUGIN_XML_DESC', 'Auf "none" setzen um nur einen Textlink anzuzeigen.'); +@define('MULTICHECK_NO_ITEM', 'Kein Element ausgew�hlt, bitte mindestens eins ausw�hlen. <a href="%s">Zur�ck zur vorigen Seite</a>.'); +@define('MULTICHECK_NO_DIR', 'Kein Verzeichnis ausgew�hlt, bitte mindestens eins ausw�hlen. <a href="%s">Zur�ck zur vorigen Seite</a>.'); +@define('BULKMOVE_INFO', 'Gleichzeitiges Verschieben mehrerer Dateien'); +@define('BULKMOVE_INFO_DESC', 'Sie k�nnen mehrere Dateien ausw�hlen, um sie gleichzeitig an einen neuen Ort zu verschieben. <strong>Hinweis:</strong> Diese Aktion kann nicht r�ckg�ngig gemacht werden, genau wie das gleichzeitige L�schen mehrerer Dateien. Alle ausgew�hlten Dateien werden physikalisch verschoben; Blogeintr�ge, welche diese Dateien referenzieren, werden umgeschrieben, um auf den neuen Ort zu verweisen.'); +@define('FIRST_PAGE', 'Erste Seite'); +@define('LAST_PAGE', 'Letzte Seite'); +@define('MEDIA_PROPERTIES_DONE', 'Eigenschaften von #%d ge�ndert.'); +@define('DIRECTORY_INFO', 'Verzeichnis-Info'); +@define('DIRECTORY_INFO_DESC', 'Verzeichnisse entsprechen dem Namen ihrer zugeh�rigen phsikalischen Ordner. Wollen Sie Verzeichnisse, die Dateien enthalten, �ndern oder verschieben, haben Sie zwei Optionen. Sie k�nnen entweder das gew�nschte Ziel(unter)verzeichnis anlegen, die Elemente �ber die Medienbibliothek dorthin verschieben und das leere Ursprungsverzeichnis l�schen; oder Sie k�nnen das gesamte Ursprungsverzeichnis �ber den Button "Verzeichnis bearbeiten" �ndern und frei umbenennen. Letzteres wird alle Unterverzeichnisse und Elemente verschieben und die darauf verweisenden Blogeintr�ge anpassen.'); +@define('MEDIA_RESIZE_EXISTS', 'Datei-Dimensionen existieren bereits!'); +@define('USE_CACHE', 'Caching aktivieren'); +@define('USE_CACHE_DESC', 'Aktiviert einen internen Cache, um die Wiederholung bestimmter Datenbank-Abfragen zu umgehen. Das reduziert die Last auf Server mit mittlerem bis hohem Traffic und verbessert die Ladezeit der Seite.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Beachten Sie bitte, dass Sie ein Pr�fix verwenden m�ssen, damit Serendipity die URL korrekt der richtigen Aktion zuordnen kann. Sie d�rfen das Pr�fix in jeden beliebigen einzigartigen Namen �ndern, aber nicht komplett entfernen. Das gilt f�r alle Definitionen f�r Pfad-Pr�fixe.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Erlaube, Daten �ber lokale URLs abzurufen'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'Standardm��ig ist es aus Sicherheitsgr�nden verboten, Daten �ber lokale URLs abzurufen, um Server Side Request Forgers (SSRF) zu vermeiden. Wenn Sie ein lokales Intranet verwenden k�nnen sie die Datenabfrage �ber diese Option explizit erlauben.'); +@define('REMOTE_FILE_INVALID', 'Die angegebene URL scheint eine lokale zu sein und darf nicht abgerufen werden. Sie k�nnen dies explizit gestatten, indem Sie in der Konfiguration die Option "Erlaube, Daten �ber lokale URLs abzurufen" setzen.'); +@define('URL_NOT_FOUND', 'Die angeforderte Seite konnte nicht gefunden werden (404). Dies ist die Standardseite.'); \ No newline at end of file diff --git a/lang/serendipity_lang_en.inc.php b/lang/serendipity_lang_en.inc.php index 94d694fe..ed92bcae 100644 --- a/lang/serendipity_lang_en.inc.php +++ b/lang/serendipity_lang_en.inc.php @@ -1113,3 +1113,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_es.inc.php b/lang/serendipity_lang_es.inc.php index f747636e..666719dc 100644 --- a/lang/serendipity_lang_es.inc.php +++ b/lang/serendipity_lang_es.inc.php @@ -1130,3 +1130,10 @@ Melvin TODO [20060128]: What spanish word do we use for "referrers" ?? @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_fa.inc.php b/lang/serendipity_lang_fa.inc.php index 7a65a95d..63f13265 100644 --- a/lang/serendipity_lang_fa.inc.php +++ b/lang/serendipity_lang_fa.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_fi.inc.php b/lang/serendipity_lang_fi.inc.php index 9bec73ea..a77de5bf 100644 --- a/lang/serendipity_lang_fi.inc.php +++ b/lang/serendipity_lang_fi.inc.php @@ -1112,3 +1112,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_fr.inc.php b/lang/serendipity_lang_fr.inc.php index 7516dd69..a2a535f5 100644 --- a/lang/serendipity_lang_fr.inc.php +++ b/lang/serendipity_lang_fr.inc.php @@ -1119,3 +1119,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_hu.inc.php b/lang/serendipity_lang_hu.inc.php index 05fa2523..2ad41551 100644 --- a/lang/serendipity_lang_hu.inc.php +++ b/lang/serendipity_lang_hu.inc.php @@ -1110,3 +1110,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_is.inc.php b/lang/serendipity_lang_is.inc.php index 88f823e6..e68b5293 100644 --- a/lang/serendipity_lang_is.inc.php +++ b/lang/serendipity_lang_is.inc.php @@ -1112,3 +1112,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_it.inc.php b/lang/serendipity_lang_it.inc.php index 3361340e..a90c4d8e 100644 --- a/lang/serendipity_lang_it.inc.php +++ b/lang/serendipity_lang_it.inc.php @@ -1115,3 +1115,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_ja.inc.php b/lang/serendipity_lang_ja.inc.php index d5abe4f6..258024e8 100644 --- a/lang/serendipity_lang_ja.inc.php +++ b/lang/serendipity_lang_ja.inc.php @@ -1116,3 +1116,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_ko.inc.php b/lang/serendipity_lang_ko.inc.php index f586c982..94f4a3fd 100644 --- a/lang/serendipity_lang_ko.inc.php +++ b/lang/serendipity_lang_ko.inc.php @@ -1,8 +1,8 @@ <?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details -# Translated by: Wesley Hwang-Chung <wesley96@gmail.com> -# (c) 2005 http://www.tool-box.info/ +# Translated by: Wesley Woo-Duk Hwang-Chung <wesley96@gmail.com> +# (c) 2005, 2016 http://www.tool-box.info/ /* vim: set sts=4 ts=4 expandtab : */ @define('LANG_CHARSET', 'UTF-8'); @@ -19,7 +19,7 @@ @define('SERENDIPITY_ADMIN_SUITE', '세렌디피티 관리 도구'); @define('HAVE_TO_BE_LOGGED_ON', '이 페이지를 보려면 로그인해야 합니다'); @define('WRONG_USERNAME_OR_PASSWORD', '아이디 또는 암호가 잘못 입력되었습니다'); -@define('APPEARANCE', '시각적 요소'); +@define('APPEARANCE', '외관'); @define('MANAGE_STYLES', '스타일 관리'); @define('CONFIGURE_PLUGINS', '플러그인 설정'); @define('CONFIGURATION', '기능 설정'); @@ -31,9 +31,9 @@ @define('SAVE', '저장'); @define('NAME', '이름'); @define('CREATE_NEW_CAT', '새로운 범주 만들기'); -@define('I_WANT_THUMB', '글에 작은 그림을 적용합니다.'); -@define('I_WANT_BIG_IMAGE', '글에 큰 그림을 적용합니다.'); -@define('I_WANT_NO_LINK', '그림 자체로 보여줍니다'); +@define('I_WANT_THUMB', '글에 작은 그림으로 추가합니다.'); +@define('I_WANT_BIG_IMAGE', '글에 원본 그림으로 추가합니다.'); +@define('I_WANT_NO_LINK', '그림으로만 보여줍니다'); @define('I_WANT_IT_TO_LINK', '그림을 다음 주소의 링크로 만듭니다:'); @define('BACK', '뒤로'); @define('FORWARD', '앞으로'); @@ -51,7 +51,7 @@ @define('SAVE', '저장'); @define('UP', '위로'); @define('DOWN', '아래로'); -@define('ENTRIES', '개의 글'); +@define('ENTRIES', '블로그 글'); @define('NEW_ENTRY', '새로운 글'); @define('EDIT_ENTRIES', '글 편집하기'); @define('CATEGORIES', '범주'); @@ -69,9 +69,9 @@ @define('ADD_COMMENT', '덧글 추가'); @define('NO_COMMENTS', '덧글 없음'); @define('POSTED_BY', '작성자:'); -@define('ON', ':'); -@define('A_NEW_COMMENT_BLAHBLAH', '당신의 블로그 "%s"에 있는 "%s"(이)라는 글에 새로운 덧글이 달렸습니다.'); -@define('A_NEW_TRACKBACK_BLAHBLAH', '"%s"(이)라는 글에 새로운 트랙백이 생성되었습니다.'); +@define('ON', '작성일:'); +@define('A_NEW_COMMENT_BLAHBLAH', '당신의 블로그 "%s"에 있는 글 "%s"에 새로운 덧글이 달렸습니다.'); +@define('A_NEW_TRACKBACK_BLAHBLAH', '블로그 글 "%s"에 새로운 트랙백이 생성되었습니다.'); @define('NO_CATEGORY', '범주 없음'); @define('ENTRY_BODY', '본문'); @define('EXTENDED_BODY', '추가 내용'); @@ -102,14 +102,14 @@ @define('SHOWS_TOP_SITES', '블로그로 가장 자주 링크를 건 사이트 보기'); @define('TOP_EXITS', '상위 진출 링크'); @define('SHOWS_TOP_EXIT', '블로그에서 가장 자주 타고 나간 링크 보기'); -@define('SYNDICATION', '배급'); -@define('SHOWS_RSS_BLAHBLAH', 'RSS 배급 링크 보여주기'); +@define('SYNDICATION', '중개'); +@define('SHOWS_RSS_BLAHBLAH', 'RSS 중개 링크 보여주기'); @define('ADVERTISES_BLAHBLAH', '블로그의 제작 도구를 광고함'); @define('HTML_NUGGET', 'HTML 덩어리'); @define('HOLDS_A_BLAHBLAH', '옆줄에 HTML이 들어있는 덩어리를 넣기'); @define('TITLE_FOR_NUGGET', '덩어리 제목'); @define('THE_NUGGET', 'HTML 덩어리를 넣으세요!'); -@define('SYNDICATE_THIS_BLOG', '블로그 배급받기'); +@define('SYNDICATE_THIS_BLOG', '블로그 중개하기'); @define('YOU_CHOSE', '%s(을)를 골랐습니다'); @define('IMAGE_ROTATE_LEFT', '시계 반대방향으로 90도 회전하기'); @define('IMAGE_ROTATE_RIGHT', '시계 방향으로 90도 회전하기'); @@ -124,20 +124,20 @@ @define('VIEW_TOPICS', '주제 보기'); @define('AT', '입력:'); @define('SET_AS_TEMPLATE', '템플릿으로 지정하기'); -@define('IN', '범주:'); +@define('IN', '다음에 포함:'); @define('EXCERPT', '발췌'); @define('TRACKED', '추적됨'); @define('LINK_TO_ENTRY', '글에 대한 링크'); -@define('LINK_TO_REMOTE_ENTRY', '먼 글에 대한 링크'); +@define('LINK_TO_REMOTE_ENTRY', '원격 글에 대한 링크'); @define('IP_ADDRESS', 'IP 주소'); @define('USER', '사용자'); -@define('THUMBNAIL_USING_OWN', '%s(은)는 이미 충분히 작으므로 그 자체가 작은 그림으로도 사용됩니다.'); +@define('THUMBNAIL_USING_OWN', '%s 파일은 이미 충분히 작으므로 그 자체를 작은 그림으로도 사용합니다.'); @define('THUMBNAIL_FAILED_COPY', '%s 자체를 작은 그림으로 사용하려고 했으나 복사에 실패했습니다.'); @define('AUTHOR', '작성자'); @define('LAST_UPDATED', '최종 업데이트'); @define('TRACKBACK_SPECIFIC', '이 글에 대한 트랙백 전용 URI'); @define('DIRECT_LINK', '이 글에 대한 직접 링크'); -@define('COMMENT_ADDED', '덧글이 성공적으로 달렸습니다. '); +@define('COMMENT_ADDED', '덧글이 성공적으로 달렸습니다.'); @define('COMMENT_ADDED_CLICK', '%s여기를 눌러%s 덧글 목록으로 돌아가거나 %s여기를 눌러%s 이 창을 닫습니다.'); @define('COMMENT_NOT_ADDED_CLICK', '%s여기를 눌러%s 덧글 목록으로 돌아가거나 %s여기를 눌러%s 이 창을 닫습니다.'); @define('COMMENTS_DISABLE', '이 글에 덧글을 금지하기'); @@ -145,10 +145,10 @@ @define('COMMENTS_CLOSED', '작성자가 이 글에 덧글을 금지했습니다'); @define('EMPTY_COMMENT', '덧글 내용이 비어 있으므로 %s돌아가서%s 다시 작성하십시오'); @define('ENTRIES_FOR', '%s: 작성된 글'); -@define('DOCUMENT_NOT_FOUND', '%s라는 문서를 찾지 못했습니다.'); +@define('DOCUMENT_NOT_FOUND', '%s(이)라는 문서를 찾지 못했습니다.'); @define('USERNAME', '아이디'); @define('PASSWORD', '암호'); -@define('AUTOMATIC_LOGIN', '정보 저장'); +@define('AUTOMATIC_LOGIN', '로그인 정보 저장'); @define('SERENDIPITY_INSTALLATION', '세렌디피티 설치'); @define('LEFT', '왼쪽'); @define('RIGHT', '오른쪽'); @@ -168,7 +168,7 @@ @define('CATEGORY_SAVED', '범주가 저장되었습니다'); @define('SELECT_TEMPLATE', '블로그에 사용할 템플릿을 선택하십시오.'); @define('ENTRIES_NOT_SUCCESSFULLY_INSERTED', '글이 성공적으로 삽입되지 않았습니다.'); -@define('MT_DATA_FILE', '이동 가능 형태의 데이터 파일'); +@define('MT_DATA_FILE', '무버블 타입 웹로그용 데이터 파일'); @define('FORCE', '강제로'); @define('CREATE_AUTHOR', '작성자 \'%s\'(을)를 생성합니다.'); @define('CREATE_CATEGORY', '범주 \'%s\'(을)를 생성합니다.'); @@ -204,14 +204,14 @@ @define('RESIZING', '크기 조절중'); @define('RESIZE_DONE', '완료 (%s개의 그림의 크기를 조절함).'); @define('SYNCING', '데이터베이스를 그림 폴더와 동기화합니다'); -@define('SYNC_OPTION_LEGEND', 'Thumbnail Synchronization Options'); -@define('SYNC_OPTION_KEEPTHUMBS', 'Keep all existing thumbnails'); -@define('SYNC_OPTION_SIZECHECKTHUMBS', 'Keep existing thumbnails only if they are the correct size'); -@define('SYNC_OPTION_DELETETHUMBS', 'Regenerate all thumbnails'); +@define('SYNC_OPTION_LEGEND', '작은 그림 동기화 선택사항'); +@define('SYNC_OPTION_KEEPTHUMBS', '기존의 작은 그림 모두 유지'); +@define('SYNC_OPTION_SIZECHECKTHUMBS', '알맞은 크기일 경우일 때만 기존의 작은 그림 유지'); +@define('SYNC_OPTION_DELETETHUMBS', '작은 그림 모두 재생성'); @define('SYNC_DONE', '완료 (%s개의 그림을 동기화함).'); -@define('FILE_NOT_FOUND', '<b>%s</b>라는 이름의 파일을 찾지 못했습니다. 이미 삭제되었을 수 있습니다.'); +@define('FILE_NOT_FOUND', '<b>%s</b>(이)라는 이름의 파일을 찾지 못했습니다. 이미 삭제되었을 수 있습니다.'); @define('ABORT_NOW', '지금 중지'); -@define('REMOTE_FILE_NOT_FOUND', '원격 서버에서 파일을 찾지 못했습니다. <b>%s</b> (이)라는 주소가 정확합니까?'); +@define('REMOTE_FILE_NOT_FOUND', '원격 서버에서 파일을 찾지 못했습니다. <b>%s</b>(이)라는 주소가 정확합니까?'); @define('FILE_FETCHED', '%s(을)를 %s(으)로 가져옴'); @define('FILE_UPLOADED', '파일 %s(이)가 %s(으)로 성공적으로 업로드되었습니다'); @define('WORD_OR', '또는'); @@ -231,8 +231,8 @@ @define('SYNDICATION_PLUGIN_20', 'RSS 2.0 피드'); @define('SYNDICATION_PLUGIN_20c', 'RSS 2.0 덧글'); @define('SYNDICATION_PLUGIN_ATOM03', 'ATOM 0.3 피드'); -@define('SYNDICATION_PLUGIN_MANAGINGEDITOR', '"managingEditor" 필드'); -@define('SYNDICATION_PLUGIN_WEBMASTER', '"webMaster" 필드'); +@define('SYNDICATION_PLUGIN_MANAGINGEDITOR', '"managingEditor"(편집인) 필드'); +@define('SYNDICATION_PLUGIN_WEBMASTER', '"webMaster"(웹마스터) 필드'); @define('SYNDICATION_PLUGIN_BANNERURL', 'RSS 피드를 위한 그림 파일'); @define('SYNDICATION_PLUGIN_BANNERWIDTH', '그림 폭'); @define('SYNDICATION_PLUGIN_BANNERHEIGHT', '그림 높이'); @@ -241,9 +241,9 @@ @define('SYNDICATION_PLUGIN_BANNERURL_DESC', 'GIF/JPEG/PNG로 된 그림 파일의 주소 (빈 상태: 세렌디피티 로고 그림)'); @define('SYNDICATION_PLUGIN_BANNERWIDTH_DESC', '픽셀 단위 (최고 144)'); @define('SYNDICATION_PLUGIN_BANNERHEIGHT_DESC', '픽셀 단위 (최고 400)'); -@define('SYNDICATION_PLUGIN_TTL', '"ttl" 필드 (생존시간)'); +@define('SYNDICATION_PLUGIN_TTL', '"ttl"(생존시간) 필드'); @define('SYNDICATION_PLUGIN_TTL_DESC', '외부 사이트 또는 프로그램에 의해서 더 이상 저장되지 않을 시점을 분 단위로 입력 (빈 상태: 숨김) [RSS 2.0]'); -@define('SYNDICATION_PLUGIN_PUBDATE', '"pubDate" 필드'); +@define('SYNDICATION_PLUGIN_PUBDATE', '"pubDate"(게시일자) 필드'); @define('SYNDICATION_PLUGIN_PUBDATE_DESC', 'RSS 채널에 "pubDate" 필드를 넣어서 최신으로 올라온 글의 날짜를 보여주겠습니까?'); @define('CONTENT', '내용'); @define('TYPE', '종류'); @@ -277,12 +277,12 @@ @define('SORT_ORDER_WIDTH', '그림 폭'); @define('SORT_ORDER_HEIGHT', '그림 높이'); @define('SORT_ORDER_DATE', '업로드 시간'); -@define('SORT_ORDER_ASC', '오름차'); -@define('SORT_ORDER_DESC', '내림차'); +@define('SORT_ORDER_ASC', '오름차순'); +@define('SORT_ORDER_DESC', '내림차순'); @define('THUMBNAIL_SHORT', '작은 그림'); -@define('ORIGINAL_SHORT', '원래 그림'); +@define('ORIGINAL_SHORT', '원본 그림'); @define('APPLY_MARKUP_TO', '%s에 마크업 적용'); -@define('CALENDAR_BEGINNING_OF_WEEK', '한 주의 시작점'); +@define('CALENDAR_BEGINNING_OF_WEEK', '한 주의 시작일'); @define('SERENDIPITY_NEEDS_UPGRADE', '세렌디피티 현재 설치 버전이 %s인 것으로 나타났습니다. 버전 %s로 업그레이드를 계속 진행하려면 <a href="%s">여기</a>를 누르십시오.'); @define('SERENDIPITY_UPGRADER_WELCOME', '세렌디피티 업그레이드 에이전트에 오신 것을 환영합니다.'); @define('SERENDIPITY_UPGRADER_PURPOSE', '설치된 세렌디피티 %s의 업그레이드를 도와드리겠습니다.'); @@ -306,12 +306,12 @@ @define('CREATED_USER', '새로운 사용자 %s(이)가 생성되었습니다'); @define('MODIFIED_USER', '%s의 설정이 변경되었습니다'); @define('USER_LEVEL', '사용자 레벨'); -@define('DELETE_USER', '사용자 %d번인 %s(을)를 삭제하게 됩니다. 계속 하시겠습니까? 이 사용자가 작성한 글이 더 이상 일반 페이지에 나타나지 않게 됩니다.'); -@define('DELETED_USER', '사용자 %d번인 %s(이)가 삭제되었습니다.'); +@define('DELETE_USER', '%d번 사용자인 %s(을)를 삭제하게 됩니다. 계속 하시겠습니까? 이 사용자가 작성한 글이 더 이상 외부 페이지에 나타나지 않게 됩니다.'); +@define('DELETED_USER', '%d번 사용자인 %s(이)가 삭제되었습니다.'); @define('LIMIT_TO_NUMBER', '몇 개의 아이템을 표시하겠습니까?'); @define('ENTRIES_PER_PAGE', '한 페이지에 표시할 글'); @define('XML_IMAGE_TO_DISPLAY', 'XML 버튼'); -@define('XML_IMAGE_TO_DISPLAY_DESC','XML 피드에 이 그림이 나타납니다. 비운 상태면 기본 그림이 보이고 \'none\'을 입력하면 나타나지 않습니다.'); +@define('XML_IMAGE_TO_DISPLAY_DESC','XML 피드에 이 그림이 나타납니다. 비운 상태면 기본 그림이 보이고 \'없음\'을 입력하면 나타나지 않습니다.'); @define('DIRECTORIES_AVAILABLE', '하위 디렉토리 목록에서 디렉토리 이름을 누르면 그 디렉토리 안에 새 디렉토리를 만들 수 있습니다.'); @define('ALL_DIRECTORIES', '모든 디렉토리'); @@ -320,8 +320,8 @@ @define('PARENT_DIRECTORY', '상위 디렉토리'); @define('CONFIRM_DELETE_DIRECTORY', '디렉토리 %s에 포함된 모든 내용을 삭제하겠습니까?'); @define('ERROR_NO_DIRECTORY', '오류: 디렉토리 %s(이)가 존재하지 않습니다'); -@define('CHECKING_DIRECTORY', '디렉토리 %s 내의 파일 점검중'); -@define('DELETING_FILE', '파일 %s 삭제중...'); +@define('CHECKING_DIRECTORY', '디렉토리 %s 내의 파일 점검 중'); +@define('DELETING_FILE', '파일 %s 삭제 중...'); @define('ERROR_DIRECTORY_NOT_EMPTY', '비어 있지 않은 디렉토리를 삭제할 수 없습니다. 남아있는 파일도 제거하려면 "강제 삭제"를 체크하고 다시 시도하십시오. 남아있는 파일은:'); @define('DIRECTORY_DELETE_FAILED', '디렉토리 %s 삭제에 실패했습니다. 권한 설정이나 위의 메시지를 확인하십시오.'); @define('DIRECTORY_DELETE_SUCCESS', '디렉토리 %s(이)가 성공적으로 삭제되었습니다.'); @@ -334,10 +334,10 @@ @define('TOP_LEVEL', '최상위 (본문)'); @define('SYNDICATION_PLUGIN_GENERIC_FEED', '%s 피드'); @define('PERMISSIONS', '권한 설정'); -@define('INTEGRITY', 'Verify Installation Integrity'); -@define('CHECKSUMS_NOT_FOUND', 'Unable to compare checksums! (No checksums.inc.php in main directory)'); -@define('CHECKSUMS_PASS', 'All required files verified.'); -@define('CHECKSUM_FAILED', '%s corrupt or modified: failed verification'); +@define('INTEGRITY', '설치상태 무결성 검증'); +@define('CHECKSUMS_NOT_FOUND', '체크섬을 비교하지 못했습니다! (메인 디렉토리에 checksums.inc.php 파일이 없음)'); +@define('CHECKSUMS_PASS', '필수 파일이 모두 검증되었습니다.'); +@define('CHECKSUM_FAILED', '%s 파일이 손상되거나 수정되었습니다: 검증 실패'); @define('SETTINGS_SAVED_AT', '새로운 설정이 %s에 저장되었습니다'); /* DATABASE SETTINGS */ @@ -358,19 +358,19 @@ /* PATHS */ @define('INSTALL_CAT_PATHS', '경로'); -@define('INSTALL_CAT_PATHS_DESC', '필수 디렉토리 및 파일에 대한 경로를 지정합니다. 디렉토리 끝에 슬래시 추가하는 것을 잊지 마십시오.'); +@define('INSTALL_CAT_PATHS_DESC', '필수 디렉토리 및 파일에 대한 경로를 지정합니다. 디렉토리 끝에 슬래시(/) 추가하는 것을 잊지 마십시오.'); @define('INSTALL_FULLPATH', '전체 경로'); -@define('INSTALL_FULLPATH_DESC', '세렌디피티 설치 위치의 절대 경로'); +@define('INSTALL_FULLPATH_DESC', '세렌디피티 설치 위치의 절대적이고 전체적인 경로'); @define('INSTALL_UPLOADPATH', '업로드 경로'); -@define('INSTALL_UPLOADPATH_DESC', '업로드된 파일이 저장되는 위치로써 \'전체 경로\'에 대한 상대 경로임 - 일반적으로 \'uploads/\''); +@define('INSTALL_UPLOADPATH_DESC', '업로드된 파일이 저장되는 위치로서 \'전체 경로\'에 대한 상대 경로 - 일반적으로 \'uploads/\''); @define('INSTALL_RELPATH', '상대 경로'); -@define('INSTALL_RELPATH_DESC', '브라우저에 나타날 세렌디피티의 경로임 - 일반적으로 \'/serendipity/\''); +@define('INSTALL_RELPATH_DESC', '브라우저에 나타날 세렌디피티의 경로 - 일반적으로 \'/serendipity/\''); @define('INSTALL_RELTEMPLPATH', '템플릿 상대 경로'); -@define('INSTALL_RELTEMPLPATH_DESC', '템플릿이 저장된 디렉토리의 경로로써 \'상대 경로\'에 대한 상대 경로임'); +@define('INSTALL_RELTEMPLPATH_DESC', '템플릿이 저장된 디렉토리의 경로로서 \'상대 경로\'를 기준으로 한 상대 경로'); @define('INSTALL_RELUPLOADPATH', '업로드 상대 경로'); -@define('INSTALL_RELUPLOADPATH_DESC', '브라우저에 나타날 업로드 경로로써 \'상대 경로\'에 대한 상대 경로임'); +@define('INSTALL_RELUPLOADPATH_DESC', '브라우저에 나타날 업로드 경로로서 \'상대 경로\'를 기준으로 한 상대 경로'); @define('INSTALL_URL', '블로그 주소'); -@define('INSTALL_URL_DESC', '세렌디피티 설치가 된 기본 인터넷 주소'); +@define('INSTALL_URL_DESC', '세렌디피티가 설치된 기본 인터넷 주소(URL)'); @define('INSTALL_INDEXFILE', '인덱스 파일'); @define('INSTALL_INDEXFILE_DESC', '세렌디피티 인덱스 파일의 이름'); @@ -390,13 +390,13 @@ @define('INSTALL_BLOGNAME', '블로그 이름'); @define('INSTALL_BLOGNAME_DESC', '블로그에 사용할 제목'); @define('INSTALL_BLOGDESC', '블로그 설명'); -@define('INSTALL_BLOGDESC_DESC', '블로그의 내용을 적음'); +@define('INSTALL_BLOGDESC_DESC', '블로그를 설명하는 내용을 적음'); @define('INSTALL_LANG', '언어'); @define('INSTALL_LANG_DESC', '블로그에 사용할 언어 선택'); /* APPEARANCE AND OPTIONS */ -@define('INSTALL_CAT_DISPLAY', '시각적 요소 및 옵션'); -@define('INSTALL_CAT_DISPLAY_DESC', '세렌디피티의 직관적인 모습과 느낌을 정합니다.'); +@define('INSTALL_CAT_DISPLAY', '외관 및 선택사항'); +@define('INSTALL_CAT_DISPLAY_DESC', '세렌디피티의 겉모습과 인상을 정합니다.'); @define('INSTALL_WYSIWYG', 'WYSIWYG 편집기 사용'); @define('INSTALL_WYSIWYG_DESC', 'WYSIWYG 편집기를 사용하겠습니까? (인터넷 익스플로러 5 이상에서 작동, 모질라 1.3 이상에서 부분 작동)'); @define('INSTALL_XHTML11', 'XHTML 1.1 규격을 강제로 따름'); @@ -406,31 +406,31 @@ @define('INSTALL_EMBED', '세렌디피티가 내장된 형태입니까?'); @define('INSTALL_EMBED_DESC', '일반 페이지 속에 세렌디피티를 내장시키려면 "예"를 선택하여 헤더가 제외된 내용 부분만 출력시키게 합니다. indexFile 옵션을 사용하여 일반적인 웹페이지 헤더에 wrapper 클래스를 적용할 수 있습니다. 보다 자세한 사항은 README 파일을 참조하십시오.'); @define('INSTALL_TOP_AS_LINKS', '상위 진출/진입 사항을 링크로 표시'); -@define('INSTALL_TOP_AS_LINKS_DESC', '"아니오": 구글 스팸을 방지하기 위해 진출 및 진입 사항을 일반 글로 표시합니다. "예": 진출 및 진입 사항에 링크를 겁니다. "기본값": 젠체 설정에 따릅니다(추천).'); -@define('INSTALL_BLOCKREF', '진입 표시 통제'); -@define('INSTALL_BLOCKREF_DESC', '진입 사항에 표시되지 않았으면 하는 호스트가 있을 경우 각 호스트를 \';\'로 분리해서 입력합니다. 표시 통제는 부분 검색을 사용합니다(지정한 이름이 호스트의 일부일 경우 통제됨).'); -@define('INSTALL_REWRITE', '주소 재기록'); -@define('INSTALL_REWRITE_DESC', '주소 생성시 사용할 규칙을 정합니다. 재기록 규칙을 활성화시키면 블로그에 대한 주소가 깔끔해지고 구글과 같은 검색엔진에 의해 인덱싱이 잘 됩니다. 웹서버가 세렌디피티 디렉토리에 대해 mod_rewrite나 "AllowOverride All"을 지원해야 합니다. 기본 설정은 자동 검출됩니다.'); +@define('INSTALL_TOP_AS_LINKS_DESC', '"아니오": 구글 스팸을 방지하기 위해 진출 및 진입 사항을 일반 글로 표시합니다. "예": 진출 및 진입 사항에 링크를 겁니다. "기본값": 전체 설정에 따릅니다(추천).'); +@define('INSTALL_BLOCKREF', '차단된 진입 경로'); +@define('INSTALL_BLOCKREF_DESC', '진입 사항에 표시되지 않았으면 하는 호스트가 있을 경우 각 호스트를 \';\'로 분리해서 입력합니다. 글자 일부분이 일치해도 차단됨에 유의하십시오(지정한 이름이 호스트의 일부일 경우 차단됨).'); +@define('INSTALL_REWRITE', '인터넷 주소(URL) 재작성'); +@define('INSTALL_REWRITE_DESC', '인터넷 주소 생성시 사용할 규칙을 정합니다. 재작성 규칙을 활성화시키면 블로그에 대한 주소가 깔끔해지고 구글과 같은 검색엔진에 의해 인덱싱이 잘 됩니다. 웹서버가 세렌디피티 디렉토리에 대해 mod_rewrite나 "AllowOverride All"을 지원해야 합니다. 기본 설정은 자동 인식됩니다.'); /* IMAGECONVERSION SETTINGS */ @define('INSTALL_CAT_IMAGECONV', '그림 변환 설정'); @define('INSTALL_CAT_IMAGECONV_DESC', '세렌디피티가 그림을 어떻게 다룰지에 대한 정보를 입력합니다.'); @define('INSTALL_IMAGEMAGICK', 'ImageMagick 사용하기'); -@define('INSTALL_IMAGEMAGICK_DESC', 'ImageMagick이 설치되어 있으며 그림 크기를 조절하는데 사용하겠습니까?'); +@define('INSTALL_IMAGEMAGICK_DESC', 'ImageMagick이 설치되어 있으며 이를 그림 크기 조절에 사용하겠습니까?'); @define('INSTALL_IMAGEMAGICKPATH', '변환 바이너리 경로'); -@define('INSTALL_IMAGEMAGICKPATH_DESC', 'ImageMagick의 변환 바이너리(프로그램)의 이름 및 전체 경로'); +@define('INSTALL_IMAGEMAGICKPATH_DESC', 'ImageMagick 변환 바이너리(프로그램)의 이름 및 전체 경로'); @define('INSTALL_THUMBSUFFIX', '작은 그림 접두사'); @define('INSTALL_THUMBSUFFIX_DESC', '작은 그림은 원래이름.[접두사].확장자 식의 이름으로 생성됩니다'); -@define('INSTALL_THUMBWIDTH', '작은 그림 크기'); +@define('INSTALL_THUMBWIDTH', '작은 그림의 최대 크기'); @define('INSTALL_THUMBWIDTH_DESC', '자동 생성되는 작은 그림의 최대 크기'); -@define('INSTALL_THUMBDIM', 'Thumbnail constrained dimension'); -@define('INSTALL_THUMBDIM_LARGEST', 'Largest'); -@define('INSTALL_THUMBDIM_WIDTH', 'Width'); -@define('INSTALL_THUMBDIM_HEIGHT', 'Height'); -@define('INSTALL_THUMBDIM_DESC', 'Dimension to be constrained to the thumbnail max size. The default "' . - INSTALL_THUMBDIM_LARGEST . '" limits both dimensions, so neither can be greater than the max size; "' . - INSTALL_THUMBDIM_WIDTH . '" and "' . INSTALL_THUMBDIM_HEIGHT . - '" only limit the chosen dimension, so the other could be larger than the max size.'); +@define('INSTALL_THUMBDIM', '작은 그림의 최대 크기 제약 기준'); +@define('INSTALL_THUMBDIM_LARGEST', '양방향 모두'); +@define('INSTALL_THUMBDIM_WIDTH', '폭'); +@define('INSTALL_THUMBDIM_HEIGHT', '높이'); +@define('INSTALL_THUMBDIM_DESC', '작은 그림의 최대 크기를 정하기 위한 제약의 기준. 기본값인 "' . + INSTALL_THUMBDIM_LARGEST . '" 선택 시 폭과 높이를 모두 제한하므로 어느 쪽도 최대 크기를 초과할 수 없으며 "' . + INSTALL_THUMBDIM_WIDTH . '"과 "' . INSTALL_THUMBDIM_HEIGHT . + '"는 선택된 방향으로만 제한하므로 다른 한 방향은 최대 크기보다 클 수 있습니다.'); /* Personal details */ @define('USERCONF_CAT_PERSONAL', '사용자의 개인 정보'); @@ -449,7 +449,7 @@ @define('USERCONF_ALLOWPUBLISH_DESC', '이 사용자가 글을 작성할 권한이 있습니까?'); @define('SUCCESS', '성공'); @define('POWERED_BY_SHOW_TEXT', '"세렌디피티"를 텍스트로 출력'); -@define('POWERED_BY_SHOW_TEXT_DESC', '"세렌디피티 웨블로그"를 텍스트로 출력함'); +@define('POWERED_BY_SHOW_TEXT_DESC', '"세렌디피티 웹로그"를 텍스트로 출력함'); @define('POWERED_BY_SHOW_IMAGE', '"세렌디피티"를 로고로 출력'); @define('POWERED_BY_SHOW_IMAGE_DESC', '세렌디피티 로고를 보여줌'); @define('PLUGIN_ITEM_DISPLAY', '아이템이 어디에 표시됩니까?'); @@ -481,7 +481,7 @@ @define('PLUGIN_SUPERUSER_HTTPS', '로그인에 https 사용'); @define('PLUGIN_SUPERUSER_HTTPS_DESC', '로그인 링크가 https 위치로 향하도록 합니다. 웹서버가 이 기능을 지원해야 합니다.'); @define('INSTALL_SHOW_EXTERNAL_LINKS', '외부 링크를 클릭할 수 있게 하기'); -@define('INSTALL_SHOW_EXTERNAL_LINKS_DESC', '"아니오": 확인되지 않은 외부 링크(상위 진출, 상위 진입, 사용자 덧글)는 보여지지 않거나 일반 텍스트로 표시되어 구글 스팸을 방지합니다(추천). "예": 확인되지 않은 외부 링크가 하이퍼링크로 걸립니다. 옆줄 플러그인 설정에서 별도로 정할 수 있습니다.'); +@define('INSTALL_SHOW_EXTERNAL_LINKS_DESC', '"아니오": 확인되지 않은 외부 링크(상위 진출, 상위 진입, 사용자 덧글)는 보여지지 않거나 일반 텍스트로 표시되어 구글 스팸을 방지합니다(추천). "예": 확인되지 않은 외부 링크가 하이퍼링크로 나타납니다. 옆줄 플러그인 설정에서 별도로 정할 수 있습니다.'); @define('PAGE_BROWSE_COMMENTS', '%s번째 페이지 | 총 %s 페이지 | 총 %s개 덧글'); @define('FILTERS', '필터'); @define('FIND_ENTRIES', '글 찾기'); @@ -489,7 +489,7 @@ @define('FIND_MEDIA', '미디어 찾기'); @define('FILTER_DIRECTORY', '디렉토리'); @define('SORT_BY', '정렬 순서'); -@define('TRACKBACK_COULD_NOT_CONNECT', '트랙백이 보내지지 않음: %s에 대해서 포트 %d에서 열 수 없었음'); +@define('TRACKBACK_COULD_NOT_CONNECT', '트랙백이 보내지지 않음: %s애서 %d번 포트를 열 수 없었음'); @define('MEDIA', '미디어'); @define('MEDIA_LIBRARY', '미디어 보관함'); @define('ADD_MEDIA', '미디어 추가'); @@ -525,10 +525,10 @@ @define('TRACKBACK_SENT', '트랙백 성공'); @define('TRACKBACK_FAILED', '트랙백 실패: %s'); @define('TRACKBACK_NOT_FOUND', '트랙백 URI를 찾지 못했습니다.'); -@define('TRACKBACK_URI_MISMATCH', '자동 검색된 트랙백 URI는 목표 URI와 맞지 않습니다.'); +@define('TRACKBACK_URI_MISMATCH', '자동 검색된 트랙백 URI는 대상 URI와 맞지 않습니다.'); @define('TRACKBACK_CHECKING', '트랙백이 있는지 <u>%s</u> 확인중...'); -@define('TRACKBACK_NO_DATA', '목표가 데이터를 담고 있지 않습니다.'); -@define('TRACKBACK_SIZE', '목표 URI가 최개 파일 크기인 %s 바이트를 초과합니다.'); +@define('TRACKBACK_NO_DATA', '대상이 데이터를 담고 있지 않습니다.'); +@define('TRACKBACK_SIZE', '대상 URI가 최대 파일 크기인 %s 바이트를 초과합니다.'); @define('COMMENTS_VIEWMODE_THREADED', '엮은 형태'); @define('COMMENTS_VIEWMODE_LINEAR', '나열 형태'); @define('DISPLAY_COMMENTS_AS', '덧글 표시 방식:'); @@ -543,7 +543,7 @@ @define('MONTHS', '월'); @define('DAYS', '일'); @define('ARCHIVE_FREQUENCY', '표시 아이템의 주기'); -@define('ARCHIVE_FREQUENCY_DESC', '목록에 있는 각 아이템의 달력 상의 주기 단위'); +@define('ARCHIVE_FREQUENCY_DESC', '목록에 있는 각 아이템의 달력 상 주기 단위'); @define('ARCHIVE_COUNT', '목록에 표시될 아이템 수'); @define('ARCHIVE_COUNT_DESC', '표시할 달, 주, 또는 날의 총 개수'); @define('BELOW_IS_A_LIST_OF_INSTALLED_PLUGINS', '설치된 플러그인의 목록입니다.'); @@ -555,9 +555,11 @@ @define('ALREADY_INSTALLED', '이미 설치됨'); @define('SELECT_A_PLUGIN_TO_ADD', '설치하고 싶은 플러그인을 선택하십시오.'); @define('INSTALL_OFFSET', '서버 시간과의 시간 차이'); +@define('INSTALL_OFFSET_ON_SERVER_TIME', '서버 시간대를 기준으로 차이를 설정합니까?'); +@define('INSTALL_OFFSET_ON_SERVER_TIME_DESC', '서버 시간대를 기준으로 글의 표시 시간 차이를 설정할지의 여부를 정합니다. 예를 고르면 서버 시간대를 기준으로 하고 아니오를 고르면 GMT를 기준으로 합니다.'); @define('STICKY_POSTINGS', '꼭대기에 표시할 글'); @define('INSTALL_FETCHLIMIT', '한 페이지에 표시할 글 수'); -@define('INSTALL_FETCHLIMIT_DESC', '일반 페이지 각각에 표시할 글의 수'); +@define('INSTALL_FETCHLIMIT_DESC', '각 외부 페이지에 표시할 글의 수'); @define('IMPORT_ENTRIES', '데이터 불러오기'); @define('EXPORT_ENTRIES', '글 내보내기'); @define('IMPORT_WELCOME', '세렌디피티의 데이터 불러오기 유틸리티입니다'); @@ -576,13 +578,13 @@ @define('ACTIVATE_AUTODISCOVERY', '글 속에 발견된 링크로 트랙백을 보냄'); @define('WELCOME_TO_ADMIN', '세렌디피티 관리 도구에 오신 것을 환영합니다.'); @define('PLEASE_ENTER_CREDENTIALS', '인증 정보를 아래에 입력하십시오.'); -@define('ADMIN_FOOTER_POWERED_BY', '세렌디피티 %s 및 PHP %s로 작성되었습니다.'); +@define('ADMIN_FOOTER_POWERED_BY', '세렌디피티 %s 및 PHP %s(으)로 작성되었습니다.'); @define('INSTALL_USEGZIP', 'Gzip 압축 페이지 사용'); -@define('INSTALL_USEGZIP_DESC', '페이지 전송 속도를 향상시키기 위해, 사용자의 브라우저가 기능 지원을 할 경우 페이지를 압축해서 전송할 수 있습니다. 추천 사항입니다.'); +@define('INSTALL_USEGZIP_DESC', '사용자의 브라우저가 지원을 할 경우 페이지 전송 속도를 향상시키기 위해 페이지를 압축해서 전송할 수 있습니다. 추천 사항입니다.'); @define('INSTALL_SHOWFUTURE', '미래에 작성한 글 보이기'); @define('INSTALL_SHOWFUTURE_DESC', '이 기능을 사용할 경우 작성 날짜가 미래인 글도 모두 블로그에 표시하게 됩니다. 기본값은 이러한 글을 작성 날짜가 다다를 때까지 숨기는 것입니다.'); @define('INSTALL_DBPERSISTENT', '지속적인 접속 사용'); -@define('INSTALL_DBPERSISTENT_DESC', '지속적으로 데이터페이스에 접속하는 기능을 사용합니다. <a href="http://php.net/manual/features.persistent-connections.php" target="_blank">여기에서</a> 자세한 정보를 읽을 수 있습니다. 일반적으로 비추천 사항입니다.'); +@define('INSTALL_DBPERSISTENT_DESC', '지속적으로 데이터페이스에 접속하는 기능을 사용합니다. <a href="http://php.net/manual/features.persistent-connections.php" target="_blank">여기에서</a> 자세한 정보를 읽을 수 있습니다. 일반적으로 추천하지 않습니다.'); @define('NO_IMAGES_FOUND', '그림이 없습니다'); @define('PERSONAL_SETTINGS', '개인 설정'); @define('REFERER', '진입 경로'); @@ -606,7 +608,7 @@ @define('THEY_DONT', '그렇지 않음'); @define('SIMPLE_INSTALLATION', '간단한 설치'); @define('EXPERT_INSTALLATION', '전문가 설치'); -@define('COMPLETE_INSTALLATION', '설치 끝내기'); +@define('COMPLETE_INSTALLATION', '설치 완료하기'); @define('WONT_INSTALL_DB_AGAIN', '데이터베이스를 다시 설치하지 않습니다'); @define('CHECK_DATABASE_EXISTS', '데이터베이스 및 테이블이 이미 존재하는지 확인합니다'); @define('CREATING_PRIMARY_AUTHOR', '기본 작성자 \'%s\' 생성중'); @@ -629,26 +631,26 @@ @define('PROBLEM_PERMISSIONS_HOWTO', '권한 설정은 문제가 발생한 디렉토리에 대해 쉘 명령어 `<em>%s</em>`를 실행하거나 FTP 프로그램을 통해 이를 설정함으로써 바로잡을 수 있습니다.'); @define('WARNING_TEMPLATE_DEPRECATED', '경고: 사용중인 템플릿이 구식 템플릿 방식을 사용하고 있습니다. 가능하다면 업데이트 하십시오.'); @define('ENTRY_PUBLISHED_FUTURE', '이 글은 아직 게시되지 않았습니다.'); -@define('ENTRIES_BY', '%s에 의한 글'); +@define('ENTRIES_BY', '%s의 글'); @define('PREVIOUS', '이전'); @define('NEXT', '다음'); @define('APPROVE', '승인'); @define('DO_MARKUP_DESCRIPTION', '텍스트에 마크업 변환(이모티콘, *, /, _ 등을 활용한 마크업)을 적용합니다. 사용하지 않으면 입력한 HTML 코드가 모두 보존됩니다.'); @define('CATEGORY_ALREADY_EXIST', '"%s"(이)라는 범주가 이미 존재합니다.'); -@define('ERROR_FILE_FORBIDDEN', '액티브 컨텐츠가 담긴 파일을 업로드할 수 없습니다.'); +@define('ERROR_FILE_FORBIDDEN', '사용 중인 내용이 담긴 파일을 업로드할 수 없습니다.'); @define('ADMIN', '관리 사항'); @define('ADMIN_FRONTPAGE', '기본 페이지'); @define('QUOTE', '인용'); @define('IFRAME_SAVE', '세렌디피티가 글을 저장하면서 트랙백을 생성하고 XML-RPC 호출을 수행하는 중입니다. 약간 시간이 걸릴 수 있습니다.'); @define('IFRAME_SAVE_DRAFT', '이 글의 초안이 저장되었습니다.'); @define('IFRAME_PREVIEW', '세렌디피티가 미리보기를 생성하고 있습니다...'); -@define('IFRAME_WARNING', '브라우저가 iframes에 대한 개념을 지원하지 않습니다. serendipity_config.inc.php 파일을 열어서 $serendipity[\'use_iframe\'] 변수를 FALSE로 설정하십시오.'); +@define('IFRAME_WARNING', '브라우저가 iframe에 대한 개념을 지원하지 않습니다. serendipity_config.inc.php 파일을 열어서 $serendipity[\'use_iframe\'] 변수를 FALSE로 설정하십시오.'); @define('NONE', '없음'); @define('USERCONF_CAT_DEFAULT_NEW_ENTRY', '새 글에 대한 기본 설정'); @define('UPGRADE', '업그레이드'); @define('UPGRADE_TO_VERSION', '버전 %s(으)로 업그레이드'); @define('DELETE_DIRECTORY', '디렉토리 삭제'); -@define('DELETE_DIRECTORY_DESC', '미디어 파일이 담긴 디렉토리의 내용을 삭제하려고 합니다. 이 파일들은 본문에 사용중일 수 있습니다.'); +@define('DELETE_DIRECTORY_DESC', '미디어 파일이 담긴 디렉토리의 내용을 삭제하려고 합니다. 이 파일들은 본문에 사용 중일 수 있습니다.'); @define('FORCE_DELETE', '이 디렉토리에 있는 모든 파일 (세렌디피티가 모르는 종류 포함) 삭제'); @define('CREATE_DIRECTORY', '디렉토리 생성'); @define('CREATE_NEW_DIRECTORY', '새 디렉토리 생성'); @@ -664,24 +666,24 @@ @define('RECHECK_INSTALLATION', '설치 상태 재확인 필요'); @define('IMAGICK_EXEC_ERROR', '실행할 수 없음: "%s", 오류: %s, 리턴 변수: %d'); @define('INSTALL_OFFSET_DESC', '웹서버의 시간(현재: %clock%)과 사용자의 시간대와의 차이를 시간 단위로 입력함'); -@define('UNMET_REQUIREMENTS', '요구사항 불충족: %s'); +@define('UNMET_REQUIREMENTS', '요구사항 미달: %s'); @define('CHARSET', '문자열 종류'); @define('AUTOLANG', '방문자의 브라우저 언어 설정을 기본으로 따름'); @define('AUTOLANG_DESC', '사용할 경우 방문자의 브라우저 언어 설정을 확인하여 화면에 표시되는 언어 및 글의 언어를 결정합니다.'); @define('INSTALL_AUTODETECT_URL', '사용된 HTTP 호스트를 자동 감지'); @define('INSTALL_AUTODETECT_URL_DESC', '사용할 경우 방문자가 사용한 HTTP 호스트를 세렌디피티가 기본 인터넷 주소로 쓰게 됩니다. 이렇게 되면 세렌디피티 블로그를 여러 개의 도메인 이름 하에 사용할 수 있게 되며, 해당 도메인을 방문자가 블로그를 방문하는데 사용한 추가 링크에 사용할 수 있게 됩니다.'); -@define('CONVERT_HTMLENTITIES', 'HTML 본체 자동 변환을 시도하겠습니까?'); +@define('CONVERT_HTMLENTITIES', 'HTML 엔티티로 표현된 문자의 자동 변환을 시도하겠습니까?'); @define('EMPTY_SETTING', '"%s"에 대한 유효한 값을 지정하지 않았습니다.'); @define('USERCONF_REALNAME', '실제 이름'); -@define('USERCONF_REALNAME_DESC', '작성자의 실제 이름으로써, 독자가 보게 되는 이름입니다.'); +@define('USERCONF_REALNAME_DESC', '작성자의 실제 이름으로서, 독자가 보게 되는 이름입니다.'); @define('HOTLINK_DONE', '파일이 핫링크 되었습니다.<br />완료.'); @define('ENTER_MEDIA_URL_METHOD', '불러오기 방식:'); -@define('ADD_MEDIA_BLAHBLAH_NOTE', '주의: 서버에서 핫링크를 하게 될 경우, 해당 사이트에서 핫링크 허락을 받아놓거나 자신의 사이트인 경우에 대해 하기 바랍니다. 핫링크를 하게 되면 외부 그림을 따로 저장하지 않고 쓸 수 있게 됩니다.'); +@define('ADD_MEDIA_BLAHBLAH_NOTE', '주의: 서버에서 핫링크 하기는 해당 사이트에서 핫링크 허락을 미리 받아놓거나 자신의 사이트인 경우에 대해 하기 바랍니다. 핫링크를 하게 되면 외부 그림을 따로 저장하지 않고 쓸 수 있게 됩니다.'); @define('MEDIA_HOTLINKED', '핫링크 됨'); @define('FETCH_METHOD_IMAGE', '이쪽 서버로 그림을 다운로드하기'); @define('FETCH_METHOD_HOTLINK', '서버로 핫링크 걸기'); @define('DELETE_HOTLINK_FILE', '<b>%s</b>(이)라는 핫링크 파일 삭제됨'); -@define('SYNDICATION_PLUGIN_SHOW_MAIL', '이메일 주소 표시?'); +@define('SYNDICATION_PLUGIN_SHOW_MAIL', '이메일 주소를 표시합니까?'); @define('IMAGE_MORE_INPUT', '그림 추가'); @define('BACKEND_TITLE', '플러그인 설정 화면에 추가 정보 표시'); @define('BACKEND_TITLE_FOR_NUGGET', '플러그인 설정 화면에 HTML 덩어리 플러그인의 설명과 함께 표시될 별도의 문장을 직접 정할 수 있습니다. 제목이 없는 여러 개의 HTML 덩어리를 쓸 경우 각각을 구별하기 쉽게 됩니다.'); @@ -724,18 +726,18 @@ @define('SYNDICATION_PLUGIN_FEEDBURNERID', '피드버너 아이디'); @define('SYNDICATION_PLUGIN_FEEDBURNERID_DESC', '게시하고자 하는 피드의 아이디'); @define('SYNDICATION_PLUGIN_FEEDBURNERIMG', '피드버너 그림'); -@define('SYNDICATION_PLUGIN_FEEDBURNERIMG_DESC', '표시할 그림(feedburner.com에 존재함)의 이름 (fbapix.gif 형태이며, 비워두면 카운터 표시)'); +@define('SYNDICATION_PLUGIN_FEEDBURNERIMG_DESC', '표시할 그림(feedburner.com에 있음)의 이름 (fbapix.gif 형태이며, 비워두면 카운터 표시)'); @define('SYNDICATION_PLUGIN_FEEDBURNERTITLE', '피드버너 제목'); @define('SYNDICATION_PLUGIN_FEEDBURNERTITLE_DESC', '그림 옆에 표시할 제목 (있을 경우)'); @define('SYNDICATION_PLUGIN_FEEDBURNERALT', '피드버너 그림 설명'); @define('SYNDICATION_PLUGIN_FEEDBURNERALT_DESC', '그림 위에 커서를 댈 때 표시할 설명 (있을 경우)'); @define('INSTALL_DBPORT', '데이터베이스 포트'); @define('INSTALL_DBPORT_DESC', '데이터베이스 서버에 접속할 때 사용하는 포트 번호'); -@define('PLUGIN_GROUP_FRONTEND_EXTERNAL_SERVICES', '일반 페이지: 외부 서비스'); -@define('PLUGIN_GROUP_FRONTEND_FEATURES', '일반 페이지: 부가 기능'); -@define('PLUGIN_GROUP_FRONTEND_FULL_MODS', '일반 페이지: 개조 사항'); -@define('PLUGIN_GROUP_FRONTEND_VIEWS', '일반 페이지: 표시 상태'); -@define('PLUGIN_GROUP_FRONTEND_ENTRY_RELATED', '일반 페이지: 글 관련'); +@define('PLUGIN_GROUP_FRONTEND_EXTERNAL_SERVICES', '외부 페이지: 외부 서비스'); +@define('PLUGIN_GROUP_FRONTEND_FEATURES', '외부 페이지: 부가 기능'); +@define('PLUGIN_GROUP_FRONTEND_FULL_MODS', '외부 페이지: 개조 사항'); +@define('PLUGIN_GROUP_FRONTEND_VIEWS', '외부 페이지: 표시 상태'); +@define('PLUGIN_GROUP_FRONTEND_ENTRY_RELATED', '외부 페이지: 글 관련'); @define('PLUGIN_GROUP_BACKEND_EDITOR', '관리 페이지: 편집기'); @define('PLUGIN_GROUP_BACKEND_USERMANAGEMENT', '관리 페이지: 사용자 관리'); @define('PLUGIN_GROUP_BACKEND_METAINFORMATION', '관리 페이지: 메타 정보'); @@ -780,7 +782,7 @@ @define('CATEGORIES_PARENT_BASE', '하위 범주만 보이기'); @define('CATEGORIES_PARENT_BASE_DESC', '하나의 상위 범주를 골라서 그 아래에 있는 범주만 보이도록 할 수 있습니다.'); @define('CATEGORIES_HIDE_PARALLEL', '범주 트리에 속하지 않는 범주 숨기기'); -@define('CATEGORIES_HIDE_PARALLEL_DESC', '다른 범주 트리에 속해 있는 범주를 보이지 않게 하려면 이것을 사용하십시오. "범주의 속성/템플릿" 플러그인을 적용한 멀티-블로그와 함께 사용할 때 가장 의미가 있습니다.'); +@define('CATEGORIES_HIDE_PARALLEL_DESC', '다른 범주 트리에 속해 있는 범주를 보이지 않게 하려면 이것을 사용하십시오. "범주의 속성/템플릿" 플러그인을 적용한 멀티블로그와 함께 사용할 때 가장 의미가 있습니다.'); @define('PERMISSION_ADMINIMAGESVIEWOTHERS', 'adminImagesViewOthers: 다른 사용자의 미디어 파일 보기'); @define('CHARSET_NATIVE', '지역 전용'); @@ -794,323 +796,330 @@ @define('PERM_DENIED', '권한이 없습니다.'); @define('INSTALL_ACL', '범주에 대한 읽기 권한 적용'); -@define('INSTALL_ACL_DESC', '사용할 경우, 로그인한 사용자가 당신의 블로그를 읽을 때 각 범주에 대해 지정한 사용자 권한 설정이 적용됩니다. 사용하지 않을 경우 범주에 대한 읽기 권한이 적용되지 않게 되지만 블로그 속도가 약간 빨라지는 장점이 있습니다. 그러므로 블로그에 대한 다중 사용자 읽기 권한이 필요 없다면 이 설정을 끄십시오.'); +@define('INSTALL_ACL_DESC', '사용할 경우 로그인한 사용자가 당신의 블로그를 읽을 때 각 범주에 대해 지정한 사용자 권한 설정이 적용됩니다. 사용하지 않을 경우 범주에 대한 읽기 권한이 적용되지 않게 되지만 블로그 속도가 약간 빨라지는 장점이 있습니다. 그러므로 블로그에 대한 다중 사용자 읽기 권한이 필요 없다면 이 설정을 끄십시오.'); @define('PLUGIN_API_VALIDATE_ERROR', '옵션 "%s"에 대한 설정 구문이 잘못되었습니다. "%s" 종류에 해당하는 내용이 필요합니다.'); @define('USERCONF_CHECK_PASSWORD', '이전 암호'); @define('USERCONF_CHECK_PASSWORD_DESC', '위의 적힌 암호를 변경하려면 여기에 현재 사용중인 암호를 적으십시오.'); @define('USERCONF_CHECK_PASSWORD_ERROR', '이전 암호가 올바르지 않으므로 새 암호로 변경할 권한이 없습니다. 설정이 저장되지 않았습니다.'); -@define('ERROR_XSRF', '브라우저가 유효한 HTTP 진입자(referrer) 문자열을 보내지 않았습니다. 브라우저/프록시 설정이 잘못되었거나 당신을 겨냥한 상호 사이트 요청 위조(XSRF) 때문이었을 수 있습니다. 요청한 사항을 처리할 수 없었습니다.'); +@define('ERROR_XSRF', '브라우저가 유효한 HTTP 진입 경로(referrer) 문자열을 보내지 않았습니다. 브라우저/프록시 설정이 잘못되었거나 당신을 겨냥한 상호 사이트 요청 위조(XSRF) 때문이었을 수 있습니다. 요청한 사항을 처리할 수 없었습니다.'); @define('INSTALL_PERMALINK_FEEDAUTHOR_DESC', '특정 사용자의 RSS 피드를 보기 위한 상대적인 인터넷 주소 구조를 %id%, %realname%, %username%, %email% 등의 변수와 일반 글자를 활용해서 정의할 수 있습니다. 전체 주소는 사이트의 기본 주소를 기초로 해서 시작합니다.'); @define('INSTALL_PERMALINK_FEEDAUTHOR', '작성자에 따른 RSS 피드 고정 링크 주소 구조'); -@define('INSTALL_PERMALINK_AUTHORSPATH', '작성자로의 경로'); +@define('INSTALL_PERMALINK_AUTHORSPATH', '작성자로 가는 경로'); @define('AUTHORS', '작성자'); @define('AUTHORS_ALLOW_SELECT', '방문자가 한 번에 여러 작성자의 글을 볼 수 있게 합니까?'); -@define('AUTHORS_ALLOW_SELECT_DESC', '사용할 경우, 이 플러그인에 의해 표시되는 각 작성자 이름 옆에 체크박스가 표시됩니다. 선택 여부에 따라 원하는 조건의 글을 볼 수 있게 됩니다.'); +@define('AUTHORS_ALLOW_SELECT_DESC', '사용할 경우 이 플러그인에 의해 표시되는 각 작성자 이름 옆에 체크박스가 표시됩니다. 선택 여부에 따라 원하는 조건의 글을 볼 수 있게 됩니다.'); @define('AUTHOR_PLUGIN_DESC', '작성자의 목록 보이기'); @define('CATEGORY_PLUGIN_TEMPLATE', '스마티 템플릿 사용'); @define('CATEGORY_PLUGIN_TEMPLATE_DESC', '사용할 경우, 이 플러그인은 스마티 템플릿 기능을 활용하여 범주 목록을 출력하게 됩니다. 구성은 "plugin_categories.tpl" 템플릿 파일을 편집하여 고칠 수 있습니다. 성능 저하를 가져오게 되므로 특화시키지 않을 경우 꺼두십시오.'); -@define('CATEGORY_PLUGIN_SHOWCOUNT', '범주 당 글의 수 보이기'); +@define('CATEGORY_PLUGIN_SHOWCOUNT', '범주 별 글의 수 보이기'); @define('AUTHORS_SHOW_ARTICLE_COUNT', '작성자 이름 옆에 글의 수 보이기'); @define('AUTHORS_SHOW_ARTICLE_COUNT_DESC', '사용할 경우, 각 작성자의 이름 옆 괄호 속에 해당 작성자가 쓴 글의 수를 표시합니다.'); -@define('CUSTOM_ADMIN_INTERFACE', 'Custom admin interface available'); +@define('CUSTOM_ADMIN_INTERFACE', '사용자화된 관리 화면 인터페이스를 사용할 수 있음'); -@define('COMMENT_NOT_ADDED', '덧글 금지가 되어 있어 덧글을 추가하지 못했습니다. '); // Retranslate: 'Your comment could not be added, because comments for this entry have either been disabled, you entered invalid data, or your comment was caught by anti-spam measurements.' -@define('INSTALL_TRACKREF', 'Enable referrer tracking?'); -@define('INSTALL_TRACKREF_DESC', 'Enabling the referrer tracking will show you which sites refer to your articles. Today this is often abused for spamming, so you can disable it if you want.'); -@define('CATEGORIES_HIDE_PARENT', 'Hide the selected parent category?'); -@define('CATEGORIES_HIDE_PARENT_DESC', 'If you restrict the listing of categories to a specific category, by default you will see that parent category within the output listing. If you disable this option, the parent category name will not be displayed.'); -@define('WARNING_NO_GROUPS_SELECTED', 'Warning: You did not select any group memberships. This would effectively log you out of the usergroup management, and thus your group memberships werde not changed.'); -@define('INSTALL_RSSFETCHLIMIT', 'Entries to display in Feeds'); -@define('INSTALL_RSSFETCHLIMIT_DESC', 'Number of entries to display for each page on the RSS Feed.'); -@define('INSTAL_DB_UTF8', 'Enable DB-charset conversion'); -@define('INSTAL_DB_UTF8_DESC', 'Issues a MySQL "SET NAMES" query to indicate the required charset for the database. Turn this on or off, if you see weird characters in your blog.'); -@define('ONTHEFLYSYNCH', 'Enable on-the-fly media synchronization'); -@define('ONTHEFLYSYNCH_DESC', 'If enabled, Serendipity will compare the media database with the files stored on your server and synchronize the database and directory contents.'); -@define('USERCONF_CHECK_USERNAME_ERROR', 'The username cannot be left blank.'); -@define('FURTHER_LINKS', 'Further Links'); -@define('FURTHER_LINKS_S9Y', 'Serendipity Homepage'); -@define('FURTHER_LINKS_S9Y_DOCS', 'Serendipity Documentation'); -@define('FURTHER_LINKS_S9Y_BLOG', 'Official Blog'); -@define('FURTHER_LINKS_S9Y_FORUMS', 'Forums'); -@define('FURTHER_LINKS_S9Y_SPARTACUS', 'Spartacus'); -@define('COMMENT_IS_DELETED', '(Comment removed)'); +@define('COMMENT_NOT_ADDED', '이 글에 덧글 금지가 되어 있거나, 유효하지 않은 데이터를 입력했거나, 스팸방지 기능에 의해 차단되어 덧글을 추가하지 못했습니다. '); +@define('INSTALL_TRACKREF', '진입 경로 추적을 사용하기'); +@define('INSTALL_TRACKREF_DESC', '진입 경로 추적을 사용하면 어떤 사이트가 당신의 글을 참조하고 있는지 볼 수 있습니다. 오늘날 이 기능은 스팸에 악용되는 경우가 많으므로 원할 경우 끌 수 있습니다.'); +@define('CATEGORIES_HIDE_PARENT', '선택한 상위 범주를 숨기기'); +@define('CATEGORIES_HIDE_PARENT_DESC', '범주 목록 나열을 특정 범주로 국한시킬 경우 기본적으로 상위 범주가 목록에 나타납니다. 이 기능을 끄면 상위 범주 이름이 나타나지 않습니다.'); +@define('WARNING_NO_GROUPS_SELECTED', '경고: 아무런 그룹 소속도 선택하지 않았습니다. 이 경우 사용자 그룹 관리에서 강제 퇴장하는 것과 같으므로 그룹 소속을 변경하지 않았습니다.'); +@define('INSTALL_RSSFETCHLIMIT', '피드에 보여줄 글 수'); +@define('INSTALL_RSSFETCHLIMIT_DESC', '각 RSS 피드 페이지에 보여줄 글의 수입니다.'); +@define('INSTAL_DB_UTF8', '데이터베이스-문자열 변환 사용하기'); +@define('INSTAL_DB_UTF8_DESC', '데이터베이스에 필요한 문자열 종류를 지정하기 위해 MySQL "SET NAMES" 질의를 실행합니다. 블로그에 이상한 글자가 보일 경우 이를 켜거나 꺼보십시오.'); +@define('ONTHEFLYSYNCH', '즉각적인 미디어 동기화 사용하기'); +@define('ONTHEFLYSYNCH_DESC', '사용할 경우 세렌디피티가 미디어 데이터베이스와 서버 저장 파일들을 비교하여 데이터베이스 및 디렉토리 내용을 동기화합니다.'); +@define('USERCONF_CHECK_USERNAME_ERROR', '사용자 이름은 비워둘 수 없습니다.'); +@define('FURTHER_LINKS', '추가 링크'); +@define('FURTHER_LINKS_S9Y', '세렌디피티 홈페이지'); +@define('FURTHER_LINKS_S9Y_DOCS', '세렌디피티 사용설명서'); +@define('FURTHER_LINKS_S9Y_BLOG', '공식 블로그'); +@define('FURTHER_LINKS_S9Y_FORUMS', '게시판'); +@define('FURTHER_LINKS_S9Y_SPARTACUS', '스파르타쿠스'); +@define('COMMENT_IS_DELETED', '(덧글 삭제됨)'); -@define('CURRENT_AUTHOR', 'Current author'); +@define('CURRENT_AUTHOR', '현재 작성자'); -@define('WORD_NEW', 'New'); -@define('SHOW_MEDIA_TOOLBAR', 'Show toolbar within media selector popup?'); -@define('MEDIA_KEYWORDS', 'Media keywords'); -@define('MEDIA_KEYWORDS_DESC', 'Enter a list of ";" separated words that you want to use as pre-defined keywords for media items.'); -@define('MEDIA_EXIF', 'Import EXIF/JPEG image data'); -@define('MEDIA_EXIF_DESC', 'If enabled, existing EXIF/JPEG metadata of images will be parsed and stored in the database for display in the media gallery.'); -@define('MEDIA_PROP', 'Media properties'); +@define('WORD_NEW', '신규'); +@define('SHOW_MEDIA_TOOLBAR', '미디어 선택 팝업 안에 툴바 보여주기'); +@define('MEDIA_KEYWORDS', '미디어 키워드'); +@define('MEDIA_KEYWORDS_DESC', '미디어 아이템의 키워드로 사용하기 위해 미리 정의해둘 단어들을 ";"로 하나씩 분리하여 입력합니다'); +@define('MEDIA_EXIF', 'EXIF/JPEG 그림 데이터를 불러오기'); +@define('MEDIA_EXIF_DESC', '사용할 경우 그림에 포함되어 있는 EXIF/JPEG 메타데이터를 불러들여 데이터베이스에 저장하게 되며 차후 미디어 갤러리에서 볼 수 있게 됩니다.'); +@define('MEDIA_PROP', '미디어 등록정보'); -@define('GO_ADD_PROPERTIES', 'Go & enter properties'); -@define('MEDIA_PROPERTY_DPI', 'DPI'); -@define('MEDIA_PROPERTY_COPYRIGHT', 'Copyright'); -@define('MEDIA_PROPERTY_COMMENT1', 'Short Comment'); -@define('MEDIA_PROPERTY_COMMENT2', 'Long Comment'); -@define('MEDIA_PROPERTY_TITLE', 'Title'); -@define('MEDIA_PROP_DESC', 'Enter a list of ";" separated property fields you want to define for each media file'); -@define('MEDIA_PROP_MULTIDESC', '(You can append ":MULTI" after any item to indicate that this item will contain long text instead of just some characters)'); +@define('GO_ADD_PROPERTIES', '등록정보 입력하러 가기'); +@define('MEDIA_PROPERTY_DPI', '밀도(DPI)'); +@define('MEDIA_PROPERTY_COPYRIGHT', '저작권'); +@define('MEDIA_PROPERTY_COMMENT1', '짧은 설명'); +@define('MEDIA_PROPERTY_COMMENT2', '긴 설명'); +@define('MEDIA_PROPERTY_TITLE', '제목'); +@define('MEDIA_PROP_DESC', '각 미디어 파일에 정의하고자 하는 등록정보 필드를 ";"로 하나씩 분리하여 입력합니다'); +@define('MEDIA_PROP_MULTIDESC', '(특정 아이템이 글자 몇 자가 아니라 긴 글이 포함되어 있다는 것을 표시하고자 할 경우 해당 아이템 뒤에 ":MULTI"를 붙일 수 있습니다)'); -@define('STYLE_OPTIONS_NONE', 'This theme/style has no specific options. To see how your template can specify options, read the Technical Documentation on www.s9y.org about "Configuration of Theme options".'); -@define('STYLE_OPTIONS', 'Theme/Style options'); +@define('STYLE_OPTIONS_NONE', '이 템플릿이나 스타일은 별도의 선택사항이 없습니다. 템플릿에 선택사항을 추가할 수 있는 방법은 www.s9y.org에 있는 기술문서(Technical Documentation) 중 "Configuration of Theme options" 항목을 참고하기 바랍니다.'); +@define('STYLE_OPTIONS', '템플릿/스타일 선택사항'); -@define('PLUGIN_AVAILABLE_COUNT', 'Total: %d plugins.'); +@define('PLUGIN_AVAILABLE_COUNT', '총 플러그인 수: %d개.'); -@define('SYNDICATION_RFC2616', 'Activate strict RFC2616 RSS-Feed compliance'); -@define('SYNDICATION_RFC2616_DESC', 'NOT Enforcing RFC2616 means that all Conditional GETs to Serendipity will return entries last modified since the time of the last request. With that setting to "false", your visitors will get all articles since their last request, which is considered a good thing. However, some Agents like Planet act weird, if that happens, at it also violates RFC2616. So if you set this option to "TRUE" you will comply with that RFC, but readers of your RSS feed might miss items in their holidays. So either way, either it hearts Aggregators like Planet, or it hurts actual readers of your blog. If you are facing complaints from either side, you can toggle this option. Reference: <a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1461728&group_id=75065&atid=542822" target="_blank" rel="nofollow">SourceForge</a>'); -@define('MEDIA_PROPERTY_DATE', 'Associated Date'); -@define('MEDIA_PROPERTY_RUN_LENGTH', 'Run-Length'); -@define('FILENAME_REASSIGNED', 'Automagically assigned new file name: %s'); -@define('MEDIA_UPLOAD_SIZE', 'Max. file upload size'); -@define('MEDIA_UPLOAD_SIZE_DESC', 'Enter the maximum filesize for uploaded files in bytes. This setting can be overruled by server-side settings in PHP.ini: upload_max_filesize, post_max_size, max_input_time all take precedence over this option. An empty string means to only use the server-side limits.'); -@define('MEDIA_UPLOAD_SIZEERROR', 'Error: You cannot upload files larger than %s bytes!'); -@define('MEDIA_UPLOAD_MAXWIDTH', 'Max. width of image files for upload'); -@define('MEDIA_UPLOAD_MAXWIDTH_DESC', 'Enter the maximum image width in pixels for uploaded images.'); -@define('MEDIA_UPLOAD_MAXHEIGHT', 'Max. height of image files for upload'); -@define('MEDIA_UPLOAD_MAXHEIGHT_DESC', 'Enter the maximum image height in pixels for uploaded images.'); -@define('MEDIA_UPLOAD_DIMERROR', 'Error: You cannot upload image files larger than %s x %s pixels!'); +@define('SYNDICATION_RFC2616', '엄격한 RFC2616 RSS 피드 준수 사용하기'); +@define('SYNDICATION_RFC2616_DESC', 'RFC2616을 강제하지 않을 경우 조건부 GET 요청을 세렌디피티가 받으면 마지막 요청 이후에 수정된 글을 보내게 됩니다. 그러므로 이 설정을 끄면 방문자들은 마지막 요청 이후 작성된 모든 글을 받게 되어 대부분 좋게 받아들입니다. 하지만 Planet과 같은 일부 에이전트의 경우 이렇게 되면 RFC2616을 위반하기 때문에 이상하게 작동합니다. 이 설정을 켜면 RFC 준수를 하게 되지만 RSS 피드 구독자들이 휴가를 간 동안 놓치는 글이 생길 수 있습니다. 결국 Planet과 같은 곳이나 블로그를 직접 구독하는 사람들 중 한 쪽은 문제가 발생할 것입니다. 어느 한 쪽에서 불만이 있을 경우 이 설정을 변경해 보기 바랍니다. 참조할 내용: <a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1461728&group_id=75065&atid=542822" target="_blank" rel="nofollow">소스포지</a>'); +@define('MEDIA_PROPERTY_DATE', '관계된(작성된) 날짜'); +@define('MEDIA_PROPERTY_RUN_LENGTH', '실행 길이'); +@define('FILENAME_REASSIGNED', '자동으로 새로운 파일 이름을 붙였습니다: %s'); +@define('MEDIA_UPLOAD_SIZE', '올리는 파일의 최대 크기'); +@define('MEDIA_UPLOAD_SIZE_DESC', '올리는 파일의 최대 크기를 바이트 단위로 입력합니다. 이 설정보다 서버 측에 있는 php.ini 내부 설정이 우선됩니다: upload_max_filesize, post_max_size, max_input_time 등이 모두 이 설정보다 우선 적용됩니다. 비워둘 경우 서버 측 설정만 따르게 됩니다.'); +@define('MEDIA_UPLOAD_SIZEERROR', '오류: %s바이트보다 큰 파일을 올릴 수 없습니다!'); +@define('MEDIA_UPLOAD_MAXWIDTH', '올릴 그림 파일의 최대 폭'); +@define('MEDIA_UPLOAD_MAXWIDTH_DESC', '올릴 그림 파일의 최대 폭을 픽셀 단위로 입력합니다.'); +@define('MEDIA_UPLOAD_MAXHEIGHT', '올릴 그림 파일의 최대 높이'); +@define('MEDIA_UPLOAD_MAXHEIGHT_DESC', '올릴 그림 파일의 최대 높이를 픽셀 단위로 입력합니다.'); +@define('MEDIA_UPLOAD_DIMERROR', '오류: %s x %s 픽셀보다 큰 그림 파일을 올릴 수 없습니다!'); -@define('MEDIA_TARGET', 'Target for this link'); -@define('MEDIA_TARGET_JS', 'Popup window (via JavaScript, adaptive size)'); -@define('MEDIA_ENTRY', 'Isolated Entry'); -@define('MEDIA_TARGET_BLANK', 'Popup window (via target=_blank)'); +@define('MEDIA_TARGET', '이 링크의 표시 대상'); +@define('MEDIA_TARGET_JS', '팝업 창 (자바스크립트 사용, 가변 크기)'); +@define('MEDIA_ENTRY', '독립된 글'); +@define('MEDIA_TARGET_BLANK', '팝업 창 (target=_blank 사용)'); -@define('MEDIA_DYN_RESIZE', 'Allow dynamic image resizing?'); -@define('MEDIA_DYN_RESIZE_DESC', 'If enabled, the media selector can return images in any requested size via a GET variable. The results are cached, and thus can create a large filebase if you make intensive use of it.'); +@define('MEDIA_DYN_RESIZE', '동적 그림 크기 변환을 사용하기'); +@define('MEDIA_DYN_RESIZE_DESC', '사용할 경우 미디어 선택 화면이 GET 변수를 통해 요청한 크기에 맞도록 그림을 불러올 수 있습니다. 생성된 파일은 캐시에 저장되므로 자주 사용할 경우 용량을 많이 차지할 수 있습니다.'); -@define('MEDIA_DIRECTORY_MOVED', 'Directory and files were successfully moved to %s'); -@define('MEDIA_DIRECTORY_MOVE_ERROR', 'Directory and files could not be moved to %s!'); -@define('MEDIA_DIRECTORY_MOVE_ENTRY', 'On Non-MySQL databases, iterating through every article to replace the old directory URLs with new directory URLs is not possible. You will need to manually edit your entries to fix new URLs. You can still move your old directory back to where it was, if that is too cumbersome for you.'); -@define('MEDIA_DIRECTORY_MOVE_ENTRIES', 'Moved the URL of the moved directory in %s entries.'); -@define('PLUGIN_ACTIVE', 'Active'); -@define('PLUGIN_INACTIVE', 'Inactive'); -@define('PREFERENCE_USE_JS', 'Enable advanced JS usage?'); -@define('PREFERENCE_USE_JS_DESC', 'If enabled, advanced JavaScript sections will be enabled for better usability, like in the Plugin Configuration section you can use drag and drop for re-ordering plugins.'); +@define('MEDIA_DIRECTORY_MOVED', '디렉토리와 파일이 %s(으)로 이동하는데 성공했습니다'); +@define('MEDIA_DIRECTORY_MOVE_ERROR', '디렉토리와 파일을 %s(으)로 이동할 수 없었습니다!'); +@define('MEDIA_DIRECTORY_MOVE_ENTRY', 'MySQL이 아닌 데이터베이스에서는 이전 디렉토리 주소를 새 디렉토리 주소로 바꾸기 위해 모든 글을 하나씩 살펴가는 작업을 할 수 없습니다. 수작업으로 각 글에 대해 주소 교체 작업을 해야 합니다. 이것이 너무 번거로울 경우 디렉토리를 원래 위치로 다시 되돌릴 수 있습니다.'); +@define('MEDIA_DIRECTORY_MOVE_ENTRIES', '%s개의 글에서 이동한 디렉토리로 주소를 변경했습니다.'); +@define('PLUGIN_ACTIVE', '사용 중'); +@define('PLUGIN_INACTIVE', '미사용'); +@define('PREFERENCE_USE_JS', '고급 자바스크립트 기능 사용'); +@define('PREFERENCE_USE_JS_DESC', '사용할 경우 고급 자바스크립트 기능 부분을 활용하게 되어 사용성이 향상됩니다. 대표적으로 플러그인 설정에서 플러그인을 끌어서 이동하여 순서를 바꿀 수 있게 됩니다.'); -@define('PREFERENCE_USE_JS_WARNING', '(This page uses advanced JavaScripting. If you are having functionality issues, please disable the use of advanced JS usage in your personal preferences or disable your browser\'s JavaScript)'); +@define('PREFERENCE_USE_JS_WARNING', '(이 페이지는 고급 자바스크립트 기능을 사용합니다. 기능 사용에 문제가 있을 경우 개인 설정에서 고급 자바스크립트 기능을 끄거나 브라우저의 자바스크립트 기능을 끄도록 합니다)'); -@define('INSTALL_PERMALINK_COMMENTSPATH', 'Path to comments'); -@define('PERM_SET_CHILD', 'Set the same permissions on all child directories'); -@define('PERMISSION_FORBIDDEN_PLUGINS', 'Forbidden plugins'); -@define('PERMISSION_FORBIDDEN_HOOKS', 'Forbidden events'); -@define('PERMISSION_FORBIDDEN_ENABLE', 'Enable Plugin ACL for usergroups?'); -@define('PERMISSION_FORBIDDEN_ENABLE_DESC', 'If the option "Plugin ACL for usergroups" is enabled in the configuration, you can specify which usergroups are allowed to execute certain plugins/events.'); -@define('DELETE_SELECTED_ENTRIES', 'Delete selected entries'); -@define('PLUGIN_AUTHORS_MINCOUNT', 'Show only authors with at least X articles'); -@define('FURTHER_LINKS_S9Y_BOOKMARKLET', 'Bookmarklet'); -@define('FURTHER_LINKS_S9Y_BOOKMARKLET_DESC', 'Bookmark this link and then use it on any page you want to blog about to quickly access your Serendipity Blog.'); -@define('IMPORT_WP_PAGES', 'Also fetch attachments and staticpages as normal blog entries?'); -@define('USERCONF_CREATE', 'Disable user / forbid activity?'); -@define('USERCONF_CREATE_DESC', 'If selected, the user will not have any editing or creation possibilities on the blog anymore. When logging in to the backend, he cannot do anything else apart from logging out and viewing his personal configuration.'); -@define('CATEGORY_HIDE_SUB', 'Hide postings made to sub-categories?'); -@define('CATEGORY_HIDE_SUB_DESC', 'By default, when you browse a category also entries of any subcategory are displayed. If this option is turned on, only postings of the currently selected category are displayed.'); -@define('PINGBACK_SENDING', 'Sending pingback to URI %s...'); -@define('PINGBACK_SENT', 'Pingback successful'); -@define('PINGBACK_FAILED', 'Pingback failed: %s'); -@define('PINGBACK_NOT_FOUND', 'No pingback-URI found.'); -@define('CATEGORY_PLUGIN_HIDEZEROCOUNT', 'Hide archives link when no entries were made in that timespan (requires counting entries)'); -@define('RSS_IMPORT_WPXRSS', 'WordPress eXtended RSS import, requires PHP5 and might take up much memory'); -@define('SET_TO_MODERATED', 'Moderate'); -@define('COMMENT_MODERATED', 'Comment #%s has successfully been set as moderated'); -@define('CENTER', 'center'); -@define('FULL_COMMENT_TEXT', 'Yes, with full comment text'); +@define('INSTALL_PERMALINK_COMMENTSPATH', '덧글로 가는 경로'); +@define('PERM_SET_CHILD', '하위 디렉토리에 모두 동일한 권한 설정을 합니다'); +@define('PERMISSION_FORBIDDEN_PLUGINS', '사용 금지된 플러그인'); +@define('PERMISSION_FORBIDDEN_HOOKS', '사용 금지된 이벤트'); +@define('PERMISSION_FORBIDDEN_ENABLE', '사용자 그룹에 대한 플러그인 사용 권한 설정을 사용하기'); +@define('PERMISSION_FORBIDDEN_ENABLE_DESC', '"사용자 그룹에 대한 플러그인 사용 권한 설정"을 사용할 경우 어떤 사용자 그룹이 어떤 플러그인이나 이벤트를 사용할 수 있을지 지정할 수 있게 됩니다.'); +@define('DELETE_SELECTED_ENTRIES', '선택한 글 삭제하기'); +@define('PLUGIN_AUTHORS_MINCOUNT', '최소 X개의 글을 쓴 작성자만 보여주기'); +@define('FURTHER_LINKS_S9Y_BOOKMARKLET', '즐겨찾기'); +@define('FURTHER_LINKS_S9Y_BOOKMARKLET_DESC', '이 링크를 즐겨찾기에 추가한 다음, 적고자 하는 페이지에 사용하면 이 세렌디피티 블로그를 빠르게 찾아올 수 있습니다.'); +@define('IMPORT_WP_PAGES', '첨부 파일과 고정 페이지도 일반 블로그 글처럼 불러옵니까?'); +@define('USERCONF_CREATE', '사용자를 비활성화하거나 활동을 금지하기'); +@define('USERCONF_CREATE_DESC', '사용할 경우 해당 사용자가 블로그에서 더 이상 글을 편집하거나 새로 쓸 수 없게 됩니다. 관리자 화면에 들어오더라도 개인 설정을 확인하거나 다시 빠져나가는 것 밖에 할 수 없습니다.'); +@define('CATEGORY_HIDE_SUB', '하위 범주에서 작성한 글 숨기기'); +@define('CATEGORY_HIDE_SUB_DESC', '기본적으로는 특정 범주의 글을 열람할 때 하위 범주에 속한 글도 같이 나타납니다. 이 설정을 사용할 경우 현재 선택된 범주의 글만 나타납니다.'); +@define('PINGBACK_SENDING', '핑백을 URI %s(으)로 보내는 중...'); +@define('PINGBACK_SENT', '핑백 성공'); +@define('PINGBACK_FAILED', '핑백 실패: %s'); +@define('PINGBACK_NOT_FOUND', '핑백 URI를 찾을 수 없었음.'); +@define('CATEGORY_PLUGIN_HIDEZEROCOUNT', '아무런 글이 작성되지 않은 시간대의 글 목록 링크를 숨김 (글 수를 집계하는 기능을 사용해야 함)'); +@define('RSS_IMPORT_WPXRSS', '워드프레스의 확장 RSS (WordPress eXtended RSS) 불러오기 - PHP5가 필요하며 메모리를 많이 차지할 수 있음'); +@define('SET_TO_MODERATED', '중재하기'); +@define('COMMENT_MODERATED', '%s번 덧글을 성공적으로 중재하기로 설정함'); +@define('CENTER', '중앙'); +@define('FULL_COMMENT_TEXT', '네, 전체 덧글을 포함합니다'); -@define('COMMENT_TOKENS', 'Use Tokens for Comment Moderation?'); -@define('COMMENT_TOKENS_DESC', 'If tokens are used, comments can be approved and deleted by clicking the email links without requiring login access to the blog. Note that this is a convenience feature, and if your mails get hijacked, those people can approve/delete the referenced comment without further authentication.'); -@define('COMMENT_NOTOKENMATCH', 'Moderation link has expired or comment #%s has already been approved or deleted'); -@define('TRACKBACK_NOTOKENMATCH', 'Moderation link has expired or trackback #%s has already been approved or deleted'); -@define('BADTOKEN', 'Invalid Moderation Link'); +@define('COMMENT_TOKENS', '덧글 중재에 토큰 사용'); +@define('COMMENT_TOKENS_DESC', '토큰을 사용할 경우 블로그에 로그인하지 않고도 전자우편 링크를 통해 덧글을 승인하거나 삭제할 수 있습니다. 편의 기능이라는 점에 유의하십시오. 만약 전자우편 계정을 다른 사람이 탈취할 경우 그 사람이 별도의 인증 없이 덧글을 승인하거나 삭제할 수 있게 됩니다.'); +@define('COMMENT_NOTOKENMATCH', '중재 링크의 유효기간이 지났거나 %s번 덧글이 이미 승인 또는 삭제되었습니다'); +@define('TRACKBACK_NOTOKENMATCH', '중재 링크의 유효기간이 지났거나 %s번 트랙백이 이미 승인 또는 삭제되었습니다'); +@define('BADTOKEN', '유효하지 않은 중재 링크'); -@define('CONFIRMATION_MAIL_ALWAYS', "Hello %s,\n\nYou have sent a new comment to \"%s\". Your comment was:\n\n%s\n\nThe owner of the blog has enabled mail verification, so you need to click on the following link to authenticate your comment:\n<%s>\n"); -@define('CONFIRMATION_MAIL_ONCE', "Hello %s,\n\nYou have sent a new comment to \"%s\". Your comment was:\n\n%s\n\nThe owner of the blog has enabled one-time mail verification, so you need to click on the following link to authenticate your comment:\n<%s>\n\nAfter you have done that, you can always post comments on that blog with your username and e-mail address without receiving such notifications."); -@define('INSTALL_SUBSCRIBE_OPTIN', 'Use Double-Opt In for comment subscriptions?'); -@define('INSTALL_SUBSCRIBE_OPTIN_DESC', 'If enabled, when a comment is made where the person wants to be notified via e-mail about new comments to the same entry, he must confirm his subscription to the entry. This Double-Opt In is required by german law, for example.'); -@define('CONFIRMATION_MAIL_SUBSCRIPTION', "Hello %s,\n\nYou have requested to be notified for comments to \"%s\" (<%s>). To approve this subscription (\"Double Opt In\") please click this link:\n<%s>\n."); -@define('NOTIFICATION_CONFIRM_SUBMAIL', 'Your confirmation of your comment subscription has been successfully entered.'); -@define('NOTIFICATION_CONFIRM_MAIL', 'Your confirmation of the comment has been successfully entered.'); -@define('NOTIFICATION_CONFIRM_SUBMAIL_FAIL', 'Your comment subscription could not be confirmed. Please check the link you clicked on for completion. If the link was sent more than 3 weeks ago, you must request a new confirmation mail.'); -@define('NOTIFICATION_CONFIRM_MAIL_FAIL', 'Your comment confirmation could not be confirmed. Please check the link you clicked on for completion. If the link was sent more than 3 weeks ago, you must send your comment again.'); -@define('PLUGIN_DOCUMENTATION', 'Documentation'); -@define('PLUGIN_DOCUMENTATION_LOCAL', 'Local Documentation'); -@define('PLUGIN_DOCUMENTATION_CHANGELOG', 'Version history'); -@define('SYNDICATION_PLUGIN_BIGIMG', 'Big Image'); -@define('SYNDICATION_PLUGIN_BIGIMG_DESC', 'Display a (big) image at the top of the feeds in sidebar, enter full or absolute URL to image file.'); -@define('SYNDICATION_PLUGIN_FEEDNAME', 'Displayed name for "feed"'); -@define('SYNDICATION_PLUGIN_FEEDNAME_DESC', 'Enter an optional custom name for the feeds (defaults to "feed" when empty)'); -@define('SYNDICATION_PLUGIN_COMMENTNAME', 'Displayed name for "comment" feed'); -@define('SYNDICATION_PLUGIN_COMMENTNAME_DESC', 'Enter an optional custom name for the comment feed'); -@define('SYNDICATION_PLUGIN_FEEDBURNERID_FORWARD', '(If you enter an absolute URL with http://... here, this URL will be used as the redirection target in case you have enabled the "Force" option for FeedBurner. Note that this can also be a URL independent to FeedBurner. For new Google FeedBurner feeds, you need to enter http://feeds2.feedburner.com/yourfeedname here)'); +@define('CONFIRMATION_MAIL_ALWAYS', "안녕하세요, %s님.\n\n새로운 덧글을 \"%s\"에 추가하셨습니다. 내용은 다음과 같습니다:\n\n%s\n\n블로그 주인이 전자우편을 통한 인증을 사용하고 있으므로 다음 링크를 눌러서 덧글을 인증하시기 바랍니다:\n<%s>\n"); +@define('CONFIRMATION_MAIL_ONCE', "안녕하세요 %s님.\n\n새로운 덧글을 \"%s\"에 추가하셨습니다. 내용은 다음과 같습니다:\n\n%s\n\n블로그 주인이 1회성 전자우편 인증을 사용하고 있으므로 다음 링크를 눌러서 덧글을 인증하시기 바랍니다:\n<%s>\n\n인증이 된 이후에는 동일한 사용자 이름과 전자우편 주소로 더 이상 인증을 안 거치고 덧글을 달 수 있게 됩니다."); +@define('INSTALL_SUBSCRIBE_OPTIN', '덧글 구독을 위해 2중 사용자 동의 사용'); +@define('INSTALL_SUBSCRIBE_OPTIN_DESC', '사용할 경우 방문자가 덧글을 남긴 후 해당 글에 새 덧글이 달릴 때 전자우편으로 알림을 받기 원하면 그 글에 대한 구독 여부도 동의해야 합니다. 이러한 2중 사용자 동의는 독일 등에서 법적으로 요구하고 있습니다.'); +@define('CONFIRMATION_MAIL_SUBSCRIPTION', "안녕하세요, %s님.\n\n\"%s\" (<%s>)에 대한 덧글이 달릴 경우 알려달라는 요청을 한 바 있습니다. 이 구독사항을 승인하고자 할 경우 (\"2중 사용자 동의\") 다음 링크를 누르기 바랍니다:\n<%s>\n."); +@define('NOTIFICATION_CONFIRM_SUBMAIL', '덧글 구독에 대한 승인절차를 성공적으로 진행했습니다.'); +@define('NOTIFICATION_CONFIRM_MAIL', '덧글에 대한 승인절차를 성공적으로 진행했습니다.'); +@define('NOTIFICATION_CONFIRM_SUBMAIL_FAIL', '덧글 구독 승인 여부를 확인할 수 없었습니다. 승인 완료를 위해 누른 링크의 상태를 확인하기 바랍니다. 만약 링크가 발송된지 3주가 넘었다면 새로운 승인 링크를 담은 전자우편을 요청해야 합니다.'); +@define('NOTIFICATION_CONFIRM_MAIL_FAIL', '덧글의 승인 여부를 확인할 수 없었습니다. 승인 완료를 위해 누른 링크의 상태를 확인하기 바랍니다. 만약 링크가 발송된지 3주가 넘었다면 덧글을 다시 남겨야 합니다.'); +@define('PLUGIN_DOCUMENTATION', '사용설명서(공식문서)'); +@define('PLUGIN_DOCUMENTATION_LOCAL', '내부에 저장된 사용설명서(공식문서)'); +@define('PLUGIN_DOCUMENTATION_CHANGELOG', '버전 이력'); +@define('SYNDICATION_PLUGIN_BIGIMG', '대형 그림'); +@define('SYNDICATION_PLUGIN_BIGIMG_DESC', '옆줄에 나타나는 피드 맨 위에 (대형) 그림을 표시합니다. 그림 파일에 대한 전체 또는 절대 경로를 입력합니다.'); +@define('SYNDICATION_PLUGIN_FEEDNAME', '피드에 표시할 이름'); +@define('SYNDICATION_PLUGIN_FEEDNAME_DESC', '피드에 대한 사용자 정의 이름을 입력할 수 있습니다 (선택 사항이며, 비워둘 경우 "feed"로 자동 표시됨)'); +@define('SYNDICATION_PLUGIN_COMMENTNAME', '덧글 피드에 표시할 이름'); +@define('SYNDICATION_PLUGIN_COMMENTNAME_DESC', '덧글 피드에 대한 사용자 정의 이름을 입력할 수 있습니다 (선택 사항)'); +@define('SYNDICATION_PLUGIN_FEEDBURNERID_FORWARD', '(만약 여기에 http://...로 시작하는 절대 경로를 입력했다면 피드버너 설정에서 "강제로"를 선택했을 때 이 주소를 리다이렉트 대상으로 사용하게 됩니다. 그리고 이 주소는 피드버너와 독립적일 수 있다는 점도 참고하십시오. 신규 구글 피드버너의 경우 http://feeds2.feedburner.com/yourfeedname 식으로 입력해야 합니다.)'); -@define('SYNDICATION_PLUGIN_FEEDBURNERID_FORWARD2', 'If you set this option to "Force" you can forward the RSS feed to any webservice, not only FeedBurner. Look at the option "Feedburner ID" below to enter an absolute URL)'); -@define('COMMENTS_FILTER_NEED_CONFIRM', 'Pending user confirmation'); -@define('NOT_WRITABLE_SPARTACUS', ' (Only required when you plan to use Spartacus plugin for remote plugin download)'); -@define('MEDIA_ALT', 'ALT-Attribute (depiction or short description)'); -@define('MEDIA_PROPERTY_ALT', 'Depiction (summary for ALT-Attribute)'); +@define('SYNDICATION_PLUGIN_FEEDBURNERID_FORWARD2', '이 설정을 "강제로"로 선택했을 경우 피드버너 뿐만 아니라 다른 웹 서비스로도 RSS 피드를 전달할 수 있습니다. 아래의 "피드버너 ID" 설정을 보고 절대 경로를 입력하십시오.'); +@define('COMMENTS_FILTER_NEED_CONFIRM', '사용자 승인 대기 중'); +@define('NOT_WRITABLE_SPARTACUS', ' (스파르타쿠스 플러그인을 통해 원격 플러그인을 내려받을 경우에만 필요함)'); +@define('MEDIA_ALT', 'ALT 속성 (묘사 또는 짧은 설명)'); +@define('MEDIA_PROPERTY_ALT', '묘사 (ALT 속성에 대한 요약)'); -@define('MEDIA_TITLE', 'TITLE-Attribute (will be displayed on mouse over)'); +@define('MEDIA_TITLE', 'TITLE 속성 (마우스 커서를 위에 대면 표시됨)'); -@define('QUICKSEARCH_SORT', 'How should search-results be sorted?'); +@define('QUICKSEARCH_SORT', '검색 결과를 어떻게 정렬하겠습니까?'); -@define('QUICKSEARCH_SORT_RELEVANCE', 'Relevance'); +@define('QUICKSEARCH_SORT_RELEVANCE', '정확도'); -@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author'); +@define('PERMISSION_HIDDENGROUP', '숨겨진 그룹 / 비작성자'); -@define('SEARCH_FULLENTRY', 'Show full entry'); -@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)'); -@define('NAV_LINK_TEXT', 'Enter the navbar link text'); -@define('NAV_LINK_URL', 'Enter the full URL of your link'); -@define('MODERATE_SELECTED_COMMENTS', 'Accept selected comments'); -@define('WEBLOG', 'Weblog'); -@define('ACTIVE_COMMENT_SUBSCRIPTION', 'Subscribed'); -@define('PENDING_COMMENT_SUBSCRIPTION', 'Pending confirmation'); -@define('NO_COMMENT_SUBSCRIPTION', 'Not subscribed'); -@define('SUMMARY', 'Summary'); +@define('SEARCH_FULLENTRY', '글 전체를 보여주기'); +@define('NAVLINK_AMOUNT', '내비게이션에 표시할 링크의 수 입력 (스타일 관리 페이지를 다시 불러들여야 함)'); +@define('NAV_LINK_TEXT', '내비게이션 링크에 표시할 문구 입력'); +@define('NAV_LINK_URL', '링크의 전체 주소(URL) 입력'); +@define('MODERATE_SELECTED_COMMENTS', '선택한 덧글 승인'); +@define('WEBLOG', '웹로그'); +@define('ACTIVE_COMMENT_SUBSCRIPTION', '구독됨'); +@define('PENDING_COMMENT_SUBSCRIPTION', '구독 대기 중'); +@define('NO_COMMENT_SUBSCRIPTION', '구독되지 않음'); +@define('SUMMARY', '요약'); // Next lines were added on 2012/05/29 -@define('ABOUT_TO_DELETE_FILES', 'You are about to delete a bunch of files at once.<br />If you are using these in some of your entries, it will cause dead links or images<br />Are you sure you wish to proceed?<br /><br />'); -@define('ARCHIVE_SORT_STABLE', 'Stable Archives'); -@define('ARCHIVE_SORT_STABLE_DESC', 'Sort the archive-pages descending, so they are stable and search-crawler do not have to reindex them.'); -@define('PLAIN_ASCII_NAMES', '(no special characters, umlauts)'); +@define('ABOUT_TO_DELETE_FILES', '여러 개의 파일을 한꺼번에 지우려고 하고 있습니다.<br />만약 작성했던 글에 이들 중 일부를 사용하고 있다면 깨진 링크나 그림으로 나타날 것입니다.<br />그래도 계속 진행하겠습니까?<br /><br />'); +@define('ARCHIVE_SORT_STABLE', '안정적인 글 목록'); +@define('ARCHIVE_SORT_STABLE_DESC', '글 목록 페이지를 내림차순으로 정렬하여 안정적인 상태를 유지함으로서 검색엔진 봇이 다시 색인하지 않아도 되도록 합니다.'); +@define('PLAIN_ASCII_NAMES', '(특수 문자나 변이부호 등을 쓰지 마십시오)'); // New 2.0 constants -@define('SIMPLE_FILTERS', 'Simplified filters'); -@define('SIMPLE_FILTERS_DESC', 'When enabled, search forms and filter functions are reduced to essential options. When disabled, you will see every possible filter option, i.e. in the media library or the entry editor.'); -@define('TOGGLE_SELECT', 'Mark for selection'); -@define('MORE', 'More'); -@define('ENTRY_STATUS', 'Entry status'); -@define('SCHEDULED', 'Scheduled'); -@define('PUBLISHED', 'Published'); -@define('ENTRY_METADATA', 'Entry metadata'); -@define('NAVIGATION', 'Navigation'); -@define('MAIN_MENU', 'Main menu'); -@define('MENU_PERSONAL', 'Personal menu'); -@define('MENU_DASHBOARD', 'Dashboard'); -@define('MENU_ACTIVITY', 'Activity'); -@define('MENU_SETTINGS', 'Settings'); -@define('MENU_TEMPLATES', 'Templates'); -@define('MENU_PLUGINS', 'Plugins'); -@define('MENU_USERS', 'Users'); -@define('MENU_GROUPS', 'Groups'); -@define('MENU_MAINTENANCE', 'Maintenance'); -@define('ALIGN_TOP', 'Top'); -@define('ALIGN_LEFT', 'Left'); -@define('ALIGN_RIGHT', 'Right'); -@define('SHOW_METADATA', 'Show metadata'); -@define('RANGE_FROM', 'From'); -@define('RANGE_TO', 'To'); -@define('UPLOAD', 'Upload'); -@define('DOWNLOAD', 'Download'); -@define('ENTRY_PUBLISHED', 'Entry #%s published'); -@define('PUBLISH_ERROR', 'Error publishing entry:'); -@define('UPDATE_NOTIFICATION', 'Update notification'); -@define('NEW_VERSION_AVAILABLE', 'New stable Serendipity version available: '); -@define('MOVE', 'Move'); -@define('MOVE_UP', 'Move up'); -@define('MOVE_DOWN', 'Move down'); -@define('INSTALL_NEW_SIDEBAR_PLUGIN', 'Install a new sidebar plugin'); -@define('INSTALL_NEW_EVENT_PLUGIN', 'Install a new event plugin'); -@define('TEMPLATE_OPTIONS', 'Template options'); -@define('CURRENT_TEMPLATE', 'Current Template'); -@define('TEMPLATE_INFO', 'Show template info'); -@define('AVAILABLE_TEMPLATES', 'Available Templates'); -@define('TIMESTAMP_RESET', 'The timestamp has been reset to the current time.'); +@define('SIMPLE_FILTERS', '간소화된 필터'); +@define('SIMPLE_FILTERS_DESC', '사용할 경우 검색 입력창과 필터 기능을 필수요소만 남깁니다. 사용하지 않을 경우 가능한 모든 필터 기능이 다 나타납니다 - 미디어 보관함이나 글 편집기에도 보입니다.'); +@define('TOGGLE_SELECT', '선택사항 표시'); +@define('MORE', '더 보기'); +@define('ENTRY_STATUS', '글의 상태'); +@define('SCHEDULED', '예약됨'); +@define('PUBLISHED', '게시됨'); +@define('ENTRY_METADATA', '글의 메타데이터'); +@define('NAVIGATION', '내비게이션'); +@define('MAIN_MENU', '주 메뉴'); +@define('MENU_PERSONAL', '개인 메뉴'); +@define('MENU_DASHBOARD', '대시보드'); +@define('MENU_ACTIVITY', '활동사항'); +@define('MENU_SETTINGS', '설정'); +@define('MENU_TEMPLATES', '템플릿'); +@define('MENU_PLUGINS', '플러그인'); +@define('MENU_USERS', '사용자'); +@define('MENU_GROUPS', '그룹'); +@define('MENU_MAINTENANCE', '유지관리'); +@define('ALIGN_TOP', '위'); +@define('ALIGN_LEFT', '왼쪽'); +@define('ALIGN_RIGHT', '오른쪽'); +@define('SHOW_METADATA', '메타데이터 표시'); +@define('RANGE_FROM', '시작:'); +@define('RANGE_TO', '끝:'); +@define('UPLOAD', '올려주기(업로드)'); +@define('DOWNLOAD', '내려받기(다운로드)'); +@define('ENTRY_PUBLISHED', '%s번 글을 게시함'); +@define('PUBLISH_ERROR', '글을 게시하는 중 오류 발생:'); +@define('UPDATE_NOTIFICATION', '업데이트 알림'); +@define('NEW_VERSION_AVAILABLE', '세렌디피티의 새로운 안정화 버전이 있습니다: '); +@define('MOVE', '이동'); +@define('MOVE_UP', '위로 이동'); +@define('MOVE_DOWN', '아래로 이동'); +@define('INSTALL_NEW_SIDEBAR_PLUGIN', '새로운 옆줄 플러그인 설치하기'); +@define('INSTALL_NEW_EVENT_PLUGIN', '새로운 이벤트 플러그인 설치하기'); +@define('TEMPLATE_OPTIONS', '템플릿 선택 사항'); +@define('CURRENT_TEMPLATE', '현재 사용 중인 템플릿'); +@define('TEMPLATE_INFO', '템플릿 정보 보기'); +@define('AVAILABLE_TEMPLATES', '사용할 수 있는 템플릿'); +@define('TIMESTAMP_RESET', '작성시간을 현재시간으로 초기화 했습니다.'); -@define('CLEANCOMPILE_PASS', '[smarty clearCompiledTemplate(%s)]'); -@define('CLEANCOMPILE_FAIL', 'No files available for clearing.'); -@define('CLEANCOMPILE_TITLE', 'Clear template cache'); -@define('CLEANCOMPILE_INFO', 'This will purge all compiled template files of the currently active template. Compiled templates will be automatically re-created on demand by the Smarty framework.'); -@define('INSTALLER_KEY', 'Key'); -@define('INSTALLER_VALUE', 'Value'); -@define('CURRENT_TAB', 'Current tab: '); -@define('PINGBACKS', 'Pingbacks'); -@define('NO_PINGBACKS', 'No Pingbacks'); -@define('GROUP_NAME_DESC', "Use as uppercased eg. 'EXAMPLE_GROUP' name, but not as a constant 'USERLEVEL_XYZ' group name."); -@define('INSTALLER_CLI_TOOLS', 'Server-side command line tools'); -@define('INSTALLER_CLI_TOOLNAME', 'CLI tool'); -@define('INSTALLER_CLI_TOOLSTATUS', 'Executable?'); -@define('VIDEO', 'Video'); -@define('RESET_FILTERS', 'Reset filters'); -@define('UPDATE_FAILMSG', 'Check for new Serendipity version failed. This can happen because either the URL https://raw.github.com/s9y/Serendipity/master/docs/RELEASE is down, your server blocks outgoing connections or there are other connection issues.'); -@define('UPDATE_FAILACTION', 'Disable automatic update check'); -@define('UPDATE_NOTIFICATION_DESC', 'Show the update notification in the Dashboard, and for which channel?'); -@define('FRONTEND', 'Frontend'); -@define('BACKEND', 'Backend'); -@define('MEDIA_UPLOAD_RESIZE', 'Resize before Upload'); -@define('MEDIA_UPLOAD_RESIZE_DESC', 'Resize images before the upload using Javascript. This will also change the uploader to use Ajax and thus remove the Property-Button'); -@define('LOG_LEVEL', 'Log Level'); -@define('LOG_LEVEL_DESC', 'At certain places in the Serendipity code we have placed debugging breakpoints. If this option is set to "Debug", it will write this debug output to templates_c/logs/. You should only enable this option if you are experiencing bugs in those areas, or if you are a developer. Setting this option to "Error" will enable logging PHP errors, overwriting the PHP error_log setting.'); -@define('DEBUG', 'Debug'); -@define('CUSTOM_CONFIG', 'Custom configuration file'); -@define('PLUGIN_ALREADY_INSTALLED', 'Plugin already installed, and does not support multiple installation ("stackable").'); -@define('INSTALL_DBPREFIX_INVALID', 'The database table name prefix must not be empty and may only contain letters, numbers and the underscore character.'); -@define('SYNDICATION_PLUGIN_SUBTOME', 'subToMe'); -@define('SYNDICATION_PLUGIN_SUBTOME_DESC', 'Show the subToMe button, a layer to make feed subscription easier'); -@define('SYNDICATE_THIS_BLOG', 'Subscribe'); -@define('SYNDICATION_PLUGIN_BIGIMG_DESC', 'Display a (big) image at the top of the feeds in sidebar, enter full or absolute URL to image file. Set to "none" to show a textlink (the old default)'); -@define('INSTALL_BACKENDPOPUP', 'Enable use of popup windows for the backend'); -@define('INSTALL_BACKENDPOPUP_DESC', 'Do you want to use popup windows for some backend functionality? When disabled (default), inline modal dialogs will be used for e.g. the category selector and media library.'); -@define('UPDATE_STABLE', 'stable'); -@define('UPDATE_BETA', 'beta'); -@define('SYNDICATION_PLUGIN_FEEDFORMAT', 'Feed format'); -@define('SYNDICATION_PLUGIN_FEEDFORMAT_DESC', 'Which format shall be used for all feeds. Both are supported in all common readers'); -@define('SYNDICATION_PLUGIN_COMMENTFEED', 'Comment feed'); -@define('SYNDICATION_PLUGIN_COMMENTFEED_DESC', 'Show an additional link to a comment feed. This should be interesting only to the blogauthor itself'); -@define('SYNDICATION_PLUGIN_FEEDICON', 'Feed icon'); -@define('SYNDICATION_PLUGIN_FEEDICON_DESC', 'Show a (big) icon insteaf of a textlink to the feed. Set to "none" to deactivate, or to "feedburner" to show a feedburner counter if an id is given below'); -@define('SYNDICATION_PLUGIN_CUSTOMURL', 'Custom URL'); -@define('SYNDICATION_PLUGIN_CUSTOMURL_DESC', 'If you want to link to the custom feed specified in the blog configuration, enable this option.'); -@define('FEED_CUSTOM', 'Custom feed URL'); -@define('FEED_CUSTOM_DESC', 'If set, a custom feed URL can be set to forward Feedreaders to a specific URL. Useful for statistical analyzers like Feedburner, in which case you would enter your Feedburner-URL here.'); -@define('FEED_FORCE', 'Force custom feed URL?'); -@define('FEED_FORCE_DESC', 'If enabled, the URL entered above will be mandatory for Feedreaders, and your usual feed cannot be accessed from clients.'); -@define('NO_UPDATES', 'No plugin updates are available'); -@define('PLUGIN_GROUP_ALL', 'All categories'); +@define('CLEANCOMPILE_PASS', '컴파일된 템플릿 비우기-[smarty clearCompiledTemplate(%s)]'); +@define('CLEANCOMPILE_FAIL', '삭제할 파일이 없습니다.'); +@define('CLEANCOMPILE_TITLE', '템플릿 캐시 비우기'); +@define('CLEANCOMPILE_INFO', '현재 사용 중인 템플릿에 대해 컴파일된 템플릿 파일을 모두 삭제하는 기능입니다. 컴파일된 템플릿은 스마티 프레임워크에 의해 필요에 따라 자동으로 재생성됩니다.'); +@define('INSTALLER_KEY', '키'); +@define('INSTALLER_VALUE', '값'); +@define('CURRENT_TAB', '현재 탭: '); +@define('PINGBACKS', '핑백'); +@define('NO_PINGBACKS', '핑백 없음'); +@define('GROUP_NAME_DESC', "언어 파일에서 정의된 상수를 여기에 입력할 경우 (예: 'USERLEVEL_EDITOR_DESC') 이 상수의 번역된 형태가 표시됩니다. 직접 상수를 정의하고 그 이름을 여기에 입력할 수도 있습니다. 번역이 되는 그룹 이름을 사용하지 않으려고 한다면 상수 외의 문자열로 자유롭게 입력하면 됩니다."); +@define('INSTALLER_CLI_TOOLS', '서버측 커맨드라인 도구'); +@define('INSTALLER_CLI_TOOLNAME', '커맨드라인 인터페이스(CLI) 도구'); +@define('INSTALLER_CLI_TOOLSTATUS', '실행 가능 상태입니까?'); +@define('VIDEO', '동영상'); +@define('RESET_FILTERS', '필터 초기화 하기'); +@define('UPDATE_FAILMSG', '새로운 세렌디피티 버전을 확인하는데 실패했습니다. https://raw.github.com/s9y/Serendipity/master/docs/RELEASE 주소에 이상이 생겼거나, 서버가 외부 접속을 차단하고 있거나, 그 외의 접속 문제가 발생한 것으로 보입니다.'); +@define('UPDATE_FAILACTION', '자동 업데이트 확인을 사용하지 않기'); +@define('UPDATE_NOTIFICATION_DESC', '대시보드에 업데이트 알림을 표시하고, 어떤 채널에 나타내겠습니까?'); +@define('FRONTEND', '외부 페이지'); +@define('BACKEND', '관리 페이지'); +@define('MEDIA_UPLOAD_RESIZE', '올리기 전 크기 조절'); +@define('MEDIA_UPLOAD_RESIZE_DESC', '서버에 그림을 올리기 전에 자바스크립트로 크기를 조절합니다. 이 경우 올리는 기능이 Ajax를 쓰게 되므로 등록정보 버튼을 표시하지 않게 됩니다.'); +@define('LOG_LEVEL', '로그 기록 수준'); +@define('LOG_LEVEL_DESC', '세렌디피티 코드 내의 특정 부분에 디버그 중단점을 배치해 두었습니다. 이 설정을 "디버그"로 둘 경우 이러한 위치에서 발생한 디버그 출력내역을 templates_c/logs/에 기록하게 됩니다. 특정 부분에서 버그가 발생하고 있거나 본인이 개발자인 경우에만 이 설정을 사용하기 바랍니다. 이 설정을 "오류"로 두면 PHP 에러를 기록하게 되며 PHP error_log 설정을 덮어씁니다.'); +@define('DEBUG', '디버그'); +@define('CUSTOM_CONFIG', '사용자화된 설정 파일'); +@define('PLUGIN_ALREADY_INSTALLED', '플러그인이 이미 설치되었으며, 다중 설치 ("겹침") 지원을 하지 않습니다.'); +@define('INSTALL_DBPREFIX_INVALID', '데이터베이스 테이블 이름의 접두사는 비워둘 수 없으며 영문자, 숫자, 그리고 밑줄 문자("_")만 허용됩니다.'); +@define('SYNDICATION_PLUGIN_SUBTOME', '서브투미(subToMe)'); +@define('SYNDICATION_PLUGIN_SUBTOME_DESC', '서브투미(subToMe) 버튼을 보여줍니다. 이는 피드 구독을 더 쉽게 하도록 도와주는 계층입니다.'); +@define('SYNDICATE_THIS_BLOG', '구독하기'); +@define('SYNDICATION_PLUGIN_BIGIMG_DESC', '옆줄에 나타나는 피드 맨 위에 (대형) 그림을 표시합니다. 그림 파일에 대한 전체 또는 절대 경로를 입력합니다. "없음"으로 설정하면 문자 링크를 표시합니다(예전 기본 설정).'); +@define('INSTALL_BACKENDPOPUP', '관리 페이지에서 팝업 창을 사용할 수 있게 함'); +@define('INSTALL_BACKENDPOPUP_DESC', '일부 관리 페이지 기능에서 팝업 창을 사용하고자 합니까? 사용하지 않을 경우 (기본값) 인라인 모달 대화상자를 범주 선택, 미디어 보관함 등에 사용하게 됩니다.'); +@define('UPDATE_STABLE', '안정화 버전'); +@define('UPDATE_BETA', '베타 버전'); +@define('SYNDICATION_PLUGIN_FEEDFORMAT', '피드 규격'); +@define('SYNDICATION_PLUGIN_FEEDFORMAT_DESC', '모든 피드에 사용할 규격을 선택합니다. 둘 다 일반적인 리더에서 모두 지원합니다.'); +@define('SYNDICATION_PLUGIN_COMMENTFEED', '덧글 피드'); +@define('SYNDICATION_PLUGIN_COMMENTFEED_DESC', '덧글 피드를 추가로 표시합니다. 대개 블로그 작성자에게만 관심이 갈 것입니다.'); +@define('SYNDICATION_PLUGIN_FEEDICON', '피드 아이콘'); +@define('SYNDICATION_PLUGIN_FEEDICON_DESC', '피드에 문자 링크 대신 (대형) 아이콘을 표시합니다. "없음"으로 설정하면 나타나지 않으며, "피드버너"를 선택할 경우 아래에 ID를 입력하면 피드버너 카운터를 표시합니다.'); +@define('SYNDICATION_PLUGIN_CUSTOMURL', '사용자화된 주소(URL)'); +@define('SYNDICATION_PLUGIN_CUSTOMURL_DESC', '블로그 설정에 지정한 사용자화된 피드로 링크를 할 경우 이 설정을 사용합니다.'); +@define('FEED_CUSTOM', '사용자화된 피드의 주소(URL)'); +@define('FEED_CUSTOM_DESC', '사용할 경우 피드 리더가 특정 주소로 방문하도록 별도의 사용자화된 피드 주소를 설정할 수 있습니다. 피드버너와 같이 통계 분석 기능이 있을 때 유용하며, 이 경우 피드버너 주소(URL)를 입력하면 됩니다.'); +@define('FEED_FORCE', '사용자화된 피드의 주소를 강제로 사용합니까?'); +@define('FEED_FORCE_DESC', '사용할 경우 위에 입력한 주소가 모든 피드 리더에서 의무적으로 사용되며 일반적인 피드는 접근할 수 없게 됩니다.'); +@define('NO_UPDATES', '플러그인 업데이트가 없습니다'); +@define('PLUGIN_GROUP_ALL', '모든 범주'); -@define('CONF_USE_AUTOSAVE', 'Enable autosave-feature'); -@define('CONF_USE_AUTOSAVE_DESC', 'When enabled, the text you enter into blog entries will be periodically saved in your browser\'s session storage. If your browser crashes during writing, the next time you create a new entry, the text will be restored from this autosave.'); -@define('INSTALL_CAT_FEEDS', 'Feed Settings'); -@define('USERCONF_USE_CORE_WYSIWYG_TOOLBAR', 'Toolbar for WYSIWYG editor'); -@define('USERCONF_USE_CORE_WYSIWYG_TOOLBAR_DESC', 'Sets the list of available toolbar buttons for the WYSIWYG-Editor. If you need to further change those presets, you can create a file templates/XXX/admin/ckeditor_custom_config.js. For further details please check out the files htmlarea/ckeditor_s9y_config.js and htmlarea/ckeditor_s9y_plugin.js.'); -@define('USERCONF_WYSIWYG_PRESET_S9Y', 'Serendipity (default)'); -@define('USERCONF_WYSIWYG_PRESET_BASIC', 'Reduced'); -@define('USERCONF_WYSIWYG_PRESET_FULL', 'Full'); -@define('USERCONF_WYSIWYG_PRESET_STANDARD', 'Alternate'); -@define('USERCONF_WYSIWYG_PRESET_CKE', 'CKEditor Full'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_S9Y', 'Force: Serendipity'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_BASIC', 'Force: Reduced'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_FULL', 'Force: Full'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_STANDARD', 'Force: Alternate'); -@define('USERCONF_WYSIWYG_PRESET_NOCC_CKE', 'Force: CKEditor Full'); +@define('CONF_USE_AUTOSAVE', '자동 저장 기능 사용'); +@define('CONF_USE_AUTOSAVE_DESC', '사용할 경우 블로그 글에 입력한 내용을 브라우저의 세션 저장소에 주기적으로 저장하게 됩니다. 글 작성 중 브라우저가 비정상 종료될 경우 다음 번에 새로 글을 작성할 때 본문 내용이 자동 저장에서 복구되어 표시됩니다.'); +@define('INSTALL_CAT_FEEDS', '피드 설정'); +@define('USERCONF_USE_CORE_WYSIWYG_TOOLBAR', 'WYSIWYG 편집기의 도구 모음'); +@define('USERCONF_USE_CORE_WYSIWYG_TOOLBAR_DESC', 'WYSIWYG 편집기에 표시할 수 있는 도구 모음 버튼의 목록을 설정합니다. 기본 설정 묶음(프리셋)을 추가적으로 변경하고자 할 경우 templates/XXX/admin/ckeditor_custom_config.js 파일을 만들면 됩니다. 보다 자세한 사항은 htmlarea/ckeditor_s9y_config.js 및 htmlarea/ckeditor_s9y_plugin.js 파일을 참고하기 바랍니다.'); +@define('USERCONF_WYSIWYG_PRESET_S9Y', '세렌디피티 (기본값)'); +@define('USERCONF_WYSIWYG_PRESET_BASIC', '간소화된 기능'); +@define('USERCONF_WYSIWYG_PRESET_FULL', '전체 기능'); +@define('USERCONF_WYSIWYG_PRESET_STANDARD', '대안 설정'); +@define('USERCONF_WYSIWYG_PRESET_CKE', 'CKEditor 전체 기능'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_S9Y', '강제 사용: 세렌디피티'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_BASIC', '강제 사용: 간소화된 기능'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_FULL', '강제 사용: 전체 기능'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_STANDARD', '강제 사용: 대안 설정'); +@define('USERCONF_WYSIWYG_PRESET_NOCC_CKE', '강제 사용: CKEditor 전체 기능'); -@define('CATEGORY_PLUGIN_SHOWALL', 'Show a link to "All categories"?'); -@define('CATEGORY_PLUGIN_SHOWALL', 'If enabled, a link for the visitor to display the blog with no category restriction will be added.'); -@define('SERENDIPITY_PHPVERSION_FAIL', 'Serendipity requires a PHP version >= %2$s - you are running a lower version (%1$s) and need to upgrade your PHP version. Most providers offer you to switch to newer PHP versions through their admin panels or .htaccess directives.'); -@define('TOGGLE_VIEW', 'Switch category view mode'); -@define('PUBLISH_NOW', 'Publish this entry now (sets current time and date)'); -@define('EDITOR_TAGS', 'Tags'); -@define('EDITOR_NO_TAGS', 'No tags'); -@define('DASHBOARD_ENTRIES', 'In Progress'); -@define('INSTALL_PASSWORD2', 'Admin password (verify)'); -@define('INSTALL_PASSWORD2_DESC', 'Password for admin login, enter again to verify.'); -@define('INSTALL_PASSWORD_INVALID', 'Your entered passwords for the administrator user do not match.'); -@define('INSTALL_BACKENDPOPUP_GRANULAR', 'Force specific backend popups'); -@define('INSTALL_BACKENDPOPUP_GRANULAR_DESC', 'If you generally disable backend popups, you can specifically force using popups for specific places by entering a comma seperated list of places here. Available places are: '); -@define('START_UPDATE', 'Starting Update ...'); -@define('UPDATE_ALL', 'Update All'); -@define('JS_FAILURE', 'The Serendipity JavaScript-library could not be loaded. This can happen due to PHP or Plugin errors, or even a malformed browser cache. To check the exact error please open <a href="%1$s">%1$s</a> manually in your browser and check for error messages.'); -@define('THEMES_PREVIEW_BLOG', 'See demo on blog.s9y.org'); -@define('SYNDICATION_PLUGIN_XML_DESC', 'Set to "none" if you only want to show a text link.'); -@define('MULTICHECK_NO_ITEM', 'No item selected, please check at least one. <a href="%s">Return to previous page</a>.'); -@define('MULTICHECK_NO_DIR', 'No directory selected, please choose one. <a href="%s">Return to previous page</a>.'); -@define('BULKMOVE_INFO', 'Bulk-move info'); -@define('BULKMOVE_INFO_DESC', 'You can select multiple files to bulk-move them to a new location. <strong>Note:</strong> This action cannot be undone, just like bulk-deletion of multiple files. All checked files will be physically moved, and referring blog entries are rewritten to point to the new location.'); -@define('FIRST_PAGE', 'First Page'); -@define('LAST_PAGE', 'Last Page'); -@define('MEDIA_PROPERTIES_DONE', 'Properties of #%d changed.'); -@define('DIRECTORY_INFO', 'Directory info'); -@define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); -@define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('CATEGORY_PLUGIN_SHOWALL', '"모든 범주"에 대한 링크 표시'); +@define('CATEGORY_PLUGIN_SHOWALL', '사용할 경우 범주 제한 없이 블로그를 보여주는 링크를 방문자가 볼 수 있게 추가합니다.'); +@define('SERENDIPITY_PHPVERSION_FAIL', '세렌디피티는 PHP 버전 %2$s 이상이 필요합니다. 현재 시스템은 더 낮은 버전 (%1$s)을 사용하고 있으므로 업그레이드 해야 합니다. 대부분의 호스팅 서비스 제공자들은 관리자 화면이나 .htaccess 지시어 등을 통해 새로운 PHP 버전으로 업그레이드할 수 있는 기능을 제공합니다.'); +@define('TOGGLE_VIEW', '범주 표시 방법 변경'); +@define('PUBLISH_NOW', '이 글을 지금 게시 (현재 날짜와 시간으로 설정)'); +@define('EDITOR_TAGS', '태그'); +@define('EDITOR_NO_TAGS', '태그 없음'); +@define('DASHBOARD_ENTRIES', '작성 중'); +@define('INSTALL_PASSWORD2', '관리자 암호 (다시 입력)'); +@define('INSTALL_PASSWORD2_DESC', '검증을 위해 관리자 로그인을 위한 암호를 다시 입력합니다.'); +@define('INSTALL_PASSWORD_INVALID', '입력한 관리자 암호가 일치하지 않습니다.'); +@define('INSTALL_BACKENDPOPUP_GRANULAR', '특정 관리자 화면 팝업 창을 강제로 표시'); +@define('INSTALL_BACKENDPOPUP_GRANULAR_DESC', '일반적으로 관리자 화면의 팝업 창을 사용하고 있지 않을 경우라도 팝업 창을 강제로 사용하고자 하는 곳이 있으면 여기에 해당 장소들을 각각 쉼표로 분리하여 입력해둘 수 있습니다. 사용 가능한 장소는: '); +@define('START_UPDATE', '업데이트 시작...'); +@define('UPDATE_ALL', '모두 업데이트'); +@define('JS_FAILURE', '세렌디피티의 자바스크립트 라이브러리를 불러들일 수 없습니다. 이는 PHP나 플러그인 오류 때문에 발생할 수도 있고 브라우저 캐시가 비정상적일 경우에도 경험할 수 있습니다. 정확한 상황을 파악하고자 한다면 <a href="%1$s">%1$s</a> 주소를 브라우저에서 수동으로 열고 오류 내용을 확인하기 바랍니다.'); +@define('THEMES_PREVIEW_BLOG', 'blog.s9y.org에서 시연을 확인'); +@define('SYNDICATION_PLUGIN_XML_DESC', '문자 링크만 보여주기를 원할 경우 "없음"으로 설정합니다.'); +@define('MULTICHECK_NO_ITEM', '선택한 아이템이 없습니다. 최소한 한 개를 선택하십시오. <a href="%s">이전 페이지로 돌아가기</a>.'); +@define('MULTICHECK_NO_DIR', '선택한 디렉토리가 없습니다. 최고한 한 군데를 선택하십시오. <a href="%s">이전 페이지로 돌아가기</a>.'); +@define('BULKMOVE_INFO', '대량으로 이동하기'); +@define('BULKMOVE_INFO_DESC', '여러 파일을 선택하여 한꺼번에 새로운 위치로 이동시킬 수 있습니다. <strong>주의:</strong> 이 작업은 여러 파일의 대량 삭제와 마찬가지로 되돌릴 수 없습니다. 선택한 파일은 물리적으로 이동되며 이를 참조하는 블로그 글은 새 위치를 참조하도록 재작성됩니다.'); +@define('FIRST_PAGE', '첫 페이지'); +@define('LAST_PAGE', '마지막 페이지'); +@define('MEDIA_PROPERTIES_DONE', '%d번의 등록정보가 변경되었습니다.'); +@define('DIRECTORY_INFO', '디렉토리 정보'); +@define('DIRECTORY_INFO_DESC', '디렉토리는 물리적인 폴더/디렉토리 이름을 반영합니다. 아이템을 포함하고 있는 디렉토리를 변경하거나 이동할 경우 두 방법 중 하나를 선택해야 합니다. 원하는 디렉토리 또는 하위 디렉토리를 만든 다음 미디어 보관함을 통해 새 디렉토리로 아이템을 이동하고 나면 원래 디렉토리를 삭제하는 것이 한 방법입니다. 다른 방법은 아래의 디렉토리 편집 버튼을 사용하여 원래 디렉토리를 통째로 변경하고서 원하던 다른 이름 (기존 하위 디렉토리/ + 새 이름)으로 바꾸는 것입니다. 이렇게 하면 모든 디렉토리와 아이템을 이동시키고 참조하는 모든 블로그 글을 변경하게 됩니다.'); +@define('MEDIA_RESIZE_EXISTS', '동일한 폭과 높이를 가진 파일이 이미 존재합니다!'); +@define('USE_CACHE', '캐시 사용하기'); +@define('USE_CACHE_DESC', '특정 데이터베이스 질의를 반복하지 않도록 내부 캐시를 사용하도록 합니다. 중간에서 높은 접속량이 걸리는 서버의 부하를 줄이며 페이지를 불러오는 속도를 향상시킵니다.'); +@define('CONFIG_PERMALINK_PATH_DESC', '세렌디피티가 주소(URL)와 작업을 제대로 연동시킬 수 있도록 반드시 접두사를 지정해야 한다는 점에 유의하기 바랍니다. 접두사는 고유한 이름이면 아무렇게나 지정할 수 있지만 비워둘 수는 없습니다. 이는 모든 접두사 지정사항에 대해 동일하게 적용됩니다.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_nl.inc.php b/lang/serendipity_lang_nl.inc.php index 4e2b33a9..fcb78d98 100644 --- a/lang/serendipity_lang_nl.inc.php +++ b/lang/serendipity_lang_nl.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_no.inc.php b/lang/serendipity_lang_no.inc.php index 0cb92539..9a9f0e52 100644 --- a/lang/serendipity_lang_no.inc.php +++ b/lang/serendipity_lang_no.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_pl.inc.php b/lang/serendipity_lang_pl.inc.php index 22c22302..566d8ad0 100644 --- a/lang/serendipity_lang_pl.inc.php +++ b/lang/serendipity_lang_pl.inc.php @@ -1110,3 +1110,10 @@ $i18n_filename_to = array('_', 'a', 'A', 'a', 'A', 'b', 'B', 'c', 'C', 'c', 'C @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_pt.inc.php b/lang/serendipity_lang_pt.inc.php index 77a51c2d..f8c2ac71 100644 --- a/lang/serendipity_lang_pt.inc.php +++ b/lang/serendipity_lang_pt.inc.php @@ -1116,3 +1116,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_pt_PT.inc.php b/lang/serendipity_lang_pt_PT.inc.php index a072e130..23e6f5f9 100644 --- a/lang/serendipity_lang_pt_PT.inc.php +++ b/lang/serendipity_lang_pt_PT.inc.php @@ -1123,3 +1123,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_ro.inc.php b/lang/serendipity_lang_ro.inc.php index f666a5e9..4830e1c9 100644 --- a/lang/serendipity_lang_ro.inc.php +++ b/lang/serendipity_lang_ro.inc.php @@ -1114,3 +1114,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_ru.inc.php b/lang/serendipity_lang_ru.inc.php index e70d6ec5..1bf9523e 100644 --- a/lang/serendipity_lang_ru.inc.php +++ b/lang/serendipity_lang_ru.inc.php @@ -1115,3 +1115,10 @@ $i18n_filename_to = array('_', 'a', 'A', 'b', 'B', 'v', 'V', 'g', 'G', 'd', 'D @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_sa.inc.php b/lang/serendipity_lang_sa.inc.php index 8e00ae58..c180b245 100644 --- a/lang/serendipity_lang_sa.inc.php +++ b/lang/serendipity_lang_sa.inc.php @@ -1031,3 +1031,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_se.inc.php b/lang/serendipity_lang_se.inc.php index 690b97d9..9967c34d 100644 --- a/lang/serendipity_lang_se.inc.php +++ b/lang/serendipity_lang_se.inc.php @@ -1112,3 +1112,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_sk.inc.php b/lang/serendipity_lang_sk.inc.php index 49f9bb17..194ab901 100644 --- a/lang/serendipity_lang_sk.inc.php +++ b/lang/serendipity_lang_sk.inc.php @@ -1102,3 +1102,10 @@ $i18n_filename_to = array ( @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_ta.inc.php b/lang/serendipity_lang_ta.inc.php index 8701dd2e..a63f9397 100644 --- a/lang/serendipity_lang_ta.inc.php +++ b/lang/serendipity_lang_ta.inc.php @@ -1111,3 +1111,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_tn.inc.php b/lang/serendipity_lang_tn.inc.php index 72382ca5..f8213b57 100644 --- a/lang/serendipity_lang_tn.inc.php +++ b/lang/serendipity_lang_tn.inc.php @@ -1116,3 +1116,10 @@ $i18n_unknown = 'tw'; @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_tr.inc.php b/lang/serendipity_lang_tr.inc.php index d11c9148..f3d095e3 100644 --- a/lang/serendipity_lang_tr.inc.php +++ b/lang/serendipity_lang_tr.inc.php @@ -1116,3 +1116,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_tw.inc.php b/lang/serendipity_lang_tw.inc.php index f18b5c2c..4ac96f88 100644 --- a/lang/serendipity_lang_tw.inc.php +++ b/lang/serendipity_lang_tw.inc.php @@ -1117,3 +1117,10 @@ $i18n_unknown = 'tw'; @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/lang/serendipity_lang_zh.inc.php b/lang/serendipity_lang_zh.inc.php index d4d10e8a..cb7f5631 100644 --- a/lang/serendipity_lang_zh.inc.php +++ b/lang/serendipity_lang_zh.inc.php @@ -1112,3 +1112,10 @@ @define('DIRECTORY_INFO', 'Directory info'); @define('DIRECTORY_INFO_DESC', 'Directories reflect their physical folder directory name. If you want to change or move directories which contain items, you have two choices. Either create the directory or subdirectory you want, then move the items to the new directory via the media library and afterwards, delete the empty old directory there. Or completely change the whole old directory via the edit directory button below and rename it to whatever you like (existing subdir/ + newname). This will move all directories and items and change referring blog entries.'); @define('MEDIA_RESIZE_EXISTS', 'File dimensions already exist!'); +@define('USE_CACHE', 'Enable caching'); +@define('USE_CACHE_DESC', 'Enables an internal cache to not repeat specific database queries. This reduces the load on servers with medium to high traffic and improves page load time.'); +@define('CONFIG_PERMALINK_PATH_DESC', 'Please note that you have to use a prefix so that Serendipity can properly map the URL to the proper action. You may change the prefix to any unique name, but not remove it. This applies to all path prefix definitions.'); +@define('CONFIG_ALLOW_LOCAL_URL', 'Allow to fetch data from local URLs'); +@define('CONFIG_ALLOW_LOCAL_URL_DESC', 'By default, it is forbidden due to security constrains to fetch data from local URLs to prevent Server Side Request Forgers (SSRF). If you use a local intranet, you can enable this option to allow fetching data.'); +@define('REMOTE_FILE_INVALID', 'The given URL appears to be local and is not allowed to be fetched. You can allow this by setting the option "Allow to fetch data from local URLs" in your blog configuration.'); +@define('URL_NOT_FOUND', 'The requested page could not be found (404). This is the default page.'); diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_bg.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_bg.inc.php index a2064927..e731e4c8 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_bg.inc.php @@ -1,11 +1,12 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ - @define('PLUGIN_EVENT_BBCODE_NAME', 'Текстово форматиране: BBCode'); - @define('PLUGIN_EVENT_BBCODE_DESC', 'Форматиране на текст (постинг, коментар, HTML поле) с BBcode'); - @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Форматирането с <a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a> е разрешено'); - @define('PLUGIN_EVENT_BBCODE_TARGET', 'Използване на target="blank" за връзките ?'); +@define('PLUGIN_EVENT_BBCODE_NAME', 'Текстово форматиране: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'Форматиране на текст (постинг, коментар, HTML поле) с BBcode'); +@define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Форматирането с <a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a> е разрешено'); +@define('PLUGIN_EVENT_BBCODE_TARGET', 'Използване на target="blank" за връзките ?'); + diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_cn.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_cn.inc.php index cde94aa4..b15cc018 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_cn.inc.php @@ -4,3 +4,4 @@ @define('PLUGIN_EVENT_BBCODE_DESC', '使用BBCode标记语言'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', '允许使用<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a>格式代码'); @define('PLUGIN_EVENT_BBCODE_TARGET', '处理链接时使用 target="blank"?(点击链接后在新窗口显示网页内容)'); + diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_cs.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_cs.inc.php index e3752c37..92a80d4a 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1410 2007-12-03 23:40:00 VladaAjgl $ +<?php /** * @version $Revision: 1410 $ @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Povolit (= překládat) značkovací formát <a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a>'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'Použít pro odkazy target="_blank" (odkazy otevírat v novém okně)?'); -?> diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_cz.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_cz.inc.php index 505d0db5..92a80d4a 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cz.inc.php 1410 2007-12-03 23:40:00 VladaAjgl $ +<?php /** * @version $Revision: 1410 $ @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Povolit (= překládat) značkovací formát <a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a>'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'Použít pro odkazy target="_blank" (odkazy otevírat v novém okně)?'); -?> diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_de.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_de.inc.php index bf813539..2b04d4b0 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_de.inc.php @@ -1,13 +1,14 @@ -<?php # lang_de.inc.php 1.0 2009-06-03 09:47:51 VladaAjgl $ +<?php /** * @version 1.0 * @author Konrad Bauckmeier <kontakt@dd4kids.de> * @translated 2009/06/03 */ - @define('PLUGIN_EVENT_BBCODE_NAME', 'Textformatierung: BBCode'); - @define('PLUGIN_EVENT_BBCODE_DESC', 'BBCode-Formatierung durchführen'); - @define('PLUGIN_EVENT_BBCODE_TRANSFORM', '<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a>-Formatierung erlaubt'); +@define('PLUGIN_EVENT_BBCODE_NAME', 'Textformatierung: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'BBCode-Formatierung durchführen'); +@define('PLUGIN_EVENT_BBCODE_TRANSFORM', '<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a>-Formatierung erlaubt'); // Next lines were translated on 2009/06/03 -@define('PLUGIN_EVENT_BBCODE_TARGET', 'Benutze target="blank" für Links?'); \ No newline at end of file +@define('PLUGIN_EVENT_BBCODE_TARGET', 'Benutze target="blank" für Links?'); + diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_es.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_es.inc.php index 319a8569..c3e7a30b 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_es.inc.php @@ -1,12 +1,11 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ -@define('PLUGIN_EVENT_BBCODE_NAME', 'Formato: BBCode'); -@define('PLUGIN_EVENT_BBCODE_DESC', 'Dar formato al texto utilizando BBCode'); +@define('PLUGIN_EVENT_BBCODE_NAME', 'Formato: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'Dar formato al texto utilizando BBCode'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Formato <a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a> permitido'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_fr.inc.php index bd095c5e..5dc1631a 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -13,9 +13,7 @@ # # ########################################################################## -@define('PLUGIN_EVENT_BBCODE_NAME', 'Balises: BBCode'); -@define('PLUGIN_EVENT_BBCODE_DESC', 'Permet l\'utilisation de balises BBCode dans le texte de vos billets'); +@define('PLUGIN_EVENT_BBCODE_NAME', 'Balises: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'Permet l\'utilisation de balises BBCode dans le texte de vos billets'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Syntaxe <a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a> autorisée'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_ja.inc.php index a0db4361..f45c1252 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 1410 */ @@ -11,4 +11,3 @@ @define('PLUGIN_EVENT_BBCODE_TRANSFORM', '<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BB コード</a> 書式を許可します。'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'リンクに「target="blank"」を使いますか?'); -?> diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_ko.inc.php index 03836df3..51f29829 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_ko.inc.php @@ -1,9 +1,8 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_BBCODE_NAME', '마크업: BB코드'); - @define('PLUGIN_EVENT_BBCODE_DESC', 'BB코드 마크업을 글에 적용함'); - @define('PLUGIN_EVENT_BBCODE_TRANSFORM', '<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BB코드</a>를 글에 쓸 수 있습니다.'); +@define('PLUGIN_EVENT_BBCODE_NAME', '마크업: BB코드'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'BB코드 마크업을 글에 적용함'); +@define('PLUGIN_EVENT_BBCODE_TRANSFORM', '<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BB코드</a>를 글에 쓸 수 있습니다.'); -?> diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_pl.inc.php index 95aed405..206ad477 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -10,3 +10,4 @@ @define('PLUGIN_EVENT_BBCODE_DESC', 'Przekształcaj tekst stosując tagi BBCode'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', '<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a> format dozwolony'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'Używać target="blank" dla linków?'); + diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_pt_PT.inc.php index 53e4036e..885b0b55 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id:$ +<?php ########################################################################## # serendipity - another blogger... # @@ -12,9 +12,7 @@ # # ########################################################################## -@define('PLUGIN_EVENT_BBCODE_NAME', 'Código: BBCode'); -@define('PLUGIN_EVENT_BBCODE_DESC', 'Permite usar no texto codificação BBCode'); +@define('PLUGIN_EVENT_BBCODE_NAME', 'Código: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'Permite usar no texto codificação BBCode'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Sintaxe <a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a> autorizada'); -/* vim: set sts=4 ts=4 expandtab : */ -?> diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_sk.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_sk.inc.php index bb815192..ba170060 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_sk.inc.php @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Zapnúť (= prekladať) označovací formát <a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a>'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'Použiť pre odkazy target="_blank" (odkazy otvárať v novom okne)?'); -?> diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_tn.inc.php index c07674a8..4eb485c9 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,7 +12,7 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_BBCODE_NAME', '標記語言: BBCode'); - @define('PLUGIN_EVENT_BBCODE_DESC', '使用 BBCode 的標記語言'); - @define('PLUGIN_EVENT_BBCODE_TRANSFORM', '<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a> 可用的格式'); -?> +@define('PLUGIN_EVENT_BBCODE_NAME', '標記語言: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', '使用 BBCode 的標記語言'); +@define('PLUGIN_EVENT_BBCODE_TRANSFORM', '<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a> 可用的格式'); + diff --git a/plugins/serendipity_event_bbcode/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_bbcode/UTF-8/lang_zh.inc.php index cde94aa4..b15cc018 100644 --- a/plugins/serendipity_event_bbcode/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_bbcode/UTF-8/lang_zh.inc.php @@ -4,3 +4,4 @@ @define('PLUGIN_EVENT_BBCODE_DESC', '使用BBCode标记语言'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', '允许使用<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a>格式代码'); @define('PLUGIN_EVENT_BBCODE_TARGET', '处理链接时使用 target="blank"?(点击链接后在新窗口显示网页内容)'); + diff --git a/plugins/serendipity_event_bbcode/lang_bg.inc.php b/plugins/serendipity_event_bbcode/lang_bg.inc.php index 63003edd..aa9827ea 100644 --- a/plugins/serendipity_event_bbcode/lang_bg.inc.php +++ b/plugins/serendipity_event_bbcode/lang_bg.inc.php @@ -1,11 +1,12 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ - @define('PLUGIN_EVENT_BBCODE_NAME', '�������� �����������: BBCode'); - @define('PLUGIN_EVENT_BBCODE_DESC', '����������� �� ����� (�������, ��������, HTML ����) � BBcode'); - @define('PLUGIN_EVENT_BBCODE_TRANSFORM', '������������� � <a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a> � ���������'); - @define('PLUGIN_EVENT_BBCODE_TARGET', '���������� �� target="blank" �� �������� ?'); +@define('PLUGIN_EVENT_BBCODE_NAME', '�������� �����������: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', '����������� �� ����� (�������, ��������, HTML ����) � BBcode'); +@define('PLUGIN_EVENT_BBCODE_TRANSFORM', '������������� � <a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a> � ���������'); +@define('PLUGIN_EVENT_BBCODE_TARGET', '���������� �� target="blank" �� �������� ?'); + diff --git a/plugins/serendipity_event_bbcode/lang_cn.inc.php b/plugins/serendipity_event_bbcode/lang_cn.inc.php index cde94aa4..c00a9a53 100644 --- a/plugins/serendipity_event_bbcode/lang_cn.inc.php +++ b/plugins/serendipity_event_bbcode/lang_cn.inc.php @@ -3,4 +3,5 @@ @define('PLUGIN_EVENT_BBCODE_NAME', '标记语言: BBCode'); @define('PLUGIN_EVENT_BBCODE_DESC', '使用BBCode标记语言'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', '允许使用<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a>格式代码'); -@define('PLUGIN_EVENT_BBCODE_TARGET', '处理链接时使用 target="blank"?(点击链接后在新窗口显示网页内容)'); +@define('PLUGIN_EVENT_BBCODE_TARGET', '处理链接时使用 target="blank"?(点击链接后在新窗口显示网页内容)'); + diff --git a/plugins/serendipity_event_bbcode/lang_cs.inc.php b/plugins/serendipity_event_bbcode/lang_cs.inc.php index 2e8d93e7..24720377 100644 --- a/plugins/serendipity_event_bbcode/lang_cs.inc.php +++ b/plugins/serendipity_event_bbcode/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1410 2007-12-03 23:40:00 VladaAjgl $ +<?php /** * @version $Revision: 1410 $ @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Povolit (= p�ekl�dat) zna�kovac� form�t <a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a>'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'Pou��t pro odkazy target="_blank" (odkazy otev�rat v nov�m okn�)?'); -?> diff --git a/plugins/serendipity_event_bbcode/lang_cz.inc.php b/plugins/serendipity_event_bbcode/lang_cz.inc.php index 4839932d..382834ea 100644 --- a/plugins/serendipity_event_bbcode/lang_cz.inc.php +++ b/plugins/serendipity_event_bbcode/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cz.inc.php 1410 2007-12-03 23:40:00 VladaAjgl $ +<?php /** * @version $Revision: 1410 $ @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Povolit (= p�ekl�dat) zna�kovac� form�t <a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a>'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'Pou��t pro odkazy target="_blank" (odkazy otev�rat v nov�m okn�)?'); -?> diff --git a/plugins/serendipity_event_bbcode/lang_de.inc.php b/plugins/serendipity_event_bbcode/lang_de.inc.php index 9fd3ae60..3d46131b 100644 --- a/plugins/serendipity_event_bbcode/lang_de.inc.php +++ b/plugins/serendipity_event_bbcode/lang_de.inc.php @@ -1,13 +1,14 @@ -<?php # lang_de.inc.php 1.0 2009-06-03 09:47:51 VladaAjgl $ +<?php /** * @version 1.0 * @author Konrad Bauckmeier <kontakt@dd4kids.de> * @translated 2009/06/03 */ - @define('PLUGIN_EVENT_BBCODE_NAME', 'Textformatierung: BBCode'); - @define('PLUGIN_EVENT_BBCODE_DESC', 'BBCode-Formatierung durchf�hren'); - @define('PLUGIN_EVENT_BBCODE_TRANSFORM', '<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a>-Formatierung erlaubt'); +@define('PLUGIN_EVENT_BBCODE_NAME', 'Textformatierung: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'BBCode-Formatierung durchf�hren'); +@define('PLUGIN_EVENT_BBCODE_TRANSFORM', '<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a>-Formatierung erlaubt'); // Next lines were translated on 2009/06/03 -@define('PLUGIN_EVENT_BBCODE_TARGET', 'Benutze target="blank" f�r Links?'); \ No newline at end of file +@define('PLUGIN_EVENT_BBCODE_TARGET', 'Benutze target="blank" f�r Links?'); + diff --git a/plugins/serendipity_event_bbcode/lang_en.inc.php b/plugins/serendipity_event_bbcode/lang_en.inc.php index 934a39d5..a7243f27 100644 --- a/plugins/serendipity_event_bbcode/lang_en.inc.php +++ b/plugins/serendipity_event_bbcode/lang_en.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Translator Name <yourmail@example.com> * EN-Revision: Revision of lang_en.inc.php */ @@ -11,4 +11,3 @@ @define('PLUGIN_EVENT_BBCODE_TRANSFORM', '<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a> format allowed'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'Use target="blank" for links?'); -?> diff --git a/plugins/serendipity_event_bbcode/lang_es.inc.php b/plugins/serendipity_event_bbcode/lang_es.inc.php index 319a8569..c3e7a30b 100644 --- a/plugins/serendipity_event_bbcode/lang_es.inc.php +++ b/plugins/serendipity_event_bbcode/lang_es.inc.php @@ -1,12 +1,11 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ -@define('PLUGIN_EVENT_BBCODE_NAME', 'Formato: BBCode'); -@define('PLUGIN_EVENT_BBCODE_DESC', 'Dar formato al texto utilizando BBCode'); +@define('PLUGIN_EVENT_BBCODE_NAME', 'Formato: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'Dar formato al texto utilizando BBCode'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Formato <a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a> permitido'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_bbcode/lang_fa.inc.php b/plugins/serendipity_event_bbcode/lang_fa.inc.php index 00a4fcfe..4accfbf0 100644 --- a/plugins/serendipity_event_bbcode/lang_fa.inc.php +++ b/plugins/serendipity_event_bbcode/lang_fa.inc.php @@ -1,13 +1,12 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Omid Mottaghi <webmaster@oxygenws.com> * EN-Revision: Revision of lang_fa.inc.php */ -@define('PLUGIN_EVENT_BBCODE_NAME', 'برچسب: BBCode'); -@define('PLUGIN_EVENT_BBCODE_DESC', 'برچسب زدن به نوشته ها توسط BBCode'); +@define('PLUGIN_EVENT_BBCODE_NAME', 'برچسب: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'برچسب زدن به نوشته ها توسط BBCode'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'روش های <a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BB Code</a> مجاز می باشند'); -?> diff --git a/plugins/serendipity_event_bbcode/lang_fr.inc.php b/plugins/serendipity_event_bbcode/lang_fr.inc.php index 0ee8ef27..0ff3ac1f 100644 --- a/plugins/serendipity_event_bbcode/lang_fr.inc.php +++ b/plugins/serendipity_event_bbcode/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -13,9 +13,7 @@ # # ########################################################################## -@define('PLUGIN_EVENT_BBCODE_NAME', 'Balises: BBCode'); -@define('PLUGIN_EVENT_BBCODE_DESC', 'Permet l\'utilisation de balises BBCode dans le texte de vos billets'); +@define('PLUGIN_EVENT_BBCODE_NAME', 'Balises: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'Permet l\'utilisation de balises BBCode dans le texte de vos billets'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Syntaxe <a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a> autoris�e'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_bbcode/lang_ja.inc.php b/plugins/serendipity_event_bbcode/lang_ja.inc.php index a0db4361..f45c1252 100644 --- a/plugins/serendipity_event_bbcode/lang_ja.inc.php +++ b/plugins/serendipity_event_bbcode/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 1410 */ @@ -11,4 +11,3 @@ @define('PLUGIN_EVENT_BBCODE_TRANSFORM', '<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BB コード</a> 書式を許可します。'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'リンクに「target="blank"」を使いますか?'); -?> diff --git a/plugins/serendipity_event_bbcode/lang_ko.inc.php b/plugins/serendipity_event_bbcode/lang_ko.inc.php index 03836df3..51f29829 100644 --- a/plugins/serendipity_event_bbcode/lang_ko.inc.php +++ b/plugins/serendipity_event_bbcode/lang_ko.inc.php @@ -1,9 +1,8 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_BBCODE_NAME', '마크업: BB코드'); - @define('PLUGIN_EVENT_BBCODE_DESC', 'BB코드 마크업을 글에 적용함'); - @define('PLUGIN_EVENT_BBCODE_TRANSFORM', '<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BB코드</a>를 글에 쓸 수 있습니다.'); +@define('PLUGIN_EVENT_BBCODE_NAME', '마크업: BB코드'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'BB코드 마크업을 글에 적용함'); +@define('PLUGIN_EVENT_BBCODE_TRANSFORM', '<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BB코드</a>를 글에 쓸 수 있습니다.'); -?> diff --git a/plugins/serendipity_event_bbcode/lang_pl.inc.php b/plugins/serendipity_event_bbcode/lang_pl.inc.php index 7fc68460..2c968915 100644 --- a/plugins/serendipity_event_bbcode/lang_pl.inc.php +++ b/plugins/serendipity_event_bbcode/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -10,3 +10,4 @@ @define('PLUGIN_EVENT_BBCODE_DESC', 'Przekszta�caj tekst stosuj�c tagi BBCode'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', '<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a> format dozwolony'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'U�ywa� target="blank" dla link�w?'); + diff --git a/plugins/serendipity_event_bbcode/lang_pt_PT.inc.php b/plugins/serendipity_event_bbcode/lang_pt_PT.inc.php index d429aaf0..9401075a 100644 --- a/plugins/serendipity_event_bbcode/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_bbcode/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id:$ +<?php ########################################################################## # serendipity - another blogger... # @@ -12,9 +12,7 @@ # # ########################################################################## -@define('PLUGIN_EVENT_BBCODE_NAME', 'C�digo: BBCode'); -@define('PLUGIN_EVENT_BBCODE_DESC', 'Permite usar no texto codifica��o BBCode'); +@define('PLUGIN_EVENT_BBCODE_NAME', 'C�digo: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', 'Permite usar no texto codifica��o BBCode'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Sintaxe <a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a> autorizada'); -/* vim: set sts=4 ts=4 expandtab : */ -?> diff --git a/plugins/serendipity_event_bbcode/lang_sk.inc.php b/plugins/serendipity_event_bbcode/lang_sk.inc.php index 2df04407..fe9c4def 100644 --- a/plugins/serendipity_event_bbcode/lang_sk.inc.php +++ b/plugins/serendipity_event_bbcode/lang_sk.inc.php @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_BBCODE_TRANSFORM', 'Zapn�� (= preklada�) ozna�ovac� form�t <a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a>'); @define('PLUGIN_EVENT_BBCODE_TARGET', 'Pou�i� pre odkazy target="_blank" (odkazy otv�ra� v novom okne)?'); -?> diff --git a/plugins/serendipity_event_bbcode/lang_tn.inc.php b/plugins/serendipity_event_bbcode/lang_tn.inc.php index c07674a8..4eb485c9 100644 --- a/plugins/serendipity_event_bbcode/lang_tn.inc.php +++ b/plugins/serendipity_event_bbcode/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,7 +12,7 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_BBCODE_NAME', '標記語言: BBCode'); - @define('PLUGIN_EVENT_BBCODE_DESC', '使用 BBCode 的標記語言'); - @define('PLUGIN_EVENT_BBCODE_TRANSFORM', '<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a> 可用的格式'); -?> +@define('PLUGIN_EVENT_BBCODE_NAME', '標記語言: BBCode'); +@define('PLUGIN_EVENT_BBCODE_DESC', '使用 BBCode 的標記語言'); +@define('PLUGIN_EVENT_BBCODE_TRANSFORM', '<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a> 可用的格式'); + diff --git a/plugins/serendipity_event_bbcode/lang_zh.inc.php b/plugins/serendipity_event_bbcode/lang_zh.inc.php index cde94aa4..c00a9a53 100644 --- a/plugins/serendipity_event_bbcode/lang_zh.inc.php +++ b/plugins/serendipity_event_bbcode/lang_zh.inc.php @@ -3,4 +3,5 @@ @define('PLUGIN_EVENT_BBCODE_NAME', '标记语言: BBCode'); @define('PLUGIN_EVENT_BBCODE_DESC', '使用BBCode标记语言'); @define('PLUGIN_EVENT_BBCODE_TRANSFORM', '允许使用<a href="http://www.phpbb.com/phpBB/faq.php?mode=bbcode">BBCode</a>格式代码'); -@define('PLUGIN_EVENT_BBCODE_TARGET', '处理链接时使用 target="blank"?(点击链接后在新窗口显示网页内容)'); +@define('PLUGIN_EVENT_BBCODE_TARGET', '处理链接时使用 target="blank"?(点击链接后在新窗口显示网页内容)'); + diff --git a/plugins/serendipity_event_bbcode/serendipity_event_bbcode.php b/plugins/serendipity_event_bbcode/serendipity_event_bbcode.php index 8c9aac11..bcf0b599 100644 --- a/plugins/serendipity_event_bbcode/serendipity_event_bbcode.php +++ b/plugins/serendipity_event_bbcode/serendipity_event_bbcode.php @@ -1,4 +1,8 @@ -<?php # $Id$ +<?php + +if (IN_serendipity !== true) { + die ("Don't hack!"); +} @serendipity_plugin_api::load_language(dirname(__FILE__)); @@ -13,14 +17,14 @@ class serendipity_event_bbcode extends serendipity_event $propbag->add('description', PLUGIN_EVENT_BBCODE_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Jez Hancock, Garvin Hicking'); - $propbag->add('version', '2.09'); + $propbag->add('version', '2.10'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); $propbag->add('cachable_events', array('frontend_display' => true)); - $propbag->add('event_hooks', array('frontend_display' => true, 'frontend_comment' => true, 'css' => true)); + $propbag->add('event_hooks', array('frontend_display' => true, 'frontend_comment' => true, 'css' => true)); $propbag->add('groups', array('MARKUP')); $this->markup_elements = array( @@ -51,8 +55,8 @@ class serendipity_event_bbcode extends serendipity_event $propbag->add('configuration', $conf_array); } - - function bbcode_callback($matches) { + function bbcode_callback($matches) + { $type = $matches[1]; $input = trim($matches[2], "\r\n"); @@ -102,11 +106,11 @@ class serendipity_event_bbcode extends serendipity_event return($input); } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } - function introspect_config_item($name, &$propbag) { switch($name) { @@ -131,16 +135,19 @@ class serendipity_event_bbcode extends serendipity_event return true; } - function install() { + function install() + { serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function uninstall(&$propbag) { + function uninstall(&$propbag) + { serendipity_plugin_api::hook_event('backend_cache_purge', $this->title); serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function bbcode($input) { + function bbcode($input) + { static $bbcodes = null; // Only allow numbers and characters for CSS: "red", "#FF0000", ... @@ -224,39 +231,42 @@ class serendipity_event_bbcode extends serendipity_event } - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { + switch($event) { + case 'frontend_display': foreach ($this->markup_elements as $temp) { - if (serendipity_db_bool($this->get_config($temp['name'], true)) && isset($eventData[$temp['element']]) && + if (serendipity_db_bool($this->get_config($temp['name'], 'true')) && isset($eventData[$temp['element']]) && !$eventData['properties']['ep_disable_markup_' . $this->instance] && !isset($serendipity['POST']['properties']['disable_markup_' . $this->instance])) { $element = $temp['element']; $eventData[$element] = $this->bbcode($eventData[$element]); } } - return true; break; case 'frontend_comment': - if (serendipity_db_bool($this->get_config('COMMENT', true))) { + if (serendipity_db_bool($this->get_config('COMMENT', 'true'))) { echo '<div class="serendipity_commentDirection serendipity_comment_bbcode">' . PLUGIN_EVENT_BBCODE_TRANSFORM . '</div>'; } - return true; break; case 'css': - if (strpos($eventData, '.bb-code') !== false) { - // class exists in CSS, so a user has customized it and we don't need default - return true; - } -?> + // CSS class does NOT exist by user customized template styles, include default + if (strpos($eventData, '.bb-code') === false) { + $eventData .= ' + + +/* serendipity_event_bbcode start */ + .bb-quote, .bb-code, .bb-php, .bb-code-title, .bb-php-title { margin-left: 20px; margin-right: 20px; @@ -294,18 +304,23 @@ class serendipity_event_bbcode extends serendipity_event .bb-list-ordered-ua { list-style-type: upper-alpha; } -<?php - return true; - break; + +/* serendipity_event_bbcode end */ + +'; + } + break; default: return false; } + return true; } else { return false; } } + } /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/plugins/serendipity_event_creativecommons/ChangeLog b/plugins/serendipity_event_creativecommons/ChangeLog index d8a82e96..756f497c 100644 --- a/plugins/serendipity_event_creativecommons/ChangeLog +++ b/plugins/serendipity_event_creativecommons/ChangeLog @@ -1,4 +1,4 @@ -# $Id$ + ------------------------------------------------------------------------ Version 1.4 (brockhaus): diff --git a/plugins/serendipity_event_creativecommons/UTF-8/documentation_cs.html b/plugins/serendipity_event_creativecommons/UTF-8/documentation_cs.html deleted file mode 100644 index 7df715dd..00000000 --- a/plugins/serendipity_event_creativecommons/UTF-8/documentation_cs.html +++ /dev/null @@ -1,32 +0,0 @@ -<html> - <head> - <meta http-equiv="content-type" content="text/html; charset=utf-8"> - <meta name="generator" content="PSPad editor, www.pspad.com"> - <title>Dokumentace: Licence Creative Commons</title> - </head> - -<body> - -<h1>Dokumentace k pluginu 'Licence Creative Commons'</h1> - -<p>Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 9.10.2010. Od té doby mohl být plugin pozměněn nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i <a href="../ChangeLog">aktuální anglický ChangeLog</a>. -<p> - - -<h2>Historie verzí (ChangeLog)</h2> -<ul> -<li>Verze 1.4, autor [brockhaus]</li> - <ul> - <li>Změněna výchozí verze CreativeCommons na 3.0, při aktualizaci bude zachováno nastavení ze starší verze pluginu.</li> - <li>BY, jednivá verze, ve které platí, je verze 3.0; Verze 2.5 to nepodporuje.</li> - <li>Japonští uživatelé dostávali špatný odkaz na Licenci Creative Common.</li> - <li>Titulek při najetí na obrázek je nyní podporovaný i v Mozille (atribut title)</li> - </ul> -<li>Verze 1.3, autor [Evan Nemerson]</li> - <ul> - <li>původní verze</li> - </ul> -</ul> - - </body> -</html> diff --git a/plugins/serendipity_event_creativecommons/UTF-8/documentation_cz.html b/plugins/serendipity_event_creativecommons/UTF-8/documentation_cz.html deleted file mode 100644 index 7df715dd..00000000 --- a/plugins/serendipity_event_creativecommons/UTF-8/documentation_cz.html +++ /dev/null @@ -1,32 +0,0 @@ -<html> - <head> - <meta http-equiv="content-type" content="text/html; charset=utf-8"> - <meta name="generator" content="PSPad editor, www.pspad.com"> - <title>Dokumentace: Licence Creative Commons</title> - </head> - -<body> - -<h1>Dokumentace k pluginu 'Licence Creative Commons'</h1> - -<p>Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 9.10.2010. Od té doby mohl být plugin pozměněn nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i <a href="../ChangeLog">aktuální anglický ChangeLog</a>. -<p> - - -<h2>Historie verzí (ChangeLog)</h2> -<ul> -<li>Verze 1.4, autor [brockhaus]</li> - <ul> - <li>Změněna výchozí verze CreativeCommons na 3.0, při aktualizaci bude zachováno nastavení ze starší verze pluginu.</li> - <li>BY, jednivá verze, ve které platí, je verze 3.0; Verze 2.5 to nepodporuje.</li> - <li>Japonští uživatelé dostávali špatný odkaz na Licenci Creative Common.</li> - <li>Titulek při najetí na obrázek je nyní podporovaný i v Mozille (atribut title)</li> - </ul> -<li>Verze 1.3, autor [Evan Nemerson]</li> - <ul> - <li>původní verze</li> - </ul> -</ul> - - </body> -</html> diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_cn.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_cn.inc.php index 7f22e099..b0c6a9eb 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_cn.inc.php @@ -12,5 +12,6 @@ @define('PLUGIN_CREATIVECOMMONS_NC_DESC', '作者允许他人复制、分发、演示和使用该作品。同时,使用者不得将该作品用于商业用途,除非得到作者授权。'); @define('PLUGIN_CREATIVECOMMONS_ND', '是否允许对你的作品修改?'); @define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者只允许他人复制、分发、演示、使用未被修改的该作品。'); -@define('PLUGIN_CREATIVECOMMONS_ND_DESC','作者只允许他人复制、分发、演示和使用未被修改的该作品,而不是在此作品基础上修改后的作品。'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者只允许他人复制、分发、演示和使用未被修改的该作品,而不是在此作品基础上修改后的作品。'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', '如果别人也遵守创作共用协议的话,允许。'); + diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_cs.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_cs.inc.php index fb3eae47..2e9145d7 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2007-12-13 12:00:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -20,4 +20,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Volba NE znamená, že: Vlastník licence povoluje ostatním kopírovat, distribuovat, zobrazovat a užívat dílo pouze v původním znění. Žádné jeho změny či úpravy nejsou povoleny.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Ano, pokud ho budou ostatní šířit pod stejnou licencí'); -?> diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_cz.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_cz.inc.php index fb3eae47..2e9145d7 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2007-12-13 12:00:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -20,4 +20,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Volba NE znamená, že: Vlastník licence povoluje ostatním kopírovat, distribuovat, zobrazovat a užívat dílo pouze v původním znění. Žádné jeho změny či úpravy nejsou povoleny.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Ano, pokud ho budou ostatní šířit pod stejnou licencí'); -?> diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_de.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_de.inc.php index 18544406..bbb30dc0 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_de.inc.php @@ -1,15 +1,16 @@ -<?php # $Id$ +<?php + +@define('PLUGIN_CREATIVECOMMONS_NAME', 'Creative Commons Lizenz'); +@define('PLUGIN_CREATIVECOMMONS_DESC', 'Wählen Sie eine Lizenz für den Inhalt'); +@define('PLUGIN_CREATIVECOMMONS_TXT', 'Text anzeigen?'); +@define('PLUGIN_CREATIVECOMMONS_TXT_DESC', 'Zeigt eine kurze Erklärung zu Ihrer individuellen Lizensierung an'); +@define('PLUGIN_CREATIVECOMMONS_CAP', 'Der Inhalt dieses Werkes ist lizensiert unter der <a href="#license_uri#">Creative Commons Lizenz</a>'); +@define('PLUGIN_CREATIVECOMMONS_CAP_PD', 'Der Inhalt dieses Werkes ist als <a href="#license_url#}">Public Domain</a> gewidmet'); +// @define('PLUGIN_CREATIVECOMMONS_BY', 'Attribution (Nennung als Author) erforderlich?'); +// @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk zu kopieren, zu verteilen, anzuwenden und darzustellen. Als Gegenleistung müssen Lizenznehmer den ursprünglichen Authoren nennen.'); +@define('PLUGIN_CREATIVECOMMONS_NC', 'Kommerzielle Nutzung des Werkes erlauben?'); +@define('PLUGIN_CREATIVECOMMONS_NC_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk zu kopieren, zu verteilen, anzuwenden und darzustellen. Als Gegenleistung dürfen die Lizenznehmer das Werk nicht in kommerziellem Kontext einsetzen - es sei denn, sie erhalten die ausdrückliche Genehmigung.'); +@define('PLUGIN_CREATIVECOMMONS_ND', 'Veränderungen des Werkes erlauben?'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk in unveränderter Form zu kopieren, zu verteilen, anzuwenden und darzustellen. Daran anlehnende oder ableitende Werke sind nicht erlaubt.'); +@define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Ja, solange dieses Recht weitergegeben wird'); - @define('PLUGIN_CREATIVECOMMONS_NAME', 'Creative Commons Lizenz'); - @define('PLUGIN_CREATIVECOMMONS_DESC', 'Wählen Sie eine Lizenz für den Inhalt'); - @define('PLUGIN_CREATIVECOMMONS_TXT', 'Text anzeigen?'); - @define('PLUGIN_CREATIVECOMMONS_TXT_DESC', 'Zeigt eine kurze Erklärung zu Ihrer individuellen Lizensierung an'); - @define('PLUGIN_CREATIVECOMMONS_CAP', 'Der Inhalt dieses Werkes ist lizensiert unter der <a href="#license_uri#">Creative Commons Lizenz</a>'); - @define('PLUGIN_CREATIVECOMMONS_CAP_PD', 'Der Inhalt dieses Werkes ist als <a href="#license_url#}">Public Domain</a> gewidmet'); - // @define('PLUGIN_CREATIVECOMMONS_BY', 'Attribution (Nennung als Author) erforderlich?'); - // @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk zu kopieren, zu verteilen, anzuwenden und darzustellen. Als Gegenleistung müssen Lizenznehmer den ursprünglichen Authoren nennen.'); - @define('PLUGIN_CREATIVECOMMONS_NC', 'Kommerzielle Nutzung des Werkes erlauben?'); - @define('PLUGIN_CREATIVECOMMONS_NC_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk zu kopieren, zu verteilen, anzuwenden und darzustellen. Als Gegenleistung dürfen die Lizenznehmer das Werk nicht in kommerziellem Kontext einsetzen - es sei denn, sie erhalten die ausdrückliche Genehmigung.'); - @define('PLUGIN_CREATIVECOMMONS_ND', 'Veränderungen des Werkes erlauben?'); - @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk in unveränderter Form zu kopieren, zu verteilen, anzuwenden und darzustellen. Daran anlehnende oder ableitende Werke sind nicht erlaubt.'); - @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Ja, solange dieses Recht weitergegeben wird'); diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_es.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_es.inc.php index 0c872e28..c967631f 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_es.inc.php @@ -1,6 +1,6 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -19,4 +19,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'El licenciador autoriza a otros a copiar, distribuir, mostrary actuar sólo copias no alteradas de su trabajo -- no pueden derivarse trabajos basados en él.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Sí, siempre y cuando sea editado bajo la misma licencia'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_fr.inc.php index db66e2ab..c08f37c6 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -25,5 +25,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'L\'auteur autorise de reproduire, distribuer et communiquer cette création au public, mais n\'autorise pas la modification de cette création.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Oui, tant que les autres partagent aussi'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_ja.inc.php index 1a5025dd..73c46cd4 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 690 */ @@ -20,4 +20,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'The licensor permits others to copy, distribute, display and perform only unaltered copies of the work -- not derivative works based on it.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Yes, as long as others share alike'); -?> diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_ko.inc.php index 5e6a678a..f9e48361 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_ko.inc.php @@ -1,19 +1,18 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_CREATIVECOMMONS_NAME', '크리에이티브 커먼스 규약'); - @define('PLUGIN_CREATIVECOMMONS_DESC', '블로그에 작성한 글에 적용될 크리에이티브 커먼스 규약을 골라서 표시함'); - @define('PLUGIN_CREATIVECOMMONS_TXT', '설명 표시'); - @define('PLUGIN_CREATIVECOMMONS_TXT_DESC', '규약 적용 상태를 시각적으로 알리기 위해 선택한 규약에 대한 짤막한 설명을 표시합니다.'); - @define('PLUGIN_CREATIVECOMMONS_CAP', '이곳에 작성된 독창적인 작업물은 <a href="#license_uri#">크리에이티브 커먼스 규약</a>을 적용받습니다.'); - @define('PLUGIN_CREATIVECOMMONS_CAP_PD', '이곳에 작성된 독창적인 작업물은 <a href="#license_url#}">공유물(퍼블릭 도메인)</a>로 기증되었습니다.'); - // @define('PLUGIN_CREATIVECOMMONS_BY', '저작자 표시 의무화'); - // @define('PLUGIN_CREATIVECOMMONS_BY_DESC', '원작자의 작업물에 대한 복제, 공표, 게시, 이행 등을 허락하는 조건으로 원작자의 성명을 표시해야 합니다.'); - @define('PLUGIN_CREATIVECOMMONS_NC', '작업물의 영리적 사용 제한 여부'); - @define('PLUGIN_CREATIVECOMMONS_NC_DESC', '원작자의 작업물에 대한 복제, 공표, 게시, 이행 등을 허락하는 조건으로 원작자의 허락 없이 작업물을 영리적 목적으로 사용하는 것을 금합니다.'); - @define('PLUGIN_CREATIVECOMMONS_ND', '작업물에 대한 변경 제한 여부'); - @define('PLUGIN_CREATIVECOMMONS_ND_DESC', '원작자의 작업물에 대해서 원본 그대로의 상태로만 복제, 공표, 게시, 이행 등을 허락합니다. 변경을 일절 금합니다.'); - @define('PLUGIN_CREATIVECOMMONS_SA_DESC', '동일 규약으로 공유한다는 조건으로 변경을 허락합니다.'); +@define('PLUGIN_CREATIVECOMMONS_NAME', '크리에이티브 커먼스 규약'); +@define('PLUGIN_CREATIVECOMMONS_DESC', '블로그에 작성한 글에 적용될 크리에이티브 커먼스 규약을 골라서 표시함'); +@define('PLUGIN_CREATIVECOMMONS_TXT', '설명 표시'); +@define('PLUGIN_CREATIVECOMMONS_TXT_DESC', '규약 적용 상태를 시각적으로 알리기 위해 선택한 규약에 대한 짤막한 설명을 표시합니다.'); +@define('PLUGIN_CREATIVECOMMONS_CAP', '이곳에 작성된 독창적인 작업물은 <a href="#license_uri#">크리에이티브 커먼스 규약</a>을 적용받습니다.'); +@define('PLUGIN_CREATIVECOMMONS_CAP_PD', '이곳에 작성된 독창적인 작업물은 <a href="#license_url#}">공유물(퍼블릭 도메인)</a>로 기증되었습니다.'); +// @define('PLUGIN_CREATIVECOMMONS_BY', '저작자 표시 의무화'); +// @define('PLUGIN_CREATIVECOMMONS_BY_DESC', '원작자의 작업물에 대한 복제, 공표, 게시, 이행 등을 허락하는 조건으로 원작자의 성명을 표시해야 합니다.'); +@define('PLUGIN_CREATIVECOMMONS_NC', '작업물의 영리적 사용 제한 여부'); +@define('PLUGIN_CREATIVECOMMONS_NC_DESC', '원작자의 작업물에 대한 복제, 공표, 게시, 이행 등을 허락하는 조건으로 원작자의 허락 없이 작업물을 영리적 목적으로 사용하는 것을 금합니다.'); +@define('PLUGIN_CREATIVECOMMONS_ND', '작업물에 대한 변경 제한 여부'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', '원작자의 작업물에 대해서 원본 그대로의 상태로만 복제, 공표, 게시, 이행 등을 허락합니다. 변경을 일절 금합니다.'); +@define('PLUGIN_CREATIVECOMMONS_SA_DESC', '동일 규약으로 공유한다는 조건으로 변경을 허락합니다.'); -?> diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_pl.inc.php index 51db7618..1d3d820c 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -20,4 +20,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Licencjonodawca zezwala innym na kopiowanie, rozpowszechnianie odtwarzanie i wykonywanie dzieła tylko w niezmienionej formie - nie udziela tym samym zezwolenia na korzystanie z utworu w dziełach zaleznych.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Yes, as long as others share alike'); -?> diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_pt_PT.inc.php index 11fcd5f2..e140337e 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id:$ +<?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details # Translation (c) by Joao P Matos <jmatos@math.ist.utl.pt> @@ -18,4 +18,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'O licenciador autoriza outros a copiar, distribuir, expor e utilizar só cópias não alteradas do seu trabalho -- não podem criar-se trabalhos baseados nele.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Sim, sempre que outros partilhem da mesma forma'); -?> diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_sk.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_sk.inc.php index df8659e9..a00d86fc 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_sk.inc.php @@ -20,4 +20,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Nastavenie NIE znamená, že: Vlastník licence povoľuje ostatným kopírovat, distribuovať, zobrazovať a používať dielo iba v jeho pôvodnom znení. Žiadne zmeny a úpravy diela nie sú povolené.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Áno, pokiaľ bude ostatnými šírené pod rovnakou licenciou'); -?> diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_tn.inc.php index e20f676a..3bbd2d8a 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,17 +12,17 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_CREATIVECOMMONS_NAME', 'CC 授權條款'); - @define('PLUGIN_CREATIVECOMMONS_DESC', '請選擇適合您的網誌的授權條款'); - @define('PLUGIN_CREATIVECOMMONS_TXT', '顯示文字?'); - @define('PLUGIN_CREATIVECOMMONS_TXT_DESC', '為了能正確的傳達條款內容,請提供條款簡介。'); - @define('PLUGIN_CREATIVECOMMONS_CAP', '原著作內容的版權是 <a href="#license_uri#">CC 授權條款</a>'); - @define('PLUGIN_CREATIVECOMMONS_CAP_PD', '原著作內容使用的條款是 <a href="#license_url#}">公共領域</a>'); - // @define('PLUGIN_CREATIVECOMMONS_BY', 'Require attribution?'); - // @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'The licensor permits others to copy, distribute, display, and perform the work. In return, licensees must give the original author credit.'); - @define('PLUGIN_CREATIVECOMMONS_NC', '允許商業用途?'); - @define('PLUGIN_CREATIVECOMMONS_NC_DESC', '作者允許其他人複製,散佈,和展示他的作品。但不允許任何商業用途,除非得到允許。'); - @define('PLUGIN_CREATIVECOMMONS_ND', '允許修改內容?'); - @define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者允許其他人複製,散佈,和展示未修改的作品。'); - @define('PLUGIN_CREATIVECOMMONS_SA_DESC', '允許,如果用途相同'); -?> \ No newline at end of file +@define('PLUGIN_CREATIVECOMMONS_NAME', 'CC 授權條款'); +@define('PLUGIN_CREATIVECOMMONS_DESC', '請選擇適合您的網誌的授權條款'); +@define('PLUGIN_CREATIVECOMMONS_TXT', '顯示文字?'); +@define('PLUGIN_CREATIVECOMMONS_TXT_DESC', '為了能正確的傳達條款內容,請提供條款簡介。'); +@define('PLUGIN_CREATIVECOMMONS_CAP', '原著作內容的版權是 <a href="#license_uri#">CC 授權條款</a>'); +@define('PLUGIN_CREATIVECOMMONS_CAP_PD', '原著作內容使用的條款是 <a href="#license_url#}">公共領域</a>'); +// @define('PLUGIN_CREATIVECOMMONS_BY', 'Require attribution?'); +// @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'The licensor permits others to copy, distribute, display, and perform the work. In return, licensees must give the original author credit.'); +@define('PLUGIN_CREATIVECOMMONS_NC', '允許商業用途?'); +@define('PLUGIN_CREATIVECOMMONS_NC_DESC', '作者允許其他人複製,散佈,和展示他的作品。但不允許任何商業用途,除非得到允許。'); +@define('PLUGIN_CREATIVECOMMONS_ND', '允許修改內容?'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者允許其他人複製,散佈,和展示未修改的作品。'); +@define('PLUGIN_CREATIVECOMMONS_SA_DESC', '允許,如果用途相同'); + diff --git a/plugins/serendipity_event_creativecommons/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_creativecommons/UTF-8/lang_zh.inc.php index 7f22e099..b0c6a9eb 100644 --- a/plugins/serendipity_event_creativecommons/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_creativecommons/UTF-8/lang_zh.inc.php @@ -12,5 +12,6 @@ @define('PLUGIN_CREATIVECOMMONS_NC_DESC', '作者允许他人复制、分发、演示和使用该作品。同时,使用者不得将该作品用于商业用途,除非得到作者授权。'); @define('PLUGIN_CREATIVECOMMONS_ND', '是否允许对你的作品修改?'); @define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者只允许他人复制、分发、演示、使用未被修改的该作品。'); -@define('PLUGIN_CREATIVECOMMONS_ND_DESC','作者只允许他人复制、分发、演示和使用未被修改的该作品,而不是在此作品基础上修改后的作品。'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者只允许他人复制、分发、演示和使用未被修改的该作品,而不是在此作品基础上修改后的作品。'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', '如果别人也遵守创作共用协议的话,允许。'); + diff --git a/plugins/serendipity_event_creativecommons/documentation_cs.html b/plugins/serendipity_event_creativecommons/documentation_cs.html index a075643a..1b09ed14 100644 --- a/plugins/serendipity_event_creativecommons/documentation_cs.html +++ b/plugins/serendipity_event_creativecommons/documentation_cs.html @@ -1,7 +1,7 @@ <html> <head> - <meta http-equiv="content-type" content="text/html; charset=windows-1250"> - <meta name="generator" content="PSPad editor, www.pspad.com"> + <meta http-equiv="content-type" content="text/html; charset=windows-1250"> + <meta name="generator" content="PSPad editor, www.pspad.com"> <title>Dokumentace: Licence Creative Commons</title> </head> @@ -9,23 +9,23 @@ <h1>Dokumentace k pluginu 'Licence Creative Commons'</h1> -<p>Dokumentaci k tomuto pluginu p�elo�il do �e�tiny Vladim�r Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 9.10.2010. Od t� doby mohl b�t plugin pozm�n�n nebo mohly b�t roz���en� jeho funkce. Zkontrolujte pro jistotu i <a href="ChangeLog">aktu�ln� anglick� ChangeLog</a>. -<p> +<p>Dokumentaci k tomuto pluginu p�elo�il do �e�tiny Vladim�r Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 9.10.2010. Od t� doby mohl b�t plugin pozm�n�n nebo mohly b�t roz���en� jeho funkce. Zkontrolujte pro jistotu i <a href="ChangeLog">aktu�ln� anglick� ChangeLog</a>.</p> <h2>Historie verz� (ChangeLog)</h2> <ul> -<li>Verze 1.4, autor [brockhaus]</li> - <ul> - <li>Zm�n�na v�choz� verze CreativeCommons na 3.0, p�i aktualizaci bude zachov�no nastaven� ze star�� verze pluginu.</li> - <li>BY, jedniv� verze, ve kter� plat�, je verze 3.0; Verze 2.5 to nepodporuje.</li> - <li>Japon�t� u�ivatel� dost�vali �patn� odkaz na Licenci Creative Common.</li> - <li>Titulek p�i najet� na obr�zek je nyn� podporovan� i v Mozille (atribut title)</li> - </ul> -<li>Verze 1.3, autor [Evan Nemerson]</li> - <ul> - <li>p�vodn� verze</li> - </ul> + <li>Verze 1.4, autor [brockhaus] + <ul> + <li>Zm�n�na v�choz� verze CreativeCommons na 3.0, p�i aktualizaci bude zachov�no nastaven� ze star�� verze pluginu.</li> + <li>BY, jedniv� verze, ve kter� plat�, je verze 3.0; Verze 2.5 to nepodporuje.</li> + <li>Japon�t� u�ivatel� dost�vali �patn� odkaz na Licenci Creative Common.</li> + <li>Titulek p�i najet� na obr�zek je nyn� podporovan� i v Mozille (atribut title)</li> + </ul> + <li>Verze 1.3, autor [Evan Nemerson]</li> + <ul> + <li>p�vodn� verze</li> + </ul> + </li> </ul> </body> diff --git a/plugins/serendipity_event_creativecommons/documentation_cz.html b/plugins/serendipity_event_creativecommons/documentation_cz.html index 073ea762..4e92f7c8 100644 --- a/plugins/serendipity_event_creativecommons/documentation_cz.html +++ b/plugins/serendipity_event_creativecommons/documentation_cz.html @@ -1,7 +1,7 @@ <html> <head> - <meta http-equiv="content-type" content="text/html; charset=iso-8859-2"> - <meta name="generator" content="PSPad editor, www.pspad.com"> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-2"> + <meta name="generator" content="PSPad editor, www.pspad.com"> <title>Dokumentace: Licence Creative Commons</title> </head> @@ -14,18 +14,20 @@ <h2>Historie verz� (ChangeLog)</h2> -<ul> -<li>Verze 1.4, autor [brockhaus]</li> - <ul> - <li>Zm�n�na v�choz� verze CreativeCommons na 3.0, p�i aktualizaci bude zachov�no nastaven� ze star�� verze pluginu.</li> - <li>BY, jedniv� verze, ve kter� plat�, je verze 3.0; Verze 2.5 to nepodporuje.</li> - <li>Japon�t� u�ivatel� dost�vali �patn� odkaz na Licenci Creative Common.</li> - <li>Titulek p�i najet� na obr�zek je nyn� podporovan� i v Mozille (atribut title)</li> - </ul> -<li>Verze 1.3, autor [Evan Nemerson]</li> - <ul> - <li>p�vodn� verze</li> - </ul> + <ul> + <li>Verze 1.4, autor [brockhaus] + <ul> + <li>Zm�n�na v�choz� verze CreativeCommons na 3.0, p�i aktualizaci bude zachov�no nastaven� ze star�� verze pluginu.</li> + <li>BY, jedniv� verze, ve kter� plat�, je verze 3.0; Verze 2.5 to nepodporuje.</li> + <li>Japon�t� u�ivatel� dost�vali �patn� odkaz na Licenci Creative Common.</li> + <li>Titulek p�i najet� na obr�zek je nyn� podporovan� i v Mozille (atribut title)</li> + </ul> + </li> + <li>Verze 1.3, autor [Evan Nemerson] + <ul> + <li>p�vodn� verze</li> + </ul> + </li> </ul> </body> diff --git a/plugins/serendipity_event_creativecommons/lang_cn.inc.php b/plugins/serendipity_event_creativecommons/lang_cn.inc.php index 7f22e099..b0c6a9eb 100644 --- a/plugins/serendipity_event_creativecommons/lang_cn.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_cn.inc.php @@ -12,5 +12,6 @@ @define('PLUGIN_CREATIVECOMMONS_NC_DESC', '作者允许他人复制、分发、演示和使用该作品。同时,使用者不得将该作品用于商业用途,除非得到作者授权。'); @define('PLUGIN_CREATIVECOMMONS_ND', '是否允许对你的作品修改?'); @define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者只允许他人复制、分发、演示、使用未被修改的该作品。'); -@define('PLUGIN_CREATIVECOMMONS_ND_DESC','作者只允许他人复制、分发、演示和使用未被修改的该作品,而不是在此作品基础上修改后的作品。'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者只允许他人复制、分发、演示和使用未被修改的该作品,而不是在此作品基础上修改后的作品。'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', '如果别人也遵守创作共用协议的话,允许。'); + diff --git a/plugins/serendipity_event_creativecommons/lang_cs.inc.php b/plugins/serendipity_event_creativecommons/lang_cs.inc.php index d1a5e25c..df705356 100644 --- a/plugins/serendipity_event_creativecommons/lang_cs.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2007-12-13 12:00:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -20,4 +20,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Volba NE znamen�, �e: Vlastn�k licence povoluje ostatn�m kop�rovat, distribuovat, zobrazovat a u��vat d�lo pouze v p�vodn�m zn�n�. ��dn� jeho zm�ny �i �pravy nejsou povoleny.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Ano, pokud ho budou ostatn� ���it pod stejnou licenc�'); -?> diff --git a/plugins/serendipity_event_creativecommons/lang_cz.inc.php b/plugins/serendipity_event_creativecommons/lang_cz.inc.php index 974f2d90..2dc2f38f 100644 --- a/plugins/serendipity_event_creativecommons/lang_cz.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2007-12-13 12:00:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -20,4 +20,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Volba NE znamen�, �e: Vlastn�k licence povoluje ostatn�m kop�rovat, distribuovat, zobrazovat a u��vat d�lo pouze v p�vodn�m zn�n�. ��dn� jeho zm�ny �i �pravy nejsou povoleny.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Ano, pokud ho budou ostatn� ���it pod stejnou licenc�'); -?> diff --git a/plugins/serendipity_event_creativecommons/lang_de.inc.php b/plugins/serendipity_event_creativecommons/lang_de.inc.php index edf1c487..7cc76b27 100644 --- a/plugins/serendipity_event_creativecommons/lang_de.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_de.inc.php @@ -1,15 +1,16 @@ -<?php # $Id$ +<?php + +@define('PLUGIN_CREATIVECOMMONS_NAME', 'Creative Commons Lizenz'); +@define('PLUGIN_CREATIVECOMMONS_DESC', 'W�hlen Sie eine Lizenz f�r den Inhalt'); +@define('PLUGIN_CREATIVECOMMONS_TXT', 'Text anzeigen?'); +@define('PLUGIN_CREATIVECOMMONS_TXT_DESC', 'Zeigt eine kurze Erkl�rung zu Ihrer individuellen Lizensierung an'); +@define('PLUGIN_CREATIVECOMMONS_CAP', 'Der Inhalt dieses Werkes ist lizensiert unter der <a href="#license_uri#">Creative Commons Lizenz</a>'); +@define('PLUGIN_CREATIVECOMMONS_CAP_PD', 'Der Inhalt dieses Werkes ist als <a href="#license_url#}">Public Domain</a> gewidmet'); +// @define('PLUGIN_CREATIVECOMMONS_BY', 'Attribution (Nennung als Author) erforderlich?'); +// @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk zu kopieren, zu verteilen, anzuwenden und darzustellen. Als Gegenleistung m�ssen Lizenznehmer den urspr�nglichen Authoren nennen.'); +@define('PLUGIN_CREATIVECOMMONS_NC', 'Kommerzielle Nutzung des Werkes erlauben?'); +@define('PLUGIN_CREATIVECOMMONS_NC_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk zu kopieren, zu verteilen, anzuwenden und darzustellen. Als Gegenleistung d�rfen die Lizenznehmer das Werk nicht in kommerziellem Kontext einsetzen - es sei denn, sie erhalten die ausdr�ckliche Genehmigung.'); +@define('PLUGIN_CREATIVECOMMONS_ND', 'Ver�nderungen des Werkes erlauben?'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk in unver�nderter Form zu kopieren, zu verteilen, anzuwenden und darzustellen. Daran anlehnende oder ableitende Werke sind nicht erlaubt.'); +@define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Ja, solange dieses Recht weitergegeben wird'); - @define('PLUGIN_CREATIVECOMMONS_NAME', 'Creative Commons Lizenz'); - @define('PLUGIN_CREATIVECOMMONS_DESC', 'W�hlen Sie eine Lizenz f�r den Inhalt'); - @define('PLUGIN_CREATIVECOMMONS_TXT', 'Text anzeigen?'); - @define('PLUGIN_CREATIVECOMMONS_TXT_DESC', 'Zeigt eine kurze Erkl�rung zu Ihrer individuellen Lizensierung an'); - @define('PLUGIN_CREATIVECOMMONS_CAP', 'Der Inhalt dieses Werkes ist lizensiert unter der <a href="#license_uri#">Creative Commons Lizenz</a>'); - @define('PLUGIN_CREATIVECOMMONS_CAP_PD', 'Der Inhalt dieses Werkes ist als <a href="#license_url#}">Public Domain</a> gewidmet'); - // @define('PLUGIN_CREATIVECOMMONS_BY', 'Attribution (Nennung als Author) erforderlich?'); - // @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk zu kopieren, zu verteilen, anzuwenden und darzustellen. Als Gegenleistung m�ssen Lizenznehmer den urspr�nglichen Authoren nennen.'); - @define('PLUGIN_CREATIVECOMMONS_NC', 'Kommerzielle Nutzung des Werkes erlauben?'); - @define('PLUGIN_CREATIVECOMMONS_NC_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk zu kopieren, zu verteilen, anzuwenden und darzustellen. Als Gegenleistung d�rfen die Lizenznehmer das Werk nicht in kommerziellem Kontext einsetzen - es sei denn, sie erhalten die ausdr�ckliche Genehmigung.'); - @define('PLUGIN_CREATIVECOMMONS_ND', 'Ver�nderungen des Werkes erlauben?'); - @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Der Lizenzgeber erlaubt anderen dieses Werk in unver�nderter Form zu kopieren, zu verteilen, anzuwenden und darzustellen. Daran anlehnende oder ableitende Werke sind nicht erlaubt.'); - @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Ja, solange dieses Recht weitergegeben wird'); diff --git a/plugins/serendipity_event_creativecommons/lang_en.inc.php b/plugins/serendipity_event_creativecommons/lang_en.inc.php index 45d8a4bb..41aaef01 100644 --- a/plugins/serendipity_event_creativecommons/lang_en.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_en.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Translator Name <yourmail@example.com> * EN-Revision: Revision of lang_en.inc.php */ @@ -20,4 +20,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'The licensor permits others to copy, distribute, display and perform only unaltered copies of the work -- not derivative works based on it.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Yes, as long as others share alike'); -?> diff --git a/plugins/serendipity_event_creativecommons/lang_es.inc.php b/plugins/serendipity_event_creativecommons/lang_es.inc.php index d1394c10..a06ee7ec 100644 --- a/plugins/serendipity_event_creativecommons/lang_es.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_es.inc.php @@ -1,6 +1,6 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -19,4 +19,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'El licenciador autoriza a otros a copiar, distribuir, mostrary actuar s�lo copias no alteradas de su trabajo -- no pueden derivarse trabajos basados en �l.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'S�, siempre y cuando sea editado bajo la misma licencia'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_creativecommons/lang_fr.inc.php b/plugins/serendipity_event_creativecommons/lang_fr.inc.php index 5320eeb1..6535c1a6 100644 --- a/plugins/serendipity_event_creativecommons/lang_fr.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -25,5 +25,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'L\'auteur autorise de reproduire, distribuer et communiquer cette cr�ation au public, mais n\'autorise pas la modification de cette cr�ation.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Oui, tant que les autres partagent aussi'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_creativecommons/lang_ja.inc.php b/plugins/serendipity_event_creativecommons/lang_ja.inc.php index 1a5025dd..73c46cd4 100644 --- a/plugins/serendipity_event_creativecommons/lang_ja.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 690 */ @@ -20,4 +20,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'The licensor permits others to copy, distribute, display and perform only unaltered copies of the work -- not derivative works based on it.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Yes, as long as others share alike'); -?> diff --git a/plugins/serendipity_event_creativecommons/lang_ko.inc.php b/plugins/serendipity_event_creativecommons/lang_ko.inc.php index 5e6a678a..f9e48361 100644 --- a/plugins/serendipity_event_creativecommons/lang_ko.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_ko.inc.php @@ -1,19 +1,18 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_CREATIVECOMMONS_NAME', '크리에이티브 커먼스 규약'); - @define('PLUGIN_CREATIVECOMMONS_DESC', '블로그에 작성한 글에 적용될 크리에이티브 커먼스 규약을 골라서 표시함'); - @define('PLUGIN_CREATIVECOMMONS_TXT', '설명 표시'); - @define('PLUGIN_CREATIVECOMMONS_TXT_DESC', '규약 적용 상태를 시각적으로 알리기 위해 선택한 규약에 대한 짤막한 설명을 표시합니다.'); - @define('PLUGIN_CREATIVECOMMONS_CAP', '이곳에 작성된 독창적인 작업물은 <a href="#license_uri#">크리에이티브 커먼스 규약</a>을 적용받습니다.'); - @define('PLUGIN_CREATIVECOMMONS_CAP_PD', '이곳에 작성된 독창적인 작업물은 <a href="#license_url#}">공유물(퍼블릭 도메인)</a>로 기증되었습니다.'); - // @define('PLUGIN_CREATIVECOMMONS_BY', '저작자 표시 의무화'); - // @define('PLUGIN_CREATIVECOMMONS_BY_DESC', '원작자의 작업물에 대한 복제, 공표, 게시, 이행 등을 허락하는 조건으로 원작자의 성명을 표시해야 합니다.'); - @define('PLUGIN_CREATIVECOMMONS_NC', '작업물의 영리적 사용 제한 여부'); - @define('PLUGIN_CREATIVECOMMONS_NC_DESC', '원작자의 작업물에 대한 복제, 공표, 게시, 이행 등을 허락하는 조건으로 원작자의 허락 없이 작업물을 영리적 목적으로 사용하는 것을 금합니다.'); - @define('PLUGIN_CREATIVECOMMONS_ND', '작업물에 대한 변경 제한 여부'); - @define('PLUGIN_CREATIVECOMMONS_ND_DESC', '원작자의 작업물에 대해서 원본 그대로의 상태로만 복제, 공표, 게시, 이행 등을 허락합니다. 변경을 일절 금합니다.'); - @define('PLUGIN_CREATIVECOMMONS_SA_DESC', '동일 규약으로 공유한다는 조건으로 변경을 허락합니다.'); +@define('PLUGIN_CREATIVECOMMONS_NAME', '크리에이티브 커먼스 규약'); +@define('PLUGIN_CREATIVECOMMONS_DESC', '블로그에 작성한 글에 적용될 크리에이티브 커먼스 규약을 골라서 표시함'); +@define('PLUGIN_CREATIVECOMMONS_TXT', '설명 표시'); +@define('PLUGIN_CREATIVECOMMONS_TXT_DESC', '규약 적용 상태를 시각적으로 알리기 위해 선택한 규약에 대한 짤막한 설명을 표시합니다.'); +@define('PLUGIN_CREATIVECOMMONS_CAP', '이곳에 작성된 독창적인 작업물은 <a href="#license_uri#">크리에이티브 커먼스 규약</a>을 적용받습니다.'); +@define('PLUGIN_CREATIVECOMMONS_CAP_PD', '이곳에 작성된 독창적인 작업물은 <a href="#license_url#}">공유물(퍼블릭 도메인)</a>로 기증되었습니다.'); +// @define('PLUGIN_CREATIVECOMMONS_BY', '저작자 표시 의무화'); +// @define('PLUGIN_CREATIVECOMMONS_BY_DESC', '원작자의 작업물에 대한 복제, 공표, 게시, 이행 등을 허락하는 조건으로 원작자의 성명을 표시해야 합니다.'); +@define('PLUGIN_CREATIVECOMMONS_NC', '작업물의 영리적 사용 제한 여부'); +@define('PLUGIN_CREATIVECOMMONS_NC_DESC', '원작자의 작업물에 대한 복제, 공표, 게시, 이행 등을 허락하는 조건으로 원작자의 허락 없이 작업물을 영리적 목적으로 사용하는 것을 금합니다.'); +@define('PLUGIN_CREATIVECOMMONS_ND', '작업물에 대한 변경 제한 여부'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', '원작자의 작업물에 대해서 원본 그대로의 상태로만 복제, 공표, 게시, 이행 등을 허락합니다. 변경을 일절 금합니다.'); +@define('PLUGIN_CREATIVECOMMONS_SA_DESC', '동일 규약으로 공유한다는 조건으로 변경을 허락합니다.'); -?> diff --git a/plugins/serendipity_event_creativecommons/lang_pl.inc.php b/plugins/serendipity_event_creativecommons/lang_pl.inc.php index 5296a603..1a844363 100644 --- a/plugins/serendipity_event_creativecommons/lang_pl.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -20,4 +20,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Licencjonodawca zezwala innym na kopiowanie, rozpowszechnianie odtwarzanie i wykonywanie dzie�a tylko w niezmienionej formie - nie udziela tym samym zezwolenia na korzystanie z utworu w dzie�ach zaleznych.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Yes, as long as others share alike'); -?> diff --git a/plugins/serendipity_event_creativecommons/lang_pt_PT.inc.php b/plugins/serendipity_event_creativecommons/lang_pt_PT.inc.php index f27dca5e..b324e617 100644 --- a/plugins/serendipity_event_creativecommons/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id:$ +<?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details # Translation (c) by Joao P Matos <jmatos@math.ist.utl.pt> @@ -18,4 +18,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'O licenciador autoriza outros a copiar, distribuir, expor e utilizar s� c�pias n�o alteradas do seu trabalho -- n�o podem criar-se trabalhos baseados nele.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', 'Sim, sempre que outros partilhem da mesma forma'); -?> diff --git a/plugins/serendipity_event_creativecommons/lang_sk.inc.php b/plugins/serendipity_event_creativecommons/lang_sk.inc.php index db194d92..b18dca6f 100644 --- a/plugins/serendipity_event_creativecommons/lang_sk.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_sk.inc.php @@ -20,4 +20,3 @@ @define('PLUGIN_CREATIVECOMMONS_ND_DESC', 'Nastavenie NIE znamen�, �e: Vlastn�k licence povo�uje ostatn�m kop�rovat, distribuova�, zobrazova� a pou��va� dielo iba v jeho p�vodnom znen�. �iadne zmeny a �pravy diela nie s� povolen�.'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', '�no, pokia� bude ostatn�mi ��ren� pod rovnakou licenciou'); -?> diff --git a/plugins/serendipity_event_creativecommons/lang_tn.inc.php b/plugins/serendipity_event_creativecommons/lang_tn.inc.php index e20f676a..d52a0211 100644 --- a/plugins/serendipity_event_creativecommons/lang_tn.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,17 +12,17 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_CREATIVECOMMONS_NAME', 'CC 授權條款'); - @define('PLUGIN_CREATIVECOMMONS_DESC', '請選擇適合您的網誌的授權條款'); - @define('PLUGIN_CREATIVECOMMONS_TXT', '顯示文字?'); - @define('PLUGIN_CREATIVECOMMONS_TXT_DESC', '為了能正確的傳達條款內容,請提供條款簡介。'); - @define('PLUGIN_CREATIVECOMMONS_CAP', '原著作內容的版權是 <a href="#license_uri#">CC 授權條款</a>'); - @define('PLUGIN_CREATIVECOMMONS_CAP_PD', '原著作內容使用的條款是 <a href="#license_url#}">公共領域</a>'); - // @define('PLUGIN_CREATIVECOMMONS_BY', 'Require attribution?'); - // @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'The licensor permits others to copy, distribute, display, and perform the work. In return, licensees must give the original author credit.'); - @define('PLUGIN_CREATIVECOMMONS_NC', '允許商業用途?'); - @define('PLUGIN_CREATIVECOMMONS_NC_DESC', '作者允許其他人複製,散佈,和展示他的作品。但不允許任何商業用途,除非得到允許。'); - @define('PLUGIN_CREATIVECOMMONS_ND', '允許修改內容?'); - @define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者允許其他人複製,散佈,和展示未修改的作品。'); - @define('PLUGIN_CREATIVECOMMONS_SA_DESC', '允許,如果用途相同'); -?> \ No newline at end of file +@define('PLUGIN_CREATIVECOMMONS_NAME', 'CC 授權條款'); +@define('PLUGIN_CREATIVECOMMONS_DESC', '請選擇適合您的網誌的授權條款'); +@define('PLUGIN_CREATIVECOMMONS_TXT', '顯示文字?'); +@define('PLUGIN_CREATIVECOMMONS_TXT_DESC', '為了能正確的傳達條款內容,請提供條款簡介。'); +@define('PLUGIN_CREATIVECOMMONS_CAP', '原著作內容的版權是 <a href="#license_uri#">CC 授權條款</a>'); +@define('PLUGIN_CREATIVECOMMONS_CAP_PD', '原著作內容使用的條款是 <a href="#license_url#}">公共領域</a>'); +// @define('PLUGIN_CREATIVECOMMONS_BY', 'Require attribution?'); +// @define('PLUGIN_CREATIVECOMMONS_BY_DESC', 'The licensor permits others to copy, distribute, display, and perform the work. In return, licensees must give the original author credit.'); +@define('PLUGIN_CREATIVECOMMONS_NC', '允許商業用途?'); +@define('PLUGIN_CREATIVECOMMONS_NC_DESC', '作者允許其他人複製,散佈,和展示他的作品。但不允許任何商業用途,除非得到允許。'); +@define('PLUGIN_CREATIVECOMMONS_ND', '允許修改內容?'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者允許其他人複製,散佈,和展示未修改的作品。'); +@define('PLUGIN_CREATIVECOMMONS_SA_DESC', '允許,如果用途相同'); + diff --git a/plugins/serendipity_event_creativecommons/lang_zh.inc.php b/plugins/serendipity_event_creativecommons/lang_zh.inc.php index 7f22e099..b0c6a9eb 100644 --- a/plugins/serendipity_event_creativecommons/lang_zh.inc.php +++ b/plugins/serendipity_event_creativecommons/lang_zh.inc.php @@ -12,5 +12,6 @@ @define('PLUGIN_CREATIVECOMMONS_NC_DESC', '作者允许他人复制、分发、演示和使用该作品。同时,使用者不得将该作品用于商业用途,除非得到作者授权。'); @define('PLUGIN_CREATIVECOMMONS_ND', '是否允许对你的作品修改?'); @define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者只允许他人复制、分发、演示、使用未被修改的该作品。'); -@define('PLUGIN_CREATIVECOMMONS_ND_DESC','作者只允许他人复制、分发、演示和使用未被修改的该作品,而不是在此作品基础上修改后的作品。'); +@define('PLUGIN_CREATIVECOMMONS_ND_DESC', '作者只允许他人复制、分发、演示和使用未被修改的该作品,而不是在此作品基础上修改后的作品。'); @define('PLUGIN_CREATIVECOMMONS_SA_DESC', '如果别人也遵守创作共用协议的话,允许。'); + diff --git a/plugins/serendipity_event_creativecommons/serendipity_event_creativecommons.php b/plugins/serendipity_event_creativecommons/serendipity_event_creativecommons.php index f810968f..7889a948 100644 --- a/plugins/serendipity_event_creativecommons/serendipity_event_creativecommons.php +++ b/plugins/serendipity_event_creativecommons/serendipity_event_creativecommons.php @@ -1,8 +1,13 @@ <?php +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + @serendipity_plugin_api::load_language(dirname(__FILE__)); -class serendipity_event_creativecommons extends serendipity_event { +class serendipity_event_creativecommons extends serendipity_event +{ var $title = PLUGIN_CREATIVECOMMONS_NAME; function introspect(&$propbag) @@ -12,9 +17,9 @@ class serendipity_event_creativecommons extends serendipity_event { $propbag->add('description', PLUGIN_CREATIVECOMMONS_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Evan Nemerson'); - $propbag->add('version', '1.5'); + $propbag->add('version', '1.6'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -71,8 +76,8 @@ class serendipity_event_creativecommons extends serendipity_event { )); $propbag->add('radio_per_row', '1'); $propbag->add('default', 'yes'); - break; + case 'image_type': $image_types = array( 'generic' => PLUGIN_CREATIVECOMMONS_IMAGETYPE_GENERIC, @@ -95,18 +100,21 @@ class serendipity_event_creativecommons extends serendipity_event { default: return false; - break; } return true; } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; + $hooks = &$bag->get('event_hooks'); + $license_data = $this->get_license_data(); $license_version = $this->get_config('cc_version', '3.0'); $license_type = $license_data['type']; @@ -129,81 +137,83 @@ class serendipity_event_creativecommons extends serendipity_event { $cc_visibility = 'invisible'; - switch ($event) { - case 'frontend_display:html_layout': - $cc_visibility = 'visible'; - case 'frontend_display:html:per_entry': - $eventData['display_dat'] .= '<div style="text-align: center;">'; - if ($license_string == '') { - if ($cc_visibility == 'visible') { - $image_titel = 'No Rights Reserved'; - $eventData['display_dat'] .= '<a href="http://creativecommons.org/licenses/publicdomain">'; - $eventData['display_dat'] .= '<img style="border: 0px" alt="' . $image_titel. '" title="' . $image_titel. '" src="' . serendipity_getTemplateFile('img/norights.png') .'" />'; + if (isset($hooks[$event])) { + + switch($event) { + + case 'frontend_display:html_layout': + $cc_visibility = 'visible'; + case 'frontend_display:html:per_entry': + $eventData['display_dat'] .= '<div style="text-align: center;">'; + if ($license_string == '') { + if ($cc_visibility == 'visible') { + $image_titel = 'No Rights Reserved'; + $eventData['display_dat'] .= '<a href="http://creativecommons.org/licenses/publicdomain">'; + $eventData['display_dat'] .= '<img style="border: 0px" alt="' . $image_titel. '" title="' . $image_titel. '" src="' . serendipity_getTemplateFile('img/norights.png') .'" />'; + $eventData['display_dat'] .= '</a>'; + if (serendipity_db_bool($this->get_config('txt', true))) { + $eventData['display_dat'] .= '<br />' . str_replace('#license_uri#', $license_uri, PLUGIN_CREATIVECOMMONS_CAP_PD); + } + } + } elseif ($cc_visibility == 'visible') { + $image_titel = 'Creative Commons License - Some Rights Reserved'; + $eventData['display_dat'] .= '<a href="'.$license_uri.'">'; + $eventData['display_dat'] .= '<img style="border: 0px" alt="' . $image_titel. '" title="' . $image_titel. '" src="' . serendipity_getTemplateFile('img/somerights20.gif') .'" />'; $eventData['display_dat'] .= '</a>'; if (serendipity_db_bool($this->get_config('txt', true))) { - $eventData['display_dat'] .= '<br />' . str_replace('#license_uri#', $license_uri, PLUGIN_CREATIVECOMMONS_CAP_PD); + $eventData['display_dat'] .= '<br />' . str_replace('#license_uri#', $license_uri, PLUGIN_CREATIVECOMMONS_CAP); } } - } elseif ($cc_visibility == 'visible') { - $image_titel = 'Creative Commons License - Some Rights Reserved'; - $eventData['display_dat'] .= '<a href="'.$license_uri.'">'; - $eventData['display_dat'] .= '<img style="border: 0px" alt="' . $image_titel. '" title="' . $image_titel. '" src="' . serendipity_getTemplateFile('img/somerights20.gif') .'" />'; - $eventData['display_dat'] .= '</a>'; - if (serendipity_db_bool($this->get_config('txt', true))) { - $eventData['display_dat'] .= '<br />' . str_replace('#license_uri#', $license_uri, PLUGIN_CREATIVECOMMONS_CAP); + + $eventData['display_dat'] .= '<!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Work rdf:about=""><license rdf:resource="'.$license_uri.'"/></Work><License rdf:about="'.$license_uri.'">'; + if (is_array($rdf)) { + foreach ($rdf as $rdf_t => $rdf_v) { + $eventData['display_dat'] .= ' <'.$rdf_v.' rdf:resource="http://web.resource.org/cc/'.$rdf_t.'" />'; + } } - } - $eventData['display_dat'] .= '<!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Work rdf:about=""><license rdf:resource="'.$license_uri.'"/></Work><License rdf:about="'.$license_uri.'">'; - if (is_array($rdf)) { - foreach ($rdf as $rdf_t => $rdf_v) { - $eventData['display_dat'] .= ' <'.$rdf_v.' rdf:resource="http://web.resource.org/cc/'.$rdf_t.'" />'; + $eventData['display_dat'] .= '</License></rdf:RDF> -->'; + $eventData['display_dat'] .= '</div>'; + break; + + case 'frontend_display:rss-2.0:per_entry': + $eventData['display_dat'] .= '<creativeCommons:license>'.$license_uri.'</creativeCommons:license>'; + break; + + case 'frontend_display:rss-1.0:per_entry': + $eventData['display_dat'] .= '<cc:license rdf:resource="'.$license_uri.'" />'; + break; + + case 'frontend_display:rss-1.0:once': + $eventData['display_dat'] .= '<cc:License rdf:about="'.$license_uri.'">'; + if (is_array($rdf)) { + foreach ($rdf as $rdf_t => $rdf_v) { + $eventData['display_dat'] .= '<cc:'.$rdf_v.' rdf:resource="http://web.resource.org/cc/'.$rdf_t.'" />'; + } } - } + $eventData['display_dat'] .= '</cc:License>'; + break; - $eventData['display_dat'] .= '</License></rdf:RDF> -->'; - $eventData['display_dat'] .= '</div>'; - return true; - break; + case 'frontend_display:rss-2.0:namespace': + $eventData['display_dat'] .= ' xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" '; + break; - case 'frontend_display:rss-2.0:per_entry': - $eventData['display_dat'] .= '<creativeCommons:license>'.$license_uri.'</creativeCommons:license>'; - return true; - break; + case 'frontend_display:rss-1.0:namespace': + $eventData['display_dat'] .= ' xmlns:cc="http://web.resource.org/cc/" '; + break; - case 'frontend_display:rss-1.0:per_entry': - $eventData['display_dat'] .= '<cc:license rdf:resource="'.$license_uri.'" />'; - return true; - break; + default: + return false; - case 'frontend_display:rss-1.0:once': - $eventData['display_dat'] .= '<cc:License rdf:about="'.$license_uri.'">'; - if (is_array($rdf)) { - foreach ($rdf as $rdf_t => $rdf_v) { - $eventData['display_dat'] .= '<cc:'.$rdf_v.' rdf:resource="http://web.resource.org/cc/'.$rdf_t.'" />'; - } - } - $eventData['display_dat'] .= '</cc:License>'; - return true; - break; - - case 'frontend_display:rss-2.0:namespace': - $eventData['display_dat'] .= ' xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" '; - return true; - break; - - case 'frontend_display:rss-1.0:namespace': - $eventData['display_dat'] .= ' xmlns:cc="http://web.resource.org/cc/" '; - return true; - break; - - default: - return true; - break; + } + return true; + } else { + return false; } } - function get_license_data() { + function get_license_data() + { $license_type = array(); $license_version = $this->get_config('cc_version', '3.0'); @@ -355,7 +365,8 @@ class serendipity_event_creativecommons extends serendipity_event { 'rdf' => $rdf ); } + } /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/plugins/serendipity_event_emoticate/ChangeLog b/plugins/serendipity_event_emoticate/ChangeLog index ae2cf4e7..8e16a67b 100644 --- a/plugins/serendipity_event_emoticate/ChangeLog +++ b/plugins/serendipity_event_emoticate/ChangeLog @@ -1,3 +1,7 @@ +1.11: +---- + * Add smiley images to plugin + 1.9: ---- * changed fetching path in emoticons.inc.php file. diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_bg.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_bg.inc.php index 09d0c392..33a9204e 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_bg.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_cn.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_cn.inc.php index 4a2d627d..1da8cc98 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_cn.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_da.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_da.inc.php index 5f87f0b7..f06a5bc1 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_da.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_da.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version 1381 diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_es.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_es.inc.php index 8d59f5e1..3c737e3b 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_es.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_fr.inc.php index 23e42379..8ed0d5f0 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_is.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_is.inc.php index d1243a45..83c21e10 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_is.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_is.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_ja.inc.php index 3ce6a53e..4038516f 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_ja.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_ko.inc.php index a65fbd95..b5001063 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_ko.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_nl.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_nl.inc.php index 0914ae64..b096dadc 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_nl.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_nl.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version 1381 diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_pl.inc.php index 8ba2a1d8..46a85710 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_pl.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_pt_PT.inc.php index c27a42bf..605a3fae 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_se.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_se.inc.php index 268234af..039cad3d 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_se.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_se.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_sk.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_sk.inc.php index df103799..84f99a93 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_sk.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_tn.inc.php index 36998b01..dfd3c405 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_tn.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_emoticate/UTF-8/lang_zh.inc.php index 4a2d627d..1da8cc98 100644 --- a/plugins/serendipity_event_emoticate/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_emoticate/UTF-8/lang_zh.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/img/emoticons/cool.png b/plugins/serendipity_event_emoticate/img/emoticons/cool.png new file mode 100644 index 00000000..87856f97 Binary files /dev/null and b/plugins/serendipity_event_emoticate/img/emoticons/cool.png differ diff --git a/plugins/serendipity_event_emoticate/img/emoticons/cry.png b/plugins/serendipity_event_emoticate/img/emoticons/cry.png new file mode 100644 index 00000000..71199935 Binary files /dev/null and b/plugins/serendipity_event_emoticate/img/emoticons/cry.png differ diff --git a/plugins/serendipity_event_emoticate/img/emoticons/eek.png b/plugins/serendipity_event_emoticate/img/emoticons/eek.png new file mode 100644 index 00000000..cada94a3 Binary files /dev/null and b/plugins/serendipity_event_emoticate/img/emoticons/eek.png differ diff --git a/plugins/serendipity_event_emoticate/img/emoticons/laugh.png b/plugins/serendipity_event_emoticate/img/emoticons/laugh.png new file mode 100644 index 00000000..97124bf5 Binary files /dev/null and b/plugins/serendipity_event_emoticate/img/emoticons/laugh.png differ diff --git a/plugins/serendipity_event_emoticate/img/emoticons/normal.png b/plugins/serendipity_event_emoticate/img/emoticons/normal.png new file mode 100644 index 00000000..4e3aed27 Binary files /dev/null and b/plugins/serendipity_event_emoticate/img/emoticons/normal.png differ diff --git a/plugins/serendipity_event_emoticate/img/emoticons/sad.png b/plugins/serendipity_event_emoticate/img/emoticons/sad.png new file mode 100644 index 00000000..a1605e6e Binary files /dev/null and b/plugins/serendipity_event_emoticate/img/emoticons/sad.png differ diff --git a/plugins/serendipity_event_emoticate/img/emoticons/smile.png b/plugins/serendipity_event_emoticate/img/emoticons/smile.png new file mode 100644 index 00000000..1a787326 Binary files /dev/null and b/plugins/serendipity_event_emoticate/img/emoticons/smile.png differ diff --git a/plugins/serendipity_event_emoticate/img/emoticons/tongue.png b/plugins/serendipity_event_emoticate/img/emoticons/tongue.png new file mode 100644 index 00000000..6daa3c45 Binary files /dev/null and b/plugins/serendipity_event_emoticate/img/emoticons/tongue.png differ diff --git a/plugins/serendipity_event_emoticate/img/emoticons/wink.png b/plugins/serendipity_event_emoticate/img/emoticons/wink.png new file mode 100644 index 00000000..e660744d Binary files /dev/null and b/plugins/serendipity_event_emoticate/img/emoticons/wink.png differ diff --git a/plugins/serendipity_event_emoticate/lang_bg.inc.php b/plugins/serendipity_event_emoticate/lang_bg.inc.php index 42fd88be..d6c3e49f 100644 --- a/plugins/serendipity_event_emoticate/lang_bg.inc.php +++ b/plugins/serendipity_event_emoticate/lang_bg.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/lang_cn.inc.php b/plugins/serendipity_event_emoticate/lang_cn.inc.php index 4a2d627d..1da8cc98 100644 --- a/plugins/serendipity_event_emoticate/lang_cn.inc.php +++ b/plugins/serendipity_event_emoticate/lang_cn.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/lang_da.inc.php b/plugins/serendipity_event_emoticate/lang_da.inc.php index ff98ddcf..69f66cc5 100644 --- a/plugins/serendipity_event_emoticate/lang_da.inc.php +++ b/plugins/serendipity_event_emoticate/lang_da.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version 1381 diff --git a/plugins/serendipity_event_emoticate/lang_es.inc.php b/plugins/serendipity_event_emoticate/lang_es.inc.php index 46c6cf35..848e5324 100644 --- a/plugins/serendipity_event_emoticate/lang_es.inc.php +++ b/plugins/serendipity_event_emoticate/lang_es.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/lang_fr.inc.php b/plugins/serendipity_event_emoticate/lang_fr.inc.php index c8193945..1c254590 100644 --- a/plugins/serendipity_event_emoticate/lang_fr.inc.php +++ b/plugins/serendipity_event_emoticate/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/lang_is.inc.php b/plugins/serendipity_event_emoticate/lang_is.inc.php index 38d3385e..4eb5f7d6 100644 --- a/plugins/serendipity_event_emoticate/lang_is.inc.php +++ b/plugins/serendipity_event_emoticate/lang_is.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/lang_ja.inc.php b/plugins/serendipity_event_emoticate/lang_ja.inc.php index 3ce6a53e..4038516f 100644 --- a/plugins/serendipity_event_emoticate/lang_ja.inc.php +++ b/plugins/serendipity_event_emoticate/lang_ja.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/lang_ko.inc.php b/plugins/serendipity_event_emoticate/lang_ko.inc.php index a65fbd95..b5001063 100644 --- a/plugins/serendipity_event_emoticate/lang_ko.inc.php +++ b/plugins/serendipity_event_emoticate/lang_ko.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/lang_nl.inc.php b/plugins/serendipity_event_emoticate/lang_nl.inc.php index 0914ae64..b096dadc 100644 --- a/plugins/serendipity_event_emoticate/lang_nl.inc.php +++ b/plugins/serendipity_event_emoticate/lang_nl.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version 1381 diff --git a/plugins/serendipity_event_emoticate/lang_pl.inc.php b/plugins/serendipity_event_emoticate/lang_pl.inc.php index 8a83f648..1314f2a8 100644 --- a/plugins/serendipity_event_emoticate/lang_pl.inc.php +++ b/plugins/serendipity_event_emoticate/lang_pl.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/lang_pt_PT.inc.php b/plugins/serendipity_event_emoticate/lang_pt_PT.inc.php index 84969893..382d20dd 100644 --- a/plugins/serendipity_event_emoticate/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_emoticate/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/lang_se.inc.php b/plugins/serendipity_event_emoticate/lang_se.inc.php index 78500577..d1a741a7 100644 --- a/plugins/serendipity_event_emoticate/lang_se.inc.php +++ b/plugins/serendipity_event_emoticate/lang_se.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/lang_sk.inc.php b/plugins/serendipity_event_emoticate/lang_sk.inc.php index debf4dcd..28cf5430 100644 --- a/plugins/serendipity_event_emoticate/lang_sk.inc.php +++ b/plugins/serendipity_event_emoticate/lang_sk.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/lang_tn.inc.php b/plugins/serendipity_event_emoticate/lang_tn.inc.php index 36998b01..dfd3c405 100644 --- a/plugins/serendipity_event_emoticate/lang_tn.inc.php +++ b/plugins/serendipity_event_emoticate/lang_tn.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/lang_zh.inc.php b/plugins/serendipity_event_emoticate/lang_zh.inc.php index 4a2d627d..1da8cc98 100644 --- a/plugins/serendipity_event_emoticate/lang_zh.inc.php +++ b/plugins/serendipity_event_emoticate/lang_zh.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_emoticate/serendipity_event_emoticate.php b/plugins/serendipity_event_emoticate/serendipity_event_emoticate.php index 610faa60..d46521df 100644 --- a/plugins/serendipity_event_emoticate/serendipity_event_emoticate.php +++ b/plugins/serendipity_event_emoticate/serendipity_event_emoticate.php @@ -1,5 +1,9 @@ <?php +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + @serendipity_plugin_api::load_language(dirname(__FILE__)); class serendipity_event_emoticate extends serendipity_event @@ -14,9 +18,9 @@ class serendipity_event_emoticate extends serendipity_event $propbag->add('description', PLUGIN_EVENT_EMOTICATE_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '1.9'); + $propbag->add('version', '1.11'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '5.2.0' )); @@ -54,16 +58,19 @@ class serendipity_event_emoticate extends serendipity_event } - function install() { + function install() + { serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function uninstall(&$propbag) { + function uninstall(&$propbag) + { serendipity_plugin_api::hook_event('backend_cache_purge', $this->title); serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function getEmoticons() { + function getEmoticons() + { global $serendipity; /* Avoid multiple runs of serendipity_getTemplateFile(), @@ -73,12 +80,8 @@ class serendipity_event_emoticate extends serendipity_event } /* Hijack global variable $serendipity['custom_emoticons'] if it exists */ - if ($serendipity['version'][0] > 1) { - // called in backend too, but uses frontend fallback. Advise to use the Plugin simple approach 4th parameter! - $hijack_file = serendipity_getTemplateFile('emoticons.inc.php', 'serendipityPath', true, true); - } else { - $hijack_file = serendipity_getTemplateFile('emoticons.inc.php', 'serendipityPath', true); - } + $hijack_file = serendipity_getTemplateFile('emoticons.inc.php', 'serendipityPath', true); + if (@file_exists($hijack_file)) { @include $hijack_file; // This file contains $serendipity['custom_emoticons'] and maybe $serendipity['custom_emoticons_regexp'] if (isset($serendipity['custom_emoticons']) && is_array($serendipity['custom_emoticons'])) { @@ -95,38 +98,41 @@ class serendipity_event_emoticate extends serendipity_event if (!isset($this->smilies)) { $ext = $this->get_config('extension', 'png'); $this->smilies = array( - "\:'\(" => serendipity_getTemplateFile('img/emoticons/cry.'.$ext, 'serendipityHTTPPath', true), + "\:'\(" => $this->getFile('img/emoticons/cry.'.$ext, 'serendipityHTTPPath'), - '\:\-?\)' => serendipity_getTemplateFile('img/emoticons/smile.'.$ext, 'serendipityHTTPPath', true), + '\:\-?\)' => $this->getFile('img/emoticons/smile.'.$ext, 'serendipityHTTPPath'), - '\:\-?\|' => serendipity_getTemplateFile('img/emoticons/normal.'.$ext, 'serendipityHTTPPath', true), + '\:\-?\|' => $this->getFile('img/emoticons/normal.'.$ext, 'serendipityHTTPPath'), - '\:\-?O' => serendipity_getTemplateFile('img/emoticons/eek.'.$ext, 'serendipityHTTPPath', true), + '\:\-?O' => $this->getFile('img/emoticons/eek.'.$ext, 'serendipityHTTPPath'), - '\:\-?\(' => serendipity_getTemplateFile('img/emoticons/sad.'.$ext, 'serendipityHTTPPath', true), - - '8\-?\)' => serendipity_getTemplateFile('img/emoticons/cool.'.$ext, 'serendipityHTTPPath', true), - - '\:\-?D' => serendipity_getTemplateFile('img/emoticons/laugh.'.$ext, 'serendipityHTTPPath', true), - - '\:\-?P' => serendipity_getTemplateFile('img/emoticons/tongue.'.$ext, 'serendipityHTTPPath', true), - - ';\-?\)' => serendipity_getTemplateFile('img/emoticons/wink.'.$ext, 'serendipityHTTPPath', true), + '\:\-?\(' => $this->getFile('img/emoticons/sad.'.$ext, 'serendipityHTTPPath'), + + '8\-?\)' => $this->getFile('img/emoticons/cool.'.$ext, 'serendipityHTTPPath'), + + '\:\-?D' => $this->getFile('img/emoticons/laugh.'.$ext, 'serendipityHTTPPath'), + + '\:\-?P' => $this->getFile('img/emoticons/tongue.'.$ext, 'serendipityHTTPPath'), + + ';\-?\)' => $this->getFile('img/emoticons/wink.'.$ext, 'serendipityHTTPPath'), ); } return $this->smilies; } - function humanReadableEmoticon($key) { + function humanReadableEmoticon($key) + { return str_replace(array('-?', '\\'), array('-', ''), $key); } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } - function example() { + function example() + { $s = sprintf(PLUGIN_EVENT_EMOTICATE_EXAMPLE_EXTEND_DESC, $serendipity['serendiptyHTTPPath'].'plugins/serendipity_event_emoticate/emoticons.inc.php.txt'); $s .= '<table cellspacing="5" class="example_emos">'; $s .= '<tr>'; @@ -144,30 +150,33 @@ class serendipity_event_emoticate extends serendipity_event function introspect_config_item($name, &$propbag) { switch($name) { - case 'extension': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_EVENT_EMOTICATE_EXTENSION); - $propbag->add('description', PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH); - $propbag->add('default', 'png'); - break; - default: - $propbag->add('type', 'boolean'); - $propbag->add('name', constant($name)); - $propbag->add('description', sprintf(APPLY_MARKUP_TO, constant($name))); - $propbag->add('default', 'true'); + case 'extension': + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_EVENT_EMOTICATE_EXTENSION); + $propbag->add('description', PLUGIN_EVENT_EMOTICATE_EXTENSION_BLAHBLAH); + $propbag->add('default', 'png'); + break; + + default: + $propbag->add('type', 'boolean'); + $propbag->add('name', constant($name)); + $propbag->add('description', sprintf(APPLY_MARKUP_TO, constant($name))); + $propbag->add('default', 'true'); + break; } return true; } - - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { - switch($event) { - case 'frontend_display': + switch($event) { + + case 'frontend_display': foreach ($this->markup_elements as $temp) { if (serendipity_db_bool($this->get_config($temp['name'], true)) && isset($eventData[$temp['element']]) && !$eventData['properties']['ep_disable_markup_' . $this->instance] && @@ -182,11 +191,13 @@ class serendipity_event_emoticate extends serendipity_event } } } - return true; break; case 'css_backend': -?> + $eventData .= ' + +/* event emoticate plugin start */ + .example_emos { margin-left: auto; margin-right: auto; @@ -194,28 +205,37 @@ class serendipity_event_emoticate extends serendipity_event .example_emos td { text-align: center; } -<?php + +/* event emoticate plugin end */ + +'; case 'css': -?> + $eventData .= ' + +/* serendipity_event_emoticate start */ + .emoticon { display: inline; vertical-align: bottom; border: 0 none; } -<?php - return true; + +/* serendipity_event_emoticate end */ + +'; break; case 'frontend_comment': if (serendipity_db_bool($this->get_config('COMMENT', true))) { echo '<div class="serendipity_commentDirection serendipity_comment_emoticate">' . PLUGIN_EVENT_EMOTICATE_TRANSFORM . '</div>'; } - return true; break; - default: - return false; + default: + return false; + } + return true; } else { return false; } diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_bg.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_bg.inc.php index 6feebeba..66fd9f5b 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_bg.inc.php @@ -1,43 +1,44 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ - @define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Допълнителни свойства за постингите'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(Кеширане, не публични постинги, sticky постинги)'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Маркиране на този постинг като sticky'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'Постингите могат да се четат от'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Мене'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Съ-авторите'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Всички'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Кеширане на постингите ?'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Ако е позволено, кеширана версия на постинга ще бъде генерирана при неговия запис. Кеширането ще увеличи производителността, но ще намали гъвкавостта на другите плъгини.'); - @define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Кеширане на всички постинги'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Кеширане на следващата серия постинги ...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Кеширане на постинги от %d до %d'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Кеширане на постинг #%d, <em>%s</em>...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Постингът е кеширан.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Кеширането завърши.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Кеширането е прекратено.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (общо %d постинга)...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Постингът да не се вижда на главната страница и в списъците'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Използване на групово-базираните рестрикции'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Когато е активирано, Вие можете да дефинирате кои потребителски групи да имат възможност за четене на постингите. Тази опция има голямо влияние върху производителността на блога. Позволете я, само ако наистина ще я използвате.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Използване на потребител-базирани рестрикции'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Когато е активирано, Вие можете да дефинирате кои специфични потребители да имат възможност за четене на постингите. Тази опция има голямо влияние върху производителността на блога. Позволете я, само ако наистина ще я използвате.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Изключване от RSS емисии'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'При избор \'Да\' съдържанието на тази статия няма да бъде включено в RSS емисии.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Допълнителни свойства за постингите'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(Кеширане, не публични постинги, sticky постинги)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Маркиране на този постинг като sticky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'Постингите могат да се четат от'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Мене'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Съ-авторите'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Всички'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Кеширане на постингите ?'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Ако е позволено, кеширана версия на постинга ще бъде генерирана при неговия запис. Кеширането ще увеличи производителността, но ще намали гъвкавостта на другите плъгини.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Кеширане на всички постинги'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Кеширане на следващата серия постинги ...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Кеширане на постинги от %d до %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Кеширане на постинг #%d, <em>%s</em>...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Постингът е кеширан.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Кеширането завърши.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Кеширането е прекратено.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (общо %d постинга)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Постингът да не се вижда на главната страница и в списъците'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Използване на групово-базираните рестрикции'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Когато е активирано, Вие можете да дефинирате кои потребителски групи да имат възможност за четене на постингите. Тази опция има голямо влияние върху производителността на блога. Позволете я, само ако наистина ще я използвате.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Използване на потребител-базирани рестрикции'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Когато е активирано, Вие можете да дефинирате кои специфични потребители да имат възможност за четене на постингите. Тази опция има голямо влияние върху производителността на блога. Позволете я, само ако наистина ще я използвате.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Изключване от RSS емисии'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'При избор \'Да\' съдържанието на тази статия няма да бъде включено в RSS емисии.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Допълнителни полета'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Допълнителните полета могат да се поставят в шаблона на вашата тема на места, където искате те да се показват. За това редактирайте вашия файл entries.tpl и поставете Smarty тагове подобно на следващите примери: {$entry.properties.ep_MyCustomField} на желаните места. Не трябва да изпускате префикса \'ep_\' преди името на полетата. '); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Тук можете да въведете списък от имена на полета, разделени със запетаи, които да използвате за извеждане на HTML за всяка статия. В имената са разрешени само латински букви и цифри (не и специални символи). Например: \'Customfield1\', \'Customfield2\'. ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Списъкът на достъпните допълнителни полета може да бъде редактиран в <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">конфигурацията</a> на приставка serendipity_event_entryproperties.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Допълнителни полета'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Допълнителните полета могат да се поставят в шаблона на вашата тема на места, където искате те да се показват. За това редактирайте вашия файл entries.tpl и поставете Smarty тагове подобно на следващите примери: {$entry.properties.ep_MyCustomField} на желаните места. Не трябва да изпускате префикса \'ep_\' преди името на полетата. '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Тук можете да въведете списък от имена на полета, разделени със запетаи, които да използвате за извеждане на HTML за всяка статия. В имената са разрешени само латински букви и цифри (не и специални символи). Например: \'Customfield1\', \'Customfield2\'. ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Списъкът на достъпните допълнителни полета може да бъде редактиран в <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">конфигурацията</a> на приставка serendipity_event_entryproperties.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Забранени текстови форматирания за тази статия:'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Използване на разширено търсене в базата данни'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Ако е позволено, ще бъдат изпълнени допълнителни SQL заявки за лепкави статии, скрити статии и изтрити статии, за да бъдат използвани на лицевата страница. Ако не е нужна, забраната на тази функция ще увеличи производителността.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Забранени текстови форматирания за тази статия:'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Използване на разширено търсене в базата данни'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Ако е позволено, ще бъдат изпълнени допълнителни SQL заявки за лепкави статии, скрити статии и изтрити статии, за да бъдат използвани на лицевата страница. Ако не е нужна, забраната на тази функция ще увеличи производителността.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Екран за редактиране на статии'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Тук можете да изберете кои елементи (полета) и в какъв ред да бъдат показани по време на процеса на редактиране.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Екран за редактиране на статии'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Тук можете да изберете кои елементи (полета) и в какъв ред да бъдат показани по време на процеса на редактиране.'); \ No newline at end of file diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_cn.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_cn.inc.php index a011d915..4749bfab 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_cn.inc.php @@ -29,5 +29,6 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', '你可以在你的博客模版中使用额外附加的自定义字段,从而将相关字段内容显示在页面上。你需要编辑entries.tpl这个模版文件,将Smarty标记( 例如{$entry.properties.ep_MyCustomField} )放在该模版文件中你想放置的合适位置,不过需要主意的是,要在每一个自定义字段前面添加前缀(prefix) ep_ 。'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', '此处你可以输入一些自定义字段的名称,用逗号分割开来。这些自定义字段可以在任何一篇文章中被使用。不要在自定义字段的名称中使用特殊字符或空格。自定义字段的名称可以是 Customfield1, Customfield2 等等。 ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', '可在“<a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">配置插件</a>”中修改自定义字段。'); - -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', '禁止在此文章中使用标记语言方面的插件。'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', '禁止在此文章中使用标记语言方面的插件。'); + diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_cs.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_cs.inc.php index 06852a7f..4f94f0ff 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # lang_cs.inc.php 1381.2 2009-02-23 17:29:23 VladaAjgl $ +<?php /** * @version 1381.2 @@ -10,39 +10,40 @@ * @revisionDate 2009/02/23 */ -@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Rozšířené vlastnosti příspěvků'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachování, neveřejné příspěvky, stálé (přilepené) příspěvky'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Označ tento příspěvek jako stálý (přilepený)'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'Příspěvky mohou být přečteny'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Kýmkoliv'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachování příspěvků?'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, při každém uložení příspěvku bude vytvořena cachovaná verze. To znamená, že při každém načtení stránky nebude příspěvek sestavován od začátku znovu, ale vezme se předgenerovaná (cachovaná) verze. Cachování zvýší výkon blogu, ale může omezit funkci ostatních pluginů.'); -@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat příspěvky'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Načítání další dávky příspěvků...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Načítání příspěvků %d až %d'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytváření cachované verze pro příspěvek #%d, <em>%s</em>...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Příspěvek cachován.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachování příspěvků hotovo.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachování příspěvku ZRUŠENO.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového počtu %d příspěvků)...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skrýt v přehledu článků / na hlavní stránce'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Použít omezení pro skupiny'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, můžete zadat, které skupiny uživatelů smí číst článek. Tato volba má velký vliv na rychlost vytváření stránky s přehledem článků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Použít omezení pro uživatele'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, můžete zadat, kteří uživatelé smí číst článek. Tato volba má velký vliv na rychlost vytváření stránky s přehledem článků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skrýt obsah v RSS kanálu'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah příspěvku se nebude zobrazovat v RSS kanálu/kanálech.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Rozšířené vlastnosti příspěvků'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachování, neveřejné příspěvky, stálé (přilepené) příspěvky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Označ tento příspěvek jako stálý (přilepený)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'Příspěvky mohou být přečteny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Kýmkoliv'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachování příspěvků?'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, při každém uložení příspěvku bude vytvořena cachovaná verze. To znamená, že při každém načtení stránky nebude příspěvek sestavován od začátku znovu, ale vezme se předgenerovaná (cachovaná) verze. Cachování zvýší výkon blogu, ale může omezit funkci ostatních pluginů.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat příspěvky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Načítání další dávky příspěvků...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Načítání příspěvků %d až %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytváření cachované verze pro příspěvek #%d, <em>%s</em>...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Příspěvek cachován.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachování příspěvků hotovo.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachování příspěvku ZRUŠENO.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového počtu %d příspěvků)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skrýt v přehledu článků / na hlavní stránce'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Použít omezení pro skupiny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, můžete zadat, které skupiny uživatelů smí číst článek. Tato volba má velký vliv na rychlost vytváření stránky s přehledem článků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Použít omezení pro uživatele'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, můžete zadat, kteří uživatelé smí číst článek. Tato volba má velký vliv na rychlost vytváření stránky s přehledem článků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skrýt obsah v RSS kanálu'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah příspěvku se nebude zobrazovat v RSS kanálu/kanálech.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastní pole'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Přídavná vlastní pole mohou být použita ve Vaší vlastní šabloně v místech, kde chcete zobrazovat data z těchto polí. Pro tuto funkci musíte editovat šablonu "entries.tpl" a v ní umístit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde můžete zadat seznam polí, které chcete použít u svých příspěvků, oddělených čárkou. Pro jména polí nepoužívejte speciální znaky ani diakritiku. Příklad: "MojePole1, CiziPole2, UplneCiziPole3". '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupných volitelných polí může být změněn v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">konfiguraci pluginu</a>.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastní pole'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Přídavná vlastní pole mohou být použita ve Vaší vlastní šabloně v místech, kde chcete zobrazovat data z těchto polí. Pro tuto funkci musíte editovat šablonu "entries.tpl" a v ní umístit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde můžete zadat seznam polí, které chcete použít u svých příspěvků, oddělených čárkou. Pro jména polí nepoužívejte speciální znaky ani diakritiku. Příklad: "MojePole1, CiziPole2, UplneCiziPole3". '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupných volitelných polí může být změněn v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">konfiguraci pluginu</a>.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zakaž použití vybraných značkovacích pluginů pro tento příspěvek:'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Rozšířené databázové hledání'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je použito, budou vytvořeny přídavné SQL dotazy, které umožní použít i přilepené, skryté a z hlavní stránky odstraněné příspěvky. Pokud tyto nejsou použávané, doporučuje se volbu zakázat, což může zvýšit výkon.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zakaž použití vybraných značkovacích pluginů pro tento příspěvek:'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Rozšířené databázové hledání'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je použito, budou vytvořeny přídavné SQL dotazy, které umožní použít i přilepené, skryté a z hlavní stránky odstraněné příspěvky. Pokud tyto nejsou použávané, doporučuje se volbu zakázat, což může zvýšit výkon.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Editační obrazovka'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, které prvky a v jakém pořadí má tento modul zobrazovat v procesu úprav příspěvku.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Editační obrazovka'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, které prvky a v jakém pořadí má tento modul zobrazovat v procesu úprav příspěvku.'); diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_cz.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_cz.inc.php index 81bd80db..4f94f0ff 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # lang_cz.inc.php 1381.2 2009-02-23 17:29:23 VladaAjgl $ +<?php /** * @version 1381.2 @@ -10,39 +10,40 @@ * @revisionDate 2009/02/23 */ -@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Rozšířené vlastnosti příspěvků'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachování, neveřejné příspěvky, stálé (přilepené) příspěvky'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Označ tento příspěvek jako stálý (přilepený)'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'Příspěvky mohou být přečteny'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Kýmkoliv'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachování příspěvků?'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, při každém uložení příspěvku bude vytvořena cachovaná verze. To znamená, že při každém načtení stránky nebude příspěvek sestavován od začátku znovu, ale vezme se předgenerovaná (cachovaná) verze. Cachování zvýší výkon blogu, ale může omezit funkci ostatních pluginů.'); -@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat příspěvky'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Načítání další dávky příspěvků...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Načítání příspěvků %d až %d'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytváření cachované verze pro příspěvek #%d, <em>%s</em>...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Příspěvek cachován.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachování příspěvků hotovo.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachování příspěvku ZRUŠENO.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového počtu %d příspěvků)...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skrýt v přehledu článků / na hlavní stránce'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Použít omezení pro skupiny'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, můžete zadat, které skupiny uživatelů smí číst článek. Tato volba má velký vliv na rychlost vytváření stránky s přehledem článků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Použít omezení pro uživatele'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, můžete zadat, kteří uživatelé smí číst článek. Tato volba má velký vliv na rychlost vytváření stránky s přehledem článků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skrýt obsah v RSS kanálu'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah příspěvku se nebude zobrazovat v RSS kanálu/kanálech.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Rozšířené vlastnosti příspěvků'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachování, neveřejné příspěvky, stálé (přilepené) příspěvky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Označ tento příspěvek jako stálý (přilepený)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'Příspěvky mohou být přečteny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Kýmkoliv'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachování příspěvků?'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, při každém uložení příspěvku bude vytvořena cachovaná verze. To znamená, že při každém načtení stránky nebude příspěvek sestavován od začátku znovu, ale vezme se předgenerovaná (cachovaná) verze. Cachování zvýší výkon blogu, ale může omezit funkci ostatních pluginů.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat příspěvky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Načítání další dávky příspěvků...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Načítání příspěvků %d až %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytváření cachované verze pro příspěvek #%d, <em>%s</em>...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Příspěvek cachován.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachování příspěvků hotovo.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachování příspěvku ZRUŠENO.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového počtu %d příspěvků)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skrýt v přehledu článků / na hlavní stránce'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Použít omezení pro skupiny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, můžete zadat, které skupiny uživatelů smí číst článek. Tato volba má velký vliv na rychlost vytváření stránky s přehledem článků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Použít omezení pro uživatele'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, můžete zadat, kteří uživatelé smí číst článek. Tato volba má velký vliv na rychlost vytváření stránky s přehledem článků. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu využijete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skrýt obsah v RSS kanálu'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah příspěvku se nebude zobrazovat v RSS kanálu/kanálech.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastní pole'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Přídavná vlastní pole mohou být použita ve Vaší vlastní šabloně v místech, kde chcete zobrazovat data z těchto polí. Pro tuto funkci musíte editovat šablonu "entries.tpl" a v ní umístit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde můžete zadat seznam polí, které chcete použít u svých příspěvků, oddělených čárkou. Pro jména polí nepoužívejte speciální znaky ani diakritiku. Příklad: "MojePole1, CiziPole2, UplneCiziPole3". '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupných volitelných polí může být změněn v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">konfiguraci pluginu</a>.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastní pole'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Přídavná vlastní pole mohou být použita ve Vaší vlastní šabloně v místech, kde chcete zobrazovat data z těchto polí. Pro tuto funkci musíte editovat šablonu "entries.tpl" a v ní umístit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde můžete zadat seznam polí, které chcete použít u svých příspěvků, oddělených čárkou. Pro jména polí nepoužívejte speciální znaky ani diakritiku. Příklad: "MojePole1, CiziPole2, UplneCiziPole3". '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupných volitelných polí může být změněn v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">konfiguraci pluginu</a>.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zakaž použití vybraných značkovacích pluginů pro tento příspěvek:'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Rozšířené databázové hledání'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je použito, budou vytvořeny přídavné SQL dotazy, které umožní použít i přilepené, skryté a z hlavní stránky odstraněné příspěvky. Pokud tyto nejsou použávané, doporučuje se volbu zakázat, což může zvýšit výkon.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zakaž použití vybraných značkovacích pluginů pro tento příspěvek:'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Rozšířené databázové hledání'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je použito, budou vytvořeny přídavné SQL dotazy, které umožní použít i přilepené, skryté a z hlavní stránky odstraněné příspěvky. Pokud tyto nejsou použávané, doporučuje se volbu zakázat, což může zvýšit výkon.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Editační obrazovka'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, které prvky a v jakém pořadí má tento modul zobrazovat v procesu úprav příspěvku.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Editační obrazovka'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, které prvky a v jakém pořadí má tento modul zobrazovat v procesu úprav příspěvku.'); diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_de.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_de.inc.php index c5cae17e..119fec72 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_de.inc.php @@ -1,4 +1,4 @@ -<?php # lang_de.inc.php 1.0 2009-06-03 09:50:12 VladaAjgl $ +<?php /** * @version 1.0 @@ -44,3 +44,5 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Wenn aktiviert, werden zusätzliche Datenbankabfragen ausgeführt. Damit wird es möglich, dauerhafte , nicht in Artikelübersicht aufgeführte und im RSS-Feed versteckte Artikel zu verwenden . Wenn diese Funktionen nicht benötigt werden, kann das Abschalten der Abfragen die Geschwindigkeit verbessern.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Reihenfolge der Optionen'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Hier kann ausgewählt werden, welche Optionen in welcher Reihenfolge im Editiermodus des Artikels angezeigt werden.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_MULTI_AUTHORS', 'Mehrere Autoren'); diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_es.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_es.inc.php index ddb66305..63c020c5 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_es.inc.php @@ -1,11 +1,11 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ - //Sticky post +//Sticky post @define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Propiedades extendidas de las entradas'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(caché, artículos privados, sticky posts)'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Marcar esta entrada como Sticky Post'); @@ -29,4 +29,4 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Si la activas, puedes definir qué usuarios de un grupo están autorizados para leer las entradas. Esta opción tiene un profundo impacto en el desempeño al visualizar tus artículos. Actívala sólo si realmente vas a utilizar esta característica.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Utilizar restricciones basadas en usuarios'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Si la activas, puedes definir que usuarios específicos están autorizados a leer tus entradas. Esta opción tiene un profundo impacto en el desempeño al visualizar tus artículos. Actívala sólo si realmente vas a utilizar esta característica.'); -?> \ No newline at end of file + diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_fr.inc.php index 52727107..2ddb38b9 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -45,5 +45,3 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Ici vous pouvez définir une liste séprée par des virgules de noms de champs (variables) à remplir pour chaque billet. Attention, le nom de ces variables ne doit pas contenir de caractères spéciaux ni d\'espaces. Exemples: "Variable1, Variable2, ChouetteVariable". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'La liste des variables sur mesure peut être modifiée dans la <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">configuration du plugin</a>.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_ja.inc.php index 617434bb..3a5d9fb0 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 966 */ @@ -34,8 +34,7 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'カスタムフィールド'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Additional custom fields can be used in your template at places where you want them to show up. For that, edit your entries.tpl template file and place Smarty tags like {$entry.properties.ep_MyCustomField} in the HTML where you like. 各項目の接頭語 ep_ に注意してください。'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'ここで、各エントリへの入力に使用できる、コンマで分割された項目名の一覧を入力することができます - 特殊文字またはスペースをそれらのフィールド名に使用しません。 例: "Customfield1, Customfield2". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', ' -利用できるカスタム項目の一覧は、<a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">プラグイン設定</a> で変更することができます。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', '利用できるカスタム項目の一覧は、<a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">プラグイン設定</a> で変更することができます。'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'このエントリのマークアッププラグインを無効にする:'); -?> + diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_ko.inc.php index ffb3b559..055cf352 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_ko.inc.php @@ -1,27 +1,26 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', '글에 대한 확장 속성'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(캐시, 비공개 글, 꼭대기 글)'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', '이 글을 꼭대기 글로 사용'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', '이 글의 읽기 허용 범위'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', '작성자 자신만'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', '다른 작성자까지'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', '모두에게 공개'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', '글을 캐시함'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', '사용할 경우 글을 저장할 때마다 캐시된 버전을 생성합니다. 캐시를 사용하면 성능을 향상시킬 수 있으나 다른 플러그인의 작동 유연성을 떨어뜨릴 수 있습니다.'); - @define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', '글에 대한 캐시 생성'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', '다음 글 묶음을 불러오는 중...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', '%d번과 %d번 사이의 글을 불러오는 중'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', '%d번 글 <em>%s</em>에 대한 캐시를 생성중...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', '글이 캐시되었습니다.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', '글에 대한 캐시 생성을 마쳤습니다.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', '캐시 생성이 중단되었습니다.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (총 %d개의 글)...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', 'nl2br 플러그인 사용 안 함'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', '첫 페이지/정리 페이지에서 글을 숨김'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', '그룹 기반 제한 사용'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', '사용할 경우 글을 읽을 수 있는 사용자의 그룹을 정의할 수 있습니다. 정리 페이지 표시 성능에 상당한 영향을 주기 때문에 이 옵션은 꼭 필요할 때만 사용하시기 바랍니다.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', '글에 대한 확장 속성'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(캐시, 비공개 글, 꼭대기 글)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', '이 글을 꼭대기 글로 사용'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', '이 글의 읽기 허용 범위'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', '작성자 자신만'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', '다른 작성자까지'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', '모두에게 공개'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', '글을 캐시함'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', '사용할 경우 글을 저장할 때마다 캐시된 버전을 생성합니다. 캐시를 사용하면 성능을 향상시킬 수 있으나 다른 플러그인의 작동 유연성을 떨어뜨릴 수 있습니다.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', '글에 대한 캐시 생성'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', '다음 글 묶음을 불러오는 중...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', '%d번과 %d번 사이의 글을 불러오는 중'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', '%d번 글 <em>%s</em>에 대한 캐시를 생성중...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', '글이 캐시되었습니다.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', '글에 대한 캐시 생성을 마쳤습니다.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', '캐시 생성이 중단되었습니다.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (총 %d개의 글)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', 'nl2br 플러그인 사용 안 함'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', '첫 페이지/정리 페이지에서 글을 숨김'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', '그룹 기반 제한 사용'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', '사용할 경우 글을 읽을 수 있는 사용자의 그룹을 정의할 수 있습니다. 정리 페이지 표시 성능에 상당한 영향을 주기 때문에 이 옵션은 꼭 필요할 때만 사용하시기 바랍니다.'); -?> diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_pl.inc.php index 1d62f4c9..5c03948a 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -37,4 +37,4 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Lista dostępnych pól uzytkownika może być zmieniona w module <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">konfiguracji wtyczki</a>.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Wyłącz wtyczki Znaczników dla tego wpisu:'); -?> + diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_pt_PT.inc.php index 1ca4893e..3e2e6bde 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_pt_PT.inc.php @@ -1,10 +1,10 @@ -<?php # $Id:$ +<?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details # Translation (c) by Joao P Matos <jmatos@math.ist.utl.pt> /* vim: set sts=4 ts=4 expandtab : */ - //Sticky post +//Sticky post @define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Propriedades extra das entradas'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(cache, artigos privados, sticky posts)'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Marcar esta entrada como Sticky Post'); @@ -35,4 +35,4 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Campos ad hoc adicionais podem ser usados no seu modelo em locais em que quiser que apareçam. Para isso, edite o seu ficheiro entries.tpl e coloque etiquetas Smarty da forma {$entry.properties.ep_MyCustomField} no HTML onde desejar. Note o prefixo ep_ para cada campo. '); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Aqui pode introduzir uma lista de nomes de campos separados por vírgulas que podem ser usados para cada entrada - não use caracteres especiais ou espaços nesses nomes de campos. Exemplo: "Customfield1, Customfield2". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'A lista de campos ad hoc disponíveis pode ser mudada na <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">configuração de plugins</a>.'); -?> + diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_sk.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_sk.inc.php index ee22cb49..4ee864ad 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_sk.inc.php @@ -6,40 +6,41 @@ * @revisionDate 2010-08-17 */ -@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Rozšírené vlastnosti článkov'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachovanie, neverejné články, stále (prilepené) články'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Označiť tento článok ako stály (prilepený)'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'Články môžu byť prečítané'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautormi'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Kýmkoľvek'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Zapnúť cachovanie článkov?'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Ak je zapnuté, pri každom uložení článku bude vytvorená cachovaná verzia. To znamená, že pri každom načítaní stránky nebude príspevok generovaný odznova, ale použije sa predgenerovaná (cachovaná) verzia. Cachovanie zvýši výkon weblogu, ale môže obmedziť funkčnosť ostatných doplnkov.'); -@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovať príspevky'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Načítanie ďalšej dávky príspevkov...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Načítanie príspevkov %d až %d'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytváranie cachovanej verzie pre príspevok #%d, <em>%s</em>...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Príspevok cachovaný.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachovanie príspevkov dokončené.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachovanie príspevkov ZRUŠENÉ.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového počtu %d príspevkov)...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skryť v prehľade článkov / na hlavnej stránke'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Použíť obmedzenie pre skupiny'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Ak je zapnuté, tak môžete zadať, ktoré skupiny používateľov môžu čítať článok. Toto nastavenie má veľký vplyv an rýchlosť vytvárania stránky s prehľadom článkov. Zapnite toto nastavenie, iba ak ho naozaj potrebujete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Použíť obmedzenie pre používateľov'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Ak je zapnuté, tak môžete zadať, ktorí používatelia môžu čítať článok. Toto nastavenie má veľký vplyv an rýchlosť v +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Rozšírené vlastnosti článkov'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachovanie, neverejné články, stále (prilepené) články'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Označiť tento článok ako stály (prilepený)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'Články môžu byť prečítané'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautormi'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Kýmkoľvek'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Zapnúť cachovanie článkov?'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Ak je zapnuté, pri každom uložení článku bude vytvorená cachovaná verzia. To znamená, že pri každom načítaní stránky nebude príspevok generovaný odznova, ale použije sa predgenerovaná (cachovaná) verzia. Cachovanie zvýši výkon weblogu, ale môže obmedziť funkčnosť ostatných doplnkov.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovať príspevky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Načítanie ďalšej dávky príspevkov...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Načítanie príspevkov %d až %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytváranie cachovanej verzie pre príspevok #%d, <em>%s</em>...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Príspevok cachovaný.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachovanie príspevkov dokončené.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachovanie príspevkov ZRUŠENÉ.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkového počtu %d príspevkov)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skryť v prehľade článkov / na hlavnej stránke'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Použíť obmedzenie pre skupiny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Ak je zapnuté, tak môžete zadať, ktoré skupiny používateľov môžu čítať článok. Toto nastavenie má veľký vplyv an rýchlosť vytvárania stránky s prehľadom článkov. Zapnite toto nastavenie, iba ak ho naozaj potrebujete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Použíť obmedzenie pre používateľov'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Ak je zapnuté, tak môžete zadať, ktorí používatelia môžu čítať článok. Toto nastavenie má veľký vplyv an rýchlosť v ytvárania stránky s prehľadom článkov. Zapnite toto nastavenie, iba ak ho naozaj potrebujete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skryť obsah v RSS kanáli'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Ak je zapnuté ,tak sa nebude zobrazovať obsah článku v RSS kanáli/kanáloch.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skryť obsah v RSS kanáli'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Ak je zapnuté ,tak sa nebude zobrazovať obsah článku v RSS kanáli/kanáloch.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastné pole'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Pridané vlastné polia môžu byť použité vo Vašej vlastnej šablóne na miestach, kde chcete zobrazovať údaje z týchto polí. Pre túto funkcio musíte upraviť šablónu "entries.tpl" a v nej umiestniť Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred názov každého poľa musí byť pridaná predpona ep_ . '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Tu môžete zadať zoznam polí, ktoré chcete použiť vo svojich článkoch. Polia oddeľovať čiarkou. Mená polí nemôžu obsahovať špeciálne znaky ani diakritiku. Príklad: "MojePole1, CiziPole2, UplneCiziPole3". '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Zoznam dostupných voliteľných polí môže byť zmenený v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">nastaveniach doplnku</a>.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastné pole'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Pridané vlastné polia môžu byť použité vo Vašej vlastnej šablóne na miestach, kde chcete zobrazovať údaje z týchto polí. Pre túto funkcio musíte upraviť šablónu "entries.tpl" a v nej umiestniť Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred názov každého poľa musí byť pridaná predpona ep_ . '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Tu môžete zadať zoznam polí, ktoré chcete použiť vo svojich článkoch. Polia oddeľovať čiarkou. Mená polí nemôžu obsahovať špeciálne znaky ani diakritiku. Príklad: "MojePole1, CiziPole2, UplneCiziPole3". '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Zoznam dostupných voliteľných polí môže byť zmenený v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">nastaveniach doplnku</a>.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zakázať použitie transofrmácií textu (markup) pre tento článok:'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Rozšírené databázové hľadanie'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Ak je zapnuté, budú vytvorené prídavné SQL dotazy, ktoré umožnia použiť aj prilepené, skryté a z hlavnej stránky odstránané články. Ak toto nastavenie nepotrebujete, odporúčame z dôvodov výkonu ponechať vypnuté.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zakázať použitie transofrmácií textu (markup) pre tento článok:'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Rozšírené databázové hľadanie'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Ak je zapnuté, budú vytvorené prídavné SQL dotazy, ktoré umožnia použiť aj prilepené, skryté a z hlavnej stránky odstránané články. Ak toto nastavenie nepotrebujete, odporúčame z dôvodov výkonu ponechať vypnuté.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Editačná obrazovka'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Tu vyberte, ktoré prvky a v akom poradí má tento doplnok zobrazovať v procese úprav článku.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Editačná obrazovka'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Tu vyberte, ktoré prvky a v akom poradí má tento doplnok zobrazovať v procese úprav článku.'); diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_tn.inc.php index a7d60fb4..cdb709e6 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_tn.inc.php @@ -2,7 +2,7 @@ ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,35 +12,34 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', '文章的進階屬性'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(快取資料, 不開放文章, 置頂文章)'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', '標示為置頂文章'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', '誰可以閱讀文章'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', '自己'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBER', '副作者'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', '訪客'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', '允許快取文章?'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', '如果開啟,每次儲存文章時都會建立快取資料。快取資料可以增加速度,但可能有些外掛無法相容。'); - @define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', '建立快取資料'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', '擷取其他文章...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', '擷取文章 %d 到 %d'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', '建立此文章的快取資料 #%d, <em>%s</em>...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', '取得快取資料'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', '快取完成。'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', '快取資料取消。'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (總共 %d 篇文章)...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', '關閉 nl2br'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', '隱藏於文章頁面 / 主頁面'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', '使用群組限制'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', '如果開啟,您可以選擇哪個群組的成員可以流覽文章。這個功能會影響您的網誌速度,除非必要最好不要使用。'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', '使用會員限制'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', '如果開啟,您可以選擇哪個會員可以瀏覽文章。這個功能會影響您的網誌速度,除非必要最好不要使用。'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'RSS 內隱藏內容'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', '如果開啟,文章的內容不會顯示於 RSS 內。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', '文章的進階屬性'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(快取資料, 不開放文章, 置頂文章)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', '標示為置頂文章'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', '誰可以閱讀文章'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', '自己'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBER', '副作者'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', '訪客'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', '允許快取文章?'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', '如果開啟,每次儲存文章時都會建立快取資料。快取資料可以增加速度,但可能有些外掛無法相容。'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', '建立快取資料'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', '擷取其他文章...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', '擷取文章 %d 到 %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', '建立此文章的快取資料 #%d, <em>%s</em>...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', '取得快取資料'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', '快取完成。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', '快取資料取消。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (總共 %d 篇文章)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', '關閉 nl2br'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', '隱藏於文章頁面 / 主頁面'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', '使用群組限制'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', '如果開啟,您可以選擇哪個群組的成員可以流覽文章。這個功能會影響您的網誌速度,除非必要最好不要使用。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', '使用會員限制'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', '如果開啟,您可以選擇哪個會員可以瀏覽文章。這個功能會影響您的網誌速度,除非必要最好不要使用。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'RSS 內隱藏內容'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', '如果開啟,文章的內容不會顯示於 RSS 內。'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', '自訂欄位'); - define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', '您可以在模板裡面顯示額外的欄位。您必須編輯 entries.tpl 的模板檔案然後將 Smarty 標籤 {$entry.properties.ep_MyCustomField} 放入您要它顯示的 HTML 檔案裡面。 注意每個欄位的前置字元 ep_。'); - define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', '這裡可以輸入每個以逗點分開的欄位名稱 - 不要用特殊字元或空格。範例:"Customfield1, Customfield2". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', '每個自訂欄位可以在這裡改變 <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">外掛設定</a>。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', '自訂欄位'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', '您可以在模板裡面顯示額外的欄位。您必須編輯 entries.tpl 的模板檔案然後將 Smarty 標籤 {$entry.properties.ep_MyCustomField} 放入您要它顯示的 HTML 檔案裡面。 注意每個欄位的前置字元 ep_。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', '這裡可以輸入每個以逗點分開的欄位名稱 - 不要用特殊字元或空格。範例:"Customfield1, Customfield2". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', '每個自訂欄位可以在這裡改變 <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">外掛設定</a>。'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_tr.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_tr.inc.php index fb5788af..35dadd0e 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_tr.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_tr.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Translator Name <ahmetusal@gmail.com> * EN-Revision: Revision of lang_en.inc.php */ @@ -14,15 +14,11 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Yazarlar'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'Herkes'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Yazılar önbelleklensin mi?'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Eğer bu seçenek etkinse, yazıyı her kaydettiğinizde -önbelleklenmiş bir sürüm kendiliğinden oluşturulacaktır. Önbellekleme yazıların yayın esnasında -daha çabuk erişilmesine imkan verir, siteye erişim hızını arttırır, Ama diğer eklentilerle beraber çalışırken -ölçeklenebilir olma imkanını da azaltır..'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Eğer bu seçenek etkinse, yazıyı her kaydettiğinizde önbelleklenmiş bir sürüm kendiliğinden oluşturulacaktır. Önbellekleme yazıların yayın esnasında daha çabuk erişilmesine imkan verir, siteye erişim hızını arttırır, Ama diğer eklentilerle beraber çalışırken ölçeklenebilir olma imkanını da azaltır..'); @define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Yazıları önbellekleme işlemini gerçekleştir'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Yazıların kaydı gelecek işlem için çekiliyor...'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Yazıların çekilme işlemi %d dan %d'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Building cache for entryŞu yazı için önbellekleme işlemi: -#%d, <em>%s</em>...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Building cache for entryŞu yazı için önbellekleme işlemi: #%d, <em>%s</em>...'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Yazı önbellekleğe aktarıldı.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Yazı önbellekleme işlemi tamamlandı.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Yazı önbellekleme işlemi iptal edildi.'); @@ -30,18 +26,14 @@ daha çabuk erişilmesine imkan verir, siteye erişim hızını arttırır, Ama @define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', 'nl2br Kapalı'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Yazıyı öngörünüm / anasayfadan gizle'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Grup tabanlı yetkilendirme kullan'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Eğer bu seçenek etkinleştirilirse, hangi kullanıcı grubunun -kullanıcılarının bu yazıyı okuma yetkisi olduğunu belirleyebilirsiniz. Bu seçenek performansı olumsuz -etkileyebilir. Sadece gerçekten ihtiyacınız varsa bu seçeneği etkinleştirmeniz önerilir.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Eğer bu seçenek etkinleştirilirse, hangi kullanıcı grubunun kullanıcılarının bu yazıyı okuma yetkisi olduğunu belirleyebilirsiniz. Bu seçenek performansı olumsuz etkileyebilir. Sadece gerçekten ihtiyacınız varsa bu seçeneği etkinleştirmeniz önerilir.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Kullanıcı tabanlı yetkilendirme kullan'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Eğer bu seçenek etkinleştirilirse, Bu yazıyı okuma izni olan özel kullanıcıları tanımlayabilirsiniz. Bu seçenek performansı olumsuz -etkileyebilir. Sadece gerçekten ihtiyacınız varsa bu seçeneği etkinleştirmeniz önerilir.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Eğer bu seçenek etkinleştirilirse, Bu yazıyı okuma izni olan özel kullanıcıları tanımlayabilirsiniz. Bu seçenek performansı olumsuz etkileyebilir. Sadece gerçekten ihtiyacınız varsa bu seçeneği etkinleştirmeniz önerilir.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'İçeriği RSS Beslemesinden gizle'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Eğer bu seçenek etkinleştirilirse, içeriği RSS Beslemesinden gizlenecektir.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Özel Alanlar'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Şablonunuza eklenmek üzere ek özel alanlar belirleme imkanı.Bu alanlar nerede kullanmak istiyorsanız orada gösterilecek şekilde eklenebilir. Tam olarak istediğiniz türden bir özelleştirme için entries.tpl şablon dosyanızı düzenleyin ve Smarty etiketlerini HTML etiketleme yapısı içinde -{$entry.properties.ep_MyCustomField} gibi yerleştirin. Not: her alanda ön ek ep_ şeklinde olmalıdır.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Şablonunuza eklenmek üzere ek özel alanlar belirleme imkanı.Bu alanlar nerede kullanmak istiyorsanız orada gösterilecek şekilde eklenebilir. Tam olarak istediğiniz türden bir özelleştirme için entries.tpl şablon dosyanızı düzenleyin ve Smarty etiketlerini HTML etiketleme yapısı içinde {$entry.properties.ep_MyCustomField} gibi yerleştirin. Not: her alanda ön ek ep_ şeklinde olmalıdır.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Buraya virgülle ayrılmış özel alanlarınızı listeleyebilirsiniz ve bunları her yazınız için kullanabilirsiniz. özel harf karakterleri ya da boşluk karakteri kullanmamaya özen gösterin - Örneğin:"Ozelalan1, Ozelalan2" şeklinde kullanın.' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Listelenen özel alanlar <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">eklenti yapılandırma</a> bölümünden değiştirilebilir.'); diff --git a/plugins/serendipity_event_entryproperties/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_entryproperties/UTF-8/lang_zh.inc.php index a011d915..4749bfab 100644 --- a/plugins/serendipity_event_entryproperties/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_entryproperties/UTF-8/lang_zh.inc.php @@ -29,5 +29,6 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', '你可以在你的博客模版中使用额外附加的自定义字段,从而将相关字段内容显示在页面上。你需要编辑entries.tpl这个模版文件,将Smarty标记( 例如{$entry.properties.ep_MyCustomField} )放在该模版文件中你想放置的合适位置,不过需要主意的是,要在每一个自定义字段前面添加前缀(prefix) ep_ 。'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', '此处你可以输入一些自定义字段的名称,用逗号分割开来。这些自定义字段可以在任何一篇文章中被使用。不要在自定义字段的名称中使用特殊字符或空格。自定义字段的名称可以是 Customfield1, Customfield2 等等。 ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', '可在“<a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">配置插件</a>”中修改自定义字段。'); - -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', '禁止在此文章中使用标记语言方面的插件。'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', '禁止在此文章中使用标记语言方面的插件。'); + diff --git a/plugins/serendipity_event_entryproperties/lang_bg.inc.php b/plugins/serendipity_event_entryproperties/lang_bg.inc.php index 0b12c0a0..ad1e1367 100644 --- a/plugins/serendipity_event_entryproperties/lang_bg.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_bg.inc.php @@ -1,44 +1,44 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ - - @define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', '������������ �������� �� ����������'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(��������, �� �������� ��������, sticky ��������)'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', '��������� �� ���� ������� ���� sticky'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', '���������� ����� �� �� ����� ��'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', '����'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', '��-��������'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', '������'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', '�������� �� ���������� ?'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', '��� � ���������, �������� ������ �� �������� �� ���� ���������� ��� ������� �����. ���������� �� ������� ������������������, �� �� ������ ����������� �� ������� �������.'); - @define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', '�������� �� ������ ��������'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', '�������� �� ���������� ����� �������� ...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', '�������� �� �������� �� %d �� %d'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', '�������� �� ������� #%d, <em>%s</em>...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', '��������� � �������.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', '���������� �������.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', '���������� � ����������.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (���� %d ��������)...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', '��������� �� �� �� ����� �� �������� �������� � � ���������'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', '���������� �� �������-���������� ����������'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', '������ � ����������, ��� ������ �� ���������� ��� ������������� ����� �� ���� ���������� �� ������ �� ����������. ���� ����� ��� ������ ������� ����� ������������������ �� �����. ��������� �, ���� ��� �������� �� � ����������.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', '���������� �� ����������-�������� ����������'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', '������ � ����������, ��� ������ �� ���������� ��� ���������� ����������� �� ���� ���������� �� ������ �� ����������. ���� ����� ��� ������ ������� ����� ������������������ �� �����. ��������� �, ���� ��� �������� �� � ����������.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', '���������� �� RSS ������'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', '��� ����� \'��\' ������������ �� ���� ������ ���� �� ���� �������� � RSS ������.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', '������������ �������� �� ����������'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(��������, �� �������� ��������, sticky ��������)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', '��������� �� ���� ������� ���� sticky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', '���������� ����� �� �� ����� ��'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', '����'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', '��-��������'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', '������'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', '�������� �� ���������� ?'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', '��� � ���������, �������� ������ �� �������� �� ���� ���������� ��� ������� �����. ���������� �� ������� ������������������, �� �� ������ ����������� �� ������� �������.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', '�������� �� ������ ��������'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', '�������� �� ���������� ����� �������� ...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', '�������� �� �������� �� %d �� %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', '�������� �� ������� #%d, <em>%s</em>...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', '��������� � �������.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', '���������� �������.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', '���������� � ����������.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (���� %d ��������)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', '��������� �� �� �� ����� �� �������� �������� � � ���������'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', '���������� �� �������-���������� ����������'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', '������ � ����������, ��� ������ �� ���������� ��� ������������� ����� �� ���� ���������� �� ������ �� ����������. ���� ����� ��� ������ ������� ����� ������������������ �� �����. ��������� �, ���� ��� �������� �� � ����������.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', '���������� �� ����������-�������� ����������'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', '������ � ����������, ��� ������ �� ���������� ��� ���������� ����������� �� ���� ���������� �� ������ �� ����������. ���� ����� ��� ������ ������� ����� ������������������ �� �����. ��������� �, ���� ��� �������� �� � ����������.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', '���������� �� RSS ������'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', '��� ����� \'��\' ������������ �� ���� ������ ���� �� ���� �������� � RSS ������.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', '������������ ������'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', '�������������� ������ ����� �� �� �������� � ������� �� ������ ���� �� �����, ������ ������ �� �� �� ��������. �� ���� ������������ ����� ���� entries.tpl � ��������� Smarty ������ ������� �� ���������� �������: {$entry.properties.ep_MyCustomField} �� �������� �����. �� ������ �� ��������� �������� \'ep_\' ����� ����� �� ��������. '); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', '��� ������ �� �������� ������ �� ����� �� ������, ��������� ��� �������, ����� �� ���������� �� ��������� �� HTML �� ����� ������. � ������� �� ��������� ���� �������� ����� � ����� (�� � ��������� �������). ��������: \'Customfield1\', \'Customfield2\'. ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', '�������� �� ���������� ������������ ������ ���� �� ���� ���������� � <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">��������������</a> �� ��������� serendipity_event_entryproperties.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', '������������ ������'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', '�������������� ������ ����� �� �� �������� � ������� �� ������ ���� �� �����, ������ ������ �� �� �� ��������. �� ���� ������������ ����� ���� entries.tpl � ��������� Smarty ������ ������� �� ���������� �������: {$entry.properties.ep_MyCustomField} �� �������� �����. �� ������ �� ��������� �������� \'ep_\' ����� ����� �� ��������. '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', '��� ������ �� �������� ������ �� ����� �� ������, ��������� ��� �������, ����� �� ���������� �� ��������� �� HTML �� ����� ������. � ������� �� ��������� ���� �������� ����� � ����� (�� � ��������� �������). ��������: \'Customfield1\', \'Customfield2\'. ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', '�������� �� ���������� ������������ ������ ���� �� ���� ���������� � <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">��������������</a> �� ��������� serendipity_event_entryproperties.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', '��������� �������� ������������ �� ���� ������:'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', '���������� �� ��������� ������� � ������ �����'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', '��� � ���������, �� ����� ��������� ������������ SQL ������ �� ������� ������, ������ ������ � ������� ������, �� �� ����� ���������� �� �������� ��������. ��� �� � �����, ��������� �� ���� ������� �� ������� ������������������.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', '��������� �������� ������������ �� ���� ������:'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', '���������� �� ��������� ������� � ������ �����'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', '��� � ���������, �� ����� ��������� ������������ SQL ������ �� ������� ������, ������ ������ � ������� ������, �� �� ����� ���������� �� �������� ��������. ��� �� � �����, ��������� �� ���� ������� �� ������� ������������������.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', '����� �� ����������� �� ������'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', '��� ������ �� �������� ��� �������� (������) � � ����� ��� �� ����� �������� �� ����� �� ������� �� �����������.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', '����� �� ����������� �� ������'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', '��� ������ �� �������� ��� �������� (������) � � ����� ��� �� ����� �������� �� ����� �� ������� �� �����������.'); \ No newline at end of file diff --git a/plugins/serendipity_event_entryproperties/lang_cn.inc.php b/plugins/serendipity_event_entryproperties/lang_cn.inc.php index a011d915..4749bfab 100644 --- a/plugins/serendipity_event_entryproperties/lang_cn.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_cn.inc.php @@ -29,5 +29,6 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', '你可以在你的博客模版中使用额外附加的自定义字段,从而将相关字段内容显示在页面上。你需要编辑entries.tpl这个模版文件,将Smarty标记( 例如{$entry.properties.ep_MyCustomField} )放在该模版文件中你想放置的合适位置,不过需要主意的是,要在每一个自定义字段前面添加前缀(prefix) ep_ 。'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', '此处你可以输入一些自定义字段的名称,用逗号分割开来。这些自定义字段可以在任何一篇文章中被使用。不要在自定义字段的名称中使用特殊字符或空格。自定义字段的名称可以是 Customfield1, Customfield2 等等。 ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', '可在“<a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">配置插件</a>”中修改自定义字段。'); - -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', '禁止在此文章中使用标记语言方面的插件。'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', '禁止在此文章中使用标记语言方面的插件。'); + diff --git a/plugins/serendipity_event_entryproperties/lang_cs.inc.php b/plugins/serendipity_event_entryproperties/lang_cs.inc.php index ff46328e..6a814d8e 100644 --- a/plugins/serendipity_event_entryproperties/lang_cs.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # lang_cs.inc.php 1381.1 2009-02-14 15:43:34 VladaAjgl $ +<?php /** * @version 1381.1 @@ -8,39 +8,40 @@ * @revisionDate 2009/02/14 */ -@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Roz���en� vlastnosti p��sp�vk�'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachov�n�, neve�ejn� p��sp�vky, st�l� (p�ilepen�) p��sp�vky'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Ozna� tento p��sp�vek jako st�l� (p�ilepen�)'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'P��sp�vky mohou b�t p�e�teny'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'K�mkoliv'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachov�n� p��sp�vk�?'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, p�i ka�d�m ulo�en� p��sp�vku bude vytvo�ena cachovan� verze. To znamen�, �e p�i ka�d�m na�ten� str�nky nebude p��sp�vek sestavov�n od za��tku znovu, ale vezme se p�edgenerovan� (cachovan�) verze. Cachov�n� zv��� v�kon blogu, ale m��e omezit funkci ostatn�ch plugin�.'); -@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat p��sp�vky'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Na��t�n� dal�� d�vky p��sp�vk�...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Na��t�n� p��sp�vk� %d a� %d'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytv��en� cachovan� verze pro p��sp�vek #%d, <em>%s</em>...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'P��sp�vek cachov�n.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachov�n� p��sp�vk� hotovo.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachov�n� p��sp�vku ZRU�ENO.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkov�ho po�tu %d p��sp�vk�)...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skr�t v p�ehledu �l�nk� / na hlavn� str�nce'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Pou��t omezen� pro skupiny'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, m��ete zadat, kter� skupiny u�ivatel� sm� ��st �l�nek. Tato volba m� velk� vliv na rychlost vytv��en� str�nky s p�ehledem �l�nk�. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu�ijete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Pou��t omezen� pro u�ivatele'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, m��ete zadat, kte�� u�ivatel� sm� ��st �l�nek. Tato volba m� velk� vliv na rychlost vytv��en� str�nky s p�ehledem �l�nk�. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu�ijete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skr�t obsah v RSS kan�lu'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah p��sp�vku se nebude zobrazovat v RSS kan�lu/kan�lech.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Roz���en� vlastnosti p��sp�vk�'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachov�n�, neve�ejn� p��sp�vky, st�l� (p�ilepen�) p��sp�vky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Ozna� tento p��sp�vek jako st�l� (p�ilepen�)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'P��sp�vky mohou b�t p�e�teny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'K�mkoliv'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachov�n� p��sp�vk�?'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, p�i ka�d�m ulo�en� p��sp�vku bude vytvo�ena cachovan� verze. To znamen�, �e p�i ka�d�m na�ten� str�nky nebude p��sp�vek sestavov�n od za��tku znovu, ale vezme se p�edgenerovan� (cachovan�) verze. Cachov�n� zv��� v�kon blogu, ale m��e omezit funkci ostatn�ch plugin�.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat p��sp�vky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Na��t�n� dal�� d�vky p��sp�vk�...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Na��t�n� p��sp�vk� %d a� %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytv��en� cachovan� verze pro p��sp�vek #%d, <em>%s</em>...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'P��sp�vek cachov�n.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachov�n� p��sp�vk� hotovo.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachov�n� p��sp�vku ZRU�ENO.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkov�ho po�tu %d p��sp�vk�)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skr�t v p�ehledu �l�nk� / na hlavn� str�nce'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Pou��t omezen� pro skupiny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, m��ete zadat, kter� skupiny u�ivatel� sm� ��st �l�nek. Tato volba m� velk� vliv na rychlost vytv��en� str�nky s p�ehledem �l�nk�. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu�ijete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Pou��t omezen� pro u�ivatele'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, m��ete zadat, kte�� u�ivatel� sm� ��st �l�nek. Tato volba m� velk� vliv na rychlost vytv��en� str�nky s p�ehledem �l�nk�. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu�ijete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skr�t obsah v RSS kan�lu'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah p��sp�vku se nebude zobrazovat v RSS kan�lu/kan�lech.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastn� pole'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'P��davn� vlastn� pole mohou b�t pou�ita ve Va�� vlastn� �ablon� v m�stech, kde chcete zobrazovat data z t�chto pol�. Pro tuto funkci mus�te editovat �ablonu "entries.tpl" a v n� um�stit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde m��ete zadat seznam pol�, kter� chcete pou��t u sv�ch p��sp�vk�, odd�len�ch ��rkou. Pro jm�na pol� nepou��vejte speci�ln� znaky ani diakritiku. P��klad: "MojePole1, CiziPole2, UplneCiziPole3". '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupn�ch voliteln�ch pol� m��e b�t zm�n�n v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">konfiguraci pluginu</a>.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastn� pole'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'P��davn� vlastn� pole mohou b�t pou�ita ve Va�� vlastn� �ablon� v m�stech, kde chcete zobrazovat data z t�chto pol�. Pro tuto funkci mus�te editovat �ablonu "entries.tpl" a v n� um�stit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde m��ete zadat seznam pol�, kter� chcete pou��t u sv�ch p��sp�vk�, odd�len�ch ��rkou. Pro jm�na pol� nepou��vejte speci�ln� znaky ani diakritiku. P��klad: "MojePole1, CiziPole2, UplneCiziPole3". '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupn�ch voliteln�ch pol� m��e b�t zm�n�n v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">konfiguraci pluginu</a>.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zaka� pou�it� vybran�ch zna�kovac�ch plugin� pro tento p��sp�vek:'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Roz���en� datab�zov� hled�n�'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je pou�ito, budou vytvo�eny p��davn� SQL dotazy, kter� umo�n� pou��t i p�ilepen�, skryt� a z hlavn� str�nky odstran�n� p��sp�vky. Pokud tyto nejsou pou��van�, doporu�uje se volbu zak�zat, co� m��e zv��it v�kon.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zaka� pou�it� vybran�ch zna�kovac�ch plugin� pro tento p��sp�vek:'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Roz���en� datab�zov� hled�n�'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je pou�ito, budou vytvo�eny p��davn� SQL dotazy, kter� umo�n� pou��t i p�ilepen�, skryt� a z hlavn� str�nky odstran�n� p��sp�vky. Pokud tyto nejsou pou��van�, doporu�uje se volbu zak�zat, co� m��e zv��it v�kon.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Edita�n� obrazovka'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, kter� prvky a v jak�m po�ad� m� tento modul zobrazovat v procesu �prav p��sp�vku.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Edita�n� obrazovka'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, kter� prvky a v jak�m po�ad� m� tento modul zobrazovat v procesu �prav p��sp�vku.'); diff --git a/plugins/serendipity_event_entryproperties/lang_cz.inc.php b/plugins/serendipity_event_entryproperties/lang_cz.inc.php index 3060b971..30b148fa 100644 --- a/plugins/serendipity_event_entryproperties/lang_cz.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # lang_cz.inc.php 1381.1 2009-02-14 15:43:34 VladaAjgl $ +<?php /** * @version 1381.1 @@ -8,39 +8,40 @@ * @revisionDate 2009/02/14 */ -@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Roz���en� vlastnosti p��sp�vk�'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachov�n�, neve�ejn� p��sp�vky, st�l� (p�ilepen�) p��sp�vky'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Ozna� tento p��sp�vek jako st�l� (p�ilepen�)'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'P��sp�vky mohou b�t p�e�teny'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'K�mkoliv'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachov�n� p��sp�vk�?'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, p�i ka�d�m ulo�en� p��sp�vku bude vytvo�ena cachovan� verze. To znamen�, �e p�i ka�d�m na�ten� str�nky nebude p��sp�vek sestavov�n od za��tku znovu, ale vezme se p�edgenerovan� (cachovan�) verze. Cachov�n� zv��� v�kon blogu, ale m��e omezit funkci ostatn�ch plugin�.'); -@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat p��sp�vky'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Na��t�n� dal�� d�vky p��sp�vk�...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Na��t�n� p��sp�vk� %d a� %d'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytv��en� cachovan� verze pro p��sp�vek #%d, <em>%s</em>...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'P��sp�vek cachov�n.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachov�n� p��sp�vk� hotovo.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachov�n� p��sp�vku ZRU�ENO.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkov�ho po�tu %d p��sp�vk�)...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skr�t v p�ehledu �l�nk� / na hlavn� str�nce'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Pou��t omezen� pro skupiny'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, m��ete zadat, kter� skupiny u�ivatel� sm� ��st �l�nek. Tato volba m� velk� vliv na rychlost vytv��en� str�nky s p�ehledem �l�nk�. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu�ijete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Pou��t omezen� pro u�ivatele'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, m��ete zadat, kte�� u�ivatel� sm� ��st �l�nek. Tato volba m� velk� vliv na rychlost vytv��en� str�nky s p�ehledem �l�nk�. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu�ijete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skr�t obsah v RSS kan�lu'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah p��sp�vku se nebude zobrazovat v RSS kan�lu/kan�lech.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Roz���en� vlastnosti p��sp�vk�'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachov�n�, neve�ejn� p��sp�vky, st�l� (p�ilepen�) p��sp�vky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Ozna� tento p��sp�vek jako st�l� (p�ilepen�)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', 'P��sp�vky mohou b�t p�e�teny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautory'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'K�mkoliv'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Povolit cachov�n� p��sp�vk�?'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Pokud je povoleno, p�i ka�d�m ulo�en� p��sp�vku bude vytvo�ena cachovan� verze. To znamen�, �e p�i ka�d�m na�ten� str�nky nebude p��sp�vek sestavov�n od za��tku znovu, ale vezme se p�edgenerovan� (cachovan�) verze. Cachov�n� zv��� v�kon blogu, ale m��e omezit funkci ostatn�ch plugin�.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachovat p��sp�vky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Na��t�n� dal�� d�vky p��sp�vk�...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Na��t�n� p��sp�vk� %d a� %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytv��en� cachovan� verze pro p��sp�vek #%d, <em>%s</em>...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'P��sp�vek cachov�n.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachov�n� p��sp�vk� hotovo.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachov�n� p��sp�vku ZRU�ENO.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkov�ho po�tu %d p��sp�vk�)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skr�t v p�ehledu �l�nk� / na hlavn� str�nce'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Pou��t omezen� pro skupiny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Pokud je povoleno, m��ete zadat, kter� skupiny u�ivatel� sm� ��st �l�nek. Tato volba m� velk� vliv na rychlost vytv��en� str�nky s p�ehledem �l�nk�. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu�ijete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Pou��t omezen� pro u�ivatele'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Pokud je povoleno, m��ete zadat, kte�� u�ivatel� sm� ��st �l�nek. Tato volba m� velk� vliv na rychlost vytv��en� str�nky s p�ehledem �l�nk�. Povolte tuto vlastnost pouze tehdy, pokud ji opravdu vyu�ijete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skr�t obsah v RSS kan�lu'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Pokud je povoleno, obsah p��sp�vku se nebude zobrazovat v RSS kan�lu/kan�lech.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastn� pole'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'P��davn� vlastn� pole mohou b�t pou�ita ve Va�� vlastn� �ablon� v m�stech, kde chcete zobrazovat data z t�chto pol�. Pro tuto funkci mus�te editovat �ablonu "entries.tpl" a v n� um�stit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde m��ete zadat seznam pol�, kter� chcete pou��t u sv�ch p��sp�vk�, odd�len�ch ��rkou. Pro jm�na pol� nepou��vejte speci�ln� znaky ani diakritiku. P��klad: "MojePole1, CiziPole2, UplneCiziPole3". '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupn�ch voliteln�ch pol� m��e b�t zm�n�n v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">konfiguraci pluginu</a>.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastn� pole'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'P��davn� vlastn� pole mohou b�t pou�ita ve Va�� vlastn� �ablon� v m�stech, kde chcete zobrazovat data z t�chto pol�. Pro tuto funkci mus�te editovat �ablonu "entries.tpl" a v n� um�stit Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred kazdym nazvem pole musi byt predpona ep_ . '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Zde m��ete zadat seznam pol�, kter� chcete pou��t u sv�ch p��sp�vk�, odd�len�ch ��rkou. Pro jm�na pol� nepou��vejte speci�ln� znaky ani diakritiku. P��klad: "MojePole1, CiziPole2, UplneCiziPole3". '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Seznam dostupn�ch voliteln�ch pol� m��e b�t zm�n�n v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">konfiguraci pluginu</a>.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zaka� pou�it� vybran�ch zna�kovac�ch plugin� pro tento p��sp�vek:'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Roz���en� datab�zov� hled�n�'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je pou�ito, budou vytvo�eny p��davn� SQL dotazy, kter� umo�n� pou��t i p�ilepen�, skryt� a z hlavn� str�nky odstran�n� p��sp�vky. Pokud tyto nejsou pou��van�, doporu�uje se volbu zak�zat, co� m��e zv��it v�kon.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zaka� pou�it� vybran�ch zna�kovac�ch plugin� pro tento p��sp�vek:'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Roz���en� datab�zov� hled�n�'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Pokud je pou�ito, budou vytvo�eny p��davn� SQL dotazy, kter� umo�n� pou��t i p�ilepen�, skryt� a z hlavn� str�nky odstran�n� p��sp�vky. Pokud tyto nejsou pou��van�, doporu�uje se volbu zak�zat, co� m��e zv��it v�kon.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Edita�n� obrazovka'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, kter� prvky a v jak�m po�ad� m� tento modul zobrazovat v procesu �prav p��sp�vku.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Edita�n� obrazovka'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Zde vyberte, kter� prvky a v jak�m po�ad� m� tento modul zobrazovat v procesu �prav p��sp�vku.'); diff --git a/plugins/serendipity_event_entryproperties/lang_de.inc.php b/plugins/serendipity_event_entryproperties/lang_de.inc.php index 15f63515..d10e8f00 100644 --- a/plugins/serendipity_event_entryproperties/lang_de.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_de.inc.php @@ -1,4 +1,4 @@ -<?php # lang_de.inc.php 1.0 2009-06-03 09:50:12 VladaAjgl $ +<?php /** * @version 1.0 @@ -42,4 +42,6 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Verwende erweiterte Datenbankabfragen'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Wenn aktiviert, werden zus�tzliche Datenbankabfragen ausgef�hrt. Damit wird es m�glich, dauerhafte , nicht in Artikel�bersicht aufgef�hrte und im RSS-Feed versteckte Artikel zu verwenden . Wenn diese Funktionen nicht ben�tigt werden, kann das Abschalten der Abfragen die Geschwindigkeit verbessern.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Reihenfolge der Optionen'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Hier kann ausgew�hlt werden, welche Optionen in welcher Reihenfolge im Editiermodus des Artikels angezeigt werden.'); \ No newline at end of file +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Hier kann ausgew�hlt werden, welche Optionen in welcher Reihenfolge im Editiermodus des Artikels angezeigt werden.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_MULTI_AUTHORS', 'Mehrere Autoren'); \ No newline at end of file diff --git a/plugins/serendipity_event_entryproperties/lang_en.inc.php b/plugins/serendipity_event_entryproperties/lang_en.inc.php index c9a155dc..e94053eb 100644 --- a/plugins/serendipity_event_entryproperties/lang_en.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_en.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Translator Name <yourmail@example.com> * EN-Revision: Revision of lang_en.inc.php */ @@ -42,4 +42,6 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'If enabled, additional SQL queries will be issued to be able to use sticky entries, hidden entries and removed entries from the frontpage. If those are not needed, disabling this feature can improve performance.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Entry editing screen'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Here you can choose, which elements and in which order the plugin should show its input fields in the entry editing process.'); \ No newline at end of file +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Here you can choose, which elements and in which order the plugin should show its input fields in the entry editing process.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_MULTI_AUTHORS', 'Multiple authors'); \ No newline at end of file diff --git a/plugins/serendipity_event_entryproperties/lang_es.inc.php b/plugins/serendipity_event_entryproperties/lang_es.inc.php index 7a6027ae..4eb147bd 100644 --- a/plugins/serendipity_event_entryproperties/lang_es.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_es.inc.php @@ -1,11 +1,11 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ - //Sticky post +//Sticky post @define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Propiedades extendidas de las entradas'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(cach�, art�culos privados, sticky posts)'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Marcar esta entrada como Sticky Post'); @@ -37,4 +37,3 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Aqu� puedes ingresar una lista de los nombres de los campos separados por coma que puedes utilizar por cada entrada - no utilices caracteres especiales o espacios en los nombres de campo. Por ejemplo: "Campopersonal1, Campopersonal2". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'La lista de campos personalizados disponibles puede ser cambiada en la <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">configuraci�n de la extensi�n</a>.'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_entryproperties/lang_fr.inc.php b/plugins/serendipity_event_entryproperties/lang_fr.inc.php index 982b2de9..4726357b 100644 --- a/plugins/serendipity_event_entryproperties/lang_fr.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -45,5 +45,3 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Ici vous pouvez d�finir une liste s�pr�e par des virgules de noms de champs (variables) � remplir pour chaque billet. Attention, le nom de ces variables ne doit pas contenir de caract�res sp�ciaux ni d\'espaces. Exemples: "Variable1, Variable2, ChouetteVariable". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'La liste des variables sur mesure peut �tre modifi�e dans la <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">configuration du plugin</a>.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_entryproperties/lang_ja.inc.php b/plugins/serendipity_event_entryproperties/lang_ja.inc.php index 617434bb..47a0bd62 100644 --- a/plugins/serendipity_event_entryproperties/lang_ja.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 966 */ @@ -38,4 +38,4 @@ 利用できるカスタム項目の一覧は、<a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">プラグイン設定</a> で変更することができます。'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'このエントリのマークアッププラグインを無効にする:'); -?> + diff --git a/plugins/serendipity_event_entryproperties/lang_ko.inc.php b/plugins/serendipity_event_entryproperties/lang_ko.inc.php index ffb3b559..055cf352 100644 --- a/plugins/serendipity_event_entryproperties/lang_ko.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_ko.inc.php @@ -1,27 +1,26 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', '글에 대한 확장 속성'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(캐시, 비공개 글, 꼭대기 글)'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', '이 글을 꼭대기 글로 사용'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', '이 글의 읽기 허용 범위'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', '작성자 자신만'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', '다른 작성자까지'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', '모두에게 공개'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', '글을 캐시함'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', '사용할 경우 글을 저장할 때마다 캐시된 버전을 생성합니다. 캐시를 사용하면 성능을 향상시킬 수 있으나 다른 플러그인의 작동 유연성을 떨어뜨릴 수 있습니다.'); - @define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', '글에 대한 캐시 생성'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', '다음 글 묶음을 불러오는 중...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', '%d번과 %d번 사이의 글을 불러오는 중'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', '%d번 글 <em>%s</em>에 대한 캐시를 생성중...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', '글이 캐시되었습니다.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', '글에 대한 캐시 생성을 마쳤습니다.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', '캐시 생성이 중단되었습니다.'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (총 %d개의 글)...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', 'nl2br 플러그인 사용 안 함'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', '첫 페이지/정리 페이지에서 글을 숨김'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', '그룹 기반 제한 사용'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', '사용할 경우 글을 읽을 수 있는 사용자의 그룹을 정의할 수 있습니다. 정리 페이지 표시 성능에 상당한 영향을 주기 때문에 이 옵션은 꼭 필요할 때만 사용하시기 바랍니다.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', '글에 대한 확장 속성'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(캐시, 비공개 글, 꼭대기 글)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', '이 글을 꼭대기 글로 사용'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', '이 글의 읽기 허용 범위'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', '작성자 자신만'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', '다른 작성자까지'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', '모두에게 공개'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', '글을 캐시함'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', '사용할 경우 글을 저장할 때마다 캐시된 버전을 생성합니다. 캐시를 사용하면 성능을 향상시킬 수 있으나 다른 플러그인의 작동 유연성을 떨어뜨릴 수 있습니다.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', '글에 대한 캐시 생성'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', '다음 글 묶음을 불러오는 중...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', '%d번과 %d번 사이의 글을 불러오는 중'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', '%d번 글 <em>%s</em>에 대한 캐시를 생성중...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', '글이 캐시되었습니다.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', '글에 대한 캐시 생성을 마쳤습니다.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', '캐시 생성이 중단되었습니다.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (총 %d개의 글)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', 'nl2br 플러그인 사용 안 함'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', '첫 페이지/정리 페이지에서 글을 숨김'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', '그룹 기반 제한 사용'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', '사용할 경우 글을 읽을 수 있는 사용자의 그룹을 정의할 수 있습니다. 정리 페이지 표시 성능에 상당한 영향을 주기 때문에 이 옵션은 꼭 필요할 때만 사용하시기 바랍니다.'); -?> diff --git a/plugins/serendipity_event_entryproperties/lang_pl.inc.php b/plugins/serendipity_event_entryproperties/lang_pl.inc.php index 4e3e1fc3..e35aa79b 100644 --- a/plugins/serendipity_event_entryproperties/lang_pl.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -37,4 +37,4 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Lista dost�pnych p�l uzytkownika mo�e by� zmieniona w module <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">konfiguracji wtyczki</a>.'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Wy��cz wtyczki Znacznik�w dla tego wpisu:'); -?> + diff --git a/plugins/serendipity_event_entryproperties/lang_pt_PT.inc.php b/plugins/serendipity_event_entryproperties/lang_pt_PT.inc.php index f32888cb..aaaed880 100644 --- a/plugins/serendipity_event_entryproperties/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id:$ +<?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details # Translation (c) by Joao P Matos <jmatos@math.ist.utl.pt> @@ -35,4 +35,4 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Campos ad hoc adicionais podem ser usados no seu modelo em locais em que quiser que apare�am. Para isso, edite o seu ficheiro entries.tpl e coloque etiquetas Smarty da forma {$entry.properties.ep_MyCustomField} no HTML onde desejar. Note o prefixo ep_ para cada campo. '); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Aqui pode introduzir uma lista de nomes de campos separados por v�rgulas que podem ser usados para cada entrada - n�o use caracteres especiais ou espa�os nesses nomes de campos. Exemplo: "Customfield1, Customfield2". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'A lista de campos ad hoc dispon�veis pode ser mudada na <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">configura��o de plugins</a>.'); -?> + diff --git a/plugins/serendipity_event_entryproperties/lang_sk.inc.php b/plugins/serendipity_event_entryproperties/lang_sk.inc.php index 12af14a9..a859510d 100644 --- a/plugins/serendipity_event_entryproperties/lang_sk.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_sk.inc.php @@ -6,40 +6,41 @@ * @revisionDate 2010-08-17 */ -@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Roz��ren� vlastnosti �l�nkov'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachovanie, neverejn� �l�nky, st�le (prilepen�) �l�nky'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Ozna�i� tento �l�nok ako st�ly (prilepen�)'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', '�l�nky m��u by� pre��tan�'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautormi'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'K�mko�vek'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Zapn�� cachovanie �l�nkov?'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Ak je zapnut�, pri ka�dom ulo�en� �l�nku bude vytvoren� cachovan� verzia. To znamen�, �e pri ka�dom na��tan� str�nky nebude pr�spevok generovan� odznova, ale pou�ije sa predgenerovan� (cachovan�) verzia. Cachovanie zv��i v�kon weblogu, ale m��e obmedzi� funk�nos� ostatn�ch doplnkov.'); -@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachova� pr�spevky'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Na��tanie �al�ej d�vky pr�spevkov...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Na��tanie pr�spevkov %d a� %d'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytv�ranie cachovanej verzie pre pr�spevok #%d, <em>%s</em>...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Pr�spevok cachovan�.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachovanie pr�spevkov dokon�en�.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachovanie pr�spevkov ZRU�EN�.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkov�ho po�tu %d pr�spevkov)...'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skry� v preh�ade �l�nkov / na hlavnej str�nke'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Pou��� obmedzenie pre skupiny'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Ak je zapnut�, tak m��ete zada�, ktor� skupiny pou��vate�ov m��u ��ta� �l�nok. Toto nastavenie m� ve�k� vplyv an r�chlos� vytv�rania str�nky s preh�adom �l�nkov. Zapnite toto nastavenie, iba ak ho naozaj potrebujete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Pou��� obmedzenie pre pou��vate�ov'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Ak je zapnut�, tak m��ete zada�, ktor� pou��vatelia m��u ��ta� �l�nok. Toto nastavenie m� ve�k� vplyv an r�chlos� v +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', 'Roz��ren� vlastnosti �l�nkov'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', 'cachovanie, neverejn� �l�nky, st�le (prilepen�) �l�nky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', 'Ozna�i� tento �l�nok ako st�ly (prilepen�)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', '�l�nky m��u by� pre��tan�'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', 'Mnou'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBERS', 'Spoluautormi'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', 'K�mko�vek'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', 'Zapn�� cachovanie �l�nkov?'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', 'Ak je zapnut�, pri ka�dom ulo�en� �l�nku bude vytvoren� cachovan� verzia. To znamen�, �e pri ka�dom na��tan� str�nky nebude pr�spevok generovan� odznova, ale pou�ije sa predgenerovan� (cachovan�) verzia. Cachovanie zv��i v�kon weblogu, ale m��e obmedzi� funk�nos� ostatn�ch doplnkov.'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', 'Cachova� pr�spevky'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', 'Na��tanie �al�ej d�vky pr�spevkov...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', 'Na��tanie pr�spevkov %d a� %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', 'Vytv�ranie cachovanej verzie pre pr�spevok #%d, <em>%s</em>...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', 'Pr�spevok cachovan�.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', 'Cachovanie pr�spevkov dokon�en�.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', 'Cachovanie pr�spevkov ZRU�EN�.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (z celkov�ho po�tu %d pr�spevkov)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', 'Skry� v preh�ade �l�nkov / na hlavnej str�nke'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', 'Pou��� obmedzenie pre skupiny'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', 'Ak je zapnut�, tak m��ete zada�, ktor� skupiny pou��vate�ov m��u ��ta� �l�nok. Toto nastavenie m� ve�k� vplyv an r�chlos� vytv�rania str�nky s preh�adom �l�nkov. Zapnite toto nastavenie, iba ak ho naozaj potrebujete.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', 'Pou��� obmedzenie pre pou��vate�ov'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', 'Ak je zapnut�, tak m��ete zada�, ktor� pou��vatelia m��u ��ta� �l�nok. Toto nastavenie m� ve�k� vplyv an r�chlos� v ytv�rania str�nky s preh�adom �l�nkov. Zapnite toto nastavenie, iba ak ho naozaj potrebujete.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skry� obsah v RSS kan�li'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Ak je zapnut� ,tak sa nebude zobrazova� obsah �l�nku v RSS kan�li/kan�loch.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'Skry� obsah v RSS kan�li'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', 'Ak je zapnut� ,tak sa nebude zobrazova� obsah �l�nku v RSS kan�li/kan�loch.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastn� pole'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Pridan� vlastn� polia m��u by� pou�it� vo Va�ej vlastnej �abl�ne na miestach, kde chcete zobrazova� �daje z t�chto pol�. Pre t�to funkcio mus�te upravi� �abl�nu "entries.tpl" a v nej umiestni� Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred n�zov ka�d�ho po�a mus� by� pridan� predpona ep_ . '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Tu m��ete zada� zoznam pol�, ktor� chcete pou�i� vo svojich �l�nkoch. Polia odde�ova� �iarkou. Men� pol� nem��u obsahova� �peci�lne znaky ani diakritiku. Pr�klad: "MojePole1, CiziPole2, UplneCiziPole3". '); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Zoznam dostupn�ch volite�n�ch pol� m��e by� zmenen� v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">nastaveniach doplnku</a>.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', 'Vlastn� pole'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', 'Pridan� vlastn� polia m��u by� pou�it� vo Va�ej vlastnej �abl�ne na miestach, kde chcete zobrazova� �daje z t�chto pol�. Pre t�to funkcio mus�te upravi� �abl�nu "entries.tpl" a v nej umiestni� Smarty tag {$entry.properties.ep_NazevMehoPolicka}. Pred n�zov ka�d�ho po�a mus� by� pridan� predpona ep_ . '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', 'Tu m��ete zada� zoznam pol�, ktor� chcete pou�i� vo svojich �l�nkoch. Polia odde�ova� �iarkou. Men� pol� nem��u obsahova� �peci�lne znaky ani diakritiku. Pr�klad: "MojePole1, CiziPole2, UplneCiziPole3". '); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', 'Zoznam dostupn�ch volite�n�ch pol� m��e by� zmenen� v <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">nastaveniach doplnku</a>.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zak�za� pou�itie transofrm�ci� textu (markup) pre tento �l�nok:'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Roz��ren� datab�zov� h�adanie'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Ak je zapnut�, bud� vytvoren� pr�davn� SQL dotazy, ktor� umo�nia pou�i� aj prilepen�, skryt� a z hlavnej str�nky odstr�nan� �l�nky. Ak toto nastavenie nepotrebujete, odpor��ame z d�vodov v�konu ponecha� vypnut�.'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', 'Zak�za� pou�itie transofrm�ci� textu (markup) pre tento �l�nok:'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS', 'Roz��ren� datab�zov� h�adanie'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_EXTJOINS_DESC', 'Ak je zapnut�, bud� vytvoren� pr�davn� SQL dotazy, ktor� umo�nia pou�i� aj prilepen�, skryt� a z hlavnej str�nky odstr�nan� �l�nky. Ak toto nastavenie nepotrebujete, odpor��ame z d�vodov v�konu ponecha� vypnut�.'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Edita�n� obrazovka'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Tu vyberte, ktor� prvky a v akom porad� m� tento doplnok zobrazova� v procese �prav �l�nku.'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE', 'Edita�n� obrazovka'); -@define('PLUGIN_EVENT_ENTRYPROPERTIES_SEQUENCE_DESC', 'Tu vyberte, ktor� prvky a v akom porad� m� tento doplnok zobrazova� v procese �prav �l�nku.'); diff --git a/plugins/serendipity_event_entryproperties/lang_tn.inc.php b/plugins/serendipity_event_entryproperties/lang_tn.inc.php index a7d60fb4..cdb709e6 100644 --- a/plugins/serendipity_event_entryproperties/lang_tn.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_tn.inc.php @@ -2,7 +2,7 @@ ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,35 +12,34 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', '文章的進階屬性'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(快取資料, 不開放文章, 置頂文章)'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', '標示為置頂文章'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', '誰可以閱讀文章'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', '自己'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBER', '副作者'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', '訪客'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', '允許快取文章?'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', '如果開啟,每次儲存文章時都會建立快取資料。快取資料可以增加速度,但可能有些外掛無法相容。'); - @define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', '建立快取資料'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', '擷取其他文章...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', '擷取文章 %d 到 %d'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', '建立此文章的快取資料 #%d, <em>%s</em>...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', '取得快取資料'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', '快取完成。'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', '快取資料取消。'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (總共 %d 篇文章)...'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', '關閉 nl2br'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', '隱藏於文章頁面 / 主頁面'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', '使用群組限制'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', '如果開啟,您可以選擇哪個群組的成員可以流覽文章。這個功能會影響您的網誌速度,除非必要最好不要使用。'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', '使用會員限制'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', '如果開啟,您可以選擇哪個會員可以瀏覽文章。這個功能會影響您的網誌速度,除非必要最好不要使用。'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'RSS 內隱藏內容'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', '如果開啟,文章的內容不會顯示於 RSS 內。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_TITLE', '文章的進階屬性'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DESC', '(快取資料, 不開放文章, 置頂文章)'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS', '標示為置頂文章'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS', '誰可以閱讀文章'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PRIVATE', '自己'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_MEMBER', '副作者'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS_PUBLIC', '訪客'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE', '允許快取文章?'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DESC', '如果開啟,每次儲存文章時都會建立快取資料。快取資料可以增加速度,但可能有些外掛無法相容。'); +@define('PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE', '建立快取資料'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT', '擷取其他文章...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNO', '擷取文章 %d 到 %d'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING', '建立此文章的快取資料 #%d, <em>%s</em>...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHED', '取得快取資料'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE', '快取完成。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_ABORTED', '快取資料取消。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL', ' (總共 %d 篇文章)...'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NL2BR', '關閉 nl2br'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE', '隱藏於文章頁面 / 主頁面'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS', '使用群組限制'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_GROUPS_DESC', '如果開啟,您可以選擇哪個群組的成員可以流覽文章。這個功能會影響您的網誌速度,除非必要最好不要使用。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS', '使用會員限制'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_USERS_DESC', '如果開啟,您可以選擇哪個會員可以瀏覽文章。這個功能會影響您的網誌速度,除非必要最好不要使用。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS', 'RSS 內隱藏內容'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS_DESC', '如果開啟,文章的內容不會顯示於 RSS 內。'); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', '自訂欄位'); - define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', '您可以在模板裡面顯示額外的欄位。您必須編輯 entries.tpl 的模板檔案然後將 Smarty 標籤 {$entry.properties.ep_MyCustomField} 放入您要它顯示的 HTML 檔案裡面。 注意每個欄位的前置字元 ep_。'); - define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', '這裡可以輸入每個以逗點分開的欄位名稱 - 不要用特殊字元或空格。範例:"Customfield1, Customfield2". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); - @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', '每個自訂欄位可以在這裡改變 <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">外掛設定</a>。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS', '自訂欄位'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', '您可以在模板裡面顯示額外的欄位。您必須編輯 entries.tpl 的模板檔案然後將 Smarty 標籤 {$entry.properties.ep_MyCustomField} 放入您要它顯示的 HTML 檔案裡面。 注意每個欄位的前置字元 ep_。'); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', '這裡可以輸入每個以逗點分開的欄位名稱 - 不要用特殊字元或空格。範例:"Customfield1, Customfield2". ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); +@define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', '每個自訂欄位可以在這裡改變 <a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">外掛設定</a>。'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_entryproperties/lang_tr.inc.php b/plugins/serendipity_event_entryproperties/lang_tr.inc.php index 43ceabf8..7ebc104c 100644 --- a/plugins/serendipity_event_entryproperties/lang_tr.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_tr.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Translator Name <ahmetusal@gmail.com> * EN-Revision: Revision of lang_en.inc.php */ diff --git a/plugins/serendipity_event_entryproperties/lang_zh.inc.php b/plugins/serendipity_event_entryproperties/lang_zh.inc.php index a011d915..4749bfab 100644 --- a/plugins/serendipity_event_entryproperties/lang_zh.inc.php +++ b/plugins/serendipity_event_entryproperties/lang_zh.inc.php @@ -29,5 +29,6 @@ @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1', '你可以在你的博客模版中使用额外附加的自定义字段,从而将相关字段内容显示在页面上。你需要编辑entries.tpl这个模版文件,将Smarty标记( 例如{$entry.properties.ep_MyCustomField} )放在该模版文件中你想放置的合适位置,不过需要主意的是,要在每一个自定义字段前面添加前缀(prefix) ep_ 。'); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC2', '此处你可以输入一些自定义字段的名称,用逗号分割开来。这些自定义字段可以在任何一篇文章中被使用。不要在自定义字段的名称中使用特殊字符或空格。自定义字段的名称可以是 Customfield1, Customfield2 等等。 ' . PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC1); @define('PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS_DESC3', '可在“<a href="%s" target="_blank" title="' . PLUGIN_EVENT_ENTRYPROPERTIES_TITLE . '">配置插件</a>”中修改自定义字段。'); - -@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', '禁止在此文章中使用标记语言方面的插件。'); + +@define('PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP', '禁止在此文章中使用标记语言方面的插件。'); + diff --git a/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php b/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php index 8a993fc9..ab43b5eb 100644 --- a/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php +++ b/plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php @@ -1,5 +1,9 @@ <?php +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + @serendipity_plugin_api::load_language(dirname(__FILE__)); class serendipity_event_entryproperties extends serendipity_event @@ -15,7 +19,7 @@ class serendipity_event_entryproperties extends serendipity_event $propbag->add('description', PLUGIN_EVENT_ENTRYPROPERTIES_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Garvin Hicking'); - $propbag->add('version', '1.39'); + $propbag->add('version', '1.41'); $propbag->add('requirements', array( 'serendipity' => '1.6', 'smarty' => '2.6.27', @@ -58,7 +62,6 @@ class serendipity_event_entryproperties extends serendipity_event )); $propbag->add('default', 'public'); $propbag->add('radio_per_row', '1'); - break; case 'customfields': @@ -110,30 +113,37 @@ class serendipity_event_entryproperties extends serendipity_event 'groups' => array('display' => PERM_READ . ': ' . GROUP), 'authors' => array('display' => PERM_READ . ': ' . AUTHOR), 'author' => array('display' => AUTHOR), + 'multi_authors'=> array('display' => PLUGIN_EVENT_ENTRYPROPERTIES_MULTI_AUTHORS), 'markup' => array('display' => PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP), 'customfields' => array('display' => PLUGIN_EVENT_ENTRYPROPERTIES_CUSTOMFIELDS), ); $propbag->add('values', $values); - $propbag->add('default', 'sticky,frontpage,hiderss,access,password,groups,authors,author,markup'); + $propbag->add('default', 'sticky,frontpage,hiderss,access,password,groups,authors,author,multi_authors,markup'); break; + default: + return false; } return true; } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } - function install() { + function install() + { serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function uninstall(&$propbag) { + function uninstall(&$propbag) + { serendipity_plugin_api::hook_event('backend_cache_purge', $this->title); } - function &getValidAuthors() { + function &getValidAuthors() + { global $serendipity; if (serendipity_checkPermission('adminUsersMaintainOthers')) { @@ -147,8 +157,8 @@ class serendipity_event_entryproperties extends serendipity_event return $users; } - - function updateCache(&$entry) { + function updateCache(&$entry) + { global $serendipity; serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}entryproperties WHERE entryid = " . (int)$entry['id'] . " AND property LIKE 'ep_cache_%'"); @@ -158,11 +168,12 @@ class serendipity_event_entryproperties extends serendipity_event serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}entryproperties (entryid, property, value) VALUES (" . (int)$entry['id'] . ", 'ep_cache_extended', '" . serendipity_db_escape_string($entry['extended']) . "')"); } - function getSupportedProperties() { + function getSupportedProperties() + { static $supported_properties = null; if ($supported_properties === null) { - $supported_properties = array('is_sticky', 'access', 'access_groups', 'access_users', 'cache_body', 'cache_extended', 'no_frontpage', 'hiderss', 'entrypassword'); + $supported_properties = array('is_sticky', 'access', 'access_groups', 'access_users', 'multi_authors', 'cache_body', 'cache_extended', 'no_frontpage', 'hiderss', 'entrypassword'); // Capture special characters for "," and ":" $special_from = array('\\,', '\\:'); @@ -185,7 +196,8 @@ class serendipity_event_entryproperties extends serendipity_event return $supported_properties; } - function returnQueryCondition($is_cache) { + function returnQueryCondition($is_cache) + { $and = ''; if (!$is_cache) { $and = " AND property NOT LIKE 'ep_cache_%' "; @@ -194,11 +206,12 @@ class serendipity_event_entryproperties extends serendipity_event return $and; } - /* + /** * This function converts specific property fields so that they are * available natively to other plugins/templates. */ - function applyProperties(&$properties) { + function applyProperties(&$properties) + { global $serendipity; if (is_array($properties['disable_markups'])) { @@ -208,7 +221,8 @@ class serendipity_event_entryproperties extends serendipity_event } } - function addProperties(&$properties, &$eventData) { + function addProperties(&$properties, &$eventData) + { global $serendipity; // Get existing data @@ -243,7 +257,7 @@ class serendipity_event_entryproperties extends serendipity_event serendipity_plugin_api::hook_event('backend_entryproperties', $supported_properties); foreach($supported_properties AS $prop_key) { - // Do not delete a property if it is not subbmitted to this function, because serendipity_updertEntry + // Do not delete a property if it is not submitted to this function, because serendipity_updertEntry // possibly only wants to update entry metadata and left out any specific properties, which need to be kept. // An empty string like "" will properly remove an entryproperty, and POST values will always set an array index to an empty string. // $serendipipty['POST']['propertyform'] will be set whenever the entryeditor was properly displayed and unticked checkboxes shall remain. @@ -269,7 +283,8 @@ class serendipity_event_entryproperties extends serendipity_event } } - function showPasswordform() { + function showPasswordform() + { global $serendipity; $url = serendipity_currentURL(true); @@ -284,38 +299,40 @@ class serendipity_event_entryproperties extends serendipity_event } - function showBackend($element, $eventData, $is_sticky, $no_frontpage, $hiderss, $access_values, $access, $password, $use_groups, $access_groups, $use_users, $access_users, $more = array()) { + function showBackend($element, $eventData, $is_sticky, $no_frontpage, $hiderss, $access_values, $access, $password, $use_groups, $access_groups, $use_users, $access_users, $more = array()) + { global $serendipity; switch($element) { - case 'sticky': + + case 'sticky': ?> <div class="entryproperties_sticky adv_opts_box form_check"> <input id="properties_is_sticky" name="serendipity[properties][is_sticky]" type="checkbox" value="true" <?php echo $is_sticky; ?>> <label for="properties_is_sticky"><?php echo PLUGIN_EVENT_ENTRYPROPERTIES_STICKYPOSTS; ?></label> </div> <?php - return true; + break; - case 'frontpage': + case 'frontpage': ?> <div class="entryproperties_frontpage adv_opts_box form_check"> <input id="properties_no_frontpage" name="serendipity[properties][no_frontpage]" type="checkbox" value="true" <?php echo $no_frontpage; ?>> <label for="properties_no_frontpage"><?php echo PLUGIN_EVENT_ENTRYPROPERTIES_NO_FRONTPAGE; ?></label> </div> <?php - return true; + break; - case 'hiderss': + case 'hiderss': ?> <div class="entryproperties_hiderss adv_opts_box form_check"> <input id="properties_hiderss" name="serendipity[properties][hiderss]" type="checkbox" value="true" <?php echo $hiderss; ?>> <label for="properties_hiderss"><?php echo PLUGIN_EVENT_ENTRYPROPERTIES_HIDERSS; ?></label> </div> <?php - return true; + break; - case 'access': + case 'access': ?> <fieldset class="entryproperties_access_list adv_opts_box"> <span class="wrap_legend"><legend><?php echo PLUGIN_EVENT_ENTRYPROPERTIES_ACCESS; ?>:</legend></span> @@ -334,62 +351,95 @@ class serendipity_event_entryproperties extends serendipity_event </div> </fieldset> <?php - return true; + break; - case 'password': + case 'password': ?> <div class="entryproperties_access_pw adv_opts_box adv_opts_box form_field"> <label for="properties_access_pw"><?php echo PASSWORD; ?>:</label> - <input type="password" name="ignore_password" value="" style="display:none"> + <input type="password" name="ignore_password" value="" style="visibility: hidden; width: 1px"> <input id="properties_access_pw" name="serendipity[properties][entrypassword]" type="password" autocomplete="off" value="<?php echo serendipity_specialchars($password); ?>"> </div> <?php - return true; + break; - case 'groups': - if ($use_groups) { - $my_groups = serendipity_getGroups($serendipity['authorid']); + case 'groups': + if ($use_groups) { + $my_groups = serendipity_getGroups($serendipity['authorid']); ?> <div class="entryproperties_access_groups adv_opts_box form_multiselect"> <label for="properties_access_groups"><?php echo PERM_READ . ': ' . GROUP; ?></label> <select id="properties_access_groups" name="serendipity[properties][access_groups][]" multiple="multiple" size="4" onchange="document.getElementById('properties_access_member').checked = true;"> <?php - foreach($my_groups AS $group) { - if ('USERLEVEL_' == substr($group['confvalue'], 0, 10)) { - $group['name'] = constant($group['confvalue']); - } + foreach($my_groups AS $group) { + if ('USERLEVEL_' == substr($group['confvalue'], 0, 10)) { + $group['name'] = constant($group['confvalue']); + } ?> <option value="<?php echo $group['id']; ?>" <?php echo (in_array($group['id'], $access_groups) ? 'selected="selected"' : ''); ?>><?php echo serendipity_specialchars($group['name']); ?></option> <?php + } + echo '</select>'; + echo '</div>'; } - echo '</select>'; - echo '</div>'; - } + break; - return true; - - case 'authors': - if ($use_users) { + case 'authors': + if ($use_users) { ?> <div class="entryproperties_access_users adv_opts_box form_multiselect"> <label for="properties_access_users"><?php echo PERM_READ . ': '. AUTHOR; ?></label> <select id="properties_access_users" name="serendipity[properties][access_users][]" multiple="multiple" size="4" onchange="document.getElementById('properties_access_member').checked = true;"> <?php - $users = serendipity_fetchUsers('', 'hidden'); - foreach($users AS $user) { + $users = serendipity_fetchUsers('', 'hidden'); + foreach($users AS $user) { ?> <option value="<?php echo $user['authorid']; ?>" <?php echo (in_array($user['authorid'], $access_users) ? 'selected="selected"' : ''); ?>><?php echo serendipity_specialchars($user['realname']); ?></option> <?php + } + echo '</select>'; + echo '</div>'; } - echo '</select>'; - echo '</div>'; - } + break; - return true; + case 'multi_authors': +?> + <div class="entryproperties_access_author adv_opts_box form_multiselect"> + <label for="properties_access_multi_authors"><?php echo PLUGIN_EVENT_ENTRYPROPERTIES_MULTI_AUTHORS; ?></label> + <select id="properties_access_multi_authors" name="serendipity[properties][multi_authors][]" multiple="multiple"> + <?php + if (isset($serendipity['POST']['properties']['multi_authors'])) { + $counter_multi_authors = 0; + foreach($serendipity['POST']['properties']['multi_authors'] as $user) { + $selected_users[$counter_multi_authors] = $user; + $counter_multi_authors++; + } + } elseif (!empty($eventData['properties']['ep_multi_authors'])) { + $counter_multi_authors = 0; + foreach($eventData['properties']['ep_multi_authors'] as $user) { + $selected_users[$counter_multi_authors] = $user['author_id']; + $counter_multi_authors++; + } + } else { + $selected_users = array(); + } + + $avail_users =& $this->getValidAuthors(); + + echo '<option value="">- - -</option>' . "\n"; + + foreach($avail_users AS $user) { + echo '<option value="' . $user['authorid'] . '" ' . (in_array($user['authorid'], $selected_users) ? ' selected="selected"' : '') . '>' . htmlspecialchars($user['realname']) . '</option>' . "\n"; + } + ?> + </select> + </div> +<?php + break; - case 'author': + case 'author': ?> <div class="entryproperties_access_author adv_opts_box form_select"> <label for="properties_access_author"><?php echo AUTHOR; ?>:</label> @@ -411,10 +461,9 @@ class serendipity_event_entryproperties extends serendipity_event </select> </div> <?php - return true; + break; - - case 'markup': + case 'markup': ?> <div class="entryproperties_markup adv_opts_box form_multiselect"> <label for="properties_markup"><?php echo PLUGIN_EVENT_ENTRYPROPERTIES_DISABLE_MARKUP; ?></label> @@ -449,9 +498,9 @@ class serendipity_event_entryproperties extends serendipity_event </select> </div> <?php - return true; + break; - case 'customfields': + case 'customfields': ?> <div class="entryproperties_customfields adv_opts_box"> <?php @@ -489,7 +538,7 @@ class serendipity_event_entryproperties extends serendipity_event <div id="ep_column_<?php echo $_fieldname; ?>" class="clearfix form_area media_choose"> <label for="prop<?php echo $_fieldname; ?>"><?php echo $_fieldname; ?></label> <textarea id="prop<?php echo $_fieldname; ?>" class="change_preview" name="serendipity[properties][<?php echo $_fieldname; ?>]" data-configitem="prop<?php echo $_fieldname; ?>"><?php echo serendipity_specialchars($value); ?></textarea> - <button class="customfieldMedia" type="button" name="insImage" title="<?php echo MEDIA ; ?>"><span class="icon-picture"></span><span class="visuallyhidden"><?php echo MEDIA ; ?></span></button> + <button class="customfieldMedia" type="button" name="insImage" title="<?php echo MEDIA ; ?>"><span class="icon-picture" aria-hidden="true"></span><span class="visuallyhidden"><?php echo MEDIA ; ?></span></button> <?php if (preg_match('/(\.jpg|\.png|\.bmp)$/', $value)) { ?> <figure id="prop<?php echo $_fieldname; ?>_preview"> <figcaption><?php echo PREVIEW; ?></figcaption> @@ -506,11 +555,12 @@ class serendipity_event_entryproperties extends serendipity_event ?> </div> <?php - return true; + break; } } - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; static $is_cache = null; static $use_groups = null; @@ -527,10 +577,11 @@ class serendipity_event_entryproperties extends serendipity_event } if (isset($hooks[$event])) { + switch($event) { + case 'frontend_entryproperties_query': $eventData['and'] = $this->returnQueryCondition($is_cache); - return true; break; case 'backend_display': @@ -571,6 +622,15 @@ class serendipity_event_entryproperties extends serendipity_event $access_groups = array(); } + if (isset($eventData['properties']['ep_multi_authors'])) { + //$eventData['properties']['ep_multi_authors'] = explode(';', $eventData['properties']['ep_multi_authors']); + } elseif (isset($serendipity['POST']['properties']['multi_authors'])) { + //$serendipity['POST']['properties']['multi_authors'] = explode(';', $serendipity['properties']['ep_multi_authors']); + $eventData['properties']['ep_multi_authors'] = $serendipity['POST']['properties']['multi_authors']; + } else { + $eventData['properties']['ep_multi_authors'] = array(); + } + if (isset($eventData['properties']['ep_access_users'])) { $access_users = explode(';', $eventData['properties']['ep_access_users']); } elseif (isset($serendipity['POST']['properties']['access_users'])) { @@ -600,8 +660,6 @@ class serendipity_event_entryproperties extends serendipity_event ?> </div> <?php - - return true; break; case 'backend_maintenance': @@ -610,7 +668,6 @@ class serendipity_event_entryproperties extends serendipity_event echo '<h3>'. PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE .'</h3>'; echo '<a class="button_link build_cache" href="?serendipity[adminModule]=event_display&serendipity[adminAction]=buildcache" data-delmsg="'. PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_FETCHNEXT .'">'. PLUGIN_EVENT_ENTRYPROPERTY_BUILDCACHE .'</a></section>'; } - return true; break; case 'backend_import_entry': @@ -620,7 +677,7 @@ class serendipity_event_entryproperties extends serendipity_event $props['no_nl2br'] = 'true'; $this->addProperties($props, $eventData); } - break; + break; case 'backend_sidebar_entries_event_display_buildcache': if ($is_cache) { @@ -664,10 +721,9 @@ class serendipity_event_entryproperties extends serendipity_event </script> <?php } else { - echo '<span class="msg_notice"><span class="icon-info-circled"></span>' . PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE . '</span>'; + echo '<span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span>' . PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_DONE . '</span>'; } } - return true; break; case 'backend_cache_entries': @@ -691,7 +747,6 @@ class serendipity_event_entryproperties extends serendipity_event $this->updateCache($entry); } } - return true; break; case 'backend_cache_purge': @@ -739,8 +794,6 @@ class serendipity_event_entryproperties extends serendipity_event } $this->addProperties($serendipity['POST']['properties'], $eventData); - - return true; break; case 'frontend_configure': @@ -760,9 +813,21 @@ class serendipity_event_entryproperties extends serendipity_event } foreach($properties AS $idx => $row) { - $eventData[$addData[$row['entryid']]]['properties'][$row['property']] = $row['value']; + if ($row['property'] == "ep_multi_authors") { + $tmp = explode(";", $row['value']); + $counter = 0; + unset($eventData[$addData[$row['entryid']]]['properties'][$row['property']]); + foreach($tmp as $key => $value) { + $tmp_author_array = serendipity_fetchAuthor($value); + $eventData[$addData[$row['entryid']]]['properties'][$row['property']][$counter]['author_id'] = $value; + $eventData[$addData[$row['entryid']]]['properties'][$row['property']][$counter]['author_name'] = $tmp_author_array[0]['realname']; + $eventData[$addData[$row['entryid']]]['properties'][$row['property']][$counter]['author_url'] = serendipity_authorURL($tmp_author_array[0]); + $counter++; + } + } else { + $eventData[$addData[$row['entryid']]]['properties'][$row['property']] = $row['value']; + } } - return true; break; case 'entry_display': @@ -793,7 +858,6 @@ class serendipity_event_entryproperties extends serendipity_event $eventData[0]['properties']['ep_' . $prop_key] = $serendipity['POST']['properties'][$prop_key]; } } - break; case 'entries_header': @@ -909,8 +973,6 @@ class serendipity_event_entryproperties extends serendipity_event } else { $eventData['joins'] .= $cond; } - - return true; break; case 'frontend_entries_rss': @@ -923,7 +985,6 @@ class serendipity_event_entryproperties extends serendipity_event } } } - return true; break; case 'backend_plugins_new_instance': @@ -946,19 +1007,18 @@ class serendipity_event_entryproperties extends serendipity_event // Set current plugin as last plugin in queue. $q = "UPDATE {$serendipity['dbPrefix']}plugins SET sort_order = " . intval($rs[0]) . " WHERE name = '" . $this->instance . "'"; serendipity_db_query($q); - - return true; break; default: return false; - break; } + return true; } else { return false; } } + } /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/plugins/serendipity_event_gravatar/ChangeLog b/plugins/serendipity_event_gravatar/ChangeLog index 5a2ec1c6..0978ca59 100644 --- a/plugins/serendipity_event_gravatar/ChangeLog +++ b/plugins/serendipity_event_gravatar/ChangeLog @@ -1,8 +1,14 @@ -# - * Allows other plugins to fetch user metadata via +Version 1.62.1: +------------------------------------------------------------------------ + * Remove defunct mybloglog + * Switch plugin to http_request2 + + +------------------------------------------------------------------------ + * Allows other plugins to fetch user metadata via avatar_fetch_userinfos hook. * supports !# twitter links now, too. - + Version 1.57: (brockhaus) * Better Gravatar handling, as the call changed a little * Doesn't accept existing but empty images anymore. @@ -12,7 +18,7 @@ Version 1.56: (brockhaus) * Removed inline styles, added class avatar_right and avatar_left. If not found set in css, the plugin will emit a default style for those two. - + Version 1.55: (brockhaus) ------------------------------------------------------------------------ * Twitter and identica where not fetched correctly if fetched first. @@ -21,7 +27,7 @@ Version 1.54: ------------------------------------------------------------------------ * Made PLUGIN_GRAVATAR_SUPPORTED recognize %s as variable for list of supported services - + Version 1.52: ------------------------------------------------------------------------ * Changed display of supported avatars in the comment area in order @@ -40,7 +46,7 @@ Version 1.48 (brockhaus) ------------------------------------------------------------------------ * FIX: PHP compatibility was broken since 1.46 :-/ * Added Identica Avatar. - This is mainly used for Identica Pingbacks and should be used in + This is mainly used for Identica Pingbacks and should be used in front of Favatar, else the Identica sign will show up. * Code cleanup. @@ -68,7 +74,7 @@ Version 1.44 (brockhaus) * Added buildin wavatar suport. * Support for Gravatar fallbacks identyicon, monsterid and wavatar. * Optimized trackback avatars: Querypars will be stripped from URL. - Now in example S8Y blogs always get the same Avatar cached, not + Now in example S8Y blogs always get the same Avatar cached, not one per trackback. Version 1.43 (brockhaus) @@ -81,7 +87,7 @@ Version 1.43 (brockhaus) Version 1.42 (brockhaus) ------------------------------------------------------------------------ - * Encoded _ in user urls in order to differ them from the + * Encoded _ in user urls in order to differ them from the seperators. urlencode doesn't encode _. Thanks to Tino Schwarze finding and fixing this. @@ -89,12 +95,12 @@ Version 1.41 (garvinhicking) ------------------------------------------------------------------------ * Fixed Last-Modified Header of avatar images. - + Version 1.40 () ------------------------------------------------------------------------ * Added ycon support (mo, http://moblog.wiredwings.com) - + ------------------------------------------------------------------------ Version 1.39 (brockhaus): @@ -122,7 +128,7 @@ Version 1.37 (brockhaus): Version 1.36 (brockhaus): * Added new option: You can define, that the plugin should not - produce avatar image directly but a smarty tag only. If this + produce avatar image directly but a smarty tag only. If this option is switched on, you can define in your comments template, where the avatar should be displayed using the smarty tag $comment.comment_avatar @@ -148,7 +154,7 @@ Version 1.34 (brockhaus): * Gravatars rating doesn't work reliable. My G rated Gravatar is only shown, if I use Gravatar X rating. :-/ - Added an option to switch off Gravatars rating parameter (what + Added an option to switch off Gravatars rating parameter (what should be the same as using X rating) ------------------------------------------------------------------------ @@ -172,7 +178,7 @@ Version 1.31 (brockhaus): ------------------------------------------------------------------------ Version 1.30 (brockhaus): - * Standard Avatar was not displayed in subdirectory blog + * Standard Avatar was not displayed in subdirectory blog installtions. * Gravatar link was slightly wrong (but working) @@ -190,7 +196,7 @@ Version 1.28 (brockhaus): ------------------------------------------------------------------------ Version 1.27 (brockhaus): - * If the writer entered his url as www.domain.de instead of + * If the writer entered his url as www.domain.de instead of http://www.domain.de, the Avatar was not always loaded correctly ------------------------------------------------------------------------ @@ -215,7 +221,7 @@ Version 1.24 (brockhaus): ------------------------------------------------------------------------ Version 1.23 (brockhaus): - * While fresh fetching P/Favatars, the Plugin will only accept + * While fresh fetching P/Favatars, the Plugin will only accept responses declared as image by the remote server. This will prevent accepting potential error html pages as Avatar images. @@ -274,7 +280,7 @@ Version 1.14 (brockhaus): ------------------------------------------------------------------------ Version 1.13 (brockhaus): - * Advice changed: It is not the statistic plugin producing not + * Advice changed: It is not the statistic plugin producing not working Pavatars/Favatars but the exit tracking plugin. ------------------------------------------------------------------------ @@ -286,7 +292,7 @@ Version 1.12 (brockhaus): found, are supported now, too. Former the Avatar Plugin assumed, that the default page is the P/Favatar. - * Default configuration now ordered like this: Gravatar -> Pavatar + * Default configuration now ordered like this: Gravatar -> Pavatar -> Favatar -> Default Avatar. * Added advice, that this plugin has to be executed before any link @@ -306,13 +312,13 @@ Version 1.11, testing version not released to CVS/Spartacus (brockhaus): Version 1.10 (brockhaus): * Pavatar / Avatar information where never loaded from cache - + * .. but after beeing loaded from cache it produced an endless request loop for images loaded from the local blog (if comment sidebar plugin was enabled) * Height setting for image was called "heigth".. :-/ - + * Gravarar caching didn't work reliable, if a default avatar was given. @@ -333,7 +339,7 @@ Version 1.8 (brockhaus): Version 1.7 (brockhaus): * Added support for Pavatars (www.pavatar.com) - + * Added support for MyBlogLog Avatars (www.mybloglog.com) * The order for trying avatar methods and what kind of avatars are @@ -345,22 +351,22 @@ Version 1.7 (brockhaus): is defined. (We want less dataprofiles..) * Fetch default avatar via mediadatabase in the configuration. - + * Image size is assured now in HTML code. - + * Below the comment only actual configured avatar methods are shown as supported. ------------------------------------------------------------------------ -Version 1.6 (garvinhickins): +Version 1.6 (garvinhickins): ------------------------------------------------------------------------ -Version 1.5 (garvinhickins): +Version 1.5 (garvinhickins): ------------------------------------------------------------------------ -Version 1.4 (garvinhickins): +Version 1.4 (garvinhickins): ------------------------------------------------------------------------ -Version 1.3 (garvinhickins): +Version 1.3 (garvinhickins): * Fix errors on invalid domains diff --git a/plugins/serendipity_event_gravatar/UTF-8/documentation_cs.html b/plugins/serendipity_event_gravatar/UTF-8/documentation_cs.html deleted file mode 100644 index de89b5ab..00000000 --- a/plugins/serendipity_event_gravatar/UTF-8/documentation_cs.html +++ /dev/null @@ -1,433 +0,0 @@ -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> - <title>Dokumentace: Avatar Plugin</title> - <link rel="stylesheet" type="text/css" href="../documentation/documentation.css"/> -</head> -<body> - -<h1>Dokumentace k pluginu 'Gravatar'</h1> - -<p>Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 26.6.2011. Od té doby mohl být plugin pozměněn nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i <a href="../documentation_de.html">aktuální německou dokumentaci</a>, <a href="../documentation_en.html">anglickou dokumentaci</a> a <a href="../ChangeLog">ChangeLog</a>. - -<div id="title"> -<a name="top"/> -<h1>Dokumentace k pluginu: Avatar Plugin (Gravatar)</h1> -</div> -<div id="content"> -<h2>Obsah</h2> -<ol> - <li><a href="#overview">Přehled</a></li> - - <ol> - <li><a href="#avt_gravatar">Gravatar</a></li> - <li><a href="#avt_pavatar">Pavatar</a></li> - <li><a href="#avt_favatar">Favatar</a></li> - <li><a href="#avt_twitter">Twitter</a></li> - <li><a href="#avt_identica">Identica</a></li> - <li><a href="#avt_mybloglog">MyBlogLog</a></li> - <li><a href="#avt_wavatar">Wavatar</a></li> - <li><a href="#avt_monsterid">MonsterID</a></li> - <li><a href="#avt_identicon">Identicon/YCon</a></li> - <li><a href="#avt_standard">Standardavatar</a></li> - </ol> - - <li><a href="#config">Nastavení</a></li> - - <ol> - <li><a href="#cnf_method">Pořadí vložení Avatarů</a></li> - <li><a href="#cnf_standard">Standard-Avatar</a></li> - <li><a href="#cnf_sidbar">Zobrazovat v postranním panelu</a></li> - <li><a href="#cnf_showtype">Zobrazovat podporované typy avatarů</a></li> - <li><a href="#cnf_autoralt">Jméno autora v atributu ALT</a></li> - <li><a href="#cnf_smartify">Generovat Smarty Tag</a></li> - <li><a href="#cnf_alignment">Zarovnání</a></li> - <li><a href="#cnf_size">Velikost obrázku</a></li> - <li><a href="#cnf_cache">Doba cachování</a></li> - <li><a href="#cnf_gravatar_rating">Indikace Gravataru</a></li> - <li><a href="#cnf_gravatar_fallback">Gravatar Fallback (zpracování chyby)</a></li> - <li><a href="#cnf_gravatar_fallback_always">Vždy vyžadovat Gravatar Fallback</a></li> - </ol> - - <li><a href="#changelog">ChangeLog (historie verzí)</a></li> -</ol> -</div> - -<a name="overview"></a> -<h2>Přehled</h2> -<p>Pomocí pluginu Avatar lze přiřadit komentujícím v blogu přiřadit "obličej". Každému samostatnému komentátorovi lze přiřadit takzvaný Avatar, který ho reprezentuje. K tomu lze použít několik různých mechanizmů, jak umožnit komentujícím použití avatara, které budou v následujícím textu probrány. -</p> -<p>Vždy je použit první mechanizmus, který nalezne avatara. Další způsoby pak nejsou ani zkoušeny. To znamená, že je třeba seřadit metody v tom pořadí, aby byly co nejdříve použity nejčastěji používané mechanizmy. Způsoby, které poskytnou avatara v každém případě, by měly být umístěny až na konci, protože po nich zařazené metody nebudou přirozeně nikdy uplatněny. -</p> -<p><strong>Důležité:</strong> Tento plugin musí být umístěn v seznamu pluginů před všemi pluginy, které mění odkazy, jako například "Markup: Sledování odchodů" (Exit Tracking Plugin). Jinak nemusejí fungovat například avatary, které jsou generovány na základě odkazů na stránky komentátorů. -</p> -<p>Následuje popis aktuálně dostupných mechanizmů, jak přiřadit avatara komentátorům:</p> -<p><a href="#top">nahoru</a></p> - -<a name="avt_gravatar"></a> -<h3>Gravatar</h3> -<p><a href="http://www.gravatar.com" target="_blank">Gravatar</a> je jedna z nejznámějších služeb pro uživatele avatarů. Uživatele se mohou u této služby registrovat pomocí emailu, na který je vázán obrázek avatara.</p> -<p>Gravatary jsou tedy spřažené s emailem komentátora. Pouze pokud komentátor zadá svůj mail, je možné dotázat se Gravataru, jestli je pro daný mail registrován obrázek avatara.</p> -<p><a href="#top">nahoru</a></p> - -<a name="avt_pavatar"></a> -<h3>Pavatar</h3> -<p><a href="http://www.pavatar.com" target="_blank">Pavatary</a> jsou avatary (obrázky), které pro tento účel nahrál uživatel na svoji domovskou stránku.</p> -<p>Oproti velmi podobným <a href="#avt_favatar">Favatarům</a> sem může uživatel nahrát obrázek avatara v libovolném rozlišení.</p> -<p>V tomto případě se zjišťuje avatar na základě domovské stránky, kterou zadal komentátor, konkrétně jestli tato domovská stránka obsahuje Pavatara. Tento způsob zjišťování avatara je použit přirozeně pouze v případě, že komentátor zadal domovksou webovou stránku.</p> -<p><a href="#top">nahoru</a></p> - -<a name="avt_favatar"></a> -<h3>Favatar</h3> -<p>Toto je koncept, pomocí kterého má spousta vlastníků webových stránek Avatara, aniž pro to musejí cokoliv udělat:</p> -<p>Blog použije jednoduše favicon (ikonku webu) ze stránky, kterou komentátor zadal jako svoji domovskou. -Favicon je obvykle jenom obyčejná ikona, která bývá docela malá a často nevypadá jako avatar. -</p> -<p><a href="#top">nahoru</a></p> - -<a name="avt_twitter"></a> -<h3>Twitter</h3> -<p>V případě, že komentátor zadá adresu domovské stránky jako URL <a href="http://twitter.com" target="_blank">profilu na Twitteru</a>, pak bude tento profil prohledán, jestli obsahuje profilovou fotku, která bude následně použita jako avatar.</p> -<p><i>Poznámka</i>: Pokud je zároveň použito hledání metodou "Favatar", pak musí stát tato metoda Twitter před Favatarem, protože jinak bude místo obrázku z profilu použita favicona Twitteru. Což může být na druhou stranu použito úmyslně, například k jasnému a jednoznačnému označení "tweetbacků" z Twitteru. -</p> -<p><a href="#top">nahoru</a></p> - -<a name="avt_identica"></a> -<h3>Identica</h3> -<p>Toto je zvláštní avatar pro pingbacky <a href="http://identi.ca" target="_blank">Identica</a>. V tomto případě je hledán profilový obrázek uživatele, který poslal pingback.</p> -<p><i>Poznámka</i>: Pokud je zároveň použito hledání metodou "Favatar", pak musí stát tato metoda Identica před Favatarem, protože jinak bude místo obrázku z profilu použita favicona Identicy. Což může být na druhou stranu použito úmyslně, například k jasnému a jednoznačnému označení "tweetbacků" z Identicy. -</p> -<p><a href="#top">nahoru</a></p> - -<a name="avt_mybloglog"></a> -<h3>MyBlogLog</h3> -<p>Toto je opět centrální služba (podobně jako Gravatar). MyBlogLog je služba poskytující blogy, ale zároveň z ní lze získat avatary.</p> -<p>Přítomnost MyBlogLog avatarů je zjištěna z domovské adresy komentátorů. -<p><a href="#top">nahoru</a></p> - -<a name="avt_wavatar"></a> -<h3>Wavatar</h3> -<p>Wavatar je dynamicky vyroben z domovské stránky a emailové adresy komentátorů. Poskytuje pro každého uživatele jiný, ale vždy stejný obrázek. Tímto způsobem je <strong>vždycky</strong> vložen avatar, tedy všechny metody zařazené po této budou ignorovány. Wavatary vypadají asi následovně:</p> -<p align="center"><img src="documentation/wavatars.jpg"/></p> -<p><a href="#top">nahoru</a></p> - -<a name="avt_monsterid"></a> -<h3>MonsterID</h3> -<p>MonsterID avatary jsou generovány stejným mechanizmem jako Wavatary nebo Idnetikony. V tomto případě jsou vygenerovány takovéto roztomilé "příšerky" (monstra).</p> -<p>Podobně jako u Wavataru a Identikon je tímto způsobem <strong>vždycky</strong> vložen avatar, tedy všechny metody zařazené po této budou ignorovány. -<p align="center"><img src="documentation/monsterid.png"/></p> -<p><a href="#top">nahoru</a></p> - -<a name="avt_identicon"></a> -<h3>Identicon/YCon</h3> -<p> -Avatary Identicon (identikony) jsou generovány stejným mechanizmem jako Wavatary nebo MonsterID. V tomto případě jsou vygenerovány abstraktní obrazce.</p> -<p>Podobně jako u Wavataru a MonsterID je tímto způsobem <strong>vždycky</strong> vložen avatar, tedy všechny metody zařazené po této budou ignorovány.</p> -<p align="center"><img src="documentation/identicons.jpg"/></p> -<p><a href="#top">nahoru</a></p> - -<a name="avt_standard"></a> -<h3>Standardavatar</h3> -<p>Metoda "Standardavatar" poskytuje vždycky stejný obrázek pro všechny uživatele. Obrázek, který bude použit, lze zadat v sekci "Nastavení".</p> -<p><a href="#top">nahoru</a></p> - -<a name="config"></a> -<h2>Nastavení</h2> - -<a name="cnf_method"></a> -<h3>Pořadí vložení Avatarů</h3> -<p>Zde je zadáno pořadí zkoušení jednotlivých metod pro zjištšění avatarů ke komentátorům.</p> -<p>V současnosti existuje 6 metod, ze kterých je možné pořadí sestavit. Je třeba dát pozor na to, že metody, které generují avatara pokaždé, jsou poslední, které jsou vyzkoušeny, všechny následující metody jsou ignorovány.</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_standard"></a> -<h3>Standard-Avatar</h3> -<p>URL adresa ke standardnímu avataru. Tady musíte zadat relativní nebo absolutní URL adresu k obrázku standardního avataru.</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_sidbar"></a> -<h3>Zobrazovat v postranním panelu</h3> -<p>Mají se obrázky avatarů zobrazovat i v postranním panelu (poslední komentáře)?</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_showtype"></a> -<h3>Zobrazovat podporované typy avatarů</h3> -<p>Pokud je zaškrtnuto, pak se pod políčkem k vložení komentáře objeví řádek s výčtem podporovaných avatarů.</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_autoralt"></a> -<h3>Jméno autora v atributu ALT</h3> -<p>Normálně je umístěho jméno autora v atributu TITLE u obrázku, atribut ALT je pak vyplněn hvězdičkou "*", aby se v rozvržení stránky nic nerozházelo, pokud nejsou nataženy obrázky. Nicméně z hlediska přístupnosti stránky i pro slepé čtenáře je důležité, aby v atributu ALT něco bylo, protože je to právě tento atribut, který jim je předčítán a podle kterého poznají, co je na obrázku. Pokud tedy chcete podporovat i tyto postižené čtenáře, měli byste tuto volbu povolit.</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_smartify"></a> -<h3>Generovat Smarty Tag</h3> -<p>Pokud je zaškrtnuta tato volby, není obrázek avatara vložen přímo do komentáře, ale místo toho je generován Smarty Tag {$comment.avatar}, který při generování stránky obsahuje HTML kód pro zobrazení obrázku. Tuto volbu byste měli zapnout pouze pokud víte, že šablona vzhledu, kterou požíváte, podporuje tento tag. Jestli tomu tak opravdu je, můžete jednoduše vyzkoušet.</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_alignment"></a> -<h3>Zarovnání</h3> -<p>Pomocí této volby můžete zadat zarovnání avatara vzhledem ke komentáři, tedy pokud nepoužítáve volbu Smarty Tag. V případě, že Smarty Tag používáte, pak musíte k zarovnání obrázku použít odpovídající CSS třídu ve stylopisu.</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_size"></a> -<h3>Velikost obrázku</h3> -<p>Maximální zobrazená velikost avataru v pixelech.</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_cache"></a> -<h3>Doba cachování</h3> -<p>Když mají být avatary dočasně ukládány (doporučeno!), musí být zde uveden počet hodin, během kterých se mají obrázky natahovat z blogového serveru, namísto serveru vzdáleneé avatarové služby. Sice to způsobí lehké zvýšení provozu na vašem blogovém serveru, na druhou stranu se stanou obrázky víceméně nezávislé na přístupnosti serveru externích služeb. "0" znamená vypnutí cachování.</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_gravatar_rating"></a> -<h3>Indikace Gravataru</h3> -<p>Dětská pojistka :)</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_gravatar_fallback"></a> -<h3>Gravatar Fallback (zpracování chyby)</h3> -<p>Metoda Gravatar umožňuje chybovou metodu pro případ, kdy pro uživatele není nalezen žádný avatar. Tou může být jedna z Monster ID, Identicon nebo Wavatar. Pokud nastavíte tuto chybovou metodu pro Gravatara, nebudou zkoušeny žádné další metody pro zjištění avatara, pokud uživatel zadal emailovou adresu.</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_gravatar_fallback_always"></a> -<h3>Vždy vyžadovat Gravatar Fallback</h3> -<p>Vyžadovat zpracování chyby Gravatar (Gravatar Fallback) také pokud uživatel nezadal žádný email (ale pokud zadal URL adresu domovské stránky nebo jméno).</p> -<p><a href="#top">nahoru</a></p> - -<a name="changelog"></a> -<h2>Historie verzí (ChangeLog)</h2> - -<ul> -<li>verze 1.54</li> - <ul> - <li>Do jazykové konstanty PLUGIN_EVENT_GRAVATAR_SUPPORTED byl přidán parametr %s pro zobrazení podporovaných avatarových služeb.</li> - </ul> -<li>verze 1.52</li> - <ul> - <li>Změněno zobrazení podporovaných avatarů pod polem pro komentář, aby podporovalo hezké zalamování řádků.</li> - </ul> -<li>verze 1.51</li> - <ul> - <li>Použití funkce strtolower() pro mailové adresy.</li> - </ul> -<li>verze 1.49 [brockhaus]</li> - <ul> - <li>Pavatar v blozích s přesměrováním nefungoval, pokud byl odkaz na Pavatar přístupný pouze v informacích tagu "rel link"</li> - </ul> -<li>verze 1.48 [brockhaus]</li> - <ul> - <li>Oprava: Kompatibilita PHP byla porušena při opravě 1.46 :-/</li> - <li>Přidán avatar Identica. Použito hlavně pro pingbacky Indetica a mělo by být použito před Favatarem, jinak se bude zobrazovat značka Identica místo obrázku uživatele.</li> - <li>Vyčištění kódu</li> - </ul> -<li>verze 1.47 [brockhaus]</li> - <ul> - <li>Vypnutí ladicích výpisů v template_c</li> - </ul> -<li>verze 1.46 [brockhaus]</li> - <ul> - <li>Přidán Twitter Avatar (pokud URL odkazuje na profil na Twitteru). To je většinou použito pro Tweetbacky a mělo by být použito před Favatarem, jinak se bude zobrazovat logo Twitteru.</li> - <li>Vyčištění kódu</li> - </ul> -<li>verze 1.45 [brockhaus]</li> - <ul> - <li>Nápověda</li> - <li>Vyčištění</li> - </ul> -<li>verze 1.44 [brockhaus]</li> - <ul> - <li>Přidána podpora Wavatarů</li> - <li>Podpora pro ošetření chyb (fallback) Gravataru pomocí indetyicon, MonsterID a Wavataru.</li> - <li>Optimalizace zpětných volání (trackback) avatarů: Querypars budou odstřiženy z URL. Nyní v ukázkovém Serendipity blogu dostanete vždycky stejného cachovaného Avatara, ne samostatného pro jiné stránky.</li> - </ul> -<li>verze 1.43 [brockhaus]</li> - <ul> - <li>Volba nastavení pro přidání jména autora do attributu ALT u obrázku avatara. Normálně je to vyplněno hvězdičkou "*", ale slepci jsou při prohlížení stránek závislí na tagu ALT, který jim čtečky předčítají, aby se dozvěděli, co je obsahem obrázku.</li> - </ul> -<li>verze 1.42 [brockhaus]</li> - <ul> - <li>Kódování podtržítka "_" v URL adresách uživatelů, aby se odlišily od oddělovačů. Funkce "urlencode" je nekóduje. Díky uživateli [Tino Schwarze] za objevení a opravu.</li> - </ul> -<li>verze 1.41 [garvinhicking]</li> - <ul> - <li>Opravena hlavička "Last-Modified" u obrázků avatarů.</li> - </ul> -<li>verze 1.40</li> - <ul> - <li>Přidána podpora Ycon (<a href="http://moblog.wiredwings.com">http://moblog.wiredwings.com<a/>)(</li> - </ul> -<li>verze 1.39 [brockhaus]</li> - <ul> - <li>Avatary Monster ID je nyní také cachován, protože jejich vytváření trvá dlouho.</li> - </ul> -<li>verze 1.38 [brockhaus]</li> - <ul> - <li>Podpora Monster ID avatarů (podrobnosti naleznete na <a href="http://www.splitbrain.org/go/monsterid">http://www.splitbrain.org/go/monsterid</a>)</li> - <li>Selhání při čerstvé instalaci a času cache nastaveném na 0.</li> - <li>Podpora nastavení absolutní cesty k standardnímu avataru.</li> - <li>Po uložení nastavení je nyní cache <b>vždy</b> vyčištěna, aby byly změny viditelné ihned, dokonce i když je cachování zapnuto.</li> - <li>Pokud plugin nemůže zapisovat do cache, pak to v ladicím módu zapíše do logu a zobrazí výchozí obrázek, pokud není nalezen cachovaný soubor.</li> - </ul> -<li>verze 1.37 [brockhaus]</li> - <ul> - <li>Řádka pod oknem komentáře informující o podporovaných typech avatarů lze skrýt pomocí nastavení.</li> - </ul> -<li>verze 1.36 [brockhaus]</li> - <ul> - <li>Přidána nová volba: Můžete nastavit, že plugin nebude vytvářet avatary přímo, ale místo toho pouze tag pro smarty. Pokud je tato volba zapnutá, můžete si definovat v šabloně pro komentáře, kde se mají avatary zobrazovat, a to pomocí tagu $comment.comment_avatar.</li> - <li>CSS třída avataru se bude měnit podle toho, kde je zobrazen. Pro normální komentáře bude mít třídu "comment_avatar", pro plugin "nejnovější příspěvky" to bude třída "serendipity_plugin_comments_avatar", aby byla možnost jednoduše je označit, ostylovat.</li> - <li>Nastavení zarovnání avatarů: Nastavení zarovnání bude použito, pokud je avatar vykreslen přímo (ne pomocí smarty).</li> - <li>Nová volba pro vypínání/zapínání obrázků avatarů v postranním sloupci (nejnovější komentáře).</li> - <li>Podporovaní metody avatarů se zobrazovaly i pod kontaktním formulářem, což ale nemělo logický smysl. V tomto fromuláři byly tedy avatary vypnuty.</li> - <li>Další změny v jazykových souborech.</li> - </ul> -<li>verze 1.35 [brockhaus]</li> - <ul> - <li>Opraveny chyby v anglickém jazykovém souboru. (Díky Donovi!)</li> - </ul> -<li>verze 1.34 [brockhaus]</li> - <ul> - <li>Hodnocení Gravatarů nepracuje spolehlivě. Můj Gravatar hodnocený jako G je zobrazen pouze při použití hodnocení gravatarů X. :-/<br /> - Přidána volba pro vypnutí parametru hodnocení Gravatarů, což by mělo mít stejný efekt jako nastavení hodnocení X.</li> - </ul> -<li>verze 1.33 [brockhaus]</li> - <ul> - <li>Pavatar: X-Pavatar Header je nyní znovu podporován a je první použitou metodou automatické detekce Pavatara.</li> - </ul> -<li>verze 1.32 [brockhaus]</li> - <ul> - <li>Výchozí avatar MyBlogLog nebyl správně detekování. :-/</li> - <li>Pokud není zadán email ani url adresa, ale je definován výchozí avatar, je nyní zobrazen právě výchozí avatar.</li> - </ul> -<li>verze 1.31 [brockhaus]</li> - <ul> - <li>Změna času volání (call-time) chyby (pass-by-reference) (fetchAvatar).</li> - </ul> -<li>verze 1.30 [brockhaus]</li> - <ul> - <li>Standradní Avatar se nezobrazoval, pokud byl blog nainstalován v podadresáři webu a ne přímo v kořenové složce.</li> - <li>Odkaz na Gravatara byl trochu špatně (přesto fungoval).</li> - </ul> -<li>verze 1.29 [brockhaus]</li> - <ul> - <li>Oprava chyby 1.27 přidávala k URL "http://", i když nebyla zadána vůbec žádná URL adresa.</li> - </ul> -<li>verze 1.28 [brockhaus]</li> - <ul> - <li>V Serendipity 1.1 nebylo možné natavit výchozího avatara. Nastavení nebylo kompatibilní s verzí Serendipity 1.1.</li> - </ul> -<li>verze 1.27 [brockhaus]</li> - <ul> - <li>Pokud pisatel zadal svoji adresu jako "www.domena.cz" místo "http://www.domena.cz", Avatar nebyl načten správně.</li> - </ul> -<li>verze 1.26 [brockhaus]</li> - <ul> - <li>MyBlogLog trochu pozměnil způsob volání avatara, což mělo za následek, že ošetření chybových výstupů (fallback) pro MyBlogLog přestal fungovat.</li> - </ul> -<li>verze 1.25 [garvinhicking]</li> - <ul> - <li>Zarovnání (algin) nahraceno definicí pomocí CSS stylů, takže XHTML už neobsahuje žádné definice zarovnání.</li> - </ul> -<li>verze 1.24 [brockhaus]</li> - <ul> - <li>Kontrola odpovědi MyBlogLog, jestli obsahuje opravdu obrázek.</li> - <li>Vyčištění paměti cache při nastavení hodnoty cachování na 0.</li> - <li>Vypnutí ladicích výpisů.</li> - </ul> -<li>verze 1.23 [brockhaus]</li> - <ul> - <li>Při vkládání čerstvých P/favatarů, plugin přijme pouze odpovědi označené vzdáleným serverem jako obrázky. To zamezí přijetí potenciálních html stránek jako obrázku avatara.</li> - </ul> -<li>verze 1.22 [brockhaus]</li> - <ul> - <li>Vkládání i přesměrovaných P/Favatarů.</li> - </ul> -<li>verze 1.21 [brockhaus]</li> - <ul> - <li>Vkládání avatarů se rozbilo při vypnutí cache.</li> - <li>Prohlížeč nebyl schopen cachovat výchozí avatary kvůli špatně nastavenému času cache.</li> - <li>Kontrola, jestli cachovaný soubor vypadá jako obrázek, předtím, než je odeslán na klienta.</li> - </ul> -<li>verze 1.20 [brockhaus]</li> - <ul> - <li>Titulek obrázku avatara nyní zobrazuje jméno autora místo "Avatar" (V.)</li> - </ul> -<li>verze 1.19 [brockhaus]</li> - <ul> - <li>Využití cache prohlížeče má za následek dobré vylepšení výkonu!</li> - </ul> -<li>verze 1.18 [brockhaus]</li> - <ul> - <li>Vypnutí ladicích výpisů</li> - </ul> -<li>verze 1.17 [brockhaus]</li> - <ul> - <li>Pokud je zapnuto cachování, je nyní cachováno <b>všechno</b>. Známí přispěvatelé a komentátoři nyní nezpůsobí <b>žádné</b> volání cizích serverů, pokud už jsou jejich obrázky cachovány. Velmi pěkné posílení výkonu. Díky Garvinovi za nápad.</li> - <li>Záplata proti hackování od uživatele [garvinhickins]</li> - </ul> -<li>verze 1.16 [garvinhicking]</li> - <ul> - <li>uhlazení kódu</li> - </ul> -<li>verze 1.14 [brockhaus]</li> - <ul> - <li>Implementováno zpracování chyb pro MyBlogLog! :-) Ale je pomalé, dokonce i s optimalizací pomocí cachování. MyBlogLog by neměl být první v pořadí avatarů.</li> - <li>Přidána pátá kolonka pro výběr metody avatarů, protože MyBlogLog nyní také podporuje zpracování chyb (fallback).</li> - </ul> -<li>verze 1.13 [brockhaus]</li> - <ul> - <li>Doporučení změněno: Není to plugin "statistika", který znefunkční Pavatary/Favatary, ale plugin "sledování odchodů" (exit tracking plugin)</li> - </ul> -<li>verze 1.12 [brockhaus]</li> - <ul> - <li>MyBlogLog avatary jsou nyní také cachovány.</li> - <li>Stránky s přesměrováním na výchozí stránku, pokud nebyla nalazena výchozí položka, jsou nyní podporovány. Dřívější plugin avatar předpokládal, že výchozí stránka ja P/Favatar.</li> - <li>Výchozí nastavení pořadí avatarů je nyní: Gravatar -> Pavatar - -> Favatar -> výchozí Avatar</li> - <li>Přidáno doporučení, že plugin by měl být zařazen před pluginy, které mění odkazy.</li> - <li>Načítání nastavené cesty pluginu. Dříve to byl vždy adresář 'plugin'.</li> - <li>Vyřazeno nastavení okraje gravatara, protože už nefunguje (napořád?).</li> - </ul> -<li>verze 1.11 [brockhaus], testovací verze nebyla releasována do CVS/Spartacus</li> - <ul> - <li>Fallback (zpracování chyby) pro Gravatar funguje! Ale zobrazuje výchozího avatara nezávisle na nastavení. Takže toto nastavení bylo smazáno.</li> - </ul> -<li>verze 1.10 [brockhaus]</li> - <ul> - <li>Informace o Pavatar / Avatar nebyly nikdy načtené z cache</li> - <li>...ale po načtení z cache způsobily nekonečnou smyčku pro obrázky načtené z lokálního blogu (pokud byl povolen postranní blugin s komentáři - comment sidebar)</li> - <li>Nastavení výšky obrázku bylo pojmenováno "height" ... :-/</li> - <li>Cachování Gravataru nefungovalo spolehlivě, pokud byl nastaven výchozí avatar.</li> - </ul> -<li>verze 1.9 [brockhaus]</li> - <ul> - <li>Při hledání Pavatara byl natažen Favatar jako Pavatar, pokud nebyl nalezen Pavatar, ale favicon. Díky uživateli [El Burro]</li> - </ul> -<li>verze 1.8 [brockhaus]</li> - <ul> - <li>Plugin nebych schopen načíst Favatary/Pavatary, pokud bylo přesměrování nasměrováno na URL stránky nastavené jako domovská stránka komentujícího. Třeba Garvin má takový blog...</li> - </ul> -<li>verze 1.7 [brockhaus]</li> - <ul> - <li>Přidána podpora Pavatarů (<a href="www.pavatar.com">www.pavatar.com</a>)</li> - <li>Přidána podpora MyBlogLog avatarů (<a href="www.pavatar.com">www.mybloglog.com</a>)</li> - <li>Pořadí pro výběr avatarů a jaké typy avatarů jsou podporovány, vše je nyní nastavitelné.</li> - <li>Standardní avatar může být jeden z nich (měl by být poslední).</li> - <li>Volba pro nenastavení Gravatara jako výchozího avatara, i když je definovaný. (Chceme méně datových profilů...)</li> - <li>Vložení výchozího avatara pomocí mediatéky v nastavení pluginu.</li> - <li>Velikost obrázku je nyní zajištěna pomocí HTML kódu.</li> - <li>Pod polem pro komentář jsou zobrazovány pouze aktuálně nastavené metody avatara jako podporované.</li> - </ul> -<li>verze 1.6 [garvinhickins]</li> -<li>verze 1.5 [garvinhickins]</li> -<li>verze 1.4 [garvinhickins]</li> -<li>verze 1.3 [garvinhickins]</li> - <ul> - <li>Opraveny chyby neplatnosti domény</li> - </ul> -</ul> -<p><a href="#top">nahoru</a></p> - -</body> -</html> diff --git a/plugins/serendipity_event_gravatar/UTF-8/documentation_cz.html b/plugins/serendipity_event_gravatar/UTF-8/documentation_cz.html deleted file mode 100644 index de89b5ab..00000000 --- a/plugins/serendipity_event_gravatar/UTF-8/documentation_cz.html +++ /dev/null @@ -1,433 +0,0 @@ -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> - <title>Dokumentace: Avatar Plugin</title> - <link rel="stylesheet" type="text/css" href="../documentation/documentation.css"/> -</head> -<body> - -<h1>Dokumentace k pluginu 'Gravatar'</h1> - -<p>Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 26.6.2011. Od té doby mohl být plugin pozměněn nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i <a href="../documentation_de.html">aktuální německou dokumentaci</a>, <a href="../documentation_en.html">anglickou dokumentaci</a> a <a href="../ChangeLog">ChangeLog</a>. - -<div id="title"> -<a name="top"/> -<h1>Dokumentace k pluginu: Avatar Plugin (Gravatar)</h1> -</div> -<div id="content"> -<h2>Obsah</h2> -<ol> - <li><a href="#overview">Přehled</a></li> - - <ol> - <li><a href="#avt_gravatar">Gravatar</a></li> - <li><a href="#avt_pavatar">Pavatar</a></li> - <li><a href="#avt_favatar">Favatar</a></li> - <li><a href="#avt_twitter">Twitter</a></li> - <li><a href="#avt_identica">Identica</a></li> - <li><a href="#avt_mybloglog">MyBlogLog</a></li> - <li><a href="#avt_wavatar">Wavatar</a></li> - <li><a href="#avt_monsterid">MonsterID</a></li> - <li><a href="#avt_identicon">Identicon/YCon</a></li> - <li><a href="#avt_standard">Standardavatar</a></li> - </ol> - - <li><a href="#config">Nastavení</a></li> - - <ol> - <li><a href="#cnf_method">Pořadí vložení Avatarů</a></li> - <li><a href="#cnf_standard">Standard-Avatar</a></li> - <li><a href="#cnf_sidbar">Zobrazovat v postranním panelu</a></li> - <li><a href="#cnf_showtype">Zobrazovat podporované typy avatarů</a></li> - <li><a href="#cnf_autoralt">Jméno autora v atributu ALT</a></li> - <li><a href="#cnf_smartify">Generovat Smarty Tag</a></li> - <li><a href="#cnf_alignment">Zarovnání</a></li> - <li><a href="#cnf_size">Velikost obrázku</a></li> - <li><a href="#cnf_cache">Doba cachování</a></li> - <li><a href="#cnf_gravatar_rating">Indikace Gravataru</a></li> - <li><a href="#cnf_gravatar_fallback">Gravatar Fallback (zpracování chyby)</a></li> - <li><a href="#cnf_gravatar_fallback_always">Vždy vyžadovat Gravatar Fallback</a></li> - </ol> - - <li><a href="#changelog">ChangeLog (historie verzí)</a></li> -</ol> -</div> - -<a name="overview"></a> -<h2>Přehled</h2> -<p>Pomocí pluginu Avatar lze přiřadit komentujícím v blogu přiřadit "obličej". Každému samostatnému komentátorovi lze přiřadit takzvaný Avatar, který ho reprezentuje. K tomu lze použít několik různých mechanizmů, jak umožnit komentujícím použití avatara, které budou v následujícím textu probrány. -</p> -<p>Vždy je použit první mechanizmus, který nalezne avatara. Další způsoby pak nejsou ani zkoušeny. To znamená, že je třeba seřadit metody v tom pořadí, aby byly co nejdříve použity nejčastěji používané mechanizmy. Způsoby, které poskytnou avatara v každém případě, by měly být umístěny až na konci, protože po nich zařazené metody nebudou přirozeně nikdy uplatněny. -</p> -<p><strong>Důležité:</strong> Tento plugin musí být umístěn v seznamu pluginů před všemi pluginy, které mění odkazy, jako například "Markup: Sledování odchodů" (Exit Tracking Plugin). Jinak nemusejí fungovat například avatary, které jsou generovány na základě odkazů na stránky komentátorů. -</p> -<p>Následuje popis aktuálně dostupných mechanizmů, jak přiřadit avatara komentátorům:</p> -<p><a href="#top">nahoru</a></p> - -<a name="avt_gravatar"></a> -<h3>Gravatar</h3> -<p><a href="http://www.gravatar.com" target="_blank">Gravatar</a> je jedna z nejznámějších služeb pro uživatele avatarů. Uživatele se mohou u této služby registrovat pomocí emailu, na který je vázán obrázek avatara.</p> -<p>Gravatary jsou tedy spřažené s emailem komentátora. Pouze pokud komentátor zadá svůj mail, je možné dotázat se Gravataru, jestli je pro daný mail registrován obrázek avatara.</p> -<p><a href="#top">nahoru</a></p> - -<a name="avt_pavatar"></a> -<h3>Pavatar</h3> -<p><a href="http://www.pavatar.com" target="_blank">Pavatary</a> jsou avatary (obrázky), které pro tento účel nahrál uživatel na svoji domovskou stránku.</p> -<p>Oproti velmi podobným <a href="#avt_favatar">Favatarům</a> sem může uživatel nahrát obrázek avatara v libovolném rozlišení.</p> -<p>V tomto případě se zjišťuje avatar na základě domovské stránky, kterou zadal komentátor, konkrétně jestli tato domovská stránka obsahuje Pavatara. Tento způsob zjišťování avatara je použit přirozeně pouze v případě, že komentátor zadal domovksou webovou stránku.</p> -<p><a href="#top">nahoru</a></p> - -<a name="avt_favatar"></a> -<h3>Favatar</h3> -<p>Toto je koncept, pomocí kterého má spousta vlastníků webových stránek Avatara, aniž pro to musejí cokoliv udělat:</p> -<p>Blog použije jednoduše favicon (ikonku webu) ze stránky, kterou komentátor zadal jako svoji domovskou. -Favicon je obvykle jenom obyčejná ikona, která bývá docela malá a často nevypadá jako avatar. -</p> -<p><a href="#top">nahoru</a></p> - -<a name="avt_twitter"></a> -<h3>Twitter</h3> -<p>V případě, že komentátor zadá adresu domovské stránky jako URL <a href="http://twitter.com" target="_blank">profilu na Twitteru</a>, pak bude tento profil prohledán, jestli obsahuje profilovou fotku, která bude následně použita jako avatar.</p> -<p><i>Poznámka</i>: Pokud je zároveň použito hledání metodou "Favatar", pak musí stát tato metoda Twitter před Favatarem, protože jinak bude místo obrázku z profilu použita favicona Twitteru. Což může být na druhou stranu použito úmyslně, například k jasnému a jednoznačnému označení "tweetbacků" z Twitteru. -</p> -<p><a href="#top">nahoru</a></p> - -<a name="avt_identica"></a> -<h3>Identica</h3> -<p>Toto je zvláštní avatar pro pingbacky <a href="http://identi.ca" target="_blank">Identica</a>. V tomto případě je hledán profilový obrázek uživatele, který poslal pingback.</p> -<p><i>Poznámka</i>: Pokud je zároveň použito hledání metodou "Favatar", pak musí stát tato metoda Identica před Favatarem, protože jinak bude místo obrázku z profilu použita favicona Identicy. Což může být na druhou stranu použito úmyslně, například k jasnému a jednoznačnému označení "tweetbacků" z Identicy. -</p> -<p><a href="#top">nahoru</a></p> - -<a name="avt_mybloglog"></a> -<h3>MyBlogLog</h3> -<p>Toto je opět centrální služba (podobně jako Gravatar). MyBlogLog je služba poskytující blogy, ale zároveň z ní lze získat avatary.</p> -<p>Přítomnost MyBlogLog avatarů je zjištěna z domovské adresy komentátorů. -<p><a href="#top">nahoru</a></p> - -<a name="avt_wavatar"></a> -<h3>Wavatar</h3> -<p>Wavatar je dynamicky vyroben z domovské stránky a emailové adresy komentátorů. Poskytuje pro každého uživatele jiný, ale vždy stejný obrázek. Tímto způsobem je <strong>vždycky</strong> vložen avatar, tedy všechny metody zařazené po této budou ignorovány. Wavatary vypadají asi následovně:</p> -<p align="center"><img src="documentation/wavatars.jpg"/></p> -<p><a href="#top">nahoru</a></p> - -<a name="avt_monsterid"></a> -<h3>MonsterID</h3> -<p>MonsterID avatary jsou generovány stejným mechanizmem jako Wavatary nebo Idnetikony. V tomto případě jsou vygenerovány takovéto roztomilé "příšerky" (monstra).</p> -<p>Podobně jako u Wavataru a Identikon je tímto způsobem <strong>vždycky</strong> vložen avatar, tedy všechny metody zařazené po této budou ignorovány. -<p align="center"><img src="documentation/monsterid.png"/></p> -<p><a href="#top">nahoru</a></p> - -<a name="avt_identicon"></a> -<h3>Identicon/YCon</h3> -<p> -Avatary Identicon (identikony) jsou generovány stejným mechanizmem jako Wavatary nebo MonsterID. V tomto případě jsou vygenerovány abstraktní obrazce.</p> -<p>Podobně jako u Wavataru a MonsterID je tímto způsobem <strong>vždycky</strong> vložen avatar, tedy všechny metody zařazené po této budou ignorovány.</p> -<p align="center"><img src="documentation/identicons.jpg"/></p> -<p><a href="#top">nahoru</a></p> - -<a name="avt_standard"></a> -<h3>Standardavatar</h3> -<p>Metoda "Standardavatar" poskytuje vždycky stejný obrázek pro všechny uživatele. Obrázek, který bude použit, lze zadat v sekci "Nastavení".</p> -<p><a href="#top">nahoru</a></p> - -<a name="config"></a> -<h2>Nastavení</h2> - -<a name="cnf_method"></a> -<h3>Pořadí vložení Avatarů</h3> -<p>Zde je zadáno pořadí zkoušení jednotlivých metod pro zjištšění avatarů ke komentátorům.</p> -<p>V současnosti existuje 6 metod, ze kterých je možné pořadí sestavit. Je třeba dát pozor na to, že metody, které generují avatara pokaždé, jsou poslední, které jsou vyzkoušeny, všechny následující metody jsou ignorovány.</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_standard"></a> -<h3>Standard-Avatar</h3> -<p>URL adresa ke standardnímu avataru. Tady musíte zadat relativní nebo absolutní URL adresu k obrázku standardního avataru.</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_sidbar"></a> -<h3>Zobrazovat v postranním panelu</h3> -<p>Mají se obrázky avatarů zobrazovat i v postranním panelu (poslední komentáře)?</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_showtype"></a> -<h3>Zobrazovat podporované typy avatarů</h3> -<p>Pokud je zaškrtnuto, pak se pod políčkem k vložení komentáře objeví řádek s výčtem podporovaných avatarů.</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_autoralt"></a> -<h3>Jméno autora v atributu ALT</h3> -<p>Normálně je umístěho jméno autora v atributu TITLE u obrázku, atribut ALT je pak vyplněn hvězdičkou "*", aby se v rozvržení stránky nic nerozházelo, pokud nejsou nataženy obrázky. Nicméně z hlediska přístupnosti stránky i pro slepé čtenáře je důležité, aby v atributu ALT něco bylo, protože je to právě tento atribut, který jim je předčítán a podle kterého poznají, co je na obrázku. Pokud tedy chcete podporovat i tyto postižené čtenáře, měli byste tuto volbu povolit.</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_smartify"></a> -<h3>Generovat Smarty Tag</h3> -<p>Pokud je zaškrtnuta tato volby, není obrázek avatara vložen přímo do komentáře, ale místo toho je generován Smarty Tag {$comment.avatar}, který při generování stránky obsahuje HTML kód pro zobrazení obrázku. Tuto volbu byste měli zapnout pouze pokud víte, že šablona vzhledu, kterou požíváte, podporuje tento tag. Jestli tomu tak opravdu je, můžete jednoduše vyzkoušet.</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_alignment"></a> -<h3>Zarovnání</h3> -<p>Pomocí této volby můžete zadat zarovnání avatara vzhledem ke komentáři, tedy pokud nepoužítáve volbu Smarty Tag. V případě, že Smarty Tag používáte, pak musíte k zarovnání obrázku použít odpovídající CSS třídu ve stylopisu.</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_size"></a> -<h3>Velikost obrázku</h3> -<p>Maximální zobrazená velikost avataru v pixelech.</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_cache"></a> -<h3>Doba cachování</h3> -<p>Když mají být avatary dočasně ukládány (doporučeno!), musí být zde uveden počet hodin, během kterých se mají obrázky natahovat z blogového serveru, namísto serveru vzdáleneé avatarové služby. Sice to způsobí lehké zvýšení provozu na vašem blogovém serveru, na druhou stranu se stanou obrázky víceméně nezávislé na přístupnosti serveru externích služeb. "0" znamená vypnutí cachování.</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_gravatar_rating"></a> -<h3>Indikace Gravataru</h3> -<p>Dětská pojistka :)</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_gravatar_fallback"></a> -<h3>Gravatar Fallback (zpracování chyby)</h3> -<p>Metoda Gravatar umožňuje chybovou metodu pro případ, kdy pro uživatele není nalezen žádný avatar. Tou může být jedna z Monster ID, Identicon nebo Wavatar. Pokud nastavíte tuto chybovou metodu pro Gravatara, nebudou zkoušeny žádné další metody pro zjištění avatara, pokud uživatel zadal emailovou adresu.</p> -<p><a href="#top">nahoru</a></p> - -<a name="cnf_gravatar_fallback_always"></a> -<h3>Vždy vyžadovat Gravatar Fallback</h3> -<p>Vyžadovat zpracování chyby Gravatar (Gravatar Fallback) také pokud uživatel nezadal žádný email (ale pokud zadal URL adresu domovské stránky nebo jméno).</p> -<p><a href="#top">nahoru</a></p> - -<a name="changelog"></a> -<h2>Historie verzí (ChangeLog)</h2> - -<ul> -<li>verze 1.54</li> - <ul> - <li>Do jazykové konstanty PLUGIN_EVENT_GRAVATAR_SUPPORTED byl přidán parametr %s pro zobrazení podporovaných avatarových služeb.</li> - </ul> -<li>verze 1.52</li> - <ul> - <li>Změněno zobrazení podporovaných avatarů pod polem pro komentář, aby podporovalo hezké zalamování řádků.</li> - </ul> -<li>verze 1.51</li> - <ul> - <li>Použití funkce strtolower() pro mailové adresy.</li> - </ul> -<li>verze 1.49 [brockhaus]</li> - <ul> - <li>Pavatar v blozích s přesměrováním nefungoval, pokud byl odkaz na Pavatar přístupný pouze v informacích tagu "rel link"</li> - </ul> -<li>verze 1.48 [brockhaus]</li> - <ul> - <li>Oprava: Kompatibilita PHP byla porušena při opravě 1.46 :-/</li> - <li>Přidán avatar Identica. Použito hlavně pro pingbacky Indetica a mělo by být použito před Favatarem, jinak se bude zobrazovat značka Identica místo obrázku uživatele.</li> - <li>Vyčištění kódu</li> - </ul> -<li>verze 1.47 [brockhaus]</li> - <ul> - <li>Vypnutí ladicích výpisů v template_c</li> - </ul> -<li>verze 1.46 [brockhaus]</li> - <ul> - <li>Přidán Twitter Avatar (pokud URL odkazuje na profil na Twitteru). To je většinou použito pro Tweetbacky a mělo by být použito před Favatarem, jinak se bude zobrazovat logo Twitteru.</li> - <li>Vyčištění kódu</li> - </ul> -<li>verze 1.45 [brockhaus]</li> - <ul> - <li>Nápověda</li> - <li>Vyčištění</li> - </ul> -<li>verze 1.44 [brockhaus]</li> - <ul> - <li>Přidána podpora Wavatarů</li> - <li>Podpora pro ošetření chyb (fallback) Gravataru pomocí indetyicon, MonsterID a Wavataru.</li> - <li>Optimalizace zpětných volání (trackback) avatarů: Querypars budou odstřiženy z URL. Nyní v ukázkovém Serendipity blogu dostanete vždycky stejného cachovaného Avatara, ne samostatného pro jiné stránky.</li> - </ul> -<li>verze 1.43 [brockhaus]</li> - <ul> - <li>Volba nastavení pro přidání jména autora do attributu ALT u obrázku avatara. Normálně je to vyplněno hvězdičkou "*", ale slepci jsou při prohlížení stránek závislí na tagu ALT, který jim čtečky předčítají, aby se dozvěděli, co je obsahem obrázku.</li> - </ul> -<li>verze 1.42 [brockhaus]</li> - <ul> - <li>Kódování podtržítka "_" v URL adresách uživatelů, aby se odlišily od oddělovačů. Funkce "urlencode" je nekóduje. Díky uživateli [Tino Schwarze] za objevení a opravu.</li> - </ul> -<li>verze 1.41 [garvinhicking]</li> - <ul> - <li>Opravena hlavička "Last-Modified" u obrázků avatarů.</li> - </ul> -<li>verze 1.40</li> - <ul> - <li>Přidána podpora Ycon (<a href="http://moblog.wiredwings.com">http://moblog.wiredwings.com<a/>)(</li> - </ul> -<li>verze 1.39 [brockhaus]</li> - <ul> - <li>Avatary Monster ID je nyní také cachován, protože jejich vytváření trvá dlouho.</li> - </ul> -<li>verze 1.38 [brockhaus]</li> - <ul> - <li>Podpora Monster ID avatarů (podrobnosti naleznete na <a href="http://www.splitbrain.org/go/monsterid">http://www.splitbrain.org/go/monsterid</a>)</li> - <li>Selhání při čerstvé instalaci a času cache nastaveném na 0.</li> - <li>Podpora nastavení absolutní cesty k standardnímu avataru.</li> - <li>Po uložení nastavení je nyní cache <b>vždy</b> vyčištěna, aby byly změny viditelné ihned, dokonce i když je cachování zapnuto.</li> - <li>Pokud plugin nemůže zapisovat do cache, pak to v ladicím módu zapíše do logu a zobrazí výchozí obrázek, pokud není nalezen cachovaný soubor.</li> - </ul> -<li>verze 1.37 [brockhaus]</li> - <ul> - <li>Řádka pod oknem komentáře informující o podporovaných typech avatarů lze skrýt pomocí nastavení.</li> - </ul> -<li>verze 1.36 [brockhaus]</li> - <ul> - <li>Přidána nová volba: Můžete nastavit, že plugin nebude vytvářet avatary přímo, ale místo toho pouze tag pro smarty. Pokud je tato volba zapnutá, můžete si definovat v šabloně pro komentáře, kde se mají avatary zobrazovat, a to pomocí tagu $comment.comment_avatar.</li> - <li>CSS třída avataru se bude měnit podle toho, kde je zobrazen. Pro normální komentáře bude mít třídu "comment_avatar", pro plugin "nejnovější příspěvky" to bude třída "serendipity_plugin_comments_avatar", aby byla možnost jednoduše je označit, ostylovat.</li> - <li>Nastavení zarovnání avatarů: Nastavení zarovnání bude použito, pokud je avatar vykreslen přímo (ne pomocí smarty).</li> - <li>Nová volba pro vypínání/zapínání obrázků avatarů v postranním sloupci (nejnovější komentáře).</li> - <li>Podporovaní metody avatarů se zobrazovaly i pod kontaktním formulářem, což ale nemělo logický smysl. V tomto fromuláři byly tedy avatary vypnuty.</li> - <li>Další změny v jazykových souborech.</li> - </ul> -<li>verze 1.35 [brockhaus]</li> - <ul> - <li>Opraveny chyby v anglickém jazykovém souboru. (Díky Donovi!)</li> - </ul> -<li>verze 1.34 [brockhaus]</li> - <ul> - <li>Hodnocení Gravatarů nepracuje spolehlivě. Můj Gravatar hodnocený jako G je zobrazen pouze při použití hodnocení gravatarů X. :-/<br /> - Přidána volba pro vypnutí parametru hodnocení Gravatarů, což by mělo mít stejný efekt jako nastavení hodnocení X.</li> - </ul> -<li>verze 1.33 [brockhaus]</li> - <ul> - <li>Pavatar: X-Pavatar Header je nyní znovu podporován a je první použitou metodou automatické detekce Pavatara.</li> - </ul> -<li>verze 1.32 [brockhaus]</li> - <ul> - <li>Výchozí avatar MyBlogLog nebyl správně detekování. :-/</li> - <li>Pokud není zadán email ani url adresa, ale je definován výchozí avatar, je nyní zobrazen právě výchozí avatar.</li> - </ul> -<li>verze 1.31 [brockhaus]</li> - <ul> - <li>Změna času volání (call-time) chyby (pass-by-reference) (fetchAvatar).</li> - </ul> -<li>verze 1.30 [brockhaus]</li> - <ul> - <li>Standradní Avatar se nezobrazoval, pokud byl blog nainstalován v podadresáři webu a ne přímo v kořenové složce.</li> - <li>Odkaz na Gravatara byl trochu špatně (přesto fungoval).</li> - </ul> -<li>verze 1.29 [brockhaus]</li> - <ul> - <li>Oprava chyby 1.27 přidávala k URL "http://", i když nebyla zadána vůbec žádná URL adresa.</li> - </ul> -<li>verze 1.28 [brockhaus]</li> - <ul> - <li>V Serendipity 1.1 nebylo možné natavit výchozího avatara. Nastavení nebylo kompatibilní s verzí Serendipity 1.1.</li> - </ul> -<li>verze 1.27 [brockhaus]</li> - <ul> - <li>Pokud pisatel zadal svoji adresu jako "www.domena.cz" místo "http://www.domena.cz", Avatar nebyl načten správně.</li> - </ul> -<li>verze 1.26 [brockhaus]</li> - <ul> - <li>MyBlogLog trochu pozměnil způsob volání avatara, což mělo za následek, že ošetření chybových výstupů (fallback) pro MyBlogLog přestal fungovat.</li> - </ul> -<li>verze 1.25 [garvinhicking]</li> - <ul> - <li>Zarovnání (algin) nahraceno definicí pomocí CSS stylů, takže XHTML už neobsahuje žádné definice zarovnání.</li> - </ul> -<li>verze 1.24 [brockhaus]</li> - <ul> - <li>Kontrola odpovědi MyBlogLog, jestli obsahuje opravdu obrázek.</li> - <li>Vyčištění paměti cache při nastavení hodnoty cachování na 0.</li> - <li>Vypnutí ladicích výpisů.</li> - </ul> -<li>verze 1.23 [brockhaus]</li> - <ul> - <li>Při vkládání čerstvých P/favatarů, plugin přijme pouze odpovědi označené vzdáleným serverem jako obrázky. To zamezí přijetí potenciálních html stránek jako obrázku avatara.</li> - </ul> -<li>verze 1.22 [brockhaus]</li> - <ul> - <li>Vkládání i přesměrovaných P/Favatarů.</li> - </ul> -<li>verze 1.21 [brockhaus]</li> - <ul> - <li>Vkládání avatarů se rozbilo při vypnutí cache.</li> - <li>Prohlížeč nebyl schopen cachovat výchozí avatary kvůli špatně nastavenému času cache.</li> - <li>Kontrola, jestli cachovaný soubor vypadá jako obrázek, předtím, než je odeslán na klienta.</li> - </ul> -<li>verze 1.20 [brockhaus]</li> - <ul> - <li>Titulek obrázku avatara nyní zobrazuje jméno autora místo "Avatar" (V.)</li> - </ul> -<li>verze 1.19 [brockhaus]</li> - <ul> - <li>Využití cache prohlížeče má za následek dobré vylepšení výkonu!</li> - </ul> -<li>verze 1.18 [brockhaus]</li> - <ul> - <li>Vypnutí ladicích výpisů</li> - </ul> -<li>verze 1.17 [brockhaus]</li> - <ul> - <li>Pokud je zapnuto cachování, je nyní cachováno <b>všechno</b>. Známí přispěvatelé a komentátoři nyní nezpůsobí <b>žádné</b> volání cizích serverů, pokud už jsou jejich obrázky cachovány. Velmi pěkné posílení výkonu. Díky Garvinovi za nápad.</li> - <li>Záplata proti hackování od uživatele [garvinhickins]</li> - </ul> -<li>verze 1.16 [garvinhicking]</li> - <ul> - <li>uhlazení kódu</li> - </ul> -<li>verze 1.14 [brockhaus]</li> - <ul> - <li>Implementováno zpracování chyb pro MyBlogLog! :-) Ale je pomalé, dokonce i s optimalizací pomocí cachování. MyBlogLog by neměl být první v pořadí avatarů.</li> - <li>Přidána pátá kolonka pro výběr metody avatarů, protože MyBlogLog nyní také podporuje zpracování chyb (fallback).</li> - </ul> -<li>verze 1.13 [brockhaus]</li> - <ul> - <li>Doporučení změněno: Není to plugin "statistika", který znefunkční Pavatary/Favatary, ale plugin "sledování odchodů" (exit tracking plugin)</li> - </ul> -<li>verze 1.12 [brockhaus]</li> - <ul> - <li>MyBlogLog avatary jsou nyní také cachovány.</li> - <li>Stránky s přesměrováním na výchozí stránku, pokud nebyla nalazena výchozí položka, jsou nyní podporovány. Dřívější plugin avatar předpokládal, že výchozí stránka ja P/Favatar.</li> - <li>Výchozí nastavení pořadí avatarů je nyní: Gravatar -> Pavatar - -> Favatar -> výchozí Avatar</li> - <li>Přidáno doporučení, že plugin by měl být zařazen před pluginy, které mění odkazy.</li> - <li>Načítání nastavené cesty pluginu. Dříve to byl vždy adresář 'plugin'.</li> - <li>Vyřazeno nastavení okraje gravatara, protože už nefunguje (napořád?).</li> - </ul> -<li>verze 1.11 [brockhaus], testovací verze nebyla releasována do CVS/Spartacus</li> - <ul> - <li>Fallback (zpracování chyby) pro Gravatar funguje! Ale zobrazuje výchozího avatara nezávisle na nastavení. Takže toto nastavení bylo smazáno.</li> - </ul> -<li>verze 1.10 [brockhaus]</li> - <ul> - <li>Informace o Pavatar / Avatar nebyly nikdy načtené z cache</li> - <li>...ale po načtení z cache způsobily nekonečnou smyčku pro obrázky načtené z lokálního blogu (pokud byl povolen postranní blugin s komentáři - comment sidebar)</li> - <li>Nastavení výšky obrázku bylo pojmenováno "height" ... :-/</li> - <li>Cachování Gravataru nefungovalo spolehlivě, pokud byl nastaven výchozí avatar.</li> - </ul> -<li>verze 1.9 [brockhaus]</li> - <ul> - <li>Při hledání Pavatara byl natažen Favatar jako Pavatar, pokud nebyl nalezen Pavatar, ale favicon. Díky uživateli [El Burro]</li> - </ul> -<li>verze 1.8 [brockhaus]</li> - <ul> - <li>Plugin nebych schopen načíst Favatary/Pavatary, pokud bylo přesměrování nasměrováno na URL stránky nastavené jako domovská stránka komentujícího. Třeba Garvin má takový blog...</li> - </ul> -<li>verze 1.7 [brockhaus]</li> - <ul> - <li>Přidána podpora Pavatarů (<a href="www.pavatar.com">www.pavatar.com</a>)</li> - <li>Přidána podpora MyBlogLog avatarů (<a href="www.pavatar.com">www.mybloglog.com</a>)</li> - <li>Pořadí pro výběr avatarů a jaké typy avatarů jsou podporovány, vše je nyní nastavitelné.</li> - <li>Standardní avatar může být jeden z nich (měl by být poslední).</li> - <li>Volba pro nenastavení Gravatara jako výchozího avatara, i když je definovaný. (Chceme méně datových profilů...)</li> - <li>Vložení výchozího avatara pomocí mediatéky v nastavení pluginu.</li> - <li>Velikost obrázku je nyní zajištěna pomocí HTML kódu.</li> - <li>Pod polem pro komentář jsou zobrazovány pouze aktuálně nastavené metody avatara jako podporované.</li> - </ul> -<li>verze 1.6 [garvinhickins]</li> -<li>verze 1.5 [garvinhickins]</li> -<li>verze 1.4 [garvinhickins]</li> -<li>verze 1.3 [garvinhickins]</li> - <ul> - <li>Opraveny chyby neplatnosti domény</li> - </ul> -</ul> -<p><a href="#top">nahoru</a></p> - -</body> -</html> diff --git a/plugins/serendipity_event_gravatar/UTF-8/lang_cs.inc.php b/plugins/serendipity_event_gravatar/UTF-8/lang_cs.inc.php index f2690be6..e31d5f09 100644 --- a/plugins/serendipity_event_gravatar/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_event_gravatar/UTF-8/lang_cs.inc.php @@ -59,4 +59,5 @@ @define('PLUGIN_EVENT_GRAVATAR_FALLBACK', 'Gravatar fallback'); @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_DESC', 'Gravatar má implementovaných několik návratových metod pro případ, že pro požadovaného uživatele není znám žádný avatar. Implementovány jsou též Moster ID, Identicon a Wavatar. Pokud vyberete některý z těchto zíněných, nebudou uskutečňovány žádné další pokusy o načtení avataru, pokud uživatel zadá email.'); @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS', 'Vždy návratová hodnota pro Gravatar'); -@define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC', 'Používat návratovou hodnotu Gravatar i v případě, že uživatel nezadá email (zadá tedy url nebo jméno)'); \ No newline at end of file +@define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC', 'Používat návratovou hodnotu Gravatar i v případě, že uživatel nezadá email (zadá tedy url nebo jméno)'); + diff --git a/plugins/serendipity_event_gravatar/UTF-8/lang_cz.inc.php b/plugins/serendipity_event_gravatar/UTF-8/lang_cz.inc.php index f2690be6..e31d5f09 100644 --- a/plugins/serendipity_event_gravatar/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_event_gravatar/UTF-8/lang_cz.inc.php @@ -59,4 +59,5 @@ @define('PLUGIN_EVENT_GRAVATAR_FALLBACK', 'Gravatar fallback'); @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_DESC', 'Gravatar má implementovaných několik návratových metod pro případ, že pro požadovaného uživatele není znám žádný avatar. Implementovány jsou též Moster ID, Identicon a Wavatar. Pokud vyberete některý z těchto zíněných, nebudou uskutečňovány žádné další pokusy o načtení avataru, pokud uživatel zadá email.'); @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS', 'Vždy návratová hodnota pro Gravatar'); -@define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC', 'Používat návratovou hodnotu Gravatar i v případě, že uživatel nezadá email (zadá tedy url nebo jméno)'); \ No newline at end of file +@define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC', 'Používat návratovou hodnotu Gravatar i v případě, že uživatel nezadá email (zadá tedy url nebo jméno)'); + diff --git a/plugins/serendipity_event_gravatar/UTF-8/lang_de.inc.php b/plugins/serendipity_event_gravatar/UTF-8/lang_de.inc.php index 83d2bd2e..53708b1a 100644 --- a/plugins/serendipity_event_gravatar/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_gravatar/UTF-8/lang_de.inc.php @@ -1,4 +1,4 @@ -<?php # lang_de.inc.php 1.17 2009-08-20 10:10:36 VladaAjgl $ +<?php /** * @version 1.17 @@ -64,4 +64,5 @@ @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC', 'Gravatar Fallbacks auch dann benutzen, wenn der Benutzer keine EMail (aber eine URL oder einen Namen) eingegeben hat.'); // Next lines were translated on 2009/08/20 -@define('PLUGIN_EVENT_GRAVATAR_METHOD_DESC', 'Wenn die vorherigen Methoden fehlschlagen, versuche diese. Der Typ "' . PLUGIN_EVENT_GRAVATAR_METHOD_DEFAULT . '", "Monster ID", "Wavatar", "Identicon" und "---" wird niemals fehlschlagen. Alles unterhalb dieser Methoden wird nicht versucht.'); \ No newline at end of file +@define('PLUGIN_EVENT_GRAVATAR_METHOD_DESC', 'Wenn die vorherigen Methoden fehlschlagen, versuche diese. Der Typ "' . PLUGIN_EVENT_GRAVATAR_METHOD_DEFAULT . '", "Monster ID", "Wavatar", "Identicon" und "---" wird niemals fehlschlagen. Alles unterhalb dieser Methoden wird nicht versucht.'); + diff --git a/plugins/serendipity_event_gravatar/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_gravatar/UTF-8/lang_pl.inc.php index 84d537d8..04b84624 100644 --- a/plugins/serendipity_event_gravatar/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_gravatar/UTF-8/lang_pl.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -62,3 +62,4 @@ '<b><a href="://www.splitbrain.org/go/monsterid" target="_blank">Monster ID avatars</a></b> are localy created monster images unique for each writer.'); @define('PLUGIN_EVENT_GRAVATAR_EXTLING_WARNING', '<font color="red">CAUTION!</font> This plugin has to be executed before any plugin changing links (like i.e. the exit tracking plugin)! ' . '<font color="red">Else Pavatars, Favatars and MayBlogLog avatars won\'t work!</font>'); + diff --git a/plugins/serendipity_event_gravatar/documentation/documentation.css b/plugins/serendipity_event_gravatar/documentation/documentation.css index 8e08128d..344109bb 100644 --- a/plugins/serendipity_event_gravatar/documentation/documentation.css +++ b/plugins/serendipity_event_gravatar/documentation/documentation.css @@ -1,11 +1,12 @@ body { - font-family: Arial, sans-serif!important; - margin: 20; + font-family: Arial, sans-serif!important; + margin: 20; } #title { - background: #cfcfcf; + background: #cfcfcf; margin: 0; -}#content { - background: #efefef; +} +#content { + background: #efefef; margin: 0; -} \ No newline at end of file +} diff --git a/plugins/serendipity_event_gravatar/documentation_cs.html b/plugins/serendipity_event_gravatar/documentation_cs.html index b07b967c..8ebae732 100644 --- a/plugins/serendipity_event_gravatar/documentation_cs.html +++ b/plugins/serendipity_event_gravatar/documentation_cs.html @@ -49,7 +49,7 @@ <li><a href="#cnf_gravatar_fallback_always">V�dy vy�adovat Gravatar Fallback</a></li> </ol> - <li><a href="#changelog">ChangeLog (historie verz�)</a></li> + <li><a href="#changelog">ChangeLog (historie verz�)</a></li> </ol> </div> @@ -200,232 +200,232 @@ Avatary Identicon (identikony) jsou generov <ul> <li>verze 1.54</li> - <ul> - <li>Do jazykov� konstanty PLUGIN_EVENT_GRAVATAR_SUPPORTED byl p�id�n parametr %s pro zobrazen� podporovan�ch avatarov�ch slu�eb.</li> - </ul> + <ul> + <li>Do jazykov� konstanty PLUGIN_EVENT_GRAVATAR_SUPPORTED byl p�id�n parametr %s pro zobrazen� podporovan�ch avatarov�ch slu�eb.</li> + </ul> <li>verze 1.52</li> - <ul> - <li>Zm�n�no zobrazen� podporovan�ch avatar� pod polem pro koment��, aby podporovalo hezk� zalamov�n� ��dk�.</li> - </ul> + <ul> + <li>Zm�n�no zobrazen� podporovan�ch avatar� pod polem pro koment��, aby podporovalo hezk� zalamov�n� ��dk�.</li> + </ul> <li>verze 1.51</li> - <ul> - <li>Pou�it� funkce strtolower() pro mailov� adresy.</li> - </ul> + <ul> + <li>Pou�it� funkce strtolower() pro mailov� adresy.</li> + </ul> <li>verze 1.49 [brockhaus]</li> - <ul> - <li>Pavatar v bloz�ch s p�esm�rov�n�m nefungoval, pokud byl odkaz na Pavatar p��stupn� pouze v informac�ch tagu "rel link"</li> - </ul> + <ul> + <li>Pavatar v bloz�ch s p�esm�rov�n�m nefungoval, pokud byl odkaz na Pavatar p��stupn� pouze v informac�ch tagu "rel link"</li> + </ul> <li>verze 1.48 [brockhaus]</li> - <ul> - <li>Oprava: Kompatibilita PHP byla poru�ena p�i oprav� 1.46 :-/</li> - <li>P�id�n avatar Identica. Pou�ito hlavn� pro pingbacky Indetica a m�lo by b�t pou�ito p�ed Favatarem, jinak se bude zobrazovat zna�ka Identica m�sto obr�zku u�ivatele.</li> - <li>Vy�i�t�n� k�du</li> - </ul> + <ul> + <li>Oprava: Kompatibilita PHP byla poru�ena p�i oprav� 1.46 :-/</li> + <li>P�id�n avatar Identica. Pou�ito hlavn� pro pingbacky Indetica a m�lo by b�t pou�ito p�ed Favatarem, jinak se bude zobrazovat zna�ka Identica m�sto obr�zku u�ivatele.</li> + <li>Vy�i�t�n� k�du</li> + </ul> <li>verze 1.47 [brockhaus]</li> - <ul> - <li>Vypnut� ladic�ch v�pis� v template_c</li> - </ul> + <ul> + <li>Vypnut� ladic�ch v�pis� v template_c</li> + </ul> <li>verze 1.46 [brockhaus]</li> - <ul> - <li>P�id�n Twitter Avatar (pokud URL odkazuje na profil na Twitteru). To je v�t�inou pou�ito pro Tweetbacky a m�lo by b�t pou�ito p�ed Favatarem, jinak se bude zobrazovat logo Twitteru.</li> - <li>Vy�i�t�n� k�du</li> - </ul> + <ul> + <li>P�id�n Twitter Avatar (pokud URL odkazuje na profil na Twitteru). To je v�t�inou pou�ito pro Tweetbacky a m�lo by b�t pou�ito p�ed Favatarem, jinak se bude zobrazovat logo Twitteru.</li> + <li>Vy�i�t�n� k�du</li> + </ul> <li>verze 1.45 [brockhaus]</li> - <ul> - <li>N�pov�da</li> - <li>Vy�i�t�n�</li> - </ul> + <ul> + <li>N�pov�da</li> + <li>Vy�i�t�n�</li> + </ul> <li>verze 1.44 [brockhaus]</li> - <ul> - <li>P�id�na podpora Wavatar�</li> - <li>Podpora pro o�et�en� chyb (fallback) Gravataru pomoc� indetyicon, MonsterID a Wavataru.</li> - <li>Optimalizace zp�tn�ch vol�n� (trackback) avatar�: Querypars budou odst�i�eny z URL. Nyn� v uk�zkov�m Serendipity blogu dostanete v�dycky stejn�ho cachovan�ho Avatara, ne samostatn�ho pro jin� str�nky.</li> - </ul> + <ul> + <li>P�id�na podpora Wavatar�</li> + <li>Podpora pro o�et�en� chyb (fallback) Gravataru pomoc� indetyicon, MonsterID a Wavataru.</li> + <li>Optimalizace zp�tn�ch vol�n� (trackback) avatar�: Querypars budou odst�i�eny z URL. Nyn� v uk�zkov�m Serendipity blogu dostanete v�dycky stejn�ho cachovan�ho Avatara, ne samostatn�ho pro jin� str�nky.</li> + </ul> <li>verze 1.43 [brockhaus]</li> - <ul> - <li>Volba nastaven� pro p�id�n� jm�na autora do attributu ALT u obr�zku avatara. Norm�ln� je to vypln�no hv�zdi�kou "*", ale slepci jsou p�i prohl�en� str�nek z�visl� na tagu ALT, kter� jim �te�ky p�ed��taj�, aby se dozv�d�li, co je obsahem obr�zku.</li> - </ul> + <ul> + <li>Volba nastaven� pro p�id�n� jm�na autora do attributu ALT u obr�zku avatara. Norm�ln� je to vypln�no hv�zdi�kou "*", ale slepci jsou p�i prohl�en� str�nek z�visl� na tagu ALT, kter� jim �te�ky p�ed��taj�, aby se dozv�d�li, co je obsahem obr�zku.</li> + </ul> <li>verze 1.42 [brockhaus]</li> - <ul> - <li>K�dov�n� podtr��tka "_" v URL adres�ch u�ivatel�, aby se odli�ily od odd�lova��. Funkce "urlencode" je nek�duje. D�ky u�ivateli [Tino Schwarze] za objeven� a opravu.</li> - </ul> + <ul> + <li>K�dov�n� podtr��tka "_" v URL adres�ch u�ivatel�, aby se odli�ily od odd�lova��. Funkce "urlencode" je nek�duje. D�ky u�ivateli [Tino Schwarze] za objeven� a opravu.</li> + </ul> <li>verze 1.41 [garvinhicking]</li> - <ul> - <li>Opravena hlavi�ka "Last-Modified" u obr�zk� avatar�.</li> - </ul> + <ul> + <li>Opravena hlavi�ka "Last-Modified" u obr�zk� avatar�.</li> + </ul> <li>verze 1.40</li> - <ul> - <li>P�id�na podpora Ycon (<a href="http://moblog.wiredwings.com">http://moblog.wiredwings.com<a/>)(</li> - </ul> + <ul> + <li>P�id�na podpora Ycon (<a href="http://moblog.wiredwings.com">http://moblog.wiredwings.com<a/>)(</li> + </ul> <li>verze 1.39 [brockhaus]</li> - <ul> - <li>Avatary Monster ID je nyn� tak� cachov�n, proto�e jejich vytv��en� trv� dlouho.</li> - </ul> + <ul> + <li>Avatary Monster ID je nyn� tak� cachov�n, proto�e jejich vytv��en� trv� dlouho.</li> + </ul> <li>verze 1.38 [brockhaus]</li> - <ul> - <li>Podpora Monster ID avatar� (podrobnosti naleznete na <a href="http://www.splitbrain.org/go/monsterid">http://www.splitbrain.org/go/monsterid</a>)</li> - <li>Selh�n� p�i �erstv� instalaci a �asu cache nastaven�m na 0.</li> - <li>Podpora nastaven� absolutn� cesty k standardn�mu avataru.</li> - <li>Po ulo�en� nastaven� je nyn� cache <b>v�dy</b> vy�i�t�na, aby byly zm�ny viditeln� ihned, dokonce i kdy� je cachov�n� zapnuto.</li> - <li>Pokud plugin nem��e zapisovat do cache, pak to v ladic�m m�du zap�e do logu a zobraz� v�choz� obr�zek, pokud nen� nalezen cachovan� soubor.</li> - </ul> + <ul> + <li>Podpora Monster ID avatar� (podrobnosti naleznete na <a href="http://www.splitbrain.org/go/monsterid">http://www.splitbrain.org/go/monsterid</a>)</li> + <li>Selh�n� p�i �erstv� instalaci a �asu cache nastaven�m na 0.</li> + <li>Podpora nastaven� absolutn� cesty k standardn�mu avataru.</li> + <li>Po ulo�en� nastaven� je nyn� cache <b>v�dy</b> vy�i�t�na, aby byly zm�ny viditeln� ihned, dokonce i kdy� je cachov�n� zapnuto.</li> + <li>Pokud plugin nem��e zapisovat do cache, pak to v ladic�m m�du zap�e do logu a zobraz� v�choz� obr�zek, pokud nen� nalezen cachovan� soubor.</li> + </ul> <li>verze 1.37 [brockhaus]</li> - <ul> - <li>��dka pod oknem koment��e informuj�c� o podporovan�ch typech avatar� lze skr�t pomoc� nastaven�.</li> - </ul> + <ul> + <li>��dka pod oknem koment��e informuj�c� o podporovan�ch typech avatar� lze skr�t pomoc� nastaven�.</li> + </ul> <li>verze 1.36 [brockhaus]</li> - <ul> - <li>P�id�na nov� volba: M��ete nastavit, �e plugin nebude vytv��et avatary p��mo, ale m�sto toho pouze tag pro smarty. Pokud je tato volba zapnut�, m��ete si definovat v �ablon� pro koment��e, kde se maj� avatary zobrazovat, a to pomoc� tagu $comment.comment_avatar.</li> - <li>CSS t��da avataru se bude m�nit podle toho, kde je zobrazen. Pro norm�ln� koment��e bude m�t t��du "comment_avatar", pro plugin "nejnov�j�� p��sp�vky" to bude t��da "serendipity_plugin_comments_avatar", aby byla mo�nost jednodu�e je ozna�it, ostylovat.</li> - <li>Nastaven� zarovn�n� avatar�: Nastaven� zarovn�n� bude pou�ito, pokud je avatar vykreslen p��mo (ne pomoc� smarty).</li> - <li>Nov� volba pro vyp�n�n�/zap�n�n� obr�zk� avatar� v postrann�m sloupci (nejnov�j�� koment��e).</li> - <li>Podporovan� metody avatar� se zobrazovaly i pod kontaktn�m formul��em, co� ale nem�lo logick� smysl. V tomto fromul��i byly tedy avatary vypnuty.</li> - <li>Dal�� zm�ny v jazykov�ch souborech.</li> - </ul> + <ul> + <li>P�id�na nov� volba: M��ete nastavit, �e plugin nebude vytv��et avatary p��mo, ale m�sto toho pouze tag pro smarty. Pokud je tato volba zapnut�, m��ete si definovat v �ablon� pro koment��e, kde se maj� avatary zobrazovat, a to pomoc� tagu $comment.comment_avatar.</li> + <li>CSS t��da avataru se bude m�nit podle toho, kde je zobrazen. Pro norm�ln� koment��e bude m�t t��du "comment_avatar", pro plugin "nejnov�j�� p��sp�vky" to bude t��da "serendipity_plugin_comments_avatar", aby byla mo�nost jednodu�e je ozna�it, ostylovat.</li> + <li>Nastaven� zarovn�n� avatar�: Nastaven� zarovn�n� bude pou�ito, pokud je avatar vykreslen p��mo (ne pomoc� smarty).</li> + <li>Nov� volba pro vyp�n�n�/zap�n�n� obr�zk� avatar� v postrann�m sloupci (nejnov�j�� koment��e).</li> + <li>Podporovan� metody avatar� se zobrazovaly i pod kontaktn�m formul��em, co� ale nem�lo logick� smysl. V tomto fromul��i byly tedy avatary vypnuty.</li> + <li>Dal�� zm�ny v jazykov�ch souborech.</li> + </ul> <li>verze 1.35 [brockhaus]</li> - <ul> - <li>Opraveny chyby v anglick�m jazykov�m souboru. (D�ky Donovi!)</li> - </ul> + <ul> + <li>Opraveny chyby v anglick�m jazykov�m souboru. (D�ky Donovi!)</li> + </ul> <li>verze 1.34 [brockhaus]</li> - <ul> - <li>Hodnocen� Gravatar� nepracuje spolehliv�. M�j Gravatar hodnocen� jako G je zobrazen pouze p�i pou�it� hodnocen� gravatar� X. :-/<br /> - P�id�na volba pro vypnut� parametru hodnocen� Gravatar�, co� by m�lo m�t stejn� efekt jako nastaven� hodnocen� X.</li> - </ul> + <ul> + <li>Hodnocen� Gravatar� nepracuje spolehliv�. M�j Gravatar hodnocen� jako G je zobrazen pouze p�i pou�it� hodnocen� gravatar� X. :-/<br /> + P�id�na volba pro vypnut� parametru hodnocen� Gravatar�, co� by m�lo m�t stejn� efekt jako nastaven� hodnocen� X.</li> + </ul> <li>verze 1.33 [brockhaus]</li> - <ul> - <li>Pavatar: X-Pavatar Header je nyn� znovu podporov�n a je prvn� pou�itou metodou automatick� detekce Pavatara.</li> - </ul> + <ul> + <li>Pavatar: X-Pavatar Header je nyn� znovu podporov�n a je prvn� pou�itou metodou automatick� detekce Pavatara.</li> + </ul> <li>verze 1.32 [brockhaus]</li> - <ul> - <li>V�choz� avatar MyBlogLog nebyl spr�vn� detekov�n�. :-/</li> - <li>Pokud nen� zad�n email ani url adresa, ale je definov�n v�choz� avatar, je nyn� zobrazen pr�v� v�choz� avatar.</li> - </ul> + <ul> + <li>V�choz� avatar MyBlogLog nebyl spr�vn� detekov�n�. :-/</li> + <li>Pokud nen� zad�n email ani url adresa, ale je definov�n v�choz� avatar, je nyn� zobrazen pr�v� v�choz� avatar.</li> + </ul> <li>verze 1.31 [brockhaus]</li> - <ul> - <li>Zm�na �asu vol�n� (call-time) chyby (pass-by-reference) (fetchAvatar).</li> - </ul> + <ul> + <li>Zm�na �asu vol�n� (call-time) chyby (pass-by-reference) (fetchAvatar).</li> + </ul> <li>verze 1.30 [brockhaus]</li> - <ul> - <li>Standradn� Avatar se nezobrazoval, pokud byl blog nainstalov�n v podadres��i webu a ne p��mo v ko�enov� slo�ce.</li> - <li>Odkaz na Gravatara byl trochu �patn� (p�esto fungoval).</li> - </ul> + <ul> + <li>Standradn� Avatar se nezobrazoval, pokud byl blog nainstalov�n v podadres��i webu a ne p��mo v ko�enov� slo�ce.</li> + <li>Odkaz na Gravatara byl trochu �patn� (p�esto fungoval).</li> + </ul> <li>verze 1.29 [brockhaus]</li> - <ul> - <li>Oprava chyby 1.27 p�id�vala k URL "http://", i kdy� nebyla zad�na v�bec ��dn� URL adresa.</li> - </ul> + <ul> + <li>Oprava chyby 1.27 p�id�vala k URL "http://", i kdy� nebyla zad�na v�bec ��dn� URL adresa.</li> + </ul> <li>verze 1.28 [brockhaus]</li> - <ul> - <li>V Serendipity 1.1 nebylo mo�n� natavit v�choz�ho avatara. Nastaven� nebylo kompatibiln� s verz� Serendipity 1.1.</li> - </ul> + <ul> + <li>V Serendipity 1.1 nebylo mo�n� natavit v�choz�ho avatara. Nastaven� nebylo kompatibiln� s verz� Serendipity 1.1.</li> + </ul> <li>verze 1.27 [brockhaus]</li> - <ul> - <li>Pokud pisatel zadal svoji adresu jako "www.domena.cz" m�sto "http://www.domena.cz", Avatar nebyl na�ten spr�vn�.</li> - </ul> + <ul> + <li>Pokud pisatel zadal svoji adresu jako "www.domena.cz" m�sto "http://www.domena.cz", Avatar nebyl na�ten spr�vn�.</li> + </ul> <li>verze 1.26 [brockhaus]</li> - <ul> - <li>MyBlogLog trochu pozm�nil zp�sob vol�n� avatara, co� m�lo za n�sledek, �e o�et�en� chybov�ch v�stup� (fallback) pro MyBlogLog p�estal fungovat.</li> - </ul> + <ul> + <li>MyBlogLog trochu pozm�nil zp�sob vol�n� avatara, co� m�lo za n�sledek, �e o�et�en� chybov�ch v�stup� (fallback) pro MyBlogLog p�estal fungovat.</li> + </ul> <li>verze 1.25 [garvinhicking]</li> - <ul> - <li>Zarovn�n� (algin) nahraceno definic� pomoc� CSS styl�, tak�e XHTML u� neobsahuje ��dn� definice zarovn�n�.</li> - </ul> + <ul> + <li>Zarovn�n� (algin) nahraceno definic� pomoc� CSS styl�, tak�e XHTML u� neobsahuje ��dn� definice zarovn�n�.</li> + </ul> <li>verze 1.24 [brockhaus]</li> - <ul> - <li>Kontrola odpov�di MyBlogLog, jestli obsahuje opravdu obr�zek.</li> - <li>Vy�i�t�n� pam�ti cache p�i nastaven� hodnoty cachov�n� na 0.</li> - <li>Vypnut� ladic�ch v�pis�.</li> - </ul> + <ul> + <li>Kontrola odpov�di MyBlogLog, jestli obsahuje opravdu obr�zek.</li> + <li>Vy�i�t�n� pam�ti cache p�i nastaven� hodnoty cachov�n� na 0.</li> + <li>Vypnut� ladic�ch v�pis�.</li> + </ul> <li>verze 1.23 [brockhaus]</li> - <ul> - <li>P�i vkl�d�n� �erstv�ch P/favatar�, plugin p�ijme pouze odpov�di ozna�en� vzd�len�m serverem jako obr�zky. To zamez� p�ijet� potenci�ln�ch html str�nek jako obr�zku avatara.</li> - </ul> + <ul> + <li>P�i vkl�d�n� �erstv�ch P/favatar�, plugin p�ijme pouze odpov�di ozna�en� vzd�len�m serverem jako obr�zky. To zamez� p�ijet� potenci�ln�ch html str�nek jako obr�zku avatara.</li> + </ul> <li>verze 1.22 [brockhaus]</li> - <ul> - <li>Vkl�d�n� i p�esm�rovan�ch P/Favatar�.</li> - </ul> + <ul> + <li>Vkl�d�n� i p�esm�rovan�ch P/Favatar�.</li> + </ul> <li>verze 1.21 [brockhaus]</li> - <ul> - <li>Vkl�d�n� avatar� se rozbilo p�i vypnut� cache.</li> - <li>Prohl�e� nebyl schopen cachovat v�choz� avatary kv�li �patn� nastaven�mu �asu cache.</li> - <li>Kontrola, jestli cachovan� soubor vypad� jako obr�zek, p�edt�m, ne� je odesl�n na klienta.</li> - </ul> + <ul> + <li>Vkl�d�n� avatar� se rozbilo p�i vypnut� cache.</li> + <li>Prohl�e� nebyl schopen cachovat v�choz� avatary kv�li �patn� nastaven�mu �asu cache.</li> + <li>Kontrola, jestli cachovan� soubor vypad� jako obr�zek, p�edt�m, ne� je odesl�n na klienta.</li> + </ul> <li>verze 1.20 [brockhaus]</li> - <ul> - <li>Titulek obr�zku avatara nyn� zobrazuje jm�no autora m�sto "Avatar" (V.)</li> - </ul> + <ul> + <li>Titulek obr�zku avatara nyn� zobrazuje jm�no autora m�sto "Avatar" (V.)</li> + </ul> <li>verze 1.19 [brockhaus]</li> - <ul> - <li>Vyu�it� cache prohl�e�e m� za n�sledek dobr� vylep�en� v�konu!</li> - </ul> + <ul> + <li>Vyu�it� cache prohl�e�e m� za n�sledek dobr� vylep�en� v�konu!</li> + </ul> <li>verze 1.18 [brockhaus]</li> - <ul> - <li>Vypnut� ladic�ch v�pis�</li> - </ul> + <ul> + <li>Vypnut� ladic�ch v�pis�</li> + </ul> <li>verze 1.17 [brockhaus]</li> - <ul> - <li>Pokud je zapnuto cachov�n�, je nyn� cachov�no <b>v�echno</b>. Zn�m� p�isp�vatel� a koment�to�i nyn� nezp�sob� <b>��dn�</b> vol�n� ciz�ch server�, pokud u� jsou jejich obr�zky cachov�ny. Velmi p�kn� pos�len� v�konu. D�ky Garvinovi za n�pad.</li> - <li>Z�plata proti hackov�n� od u�ivatele [garvinhickins]</li> - </ul> + <ul> + <li>Pokud je zapnuto cachov�n�, je nyn� cachov�no <b>v�echno</b>. Zn�m� p�isp�vatel� a koment�to�i nyn� nezp�sob� <b>��dn�</b> vol�n� ciz�ch server�, pokud u� jsou jejich obr�zky cachov�ny. Velmi p�kn� pos�len� v�konu. D�ky Garvinovi za n�pad.</li> + <li>Z�plata proti hackov�n� od u�ivatele [garvinhickins]</li> + </ul> <li>verze 1.16 [garvinhicking]</li> - <ul> - <li>uhlazen� k�du</li> - </ul> + <ul> + <li>uhlazen� k�du</li> + </ul> <li>verze 1.14 [brockhaus]</li> - <ul> - <li>Implementov�no zpracov�n� chyb pro MyBlogLog! :-) Ale je pomal�, dokonce i s optimalizac� pomoc� cachov�n�. MyBlogLog by nem�l b�t prvn� v po�ad� avatar�.</li> - <li>P�id�na p�t� kolonka pro v�b�r metody avatar�, proto�e MyBlogLog nyn� tak� podporuje zpracov�n� chyb (fallback).</li> - </ul> + <ul> + <li>Implementov�no zpracov�n� chyb pro MyBlogLog! :-) Ale je pomal�, dokonce i s optimalizac� pomoc� cachov�n�. MyBlogLog by nem�l b�t prvn� v po�ad� avatar�.</li> + <li>P�id�na p�t� kolonka pro v�b�r metody avatar�, proto�e MyBlogLog nyn� tak� podporuje zpracov�n� chyb (fallback).</li> + </ul> <li>verze 1.13 [brockhaus]</li> - <ul> - <li>Doporu�en� zm�n�no: Nen� to plugin "statistika", kter� znefunk�n� Pavatary/Favatary, ale plugin "sledov�n� odchod�" (exit tracking plugin)</li> - </ul> + <ul> + <li>Doporu�en� zm�n�no: Nen� to plugin "statistika", kter� znefunk�n� Pavatary/Favatary, ale plugin "sledov�n� odchod�" (exit tracking plugin)</li> + </ul> <li>verze 1.12 [brockhaus]</li> - <ul> - <li>MyBlogLog avatary jsou nyn� tak� cachov�ny.</li> - <li>Str�nky s p�esm�rov�n�m na v�choz� str�nku, pokud nebyla nalazena v�choz� polo�ka, jsou nyn� podporov�ny. D��v�j�� plugin avatar p�edpokl�dal, �e v�choz� str�nka ja P/Favatar.</li> - <li>V�choz� nastaven� po�ad� avatar� je nyn�: Gravatar -> Pavatar + <ul> + <li>MyBlogLog avatary jsou nyn� tak� cachov�ny.</li> + <li>Str�nky s p�esm�rov�n�m na v�choz� str�nku, pokud nebyla nalazena v�choz� polo�ka, jsou nyn� podporov�ny. D��v�j�� plugin avatar p�edpokl�dal, �e v�choz� str�nka ja P/Favatar.</li> + <li>V�choz� nastaven� po�ad� avatar� je nyn�: Gravatar -> Pavatar -> Favatar -> v�choz� Avatar</li> - <li>P�id�no doporu�en�, �e plugin by m�l b�t za�azen p�ed pluginy, kter� m�n� odkazy.</li> - <li>Na��t�n� nastaven� cesty pluginu. D��ve to byl v�dy adres�� 'plugin'.</li> - <li>Vy�azeno nastaven� okraje gravatara, proto�e u� nefunguje (napo��d?).</li> - </ul> + <li>P�id�no doporu�en�, �e plugin by m�l b�t za�azen p�ed pluginy, kter� m�n� odkazy.</li> + <li>Na��t�n� nastaven� cesty pluginu. D��ve to byl v�dy adres�� 'plugin'.</li> + <li>Vy�azeno nastaven� okraje gravatara, proto�e u� nefunguje (napo��d?).</li> + </ul> <li>verze 1.11 [brockhaus], testovac� verze nebyla releasov�na do CVS/Spartacus</li> - <ul> - <li>Fallback (zpracov�n� chyby) pro Gravatar funguje! Ale zobrazuje v�choz�ho avatara nez�visle na nastaven�. Tak�e toto nastaven� bylo smaz�no.</li> - </ul> + <ul> + <li>Fallback (zpracov�n� chyby) pro Gravatar funguje! Ale zobrazuje v�choz�ho avatara nez�visle na nastaven�. Tak�e toto nastaven� bylo smaz�no.</li> + </ul> <li>verze 1.10 [brockhaus]</li> - <ul> - <li>Informace o Pavatar / Avatar nebyly nikdy na�ten� z cache</li> - <li>...ale po na�ten� z cache zp�sobily nekone�nou smy�ku pro obr�zky na�ten� z lok�ln�ho blogu (pokud byl povolen postrann� blugin s koment��i - comment sidebar)</li> - <li>Nastaven� v��ky obr�zku bylo pojmenov�no "height" ... :-/</li> - <li>Cachov�n� Gravataru nefungovalo spolehliv�, pokud byl nastaven v�choz� avatar.</li> - </ul> + <ul> + <li>Informace o Pavatar / Avatar nebyly nikdy na�ten� z cache</li> + <li>...ale po na�ten� z cache zp�sobily nekone�nou smy�ku pro obr�zky na�ten� z lok�ln�ho blogu (pokud byl povolen postrann� blugin s koment��i - comment sidebar)</li> + <li>Nastaven� v��ky obr�zku bylo pojmenov�no "height" ... :-/</li> + <li>Cachov�n� Gravataru nefungovalo spolehliv�, pokud byl nastaven v�choz� avatar.</li> + </ul> <li>verze 1.9 [brockhaus]</li> - <ul> - <li>P�i hled�n� Pavatara byl nata�en Favatar jako Pavatar, pokud nebyl nalezen Pavatar, ale favicon. D�ky u�ivateli [El Burro]</li> - </ul> + <ul> + <li>P�i hled�n� Pavatara byl nata�en Favatar jako Pavatar, pokud nebyl nalezen Pavatar, ale favicon. D�ky u�ivateli [El Burro]</li> + </ul> <li>verze 1.8 [brockhaus]</li> - <ul> - <li>Plugin nebych schopen na��st Favatary/Pavatary, pokud bylo p�esm�rov�n� nasm�rov�no na URL str�nky nastaven� jako domovsk� str�nka komentuj�c�ho. T�eba Garvin m� takov� blog...</li> - </ul> + <ul> + <li>Plugin nebych schopen na��st Favatary/Pavatary, pokud bylo p�esm�rov�n� nasm�rov�no na URL str�nky nastaven� jako domovsk� str�nka komentuj�c�ho. T�eba Garvin m� takov� blog...</li> + </ul> <li>verze 1.7 [brockhaus]</li> - <ul> - <li>P�id�na podpora Pavatar� (<a href="www.pavatar.com">www.pavatar.com</a>)</li> - <li>P�id�na podpora MyBlogLog avatar� (<a href="www.pavatar.com">www.mybloglog.com</a>)</li> - <li>Po�ad� pro v�b�r avatar� a jak� typy avatar� jsou podporov�ny, v�e je nyn� nastaviteln�.</li> - <li>Standardn� avatar m��e b�t jeden z nich (m�l by b�t posledn�).</li> - <li>Volba pro nenastaven� Gravatara jako v�choz�ho avatara, i kdy� je definovan�. (Chceme m�n� datov�ch profil�...)</li> - <li>Vlo�en� v�choz�ho avatara pomoc� mediat�ky v nastaven� pluginu.</li> - <li>Velikost obr�zku je nyn� zaji�t�na pomoc� HTML k�du.</li> - <li>Pod polem pro koment�� jsou zobrazov�ny pouze aktu�ln� nastaven� metody avatara jako podporovan�.</li> - </ul> + <ul> + <li>P�id�na podpora Pavatar� (<a href="www.pavatar.com">www.pavatar.com</a>)</li> + <li>P�id�na podpora MyBlogLog avatar� (<a href="www.pavatar.com">www.mybloglog.com</a>)</li> + <li>Po�ad� pro v�b�r avatar� a jak� typy avatar� jsou podporov�ny, v�e je nyn� nastaviteln�.</li> + <li>Standardn� avatar m��e b�t jeden z nich (m�l by b�t posledn�).</li> + <li>Volba pro nenastaven� Gravatara jako v�choz�ho avatara, i kdy� je definovan�. (Chceme m�n� datov�ch profil�...)</li> + <li>Vlo�en� v�choz�ho avatara pomoc� mediat�ky v nastaven� pluginu.</li> + <li>Velikost obr�zku je nyn� zaji�t�na pomoc� HTML k�du.</li> + <li>Pod polem pro koment�� jsou zobrazov�ny pouze aktu�ln� nastaven� metody avatara jako podporovan�.</li> + </ul> <li>verze 1.6 [garvinhickins]</li> <li>verze 1.5 [garvinhickins]</li> <li>verze 1.4 [garvinhickins]</li> <li>verze 1.3 [garvinhickins]</li> - <ul> - <li>Opraveny chyby neplatnosti dom�ny</li> - </ul> + <ul> + <li>Opraveny chyby neplatnosti dom�ny</li> + </ul> </ul> <p><a href="#top">nahoru</a></p> diff --git a/plugins/serendipity_event_gravatar/documentation_cz.html b/plugins/serendipity_event_gravatar/documentation_cz.html index c12ae4b7..64f284ca 100644 --- a/plugins/serendipity_event_gravatar/documentation_cz.html +++ b/plugins/serendipity_event_gravatar/documentation_cz.html @@ -49,7 +49,7 @@ <li><a href="#cnf_gravatar_fallback_always">V�dy vy�adovat Gravatar Fallback</a></li> </ol> - <li><a href="#changelog">ChangeLog (historie verz�)</a></li> + <li><a href="#changelog">ChangeLog (historie verz�)</a></li> </ol> </div> @@ -200,232 +200,232 @@ Avatary Identicon (identikony) jsou generov <ul> <li>verze 1.54</li> - <ul> - <li>Do jazykov� konstanty PLUGIN_EVENT_GRAVATAR_SUPPORTED byl p�id�n parametr %s pro zobrazen� podporovan�ch avatarov�ch slu�eb.</li> - </ul> + <ul> + <li>Do jazykov� konstanty PLUGIN_EVENT_GRAVATAR_SUPPORTED byl p�id�n parametr %s pro zobrazen� podporovan�ch avatarov�ch slu�eb.</li> + </ul> <li>verze 1.52</li> - <ul> - <li>Zm�n�no zobrazen� podporovan�ch avatar� pod polem pro koment��, aby podporovalo hezk� zalamov�n� ��dk�.</li> - </ul> + <ul> + <li>Zm�n�no zobrazen� podporovan�ch avatar� pod polem pro koment��, aby podporovalo hezk� zalamov�n� ��dk�.</li> + </ul> <li>verze 1.51</li> - <ul> - <li>Pou�it� funkce strtolower() pro mailov� adresy.</li> - </ul> + <ul> + <li>Pou�it� funkce strtolower() pro mailov� adresy.</li> + </ul> <li>verze 1.49 [brockhaus]</li> - <ul> - <li>Pavatar v bloz�ch s p�esm�rov�n�m nefungoval, pokud byl odkaz na Pavatar p��stupn� pouze v informac�ch tagu "rel link"</li> - </ul> + <ul> + <li>Pavatar v bloz�ch s p�esm�rov�n�m nefungoval, pokud byl odkaz na Pavatar p��stupn� pouze v informac�ch tagu "rel link"</li> + </ul> <li>verze 1.48 [brockhaus]</li> - <ul> - <li>Oprava: Kompatibilita PHP byla poru�ena p�i oprav� 1.46 :-/</li> - <li>P�id�n avatar Identica. Pou�ito hlavn� pro pingbacky Indetica a m�lo by b�t pou�ito p�ed Favatarem, jinak se bude zobrazovat zna�ka Identica m�sto obr�zku u�ivatele.</li> - <li>Vy�i�t�n� k�du</li> - </ul> + <ul> + <li>Oprava: Kompatibilita PHP byla poru�ena p�i oprav� 1.46 :-/</li> + <li>P�id�n avatar Identica. Pou�ito hlavn� pro pingbacky Indetica a m�lo by b�t pou�ito p�ed Favatarem, jinak se bude zobrazovat zna�ka Identica m�sto obr�zku u�ivatele.</li> + <li>Vy�i�t�n� k�du</li> + </ul> <li>verze 1.47 [brockhaus]</li> - <ul> - <li>Vypnut� ladic�ch v�pis� v template_c</li> - </ul> + <ul> + <li>Vypnut� ladic�ch v�pis� v template_c</li> + </ul> <li>verze 1.46 [brockhaus]</li> - <ul> - <li>P�id�n Twitter Avatar (pokud URL odkazuje na profil na Twitteru). To je v�t�inou pou�ito pro Tweetbacky a m�lo by b�t pou�ito p�ed Favatarem, jinak se bude zobrazovat logo Twitteru.</li> - <li>Vy�i�t�n� k�du</li> - </ul> + <ul> + <li>P�id�n Twitter Avatar (pokud URL odkazuje na profil na Twitteru). To je v�t�inou pou�ito pro Tweetbacky a m�lo by b�t pou�ito p�ed Favatarem, jinak se bude zobrazovat logo Twitteru.</li> + <li>Vy�i�t�n� k�du</li> + </ul> <li>verze 1.45 [brockhaus]</li> - <ul> - <li>N�pov�da</li> - <li>Vy�i�t�n�</li> - </ul> + <ul> + <li>N�pov�da</li> + <li>Vy�i�t�n�</li> + </ul> <li>verze 1.44 [brockhaus]</li> - <ul> - <li>P�id�na podpora Wavatar�</li> - <li>Podpora pro o�et�en� chyb (fallback) Gravataru pomoc� indetyicon, MonsterID a Wavataru.</li> - <li>Optimalizace zp�tn�ch vol�n� (trackback) avatar�: Querypars budou odst�i�eny z URL. Nyn� v uk�zkov�m Serendipity blogu dostanete v�dycky stejn�ho cachovan�ho Avatara, ne samostatn�ho pro jin� str�nky.</li> - </ul> + <ul> + <li>P�id�na podpora Wavatar�</li> + <li>Podpora pro o�et�en� chyb (fallback) Gravataru pomoc� indetyicon, MonsterID a Wavataru.</li> + <li>Optimalizace zp�tn�ch vol�n� (trackback) avatar�: Querypars budou odst�i�eny z URL. Nyn� v uk�zkov�m Serendipity blogu dostanete v�dycky stejn�ho cachovan�ho Avatara, ne samostatn�ho pro jin� str�nky.</li> + </ul> <li>verze 1.43 [brockhaus]</li> - <ul> - <li>Volba nastaven� pro p�id�n� jm�na autora do attributu ALT u obr�zku avatara. Norm�ln� je to vypln�no hv�zdi�kou "*", ale slepci jsou p�i prohl��en� str�nek z�visl� na tagu ALT, kter� jim �te�ky p�ed��taj�, aby se dozv�d�li, co je obsahem obr�zku.</li> - </ul> + <ul> + <li>Volba nastaven� pro p�id�n� jm�na autora do attributu ALT u obr�zku avatara. Norm�ln� je to vypln�no hv�zdi�kou "*", ale slepci jsou p�i prohl��en� str�nek z�visl� na tagu ALT, kter� jim �te�ky p�ed��taj�, aby se dozv�d�li, co je obsahem obr�zku.</li> + </ul> <li>verze 1.42 [brockhaus]</li> - <ul> - <li>K�dov�n� podtr��tka "_" v URL adres�ch u�ivatel�, aby se odli�ily od odd�lova��. Funkce "urlencode" je nek�duje. D�ky u�ivateli [Tino Schwarze] za objeven� a opravu.</li> - </ul> + <ul> + <li>K�dov�n� podtr��tka "_" v URL adres�ch u�ivatel�, aby se odli�ily od odd�lova��. Funkce "urlencode" je nek�duje. D�ky u�ivateli [Tino Schwarze] za objeven� a opravu.</li> + </ul> <li>verze 1.41 [garvinhicking]</li> - <ul> - <li>Opravena hlavi�ka "Last-Modified" u obr�zk� avatar�.</li> - </ul> + <ul> + <li>Opravena hlavi�ka "Last-Modified" u obr�zk� avatar�.</li> + </ul> <li>verze 1.40</li> - <ul> - <li>P�id�na podpora Ycon (<a href="http://moblog.wiredwings.com">http://moblog.wiredwings.com<a/>)(</li> - </ul> + <ul> + <li>P�id�na podpora Ycon (<a href="http://moblog.wiredwings.com">http://moblog.wiredwings.com<a/>)(</li> + </ul> <li>verze 1.39 [brockhaus]</li> - <ul> - <li>Avatary Monster ID je nyn� tak� cachov�n, proto�e jejich vytv��en� trv� dlouho.</li> - </ul> + <ul> + <li>Avatary Monster ID je nyn� tak� cachov�n, proto�e jejich vytv��en� trv� dlouho.</li> + </ul> <li>verze 1.38 [brockhaus]</li> - <ul> - <li>Podpora Monster ID avatar� (podrobnosti naleznete na <a href="http://www.splitbrain.org/go/monsterid">http://www.splitbrain.org/go/monsterid</a>)</li> - <li>Selh�n� p�i �erstv� instalaci a �asu cache nastaven�m na 0.</li> - <li>Podpora nastaven� absolutn� cesty k standardn�mu avataru.</li> - <li>Po ulo�en� nastaven� je nyn� cache <b>v�dy</b> vy�i�t�na, aby byly zm�ny viditeln� ihned, dokonce i kdy� je cachov�n� zapnuto.</li> - <li>Pokud plugin nem��e zapisovat do cache, pak to v ladic�m m�du zap��e do logu a zobraz� v�choz� obr�zek, pokud nen� nalezen cachovan� soubor.</li> - </ul> + <ul> + <li>Podpora Monster ID avatar� (podrobnosti naleznete na <a href="http://www.splitbrain.org/go/monsterid">http://www.splitbrain.org/go/monsterid</a>)</li> + <li>Selh�n� p�i �erstv� instalaci a �asu cache nastaven�m na 0.</li> + <li>Podpora nastaven� absolutn� cesty k standardn�mu avataru.</li> + <li>Po ulo�en� nastaven� je nyn� cache <b>v�dy</b> vy�i�t�na, aby byly zm�ny viditeln� ihned, dokonce i kdy� je cachov�n� zapnuto.</li> + <li>Pokud plugin nem��e zapisovat do cache, pak to v ladic�m m�du zap��e do logu a zobraz� v�choz� obr�zek, pokud nen� nalezen cachovan� soubor.</li> + </ul> <li>verze 1.37 [brockhaus]</li> - <ul> - <li>��dka pod oknem koment��e informuj�c� o podporovan�ch typech avatar� lze skr�t pomoc� nastaven�.</li> - </ul> + <ul> + <li>��dka pod oknem koment��e informuj�c� o podporovan�ch typech avatar� lze skr�t pomoc� nastaven�.</li> + </ul> <li>verze 1.36 [brockhaus]</li> - <ul> - <li>P�id�na nov� volba: M��ete nastavit, �e plugin nebude vytv��et avatary p��mo, ale m�sto toho pouze tag pro smarty. Pokud je tato volba zapnut�, m��ete si definovat v �ablon� pro koment��e, kde se maj� avatary zobrazovat, a to pomoc� tagu $comment.comment_avatar.</li> - <li>CSS t��da avataru se bude m�nit podle toho, kde je zobrazen. Pro norm�ln� koment��e bude m�t t��du "comment_avatar", pro plugin "nejnov�j�� p��sp�vky" to bude t��da "serendipity_plugin_comments_avatar", aby byla mo�nost jednodu�e je ozna�it, ostylovat.</li> - <li>Nastaven� zarovn�n� avatar�: Nastaven� zarovn�n� bude pou�ito, pokud je avatar vykreslen p��mo (ne pomoc� smarty).</li> - <li>Nov� volba pro vyp�n�n�/zap�n�n� obr�zk� avatar� v postrann�m sloupci (nejnov�j�� koment��e).</li> - <li>Podporovan� metody avatar� se zobrazovaly i pod kontaktn�m formul��em, co� ale nem�lo logick� smysl. V tomto fromul��i byly tedy avatary vypnuty.</li> - <li>Dal�� zm�ny v jazykov�ch souborech.</li> - </ul> + <ul> + <li>P�id�na nov� volba: M��ete nastavit, �e plugin nebude vytv��et avatary p��mo, ale m�sto toho pouze tag pro smarty. Pokud je tato volba zapnut�, m��ete si definovat v �ablon� pro koment��e, kde se maj� avatary zobrazovat, a to pomoc� tagu $comment.comment_avatar.</li> + <li>CSS t��da avataru se bude m�nit podle toho, kde je zobrazen. Pro norm�ln� koment��e bude m�t t��du "comment_avatar", pro plugin "nejnov�j�� p��sp�vky" to bude t��da "serendipity_plugin_comments_avatar", aby byla mo�nost jednodu�e je ozna�it, ostylovat.</li> + <li>Nastaven� zarovn�n� avatar�: Nastaven� zarovn�n� bude pou�ito, pokud je avatar vykreslen p��mo (ne pomoc� smarty).</li> + <li>Nov� volba pro vyp�n�n�/zap�n�n� obr�zk� avatar� v postrann�m sloupci (nejnov�j�� koment��e).</li> + <li>Podporovan� metody avatar� se zobrazovaly i pod kontaktn�m formul��em, co� ale nem�lo logick� smysl. V tomto fromul��i byly tedy avatary vypnuty.</li> + <li>Dal�� zm�ny v jazykov�ch souborech.</li> + </ul> <li>verze 1.35 [brockhaus]</li> - <ul> - <li>Opraveny chyby v anglick�m jazykov�m souboru. (D�ky Donovi!)</li> - </ul> + <ul> + <li>Opraveny chyby v anglick�m jazykov�m souboru. (D�ky Donovi!)</li> + </ul> <li>verze 1.34 [brockhaus]</li> - <ul> - <li>Hodnocen� Gravatar� nepracuje spolehliv�. M�j Gravatar hodnocen� jako G je zobrazen pouze p�i pou�it� hodnocen� gravatar� X. :-/<br /> - P�id�na volba pro vypnut� parametru hodnocen� Gravatar�, co� by m�lo m�t stejn� efekt jako nastaven� hodnocen� X.</li> - </ul> + <ul> + <li>Hodnocen� Gravatar� nepracuje spolehliv�. M�j Gravatar hodnocen� jako G je zobrazen pouze p�i pou�it� hodnocen� gravatar� X. :-/<br /> + P�id�na volba pro vypnut� parametru hodnocen� Gravatar�, co� by m�lo m�t stejn� efekt jako nastaven� hodnocen� X.</li> + </ul> <li>verze 1.33 [brockhaus]</li> - <ul> - <li>Pavatar: X-Pavatar Header je nyn� znovu podporov�n a je prvn� pou�itou metodou automatick� detekce Pavatara.</li> - </ul> + <ul> + <li>Pavatar: X-Pavatar Header je nyn� znovu podporov�n a je prvn� pou�itou metodou automatick� detekce Pavatara.</li> + </ul> <li>verze 1.32 [brockhaus]</li> - <ul> - <li>V�choz� avatar MyBlogLog nebyl spr�vn� detekov�n�. :-/</li> - <li>Pokud nen� zad�n email ani url adresa, ale je definov�n v�choz� avatar, je nyn� zobrazen pr�v� v�choz� avatar.</li> - </ul> + <ul> + <li>V�choz� avatar MyBlogLog nebyl spr�vn� detekov�n�. :-/</li> + <li>Pokud nen� zad�n email ani url adresa, ale je definov�n v�choz� avatar, je nyn� zobrazen pr�v� v�choz� avatar.</li> + </ul> <li>verze 1.31 [brockhaus]</li> - <ul> - <li>Zm�na �asu vol�n� (call-time) chyby (pass-by-reference) (fetchAvatar).</li> - </ul> + <ul> + <li>Zm�na �asu vol�n� (call-time) chyby (pass-by-reference) (fetchAvatar).</li> + </ul> <li>verze 1.30 [brockhaus]</li> - <ul> - <li>Standradn� Avatar se nezobrazoval, pokud byl blog nainstalov�n v podadres��i webu a ne p��mo v ko�enov� slo�ce.</li> - <li>Odkaz na Gravatara byl trochu �patn� (p�esto fungoval).</li> - </ul> + <ul> + <li>Standradn� Avatar se nezobrazoval, pokud byl blog nainstalov�n v podadres��i webu a ne p��mo v ko�enov� slo�ce.</li> + <li>Odkaz na Gravatara byl trochu �patn� (p�esto fungoval).</li> + </ul> <li>verze 1.29 [brockhaus]</li> - <ul> - <li>Oprava chyby 1.27 p�id�vala k URL "http://", i kdy� nebyla zad�na v�bec ��dn� URL adresa.</li> - </ul> + <ul> + <li>Oprava chyby 1.27 p�id�vala k URL "http://", i kdy� nebyla zad�na v�bec ��dn� URL adresa.</li> + </ul> <li>verze 1.28 [brockhaus]</li> - <ul> - <li>V Serendipity 1.1 nebylo mo�n� natavit v�choz�ho avatara. Nastaven� nebylo kompatibiln� s verz� Serendipity 1.1.</li> - </ul> + <ul> + <li>V Serendipity 1.1 nebylo mo�n� natavit v�choz�ho avatara. Nastaven� nebylo kompatibiln� s verz� Serendipity 1.1.</li> + </ul> <li>verze 1.27 [brockhaus]</li> - <ul> - <li>Pokud pisatel zadal svoji adresu jako "www.domena.cz" m�sto "http://www.domena.cz", Avatar nebyl na�ten spr�vn�.</li> - </ul> + <ul> + <li>Pokud pisatel zadal svoji adresu jako "www.domena.cz" m�sto "http://www.domena.cz", Avatar nebyl na�ten spr�vn�.</li> + </ul> <li>verze 1.26 [brockhaus]</li> - <ul> - <li>MyBlogLog trochu pozm�nil zp�sob vol�n� avatara, co� m�lo za n�sledek, �e o�et�en� chybov�ch v�stup� (fallback) pro MyBlogLog p�estal fungovat.</li> - </ul> + <ul> + <li>MyBlogLog trochu pozm�nil zp�sob vol�n� avatara, co� m�lo za n�sledek, �e o�et�en� chybov�ch v�stup� (fallback) pro MyBlogLog p�estal fungovat.</li> + </ul> <li>verze 1.25 [garvinhicking]</li> - <ul> - <li>Zarovn�n� (algin) nahraceno definic� pomoc� CSS styl�, tak�e XHTML u� neobsahuje ��dn� definice zarovn�n�.</li> - </ul> + <ul> + <li>Zarovn�n� (algin) nahraceno definic� pomoc� CSS styl�, tak�e XHTML u� neobsahuje ��dn� definice zarovn�n�.</li> + </ul> <li>verze 1.24 [brockhaus]</li> - <ul> - <li>Kontrola odpov�di MyBlogLog, jestli obsahuje opravdu obr�zek.</li> - <li>Vy�i�t�n� pam�ti cache p�i nastaven� hodnoty cachov�n� na 0.</li> - <li>Vypnut� ladic�ch v�pis�.</li> - </ul> + <ul> + <li>Kontrola odpov�di MyBlogLog, jestli obsahuje opravdu obr�zek.</li> + <li>Vy�i�t�n� pam�ti cache p�i nastaven� hodnoty cachov�n� na 0.</li> + <li>Vypnut� ladic�ch v�pis�.</li> + </ul> <li>verze 1.23 [brockhaus]</li> - <ul> - <li>P�i vkl�d�n� �erstv�ch P/favatar�, plugin p�ijme pouze odpov�di ozna�en� vzd�len�m serverem jako obr�zky. To zamez� p�ijet� potenci�ln�ch html str�nek jako obr�zku avatara.</li> - </ul> + <ul> + <li>P�i vkl�d�n� �erstv�ch P/favatar�, plugin p�ijme pouze odpov�di ozna�en� vzd�len�m serverem jako obr�zky. To zamez� p�ijet� potenci�ln�ch html str�nek jako obr�zku avatara.</li> + </ul> <li>verze 1.22 [brockhaus]</li> - <ul> - <li>Vkl�d�n� i p�esm�rovan�ch P/Favatar�.</li> - </ul> + <ul> + <li>Vkl�d�n� i p�esm�rovan�ch P/Favatar�.</li> + </ul> <li>verze 1.21 [brockhaus]</li> - <ul> - <li>Vkl�d�n� avatar� se rozbilo p�i vypnut� cache.</li> - <li>Prohl��e� nebyl schopen cachovat v�choz� avatary kv�li �patn� nastaven�mu �asu cache.</li> - <li>Kontrola, jestli cachovan� soubor vypad� jako obr�zek, p�edt�m, ne� je odesl�n na klienta.</li> - </ul> + <ul> + <li>Vkl�d�n� avatar� se rozbilo p�i vypnut� cache.</li> + <li>Prohl��e� nebyl schopen cachovat v�choz� avatary kv�li �patn� nastaven�mu �asu cache.</li> + <li>Kontrola, jestli cachovan� soubor vypad� jako obr�zek, p�edt�m, ne� je odesl�n na klienta.</li> + </ul> <li>verze 1.20 [brockhaus]</li> - <ul> - <li>Titulek obr�zku avatara nyn� zobrazuje jm�no autora m�sto "Avatar" (V.)</li> - </ul> + <ul> + <li>Titulek obr�zku avatara nyn� zobrazuje jm�no autora m�sto "Avatar" (V.)</li> + </ul> <li>verze 1.19 [brockhaus]</li> - <ul> - <li>Vyu�it� cache prohl��e�e m� za n�sledek dobr� vylep�en� v�konu!</li> - </ul> + <ul> + <li>Vyu�it� cache prohl��e�e m� za n�sledek dobr� vylep�en� v�konu!</li> + </ul> <li>verze 1.18 [brockhaus]</li> - <ul> - <li>Vypnut� ladic�ch v�pis�</li> - </ul> + <ul> + <li>Vypnut� ladic�ch v�pis�</li> + </ul> <li>verze 1.17 [brockhaus]</li> - <ul> - <li>Pokud je zapnuto cachov�n�, je nyn� cachov�no <b>v�echno</b>. Zn�m� p�isp�vatel� a koment�to�i nyn� nezp�sob� <b>��dn�</b> vol�n� ciz�ch server�, pokud u� jsou jejich obr�zky cachov�ny. Velmi p�kn� pos�len� v�konu. D�ky Garvinovi za n�pad.</li> - <li>Z�plata proti hackov�n� od u�ivatele [garvinhickins]</li> - </ul> + <ul> + <li>Pokud je zapnuto cachov�n�, je nyn� cachov�no <b>v�echno</b>. Zn�m� p�isp�vatel� a koment�to�i nyn� nezp�sob� <b>��dn�</b> vol�n� ciz�ch server�, pokud u� jsou jejich obr�zky cachov�ny. Velmi p�kn� pos�len� v�konu. D�ky Garvinovi za n�pad.</li> + <li>Z�plata proti hackov�n� od u�ivatele [garvinhickins]</li> + </ul> <li>verze 1.16 [garvinhicking]</li> - <ul> - <li>uhlazen� k�du</li> - </ul> + <ul> + <li>uhlazen� k�du</li> + </ul> <li>verze 1.14 [brockhaus]</li> - <ul> - <li>Implementov�no zpracov�n� chyb pro MyBlogLog! :-) Ale je pomal�, dokonce i s optimalizac� pomoc� cachov�n�. MyBlogLog by nem�l b�t prvn� v po�ad� avatar�.</li> - <li>P�id�na p�t� kolonka pro v�b�r metody avatar�, proto�e MyBlogLog nyn� tak� podporuje zpracov�n� chyb (fallback).</li> - </ul> + <ul> + <li>Implementov�no zpracov�n� chyb pro MyBlogLog! :-) Ale je pomal�, dokonce i s optimalizac� pomoc� cachov�n�. MyBlogLog by nem�l b�t prvn� v po�ad� avatar�.</li> + <li>P�id�na p�t� kolonka pro v�b�r metody avatar�, proto�e MyBlogLog nyn� tak� podporuje zpracov�n� chyb (fallback).</li> + </ul> <li>verze 1.13 [brockhaus]</li> - <ul> - <li>Doporu�en� zm�n�no: Nen� to plugin "statistika", kter� znefunk�n� Pavatary/Favatary, ale plugin "sledov�n� odchod�" (exit tracking plugin)</li> - </ul> + <ul> + <li>Doporu�en� zm�n�no: Nen� to plugin "statistika", kter� znefunk�n� Pavatary/Favatary, ale plugin "sledov�n� odchod�" (exit tracking plugin)</li> + </ul> <li>verze 1.12 [brockhaus]</li> - <ul> - <li>MyBlogLog avatary jsou nyn� tak� cachov�ny.</li> - <li>Str�nky s p�esm�rov�n�m na v�choz� str�nku, pokud nebyla nalazena v�choz� polo�ka, jsou nyn� podporov�ny. D��v�j�� plugin avatar p�edpokl�dal, �e v�choz� str�nka ja P/Favatar.</li> - <li>V�choz� nastaven� po�ad� avatar� je nyn�: Gravatar -> Pavatar + <ul> + <li>MyBlogLog avatary jsou nyn� tak� cachov�ny.</li> + <li>Str�nky s p�esm�rov�n�m na v�choz� str�nku, pokud nebyla nalazena v�choz� polo�ka, jsou nyn� podporov�ny. D��v�j�� plugin avatar p�edpokl�dal, �e v�choz� str�nka ja P/Favatar.</li> + <li>V�choz� nastaven� po�ad� avatar� je nyn�: Gravatar -> Pavatar -> Favatar -> v�choz� Avatar</li> - <li>P�id�no doporu�en�, �e plugin by m�l b�t za�azen p�ed pluginy, kter� m�n� odkazy.</li> - <li>Na��t�n� nastaven� cesty pluginu. D��ve to byl v�dy adres�� 'plugin'.</li> - <li>Vy�azeno nastaven� okraje gravatara, proto�e u� nefunguje (napo��d?).</li> - </ul> + <li>P�id�no doporu�en�, �e plugin by m�l b�t za�azen p�ed pluginy, kter� m�n� odkazy.</li> + <li>Na��t�n� nastaven� cesty pluginu. D��ve to byl v�dy adres�� 'plugin'.</li> + <li>Vy�azeno nastaven� okraje gravatara, proto�e u� nefunguje (napo��d?).</li> + </ul> <li>verze 1.11 [brockhaus], testovac� verze nebyla releasov�na do CVS/Spartacus</li> - <ul> - <li>Fallback (zpracov�n� chyby) pro Gravatar funguje! Ale zobrazuje v�choz�ho avatara nez�visle na nastaven�. Tak�e toto nastaven� bylo smaz�no.</li> - </ul> + <ul> + <li>Fallback (zpracov�n� chyby) pro Gravatar funguje! Ale zobrazuje v�choz�ho avatara nez�visle na nastaven�. Tak�e toto nastaven� bylo smaz�no.</li> + </ul> <li>verze 1.10 [brockhaus]</li> - <ul> - <li>Informace o Pavatar / Avatar nebyly nikdy na�ten� z cache</li> - <li>...ale po na�ten� z cache zp�sobily nekone�nou smy�ku pro obr�zky na�ten� z lok�ln�ho blogu (pokud byl povolen postrann� blugin s koment��i - comment sidebar)</li> - <li>Nastaven� v��ky obr�zku bylo pojmenov�no "height" ... :-/</li> - <li>Cachov�n� Gravataru nefungovalo spolehliv�, pokud byl nastaven v�choz� avatar.</li> - </ul> + <ul> + <li>Informace o Pavatar / Avatar nebyly nikdy na�ten� z cache</li> + <li>...ale po na�ten� z cache zp�sobily nekone�nou smy�ku pro obr�zky na�ten� z lok�ln�ho blogu (pokud byl povolen postrann� blugin s koment��i - comment sidebar)</li> + <li>Nastaven� v��ky obr�zku bylo pojmenov�no "height" ... :-/</li> + <li>Cachov�n� Gravataru nefungovalo spolehliv�, pokud byl nastaven v�choz� avatar.</li> + </ul> <li>verze 1.9 [brockhaus]</li> - <ul> - <li>P�i hled�n� Pavatara byl nata�en Favatar jako Pavatar, pokud nebyl nalezen Pavatar, ale favicon. D�ky u�ivateli [El Burro]</li> - </ul> + <ul> + <li>P�i hled�n� Pavatara byl nata�en Favatar jako Pavatar, pokud nebyl nalezen Pavatar, ale favicon. D�ky u�ivateli [El Burro]</li> + </ul> <li>verze 1.8 [brockhaus]</li> - <ul> - <li>Plugin nebych schopen na��st Favatary/Pavatary, pokud bylo p�esm�rov�n� nasm�rov�no na URL str�nky nastaven� jako domovsk� str�nka komentuj�c�ho. T�eba Garvin m� takov� blog...</li> - </ul> + <ul> + <li>Plugin nebych schopen na��st Favatary/Pavatary, pokud bylo p�esm�rov�n� nasm�rov�no na URL str�nky nastaven� jako domovsk� str�nka komentuj�c�ho. T�eba Garvin m� takov� blog...</li> + </ul> <li>verze 1.7 [brockhaus]</li> - <ul> - <li>P�id�na podpora Pavatar� (<a href="www.pavatar.com">www.pavatar.com</a>)</li> - <li>P�id�na podpora MyBlogLog avatar� (<a href="www.pavatar.com">www.mybloglog.com</a>)</li> - <li>Po�ad� pro v�b�r avatar� a jak� typy avatar� jsou podporov�ny, v�e je nyn� nastaviteln�.</li> - <li>Standardn� avatar m��e b�t jeden z nich (m�l by b�t posledn�).</li> - <li>Volba pro nenastaven� Gravatara jako v�choz�ho avatara, i kdy� je definovan�. (Chceme m�n� datov�ch profil�...)</li> - <li>Vlo�en� v�choz�ho avatara pomoc� mediat�ky v nastaven� pluginu.</li> - <li>Velikost obr�zku je nyn� zaji�t�na pomoc� HTML k�du.</li> - <li>Pod polem pro koment�� jsou zobrazov�ny pouze aktu�ln� nastaven� metody avatara jako podporovan�.</li> - </ul> + <ul> + <li>P�id�na podpora Pavatar� (<a href="www.pavatar.com">www.pavatar.com</a>)</li> + <li>P�id�na podpora MyBlogLog avatar� (<a href="www.pavatar.com">www.mybloglog.com</a>)</li> + <li>Po�ad� pro v�b�r avatar� a jak� typy avatar� jsou podporov�ny, v�e je nyn� nastaviteln�.</li> + <li>Standardn� avatar m��e b�t jeden z nich (m�l by b�t posledn�).</li> + <li>Volba pro nenastaven� Gravatara jako v�choz�ho avatara, i kdy� je definovan�. (Chceme m�n� datov�ch profil�...)</li> + <li>Vlo�en� v�choz�ho avatara pomoc� mediat�ky v nastaven� pluginu.</li> + <li>Velikost obr�zku je nyn� zaji�t�na pomoc� HTML k�du.</li> + <li>Pod polem pro koment�� jsou zobrazov�ny pouze aktu�ln� nastaven� metody avatara jako podporovan�.</li> + </ul> <li>verze 1.6 [garvinhickins]</li> <li>verze 1.5 [garvinhickins]</li> <li>verze 1.4 [garvinhickins]</li> <li>verze 1.3 [garvinhickins]</li> - <ul> - <li>Opraveny chyby neplatnosti dom�ny</li> - </ul> + <ul> + <li>Opraveny chyby neplatnosti dom�ny</li> + </ul> </ul> <p><a href="#top">nahoru</a></p> diff --git a/plugins/serendipity_event_gravatar/documentation_de.html b/plugins/serendipity_event_gravatar/documentation_de.html index 48f9e811..f2668cd8 100644 --- a/plugins/serendipity_event_gravatar/documentation_de.html +++ b/plugins/serendipity_event_gravatar/documentation_de.html @@ -49,97 +49,72 @@ <a name="overview"></a> <h2>Überblick</h2> -<p>Mit dem Avatar Plugin kann man Kommentatoren in seinem Blog "ein Gesicht" geben. -Für jeden einzelnen Kommentator im Blog wird ein so genanntes Avatar zur Verfügung gestellt, das ihn repräsentiert. -Dafür werden unterschiedliche Mechanismen angeboten, die nacheinander durchprobiert werden, ob sie ein Avatar für -den Kommentator liefern.</p> -<p>Der erste Mechanismus, der ein Avatar findet, wird benutzt, nachfolgende Mechanismen -dann nicht mehr ausprobiert. Dies bedeutet, dass man die Methoden so sortieren sollte, dass die am meisten bevorzugte -zuerst ausprobiert wird. Methoden, die auf jeden Fall immer ein Avatar liefern, sollten als letzte konfiguriert werden, -da nach diesen natürlich keine weiteren Methoden ausprobiert werden. -</p> -<p><strong>Wichtig:</strong> Dieses Plugin muss vor allen Plugins in der Liste stehen, die Links verändern, wie -z.B. das "Exit Tracking Plugin". Ansonsten können Avatare, die auf den Links der Kommentatoren beruhen, nicht -funktionieren.</p> +<p>Mit dem Avatar Plugin kann man Kommentatoren in seinem Blog "ein Gesicht" geben. Für jeden einzelnen Kommentator im Blog wird ein so genanntes Avatar zur Verfügung gestellt, das ihn repräsentiert. Dafür werden unterschiedliche Mechanismen angeboten, die nacheinander durchprobiert werden, ob sie ein Avatar für den Kommentator liefern.</p> +<p>Der erste Mechanismus, der ein Avatar findet, wird benutzt, nachfolgende Mechanismen dann nicht mehr ausprobiert. Dies bedeutet, dass man die Methoden so sortieren sollte, dass die am meisten bevorzugte zuerst ausprobiert wird. Methoden, die auf jeden Fall immer ein Avatar liefern, sollten als letzte konfiguriert werden, da nach diesen natürlich keine weiteren Methoden ausprobiert werden.</p> +<p><strong>Wichtig:</strong> Dieses Plugin muss vor allen Plugins in der Liste stehen, die Links verändern, wie z.B. das "Exit Tracking Plugin". Ansonsten können Avatare, die auf den Links der Kommentatoren beruhen, nicht funktionieren.</p> <p>Hier folgt eine Beschreibung der aktuell verfügbaren Mechanismen, ein Avatar für einen Kommentator zu ermitteln:</p> <p><a href="#top">top</a></p> <a name="avt_gravatar"></a> <h3>Gravatar</h3> -<p><a href="http://www.gravatar.com" target="_blank">Gravatar</a> ist einer der bekanntesten Services für Benutzer Avatare. -Benutzer können sich bei diesem Service mit einer EMail registrieren und für sich ein Avatar Bild hinterlegen</p> -<p>Gravatare sind also von der vom Kommentator eingegebenen EMail abhängig. Nur wenn eine solche angegeben wurde, kann -ermittelt werden, ob für diese ein Avatar beim Gravatar Service hinterlegt wurde.</p> +<p><a href="http://www.gravatar.com" target="_blank">Gravatar</a> ist einer der bekanntesten Services für Benutzer Avatare. Benutzer können sich bei diesem Service mit einer EMail registrieren und für sich ein Avatar Bild hinterlegen</p> +<p>Gravatare sind also von der vom Kommentator eingegebenen EMail abhängig. Nur wenn eine solche angegeben wurde, kann ermittelt werden, ob für diese ein Avatar beim Gravatar Service hinterlegt wurde.</p> <p><a href="#top">top</a></p> <a name="avt_pavatar"></a> <h3>Pavatar</h3> -<p><a href="http://www.pavatar.com" target="_blank">Pavatare</a> sind Avatare (Bilddateien), die der Schreber genau -für diesen Zweck auf seiner Homepage hinterlegt hat.</p> -<p>Im Gegensatz zu den recht ähnlichen <a href="#avt_favatar">Favataren</a> kann man hier also ein eigenes Avatar Bild -mit einer beliebigen Auflösung hinterlegen.</p> -<p>Hier wird anhand der vom Kommentator angegebenen Homepage ermittelt, ob diese ein Pavatar liefert. Pavatare sind -also nur ladbar, wenn der Kommentator eine Homepage angegeben hat</p> +<p><a href="http://www.pavatar.com" target="_blank">Pavatare</a> sind Avatare (Bilddateien), die der Schreber genau für diesen Zweck auf seiner Homepage hinterlegt hat.</p> +<p>Im Gegensatz zu den recht ähnlichen <a href="#avt_favatar">Favataren</a> kann man hier also ein eigenes Avatar Bild mit einer beliebigen Auflösung hinterlegen.</p> +<p>Hier wird anhand der vom Kommentator angegebenen Homepage ermittelt, ob diese ein Pavatar liefert. Pavatare sind also nur ladbar, wenn der Kommentator eine Homepage angegeben hat</p> <p><a href="#top">top</a></p> <a name="avt_favatar"></a> <h3>Favatar</h3> <p>Dies ist ein Konzept mit dem viele Hompage Besitzer automatisch einen Avatar haben, ohne dass sie dafür irgendetwas tun müssen:</p> -<p>Das Blog holt sich hier einfach das favicon der Homepage, die der Benutzer als seine URL angegeben hat. -Dafür ist das favicon aber eben ein Icon und somit normaler Weise auch recht klein und nicht immer als Avatar geeignet.</p> +<p>Das Blog holt sich hier einfach das favicon der Homepage, die der Benutzer als seine URL angegeben hat. Dafür ist das favicon aber eben ein Icon und somit normaler Weise auch recht klein und nicht immer als Avatar geeignet.</p> <p><a href="#top">top</a></p> <a name="avt_twitter"></a> <h3>Twitter</h3> -<p>Falls der Kommentator als URL ein <a href="http://twitter.com" target="_blank">Twitter Profil</a> angegeben hat, dann wird versucht, hier das Profilbild für diesen -Benutzer zu laden.</p> -<p><i>Anmerkung</i>: Falls auch Favatare geladen werden sollen, dann muss Twitter vor diesen versucht werden, sonst wird das -Favicon von Twitter geladen. Dies kann allerdings auch gewollt sein, um z.B. "Tweetbacks" von Twitter klar zu markieren.</p> +<p>Falls der Kommentator als URL ein <a href="http://twitter.com" target="_blank">Twitter Profil</a> angegeben hat, dann wird versucht, hier das Profilbild für diesen Benutzer zu laden.</p> +<p><i>Anmerkung</i>: Falls auch Favatare geladen werden sollen, dann muss Twitter vor diesen versucht werden, sonst wird das Favicon von Twitter geladen. Dies kann allerdings auch gewollt sein, um z.B. "Tweetbacks" von Twitter klar zu markieren.</p> <p><a href="#top">top</a></p> <a name="avt_identica"></a> <h3>Identica</h3> -<p>Dies ist ein spezielles Avatar für <a href="http://identi.ca" target="_blank">Identica</a> Pingbacks. Es wird versucht, -das Profilbild des Benutzers zu laden, der den Pingback ausgelöst hat.</p> -<p><i>Anmerkung</i>: Falls auch Favatare geladen werden sollen, dann muss Identica vor diesen versucht werden, sonst wird das -Favicon von Identica geladen. Dies kann allerdings auch gewollt sein, um z.B. "Tweetbacks" von Identica klar zu markieren.</p> +<p>Dies ist ein spezielles Avatar für <a href="http://identi.ca" target="_blank">Identica</a> Pingbacks. Es wird versucht, das Profilbild des Benutzers zu laden, der den Pingback ausgelöst hat.</p> +<p><i>Anmerkung</i>: Falls auch Favatare geladen werden sollen, dann muss Identica vor diesen versucht werden, sonst wird das Favicon von Identica geladen. Dies kann allerdings auch gewollt sein, um z.B. "Tweetbacks" von Identica klar zu markieren.</p> <p><a href="#top">top</a></p> <a name="avt_mybloglog"></a> <h3>MyBlogLog</h3> -<p>Dies ist wieder ein (dem Gravatar Service sehr ähnlicher) zentraler Service. MyBlogLog ist eigentlich ein Blog Community Service, -aber man kann aus diesem ebenfalls Avatare ermitteln</p> -<p>Das Vorhandensein eines MyBlogLog Avatars wird über die Homepage Angabe des Kommentators ermittelt. +<p>Dies ist wieder ein (dem Gravatar Service sehr ähnlicher) zentraler Service. MyBlogLog ist eigentlich ein Blog Community Service, aber man kann aus diesem ebenfalls Avatare ermitteln</p> +<p>Das Vorhandensein eines MyBlogLog Avatars wird über die Homepage Angabe des Kommentators ermittelt.</p> <p><a href="#top">top</a></p> <a name="avt_wavatar"></a> <h3>Wavatar</h3> -<p>Das Wavatar wird dynamisch erzeugt aus der Eingabe von Hompage und EMail des Kommentators. Es liefert für jeden Benutzer ein anderes -aber immer selbes Avatar. Da es <strong>immer</strong> ein Avatar liefert, werden alle nachfolgenden Avatar Methoden ignoriert. -Wavatare sehen in etwa wie folgt aus:</p> +<p>Das Wavatar wird dynamisch erzeugt aus der Eingabe von Hompage und EMail des Kommentators. Es liefert für jeden Benutzer ein anderes aber immer selbes Avatar. Da es <strong>immer</strong> ein Avatar liefert, werden alle nachfolgenden Avatar Methoden ignoriert. Wavatare sehen in etwa wie folgt aus:</p> <p align="center"><img src="documentation/wavatars.jpg"/></p> <p><a href="#top">top</a></p> <a name="avt_monsterid"></a> <h3>MonsterID</h3> -<p>MonsterID Avatare werden nach dem selben Mechanismus erzeugt, wie Wavatare und Indenticons, hier werden kleine niedliche "Monster" -aus den Benutzer Angaben erzeugt.</p> +<p>MonsterID Avatare werden nach dem selben Mechanismus erzeugt, wie Wavatare und Indenticons, hier werden kleine niedliche "Monster" aus den Benutzer Angaben erzeugt.</p> <p>Genau wie Wavatar und Identicon liefern sie <strong>immer</strong> einen Avatar für den Kommentator.</p> <p align="center"><img src="documentation/monsterid.png"/></p> <p><a href="#top">top</a></p> <a name="avt_identicon"></a> <h3>Identicon/YCon</h3> -<p>Identicon werden nach dem selben Mechanismus erzeugt, wie Wavatare und MonsterIDs, sie sehen nur anders aus. Hier werden -abstrakte Gebilde erzeugt.</p> +<p>Identicon werden nach dem selben Mechanismus erzeugt, wie Wavatare und MonsterIDs, sie sehen nur anders aus. Hier werden abstrakte Gebilde erzeugt.</p> <p>Genau wie Wavatar und MonsterID liefern sie <strong>immer</strong> einen Avatar für den Kommentator.</p> <p align="center"><img src="documentation/identicons.jpg"/></p> <p><a href="#top">top</a></p> <a name="avt_standard"></a> <h3>Standardavatar</h3> -<p>Die Methode "Standardavatar" liefert immer das selbe Avatar für alle Benutzer. Das Bild, das hier benutzt werden soll, kann -weiter unten konfiguriert werden.</p> +<p>Die Methode "Standardavatar" liefert immer das selbe Avatar für alle Benutzer. Das Bild, das hier benutzt werden soll, kann weiter unten konfiguriert werden.</p> <p><a href="#top">top</a></p> <a name="config"></a> @@ -148,63 +123,62 @@ weiter unten konfiguriert werden.</p> <a name="cnf_method"></a> <h3>Avatar laden über</h3> <p>Hiermit wird die Reihenfolge festgelegt, in der versucht wird, ein Avatar für den Kommentator zu erzeugen.</p> -<p>Es gibt derzeit 6 Einschübe, mit denen die Reihenfolge festgelegt wird. Zu beachten ist, dass Methoden, -die auf jeden Fall ein Avatar liefern, alle nachfolgenden Methoden nicht zur Probe bringen.</p> +<p>Es gibt derzeit 6 Einschübe, mit denen die Reihenfolge festgelegt wird. Zu beachten ist, dass Methoden, die auf jeden Fall ein Avatar liefern, alle nachfolgenden Methoden nicht zur Probe bringen.</p> <p><a href="#top">top</a></p> <a name="cnf_standard"></a> <h3>Standard-Avatar</h3> -<p>URL zu ihrem Standard-Avatar. Hier müssen Sie den relativen oder absoluten Pfad bezogen auf ihre Server URL zu ihrem Standard Avatar angeben.</p> +<p>URL zu ihrem Standard-Avatar. Hier müssen Sie den relativen oder absoluten Pfad bezogen auf ihre Server URL zu ihrem Standard Avatar angeben.</p> <p><a href="#top">top</a></p> <a name="cnf_sidbar"></a> <h3>In der Seitenleiste anzeigen</h3> -<p>Sollen Avatar Bilder auch in der Seitenleiste (letze Kommentare) angezeigt werden?</p> +<p>Sollen Avatar Bilder auch in der Seitenleiste (letze Kommentare) angezeigt werden?</p> <p><a href="#top">top</a></p> <a name="cnf_showtype"></a> <h3>Avatar Typ anzeigen</h3> -<p>Wenn angeschaltet, wird eine Zeile unterhalb des Kommentar Editors ausgegeben, die angibt, welche Avatar Typen aktuell unterstützt werden.</p> +<p>Wenn angeschaltet, wird eine Zeile unterhalb des Kommentar Editors ausgegeben, die angibt, welche Avatar Typen aktuell unterstützt werden.</p> <p><a href="#top">top</a></p> <a name="cnf_autoralt"></a> <h3>Autorenname im ALT Attribut</h3> -<p>Normaler Weise wird der Autorenname im TITLE Attribut des Avatar Bildes angegeben, das ALT Attribut wird mit einem * gefüllt, um das Seitenlayout nicht zu zerstören, wenn der Browser das Bild nicht laden kann. Allerdings wird blinden Lesern das ALT Attribut vorgelesen. Falls Sie diese Leser unterstützen wollen, sollten Sie diese Option einschalten.</p> +<p>Normaler Weise wird der Autorenname im TITLE Attribut des Avatar Bildes angegeben, das ALT Attribut wird mit einem * gefüllt, um das Seitenlayout nicht zu zerstören, wenn der Browser das Bild nicht laden kann. Allerdings wird blinden Lesern das ALT Attribut vorgelesen. Falls Sie diese Leser unterstützen wollen, sollten Sie diese Option einschalten.</p> <p><a href="#top">top</a></p> <a name="cnf_smartify"></a> <h3>Smarty Tag erzeugen</h3> -<p>Wenn diese Option eingeschaltet ist, so wird das Avatar Bild nicht direkt in den Kommentar geschrieben, sondern es wird ein Smarty Tag {$comment.avatar} erzeugt, in dem der HTML Code des Images steht. Sie sollten diese Option nur einschalten, wenn sie wissen, dass ihr Template dieses Smarty Tag unterstützt. Ob das der Fall ist, sollten sie einfach ausprobieren.</p> +<p>Wenn diese Option eingeschaltet ist, so wird das Avatar Bild nicht direkt in den Kommentar geschrieben, sondern es wird ein Smarty Tag {$comment.avatar} erzeugt, in dem der HTML Code des Images steht. Sie sollten diese Option nur einschalten, wenn sie wissen, dass ihr Template dieses Smarty Tag unterstützt. Ob das der Fall ist, sollten sie einfach ausprobieren.</p> <p><a href="#top">top</a></p> <a name="cnf_alignment"></a> <h3>Ausrichtung</h3> -<p>Mit dieser Option kann die Ausrichtung des Avatars im Kommentar konfiguriert werden, falls sie nicht die Smarty Tag Option verwenden. Bei der Smarty Tag Option muss die Ausrichtung über die entsprechende CSS Klasse im Stylesheet konfiguriert werden.</p> +<p>Mit dieser Option kann die Ausrichtung des Avatars im Kommentar konfiguriert werden, falls sie nicht die Smarty Tag Option verwenden. Bei der Smarty Tag Option muss die Ausrichtung über die entsprechende CSS Klasse im Stylesheet konfiguriert werden.</p> <p><a href="#top">top</a></p> <a name="cnf_size"></a> <h3>Bildgröße</h3> -<p>Maximal dargestellte Größe des Avatar-Bildes in Pixeln</p> +<p>Maximal dargestellte Größe des Avatar-Bildes in Pixeln</p> <p><a href="#top">top</a></p> <a name="cnf_cache"></a> <h3>Cache Zeit</h3> -<p>Wenn Avatare zwischengespeichert werden sollen (empfohlen!), muss hier die Anzahl der Stunden eingetragen werden, die Bilder vom eigenen Server anstatt vom externen Service abgeholt werden sollen. Dies wird mehr Traffic auf diesem Blog Server verursachen, dafür macht es die Avatar Darstellung unabhängiger vom externen zentralen Server. "0" stellt das Zwischenspeichern ab.</p> +<p>Wenn Avatare zwischengespeichert werden sollen (empfohlen!), muss hier die Anzahl der Stunden eingetragen werden, die Bilder vom eigenen Server anstatt vom externen Service abgeholt werden sollen. Dies wird mehr Traffic auf diesem Blog Server verursachen, dafür macht es die Avatar Darstellung unabhängiger vom externen zentralen Server. "0" stellt das Zwischenspeichern ab.</p> <p><a href="#top">top</a></p> <a name="cnf_gravatar_rating"></a> <h3>Gravatar Indizierung</h3> -<p>Kinderschutz :)</p> +<p>Kinderschutz :)</p> <p><a href="#top">top</a></p> <a name="cnf_gravatar_fallback"></a> <h3>Gravatar Fallback</h3> -<p>Gravatar implementiert einige eigene Fallback Methoden für den Fal, dass kein Gravatar für den Benutzer gefunden wurde. Es wurde ebenso Moster ID, Identicon und Wavatar. Wenn Du einen dieser Fallbacks einstellst, so wird keine weitere Methode nach Gravatar versucht, falls der Benutzer eine EMail angegeben hat.</p> +<p>Gravatar implementiert einige eigene Fallback Methoden für den Fal, dass kein Gravatar für den Benutzer gefunden wurde. Es wurde ebenso Moster ID, Identicon und Wavatar. Wenn Du einen dieser Fallbacks einstellst, so wird keine weitere Methode nach Gravatar versucht, falls der Benutzer eine EMail angegeben hat.</p> <p><a href="#top">top</a></p> <a name="cnf_gravatar_fallback_always"></a> <h3>Gravatar Fallback immer benutzen</h3> -<p>Gravatar Fallbacks auch dann benutzen, wenn der Benutzer keine EMail (aber eine URL oder einen Namen) eingegeben hat.</p> +<p>Gravatar Fallbacks auch dann benutzen, wenn der Benutzer keine EMail (aber eine URL oder einen Namen) eingegeben hat.</p> <p><a href="#top">top</a></p> </body> diff --git a/plugins/serendipity_event_gravatar/lang_cs.inc.php b/plugins/serendipity_event_gravatar/lang_cs.inc.php index dca79ec0..24941d51 100644 --- a/plugins/serendipity_event_gravatar/lang_cs.inc.php +++ b/plugins/serendipity_event_gravatar/lang_cs.inc.php @@ -59,4 +59,5 @@ @define('PLUGIN_EVENT_GRAVATAR_FALLBACK', 'Gravatar fallback'); @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_DESC', 'Gravatar m� implementovan�ch n�kolik n�vratov�ch metod pro p��pad, �e pro po�adovan�ho u�ivatele nen� zn�m ��dn� avatar. Implementov�ny jsou t� Moster ID, Identicon a Wavatar. Pokud vyberete n�kter� z t�chto z�n�n�ch, nebudou uskute��ov�ny ��dn� dal�� pokusy o na�ten� avataru, pokud u�ivatel zad� email.'); @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS', 'V�dy n�vratov� hodnota pro Gravatar'); -@define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC', 'Pou��vat n�vratovou hodnotu Gravatar i v p��pad�, �e u�ivatel nezad� email (zad� tedy url nebo jm�no)'); \ No newline at end of file +@define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC', 'Pou��vat n�vratovou hodnotu Gravatar i v p��pad�, �e u�ivatel nezad� email (zad� tedy url nebo jm�no)'); + diff --git a/plugins/serendipity_event_gravatar/lang_cz.inc.php b/plugins/serendipity_event_gravatar/lang_cz.inc.php index 5194bdb6..a133cb28 100644 --- a/plugins/serendipity_event_gravatar/lang_cz.inc.php +++ b/plugins/serendipity_event_gravatar/lang_cz.inc.php @@ -59,4 +59,5 @@ @define('PLUGIN_EVENT_GRAVATAR_FALLBACK', 'Gravatar fallback'); @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_DESC', 'Gravatar m� implementovan�ch n�kolik n�vratov�ch metod pro p��pad, �e pro po�adovan�ho u�ivatele nen� zn�m ��dn� avatar. Implementov�ny jsou t� Moster ID, Identicon a Wavatar. Pokud vyberete n�kter� z t�chto z�n�n�ch, nebudou uskute��ov�ny ��dn� dal�� pokusy o na�ten� avataru, pokud u�ivatel zad� email.'); @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS', 'V�dy n�vratov� hodnota pro Gravatar'); -@define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC', 'Pou��vat n�vratovou hodnotu Gravatar i v p��pad�, �e u�ivatel nezad� email (zad� tedy url nebo jm�no)'); \ No newline at end of file +@define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC', 'Pou��vat n�vratovou hodnotu Gravatar i v p��pad�, �e u�ivatel nezad� email (zad� tedy url nebo jm�no)'); + diff --git a/plugins/serendipity_event_gravatar/lang_de.inc.php b/plugins/serendipity_event_gravatar/lang_de.inc.php index e04e584a..60d3261d 100644 --- a/plugins/serendipity_event_gravatar/lang_de.inc.php +++ b/plugins/serendipity_event_gravatar/lang_de.inc.php @@ -1,4 +1,4 @@ -<?php # lang_de.inc.php 1.17 2009-08-20 10:10:36 VladaAjgl $ +<?php /** * @version 1.17 @@ -64,4 +64,5 @@ @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC', 'Gravatar Fallbacks auch dann benutzen, wenn der Benutzer keine EMail (aber eine URL oder einen Namen) eingegeben hat.'); // Next lines were translated on 2009/08/20 -@define('PLUGIN_EVENT_GRAVATAR_METHOD_DESC', 'Wenn die vorherigen Methoden fehlschlagen, versuche diese. Der Typ "' . PLUGIN_EVENT_GRAVATAR_METHOD_DEFAULT . '", "Monster ID", "Wavatar", "Identicon" und "---" wird niemals fehlschlagen. Alles unterhalb dieser Methoden wird nicht versucht.'); \ No newline at end of file +@define('PLUGIN_EVENT_GRAVATAR_METHOD_DESC', 'Wenn die vorherigen Methoden fehlschlagen, versuche diese. Der Typ "' . PLUGIN_EVENT_GRAVATAR_METHOD_DEFAULT . '", "Monster ID", "Wavatar", "Identicon" und "---" wird niemals fehlschlagen. Alles unterhalb dieser Methoden wird nicht versucht.'); + diff --git a/plugins/serendipity_event_gravatar/lang_en.inc.php b/plugins/serendipity_event_gravatar/lang_en.inc.php index 723c604c..6b95ce13 100644 --- a/plugins/serendipity_event_gravatar/lang_en.inc.php +++ b/plugins/serendipity_event_gravatar/lang_en.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -62,3 +62,4 @@ @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_DESC', 'Gravatar implements some fallback methods in case, no Gravatar is known for the user. It implements also Moster ID, Identicon and Wavatar. If you choose one of these, no further method after Gravatar is evaluated, if the user entered an email.'); @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS', 'Gravatar always fallback'); @define('PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC', 'Use Gravatar fallbacks even if the user didn\'t enter an email (but an url or a name)'); + diff --git a/plugins/serendipity_event_gravatar/lang_pl.inc.php b/plugins/serendipity_event_gravatar/lang_pl.inc.php index 3054403c..7d0c0b80 100644 --- a/plugins/serendipity_event_gravatar/lang_pl.inc.php +++ b/plugins/serendipity_event_gravatar/lang_pl.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -62,3 +62,4 @@ '<b><a href="://www.splitbrain.org/go/monsterid" target="_blank">Monster ID avatars</a></b> are localy created monster images unique for each writer.'); @define('PLUGIN_EVENT_GRAVATAR_EXTLING_WARNING', '<font color="red">CAUTION!</font> This plugin has to be executed before any plugin changing links (like i.e. the exit tracking plugin)! ' . '<font color="red">Else Pavatars, Favatars and MayBlogLog avatars won\'t work!</font>'); + diff --git a/plugins/serendipity_event_gravatar/monsterid/monsterid.php b/plugins/serendipity_event_gravatar/monsterid/monsterid.php index 1370830a..4af69739 100644 --- a/plugins/serendipity_event_gravatar/monsterid/monsterid.php +++ b/plugins/serendipity_event_gravatar/monsterid/monsterid.php @@ -2,7 +2,7 @@ function build_monster($filename, $seed='',$size=''){ // init random seed - if($seed) srand( hexdec(substr(md5($seed),0,6)) ); + if ($seed) srand( hexdec(substr(md5($seed),0,6)) ); // throw the dice for body parts $parts = array( @@ -31,17 +31,17 @@ function build_monster($filename, $seed='',$size=''){ imagedestroy($im); // color the body - if($part == 'body'){ + if ($part == 'body') { $color = imagecolorallocate($monster, rand(20,235), rand(20,235), rand(20,235)); imagefill($monster,60,60,$color); } } // restore random seed - if($seed) srand(); + if ($seed) srand(); // resize if needed, then output - if($size && $size < 400){ + if ($size && $size < 400) { $out = @imagecreatetruecolor($size,$size); if (!$out) return false; // Problems creating image! imagecopyresampled($out,$monster,0,0,0,0,$size,$size,120,120); @@ -49,10 +49,12 @@ function build_monster($filename, $seed='',$size=''){ imagedestroy($out); imagedestroy($monster); return true; - }else{ + } else { //header ("Content-type: image/png"); imagepng($monster,$filename); imagedestroy($monster); return true; } } + +?> \ No newline at end of file diff --git a/plugins/serendipity_event_gravatar/serendipity_event_gravatar.php b/plugins/serendipity_event_gravatar/serendipity_event_gravatar.php index 6a00aaa9..46c98627 100755 --- a/plugins/serendipity_event_gravatar/serendipity_event_gravatar.php +++ b/plugins/serendipity_event_gravatar/serendipity_event_gravatar.php @@ -1,20 +1,14 @@ -<?php # - +<?php if (IN_serendipity !== true) { die ("Don't hack!"); } -// Probe for a language include with constants. Still include defines later on, if some constants were missing -$probelang = dirname(__FILE__) . '/' . $serendipity['charset'] . 'lang_' . $serendipity['lang'] . '.inc.php'; -if (file_exists($probelang)) { - include $probelang; -} - -include dirname(__FILE__) . '/lang_en.inc.php'; +// Load possible language files. +@serendipity_plugin_api::load_language(dirname(__FILE__)); // Actual version of this plugin -@define('PLUGIN_EVENT_GRAVATAR_VERSION', '1.59'); // NOTE: This plugin is also in the central repository. Commit changes to the core, too :) +@define('PLUGIN_EVENT_GRAVATAR_VERSION', '1.62.1'); // NOTE: This plugin is also in the central repository. Commit changes to the core, too :) // Defines the maximum available method slots in the configuration. @define('PLUGIN_EVENT_GRAVATAR_METHOD_MAX', 6); @@ -25,12 +19,12 @@ include dirname(__FILE__) . '/lang_en.inc.php'; class serendipity_event_gravatar extends serendipity_event { var $title = PLUGIN_EVENT_GRAVATAR_NAME; - + // Holds MD5 code for the MyBlogLog dummy icon. var $mybloglog_dummy_md5 = null; var $cache_dir = null; var $defaultImageConfiguration = null; - + var $avatarConfiguration = array(); var $cache_seconds = 0; @@ -43,46 +37,43 @@ class serendipity_event_gravatar extends serendipity_event $propbag->add('stackable', false); $propbag->add('author', 'Garvin Hicking, Grischa Brockhaus'); $propbag->add('requirements', array( - 'serendipity' => '0.7', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); $propbag->add('version', PLUGIN_EVENT_GRAVATAR_VERSION); - $propbag->add('groups', array('IMAGES')); - $propbag->add('event_hooks', array( + $propbag->add('groups', array('IMAGES')); + $propbag->add('event_hooks', array( 'frontend_display' => true, 'frontend_comment' => true, 'external_plugin' => true, 'css' => true, )); - $configuration = array('longdescription','seperator'); - $config_methods = array(); + $configuration = array('longdescription', 'separator'); + $config_methods = array(); for ($idx=1; $idx<=PLUGIN_EVENT_GRAVATAR_METHOD_MAX; $idx++) { $config_methods[] = "method_$idx"; } - - + $propbag->add('configuration', array_merge($configuration, $config_methods, - array('defaultavatar', 'recent_entries', 'infoline', + array('defaultavatar', 'recent_entries', 'infoline', 'autoralt', 'smartyimage', 'align', 'size', 'cache', 'rating', 'gravatar_fallback','gravatar_fallback_use_always','warning') ) ); } - function introspect_config_item($name, &$propbag) { global $serendipity; - + $types = array( 'gravatar' => "Gravatar", 'favatar' => "Favatar", 'pavatar' => "Pavatar", 'twitter' => "Twitter", 'identica' => "Identica", - 'mybloglog' => "MyBlogLog", 'monsterid' => "Monster ID", 'wavatars' => "Wavatars", 'identicon' => "Identicon/YCon", @@ -101,7 +92,7 @@ class serendipity_event_gravatar extends serendipity_event return true; } } - + $gravatar_fallbacks = array( 'monsterid' => "Monster ID", 'wavatar' => "Wavatar", @@ -109,8 +100,9 @@ class serendipity_event_gravatar extends serendipity_event 'default' => "Gravatar symbol", 'none' => "---", ); - + switch($name) { + case 'smartyimage': $propbag->add('type', 'boolean'); $propbag->add('name', PLUGIN_EVENT_GRAVATAR_USE_SMARTY); @@ -136,13 +128,16 @@ class serendipity_event_gravatar extends serendipity_event $propbag->add('type', 'content'); $propbag->add('default', PLUGIN_EVENT_GRAVATAR_EXTLING_WARNING); break; + case 'longdescription': $propbag->add('type', 'content'); $propbag->add('default', PLUGIN_EVENT_GRAVATAR_LONG_DESCRIPTION); break; - case 'seperator': - $propbag->add('type', 'seperator'); + + case 'separator': + $propbag->add('type', 'separator'); break; + case 'gravatar_fallback': $propbag->add('type', 'select'); $propbag->add('name', PLUGIN_EVENT_GRAVATAR_FALLBACK); @@ -150,19 +145,16 @@ class serendipity_event_gravatar extends serendipity_event $propbag->add('select_values', $gravatar_fallbacks); $propbag->add('default', 'none'); break; + case 'gravatar_fallback_use_always': $propbag->add('type', 'boolean'); $propbag->add('name', PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS); $propbag->add('description',PLUGIN_EVENT_GRAVATAR_FALLBACK_ALLWAYS_DESC); $propbag->add('default', false); break; - + case 'defaultavatar': - if (version_compare('1.2',$serendipity['version'])==1) {// 1 if 1.2 higher than actual version number - $propbag->add('type', 'string'); - } else { - $propbag->add('type', 'media'); - } + $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_EVENT_GRAVATAR_DEFAULTAVATAR); $propbag->add('description', PLUGIN_EVENT_GRAVATAR_DEFAULTAVATAR_DESC); $propbag->add('default', ''); @@ -193,7 +185,7 @@ class serendipity_event_gravatar extends serendipity_event $propbag->add('type', 'radio'); $propbag->add('name', PLUGIN_EVENT_GRAVATAR_RATING); $propbag->add('description', PLUGIN_EVENT_GRAVATAR_RATING_DESC); - $propbag->add('radio', array( + $propbag->add('radio', array( 'value' => array('-', 'G', 'PG', 'R', 'X'), 'desc' => array(PLUGIN_EVENT_GRAVATAR_RATING_NO,PLUGIN_EVENT_GRAVATAR_RATING_G, PLUGIN_EVENT_GRAVATAR_RATING_PG, PLUGIN_EVENT_GRAVATAR_RATING_R, PLUGIN_EVENT_GRAVATAR_RATING_X) )); @@ -222,20 +214,23 @@ class serendipity_event_gravatar extends serendipity_event $propbag->add('default', false); break; + default: + return false; } - return true; } - function generate_content(&$title) { + function generate_content(&$title) + { $title = PLUGIN_EVENT_GRAVATAR_NAME; } /** * Will be called while saving settings */ - function cleanup() { - // *Always* clean up the cache after changing configuration, else + function cleanup() + { + // *Always* clean up the cache after changing configuration, else // the configuration change will first be seen after cache time is run out. $this->log("-------"); $cacheDir = $this->getCacheDirectory(); @@ -249,13 +244,13 @@ class serendipity_event_gravatar extends serendipity_event } } } - - function event_hook($event, &$bag, &$eventData, $addData = null) + + function event_hook($event, &$bag, &$eventData, $addData = null) { global $serendipity; static $cache = null; static $method = null; - + $hooks = &$bag->get('event_hooks'); if ($cache === null) { @@ -269,7 +264,7 @@ class serendipity_event_gravatar extends serendipity_event if (isset($hooks[$event])) { switch($event) { - + // Catch external_plugin event for fresh fetching avatar icons // This will response with an image (not with html code) case 'external_plugin': @@ -305,49 +300,51 @@ class serendipity_event_gravatar extends serendipity_event } else { return false; } - - break; - // Print out image html for the user avatar into the frontend_display - case 'frontend_display': + // Print out image html for the user avatar into the frontend_display + case 'frontend_display': if (!isset($eventData['comment'])) { - return true; + return true; } $this->printAvatarHtml($eventData, $addData); - - return true; break; + case 'css': // avatar css has to be emitted no matter of smarty enabled: the sidebar needs it. - //$useSmarty = serendipity_db_bool($this->get_config('smartyimage', false)); - //if (!$useSmarty && !(strpos($eventData, '.avatar_left') || strpos($eventData, '.avatar_rigth'))) { - if (!(strpos($eventData, '.avatar_left') || strpos($eventData, '.avatar_rigth'))) { -?> + // CSS class does NOT exist by user customized template styles, include default + if (false === (strpos($eventData, '.avatar_left') || strpos($eventData, '.avatar_rigth'))) { + $eventData .= ' + +/* serendipity_event_gravatar start */ + .avatar_left { - float:left; - margin-left:0px; - margin-right:10px; + float:left; + margin-left:0px; + margin-right:10px; } .avatar_right { - float:right; - margin-right:0px; - margin-left:10px; + float:right; + margin-right:0px; + margin-left:10px; } -<?php + +/* serendipity_event_gravatar end */ + +'; + } - return true; - break; + break; // Adds information about the actual supported avatar types below the comment input case 'frontend_comment': // Suppress infoline about configured avatar types if configured like that: - if (!serendipity_db_bool($this->get_config('infoline', true))){ + if (!serendipity_db_bool($this->get_config('infoline', 'true'))){ return false; } - + // The contact form uses the comments, too. We don't want this information line there and detect it by the missing properties entry. if (empty($eventData['properties'])){ return false; @@ -378,7 +375,7 @@ class serendipity_event_gravatar extends serendipity_event $supported_methods .= (empty($supported_methods) ? '' : ', ') . '<a href="http://www.splitbrain.org/go/monsterid">Monster ID</a>'; break; case 'identicon': - $supported_methods .= (empty($supported_methods) ? '' : ', ') . '<a href="http://scott.sherrillmix.com/blog/blogger/wp_identicon/">Identicon/Ycon</a>'; + $supported_methods .= (empty($supported_methods) ? '' : ', ') . '<a href="http://scott.sherrillmix.com/blog/blogger/wp_identicon/">Identicon/Ycon</a>'; break; case 'wavatars': $supported_methods .= (empty($supported_methods) ? '' : ', ') . '<a href="http://www.shamusyoung.com/twentysidedtale/?p=1462">Wavatars</a>'; @@ -386,54 +383,55 @@ class serendipity_event_gravatar extends serendipity_event } } echo '<div class="serendipity_commentDirection serendipity_comment_gravatar">' . sprintf(PLUGIN_EVENT_GRAVATAR_SUPPORTED, $supported_methods) . '</div>'; - return true; break; default: return false; + } + return true; } else { return false; } } - + /** * Returns HTML displaying the user avatar. This is done without any call to external servers. * If a cached avatar is found, the image will have it as SRC, else the SRC will be filled with * an external_plugin call, that will try to fetch a fresh avatar later. - * */ - function printAvatarHtml(&$eventData, &$addData){ + function printAvatarHtml(&$eventData, &$addData) + { global $serendipity; - - $useSmarty = serendipity_db_bool($this->get_config('smartyimage', false)); - + + $useSmarty = serendipity_db_bool($this->get_config('smartyimage', 'false')); + // comments sidebar plugin doesn't support smarty, so switch it off, if detected if ($addData['from'] == 'serendipity_plugin_comments:generate_content') { - if (!serendipity_db_bool($this->get_config('recent_entries', true))) { + if (!serendipity_db_bool($this->get_config('recent_entries', 'true'))) { return false; } $useSmarty = false; - } - + } + if (empty($eventData['url']) && empty($eventData['email']) && empty($eventData['author']) && !$this->supportDefaultAvatar()) { $this->log("No url nor email handed and default avatar not supported!"); return false; } - + if (!empty($eventData['url']) && !preg_match('@^https*://@i',$eventData['url'])){ $this->log("Changed wrong url: {$eventData['url']}"); $eventData['url'] = 'http://' . $eventData['url']; } - + $url = ''; if (!empty($eventData['url'])) { - $url = $eventData['url']; + $url = $eventData['url']; } - - if (!empty($eventData['url'])) { // Strip Query paras - $urlparts = explode('?', $eventData['url']); - $url = $urlparts[0]; + + if (!empty($eventData['url'])) { // Strip Query params + $urlparts = explode('?', $eventData['url']); + $url = $urlparts[0]; } $title = ''; $author = 'unknown'; @@ -441,38 +439,38 @@ class serendipity_event_gravatar extends serendipity_event $author = (function_exists('serendipity_specialchars') ? serendipity_specialchars($eventData['author']) : htmlspecialchars($eventData['author'], ENT_COMPAT, LANG_CHARSET)); $title = $author; } - + if (isset($eventData['email']) && !empty($eventData['email'])) { - $email_md5 = md5(strtolower($eventData['email'])); + $email_md5 = md5(strtolower($eventData['email'])); } else { - $email_md5 = ''; + $email_md5 = ''; } if ($this->cache_seconds > 0) { $cache_file = $this->getCacheFilePath($eventData); // if no cache filename was generated, no usable user data was found. - // this meens: it won't be possible to generate any image, so break at this point. + // this meens: it won't be possible to generate any image, so break at this point. if (!isset($cache_file)) { - return false; + return false; } $this->log("comment print: " . print_r($eventData, true)); - // If there is a cache file that's new enough, return the image immidiatly + // If there is a cache file that's new enough, return the image immidiatly if (file_exists($cache_file) && (time() - filemtime($cache_file) < $this->cache_seconds)) { $url = $serendipity['baseURL'] . $serendipity['indexFile'] . '?/' - . $this->getPermaPluginPath() . '/cachedAvatar_' . md5($url) . '_' . $email_md5 + . $this->getPermaPluginPath() . '/cachedAvatar_' . md5($url) . '_' . $email_md5 . '_' . md5($author); } else { // no image cached yet, call external plugin hook for fetching a new one $url = $serendipity['baseURL'] . $serendipity['indexFile'] . '?/' - . $this->getPermaPluginPath() . '/fetchAvatar_' . $this->urlencode($url) . '_' . $email_md5 + . $this->getPermaPluginPath() . '/fetchAvatar_' . $this->urlencode($url) . '_' . $email_md5 . '_' . $this->urlencode($author) . '_' . $eventData['id']; } - + } else { // call external plugin hook for fetching a new one $url = $serendipity['baseURL'] . $serendipity['indexFile'] . '?/' - . $this->getPermaPluginPath() . '/fetchAvatar_' . $this->urlencode($url) . '_' . $email_md5 + . $this->getPermaPluginPath() . '/fetchAvatar_' . $this->urlencode($url) . '_' . $email_md5 . '_' . $this->urlencode($author) . '_' . $eventData['id']; } - + $image_html = $this->generateImageHtml($url, $title, $this->get_config('align', 'right'), !$useSmarty, $this->generateAvatarCssClass($addData)); if ($useSmarty) { $eventData['avatar'] = $image_html; @@ -480,15 +478,16 @@ class serendipity_event_gravatar extends serendipity_event else { $eventData['comment'] = $image_html . $eventData['comment']; } - + return true; } - + /** - * Generates a CSS class for the avatar depending where it is displayed. + * Generates a CSS class for the avatar depending where it is displayed. * Defaults to comment_avatar in comments and is unique for plugins. */ - function generateAvatarCssClass($addData){ + function generateAvatarCssClass($addData) + { if (empty($addData)) { return "avatar"; } @@ -497,18 +496,19 @@ class serendipity_event_gravatar extends serendipity_event $css = $parts[0]; return ($css == 'functions_entries'? 'comment' : $css ) . '_avatar'; } - + /** * Tests wether the default avatar is supported */ - function supportDefaultAvatar(){ - + function supportDefaultAvatar() + { + // Check if a default avatar is defined $default = $this->getDefaultImageConfiguration(); if (empty($default['defaultavatar'])) { return false; } - + // check if default avatar method is configured as one of the avatar methods. for($methodnr = 1; $methodnr <= PLUGIN_EVENT_GRAVATAR_METHOD_MAX; $methodnr++){ $method = $this->get_config("method_" . $methodnr); @@ -517,7 +517,7 @@ class serendipity_event_gravatar extends serendipity_event if ($method == 'none'){ return false; } - + // return true if default avatar method is found if ($method == 'default'){ return true; @@ -525,20 +525,21 @@ class serendipity_event_gravatar extends serendipity_event } return false; } - + /** * Will try to fetch a fresh avatar image by user configuration. If retreiving was successfull, - * the image will cached and displayed as binary image response. + * the image will cached and displayed as binary image response. */ - function fetchAvatar(&$eventData) { + function fetchAvatar(&$eventData) + { global $serendipity; - + $methodnr = 1; - + // Assure existance of cache directory @mkdir($this->getCacheDirectory()); $default = $this->getDefaultImageConfiguration(); - + // load configuration of last run $lastrun_fname = $this->getCacheFilePath($eventData) . '.lastrun'; if (file_exists($lastrun_fname) && (time() - filemtime($lastrun_fname))< $this->cache_seconds) { @@ -552,7 +553,7 @@ class serendipity_event_gravatar extends serendipity_event $methodnr = $this->avatarConfiguration['methodnr']; $this->log("MethodNr by lastrun: $methodnr"); } - } + } $success = false; while (!$success && $methodnr <= PLUGIN_EVENT_GRAVATAR_METHOD_MAX) { @@ -573,16 +574,13 @@ class serendipity_event_gravatar extends serendipity_event case 'identica': $success = $this->fetchIdentica($eventData); break; - case 'mybloglog': - $success = $this->fetchMyBlogLog($eventData); - break; case 'monsterid': $success = $this->fetchMonster($eventData); break; case 'wavatars': $success = $this->fetchWavatar($eventData); break; - case 'identicon': + case 'identicon': $success = $this->fetchYcon($eventData); break; case 'default': @@ -610,13 +608,14 @@ class serendipity_event_gravatar extends serendipity_event /** * Fetches a Gravatar and returns it as a binary image response. - * + * * @param array eventdata the data given by the event * @param int cache hours for fetching images from cache - * + * * @return boolean true, if Avatar was found and added to the comment buffer */ - function fetchGravatar(&$eventData){ + function fetchGravatar(&$eventData) + { global $serendipity; $this->log("Gravatar: url=" . $eventData['url'] . " email_md5=" . $eventData['email_md5'] . " author=" .$eventData['author']) ; @@ -625,30 +624,30 @@ class serendipity_event_gravatar extends serendipity_event return false; } if (empty($eventData['email_md5'])) { - if (!serendipity_db_bool($this->get_config('gravatar_fallback_use_always', false)) || (empty($eventData['url']) && empty($eventData['author']))) { - return false; - } - else { - if (empty($eventData['url'])) $email_md5 = md5($eventData['author']); - else $email_md5 = md5($eventData['url']); - } + if (!serendipity_db_bool($this->get_config('gravatar_fallback_use_always', 'false')) || (empty($eventData['url']) && empty($eventData['author']))) { + return false; + } + else { + if (empty($eventData['url'])) $email_md5 = md5($eventData['author']); + else $email_md5 = md5($eventData['url']); + } } else { - $email_md5 = $eventData['email_md5']; + $email_md5 = $eventData['email_md5']; } $default = $this->getDefaultImageConfiguration(); - + $gravatar_fallback = $this->get_config("gravatar_fallback"); $fallback = ""; if ($gravatar_fallback != 'none') { - $fallback = '&d=' . $gravatar_fallback; + $fallback = '&d=' . $gravatar_fallback; } else { - //$defaultavatar = urlencode((empty($default['defaultavatar'])? $serendipity['baseURL'] . 'dummy.gif': 'http://' . $_SERVER['SERVER_NAME'] . $default['defaultavatar'])); - $defaultavatar = urlencode($serendipity['serendipityHTTPPath'] . 'dummy456.gif123'); // Add a not existing image to produce an error we can check - $fallback = '&d=' . $defaultavatar; + //$defaultavatar = urlencode((empty($default['defaultavatar'])? $serendipity['baseURL'] . 'dummy.gif': 'http://' . $_SERVER['SERVER_NAME'] . $default['defaultavatar'])); + $defaultavatar = urlencode($serendipity['serendipityHTTPPath'] . 'dummy456.gif123'); // Add a not existing image to produce an error we can check + $fallback = '&d=' . $defaultavatar; } - + $urltpl = 'http://www.gravatar.com/avatar.php?' . 'gravatar_id=' . $email_md5 . $fallback @@ -657,79 +656,44 @@ class serendipity_event_gravatar extends serendipity_event // Assure a default avatar, because we need it for testing if the avatar given by Gravatar is a dummy image. $this->log("Gravatar Link: " . $urltpl) ; - + $success = $this->saveAndResponseAvatar($eventData, $urltpl, 1); $this->avatarConfiguration['gravatar_found'] = $success; + return $success; } - /** - * Tries to add a MyBlogLog.com avatar to the comment. - * - * @param array eventdata the data given by the event - * @param int cache hours for fetching images from cache - * @param array default default values for avatar images - * - * @return boolean true, if Avatar was found and added to the comment buffer - */ - function fetchMyBlogLog(&$eventData){ - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; - global $serendipity; - // Was lastrun successfull? - if (isset($this->avatarConfiguration['mybloglog_found']) && !$this->avatarConfiguration['mybloglog_found']) { - return false; - } - if (empty($eventData['url'])) { - return false; - } - - // Get configured plugin path: - $pluginPath = 'plugin'; - if (isset($serendipity['permalinkPluginPath'])){ - $pluginPath = $serendipity['permalinkPluginPath']; - } - - $author_url = 'http://pub.mybloglog.com/coiserv.php?' - . 'href=' . $eventData['url'] - . '&n=' . (!empty($eventData['author']) ? $eventData['author'] : '*'); - - $check = $this->saveAndResponseMyBlogAvatar($eventData, $author_url); - $this->avatarConfiguration['mybloglog_found'] = $check; - - return $check; - } - - /** * Tries to add a favatar or pavatar (depending on the given mode) to the comment. - * + * * @param array eventdata the data given by the event * @param int cache hours for fetching images from cache - * @param string mode has to be 'P' for Pavatar or 'F' for Favatar loading. - * + * @param string mode has to be 'P' for Pavatar or 'F' for Favatar loading. + * * @return boolean true, if Avatar was found and added to the comment buffer */ - function fetchPFavatar(&$eventData, $mode="F"){ - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + function fetchPFavatar(&$eventData, $mode="F") + { + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; global $serendipity; - + $default = $this->getDefaultImageConfiguration(); - + $url = $eventData['url']; if (empty($url)) { return false; } $favicon = false; - + $this->log($mode . " - Trying to fetch for $url"); - + // Try to get the URL $parts = @parse_url($url); if (!is_array($parts)) { return false; } - + $ip = @gethostbyname($parts['host']); if (!$ip || $ip == $parts['host']) { return false; @@ -738,45 +702,42 @@ class serendipity_event_gravatar extends serendipity_event $this->log($mode . " - URL ok."); $cache_file = $this->getCacheFilePath($eventData); - + // Load icon url detected in last run if (isset($this->avatarConfiguration['img_url_'.$mode])){ $favicon = $this->avatarConfiguration['img_url_'.$mode]; $this->log($mode . " - using last run url: $favicon"); } - + if ($favicon === false) { // use optimization for localhost $islocalhost = ($_SERVER['HTTP_HOST'] == $parts['host']); - + if (function_exists('serendipity_request_start')) { serendipity_request_start(); } - - + // Evaluate URL of P/Favatar - $req = new HTTP_Request($url, array('allowRedirects' => true, 'maxRedirects' => 3)); + $options = array('follow_redirects' => true, 'max_redirects' => 3); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($url, HTTP_Request2::METHOD_GET, $options); $favicon = false; // code 200: OK, code 30x: REDIRECTION $responses = "/(200 OK)|(30[0-9] Found)/"; // |(30[0-9] Moved) - if (!$islocalhost && (PEAR::isError($req->sendRequest()) || preg_match($responses, $req->getResponseCode()))) { - // nothing to do, - $favicon = false; - $this->log($mode . " - Error fetching $url: " . $req->getResponseCode()); - } - else { - $pavatarHeaderIcon = $req->getResponseHeader("X-Pavatar"); - $fContent = $req->getResponseBody(); + try { + $response = $req->send(); + $pavatarHeaderIcon = $response->getHeader("X-Pavatar"); + $fContent = $response->getBody(); if ($mode=='P' && !empty($pavatarHeaderIcon)){ $faviconURL = $pavatarHeaderIcon; $this->log("Found x-pavatar in head: $faviconURL"); } - else if (!$islocalhost && - ($mode=='P' && preg_match('/<link[^>]+rel="pavatar"[^>]+?href="([^"]+?)"/si', $fContent, $matches)) || - ($mode=='F' && preg_match('/<link[^>]+rel="(?:shortcut )?icon"[^>]+?href="([^"]+?)"/si', $fContent, $matches)) - ) + else if (!$islocalhost && ($mode=='P' && preg_match('/<link[^>]+rel="pavatar"[^>]+?href="([^"]+?)"/si', $fContent, $matches)) || + ($mode=='F' && preg_match('/<link[^>]+rel="(?:shortcut )?icon"[^>]+?href="([^"]+?)"/si', $fContent, $matches))) { - // Attempt to grab an avatar link from their webpage url $linkUrl = (function_exists('serendipity_entity_decode') ? serendipity_entity_decode($matches[1]) : html_entity_decode($matches[1], ENT_COMPAT, LANG_CHARSET)); if (substr($linkUrl, 0, 1) == '/') { @@ -790,61 +751,65 @@ class serendipity_event_gravatar extends serendipity_event } else { $faviconURL = $url . '/' . $linkUrl; } - + $this->log($mode . " - Found link rel to url $faviconURL"); - } - else { + } else { // If unsuccessful, attempt to "guess" the favicon location $urlParts = parse_url($url); $faviconURL = $urlParts['scheme'] . '://' . $urlParts['host'] . ($mode=='F'?'/favicon.ico':'/pavatar.png'); $this->log($mode . " - Not found link rel, guessing $faviconURL"); } - + // Split image URL and check if image is available using a fast and timed out socket: - $url_parts = @parse_url($faviconURL); if (!is_array($url_parts)) { $url_parts = array(); } - + if (!empty($url_parts['path'])) { $documentpath = $url_parts['path']; } else { $documentpath = '/'; } - + if (!empty($url_parts['query'])) { $documentpath .= '?' . $url_parts["query"]; } - + if (empty($url_parts['port'])) { $url_parts['port'] = '80'; } - + if (!empty($url_parts['host'])) { $socket = @fsockopen($url_parts['host'], $url_parts['port'], $errno, $errstr, 30); - + if ($socket) { fwrite($socket, "HEAD " . $documentpath . " HTTP/1.0\r\nHost: {$url_parts['host']}\r\n\r\n"); $http_response = fgets($socket, 25); - + $this->log($mode . ' Testing server ' . $url_parts['host'] . " dopath: $documentpath - HEAD Response: $http_response"); - - if (preg_match($responses, $http_response)) // We only test for server existance + + if (preg_match($responses, $http_response)) // We only test for server existance { $favicon = $faviconURL; } fclose($socket); } } - + // Remember the last result of the P/Favatar search - $this->avatarConfiguration['img_url_'.$mode] = $favicon; + $this->avatarConfiguration['img_url_'.$mode] = $favicon; + } catch (HTTP_Request2_Exception $e) { + if (!$islocalhost && preg_match($responses, $response->getStatus())) { + $favicon = false; + $this->log($mode . " - Error fetching $url: " . $response->getStatus()); + } } + if (function_exists('serendipity_request_end')) { serendipity_request_end(); } - } // if favicon url not loaded from cache + } // if favicon url not loaded from cache if (!empty($favicon)) { $this->log($mode . " - found at: $favicon"); @@ -853,11 +818,11 @@ class serendipity_event_gravatar extends serendipity_event else { return false; } - } - - function fetchTwitter(&$eventData) { - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + + function fetchTwitter(&$eventData) + { + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; // Was lastrun successfull? if (isset($this->avatarConfiguration['twitter_found']) && !$this->avatarConfiguration['twitter_found']) { @@ -873,7 +838,7 @@ class serendipity_event_gravatar extends serendipity_event } catch (Exception $e) { $this->log($e); } - + if (empty($eventData['url'])) { return false; } @@ -887,22 +852,33 @@ class serendipity_event_gravatar extends serendipity_event $path = trim($parts['path']); $dirs = explode('/',$path); $twittername = $dirs[1]; - //if ($twittername=='#!') $twittername = $dirs[2]; - + $this->log("Twitteruser found ($url): $twittername"); - + $twitter_search = 'http://search.twitter.com/search.atom?q=from%3A' . $twittername . '&rpp=1'; serendipity_request_start(); - $req = new HTTP_Request($twitter_search); - $req->sendRequest(); - $this->last_error = $req->getResponseCode(); - if ($req->getResponseCode() != 200) { - $this->last_error = $req->getResponseCode(); + $options = array(); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($twitter_search, HTTP_Request2::METHOD_GET, $options); + try { + $response = $req->send(); + + $this->last_error = $response->getStatus(); + if ($response->getStatus() != 200) { + throw new HTTP_Request2_Exception("Could not search on twitter"); + } + $response = trim($response->getBody()); + + } catch (HTTP_Request2_Exception $e) { + $this->last_error = $response->getStatus(); serendipity_request_end(); $this->log("Twitter Error: {$this->last_error}"); return false; } - $response = trim($req->getResponseBody()); + serendipity_request_end(); $parser = xml_parser_create(); $vals=array(); $index=array(); @@ -916,20 +892,21 @@ class serendipity_event_gravatar extends serendipity_event break; } } - if ($success) { + if ($success) { $success = $this->saveAndResponseAvatar($eventData, $img_url); } } $this->avatarConfiguration['twitter_found'] = $success; return $success; } - return false; - + return false; + } - - function fetchIdentica(&$eventData) { - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; - + + function fetchIdentica(&$eventData) + { + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; + // Was lastrun successfull? if (isset($this->avatarConfiguration['identica_found']) && !$this->avatarConfiguration['identica_found']) { return false; @@ -938,21 +915,30 @@ class serendipity_event_gravatar extends serendipity_event return false; } $url = $eventData['url']; - + if (preg_match('@^http://identi\.ca/notice/(\d+)$@',$url,$matches)) { $status_id = $matches[1]; $search = "http://identi.ca/api/statuses/show/$status_id.xml"; serendipity_request_start(); - $req = new HTTP_Request($search); - $req->sendRequest(); - $this->last_error = $req->getResponseCode(); - if ($req->getResponseCode() != 200) { - $this->last_error = $req->getResponseCode(); + $options = array(); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($search, HTTP_Request2::METHOD_GET, $options); + try { + $response = $req->send(); + $this->last_error = $response->getStatus(); + if ($response->getStatus() != 200) { + throw new HTTP_Request2_Exception("Could not search on identica"); + } + $response = trim($response->getBody()); + } catch (HTTP_Request2_Exception $e) { + $this->last_error = $response->getStatus(); serendipity_request_end(); $this->log("Identica Error: {$this->last_error}"); return false; } - $response = trim($req->getResponseBody()); serendipity_request_end(); $parser = xml_parser_create(); $vals=array(); $index=array(); @@ -966,20 +952,21 @@ class serendipity_event_gravatar extends serendipity_event return $success; } - return false; - + return false; + } - + /** * Shows a monster id avatar. - * + * * @param array eventdata the data given by the event - * + * * @return boolean true, if Avatar was found and added to the comment buffer */ - function fetchMonster(&$eventData){ + function fetchMonster(&$eventData) + { require_once dirname(__FILE__) . '/monsterid/monsterid.php'; - + $seed = md5($eventData['author']) . $eventData['email_md5'] . md5($eventData['url']); $default = $this->getDefaultImageConfiguration(); $size = $default['size']; @@ -997,19 +984,20 @@ class serendipity_event_gravatar extends serendipity_event $this->fetchDefault(); } - return true; + return true; } /** * Shows a monster id avatar. - * + * * @param array eventdata the data given by the event - * + * * @return boolean true, if Avatar was found and added to the comment buffer */ - function fetchWavatar(&$eventData){ + function fetchWavatar(&$eventData) + { require_once dirname(__FILE__) . '/wavatars/wavatars.php'; - + $seed = md5($eventData['author']) . $eventData['email_md5'] . md5($eventData['url']); $default = $this->getDefaultImageConfiguration(); $size = $default['size']; @@ -1027,21 +1015,22 @@ class serendipity_event_gravatar extends serendipity_event $this->fetchDefault(); } - return true; + return true; } /** * Shows an identicon/ycon avatar (generated locally). * http://www.docuverse.com/blog/donpark/2007/01/18/visual-security-9-block-ip-identification * http://www.evilissexy.com/ - * + * * @param array eventdata the data given by the event - * + * * @return boolean true, if Avatar was found and added to the comment buffer */ - function fetchYcon(&$eventData){ + function fetchYcon(&$eventData) + { require_once dirname(__FILE__) . '/ycon/ycon.image.php'; - + $seed = md5($eventData['author']) . $eventData['email_md5'] . md5($eventData['url']); $default = $this->getDefaultImageConfiguration(); $size = $default['size']; @@ -1059,24 +1048,25 @@ class serendipity_event_gravatar extends serendipity_event $this->fetchDefault(); } - return true; + return true; } - + /** * Shows the local default avatar. - * + * * @param array eventdata the data given by the event - * + * * @return boolean true, if Avatar was found and added to the comment buffer */ - function fetchDefault(){ + function fetchDefault() + { global $serendipity; - + $default = $this->getDefaultImageConfiguration(); if (empty($default['defaultavatar'])) { return false; } - + $this->log("FetchDefault"); // Set fetch date. Show will use this for caclculating cache. $this->avatarConfiguration['fetch_date'] = time(); @@ -1087,65 +1077,67 @@ class serendipity_event_gravatar extends serendipity_event $this->log("DefaultUrl RPL: " . $defaultUrl); $this->log("FetchDefault: DOC_ROOT" . $_SERVER["DOCUMENT_ROOT"]); $this->show($_SERVER["DOCUMENT_ROOT"] . '/' . $defaultUrl); - + return true; } - /** - * Caches an avatar and streams it back to the browser. + * Caches an avatar and streams it back to the browser. */ - function saveAndResponseAvatar($eventData, $url, $allow_redirection = 3){ - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + function saveAndResponseAvatar($eventData, $url, $allow_redirection = 3) + { + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; global $serendipity; $fContent = null; - + if (function_exists('serendipity_request_start')) { serendipity_request_start(); } - - if ($allow_redirection) { - $request_pars['allowRedirects'] = true; - $request_pars['maxRedirects'] = $allow_redirection; - } - else { - $request_pars['allowRedirects'] = false; - } - - $req = new HTTP_Request($url, $request_pars); - // if the request leads to an error we don't want to have it: return false - if (PEAR::isError($req->sendRequest()) || ($req->getResponseCode() != '200')) { - $fContent = null; - if ($req->getResponseCode() != '200') { - $this->log("Avatar fetch error: " . $req->getResponseCode() . " for url=" . $url); - } - else { - $this->log("Avatar fetch error: PEAR reported ERROR for url=" . $url); - } - + if ($allow_redirection) { + $request_pars['follow_redirects'] = true; + $request_pars['max_redirects'] = $allow_redirection; } else { + $request_pars['follow_redirects'] = false; + } + + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $request_pars['ssl_verify_peer'] = false; + } + + $req = new HTTP_Request2($url, HTTP_Request2::METHOD_GET, $request_pars); + try { + $response = $req->send(); + if ($response->getStatus() != '200') { + throw new HTTP_Request2_Exception("Could not search on identica"); + } // Allow only images as Avatar! - $mime = $req->getResponseHeader("content-type"); + $mime = $response->getHeader("content-type"); + $this->avatarConfiguration['mime-type'] = $mime; $this->log("Avatar fetch mimetype: $mime" . " for url=" . $url); $mimeparts = explode('/',$mime); if (count($mimeparts)==2 && $mimeparts[0]=='image') { - $fContent = $req->getResponseBody(); + $fContent = $response->getBody(); } - } - + } catch (HTTP_Request2_Exception $e) { + $fContent = null; + $this->log("Avatar fetch error: " . $e); + + } + if (function_exists('serendipity_request_start')) { serendipity_request_end(); } - + // if no content was fetched, return false if (!isset($fContent) || empty($fContent)){ $this->log("Avatar fetch: no Content!"); return false; } - $cache_file = $this->cacheAvatar($eventData, $fContent,$req); + $cache_file = $this->cacheAvatar($eventData, $fContent); if ($cache_file) { $this->show($cache_file); } @@ -1156,135 +1148,18 @@ class serendipity_event_gravatar extends serendipity_event return true; } - function saveAndResponseMyBlogAvatar($eventData, $url) { - global $serendipity; - - $request_pars['allowRedirects'] = false; - - $this->log("saveAndResponseMyBlogAvatar: " . $url); - - // First a dummy icon is fetched. This is done by fetching a MyBlog Avatar for a not existing domain. - // If we have done this before, the dummy_md5 is already set, so we can skip this fetching here. - if (!isset($this->mybloglog_dummy_md5)) { - - $cachefilename = '_mybloglogdummy.md5'; - $cache_file = $this->getCacheDirectory() . '/' . $cachefilename; - - // Look up the cache for the md5 of the MyBlogLog dummy icon saved earlier: - if (file_exists($cache_file) && time() - filemtime($cache_file) < $this->cache_seconds){ - $fp = fopen($cache_file, 'rb'); - $this->mybloglog_dummy_md5 = fread($fp, filesize($cache_file)); - fclose($fp); - $this->log("Loaded dummy MD5: " . $this->mybloglog_dummy_md5); - } - else { // dummy MD5 file was not cached or was too old. We have to fetch the dummy icon now - $dummyurl = 'http://pub.mybloglog.com/coiserv.php?href=http://grunz.grunz.grunz&n=*'; - $this->log("trying dummyUrl: " . $dummyurl); - if (function_exists('serendipity_request_start')) { - serendipity_request_start(); - } - $reqdummy = new HTTP_Request($dummyurl, $request_pars); - if (PEAR::isError($reqdummy->sendRequest()) || ($reqdummy->getResponseCode() != '200')) { - if (function_exists('serendipity_request_start')) { - serendipity_request_end(); - } - $this->avatarConfiguration["mybloglog_dummy_error!"]=$reqdummy->getResponseCode(); - // unable to fetch a dummy picture! - $this->log("unable to fetch a dummy picture!" . $dummyurl); - return false; // what can we say else.. - } - else { - - // Allow only images as Avatar! - $mime = $reqdummy->getResponseHeader("content-type"); - $this->log("MyBlogLog Avatar fetch mimetype: $mime"); - $mimeparts = explode('/',$mime); - if (count($mimeparts)!=2 || $mimeparts[0]!='image') { - // unable to fetch a dummy picture! - $this->log("unable to fetch a dummy picture!" . $dummyurl); - if (function_exists('serendipity_request_start')) { - serendipity_request_end(); - } - return false; // what can we say else.. - } - - $fContent = $reqdummy->getResponseBody(); - $this->mybloglog_dummy_md5 = md5($fContent); - // Save MD5 of dummy icon for later runs - $fp = fopen($cache_file, 'wb'); - fwrite($fp,$this->mybloglog_dummy_md5); - fclose($fp); - $this->log("dummy MD5 saved: " . $this->mybloglog_dummy_md5); - } - if (function_exists('serendipity_request_start')) { - serendipity_request_end(); - } - } - } - - // Fetch the correct icon and compare: - if (isset($this->mybloglog_dummy_md5)) { - $cachefilename = $this->getCacheFilePath($eventData); - - // fetch the icon - if (function_exists('serendipity_request_start')) { - serendipity_request_start(); - } - $this->log("Fetching mbl: " . $url); - $req = new HTTP_Request($url, $request_pars); - if (PEAR::isError($req->sendRequest()) || ($req->getResponseCode() != '200')) { - if (function_exists('serendipity_request_start')) { - serendipity_request_end(); - } - $this->log("Unable to fetch the correct image!"); - // Unable to fetch the correct image! - return false; - } - else { - // Test, if this realy is an image! - $mime_type = $req->getResponseHeader('content-type'); - if (!empty($mime_type)) $mt_parts = explode('/',$mime_type); - if (isset($mt_parts) && is_array($mt_parts) && $mt_parts[0] == 'image') { - $fContent = $req->getResponseBody(); - $avtmd5 = md5($fContent); - $this->log("mbl image fetched, MD5: " . $avtmd5); - if ($this->mybloglog_dummy_md5 != $avtmd5) { - $this->log("caching mbl image: " . $cachefilename); - $this->cacheAvatar($eventData,$fContent,$req); - } - } else { - $this->log("MyBlogLog did not return an image: " . $mime_type ); - $avtmd5 = $this->mybloglog_dummy_md5; // Declare it as dummy in order not to save it. - } - - } - if (function_exists('serendipity_request_start')) { - serendipity_request_end(); - } - - if ($this->mybloglog_dummy_md5 == $avtmd5){ // This seems to be a dummy avatar! - return false; - } - else { - $this->show($cachefilename); - return true; - } - } - return false; - } - /** * Caches an avatar file. - * + * * @param string cache_file name of file used for caching * @param string fContent content to be cached - * @param request req optional the request that produced this content (for logging) */ - function cacheAvatar($eventData, $fContent, $req=null){ + function cacheAvatar($eventData, $fContent) + { $cache_file = $this->getCacheFilePath($eventData); $this->log("cacheAvatar: " . $cache_file); - + // Save image @mkdir($this->getCacheDirectory()); $fp = @fopen($cache_file, 'wb'); @@ -1300,20 +1175,14 @@ class serendipity_event_gravatar extends serendipity_event fwrite($fp, $fContent); fclose($fp); - if (isset($req)){ - // Remember mime type - $mime_type = $req->getResponseHeader('content-type'); - $this->avatarConfiguration['mime-type'] = $mime_type; - } return $cache_file; } - - /** * Return binary response for an image */ - function show($filename) { + function show($filename) + { $this->log("show: $filename"); if (!file_exists($filename)) { header('X-Avatar: No-Image'); @@ -1328,16 +1197,16 @@ class serendipity_event_gravatar extends serendipity_event if (!isset($mime_type)) { $size = @getimagesize($filename); $mime_type = $size['mime']; - $this->avatarConfiguration['mime-type'] = $mime_type; + $this->avatarConfiguration['mime-type'] = $mime_type; } - + // test wether this really is (at least declared as) an image! // else deny it. $mime_parts = explode('/', $mime_type); if (count($mime_parts)!=2 || $mime_parts[0]!='image') { return false; } - + $fp = @fopen($filename, "rb"); if ($fp) { if (isset($this->avatarConfiguration['fetch_date'])) { @@ -1372,67 +1241,71 @@ class serendipity_event_gravatar extends serendipity_event * @param string title the title for that image * @return string the html code representing the Avatar */ - function generateImageHtml($url, $title = null, $align = 'right', $addAlignClass = true, $cssClass = "comment_avatar"){ - + function generateImageHtml($url, $title = null, $align = 'right', $addAlignClass = true, $cssClass = "comment_avatar") + { $default = $this->getDefaultImageConfiguration(); - + if (empty($title)){ $title = 'Avatar'; } if (PLUGIN_EVENT_GRAVATAR_DEBUG) $title .= ' (Avatar Plugin V.' . PLUGIN_EVENT_GRAVATAR_VERSION . ' DEBUG)'; - + // set alignment by configuration $cssAlign = ''; if ($addAlignClass && ($align == 'right' || $align == 'left')) $cssAlign = "avatar_$align"; $alt = '*'; - if (serendipity_db_bool($this->get_config('autoralt', false))) { - $alt = $title; + if (serendipity_db_bool($this->get_config('autoralt', 'false'))) { + $alt = $title; } return '<img src="' . $url . '" alt="' . $alt . '" title="' . $title . '" class="' . $cssClass . ($addAlignClass? " $cssAlign":"") . '" height="' . $default['size'] . '" width="' . $default['size'] . '"/>'; } - + /** * Just generates comments into the comment block. Used for debugging only! */ - function generateComment(&$eventData, $comment){ + function generateComment(&$eventData, $comment) + { $eventData['comment'] = "-- $comment --<br>\n" . $eventData['comment']; } /** * Returns the avatar cache directory */ - function getCacheDirectory(){ + function getCacheDirectory() + { global $serendipity; if ($this->cache_dir === null) { $this->cache_dir = $serendipity['serendipityPath'] . PATH_SMARTY_COMPILE . '/serendipity_event_avatar'; } - return $this->cache_dir; + return $this->cache_dir; } - + /** * Returns the Path of the avatar cache file by the given user data found in eventData * If no relevant user data was found, null is returned. - * + * */ - function getCacheFilePath($eventData){ + function getCacheFilePath($eventData) + { global $serendipity; - + $cache_filename = $this->getCacheFileName($eventData); if (!isset($cache_filename)) { return null; } return $this->getCacheDirectory() .'/' . $cache_filename;; } - + /** * Returns the URL of the cached avatar by the given user data found in eventData * If no relevant user data was found, null is returned. - * + * */ - function getCacheFileUrl($eventData){ + function getCacheFileUrl($eventData) + { global $serendipity; - + $cache_filename = $this->getCacheFileName($eventData); if (!isset($cache_filename)) { return null; @@ -1443,32 +1316,35 @@ class serendipity_event_gravatar extends serendipity_event /** * Returns a URL encoded and signed variable. */ - function urlencode($url) { + function urlencode($url) + { $hash = md5($this->instance_id . $url); return $hash . str_replace ('_', '%5F', urlencode($url)); } - - function urldecode($url) { + + function urldecode($url) + { $hash = substr($url, 0, 32); $real_url = urldecode(substr($url, 32)); if ($hash == md5($this->instance_id . $real_url)) { // Valid hash was found. - return $real_url; + return $real_url; } else { // Invalid hash. return ''; } } - + /** * Returns only the name of the cached avatar by the given user data found in eventData * If no relevant user data was found, null is returned. - * + * */ - function getCacheFileName($eventData){ + function getCacheFileName($eventData) + { global $serendipity; - + if (!isset($eventData['email']) && !isset($eventData['email_md5']) && !isset($eventData['url'])) { return null; } @@ -1479,19 +1355,20 @@ class serendipity_event_gravatar extends serendipity_event else if (isset($eventData['email'])) { $email_md5 = md5(strtolower($eventData['email'])); } - + $author_md5= isset($eventData['author'])? md5($eventData['author']) : ''; $url_md5 = isset($eventData['url'])? md5($eventData['url']) : '' ; return $url_md5 . '_' . $email_md5 . '_' . $author_md5; } - + /** * Builds an array of default image configuration */ - function getDefaultImageConfiguration() { + function getDefaultImageConfiguration() + { global $serendipity; - + if ($this->defaultImageConfigurationdefault === null) { $this->defaultImageConfigurationdefault = array( 'defaultavatar' => ($this->get_config('defaultavatar')==''?'': $this->get_config('defaultavatar', '')), @@ -1502,26 +1379,29 @@ class serendipity_event_gravatar extends serendipity_event return $this->defaultImageConfigurationdefault; } - function getPermaPluginPath() { + function getPermaPluginPath() + { global $serendipity; - // Get configured plugin path: + // Get configured plugin path: $pluginPath = 'plugin'; if (isset($serendipity['permalinkPluginPath'])){ $pluginPath = $serendipity['permalinkPluginPath']; } - + return $pluginPath; - + } - - function log($message){ + + function log($message) + { if (!PLUGIN_EVENT_GRAVATAR_DEBUG) return; $fp = fopen($this->getCacheDirectory() . '.log','a'); fwrite($fp, $message . "\n"); fclose($fp); } + } /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/plugins/serendipity_event_gravatar/wavatars/wavatars.php b/plugins/serendipity_event_gravatar/wavatars/wavatars.php index 9e075a6f..9be2cac5 100644 --- a/plugins/serendipity_event_gravatar/wavatars/wavatars.php +++ b/plugins/serendipity_event_gravatar/wavatars/wavatars.php @@ -99,9 +99,9 @@ Builds the avatar. function wavatar_build ($filename, $seed, $size) { - if (!function_exists (imagecreatetruecolor)) { - return false; - } + if (!function_exists (imagecreatetruecolor)) { + return false; + } $face = 1 + (hexdec (substr ($seed, 1, 2)) % (WAVATAR_FACES)); $bg_color = (hexdec (substr ($seed, 3, 2)) % 240); $fade = 1 + (hexdec (substr ($seed, 5, 2)) % (WAVATAR_BACKGROUNDS)); @@ -142,4 +142,4 @@ function wavatar_build ($filename, $seed, $size) return true; } -?> +?> \ No newline at end of file diff --git a/plugins/serendipity_event_gravatar/ycon/ChangeLog b/plugins/serendipity_event_gravatar/ycon/ChangeLog deleted file mode 100644 index 5a2ec1c6..00000000 --- a/plugins/serendipity_event_gravatar/ycon/ChangeLog +++ /dev/null @@ -1,366 +0,0 @@ -# - * Allows other plugins to fetch user metadata via - avatar_fetch_userinfos hook. - * supports !# twitter links now, too. - -Version 1.57: (brockhaus) - * Better Gravatar handling, as the call changed a little - * Doesn't accept existing but empty images anymore. - -Version 1.56: (brockhaus) ------------------------------------------------------------------------- - * Removed inline styles, added class avatar_right and avatar_left. - If not found set in css, the plugin will emit a default style for - those two. - -Version 1.55: (brockhaus) ------------------------------------------------------------------------- - * Twitter and identica where not fetched correctly if fetched first. - -Version 1.54: ------------------------------------------------------------------------- - * Made PLUGIN_GRAVATAR_SUPPORTED recognize %s as variable for - list of supported services - -Version 1.52: ------------------------------------------------------------------------- - * Changed display of supported avatars in the comment area in order - to allow nice linebreaks. - -Version 1.51: ------------------------------------------------------------------------- - * Use strtolower() for mail names - -Version 1.49 (brockhaus) ------------------------------------------------------------------------- - * Pavatar in blogs having redirection didn't work, if Pavatar link - was only available in rel link info. - -Version 1.48 (brockhaus) ------------------------------------------------------------------------- - * FIX: PHP compatibility was broken since 1.46 :-/ - * Added Identica Avatar. - This is mainly used for Identica Pingbacks and should be used in - front of Favatar, else the Identica sign will show up. - * Code cleanup. - -Version 1.47 (brockhaus) ------------------------------------------------------------------------- - * Disabled debug logging into template_c - -Version 1.46 (brockhaus) ------------------------------------------------------------------------- - - * Added Twitter Avatar (if URL points to a twitter profile) - This is mainly used for Tweetbacks and should be used in front of - Favatar, else the twitter sign will show up. - * Code cleanup. - -Version 1.45 (brockhaus) ------------------------------------------------------------------------- - - * Helpfiles - * Cleanup. - -Version 1.44 (brockhaus) ------------------------------------------------------------------------- - - * Added buildin wavatar suport. - * Support for Gravatar fallbacks identyicon, monsterid and wavatar. - * Optimized trackback avatars: Querypars will be stripped from URL. - Now in example S8Y blogs always get the same Avatar cached, not - one per trackback. - -Version 1.43 (brockhaus) ------------------------------------------------------------------------- - - * Option for adding the authors name to the ALT attribute of the - avatar image. Normaly this is filled with a *, but blind people - depend on the ALT tag. - -Version 1.42 (brockhaus) ------------------------------------------------------------------------- - - * Encoded _ in user urls in order to differ them from the - seperators. urlencode doesn't encode _. Thanks to Tino Schwarze - finding and fixing this. - -Version 1.41 (garvinhicking) ------------------------------------------------------------------------- - - * Fixed Last-Modified Header of avatar images. - -Version 1.40 () ------------------------------------------------------------------------- - - * Added ycon support (mo, http://moblog.wiredwings.com) - ------------------------------------------------------------------------- -Version 1.39 (brockhaus): - - * Monster Avatars are cached now, too, as creating them costs time. - ------------------------------------------------------------------------- -Version 1.38 (brockhaus): - - * Support for Monster ID avatars (details found on - http://www.splitbrain.org/go/monsterid) - * Crashed while fresh installing and cache time set to 0 - * Allows configuring absolute path to standard avatar now. - * After saving the configuration now the cache is *always* cleared, - in order to make the changes visible immidiately even if caching - is enabled. - * If the plugin is unable to write into the cache, it will log it - in debug mode and show the default image, if no cached file found. - ------------------------------------------------------------------------- -Version 1.37 (brockhaus): - - * The avatar type infoline below the comments editor is optional now - ------------------------------------------------------------------------- -Version 1.36 (brockhaus): - - * Added new option: You can define, that the plugin should not - produce avatar image directly but a smarty tag only. If this - option is switched on, you can define in your comments template, - where the avatar should be displayed using the smarty tag - $comment.comment_avatar - * Css class of avatar will change depending on where it is - displayed. For normal comments it will be "comment_avatar", for the - recent entries plugin it will be "serendipity_plugin_comments_avatar" - in order to have the possibility to easily style it. - * Avatar alignment configuration: The configured alignment will be - used, if the avatar is written directliy (no smarty tag). - * New option for switching on/off the avatar images in the sidebar - plugin (recent comments). - * Supported avatar methods where displayed in the contact form - plugin too, but this made no sense. Disabled it there. - * Some more changes in the language files. - ------------------------------------------------------------------------- -Version 1.35 (brockhaus): - - * Corrected errors in English language file. (Thanks to Don!) - ------------------------------------------------------------------------- -Version 1.34 (brockhaus): - - * Gravatars rating doesn't work reliable. My G rated Gravatar is only - shown, if I use Gravatar X rating. :-/ - Added an option to switch off Gravatars rating parameter (what - should be the same as using X rating) - ------------------------------------------------------------------------- -Version 1.33 (brockhaus): - - * Pavatar: X-Pavatar Header is supported now again and is the first - pavatar autodetect method used. - ------------------------------------------------------------------------- -Version 1.32 (brockhaus): - - * MyBlogLog default avatar was not detected correctly anmore. :-/ - * If no email nor url is given, but default avatar is defined, now - the default avatar is displayed. - ------------------------------------------------------------------------- -Version 1.31 (brockhaus): - - * Changed call-time pass-by-reference bug (fetchAvatar) - ------------------------------------------------------------------------- -Version 1.30 (brockhaus): - - * Standard Avatar was not displayed in subdirectory blog - installtions. - * Gravatar link was slightly wrong (but working) - ------------------------------------------------------------------------- -Version 1.29 (brockhaus): - - * Bugfix 1.27 added http:// even if no URL was given at all. - ------------------------------------------------------------------------- -Version 1.28 (brockhaus): - - * With Serendipity 1.1 it was not possible to configure a default - avatar. The configuration was not 1.1 compatible. - ------------------------------------------------------------------------- -Version 1.27 (brockhaus): - - * If the writer entered his url as www.domain.de instead of - http://www.domain.de, the Avatar was not always loaded correctly - ------------------------------------------------------------------------- -Version 1.26 (brockhaus): - - * MyBlogLog changed avatar calling slightly resuling MyBlogLog Avatar - fallback not working anymore. - ------------------------------------------------------------------------- -Version 1.25 (garvinhicking): - - * Replaced align with style attributes, as there is no align in - XHTML - ------------------------------------------------------------------------- -Version 1.24 (brockhaus): - - * Check MyBlogLog result if it really is an image. - * Cleaning up cache directory when setting cache to 0. - * Debug logging disabled. - ------------------------------------------------------------------------- -Version 1.23 (brockhaus): - - * While fresh fetching P/Favatars, the Plugin will only accept - responses declared as image by the remote server. This will - prevent accepting potential error html pages as Avatar images. - ------------------------------------------------------------------------- -Version 1.22 (brockhaus): - - * Fetch redirected P/Favatars, too. - ------------------------------------------------------------------------- -Version 1.21 (brockhaus): - - * Avatar fetching was broken when cache was disabled. - * Browser was not able to cache default avatars, because a wrong - cache time (in the past) was sent. - * Checks, if cached file looks like an image, before sending it - to the client. - ------------------------------------------------------------------------- -Version 1.20 (brockhaus): - - * Avatar image title is the author's name now instead of Avatar (V.) - ------------------------------------------------------------------------- -Version 1.19 (brockhaus): - - * Made the browser cache avatars resulting in a very good - performance boost! - ------------------------------------------------------------------------- -Version 1.18 (brockhaus): - - * Debugging loging disabled. - ------------------------------------------------------------------------- -Version 1.17 (brockhaus): - - * If cache is enabled, *everything* is cached now. Known writers - won't produce *any* external server call, if allready cached. - This is a very nice performance boost! Thanks to garvin for hinting - me. - * Anti hacking patches by garvinhickins - ------------------------------------------------------------------------- -Version 1.16 (garvinhicking): - - * Coding style - ------------------------------------------------------------------------- -Version 1.14 (brockhaus): - - * Fallback possibility for MyBlogLog implemented! :-) But it is - slow even with caching optimazation. MBL shouldn't be the first - option. - * Fifth method slot in configuration, as MBL now supports fallback, too. - ------------------------------------------------------------------------- -Version 1.13 (brockhaus): - - * Advice changed: It is not the statistic plugin producing not - working Pavatars/Favatars but the exit tracking plugin. - ------------------------------------------------------------------------- -Version 1.12 (brockhaus): - - * MyBlogLog avatars are cached now, too. - - * Pages redirecting to a default page, if the requested item was not - found, are supported now, too. Former the Avatar Plugin assumed, - that the default page is the P/Favatar. - - * Default configuration now ordered like this: Gravatar -> Pavatar - -> Favatar -> Default Avatar. - - * Added advice, that this plugin has to be executed before any link - changing plugin. - - * Reading configured plugin path. Former it was 'plugin' always. - - * Dropped gravatar border setting, as it is not working (anymore?) - ------------------------------------------------------------------------- -Version 1.11, testing version not released to CVS/Spartacus (brockhaus): - - * Fallback for Gravatar working! But this shows an default avatar - to Gravatar, not mattering the settings. So revoked this setting. - ------------------------------------------------------------------------- -Version 1.10 (brockhaus): - - * Pavatar / Avatar information where never loaded from cache - - * .. but after beeing loaded from cache it produced an endless - request loop for images loaded from the local blog (if comment - sidebar plugin was enabled) - - * Height setting for image was called "heigth".. :-/ - - * Gravarar caching didn't work reliable, if a default avatar was - given. - ------------------------------------------------------------------------- -Version 1.9 (brockhaus): - - * While searching for Pavatar, the Favatar was loaded as Pavatar, - if no Pavatar image but a favicon was found. (Thanks to El Burro) - ------------------------------------------------------------------------- -Version 1.8 (brockhaus): - - * Plugin was unable to load Favatars/Pavatars, if a redirection was - signaled at the url given by the commentor as homepage. Garvin's - blog is such a page.. - ------------------------------------------------------------------------- -Version 1.7 (brockhaus): - - * Added support for Pavatars (www.pavatar.com) - - * Added support for MyBlogLog Avatars (www.mybloglog.com) - - * The order for trying avatar methods and what kind of avatars are - supported is now configurable. - - * Standard avatar may be one of them (should be last) - - * Option for not giving the default avatar to gravatar even if one - is defined. (We want less dataprofiles..) - - * Fetch default avatar via mediadatabase in the configuration. - - * Image size is assured now in HTML code. - - * Below the comment only actual configured avatar methods are shown - as supported. - ------------------------------------------------------------------------- -Version 1.6 (garvinhickins): - ------------------------------------------------------------------------- -Version 1.5 (garvinhickins): - ------------------------------------------------------------------------- -Version 1.4 (garvinhickins): - ------------------------------------------------------------------------- -Version 1.3 (garvinhickins): - - * Fix errors on invalid domains diff --git a/plugins/serendipity_event_gravatar/ycon/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_gravatar/ycon/UTF-8/lang_pl.inc.php deleted file mode 100644 index e69de29b..00000000 diff --git a/plugins/serendipity_event_gravatar/ycon/ycon.image.php b/plugins/serendipity_event_gravatar/ycon/ycon.image.php index b20a117b..6033e271 100644 --- a/plugins/serendipity_event_gravatar/ycon/ycon.image.php +++ b/plugins/serendipity_event_gravatar/ycon/ycon.image.php @@ -2,13 +2,13 @@ require_once 'ycon.php'; function build_ycon($filename, $seed='',$size=''){ - $hash = md5($seed); - $image = ycon($hash, $size, 255, 255, 255); - imagetruecolortopalette($image, false, 64); -// header('Content-type: image/png'); - imagepng($image,$filename); - imagedestroy($image); - return true; + $hash = md5($seed); + $image = ycon($hash, $size, 255, 255, 255); + imagetruecolortopalette($image, false, 64); +// header('Content-type: image/png'); + imagepng($image,$filename); + imagedestroy($image); + return true; } ?> \ No newline at end of file diff --git a/plugins/serendipity_event_gravatar/ycon/ycon.php b/plugins/serendipity_event_gravatar/ycon/ycon.php index 5574765f..21c04da2 100644 --- a/plugins/serendipity_event_gravatar/ycon/ycon.php +++ b/plugins/serendipity_event_gravatar/ycon/ycon.php @@ -52,7 +52,7 @@ function ycon($hash, $size, $bg_red, $bg_green, $bg_blue) $red = hexdec(substr($hash, 0, 3)) % 12; // 0-192 for color $green = hexdec(substr($hash, 3, 3)) % 12; // (in increments of 16) $blue = hexdec(substr($hash, 6, 3)) % 12; - + $corners = hexdec(substr($hash, 9, 1)) % 16; // 14 gylphs $corners_i = hexdec(substr($hash, 10, 1)) % 2; // inverted? $corners_a = hexdec(substr($hash, 11, 1)) % 4; // 4 rotations @@ -93,7 +93,7 @@ function ycon($hash, $size, $bg_red, $bg_green, $bg_blue) $shape = (int)($center / 2); $inverted = (($center % 2) == 0); - + draw_glpyh($draw_icon, $square, $square, $square, $color, $background, $shape, 0, $inverted); imagecopyresampled($icon, $draw_icon, 0, 0, 0, 0, $size, $size, $draw_size, $draw_size); @@ -230,7 +230,7 @@ function draw_glpyh(&$image, $x, $y, $full, $fg_color, $bg_color, $shape, $rotat 0, $full, $full, 0); break; - + case 13: // squat diamond $points = array( $quarter, 0, @@ -238,7 +238,7 @@ function draw_glpyh(&$image, $x, $y, $full, $fg_color, $bg_color, $shape, $rotat $quarter, $full, 0, $half); break; - + case 14: // hourglass on its side (and kinda' squished...) $points = array( 0, $half, @@ -253,7 +253,7 @@ function draw_glpyh(&$image, $x, $y, $full, $fg_color, $bg_color, $shape, $rotat $half, $half, $half, $full); break; - + default: die('$shape must be in range [0..13] (' . $shape . ' is out of range)'); } @@ -282,4 +282,5 @@ function draw_glpyh(&$image, $x, $y, $full, $fg_color, $bg_color, $shape, $rotat // draw the bastard imagefilledpolygon($image, $points, count($points) / 2, $drawing_color); } -?> + +?> \ No newline at end of file diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_bg.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_bg.inc.php index e1d8d5ed..42219422 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_bg.inc.php @@ -1,23 +1,24 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg * EN-Revision: 2030 */ - @define('PLUGIN_EVENT_MAILER_NAME', 'Изпращане на статии по e-mail'); - @define('PLUGIN_EVENT_MAILER_DESC', 'Приставката позволява изпращането на нови статии по e-mail съобщения на указани получатели.'); - @define('PLUGIN_EVENT_MAILER_RECIPIENT', 'Получател'); - @define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', 'E-mail адрес, където искате да изпращате статиите (пример: пощенски списък).'); - @define('PLUGIN_EVENT_MAILER_LINK', 'Изпращане на връзки към статиите ?'); - @define('PLUGIN_EVENT_MAILER_LINKDESC', 'При избор \'Да\' ще бъдат включвани връзки към статиите преди тяхното съдържание.'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGS', 'Премахване на HTML?'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', 'При избор \'Да\' HTML таговете в статиите ще бъдат премахвани при изпращането им.'); - @define('PLUGIN_EVENT_MAILER_CONVERTP', 'Преобразуване на HTML параграфите в нови редове ?'); - @define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'При избор \'Да\' добавя нов ред след всеки HTML параграф. Това е много удобно в случай на премахване на HTML, защото запазва структурата на статиите и подобрява читаемостта им.'); - @define('PLUGIN_EVENT_MAILER_RECIPIENTS', 'Получател (повече от един адреса разделете с интервал)'); - @define('PLUGIN_EVENT_MAILER_NOTSENDDECISION', 'Статията не беше изпратена по e-mail, понеже вие отменихте това действие.'); - @define('PLUGIN_EVENT_MAILER_SENDING', 'Изпращане'); - @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Изпращане на тази статия по e-mail'); - @define('PLUGIN_EVENT_MAILER_SENDTOALL', 'Изпращане до всички автори'); +@define('PLUGIN_EVENT_MAILER_NAME', 'Изпращане на статии по e-mail'); +@define('PLUGIN_EVENT_MAILER_DESC', 'Приставката позволява изпращането на нови статии по e-mail съобщения на указани получатели.'); +@define('PLUGIN_EVENT_MAILER_RECIPIENT', 'Получател'); +@define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', 'E-mail адрес, където искате да изпращате статиите (пример: пощенски списък).'); +@define('PLUGIN_EVENT_MAILER_LINK', 'Изпращане на връзки към статиите ?'); +@define('PLUGIN_EVENT_MAILER_LINKDESC', 'При избор \'Да\' ще бъдат включвани връзки към статиите преди тяхното съдържание.'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGS', 'Премахване на HTML?'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', 'При избор \'Да\' HTML таговете в статиите ще бъдат премахвани при изпращането им.'); +@define('PLUGIN_EVENT_MAILER_CONVERTP', 'Преобразуване на HTML параграфите в нови редове ?'); +@define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'При избор \'Да\' добавя нов ред след всеки HTML параграф. Това е много удобно в случай на премахване на HTML, защото запазва структурата на статиите и подобрява читаемостта им.'); +@define('PLUGIN_EVENT_MAILER_RECIPIENTS', 'Получател (повече от един адреса разделете с интервал)'); +@define('PLUGIN_EVENT_MAILER_NOTSENDDECISION', 'Статията не беше изпратена по e-mail, понеже вие отменихте това действие.'); +@define('PLUGIN_EVENT_MAILER_SENDING', 'Изпращане'); +@define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Изпращане на тази статия по e-mail'); +@define('PLUGIN_EVENT_MAILER_SENDTOALL', 'Изпращане до всички автори'); + diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_cn.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_cn.inc.php index 0dfa9e70..f5377232 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_cn.inc.php @@ -13,4 +13,5 @@ @define('PLUGIN_EVENT_MAILER_RECIPIENTS', '电子邮件收件人 (不同收件人之间使用空格区分)'); @define('PLUGIN_EVENT_MAILER_NOTSENDDECISION', '你决定不将此文章通过电子邮件发送出去,因此该文章没有通过电子邮件发送出去。'); @define('PLUGIN_EVENT_MAILER_SENDING', '电子邮件发送中……'); -@define('PLUGIN_EVENT_MAILER_ISTOSENDIT', '使用电子邮件发送文章'); \ No newline at end of file +@define('PLUGIN_EVENT_MAILER_ISTOSENDIT', '使用电子邮件发送文章'); + diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_cs.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_cs.inc.php index 49554acd..957ffde6 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2008-01-20 01:31:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -22,4 +22,3 @@ @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Poslat tento příspěvek mailem'); @define('PLUGIN_EVENT_MAILER_SENDTOALL', 'Poslat všem autorům'); -?> diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_cz.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_cz.inc.php index d85742a4..957ffde6 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cz.inc.php 1381 2008-01-20 01:31:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -22,4 +22,3 @@ @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Poslat tento příspěvek mailem'); @define('PLUGIN_EVENT_MAILER_SENDTOALL', 'Poslat všem autorům'); -?> diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_de.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_de.inc.php index 2c102066..064810bb 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_de.inc.php @@ -1,20 +1,21 @@ -<?php # $Id$ +<?php - @define('PLUGIN_EVENT_MAILER_NAME', 'Artikel mailen'); - @define('PLUGIN_EVENT_MAILER_DESC', 'Verschickt jeden neuen Artikel im Blog via E-Mail'); - @define('PLUGIN_EVENT_MAILER_RECIPIENT', 'Mail-Empfänger'); - @define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', 'Die E-Mail Adresse an die die Artikel verschickt werden sollen (empfohlen: Eine Mailing-Liste)'); - @define('PLUGIN_EVENT_MAILER_LINK', 'URL des Artikels mailen?'); - @define('PLUGIN_EVENT_MAILER_LINKDESC', 'Verschickt die URL des Artikels.'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGS', 'HTML entfernen?'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', 'Entfernt HTML-Anweisungen aus der Mail.'); - @define('PLUGIN_EVENT_MAILER_CONVERTP', 'HTML-Paragraphen in Leerzeilen wandeln?'); - @define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'Fügt einen Zeilenumbruch nach jedem HTML-Paragraphen ein. Besonders hilfreich im Zusammenhang mit der Option "HTML Entfernen", damit der Eintrag später selbst dann Umbrüche enthält, wenn sie nicht manuell eingegeben wurden.'); - @define('PLUGIN_EVENT_MAILER_RECIPIENTS', 'Mail-Empfänger (mehrere Empfänger mit Leerzeichen trennen)'); - @define('PLUGIN_EVENT_MAILER_NOTSENDDECISION', 'Dieser Eintrage wurde nicht per E-Mail versendet, da diese Option deaktiviert wurde.'); - @define('PLUGIN_EVENT_MAILER_SENDING', 'Versende'); - @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Diesen Eintrag per E-Mail versenden'); - @define('PLUGIN_EVENT_MAILER_SENDTOALL', 'An alle Redakteure schicken'); +@define('PLUGIN_EVENT_MAILER_NAME', 'Artikel mailen'); +@define('PLUGIN_EVENT_MAILER_DESC', 'Verschickt jeden neuen Artikel im Blog via E-Mail'); +@define('PLUGIN_EVENT_MAILER_RECIPIENT', 'Mail-Empfänger'); +@define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', 'Die E-Mail Adresse an die die Artikel verschickt werden sollen (empfohlen: Eine Mailing-Liste)'); +@define('PLUGIN_EVENT_MAILER_LINK', 'URL des Artikels mailen?'); +@define('PLUGIN_EVENT_MAILER_LINKDESC', 'Verschickt die URL des Artikels.'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGS', 'HTML entfernen?'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', 'Entfernt HTML-Anweisungen aus der Mail.'); +@define('PLUGIN_EVENT_MAILER_CONVERTP', 'HTML-Paragraphen in Leerzeilen wandeln?'); +@define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'Fügt einen Zeilenumbruch nach jedem HTML-Paragraphen ein. Besonders hilfreich im Zusammenhang mit der Option "HTML Entfernen", damit der Eintrag später selbst dann Umbrüche enthält, wenn sie nicht manuell eingegeben wurden.'); +@define('PLUGIN_EVENT_MAILER_RECIPIENTS', 'Mail-Empfänger (mehrere Empfänger mit Leerzeichen trennen)'); +@define('PLUGIN_EVENT_MAILER_NOTSENDDECISION', 'Dieser Eintrage wurde nicht per E-Mail versendet, da diese Option deaktiviert wurde.'); +@define('PLUGIN_EVENT_MAILER_SENDING', 'Versende'); +@define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Diesen Eintrag per E-Mail versenden'); +@define('PLUGIN_EVENT_MAILER_SENDTOALL', 'An alle Redakteure schicken'); @define('PLUGIN_EVENT_MAILER_STRIPTAGS', 'Bilder und Hyperlinks beibehalten, wenn HTML entfernt wird?'); @define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', 'Gilt nur, wenn HTML entfernt wird. Falls aktiviert, werden Bilder und Hyperlinks in der Mail enthalten bleiben (in eckigen Klammern). Falls deaktiviert, werden alle Bilder und Hyperlinks auch entfernt.'); + diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_es.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_es.inc.php index 53fec8ba..e6d24dde 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_es.inc.php @@ -1,6 +1,6 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -16,4 +16,3 @@ @define('PLUGIN_EVENT_MAILER_CONVERTP', '¿Convertir párrafo HTML en saltos de linea?'); @define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'Añade saltos de linea luego de cada párrafo HTML. Esta opción es muy útil si también activas la eliminación HTML, así tus párrafos se mantendrán.'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_fr.inc.php index 99f83618..bdecb148 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -28,5 +28,3 @@ @define('PLUGIN_EVENT_MAILER_SENDING', 'Envoi...'); @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Envoyer ce billet par email'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_ja.inc.php index e36f7d0e..b2d10588 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 817 */ @@ -21,5 +21,3 @@ @define('PLUGIN_EVENT_MAILER_SENDING', 'Sending'); @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', '電子メールにてこのエントリを送信する'); -/* vim: set sts=4 ts=4 expandtab : */ -?> diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_ko.inc.php index 3d5e4317..6f6ea02b 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_ko.inc.php @@ -1,16 +1,15 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_MAILER_NAME', '글을 전자우편으로 발송'); - @define('PLUGIN_EVENT_MAILER_DESC', '새로 작성한 글을 전자우편을 통해 특정 주소로 발송함'); - @define('PLUGIN_EVENT_MAILER_RECIPIENT', '전자우편 수신자'); - @define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', '작성한 글을 발송할 전자우편 주소 (메일링 리스트 권장)'); - @define('PLUGIN_EVENT_MAILER_LINK', '글에 대한 링크 발송'); - @define('PLUGIN_EVENT_MAILER_LINKDESC', '전자우편에 원본 글로 갈 수 있는 링크를 포함시킴'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGS', 'HTML 제거'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', '전자우편에서 HTML 태그를 제거함'); - @define('PLUGIN_EVENT_MAILER_CONVERTP', 'HTML 문단을 새 줄로 변환'); - @define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'HTML 문단이 끝나는 부분에 새 줄을 추가합니다. HTML 제거 기능을 사용할 때 문단 구조를 유지하는데 유용하게 쓸 수 있습니다.'); +@define('PLUGIN_EVENT_MAILER_NAME', '글을 전자우편으로 발송'); +@define('PLUGIN_EVENT_MAILER_DESC', '새로 작성한 글을 전자우편을 통해 특정 주소로 발송함'); +@define('PLUGIN_EVENT_MAILER_RECIPIENT', '전자우편 수신자'); +@define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', '작성한 글을 발송할 전자우편 주소 (메일링 리스트 권장)'); +@define('PLUGIN_EVENT_MAILER_LINK', '글에 대한 링크 발송'); +@define('PLUGIN_EVENT_MAILER_LINKDESC', '전자우편에 원본 글로 갈 수 있는 링크를 포함시킴'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGS', 'HTML 제거'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', '전자우편에서 HTML 태그를 제거함'); +@define('PLUGIN_EVENT_MAILER_CONVERTP', 'HTML 문단을 새 줄로 변환'); +@define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'HTML 문단이 끝나는 부분에 새 줄을 추가합니다. HTML 제거 기능을 사용할 때 문단 구조를 유지하는데 유용하게 쓸 수 있습니다.'); -?> diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_pl.inc.php index 1d421d15..816afbef 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -21,5 +21,3 @@ @define('PLUGIN_EVENT_MAILER_SENDING', 'Wysyłanie.'); @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Wyślij ten wpis e-mailem'); - -?> diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_pt_PT.inc.php index 3185043b..54efdc48 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id:$ +<?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details # Translation (c) by Rodrigo Lazo <rlazo.paz@gmail.com> @@ -15,4 +15,3 @@ @define('PLUGIN_EVENT_MAILER_CONVERTP', 'Converter parágrafos de HTML em mudanças de linha?'); @define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'Junta mudanças de linha a seguir a cada parágrafo. Esta opção é muito útil se também escolher a eliminação de etiquetas HTML, pois assim manter-se-ão os parágrafos.'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_sk.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_sk.inc.php index 8c4ab2f1..16b86aaa 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_sk.inc.php @@ -21,4 +21,3 @@ @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Poslať tento príspevok e-mailom'); @define('PLUGIN_EVENT_MAILER_SENDTOALL', 'Poslať všetkým autorom'); -?> diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_tn.inc.php index 01c72de6..387876f4 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,14 +12,14 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_MAILER_NAME', '寄送文章'); - @define('PLUGIN_EVENT_MAILER_DESC', '可讓您寄送新發佈的文章到電子郵件信箱'); - @define('PLUGIN_EVENT_MAILER_RECIPIENT', '收件人'); - @define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', '收件人的電子信箱 (建議:電子報)'); - @define('PLUGIN_EVENT_MAILER_LINK', '包括文章連結?'); - @define('PLUGIN_EVENT_MAILER_LINKDESC', '郵件內包括文章的連結位址。'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGS', '移除 HTML?'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', '移除郵件內的 HTML。'); - @define('PLUGIN_EVENT_MAILER_CONVERTP', '轉換 HTML 段落成新行?'); - @define('PLUGIN_EVENT_MAILER_CONVERTPDESC', '加入新行於每個 HTML 的段落。如果您開啟 移除 HTML? 的功能,這會檢查每個未自己段行的段落,然後自動幫您段行。'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_MAILER_NAME', '寄送文章'); +@define('PLUGIN_EVENT_MAILER_DESC', '可讓您寄送新發佈的文章到電子郵件信箱'); +@define('PLUGIN_EVENT_MAILER_RECIPIENT', '收件人'); +@define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', '收件人的電子信箱 (建議:電子報)'); +@define('PLUGIN_EVENT_MAILER_LINK', '包括文章連結?'); +@define('PLUGIN_EVENT_MAILER_LINKDESC', '郵件內包括文章的連結位址。'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGS', '移除 HTML?'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', '移除郵件內的 HTML。'); +@define('PLUGIN_EVENT_MAILER_CONVERTP', '轉換 HTML 段落成新行?'); +@define('PLUGIN_EVENT_MAILER_CONVERTPDESC', '加入新行於每個 HTML 的段落。如果您開啟 移除 HTML? 的功能,這會檢查每個未自己段行的段落,然後自動幫您段行。'); + diff --git a/plugins/serendipity_event_mailer/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_mailer/UTF-8/lang_zh.inc.php index 0dfa9e70..f5377232 100644 --- a/plugins/serendipity_event_mailer/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_mailer/UTF-8/lang_zh.inc.php @@ -13,4 +13,5 @@ @define('PLUGIN_EVENT_MAILER_RECIPIENTS', '电子邮件收件人 (不同收件人之间使用空格区分)'); @define('PLUGIN_EVENT_MAILER_NOTSENDDECISION', '你决定不将此文章通过电子邮件发送出去,因此该文章没有通过电子邮件发送出去。'); @define('PLUGIN_EVENT_MAILER_SENDING', '电子邮件发送中……'); -@define('PLUGIN_EVENT_MAILER_ISTOSENDIT', '使用电子邮件发送文章'); \ No newline at end of file +@define('PLUGIN_EVENT_MAILER_ISTOSENDIT', '使用电子邮件发送文章'); + diff --git a/plugins/serendipity_event_mailer/lang_bg.inc.php b/plugins/serendipity_event_mailer/lang_bg.inc.php index a1ec98b6..5fab92fc 100644 --- a/plugins/serendipity_event_mailer/lang_bg.inc.php +++ b/plugins/serendipity_event_mailer/lang_bg.inc.php @@ -1,23 +1,24 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg * EN-Revision: 2030 */ - @define('PLUGIN_EVENT_MAILER_NAME', '��������� �� ������ �� e-mail'); - @define('PLUGIN_EVENT_MAILER_DESC', '����������� ��������� ����������� �� ���� ������ �� e-mail ��������� �� ������� ����������.'); - @define('PLUGIN_EVENT_MAILER_RECIPIENT', '���������'); - @define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', 'E-mail �����, ������ ������ �� ��������� �������� (������: �������� ������).'); - @define('PLUGIN_EVENT_MAILER_LINK', '��������� �� ������ ��� �������� ?'); - @define('PLUGIN_EVENT_MAILER_LINKDESC', '��� ����� \'��\' �� ����� ��������� ������ ��� �������� ����� ������� ����������.'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGS', '���������� �� HTML?'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', '��� ����� \'��\' HTML �������� � �������� �� ����� ���������� ��� ����������� ��.'); - @define('PLUGIN_EVENT_MAILER_CONVERTP', '������������� �� HTML ����������� � ���� ������ ?'); - @define('PLUGIN_EVENT_MAILER_CONVERTPDESC', '��� ����� \'��\' ������ ��� ��� ���� ����� HTML ��������. ���� � ����� ������ � ������ �� ���������� �� HTML, ������ ������� ����������� �� �������� � ��������� ����������� ��.'); - @define('PLUGIN_EVENT_MAILER_RECIPIENTS', '��������� (������ �� ���� ������ ��������� � ��������)'); - @define('PLUGIN_EVENT_MAILER_NOTSENDDECISION', '�������� �� ���� ��������� �� e-mail, ������ ��� ��������� ���� ��������.'); - @define('PLUGIN_EVENT_MAILER_SENDING', '���������'); - @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', '��������� �� ���� ������ �� e-mail'); - @define('PLUGIN_EVENT_MAILER_SENDTOALL', '��������� �� ������ ������'); +@define('PLUGIN_EVENT_MAILER_NAME', '��������� �� ������ �� e-mail'); +@define('PLUGIN_EVENT_MAILER_DESC', '����������� ��������� ����������� �� ���� ������ �� e-mail ��������� �� ������� ����������.'); +@define('PLUGIN_EVENT_MAILER_RECIPIENT', '���������'); +@define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', 'E-mail �����, ������ ������ �� ��������� �������� (������: �������� ������).'); +@define('PLUGIN_EVENT_MAILER_LINK', '��������� �� ������ ��� �������� ?'); +@define('PLUGIN_EVENT_MAILER_LINKDESC', '��� ����� \'��\' �� ����� ��������� ������ ��� �������� ����� ������� ����������.'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGS', '���������� �� HTML?'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', '��� ����� \'��\' HTML �������� � �������� �� ����� ���������� ��� ����������� ��.'); +@define('PLUGIN_EVENT_MAILER_CONVERTP', '������������� �� HTML ����������� � ���� ������ ?'); +@define('PLUGIN_EVENT_MAILER_CONVERTPDESC', '��� ����� \'��\' ������ ��� ��� ���� ����� HTML ��������. ���� � ����� ������ � ������ �� ���������� �� HTML, ������ ������� ����������� �� �������� � ��������� ����������� ��.'); +@define('PLUGIN_EVENT_MAILER_RECIPIENTS', '��������� (������ �� ���� ������ ��������� � ��������)'); +@define('PLUGIN_EVENT_MAILER_NOTSENDDECISION', '�������� �� ���� ��������� �� e-mail, ������ ��� ��������� ���� ��������.'); +@define('PLUGIN_EVENT_MAILER_SENDING', '���������'); +@define('PLUGIN_EVENT_MAILER_ISTOSENDIT', '��������� �� ���� ������ �� e-mail'); +@define('PLUGIN_EVENT_MAILER_SENDTOALL', '��������� �� ������ ������'); + diff --git a/plugins/serendipity_event_mailer/lang_cn.inc.php b/plugins/serendipity_event_mailer/lang_cn.inc.php index 0dfa9e70..f5377232 100644 --- a/plugins/serendipity_event_mailer/lang_cn.inc.php +++ b/plugins/serendipity_event_mailer/lang_cn.inc.php @@ -13,4 +13,5 @@ @define('PLUGIN_EVENT_MAILER_RECIPIENTS', '电子邮件收件人 (不同收件人之间使用空格区分)'); @define('PLUGIN_EVENT_MAILER_NOTSENDDECISION', '你决定不将此文章通过电子邮件发送出去,因此该文章没有通过电子邮件发送出去。'); @define('PLUGIN_EVENT_MAILER_SENDING', '电子邮件发送中……'); -@define('PLUGIN_EVENT_MAILER_ISTOSENDIT', '使用电子邮件发送文章'); \ No newline at end of file +@define('PLUGIN_EVENT_MAILER_ISTOSENDIT', '使用电子邮件发送文章'); + diff --git a/plugins/serendipity_event_mailer/lang_cs.inc.php b/plugins/serendipity_event_mailer/lang_cs.inc.php index 568b5132..c113af60 100644 --- a/plugins/serendipity_event_mailer/lang_cs.inc.php +++ b/plugins/serendipity_event_mailer/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2008-01-20 01:31:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -22,4 +22,3 @@ @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Poslat tento p��sp�vek mailem'); @define('PLUGIN_EVENT_MAILER_SENDTOALL', 'Poslat v�em autor�m'); -?> diff --git a/plugins/serendipity_event_mailer/lang_cz.inc.php b/plugins/serendipity_event_mailer/lang_cz.inc.php index cee4ef4a..34aaec6b 100644 --- a/plugins/serendipity_event_mailer/lang_cz.inc.php +++ b/plugins/serendipity_event_mailer/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cz.inc.php 1381 2008-01-20 01:31:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -22,4 +22,3 @@ @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Poslat tento p��sp�vek mailem'); @define('PLUGIN_EVENT_MAILER_SENDTOALL', 'Poslat v�em autor�m'); -?> diff --git a/plugins/serendipity_event_mailer/lang_de.inc.php b/plugins/serendipity_event_mailer/lang_de.inc.php index 66f93350..75bd5a24 100644 --- a/plugins/serendipity_event_mailer/lang_de.inc.php +++ b/plugins/serendipity_event_mailer/lang_de.inc.php @@ -1,20 +1,21 @@ -<?php # $Id$ +<?php - @define('PLUGIN_EVENT_MAILER_NAME', 'Artikel mailen'); - @define('PLUGIN_EVENT_MAILER_DESC', 'Verschickt jeden neuen Artikel im Blog via E-Mail'); - @define('PLUGIN_EVENT_MAILER_RECIPIENT', 'Mail-Empf�nger'); - @define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', 'Die E-Mail Adresse an die die Artikel verschickt werden sollen (empfohlen: Eine Mailing-Liste)'); - @define('PLUGIN_EVENT_MAILER_LINK', 'URL des Artikels mailen?'); - @define('PLUGIN_EVENT_MAILER_LINKDESC', 'Verschickt die URL des Artikels.'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGS', 'HTML entfernen?'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', 'Entfernt HTML-Anweisungen aus der Mail.'); - @define('PLUGIN_EVENT_MAILER_CONVERTP', 'HTML-Paragraphen in Leerzeilen wandeln?'); - @define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'F�gt einen Zeilenumbruch nach jedem HTML-Paragraphen ein. Besonders hilfreich im Zusammenhang mit der Option "HTML Entfernen", damit der Eintrag sp�ter selbst dann Umbr�che enth�lt, wenn sie nicht manuell eingegeben wurden.'); - @define('PLUGIN_EVENT_MAILER_RECIPIENTS', 'Mail-Empf�nger (mehrere Empf�nger mit Leerzeichen trennen)'); - @define('PLUGIN_EVENT_MAILER_NOTSENDDECISION', 'Dieser Eintrage wurde nicht per E-Mail versendet, da diese Option deaktiviert wurde.'); - @define('PLUGIN_EVENT_MAILER_SENDING', 'Versende'); - @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Diesen Eintrag per E-Mail versenden'); - @define('PLUGIN_EVENT_MAILER_SENDTOALL', 'An alle Redakteure schicken'); +@define('PLUGIN_EVENT_MAILER_NAME', 'Artikel mailen'); +@define('PLUGIN_EVENT_MAILER_DESC', 'Verschickt jeden neuen Artikel im Blog via E-Mail'); +@define('PLUGIN_EVENT_MAILER_RECIPIENT', 'Mail-Empf�nger'); +@define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', 'Die E-Mail Adresse an die die Artikel verschickt werden sollen (empfohlen: Eine Mailing-Liste)'); +@define('PLUGIN_EVENT_MAILER_LINK', 'URL des Artikels mailen?'); +@define('PLUGIN_EVENT_MAILER_LINKDESC', 'Verschickt die URL des Artikels.'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGS', 'HTML entfernen?'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', 'Entfernt HTML-Anweisungen aus der Mail.'); +@define('PLUGIN_EVENT_MAILER_CONVERTP', 'HTML-Paragraphen in Leerzeilen wandeln?'); +@define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'F�gt einen Zeilenumbruch nach jedem HTML-Paragraphen ein. Besonders hilfreich im Zusammenhang mit der Option "HTML Entfernen", damit der Eintrag sp�ter selbst dann Umbr�che enth�lt, wenn sie nicht manuell eingegeben wurden.'); +@define('PLUGIN_EVENT_MAILER_RECIPIENTS', 'Mail-Empf�nger (mehrere Empf�nger mit Leerzeichen trennen)'); +@define('PLUGIN_EVENT_MAILER_NOTSENDDECISION', 'Dieser Eintrage wurde nicht per E-Mail versendet, da diese Option deaktiviert wurde.'); +@define('PLUGIN_EVENT_MAILER_SENDING', 'Versende'); +@define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Diesen Eintrag per E-Mail versenden'); +@define('PLUGIN_EVENT_MAILER_SENDTOALL', 'An alle Redakteure schicken'); @define('PLUGIN_EVENT_MAILER_STRIPTAGS', 'Bilder und Hyperlinks beibehalten, wenn HTML entfernt wird?'); @define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', 'Gilt nur, wenn HTML entfernt wird. Falls aktiviert, werden Bilder und Hyperlinks in der Mail enthalten bleiben (in eckigen Klammern). Falls deaktiviert, werden alle Bilder und Hyperlinks auch entfernt.'); + diff --git a/plugins/serendipity_event_mailer/lang_en.inc.php b/plugins/serendipity_event_mailer/lang_en.inc.php index 6c609ccc..f7a46c9e 100644 --- a/plugins/serendipity_event_mailer/lang_en.inc.php +++ b/plugins/serendipity_event_mailer/lang_en.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Translator Name <yourmail@example.com> * EN-Revision: Revision of lang_en.inc.php */ @@ -23,3 +23,4 @@ @define('PLUGIN_EVENT_MAILER_SENDTOALL', 'Send to all authors'); @define('PLUGIN_EVENT_MAILER_STRIPTAGS', 'Keep images and hyperlinks when removing html?'); @define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', 'Only applies when removing HTML-tags from the mail. If enabled, images and hyperlinks will be put inside the text, when disabled those placeholders will also be removed.'); + diff --git a/plugins/serendipity_event_mailer/lang_es.inc.php b/plugins/serendipity_event_mailer/lang_es.inc.php index 53624b1f..3b7581ad 100644 --- a/plugins/serendipity_event_mailer/lang_es.inc.php +++ b/plugins/serendipity_event_mailer/lang_es.inc.php @@ -1,6 +1,6 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -19,4 +19,4 @@ @define('PLUGIN_EVENT_MAILER_NOTSENDDECISION', 'Esta entrada no fue enviada via E-Mail porque decidiste no hacerlo.'); @define('PLUGIN_EVENT_MAILER_SENDING', 'Enviando'); @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Enviar esta entrada via E-Mail'); -?> \ No newline at end of file + diff --git a/plugins/serendipity_event_mailer/lang_fr.inc.php b/plugins/serendipity_event_mailer/lang_fr.inc.php index b49b5921..863f70ab 100644 --- a/plugins/serendipity_event_mailer/lang_fr.inc.php +++ b/plugins/serendipity_event_mailer/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -28,5 +28,3 @@ @define('PLUGIN_EVENT_MAILER_SENDING', 'Envoi...'); @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Envoyer ce billet par email'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_mailer/lang_ja.inc.php b/plugins/serendipity_event_mailer/lang_ja.inc.php index e36f7d0e..b2d10588 100644 --- a/plugins/serendipity_event_mailer/lang_ja.inc.php +++ b/plugins/serendipity_event_mailer/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 817 */ @@ -21,5 +21,3 @@ @define('PLUGIN_EVENT_MAILER_SENDING', 'Sending'); @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', '電子メールにてこのエントリを送信する'); -/* vim: set sts=4 ts=4 expandtab : */ -?> diff --git a/plugins/serendipity_event_mailer/lang_ko.inc.php b/plugins/serendipity_event_mailer/lang_ko.inc.php index 3d5e4317..6f6ea02b 100644 --- a/plugins/serendipity_event_mailer/lang_ko.inc.php +++ b/plugins/serendipity_event_mailer/lang_ko.inc.php @@ -1,16 +1,15 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_MAILER_NAME', '글을 전자우편으로 발송'); - @define('PLUGIN_EVENT_MAILER_DESC', '새로 작성한 글을 전자우편을 통해 특정 주소로 발송함'); - @define('PLUGIN_EVENT_MAILER_RECIPIENT', '전자우편 수신자'); - @define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', '작성한 글을 발송할 전자우편 주소 (메일링 리스트 권장)'); - @define('PLUGIN_EVENT_MAILER_LINK', '글에 대한 링크 발송'); - @define('PLUGIN_EVENT_MAILER_LINKDESC', '전자우편에 원본 글로 갈 수 있는 링크를 포함시킴'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGS', 'HTML 제거'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', '전자우편에서 HTML 태그를 제거함'); - @define('PLUGIN_EVENT_MAILER_CONVERTP', 'HTML 문단을 새 줄로 변환'); - @define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'HTML 문단이 끝나는 부분에 새 줄을 추가합니다. HTML 제거 기능을 사용할 때 문단 구조를 유지하는데 유용하게 쓸 수 있습니다.'); +@define('PLUGIN_EVENT_MAILER_NAME', '글을 전자우편으로 발송'); +@define('PLUGIN_EVENT_MAILER_DESC', '새로 작성한 글을 전자우편을 통해 특정 주소로 발송함'); +@define('PLUGIN_EVENT_MAILER_RECIPIENT', '전자우편 수신자'); +@define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', '작성한 글을 발송할 전자우편 주소 (메일링 리스트 권장)'); +@define('PLUGIN_EVENT_MAILER_LINK', '글에 대한 링크 발송'); +@define('PLUGIN_EVENT_MAILER_LINKDESC', '전자우편에 원본 글로 갈 수 있는 링크를 포함시킴'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGS', 'HTML 제거'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', '전자우편에서 HTML 태그를 제거함'); +@define('PLUGIN_EVENT_MAILER_CONVERTP', 'HTML 문단을 새 줄로 변환'); +@define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'HTML 문단이 끝나는 부분에 새 줄을 추가합니다. HTML 제거 기능을 사용할 때 문단 구조를 유지하는데 유용하게 쓸 수 있습니다.'); -?> diff --git a/plugins/serendipity_event_mailer/lang_pl.inc.php b/plugins/serendipity_event_mailer/lang_pl.inc.php index 0e66a81d..99a0226a 100644 --- a/plugins/serendipity_event_mailer/lang_pl.inc.php +++ b/plugins/serendipity_event_mailer/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -21,5 +21,3 @@ @define('PLUGIN_EVENT_MAILER_SENDING', 'Wysy�anie.'); @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Wy�lij ten wpis e-mailem'); - -?> diff --git a/plugins/serendipity_event_mailer/lang_pt_PT.inc.php b/plugins/serendipity_event_mailer/lang_pt_PT.inc.php index 09c71392..4f570809 100644 --- a/plugins/serendipity_event_mailer/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_mailer/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id:$ +<?php # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details # Translation (c) by Rodrigo Lazo <rlazo.paz@gmail.com> @@ -15,4 +15,3 @@ @define('PLUGIN_EVENT_MAILER_CONVERTP', 'Converter par�grafos de HTML em mudan�as de linha?'); @define('PLUGIN_EVENT_MAILER_CONVERTPDESC', 'Junta mudan�as de linha a seguir a cada par�grafo. Esta op��o � muito �til se tamb�m escolher a elimina��o de etiquetas HTML, pois assim manter-se-�o os par�grafos.'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_mailer/lang_sk.inc.php b/plugins/serendipity_event_mailer/lang_sk.inc.php index 3aaa465b..57a889fd 100644 --- a/plugins/serendipity_event_mailer/lang_sk.inc.php +++ b/plugins/serendipity_event_mailer/lang_sk.inc.php @@ -21,4 +21,3 @@ @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Posla� tento pr�spevok e-mailom'); @define('PLUGIN_EVENT_MAILER_SENDTOALL', 'Posla� v�etk�m autorom'); -?> diff --git a/plugins/serendipity_event_mailer/lang_tn.inc.php b/plugins/serendipity_event_mailer/lang_tn.inc.php index 01c72de6..387876f4 100644 --- a/plugins/serendipity_event_mailer/lang_tn.inc.php +++ b/plugins/serendipity_event_mailer/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,14 +12,14 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_MAILER_NAME', '寄送文章'); - @define('PLUGIN_EVENT_MAILER_DESC', '可讓您寄送新發佈的文章到電子郵件信箱'); - @define('PLUGIN_EVENT_MAILER_RECIPIENT', '收件人'); - @define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', '收件人的電子信箱 (建議:電子報)'); - @define('PLUGIN_EVENT_MAILER_LINK', '包括文章連結?'); - @define('PLUGIN_EVENT_MAILER_LINKDESC', '郵件內包括文章的連結位址。'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGS', '移除 HTML?'); - @define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', '移除郵件內的 HTML。'); - @define('PLUGIN_EVENT_MAILER_CONVERTP', '轉換 HTML 段落成新行?'); - @define('PLUGIN_EVENT_MAILER_CONVERTPDESC', '加入新行於每個 HTML 的段落。如果您開啟 移除 HTML? 的功能,這會檢查每個未自己段行的段落,然後自動幫您段行。'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_MAILER_NAME', '寄送文章'); +@define('PLUGIN_EVENT_MAILER_DESC', '可讓您寄送新發佈的文章到電子郵件信箱'); +@define('PLUGIN_EVENT_MAILER_RECIPIENT', '收件人'); +@define('PLUGIN_EVENT_MAILER_RECIPIENTDESC', '收件人的電子信箱 (建議:電子報)'); +@define('PLUGIN_EVENT_MAILER_LINK', '包括文章連結?'); +@define('PLUGIN_EVENT_MAILER_LINKDESC', '郵件內包括文章的連結位址。'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGS', '移除 HTML?'); +@define('PLUGIN_EVENT_MAILER_STRIPTAGSDESC', '移除郵件內的 HTML。'); +@define('PLUGIN_EVENT_MAILER_CONVERTP', '轉換 HTML 段落成新行?'); +@define('PLUGIN_EVENT_MAILER_CONVERTPDESC', '加入新行於每個 HTML 的段落。如果您開啟 移除 HTML? 的功能,這會檢查每個未自己段行的段落,然後自動幫您段行。'); + diff --git a/plugins/serendipity_event_mailer/lang_zh.inc.php b/plugins/serendipity_event_mailer/lang_zh.inc.php index 0dfa9e70..f5377232 100644 --- a/plugins/serendipity_event_mailer/lang_zh.inc.php +++ b/plugins/serendipity_event_mailer/lang_zh.inc.php @@ -13,4 +13,5 @@ @define('PLUGIN_EVENT_MAILER_RECIPIENTS', '电子邮件收件人 (不同收件人之间使用空格区分)'); @define('PLUGIN_EVENT_MAILER_NOTSENDDECISION', '你决定不将此文章通过电子邮件发送出去,因此该文章没有通过电子邮件发送出去。'); @define('PLUGIN_EVENT_MAILER_SENDING', '电子邮件发送中……'); -@define('PLUGIN_EVENT_MAILER_ISTOSENDIT', '使用电子邮件发送文章'); \ No newline at end of file +@define('PLUGIN_EVENT_MAILER_ISTOSENDIT', '使用电子邮件发送文章'); + diff --git a/plugins/serendipity_event_mailer/serendipity_event_mailer.php b/plugins/serendipity_event_mailer/serendipity_event_mailer.php index ee021bed..61cff4f8 100644 --- a/plugins/serendipity_event_mailer/serendipity_event_mailer.php +++ b/plugins/serendipity_event_mailer/serendipity_event_mailer.php @@ -1,4 +1,8 @@ -<?php # $Id$ +<?php + +if (IN_serendipity !== true) { + die ("Don't hack!"); +} @serendipity_plugin_api::load_language(dirname(__FILE__)); @@ -15,9 +19,9 @@ class serendipity_event_mailer extends serendipity_event $propbag->add('description', PLUGIN_EVENT_MAILER_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Sebastian Nohn, Kristian Koehntopp, Garvin Hicking'); - $propbag->add('version', '1.53'); + $propbag->add('version', '1.54'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -66,6 +70,7 @@ class serendipity_event_mailer extends serendipity_event } switch($name) { + case 'what': $propbag->add('type', 'select'); $propbag->add('name', CONTENT); @@ -124,30 +129,33 @@ class serendipity_event_mailer extends serendipity_event break; default: - break; + return false; } - return true; } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { + switch($event) { + case 'backend_display': if (isset($serendipity['POST']['properties']['mailto'])) { $mailto = $serendipity['POST']['properties']['mailto']; } else { $mailto = $this->get_config('mailto'); } - + if (isset($serendipity['POST']['properties']['sendentry_all'])) { $sendtoall = $serendipity['POST']['properties']['sendentry_all']; } else { @@ -247,12 +255,12 @@ class serendipity_event_mailer extends serendipity_event } } - if (serendipity_db_bool($this->get_config('convertp', false)) == true) { + if (serendipity_db_bool($this->get_config('convertp', 'false'))) { $mail['body'] = str_replace('</p>', "</p>\n", $mail['body']); } - if (serendipity_db_bool($this->get_config('striptags', false)) == true) { - if (serendipity_db_bool($this->get_config('keepstriptags', true))) { + if (serendipity_db_bool($this->get_config('striptags', 'false'))) { + if (serendipity_db_bool($this->get_config('keepstriptags', 'true'))) { $mail['body'] = preg_replace('�<a[^>]+href=["\']([^"\']*)["\'][^>]*>([^<]*)</a>�i', "$2 [$1]", $mail['body']); $mail['body'] = preg_replace('�<img[^>]+src=["\']([^"\']*)["\'][^>]*>�i', "[" . IMAGE . ": $1]", $mail['body']); } else { @@ -262,7 +270,7 @@ class serendipity_event_mailer extends serendipity_event $mail['body'] = strip_tags($mail['body']); } - if (serendipity_db_bool($this->get_config('includelink', false)) == true) { + if (serendipity_db_bool($this->get_config('includelink', 'false'))) { $mail['body'] = serendipity_archiveURL($eventData['id'], $eventData['title'], 'baseURL', true, array('timestamp' => $eventData['timestamp'])) . "\n\n" . $mail['body']; } @@ -273,17 +281,18 @@ class serendipity_event_mailer extends serendipity_event } } } - return true; break; default: return false; - break; } + return true; } else { return false; } } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_event_nl2br/UTF-8/lang_bg.inc.php b/plugins/serendipity_event_nl2br/UTF-8/lang_bg.inc.php index 82acb89e..c150d769 100644 --- a/plugins/serendipity_event_nl2br/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_event_nl2br/UTF-8/lang_bg.inc.php @@ -1,12 +1,12 @@ -<?php # +<?php /** * @version * @author Ivan Cenov jwalker@hotmail.bg */ -@define('PLUGIN_EVENT_NL2BR_NAME', 'Форматиране на текст: NL2BR'); -@define('PLUGIN_EVENT_NL2BR_DESC', 'Заменя новите редове в текста с HTML BR тагове'); +@define('PLUGIN_EVENT_NL2BR_NAME', 'Форматиране на текст: NL2BR'); +@define('PLUGIN_EVENT_NL2BR_DESC', 'Заменя новите редове в текста с HTML BR тагове'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS', 'Списък на HTML-тагове, в които няма да се използва това форматиране'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS_DESC', 'Препоръка: "code,pre,geshi,textarea". Използвайте "," за да укажете повече от един таг. Забележка: Въведените тагове се изчисляват като регулярни изрази.'); diff --git a/plugins/serendipity_event_nl2br/UTF-8/lang_cn.inc.php b/plugins/serendipity_event_nl2br/UTF-8/lang_cn.inc.php index 0476241e..bafc6989 100644 --- a/plugins/serendipity_event_nl2br/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_event_nl2br/UTF-8/lang_cn.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_nl2br/UTF-8/lang_cs.inc.php b/plugins/serendipity_event_nl2br/UTF-8/lang_cs.inc.php index c0c75259..5501e70a 100644 --- a/plugins/serendipity_event_nl2br/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_event_nl2br/UTF-8/lang_cs.inc.php @@ -17,8 +17,8 @@ @define('PLUGIN_EVENT_NL2BR_DESC', 'Mění znaky konce řádku na tagy <br />'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS', 'Seznam html tagů, uvnitř kterých nemají být konce řádků nahrazovány.'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS_DESC', 'Návrhy: "code,pre,geshi,textarea". Názvy tagů oddělujte čárkou. Tip: Zadávané tagy jsou vyhodnocovány jako regulární výraz.'); -@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Použít tagy <p>'); -@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vkládat tagy <p> místo tagů <br />'); +@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Použít tagy <p>'); +@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vkládat tagy <p> místo tagů <br />'); // Next lines were translated on 2012/01/08 @define('PLUGIN_EVENT_NL2BR_CHECK_MARKUP', 'Kontrolovat další značkovací pluginy?'); diff --git a/plugins/serendipity_event_nl2br/UTF-8/lang_cz.inc.php b/plugins/serendipity_event_nl2br/UTF-8/lang_cz.inc.php index 171ebb71..8ade0e6c 100644 --- a/plugins/serendipity_event_nl2br/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_event_nl2br/UTF-8/lang_cz.inc.php @@ -17,8 +17,8 @@ @define('PLUGIN_EVENT_NL2BR_DESC', 'Mění znaky konce řádku na tagy <br />'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS', 'Seznam html tagů, uvnitř kterých nemají být konce řádků nahrazovány.'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS_DESC', 'Návrhy: "code,pre,geshi,textarea". Názvy tagů oddělujte čárkou. Tip: Zadávané tagy jsou vyhodnocovány jako regulární výraz.'); -@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Použít tagy <p>'); -@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vkládat tagy <p> místo tagů <br />'); +@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Použít tagy <p>'); +@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vkládat tagy <p> místo tagů <br />'); // Next lines were translated on 2012/01/08 @define('PLUGIN_EVENT_NL2BR_CHECK_MARKUP', 'Kontrolovat další značkovací pluginy?'); diff --git a/plugins/serendipity_event_nl2br/UTF-8/lang_de.inc.php b/plugins/serendipity_event_nl2br/UTF-8/lang_de.inc.php index 4c87411a..e5070761 100644 --- a/plugins/serendipity_event_nl2br/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_nl2br/UTF-8/lang_de.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -7,8 +7,8 @@ * EN-Revision: Revision of lang_en.inc.php */ -@define('PLUGIN_EVENT_NL2BR_NAME', 'Textformatierung: NL2BR'); -@define('PLUGIN_EVENT_NL2BR_DESC', 'Konvertiert Zeilenumbrüche zu HTML'); +@define('PLUGIN_EVENT_NL2BR_NAME', 'Textformatierung: NL2BR'); +@define('PLUGIN_EVENT_NL2BR_DESC', 'Konvertiert Zeilenumbrüche zu HTML'); @define('PLUGIN_EVENT_NL2BR_CHECK_MARKUP', 'Überprüfe Markup-Plugins?'); @define('PLUGIN_EVENT_NL2BR_CHECK_MARKUP_DESC', 'Überprüft automatisch auf existierende Markup-Plugins, um die weitere Ausführung des NL2BR-Plugins zu untersagen. Dies gilt dann, wenn WYSIWYG oder spezifische Markup-Plugins entdeckt werden.'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS', 'Eine Liste von HTML-Tags, innerhalb derer keine Umbrüche bei Benutzung von P-Tags konvertiert werden'); diff --git a/plugins/serendipity_event_nl2br/UTF-8/lang_es.inc.php b/plugins/serendipity_event_nl2br/UTF-8/lang_es.inc.php index aa50418a..aa5bc0c8 100644 --- a/plugins/serendipity_event_nl2br/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_event_nl2br/UTF-8/lang_es.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -6,6 +6,6 @@ * EN-Revision: 690 */ -@define('PLUGIN_EVENT_NL2BR_NAME', 'Formato: NL2BR'); -@define('PLUGIN_EVENT_NL2BR_DESC', 'Convierte los saltos de linea en etiquetas BR'); +@define('PLUGIN_EVENT_NL2BR_NAME', 'Formato: NL2BR'); +@define('PLUGIN_EVENT_NL2BR_DESC', 'Convierte los saltos de linea en etiquetas BR'); diff --git a/plugins/serendipity_event_nl2br/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_nl2br/UTF-8/lang_fr.inc.php index 8ebbb1a3..00d6641f 100644 --- a/plugins/serendipity_event_nl2br/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_nl2br/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -7,6 +7,6 @@ * EN-Revision: Revision of lang_en.inc.php */ -@define('PLUGIN_EVENT_NL2BR_NAME', 'Balises: NL2BR'); -@define('PLUGIN_EVENT_NL2BR_DESC', 'Convertit les retours à la ligne en balises BR'); +@define('PLUGIN_EVENT_NL2BR_NAME', 'Balises: NL2BR'); +@define('PLUGIN_EVENT_NL2BR_DESC', 'Convertit les retours à la ligne en balises BR'); diff --git a/plugins/serendipity_event_nl2br/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_nl2br/UTF-8/lang_ja.inc.php index 36098014..e0ef3659 100644 --- a/plugins/serendipity_event_nl2br/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_nl2br/UTF-8/lang_ja.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -6,8 +6,8 @@ * EN-Revision: 1501 */ -@define('PLUGIN_EVENT_NL2BR_NAME', 'マークアップ: NL2BR'); -@define('PLUGIN_EVENT_NL2BR_DESC', '改行を BR タグに変換します。'); +@define('PLUGIN_EVENT_NL2BR_NAME', 'マークアップ: NL2BR'); +@define('PLUGIN_EVENT_NL2BR_DESC', '改行を BR タグに変換します。'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS', '改行を変換しない HTML タグの一覧'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS_DESC', '提案: "code,pre,geshi,textarea". 複数のタグをカンマ(「,」)で分けます。ヒント: 入力されたタグは正規表現として評価されます。'); diff --git a/plugins/serendipity_event_nl2br/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_nl2br/UTF-8/lang_ko.inc.php index dae39c3c..dbe7664e 100644 --- a/plugins/serendipity_event_nl2br/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_nl2br/UTF-8/lang_ko.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -7,6 +7,6 @@ * EN-Revision: Revision of lang_en.inc.php */ -@define('PLUGIN_EVENT_NL2BR_NAME', '마크업: NL2BR'); -@define('PLUGIN_EVENT_NL2BR_DESC', '새 줄을 BR 태그로 변환함'); +@define('PLUGIN_EVENT_NL2BR_NAME', '마크업: NL2BR'); +@define('PLUGIN_EVENT_NL2BR_DESC', '새 줄을 BR 태그로 변환함'); diff --git a/plugins/serendipity_event_nl2br/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_nl2br/UTF-8/lang_pl.inc.php index 64fa9802..42b8e0ef 100644 --- a/plugins/serendipity_event_nl2br/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_nl2br/UTF-8/lang_pl.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_nl2br/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_nl2br/UTF-8/lang_pt_PT.inc.php index c65f319e..2a5e7c42 100644 --- a/plugins/serendipity_event_nl2br/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_nl2br/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -7,6 +7,6 @@ * EN-Revision: Revision of lang_en.inc.php */ -@define('PLUGIN_EVENT_NL2BR_NAME', 'Código: NL2BR'); -@define('PLUGIN_EVENT_NL2BR_DESC', 'Converte os fins de linha em etiquetas BR'); +@define('PLUGIN_EVENT_NL2BR_NAME', 'Código: NL2BR'); +@define('PLUGIN_EVENT_NL2BR_DESC', 'Converte os fins de linha em etiquetas BR'); diff --git a/plugins/serendipity_event_nl2br/UTF-8/lang_sk.inc.php b/plugins/serendipity_event_nl2br/UTF-8/lang_sk.inc.php index b041ab5d..9cbac474 100644 --- a/plugins/serendipity_event_nl2br/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_event_nl2br/UTF-8/lang_sk.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version 1 @@ -10,6 +10,6 @@ @define('PLUGIN_EVENT_NL2BR_DESC', 'Mení znaky konca riadku na tagy <br />'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS', 'Zoznam html tagov, vo vnútri ktorých nemajú byť konce riadkov nahradzované.'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS_DESC', 'Návrhy: "code,pre,geshi,textarea". Názvy tagov oddeľovať čiarkou. Tip: Zadané tagy sú vyhodnocované ako regulárny výraz.'); -@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Použíť tagy <p>'); -@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vkladať tagy <p> namiesto tagov <br />'); +@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Použíť tagy <p>'); +@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vkladať tagy <p> namiesto tagov <br />'); diff --git a/plugins/serendipity_event_nl2br/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_nl2br/UTF-8/lang_tn.inc.php index 439ac7bb..7822c03d 100644 --- a/plugins/serendipity_event_nl2br/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_nl2br/UTF-8/lang_tn.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -7,6 +7,6 @@ * EN-Revision: Revision of lang_en.inc.php */ -@define('PLUGIN_EVENT_NL2BR_NAME', '標記語言: NL2BR'); -@define('PLUGIN_EVENT_NL2BR_DESC', '轉換新行成 BR 標籤'); +@define('PLUGIN_EVENT_NL2BR_NAME', '標記語言: NL2BR'); +@define('PLUGIN_EVENT_NL2BR_DESC', '轉換新行成 BR 標籤'); diff --git a/plugins/serendipity_event_nl2br/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_nl2br/UTF-8/lang_zh.inc.php index 0476241e..bafc6989 100644 --- a/plugins/serendipity_event_nl2br/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_nl2br/UTF-8/lang_zh.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_nl2br/lang_bg.inc.php b/plugins/serendipity_event_nl2br/lang_bg.inc.php index 298da931..25df7194 100644 --- a/plugins/serendipity_event_nl2br/lang_bg.inc.php +++ b/plugins/serendipity_event_nl2br/lang_bg.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_nl2br/lang_cn.inc.php b/plugins/serendipity_event_nl2br/lang_cn.inc.php index 0476241e..bafc6989 100644 --- a/plugins/serendipity_event_nl2br/lang_cn.inc.php +++ b/plugins/serendipity_event_nl2br/lang_cn.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_nl2br/lang_cs.inc.php b/plugins/serendipity_event_nl2br/lang_cs.inc.php index 014cb8d5..a3fd692e 100644 --- a/plugins/serendipity_event_nl2br/lang_cs.inc.php +++ b/plugins/serendipity_event_nl2br/lang_cs.inc.php @@ -17,8 +17,8 @@ @define('PLUGIN_EVENT_NL2BR_DESC', 'M�n� znaky konce ��dku na tagy <br />'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS', 'Seznam html tag�, uvnit� kter�ch nemaj� b�t konce ��dk� nahrazov�ny.'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS_DESC', 'N�vrhy: "code,pre,geshi,textarea". N�zvy tag� odd�lujte ��rkou. Tip: Zad�van� tagy jsou vyhodnocov�ny jako regul�rn� v�raz.'); -@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Pou��t tagy <p>'); -@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vkl�dat tagy <p> m�sto tag� <br />'); +@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Pou��t tagy <p>'); +@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vkl�dat tagy <p> m�sto tag� <br />'); // Next lines were translated on 2012/01/08 @define('PLUGIN_EVENT_NL2BR_CHECK_MARKUP', 'Kontrolovat dal�� zna�kovac� pluginy?'); diff --git a/plugins/serendipity_event_nl2br/lang_cz.inc.php b/plugins/serendipity_event_nl2br/lang_cz.inc.php index d2d65c17..beadb402 100644 --- a/plugins/serendipity_event_nl2br/lang_cz.inc.php +++ b/plugins/serendipity_event_nl2br/lang_cz.inc.php @@ -17,8 +17,8 @@ @define('PLUGIN_EVENT_NL2BR_DESC', 'M�n� znaky konce ��dku na tagy <br />'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS', 'Seznam html tag�, uvnit� kter�ch nemaj� b�t konce ��dk� nahrazov�ny.'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS_DESC', 'N�vrhy: "code,pre,geshi,textarea". N�zvy tag� odd�lujte ��rkou. Tip: Zad�van� tagy jsou vyhodnocov�ny jako regul�rn� v�raz.'); -@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Pou��t tagy <p>'); -@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vkl�dat tagy <p> m�sto tag� <br />'); +@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Pou��t tagy <p>'); +@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vkl�dat tagy <p> m�sto tag� <br />'); // Next lines were translated on 2012/01/08 @define('PLUGIN_EVENT_NL2BR_CHECK_MARKUP', 'Kontrolovat dal�� zna�kovac� pluginy?'); diff --git a/plugins/serendipity_event_nl2br/lang_de.inc.php b/plugins/serendipity_event_nl2br/lang_de.inc.php index edeb3bb0..2fad7f0c 100644 --- a/plugins/serendipity_event_nl2br/lang_de.inc.php +++ b/plugins/serendipity_event_nl2br/lang_de.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -7,8 +7,8 @@ * EN-Revision: Revision of lang_en.inc.php */ -@define('PLUGIN_EVENT_NL2BR_NAME', 'Textformatierung: NL2BR'); -@define('PLUGIN_EVENT_NL2BR_DESC', 'Konvertiert Zeilenumbr�che zu HTML'); +@define('PLUGIN_EVENT_NL2BR_NAME', 'Textformatierung: NL2BR'); +@define('PLUGIN_EVENT_NL2BR_DESC', 'Konvertiert Zeilenumbr�che zu HTML'); @define('PLUGIN_EVENT_NL2BR_CHECK_MARKUP', '�berpr�fe Markup-Plugins?'); @define('PLUGIN_EVENT_NL2BR_CHECK_MARKUP_DESC', '�berpr�ft automatisch auf existierende Markup-Plugins, um die weitere Ausf�hrung des NL2BR-Plugins zu untersagen. Dies gilt dann, wenn WYSIWYG oder spezifische Markup-Plugins entdeckt werden.'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS', 'Eine Liste von HTML-Tags, innerhalb derer keine Umbr�che bei Benutzung von P-Tags konvertiert werden'); diff --git a/plugins/serendipity_event_nl2br/lang_en.inc.php b/plugins/serendipity_event_nl2br/lang_en.inc.php index 6b01ecd8..714dbebb 100644 --- a/plugins/serendipity_event_nl2br/lang_en.inc.php +++ b/plugins/serendipity_event_nl2br/lang_en.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_nl2br/lang_es.inc.php b/plugins/serendipity_event_nl2br/lang_es.inc.php index aa50418a..aa5bc0c8 100644 --- a/plugins/serendipity_event_nl2br/lang_es.inc.php +++ b/plugins/serendipity_event_nl2br/lang_es.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -6,6 +6,6 @@ * EN-Revision: 690 */ -@define('PLUGIN_EVENT_NL2BR_NAME', 'Formato: NL2BR'); -@define('PLUGIN_EVENT_NL2BR_DESC', 'Convierte los saltos de linea en etiquetas BR'); +@define('PLUGIN_EVENT_NL2BR_NAME', 'Formato: NL2BR'); +@define('PLUGIN_EVENT_NL2BR_DESC', 'Convierte los saltos de linea en etiquetas BR'); diff --git a/plugins/serendipity_event_nl2br/lang_fr.inc.php b/plugins/serendipity_event_nl2br/lang_fr.inc.php index a0351e7e..6df88110 100644 --- a/plugins/serendipity_event_nl2br/lang_fr.inc.php +++ b/plugins/serendipity_event_nl2br/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -7,6 +7,6 @@ * EN-Revision: Revision of lang_en.inc.php */ -@define('PLUGIN_EVENT_NL2BR_NAME', 'Balises: NL2BR'); -@define('PLUGIN_EVENT_NL2BR_DESC', 'Convertit les retours � la ligne en balises BR'); +@define('PLUGIN_EVENT_NL2BR_NAME', 'Balises: NL2BR'); +@define('PLUGIN_EVENT_NL2BR_DESC', 'Convertit les retours � la ligne en balises BR'); diff --git a/plugins/serendipity_event_nl2br/lang_ja.inc.php b/plugins/serendipity_event_nl2br/lang_ja.inc.php index 36098014..e0ef3659 100644 --- a/plugins/serendipity_event_nl2br/lang_ja.inc.php +++ b/plugins/serendipity_event_nl2br/lang_ja.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -6,8 +6,8 @@ * EN-Revision: 1501 */ -@define('PLUGIN_EVENT_NL2BR_NAME', 'マークアップ: NL2BR'); -@define('PLUGIN_EVENT_NL2BR_DESC', '改行を BR タグに変換します。'); +@define('PLUGIN_EVENT_NL2BR_NAME', 'マークアップ: NL2BR'); +@define('PLUGIN_EVENT_NL2BR_DESC', '改行を BR タグに変換します。'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS', '改行を変換しない HTML タグの一覧'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS_DESC', '提案: "code,pre,geshi,textarea". 複数のタグをカンマ(「,」)で分けます。ヒント: 入力されたタグは正規表現として評価されます。'); diff --git a/plugins/serendipity_event_nl2br/lang_ko.inc.php b/plugins/serendipity_event_nl2br/lang_ko.inc.php index dae39c3c..dbe7664e 100644 --- a/plugins/serendipity_event_nl2br/lang_ko.inc.php +++ b/plugins/serendipity_event_nl2br/lang_ko.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -7,6 +7,6 @@ * EN-Revision: Revision of lang_en.inc.php */ -@define('PLUGIN_EVENT_NL2BR_NAME', '마크업: NL2BR'); -@define('PLUGIN_EVENT_NL2BR_DESC', '새 줄을 BR 태그로 변환함'); +@define('PLUGIN_EVENT_NL2BR_NAME', '마크업: NL2BR'); +@define('PLUGIN_EVENT_NL2BR_DESC', '새 줄을 BR 태그로 변환함'); diff --git a/plugins/serendipity_event_nl2br/lang_pl.inc.php b/plugins/serendipity_event_nl2br/lang_pl.inc.php index 8a652f7b..8489c43e 100644 --- a/plugins/serendipity_event_nl2br/lang_pl.inc.php +++ b/plugins/serendipity_event_nl2br/lang_pl.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_nl2br/lang_pt_PT.inc.php b/plugins/serendipity_event_nl2br/lang_pt_PT.inc.php index 1898a0ff..c3b93eb3 100644 --- a/plugins/serendipity_event_nl2br/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_nl2br/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -7,6 +7,6 @@ * EN-Revision: Revision of lang_en.inc.php */ -@define('PLUGIN_EVENT_NL2BR_NAME', 'C�digo: NL2BR'); -@define('PLUGIN_EVENT_NL2BR_DESC', 'Converte os fins de linha em etiquetas BR'); +@define('PLUGIN_EVENT_NL2BR_NAME', 'C�digo: NL2BR'); +@define('PLUGIN_EVENT_NL2BR_DESC', 'Converte os fins de linha em etiquetas BR'); diff --git a/plugins/serendipity_event_nl2br/lang_sk.inc.php b/plugins/serendipity_event_nl2br/lang_sk.inc.php index 8de4f345..a783ab97 100644 --- a/plugins/serendipity_event_nl2br/lang_sk.inc.php +++ b/plugins/serendipity_event_nl2br/lang_sk.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version 1 @@ -10,6 +10,6 @@ @define('PLUGIN_EVENT_NL2BR_DESC', 'Men� znaky konca riadku na tagy <br />'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS', 'Zoznam html tagov, vo vn�tri ktor�ch nemaj� by� konce riadkov nahradzovan�.'); @define('PLUGIN_EVENT_NL2BR_ISOLATE_TAGS_DESC', 'N�vrhy: "code,pre,geshi,textarea". N�zvy tagov odde�ova� �iarkou. Tip: Zadan� tagy s� vyhodnocovan� ako regul�rny v�raz.'); -@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Pou��� tagy <p>'); -@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vklada� tagy <p> namiesto tagov <br />'); +@define('PLUGIN_EVENT_NL2BR_PTAGS', 'Pou��� tagy <p>'); +@define('PLUGIN_EVENT_NL2BR_PTAGS_DESC', 'Vklada� tagy <p> namiesto tagov <br />'); diff --git a/plugins/serendipity_event_nl2br/lang_tn.inc.php b/plugins/serendipity_event_nl2br/lang_tn.inc.php index 439ac7bb..7822c03d 100644 --- a/plugins/serendipity_event_nl2br/lang_tn.inc.php +++ b/plugins/serendipity_event_nl2br/lang_tn.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -7,6 +7,6 @@ * EN-Revision: Revision of lang_en.inc.php */ -@define('PLUGIN_EVENT_NL2BR_NAME', '標記語言: NL2BR'); -@define('PLUGIN_EVENT_NL2BR_DESC', '轉換新行成 BR 標籤'); +@define('PLUGIN_EVENT_NL2BR_NAME', '標記語言: NL2BR'); +@define('PLUGIN_EVENT_NL2BR_DESC', '轉換新行成 BR 標籤'); diff --git a/plugins/serendipity_event_nl2br/lang_zh.inc.php b/plugins/serendipity_event_nl2br/lang_zh.inc.php index 0476241e..bafc6989 100644 --- a/plugins/serendipity_event_nl2br/lang_zh.inc.php +++ b/plugins/serendipity_event_nl2br/lang_zh.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php b/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php index 2b5ae6be..78548a60 100644 --- a/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php +++ b/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php @@ -1,5 +1,9 @@ <?php +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + @serendipity_plugin_api::load_language(dirname(__FILE__)); class serendipity_event_nl2br extends serendipity_event @@ -14,9 +18,9 @@ class serendipity_event_nl2br extends serendipity_event $propbag->add('description', PLUGIN_EVENT_NL2BR_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '2.20'); + $propbag->add('version', '2.21'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -55,7 +59,8 @@ class serendipity_event_nl2br extends serendipity_event $propbag->add('configuration', $conf_array); } - function cleanup() { + function cleanup() + { global $serendipity; /* check possible config mismatch setting in combination with ISOBR */ @@ -83,7 +88,8 @@ class serendipity_event_nl2br extends serendipity_event return true; } - function example() { + function example() + { return '<h3>PLEASE NOTE the implications of this markup plugin:</h3> <p>This plugin transfers linebreaks to HTML-linebreaks, so that they show up in your blog entry.</p> <p>In two cases this can raise problematic issues for you:</p> @@ -100,16 +106,19 @@ class serendipity_event_nl2br extends serendipity_event </ul>'."\n"; } - function install() { + function install() + { serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function uninstall(&$propbag) { + function uninstall(&$propbag) + { serendipity_plugin_api::hook_event('backend_cache_purge', $this->title); serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } @@ -156,27 +165,32 @@ class serendipity_event_nl2br extends serendipity_event $propbag->add('name', constant($name)); $propbag->add('description', sprintf(APPLY_MARKUP_TO, constant($name))); $propbag->add('default', 'true'); + break; } return true; } - function isolate($src, $regexp = NULL) { + function isolate($src, $regexp = NULL) + { if($regexp) return preg_replace_callback($regexp, array($this, 'isolate'), $src); global $_buf; $_buf[] = $src[0]; return "\001" . (count($_buf) - 1); } - function restore_callback($matches) { + function restore_callback($matches) + { global $_buf; return $_buf[$matches[1]]; } - function restore($text) { + function restore($text) + { return preg_replace_callback('!\001(\d+)!', array($this, 'restore_callback'), $text); // works?! } - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; static $markup = null; static $isolate = null; @@ -204,7 +218,9 @@ class serendipity_event_nl2br extends serendipity_event } if (isset($hooks[$event])) { + switch($event) { + case 'frontend_display': // check single entry for temporary disabled markups @@ -224,7 +240,7 @@ class serendipity_event_nl2br extends serendipity_event */ // don't run, if the textile, or markdown plugin already took care about markup if ($markup && $serendipity['nl2br']['entry_disabled_markup'] === false && (class_exists('serendipity_event_textile') || class_exists('serendipity_event_markdown'))) { - return true; + break; } // NOTE: the wysiwyg-editor needs to send its own ['properties']['ep_no_nl2br'] to disable the nl2br() parser! @@ -278,9 +294,7 @@ class serendipity_event_nl2br extends serendipity_event } } } - - return true; - break; + break; case 'backend_configure': @@ -295,15 +309,13 @@ class serendipity_event_nl2br extends serendipity_event // hook into default/admin/entries.tpl somehow via the Heart Of Gold = serendipity_printEntryForm() before! it is loaded $serendipity['smarty']->assign('iso2br', true); } - - - return true; - break; + break; case 'css': -?> + $eventData .= ' + +/* nl2br plugin start */ -/* nl2br plugin */ p.whiteline { margin-top: 0em; margin-bottom: 1em; @@ -314,24 +326,28 @@ p.break { margin-bottom: 0em; } -<?php - return true; - break; +/* nl2br plugin end */ + +'; + break; default: - return false; - } + return false; + } + return true; } else { return false; } } - /* clean nl2br from markup where it is invalid and/or breaks html output + /** + * clean nl2br from markup where it is invalid and/or breaks html output * @param string entrytext * @return string - * */ - function clean_nl2brtags(&$entry) { + */ + function clean_nl2brtags(&$entry) + { $allTags = explode('|', 'table|thead|tbody|tfoot|th|tr|td|caption|colgroup|col|ol|ul|li|dl|dt|dd'); $br2nl = array(); @@ -353,13 +369,15 @@ p.break { - /* Insert <p class="whiteline" at paragraphs ending with two newlines + /** + * Insert <p class="whiteline" at paragraphs ending with two newlines * Insert <p class="break" at paragraphs ending with one nl * @param string text * @param boolean complex operations (not necessary when text is flat) * @return string - * */ - function nl2p(&$text, $complex=true) { + */ + function nl2p(&$text, $complex=true) + { if (empty($text)) { return $text; } @@ -417,31 +435,34 @@ p.break { return $start_tag . implode($text) . '</p>'; } - /* + /** * Remove unnecessary paragraphs * Unnecessary are those which start and end immediately. * They only get created by isolate_block_elements * @param mixed text * @return string - * */ - function clean_code ($text) { + */ + function clean_code ($text) + { if (is_array($text)) { $text = implode($text); } return str_replace(array('<p class="whiteline"></p>','<p class="break"></p>', '<p></p>'),"", $text); } - function purge_p($text) { + function purge_p($text) + { $text = str_replace('</p>', "", $text); return str_replace(array('<p class="whiteline">','<p class="break">', '<p>', '</p>'),"\n", $text); } - /* + /** * Use nl2p on text within blockelements, useful e.g. with blockquotes * @param array text * @return string - * */ - function formate_block_elements($textstring) { + */ + function formate_block_elements($textstring) + { $block_elements = array('<blockquote'); foreach ($block_elements as $start_tag) { $end_tag = $this->end_tags($start_tag); @@ -466,8 +487,9 @@ p.break { * Make sure none of these block_elements are within a <p> * @param string text * @return string - * */ - function isolate_block_elements($textstring) { + */ + function isolate_block_elements($textstring) + { $block_elements = array('<table','<ul','<ol','<pre', '<dir', '<dl', '<h1', '<h2', '<h3', '<h4', '<h5', '<h6', '<menu', '<blockquote'); @@ -493,8 +515,9 @@ p.break { * Note: Walking from left to right * @param array text * @return string - * */ - function tidy_block_elements($text) { + */ + function tidy_block_elements($text) + { $remove = false; $textstring = implode($text); $block_elements = array('<table','<ul','<ol','<pre', '<dir', '<dl', @@ -519,7 +542,8 @@ p.break { return $textstring; } - function get_string_till($text, $end_tag, $offset=0){ + function get_string_till($text, $end_tag, $offset=0) + { if (strpos($text, $end_tag, $offset) === false) { return ""; } @@ -527,10 +551,11 @@ p.break { return substr($text, $offset, $len); } - /* + /** * Return corresponding end-tag: <p -> </p> */ - function end_tags($start_tag) { + function end_tags($start_tag) + { return str_replace("<", "</", $start_tag).">"; } @@ -539,7 +564,8 @@ p.break { * @param int start * $param array text */ - function next_nl_block($i, $text) { + function next_nl_block($i, $text) + { $skipped = false; for ($i--; $i>0; $i-- ) { if (!$skipped){ @@ -547,12 +573,14 @@ p.break { if (strpos($text[$i], "\n") === false) { $skipped = true; } - }else if (strpos($text[$i], "\n") !== false) { + } else if (strpos($text[$i], "\n") !== false) { break; } } return $i; } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_event_responsiveimages/UTF-8/lang_de.inc.php b/plugins/serendipity_event_responsiveimages/UTF-8/lang_de.inc.php new file mode 100644 index 00000000..b14dbb40 --- /dev/null +++ b/plugins/serendipity_event_responsiveimages/UTF-8/lang_de.inc.php @@ -0,0 +1,10 @@ +<?php + +/** + * @version 1.0 + * @author YellowLed + * @translated 2017/04/16 + */ + +@define('PLUGIN_EVENT_RESPONSIVE_NAME', 'Responsive Images'); +@define('PLUGIN_EVENT_RESPONSIVE_DESC', 'Skaliert Grafiken mit Hilfe von HTML5 und dem s9y-Backend passend zur Breite des Viewports des Besuchers'); \ No newline at end of file diff --git a/plugins/serendipity_event_responsiveimages/UTF-8/lang_en.inc.php b/plugins/serendipity_event_responsiveimages/UTF-8/lang_en.inc.php new file mode 100644 index 00000000..1133bfa5 --- /dev/null +++ b/plugins/serendipity_event_responsiveimages/UTF-8/lang_en.inc.php @@ -0,0 +1,9 @@ +<?php + +/** + * @version 1.0 + * @author onli + */ + +@define('PLUGIN_EVENT_RESPONSIVE_NAME', 'Responsive Images'); +@define('PLUGIN_EVENT_RESPONSIVE_DESC', 'Use HTML5 and the s9y backend to scale images to the visitors viewport width'); \ No newline at end of file diff --git a/plugins/serendipity_event_responsiveimages/lang_de.inc.php b/plugins/serendipity_event_responsiveimages/lang_de.inc.php new file mode 100644 index 00000000..b14dbb40 --- /dev/null +++ b/plugins/serendipity_event_responsiveimages/lang_de.inc.php @@ -0,0 +1,10 @@ +<?php + +/** + * @version 1.0 + * @author YellowLed + * @translated 2017/04/16 + */ + +@define('PLUGIN_EVENT_RESPONSIVE_NAME', 'Responsive Images'); +@define('PLUGIN_EVENT_RESPONSIVE_DESC', 'Skaliert Grafiken mit Hilfe von HTML5 und dem s9y-Backend passend zur Breite des Viewports des Besuchers'); \ No newline at end of file diff --git a/plugins/serendipity_event_responsiveimages/lang_en.inc.php b/plugins/serendipity_event_responsiveimages/lang_en.inc.php new file mode 100644 index 00000000..1133bfa5 --- /dev/null +++ b/plugins/serendipity_event_responsiveimages/lang_en.inc.php @@ -0,0 +1,9 @@ +<?php + +/** + * @version 1.0 + * @author onli + */ + +@define('PLUGIN_EVENT_RESPONSIVE_NAME', 'Responsive Images'); +@define('PLUGIN_EVENT_RESPONSIVE_DESC', 'Use HTML5 and the s9y backend to scale images to the visitors viewport width'); \ No newline at end of file diff --git a/plugins/serendipity_event_responsiveimages/serendipity_event_responsiveimages.php b/plugins/serendipity_event_responsiveimages/serendipity_event_responsiveimages.php new file mode 100644 index 00000000..92892cb0 --- /dev/null +++ b/plugins/serendipity_event_responsiveimages/serendipity_event_responsiveimages.php @@ -0,0 +1,196 @@ +<?php + +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + +@serendipity_plugin_api::load_language(dirname(__FILE__)); + +class serendipity_event_responsiveimages extends serendipity_event +{ + var $title = PLUGIN_EVENT_RESPONSIVE_NAME; + + function introspect(&$propbag) + { + global $serendipity; + + $propbag->add('name', PLUGIN_EVENT_RESPONSIVE_NAME); + $propbag->add('description', PLUGIN_EVENT_RESPONSIVE_DESC); + $propbag->add('stackable', false); + $propbag->add('author', 'Serendipity Team'); + $propbag->add('version', '0.2.2'); + $propbag->add('requirements', array( + 'serendipity' => '2.2', + )); + $propbag->add('cachable_events', array('frontend_display' => true)); + $propbag->add('event_hooks', array('frontend_display' => true, + 'backend_media_makethumb' => true + )); + $propbag->add('groups', array('MARKUP')); + + $this->markup_elements = array( + array( + 'name' => 'ENTRY_BODY', + 'element' => 'body', + ), + array( + 'name' => 'EXTENDED_BODY', + 'element' => 'extended', + ) + ); + + $conf_array = array(); + foreach($this->markup_elements as $element) { + $conf_array[] = $element['name']; + } + $propbag->add('configuration', $conf_array); + } + + function install() + { + serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); + } + + function uninstall(&$propbag) + { + serendipity_plugin_api::hook_event('backend_cache_purge', $this->title); + serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); + } + + function generate_content(&$title) + { + $title = $this->title; + } + + function introspect_config_item($name, &$propbag) + { + $propbag->add('type', 'boolean'); + $propbag->add('name', constant($name)); + $propbag->add('description', sprintf(APPLY_MARKUP_TO, constant($name))); + $propbag->add('default', 'true'); + return true; + } + + function event_hook($event, &$bag, &$eventData, $addData = null) + { + global $serendipity; + + $hooks = &$bag->get('event_hooks'); + $this->breakpoints = [1600, 1200, 600]; # This can later on be overwritten by the theme + $this->thumbWidths = [1200, 800, 400]; # This can later on be overwritten by the theme + + if (isset($hooks[$event])) { + + switch($event) { + + case 'frontend_display': + foreach ($this->markup_elements as $temp) { + if (serendipity_db_bool($this->get_config($temp['name'], true)) && isset($eventData[$temp['element']]) && + !$eventData['properties']['ep_disable_markup_' . $this->instance] && + !isset($serendipity['POST']['properties']['disable_markup_' . $this->instance])) { + $element = $temp['element']; + $eventData[$element] = $this->_responsive_markup($eventData[$element]); + } + } + break; + + case 'backend_media_makethumb': + echo $addData; + // $eventData is usually defined as: + // array(array( + // 'thumbSize' => $serendipity['thumbSize'], + // 'thumb' => $serendipity['thumbSuffix'] + // )); + // We now just need to add the additional array elements, with the new sizes and suffix. + // We can use $addData, containing the path to the full size file, to get the starting width + $origSize = serendipity_getimagesize($addData); + + for ($i = 0; $i < count($this->thumbWidths); $i++) { + $thumbWidth = $this->thumbWidths[$i]; + if ($thumbWidth < $origSize[0]) { + $eventData[] = array( + 'thumbSize' => ['width' => $thumbWidth, 'height' => $origSize[1] * ($thumbWidth / $origSize[0])], + 'thumb' => $thumbWidth . 'W.' . $serendipity['thumbSuffix'] + ); + } + } + + break; + default: + return false; + + } + return true; + } else { + return false; + } + } + + /* Given an entry text, replace each image linked to the ML with an img element containing + * an srcset. + * */ + function _responsive_markup($text) + { + preg_match_all('@<!-- s9ymdb:(?<id>\d+) -->@', $text, $matches); + + foreach ($matches['id'] as $imgId) { + preg_match('@<!-- s9ymdb:\d+ --><img[^>]+width=["\'](\d+)["\']@', $text, $matches); + if ($matches[1]) { + $srcset = $this->createSrcset($imgId, $matches[1]); + } else { + $srcset = $this->createSrcset($imgId); + } + + $callback = function($matches) use ($srcset) { + if (strpos($matches[1], "srcset") === false) { + // the image has not yet an srcset, at least at the position where we insert it normally + return "{$matches[1]} $srcset src="; + } else { + return "{$matches[1]} src="; + } + }; + + $text = preg_replace_callback("@(<!-- s9ymdb:$imgId -->.*?)src=@", $callback, $text); + } + + return $text; + } + + /* Given an id for a image in the ML, create an srcset using smaller thumbnail images and their width. + * Don't worry over thumbnail creation here, that's done on image upload and thumbnail creation. + * */ + function createSrcset($id, $maxWidth = 20000) { + global $serendipity; + + $origImage = serendipity_fetchImageFromDatabase($id); + $imagePath = $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $origImage['path'] . $origImage['realname']; + + $thumbnails = serendipity_getThumbnails($id); + + $srcset = "srcset=\"$imagePath {$origImage['dimensions_width']}w,"; + + for ($i = 0; $i < count($this->thumbWidths); $i++) { + $thumbWidth = $this->thumbWidths[$i]; + $matchedThumbnail = false; + foreach ($thumbnails as $thumbnail) { + if (strpos($thumbnail, $thumbWidth . 'W') !== false) { + $matchedThumbnail = $thumbnail; + break; + } + } + if ($matchedThumbnail) { + $thumbnailHttp = str_replace($serendipity['serendipityPath'], $serendipity['serendipityHTTPPath'], $matchedThumbnail); + $breakpoint = $this->breakpoints[$i]; + $srcset .= "{$thumbnailHttp} {$breakpoint}w,"; + } + } + $srcset .= '"'; + + + return $srcset; + } + +} + +/* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_bg.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_bg.inc.php index 7fce49d2..af349471 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_bg.inc.php @@ -1,10 +1,11 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ - @define('PLUGIN_EVENT_S9YMARKUP_NAME', 'Текстово форматиране: Serendipity'); - @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Прилага базово форматиране на текст'); - @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Звездички означават bold (*текст*), подчертаване се прави с "_" (_текст_)'); +@define('PLUGIN_EVENT_S9YMARKUP_NAME', 'Текстово форматиране: Serendipity'); +@define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Прилага базово форматиране на текст'); +@define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Звездички означават bold (*текст*), подчертаване се прави с "_" (_текст_)'); + diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_cn.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_cn.inc.php index 62e6fa57..a2b851f7 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_cn.inc.php @@ -5,3 +5,4 @@ @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '用星号围住文章(例如 *word*)会以粗体样式显示,而用下划线围住文章(例如 _word_)会以带下划线的方式显示'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.'); + diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_cs.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_cs.inc.php index 682b8cfa..f0444c5f 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2007-11-20 00:00:00Z elf2000 $ +<?php /** * @version $Revision: 1381 $ @@ -9,3 +9,4 @@ @define('PLUGIN_EVENT_S9YMARKUP_NAME', 'Markup: Serendipity'); @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Provádí základní značkování textu.'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Slova mezi hvězdičkami budou tučná (*tučně*), podtržení podobně pomocí podtržítek _podtržené_.'); + diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_cz.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_cz.inc.php index d887183c..f0444c5f 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cz.inc.php 1381 2007-11-20 00:00:00Z elf2000 $ +<?php /** * @version $Revision: 1381 $ @@ -9,3 +9,4 @@ @define('PLUGIN_EVENT_S9YMARKUP_NAME', 'Markup: Serendipity'); @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Provádí základní značkování textu.'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Slova mezi hvězdičkami budou tučná (*tučně*), podtržení podobně pomocí podtržítek _podtržené_.'); + diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_da.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_da.inc.php index bb86cbe6..3157fd44 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_da.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_da.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_en.inc.php 690 2005-11-13 04:49:04Z elf2000 $ +<?php /** * @version $Revision: 690 $ @@ -10,4 +10,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Anvend grundlæggende serendipity formatering på indtastet tekst'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Omsluttende stjerner markerer tekst som fed (*ord*), understregning laves med _ord_.'); -?> diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_de.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_de.inc.php index e4930a63..840b9bff 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_de.inc.php @@ -1,5 +1,6 @@ -<?php # $Id$ +<?php + +@define('PLUGIN_EVENT_S9YMARKUP_NAME', 'Textformatierung: Serendipity'); +@define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Standard Serendipity Textformatierung durchführen'); +@define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Umschließende Sterne heben ein Wort hervor (*wort*), per _wort_ kann ein Wort unterstrichen werden.'); - @define('PLUGIN_EVENT_S9YMARKUP_NAME', 'Textformatierung: Serendipity'); - @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Standard Serendipity Textformatierung durchführen'); - @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Umschließende Sterne heben ein Wort hervor (*wort*), per _wort_ kann ein Wort unterstrichen werden.'); diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_es.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_es.inc.php index d34a822b..86f737d3 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_es.inc.php @@ -1,6 +1,6 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -9,4 +9,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Aplica formato básico serendipity a la entrada de texto'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Encerrando entre asteriscos convierte el texto en negrita (*palabra*), el subrayado es hecho así: _palabra_.'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_fr.inc.php index d9105e64..c2631321 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -17,5 +17,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Active les balises Serendipity dans le texte des billets'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Marquer un texte en gras: *mot*, souligner un texte: _mot_.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_is.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_is.inc.php index 14cfb705..d7f7bdef 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_is.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_is.inc.php @@ -1,8 +1,6 @@ -<?php # $Id$ +<?php - @define('PLUGIN_EVENT_S9YMARKUP_NAME', 'Textabreyting: Serendipity'); - @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Virkja grunntextabreytingar á texta í færslum'); - @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Að setja texta innan stjarna gerir hann feitletraðan (*orð*), og til að undirstrika setur maður strik niðri á undan og eftir orði (_orð_).'); +@define('PLUGIN_EVENT_S9YMARKUP_NAME', 'Textabreyting: Serendipity'); +@define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Virkja grunntextabreytingar á texta í færslum'); +@define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Að setja texta innan stjarna gerir hann feitletraðan (*orð*), og til að undirstrika setur maður strik niðri á undan og eftir orði (_orð_).'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_ja.inc.php index 3b8b4b0c..09ddc0bf 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 690 */ @@ -10,5 +10,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'エントリテキストに適用する基本的な serendipity マークアップ'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'アスタリスクで囲んだマークテキストはボールド (*強調文字*)になり、下線は _下線_ になります。'); -/* vim: set sts=4 ts=4 expandtab : */ -?> diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_ko.inc.php index b33a9865..8010a733 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_ko.inc.php @@ -1,9 +1,8 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_S9YMARKUP_NAME', '마크업: 세렌디피티'); - @define('PLUGIN_EVENT_S9YMARKUP_DESC', '작성한 글에 기본적인 세렌디피티 마크업을 적용함'); - @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '*단어* 식으로 단어를 별표로 둘러싸면 진하게 표시되며 밑줄을 치려면 _단어_ 식으로 적으면 됩니다.'); +@define('PLUGIN_EVENT_S9YMARKUP_NAME', '마크업: 세렌디피티'); +@define('PLUGIN_EVENT_S9YMARKUP_DESC', '작성한 글에 기본적인 세렌디피티 마크업을 적용함'); +@define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '*단어* 식으로 단어를 별표로 둘러싸면 진하게 표시되며 밑줄을 치려면 _단어_ 식으로 적으면 됩니다.'); -?> diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_nl.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_nl.inc.php index 161344bd..d19ded41 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_nl.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_nl.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_nl.inc.php 1381 2006-08-15 10:14:56Z elf2000 $ +<?php /** * @version $Revision: 1381 $ @@ -10,4 +10,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Standaard Serendipity tekstopmaak doorvoeren'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Woorden vet markeren d.m.v. *woord*, onderstrepen d.m.v _woord_.'); -?> diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_pl.inc.php index 28fec273..9b84247c 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -10,4 +10,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Stosowanie podstawowych znaczników Serendipity do wprowadzonego tekstu'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Zamknięcie tekstu w znakach gwiazdki spowoduje jego wytłuszczenie (*tekst*), podkreślenia są tworzone przez zastosowanie _tekst_.'); -?> diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_pt_PT.inc.php index 2cdbb246..4afd234a 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php ########################################################################## # serendipity - another blogger... # @@ -18,5 +18,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Activar a formatação do Serendipity no texto das entradas'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Asteriscos à volta duma palavra (*palavra*) marcam-na como negrito, sublinhados são feitos com _palavra_.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_se.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_se.inc.php index d970935e..7c477f3b 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_se.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_se.inc.php @@ -10,4 +10,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Applicera grundläggande serendipity markup på inläggstext'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Omslutande asterisker markerar text som fetstil (*ord*), understruken text görs med hjälp av _ord_.'); -?> diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_sk.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_sk.inc.php index 7075ca31..00194506 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_sk.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php /** * @version $$ @@ -9,3 +9,4 @@ @define('PLUGIN_EVENT_S9YMARKUP_NAME', 'Markup: Serendipity'); @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Uskutočnuje základné transformácie textu (markup).'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Slová medzi hviezdičkami budú tučnou (*tučné*), podčiarknutie pomocou underscore _podčiarknuté_.'); + diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_tn.inc.php index ad43a0c7..27bdf71a 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,7 +12,7 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_S9YMARKUP_NAME', '標記語言: Serendipity'); - @define('PLUGIN_EVENT_S9YMARKUP_DESC', '套用基本的 serendipity 標記語言到文章內'); - @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '星號圍住的文章會以粗體顯示 (*word*),底線是 _word_。'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_S9YMARKUP_NAME', '標記語言: Serendipity'); +@define('PLUGIN_EVENT_S9YMARKUP_DESC', '套用基本的 serendipity 標記語言到文章內'); +@define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '星號圍住的文章會以粗體顯示 (*word*),底線是 _word_。'); + diff --git a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_zh.inc.php index 62e6fa57..a2b851f7 100644 --- a/plugins/serendipity_event_s9ymarkup/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_s9ymarkup/UTF-8/lang_zh.inc.php @@ -5,3 +5,4 @@ @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '用星号围住文章(例如 *word*)会以粗体样式显示,而用下划线围住文章(例如 _word_)会以带下划线的方式显示'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.'); + diff --git a/plugins/serendipity_event_s9ymarkup/lang_bg.inc.php b/plugins/serendipity_event_s9ymarkup/lang_bg.inc.php index 73ecb3ea..1c33ec14 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_bg.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_bg.inc.php @@ -1,10 +1,11 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ - @define('PLUGIN_EVENT_S9YMARKUP_NAME', '�������� �����������: Serendipity'); - @define('PLUGIN_EVENT_S9YMARKUP_DESC', '������� ������ ����������� �� �����'); - @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '��������� ��������� bold (*�����*), ������������ �� ����� � "_" (_�����_)'); +@define('PLUGIN_EVENT_S9YMARKUP_NAME', '�������� �����������: Serendipity'); +@define('PLUGIN_EVENT_S9YMARKUP_DESC', '������� ������ ����������� �� �����'); +@define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '��������� ��������� bold (*�����*), ������������ �� ����� � "_" (_�����_)'); + diff --git a/plugins/serendipity_event_s9ymarkup/lang_cn.inc.php b/plugins/serendipity_event_s9ymarkup/lang_cn.inc.php index 62e6fa57..a2b851f7 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_cn.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_cn.inc.php @@ -5,3 +5,4 @@ @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '用星号围住文章(例如 *word*)会以粗体样式显示,而用下划线围住文章(例如 _word_)会以带下划线的方式显示'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.'); + diff --git a/plugins/serendipity_event_s9ymarkup/lang_cs.inc.php b/plugins/serendipity_event_s9ymarkup/lang_cs.inc.php index 42fe273e..3960007d 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_cs.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2007-11-20 00:00:00Z elf2000 $ +<?php /** * @version $Revision: 1381 $ @@ -9,3 +9,4 @@ @define('PLUGIN_EVENT_S9YMARKUP_NAME', 'Markup: Serendipity'); @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Prov�d� z�kladn� zna�kov�n� textu.'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Slova mezi hv�zdi�kami budou tu�n� (*tu�n�*), podtr�en� podobn� pomoc� podtr��tek _podtr�en�_.'); + diff --git a/plugins/serendipity_event_s9ymarkup/lang_cz.inc.php b/plugins/serendipity_event_s9ymarkup/lang_cz.inc.php index 6023ea8d..2fa3c994 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_cz.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cz.inc.php 1381 2007-11-20 00:00:00Z elf2000 $ +<?php /** * @version $Revision: 1381 $ @@ -9,3 +9,4 @@ @define('PLUGIN_EVENT_S9YMARKUP_NAME', 'Markup: Serendipity'); @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Prov�d� z�kladn� zna�kov�n� textu.'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Slova mezi hv�zdi�kami budou tu�n� (*tu�n�*), podtr�en� podobn� pomoc� podtr��tek _podtr�en�_.'); + diff --git a/plugins/serendipity_event_s9ymarkup/lang_da.inc.php b/plugins/serendipity_event_s9ymarkup/lang_da.inc.php index fe128824..ae3a9d4c 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_da.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_da.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_en.inc.php 690 2005-11-13 04:49:04Z elf2000 $ +<?php /** * @version $Revision: 690 $ @@ -10,4 +10,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Anvend grundl�ggende serendipity formatering p� indtastet tekst'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Omsluttende stjerner markerer tekst som fed (*ord*), understregning laves med _ord_.'); -?> diff --git a/plugins/serendipity_event_s9ymarkup/lang_de.inc.php b/plugins/serendipity_event_s9ymarkup/lang_de.inc.php index f27143ca..c0778d78 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_de.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_de.inc.php @@ -1,5 +1,6 @@ -<?php # $Id$ +<?php + +@define('PLUGIN_EVENT_S9YMARKUP_NAME', 'Textformatierung: Serendipity'); +@define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Standard Serendipity Textformatierung durchf�hren'); +@define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Umschlie�ende Sterne heben ein Wort hervor (*wort*), per _wort_ kann ein Wort unterstrichen werden.'); - @define('PLUGIN_EVENT_S9YMARKUP_NAME', 'Textformatierung: Serendipity'); - @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Standard Serendipity Textformatierung durchf�hren'); - @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Umschlie�ende Sterne heben ein Wort hervor (*wort*), per _wort_ kann ein Wort unterstrichen werden.'); diff --git a/plugins/serendipity_event_s9ymarkup/lang_en.inc.php b/plugins/serendipity_event_s9ymarkup/lang_en.inc.php index 2526ec46..6d3f4861 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_en.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_en.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Translator Name <yourmail@example.com> * EN-Revision: Revision of lang_en.inc.php */ @@ -10,4 +10,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Apply basic serendipity markup to entry text'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.'); -?> diff --git a/plugins/serendipity_event_s9ymarkup/lang_es.inc.php b/plugins/serendipity_event_s9ymarkup/lang_es.inc.php index 5dccd86c..83c52619 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_es.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_es.inc.php @@ -1,6 +1,6 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -9,4 +9,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Aplica formato b�sico serendipity a la entrada de texto'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Encerrando entre asteriscos convierte el texto en negrita (*palabra*), el subrayado es hecho as�: _palabra_.'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_s9ymarkup/lang_fr.inc.php b/plugins/serendipity_event_s9ymarkup/lang_fr.inc.php index d9105e64..c2631321 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_fr.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -17,5 +17,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Active les balises Serendipity dans le texte des billets'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Marquer un texte en gras: *mot*, souligner un texte: _mot_.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_s9ymarkup/lang_is.inc.php b/plugins/serendipity_event_s9ymarkup/lang_is.inc.php index bfca5d33..1dafae0b 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_is.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_is.inc.php @@ -1,8 +1,6 @@ -<?php # $Id$ +<?php - @define('PLUGIN_EVENT_S9YMARKUP_NAME', 'Textabreyting: Serendipity'); - @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Virkja grunntextabreytingar � texta � f�rslum'); - @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'A� setja texta innan stjarna gerir hann feitletra�an (*or�*), og til a� undirstrika setur ma�ur strik ni�ri � undan og eftir or�i (_or�_).'); +@define('PLUGIN_EVENT_S9YMARKUP_NAME', 'Textabreyting: Serendipity'); +@define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Virkja grunntextabreytingar � texta � f�rslum'); +@define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'A� setja texta innan stjarna gerir hann feitletra�an (*or�*), og til a� undirstrika setur ma�ur strik ni�ri � undan og eftir or�i (_or�_).'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_s9ymarkup/lang_ja.inc.php b/plugins/serendipity_event_s9ymarkup/lang_ja.inc.php index 3b8b4b0c..09ddc0bf 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_ja.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 690 */ @@ -10,5 +10,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'エントリテキストに適用する基本的な serendipity マークアップ'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'アスタリスクで囲んだマークテキストはボールド (*強調文字*)になり、下線は _下線_ になります。'); -/* vim: set sts=4 ts=4 expandtab : */ -?> diff --git a/plugins/serendipity_event_s9ymarkup/lang_ko.inc.php b/plugins/serendipity_event_s9ymarkup/lang_ko.inc.php index b33a9865..8010a733 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_ko.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_ko.inc.php @@ -1,9 +1,8 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_S9YMARKUP_NAME', '마크업: 세렌디피티'); - @define('PLUGIN_EVENT_S9YMARKUP_DESC', '작성한 글에 기본적인 세렌디피티 마크업을 적용함'); - @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '*단어* 식으로 단어를 별표로 둘러싸면 진하게 표시되며 밑줄을 치려면 _단어_ 식으로 적으면 됩니다.'); +@define('PLUGIN_EVENT_S9YMARKUP_NAME', '마크업: 세렌디피티'); +@define('PLUGIN_EVENT_S9YMARKUP_DESC', '작성한 글에 기본적인 세렌디피티 마크업을 적용함'); +@define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '*단어* 식으로 단어를 별표로 둘러싸면 진하게 표시되며 밑줄을 치려면 _단어_ 식으로 적으면 됩니다.'); -?> diff --git a/plugins/serendipity_event_s9ymarkup/lang_nl.inc.php b/plugins/serendipity_event_s9ymarkup/lang_nl.inc.php index 161344bd..d19ded41 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_nl.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_nl.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_nl.inc.php 1381 2006-08-15 10:14:56Z elf2000 $ +<?php /** * @version $Revision: 1381 $ @@ -10,4 +10,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Standaard Serendipity tekstopmaak doorvoeren'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Woorden vet markeren d.m.v. *woord*, onderstrepen d.m.v _woord_.'); -?> diff --git a/plugins/serendipity_event_s9ymarkup/lang_pl.inc.php b/plugins/serendipity_event_s9ymarkup/lang_pl.inc.php index f2c0fbac..2b9c3821 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_pl.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -10,4 +10,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Stosowanie podstawowych znacznik�w Serendipity do wprowadzonego tekstu'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Zamkni�cie tekstu w znakach gwiazdki spowoduje jego wyt�uszczenie (*tekst*), podkre�lenia s� tworzone przez zastosowanie _tekst_.'); -?> diff --git a/plugins/serendipity_event_s9ymarkup/lang_pt_PT.inc.php b/plugins/serendipity_event_s9ymarkup/lang_pt_PT.inc.php index 8bfaeef6..040f8785 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php ########################################################################## # serendipity - another blogger... # @@ -18,5 +18,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Activar a formata��o do Serendipity no texto das entradas'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Asteriscos � volta duma palavra (*palavra*) marcam-na como negrito, sublinhados s�o feitos com _palavra_.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_s9ymarkup/lang_se.inc.php b/plugins/serendipity_event_s9ymarkup/lang_se.inc.php index 6c5593e1..1eb3eaf8 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_se.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_se.inc.php @@ -10,4 +10,3 @@ @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Applicera grundl�ggande serendipity markup p� inl�ggstext'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Omslutande asterisker markerar text som fetstil (*ord*), understruken text g�rs med hj�lp av _ord_.'); -?> diff --git a/plugins/serendipity_event_s9ymarkup/lang_sk.inc.php b/plugins/serendipity_event_s9ymarkup/lang_sk.inc.php index 80e191cb..8d32e55d 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_sk.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_sk.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php /** * @version $$ @@ -9,3 +9,4 @@ @define('PLUGIN_EVENT_S9YMARKUP_NAME', 'Markup: Serendipity'); @define('PLUGIN_EVENT_S9YMARKUP_DESC', 'Uskuto�nuje z�kladn� transform�cie textu (markup).'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Slov� medzi hviezdi�kami bud� tu�nou (*tu�n�*), pod�iarknutie pomocou underscore _pod�iarknut�_.'); + diff --git a/plugins/serendipity_event_s9ymarkup/lang_tn.inc.php b/plugins/serendipity_event_s9ymarkup/lang_tn.inc.php index ad43a0c7..27bdf71a 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_tn.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,7 +12,7 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_S9YMARKUP_NAME', '標記語言: Serendipity'); - @define('PLUGIN_EVENT_S9YMARKUP_DESC', '套用基本的 serendipity 標記語言到文章內'); - @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '星號圍住的文章會以粗體顯示 (*word*),底線是 _word_。'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_S9YMARKUP_NAME', '標記語言: Serendipity'); +@define('PLUGIN_EVENT_S9YMARKUP_DESC', '套用基本的 serendipity 標記語言到文章內'); +@define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '星號圍住的文章會以粗體顯示 (*word*),底線是 _word_。'); + diff --git a/plugins/serendipity_event_s9ymarkup/lang_zh.inc.php b/plugins/serendipity_event_s9ymarkup/lang_zh.inc.php index 62e6fa57..a2b851f7 100644 --- a/plugins/serendipity_event_s9ymarkup/lang_zh.inc.php +++ b/plugins/serendipity_event_s9ymarkup/lang_zh.inc.php @@ -5,3 +5,4 @@ @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', '用星号围住文章(例如 *word*)会以粗体样式显示,而用下划线围住文章(例如 _word_)会以带下划线的方式显示'); @define('PLUGIN_EVENT_S9YMARKUP_TRANSFORM', 'Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.'); + diff --git a/plugins/serendipity_event_s9ymarkup/serendipity_event_s9ymarkup.php b/plugins/serendipity_event_s9ymarkup/serendipity_event_s9ymarkup.php index 29285fb4..a46aeb86 100644 --- a/plugins/serendipity_event_s9ymarkup/serendipity_event_s9ymarkup.php +++ b/plugins/serendipity_event_s9ymarkup/serendipity_event_s9ymarkup.php @@ -1,5 +1,9 @@ <?php +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + @serendipity_plugin_api::load_language(dirname(__FILE__)); class serendipity_event_s9ymarkup extends serendipity_event @@ -16,12 +20,12 @@ class serendipity_event_s9ymarkup extends serendipity_event $propbag->add('author', 'Serendipity Team'); $propbag->add('version', '1.4'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); $propbag->add('cachable_events', array('frontend_display' => true)); - $propbag->add('event_hooks', array('frontend_display' => true, 'frontend_comment' => true)); + $propbag->add('event_hooks', array('frontend_display' => true, 'frontend_comment' => true)); $propbag->add('groups', array('MARKUP')); $this->markup_elements = array( @@ -50,20 +54,22 @@ class serendipity_event_s9ymarkup extends serendipity_event $propbag->add('configuration', $conf_array); } - function install() { + function install() + { serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function uninstall(&$propbag) { + function uninstall(&$propbag) + { serendipity_plugin_api::hook_event('backend_cache_purge', $this->title); serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } - function introspect_config_item($name, &$propbag) { $propbag->add('type', 'boolean'); @@ -73,16 +79,17 @@ class serendipity_event_s9ymarkup extends serendipity_event return true; } - - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { - switch($event) { - case 'frontend_display': + switch($event) { + + case 'frontend_display': foreach ($this->markup_elements as $temp) { if (serendipity_db_bool($this->get_config($temp['name'], true)) && isset($eventData[$temp['element']]) && !$eventData['properties']['ep_disable_markup_' . $this->instance] && @@ -91,26 +98,26 @@ class serendipity_event_s9ymarkup extends serendipity_event $eventData[$element] = $this->_s9y_markup($eventData[$element]); } } - return true; break; case 'frontend_comment': if (serendipity_db_bool($this->get_config('COMMENT', true))) { echo '<div class="serendipity_commentDirection serendipity_comment_s9ymarkup">' . PLUGIN_EVENT_S9YMARKUP_TRANSFORM . '</div>'; } - return true; break; default: return false; + } + return true; } else { return false; } } - - function _s9y_markup($text) { + function _s9y_markup($text) + { $text = str_replace('\_', chr(1), $text); $text = preg_replace('/#([[:alnum:]]+?)#/','&\1;', $text); $text = preg_replace('/\b\s_([\S ]+?)_\s\b/',' <u>\1</u> ', $text); @@ -130,8 +137,8 @@ class serendipity_event_s9ymarkup extends serendipity_event $text = preg_replace('/([\\\])([*#_|^@%])/', '\2', $text); return $text; - } + } /* vim: set sts=4 ts=4 expandtab : */ diff --git a/plugins/serendipity_event_spamblock/UTF-8/lang_cn.inc.php b/plugins/serendipity_event_spamblock/UTF-8/lang_cn.inc.php index c0977d82..95619285 100644 --- a/plugins/serendipity_event_spamblock/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_event_spamblock/UTF-8/lang_cn.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/UTF-8/lang_da.inc.php b/plugins/serendipity_event_spamblock/UTF-8/lang_da.inc.php index 984d3d84..9851de9e 100644 --- a/plugins/serendipity_event_spamblock/UTF-8/lang_da.inc.php +++ b/plugins/serendipity_event_spamblock/UTF-8/lang_da.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version 1381 diff --git a/plugins/serendipity_event_spamblock/UTF-8/lang_es.inc.php b/plugins/serendipity_event_spamblock/UTF-8/lang_es.inc.php index c0358c01..04f9bf7b 100644 --- a/plugins/serendipity_event_spamblock/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_event_spamblock/UTF-8/lang_es.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_spamblock/UTF-8/lang_fr.inc.php index e6ce6432..5407b0b4 100644 --- a/plugins/serendipity_event_spamblock/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_spamblock/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/UTF-8/lang_is.inc.php b/plugins/serendipity_event_spamblock/UTF-8/lang_is.inc.php index b1a521ae..485fa6c9 100644 --- a/plugins/serendipity_event_spamblock/UTF-8/lang_is.inc.php +++ b/plugins/serendipity_event_spamblock/UTF-8/lang_is.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_spamblock/UTF-8/lang_ja.inc.php index 0f3028e0..7314ff97 100644 --- a/plugins/serendipity_event_spamblock/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_spamblock/UTF-8/lang_ja.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_spamblock/UTF-8/lang_ko.inc.php index 1bd8d17d..b325054b 100644 --- a/plugins/serendipity_event_spamblock/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_spamblock/UTF-8/lang_ko.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/UTF-8/lang_nl.inc.php b/plugins/serendipity_event_spamblock/UTF-8/lang_nl.inc.php index d90d4208..783bc45d 100644 --- a/plugins/serendipity_event_spamblock/UTF-8/lang_nl.inc.php +++ b/plugins/serendipity_event_spamblock/UTF-8/lang_nl.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version 1112 diff --git a/plugins/serendipity_event_spamblock/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_spamblock/UTF-8/lang_pl.inc.php index b03792e4..48b21b8a 100644 --- a/plugins/serendipity_event_spamblock/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_spamblock/UTF-8/lang_pl.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_spamblock/UTF-8/lang_pt_PT.inc.php index 63b9317a..9dcfd497 100644 --- a/plugins/serendipity_event_spamblock/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_spamblock/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -88,4 +88,3 @@ @define('PLUGIN_EVENT_SPAMBLOCK_REMOVE_AUTHOR', 'Desbloquear este autor via plugin Spamblock'); @define('PLUGIN_EVENT_SPAMBLOCK_REMOVE_URL', 'Desbloquear esta URL via plugin Spamblock'); - diff --git a/plugins/serendipity_event_spamblock/UTF-8/lang_sk.inc.php b/plugins/serendipity_event_spamblock/UTF-8/lang_sk.inc.php index 3de61ed9..269e2d68 100644 --- a/plugins/serendipity_event_spamblock/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_event_spamblock/UTF-8/lang_sk.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_spamblock/UTF-8/lang_tn.inc.php index 5246a428..3fc5b350 100644 --- a/plugins/serendipity_event_spamblock/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_spamblock/UTF-8/lang_tn.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_spamblock/UTF-8/lang_zh.inc.php index c0977d82..95619285 100644 --- a/plugins/serendipity_event_spamblock/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_spamblock/UTF-8/lang_zh.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/lang_cn.inc.php b/plugins/serendipity_event_spamblock/lang_cn.inc.php index c0977d82..95619285 100644 --- a/plugins/serendipity_event_spamblock/lang_cn.inc.php +++ b/plugins/serendipity_event_spamblock/lang_cn.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/lang_da.inc.php b/plugins/serendipity_event_spamblock/lang_da.inc.php index a2002e85..c996b0de 100644 --- a/plugins/serendipity_event_spamblock/lang_da.inc.php +++ b/plugins/serendipity_event_spamblock/lang_da.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version 1381 diff --git a/plugins/serendipity_event_spamblock/lang_en.inc.php b/plugins/serendipity_event_spamblock/lang_en.inc.php index db767f89..83b6d3b7 100644 --- a/plugins/serendipity_event_spamblock/lang_en.inc.php +++ b/plugins/serendipity_event_spamblock/lang_en.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/lang_es.inc.php b/plugins/serendipity_event_spamblock/lang_es.inc.php index 4933060a..562f0c41 100644 --- a/plugins/serendipity_event_spamblock/lang_es.inc.php +++ b/plugins/serendipity_event_spamblock/lang_es.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/lang_fa.inc.php b/plugins/serendipity_event_spamblock/lang_fa.inc.php index 297d1d37..e322de26 100644 --- a/plugins/serendipity_event_spamblock/lang_fa.inc.php +++ b/plugins/serendipity_event_spamblock/lang_fa.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -98,3 +98,4 @@ @define('PLUGIN_EVENT_SPAMBLOCK_HIDE', 'غیر فعال کردن ضد اسپم برای نویسندگان'); @define('PLUGIN_EVENT_SPAMBLOCK_HIDE_DESC', 'شما می توانید به نویسندگان اجازه دهید که بدون برنامه ضد اسپم، نظر ارسال کنند.'); + diff --git a/plugins/serendipity_event_spamblock/lang_fr.inc.php b/plugins/serendipity_event_spamblock/lang_fr.inc.php index 2671d03e..21928866 100644 --- a/plugins/serendipity_event_spamblock/lang_fr.inc.php +++ b/plugins/serendipity_event_spamblock/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/lang_is.inc.php b/plugins/serendipity_event_spamblock/lang_is.inc.php index ed0bde1c..c74c1686 100644 --- a/plugins/serendipity_event_spamblock/lang_is.inc.php +++ b/plugins/serendipity_event_spamblock/lang_is.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/lang_ja.inc.php b/plugins/serendipity_event_spamblock/lang_ja.inc.php index 0f3028e0..7314ff97 100644 --- a/plugins/serendipity_event_spamblock/lang_ja.inc.php +++ b/plugins/serendipity_event_spamblock/lang_ja.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/lang_ko.inc.php b/plugins/serendipity_event_spamblock/lang_ko.inc.php index 1bd8d17d..b325054b 100644 --- a/plugins/serendipity_event_spamblock/lang_ko.inc.php +++ b/plugins/serendipity_event_spamblock/lang_ko.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/lang_nl.inc.php b/plugins/serendipity_event_spamblock/lang_nl.inc.php index d90d4208..783bc45d 100644 --- a/plugins/serendipity_event_spamblock/lang_nl.inc.php +++ b/plugins/serendipity_event_spamblock/lang_nl.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version 1112 diff --git a/plugins/serendipity_event_spamblock/lang_pl.inc.php b/plugins/serendipity_event_spamblock/lang_pl.inc.php index 1988ec42..fcf51805 100644 --- a/plugins/serendipity_event_spamblock/lang_pl.inc.php +++ b/plugins/serendipity_event_spamblock/lang_pl.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/lang_pt_PT.inc.php b/plugins/serendipity_event_spamblock/lang_pt_PT.inc.php index 190bc736..4e53f00d 100644 --- a/plugins/serendipity_event_spamblock/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_spamblock/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version @@ -88,4 +88,3 @@ @define('PLUGIN_EVENT_SPAMBLOCK_REMOVE_AUTHOR', 'Desbloquear este autor via plugin Spamblock'); @define('PLUGIN_EVENT_SPAMBLOCK_REMOVE_URL', 'Desbloquear esta URL via plugin Spamblock'); - diff --git a/plugins/serendipity_event_spamblock/lang_sk.inc.php b/plugins/serendipity_event_spamblock/lang_sk.inc.php index 21daa664..eaafb748 100644 --- a/plugins/serendipity_event_spamblock/lang_sk.inc.php +++ b/plugins/serendipity_event_spamblock/lang_sk.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/lang_tn.inc.php b/plugins/serendipity_event_spamblock/lang_tn.inc.php index 5246a428..3fc5b350 100644 --- a/plugins/serendipity_event_spamblock/lang_tn.inc.php +++ b/plugins/serendipity_event_spamblock/lang_tn.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/lang_zh.inc.php b/plugins/serendipity_event_spamblock/lang_zh.inc.php index c0977d82..95619285 100644 --- a/plugins/serendipity_event_spamblock/lang_zh.inc.php +++ b/plugins/serendipity_event_spamblock/lang_zh.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php b/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php index 4a346e86..9879106f 100644 --- a/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php +++ b/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php @@ -1,10 +1,14 @@ -<?php # +<?php + +if (IN_serendipity !== true) { + die ("Don't hack!"); +} @serendipity_plugin_api::load_language(dirname(__FILE__)); class serendipity_event_spamblock extends serendipity_event { -var $filter_defaults; + var $filter_defaults; function introspect(&$propbag) { @@ -17,11 +21,11 @@ var $filter_defaults; $propbag->add('stackable', false); $propbag->add('author', 'Garvin Hicking, Sebastian Nohn, Grischa Brockhaus, Ian'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); - $propbag->add('version', '1.84'); + $propbag->add('version', '1.86.3'); $propbag->add('event_hooks', array( 'frontend_saveComment' => true, 'external_plugin' => true, @@ -100,6 +104,7 @@ var $filter_defaults; global $serendipity; switch($name) { + case 'disable_api_comments': $propbag->add('type', 'radio'); $propbag->add('name', PLUGIN_EVENT_SPAMBLOCK_API_COMMENTS); @@ -110,7 +115,6 @@ var $filter_defaults; 'desc' => array(PLUGIN_EVENT_SPAMBLOCK_API_MODERATE, PLUGIN_EVENT_SPAMBLOCK_API_REJECT, NONE) )); $propbag->add('radio_per_row', '1'); - break; case 'trackback_ipvalidation': @@ -241,7 +245,6 @@ var $filter_defaults; 'desc' => array(PLUGIN_EVENT_SPAMBLOCK_API_MODERATE, PLUGIN_EVENT_SPAMBLOCK_API_REJECT, NONE) )); $propbag->add('radio_per_row', '1'); - break; case 'akismet': @@ -249,7 +252,6 @@ var $filter_defaults; $propbag->add('name', PLUGIN_EVENT_SPAMBLOCK_AKISMET); $propbag->add('description', PLUGIN_EVENT_SPAMBLOCK_AKISMET_DESC); $propbag->add('default', ''); - break; case 'akismet_server': @@ -269,7 +271,6 @@ var $filter_defaults; ) )); $propbag->add('radio_per_row', '1'); - break; case 'akismet_filter': @@ -282,7 +283,6 @@ var $filter_defaults; 'desc' => array(PLUGIN_EVENT_SPAMBLOCK_API_MODERATE, PLUGIN_EVENT_SPAMBLOCK_API_REJECT, NONE) )); $propbag->add('radio_per_row', '1'); - break; case 'contentfilter_urls': @@ -334,7 +334,6 @@ var $filter_defaults; 'desc' => array(PLUGIN_EVENT_SPAMBLOCK_LOGTYPE_FILE, PLUGIN_EVENT_SPAMBLOCK_LOGTYPE_DB, PLUGIN_EVENT_SPAMBLOCK_LOGTYPE_NONE) )); $propbag->add('radio_per_row', '1'); - break; case 'ipflood': @@ -412,17 +411,18 @@ var $filter_defaults; break; default: - return false; + return false; } - return true; } - function get_default_exclude_urls() { + function get_default_exclude_urls() + { return '^http://identi\.ca/notice/\d+$'; } - function htaccess_update($new_ip) { + function htaccess_update($new_ip) + { global $serendipity; serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}spamblock_htaccess (ip, timestamp) VALUES ('" . serendipity_db_escape_string($new_ip) . "', '" . time() . "')"); @@ -473,17 +473,19 @@ var $filter_defaults; return false; } - function akismetRequest($api_key, $data, &$ret, $action = 'comment-check', $eventData = null, $addData = null) { + function akismetRequest($api_key, $data, &$ret, $action = 'comment-check', $eventData = null, $addData = null) + { global $serendipity; $opt = array( - 'method' => 'POST', - 'http' => '1.1', 'timeout' => 20, - 'allowRedirects' => true, - 'maxRedirects' => 3, - 'readTimeout' => array(5,0), + 'follow_redirects' => true, + 'max_redirects' => 3, ); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } // Default server type to akismet, in case user has an older version of the plugin // where no server was set @@ -520,22 +522,26 @@ var $filter_defaults; // DEBUG //$this->log($this->logfile, $eventData['id'], 'AKISMET_SERVER', 'Using Akismet server at ' . $server, $addData); } - $req = new HTTP_Request( - 'http://' . $server . '/1.1/verify-key', - $opt + $req = new HTTP_Request2( + 'http://' . $server . '/1.1/verify-key', + HTTP_Request2::METHOD_POST, + $opt ); - $req->addPostData('key', $api_key); - $req->addPostData('blog', $serendipity['baseURL']); + $req->addPostParameter('key', $api_key); + $req->addPostParameter('blog', $serendipity['baseURL']); - if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') { + try { + $response = $req->send(); + if ($response->getStatus() != '200') { + throw new HTTP_Request2_Exception('Statuscode not 200, Akismet HTTP verification request failed.'); + } + $reqdata = $response->getBody(); + } catch (HTTP_Request2_Exception $e) { $ret['is_spam'] = false; $ret['message'] = 'API Verification Request failed'; $this->log($this->logfile, $eventData['id'], 'API_ERROR', 'Akismet HTTP verification request failed.', $addData); return; - } else { - // Fetch response - $reqdata = $req->getResponseBody(); } if (!preg_match('@valid@i', $reqdata)) { @@ -545,23 +551,27 @@ var $filter_defaults; return; } - $req = new HTTP_Request( + $req = new HTTP_Request2( 'http://' . $api_key . '.' . $server . '/1.1/' . $action, + HTTP_Request2::METHOD_POST, $opt ); foreach($data AS $key => $value) { - $req->addPostData($key, $value); + $req->addPostParameter($key, $value); } - if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') { + try { + $response = $req->send(); + if ($response->getStatus() != '200') { + throw new HTTP_Request2_Exception('Statuscode not 200, Akismet HTTP request failed.'); + } + $reqdata = $response->getBody(); + } catch (HTTP_Request2_Exception $e) { $ret['is_spam'] = false; $ret['message'] = 'Akismet Request failed'; $this->log($this->logfile, $eventData['id'], 'API_ERROR', 'Akismet HTTP request failed.', $addData); return; - } else { - // Fetch response - $reqdata = $req->getResponseBody(); } if ($action == 'comment-check' && preg_match('@true@i', $reqdata)) { @@ -585,8 +595,8 @@ var $filter_defaults; } } - - function tellAboutComment($where, $api_key, $comment_id, $is_spam) { + function tellAboutComment($where, $api_key, $comment_id, $is_spam) + { global $serendipity; $comment = serendipity_db_query(" SELECT C.*, L.useragent as log_useragent, E.title as entry_title " . " FROM {$serendipity['dbPrefix']}comments C, {$serendipity['dbPrefix']}spamblocklog L , {$serendipity['dbPrefix']}entries E " @@ -595,7 +605,7 @@ var $filter_defaults; . " AND C.ip=L.ip AND C.body=L.body", true, 'assoc'); if (!is_array($comment)) return; - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; if (function_exists('serendipity_request_start')) serendipity_request_start(); switch($where) { @@ -624,11 +634,12 @@ var $filter_defaults; if (function_exists('serendipity_request_end')) serendipity_request_end(); } - function &getBlacklist($where, $api_key, &$eventData, &$addData) { + function &getBlacklist($where, $api_key, &$eventData, &$addData) + { global $serendipity; $ret = false; - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; if (function_exists('serendipity_request_start')) serendipity_request_start(); // this switch statement is a leftover from blogg.de support (i.e. there were more options than just one). Leaving it in place in case we get more options again in the future. @@ -661,7 +672,8 @@ var $filter_defaults; return $ret; } - function checkScheme() { + function checkScheme() + { global $serendipity; $dbversion = $this->get_config('dbversion', '1'); @@ -722,13 +734,15 @@ var $filter_defaults; return true; } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } // This method will be called on "fatal" spam errors that are unlikely to occur accidentally by users. // Their IPs will be constantly blocked. - function IsHardcoreSpammer() { + function IsHardcoreSpammer() + { global $serendipity; if (serendipity_db_bool($this->get_config('automagic_htaccess'))) { @@ -737,7 +751,8 @@ var $filter_defaults; } // Checks whether the current author is contained in one of the gorups that need no spam checking - function inGroup() { + function inGroup() + { global $serendipity; $checkgroups = explode('^', $this->get_config('hide_for_authors')); @@ -762,11 +777,13 @@ var $filter_defaults; return false; } - function example() { + function example() + { return '<p id="captchabox" class="msg_hint">' . PLUGIN_EVENT_SPAMBLOCK_LOOK . $this->show_captcha() . '</p>'; } - function show_captcha($use_gd = false) { + function show_captcha($use_gd = false) + { global $serendipity; if ($use_gd || (function_exists('imagettftext') && function_exists('imagejpeg'))) { @@ -798,19 +815,21 @@ var $filter_defaults; } } - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; $debug = true; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { + $captchas_ttl = $this->get_config('captchas_ttl', 7); $_captchas = $this->get_config('captchas', 'yes'); $captchas = ($_captchas !== 'no' && ($_captchas === 'yes' || $_captchas === 'scramble' || serendipity_db_bool($_captchas))); - // Check if the entry is older than the allowed amount of time. Enforce kaptchas if that is true - // of if kaptchas are activated for every entry + // Check if the entry is older than the allowed amount of time. Enforce Captchas if that is true + // of if Captchas are activated for every entry $show_captcha = ($captchas && isset($eventData['timestamp']) && ($captchas_ttl < 1 || ($eventData['timestamp'] < (time() - ($captchas_ttl*60*60*24)))) ? true : false); // Plugins can override with custom captchas @@ -836,8 +855,9 @@ var $filter_defaults; } switch($event) { + case 'fetchcomments': - if (is_array($eventData) && !$_SESSION['serendipityAuthedUser'] && serendipity_db_bool($this->get_config('hide_email', false))) { + if (is_array($eventData) && !$_SESSION['serendipityAuthedUser'] && serendipity_db_bool($this->get_config('hide_email', 'false'))) { // Will force emails to be not displayed in comments and RSS feed for comments. Will not apply to logged in admins (so not in the backend as well) @reset($eventData); while(list($idx, $comment) = each($eventData)) { @@ -862,7 +882,7 @@ var $filter_defaults; $checkmail = $this->get_config('checkmail'); // Check CSRF [comments only, cannot be applied to trackbacks] - if ($addData['type'] == 'NORMAL' && serendipity_db_bool($this->get_config('csrf', true))) { + if ($addData['type'] == 'NORMAL' && serendipity_db_bool($this->get_config('csrf', 'true'))) { if (!serendipity_checkFormToken(false)) { $this->log($logfile, $eventData['id'], 'REJECTED', PLUGIN_EVENT_SPAMBLOCK_CSRF_REASON, $addData); $eventData = array('allow_comments' => false); @@ -912,7 +932,7 @@ var $filter_defaults; // already there #$eventData = array('allow_comments' => false); // already there #$serendipity['messagestack']['emails'][] = PLUGIN_EVENT_SPAMBLOCK_ERROR_BODY; return false; - } elseif (serendipity_db_bool($this->get_config('killswitch', false)) === true) { + } elseif (serendipity_db_bool($this->get_config('killswitch', 'false')) === true) { $this->log($logfile, $eventData['id'], 'REJECTED', PLUGIN_EVENT_SPAMBLOCK_REASON_KILLSWITCH, $addData); $eventData = array('allow_comments' => false); $serendipity['messagestack']['comments'][] = PLUGIN_EVENT_SPAMBLOCK_ERROR_KILLSWITCH; @@ -940,7 +960,7 @@ var $filter_defaults; } // Check for global emergency moderation - if (serendipity_db_bool($this->get_config('killswitch', false)) === true) { + if (serendipity_db_bool($this->get_config('killswitch', 'false')) === true) { $this->log($logfile, $eventData['id'], 'REJECTED', PLUGIN_EVENT_SPAMBLOCK_REASON_KILLSWITCH, $addData); $eventData = array('allow_comments' => false); $serendipity['messagestack']['comments'][] = PLUGIN_EVENT_SPAMBLOCK_ERROR_KILLSWITCH; @@ -1035,15 +1055,22 @@ var $filter_defaults; // Check Trackback URLs? if (($addData['type'] == 'TRACKBACK' || $addData['type'] == 'PINGBACK') && serendipity_db_bool($this->get_config('trackback_check_url'))) { - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; if (function_exists('serendipity_request_start')) serendipity_request_start(); - $req = new HTTP_Request($addData['url'], array('allowRedirects' => true, 'maxRedirects' => 5, 'readTimeout' => array(5,0))); + $options = array('follow_redirects' => true, 'max_redirects' => 5, 'timeout' => 10); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the funcitonality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($addData['url'], HTTP_Request2::METHOD_GET, $options); $is_valid = false; - if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') { - $is_valid = false; - } else { - $fdata = $req->getResponseBody(); + try { + $response = $req->send(); + if ($response->getStatus() != '200') { + throw new HTTP_Request2_Exception('could not get origin url: status != 200'); + } + $fdata = $response->getBody(); // Check if the target page contains a link to our blog if (preg_match('@' . preg_quote($serendipity['baseURL'], '@') . '@i', $fdata)) { @@ -1051,7 +1078,10 @@ var $filter_defaults; } else { $is_valid = false; } + } catch (HTTP_Request2_Exception $e) { + $is_valid = false; } + if (function_exists('serendipity_request_end')) serendipity_request_end(); if ($is_valid === false) { @@ -1162,7 +1192,7 @@ var $filter_defaults; } // Check invalid email - if ($addData['type'] == 'NORMAL' && serendipity_db_bool($this->get_config('checkmail', false))) { + if ($addData['type'] == 'NORMAL' && serendipity_db_bool($this->get_config('checkmail', 'false'))) { if (!empty($addData['email']) && strstr($addData['email'], '@') === false) { $this->log($logfile, $eventData['id'], 'REJECTED', PLUGIN_EVENT_SPAMBLOCK_REASON_CHECKMAIL, $addData); $eventData = array('allow_comments' => false); @@ -1175,12 +1205,10 @@ var $filter_defaults; return false; } } - - return true; break; case 'frontend_comment': - if (serendipity_db_bool($this->get_config('hide_email', false))) { + if (serendipity_db_bool($this->get_config('hide_email', 'false'))) { echo '<div class="serendipity_commentDirection serendipity_comment_spamblock">' . PLUGIN_EVENT_SPAMBLOCK_HIDE_EMAIL_NOTICE . '</div>'; } @@ -1188,7 +1216,7 @@ var $filter_defaults; echo '<div class="serendipity_commentDirection serendipity_comment_spamblock">' . PLUGIN_EVENT_SPAMBLOCK_CHECKMAIL_VERIFICATION_INFO . '</div>'; } - if (serendipity_db_bool($this->get_config('csrf', true))) { + if (serendipity_db_bool($this->get_config('csrf', 'true'))) { echo serendipity_setFormToken('form'); } @@ -1209,11 +1237,8 @@ var $filter_defaults; } echo '</div>'; } - - return true; break; - case 'external_plugin': $parts = explode('_', (string)$eventData); if (!empty($parts[1])) { @@ -1303,7 +1328,6 @@ var $filter_defaults; echo file_get_contents($cap); } } - return true; break; case 'backend_comments_top': @@ -1346,8 +1370,7 @@ var $filter_defaults; $this->set_config('contentfilter_emails', implode(';', $items)); } - echo '<a class="button_link" title="' . PLUGIN_EVENT_SPAMBLOCK_CONFIG . '" href="serendipity_admin.php?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]=' . $this->instance . '"><span class="icon-medkit"></span><span class="visuallyhidden"> ' . PLUGIN_EVENT_SPAMBLOCK_CONFIG . '</span></a>'; - return true; + echo '<a class="button_link" title="' . PLUGIN_EVENT_SPAMBLOCK_CONFIG . '" href="serendipity_admin.php?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]=' . $this->instance . '"><span class="icon-medkit" aria-hidden="true"></span><span class="visuallyhidden"> ' . PLUGIN_EVENT_SPAMBLOCK_CONFIG . '</span></a>'; break; case 'backend_view_comment': @@ -1359,35 +1382,31 @@ var $filter_defaults; $akismet_apikey = $this->get_config('akismet'); $akismet = $this->get_config('akismet_filter'); if (!empty($akismet_apikey)) { - $eventData['action_more'] .= ' <a class="button_link actions_extra" title="' . PLUGIN_EVENT_SPAMBLOCK_SPAM . '" href="serendipity_admin.php?serendipity[adminModule]=comments&serendipity[spamIsSpam]=' . $eventData['id'] . $addData . '#' . $clink . '"><span class="icon-block"></span><span class="visuallyhidden"> ' . PLUGIN_EVENT_SPAMBLOCK_SPAM . '</span></a>'; - $eventData['action_more'] .= ' <a class="button_link actions_extra" title="' . PLUGIN_EVENT_SPAMBLOCK_NOT_SPAM . '" href="serendipity_admin.php?serendipity[adminModule]=comments&serendipity[spamNotSpam]=' . $eventData['id'] . $addData . '#' . $clink . '"><span class="icon-ok-circled"></span><span class="visuallyhidden"> ' . PLUGIN_EVENT_SPAMBLOCK_NOT_SPAM . '</span></a>'; + $eventData['action_more'] .= ' <a class="button_link actions_extra" title="' . PLUGIN_EVENT_SPAMBLOCK_SPAM . '" href="serendipity_admin.php?serendipity[adminModule]=comments&serendipity[spamIsSpam]=' . $eventData['id'] . $addData . '#' . $clink . '"><span class="icon-block" aria-hidden="true"></span><span class="visuallyhidden"> ' . PLUGIN_EVENT_SPAMBLOCK_SPAM . '</span></a>'; + $eventData['action_more'] .= ' <a class="button_link actions_extra" title="' . PLUGIN_EVENT_SPAMBLOCK_NOT_SPAM . '" href="serendipity_admin.php?serendipity[adminModule]=comments&serendipity[spamNotSpam]=' . $eventData['id'] . $addData . '#' . $clink . '"><span class="icon-ok-circled" aria-hidden="true"></span><span class="visuallyhidden"> ' . PLUGIN_EVENT_SPAMBLOCK_NOT_SPAM . '</span></a>'; } - $eventData['action_author'] .= ' <a class="button_link" title="' . ($author_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_AUTHOR : PLUGIN_EVENT_SPAMBLOCK_ADD_AUTHOR) . '" href="serendipity_admin.php?serendipity[adminModule]=comments&serendipity[spamBlockAuthor]=' . $eventData['id'] . $addData . $randomString . '#' . $clink . '"><span class="icon-' . ($author_is_filtered ? 'ok-circled' : 'block') .'"></span><span class="visuallyhidden"> ' . ($author_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_AUTHOR : PLUGIN_EVENT_SPAMBLOCK_ADD_AUTHOR) . '</span></a>'; + $eventData['action_author'] .= ' <a class="button_link" title="' . ($author_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_AUTHOR : PLUGIN_EVENT_SPAMBLOCK_ADD_AUTHOR) . '" href="serendipity_admin.php?serendipity[adminModule]=comments&serendipity[spamBlockAuthor]=' . $eventData['id'] . $addData . $randomString . '#' . $clink . '"><span class="icon-' . ($author_is_filtered ? 'ok-circled' : 'block') .'" aria-hidden="true"></span><span class="visuallyhidden"> ' . ($author_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_AUTHOR : PLUGIN_EVENT_SPAMBLOCK_ADD_AUTHOR) . '</span></a>'; if (!empty($eventData['url'])) { $url_is_filtered = $this->checkFilter('urls', $eventData['url']); - $eventData['action_url'] .= ' <a class="button_link" title="' . ($url_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_URL : PLUGIN_EVENT_SPAMBLOCK_ADD_URL) . '" href="serendipity_admin.php?serendipity[adminModule]=comments&serendipity[spamBlockURL]=' . $eventData['id'] . $addData . $randomString . '#' . $clink . '"><span class="icon-' . ($url_is_filtered ? 'ok-circled' : 'block') .'"></span><span class="visuallyhidden"> ' . ($url_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_URL : PLUGIN_EVENT_SPAMBLOCK_ADD_URL) . '</span></a>'; + $eventData['action_url'] .= ' <a class="button_link" title="' . ($url_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_URL : PLUGIN_EVENT_SPAMBLOCK_ADD_URL) . '" href="serendipity_admin.php?serendipity[adminModule]=comments&serendipity[spamBlockURL]=' . $eventData['id'] . $addData . $randomString . '#' . $clink . '"><span class="icon-' . ($url_is_filtered ? 'ok-circled' : 'block') .'" aria-hidden="true"></span><span class="visuallyhidden"> ' . ($url_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_URL : PLUGIN_EVENT_SPAMBLOCK_ADD_URL) . '</span></a>'; } if (!empty($eventData['email'])) { $email_is_filtered = $this->checkFilter('emails', $eventData['email']); - $eventData['action_email'] .= ' <a class="button_link" title="' . ($email_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_EMAIL : PLUGIN_EVENT_SPAMBLOCK_ADD_EMAIL) . '" href="serendipity_admin.php?serendipity[adminModule]=comments&serendipity[spamBlockEmail]=' . $eventData['id'] . $addData . $randomString . '#' . $clink . '"><span class="icon-' . ($email_is_filtered ? 'ok-circled' : 'block') .'"></span><span class="visuallyhidden"> ' . ($email_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_EMAIL : PLUGIN_EVENT_SPAMBLOCK_ADD_EMAIL) . '</span></a>'; + $eventData['action_email'] .= ' <a class="button_link" title="' . ($email_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_EMAIL : PLUGIN_EVENT_SPAMBLOCK_ADD_EMAIL) . '" href="serendipity_admin.php?serendipity[adminModule]=comments&serendipity[spamBlockEmail]=' . $eventData['id'] . $addData . $randomString . '#' . $clink . '"><span class="icon-' . ($email_is_filtered ? 'ok-circled' : 'block') .'" aria-hidden="true"></span><span class="visuallyhidden"> ' . ($email_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_EMAIL : PLUGIN_EVENT_SPAMBLOCK_ADD_EMAIL) . '</span></a>'; } - - return true; break; case 'backend_sidebar_admin_appearance': echo '<li><a href="serendipity_admin.php?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]=' . $this->instance . '">' . PLUGIN_EVENT_SPAMBLOCK_TITLE . '</a></li>'; - return true; break; - default: return false; - break; } + return true; } else { return false; } @@ -1396,7 +1415,8 @@ var $filter_defaults; /** * wordfilter, email and additional link check moved to this function, to allow comment user to opt-in (verify_once), but reject all truly spam comments before. **/ - function wordfilter($logfile, &$eventData, $wordmatch, $addData, $ftc = false) { + function wordfilter($logfile, &$eventData, $wordmatch, $addData, $ftc = false) + { global $serendipity; // Check for word filtering @@ -1517,7 +1537,8 @@ var $filter_defaults; } // function wordfilter end - function &checkFilter($what, $match, $getItems = false) { + function &checkFilter($what, $match, $getItems = false) + { $items = explode(';', $this->get_config('contentfilter_' . $what, $this->filter_defaults[$what])); $filtered = false; @@ -1550,7 +1571,8 @@ var $filter_defaults; return $filtered; } - function getComment($key, $id) { + function getComment($key, $id) + { global $serendipity; $c = serendipity_db_query("SELECT $key FROM {$serendipity['dbPrefix']}comments WHERE id = '" . (int)$id . "'", true, 'assoc'); @@ -1561,7 +1583,8 @@ var $filter_defaults; return $c[$key]; } - function random_string($max_char, $min_char) { + function random_string($max_char, $min_char) + { $this->chars = array(2, 3, 4, 7, 9); // 1, 5, 6 and 8 may look like characters. $this->chars = array_merge($this->chars, array('A','B','C','D','E','F','H','J','K','L','M','N','P','Q','R','T','U','V','W','X','Y','Z')); // I, O, S may look like numbers @@ -1575,7 +1598,8 @@ var $filter_defaults; return $strings; } - function log($logfile, $id, $switch, $reason, $comment) { + function log($logfile, $id, $switch, $reason, $comment) + { global $serendipity; $method = $this->get_config('logtype'); @@ -1638,6 +1662,8 @@ var $filter_defaults; break; } } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_event_spartacus/ChangeLog b/plugins/serendipity_event_spartacus/ChangeLog new file mode 100644 index 00000000..0703bbe9 --- /dev/null +++ b/plugins/serendipity_event_spartacus/ChangeLog @@ -0,0 +1,4 @@ +2.37.3: +------- + * Change mirror order (new default: github) + diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_cn.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_cn.inc.php index b6c6d7c6..6b5aa7fb 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_cn.inc.php @@ -10,10 +10,10 @@ @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', '成功获取相关数据'); @define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '<br />(插件库返回如下错误代码 %s 。)<br />'); @define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<p>无法从SPARTACUS插件库中获取到数据。正在在 %s 上面检查插件库状态信息。</p>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<P>SPARTACUS插件库运行状态网站返回了一个错误代码 (HTTP代码 %s)。这意味着SPARTACUS插件库运行状态网站目前处于瘫痪状态。请稍后重新尝试。</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<p>SPARTACUS插件库运行状态网站返回了一个错误代码 (HTTP代码 %s)。这意味着SPARTACUS插件库运行状态网站目前处于瘫痪状态。请稍后重新尝试。</p>'); @define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<p><a target="_blank" href="%s">点击此处访问SPARTACUS插件库运行状态网站</a>, 并确认该网站是否在正常运行中。</p>'); @define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<p>SPARTACUS尝试连接到Google,但是失败了(错误 %d: %s)。<br />你的服务器禁止外出连接(outgoing connections)。无法连接到SPARTACUS插件库,因此SPARTACUS无法正常工作以下载、更新插件。<b>请联系你的网站空间服务商,要求他们允许通过使用外出连接连接到其他网站。</b></p><p>你依然可以从本地目录安装插件。只要从<a href="http://spartacus.s9y.org">SPARTACUS网上插件库</a>下载相关插件,将它解压缩并上传到你的Serendipity的插件目录中</p>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<P>SPARTACUS可以连接到Google,但无法连接到SPARTACUS插件库。这可能是因为你的服务器禁止某些外出连接(outgoing connections),或者SPARTACUS插件库运行状态网站目前处于瘫痪状态。请联系你的网站空间服务商,以确认此类外出连接是允许的。<b>你无法使用SPARTACUS来下载、更新插件,除非你的网站服务器能够连上SPARTACUS插件库。</b></p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<p>SPARTACUS可以连接到Google,但无法连接到SPARTACUS插件库。这可能是因为你的服务器禁止某些外出连接(outgoing connections),或者SPARTACUS插件库运行状态网站目前处于瘫痪状态。请联系你的网站空间服务商,以确认此类外出连接是允许的。<b>你无法使用SPARTACUS来下载、更新插件,除非你的网站服务器能够连上SPARTACUS插件库。</b></p>'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '文件/镜像 地址 (XML元数据(metadata))'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '文件/镜像 地址 (文件)'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '选择一个下载点。不要修改这个设置,除非你知道你正在做什么,或者你目前使用的下载点已经失效了。这个设置存在的主要目的是为了向前兼容。'); @@ -33,4 +33,5 @@ @define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', '无法从Spartacus插件库下载所需文件,但是该插件库的运行状态显示该插件库运行正常。这意味着你的网站空间服务商使用了基于访问内容的防火墙,通过mod_security或其他反向代理(reverse proxy)来禁止从网络上下载或获取PHP代码。你需要请你的空间服务商关闭它;否则的话,你无法使用Spartacus插件,从而不得不手动下载相关文件。'); @define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', '使用Spartacus来下载插件?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', '使用Spartacus来下载主题?'); \ No newline at end of file +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', '使用Spartacus来下载主题?'); + diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_cs.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_cs.inc.php index 4bad8ac3..09a7da8f 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # lang_cs.inc.php 2.2 2009-02-23 17:31:42 VladaAjgl $ +<?php /** * @version 2.2 @@ -11,58 +11,59 @@ * @revisionDate 2009/02/23 */ -@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus'); -@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - Umožňuje stáhnout a instalovat rozšiřující moduly (pluginy) z internetu'); -@define('PLUGIN_EVENT_SPARTACUS_FETCH', 'Klikněte zde pro stáhnutí nových %s z internetové online databáze - Serendipity Online Repository'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'URL %s nelze otevřít. Server Serendipity nebo SourceForge.net možná neběží - omlouváme se, zkuste to později.'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'Pokus o otevření URL %s...'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'Přijato %s bytů z výše uvedené URL. Ukládání souboru jako %s...'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'Přijato %s bytů z již existujícího souboru na Vašem serveru. Ukládání souboru jako %s...'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Data úspěšně stažena.'); -@define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '<br />(On-line úložiště vrátilo chybu %s.)<br />'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<P>Nebylo možno získat data z on-line úložiště modulu Spartacus. Zkouška dostupnosti úložiště na adrese %s.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<P>Diagnstická stránka modulu Spartacus vrátilo chybu (HTTP kód %s). To může znamenat, že je dignostická stránka mimo provoz. Zkuste to prosím později.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<P><a target="_blank" href="%s">Klikněte zde pro zobrazení diagnstické stránky modulu Spartacus</a> a zjistěte, zda odpovídá.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<P>SPARTACUS se pokusil připojit ke Googlu, ale neúspěšně (chyba č.%d: %s).<br/>Váš server blokuje odchozí spojení. SPARTACUS nebude fungovat, protože se nemůže připojit do svého online úložiště. <b>Kontaktujte prosím svého poskytovatele webhostingu a požádejte ho o povolení odchozích připojení k jiným webovým stránkám.</b></P><P>Zásuvné moduly lze instalovat z lokálních adresářů. Jednoduše stáhněte nejnovější verzi pluginu z <a href="http://spartacus.s9y.org">SPARTACUS online úložiště</a>, rozbalte ho a například pomocí FTP nahrajte do adresáře /plugins/ ve Vaší instalaci Serendipity.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<P>Modulu SPARTACUS se podařilo spojit s Googlem, ale nemůže se spojit s on-line úložištěm modulu SPARTACUS. Je možné, že Váš server blokuje některá odchozí spojení, nebo je on-line úložiště mimo provoz. Spojte se se svým poskytovatelem webového serveru, abyste se ujistili, že nemáte blokována odchozí spojení. <b>SPARTACUS nebude fungovat, protože nemůže kontaktovat on-line úložiště.</b></P>'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'Umístění souborů/(mirror server) (XML metadata)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'Umístění souborů/(mirror server) (soubory)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Vyberte, odkud stahovat. NEMĚŇTE tuto hodnotu, pokud opravdu dobře nevíte, co děláte a jestli server orpavdu funguje. Tato volba je přístupná pro teprve plánované funkce.'); -@define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'Vlastník stahovaných souborů'); -@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Zde můžete zadat (FTP/Shell) vlastníka souborů (jako např. "nobody") stažených pomocí Spartacus pluginu. Pokud je nevyplněné, nejsou prováděny žádné změny vlastníka.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'Přístupová práva stažených souborů.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', 'Zde můžete zadat hodnotu přístupových práv v osmičkové soustavě (jako "0777") pro soubory (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne všechny webové servery umožňují změnu práv. Např. servery ěžící v safe_mode módu. Mějte na paměti, že práva musí umožnit webovému uživateli, pod kterým běží PHP, práva čtení a zápisu souboru. Jinak nebude modul Spartacus schopen přepsat staré soubory.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Přístupová práva stažených adresářů'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Zde můžete zadat hodnotu přístupových práv v osmičkové soustavě (jako "0777") pro adresáře (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne všechny webové servery umožňují změnu práv. Např. servery ěžící v safe_mode módu. Mějte na paměti, že práva musí umožnit webovému uživateli, pod kterým běží PHP, práva čtení a zápisu souboru. Jinak nebude modul Spartacus schopen vytvořit nové adresáře.'); +@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus'); +@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - Umožňuje stáhnout a instalovat rozšiřující moduly (pluginy) z internetu'); +@define('PLUGIN_EVENT_SPARTACUS_FETCH', 'Klikněte zde pro stáhnutí nových %s z internetové online databáze - Serendipity Online Repository'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'URL %s nelze otevřít. Server Serendipity nebo SourceForge.net možná neběží - omlouváme se, zkuste to později.'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'Pokus o otevření URL %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'Přijato %s bytů z výše uvedené URL. Ukládání souboru jako %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'Přijato %s bytů z již existujícího souboru na Vašem serveru. Ukládání souboru jako %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Data úspěšně stažena.'); +@define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '<br />(On-line úložiště vrátilo chybu %s.)<br />'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<p>Nebylo možno získat data z on-line úložiště modulu Spartacus. Zkouška dostupnosti úložiště na adrese %s.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<p>Diagnstická stránka modulu Spartacus vrátilo chybu (HTTP kód %s). To může znamenat, že je dignostická stránka mimo provoz. Zkuste to prosím později.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<p><a target="_blank" href="%s">Klikněte zde pro zobrazení diagnstické stránky modulu Spartacus</a> a zjistěte, zda odpovídá.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<p>SPARTACUS se pokusil připojit ke Googlu, ale neúspěšně (chyba č.%d: %s).<br/>Váš server blokuje odchozí spojení. SPARTACUS nebude fungovat, protože se nemůže připojit do svého online úložiště. <b>Kontaktujte prosím svého poskytovatele webhostingu a požádejte ho o povolení odchozích připojení k jiným webovým stránkám.</b></p><p>Zásuvné moduly lze instalovat z lokálních adresářů. Jednoduše stáhněte nejnovější verzi pluginu z <a href="http://spartacus.s9y.org">SPARTACUS online úložiště</a>, rozbalte ho a například pomocí FTP nahrajte do adresáře /plugins/ ve Vaší instalaci Serendipity.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<p>Modulu SPARTACUS se podařilo spojit s Googlem, ale nemůže se spojit s on-line úložištěm modulu SPARTACUS. Je možné, že Váš server blokuje některá odchozí spojení, nebo je on-line úložiště mimo provoz. Spojte se se svým poskytovatelem webového serveru, abyste se ujistili, že nemáte blokována odchozí spojení. <b>SPARTACUS nebude fungovat, protože nemůže kontaktovat on-line úložiště.</b></p>'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'Umístění souborů/(mirror server) (XML metadata)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'Umístění souborů/(mirror server) (soubory)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Vyberte, odkud stahovat. NEMĚŇTE tuto hodnotu, pokud opravdu dobře nevíte, co děláte a jestli server orpavdu funguje. Tato volba je přístupná pro teprve plánované funkce.'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'Vlastník stahovaných souborů'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Zde můžete zadat (FTP/Shell) vlastníka souborů (jako např. "nobody") stažených pomocí Spartacus pluginu. Pokud je nevyplněné, nejsou prováděny žádné změny vlastníka.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'Přístupová práva stažených souborů.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', 'Zde můžete zadat hodnotu přístupových práv v osmičkové soustavě (jako "0777") pro soubory (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne všechny webové servery umožňují změnu práv. Např. servery ěžící v safe_mode módu. Mějte na paměti, že práva musí umožnit webovému uživateli, pod kterým běží PHP, práva čtení a zápisu souboru. Jinak nebude modul Spartacus schopen přepsat staré soubory.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Přístupová práva stažených adresářů'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Zde můžete zadat hodnotu přístupových práv v osmičkové soustavě (jako "0777") pro adresáře (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne všechny webové servery umožňují změnu práv. Např. servery ěžící v safe_mode módu. Mějte na paměti, že práva musí umožnit webovému uživateli, pod kterým běží PHP, práva čtení a zápisu souboru. Jinak nebude modul Spartacus schopen vytvořit nové adresáře.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Vyhledat nové pluginy pro postranní sloupec.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Vyhledat nové pluginy událostí.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Rada: Můžete upgradovat více rozšiřujících modulů najednou na odkaz "upgrade" prostředním tlačítkem myši. Upgrade se otevře v novém okně/nové záložce. Pamatujte, že automatická aktualizace všech rozšiřujících modulů je časově náročná operace a může vést k překročení nastavených časových limitů na serveru a z toho důvodu k neúplně staženým souborům. Proto tato funkčnost není záměrně snadno přístupná.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Vyhledat nové pluginy pro postranní sloupec.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Vyhledat nové pluginy událostí.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Rada: Můžete upgradovat více rozšiřujících modulů najednou na odkaz "upgrade" prostředním tlačítkem myši. Upgrade se otevře v novém okně/nové záložce. Pamatujte, že automatická aktualizace všech rozšiřujících modulů je časově náročná operace a může vést k překročení nastavených časových limitů na serveru a z toho důvodu k neúplně staženým souborům. Proto tato funkčnost není záměrně snadno přístupná.'); -@define('PLUGIN_EVENT_SPARTACUS_TRYCURL', 'Pokus o použití knihovny cURL jako záložního řešení...'); -@define('PLUGIN_EVENT_SPARTACUS_CURLFAIL', 'Knihovna cURL taky nefunguje :-/ ...'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', 'Nebylo možné stáhnout soubory z on-line úložiště modulu SPARTACUS, nicméně se povedlo spojit se s úložištěm. To znamená, že Váš poskytovatel nejspíše používá obsahový filtr a neumožňuje stáhovat přes web *.php soubory. Buď musíte Vašeho poskytovatele požádat o vypnutí přísušných omezení (jako mod_security nebo jiné "reverse proxy"), nebo stahujte pluginy ručně.'); +@define('PLUGIN_EVENT_SPARTACUS_TRYCURL', 'Pokus o použití knihovny cURL jako záložního řešení...'); +@define('PLUGIN_EVENT_SPARTACUS_CURLFAIL', 'Knihovna cURL taky nefunguje :-/ ...'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', 'Nebylo možné stáhnout soubory z on-line úložiště modulu SPARTACUS, nicméně se povedlo spojit se s úložištěm. To znamená, že Váš poskytovatel nejspíše používá obsahový filtr a neumožňuje stáhovat přes web *.php soubory. Buď musíte Vašeho poskytovatele požádat o vypnutí přísušných omezení (jako mod_security nebo jiné "reverse proxy"), nebo stahujte pluginy ručně.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', 'Povolit stahování rozšiřujících modulů pomocí modulu SPARTACUS?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Povolit stahování šablon pomocí modulu SPARTACUS?'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', 'Povolit stahování rozšiřujících modulů pomocí modulu SPARTACUS?'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Povolit stahování šablon pomocí modulu SPARTACUS?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Povolit vzdálené prohlížení informací o verzích pluginů'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Pokud je povoleno, návštěvníci %s si mohou zobrazit informace o verzích všech nainstalovaných plugin. Není špatný nápad ochránit tuto URL adresu pomocí souboru .htaccess proti nežádoucím přístupům.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Tajný kód ke vzdálenému přístupu k informacím o verzích pluginů'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Zadejte speciální URI komponentu, kterou musí lidé znát a zadat, aby mohli zobrazit informace o verzích pluginů.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Povolit vzdálené prohlížení informací o verzích pluginů'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Pokud je povoleno, návštěvníci %s si mohou zobrazit informace o verzích všech nainstalovaných plugin. Není špatný nápad ochránit tuto URL adresu pomocí souboru .htaccess proti nežádoucím přístupům.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Tajný kód ke vzdálenému přístupu k informacím o verzích pluginů'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Zadejte speciální URI komponentu, kterou musí lidé znát a zadat, aby mohli zobrazit informace o verzích pluginů.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'Chyba FTP: Nepodařilo se připojit k FTP.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'Chyba FTP: Adresář (%s) nelze vytvořit'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'Chyba FTP: Nelze nastavit práva u adresáře (%s).'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Adresář (%s) byl úspěšně vytvořen.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'Chyba FTP: Nepodařilo se připojit k FTP.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'Chyba FTP: Adresář (%s) nelze vytvořit'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'Chyba FTP: Nelze nastavit práva u adresáře (%s).'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Adresář (%s) byl úspěšně vytvořen.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Použít vytváření adresářů přes FTP?'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Pokud Vám běží PHP v "safe_mode", musíte se podřídit jistým omezením. Tato omezení mají zjednoduešeně řečeno za výsledek, že pokud vytvoříte adresář obvyklou cestou, nelze do něj zapisovat. Ale pokud vytváříte adresář pomocí FTP účtu, pak toto omezení neplatí. Pokud máte zapnutý safe_mode, je vytváření adresářů přes FTP prakticky jedinou cestou, jak mít možnost úspěšně používat SPARTACUS a upload souborů.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'Adresa FTP serveru'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'Uživatelské jméno k FTP'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'Heslo k FTP'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP cesta k adresáři Serendipity'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Pokud se k serveru připojujete přes FTP, nemusíte se nutně připojit do adresáře Serendipity. Zde tedy musíte specifikovat cestu k adresáři Srendipity od adresáře, do kterého se FTP přihlašuje.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Použít vytváření adresářů přes FTP?'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Pokud Vám běží PHP v "safe_mode", musíte se podřídit jistým omezením. Tato omezení mají zjednoduešeně řečeno za výsledek, že pokud vytvoříte adresář obvyklou cestou, nelze do něj zapisovat. Ale pokud vytváříte adresář pomocí FTP účtu, pak toto omezení neplatí. Pokud máte zapnutý safe_mode, je vytváření adresářů přes FTP prakticky jedinou cestou, jak mít možnost úspěšně používat SPARTACUS a upload souborů.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'Adresa FTP serveru'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'Uživatelské jméno k FTP'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'Heslo k FTP'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP cesta k adresáři Serendipity'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Pokud se k serveru připojujete přes FTP, nemusíte se nutně připojit do adresáře Serendipity. Zde tedy musíte specifikovat cestu k adresáři Srendipity od adresáře, do kterého se FTP přihlašuje.'); + +@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'Umístění zrcadel (mirrors)'); +@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Tuto volbu používejte jen pokud opravdu víte, co děláte, jste-li zkušený uživatel. Pokud jsou přednastavené mirror servery vypnuté nebo nepracují správně, Serendipity se pokusí připojit k Vámi zadaným mirror serverům (třeba můžete zadat http://mirror.org/serendipity/). Tyto servery musí umět zpracovávat XML soubory na úrovni URL adresy a musí obsahovat podadresáře "additional_plugins" a "additional_themes". Zadávejte pouze mirror servery, kterým věříte a které plně zrcadlí všechny soubory CVS úložiště Serendipity. Lze zadat více zrcadel, oddělených "|".'); -@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'Umístění zrcadel (mirrors)'); -@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Tuto volbu používejte jen pokud opravdu víte, co děláte, jste-li zkušený uživatel. Pokud jsou přednastavené mirror servery vypnuté nebo nepracují správně, Serendipity se pokusí připojit k Vámi zadaným mirror serverům (třeba můžete zadat http://mirror.org/serendipity/). Tyto servery musí umět zpracovávat XML soubory na úrovni URL adresy a musí obsahovat podadresáře "additional_plugins" a "additional_themes". Zadávejte pouze mirror servery, kterým věříte a které plně zrcadlí všechny soubory CVS úložiště Serendipity. Lze zadat více zrcadel, oddělených "|".'); diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_cz.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_cz.inc.php index 915b6b5b..09a7da8f 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # lang_cz.inc.php 2.2 2009-02-23 17:31:42 VladaAjgl $ +<?php /** * @version 2.2 @@ -11,58 +11,59 @@ * @revisionDate 2009/02/23 */ -@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus'); -@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - Umožňuje stáhnout a instalovat rozšiřující moduly (pluginy) z internetu'); -@define('PLUGIN_EVENT_SPARTACUS_FETCH', 'Klikněte zde pro stáhnutí nových %s z internetové online databáze - Serendipity Online Repository'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'URL %s nelze otevřít. Server Serendipity nebo SourceForge.net možná neběží - omlouváme se, zkuste to později.'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'Pokus o otevření URL %s...'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'Přijato %s bytů z výše uvedené URL. Ukládání souboru jako %s...'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'Přijato %s bytů z již existujícího souboru na Vašem serveru. Ukládání souboru jako %s...'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Data úspěšně stažena.'); -@define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '<br />(On-line úložiště vrátilo chybu %s.)<br />'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<P>Nebylo možno získat data z on-line úložiště modulu Spartacus. Zkouška dostupnosti úložiště na adrese %s.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<P>Diagnstická stránka modulu Spartacus vrátilo chybu (HTTP kód %s). To může znamenat, že je dignostická stránka mimo provoz. Zkuste to prosím později.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<P><a target="_blank" href="%s">Klikněte zde pro zobrazení diagnstické stránky modulu Spartacus</a> a zjistěte, zda odpovídá.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<P>SPARTACUS se pokusil připojit ke Googlu, ale neúspěšně (chyba č.%d: %s).<br/>Váš server blokuje odchozí spojení. SPARTACUS nebude fungovat, protože se nemůže připojit do svého online úložiště. <b>Kontaktujte prosím svého poskytovatele webhostingu a požádejte ho o povolení odchozích připojení k jiným webovým stránkám.</b></P><P>Zásuvné moduly lze instalovat z lokálních adresářů. Jednoduše stáhněte nejnovější verzi pluginu z <a href="http://spartacus.s9y.org">SPARTACUS online úložiště</a>, rozbalte ho a například pomocí FTP nahrajte do adresáře /plugins/ ve Vaší instalaci Serendipity.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<P>Modulu SPARTACUS se podařilo spojit s Googlem, ale nemůže se spojit s on-line úložištěm modulu SPARTACUS. Je možné, že Váš server blokuje některá odchozí spojení, nebo je on-line úložiště mimo provoz. Spojte se se svým poskytovatelem webového serveru, abyste se ujistili, že nemáte blokována odchozí spojení. <b>SPARTACUS nebude fungovat, protože nemůže kontaktovat on-line úložiště.</b></P>'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'Umístění souborů/(mirror server) (XML metadata)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'Umístění souborů/(mirror server) (soubory)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Vyberte, odkud stahovat. NEMĚŇTE tuto hodnotu, pokud opravdu dobře nevíte, co děláte a jestli server orpavdu funguje. Tato volba je přístupná pro teprve plánované funkce.'); -@define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'Vlastník stahovaných souborů'); -@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Zde můžete zadat (FTP/Shell) vlastníka souborů (jako např. "nobody") stažených pomocí Spartacus pluginu. Pokud je nevyplněné, nejsou prováděny žádné změny vlastníka.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'Přístupová práva stažených souborů.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', 'Zde můžete zadat hodnotu přístupových práv v osmičkové soustavě (jako "0777") pro soubory (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne všechny webové servery umožňují změnu práv. Např. servery ěžící v safe_mode módu. Mějte na paměti, že práva musí umožnit webovému uživateli, pod kterým běží PHP, práva čtení a zápisu souboru. Jinak nebude modul Spartacus schopen přepsat staré soubory.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Přístupová práva stažených adresářů'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Zde můžete zadat hodnotu přístupových práv v osmičkové soustavě (jako "0777") pro adresáře (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne všechny webové servery umožňují změnu práv. Např. servery ěžící v safe_mode módu. Mějte na paměti, že práva musí umožnit webovému uživateli, pod kterým běží PHP, práva čtení a zápisu souboru. Jinak nebude modul Spartacus schopen vytvořit nové adresáře.'); +@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus'); +@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - Umožňuje stáhnout a instalovat rozšiřující moduly (pluginy) z internetu'); +@define('PLUGIN_EVENT_SPARTACUS_FETCH', 'Klikněte zde pro stáhnutí nových %s z internetové online databáze - Serendipity Online Repository'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'URL %s nelze otevřít. Server Serendipity nebo SourceForge.net možná neběží - omlouváme se, zkuste to později.'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'Pokus o otevření URL %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'Přijato %s bytů z výše uvedené URL. Ukládání souboru jako %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'Přijato %s bytů z již existujícího souboru na Vašem serveru. Ukládání souboru jako %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Data úspěšně stažena.'); +@define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '<br />(On-line úložiště vrátilo chybu %s.)<br />'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<p>Nebylo možno získat data z on-line úložiště modulu Spartacus. Zkouška dostupnosti úložiště na adrese %s.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<p>Diagnstická stránka modulu Spartacus vrátilo chybu (HTTP kód %s). To může znamenat, že je dignostická stránka mimo provoz. Zkuste to prosím později.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<p><a target="_blank" href="%s">Klikněte zde pro zobrazení diagnstické stránky modulu Spartacus</a> a zjistěte, zda odpovídá.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<p>SPARTACUS se pokusil připojit ke Googlu, ale neúspěšně (chyba č.%d: %s).<br/>Váš server blokuje odchozí spojení. SPARTACUS nebude fungovat, protože se nemůže připojit do svého online úložiště. <b>Kontaktujte prosím svého poskytovatele webhostingu a požádejte ho o povolení odchozích připojení k jiným webovým stránkám.</b></p><p>Zásuvné moduly lze instalovat z lokálních adresářů. Jednoduše stáhněte nejnovější verzi pluginu z <a href="http://spartacus.s9y.org">SPARTACUS online úložiště</a>, rozbalte ho a například pomocí FTP nahrajte do adresáře /plugins/ ve Vaší instalaci Serendipity.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<p>Modulu SPARTACUS se podařilo spojit s Googlem, ale nemůže se spojit s on-line úložištěm modulu SPARTACUS. Je možné, že Váš server blokuje některá odchozí spojení, nebo je on-line úložiště mimo provoz. Spojte se se svým poskytovatelem webového serveru, abyste se ujistili, že nemáte blokována odchozí spojení. <b>SPARTACUS nebude fungovat, protože nemůže kontaktovat on-line úložiště.</b></p>'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'Umístění souborů/(mirror server) (XML metadata)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'Umístění souborů/(mirror server) (soubory)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Vyberte, odkud stahovat. NEMĚŇTE tuto hodnotu, pokud opravdu dobře nevíte, co děláte a jestli server orpavdu funguje. Tato volba je přístupná pro teprve plánované funkce.'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'Vlastník stahovaných souborů'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Zde můžete zadat (FTP/Shell) vlastníka souborů (jako např. "nobody") stažených pomocí Spartacus pluginu. Pokud je nevyplněné, nejsou prováděny žádné změny vlastníka.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'Přístupová práva stažených souborů.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', 'Zde můžete zadat hodnotu přístupových práv v osmičkové soustavě (jako "0777") pro soubory (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne všechny webové servery umožňují změnu práv. Např. servery ěžící v safe_mode módu. Mějte na paměti, že práva musí umožnit webovému uživateli, pod kterým běží PHP, práva čtení a zápisu souboru. Jinak nebude modul Spartacus schopen přepsat staré soubory.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Přístupová práva stažených adresářů'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Zde můžete zadat hodnotu přístupových práv v osmičkové soustavě (jako "0777") pro adresáře (FTP/Shell) stažené pomocí pluginy Spartacus. Pokud je pole ponecháno prázdné, bude použito standardní systémové nastavení. Pamatujte, že ne všechny webové servery umožňují změnu práv. Např. servery ěžící v safe_mode módu. Mějte na paměti, že práva musí umožnit webovému uživateli, pod kterým běží PHP, práva čtení a zápisu souboru. Jinak nebude modul Spartacus schopen vytvořit nové adresáře.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Vyhledat nové pluginy pro postranní sloupec.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Vyhledat nové pluginy událostí.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Rada: Můžete upgradovat více rozšiřujících modulů najednou na odkaz "upgrade" prostředním tlačítkem myši. Upgrade se otevře v novém okně/nové záložce. Pamatujte, že automatická aktualizace všech rozšiřujících modulů je časově náročná operace a může vést k překročení nastavených časových limitů na serveru a z toho důvodu k neúplně staženým souborům. Proto tato funkčnost není záměrně snadno přístupná.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Vyhledat nové pluginy pro postranní sloupec.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Vyhledat nové pluginy událostí.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Rada: Můžete upgradovat více rozšiřujících modulů najednou na odkaz "upgrade" prostředním tlačítkem myši. Upgrade se otevře v novém okně/nové záložce. Pamatujte, že automatická aktualizace všech rozšiřujících modulů je časově náročná operace a může vést k překročení nastavených časových limitů na serveru a z toho důvodu k neúplně staženým souborům. Proto tato funkčnost není záměrně snadno přístupná.'); -@define('PLUGIN_EVENT_SPARTACUS_TRYCURL', 'Pokus o použití knihovny cURL jako záložního řešení...'); -@define('PLUGIN_EVENT_SPARTACUS_CURLFAIL', 'Knihovna cURL taky nefunguje :-/ ...'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', 'Nebylo možné stáhnout soubory z on-line úložiště modulu SPARTACUS, nicméně se povedlo spojit se s úložištěm. To znamená, že Váš poskytovatel nejspíše používá obsahový filtr a neumožňuje stáhovat přes web *.php soubory. Buď musíte Vašeho poskytovatele požádat o vypnutí přísušných omezení (jako mod_security nebo jiné "reverse proxy"), nebo stahujte pluginy ručně.'); +@define('PLUGIN_EVENT_SPARTACUS_TRYCURL', 'Pokus o použití knihovny cURL jako záložního řešení...'); +@define('PLUGIN_EVENT_SPARTACUS_CURLFAIL', 'Knihovna cURL taky nefunguje :-/ ...'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', 'Nebylo možné stáhnout soubory z on-line úložiště modulu SPARTACUS, nicméně se povedlo spojit se s úložištěm. To znamená, že Váš poskytovatel nejspíše používá obsahový filtr a neumožňuje stáhovat přes web *.php soubory. Buď musíte Vašeho poskytovatele požádat o vypnutí přísušných omezení (jako mod_security nebo jiné "reverse proxy"), nebo stahujte pluginy ručně.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', 'Povolit stahování rozšiřujících modulů pomocí modulu SPARTACUS?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Povolit stahování šablon pomocí modulu SPARTACUS?'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', 'Povolit stahování rozšiřujících modulů pomocí modulu SPARTACUS?'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Povolit stahování šablon pomocí modulu SPARTACUS?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Povolit vzdálené prohlížení informací o verzích pluginů'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Pokud je povoleno, návštěvníci %s si mohou zobrazit informace o verzích všech nainstalovaných plugin. Není špatný nápad ochránit tuto URL adresu pomocí souboru .htaccess proti nežádoucím přístupům.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Tajný kód ke vzdálenému přístupu k informacím o verzích pluginů'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Zadejte speciální URI komponentu, kterou musí lidé znát a zadat, aby mohli zobrazit informace o verzích pluginů.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Povolit vzdálené prohlížení informací o verzích pluginů'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Pokud je povoleno, návštěvníci %s si mohou zobrazit informace o verzích všech nainstalovaných plugin. Není špatný nápad ochránit tuto URL adresu pomocí souboru .htaccess proti nežádoucím přístupům.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Tajný kód ke vzdálenému přístupu k informacím o verzích pluginů'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Zadejte speciální URI komponentu, kterou musí lidé znát a zadat, aby mohli zobrazit informace o verzích pluginů.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'Chyba FTP: Nepodařilo se připojit k FTP.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'Chyba FTP: Adresář (%s) nelze vytvořit'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'Chyba FTP: Nelze nastavit práva u adresáře (%s).'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Adresář (%s) byl úspěšně vytvořen.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'Chyba FTP: Nepodařilo se připojit k FTP.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'Chyba FTP: Adresář (%s) nelze vytvořit'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'Chyba FTP: Nelze nastavit práva u adresáře (%s).'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Adresář (%s) byl úspěšně vytvořen.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Použít vytváření adresářů přes FTP?'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Pokud Vám běží PHP v "safe_mode", musíte se podřídit jistým omezením. Tato omezení mají zjednoduešeně řečeno za výsledek, že pokud vytvoříte adresář obvyklou cestou, nelze do něj zapisovat. Ale pokud vytváříte adresář pomocí FTP účtu, pak toto omezení neplatí. Pokud máte zapnutý safe_mode, je vytváření adresářů přes FTP prakticky jedinou cestou, jak mít možnost úspěšně používat SPARTACUS a upload souborů.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'Adresa FTP serveru'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'Uživatelské jméno k FTP'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'Heslo k FTP'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP cesta k adresáři Serendipity'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Pokud se k serveru připojujete přes FTP, nemusíte se nutně připojit do adresáře Serendipity. Zde tedy musíte specifikovat cestu k adresáři Srendipity od adresáře, do kterého se FTP přihlašuje.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Použít vytváření adresářů přes FTP?'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Pokud Vám běží PHP v "safe_mode", musíte se podřídit jistým omezením. Tato omezení mají zjednoduešeně řečeno za výsledek, že pokud vytvoříte adresář obvyklou cestou, nelze do něj zapisovat. Ale pokud vytváříte adresář pomocí FTP účtu, pak toto omezení neplatí. Pokud máte zapnutý safe_mode, je vytváření adresářů přes FTP prakticky jedinou cestou, jak mít možnost úspěšně používat SPARTACUS a upload souborů.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'Adresa FTP serveru'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'Uživatelské jméno k FTP'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'Heslo k FTP'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP cesta k adresáři Serendipity'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Pokud se k serveru připojujete přes FTP, nemusíte se nutně připojit do adresáře Serendipity. Zde tedy musíte specifikovat cestu k adresáři Srendipity od adresáře, do kterého se FTP přihlašuje.'); + +@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'Umístění zrcadel (mirrors)'); +@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Tuto volbu používejte jen pokud opravdu víte, co děláte, jste-li zkušený uživatel. Pokud jsou přednastavené mirror servery vypnuté nebo nepracují správně, Serendipity se pokusí připojit k Vámi zadaným mirror serverům (třeba můžete zadat http://mirror.org/serendipity/). Tyto servery musí umět zpracovávat XML soubory na úrovni URL adresy a musí obsahovat podadresáře "additional_plugins" a "additional_themes". Zadávejte pouze mirror servery, kterým věříte a které plně zrcadlí všechny soubory CVS úložiště Serendipity. Lze zadat více zrcadel, oddělených "|".'); -@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'Umístění zrcadel (mirrors)'); -@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Tuto volbu používejte jen pokud opravdu víte, co děláte, jste-li zkušený uživatel. Pokud jsou přednastavené mirror servery vypnuté nebo nepracují správně, Serendipity se pokusí připojit k Vámi zadaným mirror serverům (třeba můžete zadat http://mirror.org/serendipity/). Tyto servery musí umět zpracovávat XML soubory na úrovni URL adresy a musí obsahovat podadresáře "additional_plugins" a "additional_themes". Zadávejte pouze mirror servery, kterým věříte a které plně zrcadlí všechny soubory CVS úložiště Serendipity. Lze zadat více zrcadel, oddělených "|".'); diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_de.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_de.inc.php index 65c9806f..44b86b08 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_de.inc.php @@ -1,4 +1,4 @@ -<?php # lang_de.inc.php 1.0 2009-06-03 09:57:42 VladaAjgl $ +<?php /** * @version 1.0 @@ -23,16 +23,17 @@ @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', 'Hier kann der Oktagonale Dateimodus (z.B: "0777") für von Spartacus heruntergeladene Dateien angegeben werden. Falls dieser Wert leergelassen wird, verwendet Serendipity die Standardmaske des Systems. Nicht alle Server unterstützen eine Änderung dieser Dateirechte. Stellen Sie unbedingt sicher, dass die von Ihnen gewählten Rechte das Lesen und Schreiben des Webserver-Benutzers weiterhin erlauben - sonst könnte Serendipity/Spartacus keine bestehenden Dateien überschreiben.'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Zugriffsrechte der heruntergeladenen Verzeichnisse'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Hier kann der Oktagonale Dateimodus (z.B: "0777") für von Spartacus heruntergeladene Verzeichnisse angegeben werden. Falls dieser Wert leergelassen wird, verwendet Serendipity die Standardmaske des Systems. Nicht alle Server unterstützen eine Änderung dieser Verzeichnisrechte. Stellen Sie unbedingt sicher, dass die von Ihnen gewählten Rechte das Lesen und Schreiben des Webserver-Benutzers weiterhin erlauben - sonst könnte Serendipity/Spartacus keine bestehenden Dateien überschreiben.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK', 'Plugins updaten'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Updates (Seitenleisten-Plugins)'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Updates (Ereignis-Plugins)'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Sie können mehrere Plugins auf einmal installieren indem sie diesen Link in einem neuen Tab öffnen (mittlerer Mausbutton)'); @define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '<br />(Der Mirror-Speicherort antwortet mit Fehler %s.)<br />'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<P>Die Daten des Spartacus-Speicherorts konnte nicht empfangen werden. Prüfe Verfügbarkeit der Quelle...</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<P>Die Prüfung der Verfügbarkeit einer Spartacus-Quelle konnte nicht durchgeführt werden (HTTP-Code %s). Bitte probieren Sie es später wieder.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<P><a target="_blank" href="%s">Klicken Sie hier um die Spartacus-Verfügbarkeitsprüfung anzusehen</a> und dessen Erreichbarkeit zu überprüfen.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<P>SPARTACUS konnte keine Test-Verbindung zu Google herstellen (Fehler %d: %s).<br />Ihr Server blockiert vermutlich ausgehende Verbindungen. SPARTACUS kann so nicht ausgeführt werden, da so auf keine der SPARTACUS-Quellen zugegriffen werden kann. <b>Bitte kontaktieren Sie ihren Web-Provider und bitten ihn, ausgehende HTTP-Verbindungen zuzulassen.</b></P><P>Plugins können nach wie vor auch lokal installiert werden. Laden Sie dazu einfach ein Plugin von <a href="http://spartacus.s9y.org">der SPARTACUS Webseite</a> runter, entpacken es und laden es in ihr Serendipity "plugin"-Verzeichnis hoch.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<P>SPARTACUS konnte eine Teste-Verbindung zu Google herstellen, aber nicht zum Spartacus-Speicherort. Möglicherweise blockiert ihr Server ausgehende Verbindungen, oder die Spartacus-Quelle ist nicht erreichbar. Kontaktieren Sie bitte ihren Web-Provider um sicherzustellen, dass ausgehende HTTP-Verbindungen möglich sind. <b>Sie können SPARTACUS erst nutzen, wenn ihr Server auf die Spartacus-Speicherorte zugreifen kann.</b></P>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<p>Die Daten des Spartacus-Speicherorts konnte nicht empfangen werden. Prüfe Verfügbarkeit der Quelle...</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<p>Die Prüfung der Verfügbarkeit einer Spartacus-Quelle konnte nicht durchgeführt werden (HTTP-Code %s). Bitte probieren Sie es später wieder.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<p><a target="_blank" href="%s">Klicken Sie hier um die Spartacus-Verfügbarkeitsprüfung anzusehen</a> und dessen Erreichbarkeit zu überprüfen.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<p>SPARTACUS konnte keine Test-Verbindung zu Google herstellen (Fehler %d: %s).<br />Ihr Server blockiert vermutlich ausgehende Verbindungen. SPARTACUS kann so nicht ausgeführt werden, da so auf keine der SPARTACUS-Quellen zugegriffen werden kann. <b>Bitte kontaktieren Sie ihren Web-Provider und bitten ihn, ausgehende HTTP-Verbindungen zuzulassen.</b></p><p>Plugins können nach wie vor auch lokal installiert werden. Laden Sie dazu einfach ein Plugin von <a href="http://spartacus.s9y.org">der SPARTACUS Webseite</a> herunter, entpacken es und laden es in ihr Serendipity "plugins"-Verzeichnis hoch.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<p>SPARTACUS konnte eine Teste-Verbindung zu Google herstellen, aber nicht zum Spartacus-Speicherort. Möglicherweise blockiert ihr Server ausgehende Verbindungen, oder die Spartacus-Quelle ist nicht erreichbar. Kontaktieren Sie bitte ihren Web-Provider um sicherzustellen, dass ausgehende HTTP-Verbindungen möglich sind. <b>Sie können SPARTACUS erst nutzen, wenn ihr Server auf die Spartacus-Speicherorte zugreifen kann.</b></p>'); @define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'Eigene Mirror-Quelle'); @define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Diese Option ist nur für Experten gedacht. Falls keiner der voreingestellten Mirror-Server aufgrund von Downtime oder Problemen verfügbar ist, kann hier ein eigener Server-Name wie http://mirror.org/serendipity/ eingetragen werden. Dort müssten die XML-Dateien für Spartacus im Verzeichnis liegen, und Unterverzeichnisse wie additional_plugins und additional_themes existieren. Geben Sie nur Mirrors hier ein, denen Sie vertrauen, auf denen eine Kopie unseres CVS-Repositories gespeichert ist. Mehrere Mirrors können mit "|" getrennt eingegeben werden.'); @@ -45,16 +46,16 @@ @define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Spartacus verwenden, um Themes zu laden?'); @define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Fernabfrage für Versions-Informationen der Plugins zulassen?'); @define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Wenn aktiviert, können Besucher von %s Versions-Informationen über alle installierten Plugins abrufen. Es wird dringend empfohlen, diese URL mittels benutzerdefinierten .htaccess Regeln vor unauthorisiertem Zugriff zu schützen.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Pfad zum Fernabruf der Versions-Information der Plugins'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'gibt den letzten Teil der URI an, welche die Benutzer wissen müssen, um den Fernabruf der Versions-Informationen durchzuführen.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Pfad zum Fernabruf der Versions-Information'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Gibt den letzten ("geheimen") Teil der URI an, welche die Benutzer wissen müssen, um den Fernabruf der Versions-Informationen durchzuführen.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'FTP Fehler: Kann nicht per FTP verbinden.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'FTP Fehler: Kann das Verzeichnis (%s) nicht anlegen.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'FTP Fehler: Kann die Verzeichnisrechte von (%s) nicht ändern.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Verzeichnis (%s) erfolgreich angelegt.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Lege Verzeichnis unter Verwendung von FTP an?'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Wenn PHP im safe_mode läuft, gelten einige Einschränkungen. Das Ergebnis dieser Einschränkungen ist, das in ein Verzeichnis, welches auf normale Weise erstellt wurde, nicht hochgeladen werden kann. Wird das Verzeichnis aber per FTP angelegt wurde, funtkioniert es. Wenn also am Webserver safe_mode = on eingestellt ist, ist dies der einzige Weg um SPARTACUS zu nmutzen bzw. Mediendateien (Bilder usw.) hochzuladen. Die folgenden Zugangsdaten für Ihren Server müssen dazu ausgefüllt werden'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Wenn PHP im safe_mode läuft, gelten einige Einschränkungen. Das Ergebnis dieser Einschränkungen ist, das in ein Verzeichnis, welches auf normale Weise erstellt wurde, nicht hochgeladen werden kann. Wird das Verzeichnis aber per FTP angelegt wurde, funtkioniert es. Wenn also am Webserver safe_mode = on eingestellt ist, ist dies der einzige Weg um SPARTACUS zu nutzen bzw. Mediendateien (Bilder usw.) hochzuladen. Die folgenden Zugangsdaten für Ihren Server müssen dazu ausgefüllt werden'); @define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'FTP Serveradresse'); @define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'FTP Benutzername'); @define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'FTP Passwort'); @define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP Serendipity Verzeichnis'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Beim Login über FTP ist das Startverzeichnis nicht notwendigerweise das Serendipity-Verzeichnis. In diesem Fall ist es hier möglch, den Pfad vom FTP-Verzeichnis zum Serendipity-Verzeichnis anzugeben.'); \ No newline at end of file +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Beim Login über FTP ist das Startverzeichnis nicht notwendigerweise das Serendipity-Verzeichnis. In diesem Fall ist es hier möglch, den Pfad vom FTP-Verzeichnis zum Serendipity-Verzeichnis anzugeben.'); diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_es.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_es.inc.php index 20ce0625..f400be9e 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_es.inc.php @@ -1,6 +1,6 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -23,4 +23,3 @@ @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Permisos de los directorios descargados'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Aquí puedes ingresar los permisos de los directorios (FTP/Shell) descargados por Spartacus en modo octal (por ejemplo "0777"). Si lo dejas vacío, los permisos por defecto del sistema serán utilizados. Nota que no todos los servidores permiten definir/cambiar permisos. Presta atención que los permisos aplicados permiten la lectura y escritura por parte del usuario del webserver. Fuera de eso spartacus/Serendipity no puede sobreescribir directorios existentes.'); -?> diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_fr.inc.php index 4a181c14..a9203d20 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -32,5 +32,3 @@ @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Permissions des répertoires téléchargés'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Ici vous pouvez entrer le mode octal (comme "0777" par ex.) pour les répertoires téléchargés. Si vous laissez ce champs vide, les permissions par défaut de votre serveur seront utilisés. Notez que tous les serveurs ne permettent pas de changer les permissions de répertoire. Faites attention aussi que les permissions que vous définissez permettent encore à Serendipity d\'accéder aux répertoires.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_is.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_is.inc.php index 4c57174f..09cfab60 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_is.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_is.inc.php @@ -1,10 +1,11 @@ -<?php # $Id$ +<?php + +@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus'); +@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - Leyfir þér að sækja viðbætur úr netgagnabankanum okkar'); +@define('PLUGIN_EVENT_SPARTACUS_FETCH', 'Smelltu hér til að sækja nýja %s úr Serendipity netgagnabankanum'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'Slóðin %s gat ekki verið opnuð. Kannski er Serendipity eða SourceForge.net þjónnin niðri - við biðjumst afsökunar, þú þarft að reyna aftur síðar.'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'Reyni að opna slóðina %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'Sótti %s byte frá ofangreindri slóð. Vistaði skrá sem %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'Sótti %s byte frá skrá sem var þegar til á þjóninum þínum. Vistaði skrá sem %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Niðurhali gagna lokið.'); - @define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus'); - @define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - Leyfir þér að sækja viðbætur úr netgagnabankanum okkar'); - @define('PLUGIN_EVENT_SPARTACUS_FETCH', 'Smelltu hér til að sækja nýja %s úr Serendipity netgagnabankanum'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'Slóðin %s gat ekki verið opnuð. Kannski er Serendipity eða SourceForge.net þjónnin niðri - við biðjumst afsökunar, þú þarft að reyna aftur síðar.'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'Reyni að opna slóðina %s...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'Sótti %s byte frá ofangreindri slóð. Vistaði skrá sem %s...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'Sótti %s byte frá skrá sem var þegar til á þjóninum þínum. Vistaði skrá sem %s...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Niðurhali gagna lokið.'); diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_ja.inc.php index 45d0b019..4081d676 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 690 */ @@ -24,4 +24,3 @@ @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Permissions downloaded directories'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Here you can enter the octal mode (like "0777") of the directory permissions for directories (FTP/Shell) downloaded by Spartacus. If empty, the default permission mask of the system are used. Note that not all servers allow changing/setting permissions. Pay attention that the applied permissions allow reading and writing for the webserver user. Else spartacus/Serendipity cannot overwrite existing directories.'); -?> diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_ko.inc.php index 47e2b891..a023bbe4 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_ko.inc.php @@ -1,17 +1,16 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus(스파르타쿠스)'); - @define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem (세렌디피티 플러그인 접근 보관소 도구 및 개인화/통합화 시스템) - 온라인 보관소에서 플러그인을 다운로드받을 수 있게 함'); - @define('PLUGIN_EVENT_SPARTACUS_FETCH', '세렌디피티 온라인 보관소에서 새로운 %s(을)를 받으려면 여기를 누르십시오.'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', '인터넷 주소 %s 에 접속할 수 없었습니다. 세렌디피티나 소스포지 서버가 다운된 것 같습니다. 죄송하지만 잠시 후 재시도하시기 바랍니다.'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHING', '인터넷 주소 %s 에 접속 시도중...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', '위의 주소에서 %s 바이트를 받았습니다. 파일을 %s(으)로 저장하는 중...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', '서버에 이미 존재하는 파일에서 %s 바이트를 받았습니다. 파일을 %s(으)로 저장하는 중...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', '데이터를 성공적으로 받았습니다.'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '파일/미러 위치 (XML 메타데이터)'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '파일/미러 위치 (파일)'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '다운로드 위치를 정합니다. 어떻게 작업해야 하는지 알고 있고 서버 정보가 바뀌었을 경우가 아니라면 이 값을 바꾸지 마십시오. 이 옵션은 상위 호환성을 위해 존재합니다.'); +@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus(스파르타쿠스)'); +@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem (세렌디피티 플러그인 접근 보관소 도구 및 개인화/통합화 시스템) - 온라인 보관소에서 플러그인을 다운로드받을 수 있게 함'); +@define('PLUGIN_EVENT_SPARTACUS_FETCH', '세렌디피티 온라인 보관소에서 새로운 %s(을)를 받으려면 여기를 누르십시오.'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', '인터넷 주소 %s 에 접속할 수 없었습니다. 세렌디피티나 소스포지 서버가 다운된 것 같습니다. 죄송하지만 잠시 후 재시도하시기 바랍니다.'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHING', '인터넷 주소 %s 에 접속 시도중...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', '위의 주소에서 %s 바이트를 받았습니다. 파일을 %s(으)로 저장하는 중...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', '서버에 이미 존재하는 파일에서 %s 바이트를 받았습니다. 파일을 %s(으)로 저장하는 중...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', '데이터를 성공적으로 받았습니다.'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '파일/미러 위치 (XML 메타데이터)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '파일/미러 위치 (파일)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '다운로드 위치를 정합니다. 어떻게 작업해야 하는지 알고 있고 서버 정보가 바뀌었을 경우가 아니라면 이 값을 바꾸지 마십시오. 이 옵션은 상위 호환성을 위해 존재합니다.'); -?> diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_pl.inc.php index 53f4a89a..656bd5e8 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -15,14 +15,14 @@ @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'Pobrano %s bajtów z już istniejącego pliku na Twoim serwerze. Zapisuję plik jako %s...'); @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Pobieranie danych zakończone sukcesem.'); @define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '<br />(repozytorium zwróciło kod błędu %s.)<br />'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<P>Nie mogę pobrać danych z repozytorium SPARTACUSa. Sprawdzam dostępność repozytorium.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<P>Strona z informacją o dostępności repozytoriów dla SPARTACUSa zwróciła błąd (kod HTTP %s). To oznacza, że strona aktualnie nie funkcjonuje. Proszę spróbować ponownie później.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<P><a target="_blank" href="%s">Kliknij tutaj</a> by zobaczyć stronę z informacją o dostępności repozytoriów dla SPARTACUSa i sprawdź, czy strona odpowiada.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<P>SPARTACUS próbował połączyć się z Google i nie powiodła się ta operacja (błąd %d: %s).<br />Twój serwer blokuje połączenia wychodzące. Your server is blocking outgoing connections. SPARTACUS nie będzie funkcjonował prawidłowo ponieważ nie może skontaktować się z repozytorium. <b>Proszę, skontaktuj się z providerem i poproś o zezwolenie na połączenia wychodzące z serwera.</b></P><P>Wtyczki mogą być oczywiście instalowane bezpośrednio z katalogów na serwerze. Po prostu pobierz wtyczkę z <a href="http://spartacus.s9y.org">repozytorium SPARTACUSa</a>, rozpakuj, wgraj rozpakowany katalog do katalogu wtyczek (plugins).</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<P>SPARTACUS może połączyć się z Google ale nie może połączyć się z repozytorium. Jest możliwe, że Twój serwer blokuje pewne połączenia wychodzące albo że strona z repozytorium SPARTACUSa aktualnie nie działa. Skontaktuj się z firmą hostującą Twoją stronę i upewnij się, że połączenia wychodzące są dozwolone. <b>Nie będziesz mógł używać SPARTACUSa dopóki Twój serwer nie będzie mógł kontaktować się z repozytorium SPARTACUSa.</b></P>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<p>Nie mogę pobrać danych z repozytorium SPARTACUSa. Sprawdzam dostępność repozytorium.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<p>Strona z informacją o dostępności repozytoriów dla SPARTACUSa zwróciła błąd (kod HTTP %s). To oznacza, że strona aktualnie nie funkcjonuje. Proszę spróbować ponownie później.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<p><a target="_blank" href="%s">Kliknij tutaj</a> by zobaczyć stronę z informacją o dostępności repozytoriów dla SPARTACUSa i sprawdź, czy strona odpowiada.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<p>SPARTACUS próbował połączyć się z Google i nie powiodła się ta operacja (błąd %d: %s).<br />Twój serwer blokuje połączenia wychodzące. Your server is blocking outgoing connections. SPARTACUS nie będzie funkcjonował prawidłowo ponieważ nie może skontaktować się z repozytorium. <b>Proszę, skontaktuj się z providerem i poproś o zezwolenie na połączenia wychodzące z serwera.</b></p><p>Wtyczki mogą być oczywiście instalowane bezpośrednio z katalogów na serwerze. Po prostu pobierz wtyczkę z <a href="http://spartacus.s9y.org">repozytorium SPARTACUSa</a>, rozpakuj, wgraj rozpakowany katalog do katalogu wtyczek (plugins).</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<p>SPARTACUS może połączyć się z Google ale nie może połączyć się z repozytorium. Jest możliwe, że Twój serwer blokuje pewne połączenia wychodzące albo że strona z repozytorium SPARTACUSa aktualnie nie działa. Skontaktuj się z firmą hostującą Twoją stronę i upewnij się, że połączenia wychodzące są dozwolone. <b>Nie będziesz mógł używać SPARTACUSa dopóki Twój serwer nie będzie mógł kontaktować się z repozytorium SPARTACUSa.</b></p>'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'Lokalizacja pliku/mirrora (metadane XML)'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'Lokalizacja pliku/mirrora (pliki)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Wybierz lokalizację, z której będą pobierane dane. NIE zmieniaj tej wartości o ile dobrze nie wiesz, co robisz i o ile serwer jest dostępny. Opcja istnieje głównie dla kompatybilności z przyszłymi wersjami wtyczki.'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Wybierz lokalizację, z której będą pobierane dane. NIE zmieniaj tej wartości o ile dobrze nie wiesz, co robisz i o ile serwer jest dostępny. Opcja istnieje głównie dla kompatybilności z przyszłymi wersjami wtyczki.'); @define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'Właściciel pobranych plików'); @define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Tu możesz podać właściciela (jak np. "nobody") plików pobieranych i zapisywanych przez Spartacusa. Pozostawienie pustego pola nie spowoduje zmian uprawnień do plików.'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'Upraweniania pobieranych plików'); @@ -33,4 +33,4 @@ @define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Sprawdź czy są nowe wtyczki Panelu bocznego'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Sprawdź czy są nowe wtyczki Zdarzeń'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Podpowiedź: Możesz uaktualnić kilka wtyczek jednocześnie klikając link uaktualnienia środkowym klawiszem myszy, tak by otworzyć ten link w nowym oknie lub nowym tabie (zakładce) przeglądarki. Zauważ, że uaktualnianie kilku wtyczek jednocześnie mogłoby prowadzić do timeoutów i problemów z pobieraniem plików a w efekcie - nagromadzenia śmieci i potencjalnych problemów. Dlatego taka funkcjonalność nie została zaimplementowana rozmyślnie.'); -?> + diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_pt_PT.inc.php index f868933d..cac414c4 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id:$ +<?php ########################################################################## # serendipity - another blogger... # @@ -30,5 +30,3 @@ @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Permissões das directorias descarregadas'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Aqui pode introduzir o modo octal (por exemplo "0777") das permissões de directorias (FTP/Shell) downloaded by Spartacus. descarregados pelo Spartacus. Se vazio, a máscara de permissões por omissão do sistema é usada. Note que nem todos os servidores permitem definir ou alterar permissões. Note que as permissões aplicadas devem permitir leitura e escrita por parte do utilizador do servidor web. Além disso o spartacus/Serendipity não pode escrever sobre ficheiros existentes.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_tn.inc.php index 554bf8f7..b23305e5 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_tn.inc.php @@ -1,32 +1,32 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # # # # Translated by # # (c) 2004-2005 CapriSkye <admin@capriskye.com> # -# http://open.38.com # +# http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus (外掛存庫)'); - @define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - 允許你從 s9y 的線上存庫下載外掛'); - @define('PLUGIN_EVENT_SPARTACUS_FETCH', '點這裡從 s9y 的外掛存庫安裝新 %s'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', '網址 %s 無法開啟。也許 s9y 或 SourceForge.net 的主機有問題 - 請稍後在試。'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHING', '打開網址 %s...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', '從上面的網址接收 %s 個位元組的資料。儲存成檔案 %s...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', '從主機內接收 %s 個位元組的資料。儲存成檔案 %s...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', '存取資料完成。'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '檔案/鏡像 位址 (XML metadata)'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '檔案/鏡像 位址 (檔案)'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '選擇一個下載點。不要改變這個設定值初非您了解它的作用。這個選項主要是為了相容性所設計。'); - @define('PLUGIN_EVENT_SPARTACUS_CHOWN', '下載檔案的擁有人'); - @define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', '這裡可以輸入 Spartacus 所下載的檔案 (FTP/Shell) 擁有人 (譬如 "nobody")。如果空白不會做任何改變。'); - @define('PLUGIN_EVENT_SPARTACUS_CHMOD', '下載檔案的權限'); - @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', '這裡可以輸入 Spartacus 所下載的檔案 (FTP/Shell) 權限 (譬如 "0777")。如果空白將會使用主機的預設權限。記得不是每個主機都允許改變權限。記得將權限改為可讀取和寫入檔案,不然 Spartacus/Serendipity 會無法覆蓋檔案和改變設定。'); - @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', '檔案目錄的權限'); - @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', '這裡可以輸入 Spartacus 所下載的檔案的目錄 (FTP/Shell) 權限 (譬如 "0777")。如果空白將會使用主機的預設權限。記得不是每個主機都允許改變權限。記得將權限改為可讀取和寫入檔案,不然 Spartacus/Serendipity 會無法覆蓋檔案和改變設定。'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus (外掛存庫)'); +@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - 允許你從 s9y 的線上存庫下載外掛'); +@define('PLUGIN_EVENT_SPARTACUS_FETCH', '點這裡從 s9y 的外掛存庫安裝新 %s'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', '網址 %s 無法開啟。也許 s9y 或 SourceForge.net 的主機有問題 - 請稍後在試。'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHING', '打開網址 %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', '從上面的網址接收 %s 個位元組的資料。儲存成檔案 %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', '從主機內接收 %s 個位元組的資料。儲存成檔案 %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', '存取資料完成。'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '檔案/鏡像 位址 (XML metadata)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '檔案/鏡像 位址 (檔案)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '選擇一個下載點。不要改變這個設定值初非您了解它的作用。這個選項主要是為了相容性所設計。'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN', '下載檔案的擁有人'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', '這裡可以輸入 Spartacus 所下載的檔案 (FTP/Shell) 擁有人 (譬如 "nobody")。如果空白不會做任何改變。'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD', '下載檔案的權限'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', '這裡可以輸入 Spartacus 所下載的檔案 (FTP/Shell) 權限 (譬如 "0777")。如果空白將會使用主機的預設權限。記得不是每個主機都允許改變權限。記得將權限改為可讀取和寫入檔案,不然 Spartacus/Serendipity 會無法覆蓋檔案和改變設定。'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', '檔案目錄的權限'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', '這裡可以輸入 Spartacus 所下載的檔案的目錄 (FTP/Shell) 權限 (譬如 "0777")。如果空白將會使用主機的預設權限。記得不是每個主機都允許改變權限。記得將權限改為可讀取和寫入檔案,不然 Spartacus/Serendipity 會無法覆蓋檔案和改變設定。'); + diff --git a/plugins/serendipity_event_spartacus/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_spartacus/UTF-8/lang_zh.inc.php index b6c6d7c6..6b5aa7fb 100644 --- a/plugins/serendipity_event_spartacus/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_spartacus/UTF-8/lang_zh.inc.php @@ -10,10 +10,10 @@ @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', '成功获取相关数据'); @define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '<br />(插件库返回如下错误代码 %s 。)<br />'); @define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<p>无法从SPARTACUS插件库中获取到数据。正在在 %s 上面检查插件库状态信息。</p>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<P>SPARTACUS插件库运行状态网站返回了一个错误代码 (HTTP代码 %s)。这意味着SPARTACUS插件库运行状态网站目前处于瘫痪状态。请稍后重新尝试。</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<p>SPARTACUS插件库运行状态网站返回了一个错误代码 (HTTP代码 %s)。这意味着SPARTACUS插件库运行状态网站目前处于瘫痪状态。请稍后重新尝试。</p>'); @define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<p><a target="_blank" href="%s">点击此处访问SPARTACUS插件库运行状态网站</a>, 并确认该网站是否在正常运行中。</p>'); @define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<p>SPARTACUS尝试连接到Google,但是失败了(错误 %d: %s)。<br />你的服务器禁止外出连接(outgoing connections)。无法连接到SPARTACUS插件库,因此SPARTACUS无法正常工作以下载、更新插件。<b>请联系你的网站空间服务商,要求他们允许通过使用外出连接连接到其他网站。</b></p><p>你依然可以从本地目录安装插件。只要从<a href="http://spartacus.s9y.org">SPARTACUS网上插件库</a>下载相关插件,将它解压缩并上传到你的Serendipity的插件目录中</p>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<P>SPARTACUS可以连接到Google,但无法连接到SPARTACUS插件库。这可能是因为你的服务器禁止某些外出连接(outgoing connections),或者SPARTACUS插件库运行状态网站目前处于瘫痪状态。请联系你的网站空间服务商,以确认此类外出连接是允许的。<b>你无法使用SPARTACUS来下载、更新插件,除非你的网站服务器能够连上SPARTACUS插件库。</b></p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<p>SPARTACUS可以连接到Google,但无法连接到SPARTACUS插件库。这可能是因为你的服务器禁止某些外出连接(outgoing connections),或者SPARTACUS插件库运行状态网站目前处于瘫痪状态。请联系你的网站空间服务商,以确认此类外出连接是允许的。<b>你无法使用SPARTACUS来下载、更新插件,除非你的网站服务器能够连上SPARTACUS插件库。</b></p>'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '文件/镜像 地址 (XML元数据(metadata))'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '文件/镜像 地址 (文件)'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '选择一个下载点。不要修改这个设置,除非你知道你正在做什么,或者你目前使用的下载点已经失效了。这个设置存在的主要目的是为了向前兼容。'); @@ -33,4 +33,5 @@ @define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', '无法从Spartacus插件库下载所需文件,但是该插件库的运行状态显示该插件库运行正常。这意味着你的网站空间服务商使用了基于访问内容的防火墙,通过mod_security或其他反向代理(reverse proxy)来禁止从网络上下载或获取PHP代码。你需要请你的空间服务商关闭它;否则的话,你无法使用Spartacus插件,从而不得不手动下载相关文件。'); @define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', '使用Spartacus来下载插件?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', '使用Spartacus来下载主题?'); \ No newline at end of file +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', '使用Spartacus来下载主题?'); + diff --git a/plugins/serendipity_event_spartacus/lang_cn.inc.php b/plugins/serendipity_event_spartacus/lang_cn.inc.php index b6c6d7c6..6b5aa7fb 100644 --- a/plugins/serendipity_event_spartacus/lang_cn.inc.php +++ b/plugins/serendipity_event_spartacus/lang_cn.inc.php @@ -10,10 +10,10 @@ @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', '成功获取相关数据'); @define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '<br />(插件库返回如下错误代码 %s 。)<br />'); @define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<p>无法从SPARTACUS插件库中获取到数据。正在在 %s 上面检查插件库状态信息。</p>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<P>SPARTACUS插件库运行状态网站返回了一个错误代码 (HTTP代码 %s)。这意味着SPARTACUS插件库运行状态网站目前处于瘫痪状态。请稍后重新尝试。</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<p>SPARTACUS插件库运行状态网站返回了一个错误代码 (HTTP代码 %s)。这意味着SPARTACUS插件库运行状态网站目前处于瘫痪状态。请稍后重新尝试。</p>'); @define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<p><a target="_blank" href="%s">点击此处访问SPARTACUS插件库运行状态网站</a>, 并确认该网站是否在正常运行中。</p>'); @define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<p>SPARTACUS尝试连接到Google,但是失败了(错误 %d: %s)。<br />你的服务器禁止外出连接(outgoing connections)。无法连接到SPARTACUS插件库,因此SPARTACUS无法正常工作以下载、更新插件。<b>请联系你的网站空间服务商,要求他们允许通过使用外出连接连接到其他网站。</b></p><p>你依然可以从本地目录安装插件。只要从<a href="http://spartacus.s9y.org">SPARTACUS网上插件库</a>下载相关插件,将它解压缩并上传到你的Serendipity的插件目录中</p>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<P>SPARTACUS可以连接到Google,但无法连接到SPARTACUS插件库。这可能是因为你的服务器禁止某些外出连接(outgoing connections),或者SPARTACUS插件库运行状态网站目前处于瘫痪状态。请联系你的网站空间服务商,以确认此类外出连接是允许的。<b>你无法使用SPARTACUS来下载、更新插件,除非你的网站服务器能够连上SPARTACUS插件库。</b></p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<p>SPARTACUS可以连接到Google,但无法连接到SPARTACUS插件库。这可能是因为你的服务器禁止某些外出连接(outgoing connections),或者SPARTACUS插件库运行状态网站目前处于瘫痪状态。请联系你的网站空间服务商,以确认此类外出连接是允许的。<b>你无法使用SPARTACUS来下载、更新插件,除非你的网站服务器能够连上SPARTACUS插件库。</b></p>'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '文件/镜像 地址 (XML元数据(metadata))'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '文件/镜像 地址 (文件)'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '选择一个下载点。不要修改这个设置,除非你知道你正在做什么,或者你目前使用的下载点已经失效了。这个设置存在的主要目的是为了向前兼容。'); @@ -33,4 +33,5 @@ @define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', '无法从Spartacus插件库下载所需文件,但是该插件库的运行状态显示该插件库运行正常。这意味着你的网站空间服务商使用了基于访问内容的防火墙,通过mod_security或其他反向代理(reverse proxy)来禁止从网络上下载或获取PHP代码。你需要请你的空间服务商关闭它;否则的话,你无法使用Spartacus插件,从而不得不手动下载相关文件。'); @define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', '使用Spartacus来下载插件?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', '使用Spartacus来下载主题?'); \ No newline at end of file +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', '使用Spartacus来下载主题?'); + diff --git a/plugins/serendipity_event_spartacus/lang_cs.inc.php b/plugins/serendipity_event_spartacus/lang_cs.inc.php index 8853ce20..ffd93b24 100644 --- a/plugins/serendipity_event_spartacus/lang_cs.inc.php +++ b/plugins/serendipity_event_spartacus/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # lang_cs.inc.php 2.1 2009-02-14 15:59:53 VladaAjgl $ +<?php /** * @version 2.1 @@ -9,58 +9,59 @@ * @revisionDate 2009/02/14 */ -@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus'); -@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - Umo��uje st�hnout a instalovat roz�i�uj�c� moduly (pluginy) z internetu'); -@define('PLUGIN_EVENT_SPARTACUS_FETCH', 'Klikn�te zde pro st�hnut� nov�ch %s z internetov� online datab�ze - Serendipity Online Repository'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'URL %s nelze otev��t. Server Serendipity nebo SourceForge.net mo�n� neb�� - omlouv�me se, zkuste to pozd�ji.'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'Pokus o otev�en� URL %s...'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'P�ijato %s byt� z v��e uveden� URL. Ukl�d�n� souboru jako %s...'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'P�ijato %s byt� z ji� existuj�c�ho souboru na Va�em serveru. Ukl�d�n� souboru jako %s...'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Data �sp�n� sta�ena.'); -@define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '<br />(On-line �lo�i�t� vr�tilo chybu %s.)<br />'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<P>Nebylo mo�no z�skat data z on-line �lo�i�t� modulu Spartacus. Zkou�ka dostupnosti �lo�i�t� na adrese %s.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<P>Diagnstick� str�nka modulu Spartacus vr�tilo chybu (HTTP k�d %s). To m��e znamenat, �e je dignostick� str�nka mimo provoz. Zkuste to pros�m pozd�ji.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<P><a target="_blank" href="%s">Klikn�te zde pro zobrazen� diagnstick� str�nky modulu Spartacus</a> a zjist�te, zda odpov�d�.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<P>SPARTACUS se pokusil p�ipojit ke Googlu, ale ne�sp�n� (chyba �.%d: %s).<br/>V� server blokuje odchoz� spojen�. SPARTACUS nebude fungovat, proto�e se nem��e p�ipojit do sv�ho online �lo�i�t�. <b>Kontaktujte pros�m sv�ho poskytovatele webhostingu a po��dejte ho o povolen� odchoz�ch p�ipojen� k jin�m webov�m str�nk�m.</b></P><P>Z�suvn� moduly lze instalovat z lok�ln�ch adres���. Jednodu�e st�hn�te nejnov�j�� verzi pluginu z <a href="http://spartacus.s9y.org">SPARTACUS online �lo�i�t�</a>, rozbalte ho a nap��klad pomoc� FTP nahrajte do adres��e /plugins/ ve Va�� instalaci Serendipity.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<P>Modulu SPARTACUS se poda�ilo spojit s Googlem, ale nem��e se spojit s on-line �lo�i�t�m modulu SPARTACUS. Je mo�n�, �e V� server blokuje n�kter� odchoz� spojen�, nebo je on-line �lo�i�t� mimo provoz. Spojte se se sv�m poskytovatelem webov�ho serveru, abyste se ujistili, �e nem�te blokov�na odchoz� spojen�. <b>SPARTACUS nebude fungovat, proto�e nem��e kontaktovat on-line �lo�i�t�.</b></P>'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'Um�st�n� soubor�/(mirror server) (XML metadata)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'Um�st�n� soubor�/(mirror server) (soubory)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Vyberte, odkud stahovat. NEM��TE tuto hodnotu, pokud opravdu dob�e nev�te, co d�l�te a jestli server orpavdu funguje. Tato volba je p��stupn� pro teprve pl�novan� funkce.'); -@define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'Vlastn�k stahovan�ch soubor�'); -@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Zde m��ete zadat (FTP/Shell) vlastn�ka soubor� (jako nap�. "nobody") sta�en�ch pomoc� Spartacus pluginu. Pokud je nevypln�n�, nejsou prov�d�ny ��dn� zm�ny vlastn�ka.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'P��stupov� pr�va sta�en�ch soubor�.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', 'Zde m��ete zadat hodnotu p��stupov�ch pr�v v osmi�kov� soustav� (jako "0777") pro soubory (FTP/Shell) sta�en� pomoc� pluginy Spartacus. Pokud je pole ponech�no pr�zdn�, bude pou�ito standardn� syst�mov� nastaven�. Pamatujte, �e ne v�echny webov� servery umo��uj� zm�nu pr�v. Nap�. servery ��c� v safe_mode m�du. M�jte na pam�ti, �e pr�va mus� umo�nit webov�mu u�ivateli, pod kter�m b�� PHP, pr�va �ten� a z�pisu souboru. Jinak nebude modul Spartacus schopen p�epsat star� soubory.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'P��stupov� pr�va sta�en�ch adres���'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Zde m��ete zadat hodnotu p��stupov�ch pr�v v osmi�kov� soustav� (jako "0777") pro adres��e (FTP/Shell) sta�en� pomoc� pluginy Spartacus. Pokud je pole ponech�no pr�zdn�, bude pou�ito standardn� syst�mov� nastaven�. Pamatujte, �e ne v�echny webov� servery umo��uj� zm�nu pr�v. Nap�. servery ��c� v safe_mode m�du. M�jte na pam�ti, �e pr�va mus� umo�nit webov�mu u�ivateli, pod kter�m b�� PHP, pr�va �ten� a z�pisu souboru. Jinak nebude modul Spartacus schopen vytvo�it nov� adres��e.'); +@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus'); +@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - Umo��uje st�hnout a instalovat roz�i�uj�c� moduly (pluginy) z internetu'); +@define('PLUGIN_EVENT_SPARTACUS_FETCH', 'Klikn�te zde pro st�hnut� nov�ch %s z internetov� online datab�ze - Serendipity Online Repository'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'URL %s nelze otev��t. Server Serendipity nebo SourceForge.net mo�n� neb�� - omlouv�me se, zkuste to pozd�ji.'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'Pokus o otev�en� URL %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'P�ijato %s byt� z v��e uveden� URL. Ukl�d�n� souboru jako %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'P�ijato %s byt� z ji� existuj�c�ho souboru na Va�em serveru. Ukl�d�n� souboru jako %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Data �sp�n� sta�ena.'); +@define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '<br />(On-line �lo�i�t� vr�tilo chybu %s.)<br />'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<p>Nebylo mo�no z�skat data z on-line �lo�i�t� modulu Spartacus. Zkou�ka dostupnosti �lo�i�t� na adrese %s.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<p>Diagnstick� str�nka modulu Spartacus vr�tilo chybu (HTTP k�d %s). To m��e znamenat, �e je dignostick� str�nka mimo provoz. Zkuste to pros�m pozd�ji.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<p><a target="_blank" href="%s">Klikn�te zde pro zobrazen� diagnstick� str�nky modulu Spartacus</a> a zjist�te, zda odpov�d�.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<p>SPARTACUS se pokusil p�ipojit ke Googlu, ale ne�sp�n� (chyba �.%d: %s).<br/>V� server blokuje odchoz� spojen�. SPARTACUS nebude fungovat, proto�e se nem��e p�ipojit do sv�ho online �lo�i�t�. <b>Kontaktujte pros�m sv�ho poskytovatele webhostingu a po��dejte ho o povolen� odchoz�ch p�ipojen� k jin�m webov�m str�nk�m.</b></p><p>Z�suvn� moduly lze instalovat z lok�ln�ch adres���. Jednodu�e st�hn�te nejnov�j�� verzi pluginu z <a href="http://spartacus.s9y.org">SPARTACUS online �lo�i�t�</a>, rozbalte ho a nap��klad pomoc� FTP nahrajte do adres��e /plugins/ ve Va�� instalaci Serendipity.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<p>Modulu SPARTACUS se poda�ilo spojit s Googlem, ale nem��e se spojit s on-line �lo�i�t�m modulu SPARTACUS. Je mo�n�, �e V� server blokuje n�kter� odchoz� spojen�, nebo je on-line �lo�i�t� mimo provoz. Spojte se se sv�m poskytovatelem webov�ho serveru, abyste se ujistili, �e nem�te blokov�na odchoz� spojen�. <b>SPARTACUS nebude fungovat, proto�e nem��e kontaktovat on-line �lo�i�t�.</b></p>'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'Um�st�n� soubor�/(mirror server) (XML metadata)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'Um�st�n� soubor�/(mirror server) (soubory)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Vyberte, odkud stahovat. NEM��TE tuto hodnotu, pokud opravdu dob�e nev�te, co d�l�te a jestli server orpavdu funguje. Tato volba je p��stupn� pro teprve pl�novan� funkce.'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'Vlastn�k stahovan�ch soubor�'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Zde m��ete zadat (FTP/Shell) vlastn�ka soubor� (jako nap�. "nobody") sta�en�ch pomoc� Spartacus pluginu. Pokud je nevypln�n�, nejsou prov�d�ny ��dn� zm�ny vlastn�ka.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'P��stupov� pr�va sta�en�ch soubor�.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', 'Zde m��ete zadat hodnotu p��stupov�ch pr�v v osmi�kov� soustav� (jako "0777") pro soubory (FTP/Shell) sta�en� pomoc� pluginy Spartacus. Pokud je pole ponech�no pr�zdn�, bude pou�ito standardn� syst�mov� nastaven�. Pamatujte, �e ne v�echny webov� servery umo��uj� zm�nu pr�v. Nap�. servery ��c� v safe_mode m�du. M�jte na pam�ti, �e pr�va mus� umo�nit webov�mu u�ivateli, pod kter�m b�� PHP, pr�va �ten� a z�pisu souboru. Jinak nebude modul Spartacus schopen p�epsat star� soubory.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'P��stupov� pr�va sta�en�ch adres���'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Zde m��ete zadat hodnotu p��stupov�ch pr�v v osmi�kov� soustav� (jako "0777") pro adres��e (FTP/Shell) sta�en� pomoc� pluginy Spartacus. Pokud je pole ponech�no pr�zdn�, bude pou�ito standardn� syst�mov� nastaven�. Pamatujte, �e ne v�echny webov� servery umo��uj� zm�nu pr�v. Nap�. servery ��c� v safe_mode m�du. M�jte na pam�ti, �e pr�va mus� umo�nit webov�mu u�ivateli, pod kter�m b�� PHP, pr�va �ten� a z�pisu souboru. Jinak nebude modul Spartacus schopen vytvo�it nov� adres��e.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Vyhledat nov� pluginy pro postrann� sloupec.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Vyhledat nov� pluginy ud�lost�.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Rada: M��ete upgradovat v�ce roz�i�uj�c�ch modul� najednou na odkaz "upgrade" prost�edn�m tla��tkem my�i. Upgrade se otev�e v nov�m okn�/nov� z�lo�ce. Pamatujte, �e automatick� aktualizace v�ech roz�i�uj�c�ch modul� je �asov� n�ro�n� operace a m��e v�st k p�ekro�en� nastaven�ch �asov�ch limit� na serveru a z toho d�vodu k ne�pln� sta�en�m soubor�m. Proto tato funk�nost nen� z�m�rn� snadno p��stupn�.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Vyhledat nov� pluginy pro postrann� sloupec.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Vyhledat nov� pluginy ud�lost�.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Rada: M��ete upgradovat v�ce roz�i�uj�c�ch modul� najednou na odkaz "upgrade" prost�edn�m tla��tkem my�i. Upgrade se otev�e v nov�m okn�/nov� z�lo�ce. Pamatujte, �e automatick� aktualizace v�ech roz�i�uj�c�ch modul� je �asov� n�ro�n� operace a m��e v�st k p�ekro�en� nastaven�ch �asov�ch limit� na serveru a z toho d�vodu k ne�pln� sta�en�m soubor�m. Proto tato funk�nost nen� z�m�rn� snadno p��stupn�.'); -@define('PLUGIN_EVENT_SPARTACUS_TRYCURL', 'Pokus o pou�it� knihovny cURL jako z�lo�n�ho �e�en�...'); -@define('PLUGIN_EVENT_SPARTACUS_CURLFAIL', 'Knihovna cURL taky nefunguje :-/ ...'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', 'Nebylo mo�n� st�hnout soubory z on-line �lo�i�t� modulu SPARTACUS, nicm�n� se povedlo spojit se s �lo�i�t�m. To znamen�, �e V� poskytovatel nejsp�e pou��v� obsahov� filtr a neumo��uje st�hovat p�es web *.php soubory. Bu� mus�te Va�eho poskytovatele po��dat o vypnut� p��su�n�ch omezen� (jako mod_security nebo jin� "reverse proxy"), nebo stahujte pluginy ru�n�.'); +@define('PLUGIN_EVENT_SPARTACUS_TRYCURL', 'Pokus o pou�it� knihovny cURL jako z�lo�n�ho �e�en�...'); +@define('PLUGIN_EVENT_SPARTACUS_CURLFAIL', 'Knihovna cURL taky nefunguje :-/ ...'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', 'Nebylo mo�n� st�hnout soubory z on-line �lo�i�t� modulu SPARTACUS, nicm�n� se povedlo spojit se s �lo�i�t�m. To znamen�, �e V� poskytovatel nejsp�e pou��v� obsahov� filtr a neumo��uje st�hovat p�es web *.php soubory. Bu� mus�te Va�eho poskytovatele po��dat o vypnut� p��su�n�ch omezen� (jako mod_security nebo jin� "reverse proxy"), nebo stahujte pluginy ru�n�.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', 'Povolit stahov�n� roz�i�uj�c�ch modul� pomoc� modulu SPARTACUS?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Povolit stahov�n� �ablon pomoc� modulu SPARTACUS?'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', 'Povolit stahov�n� roz�i�uj�c�ch modul� pomoc� modulu SPARTACUS?'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Povolit stahov�n� �ablon pomoc� modulu SPARTACUS?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Povolit vzd�len� prohl�en� informac� o verz�ch plugin�'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Pokud je povoleno, n�v�t�vn�ci %s si mohou zobrazit informace o verz�ch v�ech nainstalovan�ch plugin. Nen� �patn� n�pad ochr�nit tuto URL adresu pomoc� souboru .htaccess proti ne��douc�m p��stup�m.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Tajn� k�d ke vzd�len�mu p��stupu k informac�m o verz�ch plugin�'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Zadejte speci�ln� URI komponentu, kterou mus� lid� zn�t a zadat, aby mohli zobrazit informace o verz�ch plugin�.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Povolit vzd�len� prohl�en� informac� o verz�ch plugin�'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Pokud je povoleno, n�v�t�vn�ci %s si mohou zobrazit informace o verz�ch v�ech nainstalovan�ch plugin. Nen� �patn� n�pad ochr�nit tuto URL adresu pomoc� souboru .htaccess proti ne��douc�m p��stup�m.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Tajn� k�d ke vzd�len�mu p��stupu k informac�m o verz�ch plugin�'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Zadejte speci�ln� URI komponentu, kterou mus� lid� zn�t a zadat, aby mohli zobrazit informace o verz�ch plugin�.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'Chyba FTP: Nepoda�ilo se p�ipojit k FTP.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'Chyba FTP: Adres�� (%s) nelze vytvo�it'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'Chyba FTP: Nelze nastavit pr�va u adres��e (%s).'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Adres�� (%s) byl �sp�n� vytvo�en.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'Chyba FTP: Nepoda�ilo se p�ipojit k FTP.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'Chyba FTP: Adres�� (%s) nelze vytvo�it'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'Chyba FTP: Nelze nastavit pr�va u adres��e (%s).'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Adres�� (%s) byl �sp�n� vytvo�en.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Pou��t vytv��en� adres��� p�es FTP?'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Pokud V�m b�� PHP v "safe_mode", mus�te se pod��dit jist�m omezen�m. Tato omezen� maj� zjednodue�en� �e�eno za v�sledek, �e pokud vytvo��te adres�� obvyklou cestou, nelze do n�j zapisovat. Ale pokud vytv���te adres�� pomoc� FTP ��tu, pak toto omezen� neplat�. Pokud m�te zapnut� safe_mode, je vytv��en� adres��� p�es FTP prakticky jedinou cestou, jak m�t mo�nost �sp�n� pou��vat SPARTACUS a upload soubor�.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'Adresa FTP serveru'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'U�ivatelsk� jm�no k FTP'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'Heslo k FTP'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP cesta k adres��i Serendipity'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Pokud se k serveru p�ipojujete p�es FTP, nemus�te se nutn� p�ipojit do adres��e Serendipity. Zde tedy mus�te specifikovat cestu k adres��i Srendipity od adres��e, do kter�ho se FTP p�ihla�uje.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Pou��t vytv��en� adres��� p�es FTP?'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Pokud V�m b�� PHP v "safe_mode", mus�te se pod��dit jist�m omezen�m. Tato omezen� maj� zjednodue�en� �e�eno za v�sledek, �e pokud vytvo��te adres�� obvyklou cestou, nelze do n�j zapisovat. Ale pokud vytv���te adres�� pomoc� FTP ��tu, pak toto omezen� neplat�. Pokud m�te zapnut� safe_mode, je vytv��en� adres��� p�es FTP prakticky jedinou cestou, jak m�t mo�nost �sp�n� pou��vat SPARTACUS a upload soubor�.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'Adresa FTP serveru'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'U�ivatelsk� jm�no k FTP'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'Heslo k FTP'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP cesta k adres��i Serendipity'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Pokud se k serveru p�ipojujete p�es FTP, nemus�te se nutn� p�ipojit do adres��e Serendipity. Zde tedy mus�te specifikovat cestu k adres��i Srendipity od adres��e, do kter�ho se FTP p�ihla�uje.'); + +@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'Um�st�n� zrcadel (mirrors)'); +@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Tuto volbu pou��vejte jen pokud opravdu v�te, co d�l�te, jste-li zku�en� u�ivatel. Pokud jsou p�ednastaven� mirror servery vypnut� nebo nepracuj� spr�vn�, Serendipity se pokus� p�ipojit k V�mi zadan�m mirror server�m (t�eba m��ete zadat http://mirror.org/serendipity/). Tyto servery mus� um�t zpracov�vat XML soubory na �rovni URL adresy a mus� obsahovat podadres��e "additional_plugins" a "additional_themes". Zad�vejte pouze mirror servery, kter�m v���te a kter� pln� zrcadl� v�echny soubory CVS �lo�i�t� Serendipity. Lze zadat v�ce zrcadel, odd�len�ch "|".'); -@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'Um�st�n� zrcadel (mirrors)'); -@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Tuto volbu pou��vejte jen pokud opravdu v�te, co d�l�te, jste-li zku�en� u�ivatel. Pokud jsou p�ednastaven� mirror servery vypnut� nebo nepracuj� spr�vn�, Serendipity se pokus� p�ipojit k V�mi zadan�m mirror server�m (t�eba m��ete zadat http://mirror.org/serendipity/). Tyto servery mus� um�t zpracov�vat XML soubory na �rovni URL adresy a mus� obsahovat podadres��e "additional_plugins" a "additional_themes". Zad�vejte pouze mirror servery, kter�m v���te a kter� pln� zrcadl� v�echny soubory CVS �lo�i�t� Serendipity. Lze zadat v�ce zrcadel, odd�len�ch "|".'); diff --git a/plugins/serendipity_event_spartacus/lang_cz.inc.php b/plugins/serendipity_event_spartacus/lang_cz.inc.php index 5c607431..c202162f 100644 --- a/plugins/serendipity_event_spartacus/lang_cz.inc.php +++ b/plugins/serendipity_event_spartacus/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # lang_cz.inc.php 2.1 2009-02-14 15:59:53 VladaAjgl $ +<?php /** * @version 2.1 @@ -9,58 +9,59 @@ * @revisionDate 2009/02/14 */ -@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus'); -@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - Umo��uje st�hnout a instalovat roz�i�uj�c� moduly (pluginy) z internetu'); -@define('PLUGIN_EVENT_SPARTACUS_FETCH', 'Klikn�te zde pro st�hnut� nov�ch %s z internetov� online datab�ze - Serendipity Online Repository'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'URL %s nelze otev��t. Server Serendipity nebo SourceForge.net mo�n� neb�� - omlouv�me se, zkuste to pozd�ji.'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'Pokus o otev�en� URL %s...'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'P�ijato %s byt� z v��e uveden� URL. Ukl�d�n� souboru jako %s...'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'P�ijato %s byt� z ji� existuj�c�ho souboru na Va�em serveru. Ukl�d�n� souboru jako %s...'); -@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Data �sp�n� sta�ena.'); -@define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '<br />(On-line �lo�i�t� vr�tilo chybu %s.)<br />'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<P>Nebylo mo�no z�skat data z on-line �lo�i�t� modulu Spartacus. Zkou�ka dostupnosti �lo�i�t� na adrese %s.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<P>Diagnstick� str�nka modulu Spartacus vr�tilo chybu (HTTP k�d %s). To m��e znamenat, �e je dignostick� str�nka mimo provoz. Zkuste to pros�m pozd�ji.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<P><a target="_blank" href="%s">Klikn�te zde pro zobrazen� diagnstick� str�nky modulu Spartacus</a> a zjist�te, zda odpov�d�.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<P>SPARTACUS se pokusil p�ipojit ke Googlu, ale ne�sp�n� (chyba �.%d: %s).<br/>V� server blokuje odchoz� spojen�. SPARTACUS nebude fungovat, proto�e se nem��e p�ipojit do sv�ho online �lo�i�t�. <b>Kontaktujte pros�m sv�ho poskytovatele webhostingu a po��dejte ho o povolen� odchoz�ch p�ipojen� k jin�m webov�m str�nk�m.</b></P><P>Z�suvn� moduly lze instalovat z lok�ln�ch adres���. Jednodu�e st�hn�te nejnov�j�� verzi pluginu z <a href="http://spartacus.s9y.org">SPARTACUS online �lo�i�t�</a>, rozbalte ho a nap��klad pomoc� FTP nahrajte do adres��e /plugins/ ve Va�� instalaci Serendipity.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<P>Modulu SPARTACUS se poda�ilo spojit s Googlem, ale nem��e se spojit s on-line �lo�i�t�m modulu SPARTACUS. Je mo�n�, �e V� server blokuje n�kter� odchoz� spojen�, nebo je on-line �lo�i�t� mimo provoz. Spojte se se sv�m poskytovatelem webov�ho serveru, abyste se ujistili, �e nem�te blokov�na odchoz� spojen�. <b>SPARTACUS nebude fungovat, proto�e nem��e kontaktovat on-line �lo�i�t�.</b></P>'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'Um�st�n� soubor�/(mirror server) (XML metadata)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'Um�st�n� soubor�/(mirror server) (soubory)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Vyberte, odkud stahovat. NEM��TE tuto hodnotu, pokud opravdu dob�e nev�te, co d�l�te a jestli server orpavdu funguje. Tato volba je p��stupn� pro teprve pl�novan� funkce.'); -@define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'Vlastn�k stahovan�ch soubor�'); -@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Zde m��ete zadat (FTP/Shell) vlastn�ka soubor� (jako nap�. "nobody") sta�en�ch pomoc� Spartacus pluginu. Pokud je nevypln�n�, nejsou prov�d�ny ��dn� zm�ny vlastn�ka.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'P��stupov� pr�va sta�en�ch soubor�.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', 'Zde m��ete zadat hodnotu p��stupov�ch pr�v v osmi�kov� soustav� (jako "0777") pro soubory (FTP/Shell) sta�en� pomoc� pluginy Spartacus. Pokud je pole ponech�no pr�zdn�, bude pou�ito standardn� syst�mov� nastaven�. Pamatujte, �e ne v�echny webov� servery umo��uj� zm�nu pr�v. Nap�. servery ��c� v safe_mode m�du. M�jte na pam�ti, �e pr�va mus� umo�nit webov�mu u�ivateli, pod kter�m b�� PHP, pr�va �ten� a z�pisu souboru. Jinak nebude modul Spartacus schopen p�epsat star� soubory.'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'P��stupov� pr�va sta�en�ch adres���'); -@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Zde m��ete zadat hodnotu p��stupov�ch pr�v v osmi�kov� soustav� (jako "0777") pro adres��e (FTP/Shell) sta�en� pomoc� pluginy Spartacus. Pokud je pole ponech�no pr�zdn�, bude pou�ito standardn� syst�mov� nastaven�. Pamatujte, �e ne v�echny webov� servery umo��uj� zm�nu pr�v. Nap�. servery ��c� v safe_mode m�du. M�jte na pam�ti, �e pr�va mus� umo�nit webov�mu u�ivateli, pod kter�m b�� PHP, pr�va �ten� a z�pisu souboru. Jinak nebude modul Spartacus schopen vytvo�it nov� adres��e.'); +@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus'); +@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - Umo��uje st�hnout a instalovat roz�i�uj�c� moduly (pluginy) z internetu'); +@define('PLUGIN_EVENT_SPARTACUS_FETCH', 'Klikn�te zde pro st�hnut� nov�ch %s z internetov� online datab�ze - Serendipity Online Repository'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'URL %s nelze otev��t. Server Serendipity nebo SourceForge.net mo�n� neb�� - omlouv�me se, zkuste to pozd�ji.'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'Pokus o otev�en� URL %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'P�ijato %s byt� z v��e uveden� URL. Ukl�d�n� souboru jako %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'P�ijato %s byt� z ji� existuj�c�ho souboru na Va�em serveru. Ukl�d�n� souboru jako %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Data �sp�n� sta�ena.'); +@define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '<br />(On-line �lo�i�t� vr�tilo chybu %s.)<br />'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<p>Nebylo mo�no z�skat data z on-line �lo�i�t� modulu Spartacus. Zkou�ka dostupnosti �lo�i�t� na adrese %s.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<p>Diagnstick� str�nka modulu Spartacus vr�tilo chybu (HTTP k�d %s). To m��e znamenat, �e je dignostick� str�nka mimo provoz. Zkuste to pros�m pozd�ji.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<p><a target="_blank" href="%s">Klikn�te zde pro zobrazen� diagnstick� str�nky modulu Spartacus</a> a zjist�te, zda odpov�d�.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<p>SPARTACUS se pokusil p�ipojit ke Googlu, ale ne�sp�n� (chyba �.%d: %s).<br/>V� server blokuje odchoz� spojen�. SPARTACUS nebude fungovat, proto�e se nem��e p�ipojit do sv�ho online �lo�i�t�. <b>Kontaktujte pros�m sv�ho poskytovatele webhostingu a po��dejte ho o povolen� odchoz�ch p�ipojen� k jin�m webov�m str�nk�m.</b></p><p>Z�suvn� moduly lze instalovat z lok�ln�ch adres���. Jednodu�e st�hn�te nejnov�j�� verzi pluginu z <a href="http://spartacus.s9y.org">SPARTACUS online �lo�i�t�</a>, rozbalte ho a nap��klad pomoc� FTP nahrajte do adres��e /plugins/ ve Va�� instalaci Serendipity.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<p>Modulu SPARTACUS se poda�ilo spojit s Googlem, ale nem��e se spojit s on-line �lo�i�t�m modulu SPARTACUS. Je mo�n�, �e V� server blokuje n�kter� odchoz� spojen�, nebo je on-line �lo�i�t� mimo provoz. Spojte se se sv�m poskytovatelem webov�ho serveru, abyste se ujistili, �e nem�te blokov�na odchoz� spojen�. <b>SPARTACUS nebude fungovat, proto�e nem��e kontaktovat on-line �lo�i�t�.</b></p>'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'Um�st�n� soubor�/(mirror server) (XML metadata)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'Um�st�n� soubor�/(mirror server) (soubory)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Vyberte, odkud stahovat. NEM��TE tuto hodnotu, pokud opravdu dob�e nev�te, co d�l�te a jestli server orpavdu funguje. Tato volba je p��stupn� pro teprve pl�novan� funkce.'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'Vlastn�k stahovan�ch soubor�'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Zde m��ete zadat (FTP/Shell) vlastn�ka soubor� (jako nap�. "nobody") sta�en�ch pomoc� Spartacus pluginu. Pokud je nevypln�n�, nejsou prov�d�ny ��dn� zm�ny vlastn�ka.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'P��stupov� pr�va sta�en�ch soubor�.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', 'Zde m��ete zadat hodnotu p��stupov�ch pr�v v osmi�kov� soustav� (jako "0777") pro soubory (FTP/Shell) sta�en� pomoc� pluginy Spartacus. Pokud je pole ponech�no pr�zdn�, bude pou�ito standardn� syst�mov� nastaven�. Pamatujte, �e ne v�echny webov� servery umo��uj� zm�nu pr�v. Nap�. servery ��c� v safe_mode m�du. M�jte na pam�ti, �e pr�va mus� umo�nit webov�mu u�ivateli, pod kter�m b�� PHP, pr�va �ten� a z�pisu souboru. Jinak nebude modul Spartacus schopen p�epsat star� soubory.'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'P��stupov� pr�va sta�en�ch adres���'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Zde m��ete zadat hodnotu p��stupov�ch pr�v v osmi�kov� soustav� (jako "0777") pro adres��e (FTP/Shell) sta�en� pomoc� pluginy Spartacus. Pokud je pole ponech�no pr�zdn�, bude pou�ito standardn� syst�mov� nastaven�. Pamatujte, �e ne v�echny webov� servery umo��uj� zm�nu pr�v. Nap�. servery ��c� v safe_mode m�du. M�jte na pam�ti, �e pr�va mus� umo�nit webov�mu u�ivateli, pod kter�m b�� PHP, pr�va �ten� a z�pisu souboru. Jinak nebude modul Spartacus schopen vytvo�it nov� adres��e.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Vyhledat nov� pluginy pro postrann� sloupec.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Vyhledat nov� pluginy ud�lost�.'); -@define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Rada: M��ete upgradovat v�ce roz�i�uj�c�ch modul� najednou na odkaz "upgrade" prost�edn�m tla��tkem my�i. Upgrade se otev�e v nov�m okn�/nov� z�lo�ce. Pamatujte, �e automatick� aktualizace v�ech roz�i�uj�c�ch modul� je �asov� n�ro�n� operace a m��e v�st k p�ekro�en� nastaven�ch �asov�ch limit� na serveru a z toho d�vodu k ne�pln� sta�en�m soubor�m. Proto tato funk�nost nen� z�m�rn� snadno p��stupn�.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Vyhledat nov� pluginy pro postrann� sloupec.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Vyhledat nov� pluginy ud�lost�.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Rada: M��ete upgradovat v�ce roz�i�uj�c�ch modul� najednou na odkaz "upgrade" prost�edn�m tla��tkem my�i. Upgrade se otev�e v nov�m okn�/nov� z�lo�ce. Pamatujte, �e automatick� aktualizace v�ech roz�i�uj�c�ch modul� je �asov� n�ro�n� operace a m��e v�st k p�ekro�en� nastaven�ch �asov�ch limit� na serveru a z toho d�vodu k ne�pln� sta�en�m soubor�m. Proto tato funk�nost nen� z�m�rn� snadno p��stupn�.'); -@define('PLUGIN_EVENT_SPARTACUS_TRYCURL', 'Pokus o pou�it� knihovny cURL jako z�lo�n�ho �e�en�...'); -@define('PLUGIN_EVENT_SPARTACUS_CURLFAIL', 'Knihovna cURL taky nefunguje :-/ ...'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', 'Nebylo mo�n� st�hnout soubory z on-line �lo�i�t� modulu SPARTACUS, nicm�n� se povedlo spojit se s �lo�i�t�m. To znamen�, �e V� poskytovatel nejsp��e pou��v� obsahov� filtr a neumo��uje st�hovat p�es web *.php soubory. Bu� mus�te Va�eho poskytovatele po��dat o vypnut� p��su�n�ch omezen� (jako mod_security nebo jin� "reverse proxy"), nebo stahujte pluginy ru�n�.'); +@define('PLUGIN_EVENT_SPARTACUS_TRYCURL', 'Pokus o pou�it� knihovny cURL jako z�lo�n�ho �e�en�...'); +@define('PLUGIN_EVENT_SPARTACUS_CURLFAIL', 'Knihovna cURL taky nefunguje :-/ ...'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', 'Nebylo mo�n� st�hnout soubory z on-line �lo�i�t� modulu SPARTACUS, nicm�n� se povedlo spojit se s �lo�i�t�m. To znamen�, �e V� poskytovatel nejsp��e pou��v� obsahov� filtr a neumo��uje st�hovat p�es web *.php soubory. Bu� mus�te Va�eho poskytovatele po��dat o vypnut� p��su�n�ch omezen� (jako mod_security nebo jin� "reverse proxy"), nebo stahujte pluginy ru�n�.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', 'Povolit stahov�n� roz�i�uj�c�ch modul� pomoc� modulu SPARTACUS?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Povolit stahov�n� �ablon pomoc� modulu SPARTACUS?'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', 'Povolit stahov�n� roz�i�uj�c�ch modul� pomoc� modulu SPARTACUS?'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Povolit stahov�n� �ablon pomoc� modulu SPARTACUS?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Povolit vzd�len� prohl��en� informac� o verz�ch plugin�'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Pokud je povoleno, n�v�t�vn�ci %s si mohou zobrazit informace o verz�ch v�ech nainstalovan�ch plugin. Nen� �patn� n�pad ochr�nit tuto URL adresu pomoc� souboru .htaccess proti ne��douc�m p��stup�m.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Tajn� k�d ke vzd�len�mu p��stupu k informac�m o verz�ch plugin�'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Zadejte speci�ln� URI komponentu, kterou mus� lid� zn�t a zadat, aby mohli zobrazit informace o verz�ch plugin�.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Povolit vzd�len� prohl��en� informac� o verz�ch plugin�'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Pokud je povoleno, n�v�t�vn�ci %s si mohou zobrazit informace o verz�ch v�ech nainstalovan�ch plugin. Nen� �patn� n�pad ochr�nit tuto URL adresu pomoc� souboru .htaccess proti ne��douc�m p��stup�m.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Tajn� k�d ke vzd�len�mu p��stupu k informac�m o verz�ch plugin�'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Zadejte speci�ln� URI komponentu, kterou mus� lid� zn�t a zadat, aby mohli zobrazit informace o verz�ch plugin�.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'Chyba FTP: Nepoda�ilo se p�ipojit k FTP.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'Chyba FTP: Adres�� (%s) nelze vytvo�it'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'Chyba FTP: Nelze nastavit pr�va u adres��e (%s).'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Adres�� (%s) byl �sp�n� vytvo�en.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'Chyba FTP: Nepoda�ilo se p�ipojit k FTP.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'Chyba FTP: Adres�� (%s) nelze vytvo�it'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'Chyba FTP: Nelze nastavit pr�va u adres��e (%s).'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Adres�� (%s) byl �sp�n� vytvo�en.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Pou��t vytv��en� adres��� p�es FTP?'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Pokud V�m b�� PHP v "safe_mode", mus�te se pod��dit jist�m omezen�m. Tato omezen� maj� zjednodue�en� �e�eno za v�sledek, �e pokud vytvo��te adres�� obvyklou cestou, nelze do n�j zapisovat. Ale pokud vytv���te adres�� pomoc� FTP ��tu, pak toto omezen� neplat�. Pokud m�te zapnut� safe_mode, je vytv��en� adres��� p�es FTP prakticky jedinou cestou, jak m�t mo�nost �sp�n� pou��vat SPARTACUS a upload soubor�.'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'Adresa FTP serveru'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'U�ivatelsk� jm�no k FTP'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'Heslo k FTP'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP cesta k adres��i Serendipity'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Pokud se k serveru p�ipojujete p�es FTP, nemus�te se nutn� p�ipojit do adres��e Serendipity. Zde tedy mus�te specifikovat cestu k adres��i Srendipity od adres��e, do kter�ho se FTP p�ihla�uje.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Pou��t vytv��en� adres��� p�es FTP?'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Pokud V�m b�� PHP v "safe_mode", mus�te se pod��dit jist�m omezen�m. Tato omezen� maj� zjednodue�en� �e�eno za v�sledek, �e pokud vytvo��te adres�� obvyklou cestou, nelze do n�j zapisovat. Ale pokud vytv���te adres�� pomoc� FTP ��tu, pak toto omezen� neplat�. Pokud m�te zapnut� safe_mode, je vytv��en� adres��� p�es FTP prakticky jedinou cestou, jak m�t mo�nost �sp�n� pou��vat SPARTACUS a upload soubor�.'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'Adresa FTP serveru'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'U�ivatelsk� jm�no k FTP'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'Heslo k FTP'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP cesta k adres��i Serendipity'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Pokud se k serveru p�ipojujete p�es FTP, nemus�te se nutn� p�ipojit do adres��e Serendipity. Zde tedy mus�te specifikovat cestu k adres��i Srendipity od adres��e, do kter�ho se FTP p�ihla�uje.'); + +@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'Um�st�n� zrcadel (mirrors)'); +@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Tuto volbu pou��vejte jen pokud opravdu v�te, co d�l�te, jste-li zku�en� u�ivatel. Pokud jsou p�ednastaven� mirror servery vypnut� nebo nepracuj� spr�vn�, Serendipity se pokus� p�ipojit k V�mi zadan�m mirror server�m (t�eba m��ete zadat http://mirror.org/serendipity/). Tyto servery mus� um�t zpracov�vat XML soubory na �rovni URL adresy a mus� obsahovat podadres��e "additional_plugins" a "additional_themes". Zad�vejte pouze mirror servery, kter�m v���te a kter� pln� zrcadl� v�echny soubory CVS �lo�i�t� Serendipity. Lze zadat v�ce zrcadel, odd�len�ch "|".'); -@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'Um�st�n� zrcadel (mirrors)'); -@define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Tuto volbu pou��vejte jen pokud opravdu v�te, co d�l�te, jste-li zku�en� u�ivatel. Pokud jsou p�ednastaven� mirror servery vypnut� nebo nepracuj� spr�vn�, Serendipity se pokus� p�ipojit k V�mi zadan�m mirror server�m (t�eba m��ete zadat http://mirror.org/serendipity/). Tyto servery mus� um�t zpracov�vat XML soubory na �rovni URL adresy a mus� obsahovat podadres��e "additional_plugins" a "additional_themes". Zad�vejte pouze mirror servery, kter�m v���te a kter� pln� zrcadl� v�echny soubory CVS �lo�i�t� Serendipity. Lze zadat v�ce zrcadel, odd�len�ch "|".'); diff --git a/plugins/serendipity_event_spartacus/lang_de.inc.php b/plugins/serendipity_event_spartacus/lang_de.inc.php index 1568e2af..e8c18dda 100644 --- a/plugins/serendipity_event_spartacus/lang_de.inc.php +++ b/plugins/serendipity_event_spartacus/lang_de.inc.php @@ -1,4 +1,4 @@ -<?php # lang_de.inc.php 1.0 2009-06-03 09:57:42 VladaAjgl $ +<?php /** * @version 1.0 @@ -23,16 +23,17 @@ @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', 'Hier kann der Oktagonale Dateimodus (z.B: "0777") f�r von Spartacus heruntergeladene Dateien angegeben werden. Falls dieser Wert leergelassen wird, verwendet Serendipity die Standardmaske des Systems. Nicht alle Server unterst�tzen eine �nderung dieser Dateirechte. Stellen Sie unbedingt sicher, dass die von Ihnen gew�hlten Rechte das Lesen und Schreiben des Webserver-Benutzers weiterhin erlauben - sonst k�nnte Serendipity/Spartacus keine bestehenden Dateien �berschreiben.'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Zugriffsrechte der heruntergeladenen Verzeichnisse'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Hier kann der Oktagonale Dateimodus (z.B: "0777") f�r von Spartacus heruntergeladene Verzeichnisse angegeben werden. Falls dieser Wert leergelassen wird, verwendet Serendipity die Standardmaske des Systems. Nicht alle Server unterst�tzen eine �nderung dieser Verzeichnisrechte. Stellen Sie unbedingt sicher, dass die von Ihnen gew�hlten Rechte das Lesen und Schreiben des Webserver-Benutzers weiterhin erlauben - sonst k�nnte Serendipity/Spartacus keine bestehenden Dateien �berschreiben.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK', 'Plugins updaten'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Updates (Seitenleisten-Plugins)'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Updates (Ereignis-Plugins)'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Sie k�nnen mehrere Plugins auf einmal installieren indem sie diesen Link in einem neuen Tab �ffnen (mittlerer Mausbutton)'); @define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '<br />(Der Mirror-Speicherort antwortet mit Fehler %s.)<br />'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<P>Die Daten des Spartacus-Speicherorts konnte nicht empfangen werden. Pr�fe Verf�gbarkeit der Quelle...</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<P>Die Pr�fung der Verf�gbarkeit einer Spartacus-Quelle konnte nicht durchgef�hrt werden (HTTP-Code %s). Bitte probieren Sie es sp�ter wieder.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<P><a target="_blank" href="%s">Klicken Sie hier um die Spartacus-Verf�gbarkeitspr�fung anzusehen</a> und dessen Erreichbarkeit zu �berpr�fen.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<P>SPARTACUS konnte keine Test-Verbindung zu Google herstellen (Fehler %d: %s).<br />Ihr Server blockiert vermutlich ausgehende Verbindungen. SPARTACUS kann so nicht ausgef�hrt werden, da so auf keine der SPARTACUS-Quellen zugegriffen werden kann. <b>Bitte kontaktieren Sie ihren Web-Provider und bitten ihn, ausgehende HTTP-Verbindungen zuzulassen.</b></P><P>Plugins k�nnen nach wie vor auch lokal installiert werden. Laden Sie dazu einfach ein Plugin von <a href="http://spartacus.s9y.org">der SPARTACUS Webseite</a> runter, entpacken es und laden es in ihr Serendipity "plugin"-Verzeichnis hoch.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<P>SPARTACUS konnte eine Teste-Verbindung zu Google herstellen, aber nicht zum Spartacus-Speicherort. M�glicherweise blockiert ihr Server ausgehende Verbindungen, oder die Spartacus-Quelle ist nicht erreichbar. Kontaktieren Sie bitte ihren Web-Provider um sicherzustellen, dass ausgehende HTTP-Verbindungen m�glich sind. <b>Sie k�nnen SPARTACUS erst nutzen, wenn ihr Server auf die Spartacus-Speicherorte zugreifen kann.</b></P>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<p>Die Daten des Spartacus-Speicherorts konnte nicht empfangen werden. Pr�fe Verf�gbarkeit der Quelle...</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<p>Die Pr�fung der Verf�gbarkeit einer Spartacus-Quelle konnte nicht durchgef�hrt werden (HTTP-Code %s). Bitte probieren Sie es sp�ter wieder.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<p><a target="_blank" href="%s">Klicken Sie hier um die Spartacus-Verf�gbarkeitspr�fung anzusehen</a> und dessen Erreichbarkeit zu �berpr�fen.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<p>SPARTACUS konnte keine Test-Verbindung zu Google herstellen (Fehler %d: %s).<br />Ihr Server blockiert vermutlich ausgehende Verbindungen. SPARTACUS kann so nicht ausgef�hrt werden, da so auf keine der SPARTACUS-Quellen zugegriffen werden kann. <b>Bitte kontaktieren Sie ihren Web-Provider und bitten ihn, ausgehende HTTP-Verbindungen zuzulassen.</b></p><p>Plugins k�nnen nach wie vor auch lokal installiert werden. Laden Sie dazu einfach ein Plugin von <a href="http://spartacus.s9y.org">der SPARTACUS Webseite</a> herunter, entpacken es und laden es in ihr Serendipity "plugins"-Verzeichnis hoch.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<p>SPARTACUS konnte eine Teste-Verbindung zu Google herstellen, aber nicht zum Spartacus-Speicherort. M�glicherweise blockiert ihr Server ausgehende Verbindungen, oder die Spartacus-Quelle ist nicht erreichbar. Kontaktieren Sie bitte ihren Web-Provider um sicherzustellen, dass ausgehende HTTP-Verbindungen m�glich sind. <b>Sie k�nnen SPARTACUS erst nutzen, wenn ihr Server auf die Spartacus-Speicherorte zugreifen kann.</b></p>'); @define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR', 'Eigene Mirror-Quelle'); @define('PLUGIN_EVENT_SPARTACUS_CUSTOMMIRROR_DESC', 'Diese Option ist nur f�r Experten gedacht. Falls keiner der voreingestellten Mirror-Server aufgrund von Downtime oder Problemen verf�gbar ist, kann hier ein eigener Server-Name wie http://mirror.org/serendipity/ eingetragen werden. Dort m�ssten die XML-Dateien f�r Spartacus im Verzeichnis liegen, und Unterverzeichnisse wie additional_plugins und additional_themes existieren. Geben Sie nur Mirrors hier ein, denen Sie vertrauen, auf denen eine Kopie unseres CVS-Repositories gespeichert ist. Mehrere Mirrors k�nnen mit "|" getrennt eingegeben werden.'); @@ -45,16 +46,16 @@ @define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', 'Spartacus verwenden, um Themes zu laden?'); @define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE', 'Fernabfrage f�r Versions-Informationen der Plugins zulassen?'); @define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_DESC', 'Wenn aktiviert, k�nnen Besucher von %s Versions-Informationen �ber alle installierten Plugins abrufen. Es wird dringend empfohlen, diese URL mittels benutzerdefinierten .htaccess Regeln vor unauthorisiertem Zugriff zu sch�tzen.'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Pfad zum Fernabruf der Versions-Information der Plugins'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'gibt den letzten Teil der URI an, welche die Benutzer wissen m�ssen, um den Fernabruf der Versions-Informationen durchzuf�hren.'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL', 'Pfad zum Fernabruf der Versions-Information'); +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_REMOTE_URL_DESC', 'Gibt den letzten ("geheimen") Teil der URI an, welche die Benutzer wissen m�ssen, um den Fernabruf der Versions-Informationen durchzuf�hren.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT', 'FTP Fehler: Kann nicht per FTP verbinden.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR', 'FTP Fehler: Kann das Verzeichnis (%s) nicht anlegen.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CHMOD', 'FTP Fehler: Kann die Verzeichnisrechte von (%s) nicht �ndern.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_SUCCESS', 'FTP: Verzeichnis (%s) erfolgreich angelegt.'); @define('PLUGIN_EVENT_SPARTACUS_FTP_USE', 'Lege Verzeichnis unter Verwendung von FTP an?'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Wenn PHP im safe_mode l�uft, gelten einige Einschr�nkungen. Das Ergebnis dieser Einschr�nkungen ist, das in ein Verzeichnis, welches auf normale Weise erstellt wurde, nicht hochgeladen werden kann. Wird das Verzeichnis aber per FTP angelegt wurde, funtkioniert es. Wenn also am Webserver safe_mode = on eingestellt ist, ist dies der einzige Weg um SPARTACUS zu nmutzen bzw. Mediendateien (Bilder usw.) hochzuladen. Die folgenden Zugangsdaten f�r Ihren Server m�ssen dazu ausgef�llt werden'); +@define('PLUGIN_EVENT_SPARTACUS_FTP_USE_DESC', 'Wenn PHP im safe_mode l�uft, gelten einige Einschr�nkungen. Das Ergebnis dieser Einschr�nkungen ist, das in ein Verzeichnis, welches auf normale Weise erstellt wurde, nicht hochgeladen werden kann. Wird das Verzeichnis aber per FTP angelegt wurde, funtkioniert es. Wenn also am Webserver safe_mode = on eingestellt ist, ist dies der einzige Weg um SPARTACUS zu nutzen bzw. Mediendateien (Bilder usw.) hochzuladen. Die folgenden Zugangsdaten f�r Ihren Server m�ssen dazu ausgef�llt werden'); @define('PLUGIN_EVENT_SPARTACUS_FTP_SERVER', 'FTP Serveradresse'); @define('PLUGIN_EVENT_SPARTACUS_FTP_USERNAME', 'FTP Benutzername'); @define('PLUGIN_EVENT_SPARTACUS_FTP_PASS', 'FTP Passwort'); @define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR', 'FTP Serendipity Verzeichnis'); -@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Beim Login �ber FTP ist das Startverzeichnis nicht notwendigerweise das Serendipity-Verzeichnis. In diesem Fall ist es hier m�glch, den Pfad vom FTP-Verzeichnis zum Serendipity-Verzeichnis anzugeben.'); \ No newline at end of file +@define('PLUGIN_EVENT_SPARTACUS_FTP_BASEDIR_DESC', 'Beim Login �ber FTP ist das Startverzeichnis nicht notwendigerweise das Serendipity-Verzeichnis. In diesem Fall ist es hier m�glch, den Pfad vom FTP-Verzeichnis zum Serendipity-Verzeichnis anzugeben.'); diff --git a/plugins/serendipity_event_spartacus/lang_en.inc.php b/plugins/serendipity_event_spartacus/lang_en.inc.php index 42993a1d..fadd4873 100644 --- a/plugins/serendipity_event_spartacus/lang_en.inc.php +++ b/plugins/serendipity_event_spartacus/lang_en.inc.php @@ -1,7 +1,7 @@ <?php /** - * @version $Revision$ + * @version * @author Translator Name <yourmail@example.com> * EN-Revision: Revision of lang_en.inc.php */ @@ -15,11 +15,11 @@ @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'Fetched %s bytes from already existing file on your server. Saving file as %s...'); @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Data successfully fetched.'); @define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '<br />(The repository returned error code %s.)<br />'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<P>Unable to retrieve data from SPARTACUS repository. Checking for repository availability on %s.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<P>The SPARTACUS health site returned an error (HTTP code %s). This indicates that the SPARTACUS health site is down. Please try again later.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<P><a target="_blank" href="%s">Click here to view the SPARTACUS health site</a> and determine if it is responding.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<P>SPARTACUS attempted to connect to Google and failed (error %d: %s).<br />Your server is blocking outgoing connections. SPARTACUS will not function because it cannot contact the SPARTACUS repository. <b>Please contact your website provider and ask them to allow outgoing connections to web sites.</b></P><P>Plugins can still be installed from your local directories. Simply download the plugin from <a href="http://spartacus.s9y.org">the SPARTACUS web repository</a>, unzip it, and upload the files to your Serendipity plugin directory.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<P>SPARTACUS can contact Google, but cannot contact the SPARATACUS repository. It is possible that your server is blocking some outgoing connections, or that the SPARTACUS health site is down. Please contact your website provider to ensure that outgoing connections are allowed. <b>You will not be able to use SPARTACUS unless your server can contact the SPARTACUS repository.</b></P>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<p>Unable to retrieve data from SPARTACUS repository. Checking for repository availability on %s.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<p>The SPARTACUS health site returned an error (HTTP code %s). This indicates that the SPARTACUS health site is down. Please try again later.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<p><a target="_blank" href="%s">Click here to view the SPARTACUS health site</a> and determine if it is responding.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<p>SPARTACUS attempted to connect to Google and failed (error %d: %s).<br />Your server is blocking outgoing connections. SPARTACUS will not function because it cannot contact the SPARTACUS repository. <b>Please contact your website provider and ask them to allow outgoing connections to web sites.</b></p><p>Plugins can still be installed from your local directories. Simply download the plugin from <a href="http://spartacus.s9y.org">the SPARTACUS web repository</a>, unzip it, and upload the files to your Serendipity plugin directory.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<p>SPARTACUS can contact Google, but cannot contact the SPARATACUS repository. It is possible that your server is blocking some outgoing connections, or that the SPARTACUS health site is down. Please contact your website provider to ensure that outgoing connections are allowed. <b>You will not be able to use SPARTACUS unless your server can contact the SPARTACUS repository.</b></p>'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'File/Mirror location (XML metadata)'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'File/Mirror location (files)'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Choose a download location. Do NOT change this value unless you know what you are doing and if servers get oudated. This option is available mainly for forward compatibility.'); @@ -30,6 +30,7 @@ @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Permissions downloaded directories'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Here you can enter the octal mode (like "0777") of the directory permissions for directories (FTP/Shell) downloaded by Spartacus. If empty, the default permission mask of the system are used. Note that not all servers allow changing/setting permissions. Pay attention that the applied permissions allow reading and writing for the webserver user. Else spartacus/Serendipity cannot overwrite existing directories.'); +@define('PLUGIN_EVENT_SPARTACUS_CHECK', 'Update plugins'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Update sidebar plugins'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Update event plugins'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'You can upgrade multiple plugins at once by opening the update-link in a new tab (middle mouse button)'); diff --git a/plugins/serendipity_event_spartacus/lang_es.inc.php b/plugins/serendipity_event_spartacus/lang_es.inc.php index 27ea6dac..3316978a 100644 --- a/plugins/serendipity_event_spartacus/lang_es.inc.php +++ b/plugins/serendipity_event_spartacus/lang_es.inc.php @@ -1,6 +1,6 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -23,4 +23,3 @@ @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Permisos de los directorios descargados'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Aqu� puedes ingresar los permisos de los directorios (FTP/Shell) descargados por Spartacus en modo octal (por ejemplo "0777"). Si lo dejas vac�o, los permisos por defecto del sistema ser�n utilizados. Nota que no todos los servidores permiten definir/cambiar permisos. Presta atenci�n que los permisos aplicados permiten la lectura y escritura por parte del usuario del webserver. Fuera de eso spartacus/Serendipity no puede sobreescribir directorios existentes.'); -?> diff --git a/plugins/serendipity_event_spartacus/lang_fr.inc.php b/plugins/serendipity_event_spartacus/lang_fr.inc.php index 652301e3..f7199fa5 100644 --- a/plugins/serendipity_event_spartacus/lang_fr.inc.php +++ b/plugins/serendipity_event_spartacus/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -32,5 +32,3 @@ @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Permissions des r�pertoires t�l�charg�s'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Ici vous pouvez entrer le mode octal (comme "0777" par ex.) pour les r�pertoires t�l�charg�s. Si vous laissez ce champs vide, les permissions par d�faut de votre serveur seront utilis�s. Notez que tous les serveurs ne permettent pas de changer les permissions de r�pertoire. Faites attention aussi que les permissions que vous d�finissez permettent encore � Serendipity d\'acc�der aux r�pertoires.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_spartacus/lang_is.inc.php b/plugins/serendipity_event_spartacus/lang_is.inc.php index 2028e4ef..588566eb 100644 --- a/plugins/serendipity_event_spartacus/lang_is.inc.php +++ b/plugins/serendipity_event_spartacus/lang_is.inc.php @@ -1,10 +1,11 @@ -<?php # $Id$ +<?php + +@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus'); +@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - Leyfir ��r a� s�kja vi�b�tur �r netgagnabankanum okkar'); +@define('PLUGIN_EVENT_SPARTACUS_FETCH', 'Smelltu h�r til a� s�kja n�ja %s �r Serendipity netgagnabankanum'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'Sl��in %s gat ekki veri� opnu�. Kannski er Serendipity e�a SourceForge.net �j�nnin ni�ri - vi� bi�jumst afs�kunar, �� �arft a� reyna aftur s��ar.'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'Reyni a� opna sl��ina %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'S�tti %s byte fr� ofangreindri sl��. Vista�i skr� sem %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'S�tti %s byte fr� skr� sem var �egar til � �j�ninum ��num. Vista�i skr� sem %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Ni�urhali gagna loki�.'); - @define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus'); - @define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - Leyfir ��r a� s�kja vi�b�tur �r netgagnabankanum okkar'); - @define('PLUGIN_EVENT_SPARTACUS_FETCH', 'Smelltu h�r til a� s�kja n�ja %s �r Serendipity netgagnabankanum'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', 'Sl��in %s gat ekki veri� opnu�. Kannski er Serendipity e�a SourceForge.net �j�nnin ni�ri - vi� bi�jumst afs�kunar, �� �arft a� reyna aftur s��ar.'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHING', 'Reyni a� opna sl��ina %s...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', 'S�tti %s byte fr� ofangreindri sl��. Vista�i skr� sem %s...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'S�tti %s byte fr� skr� sem var �egar til � �j�ninum ��num. Vista�i skr� sem %s...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Ni�urhali gagna loki�.'); diff --git a/plugins/serendipity_event_spartacus/lang_ja.inc.php b/plugins/serendipity_event_spartacus/lang_ja.inc.php index 5dc4908f..ce36aeb8 100644 --- a/plugins/serendipity_event_spartacus/lang_ja.inc.php +++ b/plugins/serendipity_event_spartacus/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 1325 */ @@ -27,4 +27,4 @@ @define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Check for new sidebar plugins'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Check for new event plugins'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Hint: You can upgrade multiple plugins at once by clicking the upgrade-link with your middle mouse button, so that it opens in a new window/tab of your browser. Note that upgrading all plugins automatically could lead to network timeouts and garbaged files, thus this functionality does not exist intentionally.'); -?> + diff --git a/plugins/serendipity_event_spartacus/lang_ko.inc.php b/plugins/serendipity_event_spartacus/lang_ko.inc.php index 47e2b891..a023bbe4 100644 --- a/plugins/serendipity_event_spartacus/lang_ko.inc.php +++ b/plugins/serendipity_event_spartacus/lang_ko.inc.php @@ -1,17 +1,16 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus(스파르타쿠스)'); - @define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem (세렌디피티 플러그인 접근 보관소 도구 및 개인화/통합화 시스템) - 온라인 보관소에서 플러그인을 다운로드받을 수 있게 함'); - @define('PLUGIN_EVENT_SPARTACUS_FETCH', '세렌디피티 온라인 보관소에서 새로운 %s(을)를 받으려면 여기를 누르십시오.'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', '인터넷 주소 %s 에 접속할 수 없었습니다. 세렌디피티나 소스포지 서버가 다운된 것 같습니다. 죄송하지만 잠시 후 재시도하시기 바랍니다.'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHING', '인터넷 주소 %s 에 접속 시도중...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', '위의 주소에서 %s 바이트를 받았습니다. 파일을 %s(으)로 저장하는 중...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', '서버에 이미 존재하는 파일에서 %s 바이트를 받았습니다. 파일을 %s(으)로 저장하는 중...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', '데이터를 성공적으로 받았습니다.'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '파일/미러 위치 (XML 메타데이터)'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '파일/미러 위치 (파일)'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '다운로드 위치를 정합니다. 어떻게 작업해야 하는지 알고 있고 서버 정보가 바뀌었을 경우가 아니라면 이 값을 바꾸지 마십시오. 이 옵션은 상위 호환성을 위해 존재합니다.'); +@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus(스파르타쿠스)'); +@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem (세렌디피티 플러그인 접근 보관소 도구 및 개인화/통합화 시스템) - 온라인 보관소에서 플러그인을 다운로드받을 수 있게 함'); +@define('PLUGIN_EVENT_SPARTACUS_FETCH', '세렌디피티 온라인 보관소에서 새로운 %s(을)를 받으려면 여기를 누르십시오.'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', '인터넷 주소 %s 에 접속할 수 없었습니다. 세렌디피티나 소스포지 서버가 다운된 것 같습니다. 죄송하지만 잠시 후 재시도하시기 바랍니다.'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHING', '인터넷 주소 %s 에 접속 시도중...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', '위의 주소에서 %s 바이트를 받았습니다. 파일을 %s(으)로 저장하는 중...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', '서버에 이미 존재하는 파일에서 %s 바이트를 받았습니다. 파일을 %s(으)로 저장하는 중...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', '데이터를 성공적으로 받았습니다.'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '파일/미러 위치 (XML 메타데이터)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '파일/미러 위치 (파일)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '다운로드 위치를 정합니다. 어떻게 작업해야 하는지 알고 있고 서버 정보가 바뀌었을 경우가 아니라면 이 값을 바꾸지 마십시오. 이 옵션은 상위 호환성을 위해 존재합니다.'); -?> diff --git a/plugins/serendipity_event_spartacus/lang_pl.inc.php b/plugins/serendipity_event_spartacus/lang_pl.inc.php index 0d66c8b6..7cc06e60 100644 --- a/plugins/serendipity_event_spartacus/lang_pl.inc.php +++ b/plugins/serendipity_event_spartacus/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -15,14 +15,14 @@ @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', 'Pobrano %s bajt�w z ju� istniej�cego pliku na Twoim serwerze. Zapisuj� plik jako %s...'); @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', 'Pobieranie danych zako�czone sukcesem.'); @define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '<br />(repozytorium zwr�ci�o kod b��du %s.)<br />'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<P>Nie mog� pobra� danych z repozytorium SPARTACUSa. Sprawdzam dost�pno�� repozytorium.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<P>Strona z informacj� o dost�pno�ci repozytori�w dla SPARTACUSa zwr�ci�a b��d (kod HTTP %s). To oznacza, �e strona aktualnie nie funkcjonuje. Prosz� spr�bowa� ponownie p�niej.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<P><a target="_blank" href="%s">Kliknij tutaj</a> by zobaczy� stron� z informacj� o dost�pno�ci repozytori�w dla SPARTACUSa i sprawd�, czy strona odpowiada.</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<P>SPARTACUS pr�bowa� po��czy� si� z Google i nie powiod�a si� ta operacja (b��d %d: %s).<br />Tw�j serwer blokuje po��czenia wychodz�ce. Your server is blocking outgoing connections. SPARTACUS nie b�dzie funkcjonowa� prawid�owo poniewa� nie mo�e skontaktowa� si� z repozytorium. <b>Prosz�, skontaktuj si� z providerem i popro� o zezwolenie na po��czenia wychodz�ce z serwera.</b></P><P>Wtyczki mog� by� oczywi�cie instalowane bezpo�rednio z katalog�w na serwerze. Po prostu pobierz wtyczk� z <a href="http://spartacus.s9y.org">repozytorium SPARTACUSa</a>, rozpakuj, wgraj rozpakowany katalog do katalogu wtyczek (plugins).</P>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<P>SPARTACUS mo�e po��czy� si� z Google ale nie mo�e po��czy� si� z repozytorium. Jest mo�liwe, �e Tw�j serwer blokuje pewne po��czenia wychodz�ce albo �e strona z repozytorium SPARTACUSa aktualnie nie dzia�a. Skontaktuj si� z firm� hostuj�c� Twoj� stron� i upewnij si�, �e po��czenia wychodz�ce s� dozwolone. <b>Nie b�dziesz m�g� u�ywa� SPARTACUSa dop�ki Tw�j serwer nie b�dzie m�g� kontaktowa� si� z repozytorium SPARTACUSa.</b></P>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<p>Nie mog� pobra� danych z repozytorium SPARTACUSa. Sprawdzam dost�pno�� repozytorium.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<p>Strona z informacj� o dost�pno�ci repozytori�w dla SPARTACUSa zwr�ci�a b��d (kod HTTP %s). To oznacza, �e strona aktualnie nie funkcjonuje. Prosz� spr�bowa� ponownie p�niej.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<p><a target="_blank" href="%s">Kliknij tutaj</a> by zobaczy� stron� z informacj� o dost�pno�ci repozytori�w dla SPARTACUSa i sprawd�, czy strona odpowiada.</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<p>SPARTACUS pr�bowa� po��czy� si� z Google i nie powiod�a si� ta operacja (b��d %d: %s).<br />Tw�j serwer blokuje po��czenia wychodz�ce. Your server is blocking outgoing connections. SPARTACUS nie b�dzie funkcjonowa� prawid�owo poniewa� nie mo�e skontaktowa� si� z repozytorium. <b>Prosz�, skontaktuj si� z providerem i popro� o zezwolenie na po��czenia wychodz�ce z serwera.</b></p><p>Wtyczki mog� by� oczywi�cie instalowane bezpo�rednio z katalog�w na serwerze. Po prostu pobierz wtyczk� z <a href="http://spartacus.s9y.org">repozytorium SPARTACUSa</a>, rozpakuj, wgraj rozpakowany katalog do katalogu wtyczek (plugins).</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<p>SPARTACUS mo�e po��czy� si� z Google ale nie mo�e po��czy� si� z repozytorium. Jest mo�liwe, �e Tw�j serwer blokuje pewne po��czenia wychodz�ce albo �e strona z repozytorium SPARTACUSa aktualnie nie dzia�a. Skontaktuj si� z firm� hostuj�c� Twoj� stron� i upewnij si�, �e po��czenia wychodz�ce s� dozwolone. <b>Nie b�dziesz m�g� u�ywa� SPARTACUSa dop�ki Tw�j serwer nie b�dzie m�g� kontaktowa� si� z repozytorium SPARTACUSa.</b></p>'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', 'Lokalizacja pliku/mirrora (metadane XML)'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', 'Lokalizacja pliku/mirrora (pliki)'); -@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Wybierz lokalizacj�, z kt�rej b�d� pobierane dane. NIE zmieniaj tej warto�ci o ile dobrze nie wiesz, co robisz i o ile serwer jest dost�pny. Opcja istnieje g��wnie dla kompatybilno�ci z przysz�ymi wersjami wtyczki.'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', 'Wybierz lokalizacj�, z kt�rej b�d� pobierane dane. NIE zmieniaj tej warto�ci o ile dobrze nie wiesz, co robisz i o ile serwer jest dost�pny. Opcja istnieje g��wnie dla kompatybilno�ci z przysz�ymi wersjami wtyczki.'); @define('PLUGIN_EVENT_SPARTACUS_CHOWN', 'W�a�ciciel pobranych plik�w'); @define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', 'Tu mo�esz poda� w�a�ciciela (jak np. "nobody") plik�w pobieranych i zapisywanych przez Spartacusa. Pozostawienie pustego pola nie spowoduje zmian uprawnie� do plik�w.'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD', 'Upraweniania pobieranych plik�w'); @@ -33,4 +33,4 @@ @define('PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR', 'Sprawd� czy s� nowe wtyczki Panelu bocznego'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_EVENT', 'Sprawd� czy s� nowe wtyczki Zdarze�'); @define('PLUGIN_EVENT_SPARTACUS_CHECK_HINT', 'Podpowied�: Mo�esz uaktualni� kilka wtyczek jednocze�nie klikaj�c link uaktualnienia �rodkowym klawiszem myszy, tak by otworzy� ten link w nowym oknie lub nowym tabie (zak�adce) przegl�darki. Zauwa�, �e uaktualnianie kilku wtyczek jednocze�nie mog�oby prowadzi� do timeout�w i problem�w z pobieraniem plik�w a w efekcie - nagromadzenia �mieci i potencjalnych problem�w. Dlatego taka funkcjonalno�� nie zosta�a zaimplementowana rozmy�lnie.'); -?> + diff --git a/plugins/serendipity_event_spartacus/lang_pt_PT.inc.php b/plugins/serendipity_event_spartacus/lang_pt_PT.inc.php index d43995c4..24239b75 100644 --- a/plugins/serendipity_event_spartacus/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_spartacus/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id:$ +<?php ########################################################################## # serendipity - another blogger... # @@ -30,5 +30,3 @@ @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', 'Permiss�es das directorias descarregadas'); @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', 'Aqui pode introduzir o modo octal (por exemplo "0777") das permiss�es de directorias (FTP/Shell) downloaded by Spartacus. descarregados pelo Spartacus. Se vazio, a m�scara de permiss�es por omiss�o do sistema � usada. Note que nem todos os servidores permitem definir ou alterar permiss�es. Note que as permiss�es aplicadas devem permitir leitura e escrita por parte do utilizador do servidor web. Al�m disso o spartacus/Serendipity n�o pode escrever sobre ficheiros existentes.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_spartacus/lang_tn.inc.php b/plugins/serendipity_event_spartacus/lang_tn.inc.php index 554bf8f7..68df2ead 100644 --- a/plugins/serendipity_event_spartacus/lang_tn.inc.php +++ b/plugins/serendipity_event_spartacus/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,21 +12,21 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus (外掛存庫)'); - @define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - 允許你從 s9y 的線上存庫下載外掛'); - @define('PLUGIN_EVENT_SPARTACUS_FETCH', '點這裡從 s9y 的外掛存庫安裝新 %s'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', '網址 %s 無法開啟。也許 s9y 或 SourceForge.net 的主機有問題 - 請稍後在試。'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHING', '打開網址 %s...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', '從上面的網址接收 %s 個位元組的資料。儲存成檔案 %s...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', '從主機內接收 %s 個位元組的資料。儲存成檔案 %s...'); - @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', '存取資料完成。'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '檔案/鏡像 位址 (XML metadata)'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '檔案/鏡像 位址 (檔案)'); - @define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '選擇一個下載點。不要改變這個設定值初非您了解它的作用。這個選項主要是為了相容性所設計。'); - @define('PLUGIN_EVENT_SPARTACUS_CHOWN', '下載檔案的擁有人'); - @define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', '這裡可以輸入 Spartacus 所下載的檔案 (FTP/Shell) 擁有人 (譬如 "nobody")。如果空白不會做任何改變。'); - @define('PLUGIN_EVENT_SPARTACUS_CHMOD', '下載檔案的權限'); - @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', '這裡可以輸入 Spartacus 所下載的檔案 (FTP/Shell) 權限 (譬如 "0777")。如果空白將會使用主機的預設權限。記得不是每個主機都允許改變權限。記得將權限改為可讀取和寫入檔案,不然 Spartacus/Serendipity 會無法覆蓋檔案和改變設定。'); - @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', '檔案目錄的權限'); - @define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', '這裡可以輸入 Spartacus 所下載的檔案的目錄 (FTP/Shell) 權限 (譬如 "0777")。如果空白將會使用主機的預設權限。記得不是每個主機都允許改變權限。記得將權限改為可讀取和寫入檔案,不然 Spartacus/Serendipity 會無法覆蓋檔案和改變設定。'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_SPARTACUS_NAME', 'Spartacus (外掛存庫)'); +@define('PLUGIN_EVENT_SPARTACUS_DESC', '[S]erendipity [P]lugin [A]ccess [R]epository [T]ool [A]nd [C]ustomization/[U]nification [S]ystem - 允許你從 s9y 的線上存庫下載外掛'); +@define('PLUGIN_EVENT_SPARTACUS_FETCH', '點這裡從 s9y 的外掛存庫安裝新 %s'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHERROR', '網址 %s 無法開啟。也許 s9y 或 SourceForge.net 的主機有問題 - 請稍後在試。'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHING', '打開網址 %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL', '從上面的網址接收 %s 個位元組的資料。儲存成檔案 %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE', '從主機內接收 %s 個位元組的資料。儲存成檔案 %s...'); +@define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', '存取資料完成。'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '檔案/鏡像 位址 (XML metadata)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '檔案/鏡像 位址 (檔案)'); +@define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '選擇一個下載點。不要改變這個設定值初非您了解它的作用。這個選項主要是為了相容性所設計。'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN', '下載檔案的擁有人'); +@define('PLUGIN_EVENT_SPARTACUS_CHOWN_DESC', '這裡可以輸入 Spartacus 所下載的檔案 (FTP/Shell) 擁有人 (譬如 "nobody")。如果空白不會做任何改變。'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD', '下載檔案的權限'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DESC', '這裡可以輸入 Spartacus 所下載的檔案 (FTP/Shell) 權限 (譬如 "0777")。如果空白將會使用主機的預設權限。記得不是每個主機都允許改變權限。記得將權限改為可讀取和寫入檔案,不然 Spartacus/Serendipity 會無法覆蓋檔案和改變設定。'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR', '檔案目錄的權限'); +@define('PLUGIN_EVENT_SPARTACUS_CHMOD_DIR_DESC', '這裡可以輸入 Spartacus 所下載的檔案的目錄 (FTP/Shell) 權限 (譬如 "0777")。如果空白將會使用主機的預設權限。記得不是每個主機都允許改變權限。記得將權限改為可讀取和寫入檔案,不然 Spartacus/Serendipity 會無法覆蓋檔案和改變設定。'); + diff --git a/plugins/serendipity_event_spartacus/lang_zh.inc.php b/plugins/serendipity_event_spartacus/lang_zh.inc.php index b6c6d7c6..6b5aa7fb 100644 --- a/plugins/serendipity_event_spartacus/lang_zh.inc.php +++ b/plugins/serendipity_event_spartacus/lang_zh.inc.php @@ -10,10 +10,10 @@ @define('PLUGIN_EVENT_SPARTACUS_FETCHED_DONE', '成功获取相关数据'); @define('PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR', '<br />(插件库返回如下错误代码 %s 。)<br />'); @define('PLUGIN_EVENT_SPARTACUS_HEALTHCHECK', '<p>无法从SPARTACUS插件库中获取到数据。正在在 %s 上面检查插件库状态信息。</p>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<P>SPARTACUS插件库运行状态网站返回了一个错误代码 (HTTP代码 %s)。这意味着SPARTACUS插件库运行状态网站目前处于瘫痪状态。请稍后重新尝试。</p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHERROR', '<p>SPARTACUS插件库运行状态网站返回了一个错误代码 (HTTP代码 %s)。这意味着SPARTACUS插件库运行状态网站目前处于瘫痪状态。请稍后重新尝试。</p>'); @define('PLUGIN_EVENT_SPARTACUS_HEALTHLINK', '<p><a target="_blank" href="%s">点击此处访问SPARTACUS插件库运行状态网站</a>, 并确认该网站是否在正常运行中。</p>'); @define('PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED', '<p>SPARTACUS尝试连接到Google,但是失败了(错误 %d: %s)。<br />你的服务器禁止外出连接(outgoing connections)。无法连接到SPARTACUS插件库,因此SPARTACUS无法正常工作以下载、更新插件。<b>请联系你的网站空间服务商,要求他们允许通过使用外出连接连接到其他网站。</b></p><p>你依然可以从本地目录安装插件。只要从<a href="http://spartacus.s9y.org">SPARTACUS网上插件库</a>下载相关插件,将它解压缩并上传到你的Serendipity的插件目录中</p>'); -@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<P>SPARTACUS可以连接到Google,但无法连接到SPARTACUS插件库。这可能是因为你的服务器禁止某些外出连接(outgoing connections),或者SPARTACUS插件库运行状态网站目前处于瘫痪状态。请联系你的网站空间服务商,以确认此类外出连接是允许的。<b>你无法使用SPARTACUS来下载、更新插件,除非你的网站服务器能够连上SPARTACUS插件库。</b></p>'); +@define('PLUGIN_EVENT_SPARTACUS_HEALTHDOWN', '<p>SPARTACUS可以连接到Google,但无法连接到SPARTACUS插件库。这可能是因为你的服务器禁止某些外出连接(outgoing connections),或者SPARTACUS插件库运行状态网站目前处于瘫痪状态。请联系你的网站空间服务商,以确认此类外出连接是允许的。<b>你无法使用SPARTACUS来下载、更新插件,除非你的网站服务器能够连上SPARTACUS插件库。</b></p>'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_XML', '文件/镜像 地址 (XML元数据(metadata))'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_FILES', '文件/镜像 地址 (文件)'); @define('PLUGIN_EVENT_SPARTACUS_MIRROR_DESC', '选择一个下载点。不要修改这个设置,除非你知道你正在做什么,或者你目前使用的下载点已经失效了。这个设置存在的主要目的是为了向前兼容。'); @@ -33,4 +33,5 @@ @define('PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED', '无法从Spartacus插件库下载所需文件,但是该插件库的运行状态显示该插件库运行正常。这意味着你的网站空间服务商使用了基于访问内容的防火墙,通过mod_security或其他反向代理(reverse proxy)来禁止从网络上下载或获取PHP代码。你需要请你的空间服务商关闭它;否则的话,你无法使用Spartacus插件,从而不得不手动下载相关文件。'); @define('PLUGIN_EVENT_SPARTACUS_ENABLE_PLUGINS', '使用Spartacus来下载插件?'); -@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', '使用Spartacus来下载主题?'); \ No newline at end of file +@define('PLUGIN_EVENT_SPARTACUS_ENABLE_THEMES', '使用Spartacus来下载主题?'); + diff --git a/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php b/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php index a6ac29f4..cc6ee16a 100644 --- a/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php +++ b/plugins/serendipity_event_spartacus/serendipity_event_spartacus.php @@ -8,6 +8,10 @@ ***********/ +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + @serendipity_plugin_api::load_language(dirname(__FILE__)); class serendipity_event_spartacus extends serendipity_event @@ -15,11 +19,6 @@ class serendipity_event_spartacus extends serendipity_event var $title = PLUGIN_EVENT_SPARTACUS_NAME; var $purgeCache = false; - function microtime_float() { - list($usec, $sec) = explode(" ", microtime()); - return ((float)$usec + (float)$sec); - } - function introspect(&$propbag) { global $serendipity; @@ -28,36 +27,36 @@ class serendipity_event_spartacus extends serendipity_event $propbag->add('description', PLUGIN_EVENT_SPARTACUS_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Garvin Hicking'); - $propbag->add('version', '2.32'); + $propbag->add('version', '2.37.3'); $propbag->add('requirements', array( - 'serendipity' => '0.9', - 'smarty' => '2.6.7', - 'php' => '4.1.0' + 'serendipity' => '1.6', )); $propbag->add('event_hooks', array( - 'backend_plugins_fetchlist' => true, - 'backend_plugins_fetchplugin' => true, + 'backend_plugins_fetchlist' => true, + 'backend_plugins_fetchplugin' => true, - 'backend_templates_fetchlist' => true, - 'backend_templates_fetchtemplate' => true, + 'backend_templates_fetchlist' => true, + 'backend_templates_fetchtemplate' => true, - 'backend_pluginlisting_header' => true, - - 'external_plugin' => true, + 'backend_pluginlisting_header' => true, - 'backend_directory_create' => true, - 'cronjob' => true, + 'external_plugin' => true, + + 'backend_directory_create' => true, + 'cronjob' => true, )); $propbag->add('groups', array('BACKEND_FEATURES')); $propbag->add('configuration', array('enable_plugins', 'enable_themes', 'enable_remote', 'remote_url', 'cronjob', 'mirror_xml', 'mirror_files', 'custommirror', 'chown', 'chmod_files', 'chmod_dir', 'use_ftp', 'ftp_server', 'ftp_username', 'ftp_password', 'ftp_basedir')); } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } - function cleanup() { + function cleanup() + { global $serendipity; // Purge DB cache @@ -77,20 +76,21 @@ class serendipity_event_spartacus extends serendipity_event } } - function &getMirrors($type = 'xml', $loc = false) { + function &getMirrors($type = 'xml', $loc = false) + { static $mirror = array( 'xml' => array( + 'github.com', 'Netmirror.org', - 's9y.org', - 'github.com' + 's9y.org' // 'openmirror.org' ), 'files' => array( + 'github.com', 'Netmirror.org', 'SourceForge.net', - 's9y.org', - 'github.com' + 's9y.org' // 'BerliOS.de (inactive)', // 'openmirror.org' ) @@ -98,26 +98,26 @@ class serendipity_event_spartacus extends serendipity_event static $http = array( 'xml' => array( - 'http://netmirror.org/mirror/serendipity/', - 'http://s9y.org/mirror/', 'https://raw.github.com/s9y/additional_plugins/master/', + 'http://netmirror.org/mirror/serendipity/', + 'http://s9y.org/mirror/' // 'http://openmirror.org/pub/s9y/', ), 'files' => array( + 'https://raw.github.com/s9y/', 'http://netmirror.org/mirror/serendipity/', 'http://php-blog.cvs.sourceforge.net/viewvc/php-blog/', - 'http://s9y.org/mirror/', - 'https://raw.github.com/s9y/', + 'http://s9y.org/mirror/' // 'http://svn.berlios.de/viewcvs/serendipity/', // 'http://openmirror.org/pub/s9y/', ), 'files_health' => array( + 'https://raw.github.com/' => 'https://raw.github.com/', 'http://netmirror.org/' => 'http://netmirror.org/mirror/serendipity/last.txt', 'http://php-blog.cvs.sourceforge.net/' => 'http://php-blog.cvs.sourceforge.net/viewvc/php-blog/serendipity/docs/LICENSE', - 'http://s9y.org/' => 'http://s9y.org/', - 'https://raw.github.com/' => 'https://raw.github.com/', + 'http://s9y.org/' => 'http://s9y.org/' // 'http://svn.berlios.de/' => 'http://svn.berlios.de/viewcvs/serendipity/', // 'http://openmirror.org/' => 'http://openmirror.org/pub/s9y/last.txt', ) @@ -130,7 +130,8 @@ class serendipity_event_spartacus extends serendipity_event } } - function introspect_config_item($name, &$propbag) { + function introspect_config_item($name, &$propbag) + { global $serendipity; switch($name) { @@ -142,7 +143,7 @@ class serendipity_event_spartacus extends serendipity_event $propbag->add('default', 'none'); $propbag->add('select_values', serendipity_event_cronjob::getValues()); } else { - $propbag->add('type', 'content'); + $propbag->add('type', 'content'); $propbag->add('default', PLUGIN_EVENT_SPARTACUS_CRONJOB); } break; @@ -231,7 +232,7 @@ class serendipity_event_spartacus extends serendipity_event } } break; - + case 'ftp_server': if (function_exists('ftp_connect')) { $propbag->add('type', 'string'); @@ -240,7 +241,7 @@ class serendipity_event_spartacus extends serendipity_event $propbag->add('default', ''); } break; - + case 'ftp_username': if (function_exists('ftp_connect')) { $propbag->add('type', 'string'); @@ -249,7 +250,7 @@ class serendipity_event_spartacus extends serendipity_event $propbag->add('default', ''); } break; - + case 'ftp_password': if (function_exists('ftp_connect')) { $propbag->add('type', 'string'); @@ -258,7 +259,7 @@ class serendipity_event_spartacus extends serendipity_event $propbag->add('default', ''); } break; - + case 'ftp_basedir': if (function_exists('ftp_connect')) { $propbag->add('type', 'string'); @@ -274,7 +275,8 @@ class serendipity_event_spartacus extends serendipity_event return true; } - function GetChildren(&$vals, &$i) { + function GetChildren(&$vals, &$i) + { $children = array(); $cnt = sizeof($vals); while (++$i < $cnt) { @@ -308,18 +310,20 @@ class serendipity_event_spartacus extends serendipity_event } // remove double slashes without breaking URL - protected function fixUrl($s) { + protected function fixUrl($s) + { return preg_replace('%([^:])([/]{2,})%', '\\1/', $s); } // Create recursive directories; begins at serendipity plugin root folder level - function rmkdir($dir, $sub = 'plugins') { + function rmkdir($dir, $sub = 'plugins') + { global $serendipity; if (serendipity_db_bool($this->get_config('use_ftp')) && $this->get_config('ftp_password') != '') { return $this->make_dir_via_ftp($dir); } - + $spaths = explode('/', $serendipity['serendipityPath'] . $sub . '/'); $paths = explode('/', $dir); @@ -342,7 +346,8 @@ class serendipity_event_spartacus extends serendipity_event } // Apply file permission settings. - function fileperm($stack, $is_dir) { + function fileperm($stack, $is_dir) + { $chmod_dir = intval($this->get_config('chmod_dir'), 8); $chmod_files = intval($this->get_config('chmod_files'), 8); $chown = $this->get_config('chown'); @@ -367,35 +372,37 @@ class serendipity_event_spartacus extends serendipity_event return true; } - function outputMSG($status, $msg) { + function outputMSG($status, $msg) + { global $serendipity; switch($status) { case 'notice': - echo '<span class="msg_notice"><span class="icon-info-circled"></span> '. $msg .'</span>' . "\n"; + echo '<span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> '. $msg .'</span>' . "\n"; break; case 'error': - echo '<span class="msg_error"><span class="icon-attention-circled"></span> '. $msg .'</span>' . "\n"; + echo '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> '. $msg .'</span>' . "\n"; if ($serendipity['ajax']) { // we need to set an actual error header so the ajax request can react to the error state header('HTTP/1.1 400'); } break; - default: case 'success': - echo '<span class="msg_success"><span class="icon-ok-circled"></span> '. $msg .'</span>' . "\n"; + default: + echo '<span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> '. $msg .'</span>' . "\n"; break; } } - function &fetchfile($url, $target, $cacheTimeout = 0, $decode_utf8 = false, $sub = 'plugins') { + function &fetchfile($url, $target, $cacheTimeout = 0, $decode_utf8 = false, $sub = 'plugins') + { global $serendipity; static $error = false; // Fix double URL strings. $url = preg_replace('@http(s)?:/@i', 'http\1://', str_replace('//', '/', $url)); - + // --JAM: Get the URL's IP in the most error-free way possible $url_parts = @parse_url($url); $url_hostname = 'localhost'; @@ -408,19 +415,28 @@ class serendipity_event_spartacus extends serendipity_event $data = file_get_contents($target); if (is_object($serendipity['logger'])) $serendipity['logger']->debug(sprintf(PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_CACHE, strlen($data), $target)); } else { - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; - $options = array('allowRedirects' => true, 'maxRedirects' => 5); + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; + $options = array('follow_redirects' => true, 'max_redirects' => 5); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } serendipity_plugin_api::hook_event('backend_http_request', $options, 'spartacus'); serendipity_request_start(); - $req = new HTTP_Request($url, $options); + $req = new HTTP_Request2($url, HTTP_Request2::METHOD_GET, $options); - if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') { + try { + $response = $req->send(); + if ($response->getStatus() != '200') { + throw new HTTP_Request2_Exception('Statuscode not 200, Akismet HTTP verification request failed.'); + } + } catch (HTTP_Request2_Exception $e) { $resolved_url = $url . ' (IP ' . $url_ip . ')'; $this->outputMSG('error', sprintf(PLUGIN_EVENT_SPARTACUS_FETCHERROR, $resolved_url)); //--JAM: START FIREWALL DETECTION - if ($req->getResponseCode()) { - $this->outputMSG('error', sprintf(PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR, $req->getResponseCode())); + if ($response->getStatus()) { + $this->outputMSG('error', sprintf(PLUGIN_EVENT_SPARTACUS_REPOSITORY_ERROR, $response->getStatus())); } $check_health = true; if (function_exists('curl_init')) { @@ -457,9 +473,16 @@ class serendipity_event_spartacus extends serendipity_event $health_options = $options; serendipity_plugin_api::hook_event('backend_http_request', $health_options, 'spartacus_health'); - $health_req = new HTTP_Request($health_url, $health_options); - $health_result = $health_req->sendRequest(); - if (PEAR::isError($health_result)) { + $health_req = new HTTP_Request2($health_url, HTTP_Request2::METHOD_GET, $health_options); + try { + $health_result = $health_req->send(); + if ($health_result->getStatus() != '200') { + $this->outputMSG('error', sprintf(PLUGIN_EVENT_SPARTACUS_HEALTHERROR, $health_req->getResponseCode())); + $this->outputMSG('notice', sprintf(PLUGIN_EVENT_SPARTACUS_HEALTHLINK, $health_url)); + } else { + $this->outputMSG('error', PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED); + } + } catch (HTTP_Request2_Exception $e) { $fp = @fsockopen('www.google.com', 80, $errno, $errstr); if (!$fp) { $this->outputMSG('error', sprintf(PLUGIN_EVENT_SPARTACUS_HEALTHBLOCKED, $errno, $errstr)); @@ -468,12 +491,6 @@ class serendipity_event_spartacus extends serendipity_event $this->outputMSG('notice', sprintf(PLUGIN_EVENT_SPARTACUS_HEALTHLINK, $health_url)); fclose($fp); } - } else if ($health_req->getResponseCode() != '200') { - $this->outputMSG('error', sprintf(PLUGIN_EVENT_SPARTACUS_HEALTHERROR, $health_req->getResponseCode())); - $this->outputMSG('notice', sprintf(PLUGIN_EVENT_SPARTACUS_HEALTHLINK, $health_url)); - } else { - $this->outputMSG('error', PLUGIN_EVENT_SPARTACUS_HEALTFIREWALLED); - //--JAM: Parse response and display it. } //--JAM: END FIREWALL DETECTION if (file_exists($target) && filesize($target) > 0) { @@ -483,7 +500,7 @@ class serendipity_event_spartacus extends serendipity_event } else { // Fetch file if (!$data) { - $data = $req->getResponseBody(); + $data = $response->getBody(); } if (is_object($serendipity['logger'])) $serendipity['logger']->debug(sprintf(PLUGIN_EVENT_SPARTACUS_FETCHED_BYTES_URL, strlen($data), $target)); $tdir = dirname($target); @@ -517,7 +534,8 @@ class serendipity_event_spartacus extends serendipity_event return $data; } - function decode(&$data, $force = false) { + function decode(&$data, $force = false) + { // xml_parser_* functions to recoding from ISO-8859-1/UTF-8 if ($force === false && (LANG_CHARSET == 'ISO-8859-1' || LANG_CHARSET == 'UTF-8')) { return true; @@ -542,7 +560,8 @@ class serendipity_event_spartacus extends serendipity_event } } - function &fetchOnline($type, $no_cache = false) { + function &fetchOnline($type, $no_cache = false) + { global $serendipity; switch($type) { @@ -583,7 +602,7 @@ class serendipity_event_spartacus extends serendipity_event $url = $server . '/package_' . $url_type . $lang . '.xml'; $target = $serendipity['serendipityPath'] . PATH_SMARTY_COMPILE . '/package_' . $url_type . $lang . '.xml'; - + $xml = $this->fetchfile($url, $target, $cacheTimeout, true); if (strlen($xml) > 0) { $valid = true; @@ -595,7 +614,7 @@ class serendipity_event_spartacus extends serendipity_event $url = $mirror . '/package_' . $url_type . $lang . '.xml'; $cacheTimeout = 60*60*12; // XML file is cached for half a day $target = $serendipity['serendipityPath'] . PATH_SMARTY_COMPILE . '/package_' . $url_type . $lang . '.xml'; - + $xml = $this->fetchfile($url, $target, $cacheTimeout, true); } @@ -665,7 +684,8 @@ class serendipity_event_spartacus extends serendipity_event return $tree; } - function &getCachedPlugins(&$plugins, $type) { + function &getCachedPlugins(&$plugins, $type) + { global $serendipity; static $pluginlist = null; @@ -697,7 +717,8 @@ class serendipity_event_spartacus extends serendipity_event return $pluginlist; } - function checkPlugin(&$data, &$plugins, $type) { + function checkPlugin(&$data, &$plugins, $type) + { $installable = true; $upgradeLink = ''; if (in_array($data['class_name'], $plugins)) { @@ -725,7 +746,8 @@ class serendipity_event_spartacus extends serendipity_event return true; } - function &buildList(&$tree, $type) { + function &buildList(&$tree, $type) + { $plugins = serendipity_plugin_api::get_installed_plugins(); if ($tree === 'cached') { @@ -743,54 +765,54 @@ class serendipity_event_spartacus extends serendipity_event foreach($subtree['children'] AS $child => $childtree) { if (is_array($childtree) && isset($childtree['tag'])) { - switch($childtree['tag']) { - case 'name': - $pluginstack[$i]['plugin_class'] = - $pluginstack[$i]['plugin_file'] = - $pluginstack[$i]['class_name'] = - $pluginstack[$i]['true_name'] = $childtree['value']; - break; + switch($childtree['tag']) { + case 'name': + $pluginstack[$i]['plugin_class'] = + $pluginstack[$i]['plugin_file'] = + $pluginstack[$i]['class_name'] = + $pluginstack[$i]['true_name'] = $childtree['value']; + break; - case 'summary': - $pluginstack[$i]['name'] = $childtree['value']; - break; + case 'summary': + $pluginstack[$i]['name'] = $childtree['value']; + break; - case 'website': - $pluginstack[$i]['website'] = $childtree['value']; - break; + case 'website': + $pluginstack[$i]['website'] = $childtree['value']; + break; - case 'changelog': - $pluginstack[$i]['changelog'] = $childtree['value']; - break; + case 'changelog': + $pluginstack[$i]['changelog'] = $childtree['value']; + break; - case 'groups': - $pluginstack[$i]['groups'] = explode(',', $childtree['value']); - break; + case 'groups': + $pluginstack[$i]['groups'] = explode(',', $childtree['value']); + break; - case 'description': - $pluginstack[$i]['description'] = $childtree['value']; - break; + case 'description': + $pluginstack[$i]['description'] = $childtree['value']; + break; - case 'release': - $pluginstack[$i]['version'] = $childtree['children'][0]['value']; + case 'release': + $pluginstack[$i]['version'] = $childtree['children'][0]['value']; - $pluginstack[$i]['requirements'] = array( - 'serendipity' => '', - 'php' => '', - 'smarty' => '' - ); + $pluginstack[$i]['requirements'] = array( + 'serendipity' => '', + 'php' => '', + 'smarty' => '' + ); - foreach((array)$childtree['children'] AS $relInfo) { - if (isset($relInfo['tag']) && $relInfo['tag'] == 'requirements:s9yVersion') { - $pluginstack[$i]['requirements']['serendipity'] = $relInfo['value']; + foreach((array)$childtree['children'] AS $relInfo) { + if (isset($relInfo['tag']) && $relInfo['tag'] == 'requirements:s9yVersion') { + $pluginstack[$i]['requirements']['serendipity'] = $relInfo['value']; + } } - } - break; + break; - case 'maintainers': - $pluginstack[$i]['author'] = $childtree['children'][0]['children'][0]['value']; // I dig my PHP arrays ;-) - break; - } + case 'maintainers': + $pluginstack[$i]['author'] = $childtree['children'][0]['children'][0]['value']; // I dig my PHP arrays ;-) + break; + } } } @@ -807,13 +829,19 @@ class serendipity_event_spartacus extends serendipity_event return $pluginstack; } - function checkArray(&$tree) { + function checkArray(&$tree) + { if (!is_array($tree) || !is_array($tree[0]['children'])) { - echo "DEBUG: The XML file could not be successfully parsed. Download or caching error. Please try again later or switch your XML/File mirror location. You can also try to go to the plugin configuration of the Spartacus Plugin and simply click on 'Save' - this will purge all cached XML files and try to download it again.<div style='display: none'>" . print_r($tree, true) . "</div><br />\n"; + $msg = "DEBUG: The XML file could not be successfully parsed. Download or caching error. " . + "Please try again later or switch your XML/File mirror location. ". + "You can also try to go to the plugin configuration of the Spartacus Plugin and simply click on 'Save' - this will purge all cached XML files and try to download it again.\n". + '<div style="display: none">' . print_r($tree, true) . "</div>\n"; + echo '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> '. $msg .'</span>' . "\n"; } } - function &buildTemplateList(&$tree) { + function &buildTemplateList(&$tree) + { global $serendipity; $pluginstack = array(); $i = 0; @@ -844,50 +872,37 @@ class serendipity_event_spartacus extends serendipity_event foreach($subtree['children'] AS $child => $childtree) { if (is_array($childtree) && isset($childtree['tag'])) { - switch($childtree['tag']) { - case 'name': - $pluginstack[$i]['name'] = $childtree['value']; - break; + switch($childtree['tag']) { + case 'release': + $pluginstack[$i]['version'] = $childtree['children'][0]['value']; - case 'summary': - $pluginstack[$i]['summary'] = $childtree['value']; - break; + $pluginstack[$i]['requirements'] = array( + 'serendipity' => '', + 'php' => '', + 'smarty' => '' + ); - case 'template': - $pluginstack[$i]['template'] = $childtree['value']; - break; + foreach((array)$childtree['children'] AS $relInfo) { + if (isset($relInfo['tag']) && $relInfo['tag'] == 'requirements:s9yVersion') { + $pluginstack[$i]['requirements']['serendipity'] = $relInfo['value']; + } - case 'description': - $pluginstack[$i]['description'] = $childtree['value']; - break; - - case 'release': - $pluginstack[$i]['version'] = $childtree['children'][0]['value']; - - $pluginstack[$i]['requirements'] = array( - 'serendipity' => '', - 'php' => '', - 'smarty' => '' - ); - - foreach((array)$childtree['children'] AS $relInfo) { - if (isset($relInfo['tag']) && $relInfo['tag'] == 'requirements:s9yVersion') { - $pluginstack[$i]['requirements']['serendipity'] = $relInfo['value']; + if (isset($relInfo['tag']) && $relInfo['tag'] == 'date') { + $pluginstack[$i]['date'] = $relInfo['value']; + } } - if (isset($relInfo['tag']) && $relInfo['tag'] == 'date') { - $pluginstack[$i]['date'] = $relInfo['value']; - } + $pluginstack[$i]['require serendipity'] = $pluginstack[$i]['requirements']['serendipity']; + break; - } - - $pluginstack[$i]['require serendipity'] = $pluginstack[$i]['requirements']['serendipity']; - break; - - case 'maintainers': - $pluginstack[$i]['author'] = $childtree['children'][0]['children'][0]['value']; // I dig my PHP arrays ;-) - break; - } + case 'maintainers': + $pluginstack[$i]['author'] = $childtree['children'][0]['children'][0]['value']; + break; + default: + # Catches name, summary, template, description and recommended. Also a way to extend this later on + $pluginstack[$i][$childtree['tag']] = $childtree['value']; + break; + } } } @@ -898,7 +913,7 @@ class serendipity_event_spartacus extends serendipity_event if (file_exists($serendipity['serendipityPath'] . '/templates_c/template_cache/'. $plugname .'.jpg')) { $pluginstack[$i]['preview_fullsizeURL'] = $preview_fullsizeURL; } else { - if ( ! file_exists($serendipity['serendipityPath'] . '/templates_c/template_cache/'. $plugname)) { + if ( ! file_exists($serendipity['serendipityPath'] . '/templates_c/template_cache/'. $plugname)) { $file = @fopen($preview_fullsizeURL, 'r'); if ($file) { file_put_contents($serendipity['serendipityPath'] . '/templates_c/template_cache/'. $plugname .'.jpg', $file); @@ -909,9 +924,7 @@ class serendipity_event_spartacus extends serendipity_event } } } - - - + $pluginstack[$i]['customURI'] = '&serendipity[spartacus_fetch]=' . $plugname; $pluginstack[$i]['customIcon'] = '_spartacus'; @@ -924,7 +937,8 @@ class serendipity_event_spartacus extends serendipity_event return $pluginstack; } - function download(&$tree, $plugin_to_install, $sub = 'plugins') { + function download(&$tree, $plugin_to_install, $sub = 'plugins') + { global $serendipity; $gitloc = ''; @@ -992,8 +1006,8 @@ class serendipity_event_spartacus extends serendipity_event } if (count($files) == 0) { - echo "DEBUG: ERROR: XML tree did not contain requested plugin:<br />\n"; - print_r($tree); + $msg = "DEBUG: ERROR: XML tree did not contain requested plugin:\n<div>" . print_r($tree, true) . "</div>\n"; + echo '<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> '. $msg .'</span>' . "\n"; } $mirrors = $this->getMirrors('files', true); @@ -1004,7 +1018,7 @@ class serendipity_event_spartacus extends serendipity_event $servers = explode('|', $custom); $mirror = $servers[0]; } - + if (stristr($mirror, 'github.com')) { $gitloc = 'master/'; } @@ -1028,13 +1042,14 @@ class serendipity_event_spartacus extends serendipity_event } } - function make_dir_via_ftp($dir) { + function make_dir_via_ftp($dir) + { global $serendipity; - + if (!serendipity_db_bool($this->get_config('use_ftp'))) { return false; } - + $ftp_server = $this->get_config('ftp_server'); $ftp_user_name = $this->get_config('ftp_username'); $ftp_user_pass = $this->get_config('ftp_password'); @@ -1046,11 +1061,11 @@ class serendipity_event_spartacus extends serendipity_event } $dir = str_replace($serendipity['serendipityPath'],"",$dir); - + // set up basic connection and log in with username and password $conn_id = ftp_connect($ftp_server); $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); - + // check connection if ((!$conn_id) || (!$login_result)) { $this->outputMSG('error',PLUGIN_EVENT_SPARTACUS_FTP_ERROR_CONNECT); @@ -1058,8 +1073,8 @@ class serendipity_event_spartacus extends serendipity_event } else { $paths = preg_split('@/@', $basedir.$dir,-1,PREG_SPLIT_NO_EMPTY); foreach ($paths as $path) { - // trying to change directory, if not succesfull, it means - // the directory does not exist and we must create it + // trying to change directory, if not successful, it means + // the directory does not exist and we must create it if (!ftp_chdir($conn_id,$path)) { if (!ftp_mkdir($conn_id,$path)) { $this->outputMSG('error',PLUGIN_EVENT_SPARTACUS_FTP_ERROR_MKDIR); @@ -1080,13 +1095,16 @@ class serendipity_event_spartacus extends serendipity_event } } - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { + switch($event) { + case 'cronjob': if ($this->get_config('cronjob') == $eventData) { serendipity_event_cronjob::log('Spartacus', 'plugin'); @@ -1099,25 +1117,25 @@ class serendipity_event_spartacus extends serendipity_event $avail['event'] = $this->buildList($this->fetchOnline('event'), 'event'); $avail['sidebar'] = $this->buildList($this->fetchOnline('sidebar'), 'sidebar'); #echo "XAVAIL:<pre>" . print_r($avail, true) . "</pre>"; - + $install['event'] = serendipity_plugin_api::enum_plugin_classes(true); $install['sidebar'] = serendipity_plugin_api::enum_plugin_classes(false); #echo "XINSTALL:<pre>" . print_r($install, true) . "</pre>"; - $mailtext = ''; + $mailtext = ''; foreach($meth AS $method) { foreach ($install[$method] as $class_data) { #echo "Probe " . $class_data['name']. "<br />\n"; // DEBUG $pluginFile = serendipity_plugin_api::probePlugin($class_data['name'], $class_data['classname'], $class_data['pluginPath']); $plugin = serendipity_plugin_api::getPluginInfo($pluginFile, $class_data, $method); - + if (is_object($plugin)) { #echo "Non cached<br />\n"; #echo "<pre>" . print_r($avail[$method][$class_data['name']], true) . "</pre>"; // Object is returned when a plugin could not be cached. $bag = new serendipity_property_bag; $plugin->introspect($bag); - + // If a foreign plugin is upgradable, keep the new version number. if (isset($avail[$method][$class_data['name']])) { $class_data['upgrade_version'] = $avail[$method][$class_data['name']]['upgrade_version']; @@ -1132,7 +1150,7 @@ class serendipity_event_spartacus extends serendipity_event $props = false; #echo "Error<br />\n"; } - + if (is_array($props)) { #echo "<pre>" . print_r($props, true) . "</pre>\n"; if (version_compare($props['version'], $props['upgrade_version'], '<')) { @@ -1149,7 +1167,6 @@ class serendipity_event_spartacus extends serendipity_event echo nl2br($mailtext); } } - return true; break; case 'external_plugin': @@ -1166,34 +1183,34 @@ class serendipity_event_spartacus extends serendipity_event $avail['event'] = $this->buildList($this->fetchOnline('event'), 'event'); $avail['sidebar'] = $this->buildList($this->fetchOnline('sidebar'), 'sidebar'); - + $install['event'] = serendipity_plugin_api::enum_plugin_classes(true); $install['sidebar'] = serendipity_plugin_api::enum_plugin_classes(false); - + foreach($meth AS $method) { echo "LISTING: $method\n-------------------\n"; foreach ($install[$method] as $class_data) { $pluginFile = serendipity_plugin_api::probePlugin($class_data['name'], $class_data['classname'], $class_data['pluginPath']); $plugin = serendipity_plugin_api::getPluginInfo($pluginFile, $class_data, $method); - + if (is_object($plugin)) { // Object is returned when a plugin could not be cached. $bag = new serendipity_property_bag; $plugin->introspect($bag); - + // If a foreign plugin is upgradable, keep the new version number. if (isset($avail[$method][$class_data['name']])) { $class_data['upgrade_version'] = $avail[$method][$class_data['name']]['upgrade_version']; } $props = serendipity_plugin_api::setPluginInfo($plugin, $pluginFile, $bag, $class_data, 'local', $avail[$method]); - + } elseif (is_array($plugin)) { // Array is returned if a plugin could be fetched from info cache $props = $plugin; } else { $props = false; } - + if (is_array($props)) { #print_r($props); if (version_compare($props['version'], $props['upgrade_version'], '<')) { @@ -1207,27 +1224,26 @@ class serendipity_event_spartacus extends serendipity_event } } } - - return true; break; case 'backend_pluginlisting_header': if (serendipity_db_bool($this->get_config('enable_plugins'))) { echo '<div id="upgrade_notice" class="clearfix">'; - echo '<a id="upgrade_sidebar" class="button_link" href="?serendipity[adminModule]=plugins&serendipity[adminAction]=addnew&serendipity[only_group]=UPGRADE">'. PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR .'</a>'; - echo '<a id="upgrade_event" class="button_link" href="?serendipity[adminModule]=plugins&serendipity[adminAction]=addnew&serendipity[only_group]=UPGRADE&serendipity[type]=event">'. PLUGIN_EVENT_SPARTACUS_CHECK_EVENT .'</a> '; + if (version_compare($serendipity['version'], '2.1-alpha3', '<')) { + echo ' <a id="upgrade_sidebar" class="button_link" href="?serendipity[adminModule]=plugins&serendipity[adminAction]=addnew&serendipity[only_group]=UPGRADE">'. PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR .'</a>'; + echo ' <a id="upgrade_event" class="button_link" href="?serendipity[adminModule]=plugins&serendipity[adminAction]=addnew&serendipity[only_group]=UPGRADE&serendipity[type]=event">'. PLUGIN_EVENT_SPARTACUS_CHECK_EVENT .'</a> '; + + } else { + echo ' <a id="upgrade_plugins" class="button_link" href="?serendipity[adminModule]=plugins&serendipity[adminAction]=addnew&serendipity[only_group]=UPGRADE' . '&' . serendipity_setFormToken('url') . '">'. PLUGIN_EVENT_SPARTACUS_CHECK .'</a>'; + } echo '</div>'; } - - return true; break; case 'backend_templates_fetchlist': if (serendipity_db_bool($this->get_config('enable_themes'))) { $eventData = $this->buildTemplateList($this->fetchOnline('template', true), 'template'); } - - return true; break; case 'backend_templates_fetchtemplate': @@ -1240,8 +1256,6 @@ class serendipity_event_spartacus extends serendipity_event ); } } - - return false; break; case 'backend_plugins_fetchlist': @@ -1255,8 +1269,6 @@ class serendipity_event_spartacus extends serendipity_event 'baseURI' => '&serendipity[spartacus_fetch]=' . $type ); } - - return true; break; case 'backend_plugins_fetchplugin': @@ -1277,26 +1289,25 @@ class serendipity_event_spartacus extends serendipity_event } } } - - return false; break; - case 'backend_directory_create' : + case 'backend_directory_create': if (serendipity_db_bool($this->get_config('use_ftp')) && (!is_dir($eventData))) { return $this->make_dir_via_ftp($eventData); } - - return true; break; default: return false; - break; + } + return true; } else { return false; } } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_bg.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_bg.inc.php index 260bf568..ab287455 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_bg.inc.php @@ -1,11 +1,10 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Селектор на шаблони'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Позволява на посетителите на сайта да сменят темата на блога в движение.'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_cn.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_cn.inc.php index 29e5c10f..262fb71c 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_cn.inc.php @@ -2,3 +2,4 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', '主题选择'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '允许访客实时变换主题'); + diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_cs.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_cs.inc.php index 3e9a2162..89a05c4b 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2007-12-14 00:05:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -9,4 +9,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Výběr šablon'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Umožňuje návštěvníkům Vašeho webu změnit šablonu (= vzhled) podle libosti'); -?> diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_cz.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_cz.inc.php index 45b08c02..89a05c4b 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cz.inc.php 1381 2007-12-14 00:05:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -9,4 +9,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Výběr šablon'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Umožňuje návštěvníkům Vašeho webu změnit šablonu (= vzhled) podle libosti'); -?> diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_de.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_de.inc.php index 3cf99103..28feacb9 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_de.inc.php @@ -1,4 +1,5 @@ -<?php # $Id$ +<?php @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Themeauswahl'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Ermöglicht Besuchern das Theme zu ändern'); + diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_es.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_es.inc.php index 267b4cdf..a5fe5bf9 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_es.inc.php @@ -1,6 +1,6 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -8,4 +8,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Selector de plantillas'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Permite que tus visitantes cambien de plantilla al vuelo'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_fr.inc.php index d00e26a1..e1397f74 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -16,5 +16,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Sélecteur de thème'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Permet aux utilisateurs de votre blog de changer le thème visuel'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_ja.inc.php index 51365a1c..b4101d36 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 690 */ @@ -9,4 +9,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'テンプレート選択'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '訪問者がすぐさまテンプレートを変更することを許可します。'); -?> diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_ko.inc.php index 04bd6d8c..06a71b04 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_ko.inc.php @@ -1,8 +1,7 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', '템플릿 선택'); - @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '방문자가 즉석에서 템플릿을 바꿀 수 있도록 함'); +@define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', '템플릿 선택'); +@define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '방문자가 즉석에서 템플릿을 바꿀 수 있도록 함'); -?> diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_pl.inc.php index f147b8a2..5121b3e4 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -9,4 +9,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Wybór schematu'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Pozwala odwiedzającym na wybór schematu (template) strony'); -?> diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_pt_PT.inc.php index 9da59ce1..74183cd5 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $ +<?php ########################################################################## # serendipity - another blogger... # @@ -15,5 +15,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Selector de tema'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Permite aos utilizadores do seu blogue mudar o tema facilmente'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_sk.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_sk.inc.php index 5f257fd6..6d2cc555 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_sk.inc.php @@ -8,4 +8,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Výber šablón'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Umožnuje návštevníkom zmeniť šablónu (= vzhľad) podľa vlastného výberu'); -?> diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_tn.inc.php index c0ac59ec..3e4b9cea 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,6 +12,6 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', '佈景選擇'); - @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '允許訪客改變佈景'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', '佈景選擇'); +@define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '允許訪客改變佈景'); + diff --git a/plugins/serendipity_event_templatechooser/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_templatechooser/UTF-8/lang_zh.inc.php index 29e5c10f..262fb71c 100644 --- a/plugins/serendipity_event_templatechooser/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_templatechooser/UTF-8/lang_zh.inc.php @@ -2,3 +2,4 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', '主题选择'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '允许访客实时变换主题'); + diff --git a/plugins/serendipity_event_templatechooser/lang_bg.inc.php b/plugins/serendipity_event_templatechooser/lang_bg.inc.php index b74f183e..68457fef 100644 --- a/plugins/serendipity_event_templatechooser/lang_bg.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_bg.inc.php @@ -1,9 +1,10 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', '�������� �� �������'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '��������� �� ������������ �� ����� �� ������ ������ �� ����� � ��������.'); + diff --git a/plugins/serendipity_event_templatechooser/lang_cn.inc.php b/plugins/serendipity_event_templatechooser/lang_cn.inc.php index 29e5c10f..262fb71c 100644 --- a/plugins/serendipity_event_templatechooser/lang_cn.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_cn.inc.php @@ -2,3 +2,4 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', '主题选择'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '允许访客实时变换主题'); + diff --git a/plugins/serendipity_event_templatechooser/lang_cs.inc.php b/plugins/serendipity_event_templatechooser/lang_cs.inc.php index 9979e3a7..058cc1f3 100644 --- a/plugins/serendipity_event_templatechooser/lang_cs.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2007-12-14 00:05:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -9,4 +9,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'V�b�r �ablon'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Umo��uje n�v�t�vn�k�m Va�eho webu zm�nit �ablonu (= vzhled) podle libosti'); -?> diff --git a/plugins/serendipity_event_templatechooser/lang_cz.inc.php b/plugins/serendipity_event_templatechooser/lang_cz.inc.php index 15e82301..939d2252 100644 --- a/plugins/serendipity_event_templatechooser/lang_cz.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cz.inc.php 1381 2007-12-14 00:05:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -9,4 +9,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'V�b�r �ablon'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Umo��uje n�v�t�vn�k�m Va�eho webu zm�nit �ablonu (= vzhled) podle libosti'); -?> diff --git a/plugins/serendipity_event_templatechooser/lang_de.inc.php b/plugins/serendipity_event_templatechooser/lang_de.inc.php index 86c3f97e..e2c6a238 100644 --- a/plugins/serendipity_event_templatechooser/lang_de.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_de.inc.php @@ -1,4 +1,5 @@ -<?php # $Id$ +<?php @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Themeauswahl'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Erm�glicht Besuchern das Theme zu �ndern'); + diff --git a/plugins/serendipity_event_templatechooser/lang_en.inc.php b/plugins/serendipity_event_templatechooser/lang_en.inc.php index dcce34a1..cf83a5cd 100644 --- a/plugins/serendipity_event_templatechooser/lang_en.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_en.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Translator Name <yourmail@example.com> * EN-Revision: Revision of lang_en.inc.php */ @@ -9,4 +9,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Theme chooser'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Allows your visitors to change theme on the fly'); -?> diff --git a/plugins/serendipity_event_templatechooser/lang_es.inc.php b/plugins/serendipity_event_templatechooser/lang_es.inc.php index 267b4cdf..a5fe5bf9 100644 --- a/plugins/serendipity_event_templatechooser/lang_es.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_es.inc.php @@ -1,6 +1,6 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -8,4 +8,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Selector de plantillas'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Permite que tus visitantes cambien de plantilla al vuelo'); -?> \ No newline at end of file diff --git a/plugins/serendipity_event_templatechooser/lang_fr.inc.php b/plugins/serendipity_event_templatechooser/lang_fr.inc.php index 1b12f853..8691b816 100644 --- a/plugins/serendipity_event_templatechooser/lang_fr.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -16,5 +16,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'S�lecteur de th�me'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Permet aux utilisateurs de votre blog de changer le th�me visuel'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_templatechooser/lang_ja.inc.php b/plugins/serendipity_event_templatechooser/lang_ja.inc.php index 51365a1c..b4101d36 100644 --- a/plugins/serendipity_event_templatechooser/lang_ja.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 690 */ @@ -9,4 +9,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'テンプレート選択'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '訪問者がすぐさまテンプレートを変更することを許可します。'); -?> diff --git a/plugins/serendipity_event_templatechooser/lang_ko.inc.php b/plugins/serendipity_event_templatechooser/lang_ko.inc.php index 04bd6d8c..06a71b04 100644 --- a/plugins/serendipity_event_templatechooser/lang_ko.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_ko.inc.php @@ -1,8 +1,7 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', '템플릿 선택'); - @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '방문자가 즉석에서 템플릿을 바꿀 수 있도록 함'); +@define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', '템플릿 선택'); +@define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '방문자가 즉석에서 템플릿을 바꿀 수 있도록 함'); -?> diff --git a/plugins/serendipity_event_templatechooser/lang_pl.inc.php b/plugins/serendipity_event_templatechooser/lang_pl.inc.php index 1df523ef..881f6f7d 100644 --- a/plugins/serendipity_event_templatechooser/lang_pl.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -9,4 +9,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Wyb�r schematu'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Pozwala odwiedzaj�cym na wyb�r schematu (template) strony'); -?> diff --git a/plugins/serendipity_event_templatechooser/lang_pt_PT.inc.php b/plugins/serendipity_event_templatechooser/lang_pt_PT.inc.php index 5589169c..d753c4e2 100644 --- a/plugins/serendipity_event_templatechooser/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $ +<?php ########################################################################## # serendipity - another blogger... # @@ -15,5 +15,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'Selector de tema'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Permite aos utilizadores do seu blogue mudar o tema facilmente'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_templatechooser/lang_sk.inc.php b/plugins/serendipity_event_templatechooser/lang_sk.inc.php index 77509092..cfa661c1 100644 --- a/plugins/serendipity_event_templatechooser/lang_sk.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_sk.inc.php @@ -8,4 +8,3 @@ @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', 'V�ber �abl�n'); @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', 'Umo�nuje n�v�tevn�kom zmeni� �abl�nu (= vzh�ad) pod�a vlastn�ho v�beru'); -?> diff --git a/plugins/serendipity_event_templatechooser/lang_tn.inc.php b/plugins/serendipity_event_templatechooser/lang_tn.inc.php index c0ac59ec..3e4b9cea 100644 --- a/plugins/serendipity_event_templatechooser/lang_tn.inc.php +++ b/plugins/serendipity_event_templatechooser/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,6 +12,6 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', '佈景選擇'); - @define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '允許訪客改變佈景'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_TEMPLATECHOOSER_NAME', '佈景選擇'); +@define('PLUGIN_EVENT_TEMPLATECHOOSER_DESC', '允許訪客改變佈景'); + diff --git a/plugins/serendipity_event_templatechooser/serendipity_event_templatechooser.php b/plugins/serendipity_event_templatechooser/serendipity_event_templatechooser.php index e92a5c1e..7de2cc24 100644 --- a/plugins/serendipity_event_templatechooser/serendipity_event_templatechooser.php +++ b/plugins/serendipity_event_templatechooser/serendipity_event_templatechooser.php @@ -1,4 +1,8 @@ -<?php # $Id$ +<?php + +if (IN_serendipity !== true) { + die ("Don't hack!"); +} @serendipity_plugin_api::load_language(dirname(__FILE__)); @@ -14,9 +18,9 @@ class serendipity_event_templatechooser extends serendipity_event $propbag->add('description', PLUGIN_EVENT_TEMPLATECHOOSER_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Evan Nemerson'); - $propbag->add('version', '1.6'); + $propbag->add('version', '1.7'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -29,83 +33,88 @@ class serendipity_event_templatechooser extends serendipity_event $this->dependencies = array('serendipity_plugin_templatedropdown' => 'remove'); } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { + switch($event) { - case 'frontend_configure': - if (defined('IN_serendipity_admin') && IN_serendipity_admin) { - // Admin shall not have switchable themes. - return true; - } - - if (isset($serendipity['COOKIE']['user_template']) && !isset($_REQUEST['user_template'])) { - $_REQUEST['user_template'] = $serendipity['COOKIE']['user_template']; - } - if (isset($_REQUEST['user_template']) && (in_array($_REQUEST['user_template'], serendipity_fetchTemplates())) ) { - - # Specific themes can be blacklisted for viewing. Enter the names of those, one per line. - $blacklisted = $has_blacklist = false; + case 'frontend_configure': + if (defined('IN_serendipity_admin') && IN_serendipity_admin) { + // Admin shall not have switchable themes. + return true; + } - if (file_exists(dirname(__FILE__) . '/blacklist.txt')) { - $_blacklist = explode("\n", file_get_contents(dirname(__FILE__) . '/blacklist.txt')); - $blacklist = array(); - $has_blacklist = true; - foreach($_blacklist AS $idx => $blackline) { - $blackline = trim($blackline); - if (empty($blackline)) continue; - if ($blackline[0] == '#') continue; - $blacklist[$blackline] = true; - if (preg_match('/' . preg_quote($blackline) . '$/i', $_REQUEST['user_template'])) { - header('X-Theme-Blacklisted: ' . urlencode($blackline)); - $blacklisted = true; + if (isset($serendipity['COOKIE']['user_template']) && !isset($_REQUEST['user_template'])) { + $_REQUEST['user_template'] = $serendipity['COOKIE']['user_template']; + } + + if (isset($_REQUEST['user_template']) && (in_array($_REQUEST['user_template'], serendipity_fetchTemplates())) ) { + + # Specific themes can be blacklisted for viewing. Enter the names of those, one per line. + $blacklisted = $has_blacklist = false; + + if (file_exists(dirname(__FILE__) . '/blacklist.txt')) { + $_blacklist = explode("\n", file_get_contents(dirname(__FILE__) . '/blacklist.txt')); + $blacklist = array(); + $has_blacklist = true; + foreach($_blacklist AS $idx => $blackline) { + $blackline = trim($blackline); + if (empty($blackline)) continue; + if ($blackline[0] == '#') continue; + $blacklist[$blackline] = true; + if (preg_match('/' . preg_quote($blackline) . '$/i', $_REQUEST['user_template'])) { + header('X-Theme-Blacklisted: ' . urlencode($blackline)); + $blacklisted = true; + } } } + + if (!$blacklisted) { + $_SESSION['serendipityUseTemplate'] = $_REQUEST['user_template']; + # When blacklisting occurs, the cookie to remember template selection will be removed by closing the browser. + serendipity_setCookie('user_template', $_REQUEST['user_template'], false, ($has_blacklist ? 0 : false)); + } } - - if (!$blacklisted) { - $_SESSION['serendipityUseTemplate'] = $_REQUEST['user_template']; - # When blacklisting occurs, the cookie to remember template selection will be removed by closing the browser. - serendipity_setCookie('user_template', $_REQUEST['user_template'], false, ($has_blacklist ? 0 : false)); + + // If the requested template is the same as the current default template, + // we will not set this variable. This is important so that templates/plugins + // which detect serendipityUseTemplate can use reasonable defaults in case + // template configuration options do not exist. Guess nobody understands + // this explanation anyways, and who reads this stuff, heh? + if ($_SESSION['serendipityUseTemplate'] == $eventData['template']) { + unset($_SESSION['serendipityUseTemplate']); } - } - // If the requested template is the same as the current default template, - // we will not set this variable. This is important so that templates/plugins - // which detect serendipityUseTemplate can use reasonable defaults in case - // template configuration options do not exist. Guess nobody understands - // this explanation anyways, and who reads this stuff, heh? - if ($_SESSION['serendipityUseTemplate'] == $eventData['template']) { - unset($_SESSION['serendipityUseTemplate']); - } + if (isset($_SESSION['serendipityUseTemplate']) ) { + $templateInfo = serendipity_fetchTemplateInfo($_SESSION['serendipityUseTemplate']); + $eventData['template'] = $_SESSION['serendipityUseTemplate']; + // NOTE: Bulletproof uses diverse options, but since they are not configured by default, we cannot output fallback templates using bulletproof. So we need to use "default" for now. + $eventData['template_engine'] = isset($templateInfo['engine']) ? $templateInfo['engine'] : 'default'; + $serendipity['smarty_vars']['head_link_stylesheet'] = $serendipity['baseURL'] . 'serendipity.css.php?switch=' . $_REQUEST['user_template']; + } + break; - if (isset($_SESSION['serendipityUseTemplate']) ) { - $templateInfo = serendipity_fetchTemplateInfo($_SESSION['serendipityUseTemplate']); - $eventData['template'] = $_SESSION['serendipityUseTemplate']; - // NOTE: Bulletproof uses diverse options, but since they are not configured by default, we cannot output fallback templates using bulletproof. So we need to use "default" for now. - $eventData['template_engine'] = isset($templateInfo['engine']) ? $templateInfo['engine'] : 'default'; - $serendipity['smarty_vars']['head_link_stylesheet'] = $serendipity['baseURL'] . 'serendipity.css.php?switch=' . $_REQUEST['user_template']; - } + default: + return false; - return true; - break; - - default: - return false; } - + return true; } else { return false; } } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_event_textile/UTF-8/lang_bg.inc.php b/plugins/serendipity_event_textile/UTF-8/lang_bg.inc.php index cedb316d..f838f017 100644 --- a/plugins/serendipity_event_textile/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_event_textile/UTF-8/lang_bg.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/UTF-8/lang_cn.inc.php b/plugins/serendipity_event_textile/UTF-8/lang_cn.inc.php index 7c0b8246..229515a5 100644 --- a/plugins/serendipity_event_textile/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_event_textile/UTF-8/lang_cn.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/UTF-8/lang_de.inc.php b/plugins/serendipity_event_textile/UTF-8/lang_de.inc.php index e648a7b7..14b864fc 100644 --- a/plugins/serendipity_event_textile/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_textile/UTF-8/lang_de.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version 1.0 diff --git a/plugins/serendipity_event_textile/UTF-8/lang_es.inc.php b/plugins/serendipity_event_textile/UTF-8/lang_es.inc.php index 0bc8dcd7..8f250850 100644 --- a/plugins/serendipity_event_textile/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_event_textile/UTF-8/lang_es.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_textile/UTF-8/lang_fr.inc.php index 7b1380a7..6835621d 100644 --- a/plugins/serendipity_event_textile/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_textile/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_textile/UTF-8/lang_ja.inc.php index 2d493276..89d2eff5 100644 --- a/plugins/serendipity_event_textile/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_textile/UTF-8/lang_ja.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_textile/UTF-8/lang_ko.inc.php index 1c45b478..b922e4ec 100644 --- a/plugins/serendipity_event_textile/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_textile/UTF-8/lang_ko.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_textile/UTF-8/lang_pl.inc.php index 2a95c5e1..d4a7ff1c 100644 --- a/plugins/serendipity_event_textile/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_textile/UTF-8/lang_pl.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_textile/UTF-8/lang_pt_PT.inc.php index 8692198e..9f754250 100644 --- a/plugins/serendipity_event_textile/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_textile/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_textile/UTF-8/lang_tn.inc.php index 4b6c9884..ceab23df 100644 --- a/plugins/serendipity_event_textile/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_textile/UTF-8/lang_tn.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_textile/UTF-8/lang_zh.inc.php index 7c0b8246..229515a5 100644 --- a/plugins/serendipity_event_textile/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_textile/UTF-8/lang_zh.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/classTextile.php b/plugins/serendipity_event_textile/classTextile.php index a77eb733..60b85c1d 100644 --- a/plugins/serendipity_event_textile/classTextile.php +++ b/plugins/serendipity_event_textile/classTextile.php @@ -353,7 +353,7 @@ class TextileBag /** - * Class to allow contruction of HTML tags on conversion of an object to a string + * Class to allow construction of HTML tags on conversion of an object to a string * * Example usage... * @@ -761,7 +761,7 @@ class Textile * Gets a symbol definitions. * * This method can be used to get a symbol definition, or an - * array containg the full symbol table. + * array containing the full symbol table. * * @param string|null $name The name of the symbol, or NULL if requesting the symbol table * @return array|string The symbol table or the requested symbol @@ -871,7 +871,7 @@ class Textile $this->prepare($lite, $noimage, $rel); $this->url_schemes = $this->unrestricted_url_schemes; - // Use of the $encode flag is discouraged. Calling textileEncode() is prefered. + // Use of the $encode flag is discouraged. Calling textileEncode() is preferred. if ($encode) { return $this->textileEncode($text); } @@ -2721,7 +2721,7 @@ class Textile /** - * Perfoms typographical glyph replacements within the input textile text. + * Performs typographical glyph replacements within the input textile text. * The source text is split across HTML-like tags in order to avoid attempting glyph * replacements within tags. * diff --git a/plugins/serendipity_event_textile/lang_bg.inc.php b/plugins/serendipity_event_textile/lang_bg.inc.php index b4a75df5..43425d53 100644 --- a/plugins/serendipity_event_textile/lang_bg.inc.php +++ b/plugins/serendipity_event_textile/lang_bg.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/lang_cn.inc.php b/plugins/serendipity_event_textile/lang_cn.inc.php index 7c0b8246..229515a5 100644 --- a/plugins/serendipity_event_textile/lang_cn.inc.php +++ b/plugins/serendipity_event_textile/lang_cn.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/lang_de.inc.php b/plugins/serendipity_event_textile/lang_de.inc.php index 585be90d..4a686528 100644 --- a/plugins/serendipity_event_textile/lang_de.inc.php +++ b/plugins/serendipity_event_textile/lang_de.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version 1.0 diff --git a/plugins/serendipity_event_textile/lang_en.inc.php b/plugins/serendipity_event_textile/lang_en.inc.php index 48b4f80e..b4db80bb 100644 --- a/plugins/serendipity_event_textile/lang_en.inc.php +++ b/plugins/serendipity_event_textile/lang_en.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/lang_es.inc.php b/plugins/serendipity_event_textile/lang_es.inc.php index b4be2479..829d2ccd 100644 --- a/plugins/serendipity_event_textile/lang_es.inc.php +++ b/plugins/serendipity_event_textile/lang_es.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/lang_fr.inc.php b/plugins/serendipity_event_textile/lang_fr.inc.php index 48c45e53..7b49a974 100644 --- a/plugins/serendipity_event_textile/lang_fr.inc.php +++ b/plugins/serendipity_event_textile/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/lang_ja.inc.php b/plugins/serendipity_event_textile/lang_ja.inc.php index 2d493276..89d2eff5 100644 --- a/plugins/serendipity_event_textile/lang_ja.inc.php +++ b/plugins/serendipity_event_textile/lang_ja.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/lang_ko.inc.php b/plugins/serendipity_event_textile/lang_ko.inc.php index 1c45b478..b922e4ec 100644 --- a/plugins/serendipity_event_textile/lang_ko.inc.php +++ b/plugins/serendipity_event_textile/lang_ko.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/lang_pl.inc.php b/plugins/serendipity_event_textile/lang_pl.inc.php index 7d7b7f97..33c2d670 100644 --- a/plugins/serendipity_event_textile/lang_pl.inc.php +++ b/plugins/serendipity_event_textile/lang_pl.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/lang_pt_PT.inc.php b/plugins/serendipity_event_textile/lang_pt_PT.inc.php index 4ff016a9..e9648c35 100644 --- a/plugins/serendipity_event_textile/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_textile/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/lang_tn.inc.php b/plugins/serendipity_event_textile/lang_tn.inc.php index 4b6c9884..ceab23df 100644 --- a/plugins/serendipity_event_textile/lang_tn.inc.php +++ b/plugins/serendipity_event_textile/lang_tn.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/lang_zh.inc.php b/plugins/serendipity_event_textile/lang_zh.inc.php index 7c0b8246..229515a5 100644 --- a/plugins/serendipity_event_textile/lang_zh.inc.php +++ b/plugins/serendipity_event_textile/lang_zh.inc.php @@ -1,4 +1,4 @@ -<?php # +<?php /** * @version diff --git a/plugins/serendipity_event_textile/serendipity_event_textile.php b/plugins/serendipity_event_textile/serendipity_event_textile.php index c19434a6..eee60108 100644 --- a/plugins/serendipity_event_textile/serendipity_event_textile.php +++ b/plugins/serendipity_event_textile/serendipity_event_textile.php @@ -1,4 +1,8 @@ -<?php # +<?php + +if (IN_serendipity !== true) { + die ("Don't hack!"); +} @serendipity_plugin_api::load_language(dirname(__FILE__)); @@ -14,9 +18,9 @@ class serendipity_event_textile extends serendipity_event $propbag->add('description', PLUGIN_EVENT_TEXTILE_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Serendipity Team', 'Lars Strojny'); - $propbag->add('version', '1.8.2'); + $propbag->add('version', '1.8.3'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '5.2.0' )); @@ -63,26 +67,31 @@ class serendipity_event_textile extends serendipity_event } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } - function install() { + function install() + { serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function uninstall(&$propbag) { + function uninstall(&$propbag) + { serendipity_plugin_api::hook_event('backend_cache_purge', $this->title); serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function example() { + function example() + { return '<p>'.PLUGIN_EVENT_TEXTILE_EXAMPLE_NOTE.'</p>'; } function introspect_config_item($name, &$propbag) { switch($name) { + case 'textile_version': $propbag->add('type', 'radio'); $propbag->add('name', PLUGIN_EVENT_TEXTILE_VERSION); @@ -92,7 +101,6 @@ class serendipity_event_textile extends serendipity_event 'desc' => array('1.0', '2.0', '3.0'), )); $propbag->add('default', 3); - return true; break; case 'textile_doctype': @@ -100,7 +108,6 @@ class serendipity_event_textile extends serendipity_event $propbag->add('name', PLUGIN_EVENT_TEXTILE_DOCTYPE); $propbag->add('description', PLUGIN_EVENT_TEXTILE_DOCTYPE_DESC); $propbag->add('default', 'false'); - return true; break; case 'textile_restrict_comments': @@ -108,7 +115,6 @@ class serendipity_event_textile extends serendipity_event $propbag->add('name', PLUGIN_EVENT_TEXTILE_RESTRICTCOMMENTS); $propbag->add('description', PLUGIN_EVENT_TEXTILE_RESTRICTCOMMENTS_DESC); $propbag->add('default', 'true'); - return true; break; case 'unescape': @@ -116,113 +122,115 @@ class serendipity_event_textile extends serendipity_event $propbag->add('name', PLUGIN_EVENT_TEXTILE_UNESCAPE); $propbag->add('description', PLUGIN_EVENT_TEXTILE_UNESCAPE_DESC); $propbag->add('default', 'false'); - return true; + break; + + default: + $propbag->add('type', 'boolean'); + $propbag->add('name', constant($name)); + $propbag->add('description', sprintf(APPLY_MARKUP_TO, constant($name))); + $propbag->add('default', 'true'); break; } - $propbag->add('type', 'boolean'); - $propbag->add('name', constant($name)); - $propbag->add('description', sprintf(APPLY_MARKUP_TO, constant($name))); - $propbag->add('default', 'true'); return true; } - - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { + switch($event) { - case 'frontend_display': - $preserve_tags = &$bag->get('preserve_tags'); + case 'frontend_display': - foreach ($this->markup_elements as $temp) { - if (serendipity_db_bool($this->get_config($temp['name'], true))) { - if ($eventData['properties']['ep_disable_markup_' . $this->instance] || - isset($serendipity['POST']['properties']['disable_markup_' . $this->instance])) { - continue; - } - $element = $temp['element']; + $preserve_tags = &$bag->get('preserve_tags'); - /* find all the tags and store them in $blocks */ - - $blocks = array(); - foreach($preserve_tags as $tag) { - if (preg_match_all('/(<'.$tag.'[^>]?>.*<\/'.$tag.'>)/msU', $eventData[$element], $matches )) { - foreach($matches[1] as $match) { - $blocks[] = $match; - } + foreach ($this->markup_elements as $temp) { + if (serendipity_db_bool($this->get_config($temp['name'], 'true'))) { + if ($eventData['properties']['ep_disable_markup_' . $this->instance] || + isset($serendipity['POST']['properties']['disable_markup_' . $this->instance])) { + continue; } - } + $element = $temp['element']; - /* replace all the blocks with some code */ + /* find all the tags and store them in $blocks */ - foreach($blocks as $id=>$block) { - $eventData[$element] = str_replace($block, '@BLOCK::'.$id.'@', $eventData[$element]); - } - - /* textile it */ - - if (serendipity_db_bool($this->get_config('unescape'))) { - $eventData[$element] = str_replace('"', '"', $eventData[$element]); - } - $eventData[$element] = $this->textile($eventData[$element]); - - /* each block will now be "<code>BLOCK::2</code>" - * so look for those place holders and replace - * them with the original blocks */ - - if (preg_match_all('/<code>BLOCK::(\d+)<\/code>/', $eventData[$element], $matches )) { - foreach($matches[1] as $key=>$match) { - $eventData[$element] = str_replace($matches[0][$key], $blocks[$match], $eventData[$element]); - } - } - - /* post-process each block */ - - foreach($preserve_tags as $tag) { - $method = '_process_tag_' . $tag; - if (method_exists($this,$method)) { - if (preg_match_all('/<'.$tag.'[^>]?>(.*)<\/'.$tag.'>/msU', $eventData[$element], $matches )) { - foreach($matches[1] as $key=>$match) { - $eventData[$element] = str_replace($matches[0][$key], $this->$method($match), $eventData[$element]); + $blocks = array(); + foreach($preserve_tags as $tag) { + if (preg_match_all('/(<'.$tag.'[^>]?>.*<\/'.$tag.'>)/msU', $eventData[$element], $matches )) { + foreach($matches[1] as $match) { + $blocks[] = $match; } } } + + /* replace all the blocks with some code */ + + foreach($blocks as $id=>$block) { + $eventData[$element] = str_replace($block, '@BLOCK::'.$id.'@', $eventData[$element]); + } + + /* textile it */ + + if (serendipity_db_bool($this->get_config('unescape'))) { + $eventData[$element] = str_replace('"', '"', $eventData[$element]); + } + $eventData[$element] = $this->textile($eventData[$element]); + + /* each block will now be "<code>BLOCK::2</code>" + * so look for those place holders and replace + * them with the original blocks */ + + if (preg_match_all('/<code>BLOCK::(\d+)<\/code>/', $eventData[$element], $matches )) { + foreach($matches[1] as $key=>$match) { + $eventData[$element] = str_replace($matches[0][$key], $blocks[$match], $eventData[$element]); + } + } + + /* post-process each block */ + + foreach($preserve_tags as $tag) { + $method = '_process_tag_' . $tag; + if (method_exists($this,$method)) { + if (preg_match_all('/<'.$tag.'[^>]?>(.*)<\/'.$tag.'>/msU', $eventData[$element], $matches )) { + foreach($matches[1] as $key=>$match) { + $eventData[$element] = str_replace($matches[0][$key], $this->$method($match), $eventData[$element]); + } + } + } + } + + /* end textile processing */ + } - - /* end textile processing */ - } - } - return true; + break; case 'frontend_comment': - if (serendipity_db_bool($this->get_config('COMMENT', true))) { + if (serendipity_db_bool($this->get_config('COMMENT', 'true'))) { $url = $this->get_config('textile_version') == 1 ? 'http://www.textism.com/tools/textile/' : 'http://txstyle.org/article/43/a-short-introduction'; echo '<div class="serendipity_commentDirection serendipity_comment_textile">' . sprintf(PLUGIN_EVENT_TEXTILE_TRANSFORM, $url) . '</div>'; } - return true; break; default: return false; + } - + return true; } else { - return false; - } - } - function _process_tag_php($text) { + function _process_tag_php($text) + { $code = "<?php\n" . trim($text) . "\n?>"; @@ -261,15 +269,18 @@ class serendipity_event_textile extends serendipity_event } - function _process_tag_output($text) { + function _process_tag_output($text) + { return '<p><pre class="output">' . $text . '</pre></p>'; } - function _process_tag_name($text) { + function _process_tag_name($text) + { return '<a name="'. $text . '"></a>'; } - function textile($string) { + function textile($string) + { switch($this->get_config('textile_version')) { case 3: if (version_compare(PHP_VERSION, '5.3.0') >= 0) { @@ -295,6 +306,8 @@ class serendipity_event_textile extends serendipity_event break; } } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_bg.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_bg.inc.php index dbb30303..adc0a865 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_bg.inc.php @@ -1,13 +1,14 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ - @define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', 'Корекция на XHTML грешки'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', 'Тази приставка коригира някои често срещани XHTML проблеми в статиите. Тя помага да запазите вашия блог XHTML съвместим.'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML', 'Кодиране на XML-парсирани данни ?'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', 'Тази приставка използва XML парсиране за да XHTML валидност на вашия код. Това парсиране може да преобразува вече валидни entities в unescaped entities, така че тя кодира всички entities след парсирането. Изключете този флаг, ако имате в резултат двойно кодиране!'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 'Почистване на UTF-8 entities?'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Ако е позволено, HTML entities, произведени от UTF-8 символи ще бъдат правилно конвертирани и няма да бъдат двойно кодирани в статиите.'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', 'Корекция на XHTML грешки'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', 'Тази приставка коригира някои често срещани XHTML проблеми в статиите. Тя помага да запазите вашия блог XHTML съвместим.'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML', 'Кодиране на XML-парсирани данни ?'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', 'Тази приставка използва XML парсиране за да XHTML валидност на вашия код. Това парсиране може да преобразува вече валидни entities в unescaped entities, така че тя кодира всички entities след парсирането. Изключете този флаг, ако имате в резултат двойно кодиране!'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 'Почистване на UTF-8 entities?'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Ако е позволено, HTML entities, произведени от UTF-8 символи ще бъдат правилно конвертирани и няма да бъдат двойно кодирани в статиите.'); + diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_cn.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_cn.inc.php index ec5d2ff1..72074531 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_cn.inc.php @@ -6,3 +6,4 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', '该插件使用一种XML解析手段来确保你的代码能通过XHTML验证。在进行XML解析时,会将现有的符合XHTML协议的文章转换成原始(unescaped)文章,随后在完成XML解析后对所有文章进行编码操作。如果在使用中发现有重复进行编码操作的现象,需将此设置关闭。'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', '清理UTF-8格式的标签'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', '如果启用该设置的话,那些从UTF-8字符串中演绎出来的HTML标签将能被正确地转换,而不会被重复进行编码。'); + diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_cs.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_cs.inc.php index f3031c54..e5815f80 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # lang_cs.inc.php 1381.1 2009-08-15 10:30:13 VladaAjgl $ +<?php /** * @version 1381.1 @@ -17,4 +17,5 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 'Čištění UTF-8 znaků?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Pokud je zapnuto, HTML entity způsobené převedením znaků v kódování Unicode UTF-8 budou správně převedeny nazpět na znaky UTF-8 a nebudou zakódovány do podivných znaků v zobrazení stránky.'); @define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE', 'Vyčistit kód videí z youtube?'); -@define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE_DESC', 'Pokud je zapnuto, pak jsou invalidní XHTML tagy generované youtube vyřezány z embed části. Prohlíčeč přes toto vyřezání zobrazí video správně.'); \ No newline at end of file +@define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE_DESC', 'Pokud je zapnuto, pak jsou invalidní XHTML tagy generované youtube vyřezány z embed části. Prohlíčeč přes toto vyřezání zobrazí video správně.'); + diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_cz.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_cz.inc.php index b26dd23a..e5815f80 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # lang_cz.inc.php 1381.1 2009-08-15 10:30:13 VladaAjgl $ +<?php /** * @version 1381.1 @@ -17,4 +17,5 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 'Čištění UTF-8 znaků?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Pokud je zapnuto, HTML entity způsobené převedením znaků v kódování Unicode UTF-8 budou správně převedeny nazpět na znaky UTF-8 a nebudou zakódovány do podivných znaků v zobrazení stránky.'); @define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE', 'Vyčistit kód videí z youtube?'); -@define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE_DESC', 'Pokud je zapnuto, pak jsou invalidní XHTML tagy generované youtube vyřezány z embed části. Prohlíčeč přes toto vyřezání zobrazí video správně.'); \ No newline at end of file +@define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE_DESC', 'Pokud je zapnuto, pak jsou invalidní XHTML tagy generované youtube vyřezány z embed části. Prohlíčeč přes toto vyřezání zobrazí video správně.'); + diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_de.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_de.inc.php index 629b273b..f66c6d52 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_de.inc.php @@ -1,17 +1,18 @@ -<?php # lang_de.inc.php 1.0 2009-06-03 10:25:27 VladaAjgl $ +<?php /** * @version 1.0 * @author Konrad Bauckmeier <kontakt@dd4kids.de> * @translated 2009/06/03 */ - @define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', 'Übliche XHTML-Fehler beseitigen'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', 'Korrigiert übliche Fehler, die beim XHTML-Markup der Einträge gemacht werden können'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', 'Übliche XHTML-Fehler beseitigen'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', 'Korrigiert übliche Fehler, die beim XHTML-Markup der Einträge gemacht werden können'); // Next lines were translated on 2009/06/03 @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML', 'kodiere XML-geparste Daten?'); -@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', 'Dieses Plugin benutzt als Methode XML-Parsing (Syntaxanalyse) um validen XHTML auszugeben. Diese Methode kann dazu führen, dass schon vorher gülitg kodierte (also umgewandelte) Sonderzeichen (Entities) nun nicht mehr kodiert sind. Daher wird nach dem Parsen noch einmal kodiert. Schalten Sie diese diese Option AUS, wenn Sie dadurch doppelt kodierte Sonderzeichen erhalten.' ); +@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', 'Dieses Plugin benutzt als Methode XML-Parsing (Syntaxanalyse) um validen XHTML auszugeben. Diese Methode kann dazu führen, dass schon vorher gültig kodierte (also umgewandelte) Sonderzeichen (Entities) nun nicht mehr kodiert sind. Daher wird nach dem Parsen noch einmal kodiert. Schalten Sie diese diese Option AUS, wenn Sie dadurch doppelt kodierte Sonderzeichen erhalten.' ); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 'säubere UTF-8 kodierte Sonderzeichen?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Wenn aktiviert, werden HTML Sonderzeichen, die von UTF-8 Zeichen abstammen, in der Ausgabe konvertiert und nicht doppelt kodiert.'); @define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE', 'Youtube Player Quelltext säubern?'); -@define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE_DESC', 'Wenn aktiviert, werden die im XHTML ungültigen object-Tags des YouTube-Quelltextes aus dem embed-Teil entfernt. Die Wiedergabe des Videos im Browser funktioniert trotzdem.'); \ No newline at end of file +@define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE_DESC', 'Wenn aktiviert, werden die im XHTML ungültigen object-Tags des YouTube-Quelltextes aus dem embed-Teil entfernt. Die Wiedergabe des Videos im Browser funktioniert trotzdem.'); + diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_fr.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_fr.inc.php index b99e0518..26417ce7 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -20,5 +20,3 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 'Nettoyer les entités UTF-8?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Si cette option est activée, les entités HTML dérivées des caractères UTF-8 seront correctement converties.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_ja.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_ja.inc.php index f3c01361..3cc99c08 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 690 */ @@ -13,4 +13,3 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 'UTF-8 エントリを掃除しますか?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'If enabled, HTML entities derived from UTF-8 characters will be properly converted and not double-encoded in your output.'); -?> diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_ko.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_ko.inc.php index 6f7d007f..10130274 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_ko.inc.php @@ -1,8 +1,7 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', '일반적인 XHTML 에러 수정'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', '글에서 자주 발생하는 XHTML 마크업 문제를 수정합니다. 블로그가 XHTML 규격을 따르게 하는데 도움을 줍니다.'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', '일반적인 XHTML 에러 수정'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', '글에서 자주 발생하는 XHTML 마크업 문제를 수정합니다. 블로그가 XHTML 규격을 따르게 하는데 도움을 줍니다.'); -?> diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_pl.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_pl.inc.php index d38feaf3..3db1d0df 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -13,4 +13,3 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 'Czyścić znaki UTF-8?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Po włączeniu tej opcji znaki pochodzące z kodowania UTF-8 zostaną odpowiednio przekonwertowane i pokazane.'); -?> diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_pt_PT.inc.php index 5d1d4523..1d5acfb8 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $ +<?php ########################################################################## # serendipity - another blogger... # @@ -19,5 +19,3 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 'Limpar entidades UTF-8?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Se activo, entidades HTML derivadas de caracteres UTF-8 são convertidas correctamente e não duplamente codificadas.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_tn.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_tn.inc.php index 9e273edb..228d44f4 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,10 +12,10 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', '修復常見的 XHTML 錯誤'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', '這個外掛會在文章內修復一些常見的 XHTML 錯誤,為了能讓您的文章通過 XHTML 查驗。'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML', '編碼 XML 解析的資料?'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', '這個外掛使用 XML 解析的方法來保證 XHTML 能通過驗證。這個功能可能會轉換已正確的語法,所以這個外掛會在解析完畢後才進行編碼。如果遇到編碼的錯誤,請不要使用這個功能。'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', '清除 UTF-8 標籤?'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', '如果開啟,任何 UTF-8 字元裡的 HTML 標籤會正確的轉換和輸出。'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', '修復常見的 XHTML 錯誤'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', '這個外掛會在文章內修復一些常見的 XHTML 錯誤,為了能讓您的文章通過 XHTML 查驗。'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML', '編碼 XML 解析的資料?'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', '這個外掛使用 XML 解析的方法來保證 XHTML 能通過驗證。這個功能可能會轉換已正確的語法,所以這個外掛會在解析完畢後才進行編碼。如果遇到編碼的錯誤,請不要使用這個功能。'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', '清除 UTF-8 標籤?'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', '如果開啟,任何 UTF-8 字元裡的 HTML 標籤會正確的轉換和輸出。'); + diff --git a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_zh.inc.php b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_zh.inc.php index ec5d2ff1..72074531 100644 --- a/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_zh.inc.php @@ -6,3 +6,4 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', '该插件使用一种XML解析手段来确保你的代码能通过XHTML验证。在进行XML解析时,会将现有的符合XHTML协议的文章转换成原始(unescaped)文章,随后在完成XML解析后对所有文章进行编码操作。如果在使用中发现有重复进行编码操作的现象,需将此设置关闭。'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', '清理UTF-8格式的标签'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', '如果启用该设置的话,那些从UTF-8字符串中演绎出来的HTML标签将能被正确地转换,而不会被重复进行编码。'); + diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_bg.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_bg.inc.php index bb7a8398..8494f73d 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_bg.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_bg.inc.php @@ -1,13 +1,14 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ - @define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', '�������� �� XHTML ������'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', '���� ��������� �������� ����� ����� ������� XHTML �������� � ��������. �� ������ �� �������� ����� ���� XHTML ���������.'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML', '�������� �� XML-��������� ����� ?'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', '���� ��������� �������� XML ��������� �� �� XHTML ��������� �� ����� ���. ���� ��������� ���� �� ����������� ���� ������� entities � unescaped entities, ���� �� �� ������ ������ entities ���� �����������. ��������� ���� ����, ��� ����� � �������� ������ ��������!'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', '���������� �� UTF-8 entities?'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', '��� � ���������, HTML entities, ����������� �� UTF-8 ������� �� ����� �������� ������������ � ���� �� ����� ������ �������� � ��������.'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', '�������� �� XHTML ������'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', '���� ��������� �������� ����� ����� ������� XHTML �������� � ��������. �� ������ �� �������� ����� ���� XHTML ���������.'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML', '�������� �� XML-��������� ����� ?'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', '���� ��������� �������� XML ��������� �� �� XHTML ��������� �� ����� ���. ���� ��������� ���� �� ����������� ���� ������� entities � unescaped entities, ���� �� �� ������ ������ entities ���� �����������. ��������� ���� ����, ��� ����� � �������� ������ ��������!'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', '���������� �� UTF-8 entities?'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', '��� � ���������, HTML entities, ����������� �� UTF-8 ������� �� ����� �������� ������������ � ���� �� ����� ������ �������� � ��������.'); + diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_cn.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_cn.inc.php index ec5d2ff1..72074531 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_cn.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_cn.inc.php @@ -6,3 +6,4 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', '该插件使用一种XML解析手段来确保你的代码能通过XHTML验证。在进行XML解析时,会将现有的符合XHTML协议的文章转换成原始(unescaped)文章,随后在完成XML解析后对所有文章进行编码操作。如果在使用中发现有重复进行编码操作的现象,需将此设置关闭。'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', '清理UTF-8格式的标签'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', '如果启用该设置的话,那些从UTF-8字符串中演绎出来的HTML标签将能被正确地转换,而不会被重复进行编码。'); + diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_cs.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_cs.inc.php index 1a53c134..d70e40dc 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_cs.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # lang_cs.inc.php 1381.1 2009-08-15 10:30:13 VladaAjgl $ +<?php /** * @version 1381.1 @@ -17,4 +17,5 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', '�i�t�n� UTF-8 znak�?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Pokud je zapnuto, HTML entity zp�soben� p�eveden�m znak� v k�dov�n� Unicode UTF-8 budou spr�vn� p�evedeny nazp�t na znaky UTF-8 a nebudou zak�dov�ny do podivn�ch znak� v zobrazen� str�nky.'); @define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE', 'Vy�istit k�d vide� z youtube?'); -@define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE_DESC', 'Pokud je zapnuto, pak jsou invalidn� XHTML tagy generovan� youtube vy�ez�ny z embed ��sti. Prohl��e� p�es toto vy�ez�n� zobraz� video spr�vn�.'); \ No newline at end of file +@define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE_DESC', 'Pokud je zapnuto, pak jsou invalidn� XHTML tagy generovan� youtube vy�ez�ny z embed ��sti. Prohl��e� p�es toto vy�ez�n� zobraz� video spr�vn�.'); + diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_cz.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_cz.inc.php index bf02cf0a..528df31e 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_cz.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # lang_cz.inc.php 1381.1 2009-08-15 10:30:13 VladaAjgl $ +<?php /** * @version 1381.1 @@ -17,4 +17,5 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', '�i�t�n� UTF-8 znak�?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Pokud je zapnuto, HTML entity zp�soben� p�eveden�m znak� v k�dov�n� Unicode UTF-8 budou spr�vn� p�evedeny nazp�t na znaky UTF-8 a nebudou zak�dov�ny do podivn�ch znak� v zobrazen� str�nky.'); @define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE', 'Vy�istit k�d vide� z youtube?'); -@define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE_DESC', 'Pokud je zapnuto, pak jsou invalidn� XHTML tagy generovan� youtube vy�ez�ny z embed ��sti. Prohl��e� p�es toto vy�ez�n� zobraz� video spr�vn�.'); \ No newline at end of file +@define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE_DESC', 'Pokud je zapnuto, pak jsou invalidn� XHTML tagy generovan� youtube vy�ez�ny z embed ��sti. Prohl��e� p�es toto vy�ez�n� zobraz� video spr�vn�.'); + diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_de.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_de.inc.php index c118f852..110c7c45 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_de.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_de.inc.php @@ -1,17 +1,18 @@ -<?php # lang_de.inc.php 1.0 2009-06-03 10:25:27 VladaAjgl $ +<?php /** * @version 1.0 * @author Konrad Bauckmeier <kontakt@dd4kids.de> * @translated 2009/06/03 */ - @define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', '�bliche XHTML-Fehler beseitigen'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', 'Korrigiert �bliche Fehler, die beim XHTML-Markup der Eintr�ge gemacht werden k�nnen'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', '�bliche XHTML-Fehler beseitigen'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', 'Korrigiert �bliche Fehler, die beim XHTML-Markup der Eintr�ge gemacht werden k�nnen'); // Next lines were translated on 2009/06/03 @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML', 'kodiere XML-geparste Daten?'); -@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', 'Dieses Plugin benutzt als Methode XML-Parsing (Syntaxanalyse) um validen XHTML auszugeben. Diese Methode kann dazu f�hren, dass schon vorher g�litg kodierte (also umgewandelte) Sonderzeichen (Entities) nun nicht mehr kodiert sind. Daher wird nach dem Parsen noch einmal kodiert. Schalten Sie diese diese Option AUS, wenn Sie dadurch doppelt kodierte Sonderzeichen erhalten.' ); +@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', 'Dieses Plugin benutzt als Methode XML-Parsing (Syntaxanalyse) um validen XHTML auszugeben. Diese Methode kann dazu f�hren, dass schon vorher g�ltig kodierte (also umgewandelte) Sonderzeichen (Entities) nun nicht mehr kodiert sind. Daher wird nach dem Parsen noch einmal kodiert. Schalten Sie diese diese Option AUS, wenn Sie dadurch doppelt kodierte Sonderzeichen erhalten.' ); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 's�ubere UTF-8 kodierte Sonderzeichen?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Wenn aktiviert, werden HTML Sonderzeichen, die von UTF-8 Zeichen abstammen, in der Ausgabe konvertiert und nicht doppelt kodiert.'); @define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE', 'Youtube Player Quelltext s�ubern?'); -@define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE_DESC', 'Wenn aktiviert, werden die im XHTML ung�ltigen object-Tags des YouTube-Quelltextes aus dem embed-Teil entfernt. Die Wiedergabe des Videos im Browser funktioniert trotzdem.'); \ No newline at end of file +@define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE_DESC', 'Wenn aktiviert, werden die im XHTML ung�ltigen object-Tags des YouTube-Quelltextes aus dem embed-Teil entfernt. Die Wiedergabe des Videos im Browser funktioniert trotzdem.'); + diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_en.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_en.inc.php index 31af3ac8..76c6a24f 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_en.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_en.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Translator Name <yourmail@example.com> * EN-Revision: Revision of lang_en.inc.php */ @@ -15,4 +15,3 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE', 'Cleanup Youtube player code?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_YOUTUBE_DESC', 'If enabled, the by default XHTML invalid youtube object tags will get stripped of the embed part. Browser will still properly playback the video.'); -?> diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_es.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_es.inc.php index 8ce46f49..95b3665a 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_es.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_es.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo <rlazo.paz@gmail.com> * EN-Revision: Revision of lang_en.inc.php */ @@ -13,4 +13,3 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', '�Limpiar las entidades UTF-8?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Si lo activas, las entidades HTML derivadas de caracteres UTF-8 se convertir�n correctamente y no habr� doble codificaci�n en tu salida.'); -?> diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_fr.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_fr.inc.php index 6fde1479..2df6ee08 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_fr.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -20,5 +20,3 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 'Nettoyer les entit�s UTF-8?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Si cette option est activ�e, les entit�s HTML d�riv�es des caract�res UTF-8 seront correctement converties.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_ja.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_ja.inc.php index f3c01361..3cc99c08 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_ja.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 690 */ @@ -13,4 +13,3 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 'UTF-8 エントリを掃除しますか?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'If enabled, HTML entities derived from UTF-8 characters will be properly converted and not double-encoded in your output.'); -?> diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_ko.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_ko.inc.php index 6f7d007f..10130274 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_ko.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_ko.inc.php @@ -1,8 +1,7 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', '일반적인 XHTML 에러 수정'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', '글에서 자주 발생하는 XHTML 마크업 문제를 수정합니다. 블로그가 XHTML 규격을 따르게 하는데 도움을 줍니다.'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', '일반적인 XHTML 에러 수정'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', '글에서 자주 발생하는 XHTML 마크업 문제를 수정합니다. 블로그가 XHTML 규격을 따르게 하는데 도움을 줍니다.'); -?> diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_pl.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_pl.inc.php index e0780fd2..31633c43 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_pl.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -13,4 +13,3 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 'Czy�ci� znaki UTF-8?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Po w��czeniu tej opcji znaki pochodz�ce z kodowania UTF-8 zostan� odpowiednio przekonwertowane i pokazane.'); -?> diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_pt_PT.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_pt_PT.inc.php index e3428a91..726c8b16 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_pt_PT.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $ +<?php ########################################################################## # serendipity - another blogger... # @@ -19,5 +19,3 @@ @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', 'Limpar entidades UTF-8?'); @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', 'Se activo, entidades HTML derivadas de caracteres UTF-8 s�o convertidas correctamente e n�o duplamente codificadas.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_event_xhtmlcleanup/lang_tn.inc.php b/plugins/serendipity_event_xhtmlcleanup/lang_tn.inc.php index 9e273edb..228d44f4 100644 --- a/plugins/serendipity_event_xhtmlcleanup/lang_tn.inc.php +++ b/plugins/serendipity_event_xhtmlcleanup/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,10 +12,10 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', '修復常見的 XHTML 錯誤'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', '這個外掛會在文章內修復一些常見的 XHTML 錯誤,為了能讓您的文章通過 XHTML 查驗。'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML', '編碼 XML 解析的資料?'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', '這個外掛使用 XML 解析的方法來保證 XHTML 能通過驗證。這個功能可能會轉換已正確的語法,所以這個外掛會在解析完畢後才進行編碼。如果遇到編碼的錯誤,請不要使用這個功能。'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', '清除 UTF-8 標籤?'); - @define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', '如果開啟,任何 UTF-8 字元裡的 HTML 標籤會正確的轉換和輸出。'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_XHTMLCLEANUP_NAME', '修復常見的 XHTML 錯誤'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_DESC', '這個外掛會在文章內修復一些常見的 XHTML 錯誤,為了能讓您的文章通過 XHTML 查驗。'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML', '編碼 XML 解析的資料?'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_XHTML_DESC', '這個外掛使用 XML 解析的方法來保證 XHTML 能通過驗證。這個功能可能會轉換已正確的語法,所以這個外掛會在解析完畢後才進行編碼。如果遇到編碼的錯誤,請不要使用這個功能。'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8', '清除 UTF-8 標籤?'); +@define('PLUGIN_EVENT_XHTMLCLEANUP_UTF8_DESC', '如果開啟,任何 UTF-8 字元裡的 HTML 標籤會正確的轉換和輸出。'); + diff --git a/plugins/serendipity_event_xhtmlcleanup/serendipity_event_xhtmlcleanup.php b/plugins/serendipity_event_xhtmlcleanup/serendipity_event_xhtmlcleanup.php index ceedf5e5..3246e150 100644 --- a/plugins/serendipity_event_xhtmlcleanup/serendipity_event_xhtmlcleanup.php +++ b/plugins/serendipity_event_xhtmlcleanup/serendipity_event_xhtmlcleanup.php @@ -1,4 +1,8 @@ -<?php # $Id$ +<?php + +if (IN_serendipity !== true) { + die ("Don't hack!"); +} @serendipity_plugin_api::load_language(dirname(__FILE__)); @@ -15,9 +19,9 @@ class serendipity_event_xhtmlcleanup extends serendipity_event $propbag->add('description', PLUGIN_EVENT_XHTMLCLEANUP_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Garvin Hicking'); - $propbag->add('version', '1.7'); + $propbag->add('version', '1.8'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -58,16 +62,19 @@ class serendipity_event_xhtmlcleanup extends serendipity_event $propbag->add('configuration', $conf_array); } - function install() { + function install() + { serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function uninstall(&$propbag) { + function uninstall(&$propbag) + { serendipity_plugin_api::hook_event('backend_cache_purge', $this->title); serendipity_plugin_api::hook_event('backend_cache_entries', $this->title); } - function generate_content(&$title) { + function generate_content(&$title) + { $title = $this->title; } @@ -98,12 +105,14 @@ class serendipity_event_xhtmlcleanup extends serendipity_event return true; } - function fixUTFEntity(&$string) { + function fixUTFEntity(&$string) + { $string = preg_replace('/&#(x[a-f0-9]{1,4}|[0-9]{1,5});/', '&#$1;', $string); return true; } - function event_hook($event, &$bag, &$eventData, $addData = null) { + function event_hook($event, &$bag, &$eventData, $addData = null) + { global $serendipity; static $convert_fields = array( 'fullBody', @@ -113,26 +122,27 @@ class serendipity_event_xhtmlcleanup extends serendipity_event ); static $youtube = null; if ($youtube === null) { - $youtube = serendipity_db_bool($this->get_config('youtube')); + $youtube = serendipity_db_bool($this->get_config('youtube', 'false')); } $hooks = &$bag->get('event_hooks'); if (isset($hooks[$event])) { + switch($event) { + case 'backend_view_comment': - if (serendipity_db_bool($this->get_config('utf8_parse'))) { + if (serendipity_db_bool($this->get_config('utf8_parse', 'true'))) { foreach($convert_fields AS $convert_field) { $this->fixUTFEntity($eventData[$convert_field]); } } - return true; break; case 'frontend_display': - $this->cleanup_parse = serendipity_db_bool($this->get_config('xhtml_parse')); + $this->cleanup_parse = serendipity_db_bool($this->get_config('xhtml_parse', 'true')); foreach ($this->markup_elements as $temp) { - if (serendipity_db_bool($this->get_config($temp['name'], true)) && isset($eventData[$temp['element']]) && + if (serendipity_db_bool($this->get_config($temp['name'], 'true')) && isset($eventData[$temp['element']]) && !$eventData['properties']['ep_disable_markup_' . $this->instance] && !isset($serendipity['POST']['properties']['disable_markup_' . $this->instance])) { $element = $temp['element']; @@ -150,37 +160,36 @@ class serendipity_event_xhtmlcleanup extends serendipity_event } } - if (serendipity_db_bool($this->get_config('utf8_parse'))) { + if (serendipity_db_bool($this->get_config('utf8_parse', 'true'))) { $this->fixUTFEntity($eventData['author']); $this->fixUTFEntity($eventData['comment']); } - - return true; break; case 'frontend_display:html:per_entry': - if (serendipity_db_bool($this->get_config('utf8_parse'))) { + if (serendipity_db_bool($this->get_config('utf8_parse', 'true'))) { $this->fixUTFEntity($eventData['author']); $this->fixUTFEntity($eventData['title']); } - - return true; break; default: return false; - } + } + return true; } else { return false; } } - function youtubify(&$text) { + function youtubify(&$text) + { $text = preg_replace_callback('@<object(.*)>(.*)</object>@imsU', array($this, 'youtubify_regex'), $text); } - - function youtubify_regex($matches) { + + function youtubify_regex($matches) + { if (!preg_match('@<embed@i', $matches[2])) return $matches[0]; preg_match('@width=["\']?([0-9]+)@ims', $matches[1], $m); @@ -191,7 +200,7 @@ class serendipity_event_xhtmlcleanup extends serendipity_event preg_match('@<param name="movie" value="(.+)"[\s/]*?>@imsU', $matches[2], $m); $movie = $m[1]; - + if (empty($movie)) { preg_match('@<param value="(.+)" name="movie"[\s/]*?>@imsU', $matches[2], $m); $movie = $m[1]; @@ -201,7 +210,7 @@ class serendipity_event_xhtmlcleanup extends serendipity_event $appendix = str_replace('</embed>', '', $appendix); $out = '<!-- xhtml clean youtube --><object type="application/x-shockwave-flash" width="' . $width . '" height="' . $height . '" data="' . $movie . '">' - . '<param name="movie" value="' . $movie . '" />' + . '<param name="movie" value="' . $movie . '" />' . $appendix . '</object><!-- /xhtml clean youtube -->'; $out .= "\n\n<!-- {$matches[0]} -->\n\n"; @@ -209,7 +218,8 @@ class serendipity_event_xhtmlcleanup extends serendipity_event } // Takes an input tag and search for ommitted attributes. Expects a single tag (array, index 0) - function clean_tag($data) { + function clean_tag($data) + { // Restore tags from preg_replace_callback buffer, as those can't be passed in the function header $tag = &$this->cleanup_tag; $checkfor = &$this->cleanup_checkfor; @@ -221,7 +231,7 @@ class serendipity_event_xhtmlcleanup extends serendipity_event case 'utf-8': $p = xml_parser_create(LANG_CHARSET); break; - + default: $p = xml_parser_create(''); } @@ -252,9 +262,12 @@ class serendipity_event_xhtmlcleanup extends serendipity_event return $data[0]; } - function clean_htmlspecialchars($given, $quote_style = ENT_QUOTES) { + function clean_htmlspecialchars($given, $quote_style = ENT_QUOTES) + { return '<' . $given[1] . $given[2] . $given[3] . '=' . $given[4] . serendipity_specialchars(serendipity_entity_decode($given[5], $quote_style), $quote_style) . $given[6]; } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_archives/serendipity_plugin_archives.php b/plugins/serendipity_plugin_archives/serendipity_plugin_archives.php index 330491be..fa2dc0ca 100644 --- a/plugins/serendipity_plugin_archives/serendipity_plugin_archives.php +++ b/plugins/serendipity_plugin_archives/serendipity_plugin_archives.php @@ -1,6 +1,11 @@ <?php -class serendipity_plugin_archives extends serendipity_plugin { +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + +class serendipity_plugin_archives extends serendipity_plugin +{ var $title = ARCHIVES; function introspect(&$propbag) @@ -9,7 +14,7 @@ class serendipity_plugin_archives extends serendipity_plugin { $propbag->add('description', BROWSE_ARCHIVES); $propbag->add('stackable', true); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '1.0'); + $propbag->add('version', '1.1'); $propbag->add('configuration', array('title', 'frequency', 'count', 'show_count', 'hide_zero_count')); $propbag->add('groups', array('FRONTEND_VIEWS')); } @@ -17,6 +22,7 @@ class serendipity_plugin_archives extends serendipity_plugin { function introspect_config_item($name, &$propbag) { switch($name) { + case 'title': $propbag->add('type', 'string'); $propbag->add('name', TITLE); @@ -68,7 +74,7 @@ class serendipity_plugin_archives extends serendipity_plugin { $ts = mktime(0, 0, 0, date('m'), 1); $add_query = ''; - + $category_set = isset($serendipity['GET']['category']); if ($category_set) { $base_query = 'C' . (int)$serendipity['GET']['category']; @@ -76,18 +82,18 @@ class serendipity_plugin_archives extends serendipity_plugin { } $max_x = $this->get_config('count', 3); - $show_count = serendipity_db_bool($this->get_config('show_count', false)); - $hide_zero_count = serendipity_db_bool($this->get_config('hide_zero_count', false)); + $show_count = serendipity_db_bool($this->get_config('show_count', 'false')); + $hide_zero_count = serendipity_db_bool($this->get_config('hide_zero_count', 'false')); $freq = $this->get_config('frequency', 'months'); echo '<ul class="plainList">' . "\n"; - + if ($serendipity['dbType'] == 'sqlite' || $serendipity['dbType'] == 'sqlite3' || $serendipity['dbType'] == 'sqlite3oo') { $dist_sql = 'count(e.id) AS orderkey'; } else { $dist_sql = 'count(DISTINCT e.id) AS orderkey'; } - + for($x = 0; $x < $max_x; $x++) { $current_ts = $ts; switch($freq) { @@ -177,20 +183,21 @@ class serendipity_plugin_archives extends serendipity_plugin { if (empty($ec['orderkey'])) { $ec['orderkey'] = '0'; } - $hidden_by_zero_count = $hide_zero_count && ( $ec['orderkey'] == '0'); + $hidden_by_zero_count = $hide_zero_count && ( $ec['orderkey'] == '0'); $html_count .= ' (' . $ec['orderkey'] . ')'; } } if (!$hidden_by_zero_count) { - echo '<li><a href="' . $link . '" title="' . $ts_title . '">' . $ts_title . $html_count . '</a></li>' . "\n"; + echo ' <li><a href="' . $link . '" title="' . $ts_title . '">' . $ts_title . $html_count . '</a></li>' . "\n"; } } - echo '<li><a href="'. $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?frontpage">' . RECENT . '</a></li>' . "\n"; - echo '<li><a href="'. serendipity_rewriteURL(PATH_ARCHIVE . $add_query) .'">' . OLDER . '</a></li>'. "\n"; + echo ' <li><a href="'. $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?frontpage">' . RECENT . '</a></li>' . "\n"; + echo ' <li><a href="'. serendipity_rewriteURL(PATH_ARCHIVE . $add_query) .'">' . OLDER . '</a></li>'. "\n"; echo '</ul>' . "\n"; } + } ?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_authors/serendipity_plugin_authors.php b/plugins/serendipity_plugin_authors/serendipity_plugin_authors.php index 7bd80947..76269394 100644 --- a/plugins/serendipity_plugin_authors/serendipity_plugin_authors.php +++ b/plugins/serendipity_plugin_authors/serendipity_plugin_authors.php @@ -1,16 +1,22 @@ <?php -class serendipity_plugin_authors extends serendipity_plugin { +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + +class serendipity_plugin_authors extends serendipity_plugin +{ var $title = AUTHORS; - function introspect(&$propbag) { + function introspect(&$propbag) + { global $serendipity; $propbag->add('name', AUTHORS); $propbag->add('description', AUTHOR_PLUGIN_DESC); $propbag->add('stackable', true); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '2.1'); + $propbag->add('version', '2.2'); $propbag->add('configuration', array('image', 'allow_select', 'title', 'showartcount', 'mincount')); $propbag->add('groups', array('FRONTEND_VIEWS')); } @@ -18,7 +24,9 @@ class serendipity_plugin_authors extends serendipity_plugin { function introspect_config_item($name, &$propbag) { global $serendipity; + switch($name) { + case 'title': $propbag->add('type', 'string'); $propbag->add('name', TITLE); @@ -37,7 +45,7 @@ class serendipity_plugin_authors extends serendipity_plugin { $propbag->add('type', 'boolean'); $propbag->add('name', AUTHORS_SHOW_ARTICLE_COUNT); $propbag->add('description', AUTHORS_SHOW_ARTICLE_COUNT_DESC); - $propbag->add('default', false); + $propbag->add('default', 'false'); break; case 'mincount': @@ -53,21 +61,22 @@ class serendipity_plugin_authors extends serendipity_plugin { return true; } - function generate_content(&$title) { + function generate_content(&$title) + { global $serendipity; $title = $this->get_config('title', $this->title); $sort = $this->get_config('sort_order'); if ($sort == 'none') { - $sort = ''; + $sort = ''; } else { $sort .= ' ' . $this->get_config('sort_method'); } - $is_count = serendipity_db_bool($this->get_config('showartcount')); - $mincount = (int)$this->get_config('mincount'); - $authors = serendipity_fetchUsers(null, 'hidden', $is_count); - $html = ''; + $is_count = serendipity_db_bool($this->get_config('showartcount', 'false')); + $mincount = (int)$this->get_config('mincount'); + $authors = serendipity_fetchUsers(null, 'hidden', $is_count); + $html = ''; $image = $this->get_config('image', serendipity_getTemplateFile('img/xml.gif')); $image = (($image == "'none'" || $image == 'none') ? '' : $image); @@ -89,9 +98,9 @@ class serendipity_plugin_authors extends serendipity_plugin { $html .= '<li>'; if ( !empty($image) ) { - $html .= '<a class="serendipity_xml_icon" href="'. serendipity_feedAuthorURL($auth, 'serendipityHTTPPath') .'"><img src="'. $image .'" alt="XML" style="border: 0px" /></a> '; + $html .= ' <a class="serendipity_xml_icon" href="'. serendipity_feedAuthorURL($auth, 'serendipityHTTPPath') .'"><img src="'. $image .'" alt="XML" style="border: 0px" /></a> '; } - $html .= '<a href="'. serendipity_authorURL($auth, 'serendipityHTTPPath') .'" title="'. serendipity_specialchars($auth['realname']) .'">'. serendipity_specialchars($auth['realname']) . $entrycount . '</a>'; + $html .= ' <a href="'. serendipity_authorURL($auth, 'serendipityHTTPPath') .'" title="'. serendipity_specialchars($auth['realname']) .'">'. serendipity_specialchars($auth['realname']) . $entrycount . '</a>'; $html .= '</li>' . "\n"; } } @@ -99,7 +108,7 @@ class serendipity_plugin_authors extends serendipity_plugin { $html .= '</ul>' . "\n"; $html .= sprintf( - '<div><a href="%s" title="%s">%s</a></div>', + '<div><a href="%s" title="%s">%s</a></div>'."\n", $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'], ALL_AUTHORS, diff --git a/plugins/serendipity_plugin_calendar/serendipity_plugin_calendar.php b/plugins/serendipity_plugin_calendar/serendipity_plugin_calendar.php index 9cad1e70..2318b699 100644 --- a/plugins/serendipity_plugin_calendar/serendipity_plugin_calendar.php +++ b/plugins/serendipity_plugin_calendar/serendipity_plugin_calendar.php @@ -1,6 +1,11 @@ <?php -class serendipity_plugin_calendar extends serendipity_plugin { +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + +class serendipity_plugin_calendar extends serendipity_plugin +{ var $title = CALENDAR; function introspect(&$propbag) @@ -10,13 +15,14 @@ class serendipity_plugin_calendar extends serendipity_plugin { $propbag->add('configuration', array('beginningOfWeek', 'enableExtEvents', 'category')); $propbag->add('stackable', false); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '1.1'); + $propbag->add('version', '1.2'); $propbag->add('groups', array('FRONTEND_VIEWS')); } function introspect_config_item($name, &$propbag) { switch($name) { + case 'beginningOfWeek': $options = array(); for ( $i = 1; $i <= 7; $i++ ) { @@ -138,7 +144,7 @@ class serendipity_plugin_calendar extends serendipity_plugin { // Calculate first timestamp of the month list ($firstgy, $firstgm, $firstgd ) = p2g ( $year, $month, 1); - $firstts = mktime (0, 0, 0, $firstgm, $firstgd, $firstgy); + $firstts = mktime(0, 0, 0, $firstgm, $firstgd, $firstgy); // Calculate first persian day, week day name $firstDayWeekDay = date('w', $firstts); @@ -207,7 +213,7 @@ class serendipity_plugin_calendar extends serendipity_plugin { } else { $catid = false; } - + if ($catid) { $base_query = 'C' . $catid; $add_query = '/' . $base_query; @@ -262,7 +268,7 @@ class serendipity_plugin_calendar extends serendipity_plugin { } // end switch $externalevents = array(); - if (serendipity_db_bool($this->get_config('enableExtEvents', false))) { + if (serendipity_db_bool($this->get_config('enableExtEvents', 'false'))) { serendipity_plugin_api::hook_event('frontend_calendar', $externalevents, array('Month' => $month, 'Year' => $year, 'TS' => $ts, 'EndTS' => $endts)); } @@ -346,6 +352,7 @@ class serendipity_plugin_calendar extends serendipity_plugin { echo serendipity_smarty_fetch('CALENDAR', 'plugin_calendar.tpl'); } + } ?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_categories/serendipity_plugin_categories.php b/plugins/serendipity_plugin_categories/serendipity_plugin_categories.php index 63043b3e..df511ae5 100644 --- a/plugins/serendipity_plugin_categories/serendipity_plugin_categories.php +++ b/plugins/serendipity_plugin_categories/serendipity_plugin_categories.php @@ -1,6 +1,11 @@ <?php -class serendipity_plugin_categories extends serendipity_plugin { +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + +class serendipity_plugin_categories extends serendipity_plugin +{ var $title = CATEGORIES; function introspect(&$propbag) { @@ -10,7 +15,7 @@ class serendipity_plugin_categories extends serendipity_plugin { $propbag->add('description', CATEGORY_PLUGIN_DESC); $propbag->add('stackable', true); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '2.04'); + $propbag->add('version', '2.05'); $propbag->add('configuration', array('title', 'authorid', 'parent_base', 'hide_parent', 'image', 'sort_order', 'sort_method', 'allow_select', 'hide_parallel', 'show_count', 'show_all', 'smarty')); $propbag->add('groups', array('FRONTEND_VIEWS')); } @@ -18,7 +23,9 @@ class serendipity_plugin_categories extends serendipity_plugin { function introspect_config_item($name, &$propbag) { global $serendipity; + switch($name) { + case 'title': $propbag->add('type', 'string'); $propbag->add('name', TITLE); @@ -128,8 +135,8 @@ class serendipity_plugin_categories extends serendipity_plugin { case 'show_all': $propbag->add('type', 'boolean'); - $propbag->add('name', CATEGORY_PLUGIN_SHOWALL); # i18n - $propbag->add('description', CATEGORY_PLUGIN_SHOWALL_DESC); # i18n + $propbag->add('name', CATEGORY_PLUGIN_SHOWALL); + $propbag->add('description', CATEGORY_PLUGIN_SHOWALL_DESC); $propbag->add('default', false); break; @@ -139,11 +146,12 @@ class serendipity_plugin_categories extends serendipity_plugin { return true; } - function generate_content(&$title) { + function generate_content(&$title) + { global $serendipity; $title = $this->get_config('title'); - $smarty = serendipity_db_bool($this->get_config('smarty', false)); + $smarty = serendipity_db_bool($this->get_config('smarty', 'false')); $which_category = $this->get_config('authorid'); $sort = $this->get_config('sort_order'); @@ -152,7 +160,7 @@ class serendipity_plugin_categories extends serendipity_plugin { } else { $sort .= ' ' . $this->get_config('sort_method'); } - $is_form = serendipity_db_bool($this->get_config('allow_select', false)); + $is_form = serendipity_db_bool($this->get_config('allow_select', 'false')); if ($which_category === "login") { $which_category = (int)$serendipity['authorid']; if ($which_category === 0) { @@ -164,17 +172,17 @@ class serendipity_plugin_categories extends serendipity_plugin { $cat_count = array(); if (serendipity_db_bool($this->get_config('show_count'))) { - $cat_sql = "SELECT c.categoryid, c.category_name, count(e.id) as postings - FROM {$serendipity['dbPrefix']}entrycat ec, - {$serendipity['dbPrefix']}category c, - {$serendipity['dbPrefix']}entries e - WHERE ec.categoryid = c.categoryid - AND ec.entryid = e.id - AND e.isdraft = 'false' - " . (!serendipity_db_bool($serendipity['showFutureEntries']) ? " AND e.timestamp <= " . serendipity_db_time() : '') . " - GROUP BY c.categoryid, c.category_name - ORDER BY postings DESC"; - $category_rows = serendipity_db_query($cat_sql); + $cat_sql = "SELECT c.categoryid, c.category_name, count(e.id) as postings + FROM {$serendipity['dbPrefix']}entrycat ec, + {$serendipity['dbPrefix']}category c, + {$serendipity['dbPrefix']}entries e + WHERE ec.categoryid = c.categoryid + AND ec.entryid = e.id + AND e.isdraft = 'false' + " . (!serendipity_db_bool($serendipity['showFutureEntries']) ? " AND e.timestamp <= " . serendipity_db_time() : '') . " + GROUP BY c.categoryid, c.category_name + ORDER BY postings DESC"; + $category_rows = serendipity_db_query($cat_sql); if (is_array($category_rows)) { foreach($category_rows AS $cat) { $cat_count[$cat['categoryid']] = $cat['postings']; @@ -183,14 +191,14 @@ class serendipity_plugin_categories extends serendipity_plugin { } - $html = ''; + $html = ''; if (!$smarty && $is_form) { $html .= '<form action="' . $serendipity['baseURL'] . $serendipity['indexFile'] . '?frontpage" method="post"> - <div id="serendipity_category_form_content">'; + <div id="serendipity_category_form_content">'."\n"; } if (!$smarty) { - $html .= '<ul id="serendipity_categories_list" style="list-style: none; margin: 0px; padding: 0px">'; + $html .= '<ul id="serendipity_categories_list" style="list-style: none; margin: 0px; padding: 0px">'."\n"; } $image = $this->get_config('image', serendipity_getTemplateFile('img/xml.gif')); @@ -275,16 +283,16 @@ class serendipity_plugin_categories extends serendipity_plugin { } if (!$smarty) { - $html .= '</ul>'; + $html .= "</ul>\n"; } if (!$smarty && $is_form) { - $html .= '<div class="category_submit"><input type="submit" name="serendipity[isMultiCat]" value="' . GO . '" /></div>'; + $html .= '<div class="category_submit"><input type="submit" name="serendipity[isMultiCat]" value="' . GO . '" /></div>'."\n"; } - if (!$smarty && serendipity_db_bool($this->get_config('show_all', false))) { + if (!$smarty && serendipity_db_bool($this->get_config('show_all', 'false'))) { $html .= sprintf( - '<div class="category_link_all"><a href="%s" title="%s">%s</a></div>', + '<div class="category_link_all"><a href="%s" title="%s">%s</a></div>'."\n", $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?frontpage', ALL_CATEGORIES, @@ -293,7 +301,7 @@ class serendipity_plugin_categories extends serendipity_plugin { } if (!$smarty && $is_form) { - $html .= '</div></form>'; + $html .= "</div>\n</form>\n"; } if (!$smarty) { @@ -309,6 +317,7 @@ class serendipity_plugin_categories extends serendipity_plugin { echo serendipity_smarty_fetch('CATEGORIES', 'plugin_categories.tpl'); } } + } ?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_bg.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_bg.inc.php index 3969912a..49e9f6cb 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_bg.inc.php @@ -1,18 +1,18 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ - @define('PLUGIN_COMMENTS_BLAHBLAH', 'Показва последните коментари на Вашите постинги'); - @define('PLUGIN_COMMENTS_WORDWRAP', 'Пренос на нов ред'); - @define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'Брой думи преди да сработи преносът на нов ред (по подразбиране: 30)'); - @define('PLUGIN_COMMENTS_MAXCHARS', 'Максимален брой показвани символи за коментар'); - @define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'Максимум колко символа да бъдат показани за всеки коментар (по подразбиране: 120)'); - @define('PLUGIN_COMMENTS_MAXENTRIES', 'Максимален брой на показваните коментари'); - @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Колко коментара най-много да бъдат показани (по подразбиране: 15)'); - @define('PLUGIN_COMMENTS_ABOUT', '%s за%s'); - @define('PLUGIN_COMMENTS_ANONYMOUS', 'анонимен'); +@define('PLUGIN_COMMENTS_BLAHBLAH', 'Показва последните коментари на Вашите постинги'); +@define('PLUGIN_COMMENTS_WORDWRAP', 'Пренос на нов ред'); +@define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'Брой думи преди да сработи преносът на нов ред (по подразбиране: 30)'); +@define('PLUGIN_COMMENTS_MAXCHARS', 'Максимален брой показвани символи за коментар'); +@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'Максимум колко символа да бъдат показани за всеки коментар (по подразбиране: 120)'); +@define('PLUGIN_COMMENTS_MAXENTRIES', 'Максимален брой на показваните коментари'); +@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Колко коментара най-много да бъдат показани (по подразбиране: 15)'); +@define('PLUGIN_COMMENTS_ABOUT', '%s за%s'); +@define('PLUGIN_COMMENTS_ANONYMOUS', 'анонимен'); - @define('PLUGIN_COMMENTS_ADDURL', 'Добавя URL към'); +@define('PLUGIN_COMMENTS_ADDURL', 'Добавя URL към'); diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_cs.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_cs.inc.php index c545445b..15e23335 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2008-01-20 01:31:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -17,4 +17,4 @@ @define('PLUGIN_COMMENTS_ANONYMOUS', 'anonym'); @define('PLUGIN_COMMENTS_ADDURL', 'Přidat URL adresu autorů do'); -?> + diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_cz.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_cz.inc.php index c766cd2a..15e23335 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cz.inc.php 1381 2008-01-20 01:31:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -17,4 +17,4 @@ @define('PLUGIN_COMMENTS_ANONYMOUS', 'anonym'); @define('PLUGIN_COMMENTS_ADDURL', 'Přidat URL adresu autorů do'); -?> + diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_de.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_de.inc.php index 7342750d..2306b16f 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_de.inc.php @@ -1,20 +1,21 @@ -<?php # lang_de.inc.php 1.0 2009-06-03 10:01:36 VladaAjgl $ +<?php /** * @version 1.0 * @author Konrad Bauckmeier <kontakt@dd4kids.de> * @translated 2009/06/03 */ - @define('PLUGIN_COMMENTS_BLAHBLAH', 'Zeigt die letzten Kommentare'); - @define('PLUGIN_COMMENTS_WORDWRAP', 'Zeilenumbruch'); - @define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'Nach wievielen Buchstaben soll ein Zeilenumbruch eingefügt werden? (Standard: 30)'); - @define('PLUGIN_COMMENTS_MAXCHARS', 'Zeichen pro Kommentar'); - @define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'Wieviele Zeichen sollen pro Kommentar gezeigt werden? (Standard: 120)'); - @define('PLUGIN_COMMENTS_MAXENTRIES', 'Anzahl an Kommentaren'); - @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Wieviele Kommentare sollen gezeigt werden? (Standard: 15)'); - @define('PLUGIN_COMMENTS_ABOUT', '%s zu%s'); +@define('PLUGIN_COMMENTS_BLAHBLAH', 'Zeigt die letzten Kommentare'); +@define('PLUGIN_COMMENTS_WORDWRAP', 'Zeilenumbruch'); +@define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'Nach wievielen Buchstaben soll ein Zeilenumbruch eingefügt werden? (Standard: 30)'); +@define('PLUGIN_COMMENTS_MAXCHARS', 'Zeichen pro Kommentar'); +@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'Wieviele Zeichen sollen pro Kommentar gezeigt werden? (Standard: 120)'); +@define('PLUGIN_COMMENTS_MAXENTRIES', 'Anzahl an Kommentaren'); +@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Wieviele Kommentare sollen gezeigt werden? (Standard: 15)'); +@define('PLUGIN_COMMENTS_ABOUT', '%s zu%s'); - @define('PLUGIN_COMMENTS_ADDURL', 'Kommentatoren URL anzeigen bei'); +@define('PLUGIN_COMMENTS_ADDURL', 'Kommentatoren URL anzeigen bei'); // Next lines were translated on 2009/06/03 -@define('PLUGIN_COMMENTS_ANONYMOUS', 'anonym'); \ No newline at end of file +@define('PLUGIN_COMMENTS_ANONYMOUS', 'anonym'); + diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_es.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_es.inc.php index 5a718bcd..2d229490 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_es.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -15,4 +15,4 @@ @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', '¿Cuántos comentarios deben ser mostrados? (Por defecto: 15)'); @define('PLUGIN_COMMENTS_ABOUT', '%s acerca%s'); @define('PLUGIN_COMMENTS_ANONYMOUS', 'anon'); -?> + diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_fr.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_fr.inc.php index 5f93e4b4..4b74b5fa 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -23,6 +23,3 @@ @define('PLUGIN_COMMENTS_ABOUT', '%s à propos%s'); @define('PLUGIN_COMMENTS_ANONYMOUS', 'anonyme'); - -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_is.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_is.inc.php index 3b2efeca..0788683f 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_is.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_is.inc.php @@ -1,12 +1,11 @@ -<?php # $Id$ +<?php + +@define('PLUGIN_COMMENTS_BLAHBLAH', 'Sýnir síðustu athugasemdir á færslurnar þínar'); +@define('PLUGIN_COMMENTS_WORDWRAP', 'Línuskil'); +@define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'Hversu mörg orð þar til línuskil eiga sér stað? (Sjálfgefið gildi: 30)'); +@define('PLUGIN_COMMENTS_MAXCHARS', 'Hámarksstafafjöldi á athugasemd'); +@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'Hversu margir stafir eiga að vera birtir fyrir hverja athugasemd? (Sjálfgefið gildi: 120)'); +@define('PLUGIN_COMMENTS_MAXENTRIES', 'Hámarksfjöldi athugasemda'); +@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Hversu margar athugasemdir skal sýna? (Sjálfgefið gildi: 15)'); +@define('PLUGIN_COMMENTS_ABOUT', '%s um%s'); - @define('PLUGIN_COMMENTS_BLAHBLAH', 'Sýnir síðustu athugasemdir á færslurnar þínar'); - @define('PLUGIN_COMMENTS_WORDWRAP', 'Línuskil'); - @define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'Hversu mörg orð þar til línuskil eiga sér stað? (Sjálfgefið gildi: 30)'); - @define('PLUGIN_COMMENTS_MAXCHARS', 'Hámarksstafafjöldi á athugasemd'); - @define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'Hversu margir stafir eiga að vera birtir fyrir hverja athugasemd? (Sjálfgefið gildi: 120)'); - @define('PLUGIN_COMMENTS_MAXENTRIES', 'Hámarksfjöldi athugasemda'); - @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Hversu margar athugasemdir skal sýna? (Sjálfgefið gildi: 15)'); - @define('PLUGIN_COMMENTS_ABOUT', '%s um%s'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_ja.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_ja.inc.php index f508d220..57a8a43e 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 1381 */ @@ -15,4 +15,4 @@ @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'どれくらいのコメントを表示しますか? (デフォルト: 15)'); @define('PLUGIN_COMMENTS_ABOUT', 'コメント: %s<br />%s'); @define('PLUGIN_COMMENTS_ANONYMOUS', '匿名'); -?> + diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_ko.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_ko.inc.php index b56378b0..1ba73938 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_ko.inc.php @@ -1,14 +1,13 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_COMMENTS_BLAHBLAH', '최근에 달린 덧글을 보여줌'); - @define('PLUGIN_COMMENTS_WORDWRAP', '자동 줄바꿈'); - @define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', '몇 글자 후에 자동 줄바꿈을 하겠습니까? (기본값: 30)'); - @define('PLUGIN_COMMENTS_MAXCHARS', '덧글 당 최대 글자 수'); - @define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', '각 덧글에 대해 최대 몇 글자를 보여주겠습니까? (기본값: 120)'); - @define('PLUGIN_COMMENTS_MAXENTRIES', '최대 덧글 수'); - @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', '몇 개의 덧글을 보여주겠습니까? (기본값: 15)'); - @define('PLUGIN_COMMENTS_ABOUT', '%s 님이 %s 에 대해'); +@define('PLUGIN_COMMENTS_BLAHBLAH', '최근에 달린 덧글을 보여줌'); +@define('PLUGIN_COMMENTS_WORDWRAP', '자동 줄바꿈'); +@define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', '몇 글자 후에 자동 줄바꿈을 하겠습니까? (기본값: 30)'); +@define('PLUGIN_COMMENTS_MAXCHARS', '덧글 당 최대 글자 수'); +@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', '각 덧글에 대해 최대 몇 글자를 보여주겠습니까? (기본값: 120)'); +@define('PLUGIN_COMMENTS_MAXENTRIES', '최대 덧글 수'); +@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', '몇 개의 덧글을 보여주겠습니까? (기본값: 15)'); +@define('PLUGIN_COMMENTS_ABOUT', '%s 님이 %s 에 대해'); -?> diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_pl.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_pl.inc.php index 9e443376..e9f0c2a1 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -15,4 +15,4 @@ @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Jak wiele komentarzy będzie pokazywanych. (Standardowo: 15)'); @define('PLUGIN_COMMENTS_ABOUT', '%s do wpisu%s'); @define('PLUGIN_COMMENTS_ANONYMOUS', 'anonim'); -?> + diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_pt_PT.inc.php index d50f9f1a..b4eec867 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $ +<?php ########################################################################## # serendipity - another blogger... # @@ -24,5 +24,3 @@ @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Define quantos comentários vão ser afixados. Valor por omissão: 15'); @define('PLUGIN_COMMENTS_ABOUT', '%s a propósito de%s'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_sk.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_sk.inc.php index 9e05d185..2f8d080d 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_sk.inc.php @@ -16,4 +16,4 @@ @define('PLUGIN_COMMENTS_ANONYMOUS', 'anonym'); @define('PLUGIN_COMMENTS_ADDURL', 'Pridať URL adresu autorov do'); -?> + diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_tn.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_tn.inc.php index ccc95a3f..4d1e362c 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,12 +12,12 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_COMMENTS_BLAHBLAH', '顯示最新的迴響'); - @define('PLUGIN_COMMENTS_WORDWRAP', '自動換行'); - @define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', '要多少字之後自動換行?(預設:30)'); - @define('PLUGIN_COMMENTS_MAXCHARS', '顯示長度'); - @define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', '每個迴響要顯示多少個字?(預設:120)'); - @define('PLUGIN_COMMENTS_MAXENTRIES', '迴響數量'); - @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', '要顯示多少個迴響?(預設:15)'); - @define('PLUGIN_COMMENTS_ABOUT', '%s 發佈於 %s'); -?> \ No newline at end of file +@define('PLUGIN_COMMENTS_BLAHBLAH', '顯示最新的迴響'); +@define('PLUGIN_COMMENTS_WORDWRAP', '自動換行'); +@define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', '要多少字之後自動換行?(預設:30)'); +@define('PLUGIN_COMMENTS_MAXCHARS', '顯示長度'); +@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', '每個迴響要顯示多少個字?(預設:120)'); +@define('PLUGIN_COMMENTS_MAXENTRIES', '迴響數量'); +@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', '要顯示多少個迴響?(預設:15)'); +@define('PLUGIN_COMMENTS_ABOUT', '%s 發佈於 %s'); + diff --git a/plugins/serendipity_plugin_comments/UTF-8/lang_tr.inc.php b/plugins/serendipity_plugin_comments/UTF-8/lang_tr.inc.php index e0d4283d..c2688a31 100644 --- a/plugins/serendipity_plugin_comments/UTF-8/lang_tr.inc.php +++ b/plugins/serendipity_plugin_comments/UTF-8/lang_tr.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ahmet Usal <ahmetusal@gmail.com> * First public version: lang_tr.inc.php */ @@ -15,4 +15,3 @@ @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Kaç adet görüþ gösterilsin? (Öntanýmlý: 15)'); @define('PLUGIN_COMMENTS_ABOUT', '%s hakkýnda%s'); -?> diff --git a/plugins/serendipity_plugin_comments/lang_bg.inc.php b/plugins/serendipity_plugin_comments/lang_bg.inc.php index a02258de..350ace82 100644 --- a/plugins/serendipity_plugin_comments/lang_bg.inc.php +++ b/plugins/serendipity_plugin_comments/lang_bg.inc.php @@ -1,18 +1,18 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ - @define('PLUGIN_COMMENTS_BLAHBLAH', '������� ���������� ��������� �� ������ ��������'); - @define('PLUGIN_COMMENTS_WORDWRAP', '������ �� ��� ���'); - @define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', '���� ���� ����� �� �������� �������� �� ��� ��� (�� ������������: 30)'); - @define('PLUGIN_COMMENTS_MAXCHARS', '���������� ���� ��������� ������� �� ��������'); - @define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', '�������� ����� ������� �� ����� �������� �� ����� �������� (�� ������������: 120)'); - @define('PLUGIN_COMMENTS_MAXENTRIES', '���������� ���� �� ����������� ���������'); - @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', '����� ��������� ���-����� �� ����� �������� (�� ������������: 15)'); - @define('PLUGIN_COMMENTS_ABOUT', '%s ��%s'); - @define('PLUGIN_COMMENTS_ANONYMOUS', '��������'); +@define('PLUGIN_COMMENTS_BLAHBLAH', '������� ���������� ��������� �� ������ ��������'); +@define('PLUGIN_COMMENTS_WORDWRAP', '������ �� ��� ���'); +@define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', '���� ���� ����� �� �������� �������� �� ��� ��� (�� ������������: 30)'); +@define('PLUGIN_COMMENTS_MAXCHARS', '���������� ���� ��������� ������� �� ��������'); +@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', '�������� ����� ������� �� ����� �������� �� ����� �������� (�� ������������: 120)'); +@define('PLUGIN_COMMENTS_MAXENTRIES', '���������� ���� �� ����������� ���������'); +@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', '����� ��������� ���-����� �� ����� �������� (�� ������������: 15)'); +@define('PLUGIN_COMMENTS_ABOUT', '%s ��%s'); +@define('PLUGIN_COMMENTS_ANONYMOUS', '��������'); - @define('PLUGIN_COMMENTS_ADDURL', '������ URL ���'); +@define('PLUGIN_COMMENTS_ADDURL', '������ URL ���'); diff --git a/plugins/serendipity_plugin_comments/lang_cs.inc.php b/plugins/serendipity_plugin_comments/lang_cs.inc.php index 730b9231..b081108e 100644 --- a/plugins/serendipity_plugin_comments/lang_cs.inc.php +++ b/plugins/serendipity_plugin_comments/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2008-01-20 01:31:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -17,4 +17,4 @@ @define('PLUGIN_COMMENTS_ANONYMOUS', 'anonym'); @define('PLUGIN_COMMENTS_ADDURL', 'P�idat URL adresu autor� do'); -?> + diff --git a/plugins/serendipity_plugin_comments/lang_cz.inc.php b/plugins/serendipity_plugin_comments/lang_cz.inc.php index 25845729..f4a527a8 100644 --- a/plugins/serendipity_plugin_comments/lang_cz.inc.php +++ b/plugins/serendipity_plugin_comments/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cz.inc.php 1381 2008-01-20 01:31:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -17,4 +17,4 @@ @define('PLUGIN_COMMENTS_ANONYMOUS', 'anonym'); @define('PLUGIN_COMMENTS_ADDURL', 'P�idat URL adresu autor� do'); -?> + diff --git a/plugins/serendipity_plugin_comments/lang_de.inc.php b/plugins/serendipity_plugin_comments/lang_de.inc.php index 5bead7e7..516722ca 100644 --- a/plugins/serendipity_plugin_comments/lang_de.inc.php +++ b/plugins/serendipity_plugin_comments/lang_de.inc.php @@ -1,20 +1,21 @@ -<?php # lang_de.inc.php 1.0 2009-06-03 10:01:36 VladaAjgl $ +<?php /** * @version 1.0 * @author Konrad Bauckmeier <kontakt@dd4kids.de> * @translated 2009/06/03 */ - @define('PLUGIN_COMMENTS_BLAHBLAH', 'Zeigt die letzten Kommentare'); - @define('PLUGIN_COMMENTS_WORDWRAP', 'Zeilenumbruch'); - @define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'Nach wievielen Buchstaben soll ein Zeilenumbruch eingef�gt werden? (Standard: 30)'); - @define('PLUGIN_COMMENTS_MAXCHARS', 'Zeichen pro Kommentar'); - @define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'Wieviele Zeichen sollen pro Kommentar gezeigt werden? (Standard: 120)'); - @define('PLUGIN_COMMENTS_MAXENTRIES', 'Anzahl an Kommentaren'); - @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Wieviele Kommentare sollen gezeigt werden? (Standard: 15)'); - @define('PLUGIN_COMMENTS_ABOUT', '%s zu%s'); +@define('PLUGIN_COMMENTS_BLAHBLAH', 'Zeigt die letzten Kommentare'); +@define('PLUGIN_COMMENTS_WORDWRAP', 'Zeilenumbruch'); +@define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'Nach wievielen Buchstaben soll ein Zeilenumbruch eingef�gt werden? (Standard: 30)'); +@define('PLUGIN_COMMENTS_MAXCHARS', 'Zeichen pro Kommentar'); +@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'Wieviele Zeichen sollen pro Kommentar gezeigt werden? (Standard: 120)'); +@define('PLUGIN_COMMENTS_MAXENTRIES', 'Anzahl an Kommentaren'); +@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Wieviele Kommentare sollen gezeigt werden? (Standard: 15)'); +@define('PLUGIN_COMMENTS_ABOUT', '%s zu%s'); - @define('PLUGIN_COMMENTS_ADDURL', 'Kommentatoren URL anzeigen bei'); +@define('PLUGIN_COMMENTS_ADDURL', 'Kommentatoren URL anzeigen bei'); // Next lines were translated on 2009/06/03 -@define('PLUGIN_COMMENTS_ANONYMOUS', 'anonym'); \ No newline at end of file +@define('PLUGIN_COMMENTS_ANONYMOUS', 'anonym'); + diff --git a/plugins/serendipity_plugin_comments/lang_en.inc.php b/plugins/serendipity_plugin_comments/lang_en.inc.php index 16ebc243..37b279ee 100644 --- a/plugins/serendipity_plugin_comments/lang_en.inc.php +++ b/plugins/serendipity_plugin_comments/lang_en.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Translator Name <yourmail@example.com> * EN-Revision: Revision of lang_en.inc.php */ diff --git a/plugins/serendipity_plugin_comments/lang_es.inc.php b/plugins/serendipity_plugin_comments/lang_es.inc.php index 4fa4f6ba..95a55a1e 100644 --- a/plugins/serendipity_plugin_comments/lang_es.inc.php +++ b/plugins/serendipity_plugin_comments/lang_es.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -15,4 +15,4 @@ @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', '�Cu�ntos comentarios deben ser mostrados? (Por defecto: 15)'); @define('PLUGIN_COMMENTS_ABOUT', '%s acerca%s'); @define('PLUGIN_COMMENTS_ANONYMOUS', 'anon'); -?> + diff --git a/plugins/serendipity_plugin_comments/lang_fr.inc.php b/plugins/serendipity_plugin_comments/lang_fr.inc.php index 29d8117f..619836b1 100644 --- a/plugins/serendipity_plugin_comments/lang_fr.inc.php +++ b/plugins/serendipity_plugin_comments/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -23,6 +23,3 @@ @define('PLUGIN_COMMENTS_ABOUT', '%s � propos%s'); @define('PLUGIN_COMMENTS_ANONYMOUS', 'anonyme'); - -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_comments/lang_is.inc.php b/plugins/serendipity_plugin_comments/lang_is.inc.php index ae1f97ef..9bb73d44 100644 --- a/plugins/serendipity_plugin_comments/lang_is.inc.php +++ b/plugins/serendipity_plugin_comments/lang_is.inc.php @@ -1,12 +1,11 @@ -<?php # $Id$ +<?php + +@define('PLUGIN_COMMENTS_BLAHBLAH', 'S�nir s��ustu athugasemdir � f�rslurnar ��nar'); +@define('PLUGIN_COMMENTS_WORDWRAP', 'L�nuskil'); +@define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'Hversu m�rg or� �ar til l�nuskil eiga s�r sta�? (Sj�lfgefi� gildi: 30)'); +@define('PLUGIN_COMMENTS_MAXCHARS', 'H�marksstafafj�ldi � athugasemd'); +@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'Hversu margir stafir eiga a� vera birtir fyrir hverja athugasemd? (Sj�lfgefi� gildi: 120)'); +@define('PLUGIN_COMMENTS_MAXENTRIES', 'H�marksfj�ldi athugasemda'); +@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Hversu margar athugasemdir skal s�na? (Sj�lfgefi� gildi: 15)'); +@define('PLUGIN_COMMENTS_ABOUT', '%s um%s'); - @define('PLUGIN_COMMENTS_BLAHBLAH', 'S�nir s��ustu athugasemdir � f�rslurnar ��nar'); - @define('PLUGIN_COMMENTS_WORDWRAP', 'L�nuskil'); - @define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', 'Hversu m�rg or� �ar til l�nuskil eiga s�r sta�? (Sj�lfgefi� gildi: 30)'); - @define('PLUGIN_COMMENTS_MAXCHARS', 'H�marksstafafj�ldi � athugasemd'); - @define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'Hversu margir stafir eiga a� vera birtir fyrir hverja athugasemd? (Sj�lfgefi� gildi: 120)'); - @define('PLUGIN_COMMENTS_MAXENTRIES', 'H�marksfj�ldi athugasemda'); - @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Hversu margar athugasemdir skal s�na? (Sj�lfgefi� gildi: 15)'); - @define('PLUGIN_COMMENTS_ABOUT', '%s um%s'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_comments/lang_ja.inc.php b/plugins/serendipity_plugin_comments/lang_ja.inc.php index f508d220..57a8a43e 100644 --- a/plugins/serendipity_plugin_comments/lang_ja.inc.php +++ b/plugins/serendipity_plugin_comments/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 1381 */ @@ -15,4 +15,4 @@ @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'どれくらいのコメントを表示しますか? (デフォルト: 15)'); @define('PLUGIN_COMMENTS_ABOUT', 'コメント: %s<br />%s'); @define('PLUGIN_COMMENTS_ANONYMOUS', '匿名'); -?> + diff --git a/plugins/serendipity_plugin_comments/lang_ko.inc.php b/plugins/serendipity_plugin_comments/lang_ko.inc.php index b56378b0..1ba73938 100644 --- a/plugins/serendipity_plugin_comments/lang_ko.inc.php +++ b/plugins/serendipity_plugin_comments/lang_ko.inc.php @@ -1,14 +1,13 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_COMMENTS_BLAHBLAH', '최근에 달린 덧글을 보여줌'); - @define('PLUGIN_COMMENTS_WORDWRAP', '자동 줄바꿈'); - @define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', '몇 글자 후에 자동 줄바꿈을 하겠습니까? (기본값: 30)'); - @define('PLUGIN_COMMENTS_MAXCHARS', '덧글 당 최대 글자 수'); - @define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', '각 덧글에 대해 최대 몇 글자를 보여주겠습니까? (기본값: 120)'); - @define('PLUGIN_COMMENTS_MAXENTRIES', '최대 덧글 수'); - @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', '몇 개의 덧글을 보여주겠습니까? (기본값: 15)'); - @define('PLUGIN_COMMENTS_ABOUT', '%s 님이 %s 에 대해'); +@define('PLUGIN_COMMENTS_BLAHBLAH', '최근에 달린 덧글을 보여줌'); +@define('PLUGIN_COMMENTS_WORDWRAP', '자동 줄바꿈'); +@define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', '몇 글자 후에 자동 줄바꿈을 하겠습니까? (기본값: 30)'); +@define('PLUGIN_COMMENTS_MAXCHARS', '덧글 당 최대 글자 수'); +@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', '각 덧글에 대해 최대 몇 글자를 보여주겠습니까? (기본값: 120)'); +@define('PLUGIN_COMMENTS_MAXENTRIES', '최대 덧글 수'); +@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', '몇 개의 덧글을 보여주겠습니까? (기본값: 15)'); +@define('PLUGIN_COMMENTS_ABOUT', '%s 님이 %s 에 대해'); -?> diff --git a/plugins/serendipity_plugin_comments/lang_pl.inc.php b/plugins/serendipity_plugin_comments/lang_pl.inc.php index 9653ab02..a92906ae 100644 --- a/plugins/serendipity_plugin_comments/lang_pl.inc.php +++ b/plugins/serendipity_plugin_comments/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -15,4 +15,4 @@ @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Jak wiele komentarzy b�dzie pokazywanych. (Standardowo: 15)'); @define('PLUGIN_COMMENTS_ABOUT', '%s do wpisu%s'); @define('PLUGIN_COMMENTS_ANONYMOUS', 'anonim'); -?> + diff --git a/plugins/serendipity_plugin_comments/lang_pt_PT.inc.php b/plugins/serendipity_plugin_comments/lang_pt_PT.inc.php index 1136b481..77586e08 100644 --- a/plugins/serendipity_plugin_comments/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_comments/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $ +<?php ########################################################################## # serendipity - another blogger... # @@ -24,5 +24,3 @@ @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Define quantos coment�rios v�o ser afixados. Valor por omiss�o: 15'); @define('PLUGIN_COMMENTS_ABOUT', '%s a prop�sito de%s'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_comments/lang_sk.inc.php b/plugins/serendipity_plugin_comments/lang_sk.inc.php index d9777cde..9925bf86 100644 --- a/plugins/serendipity_plugin_comments/lang_sk.inc.php +++ b/plugins/serendipity_plugin_comments/lang_sk.inc.php @@ -16,4 +16,4 @@ @define('PLUGIN_COMMENTS_ANONYMOUS', 'anonym'); @define('PLUGIN_COMMENTS_ADDURL', 'Prida� URL adresu autorov do'); -?> + diff --git a/plugins/serendipity_plugin_comments/lang_tn.inc.php b/plugins/serendipity_plugin_comments/lang_tn.inc.php index ccc95a3f..4d1e362c 100644 --- a/plugins/serendipity_plugin_comments/lang_tn.inc.php +++ b/plugins/serendipity_plugin_comments/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,12 +12,12 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_COMMENTS_BLAHBLAH', '顯示最新的迴響'); - @define('PLUGIN_COMMENTS_WORDWRAP', '自動換行'); - @define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', '要多少字之後自動換行?(預設:30)'); - @define('PLUGIN_COMMENTS_MAXCHARS', '顯示長度'); - @define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', '每個迴響要顯示多少個字?(預設:120)'); - @define('PLUGIN_COMMENTS_MAXENTRIES', '迴響數量'); - @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', '要顯示多少個迴響?(預設:15)'); - @define('PLUGIN_COMMENTS_ABOUT', '%s 發佈於 %s'); -?> \ No newline at end of file +@define('PLUGIN_COMMENTS_BLAHBLAH', '顯示最新的迴響'); +@define('PLUGIN_COMMENTS_WORDWRAP', '自動換行'); +@define('PLUGIN_COMMENTS_WORDWRAP_BLAHBLAH', '要多少字之後自動換行?(預設:30)'); +@define('PLUGIN_COMMENTS_MAXCHARS', '顯示長度'); +@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', '每個迴響要顯示多少個字?(預設:120)'); +@define('PLUGIN_COMMENTS_MAXENTRIES', '迴響數量'); +@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', '要顯示多少個迴響?(預設:15)'); +@define('PLUGIN_COMMENTS_ABOUT', '%s 發佈於 %s'); + diff --git a/plugins/serendipity_plugin_comments/lang_tr.inc.php b/plugins/serendipity_plugin_comments/lang_tr.inc.php index 41626b95..c8fa1096 100644 --- a/plugins/serendipity_plugin_comments/lang_tr.inc.php +++ b/plugins/serendipity_plugin_comments/lang_tr.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ahmet Usal <ahmetusal@gmail.com> * First public version: lang_tr.inc.php */ @@ -15,4 +15,3 @@ @define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Ka� adet g�r�� g�sterilsin? (�ntan�ml�: 15)'); @define('PLUGIN_COMMENTS_ABOUT', '%s hakk�nda%s'); -?> diff --git a/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php b/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php index 24a8b605..03a651b6 100644 --- a/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php +++ b/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php @@ -1,4 +1,8 @@ -<?php # $Id$ +<?php + +if (IN_serendipity !== true) { + die ("Don't hack!"); +} @serendipity_plugin_api::load_language(dirname(__FILE__)); @@ -16,9 +20,9 @@ class serendipity_plugin_comments extends serendipity_plugin $propbag->add('description', PLUGIN_COMMENTS_BLAHBLAH); $propbag->add('stackable', true); $propbag->add('author', 'Garvin Hicking, Tadashi Jokagi, Judebert, G. Brockhaus'); - $propbag->add('version', '1.14'); + $propbag->add('version', '1.15'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -37,6 +41,7 @@ class serendipity_plugin_comments extends serendipity_plugin function introspect_config_item($name, &$propbag) { switch($name) { + case 'authorid': $authors = array('all' => ALL_AUTHORS, 'login' => CURRENT_AUTHOR); /* @@ -118,7 +123,7 @@ class serendipity_plugin_comments extends serendipity_plugin break; default: - return false; + return false; } return true; } @@ -154,14 +159,13 @@ class serendipity_plugin_comments extends serendipity_plugin } elseif ($this->get_config('viewmode') == 'trackbacks') { $viewtype .= ' AND (co.type = \'TRACKBACK\' OR co.type = \'PINGBACK\')'; } - + $cond = array(); $cond['and'] = ' AND e.isdraft = \'false\' '; if ($this->get_config('authorid') == 'login') { serendipity_ACL_SQL($cond, true); serendipity_plugin_api::hook_event('frontend_fetchentries', $cond, array('source' => 'entries')); } - $q = 'SELECT co.body AS comment, co.timestamp AS stamp, @@ -186,7 +190,7 @@ class serendipity_plugin_comments extends serendipity_plugin LIMIT ' . $max_entries; $sql = serendipity_db_query($q); // echo $q; - + if ($sql && is_array($sql)) { foreach($sql AS $key => $row) { if (function_exists('mb_strimwidth')) { @@ -199,20 +203,20 @@ class serendipity_plugin_comments extends serendipity_plugin $comment .= ' [...]'; } } - + $showurls = $this->get_config('showurls','trackbacks'); $isTrackBack = $row['comment_type'] == 'TRACKBACK' || $row['comment_type'] == 'PINGBACK'; - + if ($row['comment_url'] != '' && ( ($isTrackBack && ($showurls =='trackbacks' || $showurls =='all') || !$isTrackBack && ($showurls =='comments' || $showurls =='all')))) { - - /* Fix invalid cases in protocoll part */ + + /* Fix invalid cases in protocol part */ $row['comment_url'] = preg_replace('@^http://@i','http://', $row['comment_url']); $row['comment_url'] = preg_replace('@^https://@i','https://', $row['comment_url']); - - if (substr($row['comment_url'], 0, 7) != 'http://' && + + if (substr($row['comment_url'], 0, 7) != 'http://' && substr($row['comment_url'], 0, 8) != 'https://') { - $row['comment_url'] = 'http://' . $row['comment_url']; - } + $row['comment_url'] = 'http://' . $row['comment_url']; + } $user = '<a class="highlight" href="' . serendipity_specialchars(strip_tags($row['comment_url'])) . '" title="' . serendipity_specialchars(strip_tags($row['comment_title'])) . '">' . serendipity_specialchars(strip_tags($row['user'])) . '</a>'; } else { $user = serendipity_specialchars(strip_tags($row['user'])); @@ -265,6 +269,8 @@ class serendipity_plugin_comments extends serendipity_plugin } } } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_bg.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_bg.inc.php index fdad3666..be29f02f 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_bg.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_cs.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_cs.inc.php index c4374068..b2b98077 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2007-12-14 00:12:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -9,4 +9,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'V postranním panelu zobrazuje podrobnosti použité licence "Creative Commons" (Autorská práva)'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_cz.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_cz.inc.php index 61c1305a..b2b98077 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cz.inc.php 1381 2007-12-14 00:12:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -9,4 +9,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'V postranním panelu zobrazuje podrobnosti použité licence "Creative Commons" (Autorská práva)'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_de.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_de.inc.php index 3fba1d96..55be7c93 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_de.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'Zeigt einen Creative Commons Hinweis an'); +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'Zeigt einen Creative Commons Hinweis an'); diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_es.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_es.inc.php index dd7562f6..95cbb499 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_es.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -9,4 +9,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'Muestra una notificación creative commons en la barra lateral.'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_fr.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_fr.inc.php index bfc2af0f..d9d9f7cd 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -16,5 +16,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'Affiche un contrat Creative Commons dans la barre latérale.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_ja.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_ja.inc.php index 8b543c77..b5628a9a 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 692 */ @@ -9,4 +9,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'クリエイティブコモンズ'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'サイドバーにクリエイティブコモンズを告示します。'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_ko.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_ko.inc.php index 079114c8..ab49a928 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_ko.inc.php @@ -1,8 +1,7 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', '크리에이티브 커먼스'); - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', '옆줄에 크리에이티브 커먼스 안내 표시를 함'); +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', '크리에이티브 커먼스'); +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', '옆줄에 크리에이티브 커먼스 안내 표시를 함'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_pl.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_pl.inc.php index 96ccb836..bbc61414 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -9,4 +9,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'Wyświetl informację o licencji Creative Commons w Panelu Bocznym.'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_pt_PT.inc.php index d8c5cb86..28b85ea6 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $ +<?php ########################################################################## # serendipity - another blogger... # @@ -15,5 +15,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'Mostra uma notificação Creative Commons na barra lateral.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_tn.inc.php b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_tn.inc.php index 41d8dacd..6a1d26a7 100644 --- a/plugins/serendipity_plugin_creativecommons/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_plugin_creativecommons/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,6 +12,6 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'CC 授權條款'); - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', '在網誌顯示 CC 的授權條款。'); -?> \ No newline at end of file +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'CC 授權條款'); +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', '在網誌顯示 CC 的授權條款。'); + diff --git a/plugins/serendipity_plugin_creativecommons/lang_bg.inc.php b/plugins/serendipity_plugin_creativecommons/lang_bg.inc.php index 6fee9267..3be770ef 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_bg.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_bg.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ diff --git a/plugins/serendipity_plugin_creativecommons/lang_cs.inc.php b/plugins/serendipity_plugin_creativecommons/lang_cs.inc.php index 7f3f2663..384ac80e 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_cs.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2007-12-14 00:12:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -9,4 +9,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'V postrann�m panelu zobrazuje podrobnosti pou�it� licence "Creative Commons" (Autorsk� pr�va)'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/lang_cz.inc.php b/plugins/serendipity_plugin_creativecommons/lang_cz.inc.php index da8f939e..9d3a427c 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_cz.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cz.inc.php 1381 2007-12-14 00:12:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -9,4 +9,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'V postrann�m panelu zobrazuje podrobnosti pou�it� licence "Creative Commons" (Autorsk� pr�va)'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/lang_de.inc.php b/plugins/serendipity_plugin_creativecommons/lang_de.inc.php index 3fba1d96..55be7c93 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_de.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_de.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'Zeigt einen Creative Commons Hinweis an'); +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'Zeigt einen Creative Commons Hinweis an'); diff --git a/plugins/serendipity_plugin_creativecommons/lang_en.inc.php b/plugins/serendipity_plugin_creativecommons/lang_en.inc.php index ac98bbf1..64c6fdc4 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_en.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_en.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Translator Name <yourmail@example.com> * EN-Revision: Revision of lang_en.inc.php */ @@ -9,4 +9,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'Display a creative commons notification in the sidebar.'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/lang_es.inc.php b/plugins/serendipity_plugin_creativecommons/lang_es.inc.php index e55ab7f1..9ee58b1a 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_es.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_es.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -9,4 +9,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'Muestra una notificaci�n creative commons en la barra lateral.'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/lang_fr.inc.php b/plugins/serendipity_plugin_creativecommons/lang_fr.inc.php index eb956962..220ea1fc 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_fr.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -16,5 +16,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'Affiche un contrat Creative Commons dans la barre lat�rale.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_creativecommons/lang_ja.inc.php b/plugins/serendipity_plugin_creativecommons/lang_ja.inc.php index 8b543c77..b5628a9a 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_ja.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 692 */ @@ -9,4 +9,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'クリエイティブコモンズ'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'サイドバーにクリエイティブコモンズを告示します。'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/lang_ko.inc.php b/plugins/serendipity_plugin_creativecommons/lang_ko.inc.php index 079114c8..ab49a928 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_ko.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_ko.inc.php @@ -1,8 +1,7 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', '크리에이티브 커먼스'); - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', '옆줄에 크리에이티브 커먼스 안내 표시를 함'); +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', '크리에이티브 커먼스'); +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', '옆줄에 크리에이티브 커먼스 안내 표시를 함'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/lang_pl.inc.php b/plugins/serendipity_plugin_creativecommons/lang_pl.inc.php index 55fedc9a..c87c2f90 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_pl.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -9,4 +9,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'Wy�wietl informacj� o licencji Creative Commons w Panelu Bocznym.'); -?> diff --git a/plugins/serendipity_plugin_creativecommons/lang_pt_PT.inc.php b/plugins/serendipity_plugin_creativecommons/lang_pt_PT.inc.php index f9b25574..34567abb 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $ +<?php ########################################################################## # serendipity - another blogger... # @@ -15,5 +15,3 @@ @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'Creative Commons'); @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', 'Mostra uma notifica��o Creative Commons na barra lateral.'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_creativecommons/lang_tn.inc.php b/plugins/serendipity_plugin_creativecommons/lang_tn.inc.php index 41d8dacd..6a1d26a7 100644 --- a/plugins/serendipity_plugin_creativecommons/lang_tn.inc.php +++ b/plugins/serendipity_plugin_creativecommons/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,6 +12,6 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'CC 授權條款'); - @define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', '在網誌顯示 CC 的授權條款。'); -?> \ No newline at end of file +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME', 'CC 授權條款'); +@define('PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC', '在網誌顯示 CC 的授權條款。'); + diff --git a/plugins/serendipity_plugin_creativecommons/serendipity_plugin_creativecommons.php b/plugins/serendipity_plugin_creativecommons/serendipity_plugin_creativecommons.php index b64204bf..16aa8efd 100644 --- a/plugins/serendipity_plugin_creativecommons/serendipity_plugin_creativecommons.php +++ b/plugins/serendipity_plugin_creativecommons/serendipity_plugin_creativecommons.php @@ -1,8 +1,13 @@ -<?php # $Id$ +<?php + +if (IN_serendipity !== true) { + die ("Don't hack!"); +} @serendipity_plugin_api::load_language(dirname(__FILE__)); -class serendipity_plugin_creativecommons extends serendipity_plugin { +class serendipity_plugin_creativecommons extends serendipity_plugin +{ var $title = PLUGIN_SIDEBAR_CREATIVECOMMONS_NAME; function introspect(&$propbag) @@ -13,9 +18,9 @@ class serendipity_plugin_creativecommons extends serendipity_plugin { $propbag->add('description', PLUGIN_SIDEBAR_CREATIVECOMMONS_DESC); $propbag->add('stackable', true); $propbag->add('author', 'Evan Nemerson'); - $propbag->add('version', '1.0'); + $propbag->add('version', '1.1'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -28,17 +33,22 @@ class serendipity_plugin_creativecommons extends serendipity_plugin { function introspect_config_item($name, &$propbag) { switch($name) { + case 'title': $propbag->add('type', 'string'); $propbag->add('name', TITLE); $propbag->add('description', TITLE); $propbag->add('default', ''); break; + + default: + return false; } return true; } - function generate_content(&$title) { + function generate_content(&$title) + { global $serendipity; $title = $this->get_config('title', $this->title); @@ -47,7 +57,8 @@ class serendipity_plugin_creativecommons extends serendipity_plugin { serendipity_plugin_api::hook_event('frontend_display:html_layout', $eventData); echo $eventData['display_dat']; } + } /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_bg.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_bg.inc.php index 097944d8..cb08319f 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_bg.inc.php @@ -1,20 +1,20 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ - @define('PLUGIN_ENTRYLINKS_NAME', 'Връзките в постинга'); - @define('PLUGIN_ENTRYLINKS_BLAHBLAH', 'Показва връзките, намиращи в даден постинг'); - @define('PLUGIN_ENTRYLINKS_NEWWIN', 'Отваряне на връзките в нов прозорец?'); - @define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', 'Дали връзките да се отварят в нов прозорец? (по подразбиране: не)'); - @define('PLUGIN_ENTRYLINKS_REFERERS', 'Референтни връзки'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP', 'Преминаване на нов ред (Wordwrap)'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', 'Минимум брой думи преди да е възможно преминаване на нов ред (по подразбиране: 30)'); - @define('PLUGIN_ENTRYLINKS_MAXREF', 'Максимум референтни връзки'); - @define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', 'Колко референтни връзки да се показват на екрана (по подразбиране: 15)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY', 'Подреждане на референтните връзки'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', 'В какъв ред референтните връзки да бъдат подредени (по подразбиране: брой на връзките)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Дата'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Брой на връзките'); +@define('PLUGIN_ENTRYLINKS_NAME', 'Връзките в постинга'); +@define('PLUGIN_ENTRYLINKS_BLAHBLAH', 'Показва връзките, намиращи в даден постинг'); +@define('PLUGIN_ENTRYLINKS_NEWWIN', 'Отваряне на връзките в нов прозорец?'); +@define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', 'Дали връзките да се отварят в нов прозорец? (по подразбиране: не)'); +@define('PLUGIN_ENTRYLINKS_REFERERS', 'Референтни връзки'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP', 'Преминаване на нов ред (Wordwrap)'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', 'Минимум брой думи преди да е възможно преминаване на нов ред (по подразбиране: 30)'); +@define('PLUGIN_ENTRYLINKS_MAXREF', 'Максимум референтни връзки'); +@define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', 'Колко референтни връзки да се показват на екрана (по подразбиране: 15)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY', 'Подреждане на референтните връзки'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', 'В какъв ред референтните връзки да бъдат подредени (по подразбиране: брой на връзките)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Дата'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Брой на връзките'); diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_cn.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_cn.inc.php index 94abff87..97dd979a 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_cn.inc.php @@ -1,4 +1,4 @@ -<? +<?php @define('PLUGIN_ENTRYLINKS_NAME', '文章链接'); @define('PLUGIN_ENTRYLINKS_BLAHBLAH', '显示涉及该文章的所有链接'); diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_cs.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_cs.inc.php index 2d7d2118..9e8f53de 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2007-11-23 15:30:00Z VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -21,4 +21,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Datum'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Pořadí v textu'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_cz.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_cz.inc.php index daf3f1af..9e8f53de 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cz.inc.php 1381 2007-11-23 15:30:00Z VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -21,4 +21,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Datum'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Pořadí v textu'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_da.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_da.inc.php index e076dbf8..60d4bd0b 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_da.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_da.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_en.inc.php 690 2005-11-13 04:49:04Z elf2000 $ +<?php /** * @version $Revision: 690 $ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Dato'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Antal links'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_de.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_de.inc.php index b9c85dc0..bf1356b8 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_de.inc.php @@ -1,15 +1,15 @@ -<?php # $Id$ +<?php - @define('PLUGIN_ENTRYLINKS_NAME', 'Links des Artikels'); - @define('PLUGIN_ENTRYLINKS_BLAHBLAH', 'Zeigt alle referenzierten Links eines Artikels'); - @define('PLUGIN_ENTRYLINKS_NEWWIN', 'Links in neuem Fenster öffnen?'); - @define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', 'Sollen die Links in einem neuen Fenster geöffnet werden? (Standard: Nein)'); - @define('PLUGIN_ENTRYLINKS_REFERERS', 'Eingehende Links'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP', 'Zeilenumbruch'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', 'Nach wievielen Wörtern soll ein Zeilenumbruch eingefügt werden? (Standard: 30)'); - @define('PLUGIN_ENTRYLINKS_MAXREF', 'Anzahl eingehender Links'); - @define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', 'Wieviele eingehende Links sollen höchstens dargestellt werden? (Standard: 15)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY', 'Reihenfolge eingehender Links'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', 'Wonach sollen die eingehenden Links geordnet werden? (Standard: Häufigkeit)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Datum'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Häufigkeit'); +@define('PLUGIN_ENTRYLINKS_NAME', 'Links des Artikels'); +@define('PLUGIN_ENTRYLINKS_BLAHBLAH', 'Zeigt alle referenzierten Links eines Artikels'); +@define('PLUGIN_ENTRYLINKS_NEWWIN', 'Links in neuem Fenster öffnen?'); +@define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', 'Sollen die Links in einem neuen Fenster geöffnet werden? (Standard: Nein)'); +@define('PLUGIN_ENTRYLINKS_REFERERS', 'Eingehende Links'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP', 'Zeilenumbruch'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', 'Nach wievielen Wörtern soll ein Zeilenumbruch eingefügt werden? (Standard: 30)'); +@define('PLUGIN_ENTRYLINKS_MAXREF', 'Anzahl eingehender Links'); +@define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', 'Wieviele eingehende Links sollen höchstens dargestellt werden? (Standard: 15)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY', 'Reihenfolge eingehender Links'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', 'Wonach sollen die eingehenden Links geordnet werden? (Standard: Häufigkeit)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Datum'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Häufigkeit'); diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_es.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_es.inc.php index ece7b692..0ea73b3a 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_es.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Fecha'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Número de enlaces'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_fr.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_fr.inc.php index 945dc346..8a177204 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -27,5 +27,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Par date'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Par nombre de liens'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_ja.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_ja.inc.php index 0397e50d..f6853aad 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 690 */ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', '日付'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'リンクの数'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_ko.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_ko.inc.php index 70e84c38..f96d3812 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_ko.inc.php @@ -1,19 +1,18 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_ENTRYLINKS_NAME', '글에 있는 링크'); - @define('PLUGIN_ENTRYLINKS_BLAHBLAH', '글 안에 나타난 모든 링크를 보여줌'); - @define('PLUGIN_ENTRYLINKS_NEWWIN', '링크를 새 창에 보여주기'); - @define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', '링크를 누르면 새 창에 보여주겠습니까? (기본값: 현재 창)'); - @define('PLUGIN_ENTRYLINKS_REFERERS', '참고 링크'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP', '자동 줄바꿈'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', '몇 글자 후에 자동 줄바꿈을 하겠습니까? (기본값: 30)'); - @define('PLUGIN_ENTRYLINKS_MAXREF', '최대 참고 링크 수'); - @define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', '몇 개의 참고 링크를 보여주겠습니까? (기본값: 15)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY', '참고 링크 순서'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', '어떤 방식으로 참고 링크의 순서를 정하겠습니까? (기본값: 링크의 수)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', '날짜'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', '링크의 수'); +@define('PLUGIN_ENTRYLINKS_NAME', '글에 있는 링크'); +@define('PLUGIN_ENTRYLINKS_BLAHBLAH', '글 안에 나타난 모든 링크를 보여줌'); +@define('PLUGIN_ENTRYLINKS_NEWWIN', '링크를 새 창에 보여주기'); +@define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', '링크를 누르면 새 창에 보여주겠습니까? (기본값: 현재 창)'); +@define('PLUGIN_ENTRYLINKS_REFERERS', '참고 링크'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP', '자동 줄바꿈'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', '몇 글자 후에 자동 줄바꿈을 하겠습니까? (기본값: 30)'); +@define('PLUGIN_ENTRYLINKS_MAXREF', '최대 참고 링크 수'); +@define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', '몇 개의 참고 링크를 보여주겠습니까? (기본값: 15)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY', '참고 링크 순서'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', '어떤 방식으로 참고 링크의 순서를 정하겠습니까? (기본값: 링크의 수)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', '날짜'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', '링크의 수'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_pl.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_pl.inc.php index 2aa830db..1b293282 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kotas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Data'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Ilość linków'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_pt_PT.inc.php index 5780902d..558879bb 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $ +<?php ########################################################################## # serendipity - another blogger... # @@ -26,5 +26,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Por data'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Por número de ligações'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_sk.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_sk.inc.php index 0649c96e..9b9c99c8 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_sk.inc.php @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Dátum'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Poradie v texte'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_tn.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_tn.inc.php index 7f9246b9..a38ace56 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,17 +12,16 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_ENTRYLINKS_NAME', '文章連結'); - @define('PLUGIN_ENTRYLINKS_BLAHBLAH', '顯示文章內出現的連結'); - @define('PLUGIN_ENTRYLINKS_NEWWIN', '跳出新視窗?'); - @define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', '文章裡的連結要跳出新視窗嗎?(預設:主視窗)'); - @define('PLUGIN_ENTRYLINKS_REFERERS', '參照連結'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP', '自動段行'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', '要多少字之後自動換行?(預設:30)'); - @define('PLUGIN_ENTRYLINKS_MAXREF', '參照連結數量'); - @define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', '要顯示多少個參照連結?(預設:15)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY', '排序參照連結'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', '要怎樣排序參照連結?(預設:連結數量)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', '日期'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', '連結數量'); -?> \ No newline at end of file +@define('PLUGIN_ENTRYLINKS_NAME', '文章連結'); +@define('PLUGIN_ENTRYLINKS_BLAHBLAH', '顯示文章內出現的連結'); +@define('PLUGIN_ENTRYLINKS_NEWWIN', '跳出新視窗?'); +@define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', '文章裡的連結要跳出新視窗嗎?(預設:主視窗)'); +@define('PLUGIN_ENTRYLINKS_REFERERS', '參照連結'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP', '自動段行'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', '要多少字之後自動換行?(預設:30)'); +@define('PLUGIN_ENTRYLINKS_MAXREF', '參照連結數量'); +@define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', '要顯示多少個參照連結?(預設:15)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY', '排序參照連結'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', '要怎樣排序參照連結?(預設:連結數量)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', '日期'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', '連結數量'); diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_tr.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_tr.inc.php index dd82b473..e1e6d46d 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_tr.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_tr.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ahmet Usal <ahmetusal@gmail.com> * First public version: lang_tr.inc.php */ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Tarih'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Web Bağlantılarının sayısı'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_zh.inc.php b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_zh.inc.php index 94abff87..97dd979a 100644 --- a/plugins/serendipity_plugin_entrylinks/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_plugin_entrylinks/UTF-8/lang_zh.inc.php @@ -1,4 +1,4 @@ -<? +<?php @define('PLUGIN_ENTRYLINKS_NAME', '文章链接'); @define('PLUGIN_ENTRYLINKS_BLAHBLAH', '显示涉及该文章的所有链接'); diff --git a/plugins/serendipity_plugin_entrylinks/lang_bg.inc.php b/plugins/serendipity_plugin_entrylinks/lang_bg.inc.php index 6944b475..80f8df02 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_bg.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_bg.inc.php @@ -1,20 +1,20 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ - @define('PLUGIN_ENTRYLINKS_NAME', '�������� � ��������'); - @define('PLUGIN_ENTRYLINKS_BLAHBLAH', '������� ��������, �������� � ����� �������'); - @define('PLUGIN_ENTRYLINKS_NEWWIN', '�������� �� �������� � ��� ��������?'); - @define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', '���� �������� �� �� ������� � ��� ��������? (�� ������������: ��)'); - @define('PLUGIN_ENTRYLINKS_REFERERS', '���������� ������'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP', '����������� �� ��� ��� (Wordwrap)'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', '������� ���� ���� ����� �� � �������� ����������� �� ��� ��� (�� ������������: 30)'); - @define('PLUGIN_ENTRYLINKS_MAXREF', '�������� ���������� ������'); - @define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', '����� ���������� ������ �� �� �������� �� ������ (�� ������������: 15)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY', '���������� �� ������������ ������'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', '� ����� ��� ������������ ������ �� ����� ��������� (�� ������������: ���� �� ��������)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', '����'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', '���� �� ��������'); +@define('PLUGIN_ENTRYLINKS_NAME', '�������� � ��������'); +@define('PLUGIN_ENTRYLINKS_BLAHBLAH', '������� ��������, �������� � ����� �������'); +@define('PLUGIN_ENTRYLINKS_NEWWIN', '�������� �� �������� � ��� ��������?'); +@define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', '���� �������� �� �� ������� � ��� ��������? (�� ������������: ��)'); +@define('PLUGIN_ENTRYLINKS_REFERERS', '���������� ������'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP', '����������� �� ��� ��� (Wordwrap)'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', '������� ���� ���� ����� �� � �������� ����������� �� ��� ��� (�� ������������: 30)'); +@define('PLUGIN_ENTRYLINKS_MAXREF', '�������� ���������� ������'); +@define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', '����� ���������� ������ �� �� �������� �� ������ (�� ������������: 15)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY', '���������� �� ������������ ������'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', '� ����� ��� ������������ ������ �� ����� ��������� (�� ������������: ���� �� ��������)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', '����'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', '���� �� ��������'); diff --git a/plugins/serendipity_plugin_entrylinks/lang_cn.inc.php b/plugins/serendipity_plugin_entrylinks/lang_cn.inc.php index 94abff87..97dd979a 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_cn.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_cn.inc.php @@ -1,4 +1,4 @@ -<? +<?php @define('PLUGIN_ENTRYLINKS_NAME', '文章链接'); @define('PLUGIN_ENTRYLINKS_BLAHBLAH', '显示涉及该文章的所有链接'); diff --git a/plugins/serendipity_plugin_entrylinks/lang_cs.inc.php b/plugins/serendipity_plugin_entrylinks/lang_cs.inc.php index d2b63535..70679a38 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_cs.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2007-11-23 15:30:00Z VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -21,4 +21,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Datum'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Po�ad� v textu'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/lang_cz.inc.php b/plugins/serendipity_plugin_entrylinks/lang_cz.inc.php index 3ec986bd..3fb6a020 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_cz.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cz.inc.php 1381 2007-11-23 15:30:00Z VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -21,4 +21,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Datum'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Po�ad� v textu'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/lang_da.inc.php b/plugins/serendipity_plugin_entrylinks/lang_da.inc.php index c1bf1900..858b91fd 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_da.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_da.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_en.inc.php 690 2005-11-13 04:49:04Z elf2000 $ +<?php /** * @version $Revision: 690 $ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Dato'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Antal links'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/lang_de.inc.php b/plugins/serendipity_plugin_entrylinks/lang_de.inc.php index 68046bf8..70bd8366 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_de.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_de.inc.php @@ -1,15 +1,15 @@ -<?php # $Id$ +<?php - @define('PLUGIN_ENTRYLINKS_NAME', 'Links des Artikels'); - @define('PLUGIN_ENTRYLINKS_BLAHBLAH', 'Zeigt alle referenzierten Links eines Artikels'); - @define('PLUGIN_ENTRYLINKS_NEWWIN', 'Links in neuem Fenster �ffnen?'); - @define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', 'Sollen die Links in einem neuen Fenster ge�ffnet werden? (Standard: Nein)'); - @define('PLUGIN_ENTRYLINKS_REFERERS', 'Eingehende Links'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP', 'Zeilenumbruch'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', 'Nach wievielen W�rtern soll ein Zeilenumbruch eingef�gt werden? (Standard: 30)'); - @define('PLUGIN_ENTRYLINKS_MAXREF', 'Anzahl eingehender Links'); - @define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', 'Wieviele eingehende Links sollen h�chstens dargestellt werden? (Standard: 15)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY', 'Reihenfolge eingehender Links'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', 'Wonach sollen die eingehenden Links geordnet werden? (Standard: H�ufigkeit)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Datum'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'H�ufigkeit'); +@define('PLUGIN_ENTRYLINKS_NAME', 'Links des Artikels'); +@define('PLUGIN_ENTRYLINKS_BLAHBLAH', 'Zeigt alle referenzierten Links eines Artikels'); +@define('PLUGIN_ENTRYLINKS_NEWWIN', 'Links in neuem Fenster �ffnen?'); +@define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', 'Sollen die Links in einem neuen Fenster ge�ffnet werden? (Standard: Nein)'); +@define('PLUGIN_ENTRYLINKS_REFERERS', 'Eingehende Links'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP', 'Zeilenumbruch'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', 'Nach wievielen W�rtern soll ein Zeilenumbruch eingef�gt werden? (Standard: 30)'); +@define('PLUGIN_ENTRYLINKS_MAXREF', 'Anzahl eingehender Links'); +@define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', 'Wieviele eingehende Links sollen h�chstens dargestellt werden? (Standard: 15)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY', 'Reihenfolge eingehender Links'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', 'Wonach sollen die eingehenden Links geordnet werden? (Standard: H�ufigkeit)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Datum'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'H�ufigkeit'); diff --git a/plugins/serendipity_plugin_entrylinks/lang_en.inc.php b/plugins/serendipity_plugin_entrylinks/lang_en.inc.php index a736659b..4821a3b0 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_en.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_en.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Translator Name <yourmail@example.com> * EN-Revision: Revision of lang_en.inc.php */ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Date'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Number of links'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/lang_es.inc.php b/plugins/serendipity_plugin_entrylinks/lang_es.inc.php index 90fcf353..b01d3f84 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_es.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_es.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Fecha'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'N�mero de enlaces'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/lang_fr.inc.php b/plugins/serendipity_plugin_entrylinks/lang_fr.inc.php index 4f02c285..b767d570 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_fr.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -27,5 +27,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Par date'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Par nombre de liens'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_entrylinks/lang_ja.inc.php b/plugins/serendipity_plugin_entrylinks/lang_ja.inc.php index 0397e50d..f6853aad 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_ja.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 690 */ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', '日付'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'リンクの数'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/lang_ko.inc.php b/plugins/serendipity_plugin_entrylinks/lang_ko.inc.php index 70e84c38..f96d3812 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_ko.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_ko.inc.php @@ -1,19 +1,18 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_ENTRYLINKS_NAME', '글에 있는 링크'); - @define('PLUGIN_ENTRYLINKS_BLAHBLAH', '글 안에 나타난 모든 링크를 보여줌'); - @define('PLUGIN_ENTRYLINKS_NEWWIN', '링크를 새 창에 보여주기'); - @define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', '링크를 누르면 새 창에 보여주겠습니까? (기본값: 현재 창)'); - @define('PLUGIN_ENTRYLINKS_REFERERS', '참고 링크'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP', '자동 줄바꿈'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', '몇 글자 후에 자동 줄바꿈을 하겠습니까? (기본값: 30)'); - @define('PLUGIN_ENTRYLINKS_MAXREF', '최대 참고 링크 수'); - @define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', '몇 개의 참고 링크를 보여주겠습니까? (기본값: 15)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY', '참고 링크 순서'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', '어떤 방식으로 참고 링크의 순서를 정하겠습니까? (기본값: 링크의 수)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', '날짜'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', '링크의 수'); +@define('PLUGIN_ENTRYLINKS_NAME', '글에 있는 링크'); +@define('PLUGIN_ENTRYLINKS_BLAHBLAH', '글 안에 나타난 모든 링크를 보여줌'); +@define('PLUGIN_ENTRYLINKS_NEWWIN', '링크를 새 창에 보여주기'); +@define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', '링크를 누르면 새 창에 보여주겠습니까? (기본값: 현재 창)'); +@define('PLUGIN_ENTRYLINKS_REFERERS', '참고 링크'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP', '자동 줄바꿈'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', '몇 글자 후에 자동 줄바꿈을 하겠습니까? (기본값: 30)'); +@define('PLUGIN_ENTRYLINKS_MAXREF', '최대 참고 링크 수'); +@define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', '몇 개의 참고 링크를 보여주겠습니까? (기본값: 15)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY', '참고 링크 순서'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', '어떤 방식으로 참고 링크의 순서를 정하겠습니까? (기본값: 링크의 수)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', '날짜'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', '링크의 수'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/lang_pl.inc.php b/plugins/serendipity_plugin_entrylinks/lang_pl.inc.php index 60f32d5c..725e4102 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_pl.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kotas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Data'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Ilo�� link�w'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/lang_pt_PT.inc.php b/plugins/serendipity_plugin_entrylinks/lang_pt_PT.inc.php index 5bfdf5ee..10fb1684 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $ +<?php ########################################################################## # serendipity - another blogger... # @@ -26,5 +26,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Por data'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Por n�mero de liga��es'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_entrylinks/lang_sk.inc.php b/plugins/serendipity_plugin_entrylinks/lang_sk.inc.php index 333d9128..8df5d04e 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_sk.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_sk.inc.php @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'D�tum'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Poradie v texte'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/lang_tn.inc.php b/plugins/serendipity_plugin_entrylinks/lang_tn.inc.php index 7f9246b9..a38ace56 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_tn.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,17 +12,16 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_ENTRYLINKS_NAME', '文章連結'); - @define('PLUGIN_ENTRYLINKS_BLAHBLAH', '顯示文章內出現的連結'); - @define('PLUGIN_ENTRYLINKS_NEWWIN', '跳出新視窗?'); - @define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', '文章裡的連結要跳出新視窗嗎?(預設:主視窗)'); - @define('PLUGIN_ENTRYLINKS_REFERERS', '參照連結'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP', '自動段行'); - @define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', '要多少字之後自動換行?(預設:30)'); - @define('PLUGIN_ENTRYLINKS_MAXREF', '參照連結數量'); - @define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', '要顯示多少個參照連結?(預設:15)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY', '排序參照連結'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', '要怎樣排序參照連結?(預設:連結數量)'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', '日期'); - @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', '連結數量'); -?> \ No newline at end of file +@define('PLUGIN_ENTRYLINKS_NAME', '文章連結'); +@define('PLUGIN_ENTRYLINKS_BLAHBLAH', '顯示文章內出現的連結'); +@define('PLUGIN_ENTRYLINKS_NEWWIN', '跳出新視窗?'); +@define('PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH', '文章裡的連結要跳出新視窗嗎?(預設:主視窗)'); +@define('PLUGIN_ENTRYLINKS_REFERERS', '參照連結'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP', '自動段行'); +@define('PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH', '要多少字之後自動換行?(預設:30)'); +@define('PLUGIN_ENTRYLINKS_MAXREF', '參照連結數量'); +@define('PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH', '要顯示多少個參照連結?(預設:15)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY', '排序參照連結'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH', '要怎樣排序參照連結?(預設:連結數量)'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', '日期'); +@define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', '連結數量'); diff --git a/plugins/serendipity_plugin_entrylinks/lang_tr.inc.php b/plugins/serendipity_plugin_entrylinks/lang_tr.inc.php index 0e822c3d..f900e3d7 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_tr.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_tr.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ahmet Usal <ahmetusal@gmail.com> * First public version: lang_tr.inc.php */ @@ -20,4 +20,3 @@ @define('PLUGIN_ENTRYLINKS_ORDERBY_DAY', 'Tarih'); @define('PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT', 'Web Ba�lant�lar�n�n say�s�'); -?> diff --git a/plugins/serendipity_plugin_entrylinks/lang_zh.inc.php b/plugins/serendipity_plugin_entrylinks/lang_zh.inc.php index 94abff87..97dd979a 100644 --- a/plugins/serendipity_plugin_entrylinks/lang_zh.inc.php +++ b/plugins/serendipity_plugin_entrylinks/lang_zh.inc.php @@ -1,4 +1,4 @@ -<? +<?php @define('PLUGIN_ENTRYLINKS_NAME', '文章链接'); @define('PLUGIN_ENTRYLINKS_BLAHBLAH', '显示涉及该文章的所有链接'); diff --git a/plugins/serendipity_plugin_entrylinks/serendipity_plugin_entrylinks.php b/plugins/serendipity_plugin_entrylinks/serendipity_plugin_entrylinks.php index 637a27fb..cf79c96f 100644 --- a/plugins/serendipity_plugin_entrylinks/serendipity_plugin_entrylinks.php +++ b/plugins/serendipity_plugin_entrylinks/serendipity_plugin_entrylinks.php @@ -1,4 +1,8 @@ -<?php # $Id$ +<?php + +if (IN_serendipity !== true) { + die ("Don't hack!"); +} @serendipity_plugin_api::load_language(dirname(__FILE__)); @@ -16,9 +20,9 @@ class serendipity_plugin_entrylinks extends serendipity_plugin $propbag->add('description', PLUGIN_ENTRYLINKS_BLAHBLAH); $propbag->add('stackable', false); $propbag->add('author', 'Garvin Hicking'); - $propbag->add('version', '1.02'); + $propbag->add('version', '1.03'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -29,66 +33,67 @@ class serendipity_plugin_entrylinks extends serendipity_plugin function introspect_config_item($name, &$propbag) { switch($name) { + case 'title': - $propbag->add('type', 'string'); - $propbag->add('name', TITLE); - $propbag->add('description', TITLE); - $propbag->add('default', ''); + $propbag->add('type', 'string'); + $propbag->add('name', TITLE); + $propbag->add('description', TITLE); + $propbag->add('default', ''); break; case 'newwin': - $propbag->add('type', 'boolean'); - $propbag->add('name', PLUGIN_ENTRYLINKS_NEWWIN); - $propbag->add('description', PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH); - $propbag->add('default', 'false'); + $propbag->add('type', 'boolean'); + $propbag->add('name', PLUGIN_ENTRYLINKS_NEWWIN); + $propbag->add('description', PLUGIN_ENTRYLINKS_NEWWIN_BLAHBLAH); + $propbag->add('default', 'false'); break; case 'markup': - $propbag->add('type', 'boolean'); - $propbag->add('name', DO_MARKUP); - $propbag->add('description', DO_MARKUP_DESCRIPTION); - $propbag->add('default', 'true'); + $propbag->add('type', 'boolean'); + $propbag->add('name', DO_MARKUP); + $propbag->add('description', DO_MARKUP_DESCRIPTION); + $propbag->add('default', 'true'); break; case 'show_exits': - $propbag->add('type', 'boolean'); - $propbag->add('name', TOP_EXITS); - $propbag->add('description', SHOWS_TOP_EXIT); - $propbag->add('default', 'true'); + $propbag->add('type', 'boolean'); + $propbag->add('name', TOP_EXITS); + $propbag->add('description', SHOWS_TOP_EXIT); + $propbag->add('default', 'true'); break; case 'show_referers': - $propbag->add('type', 'boolean'); - $propbag->add('name', TOP_REFERRER); - $propbag->add('description', SHOWS_TOP_SITES); - $propbag->add('default', ''); + $propbag->add('type', 'boolean'); + $propbag->add('name', TOP_REFERRER); + $propbag->add('description', SHOWS_TOP_SITES); + $propbag->add('default', 'true'); break; case 'maxref': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_ENTRYLINKS_MAXREF); - $propbag->add('description', PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH); - $propbag->add('default', 15); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_ENTRYLINKS_MAXREF); + $propbag->add('description', PLUGIN_ENTRYLINKS_MAXREF_BLAHBLAH); + $propbag->add('default', 15); break; case 'wordwrap': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_ENTRYLINKS_WORDWRAP); - $propbag->add('description', PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH); - $propbag->add('default', 30); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_ENTRYLINKS_WORDWRAP); + $propbag->add('description', PLUGIN_ENTRYLINKS_WORDWRAP_BLAHBLAH); + $propbag->add('default', 30); break; case 'orderby': $select = array('day' => PLUGIN_ENTRYLINKS_ORDERBY_DAY, 'fullcount' => PLUGIN_ENTRYLINKS_ORDERBY_FULLCOUNT); - $propbag->add('type', 'select'); - $propbag->add('name', PLUGIN_ENTRYLINKS_ORDERBY); - $propbag->add('description', PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH); - $propbag->add('select_values', $select); - $propbag->add('default', 'fullcount'); + $propbag->add('type', 'select'); + $propbag->add('name', PLUGIN_ENTRYLINKS_ORDERBY); + $propbag->add('description', PLUGIN_ENTRYLINKS_ORDERBY_BLAHBLAH); + $propbag->add('select_values', $select); + $propbag->add('default', 'fullcount'); break; default: - return false; + return false; } return true; } @@ -105,20 +110,18 @@ class serendipity_plugin_entrylinks extends serendipity_plugin $id = serendipity_db_escape_string($serendipity['GET']['id']); } + $counter = array(); $target = ''; - $newwin = $this->get_config('newwin', 'false'); + $newwin = serendipity_db_bool($this->get_config('newwin', 'false')); $wordwrap = $this->get_config('wordwrap', 30); $maxref = $this->get_config('maxref', 15); $orderby = $this->get_config('orderby', 'fullcount'); - if ($newwin == 'true') { + if ($newwin) { $target = ' target="_blank" '; } - - $counter = array(); - - if ($this->get_config('show_exits', 'true') == 'true') { + if (serendipity_db_bool($this->get_config('show_exits', 'true'))) { $exits = serendipity_db_query("SELECT SUM(count) as fullcount, scheme, host, port, path, query, " . serendipity_db_concat("scheme, '://', host, ':', port, path, '?', query") . " AS fulllink FROM {$serendipity['dbPrefix']}exits WHERE entry_id = " . $id . " GROUP BY scheme,host,port,path,query"); if (is_array($exits)) { foreach($exits AS $key => $row) { @@ -151,7 +154,7 @@ class serendipity_plugin_entrylinks extends serendipity_plugin } $links .= '</ul>'; - if ($this->get_config('markup', 'true') == 'true') { + if (serendipity_db_bool($this->get_config('markup', 'true'))) { $entry = array('html_nugget' => $links, 'entry_id' => $id); serendipity_plugin_api::hook_event('frontend_display', $entry); echo $entry['html_nugget']; @@ -160,10 +163,10 @@ class serendipity_plugin_entrylinks extends serendipity_plugin } } - if ($this->get_config('show_referers', 'true') == 'true') { - $ref = serendipity_db_query("SELECT SUM(count) as fullcount, scheme, host, port, path, query, " . serendipity_db_concat("scheme, '://', host, ':', port, path, '?', query") . " AS fulllink FROM {$serendipity['dbPrefix']}referrers WHERE entry_id = " . $id . " GROUP BY scheme,host,port,path,query ORDER BY $orderby DESC LIMIT $maxref"); + if (serendipity_db_bool($this->get_config('show_referers', 'true'))) { + $ref = serendipity_db_query("SELECT SUM(count) as fullcount, scheme, host, port, path, query, " . serendipity_db_concat("scheme, '://', host, ':', port, path, '?', query") . " AS fulllink FROM {$serendipity['dbPrefix']}referrers WHERE entry_id = " . $id . " GROUP BY scheme,host,port,path,query ORDER BY $orderby DESC LIMIT $maxref"); if (is_array($ref)) { - echo PLUGIN_ENTRYLINKS_REFERERS . '<ul class="plainList">'; + echo PLUGIN_ENTRYLINKS_REFERERS . '<ul class="plainList">'."\n"; foreach($ref AS $key => $row) { $url = sprintf('%s://%s%s%s%s', $row['scheme'], @@ -173,12 +176,14 @@ class serendipity_plugin_entrylinks extends serendipity_plugin (!empty($row['query']) ? '?' . $row['query'] : '') ); - echo '<li><a href="' . $url . '" ' . $target . '>' . wordwrap($row['host'], $wordwrap, "<br />", 1) . '</a> <span class="serendipity_entrylinks_fullcount">[' . $row['fullcount'] . "]</span></li>"; + echo ' <li><a href="' . $url . '" ' . $target . '>' . wordwrap($row['host'], $wordwrap, "<br />", 1) . '</a> <span class="serendipity_entrylinks_fullcount">[' . $row['fullcount'] . "]</span></li>\n"; } - echo '</ul>'; + echo "</ul>\n"; } } } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_bg.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_bg.inc.php index d3c94c95..4ee3503c 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_bg.inc.php @@ -1,12 +1,12 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ - @define('PLUGIN_EVENT_WRAPPER_NAME', 'Обвивка на събитиен плъгин (wrapper)'); - @define('PLUGIN_EVENT_WRAPPER_DESC', 'Показва събраните данни от указан събитиен плъгин'); - @define('PLUGIN_EVENT_WRAPPER_PLUGIN', 'Събитиен плъгин източник'); - @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Изберете събитиен плъгин, чийто изход трябва да бъде изведен на дисплея'); - @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Въведете име за страничния плъгин (оставете празно, за да бъде взето името от събитийния плъгин)'); +@define('PLUGIN_EVENT_WRAPPER_NAME', 'Обвивка на събитиен плъгин (wrapper)'); +@define('PLUGIN_EVENT_WRAPPER_DESC', 'Показва събраните данни от указан събитиен плъгин'); +@define('PLUGIN_EVENT_WRAPPER_PLUGIN', 'Събитиен плъгин източник'); +@define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Изберете събитиен плъгин, чийто изход трябва да бъде изведен на дисплея'); +@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Въведете име за страничния плъгин (оставете празно, за да бъде взето името от събитийния плъгин)'); diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_cs.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_cs.inc.php index c6ce293a..59ba2e63 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2007-12-20 00:29:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Vyberte plugin událostí, jehož výstup má být zobrazen'); @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Vložte nadpis tohoto postranního panelu (pokud je ponecháno prázdné, bude jako nadpis použit název zobrazovaného pluginu)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_cz.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_cz.inc.php index ddada540..59ba2e63 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cz.inc.php 1381 2007-12-20 00:29:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Vyberte plugin událostí, jehož výstup má být zobrazen'); @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Vložte nadpis tohoto postranního panelu (pokud je ponecháno prázdné, bude jako nadpis použit název zobrazovaného pluginu)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_de.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_de.inc.php index ad904cee..41b5bdbb 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_de.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php - @define('PLUGIN_EVENT_WRAPPER_NAME', 'Event-Ausgabe Wrapper'); - @define('PLUGIN_EVENT_WRAPPER_DESC', 'Zeigt die Ausgabedaten eines Event-Plugins an'); - @define('PLUGIN_EVENT_WRAPPER_PLUGIN', 'Quell Event-Plugin'); - @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Wählen Sie das Event-Plugin aus, für das die Ausgabe dargestellt werden soll'); - @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Geben Sie den Titel für die Sidebar an. Die Eingabe eines leeren Titels zeigt den des Event-Plugins an.'); +@define('PLUGIN_EVENT_WRAPPER_NAME', 'Event-Ausgabe Wrapper'); +@define('PLUGIN_EVENT_WRAPPER_DESC', 'Zeigt die Ausgabedaten eines Event-Plugins an'); +@define('PLUGIN_EVENT_WRAPPER_PLUGIN', 'Quell Event-Plugin'); +@define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Wählen Sie das Event-Plugin aus, für das die Ausgabe dargestellt werden soll'); +@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Geben Sie den Titel für die Sidebar an. Die Eingabe eines leeren Titels zeigt den des Event-Plugins an.'); diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_es.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_es.inc.php index 3d110238..c1405c6f 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_es.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Selecciona la extensión de evento cuya salida debe ser mostrada'); @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Ingresa el título para este elemento de la barra lateral (déjalo vacío para heredarlo de la extensión)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_fr.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_fr.inc.php index 64bc0325..242bb10e 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -19,5 +19,3 @@ @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Sélectionnez le plugin dont les données doivent être affichés'); @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Entrez le titre de cet élément de barre latérale (laisser vide pour hériter le titre du plugin d\'évènement)'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_ja.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_ja.inc.php index 957e4f3a..0a01a390 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 690 */ @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Select the event plugin for which the output should be displayed'); @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Enter the title for this sidebar item (leave empty for inheritance by event plugin)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_ko.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_ko.inc.php index d133e552..ff51e1a6 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_ko.inc.php @@ -1,11 +1,10 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_WRAPPER_NAME', '이벤트 출력 틀'); - @define('PLUGIN_EVENT_WRAPPER_DESC', '특정 이벤트 플러그인에서 데이터를 모아서 보여줌'); - @define('PLUGIN_EVENT_WRAPPER_PLUGIN', '사용할 이벤트 플러그인'); - @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', '출력 데이터가 나올 이벤트 플러그인을 선택'); - @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', '옆줄 아이템에 표시될 제목 (이벤트 플러그인의 제목을 그대로 따르려면 비워둠)'); +@define('PLUGIN_EVENT_WRAPPER_NAME', '이벤트 출력 틀'); +@define('PLUGIN_EVENT_WRAPPER_DESC', '특정 이벤트 플러그인에서 데이터를 모아서 보여줌'); +@define('PLUGIN_EVENT_WRAPPER_PLUGIN', '사용할 이벤트 플러그인'); +@define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', '출력 데이터가 나올 이벤트 플러그인을 선택'); +@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', '옆줄 아이템에 표시될 제목 (이벤트 플러그인의 제목을 그대로 따르려면 비워둠)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_pl.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_pl.inc.php index 4fce4150..70e31c65 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -10,6 +10,5 @@ @define('PLUGIN_EVENT_WRAPPER_DESC', 'Pokazuje dane zebrane z kilku Wtyczek Zdarzeń'); @define('PLUGIN_EVENT_WRAPPER_PLUGIN', 'Źródłowa Wtyczka Zdarzenia'); @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Wybierz wtyczkę, której dane mają być pokazane'); -@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Wprowadź tytuł pozycji wyświetlonej w Panelu Bocznym Enter (zostaw puste by pozostawić nazwę wtyczki, z której dane będą pobierane)'); +@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Wprowadź tytuł pozycji wyświetlonej w Panelu Bocznym Enter (zostaw puste by pozostawić nazwę wtyczki, z której dane będą pobierane)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_pt_PT.inc.php index 24421766..568cf6de 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $ +<?php ########################################################################## # serendipity - another blogger... # @@ -18,5 +18,3 @@ @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Seleccione o plugin cujos dados devem ser mostrados'); @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Introduza o título deste elemento de barra lateral (deixar vazio para herdar o título do plugin de acontecimento)'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_tn.inc.php b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_tn.inc.php index c763ede7..c6e658ea 100644 --- a/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,9 +12,9 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_WRAPPER_NAME', '事件輸出'); - @define('PLUGIN_EVENT_WRAPPER_DESC', '顯示某個事件外掛的輸出資料'); - @define('PLUGIN_EVENT_WRAPPER_PLUGIN', '來源外掛'); - @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', '選擇要顯示輸出資料的事件外掛'); - @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', '在側列顯示的標題 (輸入空白如果要用來源外掛的名稱)'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_WRAPPER_NAME', '事件輸出'); +@define('PLUGIN_EVENT_WRAPPER_DESC', '顯示某個事件外掛的輸出資料'); +@define('PLUGIN_EVENT_WRAPPER_PLUGIN', '來源外掛'); +@define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', '選擇要顯示輸出資料的事件外掛'); +@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', '在側列顯示的標題 (輸入空白如果要用來源外掛的名稱)'); + diff --git a/plugins/serendipity_plugin_eventwrapper/lang_bg.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_bg.inc.php index 20092b13..17eb846c 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_bg.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_bg.inc.php @@ -1,12 +1,12 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ - @define('PLUGIN_EVENT_WRAPPER_NAME', '������� �� �������� ������ (wrapper)'); - @define('PLUGIN_EVENT_WRAPPER_DESC', '������� ��������� ����� �� ������ �������� ������'); - @define('PLUGIN_EVENT_WRAPPER_PLUGIN', '�������� ������ ��������'); - @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', '�������� �������� ������, ����� ����� ������ �� ���� ������� �� �������'); - @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', '�������� ��� �� ���������� ������ (�������� ������, �� �� ���� ����� ����� �� ���������� ������)'); +@define('PLUGIN_EVENT_WRAPPER_NAME', '������� �� �������� ������ (wrapper)'); +@define('PLUGIN_EVENT_WRAPPER_DESC', '������� ��������� ����� �� ������ �������� ������'); +@define('PLUGIN_EVENT_WRAPPER_PLUGIN', '�������� ������ ��������'); +@define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', '�������� �������� ������, ����� ����� ������ �� ���� ������� �� �������'); +@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', '�������� ��� �� ���������� ������ (�������� ������, �� �� ���� ����� ����� �� ���������� ������)'); diff --git a/plugins/serendipity_plugin_eventwrapper/lang_cs.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_cs.inc.php index 5b2c29a1..f03410e6 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_cs.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2007-12-20 00:29:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Vyberte plugin ud�lost�, jeho� v�stup m� b�t zobrazen'); @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Vlo�te nadpis tohoto postrann�ho panelu (pokud je ponech�no pr�zdn�, bude jako nadpis pou�it n�zev zobrazovan�ho pluginu)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/lang_cz.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_cz.inc.php index caa2f0e8..e9e17877 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_cz.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cz.inc.php 1381 2007-12-20 00:29:00 VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Vyberte plugin ud�lost�, jeho� v�stup m� b�t zobrazen'); @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Vlo�te nadpis tohoto postrann�ho panelu (pokud je ponech�no pr�zdn�, bude jako nadpis pou�it n�zev zobrazovan�ho pluginu)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/lang_de.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_de.inc.php index f9611942..03c36a3a 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_de.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_de.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php - @define('PLUGIN_EVENT_WRAPPER_NAME', 'Event-Ausgabe Wrapper'); - @define('PLUGIN_EVENT_WRAPPER_DESC', 'Zeigt die Ausgabedaten eines Event-Plugins an'); - @define('PLUGIN_EVENT_WRAPPER_PLUGIN', 'Quell Event-Plugin'); - @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'W�hlen Sie das Event-Plugin aus, f�r das die Ausgabe dargestellt werden soll'); - @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Geben Sie den Titel f�r die Sidebar an. Die Eingabe eines leeren Titels zeigt den des Event-Plugins an.'); +@define('PLUGIN_EVENT_WRAPPER_NAME', 'Event-Ausgabe Wrapper'); +@define('PLUGIN_EVENT_WRAPPER_DESC', 'Zeigt die Ausgabedaten eines Event-Plugins an'); +@define('PLUGIN_EVENT_WRAPPER_PLUGIN', 'Quell Event-Plugin'); +@define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'W�hlen Sie das Event-Plugin aus, f�r das die Ausgabe dargestellt werden soll'); +@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Geben Sie den Titel f�r die Sidebar an. Die Eingabe eines leeren Titels zeigt den des Event-Plugins an.'); diff --git a/plugins/serendipity_plugin_eventwrapper/lang_en.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_en.inc.php index 6ae9934e..bd9f463b 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_en.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_en.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Translator Name <yourmail@example.com> * EN-Revision: Revision of lang_en.inc.php */ @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Select the event plugin for which the output should be displayed'); @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Enter the title for this sidebar item (leave empty for inheritance by event plugin)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/lang_es.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_es.inc.php index abaaf60b..976c265a 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_es.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_es.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Selecciona la extensi�n de evento cuya salida debe ser mostrada'); @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Ingresa el t�tulo para este elemento de la barra lateral (d�jalo vac�o para heredarlo de la extensi�n)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/lang_fr.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_fr.inc.php index 319e79ad..a9cdc642 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_fr.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -19,5 +19,3 @@ @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'S�lectionnez le plugin dont les donn�es doivent �tre affich�s'); @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Entrez le titre de cet �l�ment de barre lat�rale (laisser vide pour h�riter le titre du plugin d\'�v�nement)'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_eventwrapper/lang_ja.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_ja.inc.php index 957e4f3a..0a01a390 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_ja.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 690 */ @@ -12,4 +12,3 @@ @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Select the event plugin for which the output should be displayed'); @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Enter the title for this sidebar item (leave empty for inheritance by event plugin)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/lang_ko.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_ko.inc.php index d133e552..ff51e1a6 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_ko.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_ko.inc.php @@ -1,11 +1,10 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_EVENT_WRAPPER_NAME', '이벤트 출력 틀'); - @define('PLUGIN_EVENT_WRAPPER_DESC', '특정 이벤트 플러그인에서 데이터를 모아서 보여줌'); - @define('PLUGIN_EVENT_WRAPPER_PLUGIN', '사용할 이벤트 플러그인'); - @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', '출력 데이터가 나올 이벤트 플러그인을 선택'); - @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', '옆줄 아이템에 표시될 제목 (이벤트 플러그인의 제목을 그대로 따르려면 비워둠)'); +@define('PLUGIN_EVENT_WRAPPER_NAME', '이벤트 출력 틀'); +@define('PLUGIN_EVENT_WRAPPER_DESC', '특정 이벤트 플러그인에서 데이터를 모아서 보여줌'); +@define('PLUGIN_EVENT_WRAPPER_PLUGIN', '사용할 이벤트 플러그인'); +@define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', '출력 데이터가 나올 이벤트 플러그인을 선택'); +@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', '옆줄 아이템에 표시될 제목 (이벤트 플러그인의 제목을 그대로 따르려면 비워둠)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/lang_pl.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_pl.inc.php index 95e957bf..76e5e482 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_pl.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -10,6 +10,5 @@ @define('PLUGIN_EVENT_WRAPPER_DESC', 'Pokazuje dane zebrane z kilku Wtyczek Zdarze�'); @define('PLUGIN_EVENT_WRAPPER_PLUGIN', '�r�d�owa Wtyczka Zdarzenia'); @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Wybierz wtyczk�, kt�rej dane maj� by� pokazane'); -@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Wprowad� tytu� pozycji wy�wietlonej w Panelu Bocznym Enter (zostaw puste by pozostawi� nazw� wtyczki, z kt�rej dane b�d� pobierane)'); +@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Wprowad� tytu� pozycji wy�wietlonej w Panelu Bocznym Enter (zostaw puste by pozostawi� nazw� wtyczki, z kt�rej dane b�d� pobierane)'); -?> diff --git a/plugins/serendipity_plugin_eventwrapper/lang_pt_PT.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_pt_PT.inc.php index 50101f42..a1594bb0 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $ +<?php ########################################################################## # serendipity - another blogger... # @@ -18,5 +18,3 @@ @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', 'Seleccione o plugin cujos dados devem ser mostrados'); @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', 'Introduza o t�tulo deste elemento de barra lateral (deixar vazio para herdar o t�tulo do plugin de acontecimento)'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_eventwrapper/lang_tn.inc.php b/plugins/serendipity_plugin_eventwrapper/lang_tn.inc.php index c763ede7..c6e658ea 100644 --- a/plugins/serendipity_plugin_eventwrapper/lang_tn.inc.php +++ b/plugins/serendipity_plugin_eventwrapper/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,9 +12,9 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_EVENT_WRAPPER_NAME', '事件輸出'); - @define('PLUGIN_EVENT_WRAPPER_DESC', '顯示某個事件外掛的輸出資料'); - @define('PLUGIN_EVENT_WRAPPER_PLUGIN', '來源外掛'); - @define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', '選擇要顯示輸出資料的事件外掛'); - @define('PLUGIN_EVENT_WRAPPER_TITLEDESC', '在側列顯示的標題 (輸入空白如果要用來源外掛的名稱)'); -?> \ No newline at end of file +@define('PLUGIN_EVENT_WRAPPER_NAME', '事件輸出'); +@define('PLUGIN_EVENT_WRAPPER_DESC', '顯示某個事件外掛的輸出資料'); +@define('PLUGIN_EVENT_WRAPPER_PLUGIN', '來源外掛'); +@define('PLUGIN_EVENT_WRAPPER_PLUGINDESC', '選擇要顯示輸出資料的事件外掛'); +@define('PLUGIN_EVENT_WRAPPER_TITLEDESC', '在側列顯示的標題 (輸入空白如果要用來源外掛的名稱)'); + diff --git a/plugins/serendipity_plugin_eventwrapper/serendipity_plugin_eventwrapper.php b/plugins/serendipity_plugin_eventwrapper/serendipity_plugin_eventwrapper.php index ed146b02..4bf56390 100644 --- a/plugins/serendipity_plugin_eventwrapper/serendipity_plugin_eventwrapper.php +++ b/plugins/serendipity_plugin_eventwrapper/serendipity_plugin_eventwrapper.php @@ -1,10 +1,14 @@ -<?php # $Id$ +<?php + +if (IN_serendipity !== true) { + die ("Don't hack!"); +} @serendipity_plugin_api::load_language(dirname(__FILE__)); class serendipity_plugin_eventwrapper extends serendipity_plugin { -var $rewrite_from, $rewrite_to; + var $rewrite_from, $rewrite_to; function introspect(&$propbag) { @@ -14,9 +18,9 @@ var $rewrite_from, $rewrite_to; $propbag->add('description', PLUGIN_EVENT_WRAPPER_DESC); $propbag->add('stackable', true); $propbag->add('author', 'Garvin Hicking'); - $propbag->add('version', '1.0'); + $propbag->add('version', '1.1'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -30,6 +34,7 @@ var $rewrite_from, $rewrite_to; global $serendipity; switch($name) { + case 'event_plugin': $plugins = serendipity_plugin_api::get_event_plugins(); $select = array(); @@ -55,14 +60,14 @@ var $rewrite_from, $rewrite_to; break; default: - return false; + return false; } return true; } function generate_content(&$title) { - $plug = $this->get_config('event_plugin', 'false'); + $plug = $this->get_config('event_plugin', 'false');// mixed! if ($plug == 'false') { return; } @@ -79,6 +84,7 @@ var $rewrite_from, $rewrite_to; $title = $faketitle; } } + } /* vim: set sts=4 ts=4 expandtab : */ diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_bg.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_bg.inc.php index 91016c31..284a5f8a 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_bg.inc.php @@ -1,32 +1,33 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ - @define('PLUGIN_HISTORY_NAME', 'История'); - @define('PLUGIN_HISTORY_DESC', 'Показва отдавнашни постинги, с възможност за задаване на възрастта им'); - @define('PLUGIN_HISTORY_MIN_AGE', 'Минимална възраст'); - @define('PLUGIN_HISTORY_MIN_AGE_DESC', 'Минимална възраст на постингите в дни'); - @define('PLUGIN_HISTORY_MAX_AGE', 'Максимална възраст'); - @define('PLUGIN_HISTORY_MAX_AGE_DESC','Максимална възраст на постингите в дни'); - @define('PLUGIN_HISTORY_MAX_ENTRIES', 'Брой постинги'); - @define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', 'Максимален брой на постингите за показване'); - @define('PLUGIN_HISTORY_SHOWFULL', 'Цели постинги'); - @define('PLUGIN_HISTORY_SHOWFULL_DESC', 'Показване на целите постинги вместо заглавията им като връзки'); - @define('PLUGIN_HISTORY_INTRO', 'Въведение'); - @define('PLUGIN_HISTORY_INTRO_DESC', 'Кратко въведение (нещо като \'Преди една година аз казах... \')'); - @define('PLUGIN_HISTORY_OUTRO', 'Край'); - @define('PLUGIN_HISTORY_OUTRO_DESC', 'Завършващ текст, след постингите'); - @define('PLUGIN_HISTORY_DISPLAYDATE', 'Показване на дата'); - @define('PLUGIN_HISTORY_DISPLAYDATE_DESC', 'Показване на датата за всеки постинг ?'); - @define('PLUGIN_HISTORY_MAXLENGTH', 'Дължина на заглавието'); - @define('PLUGIN_HISTORY_MAXLENGTH_DESC', 'След колко символа да се отреже заглавието (нула за целите заглавия) ?'); - @define('PLUGIN_HISTORY_SPECIALAGE', 'Период'); - @define('PLUGIN_HISTORY_SPECIALAGE_DESC', 'Ако искате да дефинирате период вместо да използвате период по подразбиране, изберете \'По избор\' и настройте двете стойности по-долу'); - @define('PLUGIN_HISTORY_SPECIALAGE_YEAR', 'Показва статии на възраст точно една година.'); - @define('PLUGIN_HISTORY_CUSTOMAGE', 'Дефиниране на възрастта'); - @define('PLUGIN_HISTORY_OYA', 'Една година назад'); - @define('PLUGIN_HISTORY_MYSELF', 'По избор'); - @define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Показване на името на автора'); +@define('PLUGIN_HISTORY_NAME', 'История'); +@define('PLUGIN_HISTORY_DESC', 'Показва отдавнашни постинги, с възможност за задаване на възрастта им'); +@define('PLUGIN_HISTORY_MIN_AGE', 'Минимална възраст'); +@define('PLUGIN_HISTORY_MIN_AGE_DESC', 'Минимална възраст на постингите в дни'); +@define('PLUGIN_HISTORY_MAX_AGE', 'Максимална възраст'); +@define('PLUGIN_HISTORY_MAX_AGE_DESC','Максимална възраст на постингите в дни'); +@define('PLUGIN_HISTORY_MAX_ENTRIES', 'Брой постинги'); +@define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', 'Максимален брой на постингите за показване'); +@define('PLUGIN_HISTORY_SHOWFULL', 'Цели постинги'); +@define('PLUGIN_HISTORY_SHOWFULL_DESC', 'Показване на целите постинги вместо заглавията им като връзки'); +@define('PLUGIN_HISTORY_INTRO', 'Въведение'); +@define('PLUGIN_HISTORY_INTRO_DESC', 'Кратко въведение (нещо като \'Преди една година аз казах... \')'); +@define('PLUGIN_HISTORY_OUTRO', 'Край'); +@define('PLUGIN_HISTORY_OUTRO_DESC', 'Завършващ текст, след постингите'); +@define('PLUGIN_HISTORY_DISPLAYDATE', 'Показване на дата'); +@define('PLUGIN_HISTORY_DISPLAYDATE_DESC', 'Показване на датата за всеки постинг ?'); +@define('PLUGIN_HISTORY_MAXLENGTH', 'Дължина на заглавието'); +@define('PLUGIN_HISTORY_MAXLENGTH_DESC', 'След колко символа да се отреже заглавието (нула за целите заглавия) ?'); +@define('PLUGIN_HISTORY_SPECIALAGE', 'Период'); +@define('PLUGIN_HISTORY_SPECIALAGE_DESC', 'Ако искате да дефинирате период вместо да използвате период по подразбиране, изберете \'По избор\' и настройте двете стойности по-долу'); +@define('PLUGIN_HISTORY_SPECIALAGE_YEAR', 'Показва статии на възраст точно една година.'); +@define('PLUGIN_HISTORY_CUSTOMAGE', 'Дефиниране на възрастта'); +@define('PLUGIN_HISTORY_OYA', 'Една година назад'); +@define('PLUGIN_HISTORY_MYSELF', 'По избор'); +@define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Показване на името на автора'); + diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_cn.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_cn.inc.php index fadd9c64..2b972627 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_cn.inc.php @@ -25,3 +25,4 @@ @define('PLUGIN_HISTORY_OYA', '显示恰好发布已满一年的文章'); @define('PLUGIN_HISTORY_MYSELF', '自己设定日期时间段'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', '显示作者姓名'); + diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_cs.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_cs.inc.php index 7d34584a..f0261069 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2007-11-23 15:30:00Z VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -32,3 +32,4 @@ @define('PLUGIN_HISTORY_OYA', 'Před rokem'); @define('PLUGIN_HISTORY_MYSELF', 'Sám nastavím'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Zobraz jméno autora'); + diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_cz.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_cz.inc.php index b2aa3991..f0261069 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cz.inc.php 1381 2007-11-23 15:30:00Z VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -32,3 +32,4 @@ @define('PLUGIN_HISTORY_OYA', 'Před rokem'); @define('PLUGIN_HISTORY_MYSELF', 'Sám nastavím'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Zobraz jméno autora'); + diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_de.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_de.inc.php index e82c9451..88ad9421 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_de.inc.php @@ -1,34 +1,35 @@ -<?php # lang_de.inc.php 1.0 2009-06-03 10:01:55 VladaAjgl $ +<?php /** * @version 1.0 * @author Konrad Bauckmeier <kontakt@dd4kids.de> * @translated 2009/06/03 */ - @define('PLUGIN_HISTORY_NAME', 'Geschichte'); - @define('PLUGIN_HISTORY_DESC', 'Zeigt Einträge eines einstellbaren Alters an.'); - @define('PLUGIN_HISTORY_MIN_AGE', 'Mindestalter'); - @define('PLUGIN_HISTORY_MIN_AGE_DESC', 'Mindestalter der Einträge (in Tagen).'); - @define('PLUGIN_HISTORY_MAX_AGE', 'Höchstalter'); - @define('PLUGIN_HISTORY_MAX_AGE_DESC','Höchstalter der Einträge (in Tagen).'); - @define('PLUGIN_HISTORY_MAX_ENTRIES', 'Anzahl'); - @define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', 'Wieviele Einträge sollen maximal angezeigt werden?'); - @define('PLUGIN_HISTORY_SHOWFULL', 'Ganze Einträge'); - @define('PLUGIN_HISTORY_SHOWFULL_DESC', 'Nicht nur Überschriften, sondern ganze Einträge anzeigen.'); - @define('PLUGIN_HISTORY_INTRO', 'Intro'); - @define('PLUGIN_HISTORY_INTRO_DESC', 'Text, der vor den Einträgen angezeigt werden soll'); - @define('PLUGIN_HISTORY_OUTRO', 'Outro'); - @define('PLUGIN_HISTORY_OUTRO_DESC', 'Text, der hinter den Einträgen angezeigt werden soll'); - @define('PLUGIN_HISTORY_DISPLAYDATE', 'Datum anzeigen'); - @define('PLUGIN_HISTORY_DISPLAYDATE_DESC', 'Vor jedem Eintrag das Datum anzeigen?'); - @define('PLUGIN_HISTORY_MAXLENGTH', 'Überschriftenlänge'); - @define('PLUGIN_HISTORY_MAXLENGTH_DESC', 'Nach wievielen Zeichen sollen die Überschriften abgeschnitten werden (0 für garnicht)?'); - @define('PLUGIN_HISTORY_SPECIALAGE', 'Vorgefertigter Zeitrahmen'); - @define('PLUGIN_HISTORY_SPECIALAGE_DESC', 'Wenn Sie statt einem vorgefertigten lieber einen eigenen Zeitraum einstellen möchten, wählen Sie \'Anderer\' aus und füllen die unteren beiden Felder.'); - @define('PLUGIN_HISTORY_SPECIALAGE_YEAR', 'Zeigt Einträge vom selben Datum des letzten Jahres an.'); - @define('PLUGIN_HISTORY_CUSTOMAGE', 'Zeitrahmen selbst einstellen'); - @define('PLUGIN_HISTORY_OYA', 'Heute vor einem Jahr'); - @define('PLUGIN_HISTORY_MYSELF', 'Anderer'); +@define('PLUGIN_HISTORY_NAME', 'Geschichte'); +@define('PLUGIN_HISTORY_DESC', 'Zeigt Einträge eines einstellbaren Alters an.'); +@define('PLUGIN_HISTORY_MIN_AGE', 'Mindestalter'); +@define('PLUGIN_HISTORY_MIN_AGE_DESC', 'Mindestalter der Einträge (in Tagen).'); +@define('PLUGIN_HISTORY_MAX_AGE', 'Höchstalter'); +@define('PLUGIN_HISTORY_MAX_AGE_DESC','Höchstalter der Einträge (in Tagen).'); +@define('PLUGIN_HISTORY_MAX_ENTRIES', 'Anzahl'); +@define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', 'Wieviele Einträge sollen maximal angezeigt werden?'); +@define('PLUGIN_HISTORY_SHOWFULL', 'Ganze Einträge'); +@define('PLUGIN_HISTORY_SHOWFULL_DESC', 'Nicht nur Überschriften, sondern ganze Einträge anzeigen.'); +@define('PLUGIN_HISTORY_INTRO', 'Intro'); +@define('PLUGIN_HISTORY_INTRO_DESC', 'Text, der vor den Einträgen angezeigt werden soll'); +@define('PLUGIN_HISTORY_OUTRO', 'Outro'); +@define('PLUGIN_HISTORY_OUTRO_DESC', 'Text, der hinter den Einträgen angezeigt werden soll'); +@define('PLUGIN_HISTORY_DISPLAYDATE', 'Datum anzeigen'); +@define('PLUGIN_HISTORY_DISPLAYDATE_DESC', 'Vor jedem Eintrag das Datum anzeigen?'); +@define('PLUGIN_HISTORY_MAXLENGTH', 'Überschriftenlänge'); +@define('PLUGIN_HISTORY_MAXLENGTH_DESC', 'Nach wievielen Zeichen sollen die Überschriften abgeschnitten werden (0 für garnicht)?'); +@define('PLUGIN_HISTORY_SPECIALAGE', 'Vorgefertigter Zeitrahmen'); +@define('PLUGIN_HISTORY_SPECIALAGE_DESC', 'Wenn Sie statt einem vorgefertigten lieber einen eigenen Zeitraum einstellen möchten, wählen Sie \'Anderer\' aus und füllen die unteren beiden Felder.'); +@define('PLUGIN_HISTORY_SPECIALAGE_YEAR', 'Zeigt Einträge vom selben Datum des letzten Jahres an.'); +@define('PLUGIN_HISTORY_CUSTOMAGE', 'Zeitrahmen selbst einstellen'); +@define('PLUGIN_HISTORY_OYA', 'Heute vor einem Jahr'); +@define('PLUGIN_HISTORY_MYSELF', 'Anderer'); // Next lines were translated on 2009/06/03 -@define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Zeige den Namen des Authors'); \ No newline at end of file +@define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Zeige den Namen des Authors'); + diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_es.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_es.inc.php index 5f7bef28..5b852dac 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_es.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -31,4 +31,3 @@ @define('PLUGIN_HISTORY_OYA', 'Hace un año'); @define('PLUGIN_HISTORY_MYSELF', 'Yo definiré uno'); -?> diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_fr.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_fr.inc.php index 77c0ba34..78d4cbe4 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -38,5 +38,3 @@ @define('PLUGIN_HISTORY_OYA', 'Il y a un an'); @define('PLUGIN_HISTORY_MYSELF', 'Je veux le définir moi-même'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_ja.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_ja.inc.php index 51cfe810..9df6d140 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 1381 */ @@ -31,3 +31,4 @@ @define('PLUGIN_HISTORY_OYA', '1 年前'); @define('PLUGIN_HISTORY_MYSELF', 'I\'ll define one'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', '著者の名前を表示する'); + diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_ko.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_ko.inc.php index bee68673..9283984b 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_ko.inc.php @@ -1,30 +1,29 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_HISTORY_NAME', '오래된 글'); - @define('PLUGIN_HISTORY_DESC', '설정한 기간에 맞춰 오래 전에 썼던 글을 보여줌'); - @define('PLUGIN_HISTORY_MIN_AGE', '최소 나이'); - @define('PLUGIN_HISTORY_MIN_AGE_DESC', '글의 최소 나이 (일 단위)'); - @define('PLUGIN_HISTORY_MAX_AGE', '최대 나이'); - @define('PLUGIN_HISTORY_MAX_AGE_DESC','글의 최대 나이 (일 단위)'); - @define('PLUGIN_HISTORY_MAX_ENTRIES', '최대 글 수'); - @define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', '보여줄 글의 수'); - @define('PLUGIN_HISTORY_SHOWFULL', '글 전체 보기'); - @define('PLUGIN_HISTORY_SHOWFULL_DESC', '제목만 링크하지 말고 글 전체 내용을 보여줌'); - @define('PLUGIN_HISTORY_INTRO', '소갯말'); - @define('PLUGIN_HISTORY_INTRO_DESC', '\'작년에는 이런 걸 적었죠:\' 식의 간단한 소갯말'); - @define('PLUGIN_HISTORY_OUTRO', '맺음말'); - @define('PLUGIN_HISTORY_OUTRO_DESC', '\'어때요, 재밌죠?\' 식의 간단한 맺음말'); - @define('PLUGIN_HISTORY_DISPLAYDATE', '날짜 보기'); - @define('PLUGIN_HISTORY_DISPLAYDATE_DESC', '글이 작성된 날짜를 표시하겠습니까?'); - @define('PLUGIN_HISTORY_MAXLENGTH', '제목 길이'); - @define('PLUGIN_HISTORY_MAXLENGTH_DESC', '몇 글자 후 제목을 생략하겠습니까(0을 입력하면 모두 출력)?'); - @define('PLUGIN_HISTORY_SPECIALAGE', '기간 설정'); - @define('PLUGIN_HISTORY_SPECIALAGE_DESC', '미리 정해진 기간 대신 직접 기간을 정하고 싶을 경우 \'기간을 직접 입력\'을 선택하고 두 개의 설정을 조절하십시오.'); - @define('PLUGIN_HISTORY_SPECIALAGE_YEAR', '정확하게 1년 전 글을 보여줌'); - @define('PLUGIN_HISTORY_CUSTOMAGE', '기간을 직접 정합니다'); - @define('PLUGIN_HISTORY_OYA', '1년 전'); - @define('PLUGIN_HISTORY_MYSELF', '기간을 직접 입력'); +@define('PLUGIN_HISTORY_NAME', '오래된 글'); +@define('PLUGIN_HISTORY_DESC', '설정한 기간에 맞춰 오래 전에 썼던 글을 보여줌'); +@define('PLUGIN_HISTORY_MIN_AGE', '최소 나이'); +@define('PLUGIN_HISTORY_MIN_AGE_DESC', '글의 최소 나이 (일 단위)'); +@define('PLUGIN_HISTORY_MAX_AGE', '최대 나이'); +@define('PLUGIN_HISTORY_MAX_AGE_DESC','글의 최대 나이 (일 단위)'); +@define('PLUGIN_HISTORY_MAX_ENTRIES', '최대 글 수'); +@define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', '보여줄 글의 수'); +@define('PLUGIN_HISTORY_SHOWFULL', '글 전체 보기'); +@define('PLUGIN_HISTORY_SHOWFULL_DESC', '제목만 링크하지 말고 글 전체 내용을 보여줌'); +@define('PLUGIN_HISTORY_INTRO', '소갯말'); +@define('PLUGIN_HISTORY_INTRO_DESC', '\'작년에는 이런 걸 적었죠:\' 식의 간단한 소갯말'); +@define('PLUGIN_HISTORY_OUTRO', '맺음말'); +@define('PLUGIN_HISTORY_OUTRO_DESC', '\'어때요, 재밌죠?\' 식의 간단한 맺음말'); +@define('PLUGIN_HISTORY_DISPLAYDATE', '날짜 보기'); +@define('PLUGIN_HISTORY_DISPLAYDATE_DESC', '글이 작성된 날짜를 표시하겠습니까?'); +@define('PLUGIN_HISTORY_MAXLENGTH', '제목 길이'); +@define('PLUGIN_HISTORY_MAXLENGTH_DESC', '몇 글자 후 제목을 생략하겠습니까(0을 입력하면 모두 출력)?'); +@define('PLUGIN_HISTORY_SPECIALAGE', '기간 설정'); +@define('PLUGIN_HISTORY_SPECIALAGE_DESC', '미리 정해진 기간 대신 직접 기간을 정하고 싶을 경우 \'기간을 직접 입력\'을 선택하고 두 개의 설정을 조절하십시오.'); +@define('PLUGIN_HISTORY_SPECIALAGE_YEAR', '정확하게 1년 전 글을 보여줌'); +@define('PLUGIN_HISTORY_CUSTOMAGE', '기간을 직접 정합니다'); +@define('PLUGIN_HISTORY_OYA', '1년 전'); +@define('PLUGIN_HISTORY_MYSELF', '기간을 직접 입력'); -?> diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_pl.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_pl.inc.php index a7b0ca4d..199ae8fc 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -31,3 +31,4 @@ @define('PLUGIN_HISTORY_OYA', 'Sprzed roku'); @define('PLUGIN_HISTORY_MYSELF', 'Zdefiniuję samodzielnie'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Pokaż imię/nazwę autora'); + diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_pt_PT.inc.php index b560b9d1..edd39c90 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $ +<?php ########################################################################## # serendipity - another blogger... # @@ -37,5 +37,3 @@ @define('PLUGIN_HISTORY_OYA', 'Há um ano'); @define('PLUGIN_HISTORY_MYSELF', 'Defini-lo-ei eu próprio'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_sk.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_sk.inc.php index c7559379..394f8c0f 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_sk.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_sk.inc.php @@ -31,3 +31,4 @@ @define('PLUGIN_HISTORY_OYA', 'Pred rokom'); @define('PLUGIN_HISTORY_MYSELF', 'Nastavím sám'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Zobraziť meno autora'); + diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_tn.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_tn.inc.php index 603cce98..13c33223 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,28 +12,28 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_HISTORY_NAME', '歷史'); - @define('PLUGIN_HISTORY_DESC', '顯示舊的文章。'); - @define('PLUGIN_HISTORY_MIN_AGE', '最舊的日期'); - @define('PLUGIN_HISTORY_MIN_AGE_DESC', '最舊的文章日期 (天)。'); - @define('PLUGIN_HISTORY_MAX_AGE', '最新的日期'); - @define('PLUGIN_HISTORY_MAX_AGE_DESC','最新的文章日期 (天)。'); - @define('PLUGIN_HISTORY_MAX_ENTRIES', '文章數量'); - @define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', '顯示的文章數量'); - @define('PLUGIN_HISTORY_SHOWFULL', '完整內容'); - @define('PLUGIN_HISTORY_SHOWFULL_DESC', '顯示文章的完整內容,或只顯示它的標題。'); - @define('PLUGIN_HISTORY_INTRO', '介紹'); - @define('PLUGIN_HISTORY_INTRO_DESC', '簡單的介紹像 \'一年前我說:\'。'); - @define('PLUGIN_HISTORY_OUTRO', '結尾'); - @define('PLUGIN_HISTORY_OUTRO_DESC', '簡單的結尾像 \'不錯對吧?\'。'); - @define('PLUGIN_HISTORY_DISPLAYDATE', '顯示日期'); - @define('PLUGIN_HISTORY_DISPLAYDATE_DESC', '顯示文章的日期?'); - @define('PLUGIN_HISTORY_MAXLENGTH', '標題長度'); - @define('PLUGIN_HISTORY_MAXLENGTH_DESC', '允許多少個標題的文字後切斷?(0 如果不切斷)'); - @define('PLUGIN_HISTORY_SPECIALAGE', '預定日期?'); - @define('PLUGIN_HISTORY_SPECIALAGE_DESC', '如果你不用預定的日期,要用自訂的日期,請選擇 \'自訂\' 然後提供下面的兩個設定。'); - @define('PLUGIN_HISTORY_SPECIALAGE_YEAR', '顯示滿一年的文章'); - @define('PLUGIN_HISTORY_CUSTOMAGE', '自己設定日期'); - @define('PLUGIN_HISTORY_OYA', '一年前'); - @define('PLUGIN_HISTORY_MYSELF', '自訂'); -?> \ No newline at end of file +@define('PLUGIN_HISTORY_NAME', '歷史'); +@define('PLUGIN_HISTORY_DESC', '顯示舊的文章。'); +@define('PLUGIN_HISTORY_MIN_AGE', '最舊的日期'); +@define('PLUGIN_HISTORY_MIN_AGE_DESC', '最舊的文章日期 (天)。'); +@define('PLUGIN_HISTORY_MAX_AGE', '最新的日期'); +@define('PLUGIN_HISTORY_MAX_AGE_DESC','最新的文章日期 (天)。'); +@define('PLUGIN_HISTORY_MAX_ENTRIES', '文章數量'); +@define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', '顯示的文章數量'); +@define('PLUGIN_HISTORY_SHOWFULL', '完整內容'); +@define('PLUGIN_HISTORY_SHOWFULL_DESC', '顯示文章的完整內容,或只顯示它的標題。'); +@define('PLUGIN_HISTORY_INTRO', '介紹'); +@define('PLUGIN_HISTORY_INTRO_DESC', '簡單的介紹像 \'一年前我說:\'。'); +@define('PLUGIN_HISTORY_OUTRO', '結尾'); +@define('PLUGIN_HISTORY_OUTRO_DESC', '簡單的結尾像 \'不錯對吧?\'。'); +@define('PLUGIN_HISTORY_DISPLAYDATE', '顯示日期'); +@define('PLUGIN_HISTORY_DISPLAYDATE_DESC', '顯示文章的日期?'); +@define('PLUGIN_HISTORY_MAXLENGTH', '標題長度'); +@define('PLUGIN_HISTORY_MAXLENGTH_DESC', '允許多少個標題的文字後切斷?(0 如果不切斷)'); +@define('PLUGIN_HISTORY_SPECIALAGE', '預定日期?'); +@define('PLUGIN_HISTORY_SPECIALAGE_DESC', '如果你不用預定的日期,要用自訂的日期,請選擇 \'自訂\' 然後提供下面的兩個設定。'); +@define('PLUGIN_HISTORY_SPECIALAGE_YEAR', '顯示滿一年的文章'); +@define('PLUGIN_HISTORY_CUSTOMAGE', '自己設定日期'); +@define('PLUGIN_HISTORY_OYA', '一年前'); +@define('PLUGIN_HISTORY_MYSELF', '自訂'); + diff --git a/plugins/serendipity_plugin_history/UTF-8/lang_zh.inc.php b/plugins/serendipity_plugin_history/UTF-8/lang_zh.inc.php index fadd9c64..2b972627 100644 --- a/plugins/serendipity_plugin_history/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_plugin_history/UTF-8/lang_zh.inc.php @@ -25,3 +25,4 @@ @define('PLUGIN_HISTORY_OYA', '显示恰好发布已满一年的文章'); @define('PLUGIN_HISTORY_MYSELF', '自己设定日期时间段'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', '显示作者姓名'); + diff --git a/plugins/serendipity_plugin_history/lang_bg.inc.php b/plugins/serendipity_plugin_history/lang_bg.inc.php index 9a0b1253..706e32c1 100644 --- a/plugins/serendipity_plugin_history/lang_bg.inc.php +++ b/plugins/serendipity_plugin_history/lang_bg.inc.php @@ -1,32 +1,33 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ - @define('PLUGIN_HISTORY_NAME', '�������'); - @define('PLUGIN_HISTORY_DESC', '������� ���������� ��������, � ���������� �� �������� �� ��������� ��'); - @define('PLUGIN_HISTORY_MIN_AGE', '��������� �������'); - @define('PLUGIN_HISTORY_MIN_AGE_DESC', '��������� ������� �� ���������� � ���'); - @define('PLUGIN_HISTORY_MAX_AGE', '���������� �������'); - @define('PLUGIN_HISTORY_MAX_AGE_DESC','���������� ������� �� ���������� � ���'); - @define('PLUGIN_HISTORY_MAX_ENTRIES', '���� ��������'); - @define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', '���������� ���� �� ���������� �� ���������'); - @define('PLUGIN_HISTORY_SHOWFULL', '���� ��������'); - @define('PLUGIN_HISTORY_SHOWFULL_DESC', '��������� �� ������ �������� ������ ���������� �� ���� ������'); - @define('PLUGIN_HISTORY_INTRO', '���������'); - @define('PLUGIN_HISTORY_INTRO_DESC', '������ ��������� (���� ���� \'����� ���� ������ �� �����... \')'); - @define('PLUGIN_HISTORY_OUTRO', '����'); - @define('PLUGIN_HISTORY_OUTRO_DESC', '��������� �����, ���� ����������'); - @define('PLUGIN_HISTORY_DISPLAYDATE', '��������� �� ����'); - @define('PLUGIN_HISTORY_DISPLAYDATE_DESC', '��������� �� ������ �� ����� ������� ?'); - @define('PLUGIN_HISTORY_MAXLENGTH', '������� �� ����������'); - @define('PLUGIN_HISTORY_MAXLENGTH_DESC', '���� ����� ������� �� �� ������ ���������� (���� �� ������ ��������) ?'); - @define('PLUGIN_HISTORY_SPECIALAGE', '������'); - @define('PLUGIN_HISTORY_SPECIALAGE_DESC', '��� ������ �� ���������� ������ ������ �� ���������� ������ �� ������������, �������� \'�� �����\' � ��������� ����� ��������� ��-����'); - @define('PLUGIN_HISTORY_SPECIALAGE_YEAR', '������� ������ �� ������� ����� ���� ������.'); - @define('PLUGIN_HISTORY_CUSTOMAGE', '���������� �� ���������'); - @define('PLUGIN_HISTORY_OYA', '���� ������ �����'); - @define('PLUGIN_HISTORY_MYSELF', '�� �����'); - @define('PLUGIN_HISTORY_DISPLAYAUTHOR', '��������� �� ����� �� ������'); +@define('PLUGIN_HISTORY_NAME', '�������'); +@define('PLUGIN_HISTORY_DESC', '������� ���������� ��������, � ���������� �� �������� �� ��������� ��'); +@define('PLUGIN_HISTORY_MIN_AGE', '��������� �������'); +@define('PLUGIN_HISTORY_MIN_AGE_DESC', '��������� ������� �� ���������� � ���'); +@define('PLUGIN_HISTORY_MAX_AGE', '���������� �������'); +@define('PLUGIN_HISTORY_MAX_AGE_DESC','���������� ������� �� ���������� � ���'); +@define('PLUGIN_HISTORY_MAX_ENTRIES', '���� ��������'); +@define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', '���������� ���� �� ���������� �� ���������'); +@define('PLUGIN_HISTORY_SHOWFULL', '���� ��������'); +@define('PLUGIN_HISTORY_SHOWFULL_DESC', '��������� �� ������ �������� ������ ���������� �� ���� ������'); +@define('PLUGIN_HISTORY_INTRO', '���������'); +@define('PLUGIN_HISTORY_INTRO_DESC', '������ ��������� (���� ���� \'����� ���� ������ �� �����... \')'); +@define('PLUGIN_HISTORY_OUTRO', '����'); +@define('PLUGIN_HISTORY_OUTRO_DESC', '��������� �����, ���� ����������'); +@define('PLUGIN_HISTORY_DISPLAYDATE', '��������� �� ����'); +@define('PLUGIN_HISTORY_DISPLAYDATE_DESC', '��������� �� ������ �� ����� ������� ?'); +@define('PLUGIN_HISTORY_MAXLENGTH', '������� �� ����������'); +@define('PLUGIN_HISTORY_MAXLENGTH_DESC', '���� ����� ������� �� �� ������ ���������� (���� �� ������ ��������) ?'); +@define('PLUGIN_HISTORY_SPECIALAGE', '������'); +@define('PLUGIN_HISTORY_SPECIALAGE_DESC', '��� ������ �� ���������� ������ ������ �� ���������� ������ �� ������������, �������� \'�� �����\' � ��������� ����� ��������� ��-����'); +@define('PLUGIN_HISTORY_SPECIALAGE_YEAR', '������� ������ �� ������� ����� ���� ������.'); +@define('PLUGIN_HISTORY_CUSTOMAGE', '���������� �� ���������'); +@define('PLUGIN_HISTORY_OYA', '���� ������ �����'); +@define('PLUGIN_HISTORY_MYSELF', '�� �����'); +@define('PLUGIN_HISTORY_DISPLAYAUTHOR', '��������� �� ����� �� ������'); + diff --git a/plugins/serendipity_plugin_history/lang_cn.inc.php b/plugins/serendipity_plugin_history/lang_cn.inc.php index fadd9c64..2b972627 100644 --- a/plugins/serendipity_plugin_history/lang_cn.inc.php +++ b/plugins/serendipity_plugin_history/lang_cn.inc.php @@ -25,3 +25,4 @@ @define('PLUGIN_HISTORY_OYA', '显示恰好发布已满一年的文章'); @define('PLUGIN_HISTORY_MYSELF', '自己设定日期时间段'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', '显示作者姓名'); + diff --git a/plugins/serendipity_plugin_history/lang_cs.inc.php b/plugins/serendipity_plugin_history/lang_cs.inc.php index d50a0ba8..3374833b 100644 --- a/plugins/serendipity_plugin_history/lang_cs.inc.php +++ b/plugins/serendipity_plugin_history/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cs.inc.php 1381 2007-11-23 15:30:00Z VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -32,3 +32,4 @@ @define('PLUGIN_HISTORY_OYA', 'P�ed rokem'); @define('PLUGIN_HISTORY_MYSELF', 'S�m nastav�m'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Zobraz jm�no autora'); + diff --git a/plugins/serendipity_plugin_history/lang_cz.inc.php b/plugins/serendipity_plugin_history/lang_cz.inc.php index 4b61a3d0..454f7134 100644 --- a/plugins/serendipity_plugin_history/lang_cz.inc.php +++ b/plugins/serendipity_plugin_history/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_cz.inc.php 1381 2007-11-23 15:30:00Z VladaAjgl $ +<?php /** * @version $Revision: 1381 $ @@ -32,3 +32,4 @@ @define('PLUGIN_HISTORY_OYA', 'P�ed rokem'); @define('PLUGIN_HISTORY_MYSELF', 'S�m nastav�m'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Zobraz jm�no autora'); + diff --git a/plugins/serendipity_plugin_history/lang_de.inc.php b/plugins/serendipity_plugin_history/lang_de.inc.php index a9aacc4d..92ea274b 100644 --- a/plugins/serendipity_plugin_history/lang_de.inc.php +++ b/plugins/serendipity_plugin_history/lang_de.inc.php @@ -1,34 +1,35 @@ -<?php # lang_de.inc.php 1.0 2009-06-03 10:01:55 VladaAjgl $ +<?php /** * @version 1.0 * @author Konrad Bauckmeier <kontakt@dd4kids.de> * @translated 2009/06/03 */ - @define('PLUGIN_HISTORY_NAME', 'Geschichte'); - @define('PLUGIN_HISTORY_DESC', 'Zeigt Eintr�ge eines einstellbaren Alters an.'); - @define('PLUGIN_HISTORY_MIN_AGE', 'Mindestalter'); - @define('PLUGIN_HISTORY_MIN_AGE_DESC', 'Mindestalter der Eintr�ge (in Tagen).'); - @define('PLUGIN_HISTORY_MAX_AGE', 'H�chstalter'); - @define('PLUGIN_HISTORY_MAX_AGE_DESC','H�chstalter der Eintr�ge (in Tagen).'); - @define('PLUGIN_HISTORY_MAX_ENTRIES', 'Anzahl'); - @define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', 'Wieviele Eintr�ge sollen maximal angezeigt werden?'); - @define('PLUGIN_HISTORY_SHOWFULL', 'Ganze Eintr�ge'); - @define('PLUGIN_HISTORY_SHOWFULL_DESC', 'Nicht nur �berschriften, sondern ganze Eintr�ge anzeigen.'); - @define('PLUGIN_HISTORY_INTRO', 'Intro'); - @define('PLUGIN_HISTORY_INTRO_DESC', 'Text, der vor den Eintr�gen angezeigt werden soll'); - @define('PLUGIN_HISTORY_OUTRO', 'Outro'); - @define('PLUGIN_HISTORY_OUTRO_DESC', 'Text, der hinter den Eintr�gen angezeigt werden soll'); - @define('PLUGIN_HISTORY_DISPLAYDATE', 'Datum anzeigen'); - @define('PLUGIN_HISTORY_DISPLAYDATE_DESC', 'Vor jedem Eintrag das Datum anzeigen?'); - @define('PLUGIN_HISTORY_MAXLENGTH', '�berschriftenl�nge'); - @define('PLUGIN_HISTORY_MAXLENGTH_DESC', 'Nach wievielen Zeichen sollen die �berschriften abgeschnitten werden (0 f�r garnicht)?'); - @define('PLUGIN_HISTORY_SPECIALAGE', 'Vorgefertigter Zeitrahmen'); - @define('PLUGIN_HISTORY_SPECIALAGE_DESC', 'Wenn Sie statt einem vorgefertigten lieber einen eigenen Zeitraum einstellen m�chten, w�hlen Sie \'Anderer\' aus und f�llen die unteren beiden Felder.'); - @define('PLUGIN_HISTORY_SPECIALAGE_YEAR', 'Zeigt Eintr�ge vom selben Datum des letzten Jahres an.'); - @define('PLUGIN_HISTORY_CUSTOMAGE', 'Zeitrahmen selbst einstellen'); - @define('PLUGIN_HISTORY_OYA', 'Heute vor einem Jahr'); - @define('PLUGIN_HISTORY_MYSELF', 'Anderer'); +@define('PLUGIN_HISTORY_NAME', 'Geschichte'); +@define('PLUGIN_HISTORY_DESC', 'Zeigt Eintr�ge eines einstellbaren Alters an.'); +@define('PLUGIN_HISTORY_MIN_AGE', 'Mindestalter'); +@define('PLUGIN_HISTORY_MIN_AGE_DESC', 'Mindestalter der Eintr�ge (in Tagen).'); +@define('PLUGIN_HISTORY_MAX_AGE', 'H�chstalter'); +@define('PLUGIN_HISTORY_MAX_AGE_DESC','H�chstalter der Eintr�ge (in Tagen).'); +@define('PLUGIN_HISTORY_MAX_ENTRIES', 'Anzahl'); +@define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', 'Wieviele Eintr�ge sollen maximal angezeigt werden?'); +@define('PLUGIN_HISTORY_SHOWFULL', 'Ganze Eintr�ge'); +@define('PLUGIN_HISTORY_SHOWFULL_DESC', 'Nicht nur �berschriften, sondern ganze Eintr�ge anzeigen.'); +@define('PLUGIN_HISTORY_INTRO', 'Intro'); +@define('PLUGIN_HISTORY_INTRO_DESC', 'Text, der vor den Eintr�gen angezeigt werden soll'); +@define('PLUGIN_HISTORY_OUTRO', 'Outro'); +@define('PLUGIN_HISTORY_OUTRO_DESC', 'Text, der hinter den Eintr�gen angezeigt werden soll'); +@define('PLUGIN_HISTORY_DISPLAYDATE', 'Datum anzeigen'); +@define('PLUGIN_HISTORY_DISPLAYDATE_DESC', 'Vor jedem Eintrag das Datum anzeigen?'); +@define('PLUGIN_HISTORY_MAXLENGTH', '�berschriftenl�nge'); +@define('PLUGIN_HISTORY_MAXLENGTH_DESC', 'Nach wievielen Zeichen sollen die �berschriften abgeschnitten werden (0 f�r garnicht)?'); +@define('PLUGIN_HISTORY_SPECIALAGE', 'Vorgefertigter Zeitrahmen'); +@define('PLUGIN_HISTORY_SPECIALAGE_DESC', 'Wenn Sie statt einem vorgefertigten lieber einen eigenen Zeitraum einstellen m�chten, w�hlen Sie \'Anderer\' aus und f�llen die unteren beiden Felder.'); +@define('PLUGIN_HISTORY_SPECIALAGE_YEAR', 'Zeigt Eintr�ge vom selben Datum des letzten Jahres an.'); +@define('PLUGIN_HISTORY_CUSTOMAGE', 'Zeitrahmen selbst einstellen'); +@define('PLUGIN_HISTORY_OYA', 'Heute vor einem Jahr'); +@define('PLUGIN_HISTORY_MYSELF', 'Anderer'); // Next lines were translated on 2009/06/03 -@define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Zeige den Namen des Authors'); \ No newline at end of file +@define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Zeige den Namen des Authors'); + diff --git a/plugins/serendipity_plugin_history/lang_en.inc.php b/plugins/serendipity_plugin_history/lang_en.inc.php index d8a03db0..d57734c4 100644 --- a/plugins/serendipity_plugin_history/lang_en.inc.php +++ b/plugins/serendipity_plugin_history/lang_en.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Translator Name <yourmail@example.com> * EN-Revision: Revision of lang_en.inc.php */ @@ -31,3 +31,4 @@ @define('PLUGIN_HISTORY_OYA', 'One year ago'); @define('PLUGIN_HISTORY_MYSELF', 'I\'ll define one'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Show author\'s name'); + diff --git a/plugins/serendipity_plugin_history/lang_es.inc.php b/plugins/serendipity_plugin_history/lang_es.inc.php index 89fddfec..588a3467 100644 --- a/plugins/serendipity_plugin_history/lang_es.inc.php +++ b/plugins/serendipity_plugin_history/lang_es.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -31,4 +31,3 @@ @define('PLUGIN_HISTORY_OYA', 'Hace un a�o'); @define('PLUGIN_HISTORY_MYSELF', 'Yo definir� uno'); -?> diff --git a/plugins/serendipity_plugin_history/lang_fr.inc.php b/plugins/serendipity_plugin_history/lang_fr.inc.php index 06082f89..472662b5 100644 --- a/plugins/serendipity_plugin_history/lang_fr.inc.php +++ b/plugins/serendipity_plugin_history/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -38,5 +38,3 @@ @define('PLUGIN_HISTORY_OYA', 'Il y a un an'); @define('PLUGIN_HISTORY_MYSELF', 'Je veux le d�finir moi-m�me'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_history/lang_ja.inc.php b/plugins/serendipity_plugin_history/lang_ja.inc.php index 51cfe810..9df6d140 100644 --- a/plugins/serendipity_plugin_history/lang_ja.inc.php +++ b/plugins/serendipity_plugin_history/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 1381 */ @@ -31,3 +31,4 @@ @define('PLUGIN_HISTORY_OYA', '1 年前'); @define('PLUGIN_HISTORY_MYSELF', 'I\'ll define one'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', '著者の名前を表示する'); + diff --git a/plugins/serendipity_plugin_history/lang_ko.inc.php b/plugins/serendipity_plugin_history/lang_ko.inc.php index bee68673..9283984b 100644 --- a/plugins/serendipity_plugin_history/lang_ko.inc.php +++ b/plugins/serendipity_plugin_history/lang_ko.inc.php @@ -1,30 +1,29 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_HISTORY_NAME', '오래된 글'); - @define('PLUGIN_HISTORY_DESC', '설정한 기간에 맞춰 오래 전에 썼던 글을 보여줌'); - @define('PLUGIN_HISTORY_MIN_AGE', '최소 나이'); - @define('PLUGIN_HISTORY_MIN_AGE_DESC', '글의 최소 나이 (일 단위)'); - @define('PLUGIN_HISTORY_MAX_AGE', '최대 나이'); - @define('PLUGIN_HISTORY_MAX_AGE_DESC','글의 최대 나이 (일 단위)'); - @define('PLUGIN_HISTORY_MAX_ENTRIES', '최대 글 수'); - @define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', '보여줄 글의 수'); - @define('PLUGIN_HISTORY_SHOWFULL', '글 전체 보기'); - @define('PLUGIN_HISTORY_SHOWFULL_DESC', '제목만 링크하지 말고 글 전체 내용을 보여줌'); - @define('PLUGIN_HISTORY_INTRO', '소갯말'); - @define('PLUGIN_HISTORY_INTRO_DESC', '\'작년에는 이런 걸 적었죠:\' 식의 간단한 소갯말'); - @define('PLUGIN_HISTORY_OUTRO', '맺음말'); - @define('PLUGIN_HISTORY_OUTRO_DESC', '\'어때요, 재밌죠?\' 식의 간단한 맺음말'); - @define('PLUGIN_HISTORY_DISPLAYDATE', '날짜 보기'); - @define('PLUGIN_HISTORY_DISPLAYDATE_DESC', '글이 작성된 날짜를 표시하겠습니까?'); - @define('PLUGIN_HISTORY_MAXLENGTH', '제목 길이'); - @define('PLUGIN_HISTORY_MAXLENGTH_DESC', '몇 글자 후 제목을 생략하겠습니까(0을 입력하면 모두 출력)?'); - @define('PLUGIN_HISTORY_SPECIALAGE', '기간 설정'); - @define('PLUGIN_HISTORY_SPECIALAGE_DESC', '미리 정해진 기간 대신 직접 기간을 정하고 싶을 경우 \'기간을 직접 입력\'을 선택하고 두 개의 설정을 조절하십시오.'); - @define('PLUGIN_HISTORY_SPECIALAGE_YEAR', '정확하게 1년 전 글을 보여줌'); - @define('PLUGIN_HISTORY_CUSTOMAGE', '기간을 직접 정합니다'); - @define('PLUGIN_HISTORY_OYA', '1년 전'); - @define('PLUGIN_HISTORY_MYSELF', '기간을 직접 입력'); +@define('PLUGIN_HISTORY_NAME', '오래된 글'); +@define('PLUGIN_HISTORY_DESC', '설정한 기간에 맞춰 오래 전에 썼던 글을 보여줌'); +@define('PLUGIN_HISTORY_MIN_AGE', '최소 나이'); +@define('PLUGIN_HISTORY_MIN_AGE_DESC', '글의 최소 나이 (일 단위)'); +@define('PLUGIN_HISTORY_MAX_AGE', '최대 나이'); +@define('PLUGIN_HISTORY_MAX_AGE_DESC','글의 최대 나이 (일 단위)'); +@define('PLUGIN_HISTORY_MAX_ENTRIES', '최대 글 수'); +@define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', '보여줄 글의 수'); +@define('PLUGIN_HISTORY_SHOWFULL', '글 전체 보기'); +@define('PLUGIN_HISTORY_SHOWFULL_DESC', '제목만 링크하지 말고 글 전체 내용을 보여줌'); +@define('PLUGIN_HISTORY_INTRO', '소갯말'); +@define('PLUGIN_HISTORY_INTRO_DESC', '\'작년에는 이런 걸 적었죠:\' 식의 간단한 소갯말'); +@define('PLUGIN_HISTORY_OUTRO', '맺음말'); +@define('PLUGIN_HISTORY_OUTRO_DESC', '\'어때요, 재밌죠?\' 식의 간단한 맺음말'); +@define('PLUGIN_HISTORY_DISPLAYDATE', '날짜 보기'); +@define('PLUGIN_HISTORY_DISPLAYDATE_DESC', '글이 작성된 날짜를 표시하겠습니까?'); +@define('PLUGIN_HISTORY_MAXLENGTH', '제목 길이'); +@define('PLUGIN_HISTORY_MAXLENGTH_DESC', '몇 글자 후 제목을 생략하겠습니까(0을 입력하면 모두 출력)?'); +@define('PLUGIN_HISTORY_SPECIALAGE', '기간 설정'); +@define('PLUGIN_HISTORY_SPECIALAGE_DESC', '미리 정해진 기간 대신 직접 기간을 정하고 싶을 경우 \'기간을 직접 입력\'을 선택하고 두 개의 설정을 조절하십시오.'); +@define('PLUGIN_HISTORY_SPECIALAGE_YEAR', '정확하게 1년 전 글을 보여줌'); +@define('PLUGIN_HISTORY_CUSTOMAGE', '기간을 직접 정합니다'); +@define('PLUGIN_HISTORY_OYA', '1년 전'); +@define('PLUGIN_HISTORY_MYSELF', '기간을 직접 입력'); -?> diff --git a/plugins/serendipity_plugin_history/lang_pl.inc.php b/plugins/serendipity_plugin_history/lang_pl.inc.php index fa34009f..742d952d 100644 --- a/plugins/serendipity_plugin_history/lang_pl.inc.php +++ b/plugins/serendipity_plugin_history/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -31,3 +31,4 @@ @define('PLUGIN_HISTORY_OYA', 'Sprzed roku'); @define('PLUGIN_HISTORY_MYSELF', 'Zdefiniuj� samodzielnie'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Poka� imi�/nazw� autora'); + diff --git a/plugins/serendipity_plugin_history/lang_pt_PT.inc.php b/plugins/serendipity_plugin_history/lang_pt_PT.inc.php index 34b9fd9f..850b456c 100644 --- a/plugins/serendipity_plugin_history/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_history/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $ +<?php ########################################################################## # serendipity - another blogger... # @@ -37,5 +37,3 @@ @define('PLUGIN_HISTORY_OYA', 'H� um ano'); @define('PLUGIN_HISTORY_MYSELF', 'Defini-lo-ei eu pr�prio'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_history/lang_sk.inc.php b/plugins/serendipity_plugin_history/lang_sk.inc.php index 285b09b6..5f7180cc 100644 --- a/plugins/serendipity_plugin_history/lang_sk.inc.php +++ b/plugins/serendipity_plugin_history/lang_sk.inc.php @@ -31,3 +31,4 @@ @define('PLUGIN_HISTORY_OYA', 'Pred rokom'); @define('PLUGIN_HISTORY_MYSELF', 'Nastav�m s�m'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', 'Zobrazi� meno autora'); + diff --git a/plugins/serendipity_plugin_history/lang_tn.inc.php b/plugins/serendipity_plugin_history/lang_tn.inc.php index 603cce98..13c33223 100644 --- a/plugins/serendipity_plugin_history/lang_tn.inc.php +++ b/plugins/serendipity_plugin_history/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,28 +12,28 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_HISTORY_NAME', '歷史'); - @define('PLUGIN_HISTORY_DESC', '顯示舊的文章。'); - @define('PLUGIN_HISTORY_MIN_AGE', '最舊的日期'); - @define('PLUGIN_HISTORY_MIN_AGE_DESC', '最舊的文章日期 (天)。'); - @define('PLUGIN_HISTORY_MAX_AGE', '最新的日期'); - @define('PLUGIN_HISTORY_MAX_AGE_DESC','最新的文章日期 (天)。'); - @define('PLUGIN_HISTORY_MAX_ENTRIES', '文章數量'); - @define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', '顯示的文章數量'); - @define('PLUGIN_HISTORY_SHOWFULL', '完整內容'); - @define('PLUGIN_HISTORY_SHOWFULL_DESC', '顯示文章的完整內容,或只顯示它的標題。'); - @define('PLUGIN_HISTORY_INTRO', '介紹'); - @define('PLUGIN_HISTORY_INTRO_DESC', '簡單的介紹像 \'一年前我說:\'。'); - @define('PLUGIN_HISTORY_OUTRO', '結尾'); - @define('PLUGIN_HISTORY_OUTRO_DESC', '簡單的結尾像 \'不錯對吧?\'。'); - @define('PLUGIN_HISTORY_DISPLAYDATE', '顯示日期'); - @define('PLUGIN_HISTORY_DISPLAYDATE_DESC', '顯示文章的日期?'); - @define('PLUGIN_HISTORY_MAXLENGTH', '標題長度'); - @define('PLUGIN_HISTORY_MAXLENGTH_DESC', '允許多少個標題的文字後切斷?(0 如果不切斷)'); - @define('PLUGIN_HISTORY_SPECIALAGE', '預定日期?'); - @define('PLUGIN_HISTORY_SPECIALAGE_DESC', '如果你不用預定的日期,要用自訂的日期,請選擇 \'自訂\' 然後提供下面的兩個設定。'); - @define('PLUGIN_HISTORY_SPECIALAGE_YEAR', '顯示滿一年的文章'); - @define('PLUGIN_HISTORY_CUSTOMAGE', '自己設定日期'); - @define('PLUGIN_HISTORY_OYA', '一年前'); - @define('PLUGIN_HISTORY_MYSELF', '自訂'); -?> \ No newline at end of file +@define('PLUGIN_HISTORY_NAME', '歷史'); +@define('PLUGIN_HISTORY_DESC', '顯示舊的文章。'); +@define('PLUGIN_HISTORY_MIN_AGE', '最舊的日期'); +@define('PLUGIN_HISTORY_MIN_AGE_DESC', '最舊的文章日期 (天)。'); +@define('PLUGIN_HISTORY_MAX_AGE', '最新的日期'); +@define('PLUGIN_HISTORY_MAX_AGE_DESC','最新的文章日期 (天)。'); +@define('PLUGIN_HISTORY_MAX_ENTRIES', '文章數量'); +@define('PLUGIN_HISTORY_MAX_ENTRIES_DESC', '顯示的文章數量'); +@define('PLUGIN_HISTORY_SHOWFULL', '完整內容'); +@define('PLUGIN_HISTORY_SHOWFULL_DESC', '顯示文章的完整內容,或只顯示它的標題。'); +@define('PLUGIN_HISTORY_INTRO', '介紹'); +@define('PLUGIN_HISTORY_INTRO_DESC', '簡單的介紹像 \'一年前我說:\'。'); +@define('PLUGIN_HISTORY_OUTRO', '結尾'); +@define('PLUGIN_HISTORY_OUTRO_DESC', '簡單的結尾像 \'不錯對吧?\'。'); +@define('PLUGIN_HISTORY_DISPLAYDATE', '顯示日期'); +@define('PLUGIN_HISTORY_DISPLAYDATE_DESC', '顯示文章的日期?'); +@define('PLUGIN_HISTORY_MAXLENGTH', '標題長度'); +@define('PLUGIN_HISTORY_MAXLENGTH_DESC', '允許多少個標題的文字後切斷?(0 如果不切斷)'); +@define('PLUGIN_HISTORY_SPECIALAGE', '預定日期?'); +@define('PLUGIN_HISTORY_SPECIALAGE_DESC', '如果你不用預定的日期,要用自訂的日期,請選擇 \'自訂\' 然後提供下面的兩個設定。'); +@define('PLUGIN_HISTORY_SPECIALAGE_YEAR', '顯示滿一年的文章'); +@define('PLUGIN_HISTORY_CUSTOMAGE', '自己設定日期'); +@define('PLUGIN_HISTORY_OYA', '一年前'); +@define('PLUGIN_HISTORY_MYSELF', '自訂'); + diff --git a/plugins/serendipity_plugin_history/lang_zh.inc.php b/plugins/serendipity_plugin_history/lang_zh.inc.php index fadd9c64..2b972627 100644 --- a/plugins/serendipity_plugin_history/lang_zh.inc.php +++ b/plugins/serendipity_plugin_history/lang_zh.inc.php @@ -25,3 +25,4 @@ @define('PLUGIN_HISTORY_OYA', '显示恰好发布已满一年的文章'); @define('PLUGIN_HISTORY_MYSELF', '自己设定日期时间段'); @define('PLUGIN_HISTORY_DISPLAYAUTHOR', '显示作者姓名'); + diff --git a/plugins/serendipity_plugin_history/serendipity_plugin_history.php b/plugins/serendipity_plugin_history/serendipity_plugin_history.php index 1d0b538b..2081a590 100644 --- a/plugins/serendipity_plugin_history/serendipity_plugin_history.php +++ b/plugins/serendipity_plugin_history/serendipity_plugin_history.php @@ -1,4 +1,8 @@ -<?php # $Id$ +<?php + +if (IN_serendipity !== true) { + die ("Don't hack!"); +} @serendipity_plugin_api::load_language(dirname(__FILE__)); @@ -16,9 +20,9 @@ class serendipity_plugin_history extends serendipity_plugin $propbag->add('description', PLUGIN_HISTORY_DESC); $propbag->add('stackable', true); $propbag->add('author', 'Jannis Hermanns'); - $propbag->add('version', '1.6'); + $propbag->add('version', '1.7'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -41,88 +45,102 @@ class serendipity_plugin_history extends serendipity_plugin function introspect_config_item($name, &$propbag) { switch($name) { + case 'title': $propbag->add('type', 'string'); $propbag->add('name', TITLE); $propbag->add('description', ''); $propbag->add('default', PLUGIN_HISTORY_NAME); - break; + break; + case 'intro': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_HISTORY_INTRO); $propbag->add('description', PLUGIN_HISTORY_INTRO_DESC); $propbag->add('default', ''); - break; + break; + case 'outro': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_HISTORY_OUTRO); $propbag->add('description', PLUGIN_HISTORY_OUTRO_DESC); $propbag->add('default', ''); - break; + break; + case 'maxlength': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_HISTORY_MAXLENGTH); $propbag->add('description', PLUGIN_HISTORY_MAXLENGTH_DESC); $propbag->add('default', 30); - break; + break; + case 'specialage': $propbag->add('type', 'select'); $propbag->add('name', PLUGIN_HISTORY_SPECIALAGE); $propbag->add('description', PLUGIN_HISTORY_SPECIALAGE_DESC); $propbag->add('default', 'year'); $propbag->add('select_values', array('year'=>PLUGIN_HISTORY_OYA,'custom'=>PLUGIN_HISTORY_MYSELF)); - break; + break; + case 'min_age': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_HISTORY_MIN_AGE); $propbag->add('description', PLUGIN_HISTORY_MIN_AGE_DESC); $propbag->add('default', 365); - break; + break; + case 'max_age': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_HISTORY_MAX_AGE); $propbag->add('description', PLUGIN_HISTORY_MAX_AGE_DESC); $propbag->add('default', 365); - break; + break; + case 'max_entries': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_HISTORY_MAX_ENTRIES); $propbag->add('description', PLUGIN_HISTORY_MAX_ENTRIES_DESC); $propbag->add('default', 5); - break; - case 'full': - $propbag->add('type', 'boolean'); - $propbag->add('name', PLUGIN_HISTORY_SHOWFULL); - $propbag->add('description', PLUGIN_HISTORY_SHOWFULL_DESC); - $propbag->add('default', false); - break; - case 'displaydate': - $propbag->add('type', 'boolean'); - $propbag->add('name', PLUGIN_HISTORY_DISPLAYDATE); - $propbag->add('description', PLUGIN_HISTORY_DISPLAYDATE_DESC); - $propbag->add('default', true); - break; - case 'displayauthor': - $propbag->add('type', 'boolean'); - $propbag->add('name', PLUGIN_HISTORY_DISPLAYAUTHOR); - $propbag->add('description', ''); - $propbag->add('default', false); - break; + break; + case 'dateformat': $propbag->add('type', 'string'); $propbag->add('name', GENERAL_PLUGIN_DATEFORMAT); $propbag->add('description', sprintf(GENERAL_PLUGIN_DATEFORMAT_BLAHBLAH, '%a, %d.%m.%Y %H:%M')); $propbag->add('default', '%a, %d.%m.%Y %H:%M'); - break; + break; + + case 'full': + $propbag->add('type', 'boolean'); + $propbag->add('name', PLUGIN_HISTORY_SHOWFULL); + $propbag->add('description', PLUGIN_HISTORY_SHOWFULL_DESC); + $propbag->add('default', 'false'); + break; + + case 'displaydate': + $propbag->add('type', 'boolean'); + $propbag->add('name', PLUGIN_HISTORY_DISPLAYDATE); + $propbag->add('description', PLUGIN_HISTORY_DISPLAYDATE_DESC); + $propbag->add('default', 'true'); + break; + + case 'displayauthor': + $propbag->add('type', 'boolean'); + $propbag->add('name', PLUGIN_HISTORY_DISPLAYAUTHOR); + $propbag->add('description', ''); + $propbag->add('default', 'false'); + break; + default: - return false; + return false; } return true; } function generate_content(&$title) { - global $serendipity; + global $serendipity; + $title = $this->get_config('title', $this->title); $intro = $this->get_config('intro'); $outro = $this->get_config('outro'); @@ -131,10 +149,10 @@ class serendipity_plugin_history extends serendipity_plugin $min_age = $this->get_config('min_age'); $max_age = $this->get_config('max_age'); $specialage = $this->get_config('specialage'); - $displaydate = $this->get_config('displaydate', 'true'); + $displaydate = serendipity_db_bool($this->get_config('displaydate', 'true')); $dateformat = $this->get_config('dateformat'); - $full = serendipity_db_bool($this->get_config('full')); - $displayauthor = serendipity_db_bool($this->get_config('displayauthor', false)); + $full = serendipity_db_bool($this->get_config('full', 'false')); + $displayauthor = serendipity_db_bool($this->get_config('displayauthor', 'false')); if (!is_numeric($min_age) || $min_age < 0 || $specialage == 'year') { $min_age = 365 + date('L', serendipity_serverOffsetHour()); @@ -179,22 +197,29 @@ class serendipity_plugin_history extends serendipity_plugin true, array('timestamp' => $e[$x]['timestamp']) ); - $date = ($displaydate=='0') ? '' : serendipity_strftime($dateformat,$e[$x]['timestamp']); + + $date = (!$displaydate) ? '' : serendipity_strftime($dateformat,$e[$x]['timestamp']); $author = ($displayauthor) ? $e[$x]['author'] . ': ' : ''; + echo '<div class="serendipity_history_info">'; - if ($displayauthor) - { echo '<span class="serendipity_history_author">' . $author . ' </span>'; } - if ($displaydate) - { echo '<span class="serendipity_history_date">' . $date . ' </span>'; } - $t = ($maxlength==0 || strlen($e[$x]['title'])<=$maxlength) ? - $e[$x]['title'] : - (trim(serendipity_mb('substr', $e[$x]['title'], 0, $maxlength-3)).' [...]'); + + if ($displayauthor) { + echo '<span class="serendipity_history_author">' . $author . ' </span>'; + } + if ($displaydate) { + echo '<span class="serendipity_history_date">' . $date . ' </span>'; + } + $t = ($maxlength==0 || strlen($e[$x]['title']) <= $maxlength) ? $e[$x]['title'] + : (trim(serendipity_mb('substr', $e[$x]['title'], 0, $maxlength-3)).' [...]'); echo '<a href="' . $url . '" title="' . str_replace("'", "`", serendipity_specialchars($e[$x]['title'])) . '">"' . serendipity_specialchars($t) . '"</a></div>'; - if ($full) - { echo '<div class="serendipity_history_body">' . strip_tags($e[$x]['body']) . '</div>'; } + if ($full) { + echo '<div class="serendipity_history_body">' . strip_tags($e[$x]['body']) . '</div>'; + } } echo (empty($outro)) ? '' : '<div class="serendipity_history_outro">' . $outro . '</div>'; } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_html_nugget/serendipity_plugin_html_nugget.php b/plugins/serendipity_plugin_html_nugget/serendipity_plugin_html_nugget.php index bf869ef2..af71596f 100644 --- a/plugins/serendipity_plugin_html_nugget/serendipity_plugin_html_nugget.php +++ b/plugins/serendipity_plugin_html_nugget/serendipity_plugin_html_nugget.php @@ -1,6 +1,11 @@ <?php -class serendipity_plugin_html_nugget extends serendipity_plugin { +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + +class serendipity_plugin_html_nugget extends serendipity_plugin +{ var $title = HTML_NUGGET; function introspect(&$propbag) @@ -17,7 +22,7 @@ class serendipity_plugin_html_nugget extends serendipity_plugin { $propbag->add('description', $desc); $propbag->add('stackable', true); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '1.0'); + $propbag->add('version', '1.1'); $propbag->add('configuration', array( 'title', 'backend_title', @@ -90,7 +95,7 @@ class serendipity_plugin_html_nugget extends serendipity_plugin { return false; } - if ($this->get_config('markup', 'true') == 'true') { + if (serendipity_db_bool($this->get_config('markup', 'true'))) { $entry = array('html_nugget' => $this->get_config('content')); serendipity_plugin_api::hook_event('frontend_display', $entry); echo $entry['html_nugget']; @@ -98,6 +103,7 @@ class serendipity_plugin_html_nugget extends serendipity_plugin { echo $this->get_config('content'); } } + } ?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_plug/serendipity_plugin_plug.php b/plugins/serendipity_plugin_plug/serendipity_plugin_plug.php index a4bb9e72..e8b5f021 100644 --- a/plugins/serendipity_plugin_plug/serendipity_plugin_plug.php +++ b/plugins/serendipity_plugin_plug/serendipity_plugin_plug.php @@ -1,6 +1,11 @@ <?php -class serendipity_plugin_plug extends serendipity_plugin { +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + +class serendipity_plugin_plug extends serendipity_plugin +{ var $title = POWERED_BY; function introspect(&$propbag) @@ -9,9 +14,10 @@ class serendipity_plugin_plug extends serendipity_plugin { $propbag->add('description', ADVERTISES_BLAHBLAH); $propbag->add('stackable', true); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '1.1'); + $propbag->add('version', '1.3'); $propbag->add('configuration', array( 'image', + 'image2', 'text')); $propbag->add('groups', array('FRONTEND_VIEWS')); } @@ -21,7 +27,14 @@ class serendipity_plugin_plug extends serendipity_plugin { switch($name) { case 'image': $propbag->add('type', 'boolean'); - $propbag->add('name', POWERED_BY_SHOW_IMAGE); + $propbag->add('name', POWERED_BY_SHOW_IMAGE . ' 1'); + $propbag->add('description', POWERED_BY_SHOW_IMAGE_DESC); + $propbag->add('default', 'false'); + break; + + case 'image2': + $propbag->add('type', 'boolean'); + $propbag->add('name', POWERED_BY_SHOW_IMAGE . ' 2'); $propbag->add('description', POWERED_BY_SHOW_IMAGE_DESC); $propbag->add('default', 'false'); break; @@ -32,12 +45,30 @@ class serendipity_plugin_plug extends serendipity_plugin { $propbag->add('description', POWERED_BY_SHOW_TEXT_DESC); $propbag->add('default', 'true'); break; + default: return false; } return true; } + function example() + { + global $serendipity; + + $s = ''; + $s .= "\n"; + $s = '<div class="configuration_group odd">'; + $s .= POWERED_BY_SHOW_IMAGE; + $s .= '1: <img src="' . serendipity_getTemplateFile('img/s9y_banner_small.png') . '" alt="Serendipity PHP Weblog" title="' . POWERED_BY . ' Serendipity" /> '; + $s .= "</div>\n"; + $s .= '<div class="configuration_group even">'; + $s .= POWERED_BY_SHOW_IMAGE; + $s .= '2: <img src="' . $serendipity['serendipityHTTPPath'] . $serendipity['templatePath'] . 's9y_banner_small.png" alt="Serendipity PHP Weblog" title="' . POWERED_BY . ' Serendipity" />'; + $s .= "<div>\n"; + return $s; + } + function generate_content(&$title) { global $serendipity; @@ -45,10 +76,13 @@ class serendipity_plugin_plug extends serendipity_plugin { $title = $this->title; ?> <div class="serendipityPlug"> -<?php if ( $this->get_config('image', 'true') == 'true' ) { ?> +<?php if (serendipity_db_bool($this->get_config('image', 'false'))) { ?> <a title="<?php echo $title ?> Serendipity" href="http://www.s9y.org/"><img src="<?php echo serendipity_getTemplateFile('img/s9y_banner_small.png') ?>" alt="Serendipity PHP Weblog" style="border: 0px" /></a> <?php } ?> -<?php if ( $this->get_config('text', 'false') == 'true' ) { ?> +<?php if (serendipity_db_bool($this->get_config('image2', 'false'))) { ?> + <a title="<?php echo $title ?> Serendipity" href="http://www.s9y.org/"><img src="<?php echo $serendipity['serendipityHTTPPath'] . $serendipity['templatePath'] . 's9y_banner_small.png'; ?>" alt="Serendipity PHP Weblog" style="border: 0px" /></a> +<?php } ?> +<?php if (serendipity_db_bool($this->get_config('text', 'true'))) { ?> <div> <a title="<?php echo $title ?> Serendipity" href="http://www.s9y.org/">Serendipity PHP Weblog</a> </div> @@ -56,6 +90,7 @@ class serendipity_plugin_plug extends serendipity_plugin { </div> <?php } + } ?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_quicksearch/serendipity_plugin_quicksearch.php b/plugins/serendipity_plugin_quicksearch/serendipity_plugin_quicksearch.php index 7a67dfe4..8cfb345d 100644 --- a/plugins/serendipity_plugin_quicksearch/serendipity_plugin_quicksearch.php +++ b/plugins/serendipity_plugin_quicksearch/serendipity_plugin_quicksearch.php @@ -1,6 +1,11 @@ <?php -class serendipity_plugin_quicksearch extends serendipity_plugin { +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + +class serendipity_plugin_quicksearch extends serendipity_plugin +{ var $title = QUICKSEARCH; function introspect(&$propbag) @@ -9,7 +14,7 @@ class serendipity_plugin_quicksearch extends serendipity_plugin { $propbag->add('description', SEARCH_FOR_ENTRY); $propbag->add('stackable', false); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '1.1'); + $propbag->add('version', '1.2'); $propbag->add('configuration', array('fullentry')); $propbag->add('groups', array('FRONTEND_ENTRY_RELATED')); } @@ -23,6 +28,7 @@ class serendipity_plugin_quicksearch extends serendipity_plugin { $propbag->add('description', ''); $propbag->add('default', true); break; + default: return false; } @@ -34,7 +40,7 @@ class serendipity_plugin_quicksearch extends serendipity_plugin { global $serendipity; $title = $this->title; - $fullentry = serendipity_db_bool($this->get_config('fullentry', true)); + $fullentry = serendipity_db_bool($this->get_config('fullentry', 'true')); ?> <form id="searchform" action="<?php echo $serendipity['serendipityHTTPPath'] . $serendipity['indexFile']; ?>" method="get"> <div> @@ -48,6 +54,7 @@ class serendipity_plugin_quicksearch extends serendipity_plugin { <?php serendipity_plugin_api::hook_event('quicksearch_plugin', $serendipity); } + } ?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_recententries/UTF-8/lang_bg.inc.php b/plugins/serendipity_plugin_recententries/UTF-8/lang_bg.inc.php index a0c05a57..fa6d2415 100644 --- a/plugins/serendipity_plugin_recententries/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_plugin_recententries/UTF-8/lang_bg.inc.php @@ -1,7 +1,7 @@ <?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ diff --git a/plugins/serendipity_plugin_recententries/UTF-8/lang_cs.inc.php b/plugins/serendipity_plugin_recententries/UTF-8/lang_cs.inc.php index 6e785873..91aba0d4 100644 --- a/plugins/serendipity_plugin_recententries/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_plugin_recententries/UTF-8/lang_cs.inc.php @@ -1,5 +1,4 @@ <?php -# $Id: lang_cs.inc.php 1716 2007-12-20 00:35:00 VladaAjgl $ /** * @version $Revision: 1716 $ diff --git a/plugins/serendipity_plugin_recententries/UTF-8/lang_cz.inc.php b/plugins/serendipity_plugin_recententries/UTF-8/lang_cz.inc.php index 86d37d9c..91aba0d4 100644 --- a/plugins/serendipity_plugin_recententries/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_plugin_recententries/UTF-8/lang_cz.inc.php @@ -1,5 +1,4 @@ <?php -# $Id: lang_cz.inc.php 1716 2007-12-20 00:35:00 VladaAjgl $ /** * @version $Revision: 1716 $ diff --git a/plugins/serendipity_plugin_recententries/UTF-8/lang_es.inc.php b/plugins/serendipity_plugin_recententries/UTF-8/lang_es.inc.php index c15e3586..56aad01b 100644 --- a/plugins/serendipity_plugin_recententries/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_plugin_recententries/UTF-8/lang_es.inc.php @@ -1,7 +1,7 @@ <?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ diff --git a/plugins/serendipity_plugin_recententries/UTF-8/lang_ja.inc.php b/plugins/serendipity_plugin_recententries/UTF-8/lang_ja.inc.php index 6c76981d..97b4a7da 100644 --- a/plugins/serendipity_plugin_recententries/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_plugin_recententries/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ <?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 688 */ diff --git a/plugins/serendipity_plugin_recententries/UTF-8/lang_pl.inc.php b/plugins/serendipity_plugin_recententries/UTF-8/lang_pl.inc.php index dc105809..5c0fc465 100644 --- a/plugins/serendipity_plugin_recententries/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_plugin_recententries/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ <?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ diff --git a/plugins/serendipity_plugin_recententries/UTF-8/lang_tn.inc.php b/plugins/serendipity_plugin_recententries/UTF-8/lang_tn.inc.php index 968ed200..1e94377c 100644 --- a/plugins/serendipity_plugin_recententries/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_plugin_recententries/UTF-8/lang_tn.inc.php @@ -2,7 +2,7 @@ ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # diff --git a/plugins/serendipity_plugin_recententries/UTF-8/lang_tr.inc.php b/plugins/serendipity_plugin_recententries/UTF-8/lang_tr.inc.php index 342619c7..af599dcd 100644 --- a/plugins/serendipity_plugin_recententries/UTF-8/lang_tr.inc.php +++ b/plugins/serendipity_plugin_recententries/UTF-8/lang_tr.inc.php @@ -1,7 +1,7 @@ <?php /** - * @version $Revision$ + * @version * @author Ahmet Usal <ahmetusal@gmail.com> * First public version: lang_tr.inc.php */ diff --git a/plugins/serendipity_plugin_recententries/lang_bg.inc.php b/plugins/serendipity_plugin_recententries/lang_bg.inc.php index df2569ba..798d2f87 100644 --- a/plugins/serendipity_plugin_recententries/lang_bg.inc.php +++ b/plugins/serendipity_plugin_recententries/lang_bg.inc.php @@ -1,7 +1,7 @@ <?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ diff --git a/plugins/serendipity_plugin_recententries/lang_cs.inc.php b/plugins/serendipity_plugin_recententries/lang_cs.inc.php index 7fd0568f..74f91586 100644 --- a/plugins/serendipity_plugin_recententries/lang_cs.inc.php +++ b/plugins/serendipity_plugin_recententries/lang_cs.inc.php @@ -1,5 +1,4 @@ <?php -# $Id: lang_cs.inc.php 1716 2007-12-20 00:35:00 VladaAjgl $ /** * @version $Revision: 1716 $ diff --git a/plugins/serendipity_plugin_recententries/lang_cz.inc.php b/plugins/serendipity_plugin_recententries/lang_cz.inc.php index a7b8595e..304017d2 100644 --- a/plugins/serendipity_plugin_recententries/lang_cz.inc.php +++ b/plugins/serendipity_plugin_recententries/lang_cz.inc.php @@ -1,5 +1,4 @@ <?php -# $Id: lang_cz.inc.php 1716 2007-12-20 00:35:00 VladaAjgl $ /** * @version $Revision: 1716 $ diff --git a/plugins/serendipity_plugin_recententries/lang_en.inc.php b/plugins/serendipity_plugin_recententries/lang_en.inc.php index afb26dcc..5e86803d 100644 --- a/plugins/serendipity_plugin_recententries/lang_en.inc.php +++ b/plugins/serendipity_plugin_recententries/lang_en.inc.php @@ -1,7 +1,7 @@ <?php /** - * @version $Revision$ + * @version * @author Translator Name <yourmail@example.com> * EN-Revision: Revision of lang_en.inc.php */ diff --git a/plugins/serendipity_plugin_recententries/lang_es.inc.php b/plugins/serendipity_plugin_recententries/lang_es.inc.php index 34288da3..2173ada2 100644 --- a/plugins/serendipity_plugin_recententries/lang_es.inc.php +++ b/plugins/serendipity_plugin_recententries/lang_es.inc.php @@ -1,7 +1,7 @@ <?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ diff --git a/plugins/serendipity_plugin_recententries/lang_fa.inc.php b/plugins/serendipity_plugin_recententries/lang_fa.inc.php index ed5ca343..c6d102b6 100644 --- a/plugins/serendipity_plugin_recententries/lang_fa.inc.php +++ b/plugins/serendipity_plugin_recententries/lang_fa.inc.php @@ -1,7 +1,7 @@ <?php /** - * @version $Revision$ + * @version * @author Omid Mottaghi <webmaster@oxygenws.com> * EN-Revision: Revision of lang_fa.inc.php */ diff --git a/plugins/serendipity_plugin_recententries/lang_ja.inc.php b/plugins/serendipity_plugin_recententries/lang_ja.inc.php index 6c76981d..97b4a7da 100644 --- a/plugins/serendipity_plugin_recententries/lang_ja.inc.php +++ b/plugins/serendipity_plugin_recententries/lang_ja.inc.php @@ -1,7 +1,7 @@ <?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 688 */ diff --git a/plugins/serendipity_plugin_recententries/lang_pl.inc.php b/plugins/serendipity_plugin_recententries/lang_pl.inc.php index 0bb00966..bdac0986 100644 --- a/plugins/serendipity_plugin_recententries/lang_pl.inc.php +++ b/plugins/serendipity_plugin_recententries/lang_pl.inc.php @@ -1,7 +1,7 @@ <?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ diff --git a/plugins/serendipity_plugin_recententries/lang_tn.inc.php b/plugins/serendipity_plugin_recententries/lang_tn.inc.php index 3babfceb..e1a2b3b8 100644 --- a/plugins/serendipity_plugin_recententries/lang_tn.inc.php +++ b/plugins/serendipity_plugin_recententries/lang_tn.inc.php @@ -2,7 +2,7 @@ ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # diff --git a/plugins/serendipity_plugin_recententries/lang_tr.inc.php b/plugins/serendipity_plugin_recententries/lang_tr.inc.php index 85abe649..dac29846 100644 --- a/plugins/serendipity_plugin_recententries/lang_tr.inc.php +++ b/plugins/serendipity_plugin_recententries/lang_tr.inc.php @@ -1,7 +1,7 @@ <?php /** - * @version $Revision$ + * @version * @author Ahmet Usal <ahmetusal@gmail.com> * First public version: lang_tr.inc.php */ diff --git a/plugins/serendipity_plugin_recententries/lang_zh.inc.php b/plugins/serendipity_plugin_recententries/lang_zh.inc.php index bd05c64a..2bb3ca4d 100644 --- a/plugins/serendipity_plugin_recententries/lang_zh.inc.php +++ b/plugins/serendipity_plugin_recententries/lang_zh.inc.php @@ -10,3 +10,4 @@ @define('PLUGIN_RECENTENTRIES_NUMBER_FROM_RADIO_RECENT', '略过头版文章'); @define('PLUGIN_RECENTENTRIES_RANDOMIZE', '随机显示文章'); @define('PLUGIN_RECENTENTRIES_RANDOMIZE_DESC', '如果启用此设置的话,将随机选择文章并显示出来'); + diff --git a/plugins/serendipity_plugin_recententries/serendipity_plugin_recententries.php b/plugins/serendipity_plugin_recententries/serendipity_plugin_recententries.php index 214217b9..eada5e92 100644 --- a/plugins/serendipity_plugin_recententries/serendipity_plugin_recententries.php +++ b/plugins/serendipity_plugin_recententries/serendipity_plugin_recententries.php @@ -3,21 +3,27 @@ // Contributed by Christian Machmeier <cm@redsplash.de> // Randomizing contributed by Christian Brabandt <cb@256bit.org> +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + @serendipity_plugin_api::load_language(dirname(__FILE__)); -class serendipity_plugin_recententries extends serendipity_plugin { +class serendipity_plugin_recententries extends serendipity_plugin +{ var $title = PLUGIN_RECENTENTRIES_TITLE; - function introspect(&$propbag) { + function introspect(&$propbag) + { $this->title = $this->get_config('title', $this->title); $propbag->add('name', PLUGIN_RECENTENTRIES_TITLE); $propbag->add('description', PLUGIN_RECENTENTRIES_BLAHBLAH); $propbag->add('stackable', true); $propbag->add('author', 'Christian Machmeier, Christian Brabandt, Judebert, Don Chambers'); - $propbag->add('version', '2.5'); + $propbag->add('version', '2.6'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -25,63 +31,66 @@ class serendipity_plugin_recententries extends serendipity_plugin { $propbag->add('groups', array('FRONTEND_VIEWS')); } - function introspect_config_item($name, &$propbag) { + function introspect_config_item($name, &$propbag) + { global $serendipity; + switch($name) { + case 'title': - $propbag->add('type', 'string'); - $propbag->add('name', TITLE); - $propbag->add('description', TITLE_FOR_NUGGET); - $propbag->add('default', PLUGIN_RECENTENTRIES_TITLE); + $propbag->add('type', 'string'); + $propbag->add('name', TITLE); + $propbag->add('description', TITLE_FOR_NUGGET); + $propbag->add('default', PLUGIN_RECENTENTRIES_TITLE); break; case 'number': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_RECENTENTRIES_NUMBER); - $propbag->add('description', PLUGIN_RECENTENTRIES_NUMBER_BLAHBLAH); - $propbag->add('default', 10); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_RECENTENTRIES_NUMBER); + $propbag->add('description', PLUGIN_RECENTENTRIES_NUMBER_BLAHBLAH); + $propbag->add('default', 10); break; case 'number_from': - $propbag->add('type', 'radio'); - $propbag->add('name', PLUGIN_RECENTENTRIES_NUMBER_FROM); - $propbag->add('description', PLUGIN_RECENTENTRIES_NUMBER_FROM_DESC); - $propbag->add('radio', array( + $propbag->add('type', 'radio'); + $propbag->add('name', PLUGIN_RECENTENTRIES_NUMBER_FROM); + $propbag->add('description', PLUGIN_RECENTENTRIES_NUMBER_FROM_DESC); + $propbag->add('radio', array( 'value' => array('all', 'skip'), 'desc' => array(PLUGIN_RECENTENTRIES_NUMBER_FROM_RADIO_ALL, PLUGIN_RECENTENTRIES_NUMBER_FROM_RADIO_RECENT) )); - $propbag->add('default', 'all'); - break; - + $propbag->add('default', 'all'); + break; + case 'randomize': - $propbag->add('type', 'radio'); - $propbag->add('name', PLUGIN_RECENTENTRIES_RANDOMIZE); - $propbag->add('description', PLUGIN_RECENTENTRIES_RANDOMIZE_DESC); - $propbag->add('radio', array( + $propbag->add('type', 'radio'); + $propbag->add('name', PLUGIN_RECENTENTRIES_RANDOMIZE); + $propbag->add('description', PLUGIN_RECENTENTRIES_RANDOMIZE_DESC); + $propbag->add('radio', array( 'value' => array('yes', 'no'), 'desc' => array(YES, NO) )); - $propbag->add('default', 'no'); - break; + $propbag->add('default', 'no'); + break; case 'dateformat': - $propbag->add('type', 'string'); - $propbag->add('name', GENERAL_PLUGIN_DATEFORMAT); - $propbag->add('description', sprintf(GENERAL_PLUGIN_DATEFORMAT_BLAHBLAH, '%A, %B %e %Y') . '. ' . PLUGIN_RECENTENTRIES_DATEFORMAT_WIN); - $propbag->add('default', '%A, %B %e %Y'); + $propbag->add('type', 'string'); + $propbag->add('name', GENERAL_PLUGIN_DATEFORMAT); + $propbag->add('description', sprintf(GENERAL_PLUGIN_DATEFORMAT_BLAHBLAH, '%A, %B %e %Y') . '. ' . PLUGIN_RECENTENTRIES_DATEFORMAT_WIN); + $propbag->add('default', '%A, %B %e %Y'); break; case 'category': $cats = serendipity_fetchCategories($serendipity['authorid']); if (!is_array($cats)) { - return false; + break; } $catlist = serendipity_generateCategoryList($cats, array(0), 4, 0, 0, '', ' . '); $tmp_select_cats = explode('@@@', $catlist); if (!is_array($tmp_select_cats)) { - return false; + break; } $select_cats = array(); @@ -94,30 +103,31 @@ class serendipity_plugin_recententries extends serendipity_plugin { } } - $propbag->add('type', 'multiselect'); - $propbag->add('select_values', $select_cats); - $propbag->add('select_size', 5); - $propbag->add('name', CATEGORY); - $propbag->add('description', CATEGORIES_TO_FETCH); - $propbag->add('default', 'none'); + $propbag->add('type', 'multiselect'); + $propbag->add('select_values', $select_cats); + $propbag->add('select_size', 5); + $propbag->add('name', CATEGORY); + $propbag->add('description', CATEGORIES_TO_FETCH); + $propbag->add('default', 'none'); break; case 'show_where': $select = array('extended' => PLUGIN_ITEM_DISPLAY_EXTENDED, 'overview' => PLUGIN_ITEM_DISPLAY_OVERVIEW, 'both' => PLUGIN_ITEM_DISPLAY_BOTH); - $propbag->add('type', 'select'); - $propbag->add('select_values', $select); - $propbag->add('name', PLUGIN_ITEM_DISPLAY); - $propbag->add('description', ''); - $propbag->add('default', 'both'); - break; - + $propbag->add('type', 'select'); + $propbag->add('select_values', $select); + $propbag->add('name', PLUGIN_ITEM_DISPLAY); + $propbag->add('description', ''); + $propbag->add('default', 'both'); + break; + default: return false; } return true; } - function generate_content(&$title) { + function generate_content(&$title) + { global $serendipity; $number = $this->get_config('number'); @@ -147,14 +157,14 @@ class serendipity_plugin_recententries extends serendipity_plugin { $sql_condition['and'] = ''; if ($category != 'none' && !empty($category)) { - + $sql_categories = array(); if (is_numeric($category)) { $sql_categories[] = $category; } else { $sql_categories = explode('^', $category); } - + $category_parts = array(); foreach($sql_categories AS $sql_category) { $category_parts[] = "\n" . implode(' AND ', serendipity_fetchCategoryRange($sql_category)); @@ -215,9 +225,9 @@ class serendipity_plugin_recententries extends serendipity_plugin { WHERE isdraft = 'false' {$sql_condition['and']} $sql_order $sql_number"; - + $entries = serendipity_db_query($entries_query); - + if (is_string($entries)) { echo $entries . "<br />\n"; echo $entries_query . "<br />\n"; @@ -249,6 +259,8 @@ class serendipity_plugin_recententries extends serendipity_plugin { echo '</dl>' . "\n\n"; } } + } /* vim: set sts=4 ts=4 smartindent autoindent : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_remoterss/UTF-8/lang_cs.inc.php b/plugins/serendipity_plugin_remoterss/UTF-8/lang_cs.inc.php index c61f3539..6cc8553c 100644 --- a/plugins/serendipity_plugin_remoterss/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_plugin_remoterss/UTF-8/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # lang_cs.inc.php 1427.2 2009-02-23 17:32:35 VladaAjgl $ +<?php /** * @version 1427.2 @@ -10,32 +10,32 @@ * @revisionDate 2009/02/23 */ -@define('PLUGIN_REMOTERSS_TITLE', 'Cizí RSS/OPML kanál'); -@define('PLUGIN_REMOTERSS_BLAHBLAH', 'Zobrazuje položky z cizího RSS/OPML kanálu (například Blogroll)'); -@define('PLUGIN_REMOTERSS_NUMBER', 'Počet příspěvků'); -@define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', 'Kolik příspěvků z RSS kanálu má být zobrazeno? (Přednastaveno: 0 = všechny příspěvky RSS kanálu)'); -@define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'Nadpis RSS kanálu'); -@define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', 'Nadpis bloku v postranním sloupci s cizím RSS kanálem'); -@define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML URI'); -@define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', 'URI adresa RSS/OPML kanálu, který chcete zobrazit'); -@define('PLUGIN_REMOTERSS_NOURI', 'Žádný RSS/OPML kanál nebyl vybrán'); -@define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML cíl odkazů'); -@define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', 'Cíl (target) odkazů z RSS kanálu. Tedy do jakého okna se mají odkazy otevírat. (Přednastaveno: _blank = nové okno)'); -@define('PLUGIN_REMOTERSS_CACHETIME', 'Jak často aktualizovat RSS kanál?'); -@define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', 'Obsah RSS kanálu je uchováván v cachi a je aktualizován pouze pokud je starší než X vteřin (Přednastaveno: 3 hodiny)'); -@define('PLUGIN_REMOTERSS_FEEDTYPE', 'Typ kanálu'); -@define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', 'Vyberte typ zobrazovaného kanálu'); -@define('PLUGIN_REMOTERSS_BULLETIMG', 'Odrážka'); -@define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', 'Obrázek, který se má zobrazit před každým nadpisem z RSS'); -@define('PLUGIN_REMOTERSS_DISPLAYDATE', 'Zobrazování data'); -@define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', 'Zobrazit pod nadpisem příspěvku datum?'); +@define('PLUGIN_REMOTERSS_TITLE', 'Cizí RSS/OPML kanál'); +@define('PLUGIN_REMOTERSS_BLAHBLAH', 'Zobrazuje položky z cizího RSS/OPML kanálu (například Blogroll)'); +@define('PLUGIN_REMOTERSS_NUMBER', 'Počet příspěvků'); +@define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', 'Kolik příspěvků z RSS kanálu má být zobrazeno? (Přednastaveno: 0 = všechny příspěvky RSS kanálu)'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'Nadpis RSS kanálu'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', 'Nadpis bloku v postranním sloupci s cizím RSS kanálem'); +@define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML URI'); +@define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', 'URI adresa RSS/OPML kanálu, který chcete zobrazit'); +@define('PLUGIN_REMOTERSS_NOURI', 'Žádný RSS/OPML kanál nebyl vybrán'); +@define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML cíl odkazů'); +@define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', 'Cíl (target) odkazů z RSS kanálu. Tedy do jakého okna se mají odkazy otevírat. (Přednastaveno: _blank = nové okno)'); +@define('PLUGIN_REMOTERSS_CACHETIME', 'Jak často aktualizovat RSS kanál?'); +@define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', 'Obsah RSS kanálu je uchováván v cachi a je aktualizován pouze pokud je starší než X vteřin (Přednastaveno: 3 hodiny)'); +@define('PLUGIN_REMOTERSS_FEEDTYPE', 'Typ kanálu'); +@define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', 'Vyberte typ zobrazovaného kanálu'); +@define('PLUGIN_REMOTERSS_BULLETIMG', 'Odrážka'); +@define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', 'Obrázek, který se má zobrazit před každým nadpisem z RSS'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE', 'Zobrazování data'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', 'Zobrazit pod nadpisem příspěvku datum?'); -@define('PLUGIN_REMOTERSS_RSSLINK', 'Používat RSS odkazy?'); -@define('PLUGIN_REMOTERSS_RSSLINK_DESC', 'Mají být odkazy z RSS kanálu zobrazeny jako skutečné odkazy?'); -@define('PLUGIN_REMOTERSS_RSSFIELD', 'Zobrazovaný element'); -@define('PLUGIN_REMOTERSS_RSSFIELD_DESC', 'Který element RSS kanálu se má zobrazovat? (např. "title" = nadpis, "content:encoded" = tělo příspěvku, "description" = popis, ...)'); -@define('PLUGIN_REMOTERSS_RSSESCAPE', 'Kódovat HTML výstup'); -@define('PLUGIN_REMOTERSS_RSSESCAPE_DESC', 'Pokud je povoleno, HTML značky z RSS kanálu jsou kódovány. Pokud je tato volby zamítnuta, všechny HTML značky jsou v RSS kanálu ponechány a příslušně se zobrazují. Tato možnost představuje bezpečnostní riziku, pokud zobrazovaný RSS kanál není Váš nebo pokud mu stoprocentně nedůvěřujete!'); +@define('PLUGIN_REMOTERSS_RSSLINK', 'Používat RSS odkazy?'); +@define('PLUGIN_REMOTERSS_RSSLINK_DESC', 'Mají být odkazy z RSS kanálu zobrazeny jako skutečné odkazy?'); +@define('PLUGIN_REMOTERSS_RSSFIELD', 'Zobrazovaný element'); +@define('PLUGIN_REMOTERSS_RSSFIELD_DESC', 'Který element RSS kanálu se má zobrazovat? (např. "title" = nadpis, "content:encoded" = tělo příspěvku, "description" = popis, ...)'); +@define('PLUGIN_REMOTERSS_RSSESCAPE', 'Kódovat HTML výstup'); +@define('PLUGIN_REMOTERSS_RSSESCAPE_DESC', 'Pokud je povoleno, HTML značky z RSS kanálu jsou kódovány. Pokud je tato volby zamítnuta, všechny HTML značky jsou v RSS kanálu ponechány a příslušně se zobrazují. Tato možnost představuje bezpečnostní riziku, pokud zobrazovaný RSS kanál není Váš nebo pokud mu stoprocentně nedůvěřujete!'); -@define('PLUGIN_REMOTERSS_TEMPLATE', 'Šablona pro tento kanál'); -@define('PLUGIN_REMOTERSS_TEMPLATE_DESC', 'Zde můžete vybrat soubor se šablonou, který se nachází v adresáří tohoto pluginu, který má být použit k zobrazení kanálu v postranním sloupci. Můžete přidat další šablony do adresáře pluginu. Pokud je stejně pojmenovaný soubor šablony umístěn v adresáři se šablonami, bude použit místo šablony v adresáři pluginu. Tím, že zde vyberete jakoukoliv šablonu jinou než přednastavenou/defaultní, bude automaticky povolen šablonovací systém Smarty.'); +@define('PLUGIN_REMOTERSS_TEMPLATE', 'Šablona pro tento kanál'); +@define('PLUGIN_REMOTERSS_TEMPLATE_DESC', 'Zde můžete vybrat soubor se šablonou, který se nachází v adresáří tohoto pluginu, který má být použit k zobrazení kanálu v postranním sloupci. Můžete přidat další šablony do adresáře pluginu. Pokud je stejně pojmenovaný soubor šablony umístěn v adresáři se šablonami, bude použit místo šablony v adresáři pluginu. Tím, že zde vyberete jakoukoliv šablonu jinou než přednastavenou/defaultní, bude automaticky povolen šablonovací systém Smarty.'); diff --git a/plugins/serendipity_plugin_remoterss/UTF-8/lang_cz.inc.php b/plugins/serendipity_plugin_remoterss/UTF-8/lang_cz.inc.php index d14c5d9c..6cc8553c 100644 --- a/plugins/serendipity_plugin_remoterss/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_plugin_remoterss/UTF-8/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # lang_cz.inc.php 1427.2 2009-02-23 17:32:35 VladaAjgl $ +<?php /** * @version 1427.2 @@ -10,32 +10,32 @@ * @revisionDate 2009/02/23 */ -@define('PLUGIN_REMOTERSS_TITLE', 'Cizí RSS/OPML kanál'); -@define('PLUGIN_REMOTERSS_BLAHBLAH', 'Zobrazuje položky z cizího RSS/OPML kanálu (například Blogroll)'); -@define('PLUGIN_REMOTERSS_NUMBER', 'Počet příspěvků'); -@define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', 'Kolik příspěvků z RSS kanálu má být zobrazeno? (Přednastaveno: 0 = všechny příspěvky RSS kanálu)'); -@define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'Nadpis RSS kanálu'); -@define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', 'Nadpis bloku v postranním sloupci s cizím RSS kanálem'); -@define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML URI'); -@define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', 'URI adresa RSS/OPML kanálu, který chcete zobrazit'); -@define('PLUGIN_REMOTERSS_NOURI', 'Žádný RSS/OPML kanál nebyl vybrán'); -@define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML cíl odkazů'); -@define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', 'Cíl (target) odkazů z RSS kanálu. Tedy do jakého okna se mají odkazy otevírat. (Přednastaveno: _blank = nové okno)'); -@define('PLUGIN_REMOTERSS_CACHETIME', 'Jak často aktualizovat RSS kanál?'); -@define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', 'Obsah RSS kanálu je uchováván v cachi a je aktualizován pouze pokud je starší než X vteřin (Přednastaveno: 3 hodiny)'); -@define('PLUGIN_REMOTERSS_FEEDTYPE', 'Typ kanálu'); -@define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', 'Vyberte typ zobrazovaného kanálu'); -@define('PLUGIN_REMOTERSS_BULLETIMG', 'Odrážka'); -@define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', 'Obrázek, který se má zobrazit před každým nadpisem z RSS'); -@define('PLUGIN_REMOTERSS_DISPLAYDATE', 'Zobrazování data'); -@define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', 'Zobrazit pod nadpisem příspěvku datum?'); +@define('PLUGIN_REMOTERSS_TITLE', 'Cizí RSS/OPML kanál'); +@define('PLUGIN_REMOTERSS_BLAHBLAH', 'Zobrazuje položky z cizího RSS/OPML kanálu (například Blogroll)'); +@define('PLUGIN_REMOTERSS_NUMBER', 'Počet příspěvků'); +@define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', 'Kolik příspěvků z RSS kanálu má být zobrazeno? (Přednastaveno: 0 = všechny příspěvky RSS kanálu)'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'Nadpis RSS kanálu'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', 'Nadpis bloku v postranním sloupci s cizím RSS kanálem'); +@define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML URI'); +@define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', 'URI adresa RSS/OPML kanálu, který chcete zobrazit'); +@define('PLUGIN_REMOTERSS_NOURI', 'Žádný RSS/OPML kanál nebyl vybrán'); +@define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML cíl odkazů'); +@define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', 'Cíl (target) odkazů z RSS kanálu. Tedy do jakého okna se mají odkazy otevírat. (Přednastaveno: _blank = nové okno)'); +@define('PLUGIN_REMOTERSS_CACHETIME', 'Jak často aktualizovat RSS kanál?'); +@define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', 'Obsah RSS kanálu je uchováván v cachi a je aktualizován pouze pokud je starší než X vteřin (Přednastaveno: 3 hodiny)'); +@define('PLUGIN_REMOTERSS_FEEDTYPE', 'Typ kanálu'); +@define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', 'Vyberte typ zobrazovaného kanálu'); +@define('PLUGIN_REMOTERSS_BULLETIMG', 'Odrážka'); +@define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', 'Obrázek, který se má zobrazit před každým nadpisem z RSS'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE', 'Zobrazování data'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', 'Zobrazit pod nadpisem příspěvku datum?'); -@define('PLUGIN_REMOTERSS_RSSLINK', 'Používat RSS odkazy?'); -@define('PLUGIN_REMOTERSS_RSSLINK_DESC', 'Mají být odkazy z RSS kanálu zobrazeny jako skutečné odkazy?'); -@define('PLUGIN_REMOTERSS_RSSFIELD', 'Zobrazovaný element'); -@define('PLUGIN_REMOTERSS_RSSFIELD_DESC', 'Který element RSS kanálu se má zobrazovat? (např. "title" = nadpis, "content:encoded" = tělo příspěvku, "description" = popis, ...)'); -@define('PLUGIN_REMOTERSS_RSSESCAPE', 'Kódovat HTML výstup'); -@define('PLUGIN_REMOTERSS_RSSESCAPE_DESC', 'Pokud je povoleno, HTML značky z RSS kanálu jsou kódovány. Pokud je tato volby zamítnuta, všechny HTML značky jsou v RSS kanálu ponechány a příslušně se zobrazují. Tato možnost představuje bezpečnostní riziku, pokud zobrazovaný RSS kanál není Váš nebo pokud mu stoprocentně nedůvěřujete!'); +@define('PLUGIN_REMOTERSS_RSSLINK', 'Používat RSS odkazy?'); +@define('PLUGIN_REMOTERSS_RSSLINK_DESC', 'Mají být odkazy z RSS kanálu zobrazeny jako skutečné odkazy?'); +@define('PLUGIN_REMOTERSS_RSSFIELD', 'Zobrazovaný element'); +@define('PLUGIN_REMOTERSS_RSSFIELD_DESC', 'Který element RSS kanálu se má zobrazovat? (např. "title" = nadpis, "content:encoded" = tělo příspěvku, "description" = popis, ...)'); +@define('PLUGIN_REMOTERSS_RSSESCAPE', 'Kódovat HTML výstup'); +@define('PLUGIN_REMOTERSS_RSSESCAPE_DESC', 'Pokud je povoleno, HTML značky z RSS kanálu jsou kódovány. Pokud je tato volby zamítnuta, všechny HTML značky jsou v RSS kanálu ponechány a příslušně se zobrazují. Tato možnost představuje bezpečnostní riziku, pokud zobrazovaný RSS kanál není Váš nebo pokud mu stoprocentně nedůvěřujete!'); -@define('PLUGIN_REMOTERSS_TEMPLATE', 'Šablona pro tento kanál'); -@define('PLUGIN_REMOTERSS_TEMPLATE_DESC', 'Zde můžete vybrat soubor se šablonou, který se nachází v adresáří tohoto pluginu, který má být použit k zobrazení kanálu v postranním sloupci. Můžete přidat další šablony do adresáře pluginu. Pokud je stejně pojmenovaný soubor šablony umístěn v adresáři se šablonami, bude použit místo šablony v adresáři pluginu. Tím, že zde vyberete jakoukoliv šablonu jinou než přednastavenou/defaultní, bude automaticky povolen šablonovací systém Smarty.'); +@define('PLUGIN_REMOTERSS_TEMPLATE', 'Šablona pro tento kanál'); +@define('PLUGIN_REMOTERSS_TEMPLATE_DESC', 'Zde můžete vybrat soubor se šablonou, který se nachází v adresáří tohoto pluginu, který má být použit k zobrazení kanálu v postranním sloupci. Můžete přidat další šablony do adresáře pluginu. Pokud je stejně pojmenovaný soubor šablony umístěn v adresáři se šablonami, bude použit místo šablony v adresáři pluginu. Tím, že zde vyberete jakoukoliv šablonu jinou než přednastavenou/defaultní, bude automaticky povolen šablonovací systém Smarty.'); diff --git a/plugins/serendipity_plugin_remoterss/UTF-8/lang_de.inc.php b/plugins/serendipity_plugin_remoterss/UTF-8/lang_de.inc.php index ee814c70..ce0d8ca6 100644 --- a/plugins/serendipity_plugin_remoterss/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_plugin_remoterss/UTF-8/lang_de.inc.php @@ -1,4 +1,4 @@ -<?php # lang_de.inc.php 1.0 2009-06-03 10:02:55 VladaAjgl $ +<?php /** * @version 1.0 @@ -34,4 +34,5 @@ // Next lines were translated on 2009/06/03 @define('PLUGIN_REMOTERSS_TEMPLATE', 'Ausgabe Template welches für diesen Feed verwendet wird'); -@define('PLUGIN_REMOTERSS_TEMPLATE_DESC', 'Hier kann eine Vorlage-Datei (Template) aus dem Plugin-Verzeichnis ausgewählt werden, um die Darstellung des Fees im Sidebar zu steuern. Sie können auch benutzerdefinierte Vorlage-Dateien im Plugin-Verzeichnis ablegen. Wenn eine Vorlage-Datei mit dem gleichen Namen in Ihrem eigenen Vorlageverzeichnis vorhanden ist, wird diese anstelle der Datei im Plugin-Verzeichnis verwendet. Wenn hier eine Vorlage abweichend zur Voreinstellung ausgewählt wird, wird automatisch Smarty aktiviert.'); \ No newline at end of file +@define('PLUGIN_REMOTERSS_TEMPLATE_DESC', 'Hier kann eine Vorlage-Datei (Template) aus dem Plugin-Verzeichnis ausgewählt werden, um die Darstellung des Fees im Sidebar zu steuern. Sie können auch benutzerdefinierte Vorlage-Dateien im Plugin-Verzeichnis ablegen. Wenn eine Vorlage-Datei mit dem gleichen Namen in Ihrem eigenen Vorlageverzeichnis vorhanden ist, wird diese anstelle der Datei im Plugin-Verzeichnis verwendet. Wenn hier eine Vorlage abweichend zur Voreinstellung ausgewählt wird, wird automatisch Smarty aktiviert.'); + diff --git a/plugins/serendipity_plugin_remoterss/UTF-8/lang_es.inc.php b/plugins/serendipity_plugin_remoterss/UTF-8/lang_es.inc.php index 7a5425bd..63d611bd 100644 --- a/plugins/serendipity_plugin_remoterss/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_plugin_remoterss/UTF-8/lang_es.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -26,4 +26,3 @@ @define('PLUGIN_REMOTERSS_DISPLAYDATE', '¿Mostrar fecha?'); @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '¿Mostrar la fecha luego del titular?'); -?> diff --git a/plugins/serendipity_plugin_remoterss/UTF-8/lang_fr.inc.php b/plugins/serendipity_plugin_remoterss/UTF-8/lang_fr.inc.php index 57e7191e..9b892e4c 100644 --- a/plugins/serendipity_plugin_remoterss/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_plugin_remoterss/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -33,5 +33,3 @@ @define('PLUGIN_REMOTERSS_DISPLAYDATE', 'Afficher la date'); @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', 'Afficher la date du billet sous son titre?'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_remoterss/UTF-8/lang_ja.inc.php b/plugins/serendipity_plugin_remoterss/UTF-8/lang_ja.inc.php index ce5e8683..24cc3942 100644 --- a/plugins/serendipity_plugin_remoterss/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_plugin_remoterss/UTF-8/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 692 */ @@ -26,4 +26,3 @@ @define('PLUGIN_REMOTERSS_DISPLAYDATE', '日付の表示'); @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', 'ヘッドラインの下に日付を表示しますか?'); -?> diff --git a/plugins/serendipity_plugin_remoterss/UTF-8/lang_ko.inc.php b/plugins/serendipity_plugin_remoterss/UTF-8/lang_ko.inc.php index c8151a79..1c9429ac 100644 --- a/plugins/serendipity_plugin_remoterss/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_plugin_remoterss/UTF-8/lang_ko.inc.php @@ -1,25 +1,24 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_REMOTERSS_TITLE', '원격 RSS/OPML-블로그롤 피드'); - @define('PLUGIN_REMOTERSS_BLAHBLAH', '원격 RSS/OPML 피드의 아이템을 보여줌 (블로그롤 등)'); - @define('PLUGIN_REMOTERSS_NUMBER', '글의 수'); - @define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', '몇 개의 글을 보여주겠습니까? (기본값: 피드에 있는 모든 글)'); - @define('PLUGIN_REMOTERSS_SIDEBARTITLE', '피드의 제목'); - @define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', '블로그 옆줄에 나타낼 피드의 제목'); - @define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML URI'); - @define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', '표시할 RSS/OPML 피드의 URI'); - @define('PLUGIN_REMOTERSS_NOURI', 'RSS/OPML 피드가 선택되지 않음'); - @define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML 링크 출력 대상'); - @define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', '표시된 RSS 아이템의 링크를 출력할 대상 (기본값: _blank)'); - @define('PLUGIN_REMOTERSS_CACHETIME', '피드 갱신 주기'); - @define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', '피드 내용은 캐시에 저장되었다가 X 초가 지나면 갱신이 됨 (기본값: 3시간)'); - @define('PLUGIN_REMOTERSS_FEEDTYPE', '피드 종류'); - @define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', '원격 피드의 형태를 선택'); - @define('PLUGIN_REMOTERSS_BULLETIMG', '글머리표 그림'); - @define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', '각 제목 앞에 표시될 그림 지정'); - @define('PLUGIN_REMOTERSS_DISPLAYDATE', '날짜 표시'); - @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '제목 밑에 날짜를 표시'); +@define('PLUGIN_REMOTERSS_TITLE', '원격 RSS/OPML-블로그롤 피드'); +@define('PLUGIN_REMOTERSS_BLAHBLAH', '원격 RSS/OPML 피드의 아이템을 보여줌 (블로그롤 등)'); +@define('PLUGIN_REMOTERSS_NUMBER', '글의 수'); +@define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', '몇 개의 글을 보여주겠습니까? (기본값: 피드에 있는 모든 글)'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE', '피드의 제목'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', '블로그 옆줄에 나타낼 피드의 제목'); +@define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML URI'); +@define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', '표시할 RSS/OPML 피드의 URI'); +@define('PLUGIN_REMOTERSS_NOURI', 'RSS/OPML 피드가 선택되지 않음'); +@define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML 링크 출력 대상'); +@define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', '표시된 RSS 아이템의 링크를 출력할 대상 (기본값: _blank)'); +@define('PLUGIN_REMOTERSS_CACHETIME', '피드 갱신 주기'); +@define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', '피드 내용은 캐시에 저장되었다가 X 초가 지나면 갱신이 됨 (기본값: 3시간)'); +@define('PLUGIN_REMOTERSS_FEEDTYPE', '피드 종류'); +@define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', '원격 피드의 형태를 선택'); +@define('PLUGIN_REMOTERSS_BULLETIMG', '글머리표 그림'); +@define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', '각 제목 앞에 표시될 그림 지정'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE', '날짜 표시'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '제목 밑에 날짜를 표시'); -?> diff --git a/plugins/serendipity_plugin_remoterss/UTF-8/lang_pl.inc.php b/plugins/serendipity_plugin_remoterss/UTF-8/lang_pl.inc.php index 1b09ce32..2648256a 100644 --- a/plugins/serendipity_plugin_remoterss/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_plugin_remoterss/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -33,4 +33,3 @@ @define('PLUGIN_REMOTERSS_RSSESCAPE', 'Wyłącz formatowanie HTML'); @define('PLUGIN_REMOTERSS_RSSESCAPE_DESC', 'Jeśli ta opcja zostanie włączona, kod HTML w feedzie zostanie usunięty. Jeśli ta opcja zostanie wyłączona, kod HTML w feedach będzie interpretowany. To może być potencjalne źródło problemów z bezpieczeństwem bloga jeśli feed nie pochodzi od Ciebie!'); -?> diff --git a/plugins/serendipity_plugin_remoterss/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_plugin_remoterss/UTF-8/lang_pt_PT.inc.php index 155bceae..e75a8f88 100644 --- a/plugins/serendipity_plugin_remoterss/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_remoterss/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $ +<?php ########################################################################## # serendipity - another blogger... # @@ -32,5 +32,3 @@ @define('PLUGIN_REMOTERSS_DISPLAYDATE', 'Mostrar a data'); @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', 'Mostrar a data da entrada sob o título?'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_remoterss/UTF-8/lang_tn.inc.php b/plugins/serendipity_plugin_remoterss/UTF-8/lang_tn.inc.php index e0ee3a2e..c21651e6 100644 --- a/plugins/serendipity_plugin_remoterss/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_plugin_remoterss/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,23 +12,23 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_REMOTERSS_TITLE', '遠端 RSS/OPML-Blogroll Feed'); - @define('PLUGIN_REMOTERSS_BLAHBLAH', '顯示遠端的 RSS/OPML feed (例如 Blogroll)'); - @define('PLUGIN_REMOTERSS_NUMBER', '文章數量'); - @define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', '要顯示多少篇文章?(預設:全部文章)'); - @define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'Feed 的標題'); - @define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', '側列顯示的 feed 標題'); - @define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML 網址'); - @define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', '顯示 RSS/OPML feed 的網址'); - @define('PLUGIN_REMOTERSS_NOURI', '沒有 RSS/OPML feed'); - @define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML 連結目標'); - @define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', '顯示 RSS 的目標屬性 (預設:_blank)'); - @define('PLUGIN_REMOTERSS_CACHETIME', '更新 feed 的時間?'); - @define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', 'feed 的內容會儲存在快取資料內,時間過後會自動更新 (預設:3 小時)'); - @define('PLUGIN_REMOTERSS_FEEDTYPE', 'feed 類型'); - @define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', '顯示遠端 feed 的形式'); - @define('PLUGIN_REMOTERSS_BULLETIMG', '子彈型圖示'); - @define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', '每個標題旁的圖示'); - @define('PLUGIN_REMOTERSS_DISPLAYDATE', '顯示日期'); - @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '在標題下顯示日期?'); -?> \ No newline at end of file +@define('PLUGIN_REMOTERSS_TITLE', '遠端 RSS/OPML-Blogroll Feed'); +@define('PLUGIN_REMOTERSS_BLAHBLAH', '顯示遠端的 RSS/OPML feed (例如 Blogroll)'); +@define('PLUGIN_REMOTERSS_NUMBER', '文章數量'); +@define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', '要顯示多少篇文章?(預設:全部文章)'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'Feed 的標題'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', '側列顯示的 feed 標題'); +@define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML 網址'); +@define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', '顯示 RSS/OPML feed 的網址'); +@define('PLUGIN_REMOTERSS_NOURI', '沒有 RSS/OPML feed'); +@define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML 連結目標'); +@define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', '顯示 RSS 的目標屬性 (預設:_blank)'); +@define('PLUGIN_REMOTERSS_CACHETIME', '更新 feed 的時間?'); +@define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', 'feed 的內容會儲存在快取資料內,時間過後會自動更新 (預設:3 小時)'); +@define('PLUGIN_REMOTERSS_FEEDTYPE', 'feed 類型'); +@define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', '顯示遠端 feed 的形式'); +@define('PLUGIN_REMOTERSS_BULLETIMG', '子彈型圖示'); +@define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', '每個標題旁的圖示'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE', '顯示日期'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '在標題下顯示日期?'); + diff --git a/plugins/serendipity_plugin_remoterss/lang_cs.inc.php b/plugins/serendipity_plugin_remoterss/lang_cs.inc.php index 4886a9fb..27ef52f7 100644 --- a/plugins/serendipity_plugin_remoterss/lang_cs.inc.php +++ b/plugins/serendipity_plugin_remoterss/lang_cs.inc.php @@ -1,4 +1,4 @@ -<?php # lang_cs.inc.php 1427.1 2009-02-14 16:13:06 VladaAjgl $ +<?php /** * @version 1427.1 @@ -8,32 +8,32 @@ * @revisionDate 2009/02/14 */ -@define('PLUGIN_REMOTERSS_TITLE', 'Ciz� RSS/OPML kan�l'); -@define('PLUGIN_REMOTERSS_BLAHBLAH', 'Zobrazuje polo�ky z ciz�ho RSS/OPML kan�lu (nap��klad Blogroll)'); -@define('PLUGIN_REMOTERSS_NUMBER', 'Po�et p��sp�vk�'); -@define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', 'Kolik p��sp�vk� z RSS kan�lu m� b�t zobrazeno? (P�ednastaveno: 0 = v�echny p��sp�vky RSS kan�lu)'); -@define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'Nadpis RSS kan�lu'); -@define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', 'Nadpis bloku v postrann�m sloupci s ciz�m RSS kan�lem'); -@define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML URI'); -@define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', 'URI adresa RSS/OPML kan�lu, kter� chcete zobrazit'); -@define('PLUGIN_REMOTERSS_NOURI', '��dn� RSS/OPML kan�l nebyl vybr�n'); -@define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML c�l odkaz�'); -@define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', 'C�l (target) odkaz� z RSS kan�lu. Tedy do jak�ho okna se maj� odkazy otev�rat. (P�ednastaveno: _blank = nov� okno)'); -@define('PLUGIN_REMOTERSS_CACHETIME', 'Jak �asto aktualizovat RSS kan�l?'); -@define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', 'Obsah RSS kan�lu je uchov�v�n v cachi a je aktualizov�n pouze pokud je star�� ne� X vte�in (P�ednastaveno: 3 hodiny)'); -@define('PLUGIN_REMOTERSS_FEEDTYPE', 'Typ kan�lu'); -@define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', 'Vyberte typ zobrazovan�ho kan�lu'); -@define('PLUGIN_REMOTERSS_BULLETIMG', 'Odr�ka'); -@define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', 'Obr�zek, kter� se m� zobrazit p�ed ka�d�m nadpisem z RSS'); -@define('PLUGIN_REMOTERSS_DISPLAYDATE', 'Zobrazov�n� data'); -@define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', 'Zobrazit pod nadpisem p��sp�vku datum?'); +@define('PLUGIN_REMOTERSS_TITLE', 'Ciz� RSS/OPML kan�l'); +@define('PLUGIN_REMOTERSS_BLAHBLAH', 'Zobrazuje polo�ky z ciz�ho RSS/OPML kan�lu (nap��klad Blogroll)'); +@define('PLUGIN_REMOTERSS_NUMBER', 'Po�et p��sp�vk�'); +@define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', 'Kolik p��sp�vk� z RSS kan�lu m� b�t zobrazeno? (P�ednastaveno: 0 = v�echny p��sp�vky RSS kan�lu)'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'Nadpis RSS kan�lu'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', 'Nadpis bloku v postrann�m sloupci s ciz�m RSS kan�lem'); +@define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML URI'); +@define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', 'URI adresa RSS/OPML kan�lu, kter� chcete zobrazit'); +@define('PLUGIN_REMOTERSS_NOURI', '��dn� RSS/OPML kan�l nebyl vybr�n'); +@define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML c�l odkaz�'); +@define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', 'C�l (target) odkaz� z RSS kan�lu. Tedy do jak�ho okna se maj� odkazy otev�rat. (P�ednastaveno: _blank = nov� okno)'); +@define('PLUGIN_REMOTERSS_CACHETIME', 'Jak �asto aktualizovat RSS kan�l?'); +@define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', 'Obsah RSS kan�lu je uchov�v�n v cachi a je aktualizov�n pouze pokud je star�� ne� X vte�in (P�ednastaveno: 3 hodiny)'); +@define('PLUGIN_REMOTERSS_FEEDTYPE', 'Typ kan�lu'); +@define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', 'Vyberte typ zobrazovan�ho kan�lu'); +@define('PLUGIN_REMOTERSS_BULLETIMG', 'Odr�ka'); +@define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', 'Obr�zek, kter� se m� zobrazit p�ed ka�d�m nadpisem z RSS'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE', 'Zobrazov�n� data'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', 'Zobrazit pod nadpisem p��sp�vku datum?'); -@define('PLUGIN_REMOTERSS_RSSLINK', 'Pou��vat RSS odkazy?'); -@define('PLUGIN_REMOTERSS_RSSLINK_DESC', 'Maj� b�t odkazy z RSS kan�lu zobrazeny jako skute�n� odkazy?'); -@define('PLUGIN_REMOTERSS_RSSFIELD', 'Zobrazovan� element'); -@define('PLUGIN_REMOTERSS_RSSFIELD_DESC', 'Kter� element RSS kan�lu se m� zobrazovat? (nap�. "title" = nadpis, "content:encoded" = t�lo p��sp�vku, "description" = popis, ...)'); -@define('PLUGIN_REMOTERSS_RSSESCAPE', 'K�dovat HTML v�stup'); -@define('PLUGIN_REMOTERSS_RSSESCAPE_DESC', 'Pokud je povoleno, HTML zna�ky z RSS kan�lu jsou k�dov�ny. Pokud je tato volby zam�tnuta, v�echny HTML zna�ky jsou v RSS kan�lu ponech�ny a p��slu�n� se zobrazuj�. Tato mo�nost p�edstavuje bezpe�nostn� riziku, pokud zobrazovan� RSS kan�l nen� V� nebo pokud mu stoprocentn� ned�v��ujete!'); +@define('PLUGIN_REMOTERSS_RSSLINK', 'Pou��vat RSS odkazy?'); +@define('PLUGIN_REMOTERSS_RSSLINK_DESC', 'Maj� b�t odkazy z RSS kan�lu zobrazeny jako skute�n� odkazy?'); +@define('PLUGIN_REMOTERSS_RSSFIELD', 'Zobrazovan� element'); +@define('PLUGIN_REMOTERSS_RSSFIELD_DESC', 'Kter� element RSS kan�lu se m� zobrazovat? (nap�. "title" = nadpis, "content:encoded" = t�lo p��sp�vku, "description" = popis, ...)'); +@define('PLUGIN_REMOTERSS_RSSESCAPE', 'K�dovat HTML v�stup'); +@define('PLUGIN_REMOTERSS_RSSESCAPE_DESC', 'Pokud je povoleno, HTML zna�ky z RSS kan�lu jsou k�dov�ny. Pokud je tato volby zam�tnuta, v�echny HTML zna�ky jsou v RSS kan�lu ponech�ny a p��slu�n� se zobrazuj�. Tato mo�nost p�edstavuje bezpe�nostn� riziku, pokud zobrazovan� RSS kan�l nen� V� nebo pokud mu stoprocentn� ned�v��ujete!'); -@define('PLUGIN_REMOTERSS_TEMPLATE', '�ablona pro tento kan�l'); -@define('PLUGIN_REMOTERSS_TEMPLATE_DESC', 'Zde m��ete vybrat soubor se �ablonou, kter� se nach�z� v adres��� tohoto pluginu, kter� m� b�t pou�it k zobrazen� kan�lu v postrann�m sloupci. M��ete p�idat dal�� �ablony do adres��e pluginu. Pokud je stejn� pojmenovan� soubor �ablony um�st�n v adres��i se �ablonami, bude pou�it m�sto �ablony v adres��i pluginu. T�m, �e zde vyberete jakoukoliv �ablonu jinou ne� p�ednastavenou/defaultn�, bude automaticky povolen �ablonovac� syst�m Smarty.'); +@define('PLUGIN_REMOTERSS_TEMPLATE', '�ablona pro tento kan�l'); +@define('PLUGIN_REMOTERSS_TEMPLATE_DESC', 'Zde m��ete vybrat soubor se �ablonou, kter� se nach�z� v adres��� tohoto pluginu, kter� m� b�t pou�it k zobrazen� kan�lu v postrann�m sloupci. M��ete p�idat dal�� �ablony do adres��e pluginu. Pokud je stejn� pojmenovan� soubor �ablony um�st�n v adres��i se �ablonami, bude pou�it m�sto �ablony v adres��i pluginu. T�m, �e zde vyberete jakoukoliv �ablonu jinou ne� p�ednastavenou/defaultn�, bude automaticky povolen �ablonovac� syst�m Smarty.'); diff --git a/plugins/serendipity_plugin_remoterss/lang_cz.inc.php b/plugins/serendipity_plugin_remoterss/lang_cz.inc.php index 2f6435b0..8cb118e1 100644 --- a/plugins/serendipity_plugin_remoterss/lang_cz.inc.php +++ b/plugins/serendipity_plugin_remoterss/lang_cz.inc.php @@ -1,4 +1,4 @@ -<?php # lang_cz.inc.php 1427.1 2009-02-14 16:13:06 VladaAjgl $ +<?php /** * @version 1427.1 @@ -8,32 +8,32 @@ * @revisionDate 2009/02/14 */ -@define('PLUGIN_REMOTERSS_TITLE', 'Ciz� RSS/OPML kan�l'); -@define('PLUGIN_REMOTERSS_BLAHBLAH', 'Zobrazuje polo�ky z ciz�ho RSS/OPML kan�lu (nap��klad Blogroll)'); -@define('PLUGIN_REMOTERSS_NUMBER', 'Po�et p��sp�vk�'); -@define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', 'Kolik p��sp�vk� z RSS kan�lu m� b�t zobrazeno? (P�ednastaveno: 0 = v�echny p��sp�vky RSS kan�lu)'); -@define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'Nadpis RSS kan�lu'); -@define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', 'Nadpis bloku v postrann�m sloupci s ciz�m RSS kan�lem'); -@define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML URI'); -@define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', 'URI adresa RSS/OPML kan�lu, kter� chcete zobrazit'); -@define('PLUGIN_REMOTERSS_NOURI', '��dn� RSS/OPML kan�l nebyl vybr�n'); -@define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML c�l odkaz�'); -@define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', 'C�l (target) odkaz� z RSS kan�lu. Tedy do jak�ho okna se maj� odkazy otev�rat. (P�ednastaveno: _blank = nov� okno)'); -@define('PLUGIN_REMOTERSS_CACHETIME', 'Jak �asto aktualizovat RSS kan�l?'); -@define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', 'Obsah RSS kan�lu je uchov�v�n v cachi a je aktualizov�n pouze pokud je star�� ne� X vte�in (P�ednastaveno: 3 hodiny)'); -@define('PLUGIN_REMOTERSS_FEEDTYPE', 'Typ kan�lu'); -@define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', 'Vyberte typ zobrazovan�ho kan�lu'); -@define('PLUGIN_REMOTERSS_BULLETIMG', 'Odr�ka'); -@define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', 'Obr�zek, kter� se m� zobrazit p�ed ka�d�m nadpisem z RSS'); -@define('PLUGIN_REMOTERSS_DISPLAYDATE', 'Zobrazov�n� data'); -@define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', 'Zobrazit pod nadpisem p��sp�vku datum?'); +@define('PLUGIN_REMOTERSS_TITLE', 'Ciz� RSS/OPML kan�l'); +@define('PLUGIN_REMOTERSS_BLAHBLAH', 'Zobrazuje polo�ky z ciz�ho RSS/OPML kan�lu (nap��klad Blogroll)'); +@define('PLUGIN_REMOTERSS_NUMBER', 'Po�et p��sp�vk�'); +@define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', 'Kolik p��sp�vk� z RSS kan�lu m� b�t zobrazeno? (P�ednastaveno: 0 = v�echny p��sp�vky RSS kan�lu)'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'Nadpis RSS kan�lu'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', 'Nadpis bloku v postrann�m sloupci s ciz�m RSS kan�lem'); +@define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML URI'); +@define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', 'URI adresa RSS/OPML kan�lu, kter� chcete zobrazit'); +@define('PLUGIN_REMOTERSS_NOURI', '��dn� RSS/OPML kan�l nebyl vybr�n'); +@define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML c�l odkaz�'); +@define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', 'C�l (target) odkaz� z RSS kan�lu. Tedy do jak�ho okna se maj� odkazy otev�rat. (P�ednastaveno: _blank = nov� okno)'); +@define('PLUGIN_REMOTERSS_CACHETIME', 'Jak �asto aktualizovat RSS kan�l?'); +@define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', 'Obsah RSS kan�lu je uchov�v�n v cachi a je aktualizov�n pouze pokud je star�� ne� X vte�in (P�ednastaveno: 3 hodiny)'); +@define('PLUGIN_REMOTERSS_FEEDTYPE', 'Typ kan�lu'); +@define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', 'Vyberte typ zobrazovan�ho kan�lu'); +@define('PLUGIN_REMOTERSS_BULLETIMG', 'Odr�ka'); +@define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', 'Obr�zek, kter� se m� zobrazit p�ed ka�d�m nadpisem z RSS'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE', 'Zobrazov�n� data'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', 'Zobrazit pod nadpisem p��sp�vku datum?'); -@define('PLUGIN_REMOTERSS_RSSLINK', 'Pou��vat RSS odkazy?'); -@define('PLUGIN_REMOTERSS_RSSLINK_DESC', 'Maj� b�t odkazy z RSS kan�lu zobrazeny jako skute�n� odkazy?'); -@define('PLUGIN_REMOTERSS_RSSFIELD', 'Zobrazovan� element'); -@define('PLUGIN_REMOTERSS_RSSFIELD_DESC', 'Kter� element RSS kan�lu se m� zobrazovat? (nap�. "title" = nadpis, "content:encoded" = t�lo p��sp�vku, "description" = popis, ...)'); -@define('PLUGIN_REMOTERSS_RSSESCAPE', 'K�dovat HTML v�stup'); -@define('PLUGIN_REMOTERSS_RSSESCAPE_DESC', 'Pokud je povoleno, HTML zna�ky z RSS kan�lu jsou k�dov�ny. Pokud je tato volby zam�tnuta, v�echny HTML zna�ky jsou v RSS kan�lu ponech�ny a p��slu�n� se zobrazuj�. Tato mo�nost p�edstavuje bezpe�nostn� riziku, pokud zobrazovan� RSS kan�l nen� V� nebo pokud mu stoprocentn� ned�v��ujete!'); +@define('PLUGIN_REMOTERSS_RSSLINK', 'Pou��vat RSS odkazy?'); +@define('PLUGIN_REMOTERSS_RSSLINK_DESC', 'Maj� b�t odkazy z RSS kan�lu zobrazeny jako skute�n� odkazy?'); +@define('PLUGIN_REMOTERSS_RSSFIELD', 'Zobrazovan� element'); +@define('PLUGIN_REMOTERSS_RSSFIELD_DESC', 'Kter� element RSS kan�lu se m� zobrazovat? (nap�. "title" = nadpis, "content:encoded" = t�lo p��sp�vku, "description" = popis, ...)'); +@define('PLUGIN_REMOTERSS_RSSESCAPE', 'K�dovat HTML v�stup'); +@define('PLUGIN_REMOTERSS_RSSESCAPE_DESC', 'Pokud je povoleno, HTML zna�ky z RSS kan�lu jsou k�dov�ny. Pokud je tato volby zam�tnuta, v�echny HTML zna�ky jsou v RSS kan�lu ponech�ny a p��slu�n� se zobrazuj�. Tato mo�nost p�edstavuje bezpe�nostn� riziku, pokud zobrazovan� RSS kan�l nen� V� nebo pokud mu stoprocentn� ned�v��ujete!'); -@define('PLUGIN_REMOTERSS_TEMPLATE', '�ablona pro tento kan�l'); -@define('PLUGIN_REMOTERSS_TEMPLATE_DESC', 'Zde m��ete vybrat soubor se �ablonou, kter� se nach�z� v adres��� tohoto pluginu, kter� m� b�t pou�it k zobrazen� kan�lu v postrann�m sloupci. M��ete p�idat dal�� �ablony do adres��e pluginu. Pokud je stejn� pojmenovan� soubor �ablony um�st�n v adres��i se �ablonami, bude pou�it m�sto �ablony v adres��i pluginu. T�m, �e zde vyberete jakoukoliv �ablonu jinou ne� p�ednastavenou/defaultn�, bude automaticky povolen �ablonovac� syst�m Smarty.'); +@define('PLUGIN_REMOTERSS_TEMPLATE', '�ablona pro tento kan�l'); +@define('PLUGIN_REMOTERSS_TEMPLATE_DESC', 'Zde m��ete vybrat soubor se �ablonou, kter� se nach�z� v adres��� tohoto pluginu, kter� m� b�t pou�it k zobrazen� kan�lu v postrann�m sloupci. M��ete p�idat dal�� �ablony do adres��e pluginu. Pokud je stejn� pojmenovan� soubor �ablony um�st�n v adres��i se �ablonami, bude pou�it m�sto �ablony v adres��i pluginu. T�m, �e zde vyberete jakoukoliv �ablonu jinou ne� p�ednastavenou/defaultn�, bude automaticky povolen �ablonovac� syst�m Smarty.'); diff --git a/plugins/serendipity_plugin_remoterss/lang_de.inc.php b/plugins/serendipity_plugin_remoterss/lang_de.inc.php index ea8ea199..16d5b99a 100644 --- a/plugins/serendipity_plugin_remoterss/lang_de.inc.php +++ b/plugins/serendipity_plugin_remoterss/lang_de.inc.php @@ -1,4 +1,4 @@ -<?php # lang_de.inc.php 1.0 2009-06-03 10:02:55 VladaAjgl $ +<?php /** * @version 1.0 @@ -34,4 +34,5 @@ // Next lines were translated on 2009/06/03 @define('PLUGIN_REMOTERSS_TEMPLATE', 'Ausgabe Template welches f�r diesen Feed verwendet wird'); -@define('PLUGIN_REMOTERSS_TEMPLATE_DESC', 'Hier kann eine Vorlage-Datei (Template) aus dem Plugin-Verzeichnis ausgew�hlt werden, um die Darstellung des Fees im Sidebar zu steuern. Sie k�nnen auch benutzerdefinierte Vorlage-Dateien im Plugin-Verzeichnis ablegen. Wenn eine Vorlage-Datei mit dem gleichen Namen in Ihrem eigenen Vorlageverzeichnis vorhanden ist, wird diese anstelle der Datei im Plugin-Verzeichnis verwendet. Wenn hier eine Vorlage abweichend zur Voreinstellung ausgew�hlt wird, wird automatisch Smarty aktiviert.'); \ No newline at end of file +@define('PLUGIN_REMOTERSS_TEMPLATE_DESC', 'Hier kann eine Vorlage-Datei (Template) aus dem Plugin-Verzeichnis ausgew�hlt werden, um die Darstellung des Fees im Sidebar zu steuern. Sie k�nnen auch benutzerdefinierte Vorlage-Dateien im Plugin-Verzeichnis ablegen. Wenn eine Vorlage-Datei mit dem gleichen Namen in Ihrem eigenen Vorlageverzeichnis vorhanden ist, wird diese anstelle der Datei im Plugin-Verzeichnis verwendet. Wenn hier eine Vorlage abweichend zur Voreinstellung ausgew�hlt wird, wird automatisch Smarty aktiviert.'); + diff --git a/plugins/serendipity_plugin_remoterss/lang_en.inc.php b/plugins/serendipity_plugin_remoterss/lang_en.inc.php index df35369a..732e94fe 100644 --- a/plugins/serendipity_plugin_remoterss/lang_en.inc.php +++ b/plugins/serendipity_plugin_remoterss/lang_en.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Translator Name <yourmail@example.com> * EN-Revision: Revision of lang_en.inc.php */ diff --git a/plugins/serendipity_plugin_remoterss/lang_es.inc.php b/plugins/serendipity_plugin_remoterss/lang_es.inc.php index 08ac3f3a..2af9dc3c 100644 --- a/plugins/serendipity_plugin_remoterss/lang_es.inc.php +++ b/plugins/serendipity_plugin_remoterss/lang_es.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ @@ -26,4 +26,3 @@ @define('PLUGIN_REMOTERSS_DISPLAYDATE', '�Mostrar fecha?'); @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '�Mostrar la fecha luego del titular?'); -?> diff --git a/plugins/serendipity_plugin_remoterss/lang_fr.inc.php b/plugins/serendipity_plugin_remoterss/lang_fr.inc.php index e84f7db1..f30e6a90 100644 --- a/plugins/serendipity_plugin_remoterss/lang_fr.inc.php +++ b/plugins/serendipity_plugin_remoterss/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -33,5 +33,3 @@ @define('PLUGIN_REMOTERSS_DISPLAYDATE', 'Afficher la date'); @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', 'Afficher la date du billet sous son titre?'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_remoterss/lang_ja.inc.php b/plugins/serendipity_plugin_remoterss/lang_ja.inc.php index ce5e8683..24cc3942 100644 --- a/plugins/serendipity_plugin_remoterss/lang_ja.inc.php +++ b/plugins/serendipity_plugin_remoterss/lang_ja.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 692 */ @@ -26,4 +26,3 @@ @define('PLUGIN_REMOTERSS_DISPLAYDATE', '日付の表示'); @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', 'ヘッドラインの下に日付を表示しますか?'); -?> diff --git a/plugins/serendipity_plugin_remoterss/lang_ko.inc.php b/plugins/serendipity_plugin_remoterss/lang_ko.inc.php index c8151a79..1c9429ac 100644 --- a/plugins/serendipity_plugin_remoterss/lang_ko.inc.php +++ b/plugins/serendipity_plugin_remoterss/lang_ko.inc.php @@ -1,25 +1,24 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_REMOTERSS_TITLE', '원격 RSS/OPML-블로그롤 피드'); - @define('PLUGIN_REMOTERSS_BLAHBLAH', '원격 RSS/OPML 피드의 아이템을 보여줌 (블로그롤 등)'); - @define('PLUGIN_REMOTERSS_NUMBER', '글의 수'); - @define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', '몇 개의 글을 보여주겠습니까? (기본값: 피드에 있는 모든 글)'); - @define('PLUGIN_REMOTERSS_SIDEBARTITLE', '피드의 제목'); - @define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', '블로그 옆줄에 나타낼 피드의 제목'); - @define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML URI'); - @define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', '표시할 RSS/OPML 피드의 URI'); - @define('PLUGIN_REMOTERSS_NOURI', 'RSS/OPML 피드가 선택되지 않음'); - @define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML 링크 출력 대상'); - @define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', '표시된 RSS 아이템의 링크를 출력할 대상 (기본값: _blank)'); - @define('PLUGIN_REMOTERSS_CACHETIME', '피드 갱신 주기'); - @define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', '피드 내용은 캐시에 저장되었다가 X 초가 지나면 갱신이 됨 (기본값: 3시간)'); - @define('PLUGIN_REMOTERSS_FEEDTYPE', '피드 종류'); - @define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', '원격 피드의 형태를 선택'); - @define('PLUGIN_REMOTERSS_BULLETIMG', '글머리표 그림'); - @define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', '각 제목 앞에 표시될 그림 지정'); - @define('PLUGIN_REMOTERSS_DISPLAYDATE', '날짜 표시'); - @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '제목 밑에 날짜를 표시'); +@define('PLUGIN_REMOTERSS_TITLE', '원격 RSS/OPML-블로그롤 피드'); +@define('PLUGIN_REMOTERSS_BLAHBLAH', '원격 RSS/OPML 피드의 아이템을 보여줌 (블로그롤 등)'); +@define('PLUGIN_REMOTERSS_NUMBER', '글의 수'); +@define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', '몇 개의 글을 보여주겠습니까? (기본값: 피드에 있는 모든 글)'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE', '피드의 제목'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', '블로그 옆줄에 나타낼 피드의 제목'); +@define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML URI'); +@define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', '표시할 RSS/OPML 피드의 URI'); +@define('PLUGIN_REMOTERSS_NOURI', 'RSS/OPML 피드가 선택되지 않음'); +@define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML 링크 출력 대상'); +@define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', '표시된 RSS 아이템의 링크를 출력할 대상 (기본값: _blank)'); +@define('PLUGIN_REMOTERSS_CACHETIME', '피드 갱신 주기'); +@define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', '피드 내용은 캐시에 저장되었다가 X 초가 지나면 갱신이 됨 (기본값: 3시간)'); +@define('PLUGIN_REMOTERSS_FEEDTYPE', '피드 종류'); +@define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', '원격 피드의 형태를 선택'); +@define('PLUGIN_REMOTERSS_BULLETIMG', '글머리표 그림'); +@define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', '각 제목 앞에 표시될 그림 지정'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE', '날짜 표시'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '제목 밑에 날짜를 표시'); -?> diff --git a/plugins/serendipity_plugin_remoterss/lang_pl.inc.php b/plugins/serendipity_plugin_remoterss/lang_pl.inc.php index f5903e82..3b321611 100644 --- a/plugins/serendipity_plugin_remoterss/lang_pl.inc.php +++ b/plugins/serendipity_plugin_remoterss/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -33,4 +33,3 @@ @define('PLUGIN_REMOTERSS_RSSESCAPE', 'Wy��cz formatowanie HTML'); @define('PLUGIN_REMOTERSS_RSSESCAPE_DESC', 'Je�li ta opcja zostanie w��czona, kod HTML w feedzie zostanie usuni�ty. Je�li ta opcja zostanie wy��czona, kod HTML w feedach b�dzie interpretowany. To mo�e by� potencjalne �r�d�o problem�w z bezpiecze�stwem bloga je�li feed nie pochodzi od Ciebie!'); -?> diff --git a/plugins/serendipity_plugin_remoterss/lang_pt_PT.inc.php b/plugins/serendipity_plugin_remoterss/lang_pt_PT.inc.php index 176b88b1..1cb19f2c 100644 --- a/plugins/serendipity_plugin_remoterss/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_remoterss/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $ +<?php ########################################################################## # serendipity - another blogger... # @@ -32,5 +32,3 @@ @define('PLUGIN_REMOTERSS_DISPLAYDATE', 'Mostrar a data'); @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', 'Mostrar a data da entrada sob o t�tulo?'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_remoterss/lang_tn.inc.php b/plugins/serendipity_plugin_remoterss/lang_tn.inc.php index e0ee3a2e..c21651e6 100644 --- a/plugins/serendipity_plugin_remoterss/lang_tn.inc.php +++ b/plugins/serendipity_plugin_remoterss/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,23 +12,23 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_REMOTERSS_TITLE', '遠端 RSS/OPML-Blogroll Feed'); - @define('PLUGIN_REMOTERSS_BLAHBLAH', '顯示遠端的 RSS/OPML feed (例如 Blogroll)'); - @define('PLUGIN_REMOTERSS_NUMBER', '文章數量'); - @define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', '要顯示多少篇文章?(預設:全部文章)'); - @define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'Feed 的標題'); - @define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', '側列顯示的 feed 標題'); - @define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML 網址'); - @define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', '顯示 RSS/OPML feed 的網址'); - @define('PLUGIN_REMOTERSS_NOURI', '沒有 RSS/OPML feed'); - @define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML 連結目標'); - @define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', '顯示 RSS 的目標屬性 (預設:_blank)'); - @define('PLUGIN_REMOTERSS_CACHETIME', '更新 feed 的時間?'); - @define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', 'feed 的內容會儲存在快取資料內,時間過後會自動更新 (預設:3 小時)'); - @define('PLUGIN_REMOTERSS_FEEDTYPE', 'feed 類型'); - @define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', '顯示遠端 feed 的形式'); - @define('PLUGIN_REMOTERSS_BULLETIMG', '子彈型圖示'); - @define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', '每個標題旁的圖示'); - @define('PLUGIN_REMOTERSS_DISPLAYDATE', '顯示日期'); - @define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '在標題下顯示日期?'); -?> \ No newline at end of file +@define('PLUGIN_REMOTERSS_TITLE', '遠端 RSS/OPML-Blogroll Feed'); +@define('PLUGIN_REMOTERSS_BLAHBLAH', '顯示遠端的 RSS/OPML feed (例如 Blogroll)'); +@define('PLUGIN_REMOTERSS_NUMBER', '文章數量'); +@define('PLUGIN_REMOTERSS_NUMBER_BLAHBLAH', '要顯示多少篇文章?(預設:全部文章)'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE', 'Feed 的標題'); +@define('PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH', '側列顯示的 feed 標題'); +@define('PLUGIN_REMOTERSS_RSSURI', 'RSS/OPML 網址'); +@define('PLUGIN_REMOTERSS_RSSURI_BLAHBLAH', '顯示 RSS/OPML feed 的網址'); +@define('PLUGIN_REMOTERSS_NOURI', '沒有 RSS/OPML feed'); +@define('PLUGIN_REMOTERSS_RSSTARGET', 'RSS/OPML 連結目標'); +@define('PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH', '顯示 RSS 的目標屬性 (預設:_blank)'); +@define('PLUGIN_REMOTERSS_CACHETIME', '更新 feed 的時間?'); +@define('PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH', 'feed 的內容會儲存在快取資料內,時間過後會自動更新 (預設:3 小時)'); +@define('PLUGIN_REMOTERSS_FEEDTYPE', 'feed 類型'); +@define('PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH', '顯示遠端 feed 的形式'); +@define('PLUGIN_REMOTERSS_BULLETIMG', '子彈型圖示'); +@define('PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH', '每個標題旁的圖示'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE', '顯示日期'); +@define('PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH', '在標題下顯示日期?'); + diff --git a/plugins/serendipity_plugin_remoterss/plugin_remoterss.tpl b/plugins/serendipity_plugin_remoterss/plugin_remoterss.tpl index de615fa0..c2e20140 100644 --- a/plugins/serendipity_plugin_remoterss/plugin_remoterss.tpl +++ b/plugins/serendipity_plugin_remoterss/plugin_remoterss.tpl @@ -1,11 +1,12 @@ {foreach from=$remoterss_items.items item="item"} + <div class="rss_item"> {if $remoterss_items.use_rss_link} - <div class="rss_link"><a href="{$item.link|@escape}" {if $remoterss_items.target}target="{$remoterss_items.target}"{/if}> + <div class="rss_link"><a href="{$item.link|escape}" {if $remoterss_items.target}target="{$remoterss_items.target}"{/if}> {/if} {if $remoterss_items.bulletimg} - <img src="{$remoterss_items.bulletimg}" border="0" alt="*" /> + <img src="{$remoterss_items.bulletimg}" border="0" alt="**" /> {/if} {foreach name="deloop" from=$item.display_elements item="field" key="fieldname"} @@ -13,12 +14,12 @@ <span class="rss_{$fieldname}"> {/if} - {$field|@escape} + {$field|escape} {if NOT $smarty.foreach.deloop.first} </span> {/if} - + {if $smarty.foreach.deloop.first} </a></div> {/if} @@ -29,8 +30,10 @@ <br /> {if $item.timestamp != -1 AND $remoterss_items.displaydate} <div class="serendipitySideBarDate"> - {$item.timestamp|@formatTime:$remoterss_items.dateformat|@escape} + {$item.timestamp|formatTime:$remoterss_items.dateformat|escape} </div> {/if} + </div> + {/foreach} diff --git a/plugins/serendipity_plugin_remoterss/plugin_remoterss_nasaiotd.tpl b/plugins/serendipity_plugin_remoterss/plugin_remoterss_nasaiotd.tpl index 839a8d5f..994ed57b 100644 --- a/plugins/serendipity_plugin_remoterss/plugin_remoterss_nasaiotd.tpl +++ b/plugins/serendipity_plugin_remoterss/plugin_remoterss_nasaiotd.tpl @@ -1,7 +1,9 @@ {foreach from=$remoterss_items.items item="item"} + <div class="rss_item"> <div class="nasa_caption"><strong>{$item.title}</strong></div> <div class="nasa_image"><a href="{$item.link}"><img width="195" src="{$remoterss_items.nasa_image.url}" /></a></div> <div class="nasa_desc"><em>{$item.description}</em></div> </div> + {/foreach} diff --git a/plugins/serendipity_plugin_remoterss/serendipity_plugin_remoterss.php b/plugins/serendipity_plugin_remoterss/serendipity_plugin_remoterss.php index d9c16c62..35cff8a5 100644 --- a/plugins/serendipity_plugin_remoterss/serendipity_plugin_remoterss.php +++ b/plugins/serendipity_plugin_remoterss/serendipity_plugin_remoterss.php @@ -1,12 +1,18 @@ -<?php # $Id$ +<?php // Contributed by Udo Gerhards <udo@babyblaue-seiten.de> // OPML Contributed by Richard Thomas Harrison <rich@mibnet.plus.com> +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + @serendipity_plugin_api::load_language(dirname(__FILE__)); -class s9y_remoterss_XMLTree { - function GetChildren($vals, &$i) { +class s9y_remoterss_XMLTree +{ + function GetChildren($vals, &$i) + { $children = array(); $cnt = sizeof($vals); while (++$i < $cnt) { @@ -39,16 +45,26 @@ class s9y_remoterss_XMLTree { } } - function GetXMLTree($file) { - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; + function GetXMLTree($file) + { + require_once S9Y_PEAR_PATH . 'HTTP/Request2.php'; serendipity_request_start(); - $req = new HTTP_Request($file); + $options = array(); + if (version_compare(PHP_VERSION, '5.6.0', '<')) { + // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1 + $options['ssl_verify_peer'] = false; + } + $req = new HTTP_Request2($file, HTTP_Request2::METHOD_GET, $options); - if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') { + try { + $response = $req->send(); + if ($response->getStatus() != '200') { + throw new HTTP_Request2_Exception('Status code not 200, xml file not fetched'); + } + $data = $response->getBody(); + + } catch (HTTP_Request2_Exception $e) { $data = file_get_contents($file); - } else { - // Fetch file - $data = $req->getResponseBody(); } serendipity_request_end(); @@ -93,25 +109,29 @@ class s9y_remoterss_XMLTree { define('OPMLDEBUG', '0'); -class s9y_remoterss_OPML { +class s9y_remoterss_OPML +{ var $cacheOPMLHead; var $cacheOPMLBody; var $cacheOPMLOutline; - function s9y_remoterss_OPML() { + function __construct() + { $this->cacheOPMLHead = array(); $this->cacheOPMLBody = array(); $this->cacheOPMLOutline = array(); } - function parseOPML($file) { + function parseOPML($file) + { $xmltree = new s9y_remoterss_XMLTree(); $opmltree = $xmltree->GetXMLTree($file); return $opmltree[0]; } - function findOPMLTag($arr, $tag) { + function findOPMLTag($arr, $tag) + { $i = 0; $tagindex = false; $children = $arr['children']; @@ -130,7 +150,8 @@ class s9y_remoterss_OPML { return $tagindex !== false ? $tagindex : false; } - function getOPMLTag($tree, $tag) { + function getOPMLTag($tree, $tag) + { $tagindex = $this->findOPMLTag($tree, $tag); if (OPMLDEBUG == 1) { @@ -142,7 +163,8 @@ class s9y_remoterss_OPML { return $tagindex !== false ? $tree['children'][$tagindex] : false; } - function getOPMLHead($tree) { + function getOPMLHead($tree) + { $head = array(); if (isset($this->cacheOPMLHead) && count($this->cacheOPMLHead) != 0) { @@ -172,7 +194,8 @@ class s9y_remoterss_OPML { return $head['tag'] == 'head' ? $head : false; } - function getOPMLBody($tree) { + function getOPMLBody($tree) + { $body = array(); if (isset($this->cacheOPMLBody) && count($this->cacheOPMLBody) != 0) { @@ -202,7 +225,8 @@ class s9y_remoterss_OPML { return $body['tag'] == 'body' ? $body : false; } - function getOPMLOutline($tree, $index) { + function getOPMLOutline($tree, $index) + { if (isset($this->cacheOPMLOutline[$index])) { return $this->cacheOPMLOutline[$index]; @@ -232,7 +256,8 @@ class s9y_remoterss_OPML { } } - function getOPMLOutlineAttr($tree, $index) { + function getOPMLOutlineAttr($tree, $index) + { $outline = $this->getOPMLOutline($tree, $index); return $outline != false ? $outline['attributes'] : false; @@ -240,63 +265,66 @@ class s9y_remoterss_OPML { } -class serendipity_plugin_remoterss extends serendipity_plugin { +class serendipity_plugin_remoterss extends serendipity_plugin +{ var $title = PLUGIN_REMOTERSS_TITLE; var $encoding = null; - function introspect(&$propbag) { + function introspect(&$propbag) + { $this->title = $this->get_config('sidebartitle', $this->title); $propbag->add('name', PLUGIN_REMOTERSS_TITLE); $propbag->add('description', PLUGIN_REMOTERSS_BLAHBLAH); $propbag->add('stackable', true); $propbag->add('author', 'Udo Gerhards, Richard Thomas Harrison'); - $propbag->add('version', '1.20'); + $propbag->add('version', '1.22.1'); $propbag->add('requirements', array( - 'serendipity' => '0.8', - 'smarty' => '2.6.7', - 'php' => '4.1.0' + 'serendipity' => '1.7', + 'smarty' => '3.1.0', + 'php' => '5.2.0' )); $propbag->add('configuration', array('sidebartitle', 'feedtype', 'template', 'rssuri', 'show_rss_element', 'smarty', 'number', 'use_rss_link', 'escape_rss', 'displaydate', 'dateformat', 'charset', 'target', 'cachetime', 'bulletimg', 'markup')); $propbag->add('groups', array('FRONTEND_EXTERNAL_SERVICES')); } - function introspect_config_item($name, &$propbag) { + function introspect_config_item($name, &$propbag) + { switch($name) { case 'use_rss_link': - $propbag->add('type', 'boolean'); - $propbag->add('name', PLUGIN_REMOTERSS_RSSLINK); - $propbag->add('description', PLUGIN_REMOTERSS_RSSLINK_DESC); - $propbag->add('default', 'true'); + $propbag->add('type', 'boolean'); + $propbag->add('name', PLUGIN_REMOTERSS_RSSLINK); + $propbag->add('description', PLUGIN_REMOTERSS_RSSLINK_DESC); + $propbag->add('default', 'true'); break; case 'escape_rss': - $propbag->add('type', 'boolean'); - $propbag->add('name', PLUGIN_REMOTERSS_RSSESCAPE); - $propbag->add('description', PLUGIN_REMOTERSS_RSSESCAPE_DESC); - $propbag->add('default', 'true'); + $propbag->add('type', 'boolean'); + $propbag->add('name', PLUGIN_REMOTERSS_RSSESCAPE); + $propbag->add('description', PLUGIN_REMOTERSS_RSSESCAPE_DESC); + $propbag->add('default', 'true'); break; case 'show_rss_element': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_REMOTERSS_RSSFIELD); - $propbag->add('description', PLUGIN_REMOTERSS_RSSFIELD_DESC); - $propbag->add('default', 'title'); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_REMOTERSS_RSSFIELD); + $propbag->add('description', PLUGIN_REMOTERSS_RSSFIELD_DESC); + $propbag->add('default', 'title'); break; case 'markup': - $propbag->add('type', 'boolean'); - $propbag->add('name', DO_MARKUP); - $propbag->add('description', DO_MARKUP_DESCRIPTION); - $propbag->add('default', 'false'); + $propbag->add('type', 'boolean'); + $propbag->add('name', DO_MARKUP); + $propbag->add('description', DO_MARKUP_DESCRIPTION); + $propbag->add('default', 'false'); break; case 'charset': - $propbag->add('type', 'radio'); - $propbag->add('name', CHARSET); - $propbag->add('description', CHARSET); - $propbag->add('default', 'native'); + $propbag->add('type', 'radio'); + $propbag->add('name', CHARSET); + $propbag->add('description', CHARSET); + $propbag->add('default', 'native'); $charsets = array(); if (LANG_CHARSET != 'UTF-8') { @@ -308,84 +336,84 @@ class serendipity_plugin_remoterss extends serendipity_plugin { $charsets['value'][] = 'native'; $charsets['desc'][] = LANG_CHARSET; - $propbag->add('radio', $charsets); + $propbag->add('radio', $charsets); break; case 'feedtype': $select = array('rss' => 'RSS', 'opml' => 'OPML', 'atom' => 'ATOM'); - $propbag->add('type', 'select'); - $propbag->add('name', PLUGIN_REMOTERSS_FEEDTYPE); - $propbag->add('description', PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH); - $propbag->add('select_values', $select); - $propbag->add('default', 'rss'); + $propbag->add('type', 'select'); + $propbag->add('name', PLUGIN_REMOTERSS_FEEDTYPE); + $propbag->add('description', PLUGIN_REMOTERSS_FEEDTYPE_BLAHBLAH); + $propbag->add('select_values', $select); + $propbag->add('default', 'rss'); break; case 'number': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_REMOTERSS_NUMBER); - $propbag->add('description', PLUGIN_REMOTERSS_NUMBER_BLAHBLAH); - $propbag->add('default', '0'); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_REMOTERSS_NUMBER); + $propbag->add('description', PLUGIN_REMOTERSS_NUMBER_BLAHBLAH); + $propbag->add('default', '0'); break; case 'dateformat': - $propbag->add('type', 'string'); - $propbag->add('name', GENERAL_PLUGIN_DATEFORMAT); - $propbag->add('description', sprintf(GENERAL_PLUGIN_DATEFORMAT_BLAHBLAH, '%A, %B %e. %Y')); - $propbag->add('default', '%A, %B %e. %Y'); + $propbag->add('type', 'string'); + $propbag->add('name', GENERAL_PLUGIN_DATEFORMAT); + $propbag->add('description', sprintf(GENERAL_PLUGIN_DATEFORMAT_BLAHBLAH, '%A, %B %e. %Y')); + $propbag->add('default', '%A, %B %e. %Y'); break; case 'sidebartitle': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_REMOTERSS_SIDEBARTITLE); - $propbag->add('description', PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH); - $propbag->add('default', ''); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_REMOTERSS_SIDEBARTITLE); + $propbag->add('description', PLUGIN_REMOTERSS_SIDEBARTITLE_BLAHBLAH); + $propbag->add('default', ''); break; case 'rssuri': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_REMOTERSS_RSSURI); - $propbag->add('description', PLUGIN_REMOTERSS_RSSURI_BLAHBLAH); - $propbag->add('default', ''); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_REMOTERSS_RSSURI); + $propbag->add('description', PLUGIN_REMOTERSS_RSSURI_BLAHBLAH); + $propbag->add('default', ''); break; case 'target': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_REMOTERSS_RSSTARGET); - $propbag->add('description', PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH); - $propbag->add('default', '_blank'); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_REMOTERSS_RSSTARGET); + $propbag->add('description', PLUGIN_REMOTERSS_RSSTARGET_BLAHBLAH); + $propbag->add('default', '_blank'); break; case 'cachetime': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_REMOTERSS_CACHETIME); - $propbag->add('description', PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH); - $propbag->add('default', 10800); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_REMOTERSS_CACHETIME); + $propbag->add('description', PLUGIN_REMOTERSS_CACHETIME_BLAHBLAH); + $propbag->add('default', 10800); break; case 'bulletimg': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_REMOTERSS_BULLETIMG); - $propbag->add('description', PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH); - $propbag->add('default', ''); + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_REMOTERSS_BULLETIMG); + $propbag->add('description', PLUGIN_REMOTERSS_BULLETIMG_BLAHBLAH); + $propbag->add('default', ''); break; case 'smarty': - $propbag->add('type', 'boolean'); - $propbag->add('name', CATEGORY_PLUGIN_TEMPLATE); - $propbag->add('description', CATEGORY_PLUGIN_TEMPLATE_DESC); - $propbag->add('default', false); + $propbag->add('type', 'boolean'); + $propbag->add('name', CATEGORY_PLUGIN_TEMPLATE); + $propbag->add('description', CATEGORY_PLUGIN_TEMPLATE_DESC); + $propbag->add('default', 'false'); break; case 'displaydate': - $propbag->add('type', 'boolean'); - $propbag->add('name', PLUGIN_REMOTERSS_DISPLAYDATE); - $propbag->add('description', PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH); - $propbag->add('default', 'true'); + $propbag->add('type', 'boolean'); + $propbag->add('name', PLUGIN_REMOTERSS_DISPLAYDATE); + $propbag->add('description', PLUGIN_REMOTERSS_DISPLAYDATE_BLAHBLAH); + $propbag->add('default', 'true'); break; case 'template': $select = array('plugin_remoterss.tpl' => 'Default (plugin_remoterss.tpl)', 'plugin_remoterss_nasaiotd.tpl' => 'NASA Image of the day'); - + $add_files = glob(dirname(__FILE__) . '/*.tpl'); foreach($add_files AS $add_file) { $bn = basename($add_file); @@ -407,7 +435,8 @@ class serendipity_plugin_remoterss extends serendipity_plugin { } // Check if a given URI is readable. - function urlcheck($uri) { + function urlcheck($uri) + { // These two substring comparisons are faster than one regexp. if ('http://' != substr($uri, 0, 7) && 'https://' != substr($uri, 0, 8)) { @@ -416,20 +445,10 @@ class serendipity_plugin_remoterss extends serendipity_plugin { // Disabled by now. May get enabled in the future, but for now the extra HTTP call isn't worth trying. return true; - require_once S9Y_PEAR_PATH . 'HTTP/Request.php'; - serendipity_request_start(); - $req = new HTTP_Request($uri); - - if (PEAR::isError($req->sendRequest()) || !preg_match('@^[23]..@', $req->getResponseCode())) { - serendipity_request_end(); - return false; - } else { - serendipity_request_end(); - return true; - } } - function debug($msg) { + function debug($msg) + { static $debug = false; if ($debug === false) { @@ -442,18 +461,19 @@ class serendipity_plugin_remoterss extends serendipity_plugin { fclose($fp); } - function generate_content(&$title) { + function generate_content(&$title) + { global $serendipity; $number = $this->get_config('number'); - $displaydate = $this->get_config('displaydate','true'); + $displaydate = serendipity_db_bool($this->get_config('displaydate', 'true')); $dateformat = $this->get_config('dateformat'); $sidebartitle = $title = $this->get_config('sidebartitle', $this->title); $rssuri = $this->get_config('rssuri'); $target = $this->get_config('target'); $cachetime = $this->get_config('cachetime'); $feedtype = $this->get_config('feedtype', 'rss'); - $markup = $this->get_config('markup', 'false'); + $markup = serendipity_db_bool($this->get_config('markup', 'false')); $bulletimg = $this->get_config('bulletimg'); $charset = $this->get_config('charset', 'native'); @@ -470,8 +490,8 @@ class serendipity_plugin_remoterss extends serendipity_plugin { if (!$cachetime || !is_numeric($cachetime)) { $cachetime = 10800; // 3 hours in seconds } - - $smarty = serendipity_db_bool($this->get_config('smarty')); + + $smarty = serendipity_db_bool($this->get_config('smarty', 'false')); if ($this->get_config('template') != 'plugin_remoterss.tpl') { $smarty = true; } @@ -493,9 +513,9 @@ class serendipity_plugin_remoterss extends serendipity_plugin { $c->parse($rssuri); $this->encoding = $c->rss['encoding']; - $use_rss_link = serendipity_db_bool($this->get_config('use_rss_link')); + $use_rss_link = serendipity_db_bool($this->get_config('use_rss_link', 'true')); $rss_elements = explode(',', $this->get_config('show_rss_element')); - $escape_rss = serendipity_db_bool($this->get_config('escape_rss')); + $escape_rss = serendipity_db_bool($this->get_config('escape_rss', 'true')); $i = 0; $content = ''; $smarty_items = array(); @@ -517,7 +537,7 @@ class serendipity_plugin_remoterss extends serendipity_plugin { $is_first = true; foreach($rss_elements AS $rss_element) { $rss_element = trim($rss_element); - + if (!$is_first) { $content .= '<span class="rss_' . preg_replace('@[^a-z0-9]@imsU', '', $rss_element) . '">'; } @@ -527,11 +547,11 @@ class serendipity_plugin_remoterss extends serendipity_plugin { } else { $content .= serendipity_specialchars($this->decode($item[$rss_element])); } - + if ($smarty) { $item['display_elements'][preg_replace('@[^a-z0-9]@imsU', '', $rss_element)] = $this->decode($item[$rss_element]); } - + if (!$is_first) { $content .= '</span>'; } @@ -549,13 +569,13 @@ class serendipity_plugin_remoterss extends serendipity_plugin { $content .= "<br />\n"; $item['timestamp'] = @strtotime(isset($item['pubdate']) ? $item['pubdate'] : $item['dc:date']); - if (!($item['timestamp'] == -1) AND ($displaydate == 'true')) { + if (!($item['timestamp'] == -1) AND $displaydate) { $content .= '<div class="serendipitySideBarDate">' . serendipity_specialchars(serendipity_formatTime($dateformat, $item['timestamp'], false)) . '</div>'; } - + if ($smarty) { $smarty_items['items'][$i] = $item; $smarty_items['items'][$i]['css_class'] = preg_replace('@[^a-z0-9]@imsU', '', $rss_element); @@ -575,12 +595,12 @@ class serendipity_plugin_remoterss extends serendipity_plugin { $smarty_items['dateformat'] = $dateformat; $smarty_items['target'] = $target; - $serendipity['smarty']->assign_by_ref('remoterss_items', $smarty_items); + $serendipity['smarty']->assignByRef('remoterss_items', $smarty_items); $tpl = $this->get_config('template'); if (empty($tpl)) { $tpl = 'plugin_remoterss.tpl'; } - + // Template specifics go here switch($tpl) { case 'plugin_remoterss_nasaiotd.tpl': @@ -623,9 +643,9 @@ class serendipity_plugin_remoterss extends serendipity_plugin { $simplefeed->handle_content_type(); $this->encoding = $charset; - $use_rss_link = serendipity_db_bool($this->get_config('use_rss_link')); + $use_rss_link = serendipity_db_bool($this->get_config('use_rss_link', 'true')); $rss_elements = explode(',', $this->get_config('show_rss_element')); - $escape_rss = serendipity_db_bool($this->get_config('escape_rss')); + $escape_rss = serendipity_db_bool($this->get_config('escape_rss', 'true')); $i = 0; $content = ''; $smarty_items = array(); @@ -660,7 +680,7 @@ class serendipity_plugin_remoterss extends serendipity_plugin { $is_first = true; foreach($rss_elements AS $rss_element) { $rss_element = trim($rss_element); - + if (!$is_first) { $content .= '<span class="rss_' . preg_replace('@[^a-z0-9]@imsU', '', $rss_element) . '">'; } @@ -670,11 +690,11 @@ class serendipity_plugin_remoterss extends serendipity_plugin { } else { $content .= serendipity_specialchars($this->decode($item[$rss_element])); } - + if ($smarty) { $item['display_elements'][preg_replace('@[^a-z0-9]@imsU', '', $rss_element)] = $this->decode($item[$rss_element]); } - + if (!$is_first) { $content .= '</span>'; } @@ -698,7 +718,7 @@ class serendipity_plugin_remoterss extends serendipity_plugin { . '</div>'; } - + if ($smarty) { $smarty_items['items'][$i] = $item; $smarty_items['items'][$i]['css_class'] = preg_replace('@[^a-z0-9]@imsU', '', $rss_element); @@ -709,7 +729,7 @@ class serendipity_plugin_remoterss extends serendipity_plugin { $content .= '</div>'; // end of rss_item ++$i; } - + if ($smarty) { $smarty_items['use_rss_link'] = $use_rss_link; $smarty_items['bulletimg'] = $bulletimg; @@ -718,12 +738,12 @@ class serendipity_plugin_remoterss extends serendipity_plugin { $smarty_items['dateformat'] = $dateformat; $smarty_items['target'] = $target; - $serendipity['smarty']->assign_by_ref('remoterss_items', $smarty_items); + $serendipity['smarty']->assignByRef('remoterss_items', $smarty_items); $tpl = $this->get_config('template'); if (empty($tpl)) { $tpl = 'plugin_remoterss.tpl'; } - + // Template specifics go here switch($tpl) { case 'plugin_remoterss_nasaiotd.tpl': @@ -805,7 +825,7 @@ class serendipity_plugin_remoterss extends serendipity_plugin { } /* Pretend to be a html_nugget so we can apply markup events. */ - if ($markup == 'true') { + if ($markup) { $entry = array('html_nugget' => $content); serendipity_plugin_api::hook_event('frontend_display', $entry); $content = $entry['html_nugget']; @@ -838,7 +858,8 @@ class serendipity_plugin_remoterss extends serendipity_plugin { } } - function &decode($string) { + function &decode($string) + { $target = $this->get_config('charset', 'native'); // xml_parser_* functions to recoding from ISO-8859-1/UTF-8 @@ -867,6 +888,8 @@ class serendipity_plugin_remoterss extends serendipity_plugin { return $out; } } + } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_superuser/serendipity_plugin_superuser.php b/plugins/serendipity_plugin_superuser/serendipity_plugin_superuser.php index f20118c8..3d748bc8 100644 --- a/plugins/serendipity_plugin_superuser/serendipity_plugin_superuser.php +++ b/plugins/serendipity_plugin_superuser/serendipity_plugin_superuser.php @@ -1,6 +1,11 @@ <?php -class serendipity_plugin_superuser extends serendipity_plugin { +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + +class serendipity_plugin_superuser extends serendipity_plugin +{ var $title = SUPERUSER; function introspect(&$propbag) @@ -9,27 +14,11 @@ class serendipity_plugin_superuser extends serendipity_plugin { $propbag->add('description', ALLOWS_YOU_BLAHBLAH); $propbag->add('stackable', false); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '1.0'); + $propbag->add('version', '1.1'); $propbag->add('configuration', array('https')); $propbag->add('groups', array('FRONTEND_FEATURES')); } - function generate_content(&$title) - { - global $serendipity; - - $title = $this->title; - if ($this->get_config('https', 'false') == 'true') { - $base = str_replace('http://', 'https://', $serendipity['baseURL']); - } else { - $base = $serendipity['serendipityHTTPPath']; - } - - $link = $base . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] .'?/' : '') . PATH_ADMIN; - $text = (($_SESSION['serendipityAuthedUser'] === true) ? SUPERUSER_OPEN_ADMIN : SUPERUSER_OPEN_LOGIN); - echo '<a href="' . $link . '" rel="nofollow" title="'. $text .'">'. $text .'</a>'; - } - function introspect_config_item($name, &$propbag) { switch($name) { @@ -45,6 +34,23 @@ class serendipity_plugin_superuser extends serendipity_plugin { } return true; } + + function generate_content(&$title) + { + global $serendipity; + + $title = $this->title; + if (serendipity_db_bool($this->get_config('https', 'false'))) { + $base = str_replace('http://', 'https://', $serendipity['baseURL']); + } else { + $base = $serendipity['serendipityHTTPPath']; + } + + $link = $base . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] .'?/' : '') . PATH_ADMIN; + $text = (($_SESSION['serendipityAuthedUser'] === true) ? SUPERUSER_OPEN_ADMIN : SUPERUSER_OPEN_LOGIN); + echo '<a href="' . $link . '" rel="nofollow" title="'. $text .'">'. $text .'</a>'; + } + } ?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_syndication/serendipity_plugin_syndication.php b/plugins/serendipity_plugin_syndication/serendipity_plugin_syndication.php index cee904d6..a60e9786 100644 --- a/plugins/serendipity_plugin_syndication/serendipity_plugin_syndication.php +++ b/plugins/serendipity_plugin_syndication/serendipity_plugin_syndication.php @@ -1,5 +1,9 @@ <?php +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + class serendipity_plugin_syndication extends serendipity_plugin { var $title = SYNDICATION; @@ -9,18 +13,18 @@ class serendipity_plugin_syndication extends serendipity_plugin { $propbag->add('description', SHOWS_RSS_BLAHBLAH); $propbag->add('stackable', true); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '2.2.2'); + $propbag->add('version', '2.2.3'); $propbag->add('configuration', array( 'title', 'big_img', 'feed_format', 'subToMe', 'show_comment_feed', - 'seperator', + 'separator', 'iconURL', 'feed_name', 'comment_name', - 'seperator2', + 'separator2', 'fb_id', 'custom_url' ) @@ -66,9 +70,9 @@ class serendipity_plugin_syndication extends serendipity_plugin { $propbag->add('default', 'false'); break; - case 'seperator': - case 'seperator2': - $propbag->add('type', 'seperator'); + case 'separator': + case 'separator2': + $propbag->add('type', 'separator'); break; case 'iconURL': @@ -113,7 +117,6 @@ class serendipity_plugin_syndication extends serendipity_plugin { $propbag->add('default', ''); break; - default: return false; } @@ -200,15 +203,24 @@ class serendipity_plugin_syndication extends serendipity_plugin { } if (serendipity_db_bool($this->get_config('show_2.0c', false)) || serendipity_db_bool($this->get_config('show_comment_feed', false))) { - echo $this->generateFeedButton(($useAtom && ! $useRss ? serendipity_rewriteURL(PATH_FEEDS .'/comments.atom') : serendipity_rewriteURL(PATH_FEEDS .'/comments.rss2')), - $COMMENTS, - ($subtome ? $this->getOnclick(serendipity_rewriteURL(PATH_FEEDS .'/comments.rss2')) : ""), - $small_icon); + if ($useRss) { + echo $this->generateFeedButton( serendipity_rewriteURL(PATH_FEEDS .'/comments.rss2'), + $COMMENTS . ($useAtom ? " (RSS)": ""), + ($subtome ? $this->getOnclick(serendipity_rewriteURL(PATH_FEEDS .'/comments.rss2')) : ""), + $small_icon); + } + if ($useAtom) { + echo $this->generateFeedButton( serendipity_rewriteURL(PATH_FEEDS .'/comments.atom10'), + $COMMENTS . ($useRss ? " (Atom)": ""), + ($subtome ? $this->getOnclick(serendipity_rewriteURL(PATH_FEEDS .'/comments.atom10')) : ""), + $small_icon); + } } echo "</ul>\n"; } - function generateFeedButton($feed, $label, $onclick, $icon, $small = false) { + function generateFeedButton($feed, $label, $onclick, $icon, $small = false) + { $link = 'href="'.$feed.'" '. $onclick; $output = '<li>'; $class = ""; @@ -227,7 +239,8 @@ class serendipity_plugin_syndication extends serendipity_plugin { return $output .= "</li>\n"; } - function getOnclick($url) { + function getOnclick($url) + { return "onclick=\"document.subtomeBtn=this;document.subtomeBtn.dataset['subtomeFeeds']='". urlencode($url). "';var s=document.createElement('script');s.src='https://www.subtome.com/load.js';document.body.appendChild(s);return false;\""; } diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_bg.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_bg.inc.php index 9e70178f..12a7dbc4 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_bg.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_bg.inc.php @@ -1,11 +1,12 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ -@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'Избор на теми'); -@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Показва падащ списък за избор на тема'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Бутон \'Изпращане\'?'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'При избор \'Да\' смяната на темата ще се осъществява след натискане на бутон \'Продължаване\'.'); +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'Избор на теми'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Показва падащ списък за избор на тема'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Бутон \'Изпращане\'?'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'При избор \'Да\' смяната на темата ще се осъществява след натискане на бутон \'Продължаване\'.'); + diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_cn.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_cn.inc.php index a18f5955..5c758ce0 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_cn.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_cn.inc.php @@ -4,3 +4,4 @@ @define('PLUGIN_TEMPLATEDROPDOWN_DESC', '显示一个选择主题的下拉框'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '提交按钮'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '是否显示一个提交按钮(用于切换所选择的主题)?'); + diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_cs.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_cs.inc.php index 2a60d6af..8239c506 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_cs.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_cs.inc.php @@ -1,7 +1,7 @@ -<?php # $Id: lang_cs.inc.php 1381 2007-12-14 00:27:00 VladaAjgl $ +<?php /** - * @version $Revision: 1381 $ + * @version: 1381 * @author Vladimír Ajgl <vlada@ajgl.cz> * EN-Revision: Revision of lang_en.inc.php */ @@ -11,4 +11,3 @@ @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Potvrzovací tlačítko?'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Zobrazit potvrzovací tlačítko?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_cz.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_cz.inc.php index 017093d7..8239c506 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_cz.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_cz.inc.php @@ -1,7 +1,7 @@ -<?php # $Id: lang_cz.inc.php 1381 2007-12-14 00:27:00 VladaAjgl $ +<?php /** - * @version $Revision: 1381 $ + * @version: 1381 * @author Vladimír Ajgl <vlada@ajgl.cz> * EN-Revision: Revision of lang_en.inc.php */ @@ -11,4 +11,3 @@ @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Potvrzovací tlačítko?'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Zobrazit potvrzovací tlačítko?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_de.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_de.inc.php index 59ada22c..7abfc953 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_de.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_de.inc.php @@ -1,6 +1,7 @@ -<?php # $Id$ +<?php @define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'Theme dropdown'); @define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Zeigt eine Box um Themes zu ändern'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Submit-Button?'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Einen Submit-Button anzeigen?'); + diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_es.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_es.inc.php index c6281494..1ca9d0da 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_es.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_es.inc.php @@ -1,14 +1,13 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ -@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'Caja desplegable de plantillas'); -@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Muestra una caja desplegable para cambiar las plantillas'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '¿Botón de enviar?'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '¿Mostrar un botón de envío?'); +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'Caja desplegable de plantillas'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Muestra una caja desplegable para cambiar las plantillas'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '¿Botón de enviar?'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '¿Mostrar un botón de envío?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_fr.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_fr.inc.php index cca113e8..f7e872d3 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_fr.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -13,10 +13,8 @@ # # ########################################################################## -@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'Sélecteur de thème'); -@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Affiche un menu pour choisir un thème visuel'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Inclure le bouton?'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Afficher le bouton pour changer le thème?'); +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'Sélecteur de thème'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Affiche un menu pour choisir un thème visuel'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Inclure le bouton?'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Afficher le bouton pour changer le thème?'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_ja.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_ja.inc.php index 3628714a..e014c3db 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_ja.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_ja.inc.php @@ -1,15 +1,13 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 692 */ -@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'テンプレートドロップダウン'); -@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'テンプレート変更のボックスを表示します。'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '送信ボタンの表示は?'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '送信ボタンの表示をしますか?'); +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'テンプレートドロップダウン'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'テンプレート変更のボックスを表示します。'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '送信ボタンの表示は?'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '送信ボタンの表示をしますか?'); -/* vim: set sts=4 ts=4 expandtab : */ -?> diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_ko.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_ko.inc.php index 4b6580d7..c640ed6b 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_ko.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_ko.inc.php @@ -1,10 +1,9 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_TEMPLATEDROPDOWN_NAME', '템플릿 선택'); - @define('PLUGIN_TEMPLATEDROPDOWN_DESC', '템플릿을 바꿀 수 있는 목록 상자를 보여줌'); - @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Submit 버튼'); - @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Submit 버튼을 표시합니까?'); +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', '템플릿 선택'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', '템플릿을 바꿀 수 있는 목록 상자를 보여줌'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Submit 버튼'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Submit 버튼을 표시합니까?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_pl.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_pl.inc.php index 84ce80f8..d56ee6fb 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_pl.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -11,4 +11,3 @@ @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Przycisk potwierdzenia (submit)?'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Czy przycisk potwoerdzenia ma być pokazywany?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_pt_PT.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_pt_PT.inc.php index c6ce9a25..86477a45 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $ +<?php ########################################################################## # serendipity - another blogger... # @@ -12,10 +12,8 @@ # # ########################################################################## -@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'Selector de temas'); -@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Mostra um menu para mudar o tema visual'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Incluir o botão?'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Mostrar um botão de submissão?'); +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'Selector de temas'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Mostra um menu para mudar o tema visual'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Incluir o botão?'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Mostrar um botão de submissão?'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_tn.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_tn.inc.php index ce15d412..b997947c 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_tn.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,8 +12,8 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_TEMPLATEDROPDOWN_NAME', '佈景選擇'); - @define('PLUGIN_TEMPLATEDROPDOWN_DESC', '顯示改變佈景的選擇'); - @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '送出按鈕?'); - @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '要顯示送出按鈕嗎?'); -?> \ No newline at end of file +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', '佈景選擇'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', '顯示改變佈景的選擇'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '送出按鈕?'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '要顯示送出按鈕嗎?'); + diff --git a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_zh.inc.php b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_zh.inc.php index a18f5955..5c758ce0 100644 --- a/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_zh.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/UTF-8/lang_zh.inc.php @@ -4,3 +4,4 @@ @define('PLUGIN_TEMPLATEDROPDOWN_DESC', '显示一个选择主题的下拉框'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '提交按钮'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '是否显示一个提交按钮(用于切换所选择的主题)?'); + diff --git a/plugins/serendipity_plugin_templatedropdown/lang_bg.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_bg.inc.php index 67eb76a2..5e2b1d78 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_bg.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_bg.inc.php @@ -1,11 +1,12 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Ivan Cenov jwalker@hotmail.bg */ -@define('PLUGIN_TEMPLATEDROPDOWN_NAME', '����� �� ����'); -@define('PLUGIN_TEMPLATEDROPDOWN_DESC', '������� ����� ������ �� ����� �� ����'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '����� \'���������\'?'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '��� ����� \'��\' ������� �� ������ �� �� ����������� ���� ��������� �� ����� \'������������\'.'); +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', '����� �� ����'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', '������� ����� ������ �� ����� �� ����'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '����� \'���������\'?'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '��� ����� \'��\' ������� �� ������ �� �� ����������� ���� ��������� �� ����� \'������������\'.'); + diff --git a/plugins/serendipity_plugin_templatedropdown/lang_cn.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_cn.inc.php index a18f5955..5c758ce0 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_cn.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_cn.inc.php @@ -4,3 +4,4 @@ @define('PLUGIN_TEMPLATEDROPDOWN_DESC', '显示一个选择主题的下拉框'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '提交按钮'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '是否显示一个提交按钮(用于切换所选择的主题)?'); + diff --git a/plugins/serendipity_plugin_templatedropdown/lang_cs.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_cs.inc.php index 846f64eb..2fac5ac8 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_cs.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_cs.inc.php @@ -1,7 +1,7 @@ -<?php # $Id: lang_cs.inc.php 1381 2007-12-14 00:27:00 VladaAjgl $ +<?php /** - * @version $Revision: 1381 $ + * @version: 1381 * @author Vladim�r Ajgl <vlada@ajgl.cz> * EN-Revision: Revision of lang_en.inc.php */ @@ -11,4 +11,3 @@ @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Potvrzovac� tla��tko?'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Zobrazit potvrzovac� tla��tko?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/lang_cz.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_cz.inc.php index c9fbbe79..d48ba76f 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_cz.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_cz.inc.php @@ -1,7 +1,7 @@ -<?php # $Id: lang_cz.inc.php 1381 2007-12-14 00:27:00 VladaAjgl $ +<?php /** - * @version $Revision: 1381 $ + * @version: 1381 * @author Vladim�r Ajgl <vlada@ajgl.cz> * EN-Revision: Revision of lang_en.inc.php */ @@ -11,4 +11,3 @@ @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Potvrzovac� tla��tko?'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Zobrazit potvrzovac� tla��tko?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/lang_de.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_de.inc.php index 4e2c073b..14c0b591 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_de.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_de.inc.php @@ -1,6 +1,7 @@ -<?php # $Id$ +<?php @define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'Theme dropdown'); @define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Zeigt eine Box um Themes zu �ndern'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Submit-Button?'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Einen Submit-Button anzeigen?'); + diff --git a/plugins/serendipity_plugin_templatedropdown/lang_en.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_en.inc.php index f7bbc74e..e1ee622e 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_en.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_en.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Translator Name <yourmail@example.com> * EN-Revision: Revision of lang_en.inc.php */ @@ -11,4 +11,3 @@ @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Submit button?'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Show a submit button?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/lang_es.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_es.inc.php index 6fe74027..1dbc1f27 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_es.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_es.inc.php @@ -1,14 +1,13 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Rodrigo Lazo Paz <rlazo.paz@gmail.com> * EN-Revision: 690 */ -@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'Caja desplegable de plantillas'); -@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Muestra una caja desplegable para cambiar las plantillas'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '�Bot�n de enviar?'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '�Mostrar un bot�n de env�o?'); +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'Caja desplegable de plantillas'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Muestra una caja desplegable para cambiar las plantillas'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '�Bot�n de enviar?'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '�Mostrar un bot�n de env�o?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/lang_fr.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_fr.inc.php index 0a538628..8f9a9fd1 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_fr.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_fr.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php ########################################################################## # serendipity - another blogger... # @@ -13,10 +13,8 @@ # # ########################################################################## -@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'S�lecteur de th�me'); -@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Affiche un menu pour choisir un th�me visuel'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Inclure le bouton?'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Afficher le bouton pour changer le th�me?'); +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'S�lecteur de th�me'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Affiche un menu pour choisir un th�me visuel'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Inclure le bouton?'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Afficher le bouton pour changer le th�me?'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_templatedropdown/lang_ja.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_ja.inc.php index 3628714a..e014c3db 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_ja.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_ja.inc.php @@ -1,15 +1,13 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Tadashi Jokagi <elf2000@users.sourceforge.net> * EN-Revision: 692 */ -@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'テンプレートドロップダウン'); -@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'テンプレート変更のボックスを表示します。'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '送信ボタンの表示は?'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '送信ボタンの表示をしますか?'); +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'テンプレートドロップダウン'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'テンプレート変更のボックスを表示します。'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '送信ボタンの表示は?'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '送信ボタンの表示をしますか?'); -/* vim: set sts=4 ts=4 expandtab : */ -?> diff --git a/plugins/serendipity_plugin_templatedropdown/lang_ko.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_ko.inc.php index 4b6580d7..c640ed6b 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_ko.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_ko.inc.php @@ -1,10 +1,9 @@ -<?php # $Id$ +<?php # Translated by: Wesley Hwang-Chung <wesley96@gmail.com> # (c) 2005 http://www.tool-box.info/ - @define('PLUGIN_TEMPLATEDROPDOWN_NAME', '템플릿 선택'); - @define('PLUGIN_TEMPLATEDROPDOWN_DESC', '템플릿을 바꿀 수 있는 목록 상자를 보여줌'); - @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Submit 버튼'); - @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Submit 버튼을 표시합니까?'); +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', '템플릿 선택'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', '템플릿을 바꿀 수 있는 목록 상자를 보여줌'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Submit 버튼'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Submit 버튼을 표시합니까?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/lang_pl.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_pl.inc.php index f1a0f6f9..039cee9d 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_pl.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_pl.inc.php @@ -1,7 +1,7 @@ -<?php # $Id$ +<?php /** - * @version $Revision$ + * @version * @author Kostas CoSTa Brzezinski <costa@kofeina.net> * EN-Revision: Revision of lang_en.inc.php */ @@ -11,4 +11,3 @@ @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Przycisk potwierdzenia (submit)?'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Czy przycisk potwoerdzenia ma by� pokazywany?'); -?> diff --git a/plugins/serendipity_plugin_templatedropdown/lang_pt_PT.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_pt_PT.inc.php index 2bf634df..00c3e505 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_pt_PT.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_pt_PT.inc.php @@ -1,4 +1,4 @@ -<?php # $Id: lang_ja.inc.php,v 1.4 2005/05/17 11:37:42 garvinhicking Exp $ +<?php ########################################################################## # serendipity - another blogger... # @@ -12,10 +12,8 @@ # # ########################################################################## -@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'Selector de temas'); -@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Mostra um menu para mudar o tema visual'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Incluir o bot�o?'); -@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Mostrar um bot�o de submiss�o?'); +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', 'Selector de temas'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', 'Mostra um menu para mudar o tema visual'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', 'Incluir o bot�o?'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', 'Mostrar um bot�o de submiss�o?'); -/* vim: set sts=4 ts=4 expandtab : */ -?> \ No newline at end of file diff --git a/plugins/serendipity_plugin_templatedropdown/lang_tn.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_tn.inc.php index ce15d412..b997947c 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_tn.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_tn.inc.php @@ -1,8 +1,8 @@ -<?php # $Id$ +<?php ########################################################################## # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity # # Developer Team) All rights reserved. See LICENSE file for licensing # -# details # +# details # # # # (c) 2003 Jannis Hermanns <J@hacked.it> # # http://www.jannis.to/programming/serendipity.html # @@ -12,8 +12,8 @@ # http://open.38.com # ########################################################################## - @define('PLUGIN_TEMPLATEDROPDOWN_NAME', '佈景選擇'); - @define('PLUGIN_TEMPLATEDROPDOWN_DESC', '顯示改變佈景的選擇'); - @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '送出按鈕?'); - @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '要顯示送出按鈕嗎?'); -?> \ No newline at end of file +@define('PLUGIN_TEMPLATEDROPDOWN_NAME', '佈景選擇'); +@define('PLUGIN_TEMPLATEDROPDOWN_DESC', '顯示改變佈景的選擇'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '送出按鈕?'); +@define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '要顯示送出按鈕嗎?'); + diff --git a/plugins/serendipity_plugin_templatedropdown/lang_zh.inc.php b/plugins/serendipity_plugin_templatedropdown/lang_zh.inc.php index a18f5955..5c758ce0 100644 --- a/plugins/serendipity_plugin_templatedropdown/lang_zh.inc.php +++ b/plugins/serendipity_plugin_templatedropdown/lang_zh.inc.php @@ -4,3 +4,4 @@ @define('PLUGIN_TEMPLATEDROPDOWN_DESC', '显示一个选择主题的下拉框'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT', '提交按钮'); @define('PLUGIN_TEMPLATEDROPDOWN_SUBMIT_DESC', '是否显示一个提交按钮(用于切换所选择的主题)?'); + diff --git a/plugins/serendipity_plugin_templatedropdown/serendipity_plugin_templatedropdown.php b/plugins/serendipity_plugin_templatedropdown/serendipity_plugin_templatedropdown.php index 55ce7b98..a3f38efc 100644 --- a/plugins/serendipity_plugin_templatedropdown/serendipity_plugin_templatedropdown.php +++ b/plugins/serendipity_plugin_templatedropdown/serendipity_plugin_templatedropdown.php @@ -1,8 +1,13 @@ -<?php # $Id$ +<?php + +if (IN_serendipity !== true) { + die ("Don't hack!"); +} @serendipity_plugin_api::load_language(dirname(__FILE__)); -class serendipity_plugin_templatedropdown extends serendipity_plugin { +class serendipity_plugin_templatedropdown extends serendipity_plugin +{ var $title = PLUGIN_TEMPLATEDROPDOWN_NAME; function introspect(&$propbag) @@ -13,9 +18,9 @@ class serendipity_plugin_templatedropdown extends serendipity_plugin { $propbag->add('description', PLUGIN_TEMPLATEDROPDOWN_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Evan Nemerson'); - $propbag->add('version', '1.2'); + $propbag->add('version', '1.3'); $propbag->add('requirements', array( - 'serendipity' => '0.8', + 'serendipity' => '1.6', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -46,33 +51,35 @@ class serendipity_plugin_templatedropdown extends serendipity_plugin { break; default: - return false; + return false; } return true; } - function generate_content(&$title) { + function generate_content(&$title) + { global $serendipity; $title = $this->get_config('title', $this->title); $url = serendipity_currentURL(true); - echo '<form id="theme_chooser" action="' . $url . '" method="post">'; - echo '<select name="user_template" onchange="document.getElementById(\'theme_chooser\').submit();">'; + echo '<form id="theme_chooser" action="' . $url . '" method="post">'."\n"; + echo '<select name="user_template" onchange="document.getElementById(\'theme_chooser\').submit();">'."\n"; foreach (serendipity_fetchTemplates() as $template) { if ($template == 'default-php' || $template == 'default-xml') continue; $templateInfo = serendipity_fetchTemplateInfo($template); - echo '<option value="' . $template . '" ' . (serendipity_get_config_var('template', 'default') == $template ? 'selected="selected"' : '') . '>' . substr($templateInfo['name'], 0, 25) . '</option>'; + echo ' <option value="' . $template . '" ' . (serendipity_get_config_var('template', 'default') == $template ? 'selected="selected"' : '') . '>' . substr($templateInfo['name'], 0, 25) . "</option>\n"; } - echo '</select>'; + echo "</select>\n"; - if ($this->get_config('show_submit', 'false') == 'true') { - echo '<input type="submit" name="submit" value="' . GO . '" size="4" />'; + if (serendipity_db_bool($this->get_config('show_submit', 'false'))) { + echo '<input type="submit" name="submit" value="' . GO . '" size="4" />'."\n"; } - echo '</form>'; + echo "</form>\n"; } + } /* vim: set sts=4 ts=4 expandtab : */ -?> +?> \ No newline at end of file diff --git a/rss.php b/rss.php index 30ff16bc..7d3cab96 100644 --- a/rss.php +++ b/rss.php @@ -9,6 +9,10 @@ session_cache_limiter('public'); include('serendipity_config.inc.php'); include(S9Y_INCLUDE_PATH . 'include/functions_rss.inc.php'); +if ($serendipity['cors']) { + header('Access-Control-Allow-Origin: *'); // Allow RSS feeds to be read by javascript +} + $version = $_GET['version']; $description = $serendipity['blogDescription']; $title = $serendipity['blogTitle']; @@ -16,6 +20,13 @@ $comments = FALSE; if (empty($version)) { list($version) = serendipity_discover_rss($_GET['file'], $_GET['ext']); +} else { + # be sure it is an allowed version, to prevent attackers sniffing for unrelated files on the file system + $allowed_versions = ['opml1.0', '0.91', '1.0', '2.0', 'atom0.3', 'atom1.0']; + if (! in_array($version, $allowed_versions, true)) { + header('Status: 404 Not Found'); + exit; + } } if (isset($_GET['category'])) { @@ -233,18 +244,14 @@ if ($_GET['type'] == 'content' && header('Location: ' . serendipity_get_config_var('feedCustom')); exit; } -$metadata['showMail'] = serendipity_db_bool(serendipity_get_config_var('show_mail', $metadata['showMail'])); +$metadata['showMail'] = serendipity_db_bool(serendipity_get_config_var('feedShowMail', $metadata['showMail'])); $file_version = preg_replace('@[^0-9a-z\.-_]@i', '', $version); -$metadata['template_file'] = serendipity_getTemplateFile('feed_' . $file_version . '.tpl', 'serendipityPath'); +$metadata['template_file'] = 'feed_' . $file_version . '.tpl'; serendipity_smarty_init(); serendipity_plugin_api::hook_event('frontend_rss', $metadata); -if (!$metadata['template_file'] || $metadata['template_file'] == 'feed_' . $file_version . '.tpl') { - die("Invalid RSS version specified or RSS-template file not found\n"); -} - $self_url = ($_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . serendipity_specialchars($_SERVER['REQUEST_URI']); if (!is_array($entries)) { $entries = array(); diff --git a/serendipity_admin.php b/serendipity_admin.php index a8a7ff89..3a70b9ac 100644 --- a/serendipity_admin.php +++ b/serendipity_admin.php @@ -116,7 +116,7 @@ if (!$use_installer && $is_logged_in) { } include S9Y_INCLUDE_PATH . 'include/admin/templates.inc.php'; - $admin_section = MANAGE_STYLES; + $admin_section = MENU_TEMPLATES; break; case 'plugins': @@ -125,7 +125,7 @@ if (!$use_installer && $is_logged_in) { } include S9Y_INCLUDE_PATH . 'include/admin/plugins.inc.php'; - $admin_section = CONFIGURE_PLUGINS; + $admin_section = MENU_PLUGINS; break; case 'users': @@ -174,10 +174,7 @@ if (!$use_installer && $is_logged_in) { break; case 'comments': - if (!serendipity_checkPermission('adminComments')) { - break; - } - + // perms are checked by author include S9Y_INCLUDE_PATH . 'include/admin/comments.inc.php'; $admin_section = COMMENTS; break; @@ -230,9 +227,10 @@ if ($ajax) { $admin_vars[$poll_admin_var] =& $$poll_admin_var; } - $admin_vars['out'] = array(); - $admin_vars['no_create'] = $serendipity['no_create']; - $admin_vars['title'] = $admin_section; + $admin_vars['out'] = array(); + $admin_vars['no_create'] = $serendipity['no_create']; + $admin_vars['title'] = $admin_section; + $admin_vars['backendBlogtitleFirst'] = $serendipity['backendBlogtitleFirst']; if ($serendipity['expose_s9y']) { $admin_vars['version_info'] = sprintf(ADMIN_FOOTER_POWERED_BY, $serendipity['versionInstalled'], phpversion()); diff --git a/serendipity_config.inc.php b/serendipity_config.inc.php index 2ce82a4a..d29a27fa 100644 --- a/serendipity_config.inc.php +++ b/serendipity_config.inc.php @@ -47,7 +47,7 @@ if (defined('USE_MEMSNAP')) { } // The version string -$serendipity['version'] = '2.1-alpha3'; +$serendipity['version'] = '2.2.0-beta2'; // Setting this to 'false' will enable debugging output. All alpha/beta/cvs snapshot versions will emit debug information by default. To increase the debug level (to enable Smarty debugging), set this flag to 'debug'. @@ -83,9 +83,12 @@ $serendipity['max_last_modified'] = 60 * 60 * 24 * 7; // that date. However it is still limited by the number below of maximum entries $serendipity['max_fetch_limit'] = 50; -// How many bytes are allowed for fetching trackbacks, so that no binary files get accidently trackbacked? +// How many bytes are allowed for fetching trackbacks, so that no binary files get accidentally trackbacked? $serendipity['trackback_filelimit'] = 150 * 1024; +// Allow "Access-Control-Allow-Origin: *" to be used in sensible locations (RSS feed) +$serendipity['cors'] = false; + if (!isset($serendipity['fetchLimit'])) { $serendipity['fetchLimit'] = 15; } @@ -134,6 +137,22 @@ if (!isset($serendipity['template_backend'])) { $serendipity['template_backend'] = '2k11'; } +// The default page title of backend pages is "section | blog title | SERENDIPITY_ADMIN_SUITE" +// If set to true (in serendipity_config_local.inc.php), the page title will be +// "blog title | section | SERENDIPITY_ADMIN_SUITE" instead +if (!isset($serendipity['backendBlogtitleFirst'])) { + $serendipity['backendBlogtitleFirst'] = false; +} + +// Dashboard: set number of comments and drafts / future entries to be shown +if (!isset($serendipity['dashboardCommentsLimit'])) { + $serendipity['dashboardCommentsLimit'] = 5; +} + +if (!isset($serendipity['dashboardEntriesLimit'])) { + $serendipity['dashboardEntriesLimit'] = 5; +} + // Available languages if (!isset($serendipity['languages'])) { $serendipity['languages'] = array('en' => 'English', @@ -278,7 +297,7 @@ if ($serendipity['production'] === false) { $errLevel = error_reporting(); -/* debug make correct error levels readable +/* [DEBUG] Helper to display current error levels, meant for developers. echo $errLevel."<br>\n"; for ($i = 0; $i < 15; $i++ ) { print debug_ErrorLevelType($errLevel & pow(2, $i)) . "<br>\n"; @@ -287,14 +306,9 @@ for ($i = 0; $i < 15; $i++ ) { // [internal callback function]: errorToExceptionHandler() if (is_callable($serendipity['errorhandler'], false, $callable_name)) { - // set serendipity global error to exeption handler - if ($serendipity['production'] === 'debug') { - set_error_handler($serendipity['errorhandler'], $errLevel); // Yes, DEBUG mode should actually report E_STRICT errors! In PHP 5.4+ contained in E_ALL already - } elseif ($serendipity['production'] === false) { - set_error_handler($serendipity['errorhandler'], $errLevel); // most E_STRICT errors are thrown during the page's compilation process and can not be suppressed here. - } else { - set_error_handler($serendipity['errorhandler'], $errLevel); // different, see ln 56 - } + // set serendipity global error to exception handler + set_error_handler($serendipity['errorhandler'], $errLevel); // See error_reporting() earlier to see which errors are passed to the handler, deending on $serendipity['production']. + register_shutdown_function('fatalErrorShutdownHandler'); } define('IS_up2date', version_compare($serendipity['version'], $serendipity['versionInstalled'], '<=')); @@ -430,7 +444,7 @@ if (!isset($serendipity['GET']['adminAction'])) { // Make sure this variable is always properly sanitized. Previously in compat.inc.php, but there LANG_CHARSET was not defined. if (isset($serendipity['GET']['searchTerm'])) { - $serendipity['GET']['searchTerm'] = serendipity_specialchars(strip_tags($serendipity['GET']['searchTerm'])); + $serendipity['GET']['searchTerm'] = (is_string($serendipity['GET']['searchTerm']) ? serendipity_specialchars(strip_tags($serendipity['GET']['searchTerm'])) : ''); } // Some stuff... diff --git a/templates/2k11/admin/category.inc.tpl b/templates/2k11/admin/category.inc.tpl index 596f15a7..2f5ab23b 100644 --- a/templates/2k11/admin/category.inc.tpl +++ b/templates/2k11/admin/category.inc.tpl @@ -1,25 +1,25 @@ {if $post_save} {if $new} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.CATEGORY_SAVED}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.CATEGORY_SAVED}</span> {/if} {if $edit} {if isset($editPermission) && $editPermission == false} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.PERM_DENIED}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.PERM_DENIED}</span> {else} {if $subcat}{$subcat}{else} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.CATEGORY_SAVED}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.CATEGORY_SAVED}</span> {/if} {/if} {/if} {if $error_name} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.CATEGORY_ALREADY_EXIST|sprintf:$category_name|escape}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.CATEGORY_ALREADY_EXIST|sprintf:$category_name|escape}</span> {/if} {/if} {if $doDelete} {if $deleteSuccess} - <span class="msg_success"><span class="icon-ok-circled"></span> {if $remainingCat}{$CONST.CATEGORY_DELETED_ARTICLES_MOVED|sprintf:$remainingCat:$cid}{else}{$cid|string_format:"{$CONST.CATEGORY_DELETED}"}{/if}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {if $remainingCat}{$CONST.CATEGORY_DELETED_ARTICLES_MOVED|sprintf:$remainingCat:$cid}{else}{$cid|string_format:"{$CONST.CATEGORY_DELETED}"}{/if}</span> {else} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.INVALID_CATEGORY}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.INVALID_CATEGORY}</span> {/if} {/if} {if $delete} @@ -54,7 +54,7 @@ <div id="category_basics" class="clearfix"> <div class="form_field"> <label for="category_name">{$CONST.NAME}</label> - <input id="category_name" pattern="{if $new}^(?!({foreach $categories as $cat}{$cat.category_name}|{/foreach})$).*{else}^(?!({foreach $categories as $cat}{if $this_cat.category_name != $cat.category_name}{$cat.category_name}{/if}|{/foreach})$).*{/if}" name="serendipity[cat][name]" type="text" value="{$this_cat.category_name|default:""|escape}" title="Categoryname"> + <input id="category_name" pattern="{if $new}^(?!({foreach $categories as $cat}{$cat.category_name|escape}|{/foreach})$).*{else}^(?!({foreach $categories as $cat}{if $this_cat.category_name != $cat.category_name}{$cat.category_name|escape}{/if}|{/foreach})$).*{/if}" name="serendipity[cat][name]" type="text" value="{$this_cat.category_name|default:""|escape}" title="{$CONST.CATEGORY}"> </div> <div class="form_field"> @@ -64,7 +64,7 @@ </div> <h3 class="toggle_headline"> - <button class="show_config_option icon_link {if $newSub}show_config_option_now{/if}" type="button" data-href="#category_subcats" title="{$CONST.TOGGLE_OPTION}"><span class="icon-right-dir"></span> {$CONST.PARENT_CATEGORY}</button> + <button class="show_config_option icon_link {if $newSub}show_config_option_now{/if}" type="button" data-href="#category_subcats" title="{$CONST.TOGGLE_OPTION}"><span class="icon-right-dir" aria-hidden="true"></span> {$CONST.PARENT_CATEGORY}</button> </h3> <div id="category_subcats" class="clearfix additional_info"> @@ -74,13 +74,13 @@ <option value="0"{if $cid == 0} selected{/if}>{$CONST.NO_CATEGORY}</option> {foreach $categories as $cat} {if $cat.categoryid == $cid}{continue}{/if} - <option value="{$cat.categoryid}"{if $this_cat.parentid == $cat.categoryid} selected{/if}>{for $i=1 to $cat.depth} {/for} {$cat.category_name}</option> + <option value="{$cat.categoryid}"{if $this_cat.parentid == $cat.categoryid} selected{/if}>{for $i=1 to $cat.depth} {/for} {$cat.category_name|escape}</option> {/foreach} </select> </div> <fieldset class="clearfix inputs"> - <span class="wrap_legend"><legend>{$CONST.CATEGORY_HIDE_SUB} <a class="toggle_info button_link" href="#hide_subcats_info"><span class="icon-info-circled"></span><span class="visuallyhidden"> More</span></a></legend></span> + <span class="wrap_legend"><legend>{$CONST.CATEGORY_HIDE_SUB} <a class="toggle_info button_link" href="#hide_subcats_info"><span class="icon-info-circled" aria-hidden="true"></span><span class="visuallyhidden"> More</span></a></legend></span> <span id="hide_subcats_info" class="field_info additional_info">{$CONST.CATEGORY_HIDE_SUB_DESC}</span> @@ -99,7 +99,7 @@ </div> <h3 class="toggle_headline"> - <button class="show_config_option icon_link" type="button" data-href="#category_permissions" title="{$CONST.TOGGLE_OPTION}"><span class="icon-right-dir"></span> {$CONST.PERMISSIONS}</button> + <button class="show_config_option icon_link" type="button" data-href="#category_permissions" title="{$CONST.TOGGLE_OPTION}"><span class="icon-right-dir" aria-hidden="true"></span> {$CONST.PERMISSIONS}</button> </h3> <div id="category_permissions" class="clearfix additional_info"> @@ -125,7 +125,7 @@ </div> <h3 class="toggle_headline"> - <button class="show_config_option icon_link" type="button" data-href="#category_preview" title="{$CONST.TOGGLE_OPTION}"><span class="icon-right-dir"></span> {$CONST.CATEGORY} {$CONST.IMAGE}</button> + <button class="show_config_option icon_link" type="button" data-href="#category_preview" title="{$CONST.TOGGLE_OPTION}"><span class="icon-right-dir" aria-hidden="true"></span> {$CONST.CATEGORY} {$CONST.IMAGE}</button> </h3> <div id="category_preview" class="clearfix additional_info"> @@ -134,7 +134,7 @@ <input id="category_icon" class="change_preview" name="serendipity[cat][icon]" type="text" data-configitem="category_icon" value="{$this_cat.category_icon|default:""|escape}"> - <button class="choose_media" type="button" name="insImage" title="{$CONST.MEDIA_LIBRARY}"><span class="icon-picture"></span><span class="visuallyhidden"> {$CONST.MEDIA_LIBRARY}</span></button> + <button class="choose_media" type="button" name="insImage" title="{$CONST.MEDIA_LIBRARY}"><span class="icon-picture" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MEDIA_LIBRARY}</span></button> </div> <figure id="category_icon_preview"> @@ -172,7 +172,7 @@ {/if} {$priorDepth=$category.depth} - + <li> <div class="clearfix {cycle values="odd,even"}"> <details class="category_data"> @@ -187,9 +187,9 @@ </details> <ul class="plainList clearfix edit_actions"> - <li><a class="button_link" href="?serendipity[adminModule]=category&serendipity[adminAction]=edit&serendipity[cid]={$category.categoryid}" title="{$CONST.EDIT} {$category.category_name|escape}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li> - <li><a class="button_link" href="?serendipity[adminModule]=category&serendipity[adminAction]=newSub&serendipity[cid]={$category.categoryid}" title="{$CONST.CREATE_NEW_CAT}"><span class="icon-plus"></span><span class="visuallyhidden"> {$CONST.CREATE_NEW_CAT}</span></a></li> - <li><a class="button_link" href="?serendipity[adminModule]=category&serendipity[adminAction]=delete&serendipity[cid]={$category.categoryid}" title="{$CONST.DELETE} {$category.category_name|escape}"><span class="icon-trash"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a></li> + <li><a class="button_link" href="?serendipity[adminModule]=category&serendipity[adminAction]=edit&serendipity[cid]={$category.categoryid}" title="{$CONST.EDIT} {$category.category_name|escape}"><span class="icon-edit" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li> + <li><a class="button_link" href="?serendipity[adminModule]=category&serendipity[adminAction]=newSub&serendipity[cid]={$category.categoryid}" title="{$CONST.CREATE_NEW_CAT}"><span class="icon-plus" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.CREATE_NEW_CAT}</span></a></li> + <li><a class="button_link" href="?serendipity[adminModule]=category&serendipity[adminAction]=delete&serendipity[cid]={$category.categoryid}" title="{$CONST.DELETE} {$category.category_name|escape}"><span class="icon-trash" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a></li> </ul> </div> {/foreach} @@ -199,7 +199,7 @@ {/for} </ul> {else} - <span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.NO_CATEGORIES}</span> + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.NO_CATEGORIES}</span> {/if} <a class="button_link" href="?serendipity[adminModule]=category&serendipity[adminAction]=new">{$CONST.CREATE_NEW_CAT}</a> -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/comments.inc.tpl b/templates/2k11/admin/comments.inc.tpl index d343c944..4baad0ba 100644 --- a/templates/2k11/admin/comments.inc.tpl +++ b/templates/2k11/admin/comments.inc.tpl @@ -1,11 +1,15 @@ {if !empty($errormsg)} - <span class="msg_error"><span class="icon-attention"></span> {$errormsg}</span> + {foreach $errormsg as $show_errormsg} + <span class="msg_error"><span class="icon-attention" aria-hidden="true"></span> {$show_errormsg}</span> + {/foreach} {/if} {if !empty($msg)} - <span class="msg_notice"><span class="icon-info-circled"></span> {$msg}</span> + {foreach $msg as $show_msg} + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$show_msg}</span> + {/foreach} {/if} {if $commentReplied} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.COMMENT_ADDED}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.COMMENT_ADDED}</span> <button id="comment_replied" type="button">{$CONST.BACK}</button> {else} <h2>{$CONST.COMMENTS}</h2> @@ -16,7 +20,7 @@ <input name="serendipity[page]" type="hidden" value="{$page}"> <ul class="filters_toolbar plainList"> - <li><a class="button_link" href="#filter_comments" title="{$CONST.FILTERS}"><span class="icon-filter"></span><span class="visuallyhidden"> {$CONST.FILTERS}</span></a></li> + <li><a class="button_link" href="#filter_comments" title="{$CONST.FILTERS}"><span class="icon-filter" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.FILTERS}</span></a></li> <li><div class="backend_comments">{$backend_comments_top}</div></li> </ul> @@ -90,8 +94,8 @@ </fieldset> </form> {if !is_array($sql)} - - <span class="msg_notice"><span class="icon-info-circled"></span> + + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {if $c_type == 'TRACKBACK'} {$CONST.NO_TRACKBACKS} {else if $c_type == 'PINGBACK'} @@ -118,8 +122,8 @@ <h4 id="c{$comment.id}">{$comment.author|escape|truncate:40:"…"} {$CONST.IN} {($comment.type == 'NORMAL') ? $CONST.COMMENT : (($comment.type == 'TRACKBACK') ? $CONST.TRACKBACK : $CONST.PINGBACK )} #{$comment.id} - {$CONST.IN_REPLY_TO} <a href="{$comment.entry_url}">{$comment.title|escape}</a> - {$CONST.ON} {$comment.timestamp|@formatTime:'%b %e %Y, %H:%M'} - <button class="toggle_info button_link" type="button" data-href="#comment_data_{$comment.id}"><span class="icon-info-circled"></span><span class="visuallyhidden"> More</span></button> + {$CONST.ON} {$comment.timestamp|formatTime:'%b %e %Y, %H:%M'} + <button class="toggle_info button_link" type="button" data-href="#comment_data_{$comment.id}"><span class="icon-info-circled" aria-hidden="true"></span><span class="visuallyhidden"> More</span></button> </h4> {if ($comment.status == 'pending') || ($comment.status == 'confirm')} <span class="comment_status">{$CONST.COMMENTS_FILTER_NEED_APPROVAL}</span> @@ -144,19 +148,19 @@ <div id="c{$comment.id}_full" class="comment_full additional_info">{$comment.fullBody}</div> <ul class="plainList clearfix actions"> - <li><a class="button_link" href="{$comment.entrylink}" title="{$CONST.VIEW}"><span class="icon-search"></span><span class="visuallyhidden"> {$CONST.VIEW}</span></a></li> - <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=edit&serendipity[id]={$comment.id}&serendipity[entry_id]={$comment.entry_id}&{$urltoken}" title="{$CONST.EDIT}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li> - <li><a class="button_link comments_reply" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=reply&serendipity[id]={$comment.id}&serendipity[entry_id]={$comment.entry_id}&serendipity[noBanner]=true&serendipity[noSidebar]=true&{$urltoken}" title="{$CONST.REPLY}"><span class="icon-chat"></span><span class="visuallyhidden"> {$CONST.REPLY}</span></a></li> + <li><a class="button_link" href="{$comment.entrylink}" title="{$CONST.VIEW}"><span class="icon-search" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.VIEW}</span></a></li> + <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=edit&serendipity[id]={$comment.id}&serendipity[entry_id]={$comment.entry_id}&{$urltoken}" title="{$CONST.EDIT}"><span class="icon-edit" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li> + <li><a class="button_link comments_reply" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=reply&serendipity[id]={$comment.id}&serendipity[entry_id]={$comment.entry_id}&serendipity[noBanner]=true&serendipity[noSidebar]=true&{$urltoken}" title="{$CONST.REPLY}"><span class="icon-chat" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.REPLY}</span></a></li> {if ($comment.status == 'pending') || ($comment.status == 'confirm')} - <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=approve&serendipity[id]={$comment.id}&{$urltoken}" title="{$CONST.APPROVE}"><span class="icon-thumbs-up-alt"></span><span class="visuallyhidden">{$CONST.APPROVE}</span></a></li> + <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=approve&serendipity[id]={$comment.id}&{$urltoken}" title="{$CONST.APPROVE}"><span class="icon-thumbs-up-alt" aria-hidden="true"></span><span class="visuallyhidden">{$CONST.APPROVE}</span></a></li> {/if} {if ($comment.status == 'approved')} - <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=pending&serendipity[id]={$comment.id}&{$urltoken}" title="{$CONST.SET_TO_MODERATED}"><span class="icon-thumbs-down-alt"></span><span class="visuallyhidden"> {$CONST.SET_TO_MODERATED}</span></a></li> + <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=pending&serendipity[id]={$comment.id}&{$urltoken}" title="{$CONST.SET_TO_MODERATED}"><span class="icon-thumbs-down-alt" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.SET_TO_MODERATED}</span></a></li> {/if} - <li><a class="button_link comments_delete" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=delete&serendipity[id]={$comment.id}&serendipity[entry_id]={$comment.entry_id}&{$urltoken}" data-delmsg='{($CONST.COMMENT_DELETE_CONFIRM|sprintf:$comment.id:$comment.author)|escape}' title="{$CONST.DELETE}"><span class="icon-trash"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a> + <li><a class="button_link comments_delete" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=delete&serendipity[id]={$comment.id}&serendipity[entry_id]={$comment.entry_id}&{$urltoken}" data-delmsg='{($CONST.COMMENT_DELETE_CONFIRM|sprintf:$comment.id:$comment.author)|escape}' title="{$CONST.DELETE}"><span class="icon-trash" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a> </li> {if $comment.excerpt} - <li><button class="button_link toggle_comment_full" type="button" data-href="#c{$comment.id}_full" title="{$CONST.TOGGLE_ALL}"><span class="icon-right-dir"></span><span class="visuallyhidden"> {$CONST.TOGGLE_ALL}</span></button></li> + <li><button class="button_link toggle_comment_full" type="button" data-href="#c{$comment.id}_full" title="{$CONST.TOGGLE_ALL}"><span class="icon-right-dir" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.TOGGLE_ALL}</span></button></li> {/if} </ul> {$comment.action_more} @@ -167,10 +171,10 @@ {if ($page != 1 && $page <= $pages)||$page != $pages} <nav class="pagination"> <h3>{$CONST.PAGE_BROWSE_COMMENTS|sprintf:$page:$pages:$totalComments}</h3> - + <ul class="clearfix"> - <li class="prev">{if ($page != 1 && $page <= $pages)}<a class="button_link" href="{$linkPrevious}" title="{$CONST.PREVIOUS}"><span class="icon-left-dir"></span><span class="visuallyhidden"> {$CONST.PREVIOUS}</span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li> - <li class="next">{if $page != $pages}<a class="button_link" href="{$linkNext}" title="{$CONST.NEXT}"><span class="visuallyhidden">{$CONST.NEXT} </span><span class="icon-right-dir"></span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li> + <li class="prev">{if ($page != 1 && $page <= $pages)}<a class="button_link" href="{$linkPrevious}" title="{$CONST.PREVIOUS}"><span class="icon-left-dir" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.PREVIOUS}</span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li> + <li class="next">{if $page != $pages}<a class="button_link" href="{$linkNext}" title="{$CONST.NEXT}"><span class="visuallyhidden">{$CONST.NEXT} </span><span class="icon-right-dir" aria-hidden="true"></span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li> </ul> </nav> {/if} @@ -183,4 +187,4 @@ </div> </form> {/if} -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/config_template.tpl b/templates/2k11/admin/config_template.tpl index 0df15c6e..c65e6936 100644 --- a/templates/2k11/admin/config_template.tpl +++ b/templates/2k11/admin/config_template.tpl @@ -4,16 +4,16 @@ <input type="hidden" name="installAction" value="check"> {$formToken} {/if} -{if $config|@sizeof > 1 AND $allowToggle} - <a id="show_config_all" class="button_link" href="#serendipity_config_options" title="{$CONST.TOGGLE_ALL}"><span class="icon-right-dir"></span><span class="visuallyhidden"> {$CONST.TOGGLE_ALL}</span></a> +{if $config|sizeof > 1 AND $allowToggle} + <a id="show_config_all" class="button_link" href="#serendipity_config_options" title="{$CONST.TOGGLE_ALL}"><span class="icon-right-dir" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.TOGGLE_ALL}</span></a> {/if} <div id="serendipity_config_options"> {foreach $config as $category} <div class="configuration_group"> - {if $config|@sizeof > 1} + {if $config|sizeof > 1} {if $allowToggle} <h3 class="toggle_headline"> - <button id="optionel{$category@iteration}" class="show_config_option icon_link {if $category@first}show_config_option_now{/if}" type="button" data-href="#el{$category@index}" title="{$CONST.TOGGLE_OPTION}"><span class="icon-right-dir"></span> {$category.title}</button> + <button id="optionel{$category@iteration}" class="show_config_option icon_link {if $category@first}show_config_option_now{/if}" type="button" data-href="#el{$category@index}" title="{$CONST.TOGGLE_OPTION}"><span class="icon-right-dir" aria-hidden="true"></span> {$category.title}</button> </h3> {else} <h3>{$category.title}</h3> @@ -27,7 +27,7 @@ {if $item.guessedInput} {if $item.type == 'bool'} <fieldset class="clearfix {$zebra_class}{if $item.description != ''} has_info{/if}"> - <span class="wrap_legend"><legend>{$item.title}{if $item.description != ''} <button class="toggle_info button_link" type="button" data-href="#{$item.var}_info"><span class="icon-info-circled"></span><b>i</b><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</legend></span> + <span class="wrap_legend"><legend>{$item.title}{if $item.description != ''} <button class="toggle_info button_link" type="button" data-href="#{$item.var}_info"><span class="icon-info-circled" aria-hidden="true"></span><b>i</b><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</legend></span> {if $item.description != ''} <span id="{$item.var}_info" class="field_info additional_info">{$item.description}</span> {/if} @@ -36,8 +36,11 @@ </div> </fieldset> {else} - <div class="clearfix {$zebra_class} form_{if $item.type == 'list'}select{elseif $item.type == 'multilist'}multiselect{elseif $item.type == 'textarea'}area{else}field{/if}{if $item.description != ''} has_info{/if}" {if $item.ignore}style="display: none;"{/if}> - <label for="{$item.var}">{$item.title}{if $item.description != ''} <button class="toggle_info button_link" type="button" data-href="#{$item.var}_info"><span class="icon-info-circled"></span><b>i</b><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</label> + {if $item.ignore} + {cycle advance=true assign='temp'} + {/if} + <div class="clearfix {$zebra_class} form_{if $item.type == 'list'}select{elseif $item.type == 'multilist'}multiselect{elseif $item.type == 'textarea'}area{else}field{/if}{if $item.description != ''} has_info{/if}{if $item.ignore} hidden{/if}"> + <label for="{$item.var}">{$item.title}{if $item.description != ''} <button class="toggle_info button_link" type="button" data-href="#{$item.var}_info"><span class="icon-info-circled" aria-hidden="true"></span><b>i</b><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</label> {if $item.description != ''} <span id="{$item.var}_info" class="field_info additional_info">{$item.description}</span> {/if} @@ -55,4 +58,4 @@ <input type="submit" value="{$CONST.CHECK_N_SAVE}"> </div> </form> -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/configuration.inc.tpl b/templates/2k11/admin/configuration.inc.tpl index 1faf336b..d15cc933 100644 --- a/templates/2k11/admin/configuration.inc.tpl +++ b/templates/2k11/admin/configuration.inc.tpl @@ -3,20 +3,20 @@ {if $diagnosticError} <h2>{$CONST.DIAGNOSTIC_ERROR}</h2> {foreach $res as $r} - <span class="msg_error"><span class="icon-attention-circled"></span> {$r}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$r}</span> {/foreach} {else} {if $htaccessRewrite} <h2>{$CONST.ATTEMPT_WRITE_FILE|sprintf:"{$serendipityPath}htaccess"}</h2> {if is_array($res)} {foreach $res as $r} - <span class="msg_notice"><span class="icon-info-circled"></span> {$r}</span> + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$r}</span> {/foreach} {else} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.DONE}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.DONE}</span> {/if} {/if} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.WRITTEN_N_SAVED}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.WRITTEN_N_SAVED}</span> {/if} {/if} -{$config} +{$config} \ No newline at end of file diff --git a/templates/2k11/admin/entries.inc.tpl b/templates/2k11/admin/entries.inc.tpl index 41040fdb..959659c4 100644 --- a/templates/2k11/admin/entries.inc.tpl +++ b/templates/2k11/admin/entries.inc.tpl @@ -8,10 +8,10 @@ <input name="serendipity[adminAction]" type="hidden" value="editSelect"> <ul class="filters_toolbar plainList"> - <li><a class="button_link" href="#filter_entries" title="{$CONST.FILTERS}"><span class="icon-filter"></span><span class="visuallyhidden"> {$CONST.FILTERS}</span></a></li> - <li><a class="button_link" href="#sort_entries" title="{$CONST.SORT_ORDER}"><span class="icon-sort"></span><span class="visuallyhidden"> {$CONST.SORT_ORDER}</span></a></li> + <li><a class="button_link" href="#filter_entries" title="{$CONST.FILTERS}"><span class="icon-filter" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.FILTERS}</span></a></li> + <li><a class="button_link" href="#sort_entries" title="{$CONST.SORT_ORDER}"><span class="icon-sort" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.SORT_ORDER}</span></a></li> {if NOT $simpleFilters} - <li><a class="button_link" href="#entry_skip" title="{$CONST.EDIT_ENTRY} #"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.EDIT_ENTRY} #</span></a></li> + <li><a class="button_link" href="#entry_skip" title="{$CONST.EDIT_ENTRY} #"><span class="icon-edit" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.EDIT_ENTRY} #</span></a></li> {/if} </ul> @@ -23,12 +23,12 @@ <label for="filter_author">{$CONST.AUTHOR}</label> <select id="filter_author" name="serendipity[filter][author]"> <option value="">-</option> - {if is_array($users)} - {foreach $users AS $user} + {if is_array($users)} + {foreach $users AS $user} {if isset($user.artcount) && $user.artcount < 1}{continue}{/if} <option value="{$user.authorid}" {(isset($get.filter.author) && ($get.filter.author == $user.authorid)) ? 'selected' : ''}>{$user.realname|escape}</option> - {/foreach} - {/if} + {/foreach} + {/if} </select> </div> @@ -146,17 +146,17 @@ <ul class="plainList clearfix actions"> {if $entry.preview || (!$showFutureEntries && ($entry.timestamp >= $serverOffsetHour))} - <li><a class="button_link" href="{$entry.preview_link}" title="{$CONST.PREVIEW} #{$entry.id}"><span class="icon-search"></span><span class="visuallyhidden"> {$CONST.PREVIEW}</span></a></li> + <li><a class="button_link" href="{$entry.preview_link}" title="{$CONST.PREVIEW} #{$entry.id}"><span class="icon-search" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.PREVIEW}</span></a></li> {else} - <li><a class="button_link" href="{$entry.archive_link}" title="{$CONST.VIEW} #{$entry.id}"><span class="icon-search"></span><span class="visuallyhidden"> {$CONST.VIEW}</span></a></li> + <li><a class="button_link" href="{$entry.archive_link}" title="{$CONST.VIEW} #{$entry.id}"><span class="icon-search" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.VIEW}</span></a></li> {/if} - <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=edit&serendipity[id]={$entry.id}" title="{$CONST.EDIT} #{$entry.id}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li> - <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=delete&serendipity[id]={$entry.id}&{$urltoken}" title="{$CONST.DELETE} #{$entry.id}"><span class="icon-trash"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a></li> + <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=edit&serendipity[id]={$entry.id}" title="{$CONST.EDIT} #{$entry.id}"><span class="icon-edit" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li> + <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=delete&serendipity[id]={$entry.id}&{$urltoken}" title="{$CONST.DELETE} #{$entry.id}"><span class="icon-trash" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a></li> </ul> <div class="entry_info clearfix"> <span class="status_timestamp"> - {$entry.timestamp|@formatTime:"{$CONST.DATE_FORMAT_SHORT}"}{if $entry.timestamp <= ($entry.last_modified - 1800)} <span class="icon-info-circled" title="{$CONST.LAST_UPDATED}: {$entry.last_modified|@formatTime:"{$CONST.DATE_FORMAT_SHORT}"}"></span><span class="visuallyhidden"> {$CONST.LAST_UPDATED}</span>{/if} + {$entry.timestamp|formatTime:"{$CONST.DATE_FORMAT_SHORT}"}{if $entry.timestamp <= ($entry.last_modified - 1800)} <span class="icon-info-circled" aria-hidden="true" title="{$CONST.LAST_UPDATED}: {$entry.last_modified|formatTime:"{$CONST.DATE_FORMAT_SHORT}"}"></span><span class="visuallyhidden"> {$CONST.LAST_UPDATED}</span>{/if} </span> <span class="entry_meta">{$CONST.POSTED_BY} {$entry.author|escape} @@ -175,6 +175,7 @@ {if $entry.isdraft} <span class="entry_status status_draft">{$CONST.DRAFT}</span> {/if} + {$entry.info_more} </div> </li> {/foreach} @@ -185,11 +186,11 @@ <h3>{$CONST.PAGE_BROWSE_ENTRIES|sprintf:($page+1):$totalPages:$totalEntries}</h3> <ul class="clearfix"> - <li class="first">{if ($page) > 0}<a class="button_link" href="{$linkFirst}" title="{$CONST.FIRST_PAGE}"><span class="visuallyhidden">{$CONST.FIRST_PAGE} </span><span class="icon-to-start"></span></a>{/if}</li> - <li class="prev">{if ($offSet > 0)}<a class="button_link" href="{$linkPrevious}" title="{$CONST.PREVIOUS}"><span class="icon-left-dir"></span><span class="visuallyhidden"> {$CONST.PREVIOUS}</span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li> + <li class="first">{if ($page) > 0}<a class="button_link" href="{$linkFirst}" title="{$CONST.FIRST_PAGE}"><span class="visuallyhidden">{$CONST.FIRST_PAGE} </span><span class="icon-to-start" aria-hidden="true"></span></a>{/if}</li> + <li class="prev">{if ($offSet > 0)}<a class="button_link" href="{$linkPrevious}" title="{$CONST.PREVIOUS}"><span class="icon-left-dir" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.PREVIOUS}</span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li> {* Looks weird, but last will be placed to end by the CSS float:right *} - <li class="last">{if ($page+1) < $totalPages}<a class="button_link" href="{$linkLast}{$totalPages-1}" title="{$CONST.LAST_PAGE}"><span class="visuallyhidden">{$CONST.LAST_PAGE} </span><span class="icon-to-end"></span></a>{/if}</li> - <li class="next">{if ($count > $perPage)}<a class="button_link" href="{$linkNext}" title="{$CONST.NEXT}"><span class="visuallyhidden">{$CONST.NEXT} </span><span class="icon-right-dir"></span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li> + <li class="last">{if ($page+1) < $totalPages}<a class="button_link" href="{$linkLast}{$totalPages-1}" title="{$CONST.LAST_PAGE}"><span class="visuallyhidden">{$CONST.LAST_PAGE} </span><span class="icon-to-end" aria-hidden="true"></span></a>{/if}</li> + <li class="next">{if ($count > $perPage)}<a class="button_link" href="{$linkNext}" title="{$CONST.NEXT}"><span class="visuallyhidden">{$CONST.NEXT} </span><span class="icon-right-dir" aria-hidden="true"></span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li> </ul> </nav> {/if} @@ -206,36 +207,36 @@ {if $no_entries} <h2>{$CONST.FIND_ENTRIES}</h2> - <span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.NO_ENTRIES_TO_PRINT}</span> + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.NO_ENTRIES_TO_PRINT}</span> {/if} {if $switched_output} {if ($get.adminAction && $dateval)} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.DATE_INVALID}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.DATE_INVALID}</span> {/if} {if ($get.adminAction && $use_legacy)} {if $is_draft && ! $errors} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.IFRAME_SAVE_DRAFT}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.IFRAME_SAVE_DRAFT}</span> {/if} {if $is_iframe} {if $iframe === true && isset($smarty.post.serendipity.properties.lang_selected)} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.PLUGIN_EVENT_MULTILINGUAL_ENTRY_RELOADED|sprintf:{(''==$smarty.post.serendipity.properties.lang_selected)?$lang:$smarty.post.serendipity.properties.lang_selected}}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.PLUGIN_EVENT_MULTILINGUAL_ENTRY_RELOADED|sprintf:{(''==$smarty.post.serendipity.properties.lang_selected)?$lang:$smarty.post.serendipity.properties.lang_selected}}</span> {else} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.IFRAME_SAVE}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.IFRAME_SAVE}</span> {/if} {/if} {if $is_iframepreview} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.IFRAME_PREVIEW}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.IFRAME_PREVIEW}</span> {/if} {/if} {if ($is_doDelete || $is_doMultiDelete )} {foreach $del_entry AS $delent} - <span class="msg_hint"><span class="icon-help-circled"></span> {$delent}</span> + <span class="msg_hint"><span class="icon-help-circled" aria-hidden="true"></span> {$delent}</span> {/foreach} {/if} {if ( $is_delete || $is_multidelete )} {foreach $rip_entry AS $ripent} - <span class="msg_hint"><span class="icon-help-circled"></span> {$ripent}</span> + <span class="msg_hint"><span class="icon-help-circled" aria-hidden="true"></span> {$ripent}</span> {/foreach} <div class="form_buttons"> <a class="button_link state_cancel icon_link" href="{$smarty.server.HTTP_REFERER|escape}">{$CONST.NOT_REALLY}</a> diff --git a/templates/2k11/admin/entries.tpl b/templates/2k11/admin/entries.tpl index 44a671dd..6c6a323d 100644 --- a/templates/2k11/admin/entries.tpl +++ b/templates/2k11/admin/entries.tpl @@ -1,6 +1,6 @@ <h2>{if $entry_vars.entry.title}{$CONST.EDIT_ENTRY}{else}{$CONST.NEW_ENTRY}{/if}</h2> {if $entry_vars.errMsg} - <span class="msg_error"><span class="icon-attention-circled"></span> {$entry_vars.errMsg}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$entry_vars.errMsg}</span> {/if} <form id="serendipityEntry" name="serendipityEntry" {$entry_vars.entry.entry_form} action="{$entry_vars.targetURL}" method="post"> {foreach $entry_vars.hiddens as $key => $value} @@ -78,18 +78,21 @@ </div> <div id="edit_entry_submit"> - <button id="reset_timestamp" class="button_link" type="button" href="#serendipityNewTimestamp" data-currtime="{$entry_vars.reset_timestamp|@formatTime:'Y-m-d\TH:i':true:false:true}" title="{$CONST.RESET_DATE_DESC}"><span class="icon-clock"></span><span class="visuallyhidden"> {$CONST.RESET_DATE}</span></button> - <a id="select_category" class="button_link icon_link" href="#edit_entry_category" title="{$CONST.CATEGORY}"><span class="icon-list-bullet"></span><span class="visuallyhidden">{$CONST.CATEGORIES}</span></a> + <button id="reset_timestamp" class="button_link" type="button" href="#serendipityNewTimestamp" data-currtime="{$entry_vars.reset_timestamp|formatTime:'Y-m-d\TH:i':true:false:true}" title="{$CONST.RESET_DATE_DESC}"><span class="icon-clock" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.RESET_DATE}</span></button> + <a id="select_category" class="button_link icon_link" href="#edit_entry_category" title="{$CONST.CATEGORY}"><span class="icon-list-bullet" aria-hidden="true"></span><span class="visuallyhidden">{$CONST.CATEGORIES}</span></a> {if class_exists('serendipity_event_freetag')} - <a id="select_tags" class="button_link icon_link" href="#edit_entry_freetags" title="{$CONST.PLUGIN_EVENT_FREETAG_MANAGETAGS}"><span class="icon-tag"></span><span class="visuallyhidden">{$CONST.PLUGIN_EVENT_FREETAG_MANAGETAGS}</span></a> + <a id="select_tags" class="button_link icon_link" href="#edit_entry_freetags" title="{$CONST.PLUGIN_EVENT_FREETAG_MANAGETAGS}"><span class="icon-tag" aria-hidden="true"></span><span class="visuallyhidden">{$CONST.PLUGIN_EVENT_FREETAG_MANAGETAGS}</span></a> {/if} - <button id="switch_entry_status" class="button_link" type="button" href="#edit_entry_status" title="{if $entry_vars.draft_mode == 'publish'}{$CONST.PUBLISH}{else}{$CONST.DRAFT}{/if}" data-title-alt="{if $entry_vars.draft_mode == 'publish'}{$CONST.DRAFT}{else}{$CONST.PUBLISH}{/if}">{if $entry_vars.draft_mode == 'publish'}<span class="icon-toggle-on"></span><span class="visuallyhidden"> {$CONST.PUBLISH}</span>{else}<span class="icon-toggle-off"></span><span class="visuallyhidden"> {$CONST.DRAFT}</span>{/if}</button> + <button id="switch_entry_status" class="button_link" type="button" href="#edit_entry_status" title="{if $entry_vars.draft_mode == 'publish'}{$CONST.PUBLISH}{else}{$CONST.DRAFT}{/if}" data-title-alt="{if $entry_vars.draft_mode == 'publish'}{$CONST.DRAFT}{else}{$CONST.PUBLISH}{/if}">{if $entry_vars.draft_mode == 'publish'}<span class="icon-toggle-on" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.PUBLISH}</span>{else}<span class="icon-toggle-off" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.DRAFT}</span>{/if}</button> + {if $entry_vars.entry.id} + <a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=delete&serendipity[id]={$entry_vars.entry.id}&{$entry_vars.urlToken}" title="{$CONST.DELETE}"><span class="icon-trash" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a> + {/if} <input class="entry_preview" type="submit" value="{$CONST.PREVIEW}"> <input type="submit" value="{$CONST.SAVE}"> </div> <div id="edit_entry_metadata" class="clearfix"> - <button id="toggle_metadata" class="icon_link" type="button"><span class="icon-right-dir"></span> {$CONST.ENTRY_METADATA}</button> + <button id="toggle_metadata" class="icon_link" type="button"><span class="icon-right-dir" aria-hidden="true"></span> {$CONST.ENTRY_METADATA}</button> <div id="meta_data" class="additional_info"> {if $entry_vars.allowDateManipulation} @@ -97,7 +100,7 @@ <input name="serendipity[chk_timestamp]" type="hidden" value="{$entry_vars.timestamp|escape}"> <label for="serendipityNewTimestamp">{$CONST.DATE}</label> - <input id="serendipityNewTimestamp" name="serendipity[new_timestamp]" type="datetime-local" value="{$entry_vars.timestamp|@formatTime:'Y-m-d\TH:i':true:false:true}"> + <input id="serendipityNewTimestamp" name="serendipity[new_timestamp]" type="datetime-local" value="{$entry_vars.timestamp|formatTime:'Y-m-d\TH:i':true:false:true}"> </div> {/if} <div id="edit_entry_status" class="form_select"> @@ -131,8 +134,8 @@ <div id="category_filter" class="form_field"> <label for="categoryfilter" class="visuallyhidden">{$CONST.FILTERS}</label> <input id="categoryfilter" type="text" placeholder="{$CONST.FILTERS}: {$CONST.CATEGORIES}"> - <button class="reset_livefilter icon_link" type="button" data-target="categoryfilter" title="{$CONST.RESET_FILTERS}"><span class="icon-cancel"></span><span class="visuallyhidden">{$CONST.RESET_FILTERS}</span></button> - <button id="toggle_cat_view" class="icon_link" type="button" title="{$CONST.TOGGLE_VIEW}"><span class="icon-th"></span><span class="visuallyhidden">{$CONST.TOGGLE_VIEW}</span></button> + <button class="reset_livefilter icon_link" type="button" data-target="categoryfilter" title="{$CONST.RESET_FILTERS}"><span class="icon-cancel" aria-hidden="true"></span><span class="visuallyhidden">{$CONST.RESET_FILTERS}</span></button> + <button id="toggle_cat_view" class="icon_link" type="button" title="{$CONST.TOGGLE_VIEW}"><span class="icon-th" aria-hidden="true"></span><span class="visuallyhidden">{$CONST.TOGGLE_VIEW}</span></button> </div> {foreach from=$entry_vars.category_options item="entry_cat"} @@ -144,19 +147,21 @@ <label for="serendipity_category_{$entry_cat.categoryid}">{$entry_cat.category_name|escape}</label> </div> {/foreach} + </fieldset> </div> </div> </div> - {capture name='advanced_options'}{$entry_vars.entry|@serendipity_refhookPlugin:'backend_display'}{/capture} - {if ! empty($smarty.capture.advanced_options) } - <div id="advanced_options"> - <button id="toggle_advanced" class="icon_link" type="button"><span class="icon-right-dir"></span> {$CONST.ADVANCED_OPTIONS}</button> - <div id="adv_opts" class="additional_info"> + {capture name='advanced_options'}{$entry_vars.entry|serendipity_refhookPlugin:'backend_display'}{/capture} + {if !empty($smarty.capture.advanced_options)} + + <div id="advanced_options"> + <button id="toggle_advanced" class="icon_link" type="button"><span class="icon-right-dir" aria-hidden="true"></span> {$CONST.ADVANCED_OPTIONS}</button> + <div id="adv_opts" class="additional_info"> {$smarty.capture.advanced_options} - </div> </div> + </div> {/if} </form> @@ -164,5 +169,5 @@ {foreach from=$entry_vars.wysiwyg_blocks item="wysiwyg_block_item" key="wysiwyg_block_jsname"} {$wysiwyg_block_item|emit_htmlarea_code:$wysiwyg_block_jsname} {/foreach} - {$entry_vars.wysiwyg_blocks|@serendipity_refhookPlugin:'backend_wysiwyg_finish'} -{/if} + {$entry_vars.wysiwyg_blocks|serendipity_refhookPlugin:'backend_wysiwyg_finish'} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/groups.inc.tpl b/templates/2k11/admin/groups.inc.tpl index 142fd466..38792309 100644 --- a/templates/2k11/admin/groups.inc.tpl +++ b/templates/2k11/admin/groups.inc.tpl @@ -1,11 +1,11 @@ {if $delete_yes} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.DELETED_GROUP|sprintf:"{$group_id|escape}":"{$group.name|escape}"}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.DELETED_GROUP|sprintf:"{$group_id|escape}":"{$group.name|escape}"}</span> {/if} {if $save_new} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.CREATED_GROUP|sprintf:"{$group_id|escape}":"{$group.name|escape}"}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.CREATED_GROUP|sprintf:"{$group_id|escape}":"{$group.name|escape}"}</span> {/if} {if $save_edit} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.MODIFIED_GROUP|sprintf:"{$name|escape}"}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.MODIFIED_GROUP|sprintf:"{$name|escape}"}</span> {/if} {if !$delete} @@ -14,10 +14,10 @@ <ul id="serendipity_groups" class="plainList zebra_list"> {foreach $groups as $group} <li class="clearfix {cycle values="odd,even"}"> - <span class="group_name"><span class="icon-users"></span> {$group.name|escape}</span> + <span class="group_name"><span class="icon-users" aria-hidden="true"></span> {$group.name|escape}</span> <ul class="plainList clearfix edit_actions"> - <li><a class="button_link" href="?serendipity[adminModule]=groups&serendipity[adminAction]=edit&serendipity[group]={$group.id}" title="{$CONST.EDIT} {$group.name|escape}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li> - <li><a class="button_link" href="?{$deleteFormToken}&serendipity[adminModule]=groups&serendipity[adminAction]=delete&serendipity[group]={$group.id}" title="{$CONST.DELETE} {$group.name|escape}"><span class="icon-trash"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a></li> + <li><a class="button_link" href="?serendipity[adminModule]=groups&serendipity[adminAction]=edit&serendipity[group]={$group.id}" title="{$CONST.EDIT} {$group.name|escape}"><span class="icon-edit" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li> + <li><a class="button_link" href="?{$deleteFormToken}&serendipity[adminModule]=groups&serendipity[adminAction]=delete&serendipity[group]={$group.id}" title="{$CONST.DELETE} {$group.name|escape}"><span class="icon-trash" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a></li> </ul> </li> {/foreach} @@ -36,7 +36,7 @@ <input name="serendipity[group]" type="hidden" value="{$from.id}"> {/if} <div class="clearfix odd form_field has_info"> - <label for="group_name">{$CONST.NAME} <button class="toggle_info button_link" type="button" data-href="#groupName_info"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.MORE}</span></button></label> + <label for="group_name">{$CONST.NAME} <button class="toggle_info button_link" type="button" data-href="#groupName_info"><span class="icon-info-circled" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MORE}</span></button></label> <span id="groupName_info" class="field_info additional_info">{$CONST.GROUP_NAME_DESC}</span> <input id="group_name" name="serendipity[name]" type="text" value="{$from.name|escape}"> </div> @@ -106,7 +106,7 @@ </select> </div> {else} - <span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.PERMISSION_FORBIDDEN_ENABLE_DESC}</span> + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.PERMISSION_FORBIDDEN_ENABLE_DESC}</span> {/if} <div class="form_buttons"> {if $edit} @@ -123,12 +123,12 @@ <h2>{$CONST.MANAGE_GROUPS}</h2> - <span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.DELETE_GROUP|sprintf:"{$group_id}":"{$group.name|escape}"}</span> - + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.DELETE_GROUP|sprintf:"{$group_id}":"{$group.name|escape}"}</span> + <div id="groups_delete_action" class="form_buttons"> <input class="state_cancel" name="NO" type="submit" value="{$CONST.NOT_REALLY}"> <input name="DELETE_YES" type="submit" value="{$CONST.DUMP_IT}"> </div> </form> {/if} -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/images.inc.tpl b/templates/2k11/admin/images.inc.tpl index efa6c63c..8109cf39 100644 --- a/templates/2k11/admin/images.inc.tpl +++ b/templates/2k11/admin/images.inc.tpl @@ -4,21 +4,21 @@ {if $case_doSync} {if !$perm_adminImagesSync} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.PERM_DENIED}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.PERM_DENIED}</span> {else} <h2>{$CONST.SYNCING}</h2> - <span class="msg_success"><span class="icon-ok-circled"></span> {$print_SYNC_DONE}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$print_SYNC_DONE}</span> <h2>{$CONST.RESIZING}</h2> - <span class="msg_success"><span class="icon-ok-circled"></span> {$print_RESIZE_DONE}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$print_RESIZE_DONE}</span> {/if} {/if} {if $case_delete} <h2>{$CONST.MEDIA_DELETE}</h2> - <span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.ABOUT_TO_DELETE_FILE|sprintf:"$file"}</span> + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.ABOUT_TO_DELETE_FILE|sprintf:"$file"}</span> <form id="delete_image" method="get"> <div class="form_buttons"> @@ -29,9 +29,9 @@ {/if} {if $case_multidelete} <form id="delete_image" method="get"> - <span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.ABOUT_TO_DELETE_FILES}</span> + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.ABOUT_TO_DELETE_FILES}</span> {foreach $rip_image AS $ripimg} - <span class="msg_hint"><span class="icon-help-circled"></span> {$ripimg}</span> + <span class="msg_hint"><span class="icon-help-circled" aria-hidden="true"></span> {$ripimg}</span> {/foreach} <div class="form_buttons"> <a class="button_link state_cancel icon_link" href="{$abortLoc}">{$CONST.BACK}</a> @@ -47,13 +47,13 @@ {if isset($showML)}{$showML}{/if} {/if} {if $case_directoryDoDelete} - {if $print_DIRECTORY_WRITE_ERROR}<span class="msg_error"><span class="icon-attention-circled"></span> {$print_DIRECTORY_WRITE_ERROR}</span>{/if} + {if $print_DIRECTORY_WRITE_ERROR}<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$print_DIRECTORY_WRITE_ERROR}</span>{/if} {if isset($ob_serendipity_killPath)}{$ob_serendipity_killPath}{/if} - {if $print_ERROR_NO_DIRECTORY}<span class="msg_error"><span class="icon-attention-circled"></span> {$print_ERROR_NO_DIRECTORY}</span>{/if} + {if $print_ERROR_NO_DIRECTORY}<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$print_ERROR_NO_DIRECTORY}</span>{/if} {/if} {if $case_directoryEdit} {if !empty($smarty.post.serendipity.save)} - <span class="msg_notice"><span class="icon-info-circled"></span> {$print_SETTINGS_SAVED_AT}</span> + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$print_SETTINGS_SAVED_AT}</span> {/if} <h2>{$CONST.MANAGE_DIRECTORIES}</h2> @@ -67,7 +67,7 @@ </div> <h3 class="toggle_headline"> - <button class="show_config_option icon_link" type="button" data-href="#directory_permissions" title="{$CONST.TOGGLE_OPTION}"><span class="icon-right-dir"></span> {$CONST.PERMISSIONS}</button> + <button class="show_config_option icon_link" type="button" data-href="#directory_permissions" title="{$CONST.TOGGLE_OPTION}"><span class="icon-right-dir" aria-hidden="true"></span> {$CONST.PERMISSIONS}</button> </h3> <div id="directory_permissions" class="clearfix additional_info"> @@ -122,10 +122,10 @@ {/if} {if $case_directoryDoCreate} {if $print_DIRECTORY_CREATED} - <span class="msg_success"><span class="icon-ok-circled"></span> {$print_DIRECTORY_CREATED}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$print_DIRECTORY_CREATED}</span> {/if} {if $print_DIRECTORY_WRITE_ERROR} - <span class="msg_error"><span class="icon-attention-circled"></span> {$print_DIRECTORY_WRITE_ERROR}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$print_DIRECTORY_WRITE_ERROR}</span> {/if} <a class="button_link state_submit" href="serendipity_admin.php?serendipity[adminModule]=media&serendipity[adminAction]=directorySelect">{$CONST.BACK}</a> {/if} @@ -160,7 +160,7 @@ {if $case_directorySelect} <h2>{$CONST.MANAGE_DIRECTORIES}</h2> - <h3>{$CONST.BASE_DIRECTORY} <span class="media_file_actions actions"><a class="media_show_info button_link" href="#media_directory_info" title="{$CONST.DIRECTORY_INFO}"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.DIRECTORY_INFO}</span></a></span></h3> + <h3>{$CONST.BASE_DIRECTORY} <span class="media_file_actions actions"><a class="media_show_info button_link" href="#media_directory_info" title="{$CONST.DIRECTORY_INFO}"><span class="icon-info-circled" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.DIRECTORY_INFO}</span></a></span></h3> <header id="media_directory_info" class="media_directory_info additional_info"> <span class="msg_notice">{$CONST.DIRECTORY_INFO_DESC}</span> </header> @@ -194,12 +194,12 @@ <li> <div class="clearfix {cycle values="odd,even"}"> - <span class="folder_name"><span class="icon-folder-open"></span> {$folder.name}</span> + <span class="folder_name"><span class="icon-folder-open" aria-hidden="true"></span> {$folder.name}</span> <ul class="plainList clearfix edit_actions"> - <li><a class="button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=directoryEdit&serendipity[dir]={$folder.relpath|escape}" title="{$CONST.EDIT} {$folder.name}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li> - <li><a class="button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=directoryCreateSub&serendipity[dir]={$folder.relpath|escape}" title="{$CONST.CREATE_DIRECTORY}"><span class="icon-plus"></span><span class="visuallyhidden"> {$CONST.CREATE_DIRECTORY}</span></a></li> - <li><a class="button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=directoryDelete&serendipity[dir]={$folder.relpath|escape}" title="{$CONST.DELETE} {$folder.name}"><span class="icon-trash"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a></li> + <li><a class="button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=directoryEdit&serendipity[dir]={$folder.relpath|escape}" title="{$CONST.EDIT} {$folder.name}"><span class="icon-edit" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li> + <li><a class="button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=directoryCreateSub&serendipity[dir]={$folder.relpath|escape}" title="{$CONST.CREATE_DIRECTORY}"><span class="icon-plus" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.CREATE_DIRECTORY}</span></a></li> + <li><a class="button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=directoryDelete&serendipity[dir]={$folder.relpath|escape}" title="{$CONST.DELETE} {$folder.name}"><span class="icon-trash" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a></li> </ul> </div> {/foreach} @@ -237,16 +237,16 @@ {/if} {/if} {if $case_scale} - {if isset($print_SCALING_IMAGE)}<span class="msg_notice"><span class="icon-info-circled"></span> {$print_SCALING_IMAGE}</span>{/if} - {if isset($scaleImgError)}<span class="msg_error"><span class="icon-attention-circled"></span> {$scaleImgError}</span>{/if} - {if isset($is_done)}<span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.DONE}</span>{/if} + {if isset($print_SCALING_IMAGE)}<span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$print_SCALING_IMAGE}</span>{/if} + {if isset($scaleImgError)}<span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$scaleImgError}</span>{/if} + {if isset($is_done)}<span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.DONE}</span>{/if} {if $showML}{$showML}{/if} {/if} {if $case_scaleSelect} {if $print_RESIZE_BLAHBLAH}<h2>{$print_RESIZE_BLAHBLAH}</h2>{/if} {if $print_ORIGINAL_SIZE}<span class="block_level standalone">{$print_ORIGINAL_SIZE}</span>{/if} - <span class="msg_notice image_resize_hint"><span class="icon-info-circled"></span> {$CONST.HERE_YOU_CAN_ENTER_BLAHBLAH}</span> + <span class="msg_notice image_resize_hint"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.HERE_YOU_CAN_ENTER_BLAHBLAH}</span> <div class="clearfix"> <form id="serendipityScaleForm" name="serendipityScaleForm" action="?" method="GET"> @@ -290,4 +290,4 @@ {/if} {if $showMLbutton} <a id="ml_link" class="button_link" href="?serendipity[adminModule]=media">{$CONST.MEDIA_LIBRARY}</a> -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/import.inc.tpl b/templates/2k11/admin/import.inc.tpl index 29a7cf6d..324eb47c 100644 --- a/templates/2k11/admin/import.inc.tpl +++ b/templates/2k11/admin/import.inc.tpl @@ -2,16 +2,16 @@ {if $die} <h2>{$CONST.IMPORT_ENTRIES}</h2> - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.INCLUDE_ERRORFAILURE|sprintf:'importer'}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.INCLUDE_ERRORFAILURE|sprintf:'importer'}</span> {else} {if $validateData} <h2>{$CONST.IMPORT_ENTRIES}</h2> - <span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.IMPORT_STARTING}</span> + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.IMPORT_STARTING}</span> {if $result != true} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.IMPORT_FAILED}: {$result}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.IMPORT_FAILED}: {$result}</span> {else} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.IMPORT_DONE}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.IMPORT_DONE}</span> {/if} {else} <h2>{$CONST.IMPORT_PLEASE_ENTER}</h2> @@ -19,7 +19,7 @@ <form action="" method="POST" enctype="multipart/form-data"> {$formToken} {if $notes} - <span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.IMPORT_NOTES}: {$notes}</span> + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.IMPORT_NOTES}: {$notes}</span> {/if} <dl class="importer_data"> {foreach $fields as $field} @@ -50,4 +50,4 @@ <input type="submit" value="{$CONST.GO}"> </div> </form> -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/index.tpl b/templates/2k11/admin/index.tpl index 9733da3a..198b26ef 100644 --- a/templates/2k11/admin/index.tpl +++ b/templates/2k11/admin/index.tpl @@ -1,9 +1,13 @@ <!doctype html> <!--[if IE 8]> <html class="no-js lt-ie9" lang="{$lang}"> <![endif]--> -<!--[if gt IE 8]><!--> <html class="no-js" lang="{$lang}"> <!--<![endif]--> +<!--[if gt IE 8]><!--> <html class="no-js" dir="{$CONST.LANG_DIRECTION}" lang="{$lang}"> <!--<![endif]--> <head> <meta charset="{$CONST.LANG_CHARSET}"> - <title>{if $admin_vars.title}{$admin_vars.title} | {/if}{$CONST.SERENDIPITY_ADMIN_SUITE}</title> + {if !$admin_vars.backendBlogtitleFirst} + <title>{if $admin_vars.title}{$admin_vars.title} | {/if}{$blogTitle} | {$CONST.SERENDIPITY_ADMIN_SUITE}</title> + {else} + <title>{$blogTitle} | {if $admin_vars.title}{$admin_vars.title}{/if} | {$CONST.SERENDIPITY_ADMIN_SUITE}</title> + {/if} <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="{$head_link_stylesheet}"> <!--[if lte IE 8]> @@ -20,7 +24,7 @@ <header id="top"> <div id="banner{if not $admin_vars.is_logged_in}_install{/if}" class="clearfix"> {if $admin_vars.is_logged_in} - <a id="nav-toggle" class="button_link" href="#main_menu"><span class="icon-menu"></span><span class="visuallyhidden"> {$CONST.NAVIGATION}</span></a> + <a id="nav-toggle" class="button_link" href="#main_menu"><span class="icon-menu" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.NAVIGATION}</span></a> {/if} {if $admin_vars.admin_installed} <h1><a href="serendipity_admin.php"><span class="visuallyhidden">{$CONST.SERENDIPITY_ADMIN_SUITE}: </span>{$blogTitle}</a></h1> @@ -33,7 +37,7 @@ <main id="workspace" class="clearfix"> {if NOT $admin_vars.is_logged_in} - {$admin_vars.out|@serendipity_refhookPlugin:'backend_login_page'} + {$admin_vars.out|serendipity_refhookPlugin:'backend_login_page'} {$admin_vars.out.header} {if $admin_vars.post_action != '' AND NOT $admin_vars.is_logged_in} <span class="msg_error">{$CONST.WRONG_USERNAME_OR_PASSWORD}</span> @@ -73,22 +77,27 @@ <ul class="clearfix"> <li id="user_menu"><h3>{$admin_vars.self_info}</h3> <ul class="clearfix"> - <li><a class="button_link" href="serendipity_admin.php" title="{$CONST.MENU_DASHBOARD}"><span class="icon-home"></span><span class="visuallyhidden"> {$CONST.MENU_DASHBOARD}</span></a></li> + <li><a class="button_link" href="serendipity_admin.php" title="{$CONST.MENU_DASHBOARD}"><span class="icon-home"aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MENU_DASHBOARD}</span></a></li> {if 'personalConfiguration'|checkPermission} - <li><a class="button_link" href="serendipity_admin.php?serendipity[adminModule]=personal" title="{$CONST.PERSONAL_SETTINGS}"><span class="icon-cog-alt"></span><span class="visuallyhidden"> {$CONST.PERSONAL_SETTINGS}</span></a></li> + + <li><a class="button_link" href="serendipity_admin.php?serendipity[adminModule]=personal" title="{$CONST.PERSONAL_SETTINGS}"><span class="icon-cog-alt" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.PERSONAL_SETTINGS}</span></a></li> {/if} - <li><a class="button_link" href="{$serendipityBaseURL}" title="{$CONST.BACK_TO_BLOG}"><span class="icon-globe"></span><span class="visuallyhidden"> {$CONST.BACK_TO_BLOG}</span></a></li> - <li><a class="button_link" href="serendipity_admin.php?serendipity[adminModule]=logout" title="{$CONST.LOGOUT}"><span class="icon-logout"></span><span class="visuallyhidden"> {$CONST.LOGOUT}</span></a></li> + + <li><a class="button_link" href="{$serendipityBaseURL}" title="{$CONST.BACK_TO_BLOG}"><span class="icon-globe" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.BACK_TO_BLOG}</span></a></li> + <li><a class="button_link" href="serendipity_admin.php?serendipity[adminModule]=logout" title="{$CONST.LOGOUT}"><span class="icon-logout" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.LOGOUT}</span></a></li> </ul> </li> {if 'adminEntries'|checkPermission OR 'adminEntriesPlugins'|checkPermission} + <li><h3>{$CONST.CONTENT}</h3> <ul> {if 'adminEntries'|checkPermission} + <li><a href="serendipity_admin.php?serendipity[adminModule]=entries&serendipity[adminAction]=new">{$CONST.NEW_ENTRY}</a></li> <li><a href="serendipity_admin.php?serendipity[adminModule]=entries&serendipity[adminAction]=editSelect">{$CONST.EDIT_ENTRIES}</a></li> {/if} {if 'adminCategories'|checkPermission} + <li><a href="serendipity_admin.php?serendipity[adminModule]=category&serendipity[adminAction]=view">{$CONST.CATEGORIES}</a></li> {/if} {if 'adminEntries'|checkPermission OR 'adminEntriesPlugins'|checkPermission} @@ -100,15 +109,19 @@ </li> {/if} {if 'adminImages'|checkPermission} + <li><h3>{$CONST.MEDIA}</h3> <ul> {if 'adminImagesAdd'|checkPermission} + <li><a href="serendipity_admin.php?serendipity[adminModule]=media&serendipity[adminAction]=addSelect">{$CONST.ADD_MEDIA}</a></li> {/if} {if 'adminImagesView'|checkPermission} + <li><a href="serendipity_admin.php?serendipity[adminModule]=media">{$CONST.MEDIA_LIBRARY}</a></li> {/if} {if 'adminImagesDirectories'|checkPermission} + <li><a href="serendipity_admin.php?serendipity[adminModule]=media&serendipity[adminAction]=directorySelect">{$CONST.MANAGE_DIRECTORIES}</a></li> {/if} {if $admin_vars.no_create !== true} @@ -117,37 +130,41 @@ </ul> </li> {/if} - {if 'adminComments'|checkPermission} + <li><h3>{$CONST.MENU_ACTIVITY}</h3> <ul> - {if 'adminComments'|checkPermission} <li><a href="serendipity_admin.php?serendipity[adminModule]=comments">{$CONST.COMMENTS}</a></li> - {/if} - {if $admin_vars.no_create !== true} + {if 'adminPlugins'|checkPermission AND $admin_vars.no_create !== true} {serendipity_hookPlugin hook="backend_sidebar_admin_appearance" hookAll="true"} {/if} </ul> </li> - {/if} {if 'adminUsersGroups'|checkPermission OR 'adminImport'|checkPermission OR 'siteConfiguration'|checkPermission OR 'blogConfiguration'|checkPermission OR 'adminUsers'|checkPermission OR 'adminTemplates'|checkPermission OR 'adminPlugins'|checkPermission} + <li><h3>{$CONST.MENU_SETTINGS}</h3> <ul> {if 'siteConfiguration'|checkPermission OR 'blogConfiguration'|checkPermission} + <li><a href="serendipity_admin.php?serendipity[adminModule]=configuration">{$CONST.CONFIGURATION}</a></li> {/if} {if 'adminTemplates'|checkPermission} + <li><a href="serendipity_admin.php?serendipity[adminModule]=templates">{$CONST.MENU_TEMPLATES}</a></li> {/if} {if 'adminPlugins'|checkPermission} + <li><a href="serendipity_admin.php?serendipity[adminModule]=plugins">{$CONST.MENU_PLUGINS}</a></li> {/if} {if 'adminUsers'|checkPermission} + <li><a href="serendipity_admin.php?serendipity[adminModule]=users">{$CONST.MENU_USERS}</a></li> {/if} {if 'adminUsersGroups'|checkPermission} + <li><a href="serendipity_admin.php?serendipity[adminModule]=groups">{$CONST.MENU_GROUPS}</a></li> {/if} - <li><a href="serendipity_admin.php?serendipity[adminModule]=maintenance">{$CONST.MENU_MAINTENANCE}</a></li> + + <li><a href="serendipity_admin.php?serendipity[adminModule]=maintenance">{$CONST.MENU_MAINTENANCE}</a></li> {if $admin_vars.no_create !== true} {serendipity_hookPlugin hook="backend_sidebar_admin" hookAll="true"} {/if} @@ -169,8 +186,7 @@ <p>{$admin_vars.version_info}</p> </footer> {/if} - {if $admin_vars.admin_installed}{serendipity_hookPlugin hook="backend_footer" hookAll="true"}{/if} </body> -</html> +</html> \ No newline at end of file diff --git a/templates/2k11/admin/js/jquery.magnific-popup.js b/templates/2k11/admin/js/jquery.magnific-popup.js index 35e10017..487098e0 100644 --- a/templates/2k11/admin/js/jquery.magnific-popup.js +++ b/templates/2k11/admin/js/jquery.magnific-popup.js @@ -1,3 +1,3 @@ -// Magnific Popup v1.0.0 by Dmitry Semenov +// Magnific Popup v1.1.0 by Dmitry Semenov // http://bit.ly/magnific-popup#build=inline+image+iframe+imagezoom -(function(a){typeof define=="function"&&define.amd?define(["jquery"],a):typeof exports=="object"?a(require("jquery")):a(window.jQuery||window.Zepto)})(function(a){var b="Close",c="BeforeClose",d="AfterClose",e="BeforeAppend",f="MarkupParse",g="Open",h="Change",i="mfp",j="."+i,k="mfp-ready",l="mfp-removing",m="mfp-prevent-close",n,o=function(){},p=!!window.jQuery,q,r=a(window),s,t,u,v,w,x=function(a,b){n.ev.on(i+a+j,b)},y=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},z=function(b,c){n.ev.triggerHandler(i+b,c),n.st.callbacks&&(b=b.charAt(0).toLowerCase()+b.slice(1),n.st.callbacks[b]&&n.st.callbacks[b].apply(n,a.isArray(c)?c:[c]))},A=function(b){if(b!==w||!n.currTemplate.closeBtn)n.currTemplate.closeBtn=a(n.st.closeMarkup.replace("%title%",n.st.tClose)),w=b;return n.currTemplate.closeBtn},B=function(){a.magnificPopup.instance||(n=new o,n.init(),a.magnificPopup.instance=n)},C=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(a.transition!==undefined)return!0;while(b.length)if(b.pop()+"Transition"in a)return!0;return!1};o.prototype={constructor:o,init:function(){var b=navigator.appVersion;n.isIE7=b.indexOf("MSIE 7.")!==-1,n.isIE8=b.indexOf("MSIE 8.")!==-1,n.isLowIE=n.isIE7||n.isIE8,n.isAndroid=/android/gi.test(b),n.isIOS=/iphone|ipad|ipod/gi.test(b),n.supportsTransition=C(),n.probablyMobile=n.isAndroid||n.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),t=a(document),n.popupsCache={}},open:function(b){s||(s=a(document.body));var c;if(b.isObj===!1){n.items=b.items.toArray(),n.index=0;var d=b.items,e;for(c=0;c<d.length;c++){e=d[c],e.parsed&&(e=e.el[0]);if(e===b.el[0]){n.index=c;break}}}else n.items=a.isArray(b.items)?b.items:[b.items],n.index=b.index||0;if(n.isOpen){n.updateItemHTML();return}n.types=[],v="",b.mainEl&&b.mainEl.length?n.ev=b.mainEl.eq(0):n.ev=t,b.key?(n.popupsCache[b.key]||(n.popupsCache[b.key]={}),n.currTemplate=n.popupsCache[b.key]):n.currTemplate={},n.st=a.extend(!0,{},a.magnificPopup.defaults,b),n.fixedContentPos=n.st.fixedContentPos==="auto"?!n.probablyMobile:n.st.fixedContentPos,n.st.modal&&(n.st.closeOnContentClick=!1,n.st.closeOnBgClick=!1,n.st.showCloseBtn=!1,n.st.enableEscapeKey=!1),n.bgOverlay||(n.bgOverlay=y("bg").on("click"+j,function(){n.close()}),n.wrap=y("wrap").attr("tabindex",-1).on("click"+j,function(a){n._checkIfClose(a.target)&&n.close()}),n.container=y("container",n.wrap)),n.contentContainer=y("content"),n.st.preloader&&(n.preloader=y("preloader",n.container,n.st.tLoading));var h=a.magnificPopup.modules;for(c=0;c<h.length;c++){var i=h[c];i=i.charAt(0).toUpperCase()+i.slice(1),n["init"+i].call(n)}z("BeforeOpen"),n.st.showCloseBtn&&(n.st.closeBtnInside?(x(f,function(a,b,c,d){c.close_replaceWith=A(d.type)}),v+=" mfp-close-btn-in"):n.wrap.append(A())),n.st.alignTop&&(v+=" mfp-align-top"),n.fixedContentPos?n.wrap.css({overflow:n.st.overflowY,overflowX:"hidden",overflowY:n.st.overflowY}):n.wrap.css({top:r.scrollTop(),position:"absolute"}),(n.st.fixedBgPos===!1||n.st.fixedBgPos==="auto"&&!n.fixedContentPos)&&n.bgOverlay.css({height:t.height(),position:"absolute"}),n.st.enableEscapeKey&&t.on("keyup"+j,function(a){a.keyCode===27&&n.close()}),r.on("resize"+j,function(){n.updateSize()}),n.st.closeOnContentClick||(v+=" mfp-auto-cursor"),v&&n.wrap.addClass(v);var l=n.wH=r.height(),m={};if(n.fixedContentPos&&n._hasScrollBar(l)){var o=n._getScrollbarSize();o&&(m.marginRight=o)}n.fixedContentPos&&(n.isIE7?a("body, html").css("overflow","hidden"):m.overflow="hidden");var p=n.st.mainClass;return n.isIE7&&(p+=" mfp-ie7"),p&&n._addClassToMFP(p),n.updateItemHTML(),z("BuildControls"),a("html").css(m),n.bgOverlay.add(n.wrap).prependTo(n.st.prependTo||s),n._lastFocusedEl=document.activeElement,setTimeout(function(){n.content?(n._addClassToMFP(k),n._setFocus()):n.bgOverlay.addClass(k),t.on("focusin"+j,n._onFocusIn)},16),n.isOpen=!0,n.updateSize(l),z(g),b},close:function(){if(!n.isOpen)return;z(c),n.isOpen=!1,n.st.removalDelay&&!n.isLowIE&&n.supportsTransition?(n._addClassToMFP(l),setTimeout(function(){n._close()},n.st.removalDelay)):n._close()},_close:function(){z(b);var c=l+" "+k+" ";n.bgOverlay.detach(),n.wrap.detach(),n.container.empty(),n.st.mainClass&&(c+=n.st.mainClass+" "),n._removeClassFromMFP(c);if(n.fixedContentPos){var e={marginRight:""};n.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}t.off("keyup"+j+" focusin"+j),n.ev.off(j),n.wrap.attr("class","mfp-wrap").removeAttr("style"),n.bgOverlay.attr("class","mfp-bg"),n.container.attr("class","mfp-container"),n.st.showCloseBtn&&(!n.st.closeBtnInside||n.currTemplate[n.currItem.type]===!0)&&n.currTemplate.closeBtn&&n.currTemplate.closeBtn.detach(),n._lastFocusedEl&&a(n._lastFocusedEl).focus(),n.currItem=null,n.content=null,n.currTemplate=null,n.prevHeight=0,z(d)},updateSize:function(a){if(n.isIOS){var b=document.documentElement.clientWidth/window.innerWidth,c=window.innerHeight*b;n.wrap.css("height",c),n.wH=c}else n.wH=a||r.height();n.fixedContentPos||n.wrap.css("height",n.wH),z("Resize")},updateItemHTML:function(){var b=n.items[n.index];n.contentContainer.detach(),n.content&&n.content.detach(),b.parsed||(b=n.parseEl(n.index));var c=b.type;z("BeforeChange",[n.currItem?n.currItem.type:"",c]),n.currItem=b;if(!n.currTemplate[c]){var d=n.st[c]?n.st[c].markup:!1;z("FirstMarkupParse",d),d?n.currTemplate[c]=a(d):n.currTemplate[c]=!0}u&&u!==b.type&&n.container.removeClass("mfp-"+u+"-holder");var e=n["get"+c.charAt(0).toUpperCase()+c.slice(1)](b,n.currTemplate[c]);n.appendContent(e,c),b.preloaded=!0,z(h,b),u=b.type,n.container.prepend(n.contentContainer),z("AfterChange")},appendContent:function(a,b){n.content=a,a?n.st.showCloseBtn&&n.st.closeBtnInside&&n.currTemplate[b]===!0?n.content.find(".mfp-close").length||n.content.append(A()):n.content=a:n.content="",z(e),n.container.addClass("mfp-"+b+"-holder"),n.contentContainer.append(n.content)},parseEl:function(b){var c=n.items[b],d;c.tagName?c={el:a(c)}:(d=c.type,c={data:c,src:c.src});if(c.el){var e=n.types;for(var f=0;f<e.length;f++)if(c.el.hasClass("mfp-"+e[f])){d=e[f];break}c.src=c.el.attr("data-mfp-src"),c.src||(c.src=c.el.attr("href"))}return c.type=d||n.st.type||"inline",c.index=b,c.parsed=!0,n.items[b]=c,z("ElementParse",c),n.items[b]},addGroup:function(a,b){var c=function(c){c.mfpEl=this,n._openClick(c,a,b)};b||(b={});var d="click.magnificPopup";b.mainEl=a,b.items?(b.isObj=!0,a.off(d).on(d,c)):(b.isObj=!1,b.delegate?a.off(d).on(d,b.delegate,c):(b.items=a,a.off(d).on(d,c)))},_openClick:function(b,c,d){var e=d.midClick!==undefined?d.midClick:a.magnificPopup.defaults.midClick;if(!e&&(b.which===2||b.ctrlKey||b.metaKey))return;var f=d.disableOn!==undefined?d.disableOn:a.magnificPopup.defaults.disableOn;if(f)if(a.isFunction(f)){if(!f.call(n))return!0}else if(r.width()<f)return!0;b.type&&(b.preventDefault(),n.isOpen&&b.stopPropagation()),d.el=a(b.mfpEl),d.delegate&&(d.items=c.find(d.delegate)),n.open(d)},updateStatus:function(a,b){if(n.preloader){q!==a&&n.container.removeClass("mfp-s-"+q),!b&&a==="loading"&&(b=n.st.tLoading);var c={status:a,text:b};z("UpdateStatus",c),a=c.status,b=c.text,n.preloader.html(b),n.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),n.container.addClass("mfp-s-"+a),q=a}},_checkIfClose:function(b){if(a(b).hasClass(m))return;var c=n.st.closeOnContentClick,d=n.st.closeOnBgClick;if(c&&d)return!0;if(!n.content||a(b).hasClass("mfp-close")||n.preloader&&b===n.preloader[0])return!0;if(b!==n.content[0]&&!a.contains(n.content[0],b)){if(d&&a.contains(document,b))return!0}else if(c)return!0;return!1},_addClassToMFP:function(a){n.bgOverlay.addClass(a),n.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),n.wrap.removeClass(a)},_hasScrollBar:function(a){return(n.isIE7?t.height():document.body.scrollHeight)>(a||r.height())},_setFocus:function(){(n.st.focus?n.content.find(n.st.focus).eq(0):n.wrap).focus()},_onFocusIn:function(b){if(b.target!==n.wrap[0]&&!a.contains(n.wrap[0],b.target))return n._setFocus(),!1},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),z(f,[b,c,d]),a.each(c,function(a,c){if(c===undefined||c===!1)return!0;e=a.split("_");if(e.length>1){var d=b.find(j+"-"+e[0]);if(d.length>0){var f=e[1];f==="replaceWith"?d[0]!==c[0]&&d.replaceWith(c):f==="img"?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(j+"-"+a).html(c)})},_getScrollbarSize:function(){if(n.scrollbarSize===undefined){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),n.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return n.scrollbarSize}},a.magnificPopup={instance:null,proto:o.prototype,modules:[],open:function(b,c){return B(),b?b=a.extend(!0,{},b):b={},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(b){B();var c=a(this);if(typeof b=="string")if(b==="open"){var d,e=p?c.data("magnificPopup"):c[0].magnificPopup,f=parseInt(arguments[1],10)||0;e.items?d=e.items[f]:(d=c,e.delegate&&(d=d.find(e.delegate)),d=d.eq(f)),n._openClick({mfpEl:d},c,e)}else n.isOpen&&n[b].apply(n,Array.prototype.slice.call(arguments,1));else b=a.extend(!0,{},b),p?c.data("magnificPopup",b):c[0].magnificPopup=b,n.addGroup(c,b);return c};var D="inline",E,F,G,H=function(){G&&(F.after(G.addClass(E)).detach(),G=null)};a.magnificPopup.registerModule(D,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){n.types.push(D),x(b+"."+D,function(){H()})},getInline:function(b,c){H();if(b.src){var d=n.st.inline,e=a(b.src);if(e.length){var f=e[0].parentNode;f&&f.tagName&&(F||(E=d.hiddenClass,F=y(E),E="mfp-"+E),G=e.after(F).detach().removeClass(E)),n.updateStatus("ready")}else n.updateStatus("error",d.tNotFound),e=a("<div>");return b.inlineElement=e,e}return n.updateStatus("ready"),n._parseMarkup(c,{},b),c}}});var I,J=function(b){if(b.data&&b.data.title!==undefined)return b.data.title;var c=n.st.image.titleSrc;if(c){if(a.isFunction(c))return c.call(n,b);if(b.el)return b.el.attr(c)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var a=n.st.image,c=".image";n.types.push("image"),x(g+c,function(){n.currItem.type==="image"&&a.cursor&&s.addClass(a.cursor)}),x(b+c,function(){a.cursor&&s.removeClass(a.cursor),r.off("resize"+j)}),x("Resize"+c,n.resizeImage),n.isLowIE&&x("AfterChange",n.resizeImage)},resizeImage:function(){var a=n.currItem;if(!a||!a.img)return;if(n.st.image.verticalFit){var b=0;n.isLowIE&&(b=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",n.wH-b)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,I&&clearInterval(I),a.isCheckingImgSize=!1,z("ImageHasSize",a),a.imgHidden&&(n.content&&n.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var b=0,c=a.img[0],d=function(e){I&&clearInterval(I),I=setInterval(function(){if(c.naturalWidth>0){n._onImageHasSize(a);return}b>200&&clearInterval(I),b++,b===3?d(10):b===40?d(50):b===100&&d(500)},e)};d(1)},getImage:function(b,c){var d=0,e=function(){b&&(b.img[0].complete?(b.img.off(".mfploader"),b===n.currItem&&(n._onImageHasSize(b),n.updateStatus("ready")),b.hasSize=!0,b.loaded=!0,z("ImageLoadComplete")):(d++,d<200?setTimeout(e,100):f()))},f=function(){b&&(b.img.off(".mfploader"),b===n.currItem&&(n._onImageHasSize(b),n.updateStatus("error",g.tError.replace("%url%",b.src))),b.hasSize=!0,b.loaded=!0,b.loadError=!0)},g=n.st.image,h=c.find(".mfp-img");if(h.length){var i=document.createElement("img");i.className="mfp-img",b.el&&b.el.find("img").length&&(i.alt=b.el.find("img").attr("alt")),b.img=a(i).on("load.mfploader",e).on("error.mfploader",f),i.src=b.src,h.is("img")&&(b.img=b.img.clone()),i=b.img[0],i.naturalWidth>0?b.hasSize=!0:i.width||(b.hasSize=!1)}return n._parseMarkup(c,{title:J(b),img_replaceWith:b.img},b),n.resizeImage(),b.hasSize?(I&&clearInterval(I),b.loadError?(c.addClass("mfp-loading"),n.updateStatus("error",g.tError.replace("%url%",b.src))):(c.removeClass("mfp-loading"),n.updateStatus("ready")),c):(n.updateStatus("loading"),b.loading=!0,b.hasSize||(b.imgHidden=!0,c.addClass("mfp-loading"),n.findImageSize(b)),c)}}});var K,L=function(){return K===undefined&&(K=document.createElement("p").style.MozTransform!==undefined),K};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a=n.st.zoom,d=".zoom",e;if(!a.enabled||!n.supportsTransition)return;var f=a.duration,g=function(b){var c=b.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+a.duration/1e3+"s "+a.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,c.css(e),c},h=function(){n.content.css("visibility","visible")},i,j;x("BuildControls"+d,function(){if(n._allowZoom()){clearTimeout(i),n.content.css("visibility","hidden"),e=n._getItemToZoom();if(!e){h();return}j=g(e),j.css(n._getOffset()),n.wrap.append(j),i=setTimeout(function(){j.css(n._getOffset(!0)),i=setTimeout(function(){h(),setTimeout(function(){j.remove(),e=j=null,z("ZoomAnimationEnded")},16)},f)},16)}}),x(c+d,function(){if(n._allowZoom()){clearTimeout(i),n.st.removalDelay=f;if(!e){e=n._getItemToZoom();if(!e)return;j=g(e)}j.css(n._getOffset(!0)),n.wrap.append(j),n.content.css("visibility","hidden"),setTimeout(function(){j.css(n._getOffset())},16)}}),x(b+d,function(){n._allowZoom()&&(h(),j&&j.remove(),e=null)})},_allowZoom:function(){return n.currItem.type==="image"},_getItemToZoom:function(){return n.currItem.hasSize?n.currItem.img:!1},_getOffset:function(b){var c;b?c=n.currItem.img:c=n.st.zoom.opener(n.currItem.el||n.currItem);var d=c.offset(),e=parseInt(c.css("padding-top"),10),f=parseInt(c.css("padding-bottom"),10);d.top-=a(window).scrollTop()-e;var g={width:c.width(),height:(p?c.innerHeight():c[0].offsetHeight)-f-e};return L()?g["-moz-transform"]=g.transform="translate("+d.left+"px,"+d.top+"px)":(g.left=d.left,g.top=d.top),g}}});var M="iframe",N="//about:blank",O=function(a){if(n.currTemplate[M]){var b=n.currTemplate[M].find("iframe");b.length&&(a||(b[0].src=N),n.isIE8&&b.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(M,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){n.types.push(M),x("BeforeChange",function(a,b,c){b!==c&&(b===M?O():c===M&&O(!0))}),x(b+"."+M,function(){O()})},getIframe:function(b,c){var d=b.src,e=n.st.iframe;a.each(e.patterns,function(){if(d.indexOf(this.index)>-1)return this.id&&(typeof this.id=="string"?d=d.substr(d.lastIndexOf(this.id)+this.id.length,d.length):d=this.id.call(this,d)),d=this.src.replace("%id%",d),!1});var f={};return e.srcAction&&(f[e.srcAction]=d),n._parseMarkup(c,f,b),n.updateStatus("ready"),c}}}),B()}) +(function(a){typeof define=="function"&&define.amd?define(["jquery"],a):typeof exports=="object"?a(require("jquery")):a(window.jQuery||window.Zepto)})(function(a){var b="Close",c="BeforeClose",d="AfterClose",e="BeforeAppend",f="MarkupParse",g="Open",h="Change",i="mfp",j="."+i,k="mfp-ready",l="mfp-removing",m="mfp-prevent-close",n,o=function(){},p=!!window.jQuery,q,r=a(window),s,t,u,v,w=function(a,b){n.ev.on(i+a+j,b)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(b,c){n.ev.triggerHandler(i+b,c),n.st.callbacks&&(b=b.charAt(0).toLowerCase()+b.slice(1),n.st.callbacks[b]&&n.st.callbacks[b].apply(n,a.isArray(c)?c:[c]))},z=function(b){if(b!==v||!n.currTemplate.closeBtn)n.currTemplate.closeBtn=a(n.st.closeMarkup.replace("%title%",n.st.tClose)),v=b;return n.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(n=new o,n.init(),a.magnificPopup.instance=n)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(a.transition!==undefined)return!0;while(b.length)if(b.pop()+"Transition"in a)return!0;return!1};o.prototype={constructor:o,init:function(){var b=navigator.appVersion;n.isLowIE=n.isIE8=document.all&&!document.addEventListener,n.isAndroid=/android/gi.test(b),n.isIOS=/iphone|ipad|ipod/gi.test(b),n.supportsTransition=B(),n.probablyMobile=n.isAndroid||n.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),s=a(document),n.popupsCache={}},open:function(b){var c;if(b.isObj===!1){n.items=b.items.toArray(),n.index=0;var d=b.items,e;for(c=0;c<d.length;c++){e=d[c],e.parsed&&(e=e.el[0]);if(e===b.el[0]){n.index=c;break}}}else n.items=a.isArray(b.items)?b.items:[b.items],n.index=b.index||0;if(n.isOpen){n.updateItemHTML();return}n.types=[],u="",b.mainEl&&b.mainEl.length?n.ev=b.mainEl.eq(0):n.ev=s,b.key?(n.popupsCache[b.key]||(n.popupsCache[b.key]={}),n.currTemplate=n.popupsCache[b.key]):n.currTemplate={},n.st=a.extend(!0,{},a.magnificPopup.defaults,b),n.fixedContentPos=n.st.fixedContentPos==="auto"?!n.probablyMobile:n.st.fixedContentPos,n.st.modal&&(n.st.closeOnContentClick=!1,n.st.closeOnBgClick=!1,n.st.showCloseBtn=!1,n.st.enableEscapeKey=!1),n.bgOverlay||(n.bgOverlay=x("bg").on("click"+j,function(){n.close()}),n.wrap=x("wrap").attr("tabindex",-1).on("click"+j,function(a){n._checkIfClose(a.target)&&n.close()}),n.container=x("container",n.wrap)),n.contentContainer=x("content"),n.st.preloader&&(n.preloader=x("preloader",n.container,n.st.tLoading));var h=a.magnificPopup.modules;for(c=0;c<h.length;c++){var i=h[c];i=i.charAt(0).toUpperCase()+i.slice(1),n["init"+i].call(n)}y("BeforeOpen"),n.st.showCloseBtn&&(n.st.closeBtnInside?(w(f,function(a,b,c,d){c.close_replaceWith=z(d.type)}),u+=" mfp-close-btn-in"):n.wrap.append(z())),n.st.alignTop&&(u+=" mfp-align-top"),n.fixedContentPos?n.wrap.css({overflow:n.st.overflowY,overflowX:"hidden",overflowY:n.st.overflowY}):n.wrap.css({top:r.scrollTop(),position:"absolute"}),(n.st.fixedBgPos===!1||n.st.fixedBgPos==="auto"&&!n.fixedContentPos)&&n.bgOverlay.css({height:s.height(),position:"absolute"}),n.st.enableEscapeKey&&s.on("keyup"+j,function(a){a.keyCode===27&&n.close()}),r.on("resize"+j,function(){n.updateSize()}),n.st.closeOnContentClick||(u+=" mfp-auto-cursor"),u&&n.wrap.addClass(u);var l=n.wH=r.height(),m={};if(n.fixedContentPos&&n._hasScrollBar(l)){var o=n._getScrollbarSize();o&&(m.marginRight=o)}n.fixedContentPos&&(n.isIE7?a("body, html").css("overflow","hidden"):m.overflow="hidden");var p=n.st.mainClass;return n.isIE7&&(p+=" mfp-ie7"),p&&n._addClassToMFP(p),n.updateItemHTML(),y("BuildControls"),a("html").css(m),n.bgOverlay.add(n.wrap).prependTo(n.st.prependTo||a(document.body)),n._lastFocusedEl=document.activeElement,setTimeout(function(){n.content?(n._addClassToMFP(k),n._setFocus()):n.bgOverlay.addClass(k),s.on("focusin"+j,n._onFocusIn)},16),n.isOpen=!0,n.updateSize(l),y(g),b},close:function(){if(!n.isOpen)return;y(c),n.isOpen=!1,n.st.removalDelay&&!n.isLowIE&&n.supportsTransition?(n._addClassToMFP(l),setTimeout(function(){n._close()},n.st.removalDelay)):n._close()},_close:function(){y(b);var c=l+" "+k+" ";n.bgOverlay.detach(),n.wrap.detach(),n.container.empty(),n.st.mainClass&&(c+=n.st.mainClass+" "),n._removeClassFromMFP(c);if(n.fixedContentPos){var e={marginRight:""};n.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}s.off("keyup"+j+" focusin"+j),n.ev.off(j),n.wrap.attr("class","mfp-wrap").removeAttr("style"),n.bgOverlay.attr("class","mfp-bg"),n.container.attr("class","mfp-container"),n.st.showCloseBtn&&(!n.st.closeBtnInside||n.currTemplate[n.currItem.type]===!0)&&n.currTemplate.closeBtn&&n.currTemplate.closeBtn.detach(),n.st.autoFocusLast&&n._lastFocusedEl&&a(n._lastFocusedEl).focus(),n.currItem=null,n.content=null,n.currTemplate=null,n.prevHeight=0,y(d)},updateSize:function(a){if(n.isIOS){var b=document.documentElement.clientWidth/window.innerWidth,c=window.innerHeight*b;n.wrap.css("height",c),n.wH=c}else n.wH=a||r.height();n.fixedContentPos||n.wrap.css("height",n.wH),y("Resize")},updateItemHTML:function(){var b=n.items[n.index];n.contentContainer.detach(),n.content&&n.content.detach(),b.parsed||(b=n.parseEl(n.index));var c=b.type;y("BeforeChange",[n.currItem?n.currItem.type:"",c]),n.currItem=b;if(!n.currTemplate[c]){var d=n.st[c]?n.st[c].markup:!1;y("FirstMarkupParse",d),d?n.currTemplate[c]=a(d):n.currTemplate[c]=!0}t&&t!==b.type&&n.container.removeClass("mfp-"+t+"-holder");var e=n["get"+c.charAt(0).toUpperCase()+c.slice(1)](b,n.currTemplate[c]);n.appendContent(e,c),b.preloaded=!0,y(h,b),t=b.type,n.container.prepend(n.contentContainer),y("AfterChange")},appendContent:function(a,b){n.content=a,a?n.st.showCloseBtn&&n.st.closeBtnInside&&n.currTemplate[b]===!0?n.content.find(".mfp-close").length||n.content.append(z()):n.content=a:n.content="",y(e),n.container.addClass("mfp-"+b+"-holder"),n.contentContainer.append(n.content)},parseEl:function(b){var c=n.items[b],d;c.tagName?c={el:a(c)}:(d=c.type,c={data:c,src:c.src});if(c.el){var e=n.types;for(var f=0;f<e.length;f++)if(c.el.hasClass("mfp-"+e[f])){d=e[f];break}c.src=c.el.attr("data-mfp-src"),c.src||(c.src=c.el.attr("href"))}return c.type=d||n.st.type||"inline",c.index=b,c.parsed=!0,n.items[b]=c,y("ElementParse",c),n.items[b]},addGroup:function(a,b){var c=function(c){c.mfpEl=this,n._openClick(c,a,b)};b||(b={});var d="click.magnificPopup";b.mainEl=a,b.items?(b.isObj=!0,a.off(d).on(d,c)):(b.isObj=!1,b.delegate?a.off(d).on(d,b.delegate,c):(b.items=a,a.off(d).on(d,c)))},_openClick:function(b,c,d){var e=d.midClick!==undefined?d.midClick:a.magnificPopup.defaults.midClick;if(!e&&(b.which===2||b.ctrlKey||b.metaKey||b.altKey||b.shiftKey))return;var f=d.disableOn!==undefined?d.disableOn:a.magnificPopup.defaults.disableOn;if(f)if(a.isFunction(f)){if(!f.call(n))return!0}else if(r.width()<f)return!0;b.type&&(b.preventDefault(),n.isOpen&&b.stopPropagation()),d.el=a(b.mfpEl),d.delegate&&(d.items=c.find(d.delegate)),n.open(d)},updateStatus:function(a,b){if(n.preloader){q!==a&&n.container.removeClass("mfp-s-"+q),!b&&a==="loading"&&(b=n.st.tLoading);var c={status:a,text:b};y("UpdateStatus",c),a=c.status,b=c.text,n.preloader.html(b),n.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),n.container.addClass("mfp-s-"+a),q=a}},_checkIfClose:function(b){if(a(b).hasClass(m))return;var c=n.st.closeOnContentClick,d=n.st.closeOnBgClick;if(c&&d)return!0;if(!n.content||a(b).hasClass("mfp-close")||n.preloader&&b===n.preloader[0])return!0;if(b!==n.content[0]&&!a.contains(n.content[0],b)){if(d&&a.contains(document,b))return!0}else if(c)return!0;return!1},_addClassToMFP:function(a){n.bgOverlay.addClass(a),n.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),n.wrap.removeClass(a)},_hasScrollBar:function(a){return(n.isIE7?s.height():document.body.scrollHeight)>(a||r.height())},_setFocus:function(){(n.st.focus?n.content.find(n.st.focus).eq(0):n.wrap).focus()},_onFocusIn:function(b){if(b.target!==n.wrap[0]&&!a.contains(n.wrap[0],b.target))return n._setFocus(),!1},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(f,[b,c,d]),a.each(c,function(c,d){if(d===undefined||d===!1)return!0;e=c.split("_");if(e.length>1){var f=b.find(j+"-"+e[0]);if(f.length>0){var g=e[1];g==="replaceWith"?f[0]!==d[0]&&f.replaceWith(d):g==="img"?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(j+"-"+c).html(d)})},_getScrollbarSize:function(){if(n.scrollbarSize===undefined){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),n.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return n.scrollbarSize}},a.magnificPopup={instance:null,proto:o.prototype,modules:[],open:function(b,c){return A(),b?b=a.extend(!0,{},b):b={},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(b){A();var c=a(this);if(typeof b=="string")if(b==="open"){var d,e=p?c.data("magnificPopup"):c[0].magnificPopup,f=parseInt(arguments[1],10)||0;e.items?d=e.items[f]:(d=c,e.delegate&&(d=d.find(e.delegate)),d=d.eq(f)),n._openClick({mfpEl:d},c,e)}else n.isOpen&&n[b].apply(n,Array.prototype.slice.call(arguments,1));else b=a.extend(!0,{},b),p?c.data("magnificPopup",b):c[0].magnificPopup=b,n.addGroup(c,b);return c};var C="inline",D,E,F,G=function(){F&&(E.after(F.addClass(D)).detach(),F=null)};a.magnificPopup.registerModule(C,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){n.types.push(C),w(b+"."+C,function(){G()})},getInline:function(b,c){G();if(b.src){var d=n.st.inline,e=a(b.src);if(e.length){var f=e[0].parentNode;f&&f.tagName&&(E||(D=d.hiddenClass,E=x(D),D="mfp-"+D),F=e.after(E).detach().removeClass(D)),n.updateStatus("ready")}else n.updateStatus("error",d.tNotFound),e=a("<div>");return b.inlineElement=e,e}return n.updateStatus("ready"),n._parseMarkup(c,{},b),c}}});var H,I=function(b){if(b.data&&b.data.title!==undefined)return b.data.title;var c=n.st.image.titleSrc;if(c){if(a.isFunction(c))return c.call(n,b);if(b.el)return b.el.attr(c)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=n.st.image,d=".image";n.types.push("image"),w(g+d,function(){n.currItem.type==="image"&&c.cursor&&a(document.body).addClass(c.cursor)}),w(b+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),r.off("resize"+j)}),w("Resize"+d,n.resizeImage),n.isLowIE&&w("AfterChange",n.resizeImage)},resizeImage:function(){var a=n.currItem;if(!a||!a.img)return;if(n.st.image.verticalFit){var b=0;n.isLowIE&&(b=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",n.wH-b)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,H&&clearInterval(H),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(n.content&&n.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var b=0,c=a.img[0],d=function(e){H&&clearInterval(H),H=setInterval(function(){if(c.naturalWidth>0){n._onImageHasSize(a);return}b>200&&clearInterval(H),b++,b===3?d(10):b===40?d(50):b===100&&d(500)},e)};d(1)},getImage:function(b,c){var d=0,e=function(){b&&(b.img[0].complete?(b.img.off(".mfploader"),b===n.currItem&&(n._onImageHasSize(b),n.updateStatus("ready")),b.hasSize=!0,b.loaded=!0,y("ImageLoadComplete")):(d++,d<200?setTimeout(e,100):f()))},f=function(){b&&(b.img.off(".mfploader"),b===n.currItem&&(n._onImageHasSize(b),n.updateStatus("error",g.tError.replace("%url%",b.src))),b.hasSize=!0,b.loaded=!0,b.loadError=!0)},g=n.st.image,h=c.find(".mfp-img");if(h.length){var i=document.createElement("img");i.className="mfp-img",b.el&&b.el.find("img").length&&(i.alt=b.el.find("img").attr("alt")),b.img=a(i).on("load.mfploader",e).on("error.mfploader",f),i.src=b.src,h.is("img")&&(b.img=b.img.clone()),i=b.img[0],i.naturalWidth>0?b.hasSize=!0:i.width||(b.hasSize=!1)}return n._parseMarkup(c,{title:I(b),img_replaceWith:b.img},b),n.resizeImage(),b.hasSize?(H&&clearInterval(H),b.loadError?(c.addClass("mfp-loading"),n.updateStatus("error",g.tError.replace("%url%",b.src))):(c.removeClass("mfp-loading"),n.updateStatus("ready")),c):(n.updateStatus("loading"),b.loading=!0,b.hasSize||(b.imgHidden=!0,c.addClass("mfp-loading"),n.findImageSize(b)),c)}}});var J,K=function(){return J===undefined&&(J=document.createElement("p").style.MozTransform!==undefined),J};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a=n.st.zoom,d=".zoom",e;if(!a.enabled||!n.supportsTransition)return;var f=a.duration,g=function(b){var c=b.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+a.duration/1e3+"s "+a.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,c.css(e),c},h=function(){n.content.css("visibility","visible")},i,j;w("BuildControls"+d,function(){if(n._allowZoom()){clearTimeout(i),n.content.css("visibility","hidden"),e=n._getItemToZoom();if(!e){h();return}j=g(e),j.css(n._getOffset()),n.wrap.append(j),i=setTimeout(function(){j.css(n._getOffset(!0)),i=setTimeout(function(){h(),setTimeout(function(){j.remove(),e=j=null,y("ZoomAnimationEnded")},16)},f)},16)}}),w(c+d,function(){if(n._allowZoom()){clearTimeout(i),n.st.removalDelay=f;if(!e){e=n._getItemToZoom();if(!e)return;j=g(e)}j.css(n._getOffset(!0)),n.wrap.append(j),n.content.css("visibility","hidden"),setTimeout(function(){j.css(n._getOffset())},16)}}),w(b+d,function(){n._allowZoom()&&(h(),j&&j.remove(),e=null)})},_allowZoom:function(){return n.currItem.type==="image"},_getItemToZoom:function(){return n.currItem.hasSize?n.currItem.img:!1},_getOffset:function(b){var c;b?c=n.currItem.img:c=n.st.zoom.opener(n.currItem.el||n.currItem);var d=c.offset(),e=parseInt(c.css("padding-top"),10),f=parseInt(c.css("padding-bottom"),10);d.top-=a(window).scrollTop()-e;var g={width:c.width(),height:(p?c.innerHeight():c[0].offsetHeight)-f-e};return K()?g["-moz-transform"]=g.transform="translate("+d.left+"px,"+d.top+"px)":(g.left=d.left,g.top=d.top),g}}});var L="iframe",M="//about:blank",N=function(a){if(n.currTemplate[L]){var b=n.currTemplate[L].find("iframe");b.length&&(a||(b[0].src=M),n.isIE8&&b.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(L,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){n.types.push(L),w("BeforeChange",function(a,b,c){b!==c&&(b===L?N():c===L&&N(!0))}),w(b+"."+L,function(){N()})},getIframe:function(b,c){var d=b.src,e=n.st.iframe;a.each(e.patterns,function(){if(d.indexOf(this.index)>-1)return this.id&&(typeof this.id=="string"?d=d.substr(d.lastIndexOf(this.id)+this.id.length,d.length):d=this.id.call(this,d)),d=this.src.replace("%id%",d),!1});var f={};return e.srcAction&&(f[e.srcAction]=d),n._parseMarkup(c,f,b),n.updateStatus("ready"),c}}}),A()}) diff --git a/templates/2k11/admin/js/jquery.sortable.js b/templates/2k11/admin/js/jquery.sortable.js index b591f4b9..28dafd78 100644 --- a/templates/2k11/admin/js/jquery.sortable.js +++ b/templates/2k11/admin/js/jquery.sortable.js @@ -1,5 +1,5 @@ /* =================================================== - * jquery-sortable.js v0.9.12 + * jquery-sortable.js v0.9.13 * http://johnny.github.com/jquery-sortable/ * =================================================== * Copyright (c) 2012 Jonas von Andrian @@ -26,4 +26,22 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ========================================================== */ -!function($,window,pluginName,undefined){var eventNames,containerDefaults={drag:true,drop:true,exclude:"",nested:true,vertical:true},groupDefaults={afterMove:function($placeholder,container,$closestItemOrContainer){},containerPath:"",containerSelector:"ol, ul",distance:0,delay:0,handle:"",itemPath:"",itemSelector:"li",bodyClass:"dragging",draggedClass:"dragged",isValidTarget:function($item,container){return true},onCancel:function($item,container,_super,event){},onDrag:function($item,position,_super,event){$item.css(position)},onDragStart:function($item,container,_super,event){$item.css({height:$item.height(),width:$item.width()});$item.addClass(container.group.options.draggedClass);$("body").addClass(container.group.options.bodyClass)},onDrop:function($item,container,_super,event){$item.removeClass(container.group.options.draggedClass).removeAttr("style");$("body").removeClass(container.group.options.bodyClass)},onMousedown:function($item,_super,event){if(!event.target.nodeName.match(/^(input|select|textarea)$/i)){event.preventDefault();return true}},placeholderClass:"placeholder",placeholder:'<li class="placeholder"></li>',pullPlaceholder:true,serialize:function($parent,$children,parentIsContainer){var result=$.extend({},$parent.data());if(parentIsContainer)return[$children];else if($children[0]){result.children=$children}delete result.subContainers;delete result.sortable;return result},tolerance:0},containerGroups={},groupCounter=0,emptyBox={left:0,top:0,bottom:0,right:0},eventNames={start:"touchstart.sortable mousedown.sortable",drop:"touchend.sortable touchcancel.sortable mouseup.sortable",drag:"touchmove.sortable mousemove.sortable",scroll:"scroll.sortable"},subContainerKey="subContainers";function d(a,b){var x=Math.max(0,a[0]-b[0],b[0]-a[1]),y=Math.max(0,a[2]-b[1],b[1]-a[3]);return x+y}function setDimensions(array,dimensions,tolerance,useOffset){var i=array.length,offsetMethod=useOffset?"offset":"position";tolerance=tolerance||0;while(i--){var el=array[i].el?array[i].el:$(array[i]),pos=el[offsetMethod]();pos.left+=parseInt(el.css("margin-left"),10);pos.top+=parseInt(el.css("margin-top"),10);dimensions[i]=[pos.left-tolerance,pos.left+el.outerWidth()+tolerance,pos.top-tolerance,pos.top+el.outerHeight()+tolerance]}}function getRelativePosition(pointer,element){var offset=element.offset();return{left:pointer.left-offset.left,top:pointer.top-offset.top}}function sortByDistanceDesc(dimensions,pointer,lastPointer){pointer=[pointer.left,pointer.top];lastPointer=lastPointer&&[lastPointer.left,lastPointer.top];var dim,i=dimensions.length,distances=[];while(i--){dim=dimensions[i];distances[i]=[i,d(dim,pointer),lastPointer&&d(dim,lastPointer)]}distances=distances.sort(function(a,b){return b[1]-a[1]||b[2]-a[2]||b[0]-a[0]});return distances}function ContainerGroup(options){this.options=$.extend({},groupDefaults,options);this.containers=[];if(!this.options.rootGroup){this.scrollProxy=$.proxy(this.scroll,this);this.dragProxy=$.proxy(this.drag,this);this.dropProxy=$.proxy(this.drop,this);this.placeholder=$(this.options.placeholder);if(!options.isValidTarget)this.options.isValidTarget=undefined}}ContainerGroup.get=function(options){if(!containerGroups[options.group]){if(options.group===undefined)options.group=groupCounter++;containerGroups[options.group]=new ContainerGroup(options)}return containerGroups[options.group]};ContainerGroup.prototype={dragInit:function(e,itemContainer){this.$document=$(itemContainer.el[0].ownerDocument);var closestItem=$(e.target).closest(this.options.itemSelector);if(closestItem.length){this.item=closestItem;this.itemContainer=itemContainer;if(this.item.is(this.options.exclude)||!this.options.onMousedown(this.item,groupDefaults.onMousedown,e)){return}this.setPointer(e);this.toggleListeners("on");this.setupDelayTimer();this.dragInitDone=true}},drag:function(e){if(!this.dragging){if(!this.distanceMet(e)||!this.delayMet)return;this.options.onDragStart(this.item,this.itemContainer,groupDefaults.onDragStart,e);this.item.before(this.placeholder);this.dragging=true}this.setPointer(e);this.options.onDrag(this.item,getRelativePosition(this.pointer,this.item.offsetParent()),groupDefaults.onDrag,e);var p=this.getPointer(e),box=this.sameResultBox,t=this.options.tolerance;if(!box||box.top-t>p.top||box.bottom+t<p.top||box.left-t>p.left||box.right+t<p.left)if(!this.searchValidTarget()){this.placeholder.detach();this.lastAppendedItem=undefined}},drop:function(e){this.toggleListeners("off");this.dragInitDone=false;if(this.dragging){if(this.placeholder.closest("html")[0]){this.placeholder.before(this.item).detach()}else{this.options.onCancel(this.item,this.itemContainer,groupDefaults.onCancel,e)}this.options.onDrop(this.item,this.getContainer(this.item),groupDefaults.onDrop,e);this.clearDimensions();this.clearOffsetParent();this.lastAppendedItem=this.sameResultBox=undefined;this.dragging=false}},searchValidTarget:function(pointer,lastPointer){if(!pointer){pointer=this.relativePointer||this.pointer;lastPointer=this.lastRelativePointer||this.lastPointer}var distances=sortByDistanceDesc(this.getContainerDimensions(),pointer,lastPointer),i=distances.length;while(i--){var index=distances[i][0],distance=distances[i][1];if(!distance||this.options.pullPlaceholder){var container=this.containers[index];if(!container.disabled){if(!this.$getOffsetParent()){var offsetParent=container.getItemOffsetParent();pointer=getRelativePosition(pointer,offsetParent);lastPointer=getRelativePosition(lastPointer,offsetParent)}if(container.searchValidTarget(pointer,lastPointer))return true}}}if(this.sameResultBox)this.sameResultBox=undefined},movePlaceholder:function(container,item,method,sameResultBox){var lastAppendedItem=this.lastAppendedItem;if(!sameResultBox&&lastAppendedItem&&lastAppendedItem[0]===item[0])return;item[method](this.placeholder);this.lastAppendedItem=item;this.sameResultBox=sameResultBox;this.options.afterMove(this.placeholder,container,item)},getContainerDimensions:function(){if(!this.containerDimensions)setDimensions(this.containers,this.containerDimensions=[],this.options.tolerance,!this.$getOffsetParent());return this.containerDimensions},getContainer:function(element){return element.closest(this.options.containerSelector).data(pluginName)},$getOffsetParent:function(){if(this.offsetParent===undefined){var i=this.containers.length-1,offsetParent=this.containers[i].getItemOffsetParent();if(!this.options.rootGroup){while(i--){if(offsetParent[0]!=this.containers[i].getItemOffsetParent()[0]){offsetParent=false;break}}}this.offsetParent=offsetParent}return this.offsetParent},setPointer:function(e){var pointer=this.getPointer(e);if(this.$getOffsetParent()){var relativePointer=getRelativePosition(pointer,this.$getOffsetParent());this.lastRelativePointer=this.relativePointer;this.relativePointer=relativePointer}this.lastPointer=this.pointer;this.pointer=pointer},distanceMet:function(e){var currentPointer=this.getPointer(e);return Math.max(Math.abs(this.pointer.left-currentPointer.left),Math.abs(this.pointer.top-currentPointer.top))>=this.options.distance},getPointer:function(e){var o=e.originalEvent||e.originalEvent.touches&&e.originalEvent.touches[0];return{left:e.pageX||o.pageX,top:e.pageY||o.pageY}},setupDelayTimer:function(){var that=this;this.delayMet=!this.options.delay;if(!this.delayMet){clearTimeout(this._mouseDelayTimer);this._mouseDelayTimer=setTimeout(function(){that.delayMet=true},this.options.delay)}},scroll:function(e){this.clearDimensions();this.clearOffsetParent()},toggleListeners:function(method){var that=this,events=["drag","drop","scroll"];$.each(events,function(i,event){that.$document[method](eventNames[event],that[event+"Proxy"])})},clearOffsetParent:function(){this.offsetParent=undefined},clearDimensions:function(){this.traverse(function(object){object._clearDimensions()})},traverse:function(callback){callback(this);var i=this.containers.length;while(i--){this.containers[i].traverse(callback)}},_clearDimensions:function(){this.containerDimensions=undefined},_destroy:function(){containerGroups[this.options.group]=undefined}};function Container(element,options){this.el=element;this.options=$.extend({},containerDefaults,options);this.group=ContainerGroup.get(this.options);this.rootGroup=this.options.rootGroup||this.group;this.handle=this.rootGroup.options.handle||this.rootGroup.options.itemSelector;var itemPath=this.rootGroup.options.itemPath;this.target=itemPath?this.el.find(itemPath):this.el;this.target.on(eventNames.start,this.handle,$.proxy(this.dragInit,this));if(this.options.drop)this.group.containers.push(this)}Container.prototype={dragInit:function(e){var rootGroup=this.rootGroup;if(!this.disabled&&!rootGroup.dragInitDone&&this.options.drag&&this.isValidDrag(e)){rootGroup.dragInit(e,this)}},isValidDrag:function(e){return e.which==1||e.type=="touchstart"&&e.originalEvent.touches.length==1},searchValidTarget:function(pointer,lastPointer){var distances=sortByDistanceDesc(this.getItemDimensions(),pointer,lastPointer),i=distances.length,rootGroup=this.rootGroup,validTarget=!rootGroup.options.isValidTarget||rootGroup.options.isValidTarget(rootGroup.item,this);if(!i&&validTarget){rootGroup.movePlaceholder(this,this.target,"append");return true}else while(i--){var index=distances[i][0],distance=distances[i][1];if(!distance&&this.hasChildGroup(index)){var found=this.getContainerGroup(index).searchValidTarget(pointer,lastPointer);if(found)return true}else if(validTarget){this.movePlaceholder(index,pointer);return true}}},movePlaceholder:function(index,pointer){var item=$(this.items[index]),dim=this.itemDimensions[index],method="after",width=item.outerWidth(),height=item.outerHeight(),offset=item.offset(),sameResultBox={left:offset.left,right:offset.left+width,top:offset.top,bottom:offset.top+height};if(this.options.vertical){var yCenter=(dim[2]+dim[3])/2,inUpperHalf=pointer.top<=yCenter;if(inUpperHalf){method="before";sameResultBox.bottom-=height/2}else sameResultBox.top+=height/2}else{var xCenter=(dim[0]+dim[1])/2,inLeftHalf=pointer.left<=xCenter;if(inLeftHalf){method="before";sameResultBox.right-=width/2}else sameResultBox.left+=width/2}if(this.hasChildGroup(index))sameResultBox=emptyBox;this.rootGroup.movePlaceholder(this,item,method,sameResultBox)},getItemDimensions:function(){if(!this.itemDimensions){this.items=this.$getChildren(this.el,"item").filter(":not(."+this.group.options.placeholderClass+", ."+this.group.options.draggedClass+")").get();setDimensions(this.items,this.itemDimensions=[],this.options.tolerance)}return this.itemDimensions},getItemOffsetParent:function(){var offsetParent,el=this.el;if(el.css("position")==="relative"||el.css("position")==="absolute"||el.css("position")==="fixed")offsetParent=el;else offsetParent=el.offsetParent();return offsetParent},hasChildGroup:function(index){return this.options.nested&&this.getContainerGroup(index)},getContainerGroup:function(index){var childGroup=$.data(this.items[index],subContainerKey);if(childGroup===undefined){var childContainers=this.$getChildren(this.items[index],"container");childGroup=false;if(childContainers[0]){var options=$.extend({},this.options,{rootGroup:this.rootGroup,group:groupCounter++});childGroup=childContainers[pluginName](options).data(pluginName).group}$.data(this.items[index],subContainerKey,childGroup)}return childGroup},$getChildren:function(parent,type){var options=this.rootGroup.options,path=options[type+"Path"],selector=options[type+"Selector"];parent=$(parent);if(path)parent=parent.find(path);return parent.children(selector)},_serialize:function(parent,isContainer){var that=this,childType=isContainer?"item":"container",children=this.$getChildren(parent,childType).not(this.options.exclude).map(function(){return that._serialize($(this),!isContainer)}).get();return this.rootGroup.options.serialize(parent,children,isContainer)},traverse:function(callback){$.each(this.items||[],function(item){var group=$.data(this,subContainerKey);if(group)group.traverse(callback)});callback(this)},_clearDimensions:function(){this.itemDimensions=undefined},_destroy:function(){var that=this;this.target.off(eventNames.start,this.handle);this.el.removeData(pluginName);if(this.options.drop)this.group.containers=$.grep(this.group.containers,function(val){return val!=that});$.each(this.items||[],function(){$.removeData(this,subContainerKey)})}};var API={enable:function(){this.traverse(function(object){object.disabled=false})},disable:function(){this.traverse(function(object){object.disabled=true})},serialize:function(){return this._serialize(this.el,true)},refresh:function(){this.traverse(function(object){object._clearDimensions()})},destroy:function(){this.traverse(function(object){object._destroy()})}};$.extend(Container.prototype,API);$.fn[pluginName]=function(methodOrOptions){var args=Array.prototype.slice.call(arguments,1);return this.map(function(){var $t=$(this),object=$t.data(pluginName);if(object&&API[methodOrOptions])return API[methodOrOptions].apply(object,args)||this;else if(!object&&(methodOrOptions===undefined||typeof methodOrOptions==="object"))$t.data(pluginName,new Container($t,methodOrOptions));return this})}}(jQuery,window,"sortable"); + !function(d,B,m,f){function v(a,b){var c=Math.max(0,a[0]-b[0],b[0]-a[1]),e=Math.max(0,a[2]-b[1],b[1]-a[3]);return c+e}function w(a,b,c,e){var k=a.length;e=e?"offset":"position";for(c=c||0;k--;){var g=a[k].el?a[k].el:d(a[k]),l=g[e]();l.left+=parseInt(g.css("margin-left"),10);l.top+=parseInt(g.css("margin-top"),10);b[k]=[l.left-c,l.left+g.outerWidth()+c,l.top-c,l.top+g.outerHeight()+c]}}function p(a,b){var c=b.offset();return{left:a.left-c.left,top:a.top-c.top}}function x(a,b,c){b=[b.left,b.top];c= + c&&[c.left,c.top];for(var e,k=a.length,d=[];k--;)e=a[k],d[k]=[k,v(e,b),c&&v(e,c)];return d=d.sort(function(a,b){return b[1]-a[1]||b[2]-a[2]||b[0]-a[0]})}function q(a){this.options=d.extend({},n,a);this.containers=[];this.options.rootGroup||(this.scrollProxy=d.proxy(this.scroll,this),this.dragProxy=d.proxy(this.drag,this),this.dropProxy=d.proxy(this.drop,this),this.placeholder=d(this.options.placeholder),a.isValidTarget||(this.options.isValidTarget=f))}function s(a,b){this.el=a;this.options=d.extend({}, + z,b);this.group=q.get(this.options);this.rootGroup=this.options.rootGroup||this.group;this.handle=this.rootGroup.options.handle||this.rootGroup.options.itemSelector;var c=this.rootGroup.options.itemPath;this.target=c?this.el.find(c):this.el;this.target.on(t.start,this.handle,d.proxy(this.dragInit,this));this.options.drop&&this.group.containers.push(this)}var z={drag:!0,drop:!0,exclude:"",nested:!0,vertical:!0},n={afterMove:function(a,b,c){},containerPath:"",containerSelector:"ol, ul",distance:0,delay:0, + handle:"",itemPath:"",itemSelector:"li",bodyClass:"dragging",draggedClass:"dragged",isValidTarget:function(a,b){return!0},onCancel:function(a,b,c,e){},onDrag:function(a,b,c,e){a.css(b)},onDragStart:function(a,b,c,e){a.css({height:a.outerHeight(),width:a.outerWidth()});a.addClass(b.group.options.draggedClass);d("body").addClass(b.group.options.bodyClass)},onDrop:function(a,b,c,e){a.removeClass(b.group.options.draggedClass).removeAttr("style");d("body").removeClass(b.group.options.bodyClass)},onMousedown:function(a, + b,c){if(!c.target.nodeName.match(/^(input|select|textarea)$/i))return c.preventDefault(),!0},placeholderClass:"placeholder",placeholder:'<li class="placeholder"></li>',pullPlaceholder:!0,serialize:function(a,b,c){a=d.extend({},a.data());if(c)return[b];b[0]&&(a.children=b);delete a.subContainers;delete a.sortable;return a},tolerance:0},r={},y=0,A={left:0,top:0,bottom:0,right:0},t={start:"touchstart.sortable mousedown.sortable",drop:"touchend.sortable touchcancel.sortable mouseup.sortable",drag:"touchmove.sortable mousemove.sortable", + scroll:"scroll.sortable"};q.get=function(a){r[a.group]||(a.group===f&&(a.group=y++),r[a.group]=new q(a));return r[a.group]};q.prototype={dragInit:function(a,b){this.$document=d(b.el[0].ownerDocument);var c=d(a.target).closest(this.options.itemSelector);c.length&&(this.item=c,this.itemContainer=b,!this.item.is(this.options.exclude)&&this.options.onMousedown(this.item,n.onMousedown,a)&&(this.setPointer(a),this.toggleListeners("on"),this.setupDelayTimer(),this.dragInitDone=!0))},drag:function(a){if(!this.dragging){if(!this.distanceMet(a)|| + !this.delayMet)return;this.options.onDragStart(this.item,this.itemContainer,n.onDragStart,a);this.item.before(this.placeholder);this.dragging=!0}this.setPointer(a);this.options.onDrag(this.item,p(this.pointer,this.item.offsetParent()),n.onDrag,a);a=this.getPointer(a);var b=this.sameResultBox,c=this.options.tolerance;(!b||b.top-c>a.top||b.bottom+c<a.top||b.left-c>a.left||b.right+c<a.left)&&!this.searchValidTarget()&&(this.placeholder.detach(),this.lastAppendedItem=f)},drop:function(a){this.toggleListeners("off"); + this.dragInitDone=!1;if(this.dragging){if(this.placeholder.closest("html")[0])this.placeholder.before(this.item).detach();else this.options.onCancel(this.item,this.itemContainer,n.onCancel,a);this.options.onDrop(this.item,this.getContainer(this.item),n.onDrop,a);this.clearDimensions();this.clearOffsetParent();this.lastAppendedItem=this.sameResultBox=f;this.dragging=!1}},searchValidTarget:function(a,b){a||(a=this.relativePointer||this.pointer,b=this.lastRelativePointer||this.lastPointer);for(var c= + x(this.getContainerDimensions(),a,b),e=c.length;e--;){var d=c[e][0];if(!c[e][1]||this.options.pullPlaceholder)if(d=this.containers[d],!d.disabled){if(!this.$getOffsetParent()){var g=d.getItemOffsetParent();a=p(a,g);b=p(b,g)}if(d.searchValidTarget(a,b))return!0}}this.sameResultBox&&(this.sameResultBox=f)},movePlaceholder:function(a,b,c,e){var d=this.lastAppendedItem;if(e||!d||d[0]!==b[0])b[c](this.placeholder),this.lastAppendedItem=b,this.sameResultBox=e,this.options.afterMove(this.placeholder,a,b)}, + getContainerDimensions:function(){this.containerDimensions||w(this.containers,this.containerDimensions=[],this.options.tolerance,!this.$getOffsetParent());return this.containerDimensions},getContainer:function(a){return a.closest(this.options.containerSelector).data(m)},$getOffsetParent:function(){if(this.offsetParent===f){var a=this.containers.length-1,b=this.containers[a].getItemOffsetParent();if(!this.options.rootGroup)for(;a--;)if(b[0]!=this.containers[a].getItemOffsetParent()[0]){b=!1;break}this.offsetParent= + b}return this.offsetParent},setPointer:function(a){a=this.getPointer(a);if(this.$getOffsetParent()){var b=p(a,this.$getOffsetParent());this.lastRelativePointer=this.relativePointer;this.relativePointer=b}this.lastPointer=this.pointer;this.pointer=a},distanceMet:function(a){a=this.getPointer(a);return Math.max(Math.abs(this.pointer.left-a.left),Math.abs(this.pointer.top-a.top))>=this.options.distance},getPointer:function(a){var b=a.originalEvent||a.originalEvent.touches&&a.originalEvent.touches[0]; + return{left:a.pageX||b.pageX,top:a.pageY||b.pageY}},setupDelayTimer:function(){var a=this;this.delayMet=!this.options.delay;this.delayMet||(clearTimeout(this._mouseDelayTimer),this._mouseDelayTimer=setTimeout(function(){a.delayMet=!0},this.options.delay))},scroll:function(a){this.clearDimensions();this.clearOffsetParent()},toggleListeners:function(a){var b=this;d.each(["drag","drop","scroll"],function(c,e){b.$document[a](t[e],b[e+"Proxy"])})},clearOffsetParent:function(){this.offsetParent=f},clearDimensions:function(){this.traverse(function(a){a._clearDimensions()})}, + traverse:function(a){a(this);for(var b=this.containers.length;b--;)this.containers[b].traverse(a)},_clearDimensions:function(){this.containerDimensions=f},_destroy:function(){r[this.options.group]=f}};s.prototype={dragInit:function(a){var b=this.rootGroup;!this.disabled&&!b.dragInitDone&&this.options.drag&&this.isValidDrag(a)&&b.dragInit(a,this)},isValidDrag:function(a){return 1==a.which||"touchstart"==a.type&&1==a.originalEvent.touches.length},searchValidTarget:function(a,b){var c=x(this.getItemDimensions(), + a,b),e=c.length,d=this.rootGroup,g=!d.options.isValidTarget||d.options.isValidTarget(d.item,this);if(!e&&g)return d.movePlaceholder(this,this.target,"append"),!0;for(;e--;)if(d=c[e][0],!c[e][1]&&this.hasChildGroup(d)){if(this.getContainerGroup(d).searchValidTarget(a,b))return!0}else if(g)return this.movePlaceholder(d,a),!0},movePlaceholder:function(a,b){var c=d(this.items[a]),e=this.itemDimensions[a],k="after",g=c.outerWidth(),f=c.outerHeight(),h=c.offset(),h={left:h.left,right:h.left+g,top:h.top, + bottom:h.top+f};this.options.vertical?b.top<=(e[2]+e[3])/2?(k="before",h.bottom-=f/2):h.top+=f/2:b.left<=(e[0]+e[1])/2?(k="before",h.right-=g/2):h.left+=g/2;this.hasChildGroup(a)&&(h=A);this.rootGroup.movePlaceholder(this,c,k,h)},getItemDimensions:function(){this.itemDimensions||(this.items=this.$getChildren(this.el,"item").filter(":not(."+this.group.options.placeholderClass+", ."+this.group.options.draggedClass+")").get(),w(this.items,this.itemDimensions=[],this.options.tolerance));return this.itemDimensions}, + getItemOffsetParent:function(){var a=this.el;return"relative"===a.css("position")||"absolute"===a.css("position")||"fixed"===a.css("position")?a:a.offsetParent()},hasChildGroup:function(a){return this.options.nested&&this.getContainerGroup(a)},getContainerGroup:function(a){var b=d.data(this.items[a],"subContainers");if(b===f){var c=this.$getChildren(this.items[a],"container"),b=!1;c[0]&&(b=d.extend({},this.options,{rootGroup:this.rootGroup,group:y++}),b=c[m](b).data(m).group);d.data(this.items[a], + "subContainers",b)}return b},$getChildren:function(a,b){var c=this.rootGroup.options,e=c[b+"Path"],c=c[b+"Selector"];a=d(a);e&&(a=a.find(e));return a.children(c)},_serialize:function(a,b){var c=this,e=this.$getChildren(a,b?"item":"container").not(this.options.exclude).map(function(){return c._serialize(d(this),!b)}).get();return this.rootGroup.options.serialize(a,e,b)},traverse:function(a){d.each(this.items||[],function(b){(b=d.data(this,"subContainers"))&&b.traverse(a)});a(this)},_clearDimensions:function(){this.itemDimensions= + f},_destroy:function(){var a=this;this.target.off(t.start,this.handle);this.el.removeData(m);this.options.drop&&(this.group.containers=d.grep(this.group.containers,function(b){return b!=a}));d.each(this.items||[],function(){d.removeData(this,"subContainers")})}};var u={enable:function(){this.traverse(function(a){a.disabled=!1})},disable:function(){this.traverse(function(a){a.disabled=!0})},serialize:function(){return this._serialize(this.el,!0)},refresh:function(){this.traverse(function(a){a._clearDimensions()})}, + destroy:function(){this.traverse(function(a){a._destroy()})}};d.extend(s.prototype,u);d.fn[m]=function(a){var b=Array.prototype.slice.call(arguments,1);return this.map(function(){var c=d(this),e=c.data(m);if(e&&u[a])return u[a].apply(e,b)||this;e||a!==f&&"object"!==typeof a||c.data(m,new s(c,a));return this})}}(jQuery,window,"sortable"); diff --git a/templates/2k11/admin/js/modernizr.min.js b/templates/2k11/admin/js/modernizr.min.js index 69959135..19a366cc 100644 --- a/templates/2k11/admin/js/modernizr.min.js +++ b/templates/2k11/admin/js/modernizr.min.js @@ -1,3 +1,3 @@ -/*! modernizr 3.2.0 (Custom Build) | MIT * +/*! modernizr 3.3.1 (Custom Build) | MIT * * http://modernizr.com/download/?-cssanimations-flexbox-flexboxlegacy-flexboxtweener-indexeddb-input-inputtypes-localstorage-sessionstorage-svg-touchevents-websqldatabase-domprefixes-mq-prefixes-setclasses-shiv-testallprops-testprop-teststyles !*/ -!function(e,t,n){function r(e,t){return typeof e===t}function a(){var e,t,n,a,o,i,s;for(var l in b)if(b.hasOwnProperty(l)){if(e=[],t=b[l],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(a=r(t.fn,"function")?t.fn():t.fn,o=0;o<e.length;o++)i=e[o],s=i.split("."),1===s.length?Modernizr[s[0]]=a:(!Modernizr[s[0]]||Modernizr[s[0]]instanceof Boolean||(Modernizr[s[0]]=new Boolean(Modernizr[s[0]])),Modernizr[s[0]][s[1]]=a),y.push((a?"":"no-")+s.join("-"))}}function o(e){var t=S.className,n=Modernizr._config.classPrefix||"";if(E&&(t=t.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}Modernizr._config.enableClasses&&(t+=" "+n+e.join(" "+n),E?S.className.baseVal=t:S.className=t)}function i(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):E?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function s(){var e=t.body;return e||(e=i(E?"svg":"body"),e.fake=!0),e}function l(e,n,r,a){var o,l,u,c,d="modernizr",f=i("div"),p=s();if(parseInt(r,10))for(;r--;)u=i("div"),u.id=a?a[r]:d+(r+1),f.appendChild(u);return o=i("style"),o.type="text/css",o.id="s"+d,(p.fake?p:f).appendChild(o),p.appendChild(f),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(t.createTextNode(e)),f.id=d,p.fake&&(p.style.background="",p.style.overflow="hidden",c=S.style.overflow,S.style.overflow="hidden",S.appendChild(p)),l=n(f,e),p.fake?(p.parentNode.removeChild(p),S.style.overflow=c,S.offsetHeight):f.parentNode.removeChild(f),!!l}function u(e,t){return!!~(""+e).indexOf(t)}function c(e){return e.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")}function d(e,t){return function(){return e.apply(t,arguments)}}function f(e,t,n){var a;for(var o in e)if(e[o]in t)return n===!1?e[o]:(a=t[e[o]],r(a,"function")?d(a,n||t):a);return!1}function p(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function m(t,r){var a=t.length;if("CSS"in e&&"supports"in e.CSS){for(;a--;)if(e.CSS.supports(p(t[a]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var o=[];a--;)o.push("("+p(t[a])+":"+r+")");return o=o.join(" or "),l("@supports ("+o+") { #modernizr { position: absolute; } }",function(e){return"absolute"==getComputedStyle(e,null).position})}return n}function h(e,t,a,o){function s(){d&&(delete A.style,delete A.modElem)}if(o=r(o,"undefined")?!1:o,!r(a,"undefined")){var l=m(e,a);if(!r(l,"undefined"))return l}for(var d,f,p,h,v,g=["modernizr","tspan"];!A.style;)d=!0,A.modElem=i(g.shift()),A.style=A.modElem.style;for(p=e.length,f=0;p>f;f++)if(h=e[f],v=A.style[h],u(h,"-")&&(h=c(h)),A.style[h]!==n){if(o||r(a,"undefined"))return s(),"pfx"==t?h:!0;try{A.style[h]=a}catch(y){}if(A.style[h]!=v)return s(),"pfx"==t?h:!0}return s(),!1}function v(e,t,n,a,o){var i=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+P.join(i+" ")+i).split(" ");return r(t,"string")||r(t,"undefined")?h(s,t,a,o):(s=(e+" "+T.join(i+" ")+i).split(" "),f(s,t,n))}function g(e,t,r){return v(e,n,n,t,r)}var y=[],b=[],x={_version:"3.2.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){b.push({name:e,fn:t,options:n})},addAsyncTest:function(e){b.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=x,Modernizr=new Modernizr,Modernizr.addTest("svg",!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect),Modernizr.addTest("localstorage",function(){var e="modernizr";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(t){return!1}}),Modernizr.addTest("websqldatabase","openDatabase"in e);var C=x._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):[];x._prefixes=C;var S=t.documentElement,E="svg"===S.nodeName.toLowerCase();E||!function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=b.elements;return"string"==typeof e?e.split(" "):e}function a(e,t){var n=b.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),b.elements=n+" "+e,u(t)}function o(e){var t=y[e[v]];return t||(t={},g++,e[v]=g,y[g]=t),t}function i(e,n,r){if(n||(n=t),d)return n.createElement(e);r||(r=o(n));var a;return a=r.cache[e]?r.cache[e].cloneNode():h.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!a.canHaveChildren||m.test(e)||a.tagUrn?a:r.frag.appendChild(a)}function s(e,n){if(e||(e=t),d)return e.createDocumentFragment();n=n||o(e);for(var a=n.frag.cloneNode(),i=0,s=r(),l=s.length;l>i;i++)a.createElement(s[i]);return a}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return b.shivMethods?i(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(b,t.frag)}function u(e){e||(e=t);var r=o(e);return!b.shivCSS||c||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),d||l(e,r),e}var c,d,f="3.7.3",p=e.html5||{},m=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,h=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",g=0,y={};!function(){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",c="hidden"in e,d=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){c=!0,d=!0}}();var b={elements:p.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:f,shivCSS:p.shivCSS!==!1,supportsUnknownElements:d,shivMethods:p.shivMethods!==!1,type:"default",shivDocument:u,createElement:i,createDocumentFragment:s,addElements:a};e.html5=b,u(t),"object"==typeof module&&module.exports&&(module.exports=b)}("undefined"!=typeof e?e:this,t);var w="Moz O ms Webkit",T=x._config.usePrefixes?w.toLowerCase().split(" "):[];x._domPrefixes=T;var _=i("input"),N="autocomplete autofocus list placeholder max min multiple pattern required step".split(" "),k={};Modernizr.input=function(t){for(var n=0,r=t.length;r>n;n++)k[t[n]]=!!(t[n]in _);return k.list&&(k.list=!(!i("datalist")||!e.HTMLDataListElement)),k}(N);var z="search tel url email datetime date month week time datetime-local number range color".split(" "),j={};Modernizr.inputtypes=function(e){for(var r,a,o,i=e.length,s="1)",l=0;i>l;l++)_.setAttribute("type",r=e[l]),o="text"!==_.type&&"style"in _,o&&(_.value=s,_.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(r)&&_.style.WebkitAppearance!==n?(S.appendChild(_),a=t.defaultView,o=a.getComputedStyle&&"textfield"!==a.getComputedStyle(_,null).WebkitAppearance&&0!==_.offsetHeight,S.removeChild(_)):/^(search|tel)$/.test(r)||(o=/^(url|email)$/.test(r)?_.checkValidity&&_.checkValidity()===!1:_.value!=s)),j[e[l]]=!!o;return j}(z);var D=function(){var t=e.matchMedia||e.msMatchMedia;return t?function(e){var n=t(e);return n&&n.matches||!1}:function(t){var n=!1;return l("@media "+t+" { #modernizr { position: absolute; } }",function(t){n="absolute"==(e.getComputedStyle?e.getComputedStyle(t,null):t.currentStyle).position}),n}}();x.mq=D;var M=x.testStyles=l;Modernizr.addTest("touchevents",function(){var n;if("ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch)n=!0;else{var r=["@media (",C.join("touch-enabled),("),"heartz",")","{#modernizr{top:9px;position:absolute}}"].join("");M(r,function(e){n=9===e.offsetTop})}return n});var P=x._config.usePrefixes?w.split(" "):[];x._cssomPrefixes=P,Modernizr.addTest("sessionstorage",function(){var e="modernizr";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(t){return!1}});var F=function(t){var r,a=C.length,o=e.CSSRule;if("undefined"==typeof o)return n;if(!t)return!1;if(t=t.replace(/^@/,""),r=t.replace(/-/g,"_").toUpperCase()+"_RULE",r in o)return"@"+t;for(var i=0;a>i;i++){var s=C[i],l=s.toUpperCase()+"_"+r;if(l in o)return"@-"+s.toLowerCase()+"-"+t}return!1};x.atRule=F;var L={elem:i("modernizr")};Modernizr._q.push(function(){delete L.elem});var A={style:L.elem.style};Modernizr._q.unshift(function(){delete A.style});x.testProp=function(e,t,r){return h([e],n,t,r)};x.testAllProps=v,x.testAllProps=g,Modernizr.addTest("cssanimations",g("animationName","a",!0)),Modernizr.addTest("flexbox",g("flexBasis","1px",!0)),Modernizr.addTest("flexboxlegacy",g("boxDirection","reverse",!0)),Modernizr.addTest("flexboxtweener",g("flexAlign","end",!0));var q=x.prefixed=function(e,t,n){return 0===e.indexOf("@")?F(e):(-1!=e.indexOf("-")&&(e=c(e)),t?v(e,t,n):v(e,"pfx"))},$=q("indexedDB",e);Modernizr.addTest("indexeddb",!!$),$&&Modernizr.addTest("indexeddb.deletedatabase","deleteDatabase"in $),a(),o(y),delete x.addTest,delete x.addAsyncTest;for(var R=0;R<Modernizr._q.length;R++)Modernizr._q[R]();e.Modernizr=Modernizr}(window,document); \ No newline at end of file +!function(e,t,n){function r(e,t){return typeof e===t}function a(){var e,t,n,a,o,i,s;for(var l in b)if(b.hasOwnProperty(l)){if(e=[],t=b[l],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(a=r(t.fn,"function")?t.fn():t.fn,o=0;o<e.length;o++)i=e[o],s=i.split("."),1===s.length?Modernizr[s[0]]=a:(!Modernizr[s[0]]||Modernizr[s[0]]instanceof Boolean||(Modernizr[s[0]]=new Boolean(Modernizr[s[0]])),Modernizr[s[0]][s[1]]=a),y.push((a?"":"no-")+s.join("-"))}}function o(e){var t=S.className,n=Modernizr._config.classPrefix||"";if(E&&(t=t.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}Modernizr._config.enableClasses&&(t+=" "+n+e.join(" "+n),E?S.className.baseVal=t:S.className=t)}function i(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):E?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function s(){var e=t.body;return e||(e=i(E?"svg":"body"),e.fake=!0),e}function l(e,n,r,a){var o,l,u,c,d="modernizr",f=i("div"),p=s();if(parseInt(r,10))for(;r--;)u=i("div"),u.id=a?a[r]:d+(r+1),f.appendChild(u);return o=i("style"),o.type="text/css",o.id="s"+d,(p.fake?p:f).appendChild(o),p.appendChild(f),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(t.createTextNode(e)),f.id=d,p.fake&&(p.style.background="",p.style.overflow="hidden",c=S.style.overflow,S.style.overflow="hidden",S.appendChild(p)),l=n(f,e),p.fake?(p.parentNode.removeChild(p),S.style.overflow=c,S.offsetHeight):f.parentNode.removeChild(f),!!l}function u(e,t){return!!~(""+e).indexOf(t)}function c(e){return e.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")}function d(e,t){return function(){return e.apply(t,arguments)}}function f(e,t,n){var a;for(var o in e)if(e[o]in t)return n===!1?e[o]:(a=t[e[o]],r(a,"function")?d(a,n||t):a);return!1}function p(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function m(t,r){var a=t.length;if("CSS"in e&&"supports"in e.CSS){for(;a--;)if(e.CSS.supports(p(t[a]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var o=[];a--;)o.push("("+p(t[a])+":"+r+")");return o=o.join(" or "),l("@supports ("+o+") { #modernizr { position: absolute; } }",function(e){return"absolute"==getComputedStyle(e,null).position})}return n}function h(e,t,a,o){function s(){d&&(delete A.style,delete A.modElem)}if(o=r(o,"undefined")?!1:o,!r(a,"undefined")){var l=m(e,a);if(!r(l,"undefined"))return l}for(var d,f,p,h,v,g=["modernizr","tspan"];!A.style;)d=!0,A.modElem=i(g.shift()),A.style=A.modElem.style;for(p=e.length,f=0;p>f;f++)if(h=e[f],v=A.style[h],u(h,"-")&&(h=c(h)),A.style[h]!==n){if(o||r(a,"undefined"))return s(),"pfx"==t?h:!0;try{A.style[h]=a}catch(y){}if(A.style[h]!=v)return s(),"pfx"==t?h:!0}return s(),!1}function v(e,t,n,a,o){var i=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+P.join(i+" ")+i).split(" ");return r(t,"string")||r(t,"undefined")?h(s,t,a,o):(s=(e+" "+T.join(i+" ")+i).split(" "),f(s,t,n))}function g(e,t,r){return v(e,n,n,t,r)}var y=[],b=[],x={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){b.push({name:e,fn:t,options:n})},addAsyncTest:function(e){b.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=x,Modernizr=new Modernizr,Modernizr.addTest("svg",!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect),Modernizr.addTest("localstorage",function(){var e="modernizr";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(t){return!1}}),Modernizr.addTest("sessionstorage",function(){var e="modernizr";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(t){return!1}}),Modernizr.addTest("websqldatabase","openDatabase"in e);var C=x._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];x._prefixes=C;var S=t.documentElement,E="svg"===S.nodeName.toLowerCase();E||!function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=b.elements;return"string"==typeof e?e.split(" "):e}function a(e,t){var n=b.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),b.elements=n+" "+e,u(t)}function o(e){var t=y[e[v]];return t||(t={},g++,e[v]=g,y[g]=t),t}function i(e,n,r){if(n||(n=t),d)return n.createElement(e);r||(r=o(n));var a;return a=r.cache[e]?r.cache[e].cloneNode():h.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!a.canHaveChildren||m.test(e)||a.tagUrn?a:r.frag.appendChild(a)}function s(e,n){if(e||(e=t),d)return e.createDocumentFragment();n=n||o(e);for(var a=n.frag.cloneNode(),i=0,s=r(),l=s.length;l>i;i++)a.createElement(s[i]);return a}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return b.shivMethods?i(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(b,t.frag)}function u(e){e||(e=t);var r=o(e);return!b.shivCSS||c||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),d||l(e,r),e}var c,d,f="3.7.3",p=e.html5||{},m=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,h=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",g=0,y={};!function(){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",c="hidden"in e,d=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){c=!0,d=!0}}();var b={elements:p.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:f,shivCSS:p.shivCSS!==!1,supportsUnknownElements:d,shivMethods:p.shivMethods!==!1,type:"default",shivDocument:u,createElement:i,createDocumentFragment:s,addElements:a};e.html5=b,u(t),"object"==typeof module&&module.exports&&(module.exports=b)}("undefined"!=typeof e?e:this,t);var w="Moz O ms Webkit",T=x._config.usePrefixes?w.toLowerCase().split(" "):[];x._domPrefixes=T;var _=i("input"),N="autocomplete autofocus list placeholder max min multiple pattern required step".split(" "),k={};Modernizr.input=function(t){for(var n=0,r=t.length;r>n;n++)k[t[n]]=!!(t[n]in _);return k.list&&(k.list=!(!i("datalist")||!e.HTMLDataListElement)),k}(N);var z="search tel url email datetime date month week time datetime-local number range color".split(" "),j={};Modernizr.inputtypes=function(e){for(var r,a,o,i=e.length,s="1)",l=0;i>l;l++)_.setAttribute("type",r=e[l]),o="text"!==_.type&&"style"in _,o&&(_.value=s,_.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(r)&&_.style.WebkitAppearance!==n?(S.appendChild(_),a=t.defaultView,o=a.getComputedStyle&&"textfield"!==a.getComputedStyle(_,null).WebkitAppearance&&0!==_.offsetHeight,S.removeChild(_)):/^(search|tel)$/.test(r)||(o=/^(url|email)$/.test(r)?_.checkValidity&&_.checkValidity()===!1:_.value!=s)),j[e[l]]=!!o;return j}(z);var D=function(){var t=e.matchMedia||e.msMatchMedia;return t?function(e){var n=t(e);return n&&n.matches||!1}:function(t){var n=!1;return l("@media "+t+" { #modernizr { position: absolute; } }",function(t){n="absolute"==(e.getComputedStyle?e.getComputedStyle(t,null):t.currentStyle).position}),n}}();x.mq=D;var M=x.testStyles=l;Modernizr.addTest("touchevents",function(){var n;if("ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch)n=!0;else{var r=["@media (",C.join("touch-enabled),("),"heartz",")","{#modernizr{top:9px;position:absolute}}"].join("");M(r,function(e){n=9===e.offsetTop})}return n});var P=x._config.usePrefixes?w.split(" "):[];x._cssomPrefixes=P;var F=function(t){var r,a=C.length,o=e.CSSRule;if("undefined"==typeof o)return n;if(!t)return!1;if(t=t.replace(/^@/,""),r=t.replace(/-/g,"_").toUpperCase()+"_RULE",r in o)return"@"+t;for(var i=0;a>i;i++){var s=C[i],l=s.toUpperCase()+"_"+r;if(l in o)return"@-"+s.toLowerCase()+"-"+t}return!1};x.atRule=F;var L={elem:i("modernizr")};Modernizr._q.push(function(){delete L.elem});var A={style:L.elem.style};Modernizr._q.unshift(function(){delete A.style});x.testProp=function(e,t,r){return h([e],n,t,r)};x.testAllProps=v,x.testAllProps=g,Modernizr.addTest("cssanimations",g("animationName","a",!0)),Modernizr.addTest("flexbox",g("flexBasis","1px",!0)),Modernizr.addTest("flexboxlegacy",g("boxDirection","reverse",!0)),Modernizr.addTest("flexboxtweener",g("flexAlign","end",!0));var q,$=x.prefixed=function(e,t,n){return 0===e.indexOf("@")?F(e):(-1!=e.indexOf("-")&&(e=c(e)),t?v(e,t,n):v(e,"pfx"))};try{q=$("indexedDB",e)}catch(R){}Modernizr.addTest("indexeddb",!!q),q&&Modernizr.addTest("indexeddb.deletedatabase","deleteDatabase"in q),a(),o(y),delete x.addTest,delete x.addAsyncTest;for(var U=0;U<Modernizr._q.length;U++)Modernizr._q[U]();e.Modernizr=Modernizr}(window,document); \ No newline at end of file diff --git a/templates/2k11/admin/js/plugins.js b/templates/2k11/admin/js/plugins.js index 214ea353..fad2d6e7 100644 --- a/templates/2k11/admin/js/plugins.js +++ b/templates/2k11/admin/js/plugins.js @@ -1,10 +1,10 @@ -// S9Y-MERGE START jquery.magnific-popup.js - 2015-01-01 15:22 -// Magnific Popup v1.0.0 by Dmitry Semenov +// S9Y-MERGE START jquery.magnific-popup.js - 2016-04-20 08:19 +// Magnific Popup v1.1.0 by Dmitry Semenov // http://bit.ly/magnific-popup#build=inline+image+iframe+imagezoom -(function(a){typeof define=="function"&&define.amd?define(["jquery"],a):typeof exports=="object"?a(require("jquery")):a(window.jQuery||window.Zepto)})(function(a){var b="Close",c="BeforeClose",d="AfterClose",e="BeforeAppend",f="MarkupParse",g="Open",h="Change",i="mfp",j="."+i,k="mfp-ready",l="mfp-removing",m="mfp-prevent-close",n,o=function(){},p=!!window.jQuery,q,r=a(window),s,t,u,v,w,x=function(a,b){n.ev.on(i+a+j,b)},y=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},z=function(b,c){n.ev.triggerHandler(i+b,c),n.st.callbacks&&(b=b.charAt(0).toLowerCase()+b.slice(1),n.st.callbacks[b]&&n.st.callbacks[b].apply(n,a.isArray(c)?c:[c]))},A=function(b){if(b!==w||!n.currTemplate.closeBtn)n.currTemplate.closeBtn=a(n.st.closeMarkup.replace("%title%",n.st.tClose)),w=b;return n.currTemplate.closeBtn},B=function(){a.magnificPopup.instance||(n=new o,n.init(),a.magnificPopup.instance=n)},C=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(a.transition!==undefined)return!0;while(b.length)if(b.pop()+"Transition"in a)return!0;return!1};o.prototype={constructor:o,init:function(){var b=navigator.appVersion;n.isIE7=b.indexOf("MSIE 7.")!==-1,n.isIE8=b.indexOf("MSIE 8.")!==-1,n.isLowIE=n.isIE7||n.isIE8,n.isAndroid=/android/gi.test(b),n.isIOS=/iphone|ipad|ipod/gi.test(b),n.supportsTransition=C(),n.probablyMobile=n.isAndroid||n.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),t=a(document),n.popupsCache={}},open:function(b){s||(s=a(document.body));var c;if(b.isObj===!1){n.items=b.items.toArray(),n.index=0;var d=b.items,e;for(c=0;c<d.length;c++){e=d[c],e.parsed&&(e=e.el[0]);if(e===b.el[0]){n.index=c;break}}}else n.items=a.isArray(b.items)?b.items:[b.items],n.index=b.index||0;if(n.isOpen){n.updateItemHTML();return}n.types=[],v="",b.mainEl&&b.mainEl.length?n.ev=b.mainEl.eq(0):n.ev=t,b.key?(n.popupsCache[b.key]||(n.popupsCache[b.key]={}),n.currTemplate=n.popupsCache[b.key]):n.currTemplate={},n.st=a.extend(!0,{},a.magnificPopup.defaults,b),n.fixedContentPos=n.st.fixedContentPos==="auto"?!n.probablyMobile:n.st.fixedContentPos,n.st.modal&&(n.st.closeOnContentClick=!1,n.st.closeOnBgClick=!1,n.st.showCloseBtn=!1,n.st.enableEscapeKey=!1),n.bgOverlay||(n.bgOverlay=y("bg").on("click"+j,function(){n.close()}),n.wrap=y("wrap").attr("tabindex",-1).on("click"+j,function(a){n._checkIfClose(a.target)&&n.close()}),n.container=y("container",n.wrap)),n.contentContainer=y("content"),n.st.preloader&&(n.preloader=y("preloader",n.container,n.st.tLoading));var h=a.magnificPopup.modules;for(c=0;c<h.length;c++){var i=h[c];i=i.charAt(0).toUpperCase()+i.slice(1),n["init"+i].call(n)}z("BeforeOpen"),n.st.showCloseBtn&&(n.st.closeBtnInside?(x(f,function(a,b,c,d){c.close_replaceWith=A(d.type)}),v+=" mfp-close-btn-in"):n.wrap.append(A())),n.st.alignTop&&(v+=" mfp-align-top"),n.fixedContentPos?n.wrap.css({overflow:n.st.overflowY,overflowX:"hidden",overflowY:n.st.overflowY}):n.wrap.css({top:r.scrollTop(),position:"absolute"}),(n.st.fixedBgPos===!1||n.st.fixedBgPos==="auto"&&!n.fixedContentPos)&&n.bgOverlay.css({height:t.height(),position:"absolute"}),n.st.enableEscapeKey&&t.on("keyup"+j,function(a){a.keyCode===27&&n.close()}),r.on("resize"+j,function(){n.updateSize()}),n.st.closeOnContentClick||(v+=" mfp-auto-cursor"),v&&n.wrap.addClass(v);var l=n.wH=r.height(),m={};if(n.fixedContentPos&&n._hasScrollBar(l)){var o=n._getScrollbarSize();o&&(m.marginRight=o)}n.fixedContentPos&&(n.isIE7?a("body, html").css("overflow","hidden"):m.overflow="hidden");var p=n.st.mainClass;return n.isIE7&&(p+=" mfp-ie7"),p&&n._addClassToMFP(p),n.updateItemHTML(),z("BuildControls"),a("html").css(m),n.bgOverlay.add(n.wrap).prependTo(n.st.prependTo||s),n._lastFocusedEl=document.activeElement,setTimeout(function(){n.content?(n._addClassToMFP(k),n._setFocus()):n.bgOverlay.addClass(k),t.on("focusin"+j,n._onFocusIn)},16),n.isOpen=!0,n.updateSize(l),z(g),b},close:function(){if(!n.isOpen)return;z(c),n.isOpen=!1,n.st.removalDelay&&!n.isLowIE&&n.supportsTransition?(n._addClassToMFP(l),setTimeout(function(){n._close()},n.st.removalDelay)):n._close()},_close:function(){z(b);var c=l+" "+k+" ";n.bgOverlay.detach(),n.wrap.detach(),n.container.empty(),n.st.mainClass&&(c+=n.st.mainClass+" "),n._removeClassFromMFP(c);if(n.fixedContentPos){var e={marginRight:""};n.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}t.off("keyup"+j+" focusin"+j),n.ev.off(j),n.wrap.attr("class","mfp-wrap").removeAttr("style"),n.bgOverlay.attr("class","mfp-bg"),n.container.attr("class","mfp-container"),n.st.showCloseBtn&&(!n.st.closeBtnInside||n.currTemplate[n.currItem.type]===!0)&&n.currTemplate.closeBtn&&n.currTemplate.closeBtn.detach(),n._lastFocusedEl&&a(n._lastFocusedEl).focus(),n.currItem=null,n.content=null,n.currTemplate=null,n.prevHeight=0,z(d)},updateSize:function(a){if(n.isIOS){var b=document.documentElement.clientWidth/window.innerWidth,c=window.innerHeight*b;n.wrap.css("height",c),n.wH=c}else n.wH=a||r.height();n.fixedContentPos||n.wrap.css("height",n.wH),z("Resize")},updateItemHTML:function(){var b=n.items[n.index];n.contentContainer.detach(),n.content&&n.content.detach(),b.parsed||(b=n.parseEl(n.index));var c=b.type;z("BeforeChange",[n.currItem?n.currItem.type:"",c]),n.currItem=b;if(!n.currTemplate[c]){var d=n.st[c]?n.st[c].markup:!1;z("FirstMarkupParse",d),d?n.currTemplate[c]=a(d):n.currTemplate[c]=!0}u&&u!==b.type&&n.container.removeClass("mfp-"+u+"-holder");var e=n["get"+c.charAt(0).toUpperCase()+c.slice(1)](b,n.currTemplate[c]);n.appendContent(e,c),b.preloaded=!0,z(h,b),u=b.type,n.container.prepend(n.contentContainer),z("AfterChange")},appendContent:function(a,b){n.content=a,a?n.st.showCloseBtn&&n.st.closeBtnInside&&n.currTemplate[b]===!0?n.content.find(".mfp-close").length||n.content.append(A()):n.content=a:n.content="",z(e),n.container.addClass("mfp-"+b+"-holder"),n.contentContainer.append(n.content)},parseEl:function(b){var c=n.items[b],d;c.tagName?c={el:a(c)}:(d=c.type,c={data:c,src:c.src});if(c.el){var e=n.types;for(var f=0;f<e.length;f++)if(c.el.hasClass("mfp-"+e[f])){d=e[f];break}c.src=c.el.attr("data-mfp-src"),c.src||(c.src=c.el.attr("href"))}return c.type=d||n.st.type||"inline",c.index=b,c.parsed=!0,n.items[b]=c,z("ElementParse",c),n.items[b]},addGroup:function(a,b){var c=function(c){c.mfpEl=this,n._openClick(c,a,b)};b||(b={});var d="click.magnificPopup";b.mainEl=a,b.items?(b.isObj=!0,a.off(d).on(d,c)):(b.isObj=!1,b.delegate?a.off(d).on(d,b.delegate,c):(b.items=a,a.off(d).on(d,c)))},_openClick:function(b,c,d){var e=d.midClick!==undefined?d.midClick:a.magnificPopup.defaults.midClick;if(!e&&(b.which===2||b.ctrlKey||b.metaKey))return;var f=d.disableOn!==undefined?d.disableOn:a.magnificPopup.defaults.disableOn;if(f)if(a.isFunction(f)){if(!f.call(n))return!0}else if(r.width()<f)return!0;b.type&&(b.preventDefault(),n.isOpen&&b.stopPropagation()),d.el=a(b.mfpEl),d.delegate&&(d.items=c.find(d.delegate)),n.open(d)},updateStatus:function(a,b){if(n.preloader){q!==a&&n.container.removeClass("mfp-s-"+q),!b&&a==="loading"&&(b=n.st.tLoading);var c={status:a,text:b};z("UpdateStatus",c),a=c.status,b=c.text,n.preloader.html(b),n.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),n.container.addClass("mfp-s-"+a),q=a}},_checkIfClose:function(b){if(a(b).hasClass(m))return;var c=n.st.closeOnContentClick,d=n.st.closeOnBgClick;if(c&&d)return!0;if(!n.content||a(b).hasClass("mfp-close")||n.preloader&&b===n.preloader[0])return!0;if(b!==n.content[0]&&!a.contains(n.content[0],b)){if(d&&a.contains(document,b))return!0}else if(c)return!0;return!1},_addClassToMFP:function(a){n.bgOverlay.addClass(a),n.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),n.wrap.removeClass(a)},_hasScrollBar:function(a){return(n.isIE7?t.height():document.body.scrollHeight)>(a||r.height())},_setFocus:function(){(n.st.focus?n.content.find(n.st.focus).eq(0):n.wrap).focus()},_onFocusIn:function(b){if(b.target!==n.wrap[0]&&!a.contains(n.wrap[0],b.target))return n._setFocus(),!1},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),z(f,[b,c,d]),a.each(c,function(a,c){if(c===undefined||c===!1)return!0;e=a.split("_");if(e.length>1){var d=b.find(j+"-"+e[0]);if(d.length>0){var f=e[1];f==="replaceWith"?d[0]!==c[0]&&d.replaceWith(c):f==="img"?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(j+"-"+a).html(c)})},_getScrollbarSize:function(){if(n.scrollbarSize===undefined){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),n.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return n.scrollbarSize}},a.magnificPopup={instance:null,proto:o.prototype,modules:[],open:function(b,c){return B(),b?b=a.extend(!0,{},b):b={},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(b){B();var c=a(this);if(typeof b=="string")if(b==="open"){var d,e=p?c.data("magnificPopup"):c[0].magnificPopup,f=parseInt(arguments[1],10)||0;e.items?d=e.items[f]:(d=c,e.delegate&&(d=d.find(e.delegate)),d=d.eq(f)),n._openClick({mfpEl:d},c,e)}else n.isOpen&&n[b].apply(n,Array.prototype.slice.call(arguments,1));else b=a.extend(!0,{},b),p?c.data("magnificPopup",b):c[0].magnificPopup=b,n.addGroup(c,b);return c};var D="inline",E,F,G,H=function(){G&&(F.after(G.addClass(E)).detach(),G=null)};a.magnificPopup.registerModule(D,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){n.types.push(D),x(b+"."+D,function(){H()})},getInline:function(b,c){H();if(b.src){var d=n.st.inline,e=a(b.src);if(e.length){var f=e[0].parentNode;f&&f.tagName&&(F||(E=d.hiddenClass,F=y(E),E="mfp-"+E),G=e.after(F).detach().removeClass(E)),n.updateStatus("ready")}else n.updateStatus("error",d.tNotFound),e=a("<div>");return b.inlineElement=e,e}return n.updateStatus("ready"),n._parseMarkup(c,{},b),c}}});var I,J=function(b){if(b.data&&b.data.title!==undefined)return b.data.title;var c=n.st.image.titleSrc;if(c){if(a.isFunction(c))return c.call(n,b);if(b.el)return b.el.attr(c)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var a=n.st.image,c=".image";n.types.push("image"),x(g+c,function(){n.currItem.type==="image"&&a.cursor&&s.addClass(a.cursor)}),x(b+c,function(){a.cursor&&s.removeClass(a.cursor),r.off("resize"+j)}),x("Resize"+c,n.resizeImage),n.isLowIE&&x("AfterChange",n.resizeImage)},resizeImage:function(){var a=n.currItem;if(!a||!a.img)return;if(n.st.image.verticalFit){var b=0;n.isLowIE&&(b=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",n.wH-b)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,I&&clearInterval(I),a.isCheckingImgSize=!1,z("ImageHasSize",a),a.imgHidden&&(n.content&&n.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var b=0,c=a.img[0],d=function(e){I&&clearInterval(I),I=setInterval(function(){if(c.naturalWidth>0){n._onImageHasSize(a);return}b>200&&clearInterval(I),b++,b===3?d(10):b===40?d(50):b===100&&d(500)},e)};d(1)},getImage:function(b,c){var d=0,e=function(){b&&(b.img[0].complete?(b.img.off(".mfploader"),b===n.currItem&&(n._onImageHasSize(b),n.updateStatus("ready")),b.hasSize=!0,b.loaded=!0,z("ImageLoadComplete")):(d++,d<200?setTimeout(e,100):f()))},f=function(){b&&(b.img.off(".mfploader"),b===n.currItem&&(n._onImageHasSize(b),n.updateStatus("error",g.tError.replace("%url%",b.src))),b.hasSize=!0,b.loaded=!0,b.loadError=!0)},g=n.st.image,h=c.find(".mfp-img");if(h.length){var i=document.createElement("img");i.className="mfp-img",b.el&&b.el.find("img").length&&(i.alt=b.el.find("img").attr("alt")),b.img=a(i).on("load.mfploader",e).on("error.mfploader",f),i.src=b.src,h.is("img")&&(b.img=b.img.clone()),i=b.img[0],i.naturalWidth>0?b.hasSize=!0:i.width||(b.hasSize=!1)}return n._parseMarkup(c,{title:J(b),img_replaceWith:b.img},b),n.resizeImage(),b.hasSize?(I&&clearInterval(I),b.loadError?(c.addClass("mfp-loading"),n.updateStatus("error",g.tError.replace("%url%",b.src))):(c.removeClass("mfp-loading"),n.updateStatus("ready")),c):(n.updateStatus("loading"),b.loading=!0,b.hasSize||(b.imgHidden=!0,c.addClass("mfp-loading"),n.findImageSize(b)),c)}}});var K,L=function(){return K===undefined&&(K=document.createElement("p").style.MozTransform!==undefined),K};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a=n.st.zoom,d=".zoom",e;if(!a.enabled||!n.supportsTransition)return;var f=a.duration,g=function(b){var c=b.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+a.duration/1e3+"s "+a.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,c.css(e),c},h=function(){n.content.css("visibility","visible")},i,j;x("BuildControls"+d,function(){if(n._allowZoom()){clearTimeout(i),n.content.css("visibility","hidden"),e=n._getItemToZoom();if(!e){h();return}j=g(e),j.css(n._getOffset()),n.wrap.append(j),i=setTimeout(function(){j.css(n._getOffset(!0)),i=setTimeout(function(){h(),setTimeout(function(){j.remove(),e=j=null,z("ZoomAnimationEnded")},16)},f)},16)}}),x(c+d,function(){if(n._allowZoom()){clearTimeout(i),n.st.removalDelay=f;if(!e){e=n._getItemToZoom();if(!e)return;j=g(e)}j.css(n._getOffset(!0)),n.wrap.append(j),n.content.css("visibility","hidden"),setTimeout(function(){j.css(n._getOffset())},16)}}),x(b+d,function(){n._allowZoom()&&(h(),j&&j.remove(),e=null)})},_allowZoom:function(){return n.currItem.type==="image"},_getItemToZoom:function(){return n.currItem.hasSize?n.currItem.img:!1},_getOffset:function(b){var c;b?c=n.currItem.img:c=n.st.zoom.opener(n.currItem.el||n.currItem);var d=c.offset(),e=parseInt(c.css("padding-top"),10),f=parseInt(c.css("padding-bottom"),10);d.top-=a(window).scrollTop()-e;var g={width:c.width(),height:(p?c.innerHeight():c[0].offsetHeight)-f-e};return L()?g["-moz-transform"]=g.transform="translate("+d.left+"px,"+d.top+"px)":(g.left=d.left,g.top=d.top),g}}});var M="iframe",N="//about:blank",O=function(a){if(n.currTemplate[M]){var b=n.currTemplate[M].find("iframe");b.length&&(a||(b[0].src=N),n.isIE8&&b.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(M,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){n.types.push(M),x("BeforeChange",function(a,b,c){b!==c&&(b===M?O():c===M&&O(!0))}),x(b+"."+M,function(){O()})},getIframe:function(b,c){var d=b.src,e=n.st.iframe;a.each(e.patterns,function(){if(d.indexOf(this.index)>-1)return this.id&&(typeof this.id=="string"?d=d.substr(d.lastIndexOf(this.id)+this.id.length,d.length):d=this.id.call(this,d)),d=this.src.replace("%id%",d),!1});var f={};return e.srcAction&&(f[e.srcAction]=d),n._parseMarkup(c,f,b),n.updateStatus("ready"),c}}}),B()}) +(function(a){typeof define=="function"&&define.amd?define(["jquery"],a):typeof exports=="object"?a(require("jquery")):a(window.jQuery||window.Zepto)})(function(a){var b="Close",c="BeforeClose",d="AfterClose",e="BeforeAppend",f="MarkupParse",g="Open",h="Change",i="mfp",j="."+i,k="mfp-ready",l="mfp-removing",m="mfp-prevent-close",n,o=function(){},p=!!window.jQuery,q,r=a(window),s,t,u,v,w=function(a,b){n.ev.on(i+a+j,b)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(b,c){n.ev.triggerHandler(i+b,c),n.st.callbacks&&(b=b.charAt(0).toLowerCase()+b.slice(1),n.st.callbacks[b]&&n.st.callbacks[b].apply(n,a.isArray(c)?c:[c]))},z=function(b){if(b!==v||!n.currTemplate.closeBtn)n.currTemplate.closeBtn=a(n.st.closeMarkup.replace("%title%",n.st.tClose)),v=b;return n.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(n=new o,n.init(),a.magnificPopup.instance=n)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(a.transition!==undefined)return!0;while(b.length)if(b.pop()+"Transition"in a)return!0;return!1};o.prototype={constructor:o,init:function(){var b=navigator.appVersion;n.isLowIE=n.isIE8=document.all&&!document.addEventListener,n.isAndroid=/android/gi.test(b),n.isIOS=/iphone|ipad|ipod/gi.test(b),n.supportsTransition=B(),n.probablyMobile=n.isAndroid||n.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),s=a(document),n.popupsCache={}},open:function(b){var c;if(b.isObj===!1){n.items=b.items.toArray(),n.index=0;var d=b.items,e;for(c=0;c<d.length;c++){e=d[c],e.parsed&&(e=e.el[0]);if(e===b.el[0]){n.index=c;break}}}else n.items=a.isArray(b.items)?b.items:[b.items],n.index=b.index||0;if(n.isOpen){n.updateItemHTML();return}n.types=[],u="",b.mainEl&&b.mainEl.length?n.ev=b.mainEl.eq(0):n.ev=s,b.key?(n.popupsCache[b.key]||(n.popupsCache[b.key]={}),n.currTemplate=n.popupsCache[b.key]):n.currTemplate={},n.st=a.extend(!0,{},a.magnificPopup.defaults,b),n.fixedContentPos=n.st.fixedContentPos==="auto"?!n.probablyMobile:n.st.fixedContentPos,n.st.modal&&(n.st.closeOnContentClick=!1,n.st.closeOnBgClick=!1,n.st.showCloseBtn=!1,n.st.enableEscapeKey=!1),n.bgOverlay||(n.bgOverlay=x("bg").on("click"+j,function(){n.close()}),n.wrap=x("wrap").attr("tabindex",-1).on("click"+j,function(a){n._checkIfClose(a.target)&&n.close()}),n.container=x("container",n.wrap)),n.contentContainer=x("content"),n.st.preloader&&(n.preloader=x("preloader",n.container,n.st.tLoading));var h=a.magnificPopup.modules;for(c=0;c<h.length;c++){var i=h[c];i=i.charAt(0).toUpperCase()+i.slice(1),n["init"+i].call(n)}y("BeforeOpen"),n.st.showCloseBtn&&(n.st.closeBtnInside?(w(f,function(a,b,c,d){c.close_replaceWith=z(d.type)}),u+=" mfp-close-btn-in"):n.wrap.append(z())),n.st.alignTop&&(u+=" mfp-align-top"),n.fixedContentPos?n.wrap.css({overflow:n.st.overflowY,overflowX:"hidden",overflowY:n.st.overflowY}):n.wrap.css({top:r.scrollTop(),position:"absolute"}),(n.st.fixedBgPos===!1||n.st.fixedBgPos==="auto"&&!n.fixedContentPos)&&n.bgOverlay.css({height:s.height(),position:"absolute"}),n.st.enableEscapeKey&&s.on("keyup"+j,function(a){a.keyCode===27&&n.close()}),r.on("resize"+j,function(){n.updateSize()}),n.st.closeOnContentClick||(u+=" mfp-auto-cursor"),u&&n.wrap.addClass(u);var l=n.wH=r.height(),m={};if(n.fixedContentPos&&n._hasScrollBar(l)){var o=n._getScrollbarSize();o&&(m.marginRight=o)}n.fixedContentPos&&(n.isIE7?a("body, html").css("overflow","hidden"):m.overflow="hidden");var p=n.st.mainClass;return n.isIE7&&(p+=" mfp-ie7"),p&&n._addClassToMFP(p),n.updateItemHTML(),y("BuildControls"),a("html").css(m),n.bgOverlay.add(n.wrap).prependTo(n.st.prependTo||a(document.body)),n._lastFocusedEl=document.activeElement,setTimeout(function(){n.content?(n._addClassToMFP(k),n._setFocus()):n.bgOverlay.addClass(k),s.on("focusin"+j,n._onFocusIn)},16),n.isOpen=!0,n.updateSize(l),y(g),b},close:function(){if(!n.isOpen)return;y(c),n.isOpen=!1,n.st.removalDelay&&!n.isLowIE&&n.supportsTransition?(n._addClassToMFP(l),setTimeout(function(){n._close()},n.st.removalDelay)):n._close()},_close:function(){y(b);var c=l+" "+k+" ";n.bgOverlay.detach(),n.wrap.detach(),n.container.empty(),n.st.mainClass&&(c+=n.st.mainClass+" "),n._removeClassFromMFP(c);if(n.fixedContentPos){var e={marginRight:""};n.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}s.off("keyup"+j+" focusin"+j),n.ev.off(j),n.wrap.attr("class","mfp-wrap").removeAttr("style"),n.bgOverlay.attr("class","mfp-bg"),n.container.attr("class","mfp-container"),n.st.showCloseBtn&&(!n.st.closeBtnInside||n.currTemplate[n.currItem.type]===!0)&&n.currTemplate.closeBtn&&n.currTemplate.closeBtn.detach(),n.st.autoFocusLast&&n._lastFocusedEl&&a(n._lastFocusedEl).focus(),n.currItem=null,n.content=null,n.currTemplate=null,n.prevHeight=0,y(d)},updateSize:function(a){if(n.isIOS){var b=document.documentElement.clientWidth/window.innerWidth,c=window.innerHeight*b;n.wrap.css("height",c),n.wH=c}else n.wH=a||r.height();n.fixedContentPos||n.wrap.css("height",n.wH),y("Resize")},updateItemHTML:function(){var b=n.items[n.index];n.contentContainer.detach(),n.content&&n.content.detach(),b.parsed||(b=n.parseEl(n.index));var c=b.type;y("BeforeChange",[n.currItem?n.currItem.type:"",c]),n.currItem=b;if(!n.currTemplate[c]){var d=n.st[c]?n.st[c].markup:!1;y("FirstMarkupParse",d),d?n.currTemplate[c]=a(d):n.currTemplate[c]=!0}t&&t!==b.type&&n.container.removeClass("mfp-"+t+"-holder");var e=n["get"+c.charAt(0).toUpperCase()+c.slice(1)](b,n.currTemplate[c]);n.appendContent(e,c),b.preloaded=!0,y(h,b),t=b.type,n.container.prepend(n.contentContainer),y("AfterChange")},appendContent:function(a,b){n.content=a,a?n.st.showCloseBtn&&n.st.closeBtnInside&&n.currTemplate[b]===!0?n.content.find(".mfp-close").length||n.content.append(z()):n.content=a:n.content="",y(e),n.container.addClass("mfp-"+b+"-holder"),n.contentContainer.append(n.content)},parseEl:function(b){var c=n.items[b],d;c.tagName?c={el:a(c)}:(d=c.type,c={data:c,src:c.src});if(c.el){var e=n.types;for(var f=0;f<e.length;f++)if(c.el.hasClass("mfp-"+e[f])){d=e[f];break}c.src=c.el.attr("data-mfp-src"),c.src||(c.src=c.el.attr("href"))}return c.type=d||n.st.type||"inline",c.index=b,c.parsed=!0,n.items[b]=c,y("ElementParse",c),n.items[b]},addGroup:function(a,b){var c=function(c){c.mfpEl=this,n._openClick(c,a,b)};b||(b={});var d="click.magnificPopup";b.mainEl=a,b.items?(b.isObj=!0,a.off(d).on(d,c)):(b.isObj=!1,b.delegate?a.off(d).on(d,b.delegate,c):(b.items=a,a.off(d).on(d,c)))},_openClick:function(b,c,d){var e=d.midClick!==undefined?d.midClick:a.magnificPopup.defaults.midClick;if(!e&&(b.which===2||b.ctrlKey||b.metaKey||b.altKey||b.shiftKey))return;var f=d.disableOn!==undefined?d.disableOn:a.magnificPopup.defaults.disableOn;if(f)if(a.isFunction(f)){if(!f.call(n))return!0}else if(r.width()<f)return!0;b.type&&(b.preventDefault(),n.isOpen&&b.stopPropagation()),d.el=a(b.mfpEl),d.delegate&&(d.items=c.find(d.delegate)),n.open(d)},updateStatus:function(a,b){if(n.preloader){q!==a&&n.container.removeClass("mfp-s-"+q),!b&&a==="loading"&&(b=n.st.tLoading);var c={status:a,text:b};y("UpdateStatus",c),a=c.status,b=c.text,n.preloader.html(b),n.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),n.container.addClass("mfp-s-"+a),q=a}},_checkIfClose:function(b){if(a(b).hasClass(m))return;var c=n.st.closeOnContentClick,d=n.st.closeOnBgClick;if(c&&d)return!0;if(!n.content||a(b).hasClass("mfp-close")||n.preloader&&b===n.preloader[0])return!0;if(b!==n.content[0]&&!a.contains(n.content[0],b)){if(d&&a.contains(document,b))return!0}else if(c)return!0;return!1},_addClassToMFP:function(a){n.bgOverlay.addClass(a),n.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),n.wrap.removeClass(a)},_hasScrollBar:function(a){return(n.isIE7?s.height():document.body.scrollHeight)>(a||r.height())},_setFocus:function(){(n.st.focus?n.content.find(n.st.focus).eq(0):n.wrap).focus()},_onFocusIn:function(b){if(b.target!==n.wrap[0]&&!a.contains(n.wrap[0],b.target))return n._setFocus(),!1},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(f,[b,c,d]),a.each(c,function(c,d){if(d===undefined||d===!1)return!0;e=c.split("_");if(e.length>1){var f=b.find(j+"-"+e[0]);if(f.length>0){var g=e[1];g==="replaceWith"?f[0]!==d[0]&&f.replaceWith(d):g==="img"?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(j+"-"+c).html(d)})},_getScrollbarSize:function(){if(n.scrollbarSize===undefined){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),n.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return n.scrollbarSize}},a.magnificPopup={instance:null,proto:o.prototype,modules:[],open:function(b,c){return A(),b?b=a.extend(!0,{},b):b={},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(b){A();var c=a(this);if(typeof b=="string")if(b==="open"){var d,e=p?c.data("magnificPopup"):c[0].magnificPopup,f=parseInt(arguments[1],10)||0;e.items?d=e.items[f]:(d=c,e.delegate&&(d=d.find(e.delegate)),d=d.eq(f)),n._openClick({mfpEl:d},c,e)}else n.isOpen&&n[b].apply(n,Array.prototype.slice.call(arguments,1));else b=a.extend(!0,{},b),p?c.data("magnificPopup",b):c[0].magnificPopup=b,n.addGroup(c,b);return c};var C="inline",D,E,F,G=function(){F&&(E.after(F.addClass(D)).detach(),F=null)};a.magnificPopup.registerModule(C,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){n.types.push(C),w(b+"."+C,function(){G()})},getInline:function(b,c){G();if(b.src){var d=n.st.inline,e=a(b.src);if(e.length){var f=e[0].parentNode;f&&f.tagName&&(E||(D=d.hiddenClass,E=x(D),D="mfp-"+D),F=e.after(E).detach().removeClass(D)),n.updateStatus("ready")}else n.updateStatus("error",d.tNotFound),e=a("<div>");return b.inlineElement=e,e}return n.updateStatus("ready"),n._parseMarkup(c,{},b),c}}});var H,I=function(b){if(b.data&&b.data.title!==undefined)return b.data.title;var c=n.st.image.titleSrc;if(c){if(a.isFunction(c))return c.call(n,b);if(b.el)return b.el.attr(c)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=n.st.image,d=".image";n.types.push("image"),w(g+d,function(){n.currItem.type==="image"&&c.cursor&&a(document.body).addClass(c.cursor)}),w(b+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),r.off("resize"+j)}),w("Resize"+d,n.resizeImage),n.isLowIE&&w("AfterChange",n.resizeImage)},resizeImage:function(){var a=n.currItem;if(!a||!a.img)return;if(n.st.image.verticalFit){var b=0;n.isLowIE&&(b=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",n.wH-b)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,H&&clearInterval(H),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(n.content&&n.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var b=0,c=a.img[0],d=function(e){H&&clearInterval(H),H=setInterval(function(){if(c.naturalWidth>0){n._onImageHasSize(a);return}b>200&&clearInterval(H),b++,b===3?d(10):b===40?d(50):b===100&&d(500)},e)};d(1)},getImage:function(b,c){var d=0,e=function(){b&&(b.img[0].complete?(b.img.off(".mfploader"),b===n.currItem&&(n._onImageHasSize(b),n.updateStatus("ready")),b.hasSize=!0,b.loaded=!0,y("ImageLoadComplete")):(d++,d<200?setTimeout(e,100):f()))},f=function(){b&&(b.img.off(".mfploader"),b===n.currItem&&(n._onImageHasSize(b),n.updateStatus("error",g.tError.replace("%url%",b.src))),b.hasSize=!0,b.loaded=!0,b.loadError=!0)},g=n.st.image,h=c.find(".mfp-img");if(h.length){var i=document.createElement("img");i.className="mfp-img",b.el&&b.el.find("img").length&&(i.alt=b.el.find("img").attr("alt")),b.img=a(i).on("load.mfploader",e).on("error.mfploader",f),i.src=b.src,h.is("img")&&(b.img=b.img.clone()),i=b.img[0],i.naturalWidth>0?b.hasSize=!0:i.width||(b.hasSize=!1)}return n._parseMarkup(c,{title:I(b),img_replaceWith:b.img},b),n.resizeImage(),b.hasSize?(H&&clearInterval(H),b.loadError?(c.addClass("mfp-loading"),n.updateStatus("error",g.tError.replace("%url%",b.src))):(c.removeClass("mfp-loading"),n.updateStatus("ready")),c):(n.updateStatus("loading"),b.loading=!0,b.hasSize||(b.imgHidden=!0,c.addClass("mfp-loading"),n.findImageSize(b)),c)}}});var J,K=function(){return J===undefined&&(J=document.createElement("p").style.MozTransform!==undefined),J};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a=n.st.zoom,d=".zoom",e;if(!a.enabled||!n.supportsTransition)return;var f=a.duration,g=function(b){var c=b.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+a.duration/1e3+"s "+a.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,c.css(e),c},h=function(){n.content.css("visibility","visible")},i,j;w("BuildControls"+d,function(){if(n._allowZoom()){clearTimeout(i),n.content.css("visibility","hidden"),e=n._getItemToZoom();if(!e){h();return}j=g(e),j.css(n._getOffset()),n.wrap.append(j),i=setTimeout(function(){j.css(n._getOffset(!0)),i=setTimeout(function(){h(),setTimeout(function(){j.remove(),e=j=null,y("ZoomAnimationEnded")},16)},f)},16)}}),w(c+d,function(){if(n._allowZoom()){clearTimeout(i),n.st.removalDelay=f;if(!e){e=n._getItemToZoom();if(!e)return;j=g(e)}j.css(n._getOffset(!0)),n.wrap.append(j),n.content.css("visibility","hidden"),setTimeout(function(){j.css(n._getOffset())},16)}}),w(b+d,function(){n._allowZoom()&&(h(),j&&j.remove(),e=null)})},_allowZoom:function(){return n.currItem.type==="image"},_getItemToZoom:function(){return n.currItem.hasSize?n.currItem.img:!1},_getOffset:function(b){var c;b?c=n.currItem.img:c=n.st.zoom.opener(n.currItem.el||n.currItem);var d=c.offset(),e=parseInt(c.css("padding-top"),10),f=parseInt(c.css("padding-bottom"),10);d.top-=a(window).scrollTop()-e;var g={width:c.width(),height:(p?c.innerHeight():c[0].offsetHeight)-f-e};return K()?g["-moz-transform"]=g.transform="translate("+d.left+"px,"+d.top+"px)":(g.left=d.left,g.top=d.top),g}}});var L="iframe",M="//about:blank",N=function(a){if(n.currTemplate[L]){var b=n.currTemplate[L].find("iframe");b.length&&(a||(b[0].src=M),n.isIE8&&b.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(L,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){n.types.push(L),w("BeforeChange",function(a,b,c){b!==c&&(b===L?N():c===L&&N(!0))}),w(b+"."+L,function(){N()})},getIframe:function(b,c){var d=b.src,e=n.st.iframe;a.each(e.patterns,function(){if(d.indexOf(this.index)>-1)return this.id&&(typeof this.id=="string"?d=d.substr(d.lastIndexOf(this.id)+this.id.length,d.length):d=this.id.call(this,d)),d=this.src.replace("%id%",d),!1});var f={};return e.srcAction&&(f[e.srcAction]=d),n._parseMarkup(c,f,b),n.updateStatus("ready"),c}}}),A()}) -// S9Y-MERGE END jquery.magnific-popup.js - 2015-01-01 15:22 -// S9Y-MERGE START jquery.syncheight.js - 2015-01-01 15:22 +// S9Y-MERGE END jquery.magnific-popup.js - 2016-04-20 08:19 +// S9Y-MERGE START jquery.syncheight.js - 2016-04-20 08:19 /** * syncHeight - jQuery plugin to automagically Snyc the heights of columns * Made to seemlessly work with the CCS-Framework YAML (yaml.de) @@ -24,8 +24,8 @@ !function(a){var b=function(){var a=0,b=[["min-height","0px"],["height","1%"]],c=/(msie) ([\w.]+)/.exec(navigator.userAgent.toLowerCase())||[],d=c[1]||"",e=c[2]||"0";return"msie"==d&&7>e&&(a=1),{name:b[a][0],autoheightVal:b[a][1]}};a.getSyncedHeight=function(c){var d=0,e=b();return a(c).each(function(){a(this).css(e.name,e.autoheightVal);var b=a(this).height();b>d&&(d=b)}),d},a.fn.syncHeight=function(c){var d={updateOnResize:!1,height:!1},e=a.extend(d,c),f=this,g=0,h=b().name;return g="number"==typeof e.height?e.height:a.getSyncedHeight(this),a(this).each(function(){a(this).css(h,g+"px")}),e.updateOnResize===!0&&a(window).resize(function(){a(f).syncHeight()}),this}}(jQuery); -// S9Y-MERGE END jquery.syncheight.js - 2015-01-01 15:22 -// S9Y-MERGE START jquery.tabs.js - 2015-01-01 15:22 +// S9Y-MERGE END jquery.syncheight.js - 2016-04-20 08:19 +// S9Y-MERGE START jquery.tabs.js - 2016-04-20 08:19 /** * Accessible Tabs - jQuery plugin for accessible, unobtrusive tabs * Build to seemlessly work with the CCS-Framework YAML (yaml.de) not depending on YAML though @@ -45,8 +45,8 @@ */ !function(a){function c(a,c){b&&window.console&&window.console.log&&(c?window.console.log(c+": ",a):window.console.log(a))}var b=!1;a.fn.extend({getUniqueId:function(a,b,c){return c=void 0===c?"":"-"+c,a+b+c},accessibleTabs:function(b){var d={wrapperClass:"content",currentClass:"current",tabhead:"h4",tabheadClass:"tabhead",tabbody:".tabbody",fx:"show",fxspeed:"normal",currentInfoText:"current tab: ",currentInfoPosition:"prepend",currentInfoClass:"current-info",tabsListClass:"tabs-list",syncheights:!1,syncHeightMethodName:"syncHeight",cssClassAvailable:!1,saveState:!1,autoAnchor:!1,pagination:!1,position:"top",wrapInnerNavLinks:"",firstNavItemClass:"first",lastNavItemClass:"last",clearfixClass:"clearfix"},e={37:-1,38:-1,39:1,40:1},f={top:"prepend",bottom:"append"};this.options=a.extend(d,b);var g=0;void 0!==a("body").data("accessibleTabsCount")&&(g=a("body").data("accessibleTabsCount")),a("body").data("accessibleTabsCount",this.size()+g);var h=this;return this.each(function(b){var d=a(this),i="",j=0,k=[];a(d).wrapInner('<div class="'+h.options.wrapperClass+'"></div>'),a(d).find(h.options.tabhead).each(function(c){var d="",e=a(this).attr("id");if(e){if(0===e.indexOf("accessibletabscontent"))return;d=' id="'+e+'"'}var f=h.getUniqueId("accessibletabscontent",g+b,c),l=h.getUniqueId("accessibletabsnavigation",g+b,c);if(k.push(f),h.options.cssClassAvailable===!0){var m="";a(this).attr("class")&&(m=a(this).attr("class"),m=' class="'+m+'"'),i+='<li id="'+l+'"><a'+d+m+' href="#'+f+'">'+a(this).html()+"</a></li>"}else i+='<li id="'+l+'"><a'+d+' href="#'+f+'">'+a(this).html()+"</a></li>";a(this).attr({id:f,"class":h.options.tabheadClass,tabindex:"-1"}),j++}),h.options.syncheights&&a.fn[h.options.syncHeightMethodName]&&(a(d).find(h.options.tabbody)[h.options.syncHeightMethodName](),a(window).resize(function(){a(d).find(h.options.tabbody)[h.options.syncHeightMethodName]()}));var l="."+h.options.tabsListClass;a(d).find(l).length||a(d)[f[h.options.position]]('<ul class="'+h.options.clearfixClass+" "+h.options.tabsListClass+" tabamount"+j+'"></ul>'),a(d).find(l).append(i);var m=a(d).find(h.options.tabbody);if(m.length>0&&(a(m).hide(),a(m[0]).show()),a(d).find("ul."+h.options.tabsListClass+">li:first").addClass(h.options.currentClass).addClass(h.options.firstNavItemClass).find("a")[h.options.currentInfoPosition]('<span class="'+h.options.currentInfoClass+'">'+h.options.currentInfoText+"</span>").parents("ul."+h.options.tabsListClass).children("li:last").addClass(h.options.lastNavItemClass),h.options.wrapInnerNavLinks&&a(d).find("ul."+h.options.tabsListClass+">li>a").wrapInner(h.options.wrapInnerNavLinks),a(d).find("ul."+h.options.tabsListClass+">li>a").each(function(b){a(this).click(function(c){c.preventDefault(),d.trigger("showTab.accessibleTabs",[a(c.target)]),h.options.saveState&&a.cookie&&a.cookie("accessibletab_"+d.attr("id")+"_active",b),a(d).find("ul."+h.options.tabsListClass+">li."+h.options.currentClass).removeClass(h.options.currentClass).find("span."+h.options.currentInfoClass).remove(),a(this).blur(),a(d).find(h.options.tabbody+":visible").hide(),a(d).find(h.options.tabbody).eq(b)[h.options.fx](h.options.fxspeed),a(this)[h.options.currentInfoPosition]('<span class="'+h.options.currentInfoClass+'">'+h.options.currentInfoText+"</span>").parent().addClass(h.options.currentClass),a(a(this).attr("href")).focus().keyup(function(c){e[c.keyCode]&&(h.showAccessibleTab(b+e[c.keyCode]),a(this).unbind("keyup"))})}),a(this).focus(function(){a(document).keyup(function(a){e[a.keyCode]&&h.showAccessibleTab(b+e[a.keyCode])})}),a(this).blur(function(){a(document).unbind("keyup")})}),h.options.saveState&&a.cookie){var n=a.cookie("accessibletab_"+d.attr("id")+"_active");c(a.cookie("accessibletab_"+d.attr("id")+"_active")),null!==n&&h.showAccessibleTab(n,d.attr("id"))}if(h.options.autoAnchor&&window.location.hash){var o=a("."+h.options.tabsListClass).find(window.location.hash);o.size()&&o.click()}if(h.options.pagination){var p='<ul class="pagination">';p+=' <li class="previous"><a href="#{previousAnchor}"><span>{previousHeadline}</span></a></li>',p+=' <li class="next"><a href="#{nextAnchor}"><span>{nextHeadline}</span></a></li>',p+="</ul>";var q=a(d).find(".tabbody"),r=q.size();q.each(function(b){a(this).append(p);var c=b+1;c>=r&&(c=0);var e=b-1;0>e&&(e=r-1);var f=a(this).find(".pagination"),g=f.find(".previous");g.find("span").text(a("#"+k[e]).text()),g.find("a").attr("href","#"+k[e]).click(function(b){b.preventDefault(),a(d).find(".tabs-list a").eq(e).click()});var h=f.find(".next");h.find("span").text(a("#"+k[c]).text()),h.find("a").attr("href","#"+k[c]).click(function(b){b.preventDefault(),a(d).find(".tabs-list a").eq(c).click()})})}})},showAccessibleTab:function(b,d){c("showAccessibleTab");var e=this;if(!d)return this.each(function(){var c=a(this);c.trigger("showTab.accessibleTabs");var d=c.find("ul."+e.options.tabsListClass+">li>a");c.trigger("showTab.accessibleTabs",[d.eq(b)]),d.eq(b).click()});var f=a("#"+d),g=f.find("ul."+e.options.tabsListClass+">li>a");f.trigger("showTab.accessibleTabs",[g.eq(b)]),g.eq(b).click()},showAccessibleTabSelector:function(b){c("showAccessibleTabSelector");var d=a(b);d&&("a"===d.get(0).nodeName.toLowerCase()?d.click():c("the selector of a showAccessibleTabSelector() call needs to point to a tabs headline!"))}})}(jQuery); -// S9Y-MERGE END jquery.tabs.js - 2015-01-01 15:22 -// S9Y-MERGE START canvas-toBlob.js - 2015-01-01 15:22 +// S9Y-MERGE END jquery.tabs.js - 2016-04-20 08:19 +// S9Y-MERGE START canvas-toBlob.js - 2016-04-20 08:19 /* canvas-toBlob.js * A canvas.toBlob() implementation. * 2013-12-27 @@ -63,8 +63,8 @@ /*! @source http://purl.eligrey.com/github/canvas-toBlob.js/blob/master/canvas-toBlob.js */ !function(a){"use strict";var g,b=a.Uint8Array,c=a.HTMLCanvasElement,d=c&&c.prototype,e=/\s*;\s*base64\s*(?:;|$)/i,f="toDataURL",h=function(a){for(var k,l,m,c=a.length,d=new b(0|3*(c/4)),e=0,f=0,h=[0,0],i=0,j=0;c--;)l=a.charCodeAt(e++),k=g[l-43],255!==k&&k!==m&&(h[1]=h[0],h[0]=l,j=j<<6|k,i++,4===i&&(d[f++]=j>>>16,61!==h[1]&&(d[f++]=j>>>8),61!==h[0]&&(d[f++]=j),i=0));return d};b&&(g=new b([62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51])),c&&!d.toBlob&&(d.toBlob=function(a,c){if(c||(c="image/png"),this.mozGetAsFile)return a(this.mozGetAsFile("canvas",c)),void 0;var l,d=Array.prototype.slice.call(arguments,1),g=this[f].apply(this,d),i=g.indexOf(","),j=g.substring(i+1),k=e.test(g.substring(0,i));Blob.fake?(l=new Blob,l.encoding=k?"base64":"URI",l.data=j,l.size=j.length):b&&(l=k?new Blob([h(j)],{type:c}):new Blob([decodeURIComponent(j)],{type:c})),a(l)},d.toBlobHD=d.toDataURLHD?function(){f="toDataURLHD";var a=this.toBlob();return f="toDataURL",a}:d.toBlob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this); -// S9Y-MERGE END canvas-toBlob.js - 2015-01-01 15:22 -// S9Y-MERGE START jquery.autoscroll.js - 2015-01-01 15:22 +// S9Y-MERGE END canvas-toBlob.js - 2016-04-20 08:19 +// S9Y-MERGE START jquery.autoscroll.js - 2016-04-20 08:19 /* * AutoScroll Plugin for jQuery * @@ -191,10 +191,10 @@ $.autoscroll = { window.scrollTo(e.scroll.x, e.scroll.y); } }; -// S9Y-MERGE END jquery.autoscroll.js - 2015-01-01 15:22 -// S9Y-MERGE START jquery.sortable.js - 2015-01-01 15:22 +// S9Y-MERGE END jquery.autoscroll.js - 2016-04-20 08:19 +// S9Y-MERGE START jquery.sortable.js - 2016-04-20 08:19 /* =================================================== - * jquery-sortable.js v0.9.12 + * jquery-sortable.js v0.9.13 * http://johnny.github.com/jquery-sortable/ * =================================================== * Copyright (c) 2012 Jonas von Andrian @@ -221,10 +221,28 @@ $.autoscroll = { * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ========================================================== */ -!function($,window,pluginName,undefined){var eventNames,containerDefaults={drag:true,drop:true,exclude:"",nested:true,vertical:true},groupDefaults={afterMove:function($placeholder,container,$closestItemOrContainer){},containerPath:"",containerSelector:"ol, ul",distance:0,delay:0,handle:"",itemPath:"",itemSelector:"li",bodyClass:"dragging",draggedClass:"dragged",isValidTarget:function($item,container){return true},onCancel:function($item,container,_super,event){},onDrag:function($item,position,_super,event){$item.css(position)},onDragStart:function($item,container,_super,event){$item.css({height:$item.height(),width:$item.width()});$item.addClass(container.group.options.draggedClass);$("body").addClass(container.group.options.bodyClass)},onDrop:function($item,container,_super,event){$item.removeClass(container.group.options.draggedClass).removeAttr("style");$("body").removeClass(container.group.options.bodyClass)},onMousedown:function($item,_super,event){if(!event.target.nodeName.match(/^(input|select|textarea)$/i)){event.preventDefault();return true}},placeholderClass:"placeholder",placeholder:'<li class="placeholder"></li>',pullPlaceholder:true,serialize:function($parent,$children,parentIsContainer){var result=$.extend({},$parent.data());if(parentIsContainer)return[$children];else if($children[0]){result.children=$children}delete result.subContainers;delete result.sortable;return result},tolerance:0},containerGroups={},groupCounter=0,emptyBox={left:0,top:0,bottom:0,right:0},eventNames={start:"touchstart.sortable mousedown.sortable",drop:"touchend.sortable touchcancel.sortable mouseup.sortable",drag:"touchmove.sortable mousemove.sortable",scroll:"scroll.sortable"},subContainerKey="subContainers";function d(a,b){var x=Math.max(0,a[0]-b[0],b[0]-a[1]),y=Math.max(0,a[2]-b[1],b[1]-a[3]);return x+y}function setDimensions(array,dimensions,tolerance,useOffset){var i=array.length,offsetMethod=useOffset?"offset":"position";tolerance=tolerance||0;while(i--){var el=array[i].el?array[i].el:$(array[i]),pos=el[offsetMethod]();pos.left+=parseInt(el.css("margin-left"),10);pos.top+=parseInt(el.css("margin-top"),10);dimensions[i]=[pos.left-tolerance,pos.left+el.outerWidth()+tolerance,pos.top-tolerance,pos.top+el.outerHeight()+tolerance]}}function getRelativePosition(pointer,element){var offset=element.offset();return{left:pointer.left-offset.left,top:pointer.top-offset.top}}function sortByDistanceDesc(dimensions,pointer,lastPointer){pointer=[pointer.left,pointer.top];lastPointer=lastPointer&&[lastPointer.left,lastPointer.top];var dim,i=dimensions.length,distances=[];while(i--){dim=dimensions[i];distances[i]=[i,d(dim,pointer),lastPointer&&d(dim,lastPointer)]}distances=distances.sort(function(a,b){return b[1]-a[1]||b[2]-a[2]||b[0]-a[0]});return distances}function ContainerGroup(options){this.options=$.extend({},groupDefaults,options);this.containers=[];if(!this.options.rootGroup){this.scrollProxy=$.proxy(this.scroll,this);this.dragProxy=$.proxy(this.drag,this);this.dropProxy=$.proxy(this.drop,this);this.placeholder=$(this.options.placeholder);if(!options.isValidTarget)this.options.isValidTarget=undefined}}ContainerGroup.get=function(options){if(!containerGroups[options.group]){if(options.group===undefined)options.group=groupCounter++;containerGroups[options.group]=new ContainerGroup(options)}return containerGroups[options.group]};ContainerGroup.prototype={dragInit:function(e,itemContainer){this.$document=$(itemContainer.el[0].ownerDocument);var closestItem=$(e.target).closest(this.options.itemSelector);if(closestItem.length){this.item=closestItem;this.itemContainer=itemContainer;if(this.item.is(this.options.exclude)||!this.options.onMousedown(this.item,groupDefaults.onMousedown,e)){return}this.setPointer(e);this.toggleListeners("on");this.setupDelayTimer();this.dragInitDone=true}},drag:function(e){if(!this.dragging){if(!this.distanceMet(e)||!this.delayMet)return;this.options.onDragStart(this.item,this.itemContainer,groupDefaults.onDragStart,e);this.item.before(this.placeholder);this.dragging=true}this.setPointer(e);this.options.onDrag(this.item,getRelativePosition(this.pointer,this.item.offsetParent()),groupDefaults.onDrag,e);var p=this.getPointer(e),box=this.sameResultBox,t=this.options.tolerance;if(!box||box.top-t>p.top||box.bottom+t<p.top||box.left-t>p.left||box.right+t<p.left)if(!this.searchValidTarget()){this.placeholder.detach();this.lastAppendedItem=undefined}},drop:function(e){this.toggleListeners("off");this.dragInitDone=false;if(this.dragging){if(this.placeholder.closest("html")[0]){this.placeholder.before(this.item).detach()}else{this.options.onCancel(this.item,this.itemContainer,groupDefaults.onCancel,e)}this.options.onDrop(this.item,this.getContainer(this.item),groupDefaults.onDrop,e);this.clearDimensions();this.clearOffsetParent();this.lastAppendedItem=this.sameResultBox=undefined;this.dragging=false}},searchValidTarget:function(pointer,lastPointer){if(!pointer){pointer=this.relativePointer||this.pointer;lastPointer=this.lastRelativePointer||this.lastPointer}var distances=sortByDistanceDesc(this.getContainerDimensions(),pointer,lastPointer),i=distances.length;while(i--){var index=distances[i][0],distance=distances[i][1];if(!distance||this.options.pullPlaceholder){var container=this.containers[index];if(!container.disabled){if(!this.$getOffsetParent()){var offsetParent=container.getItemOffsetParent();pointer=getRelativePosition(pointer,offsetParent);lastPointer=getRelativePosition(lastPointer,offsetParent)}if(container.searchValidTarget(pointer,lastPointer))return true}}}if(this.sameResultBox)this.sameResultBox=undefined},movePlaceholder:function(container,item,method,sameResultBox){var lastAppendedItem=this.lastAppendedItem;if(!sameResultBox&&lastAppendedItem&&lastAppendedItem[0]===item[0])return;item[method](this.placeholder);this.lastAppendedItem=item;this.sameResultBox=sameResultBox;this.options.afterMove(this.placeholder,container,item)},getContainerDimensions:function(){if(!this.containerDimensions)setDimensions(this.containers,this.containerDimensions=[],this.options.tolerance,!this.$getOffsetParent());return this.containerDimensions},getContainer:function(element){return element.closest(this.options.containerSelector).data(pluginName)},$getOffsetParent:function(){if(this.offsetParent===undefined){var i=this.containers.length-1,offsetParent=this.containers[i].getItemOffsetParent();if(!this.options.rootGroup){while(i--){if(offsetParent[0]!=this.containers[i].getItemOffsetParent()[0]){offsetParent=false;break}}}this.offsetParent=offsetParent}return this.offsetParent},setPointer:function(e){var pointer=this.getPointer(e);if(this.$getOffsetParent()){var relativePointer=getRelativePosition(pointer,this.$getOffsetParent());this.lastRelativePointer=this.relativePointer;this.relativePointer=relativePointer}this.lastPointer=this.pointer;this.pointer=pointer},distanceMet:function(e){var currentPointer=this.getPointer(e);return Math.max(Math.abs(this.pointer.left-currentPointer.left),Math.abs(this.pointer.top-currentPointer.top))>=this.options.distance},getPointer:function(e){var o=e.originalEvent||e.originalEvent.touches&&e.originalEvent.touches[0];return{left:e.pageX||o.pageX,top:e.pageY||o.pageY}},setupDelayTimer:function(){var that=this;this.delayMet=!this.options.delay;if(!this.delayMet){clearTimeout(this._mouseDelayTimer);this._mouseDelayTimer=setTimeout(function(){that.delayMet=true},this.options.delay)}},scroll:function(e){this.clearDimensions();this.clearOffsetParent()},toggleListeners:function(method){var that=this,events=["drag","drop","scroll"];$.each(events,function(i,event){that.$document[method](eventNames[event],that[event+"Proxy"])})},clearOffsetParent:function(){this.offsetParent=undefined},clearDimensions:function(){this.traverse(function(object){object._clearDimensions()})},traverse:function(callback){callback(this);var i=this.containers.length;while(i--){this.containers[i].traverse(callback)}},_clearDimensions:function(){this.containerDimensions=undefined},_destroy:function(){containerGroups[this.options.group]=undefined}};function Container(element,options){this.el=element;this.options=$.extend({},containerDefaults,options);this.group=ContainerGroup.get(this.options);this.rootGroup=this.options.rootGroup||this.group;this.handle=this.rootGroup.options.handle||this.rootGroup.options.itemSelector;var itemPath=this.rootGroup.options.itemPath;this.target=itemPath?this.el.find(itemPath):this.el;this.target.on(eventNames.start,this.handle,$.proxy(this.dragInit,this));if(this.options.drop)this.group.containers.push(this)}Container.prototype={dragInit:function(e){var rootGroup=this.rootGroup;if(!this.disabled&&!rootGroup.dragInitDone&&this.options.drag&&this.isValidDrag(e)){rootGroup.dragInit(e,this)}},isValidDrag:function(e){return e.which==1||e.type=="touchstart"&&e.originalEvent.touches.length==1},searchValidTarget:function(pointer,lastPointer){var distances=sortByDistanceDesc(this.getItemDimensions(),pointer,lastPointer),i=distances.length,rootGroup=this.rootGroup,validTarget=!rootGroup.options.isValidTarget||rootGroup.options.isValidTarget(rootGroup.item,this);if(!i&&validTarget){rootGroup.movePlaceholder(this,this.target,"append");return true}else while(i--){var index=distances[i][0],distance=distances[i][1];if(!distance&&this.hasChildGroup(index)){var found=this.getContainerGroup(index).searchValidTarget(pointer,lastPointer);if(found)return true}else if(validTarget){this.movePlaceholder(index,pointer);return true}}},movePlaceholder:function(index,pointer){var item=$(this.items[index]),dim=this.itemDimensions[index],method="after",width=item.outerWidth(),height=item.outerHeight(),offset=item.offset(),sameResultBox={left:offset.left,right:offset.left+width,top:offset.top,bottom:offset.top+height};if(this.options.vertical){var yCenter=(dim[2]+dim[3])/2,inUpperHalf=pointer.top<=yCenter;if(inUpperHalf){method="before";sameResultBox.bottom-=height/2}else sameResultBox.top+=height/2}else{var xCenter=(dim[0]+dim[1])/2,inLeftHalf=pointer.left<=xCenter;if(inLeftHalf){method="before";sameResultBox.right-=width/2}else sameResultBox.left+=width/2}if(this.hasChildGroup(index))sameResultBox=emptyBox;this.rootGroup.movePlaceholder(this,item,method,sameResultBox)},getItemDimensions:function(){if(!this.itemDimensions){this.items=this.$getChildren(this.el,"item").filter(":not(."+this.group.options.placeholderClass+", ."+this.group.options.draggedClass+")").get();setDimensions(this.items,this.itemDimensions=[],this.options.tolerance)}return this.itemDimensions},getItemOffsetParent:function(){var offsetParent,el=this.el;if(el.css("position")==="relative"||el.css("position")==="absolute"||el.css("position")==="fixed")offsetParent=el;else offsetParent=el.offsetParent();return offsetParent},hasChildGroup:function(index){return this.options.nested&&this.getContainerGroup(index)},getContainerGroup:function(index){var childGroup=$.data(this.items[index],subContainerKey);if(childGroup===undefined){var childContainers=this.$getChildren(this.items[index],"container");childGroup=false;if(childContainers[0]){var options=$.extend({},this.options,{rootGroup:this.rootGroup,group:groupCounter++});childGroup=childContainers[pluginName](options).data(pluginName).group}$.data(this.items[index],subContainerKey,childGroup)}return childGroup},$getChildren:function(parent,type){var options=this.rootGroup.options,path=options[type+"Path"],selector=options[type+"Selector"];parent=$(parent);if(path)parent=parent.find(path);return parent.children(selector)},_serialize:function(parent,isContainer){var that=this,childType=isContainer?"item":"container",children=this.$getChildren(parent,childType).not(this.options.exclude).map(function(){return that._serialize($(this),!isContainer)}).get();return this.rootGroup.options.serialize(parent,children,isContainer)},traverse:function(callback){$.each(this.items||[],function(item){var group=$.data(this,subContainerKey);if(group)group.traverse(callback)});callback(this)},_clearDimensions:function(){this.itemDimensions=undefined},_destroy:function(){var that=this;this.target.off(eventNames.start,this.handle);this.el.removeData(pluginName);if(this.options.drop)this.group.containers=$.grep(this.group.containers,function(val){return val!=that});$.each(this.items||[],function(){$.removeData(this,subContainerKey)})}};var API={enable:function(){this.traverse(function(object){object.disabled=false})},disable:function(){this.traverse(function(object){object.disabled=true})},serialize:function(){return this._serialize(this.el,true)},refresh:function(){this.traverse(function(object){object._clearDimensions()})},destroy:function(){this.traverse(function(object){object._destroy()})}};$.extend(Container.prototype,API);$.fn[pluginName]=function(methodOrOptions){var args=Array.prototype.slice.call(arguments,1);return this.map(function(){var $t=$(this),object=$t.data(pluginName);if(object&&API[methodOrOptions])return API[methodOrOptions].apply(object,args)||this;else if(!object&&(methodOrOptions===undefined||typeof methodOrOptions==="object"))$t.data(pluginName,new Container($t,methodOrOptions));return this})}}(jQuery,window,"sortable"); + !function(d,B,m,f){function v(a,b){var c=Math.max(0,a[0]-b[0],b[0]-a[1]),e=Math.max(0,a[2]-b[1],b[1]-a[3]);return c+e}function w(a,b,c,e){var k=a.length;e=e?"offset":"position";for(c=c||0;k--;){var g=a[k].el?a[k].el:d(a[k]),l=g[e]();l.left+=parseInt(g.css("margin-left"),10);l.top+=parseInt(g.css("margin-top"),10);b[k]=[l.left-c,l.left+g.outerWidth()+c,l.top-c,l.top+g.outerHeight()+c]}}function p(a,b){var c=b.offset();return{left:a.left-c.left,top:a.top-c.top}}function x(a,b,c){b=[b.left,b.top];c= + c&&[c.left,c.top];for(var e,k=a.length,d=[];k--;)e=a[k],d[k]=[k,v(e,b),c&&v(e,c)];return d=d.sort(function(a,b){return b[1]-a[1]||b[2]-a[2]||b[0]-a[0]})}function q(a){this.options=d.extend({},n,a);this.containers=[];this.options.rootGroup||(this.scrollProxy=d.proxy(this.scroll,this),this.dragProxy=d.proxy(this.drag,this),this.dropProxy=d.proxy(this.drop,this),this.placeholder=d(this.options.placeholder),a.isValidTarget||(this.options.isValidTarget=f))}function s(a,b){this.el=a;this.options=d.extend({}, + z,b);this.group=q.get(this.options);this.rootGroup=this.options.rootGroup||this.group;this.handle=this.rootGroup.options.handle||this.rootGroup.options.itemSelector;var c=this.rootGroup.options.itemPath;this.target=c?this.el.find(c):this.el;this.target.on(t.start,this.handle,d.proxy(this.dragInit,this));this.options.drop&&this.group.containers.push(this)}var z={drag:!0,drop:!0,exclude:"",nested:!0,vertical:!0},n={afterMove:function(a,b,c){},containerPath:"",containerSelector:"ol, ul",distance:0,delay:0, + handle:"",itemPath:"",itemSelector:"li",bodyClass:"dragging",draggedClass:"dragged",isValidTarget:function(a,b){return!0},onCancel:function(a,b,c,e){},onDrag:function(a,b,c,e){a.css(b)},onDragStart:function(a,b,c,e){a.css({height:a.outerHeight(),width:a.outerWidth()});a.addClass(b.group.options.draggedClass);d("body").addClass(b.group.options.bodyClass)},onDrop:function(a,b,c,e){a.removeClass(b.group.options.draggedClass).removeAttr("style");d("body").removeClass(b.group.options.bodyClass)},onMousedown:function(a, + b,c){if(!c.target.nodeName.match(/^(input|select|textarea)$/i))return c.preventDefault(),!0},placeholderClass:"placeholder",placeholder:'<li class="placeholder"></li>',pullPlaceholder:!0,serialize:function(a,b,c){a=d.extend({},a.data());if(c)return[b];b[0]&&(a.children=b);delete a.subContainers;delete a.sortable;return a},tolerance:0},r={},y=0,A={left:0,top:0,bottom:0,right:0},t={start:"touchstart.sortable mousedown.sortable",drop:"touchend.sortable touchcancel.sortable mouseup.sortable",drag:"touchmove.sortable mousemove.sortable", + scroll:"scroll.sortable"};q.get=function(a){r[a.group]||(a.group===f&&(a.group=y++),r[a.group]=new q(a));return r[a.group]};q.prototype={dragInit:function(a,b){this.$document=d(b.el[0].ownerDocument);var c=d(a.target).closest(this.options.itemSelector);c.length&&(this.item=c,this.itemContainer=b,!this.item.is(this.options.exclude)&&this.options.onMousedown(this.item,n.onMousedown,a)&&(this.setPointer(a),this.toggleListeners("on"),this.setupDelayTimer(),this.dragInitDone=!0))},drag:function(a){if(!this.dragging){if(!this.distanceMet(a)|| + !this.delayMet)return;this.options.onDragStart(this.item,this.itemContainer,n.onDragStart,a);this.item.before(this.placeholder);this.dragging=!0}this.setPointer(a);this.options.onDrag(this.item,p(this.pointer,this.item.offsetParent()),n.onDrag,a);a=this.getPointer(a);var b=this.sameResultBox,c=this.options.tolerance;(!b||b.top-c>a.top||b.bottom+c<a.top||b.left-c>a.left||b.right+c<a.left)&&!this.searchValidTarget()&&(this.placeholder.detach(),this.lastAppendedItem=f)},drop:function(a){this.toggleListeners("off"); + this.dragInitDone=!1;if(this.dragging){if(this.placeholder.closest("html")[0])this.placeholder.before(this.item).detach();else this.options.onCancel(this.item,this.itemContainer,n.onCancel,a);this.options.onDrop(this.item,this.getContainer(this.item),n.onDrop,a);this.clearDimensions();this.clearOffsetParent();this.lastAppendedItem=this.sameResultBox=f;this.dragging=!1}},searchValidTarget:function(a,b){a||(a=this.relativePointer||this.pointer,b=this.lastRelativePointer||this.lastPointer);for(var c= + x(this.getContainerDimensions(),a,b),e=c.length;e--;){var d=c[e][0];if(!c[e][1]||this.options.pullPlaceholder)if(d=this.containers[d],!d.disabled){if(!this.$getOffsetParent()){var g=d.getItemOffsetParent();a=p(a,g);b=p(b,g)}if(d.searchValidTarget(a,b))return!0}}this.sameResultBox&&(this.sameResultBox=f)},movePlaceholder:function(a,b,c,e){var d=this.lastAppendedItem;if(e||!d||d[0]!==b[0])b[c](this.placeholder),this.lastAppendedItem=b,this.sameResultBox=e,this.options.afterMove(this.placeholder,a,b)}, + getContainerDimensions:function(){this.containerDimensions||w(this.containers,this.containerDimensions=[],this.options.tolerance,!this.$getOffsetParent());return this.containerDimensions},getContainer:function(a){return a.closest(this.options.containerSelector).data(m)},$getOffsetParent:function(){if(this.offsetParent===f){var a=this.containers.length-1,b=this.containers[a].getItemOffsetParent();if(!this.options.rootGroup)for(;a--;)if(b[0]!=this.containers[a].getItemOffsetParent()[0]){b=!1;break}this.offsetParent= + b}return this.offsetParent},setPointer:function(a){a=this.getPointer(a);if(this.$getOffsetParent()){var b=p(a,this.$getOffsetParent());this.lastRelativePointer=this.relativePointer;this.relativePointer=b}this.lastPointer=this.pointer;this.pointer=a},distanceMet:function(a){a=this.getPointer(a);return Math.max(Math.abs(this.pointer.left-a.left),Math.abs(this.pointer.top-a.top))>=this.options.distance},getPointer:function(a){var b=a.originalEvent||a.originalEvent.touches&&a.originalEvent.touches[0]; + return{left:a.pageX||b.pageX,top:a.pageY||b.pageY}},setupDelayTimer:function(){var a=this;this.delayMet=!this.options.delay;this.delayMet||(clearTimeout(this._mouseDelayTimer),this._mouseDelayTimer=setTimeout(function(){a.delayMet=!0},this.options.delay))},scroll:function(a){this.clearDimensions();this.clearOffsetParent()},toggleListeners:function(a){var b=this;d.each(["drag","drop","scroll"],function(c,e){b.$document[a](t[e],b[e+"Proxy"])})},clearOffsetParent:function(){this.offsetParent=f},clearDimensions:function(){this.traverse(function(a){a._clearDimensions()})}, + traverse:function(a){a(this);for(var b=this.containers.length;b--;)this.containers[b].traverse(a)},_clearDimensions:function(){this.containerDimensions=f},_destroy:function(){r[this.options.group]=f}};s.prototype={dragInit:function(a){var b=this.rootGroup;!this.disabled&&!b.dragInitDone&&this.options.drag&&this.isValidDrag(a)&&b.dragInit(a,this)},isValidDrag:function(a){return 1==a.which||"touchstart"==a.type&&1==a.originalEvent.touches.length},searchValidTarget:function(a,b){var c=x(this.getItemDimensions(), + a,b),e=c.length,d=this.rootGroup,g=!d.options.isValidTarget||d.options.isValidTarget(d.item,this);if(!e&&g)return d.movePlaceholder(this,this.target,"append"),!0;for(;e--;)if(d=c[e][0],!c[e][1]&&this.hasChildGroup(d)){if(this.getContainerGroup(d).searchValidTarget(a,b))return!0}else if(g)return this.movePlaceholder(d,a),!0},movePlaceholder:function(a,b){var c=d(this.items[a]),e=this.itemDimensions[a],k="after",g=c.outerWidth(),f=c.outerHeight(),h=c.offset(),h={left:h.left,right:h.left+g,top:h.top, + bottom:h.top+f};this.options.vertical?b.top<=(e[2]+e[3])/2?(k="before",h.bottom-=f/2):h.top+=f/2:b.left<=(e[0]+e[1])/2?(k="before",h.right-=g/2):h.left+=g/2;this.hasChildGroup(a)&&(h=A);this.rootGroup.movePlaceholder(this,c,k,h)},getItemDimensions:function(){this.itemDimensions||(this.items=this.$getChildren(this.el,"item").filter(":not(."+this.group.options.placeholderClass+", ."+this.group.options.draggedClass+")").get(),w(this.items,this.itemDimensions=[],this.options.tolerance));return this.itemDimensions}, + getItemOffsetParent:function(){var a=this.el;return"relative"===a.css("position")||"absolute"===a.css("position")||"fixed"===a.css("position")?a:a.offsetParent()},hasChildGroup:function(a){return this.options.nested&&this.getContainerGroup(a)},getContainerGroup:function(a){var b=d.data(this.items[a],"subContainers");if(b===f){var c=this.$getChildren(this.items[a],"container"),b=!1;c[0]&&(b=d.extend({},this.options,{rootGroup:this.rootGroup,group:y++}),b=c[m](b).data(m).group);d.data(this.items[a], + "subContainers",b)}return b},$getChildren:function(a,b){var c=this.rootGroup.options,e=c[b+"Path"],c=c[b+"Selector"];a=d(a);e&&(a=a.find(e));return a.children(c)},_serialize:function(a,b){var c=this,e=this.$getChildren(a,b?"item":"container").not(this.options.exclude).map(function(){return c._serialize(d(this),!b)}).get();return this.rootGroup.options.serialize(a,e,b)},traverse:function(a){d.each(this.items||[],function(b){(b=d.data(this,"subContainers"))&&b.traverse(a)});a(this)},_clearDimensions:function(){this.itemDimensions= + f},_destroy:function(){var a=this;this.target.off(t.start,this.handle);this.el.removeData(m);this.options.drop&&(this.group.containers=d.grep(this.group.containers,function(b){return b!=a}));d.each(this.items||[],function(){d.removeData(this,"subContainers")})}};var u={enable:function(){this.traverse(function(a){a.disabled=!1})},disable:function(){this.traverse(function(a){a.disabled=!0})},serialize:function(){return this._serialize(this.el,!0)},refresh:function(){this.traverse(function(a){a._clearDimensions()})}, + destroy:function(){this.traverse(function(a){a._destroy()})}};d.extend(s.prototype,u);d.fn[m]=function(a){var b=Array.prototype.slice.call(arguments,1);return this.map(function(){var c=d(this),e=c.data(m);if(e&&u[a])return u[a].apply(e,b)||this;e||a!==f&&"object"!==typeof a||c.data(m,new s(c,a));return this})}}(jQuery,window,"sortable"); -// S9Y-MERGE END jquery.sortable.js - 2015-01-01 15:22 -// S9Y-MERGE START jquery.cookie.js - 2015-01-01 15:22 +// S9Y-MERGE END jquery.sortable.js - 2016-04-20 08:19 +// S9Y-MERGE START jquery.cookie.js - 2016-04-20 08:19 /*! * jQuery Cookie Plugin v1.4.1 * https://github.com/carhartl/jquery-cookie @@ -234,12 +252,12 @@ $.autoscroll = { */ (function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else if(typeof exports==="object"){factory(require("jquery"))}else{factory(jQuery)}})(function($){var pluses=/\+/g;function encode(s){return config.raw?s:encodeURIComponent(s)}function decode(s){return config.raw?s:decodeURIComponent(s)}function stringifyCookieValue(value){return encode(config.json?JSON.stringify(value):String(value))}function parseCookieValue(s){if(s.indexOf('"')===0){s=s.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}try{s=decodeURIComponent(s.replace(pluses," "));return config.json?JSON.parse(s):s}catch(e){}}function read(s,converter){var value=config.raw?s:parseCookieValue(s);return $.isFunction(converter)?converter(value):value}var config=$.cookie=function(key,value,options){if(arguments.length>1&&!$.isFunction(value)){options=$.extend({},config.defaults,options);if(typeof options.expires==="number"){var days=options.expires,t=options.expires=new Date;t.setTime(+t+days*864e5)}return document.cookie=[encode(key),"=",stringifyCookieValue(value),options.expires?"; expires="+options.expires.toUTCString():"",options.path?"; path="+options.path:"",options.domain?"; domain="+options.domain:"",options.secure?"; secure":""].join("")}var result=key?undefined:{};var cookies=document.cookie?document.cookie.split("; "):[];for(var i=0,l=cookies.length;i<l;i++){var parts=cookies[i].split("=");var name=decode(parts.shift());var cookie=parts.join("=");if(key&&key===name){result=read(cookie,value);break}if(!key&&(cookie=read(cookie))!==undefined){result[name]=cookie}}return result};config.defaults={};$.removeCookie=function(key,options){if($.cookie(key)===undefined){return false}$.cookie(key,"",$.extend({},options,{expires:-1}));return!$.cookie(key)}}); -// S9Y-MERGE END jquery.cookie.js - 2015-01-01 15:22 -// S9Y-MERGE START jquery.details.js - 2015-01-01 15:22 +// S9Y-MERGE END jquery.cookie.js - 2016-04-20 08:19 +// S9Y-MERGE START jquery.details.js - 2016-04-20 08:19 /*! http://mths.be/details v0.1.0 by @mathias | includes http://mths.be/noselect v1.0.3 */ ;(function(a,f){var e=f.fn,d,c=Object.prototype.toString.call(window.opera)=='[object Opera]',g=(function(l){var j=l.createElement('details'),i,h,k;if(!('open' in j)){return false}h=l.body||(function(){var m=l.documentElement;i=true;return m.insertBefore(l.createElement('body'),m.firstElementChild||m.firstChild)}());j.innerHTML='<summary>a</summary>b';j.style.display='block';h.appendChild(j);k=j.offsetHeight;j.open=true;k=k!=j.offsetHeight;h.removeChild(j);if(i){h.parentNode.removeChild(h)}return k}(a)),b=function(i,l,k,h){var j=i.prop('open'),m=j&&h||!j&&!h;if(m){i.removeClass('open').prop('open',false).triggerHandler('close.details');l.attr('aria-expanded',false);k.hide()}else{i.addClass('open').prop('open',true).triggerHandler('open.details');l.attr('aria-expanded',true);k.show()}};e.noSelect=function(){var h='none';return this.bind('selectstart dragstart mousedown',function(){return false}).css({MozUserSelect:h,msUserSelect:h,webkitUserSelect:h,userSelect:h})};if(g){d=e.details=function(){return this.each(function(){var i=f(this),h=f('summary',i).first();h.attr({role:'button','aria-expanded':i.prop('open')}).on('click',function(){var j=i.prop('open');h.attr('aria-expanded',!j);i.triggerHandler((j?'close':'open')+'.details')})})};d.support=g}else{d=e.details=function(){return this.each(function(){var h=f(this),j=f('summary',h).first(),i=h.children(':not(summary)'),k=h.contents(':not(summary)');if(!j.length){j=f('<summary>').text('Details').prependTo(h)}if(i.length!=k.length){k.filter(function(){return this.nodeType==3&&/[^ \t\n\f\r]/.test(this.data)}).wrap('<span>');i=h.children(':not(summary)')}h.prop('open',typeof h.attr('open')=='string');b(h,j,i);j.attr('role','button').noSelect().prop('tabIndex',0).on('click',function(){j.focus();b(h,j,i,true)}).keyup(function(l){if(32==l.keyCode||(13==l.keyCode&&!c)){l.preventDefault();j.click()}})})};d.support=g}}(document,jQuery)); -// S9Y-MERGE END jquery.details.js - 2015-01-01 15:22 -// S9Y-MERGE START accessifyhtml5.js - 2015-01-01 15:22 +// S9Y-MERGE END jquery.details.js - 2016-04-20 08:19 +// S9Y-MERGE START accessifyhtml5.js - 2016-04-20 08:19 /* * Accessifyhtml5.js * @@ -250,4 +268,4 @@ var AccessifyHTML5=function(e,f){var c={article:{role:"article"},aside:{role:"co e.footer&&(c[e.footer]={role:"contentinfo"}),e.main&&(c[e.main]={role:"main"},c.main={role:""}));if(f&&f._CONFIG_&&f._CONFIG_.ignore_defaults)c=f;else for(a in f)c[a]=f[a];for(b in c)if(!b.match(/^_(CONFIG|[A-Z]+)_/)&&c.hasOwnProperty(b)){try{h=q.querySelectorAll(b)}catch(u){k.push({sel:b,attr:null,val:null,msg:"Invalid syntax for `document.querySelectorAll` function",ex:u})}p=c[b];(!h||1>h.length)&&g.warn.push({sel:b,attr:null,val:null,msg:"Not found"});for(l=0;l<h.length;l++)for(n in p)if(p.hasOwnProperty(n)&& (a=n,d=p[n],!a.match(/_?note/)))if(a.match(s))if((typeof d).match(/string|number|boolean/)){if(r=a.match(/(describ|label)l?edby/)){try{m=q.querySelector(d)}catch(v){k.push({sel:b,attr:a,val:d,msg:"Invalid selector syntax (2) - see 'val'",ex:v})}if(!m){k.push({sel:b,attr:a,val:d,msg:"Labelledby ref not found - see 'val'"});continue}m.id||(m.id="acfy-id-"+t);d=m.id;a="aria-"+("label"===r[1]?"labelledby":"describedby");t++}h[l].hasAttribute(a)?g.warn.push({sel:b,attr:a,val:d,msg:"Already present, skipped"}): (h[l].setAttribute(a,d),g.ok.push({sel:b,attr:a,val:d,msg:"Added"}))}else k.push({sel:b,attr:a,val:d,msg:"Value-type not allowed"});else k.push({sel:b,attr:a,val:null,msg:"Attribute not allowed",re:s})}}g.input=c;return g}; -// S9Y-MERGE END accessifyhtml5.js - 2015-01-01 15:22 +// S9Y-MERGE END accessifyhtml5.js - 2016-04-20 08:19 diff --git a/templates/2k11/admin/maintenance.inc.tpl b/templates/2k11/admin/maintenance.inc.tpl index 7c2dfa18..79ca2c41 100644 --- a/templates/2k11/admin/maintenance.inc.tpl +++ b/templates/2k11/admin/maintenance.inc.tpl @@ -1,17 +1,17 @@ -<div id="maintenance" class="clearfix"> + <div id="maintenance"> <h2>{$CONST.MENU_MAINTENANCE}</h2> {if $action == "integrity"} <h3 class="visuallyhidden">{$CONST.INTEGRITY}</h3> {if $noChecksum == true} - <span class="msg_notice"><span class="icon-info-circled"></span>{$CONST.CHECKSUMS_NOT_FOUND}</span> + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span>{$CONST.CHECKSUMS_NOT_FOUND}</span> {else} {if $badsums|count == 0} - <span class="msg_success"><span class="icon-ok-circled"></span>{$CONST.CHECKSUMS_PASS}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span>{$CONST.CHECKSUMS_PASS}</span> {else} <ul class="plainList"> {foreach $badsums as $rpath => $calcsum} - <li class="msg_error"><span class="icon-attention-circled"></span>{$CONST.CHECKSUM_FAILED|sprintf:$rpath}</li> + <li class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span>{$CONST.CHECKSUM_FAILED|sprintf:$rpath}</li> {/foreach} </ul> {/if} @@ -19,10 +19,10 @@ {/if} {if $cleanup_finish > 0} - <span class="msg_success"><span class="icon-ok-circled"></span>{$CONST.DONE}! <span class="perm_name">{$CONST.CLEANCOMPILE_PASS|sprintf:$cleanup_template}</span></span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span>{$CONST.DONE}! <span class="perm_name">{$CONST.CLEANCOMPILE_PASS|sprintf:$cleanup_template}</span></span> {/if} {if $cleanup_finish === 0} - <span class="msg_error"><span class="icon-attention-circled"></span>{$CONST.CLEANCOMPILE_FAIL}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span>{$CONST.CLEANCOMPILE_FAIL}</span> {/if} {if 'siteConfiguration'|checkPermission || 'blogConfiguration'|checkPermission} @@ -38,7 +38,7 @@ <h3>{$CONST.CLEANCOMPILE_TITLE}</h3> <a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=maintenance&serendipity[adminAction]=runcleanup" title="{$CONST.CLEANCOMPILE_TITLE}"><span>{$CONST.CLEANCOMPILE_TITLE}</span></a> - <button class="toggle_info button_link" type="button" data-href="#cleanup_info"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.MORE}</span></button> + <button class="toggle_info button_link" type="button" data-href="#cleanup_info"><span class="icon-info-circled" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MORE}</span></button> <span id="cleanup_info" class="comment_status additional_info">{$CONST.CLEANCOMPILE_INFO}</span> </section> {/if} @@ -47,12 +47,12 @@ <section id="maintenance_export" class="equal_heights quick_list"> <h3>{$CONST.EXPORT_ENTRIES}</h3> - <a class="button_link" href="{$serendipityBaseURL}rss.php?version=2.0&all=1"><span class="icon-rss"></span> {$CONST.EXPORT_FEED}</a> + <a class="button_link" href="{$serendipityBaseURL}rss.php?version=2.0&all=1"><span class="icon-rss" aria-hidden="true"></span> {$CONST.EXPORT_FEED}</a> </section> <section id="maintenance_import" class="equal_heights quick_list"> <h3>{$CONST.IMPORT_ENTRIES}</h3> - + {$importMenu} </section> {/if} @@ -61,7 +61,7 @@ <section id="maintenance_thumbs" class="quick_list"> <h3>{$CONST.CREATE_THUMBS}</h3> - <span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.WARNING_THIS_BLAHBLAH|replace:'\\n':'<br>'}</span> + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.WARNING_THIS_BLAHBLAH|replace:'\\n':'<br>'}</span> <form method="POST" action="serendipity_admin.php?serendipity[adminModule]=media&serendipity[adminAction]=doSync"> <fieldset> @@ -77,7 +77,7 @@ <input id="sizecheckthumbs" name="serendipity[deleteThumbs]" type="radio" value="check"> <label for="sizecheckthumbs">{$CONST.SYNC_OPTION_SIZECHECKTHUMBS}</label> </div> - + <div class="form_radio"> <input id="deletethumbs" name="serendipity[deleteThumbs]" type="radio" value="yes"> <label for="deletethumbs">{$CONST.SYNC_OPTION_DELETETHUMBS}</label> @@ -94,4 +94,4 @@ {serendipity_hookPlugin hook="backend_maintenance" hookAll="true"} -</div> +</div> \ No newline at end of file diff --git a/templates/2k11/admin/media_choose.tpl b/templates/2k11/admin/media_choose.tpl index 8d7ee35b..523a4570 100644 --- a/templates/2k11/admin/media_choose.tpl +++ b/templates/2k11/admin/media_choose.tpl @@ -1,6 +1,6 @@ {if $perm_denied} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.PERM_DENIED}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.PERM_DENIED}</span> {else} <!-- MEDIA SELECTION START --> {$media.external} @@ -11,7 +11,7 @@ <h1>{$CONST.YOU_CHOSE|sprintf:$media.file.realname}</h1> <img src="{$media.file.imgsrc}" alt=""> - + <form id="imageForm" name="serendipity[selForm]" action="#" method="GET"> {serendipity_hookPlugin hookAll=true hook='frontend_image_selector_hiddenfields' eventData=$media.file} <input name="imgThumbWidth" type="hidden" value="{$media.file.thumbWidth}"> @@ -170,5 +170,4 @@ {/if} {/if}{* if $media.file.is_image is something else end *} </div> -{/if}{* if $perm_denied else end *} - +{/if}{* if $perm_denied else end *} \ No newline at end of file diff --git a/templates/2k11/admin/media_items.tpl b/templates/2k11/admin/media_items.tpl index 89a32e8c..6fa868ba 100644 --- a/templates/2k11/admin/media_items.tpl +++ b/templates/2k11/admin/media_items.tpl @@ -49,7 +49,7 @@ {$img_title="{$file.path}"} {$img_alt="{$file.realname}"} {else} - {$link="{if $file.hotlink}{$file.path}{else}{$file.full_file}{/if}"} + {$link="{if $file.hotlink}{$file.path}{else}{$file.full_file}{/if}"} {$img_src="{$file.mimeicon}"} {$img_title="{$file.path}{$file.name}({$file.mime})"} {$img_alt="{$file.mime}"} @@ -60,9 +60,9 @@ {$link="?serendipity[adminModule]=images&serendipity[adminAction]=choose&serendipity[noBanner]=true&serendipity[noSidebar]=true&serendipity[noFooter]=true&serendipity[fid]={$file.id}&serendipity[filename_only]={$media.filename_only}&serendipity[textarea]={$media.textarea}&serendipity[htmltarget]={$media.htmltarget}"} {/if} - <article id="media_{$file.id}" class="media_file {if $media.manage}manage {/if}{cycle values="odd,even"}"> + <article id="media_{$file.id}" class="media_file {if $media.manage AND $media.multiperm}manage {/if}{cycle values="odd,even"}"> <header class="clearfix"> - {if $media.manage} + {if $media.manage AND $media.multiperm} <div class="form_check"> <input id="multidelete_image{$file.id}" class="multidelete" name="serendipity[multiDelete][]" type="checkbox" value="{$file.id}" data-multidelid="media_{$file.id}"> @@ -77,7 +77,7 @@ <div class="clearfix equal_heights media_file_wrap"> <div class="media_file_preview"> - <a {if $media.manage}class="media_fullsize"{/if} href="{$link}" title="{$CONST.MEDIA_FULLSIZE}: {$file.realname}" data-pwidth="{$file.popupWidth}" data-pheight="{$file.popupHeight}"> + <a {if $media.manage AND $media.multiperm}class="media_fullsize"{/if} href="{$link}" title="{$CONST.MEDIA_FULLSIZE}: {$file.realname}" data-pwidth="{$file.popupWidth}" data-pheight="{$file.popupHeight}"> <img src="{$img_src}" title="{$img_title}" alt="{$img_alt}"> </a> <footer id="media_file_meta_{$file.id}" class="media_file_meta additional_info"> @@ -112,28 +112,30 @@ {if $media.manage || {serendipity_getConfigVar key='showMediaToolbar'}} <ul class="media_file_actions actions plainList clearfix"> - <li><a class="media_show_info button_link" href="#media_file_meta_{$file.id}" title="{$CONST.SHOW_METADATA}"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.SHOW_METADATA}</span></a></li> + <li><a class="media_show_info button_link" href="#media_file_meta_{$file.id}" title="{$CONST.SHOW_METADATA}"><span class="icon-info-circled" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.SHOW_METADATA}</span></a></li> {if $file.is_editable} - <li><button class="media_rename button_link" type="button" title="{$CONST.MEDIA_RENAME}" data-fileid="{$file.id}" data-filename="{$file.name|escape:javascript}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.MEDIA_RENAME}</span></button></li> - {if $file.is_image AND NOT $file.hotlink} + <li><button class="media_rename button_link" type="button" title="{$CONST.MEDIA_RENAME}" data-fileid="{$file.id}" data-filename="{$file.name|escape:javascript}"><span class="icon-edit" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MEDIA_RENAME}</span></button></li> + {if $file.is_image AND NOT $file.hotlink AND $media.multiperm} - <li><a class="media_resize button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=scaleSelect&serendipity[fname]={$file.name|truncate:30:"…"}&serendipity[fid]={$file.id}&{$media.extraParems}" title="{$CONST.IMAGE_RESIZE}"><span class="icon-resize-full"></span><span class="visuallyhidden"> {$CONST.IMAGE_RESIZE}</span></a></li> + <li><a class="media_resize button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=scaleSelect&serendipity[fname]={$file.name|truncate:30:"…"}&serendipity[fid]={$file.id}&{$media.extraParems}" title="{$CONST.IMAGE_RESIZE}"><span class="icon-resize-full" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.IMAGE_RESIZE}</span></a></li> {/if} - {if $file.is_image AND NOT $file.hotlink} + {if $file.is_image AND NOT $file.hotlink AND $media.multiperm} - <li><a class="media_rotate_left button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=rotateCCW&serendipity[fid]={$file.id}" title="{$CONST.IMAGE_ROTATE_LEFT}"><span class="icon-ccw"></span><span class="visuallyhidden"> {$CONST.IMAGE_ROTATE_LEFT}</span></a></li> + <li><a class="media_rotate_left button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=rotateCCW&serendipity[fid]={$file.id}" title="{$CONST.IMAGE_ROTATE_LEFT}"><span class="icon-ccw" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.IMAGE_ROTATE_LEFT}</span></a></li> {/if} - {if $file.is_image AND NOT $file.hotlink} + {if $file.is_image AND NOT $file.hotlink AND $media.multiperm} - <li><a class="media_rotate_right button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=rotateCW&serendipity[fid]={$file.id}" title="{$CONST.IMAGE_ROTATE_RIGHT}"><span class="icon-cw"></span><span class="visuallyhidden">{$CONST.IMAGE_ROTATE_RIGHT}</span></a></li> + <li><a class="media_rotate_right button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=rotateCW&serendipity[fid]={$file.id}" title="{$CONST.IMAGE_ROTATE_RIGHT}"><span class="icon-cw" aria-hidden="true"></span><span class="visuallyhidden">{$CONST.IMAGE_ROTATE_RIGHT}</span></a></li> {/if} - {if $media.manage} + {if $media.manage AND $media.multiperm} - <li><a class="media_prop button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=properties&serendipity[fid]={$file.id}" title="{$CONST.MEDIA_PROP}"><span class="icon-picture"></span><span class="visuallyhidden"> {$CONST.MEDIA_PROP}</span></a></li> + <li><a class="media_prop button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=properties&serendipity[fid]={$file.id}" title="{$CONST.MEDIA_PROP}"><span class="icon-picture" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MEDIA_PROP}</span></a></li> {/if} + {if $media.multiperm} - <li><a class="media_delete button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=delete&serendipity[fid]={$file.id}" title="{$CONST.MEDIA_DELETE}" data-fileid="{$file.id}" data-filename="{$file.name|escape:javascript}"><span class="icon-trash"></span><span class="visuallyhidden"> {$CONST.MEDIA_DELETE}</span></a></li> + <li><a class="media_delete button_link" href="?serendipity[adminModule]=images&serendipity[adminAction]=delete&serendipity[fid]={$file.id}" title="{$CONST.MEDIA_DELETE}" data-fileid="{$file.id}" data-filename="{$file.name|escape:javascript}"><span class="icon-trash" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MEDIA_DELETE}</span></a></li> + {/if} {/if} </ul> @@ -261,4 +263,4 @@ </article> {/if} -{/foreach} +{/foreach} \ No newline at end of file diff --git a/templates/2k11/admin/media_pane.tpl b/templates/2k11/admin/media_pane.tpl index 6bc76bc1..ad93a536 100644 --- a/templates/2k11/admin/media_pane.tpl +++ b/templates/2k11/admin/media_pane.tpl @@ -13,8 +13,8 @@ {else}{$media.form_hidden}{/if} <ul class="filters_toolbar clearfix plainList"> - <li><a class="button_link" href="#media_pane_filter" title="Show filters"><span class="icon-filter"></span><span class="visuallyhidden"> {$CONST.FILTERS}</span></a></li> - <li><a class="button_link" href="#media_pane_sort" title="{$CONST.SORT_ORDER}"><span class="icon-sort"></span><span class="visuallyhidden"> {$CONST.SORT_ORDER}</span></a></li> + <li><a class="button_link" href="#media_pane_filter" title="Show filters"><span class="icon-filter" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.FILTERS}</span></a></li> + <li><a class="button_link" href="#media_pane_sort" title="{$CONST.SORT_ORDER}"><span class="icon-sort" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.SORT_ORDER}</span></a></li> <li id="media_filter_path"> <div class="form_select"> <label for="serendipity_only_path" class="visuallyhidden">{$CONST.FILTER_DIRECTORY}</label> @@ -39,6 +39,9 @@ <label for="serendipity[filter][fileCategory][Video]" class="media_selector button_link">{$CONST.VIDEO}</label> </fieldset> </li> + {if $smarty.get.serendipity.showUpload} + <li class="popuplayer_showUpload"><a class="button_link" href="?serendipity[adminModule]=media&serendipity[adminAction]=addSelect&{$media.extraParems}">{$CONST.ADD_MEDIA}</a></li> + {/if} </ul> <fieldset id="media_pane_filter" class="additional_info filter_pane"> @@ -102,18 +105,13 @@ <div class="form_field"> <label class="visuallyhidden">NOTE</label> <div class="bp_note"> - <span class="icon-info-circled"></span> mediaproperties metadata + <span class="icon-info-circled" aria-hidden="true"></span> mediaproperties metadata fields </div> </div> </div> {/if} {/foreach} - <div id="media_filter_file" class="form_field {if $media.simpleFilters}center{else}left{/if}"> - <label for="serendipity_only_filename">{$CONST.SORT_ORDER_NAME}</label> - <input id="serendipity_only_filename" name="serendipity[only_filename]" type="text" value="{$media.only_filename|escape}"> - </div> - <div id="media_filter_keywords" class="form_field {if $media.simpleFilters}right{else}center{/if}"> <label for="keyword_input">{$CONST.MEDIA_KEYWORDS}</label> <input id="keyword_input" name="serendipity[keywords]" type="text" value="{$media.keywords_selected|escape}"> @@ -226,18 +224,12 @@ </form> </div>{* has toolbar end *} -{if $smarty.get.serendipity.showUpload} -<div class="popuplayer_showUpload"> - <a class="button_link" href="?serendipity[adminModule]=media&serendipity[adminAction]=addSelect&{$media.extraParems}">{$CONST.ADD_MEDIA}</a> -</div> -{/if} - <div class="media_library_pane"> {if $media.nr_files < 1} - <span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.NO_IMAGES_FOUND}</span> + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.NO_IMAGES_FOUND}</span> {else} - {if $media.manage} + {if $media.manage AND $media.multiperm} <form id="formMultiDelete" name="formMultiDelete" action="?" method="post"> {$media.token} @@ -246,57 +238,53 @@ <input name="serendipity[adminAction]" type="hidden" value="multidelete"> {/if} - <div class="clearfix media_pane" data-thumbmaxwidth="{$media.thumbSize}"> + <div class="media_pane" data-thumbmaxwidth="{$media.thumbSize}"> {$MEDIA_ITEMS} - {if ($media.page != 1 && $media.page <= $media.pages)||$media.page != $media.pages} + {if ($media.page != 1 AND $media.page <= $media.pages) OR $media.page != $media.pages} <nav class="pagination"> <h3>{$CONST.PAGE_BROWSE_ENTRIES|sprintf:$media.page:$media.pages:$media.totalImages}</h3> <ul class="clearfix"> - <li class="first">{if $media.page > 1}<a class="button_link" href="{$media.linkFirst}" title="{$CONST.FIRST_PAGE}"><span class="visuallyhidden">{$CONST.FIRST_PAGE} </span><span class="icon-to-start"></span></a>{/if}</li> - <li class="prev">{if $media.page != 1 AND $media.page <= $media.pages}<a class="button_link" href="{$media.linkPrevious}" title="{$CONST.PREVIOUS}"><span class="icon-left-dir"></span><span class="visuallyhidden"> {$CONST.PREVIOUS}</span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li> + <li class="first">{if $media.page > 1}<a class="button_link" href="{$media.linkFirst}" title="{$CONST.FIRST_PAGE}"><span class="visuallyhidden">{$CONST.FIRST_PAGE} </span><span class="icon-to-start" aria-hidden="true"></span></a>{/if}</li> + <li class="prev">{if $media.page != 1 AND $media.page <= $media.pages}<a class="button_link" href="{$media.linkPrevious}" title="{$CONST.PREVIOUS}"><span class="icon-left-dir" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.PREVIOUS}</span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li> {* Looks weird, but last will be at end by the CSS float:right *} - <li class="last">{if $media.page < $media.pages}<a class="button_link" href="{$media.linkLast}" title="{$CONST.LAST_PAGE}"><span class="visuallyhidden">{$CONST.LAST_PAGE} </span><span class="icon-to-end"></span></a>{/if}</li> - <li class="next">{if $media.page != $media.pages}<a class="button_link" href="{$media.linkNext}" title="{$CONST.NEXT}"><span class="visuallyhidden">{$CONST.NEXT} </span><span class="icon-right-dir"></span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li> + <li class="last">{if $media.page < $media.pages}<a class="button_link" href="{$media.linkLast}" title="{$CONST.LAST_PAGE}"><span class="visuallyhidden">{$CONST.LAST_PAGE} </span><span class="icon-to-end" aria-hidden="true"></span></a>{/if}</li> + <li class="next">{if $media.page != $media.pages}<a class="button_link" href="{$media.linkNext}" title="{$CONST.NEXT}"><span class="visuallyhidden">{$CONST.NEXT} </span><span class="icon-right-dir" aria-hidden="true"></span></a>{else}<span class="visuallyhidden">{$CONST.NO_ENTRIES_TO_PRINT}</span>{/if}</li> </ul> </nav> {/if} </div>{* media pane end *} - {if $media.manage} + {if $media.manage AND $media.multiperm} <div class="form_buttons"> <input class="invert_selection" name="toggle" type="button" value="{$CONST.INVERT_SELECTIONS}"> + <a href="#move-popup" class="image_move button_link hidden">{$CONST.MOVE}</a> <input class="state_cancel" name="toggle_delete" type="submit" value="{$CONST.DELETE}"> </div> - <hr> - <div class="form_select"> - <label for="newDir">{$CONST.FILTER_DIRECTORY}</label> - <input type="hidden" name="serendipity[oldDir]" value=""> - <select id="newDir" name="serendipity[newDir]"> - <option value=""></option> - <option value="uploadRoot">{$CONST.BASE_DIRECTORY}</option> + {/if} + <input class="state_submit hidden" name="toggle_move" type="submit" value="{$CONST.MOVE}"> + <input type="hidden" id="newDir" name="serendipity[newDir]"> + </form> + <div id="move-popup" class="mfp-hide"> + <h3>Move images to directory</h3> + <form> + <div class="form_select"> + <select > + <option value="">{$CONST.BASE_DIRECTORY}</option> {foreach $media.paths AS $folderFoot} - <option value="{$folderFoot.relpath}">{' '|str_repeat:($folderFoot.depth*2)}{$folderFoot.name}</option> {/foreach} - </select> - </div> - <div class="form_buttons"> - <input class="state_submit" name="toggle_move" type="submit" value="{$CONST.MOVE}"> - <span class="media_file_actions actions"><a class="media_show_info button_link" href="#media_file_bulkmove" title="{$CONST.BULKMOVE_INFO}"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.BULKMOVE_INFO}</span></a></span> - </div> - - <footer id="media_file_bulkmove" class="media_file_bulkmove additional_info"> - <span class="msg_notice">{$CONST.BULKMOVE_INFO_DESC}</span> - </footer> - {/if} - - </form> + </div> + <div class="form_buttons"> + <input class="state_submit" type="submit" value="{$CONST.MOVE}"> + </div> + </form> + </div> {/if} -</div>{* media library pane end *} +</div>{* media library pane end *} \ No newline at end of file diff --git a/templates/2k11/admin/media_upload.tpl b/templates/2k11/admin/media_upload.tpl index 47113ba8..cb29e241 100644 --- a/templates/2k11/admin/media_upload.tpl +++ b/templates/2k11/admin/media_upload.tpl @@ -40,13 +40,13 @@ </div> </div> - <button id="add_upload" class="button_link" type="button" title="{$CONST.IMAGE_MORE_INPUT}"><span class="icon-plus"></span><span class="visuallyhidden"> {$CONST.IMAGE_MORE_INPUT}</span></button> + <button id="add_upload" class="button_link" type="button" title="{$CONST.IMAGE_MORE_INPUT}"><span class="icon-plus" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.IMAGE_MORE_INPUT}</span></button> </div> <h3>{$CONST.DOWNLOAD}</h3> <div class="panel"> - <span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.ADD_MEDIA_BLAHBLAH_NOTE}</span> + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.ADD_MEDIA_BLAHBLAH_NOTE}</span> <div id="downloads"> <div class="clearfix form_field"> @@ -87,4 +87,4 @@ <input class="check_inputs" name="go_properties" type="submit" value="{$CONST.GO_ADD_PROPERTIES|escape}"> {/if} </div> -</form> +</form> \ No newline at end of file diff --git a/templates/2k11/admin/oldie.css b/templates/2k11/admin/oldie.css index b87e1615..c9217062 100644 --- a/templates/2k11/admin/oldie.css +++ b/templates/2k11/admin/oldie.css @@ -20,6 +20,14 @@ position: relative; } +#media_selector_bar { + margin: 0; +} + +.popuplayer_showUpload { + margin: 1em 0 0; +} + .tabcontent #pluginlist_event > a, .tabcontent #pluginlist_sidebar > a { position: absolute; @@ -40,6 +48,7 @@ #image_directory_create_form label { display: inline-block; width: 20%; + white-space: nowrap;/*mediafilter*/ } #sort_entries .form_select select, @@ -83,6 +92,14 @@ margin: 0 0 1em; } +.popuplayer_showUpload { + margin: 0 .4em 1em 0; +} + +.media_select_strict { + margin: -1em 0; +} + #mediaPropertyForm .media_file_props label, #mediaPropertyForm header b, #mediaPropertyForm footer b { @@ -90,6 +107,11 @@ width: 20%; } +#media_filter > .left, +#media_filter > .center {/*mediafilter*/ + margin-right: .2em; +} + .user_level { display: inline; } @@ -144,13 +166,13 @@ pre { margin: 1.71429em 0; } -#template_select article, -.plugins_installable > li, +.no-flexbox #template_select article, +.no-flexbox .plugins_installable > li, #serendipityScaleForm, #serendipityScaleImg, -.media_file, -#dashboard > .dashboard_widget, -#maintenance > .quick_list, +.no-flexbox .media_file, +.no-flexbox #dashboard > .dashboard_widget, +.no-flexbox #maintenance > .quick_list, .serendipity_statistics > section, #serendipity_category > div > div, #serendipity_category #preview, @@ -162,6 +184,65 @@ pre { width: 48%; } +#dashboard, +#maintenance, +.media_pane, +.pluginmanager, +.plugins_installable, +#template_select, +#template_select > ul { + display: flex; + flex-wrap: wrap; + justify-content: space-between; +} + +.plugins_installable { + justify-content: flex-start; +} + +#dashboard > .dashboard_widget, +#maintenance > .quick_list, +.media_pane > .media_file, +.plugins_installable > li, +#template_select > article, +#template_select > ul li { + flex: 0 0 auto; + margin: 0 2% 1em 0; + width: 48%; +} + +.pluginmanager .pluginmanager_event { + flex: 0 0 auto; + margin: 0 1% 0 0; + width: 49%; +} + +.pluginmanager .pluginmanager_sidebar { + flex: 0 0 auto; + margin: 0 1% 0 0; + width: 32%; +} + +.no-js #dashboard #s9y_links, +#maintenance > h2, +.media_pane .pagination, +#template_select > h2 { + flex: 0 0 auto; + width: 100%; +} + +#dashboard > .dashboard_widget:nth-of-type(even), +#maintenance > .quick_list:nth-of-type(even), +.media_pane > .media_file:nth-of-type(even), +#template_select > .current_backend_template, +#template_select > ul li:nth-of-type(even) { + margin: 0 0 1em 2%; +} + +.no-js #dashboard #s9y_links { + margin: 0 0 1em; +} + .media_chooser { margin-bottom: 0; } @@ -176,22 +257,14 @@ pre { width: 84%; } -#template_select .current_backend_template, -#template_select li:nth-child(even) article, -.media_pane .even, -#dashboard > .dashboard_widget:nth-child(even), -#maintenance > section:nth-of-type(even) { +.no-flexbox #template_select .current_backend_template, +.no-flexbox #template_select li:nth-child(even) article, +.no-flexbox .media_pane .even, +.no-flexbox #dashboard > .dashboard_widget:nth-child(even), +.no-flexbox #maintenance > section:nth-of-type(even) { margin: 0 0 1em 2%; } -#maintenance > section { - margin: 0 2% 1em 0; -} - -#template_select .current_template { - margin-bottom: 2em; -} - #mediaPropertyForm .media_file { float: none; margin: 1.5em 0; @@ -227,6 +300,7 @@ pre { .configuration_group .form_field input, .configuration_group .form_area textarea, .configuration_group fieldset > fieldset legend, +.configuration_group div > fieldset legend, #uploadform .form_select label, #uploadform .form_field label, #uploadform .form_select select, @@ -302,14 +376,15 @@ pre { .configuration_group .form_multiselect, .configuration_group .form_field, .configuration_group .form_area, +.configuration_group .custom_item, .configuration_group fieldset > fieldset, -#template_select li:nth-child(odd), +.configuration_group div > fieldset, +.no-flexbox #template_select li:nth-child(odd), #template_select h2, -.media_pane .odd, -#dashboard > .odd, -.plugins_installable > li:nth-child(odd), +.no-flexbox .media_pane .odd, +.no-flexbox .plugins_installable > li:nth-child(odd), .serendipity_statistics > section:nth-child(odd), -.dashboard_widget:nth-child(odd) { +.no-flexbox .dashboard_widget:nth-child(odd) { clear: left; } @@ -323,33 +398,34 @@ pre { .configure_plugin fieldset .form_radio, .configuration_group fieldset > fieldset .form_radio, +.configuration_group div > fieldset .form_radio, #serendipity_plugin_config > fieldset .form_radio, #template_options fieldset .form_radio { margin-top: 0; } -.pluginmanager_side { +.no-flexbox .pluginmanager_side { float: left; margin: 0 0 1.5em; vertical-align: top; } -#pluginlist_sidebar .pluginmanager_side { +.no-flexbox #pluginlist_sidebar .pluginmanager_side { margin-right: 1%; width: 32%; } -#pluginlist_event .pluginmanager_side { +.no-flexbox #pluginlist_event .pluginmanager_side { margin-right: 1%; width: 49%; } -#pluginlist_event .pluginmanager_side:nth-child(even) { +.no-flexbox #pluginlist_event .pluginmanager_side:nth-child(even) { margin-right: 0; margin-left: 1%; } -#pluginlist_sidebar .pluginmanager_side:nth-of-type(4) { +.no-flexbox #pluginlist_sidebar .pluginmanager_side:nth-of-type(4) { clear: left; } @@ -358,6 +434,10 @@ pre { padding: .85715em; } +.manage h3 { + width: 17em; +} + #edit_entry_status_comments .form_check { margin-bottom: 0; } @@ -405,6 +485,12 @@ pre { width: 33% ; } +#media_filter > div.keywords {/*simple filter*/ + float: right; + margin-top: -2.5em; + margin-bottom: 0; +} + #filter_entries .form_select, #filter_entries .form_field { float: left; @@ -417,8 +503,10 @@ pre { width: 50%; } -#media_filter_file, -#media_pane_sort .left, +#media_filter .left { + clear: left; +} + #serendipity_comment .form_area { clear: both; } @@ -427,6 +515,10 @@ pre { padding-top: 2em; } +.manage h3 { + width: 19em; +} + #login .form_field input { width: auto; } @@ -567,6 +659,10 @@ main { width: 100%; } +.manage h3 { + width: 14em; +} + #login { margin: 4em auto 8em; -} +} \ No newline at end of file diff --git a/templates/2k11/admin/overview.inc.tpl b/templates/2k11/admin/overview.inc.tpl index 93c64c4b..54f2132d 100644 --- a/templates/2k11/admin/overview.inc.tpl +++ b/templates/2k11/admin/overview.inc.tpl @@ -1,22 +1,24 @@ <div id="dashboard_header" class="clearfix"> <h2>{$CONST.WELCOME_BACK} {$username|escape}</h2> - <a href="#s9y_links" class="button_link toggle_links"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.FURTHER_LINKS}</span></a> + <a href="#s9y_links" class="button_link toggle_links"><span class="icon-info-circled" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.FURTHER_LINKS}</span></a> </div> {$backend_frontpage_display} - <div id="dashboard" class="clearfix"> + <div id="dashboard"> {if $published} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.ENTRY_PUBLISHED|sprintf:$published|escape}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.ENTRY_PUBLISHED|sprintf:$published|escape}</span> + <hr class="separator"> {/if} {if $error_publish} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.PUBLISH_ERROR}: {$error_publish}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.PUBLISH_ERROR}: {$error_publish}</span> + <hr class="separator"> {/if} - {if $updateCheck == "stable" || $updateCheck == "beta" } + {if $updateCheck == "stable" || $updateCheck == "beta"} {if $curVersion == -1} <section id="dashboard_update"> <h3>{$CONST.UPDATE_NOTIFICATION}</h3> - <span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.UPDATE_FAILMSG}</span> + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.UPDATE_FAILMSG}</span> <form id="updateCheckDisable" method="POST"> <input type="hidden" name="serendipity[adminAction]" value="updateCheckDisable" /> {$token} @@ -28,7 +30,7 @@ <section id="dashboard_update"> <h3>{$CONST.UPDATE_NOTIFICATION}</h3> - <span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.NEW_VERSION_AVAILABLE} {$curVersion}</span> + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.NEW_VERSION_AVAILABLE} {$curVersion}</span> {$updateButton} </section> <hr class="separator"> @@ -48,18 +50,18 @@ <div id="c{$comment.id}_full" class="comment_full additional_info">{$comment.fullBody|escape}</div> <ul class="plainList actions"> - <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=edit&serendipity[id]={$comment.id}&serendipity[entry_id]={$comment.entry_id}&{$urltoken}" title="{$CONST.EDIT}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li> - <li><a class="button_link comments_reply" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=reply&serendipity[id]={$comment.id}&serendipity[entry_id]={$comment.entry_id}&serendipity[noBanner]=true&serendipity[noSidebar]=true&{$urltoken}" title="{$CONST.REPLY}"><span class="icon-chat"></span><span class="visuallyhidden"> {$CONST.REPLY}</span></a></li> + <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=edit&serendipity[id]={$comment.id}&serendipity[entry_id]={$comment.entry_id}}&serendipity[authorid]={$comment.authorid}&{$urltoken}" title="{$CONST.EDIT}"><span class="icon-edit" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li> + <li><a class="button_link comments_reply" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=reply&serendipity[id]={$comment.id}&serendipity[entry_id]={$comment.entry_id}&serendipity[noBanner]=true&serendipity[noSidebar]=true&serendipity[authorid]={$comment.authorid}&{$urltoken}" title="{$CONST.REPLY}"><span class="icon-chat" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.REPLY}</span></a></li> {if ($comment.status == 'pending') || ($comment.status == 'confirm')} - <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=approve&serendipity[id]={$comment.id}&{$urltoken}" title="{$CONST.APPROVE}"><span class="icon-thumbs-up-alt"></span><span class="visuallyhidden">{$CONST.APPROVE}</span></a></li> + <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=approve&serendipity[id]={$comment.id}&serendipity[authorid]={$comment.authorid}&{$urltoken}" title="{$CONST.APPROVE}"><span class="icon-thumbs-up-alt" aria-hidden="true"></span><span class="visuallyhidden">{$CONST.APPROVE}</span></a></li> {/if} {if ($comment.status == 'approved')} - <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=pending&serendipity[id]={$comment.id}&{$urltoken}" title="{$CONST.SET_TO_MODERATED}"><span class="icon-thumbs-down-alt"></span><span class="visuallyhidden"> {$CONST.SET_TO_MODERATED}</span></a></li> + <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=pending&serendipity[id]={$comment.id}&serendipity[authorid]={$comment.authorid}&{$urltoken}" title="{$CONST.SET_TO_MODERATED}"><span class="icon-thumbs-down-alt" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.SET_TO_MODERATED}</span></a></li> {/if} - <li><a class="button_link comments_delete" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=delete&serendipity[id]={$comment.id}&serendipity[entry_id]={$comment.entry_id}&{$urltoken}" data-delmsg='{($CONST.COMMENT_DELETE_CONFIRM|sprintf:$comment.id:$comment.author)|escape}' title="{$CONST.DELETE}"><span class="icon-trash"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a> + <li><a class="button_link comments_delete" href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=delete&serendipity[id]={$comment.id}&serendipity[entry_id]={$comment.entry_id}&serendipity[authorid]={$comment.authorid}&{$urltoken}" data-delmsg='{($CONST.COMMENT_DELETE_CONFIRM|sprintf:$comment.id:$comment.author)|escape}' title="{$CONST.DELETE}"><span class="icon-trash" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a> </li> {if $comment.excerpt} - <li><button class="button_link toggle_comment_full" type="button" data-href="#c{$comment.id}_full" title="{$CONST.TOGGLE_ALL}"><span class="icon-right-dir"></span><span class="visuallyhidden"> {$CONST.TOGGLE_ALL}</span></button></li> + <li><button class="button_link toggle_comment_full" type="button" data-href="#c{$comment.id}_full" title="{$CONST.TOGGLE_ALL}"><span class="icon-right-dir" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.TOGGLE_ALL}</span></button></li> {/if} </ul> {if ($comment.status == 'pending') || ($comment.status == 'confirm')} @@ -68,7 +70,7 @@ </li> {/foreach} {else} - <li><span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.NO_COMMENTS}</span></li> + <li><span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.NO_COMMENTS}</span></li> {/if} </ol> </section> @@ -82,22 +84,22 @@ <li class="clearfix"> <a href="?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=edit&serendipity[id]={$entry.id}" title="#{$entry.id}: {$entry.title|escape}">{$entry.title|escape}</a> <ul class="plainList actions"> - <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=preview&{$urltoken}&serendipity[id]={$entry.id}" title="{$CONST.PREVIEW} #{$entry.id}"><span class="icon-search"></span><span class="visuallyhidden"> {$CONST.PREVIEW}</span></a></li> - <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=edit&serendipity[id]={$entry.id}" title="{$CONST.EDIT} #{$entry.id}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li> + <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=preview&{$urltoken}&serendipity[id]={$entry.id}" title="{$CONST.PREVIEW} #{$entry.id}"><span class="icon-search" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.PREVIEW}</span></a></li> + <li><a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=edit&serendipity[id]={$entry.id}" title="{$CONST.EDIT} #{$entry.id}"><span class="icon-edit" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li> {if $entry.isdraft == "true"} <li> <form method="POST" class="overviewListForm"> <input type="hidden" name="serendipity[adminAction]" value="publish" /> <input type="hidden" name="serendipity[id]" value="{$entry.id}" /> {$token} - <button class="publish_now" type="submit" title="{$CONST.PUBLISH_NOW}"><span class="icon-rocket"></span><span class="visuallyhidden">{$CONST.PUBLISH_NOW}</span></button> + <button class="publish_now" type="submit" title="{$CONST.PUBLISH_NOW}"><span class="icon-rocket" aria-hidden="true"></span><span class="visuallyhidden">{$CONST.PUBLISH_NOW}</span></button> </form> </li> {/if} </ul> {if !$showFutureEntries && ($entry.timestamp >= $serverOffsetHour) && $entry.isdraft == "false"} - <span class="entry_status status_future" title="{$CONST.SCHEDULED}: {$CONST.ENTRY_PUBLISHED_FUTURE}">{$entry.timestamp|@formatTime:$CONST.DATE_FORMAT_SHORT}</span> + <span class="entry_status status_future" title="{$CONST.SCHEDULED}: {$CONST.ENTRY_PUBLISHED_FUTURE}">{$entry.timestamp|formatTime:$CONST.DATE_FORMAT_SHORT}</span> {/if} {if $entry.properties.ep_is_sticky} <span class="entry_status status_sticky">{$CONST.STICKY_POSTINGS}</span> @@ -108,7 +110,7 @@ </li> {/foreach} {else} - <li><span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.NO_ENTRIES_TO_PRINT}</span></li> + <li><span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.NO_ENTRIES_TO_PRINT}</span></li> {/if} </ol> </section> @@ -133,7 +135,7 @@ <script type="text/javascript"> $(document).ready(function() { if (typeof(serendipity) != 'object' || typeof(serendipity.spawn) != 'function') { - $('#dashboard_header').after("<span class=\"msg_error\"><span class=\"icon-attention-circled\"></span> {$CONST.JS_FAILURE|sprintf:$js_failure_file|escape:javascript}</span>"); + $('#dashboard_header').after("<span class=\"msg_error\"><span class=\"icon-attention-circled\" aria-hidden=\"true\"></span> {$CONST.JS_FAILURE|sprintf:$js_failure_file|escape:javascript}</span>"); } }); -</script> +</script> \ No newline at end of file diff --git a/templates/2k11/admin/personal.inc.tpl b/templates/2k11/admin/personal.inc.tpl index 97d3a9b2..1cf32ebf 100644 --- a/templates/2k11/admin/personal.inc.tpl +++ b/templates/2k11/admin/personal.inc.tpl @@ -1,13 +1,13 @@ <h2>{$CONST.PERSONAL_SETTINGS}</h2> {if $adminAction == 'save'} {if $not_authorized} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL}</span> {elseif $empty_username} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.USERCONF_CHECK_USERNAME_ERROR}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.USERCONF_CHECK_USERNAME_ERROR}</span> {elseif $password_check_fail} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.USERCONF_CHECK_PASSWORD_ERROR}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.USERCONF_CHECK_PASSWORD_ERROR}</span> {else} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.MODIFIED_USER|sprintf:"{$realname|escape}"} ?></span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.MODIFIED_USER|sprintf:"{$realname|escape}"} ?></span> {/if} {/if} <form action="?serendipity[adminModule]=personal&serendipity[adminAction]=save" method="post"> @@ -16,4 +16,4 @@ <div class="form_buttons"> <input name="SAVE" type="submit" value="{$CONST.SAVE}"> </div> -</form> +</form> \ No newline at end of file diff --git a/templates/2k11/admin/plugin_config.tpl b/templates/2k11/admin/plugin_config.tpl index 715e5092..a3c91bb8 100644 --- a/templates/2k11/admin/plugin_config.tpl +++ b/templates/2k11/admin/plugin_config.tpl @@ -8,13 +8,13 @@ {/if} {if is_array($config_groups)} <button id="show_config_all" class="button_link" type="button" data-href="#serendipity_config_options" title="{$CONST.TOGGLE_ALL}"> - <span class="icon-right-dir"></span><span class="visuallyhidden"> {$CONST.TOGGLE_ALL}</span> + <span class="icon-right-dir" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.TOGGLE_ALL}</span> </button> <div id="serendipity_config_options"> {foreach $config_groups AS $config_header => $config_groupkeys} <div class="configuration_group"> - <h3 class="toggle_headline"><button id="optionel{$config_groupkeys@iteration}" class="show_config_option" type="button" data-href="#el{$config_groupkeys@iteration}" title="{$CONST.TOGGLE_OPTION}"><span class="icon-right-dir"></span> {$config_header}</button></h3> + <h3 class="toggle_headline"><button id="optionel{$config_groupkeys@iteration}" class="show_config_option" type="button" data-href="#el{$config_groupkeys@iteration}" title="{$CONST.TOGGLE_OPTION}"><span class="icon-right-dir" aria-hidden="true"></span> {$config_header}</button></h3> <div id="el{$config_groupkeys@iteration}" class="config_optiongroup{if $config_groupkeys@last} config_optiongroup_last{/if} additional_info"> {foreach $config_groupkeys AS $config_groupkey} @@ -73,4 +73,4 @@ </script> {/if} -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/plugin_config_item.tpl b/templates/2k11/admin/plugin_config_item.tpl index 59bd2155..95034308 100644 --- a/templates/2k11/admin/plugin_config_item.tpl +++ b/templates/2k11/admin/plugin_config_item.tpl @@ -7,7 +7,7 @@ {elseif $ctype == 'select'} <div class="clearfix form_select{if $cdesc != ''} has_info{/if}"> - <label for="serendipity_{$config_item}">{$cname}{if $cdesc != ''} <button class="toggle_info button_link" type="button" data-href="#{$config_item}_info"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</label> + <label for="serendipity_{$config_item}">{$cname}{if $cdesc != ''} <button class="toggle_info button_link" type="button" data-href="#{$config_item}_info"><span class="icon-info-circled" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</label> {if $cdesc != ''}<span id="{$config_item}_info" class="field_info additional_info">{$cdesc}</span>{/if} <select id="serendipity_{$config_item}" class="direction_{$lang_direction}" name="serendipity[{$postKey}][{$config_item}]{($is_multi_select) ? '[]' : ''}"{($is_multi_select) ? ' multiple' : ''}{($is_multi_select && ($select_size > 0)) ? " size='{$select_size}'" : ''}> @@ -19,7 +19,7 @@ {elseif $ctype == 'radio'} <fieldset{if $cdesc != ''} class="has_info"{/if}> - <span class="wrap_legend"><legend>{$cname}{if $cdesc != ''} <button class="toggle_info button_link" type="button" data-href="#{$config_item}_info"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</legend></span> + <span class="wrap_legend"><legend>{$cname}{if $cdesc != ''} <button class="toggle_info button_link" type="button" data-href="#{$config_item}_info"><span class="icon-info-circled" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</legend></span> {if $cdesc != ''}<span id="{$config_item}_info" class="field_info additional_info">{$cdesc}</span>{/if} <div class="clearfix grouped"> {foreach $radio_button AS $r} @@ -34,14 +34,14 @@ {elseif $ctype == 'string'} <div class="clearfix form_field{if $cdesc != ''} has_info{/if}"> - <label for="serendipity_{$config_item}">{$cname}{if $cdesc != ''} <button class="toggle_info button_link" type="button" data-href="#{$config_item}_info"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</label> + <label for="serendipity_{$config_item}">{$cname}{if $cdesc != ''} <button class="toggle_info button_link" type="button" data-href="#{$config_item}_info"><span class="icon-info-circled" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</label> {if $cdesc != ''}<span id="{$config_item}_info" class="field_info additional_info">{$cdesc}</span>{/if} <input id="serendipity_{$config_item}" class="direction_{$lang_direction}" name="serendipity[{$postKey}][{$config_item}]" type="{$input_type}" value="{$hvalue}"> </div> {elseif (($ctype == 'html') || ($ctype == 'text'))} <div class="clearfix form_area{if $cdesc != ''} has_info{/if}"> - <label for="nuggets{$elcount}">{$cname}{if $cdesc != '' && !$backend_wysiwyg} <button class="toggle_info button_link" type="button" data-href="#nuggets{$elcount}_info"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</label> + <label for="nuggets{$elcount}">{$cname}{if $cdesc != '' && !$backend_wysiwyg} <button class="toggle_info button_link" type="button" data-href="#nuggets{$elcount}_info"><span class="icon-info-circled" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</label> {if $cdesc != ''}<span id="nuggets{$elcount}_info" class="field_info additional_info">{$cdesc}</span>{/if} <textarea id="nuggets{$elcount}" class="direction_{$lang_direction}" name="serendipity[{$postKey}][{$config_item}]" rows="{$text_rows}">{$hvalue}</textarea> </div> @@ -56,6 +56,13 @@ <input id="config_{$postKey}_{$config_item}" name="serendipity[{$postKey}][{$config_item}]" type="hidden" value="{$hvalue}"> {$cbag_custom} </div> +{elseif $ctype == 'color'} + + <div class="clearfix form_field{if $cdesc != ''} has_info{/if}"> + <label for="serendipity_{$config_item}">{$cname}{if $cdesc != ''} <button class="toggle_info button_link" type="button" data-href="#{$config_item}_info"><span class="icon-info-circled" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</label> + {if $cdesc != ''}<span id="{$config_item}_info" class="field_info additional_info">{$cdesc}</span>{/if} + <input id="serendipity_{$config_item}" class="direction_{$lang_direction}" name="serendipity[{$postKey}][{$config_item}]" type="{$input_type}" value="{$hvalue}"> + </div> {elseif $ctype == 'hidden'} <div class="clearfix"> @@ -64,12 +71,12 @@ {elseif $ctype == 'media'} <div class="clearfix form_field media_choose{if $cdesc != ''} has_info{/if}"> - <label for="serendipity[{$postKey}][{$config_item}]">{$cname}{if $cdesc != ''} <button class="toggle_info button_link" type="button" data-href="#{$postKey}_{$config_item}_info"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</label> + <label for="serendipity[{$postKey}][{$config_item}]">{$cname}{if $cdesc != ''} <button class="toggle_info button_link" type="button" data-href="#{$postKey}_{$config_item}_info"><span class="icon-info-circled" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</label> <div class="media_chooser clearfix"> <input id="serendipity[{$postKey}][{$config_item}]" class="change_preview" name="serendipity[{$postKey}][{$config_item}]" type="text" data-configitem="{$config_item}" value="{$value}"> - <button class="choose_media" type="button" title="{$CONST.MEDIA_LIBRARY}"><span class="icon-picture"></span><span class="visuallyhidden">{$CONST.MEDIA_LIBRARY}</span></button> + <button class="choose_media" type="button" title="{$CONST.MEDIA_LIBRARY}"><span class="icon-picture" aria-hidden="true"></span><span class="visuallyhidden">{$CONST.MEDIA_LIBRARY}</span></button> </div> {if $cdesc != ''}<span id="{$postKey}_{$config_item}_info" class="field_info additional_info">{$cdesc}</span>{/if} @@ -82,7 +89,7 @@ {elseif $ctype == 'sequence'} <fieldset{if $cdesc != ''} class="has_info"{/if}> - <span class="wrap_legend"><legend>{$cname}{if $cdesc != ''} <button class="toggle_info button_link" type="button" data-href="#{$config_item}_info"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</legend></span> + <span class="wrap_legend"><legend>{$cname}{if $cdesc != ''} <button class="toggle_info button_link" type="button" data-href="#{$config_item}_info"><span class="icon-info-circled" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MORE}</span></button>{/if}</legend></span> {if $cdesc != ''}<span id="{$config_item}_info" class="field_info additional_info">{$cdesc}</span>{/if} <input id="{$config_item}_value" name="serendipity[{$postKey}][{$config_item}]" type="hidden" value="{$value}"> @@ -95,7 +102,7 @@ {foreach $order_id as $orid} <li id="{$orid['id']}" class="sequence_item pluginmanager_item_even"> <div id="g{$orid['id']}" class="pluginmanager_grablet sequence_grablet"> - <button class="icon_link" type="button" title="Move"><span class="icon-move"></span><span class="visuallyhidden"> {$CONST.MOVE}</span></button> + <button class="icon_link" type="button" title="Move"><span class="icon-move" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MOVE}</span></button> </div> {if $checkable} <div class="form_check"> @@ -112,12 +119,12 @@ {if ($orid['sort_idx'] == 0)} {else} - <button id="{$postKey}_{$config_item}_{$orid['sort_idx']}_up" class="icon_link" name="serendipity[{$postKey}][override][{$config_item}]" type="submit" value="{$orid['oneup']}"><span class="icon-up-dir"></span><span class="visuallyhidden"> {$CONST.MOVE_UP}</span></button> + <button id="{$postKey}_{$config_item}_{$orid['sort_idx']}_up" class="icon_link" name="serendipity[{$postKey}][override][{$config_item}]" type="submit" value="{$orid['oneup']}"><span class="icon-up-dir" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MOVE_UP}</span></button> {/if} {if ($orid['sort_idx'] == $last)} {else} - <button id="{$postKey}_{$config_item}_{$orid['sort_idx']}_down" class="icon_link" name="serendipity[{$postKey}][override][{$config_item}]" type="submit" value="{$orid['onedown']}"><span class="icon-down-dir"></span><span class="visuallyhidden"> {$CONST.MOVE_DOWN}</span></button> + <button id="{$postKey}_{$config_item}_{$orid['sort_idx']}_down" class="icon_link" name="serendipity[{$postKey}][override][{$config_item}]" type="submit" value="{$orid['onedown']}"><span class="icon-down-dir" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MOVE_DOWN}</span></button> {/if} </div> </noscript> @@ -128,4 +135,4 @@ {$no_sequence} {/if} </fieldset> -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/plugins.inc.tpl b/templates/2k11/admin/plugins.inc.tpl index 68489a7c..4f9777dc 100644 --- a/templates/2k11/admin/plugins.inc.tpl +++ b/templates/2k11/admin/plugins.inc.tpl @@ -1,7 +1,7 @@ {if $plugin_to_conf} {if is_array($save_errors)} <div class="msg_error"> - <h2><span class="icon-attention-circled"></span> {$CONST.ERROR}:</h2> + <h2><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.ERROR}:</h2> <ul class="plainList"> {foreach $save_errors as $save_error} @@ -10,7 +10,7 @@ </ul> </div> {elseif $saveconf} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.DONE}: {$CONST.SETTINGS_SAVED_AT|sprintf:"$timestamp"}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.DONE}: {$CONST.SETTINGS_SAVED_AT|sprintf:"$timestamp"}</span> {/if} <h2>{$name} ({$class})</h2> @@ -39,9 +39,9 @@ {$config} </form> {elseif $adminAction == 'addnew'} - <h2>{if $type == 'event'}{$CONST.EVENT_PLUGINS}{else}{$CONST.SIDEBAR_PLUGINS}{/if}{if $only_group != UPGRADE} <span class="plugins_available">({$CONST.PLUGIN_AVAILABLE_COUNT|sprintf:$count_pluginstack})</span>{/if}</h2> + <h2>{if $type == 'event'}{$CONST.EVENT_PLUGINS}{/if}{if $type == 'sidebar'}{$CONST.SIDEBAR_PLUGINS}{/if}{if $type == 'both'}{$CONST.MENU_PLUGINS}{/if}{if $only_group != UPGRADE} <span class="plugins_available">({$CONST.PLUGIN_AVAILABLE_COUNT|sprintf:$count_pluginstack})</span>{/if}</h2> {foreach $errorstack as $e_idx => $e_name} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.ERROR}: {$e_name}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.ERROR}: {$e_name}</span> {/foreach} <form action="serendipity_admin.php" method="get"> @@ -65,7 +65,7 @@ <div id="plugin_filter" class="form_field"> <label for="pluginfilter">{$CONST.QUICKSEARCH}</label> <input id="pluginfilter" type="text"> - <button class="reset_livefilter icon_link" type="button" data-target="pluginfilter" title="{$CONST.RESET_FILTERS}"><span class="icon-cancel"></span><span class="visuallyhidden">{$CONST.RESET_FILTERS}</span></button> + <button class="reset_livefilter icon_link" type="button" data-target="pluginfilter" title="{$CONST.RESET_FILTERS}"><span class="icon-cancel" aria-hidden="true"></span><span class="visuallyhidden">{$CONST.RESET_FILTERS}</span></button> </div> <div class="form_buttons"> <input type="submit" value="{$CONST.GO}"> @@ -76,15 +76,15 @@ </div> </form> {if $only_group == 'UPGRADE' && ! $available_upgrades} - <span class="msg_notice"><span class="icon-attention-circled"></span> {$CONST.NO_UPDATES}</span> + <span class="msg_notice"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.NO_UPDATES}</span> {else} {foreach $pluggroups AS $pluggroup => $groupstack} - {if $only_group && $pluggroup != $only_group}{continue}{/if} + {if $only_group && $pluggroup != $only_group || empty($pluggroup)}{continue}{/if} <h3>{foreach $groupnames as $available_group => $available_name}{if $pluggroup == $available_group}{$available_name}{/if}{/foreach}</h3> {if $only_group == 'UPGRADE' && $pluggroups['UPGRADE']|@count > 1} <button id="updateAll">Update All</button> {/if} - <ul class="plugins_installable plainList clearfix"> + <ul class="plugins_installable plainList"> {foreach $groupstack as $plug} <li class="clearfix"> <div class="equal_heights"> @@ -130,13 +130,13 @@ <div class="plugin_status"> {if isset($requirements_failures.{$plug.class_name})} - <span class="unmet_requirements msg_error"><span class="icon-attention-circled"></span> {$CONST.UNMET_REQUIREMENTS|sprintf:"{if $requirements_failures.{$plug.class_name}.s9y}s9y $plug.requirements..serendipity,{/if} {if $requirements_failures.{$plug.class_name}.php}PHP $plug.requirements.php,{/if} {if $requirements_failures.{$plug.class_name}.smarty}Smarty $plug.requirements.smarty{/if}"}</span> + <span class="unmet_requirements msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.UNMET_REQUIREMENTS|sprintf:"{if $requirements_failures.{$plug.class_name}.s9y}s9y $plug.requirements..serendipity,{/if} {if $requirements_failures.{$plug.class_name}.php}PHP $plug.requirements.php,{/if} {if $requirements_failures.{$plug.class_name}.smarty}Smarty $plug.requirements.smarty{/if}"}</span> {elseif $plug['upgradable'] == true} - <a class="button_link" href="?serendipity[adminModule]=plugins&serendipity[pluginPath]={$plug.pluginPath}&serendipity[install_plugin]={$plug.plugin_class}{if isset($plug['customURI'])}{$plug.customURI}{/if}" title="{$CONST.PLUGIN_EVENT_SPARTACUS_CHECK_HINT}">{$CONST.UPGRADE}</a> + <a class="button_link" href="?serendipity[adminModule]=plugins&serendipity[pluginPath]={$plug.pluginPath}&serendipity[install_plugin]={$plug.plugin_class}{if isset($plug['customURI'])}{$plug.customURI}{/if}&{$urltoken}" title="{$CONST.PLUGIN_EVENT_SPARTACUS_CHECK_HINT}">{$CONST.UPGRADE}</a> {elseif $plug.installable == true} - <a class="button_link" href="?serendipity[adminModule]=plugins&serendipity[pluginPath]={$plug.pluginPath}&serendipity[install_plugin]={$plug.plugin_class}{if isset($plug.customURI)}{$plug.customURI}{/if}">{$CONST.INSTALL}</a> + <a class="button_link" href="?serendipity[adminModule]=plugins&serendipity[pluginPath]={$plug.pluginPath}&serendipity[install_plugin]={$plug.plugin_class}{if isset($plug.customURI)}{$plug.customURI}{/if}&{$urltoken}">{$CONST.INSTALL}</a> {else} - <span class="block_level"><span class="icon-ok-circled"></span> {$CONST.ALREADY_INSTALLED}</span> + <span class="block_level"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.ALREADY_INSTALLED}</span> {/if} </div> </li> @@ -157,18 +157,18 @@ {$backend_pluginlisting_header} <h2>{$CONST.CONFIGURE_PLUGINS}</h2> {if $save} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.DONE}:{$CONST.SETTINGS_SAVED_AT|sprintf:"$timestamp"}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.DONE}:{$CONST.SETTINGS_SAVED_AT|sprintf:"$timestamp"}</span> {/if} {if $new_plugin_failed} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.ERROR}: {$CONST.PLUGIN_ALREADY_INSTALLED}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.ERROR}: {$CONST.PLUGIN_ALREADY_INSTALLED}</span> {/if} {if $updateAllMsg} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.DONE}: All Plugins updated</span> {* i18n *} + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.DONE}: All Plugins updated</span> {* i18n *} {/if} <div class="tabs" id="pluginlist_tabs"> <section id="pluginlist_sidebar" class="panel"> <h3>{$CONST.SIDEBAR_PLUGINS}</h3> - <a class="button_link" href="?serendipity[adminModule]=plugins&serendipity[adminAction]=addnew" title='{$CONST.CLICK_HERE_TO_INSTALL_PLUGIN|sprintf:"{$CONST.SIDEBAR_PLUGIN}"}'>{$CONST.INSTALL_NEW_SIDEBAR_PLUGIN}</a> + <a class="button_link" href="?serendipity[adminModule]=plugins&serendipity[adminAction]=addnew&{$urltoken}" title='{$CONST.CLICK_HERE_TO_INSTALL_PLUGIN|sprintf:"{$CONST.SIDEBAR_PLUGIN}"}'>{$CONST.INSTALL_NEW_SIDEBAR_PLUGIN}</a> {$backend_plugins_sidebar_header} {$sidebar_plugins} @@ -176,7 +176,7 @@ <section id="pluginlist_event" class="panel"> <h3>{$CONST.EVENT_PLUGINS}</h3> - <a class="button_link" href="?serendipity[adminModule]=plugins&serendipity[adminAction]=addnew&serendipity[type]=event" title='{$CONST.CLICK_HERE_TO_INSTALL_PLUGIN|sprintf:"{$CONST.EVENT_PLUGIN}"}'>{$CONST.INSTALL_NEW_EVENT_PLUGIN}</a> + <a class="button_link" href="?serendipity[adminModule]=plugins&serendipity[adminAction]=addnew&serendipity[type]=event&{$urltoken}" title='{$CONST.CLICK_HERE_TO_INSTALL_PLUGIN|sprintf:"{$CONST.EVENT_PLUGIN}"}'>{$CONST.INSTALL_NEW_EVENT_PLUGIN}</a> {$backend_plugins_event_header} {$event_plugins} @@ -189,4 +189,4 @@ <pre>{$memSnaps|print_r}</pre> </section> {/if} -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/serendipity_editor.js.tpl b/templates/2k11/admin/serendipity_editor.js.tpl index 6c3e1b05..84561805 100644 --- a/templates/2k11/admin/serendipity_editor.js.tpl +++ b/templates/2k11/admin/serendipity_editor.js.tpl @@ -385,7 +385,7 @@ // this function got called on load of the editor var toggleButton = '#toggle_extended'; $('#extended_entry_editor').parent().find('label').first().wrap('<button id="toggle_extended" class="icon_link" type="button"></button>'); - $(toggleButton).prepend('<span class="icon-down-dir"></span> '); + $(toggleButton).prepend('<span class="icon-down-dir" aria-hidden="true"></span> '); $(toggleButton).click(function(e) { e.preventDefault(); serendipity.toggle_extended(true); @@ -423,7 +423,7 @@ // this function got called on load of the editor var toggleButton = '#toggle_' + id; - $('#'+id).before('<button id="toggle_' + id + '" class="button_link" type="button" href="#' + id + '"><span class="icon-right-dir"></span><span class="visuallyhidden"> {$CONST.TOGGLE_ALL}</span></button>'); + $('#'+id).before('<button id="toggle_' + id + '" class="button_link" type="button" href="#' + id + '"><span class="icon-right-dir" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.TOGGLE_ALL}</span></button>'); $(toggleButton).click(function(e) { e.preventDefault(); @@ -836,32 +836,36 @@ } serendipity.eraseEntryEditorCache = function() { - serendipity.cache("serendipity[body]", null); - serendipity.cache("serendipity[extended]", null); + serendipity.cache("serendipity[body]", ""); + serendipity.cache("serendipity[extended]", ""); } var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB; serendipity.cache = function (id, data) { - var request = indexedDB.open("cache", 1); - request.onupgradeneeded = function (event) { - event.target.result.createObjectStore("cache"); - }; - request.onsuccess = function(event) { - event.target.result.transaction(["cache"], 'readwrite').objectStore("cache").put(data, id); - }; + if (typeof indexedDB !== 'undefined') { + var request = indexedDB.open("cache", 1); + request.onupgradeneeded = function (event) { + event.target.result.createObjectStore("cache"); + }; + request.onsuccess = function(event) { + event.target.result.transaction(["cache"], 'readwrite').objectStore("cache").put(data, id); + }; + } } serendipity.getCached = function(id, success) { - var request = indexedDB.open("cache", 1); - request.onupgradeneeded = function (event) { - event.target.result.createObjectStore("cache"); - }; - request.onsuccess = function(event) { - event.target.result.transaction(["cache"], 'readwrite').objectStore("cache").get(id).onsuccess = function (event) { - success(event.target.result); + if (typeof indexedDB !== 'undefined') { + var request = indexedDB.open("cache", 1); + request.onupgradeneeded = function (event) { + event.target.result.createObjectStore("cache"); }; - }; + request.onsuccess = function(event) { + event.target.result.transaction(["cache"], 'readwrite').objectStore("cache").get(id).onsuccess = function (event) { + success(event.target.result); + }; + }; + } } } @@ -1034,7 +1038,7 @@ $(function() { } e.preventDefault(); // Inline notification, we might want to make this reuseable - $('<span id="msg_timestamp" class="msg_notice"><span class="icon-info-circled"></span>{$CONST.TIMESTAMP_RESET} <a class="remove_msg" href="#msg_timestamp"><span class="icon-cancel"></span><span class="visuallyhidden">{$CONST.HIDE}</span></a></span>').insertBefore('#edit_entry_title'); + $('<span id="msg_timestamp" class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span>{$CONST.TIMESTAMP_RESET} <a class="remove_msg" href="#msg_timestamp"><span class="icon-cancel" aria-hidden="true"></span><span class="visuallyhidden">{$CONST.HIDE}</span></a></span>').insertBefore('#edit_entry_title'); // Remove timestamp msg $('.remove_msg').click(function(e) { e.preventDefault(); @@ -1075,7 +1079,7 @@ $(function() { } // Inline notification, we might want to make this reuseable - $('<span id="msg_entrystatus" class="msg_notice"><span class="icon-info-circled"></span>{$CONST.ENTRY_STATUS}: ' + newState + ' <a class="remove_msg" href="#msg_entrystatus"><span class="icon-cancel"></span><span class="visuallyhidden">{$CONST.HIDE}</span></a></span>').insertBefore('#edit_entry_title'); + $('<span id="msg_entrystatus" class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span>{$CONST.ENTRY_STATUS}: ' + newState + ' <a class="remove_msg" href="#msg_entrystatus"><span class="icon-cancel" aria-hidden="true"></span><span class="visuallyhidden">{$CONST.HIDE}</span></a></span>').insertBefore('#edit_entry_title'); // Remove entrystatus msg $('.remove_msg').click(function(e) { e.preventDefault(); @@ -1354,11 +1358,7 @@ $(function() { $('.comments_reply').click(function(e) { e.preventDefault(); - {if $use_backendpopups || $force_backendpopups.comments} - window.open(this.href, 'CommentForm', 'width=800,height=600,toolbar=no,scrollbars=1,scrollbars,resize=1,resizable=1').focus(); - {else} - $(this).magnificPopup({ type:'iframe' }); - {/if} + serendipity.openPopup($(this).attr('href')); }); // Selection for multidelete @@ -1565,6 +1565,7 @@ $(function() { $('#uploadform').submit(function(event) { if (! $('#imageurl').val()) { event.preventDefault(); + $('#uploadform .check_inputs').attr('disabled', true); var sendDataToML = function(data, progressContainer, progress) { $.ajax({ type: 'post', @@ -1573,12 +1574,14 @@ $(function() { cache: false, processData: false, contentType: false, - xhrFields: { - onprogress: function (e) { + xhr: function() { + var xhr = $.ajaxSettings.xhr(); + xhr.upload.onprogress = function(e) { if (e.lengthComputable) { progress.value = e.loaded / e.total * 100; } - } + }; + return xhr; } }).done(function(data) { progress.value = 100; @@ -1600,6 +1603,7 @@ $(function() { $('.form_buttons').prepend(mlLink); $(mlLink).fadeIn(); } + $('#uploadform .check_inputs').removeAttr('disabled'); }); }; $('.uploadform_userfile').each(function() { @@ -1617,6 +1621,7 @@ $(function() { data.append('serendipity[adminAction]', 'add'); data.append('serendipity[token]', $('input[name*="serendipity[token]"]').val()); data.append('serendipity[target_filename][1]', $('input[name*="serendipity[target_filename][1]"]').val()); + data.append('serendipity[target_directory][1]', $('select[name*="serendipity[target_directory][1]"]').val()); var progress = document.createElement('progress'); var progressContainer = document.createElement('span'); progressContainer.className = 'msg_notice'; @@ -1646,7 +1651,7 @@ $(function() { canvas.width = width; canvas.height = height; canvas.getContext('2d').drawImage(image, 0, 0, width, height); - + if (type == "image/bmp") { {* bmp is not supported *} type = "image/png"; @@ -1677,6 +1682,19 @@ $(function() { }); } + if ($('.image_move').length > 0) { + $('.image_move').removeClass('hidden'); + $('.image_move').magnificPopup({ + type: 'inline', + }); + $('#move-popup form').submit(function(e) { + e.preventDefault(); + $('#newDir').val($('#move-popup form select').val()); + $.magnificPopup.close(); + $('input[name="toggle_move"]').click(); + }); + } + // reopen detail element after spamblock action if ($('#serendipity_comments_list').length > 0 && window.location.hash && $('#' + window.location.hash.replace('#', '')).length > 0) { $('#' + window.location.hash.replace('#', '')).find(".toggle_info").click(); @@ -1743,15 +1761,19 @@ $(function() { // Equal Heights $(window).load(function() { - if (mq_small) { - serendipity.sync_heights(); + if(!Modernizr.flexbox) { + if (mq_small) { + serendipity.sync_heights(); + } } }); // Make sure plugin list heights are recalculated when switching tabs $('#pluginlist_tabs a').click(function() { - if (mq_small) { - serendipity.sync_heights(); + if(!Modernizr.flexbox) { + if (mq_small) { + serendipity.sync_heights(); + } } }); }); @@ -1783,4 +1805,4 @@ serendipity_imageSelector_done = function(textarea) { serendipity_imageSelector_addToElement = function(str, id) { return serendipity.serendipity_imageSelector_addToElement(str, id); -} +} \ No newline at end of file diff --git a/templates/2k11/admin/show_plugins.fnc.tpl b/templates/2k11/admin/show_plugins.fnc.tpl index 6935984e..5769ed94 100644 --- a/templates/2k11/admin/show_plugins.fnc.tpl +++ b/templates/2k11/admin/show_plugins.fnc.tpl @@ -6,7 +6,7 @@ <input id="eventorder" name="serendipity[pluginorder]" type="hidden" value=""> {/if} {$serendipity_setFormToken} - <div class="clearfix pluginmanager"> + <div class="pluginmanager"> {foreach $placement as $plugin_placement} <div class="pluginmanager_side pluginmanager_{($event_only) ? 'event' : 'sidebar'}"> <h4>{$plugin_placement['ptitle']}</h4> @@ -27,11 +27,11 @@ </h5> <div id="g{$plugin_data['css_key']}" class="pluginmanager_grablet"> - <button id="grab{$plugin_data['css_key']}" class="icon_link button_link" type="button" title="{$CONST.MOVE}"><span class="icon-move"></span><span class="visuallyhidden"> {$CONST.MOVE}</span></button> + <button id="grab{$plugin_data['css_key']}" class="icon_link button_link" type="button" title="{$CONST.MOVE}"><span class="icon-move" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MOVE}</span></button> </div> {if $plugin_data['can_configure']} - <a class="pluginmanager_configure button_link" href="?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]={$plugin_data['key']}" title="{$CONST.CONFIGURATION}"><span class="icon-cog-alt"></span><span class="visuallyhidden"> {$CONST.CONFIGURATION}</span></a> + <a class="pluginmanager_configure button_link" href="?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]={$plugin_data['key']}" title="{$CONST.CONFIGURATION}"><span class="icon-cog-alt" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.CONFIGURATION}</span></a> {/if} {$plugin_data['desc']} @@ -67,14 +67,14 @@ {if $plugin_data.sort_idx == 0} {else} <a href="?{$serendipity_setFormTokenUrl}&serendipity[adminModule]=plugins&submit=move+up&serendipity[plugin_to_move]={$plugin_data.key}{if $event_only}&serendipity[event_plugin]=true{/if}"> - <span class="icon-up-dir"></span><span class="visuallyhidden"> {$CONST.MOVE_UP}</span> + <span class="icon-up-dir" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MOVE_UP}</span> </a> {/if} {if $sort_idx == $total - 1} {else} <a href="?{$serendipity_setFormTokenUrl}&serendipity[adminModule]=plugins&submit=move+down&serendipity[plugin_to_move]={$plugin_data.key}{if $event_only}&serendipity[event_plugin]=true{/if}"> - <span class="icon-down-dir"></span><span class="visuallyhidden"> {$CONST.MOVE_DOWN}</span> + <span class="icon-down-dir" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MOVE_DOWN}</span> </a> {/if} </li> @@ -84,10 +84,10 @@ </ol> </div> {/foreach} - <span class="plugin_count block_level">{$CONST.PLUGIN_AVAILABLE_COUNT|sprintf:$total}</span> </div> + <span class="plugin_count block_level">{$CONST.PLUGIN_AVAILABLE_COUNT|sprintf:$total}</span> <div class="form_buttons"> <input class="state_cancel" name="REMOVE" type="submit" title="{$CONST.REMOVE_TICKED_PLUGINS}" value="{$CONST.DELETE}"> <input name="SAVE" type="submit" title="{$CONST.SAVE_CHANGES_TO_LAYOUT}" value="{$CONST.SAVE}"> </div> - </form> + </form> \ No newline at end of file diff --git a/templates/2k11/admin/style.css b/templates/2k11/admin/style.css index 1ae2b1b6..4619e4bc 100644 --- a/templates/2k11/admin/style.css +++ b/templates/2k11/admin/style.css @@ -10,7 +10,7 @@ hgroup, main, nav, section, -summary { +.no-details summary { display: block; } @@ -152,6 +152,7 @@ select { button, html input[type="button"], +html input[type="color"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; @@ -350,6 +351,11 @@ progress div.progress-undefined { width: 100%; } +progress { + /* Makes progress bar visible in FF */ + background: white; +} + /* HELPER CLASSES */ /* Hide visually, available for screenreaders */ .visuallyhidden { @@ -365,12 +371,30 @@ progress div.progress-undefined { /* Clearfix: contain floats */ .clearfix:before, -.clearfix:after { +.no-flexbox #maintenance:before, +.no-flexbox #dashboard:before, +.no-flexbox .media_pane:before, +.no-flexbox .plugins_installable:before, +.no-flexbox .pluginmanager:before, +.no-flexbox #template_select > ul:before, +.clearfix:after, +.no-flexbox #maintenance:after, +.no-flexbox #dashboard:after, +.no-flexbox .media_pane:after, +.no-flexbox .plugins_installable:after, +.no-flexbox .pluginmanager:after, +.no-flexbox #template_select > ul:after { content: " "; display: table; } -.clearfix:after { +.clearfix:after, +.no-flexbox #maintenance:after, +.no-flexbox #dashboard:after, +.no-flexbox .media_pane:after, +.no-flexbox .plugins_installable:after, +.no-flexbox .pluginmanager:after, +.no-flexbox #template_select > ul:after { clear: both; } @@ -616,6 +640,7 @@ button, #edit_entry_category button.mfp-close, #edit_entry_freetags button.mfp-close, input[type="button"], +input[type="color"], input[type="reset"], input[type="submit"] { border-radius: 4px; @@ -632,7 +657,8 @@ input[type="submit"] { .tabs > ul a, button, button[type="submit"].publish_now, -input[type="button"] { +input[type="button"], +input[type="color"] { background: #ddd; background-image: -webkit-linear-gradient(#fff, #ddd); background-image: linear-gradient(#fff, #ddd); @@ -674,7 +700,8 @@ input[type="submit"].state_cancel:visited { .tabs > ul a:hover, button:hover, button[type="submit"].publish_now:hover, -input[type="button"]:hover { +input[type="button"]:hover, +input[type="color"]:hover { background: #ccc; background-image: -webkit-linear-gradient(#fff, #eee 1px, #ccc); background-image: linear-gradient(#fff, #eee 1px, #ccc); @@ -710,7 +737,8 @@ input:checked + .media_selector, button[type="submit"].publish_now:active, .tabs > ul a:active, button:active, -input[type="button"]:active { +input[type="button"]:active, +input[type="color"]:active { background-image: -webkit-linear-gradient(#fff, #ddd 1px, #eee); background-image: linear-gradient(#fff, #ddd 1px, #eee); box-shadow: inset rgba(0, 0, 0, 0.25) 0 1px 2px 0; @@ -1061,7 +1089,7 @@ input[type=checkbox], .media_file_metadata h5, .media_file_metadata dt, #serendipity_comments_list details, -#dashboard > #s9y_links, +.no-flexbox #dashboard > #s9y_links, .configure_plugin .cke { clear: both; } @@ -1574,7 +1602,8 @@ fieldset p, padding: .25em 0; } -.importer_data dd > div { +.importer_data dd > div, +.media_file .actions, { margin-top: 0; margin-bottom: 0; } @@ -1588,7 +1617,6 @@ fieldset p, } #login .form_buttons, -.media_file .actions, #entries_list .actions, .msg_hint > p:last-of-type { margin-bottom: 0; @@ -1601,7 +1629,6 @@ fieldset p, margin-top: .75em; } -.media_file .actions, .js #add_upload { margin-top: 1em; } @@ -1743,13 +1770,19 @@ form > .button_link:first-of-type, } #template_select article, -.media_file, .plugins_installable > li { padding: 0 .5em 1em; } .media_file { - padding: 0 .5em .5em; + box-sizing: border-box; + padding: 0 .5em 3.5em; + position: relative; +} + +.media_file_actions { + position: absolute; + bottom: 0; } .media_wrap_thumb { @@ -2234,18 +2267,29 @@ label .perm_name, /* PLUGIN MANAGER */ +.pluginmanager { + margin-top: 1em; + margin-bottom: 1em; +} + .pluginmanager_container { background: transparent; + margin: 0; + padding: .25em; + position: relative; +} + +.flexbox .pluginmanager_side, +.no-flexbox .pluginmanager_container { border: 1px solid #ddd; border-radius: 2px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; - height: 98%; - margin: 0; - min-height: 12.5em; - padding: .25em; - position: relative; +} + +.flexbox .pluginmanager_side h4 { + margin: .75em .5em .25em; } .pluginmanager_container .placeholder { @@ -2300,7 +2344,7 @@ label .perm_name, .plugin_count { clear: both; - margin: 0 0 1.5em; + margin: 1.5em 0 0; } .pluginmanager .pluginmanager_grablet { @@ -2328,11 +2372,27 @@ label .perm_name, } .pluginmanager_plugin .form_check { + float: left; margin: .75em 0; + width: 5%; } .pluginmanager_plugin h5 { + float: left; margin: .75em 0 0; + width: 95%; +} + +.pluginmanager_sidebar .pluginmanager_plugin .form_check { + width: 8%; +} + +.pluginmanager_sidebar .pluginmanager_plugin h5 { + width: 92%; +} + +.pluginmanager_plugin .plugin_data { + clear: left; } .configuration_group .sequence_grablet, @@ -2414,6 +2474,7 @@ label .perm_name, .js .media_file_preview, .js .template_preview { + min-height: 12em; position: relative; } @@ -2515,6 +2576,11 @@ input[name="serendipity[filter][fileCategory]"] { margin: 1em 0 0; } +.popuplayer_showUpload { + float: right; + margin: 1em 0 0; +} + .media_select_strict { clear: right; float: left; @@ -2566,6 +2632,15 @@ input[name="serendipity[filter][fileCategory]"] { animation: loaderSprite 1s steps(25, end) infinite; } +#move-popup { + position: relative; + background: #FFF; + padding: 20px; + width: auto; + max-width: 500px; + margin: 20px auto; +} + /* TEMP fixes for tree view */ #expandcontractdiv { font-size: 1em !important; @@ -2596,8 +2671,7 @@ input[name="serendipity[filter][fileCategory]"] { overflow: hidden; position: fixed; background: #0b0b0b; - opacity: 0.8; - filter: alpha(opacity=80); } + opacity: 0.8; } .mfp-wrap { top: 0; @@ -2617,8 +2691,6 @@ input[name="serendipity[filter][fileCategory]"] { left: 0; top: 0; padding: 0 8px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; box-sizing: border-box; } .mfp-container:before { @@ -2638,7 +2710,8 @@ input[name="serendipity[filter][fileCategory]"] { text-align: left; z-index: 1045; } -.mfp-inline-holder .mfp-content, .mfp-ajax-holder .mfp-content { +.mfp-inline-holder .mfp-content, +.mfp-ajax-holder .mfp-content { width: 100%; cursor: auto; } @@ -2659,7 +2732,10 @@ input[name="serendipity[filter][fileCategory]"] { .mfp-auto-cursor .mfp-content { cursor: auto; } -.mfp-close, .mfp-arrow, .mfp-preloader, .mfp-counter { +.mfp-close, +.mfp-arrow, +.mfp-preloader, +.mfp-counter { -webkit-user-select: none; -moz-user-select: none; user-select: none; } @@ -2671,7 +2747,7 @@ input[name="serendipity[filter][fileCategory]"] { display: none !important; } .mfp-preloader { - color: #cccccc; + color: #CCC; position: absolute; top: 50%; width: auto; @@ -2681,9 +2757,9 @@ input[name="serendipity[filter][fileCategory]"] { right: 8px; z-index: 1044; } .mfp-preloader a { - color: #cccccc; } + color: #CCC; } .mfp-preloader a:hover { - color: white; } + color: #FFF; } .mfp-s-ready .mfp-preloader { display: none; } @@ -2691,7 +2767,8 @@ input[name="serendipity[filter][fileCategory]"] { .mfp-s-error .mfp-content { display: none; } -button.mfp-close, button.mfp-arrow { +button.mfp-close, +button.mfp-arrow { overflow: visible; cursor: pointer; background: transparent; @@ -2701,8 +2778,9 @@ button.mfp-close, button.mfp-arrow { outline: none; padding: 0; z-index: 1046; - -webkit-box-shadow: none; - box-shadow: none; } + box-shadow: none; + touch-action: manipulation; } + button::-moz-focus-inner { padding: 0; border: 0; } @@ -2717,23 +2795,23 @@ button::-moz-focus-inner { text-decoration: none; text-align: center; opacity: 0.65; - filter: alpha(opacity=65); padding: 0 0 18px 10px; - color: white; + color: #FFF; font-style: normal; font-size: 28px; font-family: Arial, Baskerville, monospace; } - .mfp-close:hover, .mfp-close:focus { - opacity: 1; - filter: alpha(opacity=100); } + .mfp-close:hover, + .mfp-close:focus { + opacity: 1; } .mfp-close:active { top: 1px; } .mfp-close-btn-in .mfp-close { - color: #333333; } + color: #333; } -.mfp-image-holder .mfp-close, .mfp-iframe-holder .mfp-close { - color: white; +.mfp-image-holder .mfp-close, +.mfp-iframe-holder .mfp-close { + color: #FFF; right: -6px; text-align: right; padding-right: 6px; @@ -2743,27 +2821,28 @@ button::-moz-focus-inner { position: absolute; top: 0; right: 0; - color: #cccccc; + color: #CCC; font-size: 12px; - line-height: 18px; } + line-height: 18px; + white-space: nowrap; } .mfp-arrow { position: absolute; opacity: 0.65; - filter: alpha(opacity=65); margin: 0; top: 50%; margin-top: -55px; padding: 0; width: 90px; height: 110px; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } + -webkit-tap-highlight-color: transparent; } .mfp-arrow:active { margin-top: -54px; } - .mfp-arrow:hover, .mfp-arrow:focus { - opacity: 1; - filter: alpha(opacity=100); } - .mfp-arrow:before, .mfp-arrow:after, .mfp-arrow .mfp-b, .mfp-arrow .mfp-a { + .mfp-arrow:hover, + .mfp-arrow:focus { + opacity: 1; } + .mfp-arrow:before, + .mfp-arrow:after { content: ''; display: block; width: 0; @@ -2774,31 +2853,31 @@ button::-moz-focus-inner { margin-top: 35px; margin-left: 35px; border: medium inset transparent; } - .mfp-arrow:after, .mfp-arrow .mfp-a { + .mfp-arrow:after { border-top-width: 13px; border-bottom-width: 13px; top: 8px; } - .mfp-arrow:before, .mfp-arrow .mfp-b { + .mfp-arrow:before { border-top-width: 21px; border-bottom-width: 21px; opacity: 0.7; } .mfp-arrow-left { left: 0; } - .mfp-arrow-left:after, .mfp-arrow-left .mfp-a { - border-right: 17px solid white; + .mfp-arrow-left:after { + border-right: 17px solid #FFF; margin-left: 31px; } - .mfp-arrow-left:before, .mfp-arrow-left .mfp-b { + .mfp-arrow-left:before { margin-left: 25px; - border-right: 27px solid #3f3f3f; } + border-right: 27px solid #3F3F3F; } .mfp-arrow-right { right: 0; } - .mfp-arrow-right:after, .mfp-arrow-right .mfp-a { - border-left: 17px solid white; + .mfp-arrow-right:after { + border-left: 17px solid #FFF; margin-left: 39px; } - .mfp-arrow-right:before, .mfp-arrow-right .mfp-b { - border-left: 27px solid #3f3f3f; } + .mfp-arrow-right:before { + border-left: 27px solid #3F3F3F; } .mfp-iframe-holder { padding-top: 40px; @@ -2823,7 +2902,7 @@ button::-moz-focus-inner { width: 100%; height: 100%; box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); - background: black; } + background: #000; } /* Main image in popup */ img.mfp-img { @@ -2832,8 +2911,6 @@ img.mfp-img { height: auto; display: block; line-height: 0; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; box-sizing: border-box; padding: 40px 0 40px; margin: 0 auto; } @@ -2853,9 +2930,9 @@ img.mfp-img { height: auto; z-index: -1; box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); - background: #444444; } + background: #444; } .mfp-figure small { - color: #bdbdbd; + color: #BDBDBD; display: block; font-size: 12px; line-height: 14px; } @@ -2873,7 +2950,7 @@ img.mfp-img { .mfp-title { text-align: left; line-height: 18px; - color: #f3f3f3; + color: #F3F3F3; word-wrap: break-word; padding-right: 36px; } @@ -2885,8 +2962,8 @@ img.mfp-img { @media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) { /** - * Remove all paddings around the image on small screen - */ + * Remove all paddings around the image on small screen + */ .mfp-img-mobile .mfp-image-holder { padding-left: 0; padding-right: 0; } @@ -2905,8 +2982,6 @@ img.mfp-img { top: auto; padding: 3px 5px; position: fixed; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; box-sizing: border-box; } .mfp-img-mobile .mfp-bottom-bar:empty { padding: 0; } @@ -2938,23 +3013,6 @@ img.mfp-img { padding-left: 6px; padding-right: 6px; } } -.mfp-ie7 .mfp-img { - padding: 0; } -.mfp-ie7 .mfp-bottom-bar { - width: 600px; - left: 50%; - margin-left: -300px; - margin-top: 5px; - padding-bottom: 5px; } -.mfp-ie7 .mfp-container { - padding: 0; } -.mfp-ie7 .mfp-content { - padding-top: 44px; } -.mfp-ie7 .mfp-close { - top: 0; - right: 0; - padding-top: 0; } - /* Additional styles for MagnificPopup, do not remove */ .mfp-image-holder .mfp-content { min-width: 240px; @@ -2973,6 +3031,10 @@ img.mfp-img { display: inline-block; width: auto; } + + .popuplayer_showUpload { + margin: 1em .4rem 0 0; + } } @media only screen and (min-width: 480px) { @@ -2998,6 +3060,14 @@ img.mfp-img { position: relative; } + #media_selector_bar { + margin: 0; + } + + .popuplayer_showUpload { + margin: 1em 0 0; + } + .tabcontent #pluginlist_event > a, .tabcontent #pluginlist_sidebar > a { position: absolute; @@ -3066,13 +3136,12 @@ img.mfp-img { margin: 0 0 1em; } - .media_select_strict { - margin: -1em 0; + .popuplayer_showUpload { + margin: 0 .4em 1em 0; } - .popuplayer_showUpload { - float: right; - margin-top: -2.375em; + .media_select_strict { + margin: -1em 0; } #mediaPropertyForm .media_file_props label, @@ -3145,13 +3214,13 @@ img.mfp-img { margin: 1.71429em 0; } - #template_select article, - .plugins_installable > li, + .no-flexbox #template_select article, + .no-flexbox .plugins_installable > li, #serendipityScaleForm, #serendipityScaleImg, - .media_file, - #dashboard > .dashboard_widget, - #maintenance > .quick_list, + .no-flexbox .media_file, + .no-flexbox #dashboard > .dashboard_widget, + .no-flexbox #maintenance > .quick_list, .serendipity_statistics > section, #serendipity_category > div > div, #serendipity_category #preview, @@ -3163,10 +3232,71 @@ img.mfp-img { width: 48%; } + #dashboard, + #maintenance, + .media_pane, + .pluginmanager, + .plugins_installable, + #template_select, + #template_select > ul { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + } + + .plugins_installable { + justify-content: flex-start; + } + + #dashboard > .dashboard_widget, + #maintenance > .quick_list, + .media_pane > .media_file, + .plugins_installable > li, + #template_select > article, + #template_select > ul li { + flex: 0 0 auto; + margin: 0 2% 1em 0; + width: 48%; + } + + .pluginmanager .pluginmanager_event { + flex: 0 0 auto; + margin: 0 1% 0 0; + width: 49%; + } + + .pluginmanager .pluginmanager_sidebar { + flex: 0 0 auto; + margin: 0 1% 0 0; + width: 32%; + } + + .no-js #dashboard #s9y_links, + #maintenance > h2, + #maintenance > span, + .media_pane .pagination, + #template_select > h2 { + flex: 0 0 auto; + width: 100%; + } + + #dashboard > .dashboard_widget:nth-of-type(even), + #maintenance > .quick_list:nth-of-type(even), + .media_pane > .media_file:nth-of-type(even), + #template_select > .current_backend_template, + #template_select > ul li:nth-of-type(even) { + margin: 0 0 1em 2%; + } + + .no-js #dashboard #s9y_links { + margin: 0 0 1em; + } + .media_chooser { margin-bottom: 0; } + #maintenance > span, .media_chooser + .field_info { margin-top: 0; } @@ -3177,22 +3307,14 @@ img.mfp-img { width: 84%; } - #template_select .current_backend_template, - #template_select li:nth-child(even) article, - .media_pane .even, - #dashboard > .dashboard_widget:nth-child(even), - #maintenance > section:nth-of-type(even) { + .no-flexbox #template_select .current_backend_template, + .no-flexbox #template_select li:nth-child(even) article, + .no-flexbox .media_pane .even, + .no-flexbox #dashboard > .dashboard_widget:nth-child(even), + .no-flexbox #maintenance > section:nth-of-type(even) { margin: 0 0 1em 2%; } - #maintenance > section { - margin: 0 2% 1em 0; - } - - #template_select .current_template { - margin-bottom: 2em; - } - #mediaPropertyForm .media_file { float: none; margin: 1.5em 0; @@ -3307,12 +3429,12 @@ img.mfp-img { .configuration_group .custom_item, .configuration_group fieldset > fieldset, .configuration_group div > fieldset, - #template_select li:nth-child(odd), + .no-flexbox #template_select li:nth-child(odd), #template_select h2, - .media_pane .odd, - .plugins_installable > li:nth-child(odd), + .no-flexbox .media_pane .odd, + .no-flexbox .plugins_installable > li:nth-child(odd), .serendipity_statistics > section:nth-child(odd), - .dashboard_widget:nth-child(odd) { + .no-flexbox .dashboard_widget:nth-child(odd) { clear: left; } @@ -3332,28 +3454,28 @@ img.mfp-img { margin-top: 0; } - .pluginmanager_side { + .no-flexbox .pluginmanager_side { float: left; margin: 0 0 1.5em; vertical-align: top; } - #pluginlist_sidebar .pluginmanager_side { + .no-flexbox #pluginlist_sidebar .pluginmanager_side { margin-right: 1%; width: 32%; } - #pluginlist_event .pluginmanager_side { + .no-flexbox #pluginlist_event .pluginmanager_side { margin-right: 1%; width: 49%; } - #pluginlist_event .pluginmanager_side:nth-child(even) { + .no-flexbox #pluginlist_event .pluginmanager_side:nth-child(even) { margin-right: 0; margin-left: 1%; } - #pluginlist_sidebar .pluginmanager_side:nth-of-type(4) { + .no-flexbox #pluginlist_sidebar .pluginmanager_side:nth-of-type(4) { clear: left; } @@ -3627,4 +3749,4 @@ img.mfp-img { .manage h3 { width: 19em; } -} +} \ No newline at end of file diff --git a/templates/2k11/admin/templates.inc.tpl b/templates/2k11/admin/templates.inc.tpl index e9d4509f..9630dfad 100644 --- a/templates/2k11/admin/templates.inc.tpl +++ b/templates/2k11/admin/templates.inc.tpl @@ -1,8 +1,8 @@ {if $adminAction == 'install'} - <span class="msg_success"><span class="icon-ok-circled"></span> {$install_template|string_format:"{$CONST.TEMPLATE_SET}"}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$install_template|string_format:"{$CONST.TEMPLATE_SET}"}</span> {/if} {if $deprecated} - <span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.WARNING_TEMPLATE_DEPRECATED}</span> + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.WARNING_TEMPLATE_DEPRECATED}</span> {/if} {if $adminAction == 'editConfiguration'} @@ -10,7 +10,7 @@ <h2>{$CONST.STYLE_OPTIONS} ({$cur_template})</h2> {if $has_config} {if $adminAction == 'configure'} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.DONE}: {$save_time}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.DONE}: {$save_time}</span> {/if} <form class="theme_options option_list" method="post" action="serendipity_admin.php"> <input name="serendipity[adminModule]" type="hidden" value="templates"> @@ -56,9 +56,9 @@ </div> </div> - <button class="template_show_info button_link" type="button" data-href="#template_info_cur" title="{$CONST.TEMPLATE_INFO}"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.TEMPLATE_INFO}</span></button> - {if $cur_tpl.info.custom_config}<a class="button_link" href="?serendipity[adminModule]=templates&serendipity[adminAction]=editConfiguration" title="{$CONST.CONFIGURATION}">{$CONST.CONFIGURATION}</a>{/if} - {if $cur_tpl.info.custom_admin_interface == $CONST.YES and $cur_tpl.info.name != $cur_tpl_backend.info.name}<a class="button_link" href="?serendipity[adminModule]=templates&serendipity[adminAction]=install-backend&serendipity[theme]={$template}{$info.info.customURI}" title="{$CONST.SET_AS_TEMPLATE}">{$CONST.INSTALL}: {$CONST.BACKEND}</a>{/if} + <button class="template_show_info button_link" type="button" data-href="#template_info_cur" title="{$CONST.TEMPLATE_INFO}"><span class="icon-info-circled" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.TEMPLATE_INFO}</span></button> + {if $cur_tpl.info.custom_config}<a class="button_link" href="?serendipity[adminModule]=templates&serendipity[adminAction]=editConfiguration&{$urltoken}" title="{$CONST.CONFIGURATION}">{$CONST.CONFIGURATION}</a>{/if} + {if $cur_tpl.info.custom_admin_interface == $CONST.YES and $cur_tpl.info.name != $cur_tpl_backend.info.name}<a class="button_link" href="?serendipity[adminModule]=templates&serendipity[adminAction]=install-backend&serendipity[theme]={$template}{$info.info.customURI}&{$urltoken}" title="{$CONST.SET_AS_TEMPLATE}">{$CONST.INSTALL}: {$CONST.BACKEND}</a>{/if} </article> {if $cur_template_backend} @@ -87,14 +87,11 @@ </div> </div> - <button class="template_show_info button_link" type="button" data-href="#template_info_cur_backend" title="{$CONST.TEMPLATE_INFO}"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.TEMPLATE_INFO}</span></button> + <button class="template_show_info button_link" type="button" data-href="#template_info_cur_backend" title="{$CONST.TEMPLATE_INFO}"><span class="icon-info-circled" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.TEMPLATE_INFO}</span></button> </article> {/if} - <h2>{$CONST.AVAILABLE_TEMPLATES}</h2> - - <ul class="plainList clearfix"> - {foreach $templates as $template=>$info} + {function name=templateBlock} <li><article class="clearfix"> <h3 title="{$info.info.name}">{$info.info.name|truncate:25:"…"}</h3> <div class="clearfix equal_heights template_wrap"> @@ -109,7 +106,7 @@ {/if} {/if} - <footer id="template_info_{$info@key}" class="template_info additional_info"> + <footer id="template_info_{$key}" class="template_info additional_info"> <dl class="clearfix"> <dt class="template_author">{$CONST.AUTHOR}:</dt> <dd>{$info.info.author}</dd> @@ -124,23 +121,38 @@ </div> </div> - <button class="template_show_info button_link" type="button" data-href="#template_info_{$info@key}" title="{$CONST.TEMPLATE_INFO}"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.TEMPLATE_INFO}</span></button> + <button class="template_show_info button_link" type="button" data-href="#template_info_{$key}" title="{$CONST.TEMPLATE_INFO}"><span class="icon-info-circled" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.TEMPLATE_INFO}</span></button> {if $info.demoURL} - <a class="demo_link button_link" href="{$info.demoURL}" title="{$CONST.THEMES_PREVIEW_BLOG}" target="_blank"><span class="icon-search"></span><span class="visuallyhidden"> {$CONST.THEMES_PREVIEW_BLOG}</span></a> + <a class="demo_link button_link" href="{$info.demoURL}" title="{$CONST.THEMES_PREVIEW_BLOG}" target="_blank"><span class="icon-search" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.THEMES_PREVIEW_BLOG}</span></a> {/if} {if !$info.unmetRequirements} {if $info.info.custom_admin_interface == $CONST.YES && $cur_tpl_backend.info.name != $info.info.name} - <a class="button_link" href="?serendipity[adminModule]=templates&serendipity[adminAction]=install-frontend&serendipity[theme]={$template}{$info.info.customURI}" title="{$CONST.SET_AS_TEMPLATE}">{$CONST.INSTALL}: {$CONST.FRONTEND}</a> - <a class="button_link" href="?serendipity[adminModule]=templates&serendipity[adminAction]=install-backend&serendipity[theme]={$template}{$info.info.customURI}" title="{$CONST.SET_AS_TEMPLATE}">{$CONST.INSTALL}: {$CONST.BACKEND}</a> + <a class="button_link" href="?serendipity[adminModule]=templates&serendipity[adminAction]=install-frontend&serendipity[theme]={$template}{$info.info.customURI}&{$urltoken}" title="{$CONST.SET_AS_TEMPLATE}">{$CONST.INSTALL}: {$CONST.FRONTEND}</a> + <a class="button_link" href="?serendipity[adminModule]=templates&serendipity[adminAction]=install-backend&serendipity[theme]={$template}{$info.info.customURI}&{$urltoken}" title="{$CONST.SET_AS_TEMPLATE}">{$CONST.INSTALL}: {$CONST.BACKEND}</a> {else} - <a class="button_link" href="?serendipity[adminModule]=templates&serendipity[adminAction]=install&serendipity[theme]={$template}{$info.info.customURI}" title="{$CONST.SET_AS_TEMPLATE}">{$CONST.INSTALL}: {$CONST.FRONTEND}</a> + <a class="button_link" href="?serendipity[adminModule]=templates&serendipity[adminAction]=install&serendipity[theme]={$template}{$info.info.customURI}&{$urltoken}" title="{$CONST.SET_AS_TEMPLATE}">{$CONST.INSTALL}: {$CONST.FRONTEND}</a> {/if} {else} - <span class="unmet_requirements msg_error"><span class="icon-attention-circled"></span> {$info.unmetRequirements}></span> + <span class="unmet_requirements msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$info.unmetRequirements}></span> {/if} </article> </li> + {/function} + + <h2>{$CONST.RECOMMENDED}</h2> + <ul class="plainList"> + {foreach $recommended_templates as $template=>$info} + {templateBlock template=$template info=$info key=$info@key} + {/foreach} + </ul> + + + <h2>{$CONST.AVAILABLE_TEMPLATES}</h2> + + <ul class="plainList"> + {foreach $templates as $template=>$info} + {templateBlock template=$template info=$info key=$info@key} {/foreach} </ul> </section> -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/admin/upgrader.inc.tpl b/templates/2k11/admin/upgrader.inc.tpl index 871a4d69..78d0c2da 100644 --- a/templates/2k11/admin/upgrader.inc.tpl +++ b/templates/2k11/admin/upgrader.inc.tpl @@ -32,12 +32,12 @@ <ul> <li class="logged_in"><span>{$admin_vars.self_info}</span></li> - <li><a class="button_link" href="serendipity_admin.php" title="{$CONST.MENU_DASHBOARD}"><span class="icon-home"></span><span class="visuallyhidden"> {$CONST.MENU_DASHBOARD}</span></a></li> + <li><a class="button_link" href="serendipity_admin.php" title="{$CONST.MENU_DASHBOARD}"><span class="icon-home" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.MENU_DASHBOARD}</span></a></li> {if 'personalConfiguration'|checkPermission} - <li><a class="button_link" href="serendipity_admin.php?serendipity[adminModule]=personal" title="{$CONST.PERSONAL_SETTINGS}"><span class="icon-cog-alt"></span><span class="visuallyhidden"> {$CONST.PERSONAL_SETTINGS}</span></a></li> + <li><a class="button_link" href="serendipity_admin.php?serendipity[adminModule]=personal" title="{$CONST.PERSONAL_SETTINGS}"><span class="icon-cog-alt" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.PERSONAL_SETTINGS}</span></a></li> {/if} - <li><a class="button_link" href="{$serendipityBaseURL}" title="{$CONST.BACK_TO_BLOG}"><span class="icon-globe"></span><span class="visuallyhidden"> {$CONST.BACK_TO_BLOG}</span></a></li> - <li><a class="button_link" href="serendipity_admin.php?serendipity[adminModule]=logout" title="{$CONST.LOGOUT}"><span class="icon-logout"></span><span class="visuallyhidden"> {$CONST.LOGOUT}</span></a></li> + <li><a class="button_link" href="{$serendipityBaseURL}" title="{$CONST.BACK_TO_BLOG}"><span class="icon-globe" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.BACK_TO_BLOG}</span></a></li> + <li><a class="button_link" href="serendipity_admin.php?serendipity[adminModule]=logout" title="{$CONST.LOGOUT}"><span class="icon-logout" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.LOGOUT}</span></a></li> </ul> </nav> {/if} @@ -60,7 +60,7 @@ <div class="msg_error"> {foreach $errors AS $implode_err} - <p><span class="icon-attention-circled"></span> {$implode_err}</p> + <p><span class="icon-attention-circled" aria-hidden="true"></span> {$implode_err}</p> {/foreach} </div> {/if} @@ -68,9 +68,9 @@ {if (($showAbort && $get.action == 'ignore') || $get.action == 'upgrade')} {if $get.action == 'ignore'} - <span class="msg_notice upgrade_done"><span class="icon-info-circled"></span> {$CONST.SERENDIPITY_UPGRADER_YOU_HAVE_IGNORED}</span> + <span class="msg_notice upgrade_done"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.SERENDIPITY_UPGRADER_YOU_HAVE_IGNORED}</span> {elseif $get.action == 'upgrade'} - <span class="msg_success upgrade_done"><span class="icon-ok-circled"></span> {$CONST.SERENDIPITY_UPGRADER_NOW_UPGRADED|sprintf:$s9y_version}</span> + <span class="msg_success upgrade_done"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.SERENDIPITY_UPGRADER_NOW_UPGRADED|sprintf:$s9y_version}</span> {/if} {if $return_here} {$print_UPGRADER_RETURN_HERE} @@ -109,19 +109,19 @@ <dd>{$urd3}</dd> {/foreach} {if $isdir_uploadpath} - <dt>{$basedir}{$uploadHTTPPath}</dt> + <dt>{$basedir}{serendipity_getConfigVar key='uploadHTTPPath'}</dt> {foreach $upgraderResultDiagnose4 AS $urd4} <dd>{$urd4}</dd> {/foreach} {/if} </dl> {if $showWritableNote} - <span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.PROBLEM_PERMISSIONS_HOWTO|sprintf:'chmod 1777'}</span> + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.PROBLEM_PERMISSIONS_HOWTO|sprintf:'chmod 1777'}</span> {/if} {if ($errorCount > 0)} - <span class="msg_error"><span class="icon-ok-circled"></span> {$CONST.PROBLEM_DIAGNOSTIC}</span> + <span class="msg_error"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.PROBLEM_DIAGNOSTIC}</span> - <a class="icon_link block_level" href="serendipity_admin.php"><span class="icon-help-circled"></span> {$CONST.RECHECK_INSTALLATION}</a> + <a class="icon_link block_level" href="serendipity_admin.php"><span class="icon-help-circled" aria-hidden="true"></span> {$CONST.RECHECK_INSTALLATION}</a> {/if} </div> {if ($errorCount < 1)} diff --git a/templates/2k11/admin/users.inc.tpl b/templates/2k11/admin/users.inc.tpl index 0c8d55e6..f592e82c 100644 --- a/templates/2k11/admin/users.inc.tpl +++ b/templates/2k11/admin/users.inc.tpl @@ -1,39 +1,39 @@ {if $delete_yes} {if $no_delete_permission} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.CREATE_NOT_AUTHORIZED}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.CREATE_NOT_AUTHORIZED}</span> {else} {if $no_delete_permission_userlevel} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL}</span> {else} {if $delete_permission} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.DELETED_USER|sprintf:"{$user|escape}":"{$realname|escape}"}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.DELETED_USER|sprintf:"{$user|escape}":"{$realname|escape}"}</span> {else} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL}</span> {/if} {/if} {/if} {/if} {if $save_new} {if $no_save_permission} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.CREATE_NOT_AUTHORIZED}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.CREATE_NOT_AUTHORIZED}</span> {else} {if $no_group_selected} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.WARNING_NO_GROUPS_SELECTED}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.WARNING_NO_GROUPS_SELECTED}</span> {/if} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.CREATED_USER|sprintf:"# {$user|escape}":"{$realname|escape}"}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.CREATED_USER|sprintf:"# {$user|escape}":"{$realname|escape}"}</span> {/if} {/if} {if $save_edit} {if $no_edit_permission} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.CREATE_NOT_AUTHORIZED}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.CREATE_NOT_AUTHORIZED}</span> {else} {if $no_edit_permission_userlevel} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.CREATE_NOT_AUTHORIZED_USERLEVEL}</span> {else} {if $no_group_selected} - <span class="msg_error"><span class="icon-attention-circled"></span> {$CONST.WARNING_NO_GROUPS_SELECTED}</span> + <span class="msg_error"><span class="icon-attention-circled" aria-hidden="true"></span> {$CONST.WARNING_NO_GROUPS_SELECTED}</span> {/if} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.MODIFIED_USER|sprintf:"{$realname|escape}"}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.MODIFIED_USER|sprintf:"{$realname|escape}"}</span> {/if} {/if} {/if} @@ -44,12 +44,12 @@ {foreach $users as $user} {if $user.isEditable} <li class="clearfix {cycle values="odd,even"}"> - <span class="user_name"><span class="icon-user"></span> {$user.realname|escape} <span class="user_level">({$user.userlevel_name|escape})</span></span> + <span class="user_name"><span class="icon-user" aria-hidden="true"></span> {$user.realname|escape} <span class="user_level">({$user.userlevel_name|escape})</span></span> <ul class="plainList clearfix edit_actions"> - <li><a class="button_link" href="{$user.authorUrl}" title="{$CONST.ENTRIES_FOR|sprintf:{$user.realname|escape}}"><span class="icon-search"></span><span class="visuallyhidden"> {$CONST.ENTRIES_FOR|sprintf:{$user.realname}|escape}</span></a></li> - <li><a class="button_link" href="?serendipity[adminModule]=users&serendipity[adminAction]=edit&serendipity[userid]={$user.authorid}#editform" title="{$CONST.EDIT} {$user.realname|escape}"><span class="icon-edit"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li> - <li><a class="button_link" href="?{$urlFormToken}&serendipity[adminModule]=users&serendipity[adminAction]=delete&serendipity[userid]={$user.authorid}" title="{$CONST.DELETE} {$user.realname|escape}"><span class="icon-trash"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a></li> + <li><a class="button_link" href="{$user.authorUrl}" title="{$CONST.ENTRIES_FOR|sprintf:{$user.realname|escape}}"><span class="icon-search" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.ENTRIES_FOR|sprintf:{$user.realname}|escape}</span></a></li> + <li><a class="button_link" href="?serendipity[adminModule]=users&serendipity[adminAction]=edit&serendipity[userid]={$user.authorid}#editform" title="{$CONST.EDIT} {$user.realname|escape}"><span class="icon-edit" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li> + <li><a class="button_link" href="?{$urlFormToken}&serendipity[adminModule]=users&serendipity[adminAction]=delete&serendipity[userid]={$user.authorid}" title="{$CONST.DELETE} {$user.realname|escape}"><span class="icon-trash" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.DELETE}</span></a></li> </ul> </li> {/if} @@ -78,11 +78,11 @@ <form action="?serendipity[adminModule]=users" method="post"> {$formToken} <input name="serendipity[user]" type="hidden" value="{$userid}"> - + <div class="users_delete_action"> <h2>{$CONST.MANAGE_USERS}</h2> - <span class="msg_notice"><span class="icon-info-circled"></span> {$CONST.DELETE_USER|sprintf:"{$userid}":"{$realname|escape}"}</span> + <span class="msg_notice"><span class="icon-info-circled" aria-hidden="true"></span> {$CONST.DELETE_USER|sprintf:"{$userid}":"{$realname|escape}"}</span> <div class="form_buttons"> <input class="state_cancel" name="NO" type="submit" value="{$CONST.NOT_REALLY}"> @@ -91,4 +91,4 @@ </div> </form> {/if} -{/if} +{/if} \ No newline at end of file diff --git a/templates/2k11/feed_0.91.tpl b/templates/2k11/feed_0.91.tpl new file mode 100644 index 00000000..64192044 --- /dev/null +++ b/templates/2k11/feed_0.91.tpl @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8" ?> + +<rss version="0.91" {$namespace_display_dat}> +<channel> +<title>{$metadata.title}</title> +<link>{$metadata.link}</link> +<description>{$metadata.description}</description> +<language>{$metadata.language}</language> +{$metadata.additional_fields.image} + +{foreach from=$entries item="entry"} +<item> + <title>{$entry.feed_title}</title> + <link>{$entry.feed_entryLink}{if $is_comments}#c{$entry.commentid}{/if}</link> + +{if !empty($entry.body)} + <description> + {$entry.feed_body|@escape} {$entry.feed_ext|@escape} + </description> +{/if} +</item> +{/foreach} + +</channel> +</rss> + diff --git a/templates/2k11/feed_1.0.tpl b/templates/2k11/feed_1.0.tpl new file mode 100644 index 00000000..09267a93 --- /dev/null +++ b/templates/2k11/feed_1.0.tpl @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="utf-8" ?> + +<rdf:RDF {$namespace_display_dat} + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:admin="http://webns.net/mvcb/" + xmlns:content="http://purl.org/rss/1.0/modules/content/" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:slash="http://purl.org/rss/1.0/modules/slash/" + xmlns:wfw="http://wellformedweb.org/CommentAPI/" + xmlns="http://my.netscape.com/rdf/simple/0.9/"> +<channel> + <title>{$metadata.title}</title> + <link>{$metadata.link}</link> + <description>{$metadata.description}</description> + <dc:language>{$metadata.language}</dc:language> +{if $metadata.showMail} + <admin:errorReportsTo rdf:resource="mailto:{$metadata.email}" /> +{/if} + + {$metadata.additional_fields.image_rss10_channel} + + <items> + <rdf:Seq> +{foreach from=$entries item="entry"} + <rdf:li resource="{serendipity_rss_getguid entry=$entry is_comments=$is_comments}" /> +{/foreach} + </rdf:Seq> + </items> +</channel> + +{$metadata.additional_fields.image_rss10_rdf} +{$once_display_dat} + +{foreach from=$entries item="entry"} +<item rdf:about="{$entry.feed_guid}"> + <title>{$entry.feed_title}</title> + <link>{$entry.feed_entryLink}{if $is_comments}#c{$entry.commentid}{/if}</link> +{if !empty($entry.body)} + <description> + {$entry.feed_body|@escape} {$entry.feed_ext|@escape} + </description> +{/if} + + <dc:publisher>{$entry.feed_blogTitle}</dc:publisher> + <dc:creator>{$entry.feed_email} ({$entry.feed_author})</dc:creator> + <dc:subject> + {foreach from=$entry.categories item="cat"}{$cat.feed_category_name}, {/foreach}</dc:subject> + <dc:date>{$entry.feed_timestamp}</dc:date> + <wfw:comment>{$serendipityBaseURL}wfwcomment.php?cid={$entry.feed_id}</wfw:comment> +{if !$is_comments} + <slash:comments>{$entry.comments}</slash:comments> + <wfw:commentRss>{$serendipityBaseURL}rss.php?version={$metadata.version}&type=comments&cid={$entry.feed_id}</wfw:commentRss> +{/if} + {$entry.per_entry_display_dat} +</item> +{/foreach} + +</rdf:RDF> + diff --git a/templates/2k11/feed_2.0.tpl b/templates/2k11/feed_2.0.tpl new file mode 100644 index 00000000..80643b83 --- /dev/null +++ b/templates/2k11/feed_2.0.tpl @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="utf-8" ?> + +<rss version="2.0" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:admin="http://webns.net/mvcb/" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:slash="http://purl.org/rss/1.0/modules/slash/" + xmlns:wfw="http://wellformedweb.org/CommentAPI/" + xmlns:content="http://purl.org/rss/1.0/modules/content/" + {$namespace_display_dat}> +<channel> + {$channel_display_dat} + <title>{$metadata.title}</title> + <link>{$metadata.link}</link> + <description>{$metadata.description}</description> + <dc:language>{$metadata.language}</dc:language> +{if $metadata.showMail} + <admin:errorReportsTo rdf:resource="mailto:{$metadata.email}" /> +{/if} + <generator>Serendipity {$serendipityVersion} - http://www.s9y.org/</generator> + {$metadata.additional_fields.channel} + {$metadata.additional_fields.image} + +{foreach from=$entries item="entry"} +<item> + <title>{$entry.feed_title}</title> + <link>{$entry.feed_entryLink}{if $is_comments}#c{$entry.commentid}{/if}</link> + {foreach from=$entry.categories item="cat"} + <category>{$cat.feed_category_name}</category> + {/foreach} + + <comments>{$entry.feed_entryLink}#comments</comments> + <wfw:comment>{$serendipityBaseURL}wfwcomment.php?cid={$entry.feed_id}</wfw:comment> + +{if !$is_comments} + <slash:comments>{$entry.comments}</slash:comments> + <wfw:commentRss>{$serendipityBaseURL}rss.php?version={$metadata.version}&type=comments&cid={$entry.feed_id}</wfw:commentRss> +{/if} + + <author>{$entry.feed_email} ({$entry.feed_author})</author> +{if !empty($entry.body)} + <content:encoded> + {$entry.feed_body|@escape} {$entry.feed_ext|@escape} + </content:encoded> +{/if} + + <pubDate>{$entry.feed_timestamp_r}</pubDate> + <guid isPermaLink="false">{$entry.feed_guid}</guid> + {$entry.per_entry_display_dat} +</item> +{/foreach} + +</channel> +</rss> diff --git a/templates/2k11/feed_atom0.3.tpl b/templates/2k11/feed_atom0.3.tpl new file mode 100644 index 00000000..0cb3ded1 --- /dev/null +++ b/templates/2k11/feed_atom0.3.tpl @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="utf-8" ?> + +<feed version="0.3" {$namespace_display_dat} + xmlns="http://purl.org/atom/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:admin="http://webns.net/mvcb/" + xmlns:slash="http://purl.org/rss/1.0/modules/slash/" + xmlns:wfw="http://wellformedweb.org/CommentAPI/"> + {$channel_display_dat} + <link href="{$serendipityBaseURL}rss.php?version=atom0.3" rel="service.feed" title="{$metadata.title}" type="application/x.atom+xml" /> + <link href="{$serendipityBaseURL}" rel="alternate" title="{$metadata.title}" type="text/html" /> + <link href="{$serendipityBaseURL}rss.php?version=2.0" rel="alternate" title="{$metadata.title}" type="application/rss+xml" /> + <link rel="stylesheet" href="{serendipity_getFile file='atom.css'}" type="text/css" /> + <title mode="escaped" type="text/html">{$metadata.title}</title> + <tagline mode="escaped" type="text/html">{$metadata.description}</tagline> + <id>{$metadata.link}</id> + <modified>{$last_modified}</modified> + <generator url="http://www.s9y.org/" version="{$serendipityVersion}">Serendipity {$serendipityVersion} - http://www.s9y.org/</generator> + <dc:language>{$metadata.language}</dc:language> +{if $metadata.showMail} + <admin:errorReportsTo rdf:resource="mailto:{$metadata.email}" /> +{/if} + <info mode="xml" type="text/html"> + <div xmlns="http://www.w3.org/1999/xhtml">You are viewing an ATOM formatted XML site feed. Usually this file is inteded to be viewed in an aggregator or syndication software. If you want to know more about ATOM, please visist <a href="http://atomenabled.org/">Atomenabled.org</a></div> + </info> + +{foreach from=$entries item="entry"} + <entry> + <link href="{$entry.feed_entryLink}{if $is_comments}#c{$entry.commentid}{/if}" rel="alternate" title="{$entry.feed_title}" type="text/html" /> + <author> + <name>{$entry.feed_author}</name> + {if $entry.feed_email != 'nospam@example.com'}<email>{$entry.feed_email}</email>{/if} + </author> + + <issued>{$entry.feed_timestamp}</issued> + <created>{$entry.feed_timestamp}</created> + <modified>{$entry.feed_last_modified}</modified> + <wfw:comment>{$serendipityBaseURL}wfwcomment.php?cid={$entry.feed_id}</wfw:comment> +{if !$is_comments} + <slash:comments>{$entry.comments}</slash:comments> + <wfw:commentRss>{$serendipityBaseURL}rss.php?version={$metadata.version}&type=comments&cid={$entry.feed_id}</wfw:commentRss> +{/if} + <id>{$entry.feed_guid}</id> + <title mode="escaped" type="text/html">{$entry.feed_title}</title> +{if !empty($entry.body)} + <content type="application/xhtml+xml" xml:base="{$serendipityBaseURL}"> + <div xmlns="http://www.w3.org/1999/xhtml"> + {$entry.feed_body} {$entry.feed_ext} + </div> + </content> +{/if} + + {$entry.per_entry_display_dat} + </entry> +{/foreach} +</feed> \ No newline at end of file diff --git a/templates/2k11/feed_atom1.0.tpl b/templates/2k11/feed_atom1.0.tpl new file mode 100644 index 00000000..461cf12c --- /dev/null +++ b/templates/2k11/feed_atom1.0.tpl @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="utf-8" ?> + +<feed {$namespace_display_dat} + xmlns="http://www.w3.org/2005/Atom" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:admin="http://webns.net/mvcb/" + xmlns:slash="http://purl.org/rss/1.0/modules/slash/" + xmlns:wfw="http://wellformedweb.org/CommentAPI/"> + {$channel_display_dat} + <link href="{$self_url}" rel="self" title="{$metadata.title}" type="application/atom+xml" /> + <link href="{$serendipityBaseURL}" rel="alternate" title="{$metadata.title}" type="text/html" /> + <link href="{$serendipityBaseURL}rss.php?version=2.0" rel="alternate" title="{$metadata.title}" type="application/rss+xml" /> + <link rel="stylesheet" href="{serendipity_getFile file='atom.css'}" type="text/css" /> + <title type="html">{$metadata.title}</title> + <subtitle type="html">{$metadata.description}</subtitle> + {$metadata.additional_fields.image_atom10} + <id>{$metadata.link}</id> + <updated>{$last_modified}</updated> + <generator uri="http://www.s9y.org/" version="{$serendipityVersion}">Serendipity {$serendipityVersion} - http://www.s9y.org/</generator> + <dc:language>{$metadata.language}</dc:language> +{if $metadata.showMail} + <admin:errorReportsTo rdf:resource="mailto:{$metadata.email}" /> +{/if} + +{foreach from=$entries item="entry"} + <entry> + <link href="{$entry.feed_entryLink}{if $is_comments}#c{$entry.commentid}{/if}" rel="alternate" title="{$entry.feed_title}" /> + <author> + <name>{$entry.feed_author}</name> + {if $entry.feed_email != 'nospam@example.com'}<email>{$entry.feed_email}</email>{/if} + </author> + + <published>{$entry.feed_timestamp}</published> + <updated>{$entry.feed_last_modified}</updated> + <wfw:comment>{$serendipityBaseURL}wfwcomment.php?cid={$entry.feed_id}</wfw:comment> + +{if !$is_comments} + <slash:comments>{$entry.comments}</slash:comments> + <wfw:commentRss>{$serendipityBaseURL}rss.php?version={$metadata.version}&type=comments&cid={$entry.feed_id}</wfw:commentRss> +{/if} + + {foreach from=$entry.categories item="cat"} + <category scheme="{$cat.categoryURL}" label="{$cat.feed_category_name}" term="{$cat.feed_category_name}" /> + {/foreach} + + <id>{$entry.feed_guid}</id> + <title type="html">{$entry.feed_title}</title> +{if !empty($entry.body)} + <content type="html"> + <![CDATA[{$entry.feed_body} {$entry.feed_ext}]]> + </content> +{/if} + {$entry.per_entry_display_dat} + </entry> +{/foreach} + +</feed> \ No newline at end of file diff --git a/templates/2k11/feed_opml1.0.tpl b/templates/2k11/feed_opml1.0.tpl new file mode 100644 index 00000000..ad877ee7 --- /dev/null +++ b/templates/2k11/feed_opml1.0.tpl @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8" ?> + +<opml version="{$metadata.version}" {$namespace_display_dat}> +<head> + <title>{$metadata.title}</title> + <dateModified>{$last_modified}</dateModified> + <ownerName>Serendipity {$serendipityVersion} - http://www.s9y.org/</ownerName> +</head> +<body> + +{foreach from=$entries item="entry"} + <outline text="{$entry.feed_title}" type="url" htmlUrl="{$entry.feed_entryLink}{if $is_comments}#c{$entry.commentid}{/if}" urlHTTP="{$entry.feed_entryLink}{if $is_comments}#c{$entry.commentid}{/if}" /> +{/foreach} + +</body> +</opml> \ No newline at end of file diff --git a/templates/2k11/img/img_align_left.png b/templates/2k11/img/img_align_left.png new file mode 100644 index 00000000..ab38e28d Binary files /dev/null and b/templates/2k11/img/img_align_left.png differ diff --git a/templates/2k11/img/img_align_right.png b/templates/2k11/img/img_align_right.png new file mode 100644 index 00000000..eb28cd91 Binary files /dev/null and b/templates/2k11/img/img_align_right.png differ diff --git a/templates/2k11/img/img_align_top.png b/templates/2k11/img/img_align_top.png new file mode 100644 index 00000000..b0f09991 Binary files /dev/null and b/templates/2k11/img/img_align_top.png differ diff --git a/templates/2k11/img/s9y_banner_small.png b/templates/2k11/img/s9y_banner_small.png new file mode 100644 index 00000000..b62833ec Binary files /dev/null and b/templates/2k11/img/s9y_banner_small.png differ diff --git a/templates/2k11/index.tpl b/templates/2k11/index.tpl index 8f25c739..4c76fcc2 100644 --- a/templates/2k11/index.tpl +++ b/templates/2k11/index.tpl @@ -38,6 +38,7 @@ <link rel="alternate" type="application/rss+xml" title="{$blogTitle} RSS feed" href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/index.rss2"> <link rel="alternate" type="application/x.atom+xml" title="{$blogTitle} Atom feed" href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/atom.xml"> {if $entry_id} + <link rel="trackback" type="application/x-www-form-urlencoded" href="{$serendipityBaseURL}comment.php?type=trackback&entry_id={$entry_id}"> <link rel="pingback" href="{$serendipityBaseURL}comment.php?type=pingback&entry_id={$entry_id}"> {/if} {serendipity_hookPlugin hook="frontend_header"} @@ -97,7 +98,7 @@ </div> <footer id="colophon"> - <p><span lang="en">Powered by <a href="http://s9y.org">Serendipity</a> & the <i>2k11</i> theme.</span></p> + <p><span lang="en">Powered by <a href="http://s9y.org">Serendipity</a> & the <i>{$template}</i> theme.</span></p> </footer> </div> diff --git a/templates/2k11/info.txt b/templates/2k11/info.txt index fdb0b202..9216f532 100644 --- a/templates/2k11/info.txt +++ b/templates/2k11/info.txt @@ -3,3 +3,4 @@ Author: Matthias Mees, Veit Lehmann Date: 2015-05-19 Require Serendipity: 2.0 Backend: Yes +Recommended: Yes \ No newline at end of file diff --git a/templates/2k11/preview_iframe.tpl b/templates/2k11/preview_iframe.tpl index ffc1559f..7e998bec 100644 --- a/templates/2k11/preview_iframe.tpl +++ b/templates/2k11/preview_iframe.tpl @@ -26,16 +26,11 @@ {else} <link rel="stylesheet" href="{$serendipityHTTPPath}{$serendipityRewritePrefix}serendipity.css"> {/if} - <script src="{serendipity_getFile file="admin/js/modernizr.min.js"}"></script> + <script src="{serendipity_getFile file="js/modernizr-2.7.1.min.js" frontend=true}"></script> {serendipity_hookPlugin hook="backend_header" hookAll="true"} - <script src="{serendipity_getFile file='admin/js/plugins.js'}"></script> - <script src="{serendipity_getFile file='admin/serendipity_editor.js'}"></script> <script> window.onload = function() {ldelim} - parent.document.getElementById('serendipity_iframe').style.height = document.getElementById('content').offsetHeight - + parseInt(document.getElementById('content').style.marginTop) - + parseInt(document.getElementById('content').style.marginBottom) - + 'px'; + parent.document.getElementById('serendipity_iframe').style.height = document.querySelector('html').offsetHeight + 'px'; parent.document.getElementById('serendipity_iframe').scrolling = 'no'; parent.document.getElementById('serendipity_iframe').style.border = 0; {rdelim} @@ -44,7 +39,7 @@ <body{if $template_option.webfonts != 'none'} class="{$template_option.webfonts}"{/if}> <div id="page" class="clearfix container"> <div class="clearfix{if $leftSidebarElements > 0 && $rightSidebarElements > 0} col3{elseif $leftSidebarElements > 0 && $rightSidebarElements == 0} col2l{else} col2r{/if}"> - <main id="content" style="padding: 1em 0; margin: 0;"> + <main id="content"{if $template_option.imgstyle != 'none'} class="{$template_option.imgstyle}"{/if}> {if $mode == 'preview'} <div class="clearfix"> {elseif $mode == 'save'} @@ -52,7 +47,7 @@ <div style="float: left; height: 75px"></div> {$updertHooks} {if $res} - <div class="serendipity_msg_error">{$CONST.ERROR}: <b>{$res}</b></div> + <div class="serendipity_msg_important">{$CONST.ERROR}: <b>{$res}</b></div> {else} {if $lastSavedEntry} <script type="text/javascript">$(document).ready(function() { @@ -60,7 +55,7 @@ }); </script> {/if} - <span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.ENTRY_SAVED}</span> + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.ENTRY_SAVED}</span> <a href="{$entrylink}" target="_blank">{$CONST.VIEW}</a> {/if} {/if} @@ -70,4 +65,4 @@ </div> </div> </body> -</html> +</html> \ No newline at end of file diff --git a/templates/2k11/style_fallback.css b/templates/2k11/style_fallback.css new file mode 100644 index 00000000..232d229e --- /dev/null +++ b/templates/2k11/style_fallback.css @@ -0,0 +1,92 @@ +/* The templates/default/style_fallback.css emits CSS statements that all s9y + themes should have. + + Statements declared in this file are emitted early in the dynamically + generated stylesheet serendipity.css, so you can override them by declaring + them again in your theme's style.css or user.css. + + IT IS NOT ADVISED TO CREATE YOUR OWN style_fallback.css FILE! */ + +/* Images positioned normal/left/right */ +.serendipity_image_center { + border: 0; + padding-left: 5px; + padding-right: 5px; +} + +.serendipity_image_left { + float: left; + border: 0; + padding-left: 5px; + padding-right: 5px; +} + +.serendipity_image_right { + float: right; + border: 0; + padding-left: 5px; + padding-right: 5px; +} + +/* Images with captions and positioning */ +.serendipity_imageComment_center, +.serendipity_imageComment_left, +.serendipity_imageComment_right { + border: 1px solid #ddd; + background-color: #efefef; + margin: 3px; + padding: 3px; + text-align: center; +} + +.serendipity_imageComment_center { + margin: auto; +} + +.serendipity_imageComment_left { + float: left; +} + +.serendipity_imageComment_right { + float: right; +} + +.serendipity_imageComment_img, +.serendipity_imageComment_img img { + margin: 0; + padding: 0; + text-align: center; +} + +.serendipity_imageComment_txt { + border-top: 1px solid #ddd; + margin: 0; + padding: 3px; + clear: both; + font-size: 10px; + text-align: center; +} + +/* Lists without bullets or numbers */ +.plainList { + list-style: none; + margin-left: 0; + padding-left: 0; +} + +/* Messages: centered, important, notice */ +.serendipity_center { + margin-left: auto; + margin-right: auto; + text-align: center; +} + +.serendipity_msg_important { + color: red; +} + +.serendipity_msg_notice { + color: green; +} + +/* END OF style_fallback.css */ diff --git a/templates/blue/htmlarea.css b/templates/blue/htmlarea.css deleted file mode 100644 index 4b3687fe..00000000 --- a/templates/blue/htmlarea.css +++ /dev/null @@ -1,45 +0,0 @@ -body { - background-color: #e6eaee; - padding-left: 20px; - padding-right: 20px; - padding-bottom: 10px; - color: #000000; - font-family: sans-serif; - line-height: 20px; - direction: {LANG_DIRECTION}; -} - -/** Embedded images with the s9y image manager **/ -.serendipity_imageComment_center, -.serendipity_imageComment_left, -.serendipity_imageComment_right { - border: 1px solid black; - background-color: #EFEFEF; - margin: 3px; -} - -.serendipity_imageComment_center { -} - -.serendipity_imageComment_left { - float: left; -} - -.serendipity_imageComment_right { - float: right; -} - -.serendipity_imageComment_img, -.serendipity_imageComment_img img { - margin: 0px; - padding: 0px; - border: 0px; -} - -.serendipity_imageComment_txt { - margin: 0px; - padding: 3px; - clear: both; - font-size: 9pt; -} - diff --git a/templates/blue/info.txt b/templates/blue/info.txt deleted file mode 100644 index fe794c35..00000000 --- a/templates/blue/info.txt +++ /dev/null @@ -1,3 +0,0 @@ -Name: blue -Author: Sebastian Bergmann -Date: 16/02/2004 diff --git a/templates/blue/preview.png b/templates/blue/preview.png deleted file mode 100644 index fa4c475f..00000000 Binary files a/templates/blue/preview.png and /dev/null differ diff --git a/templates/blue/preview_fullsize.jpg b/templates/blue/preview_fullsize.jpg deleted file mode 100644 index 3d78bd9e..00000000 Binary files a/templates/blue/preview_fullsize.jpg and /dev/null differ diff --git a/templates/blue/style.css b/templates/blue/style.css deleted file mode 100644 index 5fd96ed4..00000000 --- a/templates/blue/style.css +++ /dev/null @@ -1,375 +0,0 @@ -a, a:visited { - color: #993300; - text-decoration: none; -} - -a:hover { - color: #cc3300; - text-decoration: underline; -} - -body { - background-color: #f0f0f0; - color: #000000; - font-family: sans-serif; - line-height: 20px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; - margin-bottom: 0px; -} - -p, td, th, div, span { - vertical-align: top; -} - -#content { - width: auto; -} - -#mainpane { - width: 100%; -} - -#serendipity_banner { - background-color: #dddddd; - border-bottom: dashed 1px #000080; - width: 100%; -} - -a.homelink1, -a.homelink1:hover, -a.homelink1:link, -a.homelink1:visited, -#serendipity_banner h1 { - color: #666666; - font-size: x-large; - font-weight: bold; - margin-top: 0px; - padding-left: 20px; - padding-top: 5px; - text-decoration: none; -} - -a.homelink2, -a.homelink2:hover, -a.homelink2:link, -a.homelink2:visited, -#serendipity_banner h2 { - color: #aaaaaa; - font-size: large; - font-weight: bold; - padding-left: 20px; - text-decoration: none; -} - -#serendipityRightSideBar { - background-color: #f0f0f0; - border-left: 1px dashed #4068ab; - border-bottom: 1px dashed #4068ab; - padding: 20px; - vertical-align: top; -} - -#serendipityLeftSideBar { - background-color: #f0f0f0; - border-right: 1px dashed #4068ab; - border-bottom: 1px dashed #4068ab; - padding: 20px; - vertical-align: top; -} - -div.serendipitySideBarTitle { - font-size: small; - font-weight: bold; - margin-bottom: 8px; -} - -div.serendipitySideBarItem { - background-color: #e6eaee; - border: 1px dashed #d0d0d0; - font-size: x-small; - margin-bottom: 12px; - padding-left: 10px; - padding-right: 10px; - padding-bottom: 10px; -} - -.serendipity_entry { - background-color: #e6eaee; - display: block; - padding-left: 20px; - padding-right: 20px; - padding-bottom: 10px; -} - -div.serendipity_Entry_Date { - background-color: #e6eaee; - border: 1px dashed #d0d0d0; - margin: 10px; - padding: 10px; - width: auto; -} - -img.serendipity_entryIcon { - float: right; - border: 0px; -} - -.serendipity_title { - border: 1px; - color: #1a3c5a; - font-weight: bold; - margin-bottom: 8px; - margin-top: 8px; - padding-left: 20px; -} - -.serendipity_title a:link, -.serendipity_title a:visited { - border: 0; - color: #000000; - text-decoration: none; -} - -.serendipity_title a:hover { - color: #cc3300; -} - -.serendipity_date { - color: #000080; - display: block; - font-weight: bold; - text-align: right; - width: 100%; -} - -.serendipity_commentsTitle { - background-color: #f2f4f6; - border: 0px; - color: #404040; - display: block; - font-size: small; - padding-left:8px; - width: 100%; -} - -.serendipity_time { - display: block; - font-size: large; - font-weight: bold; - margin-top: 8px; -} - -td.serendipity_commentsLabel { - font-size: small; - font-weight: bold; - vertical-align: top; - width: 10%; -} - -td.serendipity_comment { - color: #404040; - font-size: small; - margin-bottom: 12px; - padding-left:8px; -} - -.serendipity_comment_source { - margin-top: 5px; -} - -.serendipity_comment { - padding-top: 1em; - overflow: auto; -} - -td.serendipityEntriesBox { - background-color: #ffffff; - padding: 10px; - margin: 10px; -} - -td.serendipity_admin { - padding: 10px; -} - -table.serendipity_calendar td { - font-size: small; - padding: 3px; -} - -table.serendipity_calendar a { - font-weight: bold; - text-decoration:none; -} - -table.serendipity_calendar a:hover { - text-decoration:underline; -} - -td.serendipity_weekDayName { - background-color: #dddddd; - font-size: small; - font-weight: bold; -} - -div.serendipityPlug, div.serendipityPlug a { - font-size: small; -} - -img.serendipityImageButton { - cursor: hand; -} - -div.serendipity_admin_title { - font-size: large; - font-weight: bold; - margin-bottom: 12px; -} - -div.serendipity_admin_list_title { - font-weight: bold; - margin-bottom: 8px; -} - -td.serendipity_admin_list_item { - border: dotted 1px #d0d0d0; -} - -div.serendipity_entryFooter { - clear: both; - color: #000000; - font-size: x-small; - padding-top: 5px; - padding-bottom: 4px; -} - - -/** Embedded images with the s9y image manager **/ -.serendipity_imageComment_center, -.serendipity_imageComment_left, -.serendipity_imageComment_right { - border: 1px solid black; - background-color: #EFEFEF; - margin: 3px; -} - -.serendipity_imageComment_center { - margin: 0px; -} - -.serendipity_imageComment_left { - float: left; -} - -.serendipity_imageComment_right { - float: right; -} - -.serendipity_imageComment_img, -.serendipity_imageComment_img img { - margin: 0px; - padding: 0px; - border: 0px; - text-align: center; -} - -.serendipity_imageComment_txt { - margin: 0px; - padding: 3px; - clear: both; - font-size: 9pt; - text-align: center; -} - -.serendipity_admin_list_item_even { - background-color: #ffffff; -} - -.serendipity_admin_list_item_uneven { - background-color: #E0E0E0; -} - -.serendipity_admin_filters { - border: 1px dashed; - background-color: #FFFFFF; - font-size: 10px; - margin-bottom: 10px; - padding: 2px; -} - -.serendipity_admin_filters_headline { - border-bottom: 1px solid; - font-weight: bold; -} - -.serendipity_admin_sortorder { - font-size: 10px; - text-align: center; -} - -.serendipity_admin_sortorder input, -.serendipity_admin_sortorder select, -.serendipity_admin_filters input, -.serendipity_admin_filters select { - font-size: 10px; -} - -.serendipity_comments { -} - -.serendipity_center { - margin-left: auto; - margin-right: auto; - text-align: center; -} - -.serendipity_msg_important { - color: red; -} - -.serendipity_msg_notice { - color: green; -} - -.serendipity_entry_author_self { -} - -.serendipity_comment_author_self { - background-color: #f2f4f6; -} - - -/*** Additional plugin styles needed for the modernized output code ***/ -/*** added by Matthias 'YellowLed' Mees ***/ - -.plainList { - list-style: none; - margin-left: 0; - padding-left: 0; -} - -.container_serendipity_authors_plugin .serendipitySideBarContent div { - margin: 5px 0; - padding-left: 0; -} - -.serendipity_history_author { font-weight: bolder; } - -.serendipity_history_intro, -.serendipity_history_info { margin-bottom: 3px; } - -.serendipity_history_body { margin-bottom: 10px; } - -.serendipity_recententries_entrylink { margin-bottom: 2px; } - -.serendipity_recententries_entrydate { margin: 0 0 4px 0; } - -.plugin_comment_body { padding: 3px 0; } - -.serendipity_shoutbox_date { margin: 5px 0 2px 0; } - -.serendipity_shoutbox_comment { padding: 3px 0; } - -/*** End Additional plugin styles ***/ diff --git a/templates/bulletproof/UTF-8/lang_bg.inc.php b/templates/bulletproof/UTF-8/lang_bg.inc.php index ce2dfa72..b4a2f8e3 100644 --- a/templates/bulletproof/UTF-8/lang_bg.inc.php +++ b/templates/bulletproof/UTF-8/lang_bg.inc.php @@ -1,6 +1,6 @@ <?php -/* $Id$ +/* Translator: Ivan Cenov (jwalker@hotmail.bg) */ diff --git a/templates/bulletproof/lang_bg.inc.php b/templates/bulletproof/lang_bg.inc.php index 8841e159..be88814d 100644 --- a/templates/bulletproof/lang_bg.inc.php +++ b/templates/bulletproof/lang_bg.inc.php @@ -1,6 +1,6 @@ <?php -/* $Id$ +/* Translator: Ivan Cenov (jwalker@hotmail.bg) */ diff --git a/templates/bulletproof/lang_sk.inc.php b/templates/bulletproof/lang_sk.inc.php index 0338be31..e3246ffd 100644 --- a/templates/bulletproof/lang_sk.inc.php +++ b/templates/bulletproof/lang_sk.inc.php @@ -1,4 +1,4 @@ -<?php # $Id$ +<?php /** * @version 1.0 diff --git a/templates/bulletproof/plugin_staticpage_related_category.tpl b/templates/bulletproof/plugin_staticpage_related_category.tpl index ef5b0de3..3adeffdb 100644 --- a/templates/bulletproof/plugin_staticpage_related_category.tpl +++ b/templates/bulletproof/plugin_staticpage_related_category.tpl @@ -45,7 +45,7 @@ {/if} <div class="staticpage_related_category_entry_list"> -{* standart - if you use it on a shared-s9y-installation you have to correct the path to staticpage-entries-listing.tpl *} +{* standard - if you use it on a shared-s9y-installation you have to correct the path to staticpage-entries-listing.tpl *} {serendipity_fetchPrintEntries category=$staticpage_related_category_id template="../../plugins/serendipity_event_staticpage/staticpage-entries-listing.tpl" limit=5 noSticky="true"} {* if you use your own static-entries.tpl in your template, take this: *} diff --git a/templates/bulletproof/preview_iframe.tpl b/templates/bulletproof/preview_iframe.tpl index 4623dae8..7a81d46a 100644 --- a/templates/bulletproof/preview_iframe.tpl +++ b/templates/bulletproof/preview_iframe.tpl @@ -8,19 +8,19 @@ <title>{$CONST.SERENDIPITY_ADMIN_SUITE}</title> <meta http-equiv="Content-Type" content="text/html; charset={$head_charset}" /> <meta name="generator" content="Serendipity v.{$serendipityVersion}" /> - <link rel="stylesheet" type="text/css" href="{serendipity_getFile file="base.css"}" /> + <link rel="stylesheet" type="text/css" href="{serendipity_getFile file="base.css" frontend=true}" /> <link rel="stylesheet" type="text/css" href="{$head_link_stylesheet}" /> {if $head_link_stylesheet_frontend} - <link rel="stylesheet" href="{$head_link_stylesheet_frontend}"> + <link rel="stylesheet" href="{$head_link_stylesheet_frontend}"> {else} <link rel="stylesheet" href="{$serendipityHTTPPath}{$serendipityRewritePrefix}serendipity.css"> {/if} <!--[if IE 6]> - <link rel="stylesheet" type="text/css" href="{serendipity_getFile file="ie6.css"}" /> + <link rel="stylesheet" type="text/css" href="{serendipity_getFile file="ie6.css" frontend=true}" /> <![endif]--> <!--[if IE 7]> - <link rel="stylesheet" type="text/css" href="{serendipity_getFile file="ie7.css"}" /> + <link rel="stylesheet" type="text/css" href="{serendipity_getFile file="ie7.css" frontend=true}" /> <![endif]--> <!-- additional colorset stylesheet --> <link rel="stylesheet" type="text/css" href="{$serendipityHTTPPath}templates/{$template}/{$template_option.colorset}_style.css" /> diff --git a/templates/bulletproof/sidebar.tpl b/templates/bulletproof/sidebar.tpl index 1f92e17f..2cba834f 100644 --- a/templates/bulletproof/sidebar.tpl +++ b/templates/bulletproof/sidebar.tpl @@ -3,7 +3,7 @@ {/if} {foreach from=$plugindata item=item} {if $item.class == "serendipity_plugin_quicksearch" and $template_option.sitenav_quicksearch == 'true' and ($template_option.sitenavpos == 'above' or $template_option.sitenavpos == 'below')} -<!-- do nothing thereby supressing quicksearch in the sidebar when enabled in --> +<!-- do nothing thereby suppressing quicksearch in the sidebar when enabled in --> <!-- navigation menu bar and ONLY when navigation bar is above or below header --> {else} <div class="serendipitySideBarItem container_{$item.class}"> diff --git a/templates/bulletproof/style.css b/templates/bulletproof/style.css index e229f909..d899d0c8 100644 --- a/templates/bulletproof/style.css +++ b/templates/bulletproof/style.css @@ -451,7 +451,7 @@ input#serendipityQuickSearchTermField { margin-left: 10px; } -/* overide serendipitySideBarItem overflow: hidden just for sidebar quicksearch livesearch_result */ +/* override serendipitySideBarItem overflow: hidden just for sidebar quicksearch livesearch_result */ .container_serendipity_quicksearch_plugin{ overflow: visible !important; } diff --git a/templates/carl_contest/admin/img/background.png b/templates/carl_contest/admin/img/background.png deleted file mode 100755 index f676c344..00000000 Binary files a/templates/carl_contest/admin/img/background.png and /dev/null differ diff --git a/templates/carl_contest/admin/img/button_background.png b/templates/carl_contest/admin/img/button_background.png deleted file mode 100644 index d48532b2..00000000 Binary files a/templates/carl_contest/admin/img/button_background.png and /dev/null differ diff --git a/templates/carl_contest/admin/img/infobar_background.png b/templates/carl_contest/admin/img/infobar_background.png deleted file mode 100644 index 09c90775..00000000 Binary files a/templates/carl_contest/admin/img/infobar_background.png and /dev/null differ diff --git a/templates/carl_contest/admin/style.css b/templates/carl_contest/admin/style.css deleted file mode 100755 index 682fdfb9..00000000 --- a/templates/carl_contest/admin/style.css +++ /dev/null @@ -1,304 +0,0 @@ -body { - font-size: 9.5pt; - margin: 0; - padding:0; - font-size: 10px; - font-family: "trebuchet ms", "bitstream vera sans", arial, sans-serif; - background-color: #f1f6fb; - direction: {LANG_DIRECTION}; } - -#serendipity_admin_page { - text-align: center; } - -h3, h2 { - } - -#serendipityAdminBodyImageSelector { - background: #FFF; } - -#serendipityAdminFrame { - text-align: left; - width: 90%; - margin: auto; - background: #FFF; - border-top: 0; - border-right:1px solid #235587; - border-left:1px solid #235587; - border-bottom:1px solid #235587; } - -#serendipityAdminBanner { - margin: auto; - width: 100%; - height: 72px; - background-image: url({TEMPLATE_PATH}img/background.png); } - -#serendipityAdminInfopane { - background: #F8F9FA url({TEMPLATE_PATH}img/infobar_background.png); - font-size: 10px; - padding: 5px; - vertical-align: middle; - text-align: right; - color: #5E5E5E; - height: 27px; } - -#serendipityAdminMainpane { - background: #FFF; } - -.serendipityAdminContent { - font-size: 9.5pt; - padding: 10px 30px 20px 30px; - width:100%; } - -#serendipityAdminBanner h1 { - color: #333; - font-size : 20px; - padding-left:15px; - padding-top: 10px; - margin: 0px; - text-decoration: none; } - -#serendipityAdminBanner h2 { - color: #fff; - font-size: 14px; - margin: 0px; - text-decoration: none; - text-transform:none; - text-align:left; - line-height:0.85em; - border:none; - padding: 0 0 0 15px; } - - -#serendipitySideBar { - width: 170px; - padding-top: 10px; } - -#serendipityAdminFooter { - padding:0; - margin:0; } - -.serendipitySideBarTitle { - padding-left: 2px; - font-weight: bold; - font-size: 0.9em; } - -.serendipitySideBarContent { - padding-left: 10px; - font-size: 0.8em; } - -.serendipitySideBarItem { - margin-bottom: 10px; } - -.serendipity_admin_title { - font-size: 2em; - margin-bottom: 5px; } - -.serendipity_admin_list_item.serendipity_admin_list_item_uneven { - border: 1px solid #294366; - background: #F8F9FA; - margin-bottom: 5px; } - -.serendipity_admin_list_item.serendipity_admin_list_item_even { - border: 1px solid #294366; - background: #F2F3F2; - margin: 0 0 5px 0; } - -.serendipityAdminMsgError { - color: #F00; - text-align: center; - font-weight: bold; - margin: 10px; } - -.serendipityAdminMsgSuccess { - color: #0B0; - text-align: center; - font-weight: bold; - margin: 10px; } - -.serendipityAdminMsgNote { - background: #FFFF9D; - border: 1px solid #F70; - padding: 3px; - text-align: center; - margin: 10px; } - -td, th { - font-size: 0.8em; } - -a:link, a:visited, a:active { - color: #235587; - text-decoration: none; } - -a:hover { - color: #5f90ba; - text-decoration: underline; } - -input, select, textarea { - background: #F8F9FA; - font-family: Verdana; - font-size: 0.9em; - border: 1px solid #294366; } - -#serendipity_iframe { - border: 1px solid #294366; - text-align: center; - margin: auto; } - -ul.serendipitySideBarMenu { - padding: 0; - margin: 0; } - -ul.serendipitySideBarMenu { - font-size: 0.85em; - list-style: none; - width:170px; - font-weight: bold; - padding-top: 0.3em; - padding-bottom: 0.3em; - padding-left: 3px; } - -.serendipitySideBarMenuHead { - line-height:0.85em; - color: #999; - margin:10px 0 4px 0; - text-transform:lowercase; - font-size:0.9em; - border-bottom: 1px solid #ddd; - padding: 10px 0 0 10px; } - -ul.serendipitySideBarMenu li { - line-height:1.1em; - font-size: 1.0em; - font-weight: normal; - padding-top: 0.3em; - padding-bottom: 0.3em; - padding-left: 5px; - list-style:none; - margin:0; } - -ul.serendipitySideBarMenu a { - text-decoration: none; - font-weight: bold; } - -ul.serendipitySideBarMenu a:hover { - text-decoration: underline; } - -.serendipityImageButton { - cursor: pointer; } - -a:link.serendipityIconLink, -a:visited.serendipityIconLink { - border: 0; - font-weight: bold; - text-decoration: none; - margin-right: 4px; } - -.serendipityIconLink a:hover { - color: #e37235; } - -.serendipityIconLink img { - margin-right: 2px; - vertical-align: bottom; - border: 0; } - -a:link.serendipityIconLinkRight, -a:visited.serendipityIconLinkRight { - border: 0; - font-weight: bold; - text-decoration: none; - margin-left: 4px; } - -.serendipityIconLinkRight img { - margin-left: 2px; - vertical-align: bottom; - border: 0; } - -a:link.serendipityPrettyButton, -a:visited.serendipityPrettyButton, -a:hover.serendipityPrettyButton { - text-decoration: none; - color: #1D2E3F; } - -.serendipityPrettyButton { - padding: 1px; - background: url({TEMPLATE_PATH}img/button_background.png) repeat-x top; - background-color: #95accc; - color: #1D2E3F; - height: 20px; - font-weight: bold; - font-size: 0.9em; - border: 1px outset #000; - margin: 2px; } - -/* Special class if the button is a <a> tag */ -a.serendipityPrettyButton { - padding: 2px 4px 2px 4px; - cursor: default; } - -.direction_ltr { - direction: ltr; } - -.direction_rtl { - direction: rtl; } - -.serendipity_pluginlist_header { - height: 30px; - background-color: white; - color: black; - vertical-align: middle; - padding: 10px 0px 5px 10px; } - -.serendipity_pluginlist_section { - margin:20px 0 20px 0; - padding:10px; - border:1px solid #c0c0c0; - background-color:#fafbfc; - color:#505050; - line-height:1.5em; } - -table#serendipity_customfields { - width: 100%; } - -table#serendipity_customfields .customfield_name { - background-color: #FAFAFA; - width: 25%; - padding-left: 5px; } - -table#serendipity_customfields .customfield_value { - background-color: #FFFFFF; - width: 75%; } - -table#serendipity_customfields .customfield_value textarea { - width: 100%; - height: 100px; } - - -.serendipityAdminContent .further_links { - float: right; - font-size: 0.8em; - border: 1px solid black; -} - -.further_links p { - text-align: center; - font-weight: bold; -} - -.further_links ul { - padding: 0px; - list-style-type: none; -} - -.further_links li { - margin: 5px; - padding: 0px; -} - -#serendipityAdminBodyImageSelectorTree .serendipityAdminContent { - width: auto; -} - -#serendipityAdminBodyImageSelector .serendipityAdminContent { - width: auto; - margin: 0px; -} diff --git a/templates/carl_contest/entries.tpl b/templates/carl_contest/entries.tpl deleted file mode 100644 index 2ce8d348..00000000 --- a/templates/carl_contest/entries.tpl +++ /dev/null @@ -1,210 +0,0 @@ -<!-- ENTRIES START --> - {serendipity_hookPlugin hook="entries_header" addData="$entry_id"} - {foreach from=$entries item="dategroup"} - {foreach from=$dategroup.entries item="entry"} - {assign var="entry" value=$entry scope="parent"} - - <div class="serendipity_Entry_Date"> - {if $dategroup.is_sticky} - <h3 class="serendipity_date">{$CONST.STICKY_POSTINGS}</h3> - {else} - <h3 class="serendipity_date">{$dategroup.date|@formatTime:DATE_FORMAT_ENTRY}</h3> - {/if} - </div> -<div class="serendipity_entry serendipity_entry_author_{$entry.author|@makeFilename} {if $entry.is_entry_owner}serendipity_entry_author_self{/if} "> - - <div class='serendipity_entryFooter'> - - {if $entry.categories} - <span class="serendipity_entryIcon"> - {foreach from=$entry.categories item="entry_category"} - {if $entry_category.category_icon} - <a href="{$entry_category.category_link}"><img class="serendipity_entryIcon" title="{$entry_category.category_name|@escape}{$entry_category.category_description|@emptyPrefix}" alt="{$entry_category.category_name|@escape}" src="{$entry_category.category_icon}" /></a> - {/if} - {/foreach} - </span> - {/if} - {if $is_single_entry} - {$CONST.POSTED_BY} <a href="{$entry.link_author}">{$entry.author}</a> - {if $entry.categories} - {$CONST.IN} {foreach from=$entry.categories item="entry_category" name="categories"}<a href="{$entry_category.category_link}"> {$entry_category.category_name|@escape}</a>{if not $smarty.foreach.categories.last}, {/if}{/foreach} - {/if} - <br /> - {else}<a href="{$entry.link}">{$entry.title|@default:$entry.body|truncate:40:" ..."}</a> {$CONST.POSTED_BY} <a href="{$entry.link_author}">{$entry.author}</a> - {if $entry.categories} - {$CONST.IN} {foreach from=$entry.categories item="entry_category" name="categories"}<a href="{$entry_category.category_link}">{$entry_category.category_name|@escape}</a>{if not $smarty.foreach.categories.last}, {/if}{/foreach} - {/if} - {if $dategroup.is_sticky} - {$CONST.ON} - {else} - {$CONST.AT} - {/if} {if $dategroup.is_sticky}{$entry.timestamp|@formatTime:DATE_FORMAT_ENTRY}{else} {$entry.timestamp|@formatTime:'%H:%M'}{/if}<br /> - {/if} - {if $entry.is_entry_owner and not $is_preview} - <br /><a href="{$entry.link_edit}">{$CONST.EDIT_ENTRY}</a> - {/if} - {if $entry.has_comments} - {if $use_popups} - <br /><a href="{$entry.link_popup_comments}" onclick="window.open(this.href, 'comments', 'width=480,height=480,scrollbars=yes'); return false;">{$entry.label_comments} ({$entry.comments})</a> - {else} - <br /><a href="{$entry.link}#comments">{$entry.label_comments} ({$entry.comments})</a> - {/if} - {/if} - - {if $entry.has_trackbacks} - {if $use_popups} - <br /><a href="{$entry.link_popup_trackbacks}" onclick="window.open(this.href, 'comments', 'width=480,height=480,scrollbars=yes'); return false;">{$entry.label_trackbacks} ({$entry.trackbacks})</a><br /> - {else} - <br /><a href="{$entry.link}#trackbacks">{$entry.label_trackbacks} ({$entry.trackbacks})</a><br /> - {/if} - {/if} - {$entry.add_footer} - </div> - - <h4 class="serendipity_title"><a href="{$entry.link}">{$entry.title|@default:$entry.body|truncate:200:" ..."}</a></h4> -<div class="serendipity_entry_body"> - {$entry.body} - {if $entry.has_extended and not $is_single_entry and not $entry.is_extended} - <span class="continue_reading"><a href="{$entry.link}#extended">{$CONST.VIEW_EXTENDED_ENTRY|@sprintf:$entry.title}</a></span></div> - {/if} - - {if $entry.is_extended} - <div class="serendipity_entry_extended"><a id="extended"></a>{$entry.extended}</div> - {/if} - - </div> - - <!-- - <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" - xmlns:dc="http://purl.org/dc/elements/1.1/"> - <rdf:Description - rdf:about="{$entry.link_rdf}" - trackback:ping="{$entry.link_trackback}" - dc:title="{$entry.title_rdf|@default:$entry.title}" - dc:identifier="{$entry.rdf_ident}" /> - </rdf:RDF> - --> - {$entry.plugin_display_dat} - - {if $is_single_entry and not $use_popups and not $is_preview} - {if $CONST.DATA_UNSUBSCRIBED} - <br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_UNSUBSCRIBED|@sprintf:$CONST.UNSUBSCRIBE_OK}</div><br /> - {/if} - - {if $CONST.DATA_TRACKBACK_DELETED} - <br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_TRACKBACK_DELETED|@sprintf:$CONST.TRACKBACK_DELETED}</div><br /> - {/if} - - {if $CONST.DATA_TRACKBACK_APPROVED} - <br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_TRACKBACK_APPROVED|@sprintf:$CONST.TRACKBACK_APPROVED}</div><br /> - {/if} - - {if $CONST.DATA_COMMENT_DELETED} - <br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_COMMENT_DELETED|@sprintf:$CONST.COMMENT_DELETED}</div><br /> - {/if} - - {if $CONST.DATA_COMMENT_APPROVED} - <br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_COMMENT_APPROVED|@sprintf:$CONST.COMMENT_APPROVED}</div><br /> - {/if} - - <div class="serendipity_comments serendipity_section_trackbacks"> - <br /> - <a id="trackbacks"></a> - <div class="serendipity_commentsTitle">{$CONST.TRACKBACKS}</div> - <div class="serendipity_center"> - <a rel="nofollow" style="font-weight: normal" href="{$entry.link_trackback}" onclick="alert('{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|@escape:html}'); return false;" title="{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|@escape}">{$CONST.TRACKBACK_SPECIFIC}</a> - </div> - <br /> - {serendipity_printTrackbacks entry=$entry.id} - </div> - {/if} - - {if $is_single_entry and not $is_preview} - <div class="serendipity_comments serendipity_section_comments"> - <br /> - <a id="comments"></a> - <div class="serendipity_commentsTitle">{$CONST.COMMENTS}</div> - <div class="serendipity_center">{$CONST.DISPLAY_COMMENTS_AS} - {if $entry.viewmode eq $CONST.VIEWMODE_LINEAR} - ({$CONST.COMMENTS_VIEWMODE_LINEAR} | <a rel="nofollow" href="{$entry.link_viewmode_threaded}#comments">{$CONST.COMMENTS_VIEWMODE_THREADED}</a>) - {else} - (<a rel="nofollow" href="{$entry.link_viewmode_linear}#comments">{$CONST.COMMENTS_VIEWMODE_LINEAR}</a> | {$CONST.COMMENTS_VIEWMODE_THREADED}) - {/if} - </div> - <br /> - {serendipity_printComments entry=$entry.id mode=$entry.viewmode} - - {if $entry.is_entry_owner} - {if $entry.allow_comments} - <div class="serendipity_center">(<a href="{$entry.link_deny_comments}">{$CONST.COMMENTS_DISABLE}</a>)</div> - {else} - <div class="serendipity_center">(<a href="{$entry.link_allow_comments}">{$CONST.COMMENTS_ENABLE}</a>)</div> - {/if} - {/if} - <a id="feedback"></a> - - {foreach from=$comments_messagestack item="message"} - <div class="serendipity_center serendipity_msg_important">{$message}</div> - {/foreach} - - {if $is_comment_moderate} - <br /> - <div class="serendipity_center serendipity_msg_notice">{$CONST.COMMENT_ADDED}<br />{$CONST.THIS_COMMENT_NEEDS_REVIEW}</div> - {elseif $is_comment_added} - <br /> - <div class="serendipity_center serendipity_msg_notice">{$CONST.COMMENT_ADDED}</div> - {elseif not $entry.allow_comments} - - <br /> - <div class="serendipity_center serendipity_msg_important">{$CONST.COMMENTS_CLOSED}</div> - - {else} - - <br /> - <div class="serendipity_section_commentform"> - <div class="serendipity_commentsTitle">{$CONST.ADD_COMMENT}</div> - {$COMMENTFORM} - </div> - - {/if} - </div> - {/if} - - {$entry.backend_preview} - {/foreach} - </div> - {foreachelse} - {if not $plugin_clean_page} - <h3 class="serendipity_date">{$CONST.ADMIN_FRONTPAGE}</h3> - <div class="serendipity_overview_noentries">{$CONST.NO_ENTRIES_TO_PRINT}</div> - {/if} - {/foreach} - - <div class='serendipity_pageFooter' style="text-align: center"> - {if $footer_info} - {if $footer_prev_page} - <a href="{$footer_prev_page}">« {$CONST.PREVIOUS_PAGE}</a>   - {else} - <span class="grey">« {$CONST.PREVIOUS_PAGE}</span>   - {/if} - {else} - {/if} - - {if $footer_info} - ({$footer_info}) - {/if} - - {if $footer_info} - {if $footer_next_page} -   <a href="{$footer_next_page}">{$CONST.NEXT_PAGE} »</a> - {else} -   <span class="grey">{$CONST.NEXT_PAGE} »</span> - {/if} - {else} - {/if} - - <br />{if not $startpage}<a href="{$serendipityBaseURL}">{$CONST.ADMIN_FRONTPAGE}</a>{/if}{if not $footer_info} - <a href="#topofpage">{$CONST.TOP_LEVEL}</a>{/if} - {serendipity_hookPlugin hook="entries_footer"} - </div> -<!-- ENTRIES END --> diff --git a/templates/carl_contest/entries_summary.tpl b/templates/carl_contest/entries_summary.tpl deleted file mode 100644 index 949a6647..00000000 --- a/templates/carl_contest/entries_summary.tpl +++ /dev/null @@ -1,13 +0,0 @@ -{serendipity_hookPlugin hook="entries_header"} -<div class='serendipity_date'>{$CONST.TOPICS_OF} {$dateRange.0|@formatTime:"%B, %Y"}</div> - -<div class="serendipity_entry"> - {foreach from=$entries item="sentries"} - {foreach from=$sentries.entries item="entry"} - <div class="archive_summary"><h4 class="archive_summary_title">{$entry.id} - <a href="{$entry.link}">{$entry.title|truncate:80:" ..."}</a></h4> -{$entry.timestamp|@formatTime:DATE_FORMAT_ENTRY}. {$CONST.POSTED_BY} <a href="{$entry.link_author}">{$entry.author}</a> {if $entry.categories} {$CONST.IN} {foreach from=$entry.categories item="entry_category" name="categories"}<a href="{$entry_category.category_link}">{$entry_category.category_name|@escape}</a>{/foreach}{/if}</div> - {/foreach} - {/foreach} - -<div class='serendipity_pageFooter' style="text-align: center"> -{serendipity_hookPlugin hook="entries_footer"}</div> diff --git a/templates/carl_contest/img/back.gif b/templates/carl_contest/img/back.gif deleted file mode 100755 index d207d212..00000000 Binary files a/templates/carl_contest/img/back.gif and /dev/null differ diff --git a/templates/carl_contest/img/background.png b/templates/carl_contest/img/background.png deleted file mode 100755 index f676c344..00000000 Binary files a/templates/carl_contest/img/background.png and /dev/null differ diff --git a/templates/carl_contest/img/background_alternate.png b/templates/carl_contest/img/background_alternate.png deleted file mode 100755 index 07da89e0..00000000 Binary files a/templates/carl_contest/img/background_alternate.png and /dev/null differ diff --git a/templates/carl_contest/img/forward.gif b/templates/carl_contest/img/forward.gif deleted file mode 100755 index 2a85cb20..00000000 Binary files a/templates/carl_contest/img/forward.gif and /dev/null differ diff --git a/templates/carl_contest/img/graph_bar_horisontal.png b/templates/carl_contest/img/graph_bar_horisontal.png deleted file mode 100755 index 82102f7b..00000000 Binary files a/templates/carl_contest/img/graph_bar_horisontal.png and /dev/null differ diff --git a/templates/carl_contest/img/info_header_text_tile.gif b/templates/carl_contest/img/info_header_text_tile.gif deleted file mode 100755 index 3054f1a1..00000000 Binary files a/templates/carl_contest/img/info_header_text_tile.gif and /dev/null differ diff --git a/templates/carl_contest/img/link_blue.gif b/templates/carl_contest/img/link_blue.gif deleted file mode 100755 index 102ddc3f..00000000 Binary files a/templates/carl_contest/img/link_blue.gif and /dev/null differ diff --git a/templates/carl_contest/img/link_ltblue.gif b/templates/carl_contest/img/link_ltblue.gif deleted file mode 100755 index 41145615..00000000 Binary files a/templates/carl_contest/img/link_ltblue.gif and /dev/null differ diff --git a/templates/carl_contest/img/link_orange.gif b/templates/carl_contest/img/link_orange.gif deleted file mode 100755 index 1265914e..00000000 Binary files a/templates/carl_contest/img/link_orange.gif and /dev/null differ diff --git a/templates/carl_contest/img/xml.gif b/templates/carl_contest/img/xml.gif deleted file mode 100755 index 8f7eb6a4..00000000 Binary files a/templates/carl_contest/img/xml.gif and /dev/null differ diff --git a/templates/carl_contest/index.tpl b/templates/carl_contest/index.tpl deleted file mode 100755 index 67c05c7a..00000000 --- a/templates/carl_contest/index.tpl +++ /dev/null @@ -1,69 +0,0 @@ -{if $is_embedded != true} -{if $is_xhtml} -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -{else} -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/html4/loose.dtd"> -{/if} - -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$lang}" lang="{$lang}"> -<head> - <title>{$head_title|@default:$blogTitle} {if $head_subtitle} - {$head_subtitle}{/if}</title> - <meta http-equiv="Content-Type" content="text/html; charset={$head_charset}" /> - <meta name="generator" content="Serendipity v.{$serendipityVersion}" /> -{if ($view == "entry" || $view == "start" || $view == "feed" || $view == "plugin" || $staticpage_pagetitle != "" || $robots_index == 'index')} - <meta name="robots" content="index,follow" /> -{else} - <meta name="robots" content="noindex,follow" /> -{/if} -{if ($view == "entry")} - <link rel="canonical" href="{$entry.rdf_ident}" /> -{/if} -{if ($view == "start")} - <link rel="canonical" href="{$serendipityBaseURL}" /> -{/if} - <link rel="stylesheet" type="text/css" href="{$head_link_stylesheet}" /> - <link rel="alternate" type="application/rss+xml" title="{$blogTitle} RSS feed" href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/index.rss2" /> - <link rel="alternate" type="application/x.atom+xml" title="{$blogTitle} Atom feed" href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/atom.xml" /> -{if $entry_id} - <link rel="pingback" href="{$serendipityBaseURL}comment.php?type=pingback&entry_id={$entry_id}" /> -{/if} - -{serendipity_hookPlugin hook="frontend_header"} -</head> - -<body> -{else} -{serendipity_hookPlugin hook="frontend_header"} -{/if} - -{if $is_raw_mode != true} -<div id="wrap"> -<div id="serendipity_banner"><a id="topofpage"></a> - <h1><a class="homelink1" href="{$serendipityBaseURL}">{$head_title|@default:$blogTitle|truncate:80:" ..."}</a></h1> - <h2><a class="homelink2" href="{$serendipityBaseURL}">{$head_subtitle|@default:$blogDescription}</a></h2> -</div> - -<table id="mainpane"> - <tr> -{if $leftSidebarElements > 0} - <td id="serendipityLeftSideBar" valign="top">{serendipity_printSidebar side="left"}</td> -{/if} - <td id="content" valign="top">{$CONTENT}</td> -{if $rightSidebarElements > 0} - <td id="serendipityRightSideBar" valign="top">{serendipity_printSidebar side="right"}</td> -{/if} - </tr> -</table> -{/if} -{$raw_data} -{serendipity_hookPlugin hook="frontend_footer"} -{if $is_embedded != true} -<div id="footer"> - <p>{$CONST.POWERED_BY} <a href="http://www.s9y.org">s9y</a> - Design by <a href="http://www.carlgalloway.com">Carl</a></p> -</div> -</div> -</body> -</html> -{/if} diff --git a/templates/carl_contest/info.txt b/templates/carl_contest/info.txt deleted file mode 100755 index 42270afe..00000000 --- a/templates/carl_contest/info.txt +++ /dev/null @@ -1,3 +0,0 @@ -Name: Serendipity v3.0 -Author: Carl Galloway -Date: 26-01-2006 diff --git a/templates/carl_contest/plugin_calendar.tpl b/templates/carl_contest/plugin_calendar.tpl deleted file mode 100755 index 39d3a8f5..00000000 --- a/templates/carl_contest/plugin_calendar.tpl +++ /dev/null @@ -1,33 +0,0 @@ -<table style="width: 100%" cellspacing="0" cellpadding="0" class="serendipity_calendar"> - <tr> - <td class="serendipity_calendarHeader"> -{if $plugin_calendar_head.minScroll le $plugin_calendar_head.month_date} - <a title="{$CONST.BACK}" href="{$plugin_calendar_head.uri_previous}"><img alt="{$CONST.BACK}" src="{serendipity_getFile file="img/back.gif"}" width="16" height="12" style="border: 0px" /></a> -{/if} - </td> - - <td colspan="5" class="serendipity_calendarHeader" style="text-align: center; vertical-align: bottom"> - <b><a style="white-space: nowrap" href="{$plugin_calendar_head.uri_month}">{$plugin_calendar_head.month_date|formatTime:"%B '%y":false}</a></b> - </td> - - <td class="serendipity_calendarHeader" style="text-align: right"> -{if $plugin_calendar_head.maxScroll ge $plugin_calendar_head.month_date} - <a title="{$CONST.FORWARD}" href="{$plugin_calendar_head.uri_next}"><img alt="{$CONST.FORWARD}" src="{serendipity_getFile file="img/forward.gif"}" width="16" height="12" style="border: 0px" /></a> -{/if} - </td> - </tr> - - <tr> - {foreach from=$plugin_calendar_dow item="dow"} - <td scope="col" abbr="{$dow.date|@formatTime:"%A":false}" title="{$dow.date|@formatTime:"%A":false}" class="serendipity_weekDayName" align="center">{$dow.date|@formatTime:"%a":false}</td> - {/foreach} - </tr> - - {foreach from=$plugin_calendar_weeks item="week"} - <tr class="serendipity_calendar {cycle values="row1, row2, row3, row4, row5, row6"}"> - {foreach from=$week.days item="day"} - <td class="serendipity_calendarDay {$day.classes}"{if isset($day.properties.Title)} title="{$day.properties.Title}"{/if}>{if isset($day.properties.Active) and $day.properties.Active}<a href="{$day.properties.Link}">{/if}{$day.name|@default:" "}{if isset($day.properties.Active) and $day.properties.Active}</a>{/if}</td> - {/foreach} - </tr> - {/foreach} -</table> diff --git a/templates/carl_contest/preview.png b/templates/carl_contest/preview.png deleted file mode 100755 index d4b7429d..00000000 Binary files a/templates/carl_contest/preview.png and /dev/null differ diff --git a/templates/carl_contest/preview_fullsize.jpg b/templates/carl_contest/preview_fullsize.jpg deleted file mode 100644 index 559dae03..00000000 Binary files a/templates/carl_contest/preview_fullsize.jpg and /dev/null differ diff --git a/templates/carl_contest/screenshot.png b/templates/carl_contest/screenshot.png deleted file mode 100755 index ed28646b..00000000 Binary files a/templates/carl_contest/screenshot.png and /dev/null differ diff --git a/templates/carl_contest/style.css b/templates/carl_contest/style.css deleted file mode 100644 index 1dcddcfb..00000000 --- a/templates/carl_contest/style.css +++ /dev/null @@ -1,675 +0,0 @@ -/******************************************************/ -/* Theme by Carl Galloway */ -/* http://www.carlgalloway.com */ -/* This is a structured and commented version */ -/* of the serendipity blog default theme. */ -/* */ -/* Styles have been organised into the following */ -/* groups; general, header, footer, entry, comments */ -/* commentform, sidebar, calendar, image media, and */ -/* plugins. */ -/* */ -/* My comments are inside the /* */, these can */ -/* safely be deleted if you do not require them. */ -/******************************************************/ - - - - -/********* General Styles *********/ - - /* used in entry/sidebar titles */ -h4, h3 { - margin: 0; } - -/* the input boxes used in forms */ -input, textarea, select { - font-size: 10pt; } - -/* all table headers and rows */ -th, td { - font-size: 10pt; } - -/* style for lists */ -li { - list-style-position: inside; } - -/* style for blockquotes inserted into posts */ -blockquote { - margin: 15px 30px 0 15px; - padding-left: 15px; - border-left: 4px solid #2a5a8a; } - -/* all links are blue with no underline */ -a:link, a:visited, a:active { - color: #235587; - text-decoration: none; } - -/* change link color to dark blue and underline when hovered over */ -a:hover { - color: #5f90ba; - text-decoration: underline; } - -/* used when s9y needs to center something */ -.serendipity_center { - margin-left: auto; - margin-right: auto; - text-align: center; } - -/* warning messages from s9y */ -.serendipity_msg_important { - color: red; } - -/* messages letting you know something has happened eg comment saved */ -.serendipity_msg_notice { - color: green; } - -/* style to temporarily change something to grey */ -.grey { - color:#999; } - -/********* End of General Styles *********/ - - - - -/********* Structural Styles *********/ - -/* preset styles for entire blog unless overruled elsewhere, page footer is here as well */ -body { - direction: {LANG_DIRECTION}; - font-size: 0.9em; - background-color: #f1f6fb; - margin: 0; - padding:0; - font-family: "trebuchet ms", "bitstream vera sans", arial, sans-serif; } - -/* wrapper for page */ -#wrap { - width:90%; - margin:0 auto; } - -/* container for banner */ -#serendipity_banner { - margin: auto; - width: 100%; - height: 72px; - background-image: url({TEMPLATE_PATH}img/background.png); } - -/* container for content and sidebar */ -#mainpane { - border-right:1px solid #235587; - border-left:1px solid #235587; - border-bottom:1px solid #235587; - margin: 0 auto; - width: 100%; - border-top: 0px; - background-color: #FFFFFF; } - -/* container for entries column */ -#content { - padding: 0 10px 10px 10px; - margin: 0 10px 10px 10px; - width: auto; } - -/* container for right sidebar */ -#serendipityRightSideBar { - width: 170px; - padding: 0 0 0 10px; - margin:0; - vertical-align: top; } - -/* container for left sidebar */ -#serendipityLeftSideBar { - width: 170px; - padding:0 10px 0 1px; - margin:0; - vertical-align: top; } - -/* container for page footer */ -#footer { - padding:0; - margin:0; - background-color: #ecf3fd; } - -/********* End of Structural Styles *********/ - - - - -/********* Header/Banner Styles *********/ - -/* the big link in the banner, blog name/entry title */ -a.homelink1, a.homelink1:hover, a.homelink1:link, a.homelink1:visited, #serendipity_banner h1 { - color: #fff; - font-family: Verdana, Arial, Geneva, Helvetica, sans-serif; - font-size : 20px; - padding-left:15px; - padding-top: 20px; - margin: 0px; - text-decoration: none; } - -/* the smaller link in the banner, blog description */ -a.homelink2, a.homelink2:hover, a.homelink2:link, a.homelink2:visited, #serendipity_banner h2 { - color: #fff; - padding-left: 15px; - font-size: 14px; - margin: 0px; - text-decoration: none; } - -/********* End of Header/Banner Styles *********/ - - - - -/********* Footer Styles *********/ - -/* footer paragraph text */ -#footer p { - color:#666; - text-transform:lowercase; - font-size: 9pt; - font-weight:bold; - line-height: 1.5; } - -/* make footer links blue, no underline */ -#footer a { - color:#215385; - text-decoration:none; } - -/* underline footer links when hovered over */ -#footer a:hover { - text-decoration:underline; } - -/********* End of Footer Styles *********/ - - - - - -/********* Entry Styles *********/ - -/* container for the entry/post */ -.serendipity_entry { - font-family: arial, helvetica, sans-serif; - color: #333; - font-size: 9.5pt; - font-weight: normal; - margin: 10px 0 40px 0; } - -/* container for entry title and date */ -.serendipity_Entry_Date { - clear:both; } - -/* style for the actual date below entry title */ -.serendipity_date { - text-align:right; - line-height:0.85em; - color: #999; - margin:10px 0 0 0; - text-transform:lowercase; - display:block; - font-size:.9em; - border-bottom: 1px solid #ddd; - padding: 10px 12px 0 0; } - -/* entry title */ -.serendipity_title { - font-size: medium; - font-weight: bold; - margin-top: 5px; - color: #235587; } - -/* style for the meta box title */ -.serendipity_meta_title { - font-size: small; - font-weight: bold; - margin: 0; padding:0; - color: #235587; } - -/* entry title link, regular color is black */ -.serendipity_title a:link, .serendipity_title a:visited { - text-decoration: none; - font-weight: bold; - border: 0; - background:none; - color: #235587; } - -/*entry title link when hovered over, changes to orange */ -.serendipity_title a:hover { - color: #e37235; } - -/* additional styles used for entry text */ -.serendipity_entry p { - margin-top: 0px; - padding-bottom: 0px; } - -/* style for extended body */ -.serendipity_entry_extended { - margin-top:20px; } - -/* prevent styling of the extended placeholder, otherwise the background image is visible */ -#extended { - background:none; - display:none; } - -/* the meta box that includes links to comments, trackbacks etc */ -div.serendipity_entryFooter { - margin: 0 0 10px 10px; - width:170px; - float:right; - border:1px solid #ddecfb; - background-color:#f6f8fb; - font-size: 0.8em; - color: #000000; - padding-bottom: 4px; } - -/* style for links within the page footer */ -div.serendipity_entryFooter a { - font-weight:bolder; } - -/* style for hovered over links within page footer */ -div.serendipity_entryFooter a:hover { - color: #e37235; - text-decoration:none; } - -/* styles for category icon if used */ -img.serendipity_entryIcon { - float: right; - border: 0px; - margin-top:1px; } - -/* styling the continue reading byline, needed to stop firefox making the link 100% wide */ -.continue_reading { - display:block; - margin-top:10px; - clear:left; } - -/* styling the continue reading byline link */ -.continue_reading a { - font-weight:normal; - background:none; } - -/* styling the continue reading byline when hovered over */ -.continue_reading a:hover { - color: #5f90ba; - background:none; - text-decoration: underline; } - -/* not used, but allows additional style to show author's posts in multi-author blogs */ -.serendipity_entry_author_self { - } - -/* styles for the next/previous links above footer, includes start page and archives links */ -.serendipity_pageFooter { - clear:both; - margin-top:10px; } - -/* container for summary listings in archives */ -.archive_summary { - clear:both; - margin:15px 0 0 10px; - font-size:0.9em;} - -/* style for entry title in summary archives overview */ -.archive_summary_title { - font-size: 1.0em; - font-weight: bold; - margin: 0; padding:0; } - -/********* End of Entry Styles *********/ - - - - -/********* Comment Styles *********/ - -/* container for all comments, not styled separately in default theme */ -.serendipity_comments { - } - -/* comments, trackbacks and commentform titles */ -.serendipity_commentsTitle { - font-size: medium; - font-weight: bold; - margin-top: 10px; - color: #336d9f; - clear:left; } - -/* container for individual comments */ -.serendipity_comment { - padding: 3px; } - -/* style for comment author, date commented etc */ -.serendipity_comment_source { - margin-top: 5px; - padding-left: 5px; - margin-bottom: 5px; - padding-bottom: 3px; } - -/* style for comment author if logged in */ -.serendipity_comment_author_self { - border-top:3px solid #e37235; - border-bottom:3px solid #e37235; } - -/* style for even numbered comments*/ -.comment_evenbox { - margin:0 0 20px 0; - border-top:1px solid #5f90ba; - border-bottom:1px solid #5f90ba; - background-color:#fafbfc; - color:#505050; - line-height:1.5em; } - -/* style for odd numbered comments*/ -.comment_oddbox { - margin:0 0 20px 0; - border-top:1px solid #c0c0c0; - border-bottom:1px solid #c0c0c0; - background-color:#fafbfc; - color:#505050; - line-height:1.5em; } - -/********* End of Comment Styles *********/ - - - -/********* Comment Form *********/ - -/* container style for entire comment form */ -.serendipity_commentForm { - font-size: 13px; - color: #404040; - margin-bottom: 13px; - margin-right: 10px; - margin-left: 10px; - background-color: #FFFFFF; } - -/* style for name, email etc fields in comments form */ -td.serendipity_commentsLabel { - font-size: 12px; - font-weight: bold; - vertical-align: top; } - -/* styles for input boxes in comments form */ -td.serendipity_commentsValue input, td.serendipity_commentsValue select, td.serendipity_commentsValue textarea { - font-size: 12px; - padding: 2px; } - -/********* End of Comment Form *********/ - - - - -/********* Sidebar Styles *********/ - -/* container style for individual sidebar blocks */ -div.serendipitySideBarContent { - padding-bottom: 12px; - margin-bottom: 12px; - font-size: 12px; - font-weight:normal; } - -/* style for each sidebar title */ -.serendipitySideBarTitle { - line-height:0.85em; - color: #999; - margin:10px 0 4px 0; - text-transform:lowercase; - display:block; - font-size:.9em; - border-bottom: 1px solid #ddd; - padding: 10px 0 0 12px; } - -/* style for the powered by sidebar entry */ -div.serendipityPlug img { - padding-left:5px; } - -/* style for the powered by link */ -div.serendipityPlug a { - text-decoration: none; - border: 0px; } - -/* style for input and select drop downs in sidebar */ -.serendipitySideBarContent input, .serendipitySideBarContent select { - width:150px; } - -/* style for side bar date eg recent entries plugin */ -.serendipitySideBarDate { - line-height:0.9em; } - -/********* End of Sidebar Styles *********/ - - - - -/********* Calendar Styles *********/ - -/* style for entire table in calendar plugin */ -table.serendipity_calendar { - border-bottom:1px solid #ddecfb; - border-left:1px solid #ddecfb; - border-right:1px solid #ddecfb; } - -/* container style for calendar table rows */ -table.serendipity_calendar td { - text-align:center; - padding: 3px; } - -/* style for calendar date links */ -table.serendipity_calendar a { - font-weight: bold; - text-decoration:none; } - -/* style for calendar links when hovered over */ -table.serendipity_calendar a:hover { - text-decoration: underline; } - -/* style for calender header row */ -.serendipity_calendarHeader {background:#235587; } - -/* styles for month name and arrows in calendar */ -td.serendipity_calendarHeader a:link, td.serendipity_calendarHeader a:visited, td.serendipity_calendarHeader a:hover { - border: 0; - color:#fff; - text-decoration: none; } - -/* style for calendar weekday names */ -td.serendipity_weekDayName { - font-size:95%!important; - font-size:90%; - font-weight:575; - color:#fff; - background:#5f90ba; } - -/* style for calendar day rows */ -td.serendipity_calendarDay { - color:#888; - font-size:90%; } - -/* separate style for today's date */ -td.Today {color: #444; text-decoration: overline; } - -/* styles for calendar days rows */ -.row1 {background: #ddecfb; } -.row2 {background: #e2eefb; } -.row3 {background: #e7f1fb; } -.row4 {background: #ecf3fb; } -.row5 {background: #f1f6fb; } -.row6 {background: #f6f8fb; } - -/********* End of Calendar Styles *********/ - - - - - -/********* Embedded images with the s9y image manager *********/ - -/* container for images and text */ -.serendipity_imageComment_center, .serendipity_imageComment_left, .serendipity_imageComment_right { - border: 1px solid #DDDDDD; - background-color: #EFEFEF; - margin: 3px; - padding: 3px; - text-align: center; } - -/* style to center image and text within entry */ -.serendipity_imageComment_center { - margin: auto; } - -/* style to left align image and text within entry */ -.serendipity_imageComment_left { - float: left; } - -/* style to right align image and text within entry */ -.serendipity_imageComment_right { - float: right; } - -/* styles for the images */ -.serendipity_imageComment_img, .serendipity_imageComment_img img { - margin: 0px; - padding: 0px; - border:none; - text-align: center; } - -/* styles for the text below the image if used */ -.serendipity_imageComment_txt { - border-top: 1px solid #DDDDDD; - margin: 0px; - padding: 3px; - clear: both; - font-size: 8pt; - text-align: center; } - -/********* End of Media Manager Styles *********/ - - - - - -/********* Plugin Styles *********/ - -/* container for search results, static page navigation and s9y no entries message */ -.serendipity_search, .staticpage_navigation, .serendipity_overview_noentries { - margin:10px 0 20px 0; - padding:10px; - border:1px solid #c0c0c0; - background-color:#fafbfc; - color:#505050; - line-height:1.5em; - clear:both; } - -/* style for input box for quicksearch */ -#serendipityQuickSearchTermField { - width:70%; - margin-top:10px!important; - margin:0; - padding:0; } - -/* style for the seearch term and number of results using quicksearch */ -.searchterm, .searchresults {color:#235587;font-weight:bold; } - -/* style for freetag items above entries */ -.serendipity_freetag_taglist { - margin:10px 0 20px 0; - padding:15px; - font-size: 80%; - color:#505050; - border: 1px solid #c0c0c0; - background-color: #fafbfc; - line-height:1.5em; - text-align: justify; } - -/* container for freetag plugin in entry footer */ -.serendipity_freeTag { - margin-top:10px;} - -/* style for the rss feed image in freetag plugin */ -img.serendipity_freeTag_xmlButton { - border:none; - padding-left:2px; } - -/* container for karma vote plugin */ -.serendipity_karmaVoting { - margin-top: 10px; } - -/* allows additional styling for top exits text in karma plugin */ -.serendipity_karmaVoting_exits { - } - -/* style for number of top exits in karma plugin */ -.serendipity_karmaVoting_exits_num { - } - -/* style for karma plugin 'Karma for this article:' and vote links */ -.serendipity_karmaVoting_text {} - -/* style for vote links in karma plugin */ -.serendipity_karmaVoting_links { - display:block; - clear:left; } - -/* style for karma plugin text and vote line */ -.serendipity_karmaVoting_current, .serendipity_karmaVoting_visits {} - -/* style for the separator '|' in the karma plugin top exits */ -.serendipity_karmaVoting_exits_sep, .serendipity_karmaVoting br { - display:none; } - -/* container for comments plugin within sidebar */ -.container_serendipity_plugin_comments { - color:#333; } - -/* style for line break in comments plugin */ -.container_serendipity_plugin_comments br { - line-height:0.5em; } - -/* container for individual comment within sidebar */ -.plugin_comment_wrap { - display:block; - margin:15px 0 0 0; - border-top:1px solid #ddecfb; - border-bottom:1px solid #ddecfb; - background-color:#fafbfc; - color:#505050; } - -/* style for comment body within sidebar */ -.plugin_comment_body { - font-style:oblique; } - -/********* End Plugin Styles *********/ - - -/*** Additional plugin styles needed for the modernized output code ***/ -/*** added by Matthias 'YellowLed' Mees ***/ - -.plainList { - list-style: none; - margin-left: 0; - padding-left: 12px; -} - -.container_serendipity_authors_plugin .serendipitySideBarContent div { - margin: 5px 0; - padding-left: 12px; -} - -.serendipity_history_author { font-weight: bolder; } - -.serendipity_history_intro, -.serendipity_history_info { margin-bottom: 3px; } - -.serendipity_history_body { margin-bottom: 10px; } - -.serendipity_recententries_entrylink { margin-bottom: 2px; } - -.serendipity_recententries_entrydate { margin: 0 0 4px 0; } - -.plugin_comment_body { padding: 3px 0; } - -.serendipity_shoutbox_date { margin: 5px 0 2px 0; } - -.serendipity_shoutbox_comment { padding: 3px 0; } - -/*** End Additional plugin styles ***/ diff --git a/templates/clean-blog/UTF-8/lang_de.inc.php b/templates/clean-blog/UTF-8/lang_de.inc.php index a24ada38..254805a6 100644 --- a/templates/clean-blog/UTF-8/lang_de.inc.php +++ b/templates/clean-blog/UTF-8/lang_de.inc.php @@ -21,6 +21,7 @@ @define('THEME_CUSTOM_FIELD_DEFINITION','Diese optionalen Felder sind nur verfügbar, wenn dieses Theme (clean blog) verwendet wird. Das Ereignis-Plugin serendipity_event_entryproperties (Erweiterte Eigenschaften für Einträge) muss installiert sein, um diese Felder zu verwenden. Der Eintrags-Untertitel wird unter dem Titel des Eintrags ausgegeben und sollte eine kurze Zusammenfassung des Eintrags enthalten. Das Header-Bild eines Eintrags überschreibt das Standard-Header-Bild für Einträge.'); @define('THEME_ENTRY_SUBTITLE','Untertitel des Eintrags'); @define('THEME_ENTRY_HEADER_IMAGE','Header-Bild der Eintrags'); +@define('THEME_DEMO_AVAILBLE', 'Eine komplette englische Anleitung zur <a href="http://www.optional-necessity.com/demo/cleanblog/archives/8-Using-the-Clean-Blog-theme.html">Konfiguration und Benutzung von Clean Blog</a> findet sich in der <a href="http://www.optional-necessity.com/demo/cleanblog/">Clean Blog-Demo</a>.'); // Header Images @define('DEFAULT_HEADER_IMAGE', 'Standard-Header-Bild'); diff --git a/templates/clean-blog/archive_categories.tpl b/templates/clean-blog/archive_categories.tpl index be7337e8..0f805f6b 100644 --- a/templates/clean-blog/archive_categories.tpl +++ b/templates/clean-blog/archive_categories.tpl @@ -29,4 +29,6 @@ {assign var="prevdepth" value=$plugin_category.catdepth} {/foreach} </ul> +{else} + <p class="alert alert-danger alert-error"><span class="fa-stack" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-exclamation fa-stack-1x"></i></span> {$CONST.CATEGORIES_ON_ARCHIVE_DESC}</p> {/if} \ No newline at end of file diff --git a/templates/clean-blog/archive_freetag.tpl b/templates/clean-blog/archive_freetag.tpl index 4db40923..8901c2b9 100644 --- a/templates/clean-blog/archive_freetag.tpl +++ b/templates/clean-blog/archive_freetag.tpl @@ -1,6 +1,10 @@ -<h2>{$CONST.EDITOR_TAGS}</h2> -<div class="clean-blog_freeTag"> -{foreach from=$tags key="tag_name" item="plugin_tags" name="each_tag"} - <a href="{$plugin_tags.href}">{$tag_name}</a>{if !$smarty.foreach.each_tag.last}{/if} -{/foreach} -</div> \ No newline at end of file +{if $tags} + <h2>{$CONST.EDITOR_TAGS}</h2> + <div class="clean-blog_freeTag"> + {foreach from=$tags key="tag_name" item="plugin_tags" name="each_tag"} + <a href="{$plugin_tags.href}">{$tag_name}</a>{if !$smarty.foreach.each_tag.last}{/if} + {/foreach} + </div> +{else} + <p class="alert alert-danger alert-error"><span class="fa-stack" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-exclamation fa-stack-1x"></i></span>{$CONST.TAGS_ON_ARCHIVE_DESC}</p> +{/if} \ No newline at end of file diff --git a/templates/clean-blog/backend_templates/default_staticpage_backend.tpl b/templates/clean-blog/backend_templates/default_staticpage_backend.tpl index d57bc753..b63c80e8 100644 --- a/templates/clean-blog/backend_templates/default_staticpage_backend.tpl +++ b/templates/clean-blog/backend_templates/default_staticpage_backend.tpl @@ -129,24 +129,6 @@ </div> </div> <div class="clearfix"> -{* CUSTOM TO THIS THEME - OPTION TO SHOW/HIDE AUTHOR NAME *} - <div class="entryproperties_access_groups adv_opts_box form_select"> - <label class="sp_label" title="{$CONST.STATIC_SHOW_AUTHOR_TITLE}">{$CONST.STATIC_SHOW_AUTHOR_TEXT}</label><br /> - <input id="author_yes" type="radio" name="serendipity[plugin][custom][show_author]" {if $form_values.custom.show_author == 'true'}checked="checked"{/if}value="true" /> - <label for="author_yes">{$CONST.YES}</label> - <input id="author_no" type="radio" name="serendipity[plugin][custom][show_author]" {if $form_values.custom.show_author != 'true'}checked="checked"{/if} value="false" /> - <label for="author_no">{$CONST.NO}</label> - </div> -{* CUSTOM TO THIS THEME - OPTION TO SHOW/HIDE DATE *} - <div class="entryproperties_access_groups adv_opts_box form_select"> - <label class="sp_label" title="{$CONST.STATIC_SHOW_DATE_TITLE}">{$CONST.STATIC_SHOW_DATE_TEXT}</label><br /> - <input id="date_yes" type="radio" name="serendipity[plugin][custom][show_date]" {if $form_values.custom.show_date == 'true'}checked="checked"{/if}value="true" /> - <label for="date_yes">{$CONST.YES}</label> - <input id="date_no" type="radio" name="serendipity[plugin][custom][show_date]" {if $form_values.custom.show_date != 'true'}checked="checked"{/if}value="false" /> - <label for="date_no">{$CONST.NO}</label> - </div> - </div> - <div class="clearfix"> <div class="entryoptions_customfields adv_opts_box"> <label class="sp_label" title="{staticpage_input item="pre_content" what="desc"|escape:js}">{staticpage_input item="pre_content" what="name"|escape:js}</label><br /> {staticpage_input item="pre_content"} @@ -212,6 +194,24 @@ {staticpage_input item="articleformat"} </div> </div> +{* CUSTOM TO THIS THEME - OPTION TO SHOW/HIDE AUTHOR NAME *} + <div class="clearfix"> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{$CONST.STATIC_SHOW_AUTHOR_TITLE}">{$CONST.STATIC_SHOW_AUTHOR_TEXT}</label><br /> + <input id="author_yes" type="radio" name="serendipity[plugin][custom][show_author]" {if $form_values.custom.show_author == 'true'}checked="checked"{/if}value="true" /> + <label for="author_yes">{$CONST.YES}</label> + <input id="author_no" type="radio" name="serendipity[plugin][custom][show_author]" {if $form_values.custom.show_author != 'true'}checked="checked"{/if} value="false" /> + <label for="author_no">{$CONST.NO}</label> + </div> +{* CUSTOM TO THIS THEME - OPTION TO SHOW/HIDE DATE *} + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{$CONST.STATIC_SHOW_DATE_TITLE}">{$CONST.STATIC_SHOW_DATE_TEXT}</label><br /> + <input id="date_yes" type="radio" name="serendipity[plugin][custom][show_date]" {if $form_values.custom.show_date == 'true'}checked="checked"{/if}value="true" /> + <label for="date_yes">{$CONST.YES}</label> + <input id="date_no" type="radio" name="serendipity[plugin][custom][show_date]" {if $form_values.custom.show_date != 'true'}checked="checked"{/if}value="false" /> + <label for="date_no">{$CONST.NO}</label> + </div> + </div> </section> diff --git a/templates/clean-blog/config.inc.php b/templates/clean-blog/config.inc.php index db791210..73c174e0 100644 --- a/templates/clean-blog/config.inc.php +++ b/templates/clean-blog/config.inc.php @@ -70,7 +70,7 @@ $template_config = array( array( 'var' => 'theme_instructions', 'type' => 'content', - 'default' => $ep_msg . THEME_INSTRUCTIONS . '<p>' . CATEGORIES_ON_ARCHIVE_DESC . '</p><p>' . TAGS_ON_ARCHIVE_DESC . '<p>', + 'default' => '<p>' . THEME_DEMO_AVAILABLE . '</p>' . $ep_msg . THEME_INSTRUCTIONS . '<p>' . CATEGORIES_ON_ARCHIVE_DESC . '</p><p>' . TAGS_ON_ARCHIVE_DESC . '</p>', ), array( 'var' => 'default_header_image', diff --git a/templates/clean-blog/index.tpl b/templates/clean-blog/index.tpl index 1b4553a4..59591361 100644 --- a/templates/clean-blog/index.tpl +++ b/templates/clean-blog/index.tpl @@ -20,7 +20,7 @@ <link rel="canonical" href="{$serendipityBaseURL}"> {/if} {* BOOTSTRAP CORE CSS *} - <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"> + <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"> {* S9Y CSS *} <link rel="stylesheet" href="{$head_link_stylesheet}"> <link rel="alternate" type="application/rss+xml" title="{$blogTitle} RSS feed" href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/index.rss2"> @@ -29,8 +29,8 @@ <link rel="pingback" href="{$serendipityBaseURL}comment.php?type=pingback&entry_id={$entry_id}"> {/if} {* CUSTOM FONTS *} - <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> - <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,600,800|Lora:400,400italic' rel='stylesheet' type='text/css'> + <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:300,600,800|Lora:400,400italic' rel='stylesheet' type='text/css'> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> @@ -231,4 +231,4 @@ {if $is_embedded != true} </body> </html> -{/if} \ No newline at end of file +{/if} diff --git a/templates/clean-blog/info.txt b/templates/clean-blog/info.txt index a0b0c2b0..4c8d7ba1 100644 --- a/templates/clean-blog/info.txt +++ b/templates/clean-blog/info.txt @@ -1,5 +1,6 @@ Name: Clean Blog Author: s9y theme by Don Chambers. Original bootstrap theme by Iron Summit Media Strategies, LLC. -Date: 2015-06-18 +Date: 2016-02-02 Require Serendipity: 2.0 -Backend: No \ No newline at end of file +Backend: No +Recommended: Yes \ No newline at end of file diff --git a/templates/clean-blog/lang_de.inc.php b/templates/clean-blog/lang_de.inc.php index aabf508b..03daf334 100644 --- a/templates/clean-blog/lang_de.inc.php +++ b/templates/clean-blog/lang_de.inc.php @@ -21,6 +21,7 @@ @define('THEME_CUSTOM_FIELD_DEFINITION','Diese optionalen Felder sind nur verf�gbar, wenn dieses Theme (clean blog) verwendet wird. Das Ereignis-Plugin serendipity_event_entryproperties (Erweiterte Eigenschaften f�r Eintr�ge) muss installiert sein, um diese Felder zu verwenden. Der Eintrags-Untertitel wird unter dem Titel des Eintrags ausgegeben und sollte eine kurze Zusammenfassung des Eintrags enthalten. Das Header-Bild eines Eintrags �berschreibt das Standard-Header-Bild f�r Eintr�ge.'); @define('THEME_ENTRY_SUBTITLE','Untertitel des Eintrags'); @define('THEME_ENTRY_HEADER_IMAGE','Header-Bild der Eintrags'); +@define('THEME_DEMO_AVAILBLE', 'Eine komplette englische Anleitung zur <a href="http://www.optional-necessity.com/demo/cleanblog/archives/8-Using-the-Clean-Blog-theme.html">Konfiguration und Benutzung von Clean Blog</a> findet sich in der <a href="http://www.optional-necessity.com/demo/cleanblog/">Clean Blog-Demo</a>.'); // Header Images @define('DEFAULT_HEADER_IMAGE', 'Standard-Header-Bild'); diff --git a/templates/clean-blog/lang_en.inc.php b/templates/clean-blog/lang_en.inc.php index 87fa89df..3be64435 100644 --- a/templates/clean-blog/lang_en.inc.php +++ b/templates/clean-blog/lang_en.inc.php @@ -21,6 +21,8 @@ @define('THEME_CUSTOM_FIELD_DEFINITION','These optional fields are only available when using this theme (clean blog). The event plugin serendipity_event_entryproperties (extended properties for entries) must also be installed to use these fields. The Entry Subtitle field is displayed below the entry title and should be a brief post summary. The entry header image field will overide the default entry header image for this specific entry.'); @define('THEME_ENTRY_SUBTITLE','Entry Subtitle'); @define('THEME_ENTRY_HEADER_IMAGE','Entry Header Image'); +@define('THEME_DEMO_AVAILABLE', 'A complete English explanation of <a href="http://www.optional-necessity.com/demo/cleanblog/archives/8-Using-the-Clean-Blog-theme.html">configuring and using Clean Blog</a> can be found on the <a href="http://www.optional-necessity.com/demo/cleanblog/">Clean Blog demo</a>.'); + // Header Images @define('DEFAULT_HEADER_IMAGE', 'Default header image'); diff --git a/templates/clean-blog/plugin_staticpage.tpl b/templates/clean-blog/plugin_staticpage.tpl index 80d8b4ce..4a779756 100644 --- a/templates/clean-blog/plugin_staticpage.tpl +++ b/templates/clean-blog/plugin_staticpage.tpl @@ -43,20 +43,12 @@ {/if} {if $staticpage_navigation AND $staticpage_shownavi} <nav role="navigation"> - <ul class="pager"> - {if $footer_prev_page}<li class="previous"><a href="{$footer_prev_page}">← {$CONST.PREVIOUS_PAGE}</a></li>{/if} - {if $footer_next_page}<li class="next"><a href="{$footer_next_page}">{$CONST.NEXT_PAGE} →</a></li>{/if} + <ul class="pager staticpage_navigation"> + {if $staticpage_navigation.prev.link}<li class="previous"><a href="{$staticpage_navigation.prev.link}" title="prev"><i class="fa fa-arrow-left" aria-hidden="true"></i> {$staticpage_navigation.prev.name|@escape}</a></li>{/if} + {if $staticpage_navigation.next.link}<li class="next"><a href="{$staticpage_navigation.next.link}" title="next">{$staticpage_navigation.next.name|@escape} <i class="fa fa-arrow-right" aria-hidden="true"></i></a></li>{/if} </ul> </nav> - {/if} - {if $staticpage_navigation AND $staticpage_shownavi} - <nav role="navigation"> - <ul class="pager staticpage_navigation"> - {if $staticpage_navigation.prev.link}<li class="previous"><a href="{$staticpage_navigation.prev.link}" title="prev"><i class="fa fa-arrow-left" aria-hidden="true"></i> {$staticpage_navigation.prev.name|@escape}</a></li>{/if} - {if $staticpage_navigation.next.link}<li class="next"><a href="{$staticpage_navigation.next.link}" title="next">{$staticpage_navigation.next.name|@escape} <i class="fa fa-arrow-right" aria-hidden="true"></i></a></li>{/if} - </ul> - </nav> - {/if} + {/if} {if $staticpage_custom.show_author =='true' || $staticpage_custom.show_date =='true' || ($staticpage_adminlink && $staticpage_adminlink.page_user)} <footer class="staticpage-footer"> <p class="post-meta"> diff --git a/templates/clean-blog/plugin_staticpage_aboutpage.tpl b/templates/clean-blog/plugin_staticpage_aboutpage.tpl index 04855786..e82fe655 100644 --- a/templates/clean-blog/plugin_staticpage_aboutpage.tpl +++ b/templates/clean-blog/plugin_staticpage_aboutpage.tpl @@ -5,7 +5,7 @@ <div class="staticpage_breadcrumbs"> <a href="{$serendipityBaseURL}" title="{$CONST.HOMEPAGE}">{$template_option.home_link_text}</a> {foreach name="crumbs" from=$staticpage_navigation.crumbs item="crumb"} - » {if !$smarty.foreach.crumbs.last}<a href="{$crumb.link}">{/if}{$crumb.name|@escape}</a> + / {if !$smarty.foreach.crumbs.last}<a href="{$crumb.link}">{/if}{$crumb.name|@escape}</a> {/foreach} </div> {/if} diff --git a/templates/clean-blog/plugin_staticpage_related_category.tpl b/templates/clean-blog/plugin_staticpage_related_category.tpl index 0b3148e0..eed44715 100644 --- a/templates/clean-blog/plugin_staticpage_related_category.tpl +++ b/templates/clean-blog/plugin_staticpage_related_category.tpl @@ -3,12 +3,12 @@ <h2>{if $staticpage_articleformat}{if $staticpage_articleformattitle}{$staticpage_articleformattitle|@escape}{else}{$staticpage_pagetitle}{/if}{else}{if $staticpage_headline}{$staticpage_headline|@escape}{else}{$staticpage_pagetitle}{/if}{/if}</h2> {if $staticpage_show_breadcrumb} <div class="staticpage_breadcrumbs"> - <a href="{$serendipityBaseURL}" title="{$CONST.HOMEPAGE}">{$template_option.home_link_text}</a> + <a href="{$serendipityBaseURL}" title="{$CONST.HOMEPAGE}">{$blogTitle}</a> {foreach name="crumbs" from=$staticpage_navigation.crumbs item="crumb"} - » {if !$smarty.foreach.crumbs.last}<a href="{$crumb.link}">{/if}{$crumb.name|@escape}</a> + / {if !$smarty.foreach.crumbs.last}<a href="{$crumb.link}">{/if}{$crumb.name|@escape}</a> {/foreach} </div> - {/if} + {/if} </header> {if $staticpage_pass AND $staticpage_form_pass != $staticpage_pass} <form class="staticpage_password_form" action="{$staticpage_form_url}" method="post"> diff --git a/templates/clean-blog/preview_iframe.tpl b/templates/clean-blog/preview_iframe.tpl index 8c6f0ad6..ca87dcaf 100644 --- a/templates/clean-blog/preview_iframe.tpl +++ b/templates/clean-blog/preview_iframe.tpl @@ -7,7 +7,7 @@ <meta name="generator" content="Serendipity v.{$serendipityVersion}"> <title>{$CONST.SERENDIPITY_ADMIN_SUITE}</title> {* BOOTSTRAP CORE CSS *} - <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"> + <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"> {* S9Y CSS *} {if $head_link_stylesheet_frontend}{* >= s9y 2.0.2 *} <link rel="stylesheet" href="{$head_link_stylesheet_frontend}"> @@ -15,8 +15,8 @@ <link rel="stylesheet" href="{$serendipityHTTPPath}{$serendipityRewritePrefix}serendipity.css"> {/if} {* CUSTOM FONTS *} - <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> - <link href='http://fonts.googleapis.com/css?family=Lora:400,400italic|Open+Sans:300,600,800' rel='stylesheet' type='text/css'> + <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> + <link href='https://fonts.googleapis.com/css?family=Lora:400,400italic|Open+Sans:300,600,800' rel='stylesheet' type='text/css'> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> @@ -24,21 +24,16 @@ <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> {serendipity_hookPlugin hook="backend_header" hookAll="true"} - <script src="{serendipity_getFile file='admin/js/plugins.js'}"></script> - <script src="{serendipity_getFile file='admin/serendipity_editor.js'}"></script> <script> window.onload = function() {ldelim} - parent.document.getElementById('serendipity_iframe').style.height = document.getElementById('maincontent').offsetHeight - + parseInt(document.getElementById('maincontent').style.marginTop) - + parseInt(document.getElementById('maincontent').style.marginBottom) - + 'px'; + parent.document.getElementById('serendipity_iframe').style.height = document.querySelector('html').offsetHeight + 'px'; parent.document.getElementById('serendipity_iframe').scrolling = 'no'; parent.document.getElementById('serendipity_iframe').style.border = 0; {rdelim} </script> </head> <body> - <main id="maincontent" class="container" role="main" style="margin: 0 auto;"> + <main id="maincontent" class="container" role="main"> <div class="row"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> {if $mode == 'preview'} @@ -57,11 +52,11 @@ <span class="alert alert-success"><span class="fa-stack" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-check fa-stack-1x"></i></span> {$CONST.ENTRY_SAVED}</span> <a href="{$entrylink}" target="_blank">{$CONST.VIEW}</a> {/if} - {/if} + {/if} </div> </div> </main> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> - <script src={serendipity_getFile file="js/clean-blog.js"}></script> + <script src={serendipity_getFile file="js/clean-blog.js" frontend=true}></script> </body> -</html> +</html> \ No newline at end of file diff --git a/templates/clean-blog/staticpage-entries-listing.tpl b/templates/clean-blog/staticpage-entries-listing.tpl index 904c705f..6a1a429b 100644 --- a/templates/clean-blog/staticpage-entries-listing.tpl +++ b/templates/clean-blog/staticpage-entries-listing.tpl @@ -1,3 +1,4 @@ +<h4>{$CONST.STATICPAGE_NEW_HEADLINES|capitalize}</h4> {if $entries} <dl> {foreach from=$entries item="dategroup"} @@ -8,10 +9,10 @@ {/foreach} </dl> {if $staticpage_related_category_id >0} - <a href="{$serendipityBaseURL}{$serendipityRewritePrefix}{getCategoryLinkByID cid=$staticpage_related_category_id}">{$CONST.STATICPAGE_ARTICLE_OVERVIEW} »</a><br /> + <a class="btn btn-md btn-default btn-theme" href="{$serendipityBaseURL}{$serendipityRewritePrefix}{getCategoryLinkByID cid=$staticpage_related_category_id}">{$CONST.STATICPAGE_ARTICLE_OVERVIEW|capitalize} <i class="fa fa-arrow-right" aria-hidden="true"></i></a><br /> {else} - <a href="{$serendipityArchiveURL}/P1.html">{$CONST.STATICPAGE_ARTICLE_OVERVIEW} »</a><br /> + <a class="btn btn-md btn-default btn-theme" href="{$serendipityArchiveURL}/P1.html">{$CONST.STATICPAGE_ARTICLE_OVERVIEW|capitalize} <i class="fa fa-arrow-right" aria-hidden="true"></i></a><br /> {/if} {else} - <p class="nocontent">{$CONST.NO_ENTRIES_TO_PRINT}</p> + <p class="alert alert-info noentries"><span class="fa-stack"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-info fa-stack-1x"></i></span> {$CONST.NO_ENTRIES_TO_PRINT}</p> {/if} \ No newline at end of file diff --git a/templates/clean-blog/style.css b/templates/clean-blog/style.css index 2fee2272..d88d2d8e 100644 --- a/templates/clean-blog/style.css +++ b/templates/clean-blog/style.css @@ -4,6 +4,7 @@ * Copyright 2014 Start Bootstrap * Licensed under Apache 2.0 (https://github.com/IronSummitMedia/startbootstrap/blob/gh-pages/LICENSE) * Theme ported to Serendipity (http://s9y.org) by Don Chambers + * Last modified February 2, 2016 * Font Awesome by Dave Gandy - http://fontawesome.io */ body { diff --git a/templates/competition/info.txt b/templates/competition/info.txt index 677d0bd6..b2cfb6f3 100644 --- a/templates/competition/info.txt +++ b/templates/competition/info.txt @@ -1,3 +1,4 @@ Name: Coffee Cup Author: David Cummins Date: 6-2-06 +Engine: default diff --git a/templates/contest/info.txt b/templates/contest/info.txt index 5149c779..53b7418d 100755 --- a/templates/contest/info.txt +++ b/templates/contest/info.txt @@ -2,3 +2,4 @@ Name: Blue Streak Author: Garvin Hicking Date: 2005-02-15 Require Serendipity: 0.8 +Engine: default diff --git a/templates/default/YahooUI/treeview/treeview.js b/templates/default/YahooUI/treeview/treeview.js index d80b9ab4..2727bbe3 100644 --- a/templates/default/YahooUI/treeview/treeview.js +++ b/templates/default/YahooUI/treeview/treeview.js @@ -327,7 +327,7 @@ YAHOO.widget.TreeView.getNode = function(treeId, nodeIndex) { /** * Adds an event. Replace with event manager when available * - * @param el the elment to bind the handler to + * @param el the element to bind the handler to * @param {string} sType the type of event handler * @param {function} fn the callback to invoke * @param {boolean} capture if true event is capture phase, bubble otherwise @@ -1016,7 +1016,7 @@ YAHOO.widget.Node.prototype = { }, /** - * Get the markup for the node. This is designed to be overrided so that we can + * Get the markup for the node. This is designed to be overridden so that we can * support different types of nodes. * * @return {string} the html for this node @@ -1062,7 +1062,7 @@ YAHOO.widget.RootNode.prototype.getNodeHtml = function() { /** * @class The default node presentation. The first parameter should be * either a string that will be used as the node's label, or an object - * that has a string propery called label. By default, the clicking the + * that has a string property called label. By default, the clicking the * label will toggle the expanded/collapsed state of the node. By * changing the href property of the instance, this behavior can be * changed so that the label will go to the specified href. diff --git a/templates/default/admin/serendipity_editor.js b/templates/default/admin/serendipity_editor.js index 67696b41..0250f374 100644 --- a/templates/default/admin/serendipity_editor.js +++ b/templates/default/admin/serendipity_editor.js @@ -1,4 +1,4 @@ -/* $Id$ */ + /* # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team) # All rights reserved. See LICENSE file for licensing details diff --git a/templates/default/style_fallback.css b/templates/default/style_fallback.css index 79fe2c90..232d229e 100644 --- a/templates/default/style_fallback.css +++ b/templates/default/style_fallback.css @@ -1,55 +1,34 @@ -/* This is the templates/default/style_fallback.css file. - It emits CSS rules that all templates should have. - Classes are declared on top of the file, so if you - want to make changes in your own template, you - should override the rules on the bottom of your - style.css template. +/* The templates/default/style_fallback.css emits CSS statements that all s9y + themes should have. + + Statements declared in this file are emitted early in the dynamically + generated stylesheet serendipity.css, so you can override them by declaring + them again in your theme's style.css or user.css. + IT IS NOT ADVISED TO CREATE YOUR OWN style_fallback.css FILE! */ -/* Default image classes for left/right/usual layout */ +/* Images positioned normal/left/right */ .serendipity_image_center { - border: 0px; + border: 0; padding-left: 5px; padding-right: 5px; } .serendipity_image_left { float: left; - border: 0px; + border: 0; padding-left: 5px; padding-right: 5px; } .serendipity_image_right { float: right; - border: 0px; + border: 0; padding-left: 5px; padding-right: 5px; } -/* Default listing without spacers */ -.plainList { - list-style: none; - margin-left: 0; - padding-left: 0; -} - -/* Messages: Centered, important, notice */ -.serendipity_center { - margin-left: auto; - margin-right: auto; - text-align: center; -} - -.serendipity_msg_important { - color: red; -} - -.serendipity_msg_notice { - color: green; -} - -/* Embedded images with comments inside the s9y image manager */ +/* Images with captions and positioning */ .serendipity_imageComment_center, .serendipity_imageComment_left, .serendipity_imageComment_right { @@ -74,18 +53,40 @@ .serendipity_imageComment_img, .serendipity_imageComment_img img { - margin: 0px; - padding: 0px; + margin: 0; + padding: 0; text-align: center; } .serendipity_imageComment_txt { border-top: 1px solid #ddd; - margin: 0px; + margin: 0; padding: 3px; clear: both; font-size: 10px; text-align: center; } +/* Lists without bullets or numbers */ +.plainList { + list-style: none; + margin-left: 0; + padding-left: 0; +} + +/* Messages: centered, important, notice */ +.serendipity_center { + margin-left: auto; + margin-right: auto; + text-align: center; +} + +.serendipity_msg_important { + color: red; +} + +.serendipity_msg_notice { + color: green; +} + /* END OF style_fallback.css */ diff --git a/templates/idea/config.inc.php b/templates/idea/config.inc.php new file mode 100644 index 00000000..7c10a633 --- /dev/null +++ b/templates/idea/config.inc.php @@ -0,0 +1,67 @@ +<?php +if (IN_serendipity !== true) { die ("Don't hack!"); } + +@serendipity_plugin_api::load_language(dirname(__FILE__)); + +$serendipity['smarty']->assign(array('currpage' => "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'], + 'currpage2' => $_SERVER['REQUEST_URI'])); + +if (class_exists('serendipity_event_spamblock')) { + $required_fieldlist = serendipity_db_query("SELECT value FROM {$serendipity['dbPrefix']}config WHERE name LIKE '%spamblock%required_fields'", true, 'assoc'); +} elseif (class_exists('serendipity_event_commentspice')) { + $required_fieldlist = serendipity_db_query("SELECT value FROM {$serendipity['dbPrefix']}config WHERE name LIKE '%commentspice%required_fields'", true, 'assoc'); +} + +if (is_array($required_fieldlist)) { + $required_fields = explode(',', $required_fieldlist['value']); + $smarty_required_fields = array(); + + foreach($required_fields AS $required_field) { + $required_field = trim($required_field); + + if (empty($required_field)) continue; + $smarty_required_fields[$required_field] = $required_field; + } + + $serendipity['smarty']->assign('required_fields', $smarty_required_fields); +} + +$serendipity['smarty']->assign('is_templatechooser', $_SESSION['serendipityUseTemplate']); + +$template_config = array( + array( + 'var' => 'date_format', + 'name' => GENERAL_PLUGIN_DATEFORMAT . " (http://php.net/strftime)", + 'type' => 'select', + 'default' => DATE_FORMAT_ENTRY, + 'select_values' => array(DATE_FORMAT_ENTRY => DATE_FORMAT_ENTRY, + '%A, %e. %B %Y' => '%A, %e. %B %Y', + '%a, %e. %B %Y' => '%a, %e. %B %Y', + '%e. %B %Y' => '%e. %B %Y', + '%d.%m.%y' => '%d.%m.%y', + '%d.%m.%Y' => '%d.%m.%Y', + '%A, %m/%d/%Y' => '%A, %m/%d/%Y', + '%a, %m/%d/%y' => '%a, %m/%d/%y', + '%m/%d/%y' => '%m/%d/%y', + '%m/%d/%Y' => '%m/%d/%Y', + '%Y-%m-%d' => '%Y-%m-%d') + ), + array( + 'var' => 'webfonts', + 'name' => TWOK11_WEBFONTS, + 'type' => 'select', + 'default' => 'none', + 'select_values' => array('none' => TWOK11_NOWEBFONT, + 'droid' => 'Droid Sans', + 'ptsans' => 'PT Sans', + 'osans' => 'Open Sans', + 'cabin' => 'Cabin', + 'ubuntu' => 'Ubuntu', + 'dserif' => 'Droid Serif') + ), +); + +$template_config_groups = NULL; +$template_global_config = array('navigation' => true); +$template_loaded_config = serendipity_loadThemeOptions($template_config, $serendipity['smarty_vars']['template_option'], true); +serendipity_loadGlobalThemeOptions($template_config, $template_loaded_config, $template_global_config); \ No newline at end of file diff --git a/templates/idea/info.txt b/templates/idea/info.txt index 00f34a27..44803ceb 100644 --- a/templates/idea/info.txt +++ b/templates/idea/info.txt @@ -1,3 +1,3 @@ Name: Idea Author: Evan Nemerson -Date: 01/07/2004 +Date: 01/07/2004 \ No newline at end of file diff --git a/templates/idea/style.css b/templates/idea/style.css index a30b297b..25939938 100644 --- a/templates/idea/style.css +++ b/templates/idea/style.css @@ -6,6 +6,45 @@ body { font-family: verdana, arial, sans-serif; } +.droid, .droid button, +.droid input, .droid select, +.droid textarea { font-family: 'Droid Sans', sans-serif; } + +.ptsans, .ptsans button, +.ptsans input, .ptsans select, +.ptsans textarea { font-family: 'PT Sans', sans-serif; } + +.osans, .osans button, +.osans input, .osans select, +.osans textarea { font-family: 'Open Sans', sans-serif; } + +.cabin, .cabin button, +.cabin input, .cabin select, +.cabin textarea { font-family: 'Cabin', sans-serif; } + +.ubuntu, .ubuntu button, +.ubuntu input, .ubuntu select, +.ubuntu textarea { font-family: 'Ubuntu', sans-serif; } + +.dserif, .dserif button, +.dserif input, .dserif select, +.dserif textarea { font-family: 'Droid Serif', serif; } + +p { + hyphens: auto; +} + +.block_level, +fieldset, +.no-js #primary-nav ul, +.form_field label, +.form_tarea label, +.podcastdownload, +#primary-nav select, +.serendipity_comment_captcha .captcha, +.serendipity_comment_captcha label, +.serendipity_freeTag { display: block; } + a, a:link, a:visited { @@ -28,16 +67,6 @@ h3, h4 { padding: 0; } -input[type="text"], -input[type="password"], -input[type="button"], -input[type="submit"], -select, -textarea { - border: 1px #999 solid; - background-color: white; - color: #333; -} input:focus, input:hover, button:focus, button:hover, @@ -79,41 +108,67 @@ ul { /* Banner */ -#serendipity_banner { +#identity { + width: 62%; + float: left; +} + +#searchform { + width: 38%; + float: left; + height: 150px; + padding-top: 4rem; +} + +#searchform input { + max-width: 20rem; +} + +.js #searchsend { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } + +.no-js #searchsend { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } + + +#banner { background-image: url({TEMPLATE_PATH}img/I_had_an_idea.jpg); background-repeat: no-repeat; height: 150px; -} - -#serendipity_banner h1 { - margin-left: 140px; - font-size: x-large; - font-variant: small-caps; - padding-top: 1em; -} - -#serendipity_banner h2 { - margin-left: 140px; - font-size: small; + max-width: 80rem; + margin: auto; border-bottom: 1px #999 dashed; } -a.homelink1, -a.homelink1:hover, -a.homelink1:link, -a.homelink1:visited { +#banner h1 { + margin-left: 140px; + font-variant: small-caps; + padding-top: 2rem; +} + +#banner p { + margin-left: 140px; +} + +#banner a, +#banner a:hover, +#banner a:link, +#banner a:visited { color: #999; text-decoration: none; } -a.homelink2, -a.homelink2:hover, -a.homelink2:link, -a.homelink2:visited { +#banner a, +#banner a:hover, +#banner a:link, +#banner a:visited { color: #999; text-decoration: none; } +#searchform { + float: right; + position: relative; +} + /* Calendar */ table.serendipity_calendar a, @@ -146,52 +201,49 @@ td.serendipity_calendarHeader a:hover { /* Sidebars */ -#serendipityLeftSideBar, -#serendipityRightSideBar { +#sidebar_left, +#sidebar_right { display: block; padding: 10px; width: 11em; vertical-align: top; } -.serendipitySideBarTitle { - font-size: x-small; +.sidebar_plugin h3 { color: #666; font-weight: bolder; line-height: 140%; padding: 0.2em; padding-left: 1em; - letter-spacing: 0.2em; padding-bottom: 0; } -#serendipityRightSideBar * .serendipitySideBarTitle { +#sidebar_right .sidebar_plugin h3 { border-left: 1px #666 dashed; } -#serendipityLeftSideBar * .serendipitySideBarTitle { +#sidebar_left .sidebar_plugin h3 { border-right: 1px #666 dashed; } -div.serendipitySideBarItem { +.sidebar_content { margin-bottom: 1em; padding-bottom: 1em; } -.serendipitySideBarContent { +.sidebar_content { color: #333; border-top: 1px #666 dashed; - font-size: x-small; padding-top: 0.5em; padding-left: 1em; padding-right: 1em; } -#serendipityRightSideBar * .serendipitySideBarContent { +#sidebar_right .sidebar_content { border-right: 1px #666 dashed; } -#serendipityLeftSideBar * .serendipitySideBarContent { +#sidebar_left .sidebar_content { border-left: 1px #666 dashed; } @@ -201,10 +253,8 @@ div.serendipity_Entry_Date { padding-left: 1em; } -.serendipity_date { +.serendipity_byline { color: #999; - font-size: small; - font-weight: bold; text-transform: lowercase; margin-bottom: 0.7em; border-bottom: 1px #999 dashed; @@ -218,46 +268,41 @@ div.serendipity_Entry_Date { vertical-align: bottom; } -.serendipity_title, -.serendipity_Admin_title { - padding-bottom: 0.7em; - font-size: medium; +.serendipity_entry h2 { + padding-bottom: 0; font-weight: bold; text-transform: uppercase; + } -.serendipity_title a, -.serendipity_title a:hover, -.serendipity_title a:link, -.serendipity_title a:visited, -.serendipity_Admin_title a, -.serendipity_Admin_title a:hover, -.serendipity_Admin_title a:link, -.serendipity_Admin_title a:visited { +.serendipity_entry h2 a, +.serendipity_entry h2 a:hover, +.serendipity_entry h2 a:link, +.serendipity_entry h2 a:visited { color: #999; text-decoration: none; } -.serendipity_entry, -.serendipity_admin { - font-size: small; +.serendipity_entry { font-weight: normal; line-height: 140%; padding-left: 1em; } -div.serendipity_entryFooter { +.serendipity_entry_body { + color: #1A1A1A; +} + +.serendipity_entry footer { padding-top: 1em; margin-bottom: 1em; clear: both; - font-size: x-small; } /* Comments */ .serendipity_comment { border-left: double #999 thick; - font-size: small; margin-left: 10px; margin-right: 10px; margin-top: 1em; @@ -270,25 +315,55 @@ div.serendipity_entryFooter { padding-bottom: 1em; } -.serendipity_commentsLabel { - font-size: small; -} - -.serendipity_commentsTitle { - font-size: medium; +.serendipity_comment h4 { font-weight: bold; text-transform: uppercase; } -/* Admin */ +#serendipityQuickSearchTermField, +#serendipity_comment input[type=text], +#serendipity_comment input[type=email], +#serendipity_comment input[type=url] { width: 95%; } -.serendipity_admin td { -} +#serendipity_replyTo, +#serendipity_comment textarea { width: 95%; } + +.commentlevel-1 { margin-left: 1em; } +.commentlevel-2 { margin-left: 2em; } +.commentlevel-3 { margin-left: 3em; } +.commentlevel-4 { margin-left: 4em; } +.commentlevel-5 { margin-left: 5em; } +.commentlevel-6 { margin-left: 6em; } +.commentlevel-7 { margin-left: 7em; } +.commentlevel-8 { margin-left: 8em; } +.commentlevel-9 { margin-left: 9em; } /* Misc */ #content { - width: 100%; + flex: 3 1 60%; + order: 2; + max-width: 40rem; + margin-left: auto; + margin-right: auto; +} + +#page > div { + display: flex; + flex-flow: row; + max-width: 80rem; + margin: auto; + clear: both; +} + +#sidebar_left { + flex: 1 6 20%; + order: 1; +} + +#sidebar_right { + flex: 1 6 20%; + order: 3; } /** Embedded images with the s9y image manager **/ @@ -324,7 +399,6 @@ div.serendipity_entryFooter { margin: 0px; padding: 3px; clear: both; - font-size: 9pt; text-align: center; } @@ -344,7 +418,6 @@ img.serendipity_entryIcon { .serendipity_admin_filters { border: 1px dashed; background-color: #FFFFFF; - font-size: 10px; margin-bottom: 10px; padding: 2px; } @@ -354,17 +427,9 @@ img.serendipity_entryIcon { } .serendipity_admin_sortorder { - font-size: 10px; text-align: center; } -.serendipity_admin_sortorder input, -.serendipity_admin_sortorder select, -.serendipity_admin_filters input, -.serendipity_admin_filters select { - font-size: 10px; -} - .serendipity_comments { } @@ -390,6 +455,28 @@ img.serendipity_entryIcon { color: #669999; } +/* pagination */ + + +.serendipity_pagination ul { + list-style-image: none; + list-style-type: none; + display: flex; +} + +.prev { + order: 1; +} + +.info { + order: 2; + margin-left: 1rem; + margin-right: 1rem; +} + +.next { + order: 3; +} /*** Additional plugin styles needed for the modernized output code ***/ /*** added by Matthias 'YellowLed' Mees ***/ @@ -423,3 +510,20 @@ img.serendipity_entryIcon { .serendipity_shoutbox_comment { padding: 3px 0; } /*** End Additional plugin styles ***/ + +.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } + +.visuallyhidden.focusable:active, +.visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } + +.clearfix:before, .clearfix:after { content: ""; display: table; } +.clearfix:after { clear: both; } +.clearfix { zoom: 1; } + +.serendipity_edit_nugget, .serendipity_byline, .serendipity_entry footer { + font-size: 0.9em; +} + +#colophon { + text-align: center; +} diff --git a/templates/jquery.js b/templates/jquery.js index 0f60b7bd..e8364758 100644 --- a/templates/jquery.js +++ b/templates/jquery.js @@ -1,5 +1,5 @@ -/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; - -return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ca()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ca()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?aa:ba):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=aa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=aa,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=aa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=ba;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=ba),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function da(a){var b=ea.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var ea="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fa=/ jQuery\d+="(?:null|\d+)"/g,ga=new RegExp("<(?:"+ea+")[\\s/>]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/<tbody/i,la=/<|&#?\w+;/,ma=/<(?:script|style|link)/i,na=/checked\s*(?:[^=]|=\s*.checked.)/i,oa=/^$|\/(?:java|ecma)script/i,pa=/^true\/(.*)/,qa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ra={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?"<table>"!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ca[0].contentWindow||Ca[0].contentDocument).document,b.write(),b.close(),c=Ea(a,b),Ca.detach()),Da[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Ga=/^margin/,Ha=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ia,Ja,Ka=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ia=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Ha.test(g)&&Ga.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ia=function(a){return a.currentStyle},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ha.test(g)&&!Ka.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function La(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight),b.removeChild(i)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Ma=/alpha\([^)]*\)/i,Na=/opacity\s*=\s*([^)]*)/,Oa=/^(none|table(?!-c[ea]).+)/,Pa=new RegExp("^("+S+")(.*)$","i"),Qa=new RegExp("^([+-])=("+S+")","i"),Ra={position:"absolute",visibility:"hidden",display:"block"},Sa={letterSpacing:"0",fontWeight:"400"},Ta=["Webkit","O","Moz","ms"];function Ua(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ta.length;while(e--)if(b=Ta[e]+c,b in a)return b;return d}function Va(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fa(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wa(a,b,c){var d=Pa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Ya(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ia(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Ja(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ha.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xa(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ja(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ua(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qa.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ua(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Ja(a,b,d)),"normal"===f&&b in Sa&&(f=Sa[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Oa.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Ra,function(){return Ya(a,b,d)}):Ya(a,b,d):void 0},set:function(a,c,d){var e=d&&Ia(a);return Wa(a,c,d?Xa(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Na.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Ma,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Ma.test(f)?f.replace(Ma,e):f+" "+e)}}),m.cssHooks.marginRight=La(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Ja,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Ga.test(a)||(m.cssHooks[a+b].set=Wa)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ia(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Va(this,!0)},hide:function(){return Va(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Za(a,b,c,d,e){ -return new Za.prototype.init(a,b,c,d,e)}m.Tween=Za,Za.prototype={constructor:Za,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Za.propHooks[this.prop];return a&&a.get?a.get(this):Za.propHooks._default.get(this)},run:function(a){var b,c=Za.propHooks[this.prop];return this.options.duration?this.pos=b=m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Za.propHooks._default.set(this),this}},Za.prototype.init.prototype=Za.prototype,Za.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Za.propHooks.scrollTop=Za.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Za.prototype.init,m.fx.step={};var $a,_a,ab=/^(?:toggle|show|hide)$/,bb=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cb=/queueHooks$/,db=[ib],eb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bb.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bb.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fb(){return setTimeout(function(){$a=void 0}),$a=m.now()}function gb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hb(a,b,c){for(var d,e=(eb[b]||[]).concat(eb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ib(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fa(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fa(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ab.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fa(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hb(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jb(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kb(a,b,c){var d,e,f=0,g=db.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$a||fb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$a||fb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jb(k,j.opts.specialEasing);g>f;f++)if(d=db[f].call(j,a,k,j.opts))return d;return m.map(k,hb,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kb,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],eb[c]=eb[c]||[],eb[c].unshift(b)},prefilter:function(a,b){b?db.unshift(a):db.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kb(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gb(b,!0),a,d,e)}}),m.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($a=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$a=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_a||(_a=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_a),_a=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lb=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lb,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mb,nb,ob=m.expr.attrHandle,pb=/^(?:checked|selected)$/i,qb=k.getSetAttribute,rb=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nb:mb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rb&&qb||!pb.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qb?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nb={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rb&&qb||!pb.test(c)?a.setAttribute(!qb&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ob[b]||m.find.attr;ob[b]=rb&&qb||!pb.test(b)?function(a,b,d){var e,f;return d||(f=ob[b],ob[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,ob[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rb&&qb||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mb&&mb.set(a,b,c)}}),qb||(mb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},ob.id=ob.name=ob.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mb.set},m.attrHooks.contenteditable={set:function(a,b,c){mb.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sb=/^(?:input|select|textarea|button|object)$/i,tb=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sb.test(a.nodeName)||tb.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var ub=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ub," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vb=m.now(),wb=/\?/,xb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yb,zb,Ab=/#.*$/,Bb=/([?&])_=[^&]*/,Cb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Db=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Eb=/^(?:GET|HEAD)$/,Fb=/^\/\//,Gb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hb={},Ib={},Jb="*/".concat("*");try{zb=location.href}catch(Kb){zb=y.createElement("a"),zb.href="",zb=zb.href}yb=Gb.exec(zb.toLowerCase())||[];function Lb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mb(a,b,c,d){var e={},f=a===Ib;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nb(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Ob(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zb,type:"GET",isLocal:Db.test(yb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nb(Nb(a,m.ajaxSettings),b):Nb(m.ajaxSettings,a)},ajaxPrefilter:Lb(Hb),ajaxTransport:Lb(Ib),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cb.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zb)+"").replace(Ab,"").replace(Fb,yb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gb.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yb[1]&&c[2]===yb[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yb[3]||("http:"===yb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mb(Hb,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Eb.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wb.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bb.test(e)?e.replace(Bb,"$1_="+vb++):e+(wb.test(e)?"&":"?")+"_="+vb++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jb+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mb(Ib,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Ob(k,v,c)),u=Pb(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qb=/%20/g,Rb=/\[\]$/,Sb=/\r?\n/g,Tb=/^(?:submit|button|image|reset|file)$/i,Ub=/^(?:input|select|textarea|keygen)/i;function Vb(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rb.test(a)?d(a,e):Vb(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vb(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vb(c,a[c],b,e);return d.join("&").replace(Qb,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Ub.test(this.nodeName)&&!Tb.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sb,"\r\n")}}):{name:b.name,value:c.replace(Sb,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zb()||$b()}:Zb;var Wb=0,Xb={},Yb=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xb)Xb[a](void 0,!0)}),k.cors=!!Yb&&"withCredentials"in Yb,Yb=k.ajax=!!Yb,Yb&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xb[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xb[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zb(){try{return new a.XMLHttpRequest}catch(b){}}function $b(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _b=[],ac=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_b.pop()||m.expando+"_"+vb++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ac.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ac.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ac,"$1"+e):b.jsonp!==!1&&(b.url+=(wb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_b.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bc=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bc)return bc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cc=a.document.documentElement;function dc(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cc;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cc})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=La(k.pixelPosition,function(a,c){return c?(c=Ja(a,b),Ha.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ec=a.jQuery,fc=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fc),b&&a.jQuery===m&&(a.jQuery=ec),m},typeof b===K&&(a.jQuery=a.$=m),m}); +/*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(!l.ownFirst)for(b in a)return k.call(a,b);for(b in a);return void 0===b||k.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(h)return h.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=e.call(arguments,2),d=function(){return a.apply(b||this,c.concat(e.call(arguments)))},d.guid=a.guid=a.guid||n.guid++,d):void 0},now:function(){return+new Date},support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=R.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}if(f=d.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return A.find(a);this.length=1,this[0]=f}return this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||(e=n.uniqueSort(e)),D.test(a)&&(e=e.reverse())),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=!0,c||j.disable(),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.addEventListener?(d.removeEventListener("DOMContentLoaded",K),a.removeEventListener("load",K)):(d.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(d.addEventListener||"load"===a.event.type||"complete"===d.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll)a.setTimeout(n.ready);else if(d.addEventListener)d.addEventListener("DOMContentLoaded",K),a.addEventListener("load",K);else{d.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&d.documentElement}catch(e){}c&&c.doScroll&&!function f(){if(!n.isReady){try{c.doScroll("left")}catch(b){return a.setTimeout(f,50)}J(),n.ready()}}()}return I.promise(b)},n.ready.promise();var L;for(L in n(l))break;l.ownFirst="0"===L,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c,e;c=d.getElementsByTagName("body")[0],c&&c.style&&(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",l.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(e))}),function(){var a=d.createElement("div");l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}a=null}();var M=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b},N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0; +}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),"object"!=typeof b&&"function"!=typeof b||(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(M(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=void 0)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}}),function(){var a;l.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,e;return c=d.getElementsByTagName("body")[0],c&&c.style?(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(d.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(e),a):void 0}}();var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),V=["Top","Right","Bottom","Left"],W=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function X(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&U.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var Y=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)Y(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},Z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,_=/^$|\/(?:java|ecma)script/i,aa=/^\s+/,ba="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";function ca(a){var b=ba.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}!function(){var a=d.createElement("div"),b=d.createDocumentFragment(),c=d.createElement("input");a.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",l.leadingWhitespace=3===a.firstChild.nodeType,l.tbody=!a.getElementsByTagName("tbody").length,l.htmlSerialize=!!a.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==d.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,b.appendChild(c),l.appendChecked=c.checked,a.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue,b.appendChild(a),c=d.createElement("input"),c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),a.appendChild(c),l.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!!a.addEventListener,a[n.expando]=1,l.attributes=!a.getAttribute(n.expando)}();var da={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;function ea(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,ea(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function fa(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}var ga=/<|&#?\w+;/,ha=/<tbody/i;function ia(a){Z.test(a.type)&&(a.defaultChecked=a.checked)}function ja(a,b,c,d,e){for(var f,g,h,i,j,k,m,o=a.length,p=ca(b),q=[],r=0;o>r;r++)if(g=a[r],g||0===g)if("object"===n.type(g))n.merge(q,g.nodeType?[g]:g);else if(ga.test(g)){i=i||p.appendChild(b.createElement("div")),j=($.exec(g)||["",""])[1].toLowerCase(),m=da[j]||da._default,i.innerHTML=m[1]+n.htmlPrefilter(g)+m[2],f=m[0];while(f--)i=i.lastChild;if(!l.leadingWhitespace&&aa.test(g)&&q.push(b.createTextNode(aa.exec(g)[0])),!l.tbody){g="table"!==j||ha.test(g)?"<table>"!==m[1]||ha.test(g)?0:i:i.firstChild,f=g&&g.childNodes.length;while(f--)n.nodeName(k=g.childNodes[f],"tbody")&&!k.childNodes.length&&g.removeChild(k)}n.merge(q,i.childNodes),i.textContent="";while(i.firstChild)i.removeChild(i.firstChild);i=p.lastChild}else q.push(b.createTextNode(g));i&&p.removeChild(i),l.appendChecked||n.grep(ea(q,"input"),ia),r=0;while(g=q[r++])if(d&&n.inArray(g,d)>-1)e&&e.push(g);else if(h=n.contains(g.ownerDocument,g),i=ea(p.appendChild(g),"script"),h&&fa(i),c){f=0;while(g=i[f++])_.test(g.type||"")&&c.push(g)}return i=null,p}!function(){var b,c,e=d.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b]=c in a)||(e.setAttribute(c,"t"),l[b]=e.attributes[c].expando===!1);e=null}();var ka=/^(?:input|select|textarea)$/i,la=/^key/,ma=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,na=/^(?:focusinfocus|focusoutblur)$/,oa=/^([^.]*)(?:\.(.+)|)/;function pa(){return!0}function qa(){return!1}function ra(){try{return d.activeElement}catch(a){}}function sa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)sa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=qa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return"undefined"==typeof n||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(G)||[""],h=b.length;while(h--)f=oa.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=oa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(i=m=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!na.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),h=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),l=n.event.special[q]||{},f||!l.trigger||l.trigger.apply(e,c)!==!1)){if(!f&&!l.noBubble&&!n.isWindow(e)){for(j=l.delegateType||q,na.test(j+q)||(i=i.parentNode);i;i=i.parentNode)p.push(i),m=i;m===(e.ownerDocument||d)&&p.push(m.defaultView||m.parentWindow||a)}o=0;while((i=p[o++])&&!b.isPropagationStopped())b.type=o>1?j:l.bindType||q,g=(n._data(i,"events")||{})[b.type]&&n._data(i,"handle"),g&&g.apply(i,c),g=h&&i[h],g&&g.apply&&M(i)&&(b.result=g.apply(i,c),b.result===!1&&b.preventDefault());if(b.type=q,!f&&!b.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),c)===!1)&&M(e)&&h&&e[q]&&!n.isWindow(e)){m=e[h],m&&(e[h]=null),n.event.triggered=q;try{e[q]()}catch(s){}n.event.triggered=void 0,m&&(e[h]=m)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ma.test(f)?this.mouseHooks:la.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=g.srcElement||d),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,h.filter?h.filter(a,g):a},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,e,f,g=b.button,h=b.fromElement;return null==a.pageX&&null!=b.clientX&&(e=a.target.ownerDocument||d,f=e.documentElement,c=e.body,a.pageX=b.clientX+(f&&f.scrollLeft||c&&c.scrollLeft||0)-(f&&f.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(f&&f.scrollTop||c&&c.scrollTop||0)-(f&&f.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&h&&(a.relatedTarget=h===a.target?b.toElement:h),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ra()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ra()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b),d.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=d.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)}:function(a,b,c){var d="on"+b;a.detachEvent&&("undefined"==typeof a[d]&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?pa:qa):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={constructor:n.Event,isDefaultPrevented:qa,isPropagationStopped:qa,isImmediatePropagationStopped:qa,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=pa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=pa,a&&!this.isSimulated&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=pa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||n.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submit||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?n.prop(b,"form"):void 0;c&&!n._data(c,"submit")&&(n.event.add(c,"submit._submit",function(a){a._submitBubble=!0}),n._data(c,"submit",!0))})},postDispatch:function(a){a._submitBubble&&(delete a._submitBubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.change||(n.event.special.change={setup:function(){return ka.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._justChanged=!0)}),n.event.add(this,"click._change",function(a){this._justChanged&&!a.isTrigger&&(this._justChanged=!1),n.event.simulate("change",this,a)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;ka.test(b.nodeName)&&!n._data(b,"change")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a)}),n._data(b,"change",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!ka.test(this.nodeName)}}),l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d){return sa(this,a,b,c,d)},one:function(a,b,c,d){return sa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=qa),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ta=/ jQuery\d+="(?:null|\d+)"/g,ua=new RegExp("<(?:"+ba+")[\\s/>]","i"),va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wa=/<script|<style|<link/i,xa=/checked\s*(?:[^=]|=\s*.checked.)/i,ya=/^true\/(.*)/,za=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Aa=ca(d),Ba=Aa.appendChild(d.createElement("div"));function Ca(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Da(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function Ea(a){var b=ya.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Ga(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(Da(b).text=a.text,Ea(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Z.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}}function Ha(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&xa.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(o&&(k=ja(b,a[0].ownerDocument,!1,a,d),e=k.firstChild,1===k.childNodes.length&&(k=e),e||d)){for(i=n.map(ea(k,"script"),Da),h=i.length;o>m;m++)g=k,m!==p&&(g=n.clone(g,!0,!0),h&&n.merge(i,ea(g,"script"))),c.call(a[m],g,m);if(h)for(j=i[i.length-1].ownerDocument,n.map(i,Ea),m=0;h>m;m++)g=i[m],_.test(g.type||"")&&!n._data(g,"globalEval")&&n.contains(j,g)&&(g.src?n._evalUrl&&n._evalUrl(g.src):n.globalEval((g.text||g.textContent||g.innerHTML||"").replace(za,"")));k=e=null}return a}function Ia(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(ea(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&fa(ea(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(va,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!ua.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(Ba.innerHTML=a.outerHTML,Ba.removeChild(f=Ba.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=ea(f),h=ea(a),g=0;null!=(e=h[g]);++g)d[g]&&Ga(e,d[g]);if(b)if(c)for(h=h||ea(a),d=d||ea(f),g=0;null!=(e=h[g]);g++)Fa(e,d[g]);else Fa(a,f);return d=ea(f,"script"),d.length>0&&fa(d,!i&&ea(a,"script")),d=h=e=null,f},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.attributes,m=n.event.special;null!=(d=a[h]);h++)if((b||M(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k||"undefined"==typeof d.removeAttribute?d[i]=void 0:d.removeAttribute(i),c.push(f))}}}),n.fn.extend({domManip:Ha,detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return Y(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||d).createTextNode(a))},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(ea(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return Y(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(ta,""):void 0;if("string"==typeof a&&!wa.test(a)&&(l.htmlSerialize||!ua.test(a))&&(l.leadingWhitespace||!aa.test(a))&&!da[($.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ea(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(ea(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],f=n(a),h=f.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(f[d])[b](c),g.apply(e,c.get());return this.pushStack(e)}});var Ja,Ka={HTML:"block",BODY:"block"};function La(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function Ma(a){var b=d,c=Ka[a];return c||(c=La(a,b),"none"!==c&&c||(Ja=(Ja||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ja[0].contentWindow||Ja[0].contentDocument).document,b.write(),b.close(),c=La(a,b),Ja.detach()),Ka[a]=c),c}var Na=/^margin/,Oa=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Pa=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},Qa=d.documentElement;!function(){var b,c,e,f,g,h,i=d.createElement("div"),j=d.createElement("div");if(j.style){j.style.cssText="float:left;opacity:.5",l.opacity="0.5"===j.style.opacity,l.cssFloat=!!j.style.cssFloat,j.style.backgroundClip="content-box",j.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===j.style.backgroundClip,i=d.createElement("div"),i.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",j.innerHTML="",i.appendChild(j),l.boxSizing=""===j.style.boxSizing||""===j.style.MozBoxSizing||""===j.style.WebkitBoxSizing,n.extend(l,{reliableHiddenOffsets:function(){return null==b&&k(),f},boxSizingReliable:function(){return null==b&&k(),e},pixelMarginRight:function(){return null==b&&k(),c},pixelPosition:function(){return null==b&&k(),b},reliableMarginRight:function(){return null==b&&k(),g},reliableMarginLeft:function(){return null==b&&k(),h}});function k(){var k,l,m=d.documentElement;m.appendChild(i),j.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",b=e=h=!1,c=g=!0,a.getComputedStyle&&(l=a.getComputedStyle(j),b="1%"!==(l||{}).top,h="2px"===(l||{}).marginLeft,e="4px"===(l||{width:"4px"}).width,j.style.marginRight="50%",c="4px"===(l||{marginRight:"4px"}).marginRight,k=j.appendChild(d.createElement("div")),k.style.cssText=j.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",k.style.marginRight=k.style.width="0",j.style.width="1px",g=!parseFloat((a.getComputedStyle(k)||{}).marginRight),j.removeChild(k)),j.style.display="none",f=0===j.getClientRects().length,f&&(j.style.display="",j.innerHTML="<table><tr><td></td><td>t</td></tr></table>",j.childNodes[0].style.borderCollapse="separate",k=j.getElementsByTagName("td"),k[0].style.cssText="margin:0;border:0;padding:0;display:none",f=0===k[0].offsetHeight,f&&(k[0].style.display="",k[1].style.display="none",f=0===k[0].offsetHeight)),m.removeChild(i)}}}();var Ra,Sa,Ta=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ra=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),c&&!l.pixelMarginRight()&&Oa.test(g)&&Na.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f),void 0===g?g:g+""}):Qa.currentStyle&&(Ra=function(a){return a.currentStyle},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Oa.test(g)&&!Ta.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Ua(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Va=/alpha\([^)]*\)/i,Wa=/opacity\s*=\s*([^)]*)/i,Xa=/^(none|table(?!-c[ea]).+)/,Ya=new RegExp("^("+T+")(.*)$","i"),Za={position:"absolute",visibility:"hidden",display:"block"},$a={letterSpacing:"0",fontWeight:"400"},_a=["Webkit","O","Moz","ms"],ab=d.createElement("div").style;function bb(a){if(a in ab)return a;var b=a.charAt(0).toUpperCase()+a.slice(1),c=_a.length;while(c--)if(a=_a[c]+b,a in ab)return a}function cb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&W(d)&&(f[g]=n._data(d,"olddisplay",Ma(d.nodeName)))):(e=W(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function db(a,b,c){var d=Ya.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function eb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+V[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+V[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+V[f]+"Width",!0,e))):(g+=n.css(a,"padding"+V[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+V[f]+"Width",!0,e)));return g}function fb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ra(a),g=l.boxSizing&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Sa(a,b,f),(0>e||null==e)&&(e=a.style[b]),Oa.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+eb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Sa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=U.exec(c))&&e[1]&&(c=X(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"px")),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Sa(a,b,d)),"normal"===f&&b in $a&&(f=$a[b]),""===c||c?(e=parseFloat(f),c===!0||isFinite(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Xa.test(n.css(a,"display"))&&0===a.offsetWidth?Pa(a,Za,function(){return fb(a,b,d)}):fb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ra(a);return db(a,c,d?eb(a,b,d,l.boxSizing&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Wa.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Va,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Va.test(f)?f.replace(Va,e):f+" "+e)}}),n.cssHooks.marginRight=Ua(l.reliableMarginRight,function(a,b){return b?Pa(a,{display:"inline-block"},Sa,[a,"marginRight"]):void 0}),n.cssHooks.marginLeft=Ua(l.reliableMarginLeft,function(a,b){return b?(parseFloat(Sa(a,"marginLeft"))||(n.contains(a.ownerDocument,a)?a.getBoundingClientRect().left-Pa(a,{ +marginLeft:0},function(){return a.getBoundingClientRect().left}):0))+"px":void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+V[d]+b]=f[d]||f[d-2]||f[0];return e}},Na.test(a)||(n.cssHooks[a+b].set=db)}),n.fn.extend({css:function(a,b){return Y(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ra(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return cb(this,!0)},hide:function(){return cb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){W(this)?n(this).show():n(this).hide()})}});function gb(a,b,c,d,e){return new gb.prototype.init(a,b,c,d,e)}n.Tween=gb,gb.prototype={constructor:gb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=gb.propHooks[this.prop];return a&&a.get?a.get(this):gb.propHooks._default.get(this)},run:function(a){var b,c=gb.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):gb.propHooks._default.set(this),this}},gb.prototype.init.prototype=gb.prototype,gb.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},gb.propHooks.scrollTop=gb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=gb.prototype.init,n.fx.step={};var hb,ib,jb=/^(?:toggle|show|hide)$/,kb=/queueHooks$/;function lb(){return a.setTimeout(function(){hb=void 0}),hb=n.now()}function mb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=V[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function nb(a,b,c){for(var d,e=(qb.tweeners[b]||[]).concat(qb.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ob(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&W(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k="none"===j?n._data(a,"olddisplay")||Ma(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==Ma(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],jb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(o))"inline"===("none"===j?Ma(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=nb(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function pb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function qb(a,b,c){var d,e,f=0,g=qb.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=hb||lb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:hb||lb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(pb(k,j.opts.specialEasing);g>f;f++)if(d=qb.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,nb,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(qb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return X(c.elem,a,U.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],qb.tweeners[c]=qb.tweeners[c]||[],qb.tweeners[c].unshift(b)},prefilters:[ob],prefilter:function(a,b){b?qb.prefilters.unshift(a):qb.prefilters.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(W).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=qb(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&kb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(mb(b,!0),a,d,e)}}),n.each({slideDown:mb("show"),slideUp:mb("hide"),slideToggle:mb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(hb=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),hb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ib||(ib=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(ib),ib=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a,b=d.createElement("input"),c=d.createElement("div"),e=d.createElement("select"),f=e.appendChild(d.createElement("option"));c=d.createElement("div"),c.setAttribute("className","t"),c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],b.setAttribute("type","checkbox"),c.appendChild(b),a=c.getElementsByTagName("a")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==c.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=f.selected,l.enctype=!!d.createElement("form").enctype,e.disabled=!0,l.optDisabled=!f.disabled,b=d.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value}();var rb=/\r/g,sb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(sb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>-1)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var tb,ub,vb=n.expr.attrHandle,wb=/^(?:checked|selected)$/i,xb=l.getSetAttribute,yb=l.input;n.fn.extend({attr:function(a,b){return Y(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?ub:tb)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?yb&&xb||!wb.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(xb?c:d)}}),ub={set:function(a,b,c){return b===!1?n.removeAttr(a,c):yb&&xb||!wb.test(c)?a.setAttribute(!xb&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=vb[b]||n.find.attr;yb&&xb||!wb.test(b)?vb[b]=function(a,b,d){var e,f;return d||(f=vb[b],vb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,vb[b]=f),e}:vb[b]=function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),yb&&xb||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):tb&&tb.set(a,b,c)}}),xb||(tb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},vb.id=vb.name=vb.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:tb.set},n.attrHooks.contenteditable={set:function(a,b,c){tb.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var zb=/^(?:input|select|textarea|button|object)$/i,Ab=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return Y(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):zb.test(a.nodeName)||Ab.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var Bb=/[\t\r\n\f]/g;function Cb(a){return n.attr(a,"class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,Cb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,Cb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,Cb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=Cb(this),b&&n._data(this,"__className__",b),n.attr(this,"class",b||a===!1?"":n._data(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+Cb(c)+" ").replace(Bb," ").indexOf(b)>-1)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Db=a.location,Eb=n.now(),Fb=/\?/,Gb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(Gb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new a.DOMParser,c=d.parseFromString(b,"text/xml")):(c=new a.ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var Hb=/#.*$/,Ib=/([?&])_=[^&]*/,Jb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Kb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Lb=/^(?:GET|HEAD)$/,Mb=/^\/\//,Nb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ob={},Pb={},Qb="*/".concat("*"),Rb=Db.href,Sb=Nb.exec(Rb.toLowerCase())||[];function Tb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Ub(a,b,c,d){var e={},f=a===Pb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Vb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Wb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Xb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Rb,type:"GET",isLocal:Kb.test(Sb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Vb(Vb(a,n.ajaxSettings),b):Vb(n.ajaxSettings,a)},ajaxPrefilter:Tb(Ob),ajaxTransport:Tb(Pb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var d,e,f,g,h,i,j,k,l=n.ajaxSetup({},c),m=l.context||l,o=l.context&&(m.nodeType||m.jquery)?n(m):n.event,p=n.Deferred(),q=n.Callbacks("once memory"),r=l.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!k){k={};while(b=Jb.exec(g))k[b[1].toLowerCase()]=b[2]}b=k[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>u)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return j&&j.abort(b),y(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,l.url=((b||l.url||Rb)+"").replace(Hb,"").replace(Mb,Sb[1]+"//"),l.type=c.method||c.type||l.method||l.type,l.dataTypes=n.trim(l.dataType||"*").toLowerCase().match(G)||[""],null==l.crossDomain&&(d=Nb.exec(l.url.toLowerCase()),l.crossDomain=!(!d||d[1]===Sb[1]&&d[2]===Sb[2]&&(d[3]||("http:"===d[1]?"80":"443"))===(Sb[3]||("http:"===Sb[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=n.param(l.data,l.traditional)),Ub(Ob,l,c,w),2===u)return w;i=n.event&&l.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!Lb.test(l.type),f=l.url,l.hasContent||(l.data&&(f=l.url+=(Fb.test(f)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=Ib.test(f)?f.replace(Ib,"$1_="+Eb++):f+(Fb.test(f)?"&":"?")+"_="+Eb++)),l.ifModified&&(n.lastModified[f]&&w.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&w.setRequestHeader("If-None-Match",n.etag[f])),(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",l.contentType),w.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+Qb+"; q=0.01":""):l.accepts["*"]);for(e in l.headers)w.setRequestHeader(e,l.headers[e]);if(l.beforeSend&&(l.beforeSend.call(m,w,l)===!1||2===u))return w.abort();v="abort";for(e in{success:1,error:1,complete:1})w[e](l[e]);if(j=Ub(Pb,l,c,w)){if(w.readyState=1,i&&o.trigger("ajaxSend",[w,l]),2===u)return w;l.async&&l.timeout>0&&(h=a.setTimeout(function(){w.abort("timeout")},l.timeout));try{u=1,j.send(s,y)}catch(x){if(!(2>u))throw x;y(-1,x)}}else y(-1,"No Transport");function y(b,c,d,e){var k,s,t,v,x,y=c;2!==u&&(u=2,h&&a.clearTimeout(h),j=void 0,g=e||"",w.readyState=b>0?4:0,k=b>=200&&300>b||304===b,d&&(v=Wb(l,w,d)),v=Xb(l,v,w,k),k?(l.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(n.lastModified[f]=x),x=w.getResponseHeader("etag"),x&&(n.etag[f]=x)),204===b||"HEAD"===l.type?y="nocontent":304===b?y="notmodified":(y=v.state,s=v.data,t=v.error,k=!t)):(t=y,!b&&y||(y="error",0>b&&(b=0))),w.status=b,w.statusText=(c||y)+"",k?p.resolveWith(m,[s,y,w]):p.rejectWith(m,[w,y,t]),w.statusCode(r),r=void 0,i&&o.trigger(k?"ajaxSuccess":"ajaxError",[w,l,k?s:t]),q.fireWith(m,[w,y]),i&&(o.trigger("ajaxComplete",[w,l]),--n.active||n.event.trigger("ajaxStop")))}return w},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}});function Yb(a){return a.style&&a.style.display||n.css(a,"display")}function Zb(a){if(!n.contains(a.ownerDocument||d,a))return!0;while(a&&1===a.nodeType){if("none"===Yb(a)||"hidden"===a.type)return!0;a=a.parentNode}return!1}n.expr.filters.hidden=function(a){return l.reliableHiddenOffsets()?a.offsetWidth<=0&&a.offsetHeight<=0&&!a.getClientRects().length:Zb(a)},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var $b=/%20/g,_b=/\[\]$/,ac=/\r?\n/g,bc=/^(?:submit|button|image|reset|file)$/i,cc=/^(?:input|select|textarea|keygen)/i;function dc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||_b.test(a)?d(a,e):dc(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)dc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)dc(c,a[c],b,e);return d.join("&").replace($b,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&cc.test(this.nodeName)&&!bc.test(a)&&(this.checked||!Z.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(ac,"\r\n")}}):{name:b.name,value:c.replace(ac,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return this.isLocal?ic():d.documentMode>8?hc():/^(get|post|head|put|delete|options)$/i.test(this.type)&&hc()||ic()}:hc;var ec=0,fc={},gc=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in fc)fc[a](void 0,!0)}),l.cors=!!gc&&"withCredentials"in gc,gc=l.ajax=!!gc,gc&&n.ajaxTransport(function(b){if(!b.crossDomain||l.cors){var c;return{send:function(d,e){var f,g=b.xhr(),h=++ec;if(g.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(f in b.xhrFields)g[f]=b.xhrFields[f];b.mimeType&&g.overrideMimeType&&g.overrideMimeType(b.mimeType),b.crossDomain||d["X-Requested-With"]||(d["X-Requested-With"]="XMLHttpRequest");for(f in d)void 0!==d[f]&&g.setRequestHeader(f,d[f]+"");g.send(b.hasContent&&b.data||null),c=function(a,d){var f,i,j;if(c&&(d||4===g.readyState))if(delete fc[h],c=void 0,g.onreadystatechange=n.noop,d)4!==g.readyState&&g.abort();else{j={},f=g.status,"string"==typeof g.responseText&&(j.text=g.responseText);try{i=g.statusText}catch(k){i=""}f||!b.isLocal||b.crossDomain?1223===f&&(f=204):f=j.text?200:404}j&&e(f,i,j,g.getAllResponseHeaders())},b.async?4===g.readyState?a.setTimeout(c):g.onreadystatechange=fc[h]=c:c()},abort:function(){c&&c(void 0,!0)}}}});function hc(){try{return new a.XMLHttpRequest}catch(b){}}function ic(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=d.head||n("head")[0]||d.documentElement;return{send:function(e,f){b=d.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||f(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var jc=[],kc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=jc.pop()||n.expando+"_"+Eb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(kc.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&kc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(kc,"$1"+e):b.jsonp!==!1&&(b.url+=(Fb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,jc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||d;var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ja([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var lc=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&lc)return lc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h,a.length)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function mc(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,n.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?("undefined"!=typeof e.getBoundingClientRect&&(d=e.getBoundingClientRect()),c=mc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Qa})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return Y(this,function(a,d,e){var f=mc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ua(l.pixelPosition,function(a,c){return c?(c=Sa(a,b),Oa.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({ +padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return Y(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var nc=a.jQuery,oc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=oc),b&&a.jQuery===n&&(a.jQuery=nc),n},b||(a.jQuery=a.$=n),n}); diff --git a/templates/kubrick/UTF-8/lang_cs.inc.php b/templates/kubrick/UTF-8/lang_cs.inc.php deleted file mode 100644 index 9905884a..00000000 --- a/templates/kubrick/UTF-8/lang_cs.inc.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php # lang_cs.inc.php 1.0 2009-08-14 20:10:15 VladaAjgl $ - -/** - * @version 1.0 - * @author Vladimír Ajgl <vlada@ajgl.cz> - * @translated 2009/08/14 - */@define('REPLY', 'Odpověď'); -@define('SAYS', 'říká'); -@define('LINK_TO_COMMENT', 'Odkaz ke komentáři č.%d'); -@define('ENTRY_POSTED_BY', 'Tento příspěvek napsal'); -@define('FILED_UNDER', 'a je zařazen v'); -@define('LEAVE_RESPONSE', 'Můžete %snechat odpověď%s nebo %sodezvu%s z Vašeho vlastního blogu.'); -@define('SUBJECT_TO_MODERATION', 'Všechny nové komentáře musí být před zobrazením schváleny.'); -@define('COMMENTS_CLOSED', 'Jak komentáře, tak odezvy jsou zakázány.'); -@define('PROUDLY_POWERED_BY', 'Hrdě hlásím, že můj blog běží na'); -?> \ No newline at end of file diff --git a/templates/kubrick/UTF-8/lang_cz.inc.php b/templates/kubrick/UTF-8/lang_cz.inc.php deleted file mode 100644 index 8c38ccb9..00000000 --- a/templates/kubrick/UTF-8/lang_cz.inc.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php # lang_cz.inc.php 1.0 2009-08-14 20:10:15 VladaAjgl $ - -/** - * @version 1.0 - * @author Vladimír Ajgl <vlada@ajgl.cz> - * @translated 2009/08/14 - */@define('REPLY', 'Odpověď'); -@define('SAYS', 'říká'); -@define('LINK_TO_COMMENT', 'Odkaz ke komentáři č.%d'); -@define('ENTRY_POSTED_BY', 'Tento příspěvek napsal'); -@define('FILED_UNDER', 'a je zařazen v'); -@define('LEAVE_RESPONSE', 'Můžete %snechat odpověď%s nebo %sodezvu%s z Vašeho vlastního blogu.'); -@define('SUBJECT_TO_MODERATION', 'Všechny nové komentáře musí být před zobrazením schváleny.'); -@define('COMMENTS_CLOSED', 'Jak komentáře, tak odezvy jsou zakázány.'); -@define('PROUDLY_POWERED_BY', 'Hrdě hlásím, že můj blog běží na'); -?> \ No newline at end of file diff --git a/templates/kubrick/comments.tpl b/templates/kubrick/comments.tpl deleted file mode 100644 index 71b0247b..00000000 --- a/templates/kubrick/comments.tpl +++ /dev/null @@ -1,28 +0,0 @@ -{foreach from=$comments item=comment name="comments"} - <a id="c{$comment.id}"></a> - <li class="{if $smarty.foreach.comments.iteration is odd}graybox{/if}" style="margin-left: {$comment.depth*20}px"> - <cite>{if $comment.url} - <a href="{$comment.url}" target="_blank">{$comment.author|@default:$CONST.ANONYMOUS}</a> - {else} - {$comment.author|@default:$CONST.ANONYMOUS} - {/if}</cite> {$CONST.SAYS}:<br /> - <div class="commentmetadata" id="serendipity_comment_{$comment.id}"> - <a href="#c{$comment.id}" title="{$CONST.LINK_TO_COMMENT|sprintf:$comment.trace}">#{$comment.trace}</a> - {$comment.timestamp|@formatTime:$CONST.DATE_FORMAT_SHORT} - {if $entry.is_entry_owner} - (<a href="{$comment.link_delete}" onclick="return confirm('{$CONST.COMMENT_DELETE_CONFIRM|@sprintf:$comment.id:$comment.author}');">{$CONST.DELETE}</a>) - {/if} - {if $entry.allow_comments AND $comment.body != 'COMMENT_DELETED'} - (<a href="#serendipity_CommentForm" id="serendipity_reply_{$comment.id}" onclick="document.getElementById('serendipity_replyTo').value='{$comment.id}'; {$comment_onchange}">{$CONST.REPLY}</a>) - <div id="serendipity_replyform_{$comment.id}"></div> - {/if} - </div> - {if $comment.body == 'COMMENT_DELETED'} - <p>{$CONST.COMMENT_IS_DELETED}</p> - {else} - <p>{$comment.body}</p> - {/if} - </li> -{foreachelse} - <p class="nocomments">{$CONST.NO_COMMENTS}</p> -{/foreach} diff --git a/templates/kubrick/config.inc.php b/templates/kubrick/config.inc.php deleted file mode 100644 index bc68b3aa..00000000 --- a/templates/kubrick/config.inc.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php # $Id$ - -if (IN_serendipity !== true) { - die ("Don't hack!"); -} - -$probelang = dirname(__FILE__) . '/lang_' . $serendipity['lang'] . '.inc.php'; -if (file_exists($probelang)) { - include $probelang; -} else { - include dirname(__FILE__) . '/lang_en.inc.php'; -} - -$template_config_groups = NULL; - -?> \ No newline at end of file diff --git a/templates/kubrick/entries.tpl b/templates/kubrick/entries.tpl deleted file mode 100644 index f17a1f4f..00000000 --- a/templates/kubrick/entries.tpl +++ /dev/null @@ -1,201 +0,0 @@ -<!-- ENTRIES START --> - {serendipity_hookPlugin hook="entries_header" addData="$entry_id"} - - {foreach from=$entries item="dategroup"} - {foreach from=$dategroup.entries item="entry"} - {assign var="entry" value=$entry scope="parent"} - <div class="post"> - <h2 id="post-{$entry.id}"><a href="{$entry.link}">{$entry.title}</a></h2> - {if !$is_single_entry}<div class="small">{$entry.timestamp|@formatTime:DATE_FORMAT_ENTRY}</div>{/if} - - {if $entry.categories} - <span class="categoryIcon"> - {foreach from=$entry.categories item="entry_category"} - {if $entry_category.category_icon} - <a href="{$entry_category.category_link}"><img class="categoryIcon" title="{$entry_category.category_name|@escape}{$entry_category.category_description|@emptyPrefix}" alt="{$entry_category.category_name|@escape}" src="{$entry_category.category_icon}" /></a> - {/if} - {/foreach} - </span> - {/if} - - <div class="entrytext"> - <div> - {$entry.body} - {if $is_single_entry} - <a id="extended"></a>{$entry.extended} - {/if} - </div> - - {if $entry.has_extended and not $is_single_entry and not $entry.is_extended} - <br /><a href="{$entry.link}#extended">{$CONST.VIEW_EXTENDED_ENTRY|@sprintf:$entry.title}</a><br /><br /> - {/if} - - <div class="postmetadata{if $is_single_entry} graybox{/if}"> - {if $is_single_entry} - - {$CONST.ENTRY_POSTED_BY} <a href="{$entry.link_author}">{$entry.author}</a> {$CONST.ON} {$entry.timestamp|@formatTime:DATE_FORMAT_ENTRY} {$CONST.AT} {$entry.timestamp|@formatTime:"%H:%M"}. - {if $entry.categories} - {$CONST.FILED_UNDER} {foreach from=$entry.categories item="entry_category" name="categories"}<a href="{$entry_category.category_link}">{$entry_category.category_name|@escape}</a>{if not $smarty.foreach.categories.last}, {/if}{/foreach}. - {/if} - {if $entry.allow_comments} - {$CONST.LEAVE_RESPONSE|sprintf:'<a href="#serendipity_CommentForm">':'</a>':"<a href=\"$entry[link]\">":'</a>'} - {if $entry.moderate_comments} - {$CONST.SUBJECT_TO_MODERATION} - {/if} - {else} - {$CONST.COMMENTS_CLOSED} - {/if} - - {else} - {$CONST.POSTED_BY} <a href="{$entry.link_author}">{$entry.author}</a> - {if $entry.categories} - {$CONST.IN} {foreach from=$entry.categories item="entry_category" name="categories"}<a href="{$entry_category.category_link}">{$entry_category.category_name|@escape}</a>{if not $smarty.foreach.categories.last}, {/if}{/foreach} - {/if} - - {if $dategroup.is_sticky} - {$CONST.ON} - {else} - {$CONST.AT} - {/if} <a href="{$entry.link}">{if $dategroup.is_sticky}{$entry.timestamp|@formatTime:DATE_FORMAT_ENTRY} {/if}{$entry.timestamp|@formatTime:'%H:%M'}</a> - - {if $entry.has_comments} - {if $use_popups} - | <a href="{$entry.link_popup_comments}" onclick="window.open(this.href, 'comments', 'width=480,height=480,scrollbars=yes'); return false;">{$entry.label_comments} ({$entry.comments})</a> - {else} - | <a href="{$entry.link}#comments">{$entry.label_comments} ({$entry.comments})</a> - {/if} - {/if} - - {if $entry.has_trackbacks} - {if $use_popups} - | <a href="{$entry.link_popup_trackbacks}" onclick="window.open(this.href, 'comments', 'width=480,height=480,scrollbars=yes'); return false;">{$entry.label_trackbacks} ({$entry.trackbacks})</a> - {else} - | <a href="{$entry.link}#trackbacks">{$entry.label_trackbacks} ({$entry.trackbacks})</a> - {/if} - {/if} - - {if $entry.is_entry_owner and not $is_preview} - | <a href="{$entry.link_edit}">{$CONST.EDIT_ENTRY}</a> - {/if} - {/if} - {$entry.add_footer} - </div> - </div> - </div> - <!-- - <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" - xmlns:dc="http://purl.org/dc/elements/1.1/"> - <rdf:Description - rdf:about="{$entry.link_rdf}" - trackback:ping="{$entry.link_trackback}" - dc:title="{$entry.title_rdf|@default:$entry.title}" - dc:identifier="{$entry.rdf_ident}" /> - </rdf:RDF> - --> - {$entry.plugin_display_dat} - - {if $is_single_entry and not $use_popups and not $is_preview} - {if $CONST.DATA_UNSUBSCRIBED} - <br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_UNSUBSCRIBED|@sprintf:$CONST.UNSUBSCRIBE_OK}</div><br /> - {/if} - - {if $CONST.DATA_TRACKBACK_DELETED} - <br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_TRACKBACK_DELETED|@sprintf:$CONST.TRACKBACK_DELETED}</div><br /> - {/if} - - {if $CONST.DATA_TRACKBACK_APPROVED} - <br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_TRACKBACK_APPROVED|@sprintf:$CONST.TRACKBACK_APPROVED}</div><br /> - {/if} - - {if $CONST.DATA_COMMENT_DELETED} - <br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_COMMENT_DELETED|@sprintf:$CONST.COMMENT_DELETED}</div><br /> - {/if} - - {if $CONST.DATA_COMMENT_APPROVED} - <br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_COMMENT_APPROVED|@sprintf:$CONST.COMMENT_APPROVED}</div><br /> - {/if} - <a id="trackbacks"></a><h3>{$CONST.TRACKBACKS}</h3> - <div class="serendipity_center"> - <a style="font-weight: normal" href="{$entry.link_trackback}" onclick="alert('{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|@escape:html}'); return false;" title="{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|@escape}">{$CONST.TRACKBACK_SPECIFIC}</a> - </div> - <ol class="commentlist"> - {serendipity_printTrackbacks entry=$entry.id} - </ol> - {/if} - - {if $is_single_entry and not $is_preview} - <a id="comments"></a><h3>{$CONST.COMMENTS}</h3> - <div class="serendipity_center">{$CONST.DISPLAY_COMMENTS_AS} - {if $entry.viewmode eq $CONST.VIEWMODE_LINEAR} - ({$CONST.COMMENTS_VIEWMODE_LINEAR} | <a rel="nofollow" href="{$entry.link_viewmode_threaded}#comments">{$CONST.COMMENTS_VIEWMODE_THREADED}</a>) - {else} - (<a rel="nofollow" href="{$entry.link_viewmode_linear}#comments">{$CONST.COMMENTS_VIEWMODE_LINEAR}</a> | {$CONST.COMMENTS_VIEWMODE_THREADED}) - {/if} - </div> - <br /> - <ol class="commentlist"> - {serendipity_printComments entry=$entry.id mode=$entry.viewmode} - </ol> - - {if $entry.is_entry_owner} - {if $entry.allow_comments} - <div class="serendipity_center">(<a href="{$entry.link_deny_comments}">{$CONST.COMMENTS_DISABLE}</a>)</div> - {else} - <div class="serendipity_center">(<a href="{$entry.link_allow_comments}">{$CONST.COMMENTS_ENABLE}</a>)</div> - {/if} - {/if} - <a id="feedback"></a> - - {foreach from=$comments_messagestack item="message"} - <div class="serendipity_center serendipity_msg_important">{$message}</div> - {/foreach} - - {if $is_comment_moderate} - - <br /> - <div class="serendipity_center serendipity_msg_notice">{$CONST.COMMENT_ADDED}<br />{$CONST.THIS_COMMENT_NEEDS_REVIEW}</div> - - {elseif $is_comment_added} - - <br /> - <div class="serendipity_center serendipity_msg_notice">{$CONST.COMMENT_ADDED}</div> - - {elseif not $entry.allow_comments} - - <br /> - <div class="serendipity_center serendipity_msg_important">{$CONST.COMMENTS_CLOSED}</div> - - {else} - - <br /> - <h3>{$CONST.ADD_COMMENT}</h3> - {$COMMENTFORM} - - {/if} - {/if} - - {$entry.backend_preview} - {/foreach} - {foreachelse} - {if not $plugin_clean_page} - {$CONST.NO_ENTRIES_TO_PRINT} - {/if} - {/foreach} - - <div class="navigation" style="text-align: center"> - {if $footer_prev_page} - <a href="{$footer_prev_page}">« {$CONST.PREVIOUS_PAGE}</a>   - {/if} - - {if $footer_info} - ({$footer_info}) - {/if} - - {if $footer_next_page} - <a href="{$footer_next_page}">» {$CONST.NEXT_PAGE}</a> - {/if} - - {serendipity_hookPlugin hook="entries_footer"} - </div> -<!-- ENTRIES END --> diff --git a/templates/kubrick/images/kubrickbg.jpg b/templates/kubrick/images/kubrickbg.jpg deleted file mode 100644 index ca66cdc2..00000000 Binary files a/templates/kubrick/images/kubrickbg.jpg and /dev/null differ diff --git a/templates/kubrick/images/kubrickbgcolor.jpg b/templates/kubrick/images/kubrickbgcolor.jpg deleted file mode 100644 index b6875ba4..00000000 Binary files a/templates/kubrick/images/kubrickbgcolor.jpg and /dev/null differ diff --git a/templates/kubrick/images/kubrickbgwide.jpg b/templates/kubrick/images/kubrickbgwide.jpg deleted file mode 100644 index 62d18641..00000000 Binary files a/templates/kubrick/images/kubrickbgwide.jpg and /dev/null differ diff --git a/templates/kubrick/images/kubrickfooter.jpg b/templates/kubrick/images/kubrickfooter.jpg deleted file mode 100644 index d47c7a64..00000000 Binary files a/templates/kubrick/images/kubrickfooter.jpg and /dev/null differ diff --git a/templates/kubrick/images/kubrickheader.jpg b/templates/kubrick/images/kubrickheader.jpg deleted file mode 100644 index 806b363e..00000000 Binary files a/templates/kubrick/images/kubrickheader.jpg and /dev/null differ diff --git a/templates/kubrick/images/kubricklogo.jpg b/templates/kubrick/images/kubricklogo.jpg deleted file mode 100644 index b183e437..00000000 Binary files a/templates/kubrick/images/kubricklogo.jpg and /dev/null differ diff --git a/templates/kubrick/images/kubrickportrait.png b/templates/kubrick/images/kubrickportrait.png deleted file mode 100644 index 02ce70b7..00000000 Binary files a/templates/kubrick/images/kubrickportrait.png and /dev/null differ diff --git a/templates/kubrick/index.tpl b/templates/kubrick/index.tpl deleted file mode 100644 index 2c1ae01f..00000000 --- a/templates/kubrick/index.tpl +++ /dev/null @@ -1,73 +0,0 @@ -{if $is_embedded != true} -{if $is_xhtml} -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -{else} -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" - "http://www.w3.org/TR/html4/loose.dtd"> -{/if} - -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$lang}" lang="{$lang}"> -<head> - <title>{$head_title|@default:$blogTitle} {if $head_subtitle} - {$head_subtitle}{/if}</title> - <meta http-equiv="Content-Type" content="text/html; charset={$head_charset}" /> - <meta name="generator" content="Serendipity v.{$serendipityVersion}" /> -{if ($view == "entry" || $view == "start" || $view == "feed" || $view == "plugin" || $staticpage_pagetitle != "" || $robots_index == 'index')} - <meta name="robots" content="index,follow" /> -{else} - <meta name="robots" content="noindex,follow" /> -{/if} -{if ($view == "entry")} - <link rel="canonical" href="{$entry.rdf_ident}" /> -{/if} -{if ($view == "start")} - <link rel="canonical" href="{$serendipityBaseURL}" /> -{/if} - <link rel="stylesheet" type="text/css" href="{$head_link_stylesheet}" /> - <link rel="alternate" type="application/rss+xml" title="{$blogTitle} RSS feed" href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/index.rss2" /> - <link rel="alternate" type="application/x.atom+xml" title="{$blogTitle} Atom feed" href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/atom.xml" /> -{if $entry_id} - <link rel="pingback" href="{$serendipityBaseURL}comment.php?type=pingback&entry_id={$entry_id}" /> -{/if} - -{serendipity_hookPlugin hook="frontend_header"} -</head> - -<body> -{else} -{serendipity_hookPlugin hook="frontend_header"} -{/if} -<div id="page"> -<div id="header" onclick="location.href='{$serendipityBaseURL}';" style="cursor: pointer;"> - <div id="headerimg"> - <h1>{$head_title|@default:$blogTitle}</h1> - <div class="description">{$head_subtitle|@default:$blogDescription}</div> - </div> -</div> -<hr /> - -<div id="content" class="narrowcolumn"> - {$CONTENT} -</div> - -{if $rightSidebarElements > 0} - <div id="sidebar"> - {serendipity_printSidebar side="right"} - {serendipity_printSidebar side="left"} - </div> -{/if} - -<hr /> -<div id="footer"> - <p> - {$CONST.PROUDLY_POWERED_BY} <a href="http://www.s9y.org">Serendipity {$serendipityVersion}</a>.<br /> - Design is <a href="http://binarybonsai.com/kubrick/">Kubrick</a>, by Michael Heilemann, ported by <a href="http://blog.dreamcoder.dk">Tom Sommer</a>. - </p> -</div> - -</div> -{serendipity_hookPlugin hook="frontend_footer"} -{if $is_embedded != true} -</body> -</html> -{/if} diff --git a/templates/kubrick/info.txt b/templates/kubrick/info.txt deleted file mode 100644 index 072815e1..00000000 --- a/templates/kubrick/info.txt +++ /dev/null @@ -1,3 +0,0 @@ -Name: Kubrick 1.2.6 port -Author: Tom Sommer -Date: 2013-02-03 diff --git a/templates/kubrick/lang_cs.inc.php b/templates/kubrick/lang_cs.inc.php deleted file mode 100644 index 6b73d4db..00000000 --- a/templates/kubrick/lang_cs.inc.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php # lang_cs.inc.php 1.0 2009-08-14 20:10:15 VladaAjgl $ - -/** - * @version 1.0 - * @author Vladim�r Ajgl <vlada@ajgl.cz> - * @translated 2009/08/14 - */@define('REPLY', 'Odpov��'); -@define('SAYS', '��k�'); -@define('LINK_TO_COMMENT', 'Odkaz ke koment��i �.%d'); -@define('ENTRY_POSTED_BY', 'Tento p��sp�vek napsal'); -@define('FILED_UNDER', 'a je za�azen v'); -@define('LEAVE_RESPONSE', 'M��ete %snechat odpov��%s nebo %sodezvu%s z Va�eho vlastn�ho blogu.'); -@define('SUBJECT_TO_MODERATION', 'V�echny nov� koment��e mus� b�t p�ed zobrazen�m schv�leny.'); -@define('COMMENTS_CLOSED', 'Jak koment��e, tak odezvy jsou zak�z�ny.'); -@define('PROUDLY_POWERED_BY', 'Hrd� hl�s�m, �e m�j blog b�� na'); -?> \ No newline at end of file diff --git a/templates/kubrick/lang_cz.inc.php b/templates/kubrick/lang_cz.inc.php deleted file mode 100644 index 6e839f14..00000000 --- a/templates/kubrick/lang_cz.inc.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php # lang_cz.inc.php 1.0 2009-08-14 20:10:15 VladaAjgl $ - -/** - * @version 1.0 - * @author Vladim�r Ajgl <vlada@ajgl.cz> - * @translated 2009/08/14 - */@define('REPLY', 'Odpov��'); -@define('SAYS', '��k�'); -@define('LINK_TO_COMMENT', 'Odkaz ke koment��i �.%d'); -@define('ENTRY_POSTED_BY', 'Tento p��sp�vek napsal'); -@define('FILED_UNDER', 'a je za�azen v'); -@define('LEAVE_RESPONSE', 'M��ete %snechat odpov��%s nebo %sodezvu%s z Va�eho vlastn�ho blogu.'); -@define('SUBJECT_TO_MODERATION', 'V�echny nov� koment��e mus� b�t p�ed zobrazen�m schv�leny.'); -@define('COMMENTS_CLOSED', 'Jak koment��e, tak odezvy jsou zak�z�ny.'); -@define('PROUDLY_POWERED_BY', 'Hrd� hl�s�m, �e m�j blog b�� na'); -?> \ No newline at end of file diff --git a/templates/kubrick/lang_de.inc.php b/templates/kubrick/lang_de.inc.php deleted file mode 100644 index 5b1f9432..00000000 --- a/templates/kubrick/lang_de.inc.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php # $Id$ -@define('REPLY', 'Antworten'); -@define('SAYS', 'schreibt'); -@define('LINK_TO_COMMENT', 'Link zu Kommentar #%d'); -@define('ENTRY_POSTED_BY', 'Dieser Eintrag wurde geschrieben von '); -@define('FILED_UNDER', 'und ist abgelegt in'); -@define('LEAVE_RESPONSE', 'Sie können einen %sKommentar hinterlassen%s, oder ein %sTrackback%s von Ihrem eigenen Blog senden.'); -@define('SUBJECT_TO_MODERATION', 'Alle neuen Kommentare werden moderiert, bevor sie auf dieser Seite erscheinen.'); -@define('COMMENTS_CLOSED', 'Sowohl Kommentare als auch Trackbacks sind derzeit deaktiviert.'); -@define('PROUDLY_POWERED_BY', 'Dieses Weblog wird betrieben mit '); -?> \ No newline at end of file diff --git a/templates/kubrick/lang_en.inc.php b/templates/kubrick/lang_en.inc.php deleted file mode 100644 index 78061d2c..00000000 --- a/templates/kubrick/lang_en.inc.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php # $Id$ -@define('REPLY', 'Reply'); -@define('SAYS', 'says'); -@define('LINK_TO_COMMENT', 'Link to comment #%d'); -@define('ENTRY_POSTED_BY', 'This entry was posted by'); -@define('FILED_UNDER', 'and is filed under'); -@define('LEAVE_RESPONSE', 'You can %sleave a response%s, or %strackback%s from your own blog.'); -@define('SUBJECT_TO_MODERATION', 'All new comments are subject to moderation before being displayed.'); -@define('COMMENTS_CLOSED', 'Both comments and trackbacks are currently closed.'); -@define('PROUDLY_POWERED_BY', 'My weblog is proudly powered by'); -?> \ No newline at end of file diff --git a/templates/kubrick/lang_ko.inc.php b/templates/kubrick/lang_ko.inc.php deleted file mode 100644 index 3848562a..00000000 --- a/templates/kubrick/lang_ko.inc.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php # $Id: lang_ko.inc.php,v 1.0 2005/07/28 00:00:00 wesley Exp $ -@define('REPLY', '답글'); -@define('SAYS', '왈'); -@define('LINK_TO_COMMENT', '%d번 덧글의 링크'); -@define('ENTRY_POSTED_BY', '이 글의 작성자는'); -@define('FILED_UNDER', '이며 범주는'); -@define('LEAVE_RESPONSE', '%s덧글을 남기거나%s 당신의 블로그에서 %s트랙백%s 할 수 있습니다.'); -@define('SUBJECT_TO_MODERATION', '모든 덧글은 표시가 되기 전에 검토 과정을 거치게 됩니다.'); -@define('COMMENTS_CLOSED', '덧글과 트랙백 기능은 현재 닫혀 있습니다.'); -@define('PROUDLY_POWERED_BY', '이 블로그의 작동 기반은'); -?> \ No newline at end of file diff --git a/templates/kubrick/preview.png b/templates/kubrick/preview.png deleted file mode 100644 index 8ba3a7ee..00000000 Binary files a/templates/kubrick/preview.png and /dev/null differ diff --git a/templates/kubrick/preview_fullsize.jpg b/templates/kubrick/preview_fullsize.jpg deleted file mode 100644 index bb20f328..00000000 Binary files a/templates/kubrick/preview_fullsize.jpg and /dev/null differ diff --git a/templates/kubrick/sidebar.tpl b/templates/kubrick/sidebar.tpl deleted file mode 100644 index f0bb23b4..00000000 --- a/templates/kubrick/sidebar.tpl +++ /dev/null @@ -1,8 +0,0 @@ -<ul> -{foreach from=$plugindata item=item} - <li> - {if $item.title != ""}<h2>{$item.title}</h2>{/if} - {$item.content} - </li> -{/foreach} -</ul> diff --git a/templates/kubrick/style.css b/templates/kubrick/style.css deleted file mode 100644 index ba4e958f..00000000 --- a/templates/kubrick/style.css +++ /dev/null @@ -1,653 +0,0 @@ -/* - Kubrick v1.2.5 for WordPress 1.2 - http://binarybonsai.com/kubrick/ - - This theme was designed and built by Michael Heilemann, - whose blog you will find at http://binarybonsai.com/ - - The CSS, XHTML and design is released under GPL: - http://www.opensource.org/licenses/gpl-license.php - - - *** REGARDING IMAGES *** - All CSS that involves the use of images, can be found in the 'index.php' file. - This is to ease installation inside subdirectories of a server. - - Have fun, and don't be afraid to contact me if you have questions. -*/ - - - -/* Begin Typography & Colors */ -body { - font-size: 62.5%; /* Resets 1em to 10px */ - font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif; - background-color: #d5d6d7; - color: #333; - text-align: center; - background: url("{TEMPLATE_PATH}images/kubrickbgcolor.jpg"); - } - -#page { - background-color: white; - border: 1px solid #959596; - text-align: left; - background: url("{TEMPLATE_PATH}images/kubrickbg.jpg") repeat-y top; border: none; - } - -#header { - background-color: #73a0c5; - background: url("{TEMPLATE_PATH}images/kubrickheader.jpg") no-repeat bottom center; - margin: 0 !important; margin: 0 0 0 1px; padding: 1px; height: 198px; width: 758px; - } - -#content { - font-size: 1.2em - } - -img.categoryIcon { - float: right; - border: 0px; - margin: 5px; -} - -#serendipityQuickSearchTermField { - width: 90%; -} - -.widecolumn .entry div { - font-size: 1.05em; - } - -.narrowcolumn .entry, .widecolumn .entry { - line-height: 1.4em; - } - -.widecolumn { - line-height: 1.6em; - } - -.graybox { - background-color: #f8f8f8; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - } - -#footer { - background-color: #eee; - background: url("{TEMPLATE_PATH}/images/kubrickfooter.jpg") no-repeat bottom; border: none; - } - -h1, h2, h3 { - font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif; - font-weight: bold; - } - -h1 { - font-size: 4em; - text-align: center; - } - -.description { - font-size: 1.2em; - text-align: center; - } - -h2 { - font-size: 1.6em; - } - -h2.pagetitle { - font-size: 1.6em; - } - -#sidebar h2 { - font-family: 'Lucida Grande', Verdana, Sans-Serif; - font-size: 1.2em; - } - -h3 { - font-size: 1.3em; - } - -h1, h1 a, h1 a:hover, h1 a:visited, .description { - text-decoration: none; - color: white; - } - -h2, h2 a, h2 a:visited, h3, h3 a, h3 a:visited { - color: #333; - } - -h2, h2 a, h2 a:hover, h2 a:visited, h3, h3 a, h3 a:hover, h3 a:visited, #sidebar h2, #wp-calendar caption, cite { - text-decoration: none; - } - -.entry div a:visited { - color: #b85b5a; - } - -.commentlist li, .serendipity_commentForm input, .serendipity_commentForm textarea { - font: 0.9em 'Lucida Grande', Verdana, Arial, Sans-Serif; - } - -.commentlist li { - font-weight: bold; - } - -.commentlist cite, .commentlist cite a { - font-weight: bold; - font-style: normal; - font-size: 1.1em; - } - -.commentlist p { - font-weight: normal; - line-height: 1.5em; - text-transform: none; - } - -.serendipity_commentForm { - font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif; - } - -.commentmetadata { - font-weight: normal; - } - -#sidebar { - font: 1em 'Lucida Grande', Verdana, Arial, Sans-Serif; - vertical-align: top; - } - -.small, #sidebar ul ul li, #sidebar ul ol li, .nocomments, .postmetadata, blockquote, strike { - color: #777; - } - -code { - font: 1.1em 'Courier New', Courier, Fixed; - } - -acronym, abbr, span.caps -{ - font-size: 0.9em; - letter-spacing: .07em; - } - -a, h2 a:hover, h3 a:hover { - color: #06c; - text-decoration: none; - } - -a:hover { - color: #147; - text-decoration: underline; - } - -#wp-calendar #prev a { - font-size: 9pt; - } - -#wp-calendar a { - text-decoration: none; - } - -#wp-calendar caption { - font: bold 1.3em 'Lucida Grande', Verdana, Arial, Sans-Serif; - text-align: center; - } - -#wp-calendar th { - font-style: normal; - text-transform: capitalize; - } -/* End Typography & Colors */ - - - -/* Begin Structure */ -body { - margin: 0; - padding: 0; - } - -#page { - background-color: white; - margin: 20px auto; - padding: 0; - width: 760px; - } - -#header { - padding: 0; - margin: 0 auto; - height: 200px; - width: 100%; - background-color: #73a0c5; - } - -#headerimg { - margin: 0; - height: 200px; - width: 100%; - } - -.narrowcolumn { - float: left; - padding: 0 0 20px 45px; - margin: 0px 0 0; - width: 450px; - } - -.widecolumn { - padding: 10px 0 20px 0; - margin: 5px 0 0 150px; - width: 450px; - } - -.post { - margin: 0 0 40px; - text-align: justify; - } - -.widecolumn .post { - margin: 0; - } - -.narrowcolumn .postmetadata { - padding-top: 5px; - font-family: Arial, Helvetica, Sans-Serif; - font-size: 0.9em; - line-height: 1.5em; - } - -.widecolumn .postmetadata { - margin: 30px 0; - } - -#footer { - padding: 0; - margin: 0 auto; - width: 760px; - clear: both; - } - -#footer p { - margin: 0; - padding: 20px 0; - text-align: center; - } -/* End Structure */ - - - -/* Begin Headers */ -h1 { - padding-top: 70px; - margin: 0; - } - -.description { - text-align: center; - } - -h2 { - margin: 30px 0 0; - } - -h2.pagetitle { - margin-top: 30px; - text-align: center; -} - -#sidebar h2 { - margin: 5px 0 0; - padding: 0; - } - -h3 { - padding: 0; - margin: 30px 0 0; - } - -h3.comments { - padding: 0; - margin: 40px auto 20px ; - } -/* End Headers */ - - - -/* Begin Images */ -div img { - padding: 0; - max-width: 100%; - } - -/* Using 'class="alignright"' on an image will (who would've - thought?!) align the image to the right. And using 'class="centered', - will of course center the image. This is much better than using - align="center", being much more futureproof (and valid) */ - -img.centered { - display: block; - margin-left: auto; - margin-right: auto; - } - -img.alignright { - padding: 4px; - margin: 0 0 2px 7px; - display: inline; - } - -img.alignleft { - padding: 4px; - margin: 0 7px 2px 0; - display: inline; - } - -.alignright { - float: right; - } - -.alignleft { - float: left - } -/* End Images */ - - - -/* Begin Lists - - Special stylized non-IE bullets - Do not work in Internet Explorer, which merely default to normal bullets. */ - -html>body .entry ul { - margin-left: 0px; - padding: 0 0 0 30px; - list-style: none; - padding-left: 10px; - text-indent: -10px; - } - -html>body .entry li { - margin: 7px 0 8px 10px; - } - -.entry ul li:before, #sidebar ul ul li:before { - content: "\00BB \0020"; - } - -.entry ol { - padding: 0 0 0 35px; - margin: 0; - } - -.entry ol li { - margin: 0; - padding: 0; - } - -.postmetadata ul, .postmetadata li { - display: inline; - list-style-type: none; - list-style-image: none; - } - -#sidebar ul, #sidebar ul ol { - margin: 0; - padding: 0; - } - -#sidebar ul li { - list-style-type: none; - list-style-image: none; - margin-bottom: 15px; - } - -#sidebar ul p, #sidebar ul select { - margin: 5px 0 8px; - } - -#sidebar ul ul, #sidebar ul ol { - margin: 5px 0 0 10px; - } - -#sidebar ul ul ul, #sidebar ul ol { - margin: 0 0 0 10px; - } - -ol li, #sidebar ul ol li { - list-style: decimal outside; - } - -#sidebar ul ul li, #sidebar ul ol li { - margin: 3px 0 0; - padding: 0; - } -/* End Entry Lists */ - - - -/* Begin Form Elements */ -#searchform { - margin: 10px auto; - padding: 5px 3px; - text-align: center; - } - -#sidebar #searchform #s { - width: 130px; - padding: 2px; - } - -#sidebar #searchsubmit { - padding: 1px; - } - -.entry form { /* This is mainly for password protected posts, makes them look better. */ - text-align:center; - } - -select { - width: 130px; - } - -.serendipity_calendarDay { - text-align: center; -} - -.serendipity_commentsValue input, -.serendipity_commentsValue select { - width: 100%; - padding: 2px; - } - -.serendipity_commentsValue textarea { - width: 100%; - padding: 2px; - } - -.serendipity_commentForm submit { - margin: 0; - float: right; - } -/* End Form Elements */ - - - -/* Begin Comments*/ -.graybox { - margin: 0; - padding: 10px; - } - -.commentlist { - padding: 0; - text-align: justify; - } - -.commentlist li { - margin: 15px 0 3px; - padding: 5px 10px 3px; - list-style: none; - } - -.commentlist p { - margin: 10px 5px 10px 0; - } - -.serendipity_commentForm { - margin: 5px 0; - } - -.serendipity_commentsLabel { - vertical-align:top; - } - -.nocomments { - text-align: center; - margin: 0; - padding: 0; - } - -.commentmetadata { - margin: 0; - display: block; - } -/* End Comments */ - - - -/* Begin Sidebar */ -#sidebar -{ - padding: 20px 0 10px 0; - margin-left: 545px; - width: 190px; - } - -#sidebar form { - margin: 0; - } -/* End Sidebar */ - - - -/* Begin Calendar */ -#wp-calendar { - empty-cells: show; - margin: 10px auto 0; - width: 155px; - } - -#wp-calendar #next a { - padding-right: 10px; - text-align: right; - } - -#wp-calendar #prev a { - padding-left: 10px; - text-align: left; - } - -#wp-calendar a { - display: block; - } - -#wp-calendar caption { - text-align: center; - width: 100%; - } - -#wp-calendar td { - padding: 3px 0; - text-align: center; - } - -#wp-calendar td.pad:hover { /* Doesn't work in IE */ - background-color: #fff; } -/* End Calendar */ - - - -/* Begin Various Tags & Classes */ -acronym, abbr, span.caps { - cursor: help; - } - -acronym, abbr { - border-bottom: 1px dashed #999; - } - -blockquote { - margin: 15px 30px 0 10px; - padding-left: 20px; - border-left: 5px solid #ddd; - } - -blockquote cite { - margin: 5px 0 0; - display: block; - } - -.center { - text-align: center; - } - -hr { - display: none; - } - -a img { - border: none; - } - -.navigation { - display: block; - text-align: center; - margin-top: 10px; - margin-bottom: 60px; - } -/* End Various Tags & Classes*/ - - - -/* "Daisy, Daisy, give me your answer do. I'm half crazy all for the love of you. - It won't be a stylish marriage, I can't afford a carriage. - But you'll look sweet upon the seat of a bicycle built for two." */ - - -/*** Additional plugin styles needed for the modernized output code ***/ -/*** added by Matthias 'YellowLed' Mees ***/ - -.plainList { - list-style: none; - margin-left: 0; - padding-left: 0; -} - -.container_serendipity_authors_plugin .serendipitySideBarContent div { - margin: 5px 0; - padding-left: 0; -} - -.serendipity_history_author { font-weight: bolder; } - -.serendipity_history_intro, -.serendipity_history_info { margin-bottom: 3px; } - -.serendipity_history_body { margin-bottom: 10px; } - -.serendipity_recententries_entrylink { margin-bottom: 2px; } - -.serendipity_recententries_entrydate { margin: 0 0 4px 0; } - -.plugin_comment_body { padding: 3px 0; } - -.serendipity_shoutbox_date { margin: 5px 0 2px 0; } - -.serendipity_shoutbox_comment { padding: 3px 0; } - -/*** End Additional plugin styles ***/ diff --git a/templates/kubrick/trackbacks.tpl b/templates/kubrick/trackbacks.tpl deleted file mode 100644 index 882084e1..00000000 --- a/templates/kubrick/trackbacks.tpl +++ /dev/null @@ -1,16 +0,0 @@ -{foreach from=$trackbacks item=trackback name="trackbacks"} - <li class="{if $smarty.foreach.comments.iteration is odd}graybox{/if}"> - <a id="c{$trackback.id}"></a> - <cite><a href="{$trackback.url|@strip_tags}" {'blank'|@xhtml_target}>{$trackback.title}</a></cite> - <p>{$trackback.body|@strip_tags|@escape:all}</p> - <div class="commentmetadata"> - <b>{$CONST.WEBLOG}:</b> {$trackback.author|@default:$CONST.ANONYMOUS}<br /> - <b>{$CONST.TRACKED}:</b> {$trackback.timestamp|@formatTime:'%b %d, %H:%M'} - {if $entry.is_entry_owner} - (<a href="{$serendipityBaseURL}comment.php?serendipity[delete]={$trackback.id}&serendipity[entry]={$trackback.entry_id}&serendipity[type]=trackbacks">{$CONST.DELETE}</a>) - {/if} - </div> - </li> -{foreachelse} - <p class="nocomments">{$CONST.NO_TRACKBACKS}</p> -{/foreach} diff --git a/templates/next/UTF-8/lang_ko.inc.php b/templates/next/UTF-8/lang_ko.inc.php new file mode 100644 index 00000000..4c75f2be --- /dev/null +++ b/templates/next/UTF-8/lang_ko.inc.php @@ -0,0 +1,16 @@ +<?php +// Theme options +@define('NEXT_INSTR', '<b>주의:</b> Next가 <em>보기에는</em> 2k11과 사실상 같아보여도 기술적으로는 완전히 다른 템플릿입니다. 그러므로 2k11용 user.css 생성기와는 호환되지 <strong>않습니다</strong>.<br>업데이트에 영향받지 않는 형태로 사용자 스타일을 추가하고자 할 경우 <code>/templates/next/user.css</code> 파일을 추가히시기 바랍니다. 자동으로 세렌디피디가 적용할 것입니다.'); +@define('NEXT_HEADER_IMG','배너 그림을 헤더에 적용하겠습니까? (폭은 1296픽셀, 미적용 시 비워둡니다)'); +@define('NEXT_USE_CORENAV', '전체 내비게이션을 사용하겠습니까?'); +@define('NEXT_WEBFONTS', '구글이 호스팅하는 웹 글꼴을 사용하겠습니까?'); +@define('NEXT_NOWEBFONT', '웹 글꼴 포함시키지 않기'); +@define('NEXT_USERSTYLES', 'user.css 파일을 사용하겠습니까? (템플릿 디렉토리에 해당 파일을 만들어두어야 합니다!)'); +@define('NEXT_REFCOMMENTS', '댓글에 관련 댓글로 이어지는 링크를 추가하겠습니까? (다른 댓글에 대한 답글일 경우)'); +// Lang constants +@define('NEXT_PLINK_TEXT', '링크'); +@define('NEXT_PLINK_TITLE', '이 댓글에 대한 고정 링크'); +@define('NEXT_PLACE_SEARCH', '단어 검색'); +@define('NEXT_SEND_MAIL', '발송'); +@define('NEXT_REPLYORIGIN', '원래글'); +@define('NEXT_NAVTEXT', '메뉴'); diff --git a/templates/next/index.tpl b/templates/next/index.tpl index 78f7cbf4..b155a3d3 100644 --- a/templates/next/index.tpl +++ b/templates/next/index.tpl @@ -91,7 +91,7 @@ {/if} <footer id="colophon" class="clearfix"> - <p lang="en">Powered by <a href="http://s9y.org">Serendipity</a> <abbr title="and">&</abbr> the <i>Next</i> theme.</p> + <p lang="en">Powered by <a href="http://s9y.org">Serendipity</a> <abbr title="and">&</abbr> the <i>{$template}</i> theme.</p> </footer> <script src="{serendipity_getFile file="scripts/master.js"}"></script> diff --git a/templates/next/info.txt b/templates/next/info.txt index 5efe5aa7..dda09484 100644 --- a/templates/next/info.txt +++ b/templates/next/info.txt @@ -2,3 +2,4 @@ Name: Next Author: Matthias Mees, mm@yellowled.de Date: 2015-05-07 Require Serendipity: 2.0 +Recommended: Yes \ No newline at end of file diff --git a/templates/next/lang_ko.inc.php b/templates/next/lang_ko.inc.php new file mode 100644 index 00000000..4c75f2be --- /dev/null +++ b/templates/next/lang_ko.inc.php @@ -0,0 +1,16 @@ +<?php +// Theme options +@define('NEXT_INSTR', '<b>주의:</b> Next가 <em>보기에는</em> 2k11과 사실상 같아보여도 기술적으로는 완전히 다른 템플릿입니다. 그러므로 2k11용 user.css 생성기와는 호환되지 <strong>않습니다</strong>.<br>업데이트에 영향받지 않는 형태로 사용자 스타일을 추가하고자 할 경우 <code>/templates/next/user.css</code> 파일을 추가히시기 바랍니다. 자동으로 세렌디피디가 적용할 것입니다.'); +@define('NEXT_HEADER_IMG','배너 그림을 헤더에 적용하겠습니까? (폭은 1296픽셀, 미적용 시 비워둡니다)'); +@define('NEXT_USE_CORENAV', '전체 내비게이션을 사용하겠습니까?'); +@define('NEXT_WEBFONTS', '구글이 호스팅하는 웹 글꼴을 사용하겠습니까?'); +@define('NEXT_NOWEBFONT', '웹 글꼴 포함시키지 않기'); +@define('NEXT_USERSTYLES', 'user.css 파일을 사용하겠습니까? (템플릿 디렉토리에 해당 파일을 만들어두어야 합니다!)'); +@define('NEXT_REFCOMMENTS', '댓글에 관련 댓글로 이어지는 링크를 추가하겠습니까? (다른 댓글에 대한 답글일 경우)'); +// Lang constants +@define('NEXT_PLINK_TEXT', '링크'); +@define('NEXT_PLINK_TITLE', '이 댓글에 대한 고정 링크'); +@define('NEXT_PLACE_SEARCH', '단어 검색'); +@define('NEXT_SEND_MAIL', '발송'); +@define('NEXT_REPLYORIGIN', '원래글'); +@define('NEXT_NAVTEXT', '메뉴'); diff --git a/templates/next/preview_fullsize.jpg b/templates/next/preview_fullsize.jpg index ce55dab1..cfa88b8b 100644 Binary files a/templates/next/preview_fullsize.jpg and b/templates/next/preview_fullsize.jpg differ diff --git a/templates/next/preview_iframe.tpl b/templates/next/preview_iframe.tpl index a9b78ae9..f94c5693 100644 --- a/templates/next/preview_iframe.tpl +++ b/templates/next/preview_iframe.tpl @@ -20,35 +20,44 @@ <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Droid+Serif:400,400italic,700,700italic"> {/if} {if $head_link_stylesheet_frontend} - <link rel="stylesheet" href="{$head_link_stylesheet_frontend}"> + <link rel="stylesheet" href="{$head_link_stylesheet_frontend}"> {else} <link rel="stylesheet" href="{$serendipityHTTPPath}{$serendipityRewritePrefix}serendipity.css"> {/if} <!--[if lte IE 8]> - <link rel="stylesheet" href="{serendipity_getFile file="oldie.css"}"> + <link rel="stylesheet" href="{serendipity_getFile file="oldie.css" frontend=true}"> <![endif]--> - <script src="{serendipity_getFile file="scripts/modernizr/modernizr.js"}"></script> + <script src="{serendipity_getFile file="scripts/modernizr/modernizr.js" frontend=true}"></script> {serendipity_hookPlugin hook="backend_header" hookAll="true"} - <script src="{serendipity_getFile file='admin/js/plugins.js'}"></script> - <script src="{serendipity_getFile file='admin/serendipity_editor.js'}"></script> <script type="text/javascript"> window.onload = function() {ldelim} - parent.document.getElementById('serendipity_iframe').style.height = document.getElementById('main').offsetHeight - + parseInt(document.getElementById('main').style.marginTop) - + parseInt(document.getElementById('main').style.marginBottom) - + 'px'; + parent.document.getElementById('serendipity_iframe').style.height = document.querySelector('html').offsetHeight + 'px'; parent.document.getElementById('serendipity_iframe').scrolling = 'no'; parent.document.getElementById('serendipity_iframe').style.border = 0; {rdelim} </script> </head> -<body style="padding: 0; margin: 0;"{if $template_option.webfonts != 'none'} class="{$template_option.webfonts}"{/if}> - <div id="main" class="clearfix" style="padding: 0; margin: 5px auto; width: 98%;"> - <main id="primary"> - {$preview} - </main> - </div> +<body {if $template_option.webfonts != 'none'} class="{$template_option.webfonts}"{/if}> + <main id="primary"> + {if $mode == 'save'} + <div style="float: left; height: 75px"></div> + {$updertHooks} + {if $res} + <div class="serendipity_msg_important">{$CONST.ERROR}: <b>{$res}</b></div> + {else} + {if $lastSavedEntry} + <script>$(document).ready(function() { + parent.document.forms['serendipityEntry']['serendipity[id]'].value = "{$lastSavedEntry}"; + }); + </script> + {/if} + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.ENTRY_SAVED}</span> + <a href="{$entrylink}" target="_blank">{$CONST.VIEW}</a> + {/if} + {/if} + {$preview} + </main> - <script src="{serendipity_getFile file="scripts/master.js"}"></script> + <script src="{serendipity_getFile file="scripts/master.js" frontend=true}"></script> </body> -</html> +</html> \ No newline at end of file diff --git a/templates/next/style.css b/templates/next/style.css index a451c2af..f310f081 100644 --- a/templates/next/style.css +++ b/templates/next/style.css @@ -474,11 +474,10 @@ nav ul, nav ol { clip: auto; height: auto; margin: 0; + max-height: none; overflow: visible; position: relative; width: auto; } - .js .nav-collapse.closed { - max-height: none; } .nav-collapse li { width: auto; } diff --git a/templates/s9y_banner_small.png b/templates/s9y_banner_small.png new file mode 100644 index 00000000..2ec3c0e2 Binary files /dev/null and b/templates/s9y_banner_small.png differ diff --git a/templates/skeleton/UTF-8/lang_de.inc.php b/templates/skeleton/UTF-8/lang_de.inc.php new file mode 100644 index 00000000..1c94ab69 --- /dev/null +++ b/templates/skeleton/UTF-8/lang_de.inc.php @@ -0,0 +1,2 @@ +<?php +@define('USE_CORENAV', 'Globale Navigation einbinden?'); diff --git a/templates/skeleton/UTF-8/lang_en.inc.php b/templates/skeleton/UTF-8/lang_en.inc.php new file mode 100644 index 00000000..518ce254 --- /dev/null +++ b/templates/skeleton/UTF-8/lang_en.inc.php @@ -0,0 +1,2 @@ +<?php +@define('USE_CORENAV', 'Use global navigation?'); diff --git a/templates/skeleton/commentform.tpl b/templates/skeleton/commentform.tpl new file mode 100644 index 00000000..369b3e3e --- /dev/null +++ b/templates/skeleton/commentform.tpl @@ -0,0 +1,52 @@ +<div id="serendipityCommentFormC" class="serendipityCommentForm"> + <div id="serendipity_replyform_0"></div> + <a id="serendipity_CommentForm"></a> +{if $is_moderate_comments} + <p class="serendipity_msg_important">{$CONST.COMMENTS_WILL_BE_MODERATED}</p> +{/if} + <form id="serendipity_comment" action="{$commentform_action}#feedback" method="post"> + <input type="hidden" name="serendipity[entry_id]" value="{$commentform_id}"> + + <div class="form_field"> + <label for="serendipity_commentform_name">{$CONST.NAME}{if $required_fields.name}*{/if}</label> + <input id="serendipity_commentform_name" class="u-full-width" type="text" name="serendipity[name]" value="{$commentform_name}"{if $required_fields.name} required{/if}> + </div> + + <div class="form_field"> + <label for="serendipity_commentform_email">{$CONST.EMAIL}{if $required_fields.email}*{/if}</label> + <input id="serendipity_commentform_email" class="u-full-width" type="email" name="serendipity[email]" value="{$commentform_email}"{if $required_fields.email} required{/if}> + </div> + + <div class="form_field"> + <label for="serendipity_commentform_url">{$CONST.HOMEPAGE}{if $required_fields.url}*{/if}</label> + <input id="serendipity_commentform_url" class="u-full-width" type="url" name="serendipity[url]" value="{$commentform_url}"{if $required_fields.url} required{/if}> + </div> + + <div class="form_select"> + <label for="serendipity_replyTo">{$CONST.IN_REPLY_TO}</label> + {$commentform_replyTo} + </div> + + <div class="form_area"> + <label for="serendipity_commentform_comment">{$CONST.COMMENT}{if $required_fields.comment}*{/if}</label> + <textarea id="serendipity_commentform_comment" class="u-full-width" rows="10" name="serendipity[comment]"{if $required_fields.comment} required{/if}>{$commentform_data}</textarea> + </div> + {serendipity_hookPlugin hook="frontend_comment" data=$commentform_entry} + {if $is_commentform_showToolbar} + <label for="checkbox_remember"> + <input id="checkbox_remember" type="checkbox" name="serendipity[remember]" {$commentform_remember}> + <span class="label-body">{$CONST.REMEMBER_INFO}</span> + </label> + {if $is_allowSubscriptions} + <label for="checkbox_subscribe"> + <input id="checkbox_subscribe" type="checkbox" name="serendipity[subscribe]" {$commentform_subscribe}> + <span class="label-body">{$CONST.SUBSCRIBE_TO_THIS_ENTRY}</span> + </label> + {/if} + {/if} + <div class="form_buttons"> + <input id="serendipity_preview" type="submit" name="serendipity[preview]" value="{$CONST.PREVIEW}"> + <input id="serendipity_submit" class="button-primary" type="submit" name="serendipity[submit]" value="{$CONST.SUBMIT_COMMENT}"> + </div> + </form> +</div> diff --git a/templates/skeleton/comments.tpl b/templates/skeleton/comments.tpl new file mode 100644 index 00000000..e7adb969 --- /dev/null +++ b/templates/skeleton/comments.tpl @@ -0,0 +1,20 @@ +{foreach from=$comments item=comment name="comments"} + <article id="c{$comment.id}" class="comment commentlevel_{if $comment.depth > 8}9{else}{$comment.depth}{/if}"> + <h4>{if $comment.url}<a href="{$comment.url}">{/if}{$comment.author|default:$CONST.ANONYMOUS}{if $comment.url}</a>{/if} {$CONST.ON} <time datetime="{$comment.timestamp|serendipity_html5time}">{$comment.timestamp|formatTime:$template_option.date_format}</time>:</h4> + + <div class="comment_content u-cf"> + {if $comment.avatar}{$comment.avatar}{/if} + {if $comment.body == 'COMMENT_DELETED'} + <p class="serendipity_msg_important">{$CONST.COMMENT_IS_DELETED}</p> + {else} + {$comment.body} + {/if} + </div> + {if $entry.allow_comments AND $comment.body != 'COMMENT_DELETED'} + <a id="serendipity_reply_{$comment.id}" class="comment_reply" href="#serendipity_CommentForm" onclick="document.getElementById('serendipity_replyTo').value='{$comment.id}'; {$comment_onchange}">{$CONST.REPLY}</a> + <div id="serendipity_replyform_{$comment.id}"></div> + {/if} + </article> +{foreachelse} + <p class="serendipity_msg_notice">{$CONST.NO_COMMENTS}</p> +{/foreach} diff --git a/templates/skeleton/config.inc.php b/templates/skeleton/config.inc.php new file mode 100644 index 00000000..8ef2f854 --- /dev/null +++ b/templates/skeleton/config.inc.php @@ -0,0 +1,61 @@ +<?php +if (IN_serendipity !== true) { die ("Don't hack!"); } + +@serendipity_plugin_api::load_language(dirname(__FILE__)); + +$serendipity['smarty']->assign(array('currpage' => "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'], + 'currpage2' => $_SERVER['REQUEST_URI'])); + +if (class_exists('serendipity_event_spamblock')) { + $required_fieldlist = serendipity_db_query("SELECT value FROM {$serendipity['dbPrefix']}config WHERE name LIKE '%spamblock%required_fields'", true, 'assoc'); +} elseif (class_exists('serendipity_event_commentspice')) { + $required_fieldlist = serendipity_db_query("SELECT value FROM {$serendipity['dbPrefix']}config WHERE name LIKE '%commentspice%required_fields'", true, 'assoc'); +} + +if (is_array($required_fieldlist)) { + $required_fields = explode(',', $required_fieldlist['value']); + $smarty_required_fields = array(); + + foreach($required_fields AS $required_field) { + $required_field = trim($required_field); + + if (empty($required_field)) continue; + $smarty_required_fields[$required_field] = $required_field; + } + + $serendipity['smarty']->assign('required_fields', $smarty_required_fields); +} + +$template_config = array( + array( + 'var' => 'date_format', + 'name' => GENERAL_PLUGIN_DATEFORMAT . " (http://php.net/strftime)", + 'type' => 'select', + 'default' => DATE_FORMAT_ENTRY, + 'select_values' => array(DATE_FORMAT_ENTRY => DATE_FORMAT_ENTRY, + '%A, %e. %B %Y' => '%A, %e. %B %Y', + '%a, %e. %B %Y' => '%a, %e. %B %Y', + '%e. %B %Y' => '%e. %B %Y', + '%d.%m.%y' => '%d.%m.%y', + '%d.%m.%Y' => '%d.%m.%Y', + '%A, %m/%d/%Y' => '%A, %m/%d/%Y', + '%a, %m/%d/%y' => '%a, %m/%d/%y', + '%m/%d/%y' => '%m/%d/%y', + '%m/%d/%Y' => '%m/%d/%Y', + '%Y-%m-%d' => '%Y-%m-%d') + ), + array( + 'var' => 'use_corenav', + 'name' => USE_CORENAV, + 'type' => 'boolean', + 'default' => true + ) +); + +$template_global_config = array('navigation' => true); +$template_loaded_config = serendipity_loadThemeOptions($template_config, $serendipity['smarty_vars']['template_option'], true); +serendipity_loadGlobalThemeOptions($template_config, $template_loaded_config, $template_global_config); + +if ($_SESSION['serendipityUseTemplate']) { + $template_loaded_config['use_corenav'] = false; +} diff --git a/templates/skeleton/content.tpl b/templates/skeleton/content.tpl new file mode 100644 index 00000000..cb06460f --- /dev/null +++ b/templates/skeleton/content.tpl @@ -0,0 +1,7 @@ +{if $searchresult_tooShort or $searchresult_error or $searchresult_noEntries or $searchresult_results} + <p class="search_posts"><b>{$CONST.QUICKSEARCH}</b> {$content_message}</p> +{elseif $content_message} + <p>{$content_message}</p> +{/if} +{$ENTRIES} +{$ARCHIVES} diff --git a/templates/skeleton/entries.tpl b/templates/skeleton/entries.tpl new file mode 100644 index 00000000..8001b3c6 --- /dev/null +++ b/templates/skeleton/entries.tpl @@ -0,0 +1,131 @@ +{serendipity_hookPlugin hook="entries_header" addData="$entry_id"} +{foreach from=$entries item="dategroup"} + {foreach from=$dategroup.entries item="entry"} + {assign var="entry" value=$entry scope=parent} + <article class="post{if $dategroup.is_sticky} post_sticky{/if}"> + <header> + <h2><a href="{$entry.link}">{$entry.title}</a></h2> + + <p class="post_byline">{$CONST.POSTED_BY} <a href="{$entry.link_author}">{$entry.author}</a> {$CONST.ON} <time datetime="{$entry.timestamp|serendipity_html5time}">{$entry.timestamp|formatTime:$template_option.date_format}</time></p> + </header> + + <div class="post_content"> + {if $entry.categories}{foreach from=$entry.categories item="entry_category"}{if $entry_category.category_icon}<a href="{$entry_category.category_link}"><img class="serendipity_entryIcon" title="{$entry_category.category_name|escape}{$entry_category.category_description|emptyPrefix}" alt="{$entry_category.category_name|escape}" src="{$entry_category.category_icon}"></a>{/if}{/foreach}{/if} + {$entry.body} + {if $entry.has_extended and not $is_single_entry and not $entry.is_extended} + <a class="button read_more" href="{$entry.link}#extended">{$CONST.VIEW_EXTENDED_ENTRY|sprintf:$entry.title}</a> + {/if} + </div> + {if $entry.is_extended} + <div id="extended" class="post_content"> + {$entry.extended} + </div> + {/if} + + <footer class="post_footer u-cf"> + <div class="post_meta"> + {if $entry.categories} + <span class="info_label">{$CONST.CATEGORIES}: </span>{foreach from=$entry.categories item="entry_category" name="categories"}<a href="{$entry_category.category_link}">{$entry_category.category_name|escape}</a>{if not $smarty.foreach.categories.last}, {/if}{/foreach} + {/if} + {if $entry.categories and $entry.has_comments} | {/if} + {if $entry.has_comments} + <a href="{$entry.link}#comments" title="{$entry.comments} {$entry.label_comments}{if $entry.has_trackbacks}, {$entry.trackbacks} {$entry.label_trackbacks}{/if}">{$entry.comments} {$entry.label_comments}</a> + {/if} + </div> + {$entry.add_footer} + {$entry.plugin_display_dat} + </footer> + <!-- + <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" + xmlns:dc="http://purl.org/dc/elements/1.1/"> + <rdf:Description + rdf:about="{$entry.link_rdf}" + trackback:ping="{$entry.link_trackback}" + dc:title="{$entry.title_rdf|default:$entry.title}" + dc:identifier="{$entry.rdf_ident}" /> + </rdf:RDF> + --> +{if $is_single_entry and not $use_popups and not $is_preview} + {if $CONST.DATA_UNSUBSCRIBED} + <p class="serendipity_msg_notice">{$CONST.DATA_UNSUBSCRIBED|sprintf:$CONST.UNSUBSCRIBE_OK}</p> + {/if} + {if $CONST.DATA_TRACKBACK_DELETED} + <p class="serendipity_msg_important">{$CONST.DATA_TRACKBACK_DELETED|sprintf:$CONST.TRACKBACK_DELETED}</p> + {/if} + {if $CONST.DATA_TRACKBACK_APPROVED} + <p class="serendipity_msg_notice">{$CONST.DATA_TRACKBACK_APPROVED|sprintf:$CONST.TRACKBACK_APPROVED}</p> + {/if} + {if $CONST.DATA_COMMENT_DELETED} + <p class="serendipity_msg_important">{$CONST.DATA_COMMENT_DELETED|sprintf:$CONST.COMMENT_DELETED}</p> + {/if} + {if $CONST.DATA_COMMENT_APPROVED} + <p class="serendipity_msg_notice">{$CONST.DATA_COMMENT_APPROVED|sprintf:$CONST.COMMENT_APPROVED}</p> + {/if} + <section id="trackbacks"> + <h3>{$CONST.TRACKBACKS}</h3> + + <a class="button trackback_url" rel="nofollow" href="{$entry.link_trackback}" onclick="alert('{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|escape:'htmlall'}'); return false;" title="{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|escape:'htmlall'}">{$CONST.TRACKBACK_SPECIFIC}</a> + + {serendipity_printTrackbacks entry=$entry.id} + </section> +{/if} +{if $is_single_entry and not $is_preview} + <section id="comments"> + <h3>{$CONST.COMMENTS}</h3> + + <div class="comments_view">{$CONST.DISPLAY_COMMENTS_AS} {if $entry.viewmode eq $CONST.VIEWMODE_LINEAR}{$CONST.COMMENTS_VIEWMODE_LINEAR} | <a href="{$entry.link_viewmode_threaded}#comments" rel="nofollow">{$CONST.COMMENTS_VIEWMODE_THREADED}</a>{else}<a rel="nofollow" href="{$entry.link_viewmode_linear}#comments">{$CONST.COMMENTS_VIEWMODE_LINEAR}</a> | {$CONST.COMMENTS_VIEWMODE_THREADED}{/if}</div> + + {serendipity_printComments entry=$entry.id mode=$entry.viewmode} + {if $entry.is_entry_owner} + {if $entry.allow_comments} + <a class="comments_enable" href="{$entry.link_deny_comments}">{$CONST.COMMENTS_DISABLE}</a> + {else} + <a class="comments_enable" href="{$entry.link_allow_comments}">{$CONST.COMMENTS_ENABLE}</a> + {/if} + {/if} + </section> + + <a id="feedback"></a> + {foreach from=$comments_messagestack item="message"} + <p class="serendipity_msg_important">{$message}</p> + {/foreach} + {if $is_comment_added} + <p class="serendipity_msg_notice">{$CONST.COMMENT_ADDED}</p> + {elseif $is_comment_moderate} + <p class="serendipity_msg_important">{$CONST.COMMENT_ADDED}{$CONST.THIS_COMMENT_NEEDS_REVIEW}</p> + {elseif not $entry.allow_comments} + <p class="serendipity_msg_important">{$CONST.COMMENTS_CLOSED}</p> + {else} + <section id="reply"> + <h3>{$CONST.ADD_COMMENT}</h3> + {$COMMENTFORM} + </section> + {/if} +{/if} + {$entry.backend_preview} + </article> + {/foreach} +{foreachelse} + {if not $plugin_clean_page} + <p class="serendipity_msg_notice">{$CONST.NO_ENTRIES_TO_PRINT}</p> + {/if} +{/foreach} +{if not $is_preview} + {if $staticpage_pagetitle == ''} + <nav class="pager u-cf" role="navigation"> + <p>{$footer_info}</p> + {if $footer_prev_page || $footer_next_page} + <ul class="plainList"> + {if $footer_prev_page} + <li class="pager_prev u-pull-left"><a class="button button-primary" href="{$footer_prev_page}">{$CONST.PREVIOUS_PAGE}</a></li> + {/if} + {if $footer_next_page} + <li class="pager_next u-pull-right"><a class="button button-primary" href="{$footer_next_page}">{$CONST.NEXT_PAGE}</a></li> + {/if} + </ul> + {/if} + </nav> + {/if} +{/if} +{serendipity_hookPlugin hook="entries_footer"} diff --git a/templates/skeleton/entries_archives.tpl b/templates/skeleton/entries_archives.tpl new file mode 100644 index 00000000..cba65083 --- /dev/null +++ b/templates/skeleton/entries_archives.tpl @@ -0,0 +1,18 @@ +{serendipity_hookPlugin hook="entries_header"} +<article class="archive archive_overview"> + <h2>{$CONST.ARCHIVES}</h2> +{foreach from=$archives item="archive"} + <section class="archive_year"> + <h3>{$archive.year}</h3> + + <ul class="plainList"> + {foreach from=$archive.months item="month"} + <li><span class="archive_date">{if $month.entry_count}<a href="{$month.link}" title="{$CONST.VIEW_FULL}">{/if}{$month.date|formatTime:"%B"}{if $month.entry_count}</a>{/if}:</span> + <span class="archive_count">{if $month.entry_count}<a href="{$month.link_summary}" title="{$CONST.VIEW_TOPICS}">{/if}{$month.entry_count} {$CONST.ENTRIES}{if $month.entry_count}</a>{/if}</span> + </li> + {/foreach} + </ul> + </section> +{/foreach} +</article> +{serendipity_hookPlugin hook="entries_footer"} diff --git a/templates/skeleton/entries_summary.tpl b/templates/skeleton/entries_summary.tpl new file mode 100644 index 00000000..f203781a --- /dev/null +++ b/templates/skeleton/entries_summary.tpl @@ -0,0 +1,15 @@ +{serendipity_hookPlugin hook="entries_header"} +<article class="archive archive_summary"> + <h2>{$CONST.TOPICS_OF} {$dateRange.0|formatTime:"%B %Y"}</h2> + + <ul class="plainList"> + {foreach from=$entries item="sentries"} + {foreach from=$sentries.entries item="entry"} + <li><a href="{$entry.link}">{$entry.title}</a> + <span class="archive_byline">{$CONST.POSTED_BY} <a href="{$entry.link_author}">{$entry.author}</a> {$CONST.ON} <time datetime="{$entry.timestamp|serendipity_html5time}">{$entry.timestamp|formatTime:$template_option.date_format}</time></span> + </li> + {/foreach} + {/foreach} + </ul> +</article> +{serendipity_hookPlugin hook="entries_footer"} diff --git a/templates/skeleton/img/xml.gif b/templates/skeleton/img/xml.gif new file mode 100644 index 00000000..b0e4adf1 Binary files /dev/null and b/templates/skeleton/img/xml.gif differ diff --git a/templates/skeleton/index.tpl b/templates/skeleton/index.tpl new file mode 100644 index 00000000..ff3554ae --- /dev/null +++ b/templates/skeleton/index.tpl @@ -0,0 +1,86 @@ +{if $is_embedded != true} +<!DOCTYPE html> +<html lang="{$lang}"> +<head> + <meta charset="{$head_charset}"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>{$head_title|default:$blogTitle}{if $head_subtitle} | {$head_subtitle}{/if}</title> + <meta name="generator" content="Serendipity v.{$head_version}"> +{if ($view == "entry" || $view == "start" || $view == "feed" || $view == "plugin" || $staticpage_pagetitle != "" || $robots_index == 'index')} + <meta name="robots" content="index,follow"> +{else} + <meta name="robots" content="noindex,follow"> +{/if} +{if ($view == "entry")} + <link rel="canonical" href="{$entry.rdf_ident}"> +{/if} +{if ($view == "start")} + <link rel="canonical" href="{$serendipityBaseURL}"> +{/if} + <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway:400,300,600"> + <link rel="stylesheet" href="{$head_link_stylesheet}"> + <link rel="alternate" type="application/rss+xml" title="{$blogTitle} RSS feed" href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/index.rss2"> + <link rel="alternate" type="application/x.atom+xml" title="{$blogTitle} Atom feed" href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/atom.xml"> +{if $entry_id} + <link rel="pingback" href="{$serendipityBaseURL}comment.php?type=pingback&entry_id={$entry_id}"> +{/if} +{serendipity_hookPlugin hook="frontend_header"} +</head> +<body> +{else} +{serendipity_hookPlugin hook="frontend_header"} +{/if} +{if $is_raw_mode != true} + <header class="page_header" role="banner"> + <div class="container"> + <div class="row"> + <h1 class="twelve columns"><a href="{$serendipityBaseURL}">{$blogTitle}</a></h1> + </div> + </div> + </header> + {if $template_option.use_corenav} + <nav class="primary-nav" role="navigation"> + <div class="container"> + <div class="row"> + <ul class="twelwe columsn plainList">{foreach from=$navlinks item="navlink" name="sbnav"}{if $navlink.title!=""&&$navlink.href!=""}<li>{if $currpage==$navlink.href or $currpage2==$navlink.href}<span>{else}<a href="{$navlink.href}">{/if}{$navlink.title}{if $currpage==$navlink.href or $currpage2==$navlink.href}</span>{else}</a>{/if}</li>{/if}{/foreach}</ul> + </div> + </div> + </nav> + {/if} + <div class="container"> + <div class="row"> + <main class="eight columns" role="main"> + {$CONTENT} + </main> + + <aside class="four columns" role="complementary"> + <section class="sidebar_widget sidebar_search"> + <h3><label for="serendipityQuickSearchTermField">{$CONST.QUICKSEARCH}</label></h3> + + <form id="searchform" action="{$serendipityHTTPPath}{$serendipityIndexFile}" method="get" role="search"> + <input type="hidden" name="serendipity[action]" value="search"> + <input id="serendipityQuickSearchTermField" name="serendipity[searchTerm]" type="search" placeholder="{$CONST.NEXT_PLACE_SEARCH}" value=""> + <input id="searchsend" name="serendipity[searchButton]" type="submit" value="{$CONST.GO}"> + </form> + {serendipity_hookPlugin hook="quicksearch_plugin" hookAll="true"} + </section> + {if $leftSidebarElements > 0}{serendipity_printSidebar side="left"}{/if} + {if $rightSidebarElements > 0}{serendipity_printSidebar side="right"}{/if} + </aside> + </div> + </div> + + <footer class="page-footer" role="contentinfo"> + <div class="container"> + <div class="row"> + <p class="twelve columns credit">Powered by <a href="http://s9y.org">Serendipity</a></p> + </div> + </div> + </footer> +{/if} +{$raw_data} +{serendipity_hookPlugin hook="frontend_footer"} +{if $is_embedded != true} +</body> +</html> +{/if} diff --git a/templates/skeleton/info.txt b/templates/skeleton/info.txt new file mode 100644 index 00000000..19624c1a --- /dev/null +++ b/templates/skeleton/info.txt @@ -0,0 +1,5 @@ +Name: Skeleton +Author: Matthias Mees, based on http://getskeleton.com +Date: 2016-09-19 +Require Serendipity: 2.0 +Recommended: Yes diff --git a/templates/skeleton/lang_de.inc.php b/templates/skeleton/lang_de.inc.php new file mode 100644 index 00000000..1c94ab69 --- /dev/null +++ b/templates/skeleton/lang_de.inc.php @@ -0,0 +1,2 @@ +<?php +@define('USE_CORENAV', 'Globale Navigation einbinden?'); diff --git a/templates/skeleton/lang_en.inc.php b/templates/skeleton/lang_en.inc.php new file mode 100644 index 00000000..518ce254 --- /dev/null +++ b/templates/skeleton/lang_en.inc.php @@ -0,0 +1,2 @@ +<?php +@define('USE_CORENAV', 'Use global navigation?'); diff --git a/templates/skeleton/plugin_categories.tpl b/templates/skeleton/plugin_categories.tpl new file mode 100644 index 00000000..25ff1c4d --- /dev/null +++ b/templates/skeleton/plugin_categories.tpl @@ -0,0 +1,22 @@ +{if $is_form} +<form id="serendipity_category_form" action="{$form_url}" method="post"> +{/if} + <ul class="serendipity_categories_list"> + {foreach from=$categories item="plugin_category"} + <li class="category_depth{$plugin_category.catdepth}"> + {if $is_form} + <input type="checkbox" name="serendipity[multiCat][]" value="{$plugin_category.categoryid}"> + {/if} + {if !empty($category_image)} + <a class="serendipity_xml_icon" href="{$plugin_category.feedCategoryURL}"><img src="{$category_image}" alt="XML"></a> + {/if} + <a href="{$plugin_category.categoryURL}" title="{$plugin_category.category_description|escape}">{$plugin_category.category_name|escape}</a> + </li> + {/foreach} + </ul> +{if $is_form} + <input id="category_submit" class="button-primary" type="submit" name="serendipity[isMultiCat]" value="{$CONST.GO}"> +{/if} +{if $is_form} +</form> +{/if} diff --git a/templates/skeleton/plugin_contactform.tpl b/templates/skeleton/plugin_contactform.tpl new file mode 100644 index 00000000..e2cc506f --- /dev/null +++ b/templates/skeleton/plugin_contactform.tpl @@ -0,0 +1,48 @@ +<article class="page"> + <h2>{if $plugin_contactform_articleformat}{$plugin_contactform_name}{else}{$plugin_contactform_pagetitle}{/if}</h2> + + <div class="page_content page_preface"> + {$plugin_contactform_preface} + </div> +{if $is_contactform_sent} + <p class="serendipity_msg_notice">{$plugin_contactform_sent}</p> +{else} + {if $is_contactform_error} + <p class="serendipity_msg_important">{$plugin_contactform_error}</p> + {foreach from=$comments_messagestack item="message"} + <p class="serendipity_msg_important">{$message}</p> + {/foreach} + {/if} + <div class="serendipityCommentForm"> + <a id="serendipity_CommentForm"></a> + <form id="serendipity_comment" action="{$commentform_action}#feedback" method="post"> + <input type="hidden" name="serendipity[subpage]" value="{$commentform_sname}"> + <input type="hidden" name="serendipity[commentform]" value="true"> + + <div class="form_field"> + <label for="serendipity_commentform_name">{$CONST.NAME}{if $required_fields.name}*{/if}</label> + <input id="serendipity_commentform_name" class="u-full-width" type="text" name="serendipity[name]" value="{$commentform_name}"{if $required_fields.name} required{/if}> + </div> + + <div class="form_field"> + <label for="serendipity_commentform_email">{$CONST.EMAIL}{if $required_fields.email}*{/if}</label> + <input id="serendipity_commentform_email" class="u-full-width" type="email" name="serendipity[email]" value="{$commentform_email}"{if $required_fields.email} required{/if}> + </div> + + <div class="form_field"> + <label for="serendipity_commentform_url">{$CONST.HOMEPAGE}{if $required_fields.url}*{/if}</label> + <input id="serendipity_commentform_url" class="u-full-width" type="url" name="serendipity[url]" value="{$commentform_url}"{if $required_fields.url} required{/if}> + </div> + + <div class="form_area"> + <label for="serendipity_commentform_comment">{$CONST.COMMENT}{if $required_fields.comment}*{/if}</label> + <textarea id="serendipity_commentform_comment" class="u-full-width" rows="10" name="serendipity[comment]"{if $required_fields.comment} required{/if}>{$commentform_data}</textarea> + </div> + {serendipity_hookPlugin hook="frontend_comment" data=$commentform_entry} + <div class="form_buttons"> + <input id="serendipity_submit" class="button-primary" type="submit" name="serendipity[submit]" value="{$CONST.SUBMIT_COMMENT}"> + </div> + </form> + </div> +{/if} +</article> diff --git a/templates/skeleton/plugin_staticpage.tpl b/templates/skeleton/plugin_staticpage.tpl new file mode 100644 index 00000000..2b39d0ee --- /dev/null +++ b/templates/skeleton/plugin_staticpage.tpl @@ -0,0 +1,34 @@ +<article id="page_{$staticpage_pagetitle|makeFilename}" class="page"> + <h2>{if $staticpage_articleformat}{if $staticpage_articleformattitle}{$staticpage_articleformattitle|escape}{else}{$staticpage_pagetitle}{/if}{else}{if $staticpage_headline}{$staticpage_headline|escape}{else}{$staticpage_pagetitle}{/if}{/if}</h2> +{if $staticpage_author or $staticpage_lastchange} + <footer class="page_info"> + <p>{if $staticpage_author}{$CONST.POSTED_BY} {$staticpage_author|escape}{/if} + {if $staticpage_lastchange} {$CONST.ON} <time datetime="{$staticpage_lastchange|serendipity_html5time}">{$staticpage_lastchange|date_format:$template_option.date_format}</time>{/if}</p> + </footer> +{/if} +{if $staticpage_pass AND $staticpage_form_pass != $staticpage_pass} + <form class="staticpage_password_form" action="{$staticpage_form_url}" method="post"> + <label for="serendipity_page_pass">{$CONST.STATICPAGE_PASSWORD_NOTICE}</label> + <input id="serendipity_page_pass" name="serendipity[pass]" type="password" value=""> + <input class="button-primary" name="submit" type="submit" value="{$CONST.GO}" > + </form> +{else} + {if $staticpage_precontent} + <div class="page_content page_preface"> + {$staticpage_precontent} + </div> + {/if} + {if $staticpage_content} + <div class="page_content"> + {$staticpage_content} + </div> + {/if} +{/if} +{if is_array($staticpage_childpages)} + <ul class="page_children"> + {foreach from=$staticpage_childpages item="childpage"} + <li><a href="{$childpage.permalink|escape}" title="{$childpage.pagetitle|escape}">{$childpage.pagetitle|escape}</a></li> + {/foreach} + </ul> +{/if} +</article> diff --git a/templates/skeleton/plugin_staticpage_searchresults.tpl b/templates/skeleton/plugin_staticpage_searchresults.tpl new file mode 100644 index 00000000..84c8a0c0 --- /dev/null +++ b/templates/skeleton/plugin_staticpage_searchresults.tpl @@ -0,0 +1,13 @@ +{if $staticpage_results} +<div class="page_results"> + <h3>{$CONST.STATICPAGE_SEARCHRESULTS|sprintf:$staticpage_searchresults}</h3> + + <ul class="plainList"> + {foreach from=$staticpage_results item="result"} + <li><a href="{$result.permalink|escape}" title="{$result.pagetitle|escape} ({$result.realname})">{$result.headline}</a> + <div class="page_result_content">{$result.content|strip_tags|truncate:200:"..."}</div> + </li> + {/foreach} + </ul> +</div> +{/if} diff --git a/templates/skeleton/preview.png b/templates/skeleton/preview.png new file mode 100644 index 00000000..7a8d1080 Binary files /dev/null and b/templates/skeleton/preview.png differ diff --git a/templates/skeleton/preview_fullsize.jpg b/templates/skeleton/preview_fullsize.jpg new file mode 100644 index 00000000..5bbf0802 Binary files /dev/null and b/templates/skeleton/preview_fullsize.jpg differ diff --git a/templates/skeleton/preview_iframe.tpl b/templates/skeleton/preview_iframe.tpl new file mode 100644 index 00000000..64591437 --- /dev/null +++ b/templates/skeleton/preview_iframe.tpl @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<html lang="{$lang}"> +<head> + <meta charset="{$head_charset}"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>{$CONST.SERENDIPITY_ADMIN_SUITE}</title> + <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway:400,300,600"> + <link rel="stylesheet" href="{$serendipityHTTPPath}{$serendipityRewritePrefix}serendipity.css"> +{serendipity_hookPlugin hook="backend_header" hookAll="true"} + <script src="{serendipity_getFile file='admin/js/plugins.js'}"></script> + <script src="{serendipity_getFile file='admin/serendipity_editor.js'}"></script> +<script>window.onload = function() {ldelim} + parent.document.getElementById('serendipity_iframe').style.height = document.querySelector('html').offsetHeight + 'px'; + parent.document.getElementById('serendipity_iframe').scrolling = 'no'; + parent.document.getElementById('serendipity_iframe').style.border = 0; +{rdelim} +</script> +</head> +<body> + <main role="main"> + {if $mode == 'preview'} + <div class="clearfix"> + {elseif $mode == 'save'} + <div class="clearfix"> + <div style="float: left; height: 75px"></div> + {$updertHooks} + {if $res} + <div class="serendipity_msg_important">{$CONST.ERROR}: <b>{$res}</b></div> + {else} + {if $lastSavedEntry} + <script type="text/javascript">$(document).ready(function() { + parent.document.forms['serendipityEntry']['serendipity[id]'].value = "{$lastSavedEntry}"; + }); + </script> + {/if} + <span class="msg_success"><span class="icon-ok-circled" aria-hidden="true"></span> {$CONST.ENTRY_SAVED}</span> + <a href="{$entrylink}" target="_blank">{$CONST.VIEW}</a> + {/if} + {/if} + {$preview} + </div> + </main> +</body> +</html> \ No newline at end of file diff --git a/templates/skeleton/sidebar.tpl b/templates/skeleton/sidebar.tpl new file mode 100644 index 00000000..124226f7 --- /dev/null +++ b/templates/skeleton/sidebar.tpl @@ -0,0 +1,18 @@ +{if $is_raw_mode} +<div id="serendipity{$pluginside}SideBar"> +{/if} +{foreach from=$plugindata item=item} +{if $item.class != "serendipity_plugin_quicksearch"} + <section class="sidebar_widget {$item.class}"> + {if $item.title != ""} + <h3>{$item.title}</h3> + {/if} + <div class="sidebar_content"> + {$item.content} + </div> + </section> +{/if} +{/foreach} +{if $is_raw_mode} +</div> +{/if} diff --git a/templates/skeleton/style.css b/templates/skeleton/style.css new file mode 100644 index 00000000..7623fdbc --- /dev/null +++ b/templates/skeleton/style.css @@ -0,0 +1,389 @@ +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */img,legend{border:0}legend,td,th{padding:0}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre,textarea{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}table{border-collapse:collapse;border-spacing:0} +/* Skeleton V2.0.4, Copyright 2014, Dave Gamache, www.getskeleton.com + * Free to use under the MIT license, http://www.opensource.org/licenses/mit-license.php, 12/29/2014 */ +.column,.columns,.container,.u-full-width{width:100%;box-sizing:border-box}h1,h2,h3{letter-spacing:-.1rem}body,h6{line-height:1.6}.container{position:relative;max-width:960px;margin:0 auto;padding:0 20px}ol,p,ul{margin-top:0}.column,.columns{float:left}@media (min-width:400px){.container{width:85%;padding:0}}html{font-size:62.5%}body{font-size:1.5em;font-weight:400;font-family:Raleway,HelveticaNeue,"Helvetica Neue",Helvetica,Arial,sans-serif;color:#222}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:2rem;font-weight:300}h1{font-size:4rem;line-height:1.2}h2{font-size:3.6rem;line-height:1.25}h3{font-size:3rem;line-height:1.3}h4{font-size:2.4rem;line-height:1.35;letter-spacing:-.08rem}h5{font-size:1.8rem;line-height:1.5;letter-spacing:-.05rem}h6{font-size:1.5rem;letter-spacing:0}@media (min-width:550px){.container{width:80%}.column,.columns{margin-left:4%}.column:first-child,.columns:first-child{margin-left:0}.one.column,.one.columns{width:4.66666666667%}.two.columns{width:13.3333333333%}.three.columns{width:22%}.four.columns{width:30.6666666667%}.five.columns{width:39.3333333333%}.six.columns{width:48%}.seven.columns{width:56.6666666667%}.eight.columns{width:65.3333333333%}.nine.columns{width:74%}.ten.columns{width:82.6666666667%}.eleven.columns{width:91.3333333333%}.twelve.columns{width:100%;margin-left:0}.one-third.column{width:30.6666666667%}.two-thirds.column{width:65.3333333333%}.one-half.column{width:48%}.offset-by-one.column,.offset-by-one.columns{margin-left:8.66666666667%}.offset-by-two.column,.offset-by-two.columns{margin-left:17.3333333333%}.offset-by-three.column,.offset-by-three.columns{margin-left:26%}.offset-by-four.column,.offset-by-four.columns{margin-left:34.6666666667%}.offset-by-five.column,.offset-by-five.columns{margin-left:43.3333333333%}.offset-by-six.column,.offset-by-six.columns{margin-left:52%}.offset-by-seven.column,.offset-by-seven.columns{margin-left:60.6666666667%}.offset-by-eight.column,.offset-by-eight.columns{margin-left:69.3333333333%}.offset-by-nine.column,.offset-by-nine.columns{margin-left:78%}.offset-by-ten.column,.offset-by-ten.columns{margin-left:86.6666666667%}.offset-by-eleven.column,.offset-by-eleven.columns{margin-left:95.3333333333%}.offset-by-one-third.column,.offset-by-one-third.columns{margin-left:34.6666666667%}.offset-by-two-thirds.column,.offset-by-two-thirds.columns{margin-left:69.3333333333%}.offset-by-one-half.column,.offset-by-one-half.columns{margin-left:52%}h1{font-size:5rem}h2{font-size:4.2rem}h3{font-size:3.6rem}h4{font-size:3rem}h5{font-size:2.4rem}h6{font-size:1.5rem}}a{color:#1EAEDB}a:hover{color:#0FA0CE}.button,button,input[type=submit],input[type=reset],input[type=button]{display:inline-block;height:38px;padding:0 30px;color:#555;text-align:center;font-size:11px;font-weight:600;line-height:38px;letter-spacing:.1rem;text-transform:uppercase;text-decoration:none;white-space:nowrap;background-color:transparent;border-radius:4px;border:1px solid #bbb;cursor:pointer;box-sizing:border-box}.button:focus,.button:hover,button:focus,button:hover,input[type=submit]:focus,input[type=submit]:hover,input[type=reset]:focus,input[type=reset]:hover,input[type=button]:focus,input[type=button]:hover{color:#333;border-color:#888;outline:0}.button.button-primary,button.button-primary,input[type=submit].button-primary,input[type=reset].button-primary,input[type=button].button-primary{color:#FFF;background-color:#33C3F0;border-color:#33C3F0}.button.button-primary:focus,.button.button-primary:hover,button.button-primary:focus,button.button-primary:hover,input[type=submit].button-primary:focus,input[type=submit].button-primary:hover,input[type=reset].button-primary:focus,input[type=reset].button-primary:hover,input[type=button].button-primary:focus,input[type=button].button-primary:hover{color:#FFF;background-color:#1EAEDB;border-color:#1EAEDB}input[type=tel],input[type=url],input[type=password],input[type=email],input[type=number],input[type=search],input[type=text],select,textarea{height:38px;padding:6px 10px;background-color:#fff;border:1px solid #D1D1D1;border-radius:4px;box-shadow:none;box-sizing:border-box}input[type=tel],input[type=url],input[type=password],input[type=email],input[type=number],input[type=search],input[type=text],textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none}textarea{min-height:65px;padding-top:6px;padding-bottom:6px}input[type=tel]:focus,input[type=url]:focus,input[type=password]:focus,input[type=email]:focus,input[type=number]:focus,input[type=search]:focus,input[type=text]:focus,select:focus,textarea:focus{border:1px solid #33C3F0;outline:0}label,legend{display:block;margin-bottom:.5rem;font-weight:600}fieldset{padding:0;border-width:0}input[type=checkbox],input[type=radio]{display:inline}label>.label-body{display:inline-block;margin-left:.5rem;font-weight:400}ul{list-style:circle inside}ol{list-style:decimal inside}ol,ul{padding-left:0}ol ol,ol ul,ul ol,ul ul{margin:1.5rem 0 1.5rem 3rem;font-size:90%}.button,button,li{margin-bottom:1rem}code{padding:.2rem .5rem;margin:0 .2rem;font-size:90%;white-space:nowrap;background:#F1F1F1;border:1px solid #E1E1E1;border-radius:4px}pre>code{display:block;padding:1rem 1.5rem;white-space:pre}td,th{padding:12px 15px;text-align:left;border-bottom:1px solid #E1E1E1}td:first-child,th:first-child{padding-left:0}td:last-child,th:last-child{padding-right:0}fieldset,input,select,textarea{margin-bottom:1.5rem}blockquote,dl,figure,form,ol,p,pre,table,ul{margin-bottom:2.5rem}.u-max-full-width{max-width:100%;box-sizing:border-box}.u-pull-right{float:right}.u-pull-left{float:left}hr{margin-top:3rem;margin-bottom:3.5rem;border-width:0;border-top:1px solid #E1E1E1}.container:after,.row:after,.u-cf{content:"";display:table;clear:both} + +/* THEME-/S9Y-SPECIFIC STYLES */ +/* -------------------------- */ +audio, +canvas, +iframe, +img, +svg, +video { + vertical-align: middle; +} + +.clearfix:before, +.clearfix:after { + content: ' '; + display: table; +} + +.clearfix:after { + clear: both; +} + +/* Links */ +a { + cursor: pointer; +} + +h1 a, +h2 a, +h3 a, +h4 a, +h5 a, +h6 a { + text-decoration: none; +} + +/* Header */ +.page_header { + padding-top: 2.5rem; +} + +/* Navigation */ +.primary-nav { + background: #1eaedb; + color: #fff; + margin-bottom: 2.5rem; +} + +.primary-nav ul { + margin: 0; + padding: 1rem 0 0; +} + +.primary-nav a, +.primary-nav span { + display: block; + padding: 0; + text-decoration: none; +} + +.primary-nav a, +.primary-nav a:visited { + background-color: #1eaedb; + color: #fff; +} + +.primary-nav a:hover, +.primary-nav a:focus { + background-color: #0fa0ce; + color: #fff; +} + +/* Posts */ +.post, +.post_footer { + margin-bottom: 2.5rem; +} + +.post:last-of-type { + margin-bottom: 0; +} + +.post table { + border-collapse: collapse; + border-spacing: 0; + width: 100%; +} + +.post_meta { + margin-top: 1.5rem; + margin-bottom: 1.5rem; +} + +.pager { + margin-bottom: 2.5rem; + width: 100%; +} + +.pager > p { + margin: 0; + text-align: center; +} + +/* Images */ +.post img, +.page img, +video, +.serendipity_imageComment_center, +.serendipity_imageComment_left, +.serendipity_imageComment_right { + height: auto; + max-width: 100%; +} + +.serendipity_image_left, +.serendipity_image_center, +.serendipity_image_right, +.serendipity_imageComment_center, +.serendipity_imageComment_left, +.serendipity_imageComment_right { + background: inherit; + border: 0; + padding: 0; +} + +.serendipity_image_left, +.serendipity_image_right, +.serendipity_image_center { + border: 1px solid #aaa; +} + +.serendipity_image_left, +.serendipity_imageComment_left { + display: block; + float: none; + margin: 1rem 0; +} + +.serendipity_image_center, +.serendipity_imageComment_center { + display: block; + margin: 1rem auto; +} + +.serendipity_image_right, +.serendipity_imageComment_right { + display: block; + float: none; + margin: 1rem 0; +} + +.serendipity_imageComment_center, +.serendipity_imageComment_left, +.serendipity_imageComment_right, +.serendipity_imageComment_img, +.serendipity_imageComment_img img { + text-align: center; +} + +.serendipity_imageComment_img, +.serendipity_imageComment_img img { + margin: 0; + padding: 0; +} + +.serendipity_imageComment_txt { + border-top: 0; + color: #888; + margin: 0; + padding: .5rem 0 0; + clear: both; + font-size: 1.3rem; + text-align: center; +} + +/* Sidebar */ +.sidebar_widget { + margin-bottom: 2.5rem; +} + +.sidebar_search label { + font-weight: 300; +} + +.serendipity_xml_icon > img { + vertical-align: middle; +} + +/* Archives */ +.archive_date { + display: inline-block; + min-width: 10rem; +} + +.archive_byline { + display: block; + margin-bottom: .5rem; +} + +/* Tags */ +.serendipity_freetag_taglist { + margin-bottom: 2.5rem; +} + +.serendipity_freetag_taglist_related { + font-size: 3rem; + font-weight: 300; + letter-spacing: -.1rem; + line-height: 1.3; + margin-top: 0; + margin-bottom: 2rem; +} + +.serendipity_freeTag { + font-size: 100%; + margin: 1.5rem 0; + text-align: left; +} + +/* Messages */ +.serendipity_msg_important, +.serendipity_msg_notice { + border: 1px solid; + border-radius: 4px; + box-sizing: border-box; + margin: .4rem 0; + padding: .4rem; + text-align: center; +} + +.serendipity_msg_important { + border-color: #ff4136; + color: #ff4136; +} + +.serendipity_msg_notice { + border-color: #2ecc40; + color: #2ecc40; +} + +/* Comments + trackbacks */ +#trackbacks, +#comments { + margin-bottom: 2.5rem; +} + +.comment { + margin-bottom: 2.5rem; +} + +.comments_view { + margin-bottom: 1.5rem; +} + +.comment_avatar { + border: 1px solid #aaa; + border-radius: 4px; + float: left; + margin: 0 1rem 1rem 0; + overflow: hidden; + padding: 0 !important; +} + +.avatar_left { + float: left; + margin: 0 1rem 1rem 0; +} + +.avatar_right { + float: right; + margin: 0 0 1rem 1rem; +} + +/* Comment form */ +#serendipity_replyTo { + box-sizing: border-box; + width: 100%; +} + +textarea { + min-height: 10rem; + resize: vertical; +} + +.serendipity_commentDirection { + margin: 0 0 .5rem; +} + +/* Footer */ +.page-footer { + background: #1eaedb; + color: #fff; + padding-top: 2.5rem; + text-align: center; +} + +.page-footer a, +.page-footer a:visited { + color: #fff; + text-decoration: underline; +} + +.page-footer a:hover, +.page-footer a:focus { + text-decoration: none; +} + +/* MEDIA QUERIES */ +/* Larger than mobile */ +@media (min-width: 400px) {} + +/* Larger than phablet (also point when grid becomes active) */ +@media (min-width: 550px) { + .primary-nav ul { + padding: 0; + position: relative; + left: -1.5rem; + } + + .primary-nav li { + display: inline-block; + margin: 0; + } + + .primary-nav li:last-child { + margin: 0; + } + + .primary-nav a, + .primary-nav span { + padding: 1rem 1.5rem; + } + + .primary-nav span { + background-color: #0fa0ce; + } + + .serendipity_freetag_taglist_related { + font-size: 3.6rem; + } + + .page-footer { + text-align: left; + } +} + +/* Larger than tablet */ +@media (min-width: 750px) { + .commentlevel_1 { margin-left: 1.5rem; } + .commentlevel_2 { margin-left: 3rem; } + .commentlevel_3 { margin-left: 4.5rem; } + .commentlevel_4 { margin-left: 6rem; } + .commentlevel_5 { margin-left: 7.5rem; } + .commentlevel_6 { margin-left: 9rem; } + .commentlevel_7 { margin-left: 10.5rem; } + .commentlevel_8 { margin-left: 12rem; } + .commentlevel_9 { margin-left: 13.5rem; } + + .serendipity_image_left, + .serendipity_imageComment_left { + float: left; + margin: .5rem 2rem .5rem 0; + } + + .serendipity_image_right, + .serendipity_imageComment_right { + float: right; + margin: .5rem 0 .5rem 2rem; + } + + .archive_year { + float: left; + width: 50%; + } + + .archive_year:nth-child(even) { + clear: left; + } +} + +/* Larger than desktop */ +@media (min-width: 1000px) {} + +/* Larger than Desktop HD */ +@media (min-width: 1200px) {} diff --git a/templates/skeleton/trackbacks.tpl b/templates/skeleton/trackbacks.tpl new file mode 100644 index 00000000..17402cba --- /dev/null +++ b/templates/skeleton/trackbacks.tpl @@ -0,0 +1,10 @@ +{if $entry.trackbacks > 0} + <ul class="plainList"> + {foreach from=$trackbacks item=trackback} + <li id="c{$trackback.id}" class="trackback"> + <a class="trackback_title" href="{$trackback.url|@strip_tags}">{$trackback.title}</a> + <time class="trackback_timestamp" datetime="{$trackback.timestamp|serendipity_html5time}">{$trackback.timestamp|formatTime:$template_option.date_format}</time> + </li> + {/foreach} + </ul> +{/if} diff --git a/templates/timeline/UTF-8/lang_de.inc.php b/templates/timeline/UTF-8/lang_de.inc.php new file mode 100644 index 00000000..bfb1d761 --- /dev/null +++ b/templates/timeline/UTF-8/lang_de.inc.php @@ -0,0 +1,70 @@ +<?php +// General +@define('ERROR_404', 'Fehler 404 - Die angeforderte Seite wurde nicht gefunden.'); +@define('SEARCH_WHAT','Wonach soll gesucht werden?'); //used on quicksearch modal +@define('SEARCH','Suche'); +@define('TOGGLE_NAV','Navigation'); //only seen by screen readers +@define('CLOSE','Schließen'); //close button on search form +@define('READ_MORE','Mehr lesen'); + +//Option groups and instructions +@define('THEME_SOCIAL_LINKS', 'Social-Links'); +@define('THEME_PAGE_OPTIONS', 'Seiten-Optionen'); +@define('THEME_NAVIGATION', 'Navigations-Optionen'); +@define('THEME_README','Lies mich'); +@define('THEME_IDENTITY','Seiten-Identität'); +@define('THEME_EP_YES','<p class="msg_success">Das Plugin Erweiterte Eigenschaften für Einträge (serendipity_event_entryproperties) wird benötigt. Es ist installiert und aktiv.</p>'); +@define('THEME_EP_NO','<p class="msg_error">Das Plugin Erweiterte Eigenschaften für Einträge (serendipity_event_entryproperties) wird benötigt. Es ist entweder nicht installiert oder inaktiv. Bitte das Plugin installieren, um alle Features dieses Themes voll zu nutzen.</p>'); +@define('THEME_INSTRUCTIONS','<p>This theme displays blog posts on a linear timeline. Each group of month titles can also be displayed or hidden on the timeline.</p><p>This theme uses a right and bottom sidebar. Either, or both sidebars can be disabled by deleting sidebar plugins or relocating sidebar plugins to the sidebar colum labeled "hidden" in plugin configuration.</p><p>This theme can be configured to display categories and entry tags from the respective sidebar plugins on the archive page. See "' . THEME_PAGE_OPTIONS . '" below.</p><p>If using the avatar plugin (serendipity_event_gravatar), configure option "Produce smarty tag = yes" for best display of comment avatars.</p><p>Configure serendipity_event_freetag option "Extended Smarty = yes" for a nicer display of tags in the entry footer.</p>'); +@define('THEME_CUSTOM_FIELD_HEADING', 'Freie Felder für Einträge'); +@define('THEME_CUSTOM_FIELD_DEFINITION','These optional field(s) are only available when using this theme (timeline). The event plugin serendipity_event_entryproperties (extended properties for entries) must also be installed to use these field(s). The entry image will appear on both the timeline, and at the top of each detailed entry.'); +@define('THEME_ENTRY_IMAGE','Entry Image.'); +@define('THEME_DEMO_AVAILBLE', 'Eine komplette englische Anleitung zur <a href="http://www.optional-necessity.com/demo/timeline/archives/13-Using-the-Timeline-theme.html">Konfiguration und Benutzung von Timeline</a> findet sich in der <a href="http://www.optional-necessity.com/demo/timeline/">Timeline theme demo</a>.'); + +//Page Options +@define('THEME_COLORSET', 'Colorset'); +@define('THEME_SKINSET', 'Theme skin'); +@define('HEADER_IMG','Optional Header Image. Leave blank to use Blog Name.'); +@define('HEADER_IMG_DESC', 'Header image recommended size: 150px x 40px.'); +@define('ENTRY_DATE_FORMAT','Datumsformat für Einträge'); +@define('COMMENT_TIME_FORMAT','Zeitformat für Kommentare und Trackbacks'); +@define('WORDS','Textfassung'); +@define('TIMESTAMP','Zeitstempel'); +@define('DISPLAY_AS_TIMELINE','Timeline-Format verwenden'); +@define('DISPLAY_AS_TIMELINE_DESC','Timeline-Format für Blog-Posts verwenden. Falls Nein werden Blog-Posts im üblichen Blog-Format ausgegeben.'); +@define('MONTHS_ON_TIMELINE','Show month names on timeline'); +@define('MONTHS_ON_TIMELINE_DESC','Month name will appear as a heading on the timeline for each month of entries.'); +@define('MONTHS_ON_TIMELINE_FORMAT','Timeline month format'); +@define('CATEGORIES_ON_ARCHIVE', 'Kategorien auf der Archivseite anzeigen'); +@define('CATEGORIES_ON_ARCHIVE_DESC', 'Das Seitenleisten-Plugin Kategorien (serendipity_plugin_categories) muss installiert und die Option "Smarty-Templating aktivieren?" aktiviert sein, damit Kategorien auf der Archiv-Seite angezeigt werden.'); +@define('CATEGORY_RSS_ON_ARCHIVE','Show RSS icon next to each category on archive page'); +@define('TAGS_ON_ARCHIVE', 'Tags auf der Archivseite anzeigen'); +@define('TAGS_ON_ARCHIVE_DESC', 'Das Seitenleisten-Plugin Getaggte Artikel (serendipity_plugin_freetag) muss installiert sein und die Option "Sidebar template" muss auf "archive_freetag.tpl" gesetzt werden, damit Tags auf der Archiv-Seite angezeigt werden.'); + +//Navigation +@define('USE_CORENAV', 'Globale Navigation verwenden?'); + +//Social media +@define('SOCIAL_ICONS_AMOUNT', 'Enter number of social media links'); +@define('SOCIAL_NETWORK_SERVICE', 'Select social media service for link'); +@define('SOCIAL_ICON_URL', 'URL for social media service link'); +@define('COPYRIGHT', 'Copyright'); + +//time ago in words function +@define('ELAPSED_LESS_THAN_MINUTE_AGO','Vor weniger als einer Minute'); +@define('ELAPSED_ONE_MINUTE_AGO','Vor einer Minute'); +@define('ELAPSED_ONE_DAY_AGO','Vor einem Tag'); +@define('ELAPSED_MINUTES_AGO','Vor %s Minuten'); +@define('ELAPSED_HOURS_AGO','Vor %s Stunden'); +@define('ELAPSED_DAYS_AGO','Vor %s Tagen'); +@define('ELAPSED_MONTHS_AGO','Vor %s Monaten'); +@define('ELAPSED_YEARS_AGO','Vor %s Jahren'); //not currently using this, but defining just in case +@define('ELAPSED_ABOUT_ONE_HOUR_AGO','Vor ungefähr einer Stunde'); // greater than 45 minutes, less than 90 minutes +@define('ELAPSED_ABOUT_ONE_MONTH_AGO','Vor ungefähr einem Monat'); // greater than 30 days, less than 60 days +@define('ELAPSED_ABOUT_ONE_YEAR_AGO','Vor ungefähr einem Jahr'); // greater than one year, less than 2 years +@define('ELAPSED_OVER_YEARS_AGO','Vor mehr als %s Jahren');// greater than 2 years + +//Static Pages +@define('STATIC_SHOW_AUTHOR_TEXT','Autorennamen anzeigen'); +@define('STATIC_SHOW_DATE_TEXT','Datum anzeigen'); +@define('STATIC_SHOW_SIDEBARS_TEXT','Show sidebars?'); \ No newline at end of file diff --git a/templates/timeline/aqua_style.css b/templates/timeline/aqua_style.css new file mode 100644 index 00000000..33828ff1 --- /dev/null +++ b/templates/timeline/aqua_style.css @@ -0,0 +1,124 @@ +/* +Theme: Timeline +Theme developed for Serendipity by Don Chambers (www.optional-necessity.com) +aqua colorset +*/ + +/* +* Aqua Color: #27d7e7; +* Aqua Hover Color: #26bac8; +* Darkest color: #11adbc; +*/ + +a { + color: #27d7e7; +} + +a:hover, +a:focus { + color: #26bac8; +} + +a.subtome:link, +a.subtome:visited { + background: url('img/subtome-aqua.png') left bottom no-repeat; +} + +a.subtome:hover, +a.subtome:focus { + background: url('img/subtome-aqua.png') -64px center no-repeat; +} + +a.subtome img { + visibility: hidden; +} + +.navbar-default .navbar-brand:hover h1, +.navbar-default .navbar-brand:focus h1{ + color: #26bac8; +} + +.header .navbar-default .navbar-toggle { + border-color: #26bac8; +} + +.header .navbar-toggle, .header .navbar-default .navbar-toggle:hover, .header .navbar-default .navbar-toggle:focus { + background-color: #27d7e7; +} + +@media (max-width: 991px) { + .header .navbar-default .navbar-nav > li > a:hover { + color: #27d7e7; + } + .header .navbar-default .navbar-nav > .active > a, .header .navbar-default .navbar-nav > .active > a:hover, .header .navbar-default .navbar-nav > .active > a:focus { + background-color: #27d7e7; + } +} + +@media (min-width: 992px) { + .header .navbar-default .navbar-nav a.navbar_current_page, + .header .navbar-default .navbar-nav > li > a:hover { + border-bottom: 2px solid #27d7e7; + } + + .header .navbar-default .navbar-nav > li:hover > a { + color: #27d7e7; + } +} + +.btn-theme { + background: none repeat scroll 0 0 #27d7e7; + border: 1px solid #27d7e7; +} + +.btn-theme:hover {color: #27d7e7;} + +.pager li > a, +.pager li > span { + background-color: #27d7e7; + border: 1px solid #27d7e7; +} + +.pager li > a:hover, +.pager li > a:focus { + color: #26bac8; +} + +.sidebar_plugin h3{ + border-bottom: 2px solid #27d7e7; +} + +.btn-group.archive-button .dropdown-menu > li > a {color: #26bac8;} + +.btn-group.archive-button .dropdown-menu > li > a:hover, +.btn-group.archive-button .dropdown-menu > li > a:focus { + background-color: #26bac8; +} + +.archive-button-months-entries {border: 1px solid #27d7e7;} + +.archive-button-months-entries .badge { + background-color: #11adbc; /* much darker */ +} + +blockquote { + border-left: 5px solid #27d7e7; +} + +.timeline_freeTag a { + background-color: #27d7e7; + border: 1px solid #27d7e7; +} + +.timeline_freeTag a:hover, +.timeline_freeTag a:focus { + color: #26bac8; /*dark */ +} + +#scrollUp { + background-color: #27d7e7; + border: 1px solid #27d7e7; +} +#scrollUp:hover { + color: #26bac8; +} \ No newline at end of file diff --git a/templates/timeline/archive_categories.tpl b/templates/timeline/archive_categories.tpl new file mode 100644 index 00000000..6890f8bc --- /dev/null +++ b/templates/timeline/archive_categories.tpl @@ -0,0 +1,34 @@ +{if $categories} + <h3>{$CONST.CATEGORIES}</h3> + <ul class="plainList category-list"> + {foreach from=$categories item="plugin_category" name="each_category"} + {if $smarty.foreach.each_category.first}{assign var="prevdepth" value=$plugin_category.catdepth}{/if} + {if ($plugin_category.catdepth == $prevdepth) && !$smarty.foreach.each_category.first} + </li> + {elseif $plugin_category.catdepth < $prevdepth} + {for $i=1 to $prevdepth-$plugin_category.catdepth} + </li> + </ul> + {/for} + </li> + {elseif $plugin_category.catdepth > $prevdepth} + <ul class="category-children"> + {/if} + <li id="category_{$plugin_category.categoryid}" class="category_depth{$plugin_category.catdepth} archive-category-list-item"> + {if $template_option.category_rss_archive == true}<a class="btn btn-sm btn-default btn-theme serendipity_xml_icon" href="{$plugin_category.feedCategoryURL}" title="{$plugin_category.category_name|escape} rss"><i class="fa fa-rss"></i></a>{/if} + <a class="btn btn-sm btn-default btn-theme" href="{$plugin_category.categoryURL}" title="{$plugin_category.category_description|escape}">{$plugin_category.category_name|escape}</a> + {if $smarty.foreach.each_category.last} + {if $plugin_category.catdepth>0} + {for $i=1 to $plugin_category.catdepth} + </li> + </ul> + {/for} + {/if} + </li> + {/if} + {assign var="prevdepth" value=$plugin_category.catdepth} + {/foreach} + </ul> +{else} + <p class="alert alert-warning"><span class="fa-stack" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-exclamation fa-stack-1x"></i></span> {$CONST.CATEGORIES_ON_ARCHIVE_DESC}</p> +{/if} \ No newline at end of file diff --git a/templates/timeline/archive_freetag.tpl b/templates/timeline/archive_freetag.tpl new file mode 100644 index 00000000..1f93f738 --- /dev/null +++ b/templates/timeline/archive_freetag.tpl @@ -0,0 +1,10 @@ +{if $tags} + <h3>{$CONST.EDITOR_TAGS}</h3> + <div class="timeline_freeTag"> + {foreach from=$tags key="tag_name" item="plugin_tags" name="each_tag"} + <a href="{$plugin_tags.href}">{$tag_name}</a>{if !$smarty.foreach.each_tag.last}{/if} + {/foreach} + </div> +{else} + <p class="alert alert-warning"><span class="fa-stack" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-exclamation fa-stack-1x"></i></span> {$CONST.TAGS_ON_ARCHIVE_DESC}</p> +{/if} \ No newline at end of file diff --git a/templates/timeline/backend_templates/default_staticpage_backend.tpl b/templates/timeline/backend_templates/default_staticpage_backend.tpl new file mode 100644 index 00000000..14bcee0a --- /dev/null +++ b/templates/timeline/backend_templates/default_staticpage_backend.tpl @@ -0,0 +1,245 @@ +<br /> + +<script type="text/javascript"> + var img_plus = '{serendipity_getFile file="img/plus.png"}'; + var img_minus = '{serendipity_getFile file="img/minus.png"}'; + var state = ''; +{literal} + function showConfig(id) { + if (document.getElementById) { + el = document.getElementById(id); + if (el.style.display == 'none') { + document.getElementById('option' + id).src = img_minus; + el.style.display = ''; + } else { + document.getElementById('option' + id).src = img_plus; + el.style.display = 'none'; + } + } + } + + function showConfigAll(count) { + if (document.getElementById) { + for (i = 1; i <= count; i++) { + document.getElementById('el' + i).style.display = state; + document.getElementById('optionel' + i).src = (state == '' ? img_minus : img_plus); + } + + if (state == '') { + document.getElementById('optionall').src = img_minus; + state = 'none'; + } else { + document.getElementById('optionall').src = img_plus; + state = ''; + } + } + } +{/literal} +</script> + +<div id="backend_sp_simple" class="default_staticpage"> + <section class="section_basic"> + <h3>{$CONST.STATICPAGE_SECTION_BASIC}</h3> + <div id="edit_headline" class="form_field"> + <label class="sp_label" title="{staticpage_input item="headline" what="desc"|escape:js}">{staticpage_input item="headline" what="name"|escape:js}</label> + {staticpage_input item="headline"} + </div> + <div id="articleformat_title" class="form_field"> + <label class="sp_label" title="{staticpage_input item="articleformattitle" what="desc"|escape:js}">{staticpage_input item="articleformattitle" what="name"|escape:js}</label> + {staticpage_input item="articleformattitle"} + </div> + <div class="form_area"> + <label class="sp_label" title="{staticpage_input item="content" what="desc"|escape:js}">{staticpage_input item="content" what="name"|escape:js}</label><br /> + {staticpage_input item="content"} + </div> + <h3>{$CONST.STATICPAGES_CUSTOM_META_SHOW}</h3> + <p id="sp_toggle_optionall"><a style="border:0; text-decoration: none;" href="#" onClick="showConfig('el1'); return false" title="{$CONST.TOGGLE_OPTION}"><img src="{serendipity_getFile file="img/plus.png"}" id="optionel1" alt="+/-" border="0"> {$CONST.TOGGLE_ALL}</a></p> + <div id="el1"> + <div class="adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="title_element" what="desc"|escape:js}">{staticpage_input item="title_element" what="name"|escape:js}</label><br /> + {staticpage_input item="title_element"} + </div> + <div class="adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="meta_description" what="desc"|escape:js}">{staticpage_input item="meta_description" what="name"|escape:js}</label> + {staticpage_input item="meta_description"} + </div> + <div class="adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="meta_keywords" what="desc"|escape:js}">{staticpage_input item="meta_keywords" what="name"|escape:js}</label><br /> + {staticpage_input item="meta_keywords"} + </div> + </div> + <script type="text/javascript" language="JavaScript">document.getElementById("el1").style.display = "none";</script> + + <h3>{$CONST.STATICPAGES_CUSTOM_STRUCTURE_SHOW}</h3> + <p id="sp_toggle_optionall"><a style="border:0; text-decoration: none;" href="#" onClick="showConfig('el2'); return false" title="{$CONST.TOGGLE_OPTION}"><img src="{serendipity_getFile file="img/plus.png"}" id="optionel2" alt="+/-" border="0"> {$CONST.TOGGLE_ALL}</a></p> + <div id="el2"> + <div class="clearfix"> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="authorid" what="desc"|escape:js}">{staticpage_input item="authorid" what="name"|escape:js}</label><br /> + {staticpage_input item="authorid"} + </div> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="articletype" what="desc"|escape:js}">{staticpage_input item="articletype" what="name"|escape:js}</label><br /> + {staticpage_input item="articletype"} + </div> + </div> + <div class="clearfix"> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="language" what="desc"|escape:js}">{staticpage_input item="language" what="name"|escape:js}</label><br /> + {staticpage_input item="language"} + </div> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="related_category_id" what="desc"|escape:js}">{staticpage_input item="related_category_id" what="name"|escape:js}</label><br /> + {staticpage_input item="related_category_id"} + </div> + </div> + <div class="clearfix"> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="parent_id" what="desc"|escape:js}">{staticpage_input item="parent_id" what="name"|escape:js}</label><br /> + {staticpage_input item="parent_id"} + </div> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="show_childpages" what="desc"|escape:js}">{staticpage_input item="show_childpages" what="name"|escape:js}</label><br /> + {staticpage_input item="show_childpages"} + </div> + </div> + <div class="clearfix"> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="shownavi" what="desc"|escape:js}">{staticpage_input item="shownavi" what="name"|escape:js}</label><br /> + {staticpage_input item="shownavi"} + </div> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="show_breadcrumb" what="desc"|escape:js}">{staticpage_input item="show_breadcrumb" what="name"|escape:js}</label> + {staticpage_input item="show_breadcrumb"} + </div> + </div> + + <div class="clearfix"> + <div class="entryoptions_customfields adv_opts_box"> + <label class="sp_label" title="{staticpage_input item="pre_content" what="desc"|escape:js}">{staticpage_input item="pre_content" what="name"|escape:js}</label><br /> + {staticpage_input item="pre_content"} + </div> + </div> + </div> + <script type="text/javascript" language="JavaScript">document.getElementById("el2").style.display = "none";</script> + </section> + + <section class="section_meta"> + <h3>{$CONST.STATICPAGE_SECTION_META}</h3> + <div class="clearfix"> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="pagetitle" what="desc"|escape:js}">{staticpage_input item="pagetitle" what="name"|escape:js}</label><br /> + {staticpage_input item="pagetitle"} + </div> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="permalink" what="desc"|escape:js}">{staticpage_input item="permalink" what="name"|escape:js}</label><br /> + {staticpage_input item="permalink"} + </div> + </div> + <div class="clearfix"> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="pass" what="desc"|escape:js}">{staticpage_input item="pass" what="name"|escape:js}</label><br /> + {staticpage_input item="pass"} + </div> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="timestamp" what="desc"|escape:js}">{staticpage_input item="timestamp" what="name"|escape:js}</label><br /> + {staticpage_input item="timestamp"} + </div> + </div> + </section> + + <section class="section_options"> + <h3>{$CONST.STATICPAGE_SECTION_OPT}</h3> + <div class="clearfix"> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="publishstatus" what="desc"|escape:js}">{staticpage_input item="publishstatus" what="name"|escape:js}</label><br /> + {staticpage_input item="publishstatus"} + </div> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="is_startpage" what="desc"|escape:js}">{staticpage_input item="is_startpage" what="name"|escape:js}</label><br /> + {staticpage_input item="is_startpage"} + </div> + </div> + <div class="clearfix"> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="is_404_page" what="desc"|escape:js}">{staticpage_input item="is_404_page" what="name"|escape:js}</label><br /> + {staticpage_input item="is_404_page"} + </div> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="showonnavi" what="desc"|escape:js}">{staticpage_input item="showonnavi" what="name"|escape:js}</label><br /> + {staticpage_input item="showonnavi"} + </div> + </div> + <div class="clearfix"> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="markup" what="desc"|escape:js}">{staticpage_input item="markup" what="name"|escape:js}</label><br /> + {staticpage_input item="markup"} + </div> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{staticpage_input item="articleformat" what="desc"|escape:js}">{staticpage_input item="articleformat" what="name"|escape:js}</label><br /> + {staticpage_input item="articleformat"} + </div> + </div> + {* CUSTOM TO THIS THEME - OPTION TO SHOW/HIDE AUTHOR NAME *} + <div class="clearfix"> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{$CONST.STATIC_SHOW_AUTHOR_TITLE}">{$CONST.STATIC_SHOW_AUTHOR_TEXT}</label><br /> + <input id="author_yes" type="radio" name="serendipity[plugin][custom][show_author]" {if $form_values.custom.show_author == 'true'}checked="checked"{/if}value="true" /> + <label for="author_yes">{$CONST.YES}</label> + <input id="author_no" type="radio" name="serendipity[plugin][custom][show_author]" {if $form_values.custom.show_author != 'true'}checked="checked"{/if} value="false" /> + <label for="author_no">{$CONST.NO}</label> + </div> +{* CUSTOM TO THIS THEME - OPTION TO SHOW/HIDE DATE *} + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{$CONST.STATIC_SHOW_DATE_TITLE}">{$CONST.STATIC_SHOW_DATE_TEXT}</label><br /> + <input id="date_yes" type="radio" name="serendipity[plugin][custom][show_date]" {if $form_values.custom.show_date == 'true'}checked="checked"{/if}value="true" /> + <label for="date_yes">{$CONST.YES}</label> + <input id="date_no" type="radio" name="serendipity[plugin][custom][show_date]" {if $form_values.custom.show_date != 'true'}checked="checked"{/if}value="false" /> + <label for="date_no">{$CONST.NO}</label> + </div> + </div> +{* CUSTOM TO THIS TEMPLATE - OPTION TO SHOW/HIDE RIGHT SIDEBAR *} + <div class="clearfix"> + <div class="entryproperties_access_groups adv_opts_box form_select"> + <label class="sp_label" title="{$CONST.STATIC_SHOW_SIDEBARS_TITLE}">{$CONST.STATIC_SHOW_SIDEBARS_TEXT}</label><br /> + <input id="sidebars_yes" type="radio" name="serendipity[plugin][custom][show_sidebars]" {if $form_values.custom.show_sidebars != 'false'}checked="checked"{/if}value="true" /> + <label for="sidebars_yes">{$CONST.YES}</label> + <input id="sidebars_no" type="radio" name="serendipity[plugin][custom][show_sidebars]" {if $form_values.custom.show_sidebars == 'false'}checked="checked"{/if}value="false" /> + <label for="sidebars_no">{$CONST.NO}</label> + </div> + </div> + </section> + + + {* EXAMPLE FOR CUSTOM STATICPAGE PROPERTIES + + <fieldset class="sect_custom"> + <legend>Custom</legend> + + <div class="sp_sect"> + <label class="sp_label" title="Choose the main sidebar that should be shown when this staticpage is evaluated">Sidebars</label><br /> + <select name="serendipity[plugin][custom][sidebars][]" multiple="multiple"> + <option {if (@in_array('left', $form_values.custom.sidebars))}selected="selected"{/if} value="left">Left</option> + <option {if (@in_array('right', $form_values.custom.sidebars))}selected="selected"{/if} value="right">Right</option> + <option {if (@in_array('hidden', $form_values.custom.sidebars))}selected="selected"{/if} value="hidden">Hidden</option> + </select> + </div> + + <div class="sp_sect"> + <label class="sp_label" title="CSS class of the main page body that should be associated">Main CSS class</label><br /> + <input type="text" name="serendipity[plugin][custom][css_class]" value="{$form_values.custom.css_class|@default:'None'}" /> + </div> + </fieldset> + END OF EXAMPLE FOR CUSTOM STATICPAGE PROPERTIES *} + + </div> +</div> + + +{staticpage_input_finish} + +<br style="clear: both" /> +<div style="margin: 10px auto; text-align: center"> + <input type="submit" name="serendipity[SAVECONF]" value="{$CONST.SAVE}" class="serendipityPrettyButton input_button" /> +</div> + diff --git a/templates/timeline/blue-dark_style.css b/templates/timeline/blue-dark_style.css new file mode 100644 index 00000000..2cd45478 --- /dev/null +++ b/templates/timeline/blue-dark_style.css @@ -0,0 +1,136 @@ +/* +Theme: Timeline +Theme developed for Serendipity by Don Chambers (www.optional-necessity.com) +dark blue colorset +*/ + +/* +* Dark Blue Color: #4765a0; +* Dark Blue Hover Color: #324c80; +* Darkest color: #243c6c; +*/ + +a { + color: #4765a0; +} + +a:hover, +a:focus { + color: #324c80; +} + + +.footer-socials a:hover, +.footerSocials a:focus, +.copyright a:hover, +.copyright a:focus, +.RightSideBar a:hover, +.RightSideBar a:focus, +.FooterSideBar a:hover, +.FooterSideBar a:focus { + color: #4765a0; +} + +a.subtome:link, +a.subtome:visited { + background: url('img/subtome-blue-dark.png') left bottom no-repeat; +} + +a.subtome:hover, +a.subtome:focus { + background: url('img/subtome-blue-dark.png') -64px center no-repeat; +} + +a.subtome img { + visibility: hidden; +} + +.navbar-default .navbar-brand:hover h1, +.navbar-default .navbar-brand:focus h1{ + color: #324c80; +} + +.header .navbar-default .navbar-toggle { + border-color: #324c80; +} + +.header .navbar-toggle, .header .navbar-default .navbar-toggle:hover, .header .navbar-default .navbar-toggle:focus { + background-color: #4765a0; +} + +@media (max-width: 991px) { + .header .navbar-default .navbar-nav > li > a:hover { + color: #4765a0; + } + .header .navbar-default .navbar-nav > .active > a, .header .navbar-default .navbar-nav > .active > a:hover, .header .navbar-default .navbar-nav > .active > a:focus { + background-color: #4765a0; + } +} + +@media (min-width: 992px) { + .header .navbar-default .navbar-nav a.navbar_current_page, + .header .navbar-default .navbar-nav > li > a:hover { + border-bottom: 2px solid #4765a0; + } + + .header .navbar-default .navbar-nav > li:hover > a { + color: #5071b3; + } +} + +.btn-theme { + background: none repeat scroll 0 0 #4765a0; + border: 1px solid #4765a0; +} + +.btn-theme:hover {color: #4765a0;} + +.pager li > a, +.pager li > span { + background-color: #4765a0; + border: 1px solid #4765a0; +} + +.pager li > a:hover, +.pager li > a:focus { + color: #324c80; +} + +.sidebar_plugin h3{ + border-bottom: 2px solid #4765a0; +} + +.btn-group.archive-button .dropdown-menu > li > a {color: #324c80;} + +.btn-group.archive-button .dropdown-menu > li > a:hover, +.btn-group.archive-button .dropdown-menu > li > a:focus { + background-color: #324c80; +} + +.archive-button-months-entries {border: 1px solid #4765a0;} + +.archive-button-months-entries .badge { + background-color: #243c6c; /* much darker */ +} + +blockquote { + border-left: 5px solid #324c80; +} + +.timeline_freeTag a { + background-color: #4765a0; + border: 1px solid #4765a0; +} + +.timeline_freeTag a:hover, +.timeline_freeTag a:focus { + color: #324c80; +} + +#scrollUp { + background-color: #4765a0; + border: 1px solid #4765a0; +} +#scrollUp:hover { + color: #324c80; +} \ No newline at end of file diff --git a/templates/timeline/blue_style.css b/templates/timeline/blue_style.css new file mode 100644 index 00000000..2aca29dd --- /dev/null +++ b/templates/timeline/blue_style.css @@ -0,0 +1,124 @@ +/* +Theme: Timeline +Theme developed for Serendipity by Don Chambers (www.optional-necessity.com) +blue colorset +*/ + +/* +* Blue Color: #3498db; +* Blue Hover Color: #2980b9; +* Darkest color: #1c6ca1; +*/ + +a { + color: #3498db; +} + +a:hover, +a:focus { + color: #2980b9; +} + +a.subtome:link, +a.subtome:visited { + background: url('img/subtome-blue.png') left bottom no-repeat; +} + +a.subtome:hover, +a.subtome:focus { + background: url('img/subtome-blue.png') -64px center no-repeat; +} + +a.subtome img { + visibility: hidden; +} + +.navbar-default .navbar-brand:hover h1, +.navbar-default .navbar-brand:focus h1{ + color: #2980b9; +} + +.header .navbar-default .navbar-toggle { + border-color: #2980b9; +} + +.header .navbar-toggle, .header .navbar-default .navbar-toggle:hover, .header .navbar-default .navbar-toggle:focus { + background-color: #3498db; +} + +@media (max-width: 991px) { + .header .navbar-default .navbar-nav > li > a:hover { + color: #3498db; + } + .header .navbar-default .navbar-nav > .active > a, .header .navbar-default .navbar-nav > .active > a:hover, .header .navbar-default .navbar-nav > .active > a:focus { + background-color: #3498db; + } +} + +@media (min-width: 992px) { + .header .navbar-default .navbar-nav a.navbar_current_page, + .header .navbar-default .navbar-nav > li > a:hover { + border-bottom: 2px solid #3498db; + } + + .header .navbar-default .navbar-nav > li:hover > a { + color: #3498db; + } +} + +.btn-theme { + background: none repeat scroll 0 0 #3498db; + border: 1px solid #3498db; +} + +.btn-theme:hover {color: #3498db;} + +.pager li > a, +.pager li > span { + background-color: #3498db; + border: 1px solid #3498db; +} + +.pager li > a:hover, +.pager li > a:focus { + color: #2980b9; +} + +.sidebar_plugin h3{ + border-bottom: 2px solid #3498db; +} + +.btn-group.archive-button .dropdown-menu > li > a {color: #2980b9;} + +.btn-group.archive-button .dropdown-menu > li > a:hover, +.btn-group.archive-button .dropdown-menu > li > a:focus { + background-color: #2980b9; +} + +.archive-button-months-entries {border: 1px solid #3498db;} + +.archive-button-months-entries .badge { + background-color: #1c6ca1; /* much darker */ +} + +blockquote { + border-left: 5px solid #2980b9; +} + +.timeline_freeTag a { + background-color: #3498db; + border: 1px solid #3498db; +} + +.timeline_freeTag a:hover, +.timeline_freeTag a:focus { + color: #2980b9; +} + +#scrollUp { + background-color: #3498db; + border: 1px solid #3498db; +} +#scrollUp:hover { + color: #2980b9; +} \ No newline at end of file diff --git a/templates/timeline/blueviolet_skin.css b/templates/timeline/blueviolet_skin.css new file mode 100644 index 00000000..eedff2d5 --- /dev/null +++ b/templates/timeline/blueviolet_skin.css @@ -0,0 +1,867 @@ +/* +Theme: Timeline +Theme developed for Serendipity by Don Chambers (www.optional-necessity.com) +blueviolet +*/ + +body { + background-color: #262c33; + color: #959da5; +} + +.RightSideBar a{ + color: #959da5; +} + +.wrapper { + background-color: #262c33; +} + +.header { + background-color: #2F3744; + border-bottom: 2px solid #36404A; +} + +.header-custom.is-fixed { + background-color: rgba(67, 78, 89, 0.9); +} + +.subheader { + background-color: #1e2329; + border-bottom: 1px solid #2f3744; +} + +.staticpage_subheader { + color: #808080; +} + +.header .navbar-default .navbar-toggle .fa { + color: #fff; +} + +.header .navbar-default .navbar-nav > li > a { + color: #959da5; +} + +.header .navbar-default .navbar-nav > li a { + border-bottom: 1px solid #36404A; +} + +.is-fixed .navbar-default .navbar-nav > li > a { + color: #ccc; +} + +.modal-content { + background: #313A42; +} + +.modal-header {border-bottom: 1px solid #262c33} + +.modal-footer {border:0} + +button.close {color: inherit; opacity: 0.5;} + +#serendipityQuickSearchTermField { + background: #262c33; + border: 1px solid #262c33; + color: #fff; +} + +h1, h2, h3, h4, h5, h6 { + color: #ccc; +} + +hr { + border-color:#36404A; +} + +.archives_summary .post-info {color: #727c87;} + +.btn-theme.disabled { + background-color: #434e59; + border: 1px solid #434e59; + color: #888; +} + +.timeline:before { /* this is the vertical line */ + background-color: #36404A; +} + +.timeline > li > .timeline-panel { + border: 1px solid #36404A; +} + +.timeline > li > .timeline-panel:before { + border-left: 15px solid #36404A; + border-right: 0 solid #36404A; +} + +.timeline > li > .timeline-panel:after { + border-left: 14px solid #36404A; + border-right: 0 solid #36404A; +} + +.timeline > li.timeline-month-heading { + color: #ccc; +} + +.tldate { + background-color: #313A42; + border: 2px solid #36404A; + color: #adadad; +} + +.entry-footer .fa, +.timeline > li > .timeline-badge { + color: #51606e; +} + +.timeline .timeline-footer{ + border-top: 1px solid #36404A; +} + +.timeline .timeline-footer i { + color: #51606e; +} + + +@media (max-width: 992px) { + .timeline > li > .timeline-panel:before { + border-left: 11px solid #36404A; + } + + .timeline > li > .timeline-panel:after { + border-left: 10px solid #36404A; + } +} + + +@media (max-width: 767px) { + ul.timeline > li > .timeline-panel:before { + border-left: 0; + } + + ul.timeline > li > .timeline-panel:after { + border-left: 0; + } +} + +.footer-container .footer { + background-color: #1e2329; +} + +.footer-container .footer, +.footer-container .footer li, +.footer-container .footer p { + color: #959da5; +} + +.FooterSideBar a { + color: #586467; +} + +.copyright { + background: #2F3744; +} + +.footer-socials a { + color: #51606e; +} + +.comment-date { + color: #808080; + font-weight: normal; +} + +.serendipity_imageComment_txt { + color: #5b676a; +} + +blockquote { + color: #5b676a; +} + +.post-info {color: #727c87;} + + +table { + margin-bottom: 20px; + max-width: 100%; + width: 100%; +} +table > tbody > tr > td, +table > tbody > tr > th, +table > tfoot > tr > td, +table > tfoot > tr > th, +table > thead > tr > td, +table > thead > tr > th { + border-top: 1px solid #ddd; + line-height: 1.42857; + padding: 8px; + vertical-align: top; +} +table > thead > tr > th { + border-bottom: 2px solid #ddd; + vertical-align: bottom; +} +table > caption + thead > tr:first-child > td, +table > caption + thead > tr:first-child > th, +table > colgroup + thead > tr:first-child > td, +table > colgroup + thead > tr:first-child > th, +table > thead:first-child > tr:first-child > td, +table > thead:first-child > tr:first-child > th { + border-top: 0 none; +} +table > tbody + tbody { + border-top: 2px solid #ddd; +} +table table { + background-color: #fff; +} + +#captcha, +#serendipity_replyTo, +.form-control { + background-color: #222; + border: 1px solid #36404A; + color: #959da5; + +} + +/* bootstrap classes for darker skin */ + .alert-success { + background-color: #62c462; + border-color: #62bd4f; + color: #ffffff; +} +.alert-success hr { + border-top-color: #55b142; +} +.alert-success .alert-link { + color: #e6e6e6; +} +.alert-info { + background-color: #5bc0de; + border-color: #3dced8; + color: #ffffff; +} +.alert-info hr { + border-top-color: #2ac7d2; +} +.alert-info .alert-link { + color: #e6e6e6; +} +.alert-warning { + background-color: #f89406; + border-color: #e96506; + color: #ffffff; +} +.alert-warning hr { + border-top-color: #d05a05; +} +.alert-warning .alert-link { + color: #e6e6e6; +} +.alert-danger { + background-color: #ee5f5b; + border-color: #ed4d63; + color: #ffffff; +} +.alert-danger hr { + border-top-color: #ea364f; +} +.alert-danger .alert-link { + color: #e6e6e6; +} + + + + +.panel { + margin-bottom: 20px; + background-color: #2e3338; + border: 1px solid transparent; + border-radius: 4px; + -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); + box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); +} +.panel-body { + padding: 15px; +} +.panel-heading { + padding: 10px 15px; + border-bottom: 1px solid transparent; + border-top-right-radius: 3px; + border-top-left-radius: 3px; +} +.panel-heading > .dropdown .dropdown-toggle { + color: inherit; +} + +.panel-title > a, +.panel-title > small, +.panel-title > .small, +.panel-title > small > a, +.panel-title > .small > a { + color: inherit; +} +.panel-footer { + padding: 10px 15px; + background-color: #3e444c; + border-top: 1px solid rgba(0, 0, 0, 0.6); + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .list-group, +.panel > .panel-collapse > .list-group { + margin-bottom: 0; +} +.panel > .list-group .list-group-item, +.panel > .panel-collapse > .list-group .list-group-item { + border-width: 1px 0; + border-radius: 0; +} +.panel > .list-group:first-child .list-group-item:first-child, +.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { + border-top: 0; + border-top-right-radius: 3px; + border-top-left-radius: 3px; +} +.panel > .list-group:last-child .list-group-item:last-child, +.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { + border-bottom: 0; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child { + border-top-right-radius: 0; + border-top-left-radius: 0; +} +.panel-heading + .list-group .list-group-item:first-child { + border-top-width: 0; +} +.list-group + .panel-footer { + border-top-width: 0; +} +.panel > .table, +.panel > .table-responsive > .table, +.panel > .panel-collapse > .table { + margin-bottom: 0; +} +.panel > .table caption, +.panel > .table-responsive > .table caption, +.panel > .panel-collapse > .table caption { + padding-left: 15px; + padding-right: 15px; +} +.panel > .table:first-child, +.panel > .table-responsive:first-child > .table:first-child { + border-top-right-radius: 3px; + border-top-left-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { + border-top-left-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { + border-top-right-radius: 3px; +} +.panel > .table:last-child, +.panel > .table-responsive:last-child > .table:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { + border-bottom-right-radius: 3px; +} +.panel > .panel-body + .table, +.panel > .panel-body + .table-responsive, +.panel > .table + .panel-body, +.panel > .table-responsive + .panel-body { + border-top: 1px solid #1c1e22; +} +.panel > .table > tbody:first-child > tr:first-child th, +.panel > .table > tbody:first-child > tr:first-child td { + border-top: 0; +} +.panel > .table-bordered, +.panel > .table-responsive > .table-bordered { + border: 0; +} +.panel > .table-bordered > thead > tr > th:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:first-child, +.panel > .table-bordered > tbody > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, +.panel > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-bordered > thead > tr > td:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:first-child, +.panel > .table-bordered > tbody > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, +.panel > .table-bordered > tfoot > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; +} +.panel > .table-bordered > thead > tr > th:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:last-child, +.panel > .table-bordered > tbody > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, +.panel > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-bordered > thead > tr > td:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:last-child, +.panel > .table-bordered > tbody > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, +.panel > .table-bordered > tfoot > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; +} +.panel > .table-bordered > thead > tr:first-child > td, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > td, +.panel > .table-bordered > tbody > tr:first-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, +.panel > .table-bordered > thead > tr:first-child > th, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > th, +.panel > .table-bordered > tbody > tr:first-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { + border-bottom: 0; +} +.panel > .table-bordered > tbody > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, +.panel > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-bordered > tbody > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, +.panel > .table-bordered > tfoot > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { + border-bottom: 0; +} +.panel > .table-responsive { + border: 0; + margin-bottom: 0; +} +.panel-group { + margin-bottom: 20px; +} +.panel-group .panel { + margin-bottom: 0; + border-radius: 4px; +} +.panel-group .panel + .panel { + margin-top: 5px; +} +.panel-group .panel-heading { + border-bottom: 0; +} +.panel-group .panel-heading + .panel-collapse > .panel-body, +.panel-group .panel-heading + .panel-collapse > .list-group { + border-top: 1px solid rgba(0, 0, 0, 0.6); +} +.panel-group .panel-footer { + border-top: 0; +} +.panel-group .panel-footer + .panel-collapse .panel-body { + border-bottom: 1px solid rgba(0, 0, 0, 0.6); +} +.panel-default { + border-color: rgba(0, 0, 0, 0.6); +} +.panel-default > .panel-heading { + color: #c8c8c8; + background-color: #3e444c; + border-color: rgba(0, 0, 0, 0.6); +} +.panel-default > .panel-heading + .panel-collapse > .panel-body { + border-top-color: rgba(0, 0, 0, 0.6); +} +.panel-default > .panel-heading .badge { + color: #3e444c; + background-color: #c8c8c8; +} +.panel-default > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: rgba(0, 0, 0, 0.6); +} +.panel-primary { + border-color: rgba(0, 0, 0, 0.6); +} +.panel-primary > .panel-heading { + color: #ffffff; + background-color: #7a8288; + border-color: rgba(0, 0, 0, 0.6); +} +.panel-primary > .panel-heading + .panel-collapse > .panel-body { + border-top-color: rgba(0, 0, 0, 0.6); +} +.panel-primary > .panel-heading .badge { + color: #7a8288; + background-color: #ffffff; +} +.panel-primary > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: rgba(0, 0, 0, 0.6); +} +.panel-success { + border-color: rgba(0, 0, 0, 0.6); +} +.panel-success > .panel-heading { + color: #ffffff; + background-color: #62c462; + border-color: rgba(0, 0, 0, 0.6); +} +.panel-success > .panel-heading + .panel-collapse > .panel-body { + border-top-color: rgba(0, 0, 0, 0.6); +} +.panel-success > .panel-heading .badge { + color: #62c462; + background-color: #ffffff; +} +.panel-success > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: rgba(0, 0, 0, 0.6); +} +.panel-info { + border-color: rgba(0, 0, 0, 0.6); +} +.panel-info > .panel-heading { + color: #ffffff; + background-color: #5bc0de; + border-color: rgba(0, 0, 0, 0.6); +} +.panel-info > .panel-heading + .panel-collapse > .panel-body { + border-top-color: rgba(0, 0, 0, 0.6); +} +.panel-info > .panel-heading .badge { + color: #5bc0de; + background-color: #ffffff; +} +.panel-info > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: rgba(0, 0, 0, 0.6); +} +.panel-warning { + border-color: rgba(0, 0, 0, 0.6); +} +.panel-warning > .panel-heading { + color: #ffffff; + background-color: #f89406; + border-color: rgba(0, 0, 0, 0.6); +} +.panel-warning > .panel-heading + .panel-collapse > .panel-body { + border-top-color: rgba(0, 0, 0, 0.6); +} +.panel-warning > .panel-heading .badge { + color: #f89406; + background-color: #ffffff; +} +.panel-warning > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: rgba(0, 0, 0, 0.6); +} +.panel-danger { + border-color: rgba(0, 0, 0, 0.6); +} +.panel-danger > .panel-heading { + color: #ffffff; + background-color: #ee5f5b; + border-color: rgba(0, 0, 0, 0.6); +} +.panel-danger > .panel-heading + .panel-collapse > .panel-body { + border-top-color: rgba(0, 0, 0, 0.6); +} +.panel-danger > .panel-heading .badge { + color: #ee5f5b; + background-color: #ffffff; +} +.panel-danger > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: rgba(0, 0, 0, 0.6); +} + + + + +table { + background-color: #2e3338; +} +caption { + padding-top: 8px; + padding-bottom: 8px; + color: #7a8288; + text-align: left; +} +th { + text-align: left; +} +.table { + width: 100%; + max-width: 100%; + margin-bottom: 20px; +} +.table > thead > tr > th, +.table > tbody > tr > th, +.table > tfoot > tr > th, +.table > thead > tr > td, +.table > tbody > tr > td, +.table > tfoot > tr > td { + padding: 8px; + line-height: 1.42857143; + vertical-align: top; + border-top: 1px solid #1c1e22; +} +.table > thead > tr > th { + vertical-align: bottom; + border-bottom: 2px solid #1c1e22; +} +.table > caption + thead > tr:first-child > th, +.table > colgroup + thead > tr:first-child > th, +.table > thead:first-child > tr:first-child > th, +.table > caption + thead > tr:first-child > td, +.table > colgroup + thead > tr:first-child > td, +.table > thead:first-child > tr:first-child > td { + border-top: 0; +} +.table > tbody + tbody { + border-top: 2px solid #1c1e22; +} +.table .table { + background-color: #272b30; +} +.table-condensed > thead > tr > th, +.table-condensed > tbody > tr > th, +.table-condensed > tfoot > tr > th, +.table-condensed > thead > tr > td, +.table-condensed > tbody > tr > td, +.table-condensed > tfoot > tr > td { + padding: 5px; +} +.table-bordered { + border: 1px solid #1c1e22; +} +.table-bordered > thead > tr > th, +.table-bordered > tbody > tr > th, +.table-bordered > tfoot > tr > th, +.table-bordered > thead > tr > td, +.table-bordered > tbody > tr > td, +.table-bordered > tfoot > tr > td { + border: 1px solid #1c1e22; +} +.table-bordered > thead > tr > th, +.table-bordered > thead > tr > td { + border-bottom-width: 2px; +} +.table-striped > tbody > tr:nth-of-type(odd) { + background-color: #353a41; +} +.table-hover > tbody > tr:hover { + background-color: #49515a; +} +table col[class*="col-"] { + position: static; + float: none; + display: table-column; +} +table td[class*="col-"], +table th[class*="col-"] { + position: static; + float: none; + display: table-cell; +} +.table > thead > tr > td.active, +.table > tbody > tr > td.active, +.table > tfoot > tr > td.active, +.table > thead > tr > th.active, +.table > tbody > tr > th.active, +.table > tfoot > tr > th.active, +.table > thead > tr.active > td, +.table > tbody > tr.active > td, +.table > tfoot > tr.active > td, +.table > thead > tr.active > th, +.table > tbody > tr.active > th, +.table > tfoot > tr.active > th { + background-color: #49515a; +} +.table-hover > tbody > tr > td.active:hover, +.table-hover > tbody > tr > th.active:hover, +.table-hover > tbody > tr.active:hover > td, +.table-hover > tbody > tr:hover > .active, +.table-hover > tbody > tr.active:hover > th { + background-color: #3e444c; +} +.table > thead > tr > td.success, +.table > tbody > tr > td.success, +.table > tfoot > tr > td.success, +.table > thead > tr > th.success, +.table > tbody > tr > th.success, +.table > tfoot > tr > th.success, +.table > thead > tr.success > td, +.table > tbody > tr.success > td, +.table > tfoot > tr.success > td, +.table > thead > tr.success > th, +.table > tbody > tr.success > th, +.table > tfoot > tr.success > th { + background-color: #62c462; +} +.table-hover > tbody > tr > td.success:hover, +.table-hover > tbody > tr > th.success:hover, +.table-hover > tbody > tr.success:hover > td, +.table-hover > tbody > tr:hover > .success, +.table-hover > tbody > tr.success:hover > th { + background-color: #4fbd4f; +} +.table > thead > tr > td.info, +.table > tbody > tr > td.info, +.table > tfoot > tr > td.info, +.table > thead > tr > th.info, +.table > tbody > tr > th.info, +.table > tfoot > tr > th.info, +.table > thead > tr.info > td, +.table > tbody > tr.info > td, +.table > tfoot > tr.info > td, +.table > thead > tr.info > th, +.table > tbody > tr.info > th, +.table > tfoot > tr.info > th { + background-color: #5bc0de; +} +.table-hover > tbody > tr > td.info:hover, +.table-hover > tbody > tr > th.info:hover, +.table-hover > tbody > tr.info:hover > td, +.table-hover > tbody > tr:hover > .info, +.table-hover > tbody > tr.info:hover > th { + background-color: #46b8da; +} +.table > thead > tr > td.warning, +.table > tbody > tr > td.warning, +.table > tfoot > tr > td.warning, +.table > thead > tr > th.warning, +.table > tbody > tr > th.warning, +.table > tfoot > tr > th.warning, +.table > thead > tr.warning > td, +.table > tbody > tr.warning > td, +.table > tfoot > tr.warning > td, +.table > thead > tr.warning > th, +.table > tbody > tr.warning > th, +.table > tfoot > tr.warning > th { + background-color: #f89406; +} +.table-hover > tbody > tr > td.warning:hover, +.table-hover > tbody > tr > th.warning:hover, +.table-hover > tbody > tr.warning:hover > td, +.table-hover > tbody > tr:hover > .warning, +.table-hover > tbody > tr.warning:hover > th { + background-color: #df8505; +} +.table > thead > tr > td.danger, +.table > tbody > tr > td.danger, +.table > tfoot > tr > td.danger, +.table > thead > tr > th.danger, +.table > tbody > tr > th.danger, +.table > tfoot > tr > th.danger, +.table > thead > tr.danger > td, +.table > tbody > tr.danger > td, +.table > tfoot > tr.danger > td, +.table > thead > tr.danger > th, +.table > tbody > tr.danger > th, +.table > tfoot > tr.danger > th { + background-color: #ee5f5b; +} + +.table-hover > tbody > tr > td.danger:hover, +.table-hover > tbody > tr > th.danger:hover, +.table-hover > tbody > tr.danger:hover > td, +.table-hover > tbody > tr:hover > .danger, +.table-hover > tbody > tr.danger:hover > th { + background-color: #ec4844; +} + +table, .table .success, .table .warning, .table .danger, .table .info { + color: #fff; +} + +.table-responsive { + overflow-x: auto; + min-height: 0.01%; +} +@media screen and (max-width: 767px) { + .table-responsive { + width: 100%; + margin-bottom: 15px; + overflow-y: hidden; + -ms-overflow-style: -ms-autohiding-scrollbar; + border: 1px solid #1c1e22; + } + .table-responsive > .table { + margin-bottom: 0; + } + .table-responsive > .table > thead > tr > th, + .table-responsive > .table > tbody > tr > th, + .table-responsive > .table > tfoot > tr > th, + .table-responsive > .table > thead > tr > td, + .table-responsive > .table > tbody > tr > td, + .table-responsive > .table > tfoot > tr > td { + white-space: nowrap; + } + .table-responsive > .table-bordered { + border: 0; + } + .table-responsive > .table-bordered > thead > tr > th:first-child, + .table-responsive > .table-bordered > tbody > tr > th:first-child, + .table-responsive > .table-bordered > tfoot > tr > th:first-child, + .table-responsive > .table-bordered > thead > tr > td:first-child, + .table-responsive > .table-bordered > tbody > tr > td:first-child, + .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; + } + .table-responsive > .table-bordered > thead > tr > th:last-child, + .table-responsive > .table-bordered > tbody > tr > th:last-child, + .table-responsive > .table-bordered > tfoot > tr > th:last-child, + .table-responsive > .table-bordered > thead > tr > td:last-child, + .table-responsive > .table-bordered > tbody > tr > td:last-child, + .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; + } + .table-responsive > .table-bordered > tbody > tr:last-child > th, + .table-responsive > .table-bordered > tfoot > tr:last-child > th, + .table-responsive > .table-bordered > tbody > tr:last-child > td, + .table-responsive > .table-bordered > tfoot > tr:last-child > td { + border-bottom: 0; + } +} \ No newline at end of file diff --git a/templates/timeline/brown_style.css b/templates/timeline/brown_style.css new file mode 100644 index 00000000..2ca71a66 --- /dev/null +++ b/templates/timeline/brown_style.css @@ -0,0 +1,124 @@ +/* +Theme: Timeline +Theme developed for Serendipity by Don Chambers (www.optional-necessity.com) +brown colorset +*/ + +/* +* Brown Color: #9c8061; +* Brown Hover Color: #81674b; +* Darkest color: #6f5539; +*/ + +a { + color: #9c8061; +} + +a:hover, +a:focus { + color: #81674b; +} + +a.subtome:link, +a.subtome:visited { + background: url('img/subtome-brown.png') left bottom no-repeat; +} + +a.subtome:hover, +a.subtome:focus { + background: url('img/subtome-brown.png') -64px center no-repeat; +} + +a.subtome img { + visibility: hidden; +} + +.navbar-default .navbar-brand:hover h1, +.navbar-default .navbar-brand:focus h1{ + color: #81674b; +} + +.header .navbar-default .navbar-toggle { + border-color: #81674b; +} + +.header .navbar-toggle, .header .navbar-default .navbar-toggle:hover, .header .navbar-default .navbar-toggle:focus { + background-color: #9c8061; +} + +@media (max-width: 991px) { + .header .navbar-default .navbar-nav > li > a:hover { + color: #9c8061; + } + .header .navbar-default .navbar-nav > .active > a, .header .navbar-default .navbar-nav > .active > a:hover, .header .navbar-default .navbar-nav > .active > a:focus { + background-color: #9c8061; + } +} + +@media (min-width: 992px) { + .header .navbar-default .navbar-nav a.navbar_current_page, + .header .navbar-default .navbar-nav > li > a:hover { + border-bottom: 2px solid #9c8061; + } + + .header .navbar-default .navbar-nav > li:hover > a { + color: #9c8061; + } +} + +.btn-theme { + background: none repeat scroll 0 0 #9c8061; + border: 1px solid #9c8061; +} + +.btn-theme:hover {color: #9c8061;} + +.pager li > a, +.pager li > span { + background-color: #9c8061; + border: 1px solid #9c8061; +} + +.pager li > a:hover, +.pager li > a:focus { + color: #81674b; +} + +.sidebar_plugin h3{ + border-bottom: 2px solid #9c8061; +} + +.btn-group.archive-button .dropdown-menu > li > a {color: #81674b;} + +.btn-group.archive-button .dropdown-menu > li > a:hover, +.btn-group.archive-button .dropdown-menu > li > a:focus { + background-color: #81674b; +} + +.archive-button-months-entries {border: 1px solid #9c8061;} + +.archive-button-months-entries .badge { + background-color: #6f5539; /* much darker */ +} + +blockquote { + border-left: 5px solid #81674b; +} + +.timeline_freeTag a { + background-color: #9c8061; + border: 1px solid #9c8061; +} + +.timeline_freeTag a:hover, +.timeline_freeTag a:focus { + color: #81674b; +} + +#scrollUp { + background-color: #9c8061; + border: 1px solid #9c8061; +} +#scrollUp:hover { + color: #81674b; +} \ No newline at end of file diff --git a/templates/timeline/commentform.tpl b/templates/timeline/commentform.tpl new file mode 100644 index 00000000..868900ab --- /dev/null +++ b/templates/timeline/commentform.tpl @@ -0,0 +1,51 @@ +<div id="serendipityCommentForm" class="serendipityCommentForm"> + <div id="serendipity_replyform"></div> + <a id="serendipity_CommentForm"></a> + <form id="serendipity_comment" class="form-vertical" action="{$commentform_action}#feedback" method="post"> + <input type="hidden" name="serendipity[entry_id]" value="{$commentform_id}"> + <div class="form-group"> + <label for="serendipity_commentform_name" class="control-label">{$CONST.NAME}</label> + <input id="serendipity_commentform_name" class="form-control" name="serendipity[name]" type="text" value="{$commentform_name}" placeholder="{$CONST.NAME}"> + </div> + <div class="form-group"> + <label for="serendipity_commentform_email" class="control-label">{$CONST.EMAIL}</label> + <input id="serendipity_commentform_email" class="form-control" name="serendipity[email]" type="email" value="{$commentform_email}" placeholder="mail@example.org"> + </div> + <div class="form-group"> + <label for="serendipity_commentform_url" class="control-label">{$CONST.HOMEPAGE}</label> + <input id="serendipity_commentform_url" class="form-control" name="serendipity[url]" type="url" value="{$commentform_url}" placeholder="http://..."> + </div> + <div class="form-group"> + <label for="serendipity_commentform_comment" class="control-label">{$CONST.COMMENT}</label> + <textarea id="serendipity_commentform_comment" class="form-control" name="serendipity[comment]" rows="10" placeholder="{$CONST.COMMENT}">{$commentform_data}</textarea> + </div> + <div class="form-group"> + <label id="reply-to-hint" for="serendipity_replyTo" class="control-label">{$CONST.IN_REPLY_TO}</label> + {$commentform_replyTo} + </div> + <div class="form-group"> + {serendipity_hookPlugin hook="frontend_comment" data=$commentform_entry} + </div> + {if $is_commentform_showToolbar || $is_allowSubscriptions} + <div class="form-group"> + {if $is_commentform_showToolbar} + <div class="checkbox"> + <label class="checkbox-inline" for="checkbox_remember"><input id="checkbox_remember" name="serendipity[remember]" type="checkbox" {$commentform_remember}>{$CONST.REMEMBER_INFO}</label> + </div> + {/if} + {if $is_allowSubscriptions} + <div class="checkbox"> + <label class="checkbox-inline" for="checkbox_subscribe"><input id="checkbox_subscribe" name="serendipity[subscribe]" type="checkbox" {$commentform_subscribe}>{$CONST.SUBSCRIBE_TO_THIS_ENTRY}</label> + </div> + {/if} + </div> + {/if} +{if $is_moderate_comments} + <p class="alert alert-danger">{$CONST.COMMENTS_WILL_BE_MODERATED}</p> +{/if} + <div class="form-group"> + <input id="serendipity_submit" name="serendipity[submit]" class="btn btn-sm btn-default btn-theme" type="submit" value="{$CONST.SUBMIT_COMMENT}"> + <input id="serendipity_preview" name="serendipity[preview]" class="btn btn-sm btn-default btn-theme" type="submit" value="{$CONST.PREVIEW}"> + </div> +</form> +</div> \ No newline at end of file diff --git a/templates/timeline/comments.tpl b/templates/timeline/comments.tpl new file mode 100644 index 00000000..e3de3cd8 --- /dev/null +++ b/templates/timeline/comments.tpl @@ -0,0 +1,61 @@ +<ul class="comment-list"> +{foreach from=$comments item=comment name="comments"} + {if $smarty.foreach.comments.first}{assign var="prevdepth" value=$comment.depth}{/if} + {if ($comment.depth == $prevdepth) && !$smarty.foreach.comments.first} + </li> + {elseif $comment.depth < $prevdepth} + {for $i=1 to $prevdepth-$comment.depth} + </li></ul> + {/for} + </li> + {elseif $comment.depth > $prevdepth} + <ul class="comment-children"> + {/if} + <li id="comment-{$comment.id}" class="comment-list-item"> + <a id="c{$comment.id}"></a> + <div id="div-comment-{$comment.id}" class="comment_any{cycle values=" comment_odd, comment_even"} comment_author_{$comment.author|@makeFilename} {if ($entry.author == $comment.author) && ($entry.email == $commentform_entry.email)}comment_author_self{/if}"> + {if $comment.avatar} + {$comment.avatar} + {/if} + <div class="comment-list-item-body"> + <h5 class="comment-author-heading"> + <span class="comment-author-details"> + {if $comment.url} + <a class="comment-author-url" href="{$comment.url}" title="{$comment.url|@escape}" rel="external nofollow">{$comment.author|@default:$CONST.ANONYMOUS}</a> + {else} + {$comment.author|@default:$CONST.ANONYMOUS} + {/if} + </span> + <time class="comment-date" datetime="{$comment.timestamp|@serendipity_html5time}">{if $template_option.comment_time_format =='time'}{$comment.timestamp|@formatTime:'%b %e. %Y'} {$CONST.AT} {$comment.timestamp|@formatTime:'%I:%M %p'}{else}{elapsed_time_words from_time=$comment.timestamp}{/if}</time> + </h5> + <div class="comment-content"> + {if $comment.body == 'COMMENT_DELETED'} + {$CONST.COMMENT_IS_DELETED} + {else} + {$comment.body} + {/if} + </div> + <div class="comment-meta"> + <a class="comment-source-trace btn btn-sm btn-default btn-theme" href="#c{$comment.id}">#{$comment.trace}</a> + {if $entry.is_entry_owner} + <a class="comment-source-ownerlink comment-reply-link btn btn-sm btn-default btn-theme" href="{$comment.link_delete}" onclick="return confirm('{$CONST.COMMENT_DELETE_CONFIRM|@sprintf:$comment.id:$comment.author}');" title="{$CONST.DELETE}"><i class="fa fa-lg fa-trash-o"></i><span class="sr-only"> {$CONST.DELETE}</span></a> + {/if} + + {if $entry.allow_comments AND $comment.body != 'COMMENT_DELETED'} + <a class="comment-reply-link btn btn-sm btn-default btn-theme" href="#serendipity_CommentForm" id="serendipity_reply_{$comment.id}" onclick="document.getElementById('serendipity_replyTo').value='{$comment.id}'; {$comment_onchange}" title="{$CONST.REPLY}"><i class="fa fa-lg fa-reply"></i><span class="sr-only"> {$CONST.REPLY}</span></a> + <div id="serendipity_replyform_{$comment.id}"></div> + {/if} + </div> + </div> + </div> + {if $smarty.foreach.comments.last} + {if $comment.depth>0} + {for $i=1 to $comment.depth} + </li></ul> + {/for} + {/if} + </li> + {/if} + {assign var="prevdepth" value=$comment.depth} +{/foreach} +</ul> \ No newline at end of file diff --git a/templates/timeline/config.inc.php b/templates/timeline/config.inc.php new file mode 100644 index 00000000..781141e6 --- /dev/null +++ b/templates/timeline/config.inc.php @@ -0,0 +1,409 @@ +<?php +if (IN_serendipity !== true) { + die ("Don't hack!"); +} + +@serendipity_plugin_api::load_language(dirname(__FILE__)); + +$serendipity['smarty']->assign(array('currpage' => "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'])); + +$serendipity['smarty']->assign('archiveURL', serendipity_rewriteURL(PATH_ARCHIVE)); + +if ($serendipity['GET']['adminModule'] == 'templates' || $serendipity['POST']['adminModule'] == 'templates' || $serendipity['GET']['adminAction'] == 'cattemplate') { + $css_files = glob(dirname(__FILE__) . '/*_style.css'); + foreach($css_files AS $css_file) { + $css_file = str_replace('_style.css', '', basename($css_file)); + if (!isset($colorsets[$css_file])) { + $colorsets[$css_file] = $css_file; + } + } +} + +if ($serendipity['GET']['adminModule'] == 'templates' || $serendipity['POST']['adminModule'] == 'templates' || $serendipity['GET']['adminAction'] == 'cattemplate') { + $skin_files = glob(dirname(__FILE__) . '/*_skin.css'); + $skinsets[$skin_file] = 'light'; // light is default, but light_skin.css does not exist as light styles are written into style.css + foreach($skin_files AS $skin_file) { + $skin_file = str_replace('_skin.css', '', basename($skin_file)); + if (!isset($skinsets[$skin_file])) { + $skinsets[$skin_file] = $skin_file; + } + } +} + +// show elapsed time in words, such as x hours ago. +function distanceOfTimeInWords($fromTime, $toTime = 0) { + $distanceInSeconds = round(abs($toTime - $fromTime)); + $distanceInMinutes = round($distanceInSeconds / 60); + + if ( $distanceInMinutes <= 1 ) { + if ( $distanceInSeconds < 60 ) { + return ELAPSED_LESS_THAN_MINUTE_AGO; + } + return ELAPSED_ONE_MINUTE_AGO; + } + if ( $distanceInMinutes < 45 ) { + return (sprintf(ELAPSED_MINUTES_AGO, $distanceInMinutes)); + } + if ( $distanceInMinutes < 90 ) { + return ELAPSED_ABOUT_ONE_HOUR_AGO; + } + // less than 24 hours + if ( $distanceInMinutes < 1440 ) { + return (sprintf(ELAPSED_HOURS_AGO, round(floatval($distanceInMinutes) / 60.0))); + } + //less than 48hours + if ( $distanceInMinutes < 2880 ) { + return ELAPSED_ONE_DAY_AGO; + } + // less than 30 days + if ( $distanceInMinutes < 43200 ) { + return (sprintf(ELAPSED_DAYS_AGO, round(floatval($distanceInMinutes) / 1440))); + } + //less than 60 days + if ( $distanceInMinutes < 86400 ) { + return ELAPSED_ABOUT_ONE_MONTH_AGO; + } + // less than 365 days + if ( $distanceInMinutes < 525600 ) { + return (sprintf(ELAPSED_MONTHS_AGO, round(floatval($distanceInMinutes) / 43200))); + } + // less than 2 years + if ( $distanceInMinutes < 1051199 ) { + return ELAPSED_ABOUT_ONE_YEAR_AGO; + } + return (sprintf(ELAPSED_OVER_YEARS_AGO, round(floatval($distanceInMinutes) / 525600))); +} + +// smarty function to use distanceOfTimeInWords function +// call from tpl as {elapsed_time_words from_time=$comment.timestamp} +$serendipity['smarty']->register_function('elapsed_time_words', 'timeAgoInWords'); + +function timeAgoInWords($params, &$smarty) { + return distanceOfTimeInWords($params['from_time'], time()); + } + +// Used to determine if entry image begins with <iframe,<embed,<object. See entries.tpl +function is_in_string($string, $search) { + $array = explode(',', $search); + foreach($array AS $idx => $searchval) { + if (strpos($string, $searchval) === 0) { + return true; + } + } + return false; +} +$serendipity['smarty']->registerPlugin('modifier', 'is_in_string', 'is_in_string'); + +if (class_exists('serendipity_event_entryproperties')) { + $ep_msg=THEME_EP_YES; + } else { + $ep_msg=THEME_EP_NO; +} + +$template_config = array( + array( + 'var' => 'sidebars', + 'type' => 'hidden', + 'value' => 'right,footer,hide', + ), + array( + 'var' => 'theme_instructions', + 'type' => 'content', + 'default' => '<p>' . THEME_DEMO_AVAILABLE . '</p>' . $ep_msg . THEME_INSTRUCTIONS . '<p>' . CATEGORIES_ON_ARCHIVE_DESC . '</p><p>' . TAGS_ON_ARCHIVE_DESC . '</p>', + ), + array( + 'var' => 'use_corenav', + 'name' => USE_CORENAV, + 'type' => 'boolean', + 'default' => true, + ), + array( + 'var' => 'colorset', + 'name' => THEME_COLORSET, + 'type' => 'select', + 'default' => 'green', + 'select_values' => $colorsets + ), + array( + 'var' => 'skinset', + 'name' => THEME_SKINSET, + 'type' => 'select', + 'default' => 'light', + 'select_values' => $skinsets + ), + array( + 'var' => 'header_img', + 'name' => HEADER_IMG, + 'description' => HEADER_IMG_DESC, + 'type' => 'media', + 'default' => serendipity_getTemplateFile('header.jpg', 'serendipityHTTPPath', true) + ), + array( + 'var' => 'subheader_img', + 'name' => SUBHEADER_IMG, + 'description' => SUBHEADER_IMG_DESC, + 'type' => 'media', + 'default' => serendipity_getTemplateFile('subheader.jpg', 'serendipityHTTPPath', true) + ), + array( + 'var' => 'date_format', + 'name' => ENTRY_DATE_FORMAT . ' (http://php.net/strftime)', + 'type' => 'string', + 'default' => DATE_FORMAT_ENTRY, + ), + array( + 'var' => 'comment_time_format', + 'name' => COMMENT_TIME_FORMAT, + 'type' => 'select', + 'default' => 'words', + 'select_values' => array('words' => WORDS, + 'time' => TIMESTAMP) + ), + array( + 'var' => 'display_as_timeline', + 'name' => DISPLAY_AS_TIMELINE, + 'description' => DISPLAY_AS_TIMELINE_DESC, + 'type' => 'boolean', + 'default' => true, + ), + array( + 'var' => 'months_on_timeline', + 'name' => MONTHS_ON_TIMELINE, + 'description' => MONTHS_ON_TIMELINE_DESC, + 'type' => 'boolean', + 'default' => true, + ), + array( + 'var' => 'months_on_timeline_format', + 'name' => MONTHS_ON_TIMELINE_FORMAT . ' (http://php.net/strftime)', + 'type' => 'string', + 'default' => '%B, %Y', + ), + array( + 'var' => 'categories_on_archive', + 'name' => CATEGORIES_ON_ARCHIVE, + 'description' => CATEGORIES_ON_ARCHIVE_DESC, + 'type' => 'boolean', + 'default' => true, + ), + array( + 'var' => 'category_rss_archive', + 'name' => CATEGORY_RSS_ON_ARCHIVE, + 'type' => 'boolean', + 'default' => true, + ), array( + 'var' => 'tags_on_archive', + 'name' => TAGS_ON_ARCHIVE, + 'description' => TAGS_ON_ARCHIVE_DESC, + 'type' => 'boolean', + 'default' => true, + ), + array( + 'var' => 'copyright', + 'name' => COPYRIGHT, + 'type' => 'string', + 'default' => 'Copyright © ' . $serendipity['blogTitle'] . ' ' . date(Y) . '. <a href="#">Link 1</a> | <a href="#">Link 2</a> | <a href="' . $serendipity['baseURL'] . 'serendipity_admin.php">Login</a>', + ), + array( + 'var' => 'social_icons_amount', + 'name' => SOCIAL_ICONS_AMOUNT, + 'type' => 'string', + 'default' => '2', + ), +); + +// register footer sidebar with smarty +$FooterSidebarElements = serendipity_plugin_api::count_plugins('footer'); +$serendipity['smarty']->assign_by_ref('FooterSidebarElements', $FooterSidebarElements); + + //$template_global_config = array('navigation' => true); + //$template_loaded_config = serendipity_loadThemeOptions($template_config, $serendipity['smarty_vars']['template_option'], true); + //$serendipity['template_loaded_config'][$serendipity['template']] = $template_loaded_config; // copy into global scope for extended plugin API usage + //serendipity_loadGlobalThemeOptions($template_config, $template_loaded_config, $template_global_config); + + +$template_global_config = array('navigation' => true); +$serendipity['template_loaded_config'] = $template_loaded_config = serendipity_loadThemeOptions($template_config, $serendipity['smarty_vars']['template_option'], true); +serendipity_loadGlobalThemeOptions($template_config, $template_loaded_config, $template_global_config); + + +// $template_global_config = array('navigation' => true); +// $template_loaded_config = serendipity_loadThemeOptions($template_config, $serendipity['smarty_vars']['template_option'], true); +// serendipity_loadGlobalThemeOptions($template_config, $template_loaded_config, $template_global_config); + + +// if number of icons has changed, show new count +if(isset($_POST['serendipity']['template']['social_icons_amount']) && serendipity_userLoggedIn() && serendipity_checkPermission('adminTemplates')) { + $temp_post=$_POST['serendipity']['template']['social_icons_amount']; + if(is_numeric($temp_post)) { + $template_loaded_config['social_icons_amount'] =$temp_post; + } +} + +$socialicons = array(); +for ($i = 0; $i < $template_loaded_config['social_icons_amount']; $i++) { + $template_config[] = array( + 'var' => 'social_icon' . $i . 'service', + 'name' => SOCIAL_NETWORK_SERVICE . ' #' .($i+1), + 'type' => 'select', + 'default' => 'RSS', + 'select_values' => array('Amazon' => 'Amazon', + 'Digg' => 'Digg', + 'Dribbble' => 'Dribbble', + 'Dropbox' => 'Dropbox', + 'Facebook' => 'Facebook', + 'Flickr' => 'Flickr', + 'Github' => 'Github', + 'Google' => 'Google', + 'Google Plus' => 'Google Plus', + 'Instagram' => 'Instagram', + 'LastFM' => 'LastFM', + 'Linkedin' => 'Linkedin', + 'Paypal' => 'Paypal', + 'Pinterest' => 'Pinterest', + 'RSS' => 'RSS', + 'Skype' => 'Skype', + 'Reddit' => 'Reddit', + 'Stumbleupon' => 'Stumbleupon', + 'Tumblr' => 'Tumblr', + 'Twitter' => 'Twitter', + 'Vimeo' => 'Vimeo', + 'Vine' => 'Vine', + 'Xing' => 'Xing', + 'YouTube' => 'YouTube') + ); + $template_config[] = array( + 'var' => 'social_icon' . $i . 'url', + 'name' => SOCIAL_ICON_URL . ' #' .($i+1), + 'type' => 'string', + 'default' => '#', + ); + $socialicons[] = array( + 'service' => $template_loaded_config['social_icon' . $i . 'service'], + 'url' => $template_loaded_config['social_icon' . $i . 'url'], + ); +} +$serendipity['smarty']->assign_by_ref('socialicons', $socialicons); + +function getIcon($service) { + $icons = array('Amazon' => 'fa-amazon', 'Digg' => 'fa-digg', 'Dribbble' => 'fa-dribbble', 'Dropbox' => 'fa-dropbox', 'Facebook' => 'fa-facebook', 'Flickr' => 'fa-flickr', 'Github' => 'fa-github', 'Google' =>'fa-google', 'Google Plus' => 'fa-google-plus', 'Instagram' => 'fa-instagram', 'LastFM' => 'fa-lastfm', 'Linkedin' => 'fa-linkedin', 'Paypal' => 'fa-paypal', 'Pinterest' => 'fa-pinterest', 'RSS' => 'fa-rss', 'Skype' => 'fa-skype', 'Reddit' => 'fa-reddit', 'Stumbleupon' => 'fa-stumbleupon', 'Tumblr' => 'fa-tumblr', 'Twitter' => 'fa-twitter', 'Vimeo' => 'fa-vimeo', 'Vine' => 'fa-vine', 'Xing' => 'fa-xing', 'YouTube' => 'fa-youtube',); + return $icons[$service]; +} + +$serendipity['smarty']->register_function('service_icon', 'getServiceIcon'); + +function getServiceIcon ($params, &$smarty) { + return getIcon($params['from_service']); +} + + +$navlinks_collapse = array( 'use_corenav', 'amount'); +for ($i = 0; $i < $template_loaded_config['amount']; $i++) { + array_push($navlinks_collapse, 'navlink' . $i . 'text' ,'navlink' . $i . 'url'); +} + +$sociallinks_collapse = array('social_icons_amount'); +for ($i = 0; $i < $template_loaded_config['social_icons_amount']; $i++) { + array_push($sociallinks_collapse, 'social_icon' . $i . 'service' ,'social_icon' . $i . 'url'); +} + +$template_config_groups = array( + THEME_README => array('theme_instructions'), + THEME_IDENTITY => array('sidebars', 'header_img', 'subheader_img', 'colorset', 'skinset', 'copyright'), + THEME_PAGE_OPTIONS => array('date_format', 'comment_time_format', 'display_as_timeline', 'months_on_timeline', 'months_on_timeline_format', 'categories_on_archive', 'category_rss_archive', 'tags_on_archive'), + THEME_NAVIGATION => $navlinks_collapse, + THEME_SOCIAL_LINKS => $sociallinks_collapse +); + + +// Save custom field variables within the serendipity "Edit/Create Entry" backend. +// Any custom variables can later be queried inside the .tpl files through +// {if $entry.properties.key_value == 'true'}...{/if} + +// Function to get the content of a non-boolean entry variable +function entry_option_get_value($property_key, &$eventData) { + global $serendipity; + if (isset($eventData['properties'][$property_key])) return $eventData['properties'][$property_key]; + if (isset($serendipity['POST']['properties'][$property_key])) return $serendipity['POST']['properties'][$property_key]; + return false; +} + +// Function to store form values into the serendipity database, so that they will be retrieved later. +function entry_option_store($property_key, $property_val, &$eventData) { + global $serendipity; + + $q = "DELETE FROM {$serendipity['dbPrefix']}entryproperties WHERE entryid = " . (int)$eventData['id'] . " AND property = '" . serendipity_db_escape_string($property_key) . "'"; + serendipity_db_query($q); + + if (!empty($property_val)) { + $q = "INSERT INTO {$serendipity['dbPrefix']}entryproperties (entryid, property, value) VALUES (" . (int)$eventData['id'] . ", '" . serendipity_db_escape_string($property_key) . "', '" . serendipity_db_escape_string($property_val) . "')"; + serendipity_db_query($q); + } +} + +function serendipity_plugin_api_pre_event_hook($event, &$bag, &$eventData, &$addData) { + global $serendipity; + + // Check what Event is coming in, only react to those we want. + switch($event) { + + // Displaying the backend entry section + case 'backend_display': + // INFO: The whole 'entryproperties' injection is easiest to store any data you want. The entryproperties plugin + // should actually not even be required to do this, as serendipity loads all properties regardless of the installed plugin + + // The name of the variable + $timeline_image_key = 'timeline_image'; + + // Check what our special key is set to (checks both POST data as well as the actual data) + $is_timeline_image = entry_option_get_value ($timeline_image_key, $eventData); + + // This is the actual HTML output on the backend screen. + //DEBUG: echo '<pre>' . print_r($eventData, true) . '</pre>'; + echo '<div class="entryproperties">'; + echo ' <input type="hidden" value="true" name="serendipity[propertyform]">'; + echo ' <div class="entryproperties_customfields adv_opts_box">'; + echo ' <h4>' . THEME_CUSTOM_FIELD_HEADING . '</h4>'; + echo ' <span>' . THEME_CUSTOM_FIELD_DEFINITION . '</span>'; + echo ' <div class="serendipity_customfields clearfix">'; + echo ' <div class="clearfix form_area media_choose" id="ep_column_' . $timeline_image_key . '">'; + echo ' <label for="' . $timeline_image_key . '">' . THEME_ENTRY_IMAGE. '</label>'; + echo ' <textarea data-configitem="' . $timeline_image_key . '" name="serendipity[properties][' . $timeline_image_key . ']" class="change_preview" id="prop' . $timeline_image_key . '">' . $is_timeline_image . '</textarea>'; + echo ' <button title="' . MEDIA . '" name="insImage" type="button" class="customfieldMedia"><span class="icon-picture"></span><span class="visuallyhidden">' . MEDIA . '</span></button>'; + echo ' <figure id="' . $timeline_image_key . '_preview">'; + echo ' <figcaption>' . PREVIEW . '</figcaption>'; + echo ' <img alt="" src="' . $is_timeline_image . '">'; + echo ' </figure>'; + echo ' </div>'; + echo ' </div>'; + echo ' </div>'; + echo ' </div>'; + + break; + + // To store the value of our entryproperties + case 'backend_publish': + case 'backend_save': + // Call the helper function with all custom variables here. + entry_option_store('timeline_image', $serendipity['POST']['properties']['timeline_image'], $eventData); + break; + + case 'css': + $tfile = dirname(__FILE__) . '/' . $serendipity['template_loaded_config']['skinset'] . '_skin.css'; + if ($tfile) { + $tfilecontent = str_replace('img/', 'templates/' . $serendipity['template'] . '/img/', @file_get_contents($tfile)); + } + if (!empty($tfilecontent)) { + $eventData .= "/* Skinset styles loaded via theme config */ \n\n" . $tfilecontent . "\n\n"; + $tfilecontent = ''; // so as not to have content in next condition since reusing var. + } + $tfile = dirname(__FILE__) . '/' . $serendipity['template_loaded_config']['colorset'] . '_style.css'; + if ($tfile) { + $tfilecontent = str_replace('img/', 'templates/' . $serendipity['template'] . '/img/', @file_get_contents($tfile)); + } + if (!empty($tfilecontent)) { + $eventData .= "/* Colorset styles loaded via theme config */ \n\n" . $tfilecontent . "\n\n"; + } + break; + } +} \ No newline at end of file diff --git a/templates/timeline/content.tpl b/templates/timeline/content.tpl new file mode 100644 index 00000000..9529aed9 --- /dev/null +++ b/templates/timeline/content.tpl @@ -0,0 +1,111 @@ +{if $searchresult_tooShort || $searchresult_noEntries} +<div id="search-block" class="row"> + <div class="col-md-8 col-md-offset-2"> + <div id="search-response" class="panel panel-warning"> + <div class="panel-heading"> + <button type="button" class="close" data-target="#search-block" data-dismiss="alert" aria-label="Close" title="{$CONST.CLOSE}"><span aria-hidden="true">×</span><span class="sr-only">{$CONST.CLOSE}</span></button> + <h3 class="panel-title">{$CONST.SEARCH}</h3> + </div> + <div class="panel-body"> + <p><span class="fa-stack text-warning" aria-hidden="true"><i class="fa fa-frown-o fa-2x"></i></span> {$content_message}</p> + <div class="input-group" style="width:100%; margin-bottom: 20px;">{* REMOVE INLINE STYLES *} + <form id="searchform" class="input-group" action="{$serendipityHTTPPath}{$serendipityIndexFile}" method="get"> + <input type="hidden" name="serendipity[action]" value="search" /> + <label for="serendipityQuickSearchTermFieldBox" class="sr-only">{$CONST.QUICKSEARCH}</label> + <input class="form-control" alt="{$CONST.SEARCH_SITE}" type="text" id="serendipityQuickSearchTermFieldBox" name="serendipity[searchTerm]" value="{$CONST.SEARCH}..." onfocus="if(this.value=='{$CONST.SEARCH}...')value=''" onblur="if(this.value=='')value='{$CONST.SEARCH}...';" /> + <span class="input-group-btn"> + <input class="btn btn-sm btn-default btn-theme quicksearch_submit" type="submit" value="{$CONST.GO}" alt="{$CONST.SEARCH_SITE}" name="serendipity[searchButton]" title="{$CONST.SEARCH}" /> + </span> + <div id="LSResult" style="display: none;"><div id="LSShadow"></div></div> + </form> + </div> + {serendipity_hookPlugin hook="quicksearch_plugin" hookAll="true"} + </div> + </div> + </div> +</div> + +{elseif $searchresult_error} +<div id="search-block" class="row"> + <div class="col-md-8 col-md-offset-2"> + <div id="search-response" class="panel panel-danger"> + <div class="panel-heading"> + <button type="button" class="close" data-target="#search-block" data-dismiss="alert" aria-label="Close" title="{$CONST.CLOSE}"><span aria-hidden="true">×</span><span class="sr-only">{$CONST.CLOSE}</span></button> + <h3 class="panel-title">{$CONST.SEARCH}</h3> + </div> + <div class="panel-body"> + <p><span class="fa-stack text-danger" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-exclamation fa-stack-1x"></i></span> {$content_message}</p> + <div class="input-group" style="width:100%; margin-bottom: 20px;">{* REMOVE INLINE STYLES *} + <form id="searchform" class="input-group" action="{$serendipityHTTPPath}{$serendipityIndexFile}" method="get"> + <input type="hidden" name="serendipity[action]" value="search" /> + <label for="serendipityQuickSearchTermFieldBox" class="sr-only">{$CONST.QUICKSEARCH}</label> + <input class="form-control" alt="{$CONST.SEARCH_SITE}" type="text" id="serendipityQuickSearchTermFieldBox" name="serendipity[searchTerm]" value="{$CONST.SEARCH}..." onfocus="if(this.value=='{$CONST.SEARCH}...')value=''" onblur="if(this.value=='')value='{$CONST.SEARCH}...';" /> + <span class="input-group-btn"> + <input class="btn btn-sm btn-default btn-theme quicksearch_submit" type="submit" value="{$CONST.GO}" alt="{$CONST.SEARCH_SITE}" name="serendipity[searchButton]" title="{$CONST.SEARCH}" /> + </span> + <div id="LSResult" style="display: none;"><div id="LSShadow"></div></div> + </form> + </div> + {serendipity_hookPlugin hook="quicksearch_plugin" hookAll="true"} + </div> + </div> + </div> +</div> + +{elseif $searchresult_results} +<div id="search-block" class="row"> + <div class="col-md-8 col-md-offset-2"> + <div id="search-response" class="panel panel-success"> + <div class="panel-heading"> + <button type="button" class="close" data-target="#search-block" data-dismiss="alert" aria-label="Close" title="{$CONST.CLOSE}"><span aria-hidden="true">×</span><span class="sr-only">{$CONST.CLOSE}</span></button> + <h3 class="panel-title">{$CONST.SEARCH}</h3> + </div> + <div class="panel-body"> + <span class="fa-stack text-success" aria-hidden="true"></i><i class="fa fa-smile-o fa-2x"></i></span> {$content_message} + </div> + </div> + </div> +</div> + +{elseif $subscribe_confirm_error} +<div id="search-block" class="row"> + <div class="col-md-8 col-md-offset-2"> + <div id="search-response" class="panel panel-danger"> + <div class="panel-heading"> + <button type="button" class="close" data-target="#search-block" data-dismiss="alert" aria-label="Close" title="{$CONST.CLOSE}"><span aria-hidden="true">×</span><span class="sr-only">{$CONST.ERROR}</span></button> + <h3 class="panel-title">{$CONST.ERROR}</h3> + </div> + <div class="panel-body"> + <span class="fa-stack text-danger" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-exclamation fa-stack-1x"></i></span> {$content_message} + </div> + </div> + </div> +</div> + +{elseif $subscribe_confirm_success} +<div id="search-block" class="row"> + <div class="col-md-8 col-md-offset-2"> + <div id="search-response" class="panel panel-success"> + <div class="panel-heading"> + <button type="button" class="close" data-target="#search-block" data-dismiss="alert" aria-label="Close" title="{$CONST.CLOSE}"><span aria-hidden="true">×</span><span class="sr-only">{$CONST.CLOSE}</span></button> + <h3 class="panel-title">{$CONST.SUCCESS}</h3> + </div> + <div class="panel-body"> + <span class="fa-stack text-success" aria-hidden="true"></i><i class="fa fa-smile-o fa-2x"></i></span> {$content_message} + </div> + </div> + </div> +</div> +{elseif $content_message} +<div id="search-block" class="row"> + <div class="col-md-8 col-md-offset-2"> + <div class="alert alert-info alert-dismissible fade in" role="alert"> + <button type="button" class="close" data-target="#search-block" data-dismiss="alert" aria-label="Close" title="{$CONST.CLOSE}"><span aria-hidden="true">×</span></button> + <span class="fa-stack" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-info fa-stack-1x"></i></span></span> {$content_message} + </div> + </div> +</div> +{/if} + +{$ENTRIES} +{$ARCHIVES} \ No newline at end of file diff --git a/templates/timeline/dark_skin.css b/templates/timeline/dark_skin.css new file mode 100644 index 00000000..743f4417 --- /dev/null +++ b/templates/timeline/dark_skin.css @@ -0,0 +1,861 @@ +/* +Theme: Timeline +Theme developed for Serendipity by Don Chambers (www.optional-necessity.com) +dark skin +*/ + +body { + background-color: #252525; + color: #999; +} + +.RightSideBar a{ + color: #999; +} + +.wrapper { + background-color: #252525; +} + +.header { + background-color: #222; + border-bottom: 2px solid #333; +} + +.header-custom.is-fixed { + background-color: rgba(83, 83, 83, 0.9); +} + +.subheader { + background-color: #1c1c1c; + border-bottom: 1px solid #252525; +} + +.staticpage_subheader { + color: #808080; +} + +.header .navbar-default .navbar-toggle .fa { /* navbar toggle icon */ + color: #fff; +} + +.header .navbar-default .navbar-nav > li > a { /* top navbar items */ + color: #999; +} + +.header .navbar-default .navbar-nav > li a { + border-bottom: 1px solid #383838; +} + +.is-fixed .navbar-default .navbar-nav > li > a { /* top navbar items when scrolling up */ + color: #ccc; +} + +.modal-content { + background: #444444; +} + +.modal-header {border-bottom: 1px solid #252525} + +.modal-footer {border:0} + +.modal-dialog button.close {color: inherit; opacity: 0.5;} + +#serendipityQuickSearchTermField { + background: #252525; + border: 1px solid #252525; + color: #fff; +} + +h1, h2, h3, h4, h5, h6 { + color: #ccc; +} + +hr { + border-color:#383838; +} + +.post-info, +.archives_summary .post-info {color: #777;} + +.btn-theme.disabled { + background-color: #535353; + border: 1px solid #535353; + color: #888; +} + +.timeline:before { /* this is the vertical line */ + background-color: #383838; +} + +.timeline > li > .timeline-panel { + border: 1px solid #383838; +} + +.timeline > li > .timeline-panel:before { + border-left: 15px solid #383838; + border-right: 0 solid #383838; +} + +.timeline > li > .timeline-panel:after { + border-left: 14px solid #383838; + border-right: 0 solid #383838; +} + +.timeline > li.timeline-month-heading { + color: #ccc; +} + +.tldate { + background-color: #444; + border: 2px solid #383838; + color: #adadad; +} + +.entry-footer .fa, +.timeline > li > .timeline-badge { + color: #777; +} + +.timeline .timeline-footer{ + border-top: 1px solid #383838; +} + +.timeline .timeline-footer i { + color: #777; +} + + +@media (max-width: 992px) { + .timeline > li > .timeline-panel:before { + border-left: 11px solid #383838; + } + + .timeline > li > .timeline-panel:after { + border-left: 10px solid #383838; + } +} + + +@media (max-width: 767px) { + ul.timeline > li > .timeline-panel:before { + border-left: 0; + } + + ul.timeline > li > .timeline-panel:after { + border-left: 0; + } +} + +.footer-container .footer { + background-color: #1c1c1c; +} + +.footer-container .footer, +.footer-container .footer li, +.footer-container .footer p { + color: #999; +} + +.FooterSideBar a { + color: #555; +} + +.copyright { + background: #222; +} + +.footer-socials a { + color: #777; +} + +.comment-date { + color: #808080; + font-weight: normal; +} + +.serendipity_imageComment_txt { + color: #555555; +} + +blockquote { + color: #555555; +} + +table { + margin-bottom: 20px; + max-width: 100%; + width: 100%; +} +table > tbody > tr > td, +table > tbody > tr > th, +table > tfoot > tr > td, +table > tfoot > tr > th, +table > thead > tr > td, +table > thead > tr > th { + border-top: 1px solid #ddd; + line-height: 1.42857; + padding: 8px; + vertical-align: top; +} +table > thead > tr > th { + border-bottom: 2px solid #ddd; + vertical-align: bottom; +} +table > caption + thead > tr:first-child > td, +table > caption + thead > tr:first-child > th, +table > colgroup + thead > tr:first-child > td, +table > colgroup + thead > tr:first-child > th, +table > thead:first-child > tr:first-child > td, +table > thead:first-child > tr:first-child > th { + border-top: 0 none; +} +table > tbody + tbody { + border-top: 2px solid #ddd; +} +table table { + background-color: #fff; +} + +#captcha, +#serendipity_replyTo, +.form-control { + background-color: #222; + border: 1px solid #383838; + color: #999; +} + +/* bootstrap classes for darker skin */ + .alert-success { + background-color: #62c462; + border-color: #62bd4f; + color: #ffffff; +} +.alert-success hr { + border-top-color: #55b142; +} +.alert-success .alert-link { + color: #e6e6e6; +} +.alert-info { + background-color: #5bc0de; + border-color: #3dced8; + color: #ffffff; +} +.alert-info hr { + border-top-color: #2ac7d2; +} +.alert-info .alert-link { + color: #e6e6e6; +} +.alert-warning { + background-color: #f89406; + border-color: #e96506; + color: #ffffff; +} +.alert-warning hr { + border-top-color: #d05a05; +} +.alert-warning .alert-link { + color: #e6e6e6; +} +.alert-danger { + background-color: #ee5f5b; + border-color: #ed4d63; + color: #ffffff; +} +.alert-danger hr { + border-top-color: #ea364f; +} +.alert-danger .alert-link { + color: #e6e6e6; +} + +.panel { + margin-bottom: 20px; + background-color: #2e3338; + border: 1px solid transparent; + border-radius: 4px; + -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); + box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); +} +.panel-body { + padding: 15px; +} +.panel-heading { + padding: 10px 15px; + border-bottom: 1px solid transparent; + border-top-right-radius: 3px; + border-top-left-radius: 3px; +} +.panel-heading > .dropdown .dropdown-toggle { + color: inherit; +} + +.panel-title > a, +.panel-title > small, +.panel-title > .small, +.panel-title > small > a, +.panel-title > .small > a { + color: inherit; +} +.panel-footer { + padding: 10px 15px; + background-color: #3e444c; + border-top: 1px solid rgba(0, 0, 0, 0.6); + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .list-group, +.panel > .panel-collapse > .list-group { + margin-bottom: 0; +} +.panel > .list-group .list-group-item, +.panel > .panel-collapse > .list-group .list-group-item { + border-width: 1px 0; + border-radius: 0; +} +.panel > .list-group:first-child .list-group-item:first-child, +.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { + border-top: 0; + border-top-right-radius: 3px; + border-top-left-radius: 3px; +} +.panel > .list-group:last-child .list-group-item:last-child, +.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { + border-bottom: 0; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child { + border-top-right-radius: 0; + border-top-left-radius: 0; +} +.panel-heading + .list-group .list-group-item:first-child { + border-top-width: 0; +} +.list-group + .panel-footer { + border-top-width: 0; +} +.panel > .table, +.panel > .table-responsive > .table, +.panel > .panel-collapse > .table { + margin-bottom: 0; +} +.panel > .table caption, +.panel > .table-responsive > .table caption, +.panel > .panel-collapse > .table caption { + padding-left: 15px; + padding-right: 15px; +} +.panel > .table:first-child, +.panel > .table-responsive:first-child > .table:first-child { + border-top-right-radius: 3px; + border-top-left-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { + border-top-left-radius: 3px; +} +.panel > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, +.panel > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, +.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, +.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { + border-top-right-radius: 3px; +} +.panel > .table:last-child, +.panel > .table-responsive:last-child > .table:last-child { + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { + border-bottom-left-radius: 3px; +} +.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, +.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, +.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, +.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { + border-bottom-right-radius: 3px; +} +.panel > .panel-body + .table, +.panel > .panel-body + .table-responsive, +.panel > .table + .panel-body, +.panel > .table-responsive + .panel-body { + border-top: 1px solid #1c1e22; +} +.panel > .table > tbody:first-child > tr:first-child th, +.panel > .table > tbody:first-child > tr:first-child td { + border-top: 0; +} +.panel > .table-bordered, +.panel > .table-responsive > .table-bordered { + border: 0; +} +.panel > .table-bordered > thead > tr > th:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:first-child, +.panel > .table-bordered > tbody > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, +.panel > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, +.panel > .table-bordered > thead > tr > td:first-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:first-child, +.panel > .table-bordered > tbody > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, +.panel > .table-bordered > tfoot > tr > td:first-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; +} +.panel > .table-bordered > thead > tr > th:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > th:last-child, +.panel > .table-bordered > tbody > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, +.panel > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, +.panel > .table-bordered > thead > tr > td:last-child, +.panel > .table-responsive > .table-bordered > thead > tr > td:last-child, +.panel > .table-bordered > tbody > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, +.panel > .table-bordered > tfoot > tr > td:last-child, +.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; +} +.panel > .table-bordered > thead > tr:first-child > td, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > td, +.panel > .table-bordered > tbody > tr:first-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, +.panel > .table-bordered > thead > tr:first-child > th, +.panel > .table-responsive > .table-bordered > thead > tr:first-child > th, +.panel > .table-bordered > tbody > tr:first-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { + border-bottom: 0; +} +.panel > .table-bordered > tbody > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, +.panel > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, +.panel > .table-bordered > tbody > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, +.panel > .table-bordered > tfoot > tr:last-child > th, +.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { + border-bottom: 0; +} +.panel > .table-responsive { + border: 0; + margin-bottom: 0; +} +.panel-group { + margin-bottom: 20px; +} +.panel-group .panel { + margin-bottom: 0; + border-radius: 4px; +} +.panel-group .panel + .panel { + margin-top: 5px; +} +.panel-group .panel-heading { + border-bottom: 0; +} +.panel-group .panel-heading + .panel-collapse > .panel-body, +.panel-group .panel-heading + .panel-collapse > .list-group { + border-top: 1px solid rgba(0, 0, 0, 0.6); +} +.panel-group .panel-footer { + border-top: 0; +} +.panel-group .panel-footer + .panel-collapse .panel-body { + border-bottom: 1px solid rgba(0, 0, 0, 0.6); +} +.panel-default { + border-color: rgba(0, 0, 0, 0.6); +} +.panel-default > .panel-heading { + color: #c8c8c8; + background-color: #3e444c; + border-color: rgba(0, 0, 0, 0.6); +} +.panel-default > .panel-heading + .panel-collapse > .panel-body { + border-top-color: rgba(0, 0, 0, 0.6); +} +.panel-default > .panel-heading .badge { + color: #3e444c; + background-color: #c8c8c8; +} +.panel-default > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: rgba(0, 0, 0, 0.6); +} +.panel-primary { + border-color: rgba(0, 0, 0, 0.6); +} +.panel-primary > .panel-heading { + color: #ffffff; + background-color: #7a8288; + border-color: rgba(0, 0, 0, 0.6); +} +.panel-primary > .panel-heading + .panel-collapse > .panel-body { + border-top-color: rgba(0, 0, 0, 0.6); +} +.panel-primary > .panel-heading .badge { + color: #7a8288; + background-color: #ffffff; +} +.panel-primary > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: rgba(0, 0, 0, 0.6); +} +.panel-success { + border-color: rgba(0, 0, 0, 0.6); +} +.panel-success > .panel-heading { + color: #ffffff; + background-color: #62c462; + border-color: rgba(0, 0, 0, 0.6); +} +.panel-success > .panel-heading + .panel-collapse > .panel-body { + border-top-color: rgba(0, 0, 0, 0.6); +} +.panel-success > .panel-heading .badge { + color: #62c462; + background-color: #ffffff; +} +.panel-success > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: rgba(0, 0, 0, 0.6); +} +.panel-info { + border-color: rgba(0, 0, 0, 0.6); +} +.panel-info > .panel-heading { + color: #ffffff; + background-color: #5bc0de; + border-color: rgba(0, 0, 0, 0.6); +} +.panel-info > .panel-heading + .panel-collapse > .panel-body { + border-top-color: rgba(0, 0, 0, 0.6); +} +.panel-info > .panel-heading .badge { + color: #5bc0de; + background-color: #ffffff; +} +.panel-info > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: rgba(0, 0, 0, 0.6); +} +.panel-warning { + border-color: rgba(0, 0, 0, 0.6); +} +.panel-warning > .panel-heading { + color: #ffffff; + background-color: #f89406; + border-color: rgba(0, 0, 0, 0.6); +} +.panel-warning > .panel-heading + .panel-collapse > .panel-body { + border-top-color: rgba(0, 0, 0, 0.6); +} +.panel-warning > .panel-heading .badge { + color: #f89406; + background-color: #ffffff; +} +.panel-warning > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: rgba(0, 0, 0, 0.6); +} +.panel-danger { + border-color: rgba(0, 0, 0, 0.6); +} +.panel-danger > .panel-heading { + color: #ffffff; + background-color: #ee5f5b; + border-color: rgba(0, 0, 0, 0.6); +} +.panel-danger > .panel-heading + .panel-collapse > .panel-body { + border-top-color: rgba(0, 0, 0, 0.6); +} +.panel-danger > .panel-heading .badge { + color: #ee5f5b; + background-color: #ffffff; +} +.panel-danger > .panel-footer + .panel-collapse > .panel-body { + border-bottom-color: rgba(0, 0, 0, 0.6); +} + + + + +table { + background-color: #2e3338; +} +caption { + padding-top: 8px; + padding-bottom: 8px; + color: #7a8288; + text-align: left; +} +th { + text-align: left; +} +.table { + width: 100%; + max-width: 100%; + margin-bottom: 20px; +} +.table > thead > tr > th, +.table > tbody > tr > th, +.table > tfoot > tr > th, +.table > thead > tr > td, +.table > tbody > tr > td, +.table > tfoot > tr > td { + padding: 8px; + line-height: 1.42857143; + vertical-align: top; + border-top: 1px solid #1c1e22; +} +.table > thead > tr > th { + vertical-align: bottom; + border-bottom: 2px solid #1c1e22; +} +.table > caption + thead > tr:first-child > th, +.table > colgroup + thead > tr:first-child > th, +.table > thead:first-child > tr:first-child > th, +.table > caption + thead > tr:first-child > td, +.table > colgroup + thead > tr:first-child > td, +.table > thead:first-child > tr:first-child > td { + border-top: 0; +} +.table > tbody + tbody { + border-top: 2px solid #1c1e22; +} +.table .table { + background-color: #272b30; +} +.table-condensed > thead > tr > th, +.table-condensed > tbody > tr > th, +.table-condensed > tfoot > tr > th, +.table-condensed > thead > tr > td, +.table-condensed > tbody > tr > td, +.table-condensed > tfoot > tr > td { + padding: 5px; +} +.table-bordered { + border: 1px solid #1c1e22; +} +.table-bordered > thead > tr > th, +.table-bordered > tbody > tr > th, +.table-bordered > tfoot > tr > th, +.table-bordered > thead > tr > td, +.table-bordered > tbody > tr > td, +.table-bordered > tfoot > tr > td { + border: 1px solid #1c1e22; +} +.table-bordered > thead > tr > th, +.table-bordered > thead > tr > td { + border-bottom-width: 2px; +} +.table-striped > tbody > tr:nth-of-type(odd) { + background-color: #353a41; +} +.table-hover > tbody > tr:hover { + background-color: #49515a; +} +table col[class*="col-"] { + position: static; + float: none; + display: table-column; +} +table td[class*="col-"], +table th[class*="col-"] { + position: static; + float: none; + display: table-cell; +} +.table > thead > tr > td.active, +.table > tbody > tr > td.active, +.table > tfoot > tr > td.active, +.table > thead > tr > th.active, +.table > tbody > tr > th.active, +.table > tfoot > tr > th.active, +.table > thead > tr.active > td, +.table > tbody > tr.active > td, +.table > tfoot > tr.active > td, +.table > thead > tr.active > th, +.table > tbody > tr.active > th, +.table > tfoot > tr.active > th { + background-color: #49515a; +} +.table-hover > tbody > tr > td.active:hover, +.table-hover > tbody > tr > th.active:hover, +.table-hover > tbody > tr.active:hover > td, +.table-hover > tbody > tr:hover > .active, +.table-hover > tbody > tr.active:hover > th { + background-color: #3e444c; +} +.table > thead > tr > td.success, +.table > tbody > tr > td.success, +.table > tfoot > tr > td.success, +.table > thead > tr > th.success, +.table > tbody > tr > th.success, +.table > tfoot > tr > th.success, +.table > thead > tr.success > td, +.table > tbody > tr.success > td, +.table > tfoot > tr.success > td, +.table > thead > tr.success > th, +.table > tbody > tr.success > th, +.table > tfoot > tr.success > th { + background-color: #62c462; +} +.table-hover > tbody > tr > td.success:hover, +.table-hover > tbody > tr > th.success:hover, +.table-hover > tbody > tr.success:hover > td, +.table-hover > tbody > tr:hover > .success, +.table-hover > tbody > tr.success:hover > th { + background-color: #4fbd4f; +} +.table > thead > tr > td.info, +.table > tbody > tr > td.info, +.table > tfoot > tr > td.info, +.table > thead > tr > th.info, +.table > tbody > tr > th.info, +.table > tfoot > tr > th.info, +.table > thead > tr.info > td, +.table > tbody > tr.info > td, +.table > tfoot > tr.info > td, +.table > thead > tr.info > th, +.table > tbody > tr.info > th, +.table > tfoot > tr.info > th { + background-color: #5bc0de; +} +.table-hover > tbody > tr > td.info:hover, +.table-hover > tbody > tr > th.info:hover, +.table-hover > tbody > tr.info:hover > td, +.table-hover > tbody > tr:hover > .info, +.table-hover > tbody > tr.info:hover > th { + background-color: #46b8da; +} +.table > thead > tr > td.warning, +.table > tbody > tr > td.warning, +.table > tfoot > tr > td.warning, +.table > thead > tr > th.warning, +.table > tbody > tr > th.warning, +.table > tfoot > tr > th.warning, +.table > thead > tr.warning > td, +.table > tbody > tr.warning > td, +.table > tfoot > tr.warning > td, +.table > thead > tr.warning > th, +.table > tbody > tr.warning > th, +.table > tfoot > tr.warning > th { + background-color: #f89406; +} +.table-hover > tbody > tr > td.warning:hover, +.table-hover > tbody > tr > th.warning:hover, +.table-hover > tbody > tr.warning:hover > td, +.table-hover > tbody > tr:hover > .warning, +.table-hover > tbody > tr.warning:hover > th { + background-color: #df8505; +} +.table > thead > tr > td.danger, +.table > tbody > tr > td.danger, +.table > tfoot > tr > td.danger, +.table > thead > tr > th.danger, +.table > tbody > tr > th.danger, +.table > tfoot > tr > th.danger, +.table > thead > tr.danger > td, +.table > tbody > tr.danger > td, +.table > tfoot > tr.danger > td, +.table > thead > tr.danger > th, +.table > tbody > tr.danger > th, +.table > tfoot > tr.danger > th { + background-color: #ee5f5b; +} + +.table-hover > tbody > tr > td.danger:hover, +.table-hover > tbody > tr > th.danger:hover, +.table-hover > tbody > tr.danger:hover > td, +.table-hover > tbody > tr:hover > .danger, +.table-hover > tbody > tr.danger:hover > th { + background-color: #ec4844; +} + +table, .table .success, .table .warning, .table .danger, .table .info { + color: #fff; +} + +.table-responsive { + overflow-x: auto; + min-height: 0.01%; +} +@media screen and (max-width: 767px) { + .table-responsive { + width: 100%; + margin-bottom: 15px; + overflow-y: hidden; + -ms-overflow-style: -ms-autohiding-scrollbar; + border: 1px solid #1c1e22; + } + .table-responsive > .table { + margin-bottom: 0; + } + .table-responsive > .table > thead > tr > th, + .table-responsive > .table > tbody > tr > th, + .table-responsive > .table > tfoot > tr > th, + .table-responsive > .table > thead > tr > td, + .table-responsive > .table > tbody > tr > td, + .table-responsive > .table > tfoot > tr > td { + white-space: nowrap; + } + .table-responsive > .table-bordered { + border: 0; + } + .table-responsive > .table-bordered > thead > tr > th:first-child, + .table-responsive > .table-bordered > tbody > tr > th:first-child, + .table-responsive > .table-bordered > tfoot > tr > th:first-child, + .table-responsive > .table-bordered > thead > tr > td:first-child, + .table-responsive > .table-bordered > tbody > tr > td:first-child, + .table-responsive > .table-bordered > tfoot > tr > td:first-child { + border-left: 0; + } + .table-responsive > .table-bordered > thead > tr > th:last-child, + .table-responsive > .table-bordered > tbody > tr > th:last-child, + .table-responsive > .table-bordered > tfoot > tr > th:last-child, + .table-responsive > .table-bordered > thead > tr > td:last-child, + .table-responsive > .table-bordered > tbody > tr > td:last-child, + .table-responsive > .table-bordered > tfoot > tr > td:last-child { + border-right: 0; + } + .table-responsive > .table-bordered > tbody > tr:last-child > th, + .table-responsive > .table-bordered > tfoot > tr:last-child > th, + .table-responsive > .table-bordered > tbody > tr:last-child > td, + .table-responsive > .table-bordered > tfoot > tr:last-child > td { + border-bottom: 0; + } +} \ No newline at end of file diff --git a/templates/timeline/entries.tpl b/templates/timeline/entries.tpl new file mode 100644 index 00000000..feb6df47 --- /dev/null +++ b/templates/timeline/entries.tpl @@ -0,0 +1,324 @@ +{serendipity_hookPlugin hook="entries_header" addData="$entry_id"} + +{if $template_option.display_as_timeline and $entries and !$is_single_entry and not $entry.is_extended and not $is_preview}{* THIS IS OUR FRONTPAGE SCENARIO - OPEN TIMELINE*} + <ul class="timeline"> + {assign var="prevmonth" value=''} +{/if} + +{foreach from=$entries item="dategroup" name="entrytop"} + {foreach from=$dategroup.entries item="entry"} + {assign var="entry" value=$entry scope="parent"} + {if !$is_single_entry and not $entry.is_extended and not $is_preview}{* THIS IS OUR FRONTPAGE SCENARIO *} + {if $template_option.display_as_timeline} + {if $template_option.months_on_timeline == true} + {assign var="curmonth" value=$entry.timestamp|@formatTime:"%B"} + {if $prevmonth != $curmonth} + <li class="timeline-month-heading"><div class="tldate">{$entry.timestamp|@formatTime:$template_option.months_on_timeline_format}</div></li> + {assign var="timelinetmargin" value="timeline-no-top-margin"} + {else} + {if $timelinetmargin =="timeline-top-margin"}{assign var="timelinetmargin" value="timeline-no-top-margin"}{else}{assign var="timelinetmargin" value="timeline-top-margin"}{/if} + {/if} + <li class="{cycle values='left,timeline-inverted'} {$timelinetmargin}"> + {else} + <li class="{cycle values='left,timeline-inverted timeline-top-margin'}"> + {/if} + <div class="timeline-badge"><i class="fa fa-dot-circle-o" aria-hidden="true"></i></div> + <div class="timeline-panel"> + <div class="timeline-heading"> + {if $entry.properties.timeline_image|is_in_string:'<iframe,<embed,<object'}{* we assume this is a video, just emit the contents of the var *} + {$entry.properties.timeline_image} + {else} + <a href="{$entry.link}" title="{$entry.title}"><img class="img-responsive" {if $entry.properties.timeline_image}src="{$entry.properties.timeline_image}"{else}src="{serendipity_getFile file='img/image_unavailable.jpg'}"{/if} alt=""/></a> + {/if} + </div> + <div class="timeline-body"> + <h2><a href="{$entry.link}">{$entry.title}</a></h2> + {$entry.body} + {if $entry.has_extended and not $is_single_entry and not $entry.is_extended} + <p class="read_more"><a class="btn btn-md btn-default btn-readmore btn-theme clearfix" href="{$entry.link}#extended">{$CONST.READ_MORE} <i class="fa fa-arrow-right" aria-hidden="true"></i></a></p> + {/if} + </div> + <div class="timeline-footer"> + <span class="timeline-footer-date"><i class="fa fa-clock-o"></i><time datetime="{$entry.timestamp|@serendipity_html5time}">{$entry.timestamp|@formatTime:$template_option.date_format}</time></span> + <span class="timeline-footer-comments"><i class="fa {if $entry.comments == 0}fa-comment-o{elseif $entry.comments == 1}fa-comment{else}fa-comments-o{/if}" aria-hidden="true"></i> <a href="{$entry.link}#comments">{if $entry.comments == 0}{$CONST.NO_COMMENTS}{else}{$entry.comments} {$entry.label_comments}{/if}</a></span> + </div> + </div> + </li> + {assign var="prevmonth" value=$entry.timestamp|@formatTime:"%B"} + {else}{* not using timeline - use blog format instead *} + {if $entry.body || $entry.properties.timeline_image} + <div class="row each-blogstyle-entry"> + <div class="col-md-5 blogstyle-post-thumb"> + {if $entry.properties.timeline_image|is_in_string:'<iframe,<embed,<object'}{* we assume this is a video, just emit the contents of the var *} + <div>{$entry.properties.timeline_image}</div> + {else} + <a href="{$entry.link}" title="{$entry.title}"><img class="img-responsive" {if $entry.properties.timeline_image}src="{$entry.properties.timeline_image}"{else}src="{serendipity_getFile file='img/image_unavailable.jpg'}"{/if} alt=""/></a> + {/if} + </div> + <div class="col-md-7 blogstyle-post-body"> + <h2><a href="{$entry.link}">{$entry.title}</a></h2> + <p class="post-info"><span class="sr-only">{$CONST.POSTED_BY}</span> + <span class="sr-only"> {$CONST.ON}</span><span class="entry-timestamp"><i class="fa fa-clock-o" aria-hidden="true"></i><time datetime="{$entry.timestamp|serendipity_html5time}">{$entry.timestamp|formatTime:$template_option.date_format}</time></span> + <span class="entry-comment-link"><i class="fa {if $entry.comments == 0}fa-comment-o{elseif $entry.comments == 1}fa-comment{else}fa-comments-o{/if}" aria-hidden="true"></i><a href="{$entry.link}#comments">{if $entry.comments == 0}{$CONST.NO_COMMENTS}{else}{$entry.comments} {$entry.label_comments}{/if}</a></span> + </p> + {$entry.body} + {if $entry.has_extended and not $is_single_entry and not $entry.is_extended} + <p class="read_more"><a class="btn btn-md btn-default btn-readmore btn-theme clearfix" href="{$entry.link}#extended">{$CONST.READ_MORE} <i class="fa fa-arrow-right" aria-hidden="true"></i></a></p> + {/if} + </div> + </div> + <hr> + {/if} + {/if} + {else} {* THIS IS A DETAILED ENTRY VIEW *} + <section id="entry"> + <h2><a href="{$entry.link}">{$entry.title}</a></h2> + <p class="post-info clearfix"> + <span class="sr-only">{$CONST.POSTED_BY}</span> + <span class="entry-author-link"><i class ="fa fa-user" aria-hidden="true"></i><a href="{$entry.link_author}">{$entry.author}</a></span> + <span class="sr-only"> {$CONST.ON}</span><span class="entry-timestamp"><i class="fa fa-clock-o" aria-hidden="true"></i><time datetime="{$entry.timestamp|serendipity_html5time}">{$entry.timestamp|formatTime:$template_option.date_format}</time></span> + <span class="entry-comment-link"><i class="fa {if $entry.comments == 0}fa-comment-o{elseif $entry.comments == 1}fa-comment{else}fa-comments-o{/if}" aria-hidden="true"></i><a href="{$entry.link}#comments">{if $entry.comments == 0}{$CONST.NO_COMMENTS}{else}{$entry.comments} {$entry.label_comments}{/if}</a></span> + {if $entry.is_entry_owner and not $is_preview}<span class="entry-edit-link"><i class="fa fa-lg fa-edit"></i><a href="{$entry.link_edit}" title="{$CONST.EDIT_ENTRY}">{$CONST.EDIT_ENTRY}</a></span>{/if} + </p> + {if $is_preview} + {append var='entry' value=$smarty.session.save_entry_POST.properties index='properties'}{* gives us access to entry properties in preview *} + {/if} + {if $entry.properties.timeline_image} + {if $entry.properties.timeline_image|is_in_string:'<iframe,<embed,<object'}{* we assume this is a video, just emit the contents of the var *} + {$entry.properties.timeline_image} + {else} + {serendipity_getImageSize file=$entry.properties.timeline_image assign="img_size"} + <img class="{if $img_size[0]>=800}image-full-width{else}serendipity_image_left{/if}" src="{$entry.properties.timeline_image}" width="{$img_size[0]}" height="{$img_size[1]}" alt=""/> + {/if} + {/if} + <div class="serendipity_entry_body clearfix"> + {if $entry.categories}{foreach from=$entry.categories item="entry_category"}{if $entry_category.category_icon}<a href="{$entry_category.category_link}"><img class="serendipity_entryIcon" title="{$entry_category.category_name|@escape}{$entry_category.category_description|@emptyPrefix}" alt="{$entry_category.category_name|@escape}" src="{$entry_category.category_icon}"></a>{/if}{/foreach}{/if} + {$entry.body} + </div> + {if $entry.is_extended} + <div id="extended" class="serendipity_extended_body clearfix"> + {$entry.extended} + </div> + {/if} + {if $entry.plugin_display_dat} + {$entry.plugin_display_dat} + {/if} + {if $entry.categories or $entry.add_footer} + <footer class="entry-footer"> + {if $entry.categories} + <span class="sr-only">{$CONST.CATEGORIES}: </span> + <i class="fa fa-folder-open" aria-hidden="true"></i> + {foreach from=$entry.categories item="entry_category" name="categories"}<a class="btn btn-sm btn-default btn-theme" href="{$entry_category.category_link}" title="{$CONST.CATEGORY}: {$entry_category.category_name|@escape}">{$entry_category.category_name|@escape}</a>{if !$smarty.foreach.categories.last} {/if}{/foreach} + {/if} + {if isset($entry.freetag.extended) && $entry.freetag.extended == 1} + {if $entry.freetag.tags.tags} + <div class="timeline_freeTag"> + <span class="sr-only">{$entry.freetag.tags.description}</span> + <i class="fa fa-tags" aria-hidden="true"></i> + {foreach from=$entry.freetag.tags.tags item="tag"} + {$tag} + {/foreach} + </div> + {if $is_single_entry or $is_preview} + <div class="timeline_freeTag_related"> + <span>{$entry.freetag.related.description}</span> + <ul class="plainList"> + {foreach from=$entry.freetag.related.entries item="link"} + <li>{$link}</li> + {/foreach} + </ul> + </div> + {/if} + {/if} + {else} + {$entry.freetag} + {/if} + {$entry.add_footer} + </footer> + {/if} + </section> + {/if} + <!-- + <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" + xmlns:dc="http://purl.org/dc/elements/1.1/"> + <rdf:Description + rdf:about="{$entry.link_rdf}" + trackback:ping="{$entry.link_trackback}" + dc:title="{$entry.title_rdf|@default:$entry.title}" + dc:identifier="{$entry.rdf_ident}" /> + </rdf:RDF> + --> + {if $is_single_entry and not $is_preview} + {if $CONST.DATA_UNSUBSCRIBED} + <div id="search-block" class="row"> + <div class="col-md-10 col-md-offset-1"> + <p class="alert alert-info"><span class="fa-stack" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-info fa-stack-1x"></i></span> {$CONST.DATA_UNSUBSCRIBED|@sprintf:$CONST.UNSUBSCRIBE_OK}</p> + </div> + </div> + {/if} + {if $CONST.DATA_TRACKBACK_DELETED} + <div id="search-block" class="row"> + <div class="col-md-10 col-md-offset-1"> + <p class="alert alert-info"><span class="fa-stack" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-info fa-stack-1x"></i></span> {$CONST.DATA_TRACKBACK_DELETED|@sprintf:$CONST.TRACKBACK_DELETED}</p> + </div> + </div> + {/if} + {if $CONST.DATA_TRACKBACK_APPROVED} + <div id="search-block" class="row"> + <div class="col-md-10 col-md-offset-1"> + <p class="alert alert-success"><span class="fa-stack" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-check fa-stack-1x"></i></span> {$CONST.DATA_TRACKBACK_APPROVED|@sprintf:$CONST.TRACKBACK_APPROVED}</p> + </div> + </div> + {/if} + {if $CONST.DATA_COMMENT_DELETED} + <div id="search-block" class="row"> + <div class="col-md-10 col-md-offset-1"> + <p class="alert alert-info"><span class="fa-stack" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-info fa-stack-1x"></i></span> {$CONST.DATA_COMMENT_DELETED|@sprintf:$CONST.COMMENT_DELETED}</p> + </div> + </div> + {/if} + {if $CONST.DATA_COMMENT_APPROVED} + <div id="search-block" class="row"> + <div class="col-md-10 col-md-offset-1"> + <p class="alert alert-success"><span class="fa-stack" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-check fa-stack-1x"></i></span> {$CONST.DATA_COMMENT_APPROVED|@sprintf:$CONST.COMMENT_APPROVED}</p> + </div> + </div> + {/if} + <a id="feedback"></a> + {if $entry.trackbacks != 0} + <section id="trackbacks" class="serendipity_comments serendipity_section_trackbacks"> + <h3>{if $entry.trackbacks == 0}{$CONST.NO_TRACKBACKS}{else}{$entry.trackbacks} {$entry.label_trackbacks}{/if}</h3> + <p id="trackback_url"><small><a rel="nofollow" href="{$entry.link_trackback}" title="{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|@escape}">{$CONST.TRACKBACK_SPECIFIC}</a></small></p> + {serendipity_printTrackbacks entry=$entry.id} + </section> + {/if} + <section id="comments" class="serendipity_comments serendipity_section_comments"> + <h3>{if $entry.comments == 0}{$CONST.NO_COMMENTS}{else}{$entry.comments} {$entry.label_comments}{/if}</h3> + {if $entry.comments != 0} + <p class="manage_comments"> + {if $entry.viewmode eq $CONST.VIEWMODE_LINEAR} + <button class="btn btn-sm btn-default disabled">{$CONST.COMMENTS_VIEWMODE_LINEAR}</button> + <a class="btn btn-sm btn-default btn-theme" href="{$entry.link_viewmode_threaded}#comments" rel="nofollow" title="{$CONST.DISPLAY_COMMENTS_AS} {$CONST.COMMENTS_VIEWMODE_THREADED}">{$CONST.COMMENTS_VIEWMODE_THREADED}</a> + {else} + <a class="btn btn-sm btn-default btn-theme" rel="nofollow" href="{$entry.link_viewmode_linear}#comments" title="{$CONST.DISPLAY_COMMENTS_AS} {$CONST.COMMENTS_VIEWMODE_LINEAR}">{$CONST.COMMENTS_VIEWMODE_LINEAR}</a> + <button class="btn btn-sm btn-default disabled">{$CONST.COMMENTS_VIEWMODE_THREADED}</button> + {/if} + </p> + {/if} + {serendipity_printComments entry=$entry.id mode=$entry.viewmode} + {if $entry.is_entry_owner} + <p class="manage_comments"> + <small> + {if $entry.allow_comments} + <a href="{$entry.link_deny_comments}"><button class="btn btn-sm btn-default btn-theme">{$CONST.COMMENTS_DISABLE}</button></a> + {else} + <a href="{$entry.link_allow_comments}"><button class="btn btn-sm btn-default btn-theme">{$CONST.COMMENTS_ENABLE}</button></a> + {/if} + </small> + </p> + {/if} + </section> + {foreach from=$comments_messagestack item="message"} + <div id="search-block" class="row"> + <div class="col-md-10 col-md-offset-1"> + <p class="alert alert-danger alert-error"><span class="fa-stack" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-exclamation fa-stack-1x"></i></span> {$message}</p> + </div> + </div> + {/foreach} + {if $is_comment_added} + <div id="search-block" class="row"> + <div class="col-md-10 col-md-offset-1"> + <div class="alert alert-success alert-dismissible fade in" role="alert"> + <button type="button" class="close" data-target="#search-block" data-dismiss="alert" aria-label="Close" title="{$CONST.CLOSE}"><span aria-hidden="true">×</span></button> + <span class="fa-stack text-success" aria-hidden="true"><i class="fa fa-smile-o fa-2x"></i></span> {$CONST.COMMENT_ADDED} + </div> + </div> + </div> + {elseif $is_comment_moderate} + <div id="search-block" class="row"> + <div class="col-md-10 col-md-offset-1"> + <div class="alert alert-warning alert-dismissible fade in" role="alert"> + <button type="button" class="close" data-target="#search-block" data-dismiss="alert" aria-label="Close" title="{$CONST.CLOSE}"><span aria-hidden="true">×</span></button> + <p class="text-success"><span class="fa-stack" aria-hidden="true"><i class="fa fa-smile-o fa-2x"></i></span> {$CONST.COMMENT_ADDED}</p> + <p class="text-warning"><span class="fa-stack" aria-hidden="true"><i class="fa fa-info-circle fa-2x"></i></span> {$CONST.THIS_COMMENT_NEEDS_REVIEW}</p> + </div> + </div> + </div> + {elseif not $entry.allow_comments} + <div id="search-block" class="row"> + <div class="col-md-10 col-md-offset-1"> + <p class="alert alert-danger text-danger"><span class="fa-stack" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-exclamation fa-stack-1x"></i></span> {$CONST.COMMENTS_CLOSED}</p> + </div> + </div> + {else} + <section id="respond" class="serendipity_section_commentform"> + <h3>{$CONST.ADD_COMMENT}</h3> + {$COMMENTFORM} + </section> + {/if} + {/if} + {$entry.backend_preview} + {/foreach} + +{foreachelse} + {if not $plugin_clean_page} + <div id="search-block" class="row"> + <div class="col-md-10 col-md-offset-1"> + <p class="alert alert-info noentries"><span class="fa-stack"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-info fa-stack-1x"></i></span> {$CONST.NO_ENTRIES_TO_PRINT}</p> + </div> + </div> + {/if} + +{/foreach} +{if $template_option.display_as_timeline and $entries and !$is_single_entry and not $entry.is_extended and not $is_preview}{* THIS IS OUR FRONTPAGE SCENARIO - CLOSE TIMELINE *} + <li class="clearfix" style="float: none;"></li> + </ul> +{/if} + + +{if $footer_info or $footer_prev_page or $footer_next_page} + <div class='serendipity_pageSummary'> + {if $footer_info} + <p class="summary serendipity_center">{$footer_info}</p> + {/if} + + {if $footer_totalPages >1 } + <nav class="pagination"> + {assign var="paginationStartPage" value="`$footer_currentPage-3`"} + {if $footer_currentPage+3 > $footer_totalPages} + {assign var="paginationStartPage" value="`$footer_totalPages-4`"} + {/if} + {if $paginationStartPage <= 0} + {assign var="paginationStartPage" value="1"} + {/if} + {if $footer_prev_page} + <a class="btn btn-md btn-default btn-theme" title="{$CONST.PREVIOUS_PAGE}" href="{$footer_prev_page}"><i class="fa fa-arrow-left" aria-hidden="true"></i><span class="sr-only">{$CONST.PREVIOUS_PAGE}</span></a> + {/if} + {if $paginationStartPage > 1} + <a class="btn btn-md btn-default btn-theme" href="{'1'|string_format:$footer_pageLink}">1</a> + {/if} + {if $paginationStartPage > 2} + … + {/if} + {section name=i start=$paginationStartPage loop=$footer_totalPages+1 max=5} + {if $smarty.section.i.index != $footer_currentPage} + <a class="btn btn-md btn-default btn-theme" href="{$smarty.section.i.index|string_format:$footer_pageLink}">{$smarty.section.i.index}</a> + {else} + <span class="thispage btn btn-md btn-default btn-theme disabled">{$smarty.section.i.index}</span> + {/if} + {/section} + {if $smarty.section.i.index < $footer_totalPages} + … + {/if} + {if $smarty.section.i.index <= $footer_totalPages} + <a class="btn btn-md btn-default btn-theme" href="{$footer_totalPages|string_format:$footer_pageLink}">{$footer_totalPages}</a> + {/if} + {if $footer_next_page} + <a class="btn btn-md btn-default btn-theme" title="{$CONST.NEXT_PAGE}" href="{$footer_next_page}"><i class="fa fa-arrow-right" aria-hidden="true"></i><span class="sr-only">{$CONST.NEXT_PAGE}</span></a> + {/if} + </nav> + {/if} + </div> +{/if} + {serendipity_hookPlugin hook="entries_footer"} \ No newline at end of file diff --git a/templates/timeline/entries_archives.tpl b/templates/timeline/entries_archives.tpl new file mode 100644 index 00000000..8dbf26b6 --- /dev/null +++ b/templates/timeline/entries_archives.tpl @@ -0,0 +1,54 @@ +{serendipity_hookPlugin hook="entries_header"} + {if $template_option.categories_on_archive || $template_option.tags_on_archive} + <div class="row"> + {if $template_option.categories_on_archive} + <section class="col-lg-6 col-md-6 col-sm-12 col-xs-12 archive-categories"> + {serendipity_showPlugin class="serendipity_plugin_categories" template="archive_categories.tpl"} + </section> + {/if} + {if $template_option.tags_on_archive} + <section class="col-lg-6 col-md-6 col-sm-12 col-xs-12 archive-tags"> + {serendipity_showPlugin class="serendipity_plugin_freetag" template="archive_freetag.tpl"} + </section> + {/if} + </div> + {/if} + <div class="row"> + <section class="col-lg-12 archive-archive_history"> + {if $template_option.categories_on_archive || $template_option.tags_on_archive} + <h3>{if $category}{$category_info.category_name} - {/if}{$CONST.ARCHIVES}</h3> + {/if} + <ul class="timeline"> + {foreach from=$archives item="archive"} + <li class="{cycle values='left,timeline-inverted timeline-top-margin'}"> + <div class="timeline-badge"><i class="fa fa-dot-circle-o" aria-hidden="true"></i></div> + <div class="timeline-panel"> + <div class="timeline-heading"> + <h4>{$archive.year}</h4> + </div> + <div class="timeline-body clearfix"> + {foreach from=$archive.months item="month"} + <div class="{if $rightSidebarElements > 0}col-md-4{else}col-md-3{/if} col-xs-6"> + <div class="btn-group archive-button"> + {if $month.entry_count} + <button type="button" class="btn btn-default btn-theme dropdown-toggle archive-button-months archive-button-months-entries" data-toggle="dropdown" aria-expanded="false">{$month.date|@formatTime:"%b"} <span class="badge">{$month.entry_count}</span> <span class="caret"></span></button> + <ul class="dropdown-menu" role="menu"> + <li><a href="{$month.link}" title="{$CONST.VIEW_FULL|capitalize}"><i class="fa fa-dot-circle-o" aria-hidden="true"></i>{$CONST.VIEW_FULL|capitalize}</a></li> + <li><a href="{$month.link_summary}" title="{$CONST.VIEW_TOPICS|capitalize}"><i class="fa fa-list" aria-hidden="true"></i>{$CONST.VIEW_TOPICS|capitalize}</a></li> + </ul> + {else} + <button type="button" class="btn btn-default btn-theme disabled dropdown-toggle archive-button-months" data-toggle="dropdown" aria-expanded="false">{$month.date|@formatTime:"%b"}</button> + {/if} + </div> + </div> + {/foreach} + </div> + </div> + </li> + {/foreach} + <li class="clearfix" style="float: none;"></li> + </ul> + </section> + </div> + +{serendipity_hookPlugin hook="entries_footer"} \ No newline at end of file diff --git a/templates/timeline/entries_summary.tpl b/templates/timeline/entries_summary.tpl new file mode 100644 index 00000000..b49f9751 --- /dev/null +++ b/templates/timeline/entries_summary.tpl @@ -0,0 +1,38 @@ +{serendipity_hookPlugin hook="entries_header"} +{counter start=0 assign='entry_count'} +{foreach from=$entries item="countme"} + {foreach from=$countme.entries item="entry"} + {counter assign='entry_count'} + {/foreach} +{/foreach} +<article class="archive-summary"> + <h3>{if $category}{$category_info.category_name} - {/if}{$entry_count} {$CONST.TOPICS_OF} {$dateRange.0|@formatTime:"%B, %Y"}</h3> + <div class="archives_summary"> + {foreach from=$entries item="sentries" name="archivesummarylist"} + {foreach from=$sentries.entries item="entry"} + <div class="row each-archive-entry"> + <div class="col-md-2 archive-post-thumb"> + {if $entry.properties.timeline_image|is_in_string:'<iframe,<embed,<object'}{* we assume this is a video, just emit the contents of the var *} + <div>{$entry.properties.timeline_image}</div> + {else} + <a href="{$entry.link}" title="{$entry.title}"><img class="img-thumbnail" {if $entry.properties.timeline_image}src="{$entry.properties.timeline_image}"{else}src="{serendipity_getFile file='img/image_unavailable.jpg'}"{/if} alt=""/></a> + {/if} + </div> + <div class="col-md-10 archive-post-body"> + <h4><a href="{$entry.link}">{$entry.title}</a></h4> + <p class="post-info"><span class="sr-only">{$CONST.POSTED_BY}</span> + <span class="sr-only"> {$CONST.ON}</span><span class="entry-timestamp"><i class="fa fa-clock-o" aria-hidden="true"></i><time datetime="{$entry.timestamp|serendipity_html5time}">{$entry.timestamp|formatTime:$template_option.date_format}</time></span> + </p> + {if $entry.body} + {$entry.body|strip_tags|truncate:180:" ..."} + {else} + {$entry.extended|strip_tags|truncate:180:" ..."} + {/if} + </div> + </div> + <hr> + {/foreach} + {/foreach} + </div> +</article> +{serendipity_hookPlugin hook="entries_footer"} \ No newline at end of file diff --git a/templates/timeline/footerbar.tpl b/templates/timeline/footerbar.tpl new file mode 100644 index 00000000..1790bc4b --- /dev/null +++ b/templates/timeline/footerbar.tpl @@ -0,0 +1,18 @@ +{if $is_raw_mode} + <div id="serendipity{$pluginside}FooterBar"> +{/if} +{foreach from=$plugindata item=item} + {if $item.class != "serendipity_plugin_quicksearch"} + <div class="{if $FooterSidebarElements == '1'}col-md-12{elseif $FooterSidebarElements == '2'}col-md-6{elseif $FooterSidebarElements == '3' || $FooterSidebarElements == '6' || $FooterSidebarElements == '5'}col-md-4{else}col-md-3{/if}"> + <section class="sidebar_plugin clearfix {cycle values="odd,even"} {$item.class}"> + {if $item.title != ""} + <h3>{$item.title}</h3> + {/if} + <div class="footerbar_content">{$item.content}</div> + </section> + </div> + {/if} +{/foreach} +{if $is_raw_mode} + </div> +{/if} \ No newline at end of file diff --git a/templates/timeline/green-light_style.css b/templates/timeline/green-light_style.css new file mode 100644 index 00000000..b8e8bd8b --- /dev/null +++ b/templates/timeline/green-light_style.css @@ -0,0 +1,124 @@ +/* +Theme: Timeline +Theme developed for Serendipity by Don Chambers (www.optional-necessity.com) +light green colorset +*/ + +/* +* Light Green Color: #79d5b3; +* Light Green Hover Color: #59b795; +* Darkest color: #42a984; +*/ + +a { + color: #79d5b3; +} + +a:hover, +a:focus { + color: #59b795; +} + +a.subtome:link, +a.subtome:visited { + background: url('img/subtome-green-light.png') left bottom no-repeat; +} + +a.subtome:hover, +a.subtome:focus { + background: url('img/subtome-green-light.png') -64px center no-repeat; +} + +a.subtome img { + visibility: hidden; +} + +.navbar-default .navbar-brand:hover h1, +.navbar-default .navbar-brand:focus h1{ + color: #59b795; +} + +.header .navbar-default .navbar-toggle { + border-color: #59b795; +} + +.header .navbar-toggle, .header .navbar-default .navbar-toggle:hover, .header .navbar-default .navbar-toggle:focus { + background-color: #79d5b3; +} + +@media (max-width: 991px) { + .header .navbar-default .navbar-nav > li > a:hover { + color: #79d5b3; + } + .header .navbar-default .navbar-nav > .active > a, .header .navbar-default .navbar-nav > .active > a:hover, .header .navbar-default .navbar-nav > .active > a:focus { + background-color: #79d5b3; + } +} + +@media (min-width: 992px) { + .header .navbar-default .navbar-nav a.navbar_current_page, + .header .navbar-default .navbar-nav > li > a:hover { + border-bottom: 2px solid #79d5b3; + } + + .header .navbar-default .navbar-nav > li:hover > a { + color: #79d5b3; + } +} + +.btn-theme { + background: none repeat scroll 0 0 #79d5b3; + border: 1px solid #79d5b3; +} + +.btn-theme:hover {color: #79d5b3;} + +.pager li > a, +.pager li > span { + background-color: #79d5b3; + border: 1px solid #79d5b3; +} + +.pager li > a:hover, +.pager li > a:focus { + color: #59b795; +} + +.sidebar_plugin h3{ + border-bottom: 2px solid #79d5b3; +} + +.btn-group.archive-button .dropdown-menu > li > a {color: #59b795;} + +.btn-group.archive-button .dropdown-menu > li > a:hover, +.btn-group.archive-button .dropdown-menu > li > a:focus { + background-color: #59b795; +} + +.archive-button-months-entries {border: 1px solid #79d5b3;} + +.archive-button-months-entries .badge { + background-color: #42a984; /* much darker */ +} + +blockquote { + border-left: 5px solid #59b795; +} + +.timeline_freeTag a { + background-color: #79d5b3; + border: 1px solid #79d5b3; +} + +.timeline_freeTag a:hover, +.timeline_freeTag a:focus { + color: #59b795; +} + +#scrollUp { + background-color: #79d5b3; + border: 1px solid #79d5b3; +} +#scrollUp:hover { + color: #59b795; +} \ No newline at end of file diff --git a/templates/timeline/green_style.css b/templates/timeline/green_style.css new file mode 100644 index 00000000..9b3bb2db --- /dev/null +++ b/templates/timeline/green_style.css @@ -0,0 +1,124 @@ +/* +Theme: Timeline +Theme developed for Serendipity by Don Chambers (www.optional-necessity.com) +green colorset +*/ + +/* +* Green Color: #72c02c; +* Green Hover Color: #57a70f; +* Darkest color: #4b920c; +*/ + +a { + color: #72c02c; +} + +a:hover, +a:focus { + color: #57a70f; +} + +a.subtome:link, +a.subtome:visited { + background: url('img/subtome-green.png') left bottom no-repeat; +} + +a.subtome:hover, +a.subtome:focus { + background: url('img/subtome-green.png') -64px center no-repeat; +} + +a.subtome img { + visibility: hidden; +} + +.navbar-default .navbar-brand:hover h1, +.navbar-default .navbar-brand:focus h1{ + color: #57a70f; +} + +.header .navbar-default .navbar-toggle { + border-color: #57a70f; +} + +.header .navbar-toggle, .header .navbar-default .navbar-toggle:hover, .header .navbar-default .navbar-toggle:focus { + background-color: #72c02c; +} + +@media (max-width: 991px) { + .header .navbar-default .navbar-nav > li > a:hover { + color: #72c02c; + } + .header .navbar-default .navbar-nav > .active > a, .header .navbar-default .navbar-nav > .active > a:hover, .header .navbar-default .navbar-nav > .active > a:focus { + background-color: #72c02c; + } +} + +@media (min-width: 992px) { + .header .navbar-default .navbar-nav a.navbar_current_page, + .header .navbar-default .navbar-nav > li > a:hover { + border-bottom: 2px solid #72c02c; + } + + .header .navbar-default .navbar-nav > li:hover > a { + color: #72c02c; + } +} + +.btn-theme { + background: none repeat scroll 0 0 #72c02c; + border: 1px solid #72c02c; +} + +.btn-theme:hover {color: #72c02c;} + +.pager li > a, +.pager li > span { + background-color: #72c02c; + border: 1px solid #72c02c; +} + +.pager li > a:hover, +.pager li > a:focus { + color: #57a70f; +} + +.sidebar_plugin h3{ + border-bottom: 2px solid #72c02c; +} + +.btn-group.archive-button .dropdown-menu > li > a {color: #57a70f;} + +.btn-group.archive-button .dropdown-menu > li > a:hover, +.btn-group.archive-button .dropdown-menu > li > a:focus { + background-color: #57a70f; +} + +.archive-button-months-entries {border: 1px solid #72c02c;} + +.archive-button-months-entries .badge { + background-color: #4b920c; /* much darker */ +} + +blockquote { + border-left: 5px solid #57a70f; +} + +.timeline_freeTag a { + background-color: #72c02c; + border: 1px solid #72c02c; +} + +.timeline_freeTag a:hover, +.timeline_freeTag a:focus { + color: #57a70f; +} + +#scrollUp { + background-color: #72c02c; + border: 1px solid #72c02c; +} +#scrollUp:hover { + color: #57a70f; +} \ No newline at end of file diff --git a/templates/timeline/grey_style.css b/templates/timeline/grey_style.css new file mode 100644 index 00000000..851394b9 --- /dev/null +++ b/templates/timeline/grey_style.css @@ -0,0 +1,124 @@ +/* +Theme: Timeline +Theme developed for Serendipity by Don Chambers (www.optional-necessity.com) +grey colorset +*/ + +/* +* Grey Color: #8ba4a5; +* Grey Hover Color: #768b8c; +* Darkest color: #61797a; +*/ + +a { + color: #8ba4a5; +} + +a:hover, +a:focus { + color: #768b8c; +} + +a.subtome:link, +a.subtome:visited { + background: url('img/subtome-grey.png') left bottom no-repeat; +} + +a.subtome:hover, +a.subtome:focus { + background: url('img/subtome-grey.png') -64px center no-repeat; +} + +a.subtome img { + visibility: hidden; +} + +.navbar-default .navbar-brand:hover h1, +.navbar-default .navbar-brand:focus h1{ + color: #768b8c; +} + +.header .navbar-default .navbar-toggle { + border-color: #768b8c; +} + +.header .navbar-toggle, .header .navbar-default .navbar-toggle:hover, .header .navbar-default .navbar-toggle:focus { + background-color: #8ba4a5; +} + +@media (max-width: 991px) { + .header .navbar-default .navbar-nav > li > a:hover { + color: #8ba4a5; + } + .header .navbar-default .navbar-nav > .active > a, .header .navbar-default .navbar-nav > .active > a:hover, .header .navbar-default .navbar-nav > .active > a:focus { + background-color: #8ba4a5; + } +} + +@media (min-width: 992px) { + .header .navbar-default .navbar-nav a.navbar_current_page, + .header .navbar-default .navbar-nav > li > a:hover { + border-bottom: 2px solid #8ba4a5; + } + + .header .navbar-default .navbar-nav > li:hover > a { + color: #8ba4a5; + } +} + +.btn-theme { + background: none repeat scroll 0 0 #8ba4a5; + border: 1px solid #8ba4a5; +} + +.btn-theme:hover {color: #8ba4a5;} + +.pager li > a, +.pager li > span { + background-color: #8ba4a5; + border: 1px solid #8ba4a5; +} + +.pager li > a:hover, +.pager li > a:focus { + color: #768b8c; +} + +.sidebar_plugin h3{ + border-bottom: 2px solid #8ba4a5; +} + +.btn-group.archive-button .dropdown-menu > li > a {color: #768b8c;} + +.btn-group.archive-button .dropdown-menu > li > a:hover, +.btn-group.archive-button .dropdown-menu > li > a:focus { + background-color: #768b8c; +} + +.archive-button-months-entries {border: 1px solid #8ba4a5;} + +.archive-button-months-entries .badge { + background-color: #61797a; /* much darker */ +} + +blockquote { + border-left: 5px solid #768b8c; +} + +.timeline_freeTag a { + background-color: #8ba4a5; + border: 1px solid #8ba4a5; +} + +.timeline_freeTag a:hover, +.timeline_freeTag a:focus { + color: #768b8c; +} + +#scrollUp { + background-color: #8ba4a5; + border: 1px solid #8ba4a5; +} +#scrollUp:hover { + color: #768b8c; +} \ No newline at end of file diff --git a/templates/timeline/img/default_avatar.jpg b/templates/timeline/img/default_avatar.jpg new file mode 100644 index 00000000..d07c9a8e Binary files /dev/null and b/templates/timeline/img/default_avatar.jpg differ diff --git a/templates/timeline/img/image_unavailable.jpg b/templates/timeline/img/image_unavailable.jpg new file mode 100644 index 00000000..7acaaf94 Binary files /dev/null and b/templates/timeline/img/image_unavailable.jpg differ diff --git a/templates/timeline/img/image_unavailable_alt.jpg b/templates/timeline/img/image_unavailable_alt.jpg new file mode 100644 index 00000000..2f24cfd2 Binary files /dev/null and b/templates/timeline/img/image_unavailable_alt.jpg differ diff --git a/templates/timeline/img/subtome-128x128.psd b/templates/timeline/img/subtome-128x128.psd new file mode 100644 index 00000000..95cb8461 Binary files /dev/null and b/templates/timeline/img/subtome-128x128.psd differ diff --git a/templates/timeline/img/subtome-aqua.png b/templates/timeline/img/subtome-aqua.png new file mode 100644 index 00000000..eae0a781 Binary files /dev/null and b/templates/timeline/img/subtome-aqua.png differ diff --git a/templates/timeline/img/subtome-blue-dark.png b/templates/timeline/img/subtome-blue-dark.png new file mode 100644 index 00000000..1a4a2c9f Binary files /dev/null and b/templates/timeline/img/subtome-blue-dark.png differ diff --git a/templates/timeline/img/subtome-blue.png b/templates/timeline/img/subtome-blue.png new file mode 100644 index 00000000..92930f0f Binary files /dev/null and b/templates/timeline/img/subtome-blue.png differ diff --git a/templates/timeline/img/subtome-brown.png b/templates/timeline/img/subtome-brown.png new file mode 100644 index 00000000..9195aee6 Binary files /dev/null and b/templates/timeline/img/subtome-brown.png differ diff --git a/templates/timeline/img/subtome-colors.jpg b/templates/timeline/img/subtome-colors.jpg new file mode 100644 index 00000000..d9288179 Binary files /dev/null and b/templates/timeline/img/subtome-colors.jpg differ diff --git a/templates/timeline/img/subtome-green-light.png b/templates/timeline/img/subtome-green-light.png new file mode 100644 index 00000000..9f3471ab Binary files /dev/null and b/templates/timeline/img/subtome-green-light.png differ diff --git a/templates/timeline/img/subtome-green.png b/templates/timeline/img/subtome-green.png new file mode 100644 index 00000000..5988e50d Binary files /dev/null and b/templates/timeline/img/subtome-green.png differ diff --git a/templates/timeline/img/subtome-grey.png b/templates/timeline/img/subtome-grey.png new file mode 100644 index 00000000..11168e9c Binary files /dev/null and b/templates/timeline/img/subtome-grey.png differ diff --git a/templates/timeline/img/subtome-images-included.jpg b/templates/timeline/img/subtome-images-included.jpg new file mode 100644 index 00000000..d9288179 Binary files /dev/null and b/templates/timeline/img/subtome-images-included.jpg differ diff --git a/templates/timeline/img/subtome-orange.png b/templates/timeline/img/subtome-orange.png new file mode 100644 index 00000000..79451ea0 Binary files /dev/null and b/templates/timeline/img/subtome-orange.png differ diff --git a/templates/timeline/img/subtome-purple.png b/templates/timeline/img/subtome-purple.png new file mode 100644 index 00000000..1007209d Binary files /dev/null and b/templates/timeline/img/subtome-purple.png differ diff --git a/templates/timeline/img/subtome-red-dark.png b/templates/timeline/img/subtome-red-dark.png new file mode 100644 index 00000000..8dc29f77 Binary files /dev/null and b/templates/timeline/img/subtome-red-dark.png differ diff --git a/templates/timeline/img/subtome-red.png b/templates/timeline/img/subtome-red.png new file mode 100644 index 00000000..d5cbfe0f Binary files /dev/null and b/templates/timeline/img/subtome-red.png differ diff --git a/templates/timeline/img/subtome-teal.png b/templates/timeline/img/subtome-teal.png new file mode 100644 index 00000000..5d46f7f6 Binary files /dev/null and b/templates/timeline/img/subtome-teal.png differ diff --git a/templates/timeline/img/subtome.png b/templates/timeline/img/subtome.png new file mode 100644 index 00000000..b7638fd5 Binary files /dev/null and b/templates/timeline/img/subtome.png differ diff --git a/templates/timeline/img/xml.gif b/templates/timeline/img/xml.gif new file mode 100644 index 00000000..b0e4adf1 Binary files /dev/null and b/templates/timeline/img/xml.gif differ diff --git a/templates/timeline/index.tpl b/templates/timeline/index.tpl new file mode 100644 index 00000000..26d01cb1 --- /dev/null +++ b/templates/timeline/index.tpl @@ -0,0 +1,262 @@ +{if $is_embedded != true} +<!DOCTYPE html> +<html lang="{$lang}"> +<head> + <meta charset="{$head_charset}"> + <title>{$head_title|default:$blogTitle}{if $head_subtitle} | {$head_subtitle}{/if}</title> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="generator" content="Serendipity v.{$serendipityVersion}"> + {if ($view == "entry" || $view == "start" || $view == "feed" || $view == "plugin" || $staticpage_pagetitle != "" || $robots_index == 'index')} + <meta name="robots" content="index,follow"> + {else} + <meta name="robots" content="noindex,follow"> + {/if} + {if ($view == "entry")} + <link rel="canonical" href="{$entry.rdf_ident}"> + {/if} + {if ($view == "start")} + <link rel="canonical" href="{$serendipityBaseURL}"> + {/if} +{* BOOTSTRAP CORE CSS *} + <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"> +{* S9Y CSS *} + <link rel="stylesheet" href="{$head_link_stylesheet}"> + <link rel="alternate" type="application/rss+xml" title="{$blogTitle} RSS feed" href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/index.rss2"> + <link rel="alternate" type="application/x.atom+xml" title="{$blogTitle} Atom feed" href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/atom.xml"> + {if $entry_id} + <link rel="pingback" href="{$serendipityBaseURL}comment.php?type=pingback&entry_id={$entry_id}"> + {/if} +{* CUSTOM FONTS *} + <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> + <link href='https://fonts.googleapis.com/css?family=Open+Sans:300,400' rel='stylesheet' type='text/css'> + {serendipity_hookPlugin hook="frontend_header"} + <script src="{$head_link_script}"></script> +{* SUBHEADER IMAGE *} +{if $template_option.subheader_img} + <style type="text/css">.subheader_image {ldelim}background-image: url('{$template_option.subheader_img}');{rdelim}</style> +{/if} +{* ADDTIONAL COLORSET & SKIN STYLESHEETS - INCLUDED SETS ARE LOADED VIA CONFIG.INC.PHP *} +</head> +<body class="{if $template_option.colorset}{$template_option.colorset}-style{else}green-style{/if} {if $template_option.skinset}{$template_option.skinset}-skin{else}light-skin{/if}"> +{else} + {serendipity_hookPlugin hook="frontend_header"} +{/if} +{if $is_raw_mode != true} +<div class="wrapper"> + <div class="header header-custom"> + {if $template_option.use_corenav} + <div class="container container-logonav"> + <a class="sr-only sr-only-focusable" href="#content"><span lang="en">Skip to main content</span></a>{* LANG? *} + <div class="navbar navbar-default" role="navigation"> + <div> {* this was class="container" *} + {* Brand and toggle get grouped for better mobile display *} + <div class="navbar-header"> + {if $template_option.header_img} + <a class="logo" href="{$serendipityBaseURL}" title="{$CONST.HOMEPAGE}"><img src="{$template_option.header_img}" alt="{$blogTitle} Logo"><h1 class="sr-only">{$blogTitle}</h1></a> + {else} + <a class="navbar-brand" href="{$serendipityBaseURL}" title="{$CONST.HOMEPAGE}"><h1>{$blogTitle}</h1></a> + {/if} + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse"> + <span class="sr-only">Toggle navigation</span>{* LANG? *} + <span class="fa fa-bars"></span> + </button> + </div> + <!-- Collect the nav links, forms, and other content for toggling --> + <div class="collapse navbar-collapse navbar-responsive-collapse"> + <ul class="nav navbar-nav navbar-right">{foreach from=$navlinks item="navlink" name="sitenav"}<li><a {if $currpage==$navlink.href}class="navbar_current_page"{/if} href="{$navlink.href}" title="{$navlink.title}">{$navlink.title}</a></li>{/foreach}<li><a href="#basicModal" data-toggle="modal" data-target="#basicModal" title="{$CONST.SEARCH}"><i class="fa fa-search" aria-hidden="true"></i></a></li></ul> + </div><!--/navbar-collapse--> + </div> + </div>{* End Navbar *} + </div> + {/if} + </div>{* End Header *} + <div class="modal fade" id="basicModal" tabindex="-1" role="dialog" aria-labelledby="basicModal" aria-hidden="true">{* CLEAN THIS UP - UNWANTED CLASSES, ETC *} + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" title="{$CONST.CLOSE}" data-dismiss="modal" aria-hidden="true">×</button> + <h4 class="modal-title" id="myModalLabel">{$CONST.SEARCH_WHAT}</h4> + </div> + <div class="modal-body"> + <form id="searchform" action="{$serendipityHTTPPath}{$serendipityIndexFile}" method="get"> + <input type="hidden" name="serendipity[action]" value="search"> + <label for="serendipityQuickSearchTermField" class="sr-only">{$CONST.QUICKSEARCH}</label> + <input id="serendipityQuickSearchTermField" class="form-control" name="serendipity[searchTerm]" type="search" value="" placeholder="{$CONST.SEARCH} ..."> + <div class="modal-footer"> + <input class="btn btn-default btn-theme" id="gobutton" name="serendipity[searchButton]" type="submit" value="{$CONST.GO}"> + <button type="button" class="btn btn-default" data-dismiss="modal">{$CONST.CLOSE}</button> + </div> + </form> + {serendipity_hookPlugin hook="quicksearch_plugin" hookAll="true"} + </div> + </div> + </div> + </div> + <div class="subheader{if $template_option.subheader_img} subheader_image{/if}"> + <div class="container"> + <h2 class="pull-left"> + {if $view == 'start' || $view == 'entry' || $view == '404' || $view == 'search' || ($head_title =='' && $head_subtitle=='')}{$blogDescription} + {elseif $view == 'categories'}{$CONST.ENTRIES_FOR|sprintf:{$category_info.category_name|escape}} + {elseif $view == 'authors' || $view == 'comments'}{$head_title} + {elseif $staticpage_pagetitle !=''} + {if $staticpage_headline}{$staticpage_headline|escape} + {elseif $staticpage_articleformattitle}{$staticpage_articleformattitle|escape} + {elseif $plugin_contactform_pagetitle}{$plugin_contactform_pagetitle} + {else}{$head_title}{/if} + {elseif $view == 'archives' && $category}{$head_title} - {$head_subtitle} + {elseif $view == 'archive' && $category}{$category_info.category_name} - {$head_subtitle} + {elseif $head_subtitle}{$head_subtitle} + {/if} + </h2> + + {if $footer_totalPages >1 && !isset($staticpage_pagetitle)} + <nav class="pagination pull-right"> + {assign var="paginationStartPage" value="`$footer_currentPage-3`"} + {if $footer_currentPage+3 > $footer_totalPages} + {assign var="paginationStartPage" value="`$footer_totalPages-4`"} + {/if} + {if $paginationStartPage <= 0} + {assign var="paginationStartPage" value="1"} + {/if} + {if $footer_prev_page} + <a class="btn btn-md btn-default btn-theme" title="{$CONST.PREVIOUS_PAGE}" href="{$footer_prev_page}"><i class="fa fa-arrow-left" aria-hidden="true"></i><span class="sr-only">{$CONST.PREVIOUS_PAGE}</span></a> + {/if} + {if $paginationStartPage > 1} + <a class="btn btn-md btn-default btn-theme" href="{'1'|string_format:$footer_pageLink}">1</a> + {/if} + {if $paginationStartPage > 2} + … + {/if} + {section name=i start=$paginationStartPage loop=$footer_totalPages+1 max=5} + {if $smarty.section.i.index != $footer_currentPage} + <a class="btn btn-md btn-default btn-theme" href="{$smarty.section.i.index|string_format:$footer_pageLink}">{$smarty.section.i.index}</a> + {else} + <span class="thispage btn btn-md btn-default btn-theme disabled">{$smarty.section.i.index}</span> + {/if} + {/section} + {if $smarty.section.i.index < $footer_totalPages} + … + {/if} + {if $smarty.section.i.index <= $footer_totalPages} + <a class="btn btn-md btn-default btn-theme" href="{$footer_totalPages|string_format:$footer_pageLink}">{$footer_totalPages}</a> + {/if} + {if $footer_next_page} + <a class="btn btn-md btn-default btn-theme" title="{$CONST.NEXT_PAGE}" href="{$footer_next_page}"><i class="fa fa-arrow-right" aria-hidden="true"></i><span class="sr-only">{$CONST.NEXT_PAGE}</span></a> + {/if} + </nav> + {/if} + </div> + </div>{* End subheader *} + +{* MAIN CONTENT *} + <div class="container content"> + <div class="row"> + <main class="{if ($rightSidebarElements > 0 && $staticpage_pagetitle =='') || ($rightSidebarElements > 0 && $staticpage_pagetitle !='' && $staticpage_custom.show_sidebars != 'false')}col-md-9{else}col-md-12{/if} mainpanel"> + {if $view=='404'} + <div id="search-block" class="row"> + <div class="col-md-8 col-md-offset-2"> + <div id="search-response" class="panel panel-danger"> + <div class="panel-heading"> + <button type="button" class="close" data-target="#search-block" data-dismiss="alert" aria-label="Close" title="{$CONST.CLOSE}"><span aria-hidden="true">×</span><span class="sr-only">{$CONST.CLOSE}</span></button> + <h3 class="panel-title">{$CONST.ERROR}</h3> + </div> + <div class="panel-body"> + <p><span class="fa-stack text-danger" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-exclamation fa-stack-1x"></i></span> {$CONST.ERROR_404}</p> + <div class="input-group" style="width:100%; margin-bottom: 20px;">{* REMOVE INLINE STYLES *} + <form id="searchform" class="input-group" action="{$serendipityHTTPPath}{$serendipityIndexFile}" method="get"> + <input type="hidden" name="serendipity[action]" value="search" /> + <label for="serendipityQuickSearchTermFieldBox" class="sr-only">{$CONST.QUICKSEARCH}</label> + <input class="form-control" alt="{$CONST.SEARCH_SITE}" type="text" id="serendipityQuickSearchTermFieldBox" name="serendipity[searchTerm]" value="{$CONST.SEARCH}..." onfocus="if(this.value=='{$CONST.SEARCH}...')value=''" onblur="if(this.value=='')value='{$CONST.SEARCH}...';" /> + <span class="input-group-btn"> + <input class="btn btn-sm btn-default btn-theme quicksearch_submit" type="submit" value="{$CONST.GO}" alt="{$CONST.SEARCH_SITE}" name="serendipity[searchButton]" title="{$CONST.SEARCH}" /> + </span> + <div id="LSResult" style="display: none;"><div id="LSShadow"></div></div> + </form> + </div> + {serendipity_hookPlugin hook="quicksearch_plugin" hookAll="true"} + </div> + </div> + </div> + </div> + <div id="search-block" class="row"> + <div class="col-md-8 col-md-offset-2"> + <nav class="text-center"> + <button class="btn btn-md btn-default btn-theme" onclick="goBack()" title="{$CONST.BACK}"><i class="fa fa-arrow-left" aria-hidden="true"></i><span class="sr-only">{$CONST.BACK}</span> {$CONST.BACK}</button> + <script> + function goBack() { + window.history.back(); + } + </script> + <a class="read_more btn btn-md btn-default btn-theme" href="{$serendipityBaseURL}" title="{$CONST.HOMEPAGE}"> <i class="fa fa-home" aria-hidden="true"></i> {$CONST.HOMEPAGE}</a> + </nav> + </div> + </div> + {else} + {if !class_exists('serendipity_event_entryproperties')} + <div id="search-block" class="row"> + <div class="col-md-10 col-md-offset-1 alert alert-danger"> + {$CONST.THEME_EP_NO} + </div> + </div> + {/if} + {$CONTENT} + {/if} + </main> + {if ($rightSidebarElements > 0 && $staticpage_pagetitle =='') || ($rightSidebarElements > 0 && $staticpage_pagetitle !='' && $staticpage_custom.show_sidebars != 'false')} + <aside class="col-md-3 RightSideBarContainer"> + <div id="serendipityRightSideBar" class="RightSideBar"> + {serendipity_printSidebar side="right"} + </div> + </aside> + {/if} + </div> + </div> + <div class="footer-container"> + {if $FooterSidebarElements > 0} + <div class="footer"> + <div class="container"> + <div class="row"> + <div id="serendipityFooterSideBar" class="FooterSideBar"> + {serendipity_printSidebar side="footer" template="footerbar.tpl"} + </div> + </div> + </div> + </div><!--/footer--> + {/if} + <div class="copyright"> + <div class="container"> + <div class="row"> + <div class="col-md-6"> + <p class="copyright-text">{$template_option.copyright}</p> + </div> + <div class="col-md-6"> + <ul class="footer-socials list-inline"> + {foreach from=$socialicons item="socialicon" name="social_networking"} + <li> + <a href="{$socialicon.url}" title="{$socialicon.service}"><i class="fa fa-lg {service_icon from_service=$socialicon.service}"></i></a> + </li> + {/foreach} + </ul> + </div> + </div> + </div> + </div><!--/copyright--> + </div> +</div>{* wrapper *} + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> +<script src={serendipity_getFile file="js/timeline.js"}></script> + +<!--[if lt IE 9]> + <script src={serendipity_getFile file="js/respond.js"}></script> + <script src={serendipity_getFile file="js/html5shiv.js"}></script> + <script src={serendipity_getFile file="js/placeholder-IE-fixes.js"}></script> +<![endif]--> +{/if} +{$raw_data} +{serendipity_hookPlugin hook="frontend_footer"} +{if $is_embedded != true} +</body> +</html> +{/if} \ No newline at end of file diff --git a/templates/timeline/info.txt b/templates/timeline/info.txt new file mode 100644 index 00000000..2c65ebe9 --- /dev/null +++ b/templates/timeline/info.txt @@ -0,0 +1,6 @@ +Name: Timeline +Author: Don Chambers +Date: 2017-03-18 +Require Serendipity: 2.0 +Backend: No +Recommended: Yes \ No newline at end of file diff --git a/templates/timeline/js/html5shiv.js b/templates/timeline/js/html5shiv.js new file mode 100644 index 00000000..ae9312a8 --- /dev/null +++ b/templates/timeline/js/html5shiv.js @@ -0,0 +1,322 @@ +/** +* @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +;(function(window, document) { +/*jshint evil:true */ + /** version */ + var version = '3.7.2'; + + /** Preset options */ + var options = window.html5 || {}; + + /** Used to skip problem elements */ + var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i; + + /** Not all elements can be cloned in IE **/ + var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i; + + /** Detect whether the browser supports default html5 styles */ + var supportsHtml5Styles; + + /** Name of the expando, to work with multiple documents or to re-shiv one document */ + var expando = '_html5shiv'; + + /** The id for the the documents expando */ + var expanID = 0; + + /** Cached data for each document */ + var expandoData = {}; + + /** Detect whether the browser supports unknown elements */ + var supportsUnknownElements; + + (function() { + try { + var a = document.createElement('a'); + a.innerHTML = '<xyz></xyz>'; + //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles + supportsHtml5Styles = ('hidden' in a); + + supportsUnknownElements = a.childNodes.length == 1 || (function() { + // assign a false positive if unable to shiv + (document.createElement)('a'); + var frag = document.createDocumentFragment(); + return ( + typeof frag.cloneNode == 'undefined' || + typeof frag.createDocumentFragment == 'undefined' || + typeof frag.createElement == 'undefined' + ); + }()); + } catch(e) { + // assign a false positive if detection fails => unable to shiv + supportsHtml5Styles = true; + supportsUnknownElements = true; + } + + }()); + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a style sheet with the given CSS text and adds it to the document. + * @private + * @param {Document} ownerDocument The document. + * @param {String} cssText The CSS text. + * @returns {StyleSheet} The style element. + */ + function addStyleSheet(ownerDocument, cssText) { + var p = ownerDocument.createElement('p'), + parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement; + + p.innerHTML = 'x<style>' + cssText + '</style>'; + return parent.insertBefore(p.lastChild, parent.firstChild); + } + + /** + * Returns the value of `html5.elements` as an array. + * @private + * @returns {Array} An array of shived element node names. + */ + function getElements() { + var elements = html5.elements; + return typeof elements == 'string' ? elements.split(' ') : elements; + } + + /** + * Extends the built-in list of html5 elements + * @memberOf html5 + * @param {String|Array} newElements whitespace separated list or array of new element names to shiv + * @param {Document} ownerDocument The context document. + */ + function addElements(newElements, ownerDocument) { + var elements = html5.elements; + if(typeof elements != 'string'){ + elements = elements.join(' '); + } + if(typeof newElements != 'string'){ + newElements = newElements.join(' '); + } + html5.elements = elements +' '+ newElements; + shivDocument(ownerDocument); + } + + /** + * Returns the data associated to the given document + * @private + * @param {Document} ownerDocument The document. + * @returns {Object} An object of data. + */ + function getExpandoData(ownerDocument) { + var data = expandoData[ownerDocument[expando]]; + if (!data) { + data = {}; + expanID++; + ownerDocument[expando] = expanID; + expandoData[expanID] = data; + } + return data; + } + + /** + * returns a shived element for the given nodeName and document + * @memberOf html5 + * @param {String} nodeName name of the element + * @param {Document} ownerDocument The context document. + * @returns {Object} The shived element. + */ + function createElement(nodeName, ownerDocument, data){ + if (!ownerDocument) { + ownerDocument = document; + } + if(supportsUnknownElements){ + return ownerDocument.createElement(nodeName); + } + if (!data) { + data = getExpandoData(ownerDocument); + } + var node; + + if (data.cache[nodeName]) { + node = data.cache[nodeName].cloneNode(); + } else if (saveClones.test(nodeName)) { + node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode(); + } else { + node = data.createElem(nodeName); + } + + // Avoid adding some elements to fragments in IE < 9 because + // * Attributes like `name` or `type` cannot be set/changed once an element + // is inserted into a document/fragment + // * Link elements with `src` attributes that are inaccessible, as with + // a 403 response, will cause the tab/window to crash + // * Script elements appended to fragments will execute when their `src` + // or `text` property is set + return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node; + } + + /** + * returns a shived DocumentFragment for the given document + * @memberOf html5 + * @param {Document} ownerDocument The context document. + * @returns {Object} The shived DocumentFragment. + */ + function createDocumentFragment(ownerDocument, data){ + if (!ownerDocument) { + ownerDocument = document; + } + if(supportsUnknownElements){ + return ownerDocument.createDocumentFragment(); + } + data = data || getExpandoData(ownerDocument); + var clone = data.frag.cloneNode(), + i = 0, + elems = getElements(), + l = elems.length; + for(;i<l;i++){ + clone.createElement(elems[i]); + } + return clone; + } + + /** + * Shivs the `createElement` and `createDocumentFragment` methods of the document. + * @private + * @param {Document|DocumentFragment} ownerDocument The document. + * @param {Object} data of the document. + */ + function shivMethods(ownerDocument, data) { + if (!data.cache) { + data.cache = {}; + data.createElem = ownerDocument.createElement; + data.createFrag = ownerDocument.createDocumentFragment; + data.frag = data.createFrag(); + } + + + ownerDocument.createElement = function(nodeName) { + //abort shiv + if (!html5.shivMethods) { + return data.createElem(nodeName); + } + return createElement(nodeName, ownerDocument, data); + }; + + ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' + + 'var n=f.cloneNode(),c=n.createElement;' + + 'h.shivMethods&&(' + + // unroll the `createElement` calls + getElements().join().replace(/[\w\-:]+/g, function(nodeName) { + data.createElem(nodeName); + data.frag.createElement(nodeName); + return 'c("' + nodeName + '")'; + }) + + ');return n}' + )(html5, data.frag); + } + + /*--------------------------------------------------------------------------*/ + + /** + * Shivs the given document. + * @memberOf html5 + * @param {Document} ownerDocument The document to shiv. + * @returns {Document} The shived document. + */ + function shivDocument(ownerDocument) { + if (!ownerDocument) { + ownerDocument = document; + } + var data = getExpandoData(ownerDocument); + + if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) { + data.hasCSS = !!addStyleSheet(ownerDocument, + // corrects block display not defined in IE6/7/8/9 + 'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' + + // adds styling not present in IE6/7/8/9 + 'mark{background:#FF0;color:#000}' + + // hides non-rendered elements + 'template{display:none}' + ); + } + if (!supportsUnknownElements) { + shivMethods(ownerDocument, data); + } + return ownerDocument; + } + + /*--------------------------------------------------------------------------*/ + + /** + * The `html5` object is exposed so that more elements can be shived and + * existing shiving can be detected on iframes. + * @type Object + * @example + * + * // options can be changed before the script is included + * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false }; + */ + var html5 = { + + /** + * An array or space separated string of node names of the elements to shiv. + * @memberOf html5 + * @type Array|String + */ + 'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video', + + /** + * current version of html5shiv + */ + 'version': version, + + /** + * A flag to indicate that the HTML5 style sheet should be inserted. + * @memberOf html5 + * @type Boolean + */ + 'shivCSS': (options.shivCSS !== false), + + /** + * Is equal to true if a browser supports creating unknown/HTML5 elements + * @memberOf html5 + * @type boolean + */ + 'supportsUnknownElements': supportsUnknownElements, + + /** + * A flag to indicate that the document's `createElement` and `createDocumentFragment` + * methods should be overwritten. + * @memberOf html5 + * @type Boolean + */ + 'shivMethods': (options.shivMethods !== false), + + /** + * A string to describe the type of `html5` object ("default" or "default print"). + * @memberOf html5 + * @type String + */ + 'type': 'default', + + // shivs the document according to the specified `html5` object options + 'shivDocument': shivDocument, + + //creates a shived element + createElement: createElement, + + //creates a shived documentFragment + createDocumentFragment: createDocumentFragment, + + //extends list of elements + addElements: addElements + }; + + /*--------------------------------------------------------------------------*/ + + // expose html5 + window.html5 = html5; + + // shiv the document + shivDocument(document); + +}(this, document)); \ No newline at end of file diff --git a/templates/timeline/js/placeholder-IE-fixes.js b/templates/timeline/js/placeholder-IE-fixes.js new file mode 100644 index 00000000..f839afa3 --- /dev/null +++ b/templates/timeline/js/placeholder-IE-fixes.js @@ -0,0 +1,65 @@ +var PlaceholderIEFixes = function () { + + return { + + //Placeholder IE Fixes + initPlaceholderIEFixes: function () { + if (jQuery.browser.msie && jQuery.browser.version.substr(0, 1) < 9) { // ie7&ie8 + + jQuery('input[placeholder], textarea[placeholder]').each(function () { + var input = jQuery(this); + var inputCloneTypePass = $('<input type="text">'); + var displayCss = input.css('display'); + + if ( input.val() == '' ) { + + if ( input.attr('type') == 'password' ) { + $.each(input.get(0).attributes, function(v,n) { + n = n.nodeName||n.name; + if ( n != 'type' && n != 'name' ) { + v = input.attr(n); // relay on $.fn.attr, it makes some filtering and checks + if(v != undefined && v !== false) { + inputCloneTypePass.attr(n,v); + } + } + }); + + input.css('display', 'none'); + inputCloneTypePass + .appendTo(input.parent()) + .val(input.attr('placeholder')) + .focus(function () { + if (inputCloneTypePass.val() == inputCloneTypePass.attr('placeholder')) { + inputCloneTypePass.css('display', 'none'); + input.css('display', displayCss); + input.focus(); + } + }); + } + + input.val(input.attr('placeholder')); + } + + jQuery(input).focus(function () { + if (input.val() == input.attr('placeholder')) { + input.val(''); + } + }); + + jQuery(input).blur(function () { + if (input.val() == '' || input.val() == input.attr('placeholder')) { + if (input.attr('type') == 'password') { + inputCloneTypePass.css('display', displayCss); + input.css('display', 'none'); + }else { + input.val(input.attr('placeholder')); + } + } + }); + }); + } + } + + }; + +}(); \ No newline at end of file diff --git a/templates/timeline/js/respond.js b/templates/timeline/js/respond.js new file mode 100644 index 00000000..f08799be --- /dev/null +++ b/templates/timeline/js/respond.js @@ -0,0 +1,326 @@ +/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */ +/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */ +window.matchMedia = window.matchMedia || (function(doc, undefined){ + + var bool, + docElem = doc.documentElement, + refNode = docElem.firstElementChild || docElem.firstChild, + // fakeBody required for <FF4 when executed in <head> + fakeBody = doc.createElement('body'), + div = doc.createElement('div'); + + div.id = 'mq-test-1'; + div.style.cssText = "position:absolute;top:-100em"; + fakeBody.style.background = "none"; + fakeBody.appendChild(div); + + return function(q){ + + div.innerHTML = '­<style media="'+q+'"> #mq-test-1 { width: 42px; }</style>'; + + docElem.insertBefore(fakeBody, refNode); + bool = div.offsetWidth == 42; + docElem.removeChild(fakeBody); + + return { matches: bool, media: q }; + }; + +})(document); + + + + +/*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ +(function( win ){ + //exposed namespace + win.respond = {}; + + //define update even in native-mq-supporting browsers, to avoid errors + respond.update = function(){}; + + //expose media query support flag for external use + respond.mediaQueriesSupported = win.matchMedia && win.matchMedia( "only all" ).matches; + + //if media queries are supported, exit here + if( respond.mediaQueriesSupported ){ return; } + + //define vars + var doc = win.document, + docElem = doc.documentElement, + mediastyles = [], + rules = [], + appendedEls = [], + parsedSheets = {}, + resizeThrottle = 30, + head = doc.getElementsByTagName( "head" )[0] || docElem, + base = doc.getElementsByTagName( "base" )[0], + links = head.getElementsByTagName( "link" ), + requestQueue = [], + + //loop stylesheets, send text content to translate + ripCSS = function(){ + var sheets = links, + sl = sheets.length, + i = 0, + //vars for loop: + sheet, href, media, isCSS; + + for( ; i < sl; i++ ){ + sheet = sheets[ i ], + href = sheet.href, + media = sheet.media, + isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet"; + + //only links plz and prevent re-parsing + if( !!href && isCSS && !parsedSheets[ href ] ){ + // selectivizr exposes css through the rawCssText expando + if (sheet.styleSheet && sheet.styleSheet.rawCssText) { + translate( sheet.styleSheet.rawCssText, href, media ); + parsedSheets[ href ] = true; + } else { + if( (!/^([a-zA-Z:]*\/\/)/.test( href ) && !base) + || href.replace( RegExp.$1, "" ).split( "/" )[0] === win.location.host ){ + requestQueue.push( { + href: href, + media: media + } ); + } + } + } + } + makeRequests(); + }, + + //recurse through request queue, get css text + makeRequests = function(){ + if( requestQueue.length ){ + var thisRequest = requestQueue.shift(); + + ajax( thisRequest.href, function( styles ){ + translate( styles, thisRequest.href, thisRequest.media ); + parsedSheets[ thisRequest.href ] = true; + makeRequests(); + } ); + } + }, + + //find media blocks in css text, convert to style blocks + translate = function( styles, href, media ){ + var qs = styles.match( /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi ), + ql = qs && qs.length || 0, + //try to get CSS path + href = href.substring( 0, href.lastIndexOf( "/" )), + repUrls = function( css ){ + return css.replace( /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g, "$1" + href + "$2$3" ); + }, + useMedia = !ql && media, + //vars used in loop + i = 0, + j, fullq, thisq, eachq, eql; + + //if path exists, tack on trailing slash + if( href.length ){ href += "/"; } + + //if no internal queries exist, but media attr does, use that + //note: this currently lacks support for situations where a media attr is specified on a link AND + //its associated stylesheet has internal CSS media queries. + //In those cases, the media attribute will currently be ignored. + if( useMedia ){ + ql = 1; + } + + + for( ; i < ql; i++ ){ + j = 0; + + //media attr + if( useMedia ){ + fullq = media; + rules.push( repUrls( styles ) ); + } + //parse for styles + else{ + fullq = qs[ i ].match( /@media *([^\{]+)\{([\S\s]+?)$/ ) && RegExp.$1; + rules.push( RegExp.$2 && repUrls( RegExp.$2 ) ); + } + + eachq = fullq.split( "," ); + eql = eachq.length; + + for( ; j < eql; j++ ){ + thisq = eachq[ j ]; + mediastyles.push( { + media : thisq.split( "(" )[ 0 ].match( /(only\s+)?([a-zA-Z]+)\s?/ ) && RegExp.$2 || "all", + rules : rules.length - 1, + hasquery: thisq.indexOf("(") > -1, + minw : thisq.match( /\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/ ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" ), + maxw : thisq.match( /\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/ ) && parseFloat( RegExp.$1 ) + ( RegExp.$2 || "" ) + } ); + } + } + + applyMedia(); + }, + + lastCall, + + resizeDefer, + + // returns the value of 1em in pixels + getEmValue = function() { + var ret, + div = doc.createElement('div'), + body = doc.body, + fakeUsed = false; + + div.style.cssText = "position:absolute;font-size:1em;width:1em"; + + if( !body ){ + body = fakeUsed = doc.createElement( "body" ); + body.style.background = "none"; + } + + body.appendChild( div ); + + docElem.insertBefore( body, docElem.firstChild ); + + ret = div.offsetWidth; + + if( fakeUsed ){ + docElem.removeChild( body ); + } + else { + body.removeChild( div ); + } + + //also update eminpx before returning + ret = eminpx = parseFloat(ret); + + return ret; + }, + + //cached container for 1em value, populated the first time it's needed + eminpx, + + //enable/disable styles + applyMedia = function( fromResize ){ + var name = "clientWidth", + docElemProp = docElem[ name ], + currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[ name ] || docElemProp, + styleBlocks = {}, + lastLink = links[ links.length-1 ], + now = (new Date()).getTime(); + + //throttle resize calls + if( fromResize && lastCall && now - lastCall < resizeThrottle ){ + clearTimeout( resizeDefer ); + resizeDefer = setTimeout( applyMedia, resizeThrottle ); + return; + } + else { + lastCall = now; + } + + for( var i in mediastyles ){ + var thisstyle = mediastyles[ i ], + min = thisstyle.minw, + max = thisstyle.maxw, + minnull = min === null, + maxnull = max === null, + em = "em"; + + if( !!min ){ + min = parseFloat( min ) * ( min.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 ); + } + if( !!max ){ + max = parseFloat( max ) * ( max.indexOf( em ) > -1 ? ( eminpx || getEmValue() ) : 1 ); + } + + // if there's no media query at all (the () part), or min or max is not null, and if either is present, they're true + if( !thisstyle.hasquery || ( !minnull || !maxnull ) && ( minnull || currWidth >= min ) && ( maxnull || currWidth <= max ) ){ + if( !styleBlocks[ thisstyle.media ] ){ + styleBlocks[ thisstyle.media ] = []; + } + styleBlocks[ thisstyle.media ].push( rules[ thisstyle.rules ] ); + } + } + + //remove any existing respond style element(s) + for( var i in appendedEls ){ + if( appendedEls[ i ] && appendedEls[ i ].parentNode === head ){ + head.removeChild( appendedEls[ i ] ); + } + } + + //inject active styles, grouped by media type + for( var i in styleBlocks ){ + var ss = doc.createElement( "style" ), + css = styleBlocks[ i ].join( "\n" ); + + ss.type = "text/css"; + ss.media = i; + + //originally, ss was appended to a documentFragment and sheets were appended in bulk. + //this caused crashes in IE in a number of circumstances, such as when the HTML element had a bg image set, so appending beforehand seems best. Thanks to @dvelyk for the initial research on this one! + head.insertBefore( ss, lastLink.nextSibling ); + + if ( ss.styleSheet ){ + ss.styleSheet.cssText = css; + } + else { + ss.appendChild( doc.createTextNode( css ) ); + } + + //push to appendedEls to track for later removal + appendedEls.push( ss ); + } + }, + //tweaked Ajax functions from Quirksmode + ajax = function( url, callback ) { + var req = xmlHttp(); + if (!req){ + return; + } + req.open( "GET", url, true ); + req.onreadystatechange = function () { + if ( req.readyState != 4 || req.status != 200 && req.status != 304 ){ + return; + } + callback( req.responseText ); + } + if ( req.readyState == 4 ){ + return; + } + req.send( null ); + }, + //define ajax obj + xmlHttp = (function() { + var xmlhttpmethod = false; + try { + xmlhttpmethod = new XMLHttpRequest(); + } + catch( e ){ + xmlhttpmethod = new ActiveXObject( "Microsoft.XMLHTTP" ); + } + return function(){ + return xmlhttpmethod; + }; + })(); + + //translate CSS + ripCSS(); + + //expose update for re-running respond later on + respond.update = ripCSS; + + //adjust on resize + function callMedia(){ + applyMedia( true ); + } + if( win.addEventListener ){ + win.addEventListener( "resize", callMedia, false ); + } + else if( win.attachEvent ){ + win.attachEvent( "onresize", callMedia ); + } +})(this); \ No newline at end of file diff --git a/templates/timeline/js/timeline.js b/templates/timeline/js/timeline.js new file mode 100644 index 00000000..b7bc6877 --- /dev/null +++ b/templates/timeline/js/timeline.js @@ -0,0 +1,198 @@ +// Navigation Scripts to Show Header on Scroll-Up +jQuery(document).ready(function($) { + var MQL = 1170; + + //primary navigation slide-in effect + if ($(window).width() > MQL) { + var headerHeight = $('.header-custom').height(); + $(window).on('scroll', { + previousTop: 0 + }, + function() { + var currentTop = $(window).scrollTop(); + //check if user is scrolling up + if (currentTop < this.previousTop) { + //if scrolling up... + if (currentTop > 0 && $('.header-custom').hasClass('is-fixed')) { + $('.header-custom').addClass('is-visible'); + } else { + $('.header-custom').removeClass('is-visible is-fixed'); + } + } else if (currentTop > this.previousTop) { + //if scrolling down... + $('.header-custom').removeClass('is-visible'); + if (currentTop > headerHeight && !$('.header-custom').hasClass('is-fixed')) $('.header-custom').addClass('is-fixed'); + } + this.previousTop = currentTop; + }); + } +}); + + +/*global jQuery */ +/*jshint browser:true */ +/*! +* FitVids 1.1 +* +* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com +* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ +* Released under the WTFPL license - http://sam.zoy.org/wtfpl/ +* +*/ + +;(function( $ ){ + + 'use strict'; + + $.fn.fitVids = function( options ) { + var settings = { + customSelector: null, + ignore: null + }; + + if(!document.getElementById('fit-vids-style')) { + // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js + var head = document.head || document.getElementsByTagName('head')[0]; + var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}'; + var div = document.createElement("div"); + div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>'; + head.appendChild(div.childNodes[1]); + } + + if ( options ) { + $.extend( settings, options ); + } + + return this.each(function(){ + var selectors = [ + 'iframe[src*="player.vimeo.com"]', + 'iframe[src*="youtube.com"]', + 'iframe[src*="youtube-nocookie.com"]', + 'iframe[src*="kickstarter.com"][src*="video.html"]', + 'object', + 'embed' + ]; + + if (settings.customSelector) { + selectors.push(settings.customSelector); + } + + var ignoreList = '.fitvidsignore'; + + if(settings.ignore) { + ignoreList = ignoreList + ', ' + settings.ignore; + } + + var $allVideos = $(this).find(selectors.join(',')); + $allVideos = $allVideos.not('object object'); // SwfObj conflict patch + $allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video. + + $allVideos.each(function(count){ + var $this = $(this); + if($this.parents(ignoreList).length > 0) { + return; // Disable FitVids on this video. + } + if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; } + if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width')))) + { + $this.attr('height', 9); + $this.attr('width', 16); + } + var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(), + width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(), + aspectRatio = height / width; + if(!$this.attr('id')){ + var videoID = 'fitvid' + count; + $this.attr('id', videoID); + } + $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%'); + $this.removeAttr('height').removeAttr('width'); + }); + }); + }; +// Works with either jQuery or Zepto +})( window.jQuery || window.Zepto ); +jQuery(document).ready(function(){ + jQuery('.content').fitVids(); +}); + + +/*---------------------------------*/ +/* SCROLL TO TOP +/*---------------------------------*/ +! function (a, b, c) { + a.fn.scrollUp = function (b) { + a.data(c.body, "scrollUp") || (a.data(c.body, "scrollUp", !0), a.fn.scrollUp.init(b)) + }, a.fn.scrollUp.init = function (d) { + var e = a.fn.scrollUp.settings = a.extend({}, a.fn.scrollUp.defaults, d), + f = e.scrollTitle ? e.scrollTitle : e.scrollText, + g = a("<a/>", { + id: e.scrollName, + //class: "btn-md btn-theme", //specific to this theme + href: "#top", + title: f + }).appendTo("body"); + e.scrollImg || g.html(e.scrollText), g.css({ + display: "none", + position: "fixed", + zIndex: e.zIndex + }), e.activeOverlay && a("<div/>", { + id: e.scrollName + "-active" + }).css({ + position: "absolute", + top: e.scrollDistance + "px", + width: "100%", + borderTop: "1px dotted" + e.activeOverlay, + zIndex: e.zIndex + }).appendTo("body"), scrollEvent = a(b).scroll(function () { + switch (scrollDis = "top" === e.scrollFrom ? e.scrollDistance : a(c).height() - a(b).height() - e.scrollDistance, e.animation) { + case "fade": + a(a(b).scrollTop() > scrollDis ? g.fadeIn(e.animationInSpeed) : g.fadeOut(e.animationOutSpeed)); + break; + case "slide": + a(a(b).scrollTop() > scrollDis ? g.slideDown(e.animationInSpeed) : g.slideUp(e.animationOutSpeed)); + break; + default: + a(a(b).scrollTop() > scrollDis ? g.show(0) : g.hide(0)) + } + }), g.click(function (b) { + b.preventDefault(), a("html, body").animate({ + scrollTop: 0 + }, e.topSpeed, e.easingType) + }) + }, a.fn.scrollUp.defaults = { + scrollName: "scrollUp", + scrollDistance: 300, + scrollFrom: "top", + scrollSpeed: 300, + easingType: "linear", + animation: "fade", + animationInSpeed: 200, + animationOutSpeed: 200, + scrollText: "Scroll to top", + scrollTitle: !1, + scrollImg: !1, + activeOverlay: !1, + zIndex: 2147483647 + }, a.fn.scrollUp.destroy = function (d) { + a.removeData(c.body, "scrollUp"), a("#" + a.fn.scrollUp.settings.scrollName).remove(), a("#" + a.fn.scrollUp.settings.scrollName + "-active").remove(), a.fn.jquery.split(".")[1] >= 7 ? a(b).off("scroll", d) : a(b).unbind("scroll", d) + }, a.scrollUp = a.fn.scrollUp +}(jQuery, window, document); + +jQuery(document).ready(function () { + jQuery.scrollUp({ + scrollName: 'scrollUp', // Element ID + scrollDistance: 300, // Distance from top/bottom before showing element (px) + scrollFrom: 'top', // 'top' or 'bottom' + scrollSpeed: 200, // Speed back to top (ms) + easingType: 'linear', // Scroll to top easing (see http://easings.net/) + animation: 'fade', // Fade, slide, none + animationInSpeed: 100, // Animation in speed (ms) + animationOutSpeed: 100, // Animation out speed (ms) + scrollText: '<i class="fa fa-chevron-up"></i>', // Text for element, can contain HTML + scrollTitle: 'Top', // Set a custom <a> title if required. Defaults to scrollText + scrollImg: false, // Set true to use image + activeOverlay: false, // Set CSS color to display scrollUp active point, e.g '#00FFFF' + zIndex: 1001 // Z-Index for the overlay + }); +}); \ No newline at end of file diff --git a/templates/timeline/lang_de.inc.php b/templates/timeline/lang_de.inc.php new file mode 100644 index 00000000..d73ed2ef --- /dev/null +++ b/templates/timeline/lang_de.inc.php @@ -0,0 +1,70 @@ +<?php +// General +@define('ERROR_404', 'Fehler 404 - Die angeforderte Seite wurde nicht gefunden.'); +@define('SEARCH_WHAT','Wonach soll gesucht werden?'); //used on quicksearch modal +@define('SEARCH','Suche'); +@define('TOGGLE_NAV','Navigation'); //only seen by screen readers +@define('CLOSE','Schlie�en'); //close button on search form +@define('READ_MORE','Mehr lesen'); + +//Option groups and instructions +@define('THEME_SOCIAL_LINKS', 'Social-Links'); +@define('THEME_PAGE_OPTIONS', 'Seiten-Optionen'); +@define('THEME_NAVIGATION', 'Navigations-Optionen'); +@define('THEME_README','Lies mich'); +@define('THEME_IDENTITY','Seiten-Identit�t'); +@define('THEME_EP_YES','<p class="msg_success">Das Plugin Erweiterte Eigenschaften f�r Eintr�ge (serendipity_event_entryproperties) wird ben�tigt. Es ist installiert und aktiv.</p>'); +@define('THEME_EP_NO','<p class="msg_error">Das Plugin Erweiterte Eigenschaften f�r Eintr�ge (serendipity_event_entryproperties) wird ben�tigt. Es ist entweder nicht installiert oder inaktiv. Bitte das Plugin installieren, um alle Features dieses Themes voll zu nutzen.</p>'); +@define('THEME_INSTRUCTIONS','<p>This theme displays blog posts on a linear timeline. Each group of month titles can also be displayed or hidden on the timeline.</p><p>This theme uses a right and bottom sidebar. Either, or both sidebars can be disabled by deleting sidebar plugins or relocating sidebar plugins to the sidebar colum labeled "hidden" in plugin configuration.</p><p>This theme can be configured to display categories and entry tags from the respective sidebar plugins on the archive page. See "' . THEME_PAGE_OPTIONS . '" below.</p><p>If using the avatar plugin (serendipity_event_gravatar), configure option "Produce smarty tag = yes" for best display of comment avatars.</p><p>Configure serendipity_event_freetag option "Extended Smarty = yes" for a nicer display of tags in the entry footer.</p>'); +@define('THEME_CUSTOM_FIELD_HEADING', 'Freie Felder f�r Eintr�ge'); +@define('THEME_CUSTOM_FIELD_DEFINITION','These optional field(s) are only available when using this theme (timeline). The event plugin serendipity_event_entryproperties (extended properties for entries) must also be installed to use these field(s). The entry image will appear on both the timeline, and at the top of each detailed entry.'); +@define('THEME_ENTRY_IMAGE','Entry Image.'); +@define('THEME_DEMO_AVAILBLE', 'Eine komplette englische Anleitung zur <a href="http://www.optional-necessity.com/demo/timeline/archives/13-Using-the-Timeline-theme.html">Konfiguration und Benutzung von Timeline</a> findet sich in der <a href="http://www.optional-necessity.com/demo/timeline/">Timeline theme demo</a>.'); + +//Page Options +@define('THEME_COLORSET', 'Colorset'); +@define('THEME_SKINSET', 'Theme skin'); +@define('HEADER_IMG','Optional Header Image. Leave blank to use Blog Name.'); +@define('HEADER_IMG_DESC', 'Header image recommended size: 150px x 40px.'); +@define('ENTRY_DATE_FORMAT','Datumsformat f�r Eintr�ge'); +@define('COMMENT_TIME_FORMAT','Zeitformat f�r Kommentare und Trackbacks'); +@define('WORDS','Textfassung'); +@define('TIMESTAMP','Zeitstempel'); +@define('DISPLAY_AS_TIMELINE','Timeline-Format verwenden'); +@define('DISPLAY_AS_TIMELINE_DESC','Timeline-Format f�r Blog-Posts verwenden. Falls Nein werden Blog-Posts im �blichen Blog-Format ausgegeben.'); +@define('MONTHS_ON_TIMELINE','Show month names on timeline'); +@define('MONTHS_ON_TIMELINE_DESC','Month name will appear as a heading on the timeline for each month of entries.'); +@define('MONTHS_ON_TIMELINE_FORMAT','Timeline month format'); +@define('CATEGORIES_ON_ARCHIVE', 'Kategorien auf der Archivseite anzeigen'); +@define('CATEGORIES_ON_ARCHIVE_DESC', 'Das Seitenleisten-Plugin Kategorien (serendipity_plugin_categories) muss installiert und die Option "Smarty-Templating aktivieren?" aktiviert sein, damit Kategorien auf der Archiv-Seite angezeigt werden.'); +@define('CATEGORY_RSS_ON_ARCHIVE','Show RSS icon next to each category on archive page'); +@define('TAGS_ON_ARCHIVE', 'Tags auf der Archivseite anzeigen'); +@define('TAGS_ON_ARCHIVE_DESC', 'Das Seitenleisten-Plugin Getaggte Artikel (serendipity_plugin_freetag) muss installiert sein und die Option "Sidebar template" muss auf "archive_freetag.tpl" gesetzt werden, damit Tags auf der Archiv-Seite angezeigt werden.'); + +//Navigation +@define('USE_CORENAV', 'Globale Navigation verwenden?'); + +//Social media +@define('SOCIAL_ICONS_AMOUNT', 'Enter number of social media links'); +@define('SOCIAL_NETWORK_SERVICE', 'Select social media service for link'); +@define('SOCIAL_ICON_URL', 'URL for social media service link'); +@define('COPYRIGHT', 'Copyright'); + +//time ago in words function +@define('ELAPSED_LESS_THAN_MINUTE_AGO','Vor weniger als einer Minute'); +@define('ELAPSED_ONE_MINUTE_AGO','Vor einer Minute'); +@define('ELAPSED_ONE_DAY_AGO','Vor einem Tag'); +@define('ELAPSED_MINUTES_AGO','Vor %s Minuten'); +@define('ELAPSED_HOURS_AGO','Vor %s Stunden'); +@define('ELAPSED_DAYS_AGO','Vor %s Tagen'); +@define('ELAPSED_MONTHS_AGO','Vor %s Monaten'); +@define('ELAPSED_YEARS_AGO','Vor %s Jahren'); //not currently using this, but defining just in case +@define('ELAPSED_ABOUT_ONE_HOUR_AGO','Vor ungef�hr einer Stunde'); // greater than 45 minutes, less than 90 minutes +@define('ELAPSED_ABOUT_ONE_MONTH_AGO','Vor ungef�hr einem Monat'); // greater than 30 days, less than 60 days +@define('ELAPSED_ABOUT_ONE_YEAR_AGO','Vor ungef�hr einem Jahr'); // greater than one year, less than 2 years +@define('ELAPSED_OVER_YEARS_AGO','Vor mehr als %s Jahren');// greater than 2 years + +//Static Pages +@define('STATIC_SHOW_AUTHOR_TEXT','Autorennamen anzeigen'); +@define('STATIC_SHOW_DATE_TEXT','Datum anzeigen'); +@define('STATIC_SHOW_SIDEBARS_TEXT','Show sidebars?'); \ No newline at end of file diff --git a/templates/timeline/lang_en.inc.php b/templates/timeline/lang_en.inc.php new file mode 100644 index 00000000..d189bc56 --- /dev/null +++ b/templates/timeline/lang_en.inc.php @@ -0,0 +1,73 @@ +<?php +// General +@define('ERROR_404', 'Error 404 - The page you requested could not be found.'); +@define('SEARCH_WHAT','What are you looking for?'); //used on quicksearch modal +@define('SEARCH','Search'); +@define('TOGGLE_NAV','Toggle Navigation'); //only seen by screen readers +@define('CLOSE','Close'); //close button on search form +@define('READ_MORE','Read More'); + +//Option groups and instructions +@define('THEME_SOCIAL_LINKS', 'Social links'); +@define('THEME_PAGE_OPTIONS', 'Page Options'); +@define('THEME_NAVIGATION', 'Navigation Options'); +@define('THEME_README','Read me'); +@define('THEME_IDENTITY','Site Identity'); +@define('THEME_EP_YES','<p class="msg_success">Extended Property for Entries plugin (serendipity_event_entryproperties) is required for this theme, and is installed.</p>'); +@define('THEME_EP_NO','<p class="msg_error">Extended Property for Entries plugin (serendipity_event_entryproperties) is required for this theme, which is not installed or is inactive. Please install the plugin to fully utlize this theme.</p>'); +@define('THEME_INSTRUCTIONS','<p>This theme displays blog posts on a linear timeline. Each group of month titles can also be displayed or hidden on the timeline.</p><p>This theme uses a right and bottom sidebar. Either, or both sidebars can be disabled by deleting sidebar plugins or relocating sidebar plugins to the sidebar colum labeled "hidden" in plugin configuration.</p><p>This theme can be configured to display categories and entry tags from the respective sidebar plugins on the archive page. See "' . THEME_PAGE_OPTIONS . '" below.</p><p>If using the avatar plugin (serendipity_event_gravatar), configure option "Produce smarty tag = yes" for best display of comment avatars.</p><p>Configure serendipity_event_freetag option "Extended Smarty = yes" for a nicer display of tags in the entry footer.</p>'); +@define('THEME_CUSTOM_FIELD_HEADING', 'Custom Entry Fields'); +@define('THEME_CUSTOM_FIELD_DEFINITION','These optional field(s) are only available when using this theme (timeline). The event plugin serendipity_event_entryproperties (extended properties for entries) must also be installed to use these field(s). The entry image will appear on both the timeline, and at the top of each detailed entry.'); +@define('THEME_ENTRY_IMAGE','Entry Image.'); +@define('THEME_DEMO_AVAILABLE', 'A complete English explanation of <a href="http://www.optional-necessity.com/demo/timeline/archives/13-Using-the-Timeline-theme.html">configuring and using Timeline</a> can be found on the <a href="http://www.optional-necessity.com/demo/timeline/">Timeline theme demo</a>.'); + + +//Page Options +@define('THEME_COLORSET', 'Colorset'); +@define('THEME_SKINSET', 'Theme skin'); +@define('HEADER_IMG','Optional Header Image. Leave blank to use Blog Name.'); +@define('HEADER_IMG_DESC', 'Header image recommended size: 150px x 40px.'); +@define('SUBHEADER_IMG','Optional Subheader Image.'); +@define('SUBHEADER_IMG_DESC', 'This full width background image appears below the header logo and site navigation.'); +@define('ENTRY_DATE_FORMAT','Entry Date Format'); +@define('COMMENT_TIME_FORMAT','Comment and trackback time format'); +@define('WORDS','Words'); +@define('TIMESTAMP','Timestamp'); +@define('DISPLAY_AS_TIMELINE','Use timeline format'); +@define('DISPLAY_AS_TIMELINE_DESC','Use timeline format for blog posts. If false, blog posts will be shown in a more typical blog format.'); +@define('MONTHS_ON_TIMELINE','Show month names on timeline'); +@define('MONTHS_ON_TIMELINE_DESC','Month name will appear as a heading on the timeline for each month of entries.'); +@define('MONTHS_ON_TIMELINE_FORMAT','Timeline month format'); +@define('CATEGORIES_ON_ARCHIVE', 'Show categories on archive page'); +@define('CATEGORIES_ON_ARCHIVE_DESC', 'The sidebar categories plugin (serendipity_plugin_categories) must be installed and the option "Enable Smarty-Templates?" must be activated to view categories on the archive page.');//Used in theme readme and archive page +@define('CATEGORY_RSS_ON_ARCHIVE','Show RSS icon next to each category on archive page'); +@define('TAGS_ON_ARCHIVE', 'Show tags on archive page'); +@define('TAGS_ON_ARCHIVE_DESC', 'The show tagged entries plugin (serendipity_plugin_freetag) must be installed and the sidebar template option must be set to "archive_freetag.tpl" to view tags on the archive page.'); //Used in theme readme and archive page + +//Navigation +@define('USE_CORENAV', 'Use global navigation?'); + +//Social media +@define('SOCIAL_ICONS_AMOUNT', 'Enter number of social media links'); +@define('SOCIAL_NETWORK_SERVICE', 'Select social media service for link'); +@define('SOCIAL_ICON_URL', 'URL for social media service link'); +@define('COPYRIGHT', 'Copyright'); + +//time ago in words function +@define('ELAPSED_LESS_THAN_MINUTE_AGO','Less than a minute ago'); +@define('ELAPSED_ONE_MINUTE_AGO','1 minute ago'); +@define('ELAPSED_ONE_DAY_AGO','1 day ago'); +@define('ELAPSED_MINUTES_AGO','%s minutes ago'); +@define('ELAPSED_HOURS_AGO','%s hours ago'); +@define('ELAPSED_DAYS_AGO','%s days ago'); +@define('ELAPSED_MONTHS_AGO','%s months ago'); +@define('ELAPSED_YEARS_AGO','%s years ago'); //not currently using this, but defining just in case +@define('ELAPSED_ABOUT_ONE_HOUR_AGO','About an hour ago'); // greater than 45 minutes, less than 90 minutes +@define('ELAPSED_ABOUT_ONE_MONTH_AGO','About a month ago'); // greater than 30 days, less than 60 days +@define('ELAPSED_ABOUT_ONE_YEAR_AGO','About a year ago'); // greater than one year, less than 2 years +@define('ELAPSED_OVER_YEARS_AGO','Over %s years ago');// greater than 2 years + +//Static Pages +@define('STATIC_SHOW_AUTHOR_TEXT','Show Author\'s name?'); +@define('STATIC_SHOW_DATE_TEXT','Show date last modified?'); +@define('STATIC_SHOW_SIDEBARS_TEXT','Show sidebars?'); diff --git a/templates/timeline/orange_style.css b/templates/timeline/orange_style.css new file mode 100644 index 00000000..58b744c1 --- /dev/null +++ b/templates/timeline/orange_style.css @@ -0,0 +1,124 @@ +/* +Theme: Timeline +Theme developed for Serendipity by Don Chambers (www.optional-necessity.com) +orange colorset +*/ + +/* +* Orange Color: #e67e22; +* Orange Hover Color: #d35400; +* Darkest color: #bf4d02; +*/ + +a { + color: #e67e22; +} + +a:hover, +a:focus { + color: #d35400; +} + +a.subtome:link, +a.subtome:visited { + background: url('img/subtome-orange.png') left bottom no-repeat; +} + +a.subtome:hover, +a.subtome:focus { + background: url('img/subtome-orange.png') -64px center no-repeat; +} + +a.subtome img { + visibility: hidden; +} + +.navbar-default .navbar-brand:hover h1, +.navbar-default .navbar-brand:focus h1{ + color: #d35400; +} + +.header .navbar-default .navbar-toggle { + border-color: #d35400; +} + +.header .navbar-toggle, .header .navbar-default .navbar-toggle:hover, .header .navbar-default .navbar-toggle:focus { + background-color: #e67e22; +} + +@media (max-width: 991px) { + .header .navbar-default .navbar-nav > li > a:hover { + color: #e67e22; + } + .header .navbar-default .navbar-nav > .active > a, .header .navbar-default .navbar-nav > .active > a:hover, .header .navbar-default .navbar-nav > .active > a:focus { + background-color: #e67e22; + } +} + +@media (min-width: 992px) { + .header .navbar-default .navbar-nav a.navbar_current_page, + .header .navbar-default .navbar-nav > li > a:hover { + border-bottom: 2px solid #e67e22; + } + + .header .navbar-default .navbar-nav > li:hover > a { + color: #e67e22; + } +} + +.btn-theme { + background: none repeat scroll 0 0 #e67e22; + border: 1px solid #e67e22; +} + +.btn-theme:hover {color: #e67e22;} + +.pager li > a, +.pager li > span { + background-color: #e67e22; + border: 1px solid #e67e22; +} + +.pager li > a:hover, +.pager li > a:focus { + color: #d35400; +} + +.sidebar_plugin h3{ + border-bottom: 2px solid #e67e22; +} + +.btn-group.archive-button .dropdown-menu > li > a {color: #d35400;} + +.btn-group.archive-button .dropdown-menu > li > a:hover, +.btn-group.archive-button .dropdown-menu > li > a:focus { + background-color: #d35400; +} + +.archive-button-months-entries {border: 1px solid #e67e22;} + +.archive-button-months-entries .badge { + background-color: #bf4d02; /* much darker */ +} + +blockquote { + border-left: 5px solid #d35400; +} + +.timeline_freeTag a { + background-color: #e67e22; + border: 1px solid #e67e22; +} + +.timeline_freeTag a:hover, +.timeline_freeTag a:focus { + color: #d35400; +} + +#scrollUp { + background-color: #e67e22; + border: 1px solid #e67e22; +} +#scrollUp:hover { + color: #d35400; +} \ No newline at end of file diff --git a/templates/timeline/plugin_contactform.tpl b/templates/timeline/plugin_contactform.tpl new file mode 100644 index 00000000..9959aedc --- /dev/null +++ b/templates/timeline/plugin_contactform.tpl @@ -0,0 +1,59 @@ +<article{if $plugin_contactform_articleformat} class="post serendipity_staticpage serendipity_entry{/if}"> + <h3>{if $plugin_contactform_articleformat}{$plugin_contactform_name}{else}{$plugin_contactform_pagetitle}{/if}</h3> + <section id="entry"> + <div class="content serendipity_entry_body"> + {if $is_contactform_error} + <div id="search-block" class="row"> + <div class="col-md-10 col-md-offset-1"> + <p class="alert alert-danger alert-error"><span class="fa-stack" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-exclamation fa-stack-1x"></i></span> {$plugin_contactform_error}</p> + </div> + </div> + {foreach from=$comments_messagestack item="message"} + <div id="search-block" class="row"> + <div class="col-md-10 col-md-offset-1"> + <p class="alert alert-danger alert-error"><span class="fa-stack" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-exclamation fa-stack-1x"></i></span> {$message}</p> + </div> + </div> + {/foreach} + {/if} + {if (empty($is_contactform_sent)) && $plugin_contactform_preface} + <div class="contactform_preface">{$plugin_contactform_preface}</div> + {/if} + {if $is_contactform_sent} + <p class="alert alert-success">{$plugin_contactform_sent}</p> + {else} + <div id="serendipityCommentForm" class="serendipityCommentForm"> + <a id="serendipity_CommentForm"></a> + <form id="serendipity_comment" class="form-vertical" action="{$commentform_action}#feedback" method="post"> + <div> + <input type="hidden" name="serendipity[subpage]" value="{$commentform_sname}"> + <input type="hidden" name="serendipity[commentform]" value="true"> + </div> + <div class="form-group"> + <label for="serendipity_commentform_name">{$CONST.NAME}</label> + <input id="serendipity_commentform_name" class="form-control" name="serendipity[name]" type="text" value="{$commentform_name}" placeholder="{$CONST.NAME}"> + </div> + <div class="form-group"> + <label for="serendipity_commentform_email">{$CONST.EMAIL}</label> + <input id="serendipity_commentform_email" class="form-control" name="serendipity[email]" type="email" value="{$commentform_email}" placeholder="mail@example.org"> + </div> + <div class="form-group"> + <label for="serendipity_commentform_url">{$CONST.HOMEPAGE}</label> + <input id="serendipity_commentform_url" class="form-control" name="serendipity[url]" type="url" value="{$commentform_url}" placeholder="http://..."> + </div> + <div class="form-group"> + <label for="serendipity_commentform_comment">{$CONST.COMMENT}</label> + <textarea id="serendipity_commentform_comment" class="form-control" name="serendipity[comment]" rows="10" placeholder="{$CONST.COMMENT}">{$commentform_data}</textarea> + </div> + <div class="form-group"> + {serendipity_hookPlugin hook="frontend_comment" data=$commentform_entry} + </div> + <div class="form-group"> + <input id="serendipity_submit" name="serendipity[submit]" class="btn btn-default btn-theme" type="submit" value="{$CONST.SUBMIT_COMMENT}"> + </div> + </form> + </div> + </div> + </section> +{/if} +</article> \ No newline at end of file diff --git a/templates/timeline/plugin_dynamicform.tpl b/templates/timeline/plugin_dynamicform.tpl new file mode 100644 index 00000000..a5878765 --- /dev/null +++ b/templates/timeline/plugin_dynamicform.tpl @@ -0,0 +1,109 @@ +<article{if $plugin_contactform_articleformat} class="post serendipity_staticpage serendipity_entry{/if}"> + <h3>{if $plugin_contactform_articleformat}{$plugin_contactform_name}{else}{$plugin_contactform_pagetitle}{/if}</h3> + <section id="entry"> + <div class="content serendipity_entry_body"> + {if $is_contactform_error} + <div id="search-block" class="row"> + <div class="col-md-10 col-md-offset-1"> + <p class="alert alert-danger alert-error"><span class="fa-stack" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-exclamation fa-stack-1x"></i></span> {$plugin_contactform_error}</p> + </div> + </div> + {foreach from=$comments_messagestack item="message"} + <div id="search-block" class="row"> + <div class="col-md-10 col-md-offset-1"> + <p class="alert alert-danger alert-error"><span class="fa-stack" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-exclamation fa-stack-1x"></i></span> {$message}</p> + </div> + </div> + {/foreach} + {/if} + {if (empty($is_contactform_sent)) && $plugin_contactform_preface} + <div class="contactform_preface">{$plugin_contactform_preface}</div> + {/if} + {if $is_contactform_sent} + <p class="alert alert-success"><span class="fa-stack text-success" aria-hidden="true"></i><i class="fa fa-smile-o fa-2x"></i></span> {$plugin_contactform_sent}</p> + {else} + <div id="serendipityCommentForm" class="serendipityCommentForm"> + <a id="serendipity_CommentForm"></a> + <form id="serendipity_comment" class="form-vertical" action="{$commentform_action}#feedback" method="post"> + <div> + <input type="hidden" name="serendipity[subpage]" value="{$commentform_sname}"> + <input type="hidden" name="serendipity[commentform]" value="true"> + </div> + {foreach name="field" from=$commentform_dynamicfields item="field"} + {if $field.type != "hidden"} + {if $field.type == "checkbox"} + <fieldset class="form-group"> + <legend>{$field.name}{if $field.required} <span class="text-danger">*</span>{/if}</legend> + <div class="form-check{if $is_contactform_error && $field.required && !$field.default} text-danger{/if}"> + <label class="form-check-label"> + <input type="checkbox" name="{$field.id}" id="{$field.id}" {$field.default} class="form-check-label"> + {$field.message} + </label> + </div> + </fieldset> + {elseif $field.type == "radio"} + {assign var="radioset" value=''} + {foreach name="radio_option" from=$field.options item="option"} + {if $option.default}{assign var="radioset" value='true'}{/if} + {/foreach} + <fieldset class="form-group"> + <legend>{$field.name}{if $field.required} <span class="text-danger">*</span>{/if}</legend> + <div class="form-check{if $is_contactform_error && $field.required && $radioset!='true'} text-danger{/if}"> + {foreach name="radio_option" from=$field.options item="option"} + <label class="form-check-label"> + <input type="radio" class="form-check-input" name="{$field.id}" id="{$field.id}.{$option.id}" value="{$option.value}" {$option.default}> + {$option.name} + </label> + {/foreach} + </div> + </fieldset> + {elseif $field.type == "select"} + {assign var="selectset" value=''} + {foreach name="radio_option" from=$field.options item="option"} + {if $option.default}{assign var="selectset" value='true'}{/if} + {/foreach} + <fieldset class="form-group{if $is_contactform_error && $field.required && $selectset!='true'} has-error{/if}"> + <legend>{$field.name}{if $field.required} <span class="text-danger">*</span>{/if}</legend> + <select name="{$field.id}" class="form-control"> +{* CHANGE 'PLEASE SELECT' TO LANGUAGE CONSTANT *} + {if $selectset != 'true'}<option value="" disabled selected style="display: none;">{$CONST.PLEASESELECT|default:'Please select'}...</option>{/if} + {foreach name="radio_option" from=$field.options item="option"} + <option name="{$field.id}" id="{$field.id}.{$option.id}" value="{$option.value}" {$option.default} >{$option.name}</option> + {/foreach} + </select> + </fieldset> + {elseif $field.type == "password"} + <fieldset class="form-group{if $is_contactform_error && $field.required && !$field.default} has-error{/if}"> + <legend>{$field.name}{if $field.required} <span class="text-danger">*</span>{/if}</legend> + <input type="password" id="serendipity_commentform_{$field.id}" name="serendipity[{$field.id}]" value="{$field.default}" class="form-control"> + </fieldset> + {elseif $field.type == "textarea"} + <fieldset class="form-group{if $is_contactform_error && $field.required && !$field.default} has-error{/if}"> + <legend>{$field.name}{if $field.required} <span class="text-danger">*</span>{/if}</legend> + <textarea id="serendipity_commentform_{$field.id}" class="form-control" name="serendipity[{$field.id}]" rows="10" placeholder="{$field.name}">{$field.default}</textarea> + </fieldset> + {elseif $field.type == "email"} + <fieldset class="form-group{if $is_contactform_error && $field.required && !$field.default} has-error{/if}"> + <legend>{$field.name}{if $field.required} <span class="text-danger">*</span>{/if}</legend> + <input id="{$field.id}" class="form-control" name="serendipity[{$field.id}]" type="email" value="{$field.default}" placeholder="mail@example.org"> + </fieldset> + {else} + <fieldset class="form-group{if $is_contactform_error && $field.required && !$field.default} has-error{/if}"> + <legend>{$field.name}{if $field.required} <span class="text-danger">*</span>{/if}</legend> + <input type="text" id="serendipity_commentform_{$field.id}" name="serendipity[{$field.id}]" value="{$field.default}" class="form-control" placeholder="{$field.name}"> + </fieldset> + {/if} + {/if} + {/foreach} + <div class="form-group"> + {serendipity_hookPlugin hook="frontend_comment" data=$commentform_entry} + </div> + <div class="form-group"> + <input id="serendipity_submit" name="serendipity[submit]" class="btn btn-default btn-theme" type="submit" value="{$CONST.SUBMIT_COMMENT}"> + </div> + </form> + </div> + {/if}{* FIX POSITION IN CONTACT FORM TOO *} + </div> + </section> +</article> \ No newline at end of file diff --git a/templates/timeline/plugin_staticpage.tpl b/templates/timeline/plugin_staticpage.tpl new file mode 100644 index 00000000..289f2813 --- /dev/null +++ b/templates/timeline/plugin_staticpage.tpl @@ -0,0 +1,59 @@ +<article id="staticpage_{$staticpage_pagetitle|@makeFilename}" class="serendipity_staticpage{if $staticpage_articleformat} post serendipity_entry{/if}"> + <header> + <h3>{if $staticpage_articleformat}{if $staticpage_articleformattitle}{$staticpage_articleformattitle|@escape}{else}{$staticpage_pagetitle}{/if}{else}{if $staticpage_headline}{$staticpage_headline|@escape}{else}{$staticpage_pagetitle}{/if}{/if}</h3> + {if $staticpage_show_breadcrumb} + <div class="staticpage_breadcrumbs"> + <a href="{$serendipityBaseURL}" title="{$CONST.HOMEPAGE}">{$blogTitle}</a> + {foreach name="crumbs" from=$staticpage_navigation.crumbs item="crumb"} + / {if !$smarty.foreach.crumbs.last}<a href="{$crumb.link}">{$crumb.name|@escape}</a>{else}{$crumb.name|@escape}{/if} + {/foreach} + </div> + {/if} + </header> + {if $staticpage_pass AND $staticpage_form_pass != $staticpage_pass} + <form class="staticpage_password_form" action="{$staticpage_form_url}" method="post"> + <fieldset> + <legend>{$CONST.STATICPAGE_PASSWORD_NOTICE}</legend> + <input name="serendipity[pass]" type="password" value=""> + <input name="submit" type="submit" value="{$CONST.GO}" > + </fieldset> + </form> + {else} + <section id="entry"> + {if $staticpage_precontent} + <div class="serendipity_preface"> + {$staticpage_precontent} + </div> + {/if} + {if $staticpage_show_childpages && is_array($staticpage_childpages)} + <nav> + <ul class="staticpage_childpages"> + {foreach from=$staticpage_childpages item="childpage"} + <li><a href="{$childpage.permalink|@escape}" title="{$childpage.pagetitle|@escape}">{$childpage.pagetitle|@escape}</a></li> + {/foreach} + </ul> + </nav> + {/if} + {if $staticpage_content} + <div class="{if $staticpage_articleformat}serendipity_entry_body clearfix{else}staticpage_content{/if}"> + {$staticpage_content} + </div> + {/if} + </section> + {/if} + {if $staticpage_navigation && $staticpage_shownavi && ($staticpage_navigation.prev.link || $staticpage_navigation.next.link)} + <nav> + <ul class="pager staticpage_navigation"> + {if $staticpage_navigation.prev.link}<li class="previous"><a href="{$staticpage_navigation.prev.link}" title="prev"><i class="fa fa-arrow-left" aria-hidden="true"></i> {$staticpage_navigation.prev.name|@escape}</a></li>{/if} + {if $staticpage_navigation.next.link}<li class="next"><a href="{$staticpage_navigation.next.link}" title="next">{$staticpage_navigation.next.name|@escape} <i class="fa fa-arrow-right" aria-hidden="true"></i></a></li>{/if} + </ul> + </nav> + {/if} + {if $staticpage_custom.show_author =='true' || $staticpage_custom.show_date =='true' || ($staticpage_adminlink && $staticpage_adminlink.page_user)} + <footer class="staticpage-footer"> + <p class="post-meta"> + {if $staticpage_custom.show_author =='true'}{$CONST.POSTED_BY} {$staticpage_author|@escape}{/if}{if $staticpage_custom.show_date =='true'}{if $staticpage_custom.show_author =='true'} {$CONST.ON} {/if}<time datetime="{$staticpage_lastchange|@serendipity_html5time}">{$staticpage_lastchange|@formatTime:$template_option.date_format}</time>{/if}{if $staticpage_adminlink AND $staticpage_adminlink.page_user}{if $staticpage_custom.show_author =='true' || $staticpage_custom.show_date =='true'} {/if}<a href="{$staticpage_adminlink.link_edit}" title="{$staticpage_adminlink.link_name|@escape}"><button class="btn btn-sm btn-default btn-theme"><i class="fa fa-lg fa-edit"></i><span class="sr-only">{$staticpage_adminlink.link_name|@escape}</span></button></a>{/if} + </p> + </footer> + {/if} +</article> \ No newline at end of file diff --git a/templates/timeline/plugin_staticpage_aboutpage.tpl b/templates/timeline/plugin_staticpage_aboutpage.tpl new file mode 100644 index 00000000..d97476b4 --- /dev/null +++ b/templates/timeline/plugin_staticpage_aboutpage.tpl @@ -0,0 +1,54 @@ +<article id="staticpage_{$staticpage_pagetitle|@makeFilename}" class="serendipity_staticpage{if $staticpage_articleformat} post serendipity_entry{/if}"> + <header> + <h3>{if $staticpage_articleformat}{if $staticpage_articleformattitle}{$staticpage_articleformattitle|@escape}{else}{$staticpage_pagetitle}{/if}{else}{if $staticpage_headline}{$staticpage_headline|@escape}{else}{$staticpage_pagetitle}{/if}{/if}</h3> + {if $staticpage_show_breadcrumb} + <div class="staticpage_breadcrumbs"> + <a href="{$serendipityBaseURL}" title="{$CONST.HOMEPAGE}">{$blogTitle}</a> + {foreach name="crumbs" from=$staticpage_navigation.crumbs item="crumb"} + / {if !$smarty.foreach.crumbs.last}<a href="{$crumb.link}">{$crumb.name|@escape}</a>{else}{$crumb.name|@escape}{/if} + {/foreach} + </div> + {/if} + </header> + {if $staticpage_pass AND $staticpage_form_pass != $staticpage_pass} + <form class="staticpage_password_form" action="{$staticpage_form_url}" method="post"> + <fieldset> + <legend>{$CONST.STATICPAGE_PASSWORD_NOTICE}</legend> + <input name="serendipity[pass]" type="password" value=""> + <input name="submit" type="submit" value="{$CONST.GO}" > + </fieldset> + </form> + {else} + <section id="entry"> + {if $staticpage_show_childpages && is_array($staticpage_childpages)} + <nav role="navigation"> + <ul class="staticpage_childpages"> + {foreach from=$staticpage_childpages item="childpage"} + <li><a href="{$childpage.permalink|@escape}" title="{$childpage.pagetitle|@escape}">{$childpage.pagetitle|@escape}</a></li> + {/foreach} + </ul> + </nav> + {/if} + {if $staticpage_precontent} + <div class="serendipity_preface"> + {$staticpage_precontent} + </div> + {/if} + </section> + {/if} + {if $staticpage_navigation && $staticpage_shownavi && ($staticpage_navigation.prev.link || $staticpage_navigation.next.link)} + <nav> + <ul class="pager staticpage_navigation"> + {if $staticpage_navigation.prev.link}<li class="previous"><a href="{$staticpage_navigation.prev.link}" title="prev"><i class="fa fa-arrow-left" aria-hidden="true"></i> {$staticpage_navigation.prev.name|@escape}</a></li>{/if} + {if $staticpage_navigation.next.link}<li class="next"><a href="{$staticpage_navigation.next.link}" title="next">{$staticpage_navigation.next.name|@escape} <i class="fa fa-arrow-right" aria-hidden="true"></i></a></li>{/if} + </ul> + </nav> + {/if} + {if $staticpage_custom.show_author =='true' || $staticpage_custom.show_date =='true' || ($staticpage_adminlink && $staticpage_adminlink.page_user)} + <footer class="staticpage-footer"> + <p class="post-meta"> + {if $staticpage_custom.show_author =='true'}{$CONST.POSTED_BY} {$staticpage_author|@escape}{/if}{if $staticpage_custom.show_date =='true'}{if $staticpage_custom.show_author =='true'} {$CONST.ON} {/if}<time datetime="{$staticpage_lastchange|@serendipity_html5time}">{$staticpage_lastchange|@formatTime:$template_option.date_format}</time>{/if}{if $staticpage_adminlink AND $staticpage_adminlink.page_user}{if $staticpage_custom.show_author =='true' || $staticpage_custom.show_date =='true'} {/if}<a href="{$staticpage_adminlink.link_edit}" title="{$staticpage_adminlink.link_name|@escape}"><button class="btn btn-sm btn-default btn-theme"><i class="fa fa-lg fa-edit"></i><span class="sr-only">{$staticpage_adminlink.link_name|@escape}</span></button></a>{/if} + </p> + </footer> + {/if} +</article> \ No newline at end of file diff --git a/templates/timeline/plugin_staticpage_related_category.tpl b/templates/timeline/plugin_staticpage_related_category.tpl new file mode 100644 index 00000000..91ee8a18 --- /dev/null +++ b/templates/timeline/plugin_staticpage_related_category.tpl @@ -0,0 +1,64 @@ +<article id="staticpage_{$staticpage_pagetitle|@makeFilename}" class="serendipity_staticpage{if $staticpage_articleformat} post serendipity_entry{/if}"> + <header> + <h3>{if $staticpage_articleformat}{if $staticpage_articleformattitle}{$staticpage_articleformattitle|@escape}{else}{$staticpage_pagetitle}{/if}{else}{if $staticpage_headline}{$staticpage_headline|@escape}{else}{$staticpage_pagetitle}{/if}{/if}</h3> + {if $staticpage_show_breadcrumb} + <div class="staticpage_breadcrumbs"> + <a href="{$serendipityBaseURL}" title="{$CONST.HOMEPAGE}">{$blogTitle}</a> + {foreach name="crumbs" from=$staticpage_navigation.crumbs item="crumb"} + / {if !$smarty.foreach.crumbs.last}<a href="{$crumb.link}">{$crumb.name|@escape}</a>{else}{$crumb.name|@escape}{/if} + {/foreach} + </div> + {/if} + </header> + {if $staticpage_pass AND $staticpage_form_pass != $staticpage_pass} + <form class="staticpage_password_form" action="{$staticpage_form_url}" method="post"> + <fieldset> + <legend>{$CONST.STATICPAGE_PASSWORD_NOTICE}</legend> + <input name="serendipity[pass]" type="password" value=""> + <input name="submit" type="submit" value="{$CONST.GO}" > + </fieldset> + </form> + {else} + <section id="entry"> + {if $staticpage_precontent} + <div class="serendipity_preface"> + {$staticpage_precontent} + </div> + {/if} + {if $staticpage_show_childpages && is_array($staticpage_childpages)} + <nav role="navigation"> + <ul class="staticpage_childpages"> + {foreach from=$staticpage_childpages item="childpage"} + <li><a href="{$childpage.permalink|@escape}" title="{$childpage.pagetitle|@escape}">{$childpage.pagetitle|@escape}</a></li> + {/foreach} + </ul> + </nav> + {/if} + {if $staticpage_content} + <div class="{if $staticpage_articleformat}serendipity_entry_body clearfix{else}staticpage_content{/if}"> + {$staticpage_content} + </div> + {/if} +{*NOTE: file staticpage-entries-listing.tpl must exist in theme folder *} + <div class="staticpage_related_category_entry_list"> + {serendipity_fetchPrintEntries category=$staticpage_related_category_id template="staticpage-entries-listing.tpl" limit=5 noSticky="true" noCache="false" fetchDrafts=false full="false" use_footer="false"} + </div> + </section> + {/if} + {if $staticpage_navigation AND $staticpage_shownavi} + <nav> + <ul class="pager staticpage_navigation"> + {if $staticpage_navigation.prev.link}<li class="previous"><a href="{$staticpage_navigation.prev.link}" title="prev"><i class="fa fa-arrow-left" aria-hidden="true"></i> {$staticpage_navigation.prev.name|@escape}</a></li>{/if} + {if $staticpage_navigation.next.link}<li class="next"><a href="{$staticpage_navigation.next.link}" title="next">{$staticpage_navigation.next.name|@escape} <i class="fa fa-arrow-right" aria-hidden="true"></i></a></li>{/if} + </ul> + </nav> + {/if} + {if $staticpage_custom.show_author =='true' || $staticpage_custom.show_date =='true' || ($staticpage_adminlink && $staticpage_adminlink.page_user)} + <footer class="staticpage-footer"> + <p class="post-meta"> + {if $staticpage_custom.show_author =='true'}{$CONST.POSTED_BY} {$staticpage_author|@escape}{/if}{if $staticpage_custom.show_date =='true'}{if $staticpage_custom.show_author =='true'} {$CONST.ON} {/if}<time datetime="{$staticpage_lastchange|@serendipity_html5time}">{$staticpage_lastchange|@formatTime:$template_option.date_format}</time>{/if}{if $staticpage_adminlink AND $staticpage_adminlink.page_user}{if $staticpage_custom.show_author =='true' || $staticpage_custom.show_date =='true'} {/if}<a href="{$staticpage_adminlink.link_edit}" title="{$staticpage_adminlink.link_name|@escape}"><button class="btn btn-sm btn-default btn-theme"><i class="fa fa-lg fa-edit"></i><span class="sr-only">{$staticpage_adminlink.link_name|@escape}</span></button></a>{/if} + </p> + </footer> + {/if} +</article> +{assign var="footer_totalPages" value="0" scope="parent"}{* prevent pagination on related category from showing on index.tpl in this theme *} \ No newline at end of file diff --git a/templates/timeline/plugin_staticpage_searchresults.tpl b/templates/timeline/plugin_staticpage_searchresults.tpl new file mode 100644 index 00000000..5cfed25c --- /dev/null +++ b/templates/timeline/plugin_staticpage_searchresults.tpl @@ -0,0 +1,8 @@ +{if $staticpage_results} +<aside class="staticpage_results"> + <h3>{$CONST.STATICPAGE_SEARCHRESULTS|sprintf:$staticpage_searchresults}</h3> + {foreach from=$staticpage_results item="result"} + <a href="{$result.permalink|@escape}" title="{$result.pagetitle|@escape}"><h2 class="post-title">{$result.headline}</h2></a> + {/foreach} +</aside> +{/if} \ No newline at end of file diff --git a/templates/timeline/preview.png b/templates/timeline/preview.png new file mode 100644 index 00000000..8c5c65ae Binary files /dev/null and b/templates/timeline/preview.png differ diff --git a/templates/timeline/preview_fullsize.jpg b/templates/timeline/preview_fullsize.jpg new file mode 100644 index 00000000..e7de391f Binary files /dev/null and b/templates/timeline/preview_fullsize.jpg differ diff --git a/templates/timeline/preview_iframe.tpl b/templates/timeline/preview_iframe.tpl new file mode 100644 index 00000000..a1b188ce --- /dev/null +++ b/templates/timeline/preview_iframe.tpl @@ -0,0 +1,62 @@ +<!doctype html> +<html lang="{$lang}"> +<head> + <meta charset="{$head_charset}"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="generator" content="Serendipity v.{$serendipityVersion}"> + <title>{$CONST.SERENDIPITY_ADMIN_SUITE}</title> +{* BOOTSTRAP CORE CSS *} + <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet"> +{* S9Y CSS *} +{if $head_link_stylesheet_frontend}{* >= s9y 2.0.2 *} + <link rel="stylesheet" href="{$head_link_stylesheet_frontend}"> +{else} + <link rel="stylesheet" href="{$serendipityHTTPPath}{$serendipityRewritePrefix}serendipity.css"> +{/if} +{* CUSTOM FONTS *} + <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> + <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400' rel='stylesheet' type='text/css'> +{* ADDTIONAL COLORSET & SKIN STYLESHEETS - INCLUDED SETS ARE LOADED VIA CONFIG *} + {serendipity_hookPlugin hook="backend_header" hookAll="true"} + <script> + window.onload = function() {ldelim} + parent.document.getElementById('serendipity_iframe').style.height = document.querySelector('html').offsetHeight + 'px'; + parent.document.getElementById('serendipity_iframe').scrolling = 'no'; + parent.document.getElementById('serendipity_iframe').style.border = 0; + {rdelim} + </script> +</head> +<body> + <main id="maincontent" class="container content" role="main"> + <div class="row"> + <div class="col-md-9"> + {if $mode == 'preview'} + {$preview} + {elseif $mode == 'save'} + {$updertHooks} + {if $res} + <div class="alert alert-danger"><span class="fa-stack" aria-hidden="true"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-exclamation fa-stack-1x"></i></span> {$CONST.ERROR}: <b>{$res}</b></div> + {else} + {if $lastSavedEntry} + <script type="text/javascript">$(document).ready(function() { + parent.document.forms['serendipityEntry']['serendipity[id]'].value = "{$lastSavedEntry}"; + }); + </script> + {/if} + <span class="alert alert-success"><span class="fa-stack text-success" aria-hidden="true"></i><i class="fa fa-smile-o fa-2x"></i></span> {$CONST.ENTRY_SAVED}. <a class="btn btn-md btn-default btn-theme" href="{$entrylink}" target="_blank">{$CONST.VIEW_ENTRY}</a></span> + {/if} + {/if} + </div> + </div> + </main> +<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> +<script src={serendipity_getFile file="js/timeline.js" frontend=true}></script> + +<!--[if lt IE 9]> + <script src={serendipity_getFile file="js/respond.js" frontend=true}></script> + <script src={serendipity_getFile file="js/html5shiv.js" frontend=true}></script> + <script src={serendipity_getFile file="js/placeholder-IE-fixes.js" frontend=true}></script> +<![endif]--> +</body> +</html> diff --git a/templates/timeline/purple_style.css b/templates/timeline/purple_style.css new file mode 100644 index 00000000..3d7d7031 --- /dev/null +++ b/templates/timeline/purple_style.css @@ -0,0 +1,124 @@ +/* +Theme: Timeline +Theme developed for Serendipity by Don Chambers (www.optional-necessity.com) +purple colorset +*/ + +/* +* Purple Color: #9b6bcc; +* Purple Hover Color: #814fb5; +* Darkest color: #7240a6; +*/ + +a { + color: #9b6bcc; +} + +a:hover, +a:focus { + color: #814fb5; +} + +a.subtome:link, +a.subtome:visited { + background: url('img/subtome-purple.png') left bottom no-repeat; +} + +a.subtome:hover, +a.subtome:focus { + background: url('img/subtome-purple.png') -64px center no-repeat; +} + +a.subtome img { + visibility: hidden; +} + +.navbar-default .navbar-brand:hover h1, +.navbar-default .navbar-brand:focus h1{ + color: #814fb5; +} + +.header .navbar-default .navbar-toggle { + border-color: #814fb5; +} + +.header .navbar-toggle, .header .navbar-default .navbar-toggle:hover, .header .navbar-default .navbar-toggle:focus { + background-color: #9b6bcc; +} + +@media (max-width: 991px) { + .header .navbar-default .navbar-nav > li > a:hover { + color: #9b6bcc; + } + .header .navbar-default .navbar-nav > .active > a, .header .navbar-default .navbar-nav > .active > a:hover, .header .navbar-default .navbar-nav > .active > a:focus { + background-color: #9b6bcc; + } +} + +@media (min-width: 992px) { + .header .navbar-default .navbar-nav a.navbar_current_page, + .header .navbar-default .navbar-nav > li > a:hover { + border-bottom: 2px solid #9b6bcc; + } + + .header .navbar-default .navbar-nav > li:hover > a { + color: #9b6bcc; + } +} + +.btn-theme { + background: none repeat scroll 0 0 #9b6bcc; + border: 1px solid #9b6bcc; +} + +.btn-theme:hover {color: #9b6bcc;} + +.pager li > a, +.pager li > span { + background-color: #9b6bcc; + border: 1px solid #9b6bcc; +} + +.pager li > a:hover, +.pager li > a:focus { + color: #814fb5; +} + +.sidebar_plugin h3{ + border-bottom: 2px solid #9b6bcc; +} + +.btn-group.archive-button .dropdown-menu > li > a {color: #814fb5;} + +.btn-group.archive-button .dropdown-menu > li > a:hover, +.btn-group.archive-button .dropdown-menu > li > a:focus { + background-color: #814fb5; +} + +.archive-button-months-entries {border: 1px solid #9b6bcc;} + +.archive-button-months-entries .badge { + background-color: #7240a6; /* much darker */ +} + +blockquote { + border-left: 5px solid #814fb5; +} + +.timeline_freeTag a { + background-color: #9b6bcc; + border: 1px solid #9b6bcc; +} + +.timeline_freeTag a:hover, +.timeline_freeTag a:focus { + color: #814fb5; +} + +#scrollUp { + background-color: #9b6bcc; + border: 1px solid #9b6bcc; +} +#scrollUp:hover { + color: #814fb5; +} \ No newline at end of file diff --git a/templates/timeline/red-dark_style.css b/templates/timeline/red-dark_style.css new file mode 100644 index 00000000..4d2d96e5 --- /dev/null +++ b/templates/timeline/red-dark_style.css @@ -0,0 +1,124 @@ +/* +Theme: Timeline +Theme developed for Serendipity by Don Chambers (www.optional-necessity.com) +dark red colorset +*/ + +/* +* Dark Red Color: #a10f2b; +* Dark Red Hover Color: #b61332; lighter +* Darkest color: #7b031b; +*/ + +a { + color: #a10f2b; +} + +a:hover, +a:focus { + color: #b61332; +} + +a.subtome:link, +a.subtome:visited { + background: url('img/subtome-red-dark.png') left bottom no-repeat; +} + +a.subtome:hover, +a.subtome:focus { + background: url('img/subtome-red-dark.png') -64px center no-repeat; +} + +a.subtome img { + visibility: hidden; +} + +.navbar-default .navbar-brand:hover h1, +.navbar-default .navbar-brand:focus h1{ + color: #b61332; +} + +.header .navbar-default .navbar-toggle { + border-color: #b61332; +} + +.header .navbar-toggle, .header .navbar-default .navbar-toggle:hover, .header .navbar-default .navbar-toggle:focus { + background-color: #a10f2b; +} + +@media (max-width: 991px) { + .header .navbar-default .navbar-nav > li > a:hover { + color: #a10f2b; + } + .header .navbar-default .navbar-nav > .active > a, .header .navbar-default .navbar-nav > .active > a:hover, .header .navbar-default .navbar-nav > .active > a:focus { + background-color: #a10f2b; + } +} + +@media (min-width: 992px) { + .header .navbar-default .navbar-nav a.navbar_current_page, + .header .navbar-default .navbar-nav > li > a:hover { + border-bottom: 2px solid #a10f2b; + } + + .header .navbar-default .navbar-nav > li:hover > a { + color: #b61332; + } +} + +.btn-theme { + background: none repeat scroll 0 0 #a10f2b; + border: 1px solid #a10f2b; +} + +.btn-theme:hover {color: #a10f2b;} + +.pager li > a, +.pager li > span { + background-color: #a10f2b; + border: 1px solid #a10f2b; +} + +.pager li > a:hover, +.pager li > a:focus { + color: #b61332; +} + +.sidebar_plugin h3{ + border-bottom: 2px solid #a10f2b; +} + +.btn-group.archive-button .dropdown-menu > li > a {color: #b61332;} + +.btn-group.archive-button .dropdown-menu > li > a:hover, +.btn-group.archive-button .dropdown-menu > li > a:focus { + background-color: #b61332; +} + +.archive-button-months-entries {border: 1px solid #a10f2b;} + +.archive-button-months-entries .badge { + background-color: #7b031b; /* much darker */ +} + +blockquote { + border-left: 5px solid #b61332; +} + +.timeline_freeTag a { + background-color: #a10f2b; + border: 1px solid #a10f2b; +} + +.timeline_freeTag a:hover, +.timeline_freeTag a:focus { + color: #b61332; +} + +#scrollUp { + background-color: #a10f2b; + border: 1px solid #a10f2b; +} +#scrollUp:hover { + color: #b61332; +} \ No newline at end of file diff --git a/templates/timeline/red_style.css b/templates/timeline/red_style.css new file mode 100644 index 00000000..91e40ee1 --- /dev/null +++ b/templates/timeline/red_style.css @@ -0,0 +1,124 @@ +/* +Theme: Timeline +Theme developed for Serendipity by Don Chambers (www.optional-necessity.com) +red colorset +*/ + +/* +* Red Color: #e74c3c; +* Red Hover Color: #c0392b; +* Darkest color: #b02d20; +*/ + +a { + color: #e74c3c; +} + +a:hover, +a:focus { + color: #c0392b; +} + +a.subtome:link, +a.subtome:visited { + background: url('img/subtome-red.png') left bottom no-repeat; +} + +a.subtome:hover, +a.subtome:focus { + background: url('img/subtome-red.png') -64px center no-repeat; +} + +a.subtome img { + visibility: hidden; +} + +.navbar-default .navbar-brand:hover h1, +.navbar-default .navbar-brand:focus h1{ + color: #c0392b; +} + +.header .navbar-default .navbar-toggle { + border-color: #c0392b; +} + +.header .navbar-toggle, .header .navbar-default .navbar-toggle:hover, .header .navbar-default .navbar-toggle:focus { + background-color: #e74c3c; +} + +@media (max-width: 991px) { + .header .navbar-default .navbar-nav > li > a:hover { + color: #e74c3c; + } + .header .navbar-default .navbar-nav > .active > a, .header .navbar-default .navbar-nav > .active > a:hover, .header .navbar-default .navbar-nav > .active > a:focus { + background-color: #e74c3c; + } +} + +@media (min-width: 992px) { + .header .navbar-default .navbar-nav a.navbar_current_page, + .header .navbar-default .navbar-nav > li > a:hover { + border-bottom: 2px solid #e74c3c; + } + + .header .navbar-default .navbar-nav > li:hover > a { + color: #e74c3c; + } +} + +.btn-theme { + background: none repeat scroll 0 0 #e74c3c; + border: 1px solid #e74c3c; +} + +.btn-theme:hover {color: #e74c3c;} + +.pager li > a, +.pager li > span { + background-color: #e74c3c; + border: 1px solid #e74c3c; +} + +.pager li > a:hover, +.pager li > a:focus { + color: #c0392b; +} + +.sidebar_plugin h3{ + border-bottom: 2px solid #e74c3c; +} + +.btn-group.archive-button .dropdown-menu > li > a {color: #c0392b;} + +.btn-group.archive-button .dropdown-menu > li > a:hover, +.btn-group.archive-button .dropdown-menu > li > a:focus { + background-color: #c0392b; +} + +.archive-button-months-entries {border: 1px solid #e74c3c;} + +.archive-button-months-entries .badge { + background-color: #b02d20; /* much darker */ +} + +blockquote { + border-left: 5px solid #c0392b; +} + +.timeline_freeTag a { + background-color: #e74c3c; + border: 1px solid #e74c3c; +} + +.timeline_freeTag a:hover, +.timeline_freeTag a:focus { + color: #c0392b; +} + +#scrollUp { + background-color: #e74c3c; + border: 1px solid #e74c3c; +} +#scrollUp:hover { + color: #c0392b; +} \ No newline at end of file diff --git a/templates/timeline/sidebar.tpl b/templates/timeline/sidebar.tpl new file mode 100644 index 00000000..9a41f29f --- /dev/null +++ b/templates/timeline/sidebar.tpl @@ -0,0 +1,16 @@ +{if $is_raw_mode} + <div id="serendipity{$pluginside}SideBar"> +{/if} +{foreach from=$plugindata item=item} + {if $item.class != "serendipity_plugin_quicksearch"} + <section class="sidebar_plugin clearfix {cycle values="odd,even"} {$item.class}"> + {if $item.title != "" && $item.class != "serendipity_plugin_freetag"} + <h3>{$item.title}</h3> + {/if} + <div class="sidebar_content clearfix">{$item.content}</div> + </section> + {/if} +{/foreach} +{if $is_raw_mode} + </div> +{/if} diff --git a/templates/timeline/staticpage-entries-listing.tpl b/templates/timeline/staticpage-entries-listing.tpl new file mode 100644 index 00000000..1e166e65 --- /dev/null +++ b/templates/timeline/staticpage-entries-listing.tpl @@ -0,0 +1,22 @@ +<h4>{$CONST.STATICPAGE_NEW_HEADLINES|capitalize}</h4> +{if $entries} + <dl> + {foreach from=$entries item="dategroup"} + {foreach from=$dategroup.entries item="entry"} + <dt class="serendipity_recententries_entrylink"><a href="{$entry.link}" title="{$entry.title|@default:$entry.id}">{$entry.title|@default:$entry.id}</a></dt> + <dd class="text-muted serendipity_recententries_entrydate"><small>{$dategroup.date|@formatTime:$template_option.date_format}</small></dd> + {/foreach} + {/foreach} + </dl> + {if $staticpage_related_category_id >0} + <a class="btn btn-md btn-default btn-theme" href="{$serendipityBaseURL}{$serendipityRewritePrefix}{getCategoryLinkByID cid=$staticpage_related_category_id}">{$CONST.STATICPAGE_ARTICLE_OVERVIEW|capitalize} <i class="fa fa-arrow-right" aria-hidden="true"></i></a><br /> + {else} + <a class="btn btn-md btn-default btn-theme" href="{$serendipityArchiveURL}/P1.html">{$CONST.STATICPAGE_ARTICLE_OVERVIEW|capitalize} <i class="fa fa-arrow-right" aria-hidden="true"></i></a><br /> + {/if} +{else} + <div id="search-block" class="row"> + <div class="col-md-10 col-md-offset-1"> + <p class="alert alert-info noentries"><span class="fa-stack"><i class="fa fa-circle-thin fa-stack-2x"></i><i class="fa fa-info fa-stack-1x"></i></span> {$CONST.NO_ENTRIES_TO_PRINT}</p> + </div> + </div> +{/if} \ No newline at end of file diff --git a/templates/timeline/style.css b/templates/timeline/style.css new file mode 100644 index 00000000..0487c8b6 --- /dev/null +++ b/templates/timeline/style.css @@ -0,0 +1,1208 @@ +/* + Theme: Timeline + Last revised April 20, 2016 + Theme developed for Serendipity by Don Chambers (www.optional-necessity.com) + Inspired by Unify/htmlstream + Font Awesome by Dave Gandy - http://fontawesome.io +*/ + +/* +Optional skinsets are loaded after style.css and before colorsets +Default (light) skinset is built into style.css. +Optional skinsets use syntax *_skin.css +Colorsets use syntax *_style.css +Default colorset is green_style.css +*/ + +body { + background-color: #fff; + color: #555; + font-size: 16px; + line-height: 1.6; +} + +a { + /*color: #72c02c;*/ + text-decoration: none; +} + +a:hover, +a:focus { + /*color: #57a70f;*/ /* darker */ + text-decoration: underline; +} + +.RightSideBar a{ + color: #555; +} + +a.subtome:link, +a.subtome:visited { + /* background: url('{TEMPLATE_PATH}img/subtome-green.png') left bottom no-repeat;*/ /* see colorsets for subtome images */ + height: 64px!important; + margin: 0; + padding: 24px 0; + visibility: visible; + width: 64px!important; +} + +a.subtome:hover, +a.subtome:active { + /*background: url('{TEMPLATE_PATH}img/subtome-green.png') -64px center no-repeat;*/ +} + +a.subtome img { + visibility: hidden; +} + +hr { + margin: 15px 0; +} + +p { + margin: 0 0 20px; +} + +.wrapper { + background-color: #fff; +} + +.header { + background-color: #fff; + border-bottom: 2px solid #eee; + position: relative; + z-index: 99; +} + +.header .navbar { + margin: 0; +} + +.header .navbar-default { + background: none; + border: none; +} + +.header .navbar-header h1 { + margin: 10px 0 0 0; +} + +.header .navbar-brand { + height: 100%; + margin:0!important; + padding: 0; + position: relative; + top: -10px; + z-index: 1; +} +.navbar-default .navbar-brand:focus h1, +.navbar-default .navbar-brand:hover h1{ + /* color: #72c02c;*/ +} + +.subheader { + background-color: #fff; + border-bottom: 1px solid #eee; + overflow: hidden; + padding: 10px 0 10px; +} + +.subheader_image { + background-position: center center; + background-repeat: no-repeat; + background-size: cover; + height:100%; + padding: 80px 0; +} + +.subheader h2 { + margin: 10px 0; + padding: 0; +} + +.subheader_image .pagination { + position: relative; + top: -50px; +} + +.subheader .pagination { + margin: 8px 0 0; + padding:0; +} + +.subheader .pagination a:link, .subheader .pagination a:visited, .subheader span.thispage{ + padding: 6px 12px; +} + +.subheader .pagination .btn-theme {margin: 0;} + +.staticpage_subheader { + color: #808080; + margin: 20px 0; +} + +.navbar-toggle {margin-right:0} /* nav button for small screens */ + +@media (min-width: 768px) and (max-width: 991px) { + .header .navbar-brand { + margin-top: 0; + } +} + +.header .navbar-default .navbar-toggle { + /* border-color: #57a70f; */ +} + +.header .navbar-default .navbar-toggle .fa { + color: #fff; + font-size: 19px; +} + +.header .navbar-toggle, .header .navbar-default .navbar-toggle:hover, .header .navbar-default .navbar-toggle:focus { + /*background: none repeat scroll 0 0 #72c02c;*/ + padding: 6px 10px 2px; +} + +.header .navbar-default .navbar-nav > li > a { + color: #687074; +} + +.header .navbar-collapse { + position: relative; +} + +.header .navbar-default .navbar-nav > li > a { + color: #687074; + font-size: 15px; + font-weight: 400; + text-transform: uppercase; +} + +@media (min-width: 992px) { + .header .navbar-nav { + float: right; + } +} + +@media (max-width: 991px) { + .header .navbar-header { + float: none; + } + .header .navbar-toggle { + display: block; + } + .header .navbar-collapse.collapse { + display: none !important; + } + .header .navbar-collapse.collapse.in { + display: block !important; + overflow-y: auto !important; + } + .header .navbar-nav { + float: none !important; + margin: 0 0 5px; + } + .header .navbar-nav > li { + float: none; + } + .header .navbar-nav > li > a { + padding-bottom: 40px; + padding-top: 30px; + } + + .header .navbar-collapse, .header .navbar-collapse .container { + padding-left: 0 !important; + padding-right: 0 !important; + } + .header .navbar-default .navbar-nav > li > a { + font-size: 14px; + padding: 9px 10px; + } + .header .navbar-default .navbar-nav > li a { + border-bottom: 1px solid #eee; + } + .header .navbar-default .navbar-nav > li > a:focus { + background: none repeat scroll 0 0 rgba(0, 0, 0, 0); + } + .header .navbar-default .navbar-nav > li > a:hover { + /*color: #72c02c;*/ + } + + .subheader h2.pull-left, .subheader nav.pull-right { + text-align: center; + width: 100%; + } +} + +@media (min-width: 992px) { + .header .navbar-collapse { + margin-top:20px; + padding: 0; + } + .header .navbar { + min-height: 40px !important; + } + .header .container > .navbar-header, + .header .container-fluid > .navbar-header, + .header .container > .navbar-collapse, + .header .container-fluid > .navbar-collapse { + margin-bottom: -10px; + } + .header .navbar-nav { + position: relative; + } + .header .navbar-default .navbar-nav > li > a { + bottom: -2px; + padding: 9px 30px 9px 20px; + position: relative; + } + .header .navbar-default .navbar-nav > li > a, .header .navbar-default .navbar-nav > li > a:focus { + border-bottom: 2px solid transparent; + } + + a.navbar_current_page, + .header .navbar-default .navbar-nav > li > a:hover, + .header .navbar-default .navbar-nav > .active > a { + /*border-bottom: 2px solid #72c02c!important;*/ + bottom: -2px; + position: relative; + } + .header .navbar-default .navbar-nav > li > a, .header .navbar-default .navbar-nav > li > a:hover, .header .navbar-default .navbar-nav > li > a:focus, .header .navbar-default .navbar-nav > .active > a, .header .navbar-default .navbar-nav > .active > a:hover, .header .navbar-default .navbar-nav > .active > a:focus { + background: none repeat scroll 0 0 rgba(0, 0, 0, 0); + } + + .header .navbar-default .navbar-nav > li:hover > a { + /*color: #72c02c;*/ + } +} + +@media (min-width: 768px) and (max-width: 991px) { + .header .navbar-brand { + margin-left: -10px; + } + .header .navbar-toggle { + margin-right: 0; + } +} + +@media (max-width: 991px) { + .header .navbar-header h1 { + margin-top:20px; + } + .header .navbar-header .logo { + padding-top:20px; + } + + .mainpanel { + /*padding-left: 0px !important;*/ + } + +} + +.header .logo { + height: 100%; + min-height: 40px; + min-width: 100px; + vertical-align: middle; +} +.header .logo img { + margin: 0; + position: relative; + z-index: 1; +} + +.content { + padding-bottom: 40px; + padding-top: 30px; +} + +h1 { + font-size: 28px; + line-height: 35px; +} +h2 { + font-size: 24px; + line-height: 33px; +} + +#entry h2 { + font-size: 32px; + line-height: 40px; +} +h3 { + font-size: 20px; + line-height: 27px; +} +h4 { + line-height: 25px; +} +h5 { + line-height: 20px; +} +h6 { + line-height: 18px; +} +h1, h2, h3, h4, h5, h6 { + font-family: "Open Sans",sans-serif; + margin-top: 5px; +} + +.list-group-item { + background-color: inherit; +} + + +a, a:focus, a:hover, a:active, button, button:hover { + outline: 0 none !important; +} + +/* alternative blog style display on front page instead of timeline */ + +.each-blogstyle-entry {margin-bottom: 26px;} + +.blogstyle-post-thumb {margin-top: 20px;} + +.blogstyle-post-body {margin-top:20px;} + +.blogstyle-post-body h2{line-height: 1.2em; margin-top: 0; overflow: hidden;} + +/* archive summary - "view topics" */ + +.archives_summary {margin-top:40px;} + +.archives_summary h4{line-height: 1.2em; margin: 0 0 4px 0; overflow: hidden;} + +.archives_summary hr {margin: 10px 0} + +.each-archive-entry {margin-bottom: 10px;} + +.archives_summary .post-info {color: #999; font-size:14px; margin-bottom: 4px;} + +.archive-post-thumb {margin-top: 10px; padding-right: 10px;} + +.archive-post-body {margin-top:10px;} + +/*.btn.archive-button-months-entries {border: 1px solid #72c02c;} COLORSET*/ + +/*.btn-default:hover {color: #72c02c;} COLORSET*/ + +.btn-theme { + /*background: none repeat scroll 0 0 #72c02c; + border: 1px solid #72c02c; COLORSET*/ + color: #fff; + cursor: pointer; + display: inline-block; + font-size: 14px; + font-weight: 400; + position: relative; + text-decoration: none!important; + white-space: nowrap; +} + +.btn-theme.disabled { + background-color:#dddddd; + color: #555 +} + +.pager li > a, +.pager li > span { + /*background-color: #72c02c; + border: 1px solid #72c02c; COLORSET */ + border-radius: 3px; + color: #fff; + cursor: pointer; + display: inline-block; + font-size: 14px; + font-weight: 400; + /*padding: 4px 13px;*/ + position: relative; + text-decoration: none; + white-space: nowrap; +} + +.pager li > a:hover, +.pager li > a:focus { + background-color: #e6e6e6; + border-color: #adadad; + /* color: #72c02c;*/ +} + +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + border-color: #adadad; +} + +.timeline { + list-style: none; + padding: 0 0 20px 0; + position: relative; +} + +.timeline:before { /* this is the vertical line */ + background-color: #eeeeee; + bottom: 0; + content: " "; + left: 50%; + margin-left: -1.5px; + position: absolute; + top: 0; + width: 3px; +} + +.timeline > li { + clear: left; + float: left; + margin-bottom: 40px; + position: relative; + width: 50%; +} + +.timeline > li:before, +.timeline > li:after { + content: " "; + display: table; +} + +.timeline > li:after { + clear: both; +} + +.timeline > li:before, +.timeline > li:after { + content: " "; + display: table; +} + +.timeline > li:after { + clear: both; +} + +.timeline > li > .timeline-panel { + border: 1px solid #d4d4d4; + float: left; + position: relative; + width: 94%; +} + +.timeline > li > .timeline-panel:before { + border-top: 15px solid transparent; + border-left: 15px solid #ccc; + border-right: 0 solid #ccc; + border-bottom: 15px solid transparent; + content: " "; + display: inline-block; + position: absolute; + right: -15px; + top: 26px; +} + +.timeline > li > .timeline-panel:after { + border-top: 14px solid transparent; + border-left: 14px solid #fff; + border-right: 0 solid #fff; + border-bottom: 14px solid transparent; + content: " "; + display: inline-block; + position: absolute; + right: -14px; + top: 27px; +} + +.timeline > li.timeline-month-heading { + color: #ccc; + text-align: center; + width:100%; + z-index: 9; +} + +.tldate { + background-color: #eee; + border: 2px solid #ccc; + border-radius: 4px; + color: #adadad; + display: block; + margin: 0 auto; + padding: 3px 0; + text-align: center; + width: 200px; +} + +.timeline > li > .timeline-badge { + color: #ccc; + font-size: 1.4em; + height: 24px; + line-height: 50px; + position: absolute; + right: -12px; + text-align: center; + top: 19px; + width: 24px; + z-index: 9; +} + +.timeline > li.timeline-inverted > .timeline-panel { + float: right; +} +.timeline > li.timeline-inverted > .timeline-panel:before { + border-left-width: 0; + border-right-width: 15px; + left: -15px; + right: auto; +} +.timeline > li.timeline-inverted > .timeline-panel:after { + border-left-width: 0; + border-right-width: 14px; + left: -14px; + right: auto; +} + +.timeline > li > .timeline-panel .timeline-heading { + padding: 5px; +} + +.timeline > li > .timeline-panel .timeline-heading img { + width: 100%; +} + +.timeline > li > .timeline-panel .timeline-heading h4{ + margin: 5px 6px 0px 6px; +} + +.timeline .timeline-body { + padding: 12px; +} + +.timeline .timeline-body h2 {overflow:hidden;} + +.archive-archive_history .timeline .timeline-body { + padding: 12px 6px; +} + +.timeline-body > .col.xs-6, +.timeline-body > .col-md-4 { + padding-left: 6px; + padding-right: 6px; +} + +.timeline .timeline-footer{ + border-top: 1px solid #ccc; + font-size: 14px; + overflow: hidden; + padding: 6px 10px; + width: 100%; +} + +.timeline .timeline-footer .timeline-footer-date { + clear: left; + float: left; +} + +.timeline .timeline-footer .timeline-footer-comments { + clear: right; + float: right; +} + +.timeline .timeline-footer i { + color: #777; + margin-right: 6px; +} + +.timeline > li.timeline-inverted{ + float: right; + clear: right; + margin-bottom: 40px; +} + +.timeline-top-margin { + margin-top: 60px; +} + +.timeline > li.timeline-inverted > .timeline-badge{ + left: -12px; +} + +@media (max-width: 992px) { + .timeline > li > .timeline-panel:before { + border-bottom: 11px solid transparent; + border-left: 11px solid #ccc; + border-top: 11px solid transparent; + right: -11px; + top: 31px; + } + + .timeline > li > .timeline-panel:after { + border-bottom: 10px solid transparent; + border-left: 10px solid #fff; + border-top: 10px solid transparent; + right: -10px; + top: 32px; + } + .timeline > li.timeline-inverted > .timeline-panel:before { + border-right-width: 11px; + left: -11px; + } + .timeline > li.timeline-inverted > .timeline-panel:after { + border-right-width: 10px; + left: -10px; + } +} + +@media (max-width: 767px) { + ul.timeline:before { + left: 0px; + } + + ul.timeline > li { + clear: left; + float: left; + margin-bottom: 20px; + position: relative; + width:100%; + } + ul.timeline > li > .timeline-panel { + width: calc(100% - 30px); + width: -moz-calc(100% - 30px); + width: -webkit-calc(100% - 30px); + } + + ul.timeline > li > .timeline-badge { + left: -12px; + margin-left: 0; + top: 16px; + } + + ul.timeline > li > .timeline-panel { + float: right; + } + + ul.timeline > li > .timeline-panel:before { + border-bottom: 12px solid transparent; + border-left: 12px solid #ccc; + border-top: 12px solid transparent; + right: -12px; + top: 27px; + } + + ul.timeline > li > .timeline-panel:after { + border-bottom: 11px solid transparent; + border-left: 11px solid #fff; + border-top: 11px solid transparent; + right: -11px; + top: 28px; + } + + ul.timeline > li > .timeline-panel:before { + border-left-width: 0; + border-right-width: 12px; + left: -12px; + right: auto; + } + + ul.timeline > li > .timeline-panel:after { + border-left-width: 0; + border-right-width: 11px; + left: -11px; + right: auto; + } + + .timeline > li.timeline-inverted{ + float: left; + clear: left; + margin-top: 30px; + margin-bottom: 30px; + } + + .timeline > li.timeline-inverted > .timeline-badge{ + left: -12px; + } +} + +.footer-container .footer { + background-color: #272727; + line-height: 1.4; + padding: 40px 0; +} + +.footer-container .footer, +.footer-container .footer li, +.footer-container .footer p { + color: #ddd; +} + +.footer-container .footer h3 { + color: #eee; +} + +.FooterSideBar h3, +.RightSideBar h3 { + line-height: 24px; + margin-top: 0; +} + +.footer-container hr { + border-color:#888888; +} + +.FooterSideBar a { + color: #777; +} + +.copyright { + background: #222; + border-top: none; + padding: 10px 0 5px; +} + +.copyright p { + margin-top: 8px; +} + +.copyright a { + color: #777; + margin: 0 2px; +} + +.footer-socials { + margin-top: 12px; + text-align: right; +} + +.footer-socials a { + color: #777; + font-size: 16px; +} + +@media (max-width: 991px) { + .copyright .copyright-text, + .footer-container .footer-socials { + text-align: center; + width: 100%; + } +} + +.sidebar_plugin {margin: 0 0 30px} + +.sidebar_plugin h3{ + /*border-bottom: 2px solid #72c02c!important;*/ + padding: 0 0 5px; +} + +.category-list { + line-height: 1.8em; +} + +.plainList .category-children { + list-style: outside none none; + padding-left: 24px; +} + +.archive-category-list-item a {margin-bottom: 4px} + +.archive-categories, +.archive-tags {margin-bottom: 20px;} + +img.serendipity_freeTag_xmlButton { + vertical-align: middle; +} + +.timeline-body .noentries {margin:0;} + +.timeline .btn-readmore {margin: 4px 0} + +.archive-year { + margin-bottom: 1em; +} + +.archive-button, +.archive-button-months { + width: 100%; +} + +.archive-button .archive-button-months { + margin: 4px 0; + padding:12px; +} + +.btn-group.archive-button li i{ + display: inline-block; + left: -3px; + margin-right: 8px; + position: relative; + text-align: center; + width: 1.25em; +} + +/* archive page... */ +.btn-group.archive-button .dropdown-menu > li > a:focus, +.btn-group.archive-button .dropdown-menu > li > a:hover { + /*background-color: #72c02c;*/ + color: #ffffff; + text-decoration: none; +} + +/*.archive-button-months-entries .badge { + background-color: #4b920c; +} COLORSET - */ + +.serendipity_plugin_recententries dd { + font-size: 13px; + margin-bottom: 18px; +} + +.serendipity_plugin_recententries dt { + font-weight: 500; +} + +.serendipity_plugin_comments .plugin_comment_wrap { + margin-bottom: 30px; +} + +.serendipity_plugin_comments .plugin_comment_date { + font-size: 13px; + margin-bottom: 5px; +} + +.alert, +.panel { + box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); +} + +#serendipityQuickSearchTermField { + width: 100%; +} + +.searchterm { + font-style: italic; +} + +.form-group {max-width: 100%} + +.form-group legend { + border:0; + color: inherit; + font-size: 18px; + margin-bottom: 5px; + font-weight: 700; +} + +@media (max-width: 479px) { + #serendipity_replyTo { + color: #666!important; + max-width: 90%; + } +} + +ul.comment-list { + list-style: none; + margin: 0; + padding: 0; +} + +.comment-list .comment-children { + list-style: none; + margin-left: 58px; + padding: 0; +} + +.comment_any { + margin-bottom: 3.5em; +} + +.comment-list-item, +.comment-list-item-body { + overflow: hidden; +} + +.comment-author-heading { + font-size: 1.0em; + margin: 0 0 5px; + text-transform: uppercase; +} + +img.comment_avatar { + border-radius: 50%; + clear: left; + float: left; + height: 48px; + margin-right: 10px; + width: 48px; +} + +.avatar_right { + margin-left: 0; +} + +.serendipity_comments .comment_ability { + margin: 15px 0; +} + +.comment-date { + color: #808080; + font-weight: normal; +} + +.comment-meta { + font-size: 0.8em; + margin: 0.5em 0 0 0; +} + +.serendipity_commentDirection { + margin: 1em 0; +} + +/* If the basic styles for aligning images are changed, the changes + must be ported to htmlarea/ckeditor/wysiwyg-style.css as well. */ +.serendipity_image_left, +.serendipity_image_right, +.serendipity_image_center, +.serendipity_imageComment_center, +.serendipity_imageComment_left, +.serendipity_imageComment_right { + background: transparent; + border: 0 none; + padding: 0!important; + max-width: 100%; +} +.serendipity_image_left, +.serendipity_imageComment_left { + display: block; + float: left; + margin: 0 1em 1em 0; +} +.serendipity_image_right, +.serendipity_imageComment_right { + display: block; + float: right; + margin: 0 0 1em 1em; +} +.serendipity_image_center { + display: block; + margin: 0 auto 1em auto; +} +.serendipity_imageComment_center { + display: block; + margin: 0 auto 1em auto; +} +.serendipity_imageComment_img img { + border: none!important; + margin: 0!important; +} +.serendipity_imageComment_txt { + border: 0; + color: #808080; + display: block; + font-size: .8125em; + font-style: italic; + line-height: 1.5em; + margin: 0; + padding: .5em; + text-align: center; +} + +#entry img, +.timeline img{ + height: auto; + max-width: 100%; +} + +.image-full-width {width: 100%} + +.img-thumbnail {border-radius: 0; padding:1px;} + +p.read_more {clear:both; float:none; margin-bottom: 0px} + +blockquote { + /*border-left: 5px solid #57a70f;*/ + color: #808080; + font-size: inherit; + font-style: italic; + margin: 10px 30px; +} + +.post-info {color: #a4a4a4; margin-bottom: 20px;} + +.post-info i {margin-right: 6px;} + +.entry-timestamp, +.entry-author-link, +.entry-comment-link, +.entry-edit-link { + margin-right:26px; + white-space: nowrap; +} + +.serendipity_entry_body { + margin-top: 20px; +} + +.serendipity_pageSummary { + margin: 20px 0 10px; + text-align:center; + width: 100%; +} + +.pagination a:link, +.pagination a:visited{ + padding: 8px 14px; +} + +.serendipity_pageSummary span.thispage { + padding: 8px 14px; +} + +.serendipity_pageSummary .pagination a:hover, +.serendipity_pageSummary .pagination a:active { + text-decoration: none; +} + +.serendipity_pageSummary .pagination .btn {margin-bottom: 4px} + +#serendipityRightSideBar img, +#serendipityFooterSideBar img { + height: auto; + max-width: 100%; +} + +.entry-footer { + padding: 20px 0; +} + +.timeline_freeTag { + line-height: 2em; + margin: 0.5em 0; +} + +.timeline_freeTag a { + /*background: none repeat scroll 0 0 #72c02c; + border: 1px solid #72c02c; COLORSET*/ + border-radius: 3px; + color: #fff; + cursor: pointer; + display: inline-block; + font-size: 14px; + font-weight: 400; + line-height: 1.5; + margin: 0 4px 4px 0; + padding: 4px 13px; + position: relative; + text-decoration: none; + text-align: center; + vertical-align: middle; + white-space: nowrap; +} + +.RightSideBar .timeline_freeTag a { + color: #fff; +} + +.timeline_freeTag a:hover, +.timeline_freeTag a:focus { + background-color: #e6e6e6; + border: 1px solid #adadad; + /*color: #57a70f;*/ /*dark*/ + text-decoration: none; +} + +.timeline_freeTag_related { + color: #808080; + display: block; + font-size: 90%; + margin: 30px 0 0; + text-align: left; +} + +table { + margin-bottom: 20px; + max-width: 100%; + width: 100%; +} +table > tbody > tr > td, +table > tbody > tr > th, +table > tfoot > tr > td, +table > tfoot > tr > th, +table > thead > tr > td, +table > thead > tr > th { + border-top: 1px solid #ddd; + line-height: 1.42857; + padding: 8px; + vertical-align: top; +} +table > thead > tr > th { + border-bottom: 2px solid #ddd; + vertical-align: bottom; +} +table > caption + thead > tr:first-child > td, +table > caption + thead > tr:first-child > th, +table > colgroup + thead > tr:first-child > td, +table > colgroup + thead > tr:first-child > th, +table > thead:first-child > tr:first-child > td, +table > thead:first-child > tr:first-child > th { + border-top: 0 none; +} +table > tbody + tbody { + border-top: 2px solid #ddd; +} +table table { + background-color: #fff; +} + +/* scroll up if not at page top */ +#scrollUp { + /*background: #72c02c; + border: 1px solid #72c02c;*/ + border-radius: 3px; + bottom: 20px; + color: #fff; + font-size: 20px; + line-height: 1; + padding: 9px 10px 10px; + right: 20px; + text-decoration: none; + transition: background 200ms linear 0s; +} +#scrollUp:hover { + background: #e6e6e6; + border: 1px solid #adadad; + /*color: #72c02c;*/ +} + +/* show navbar if scroll up */ +@media only screen and (min-width: 1170px) { + .header-custom { + -webkit-transition: background-color 0.3s; + -moz-transition: background-color 0.3s; + transition: background-color 0.3s; + /* Force Hardware Acceleration in WebKit */ + -webkit-transform: translate3d(0, 0, 0); + -moz-transform: translate3d(0, 0, 0); + -ms-transform: translate3d(0, 0, 0); + -o-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + } + .header-custom.is-fixed { + /* when the user scrolls down, we hide the header right above the viewport */ + position: fixed; + top: -62px; + left: 0; + right: 0; + background-color: rgba(255, 255, 255, 0.9); + /*border-bottom: 1px solid #f2f2f2;*/ + -webkit-transition: -webkit-transform 0.3s; + -moz-transition: -moz-transform 0.3s; + transition: transform 0.3s; + } + + .header-custom.is-visible { + /* if the user changes the scrolling direction, we show the header */ + -webkit-transform: translate3d(0, 100%, 0); + -moz-transform: translate3d(0, 100%, 0); + -ms-transform: translate3d(0, 100%, 0); + -o-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + box-shadow: 0 0 15px rgba(0, 0, 0, 0.5); + } +} \ No newline at end of file diff --git a/templates/timeline/teal_style.css b/templates/timeline/teal_style.css new file mode 100644 index 00000000..d28bedc7 --- /dev/null +++ b/templates/timeline/teal_style.css @@ -0,0 +1,124 @@ +/* +Theme: Timeline +Theme developed for Serendipity by Don Chambers (www.optional-necessity.com) +teal colorset +*/ + +/* +* Teal Color: #18ba9b; +* Teal Hover Color: #2cd5b6; +* Darkest color: #029377; +*/ + +a { + color: #18ba9b; +} + +a:hover, +a:focus { + color: #2cd5b6; +} + +a.subtome:link, +a.subtome:visited { + background: url('img/subtome-teal.png') left bottom no-repeat; +} + +a.subtome:hover, +a.subtome:focus { + background: url('img/subtome-teal.png') -64px center no-repeat; +} + +a.subtome img { + visibility: hidden; +} + +.navbar-default .navbar-brand:hover h1, +.navbar-default .navbar-brand:focus h1{ + color: #2cd5b6; +} + +.header .navbar-default .navbar-toggle { + border-color: #2cd5b6; +} + +.header .navbar-toggle, .header .navbar-default .navbar-toggle:hover, .header .navbar-default .navbar-toggle:focus { + background-color: #18ba9b; +} + +@media (max-width: 991px) { + .header .navbar-default .navbar-nav > li > a:hover { + color: #18ba9b; + } + .header .navbar-default .navbar-nav > .active > a, .header .navbar-default .navbar-nav > .active > a:hover, .header .navbar-default .navbar-nav > .active > a:focus { + background-color: #18ba9b; + } +} + +@media (min-width: 992px) { + .header .navbar-default .navbar-nav a.navbar_current_page, + .header .navbar-default .navbar-nav > li > a:hover { + border-bottom: 2px solid #18ba9b; + } + + .header .navbar-default .navbar-nav > li:hover > a { + color: #18ba9b; + } +} + +.btn-theme { + background: none repeat scroll 0 0 #18ba9b; + border: 1px solid #18ba9b; +} + +.btn-theme:hover {color: #18ba9b;} + +.pager li > a, +.pager li > span { + background-color: #18ba9b; + border: 1px solid #18ba9b; +} + +.pager li > a:hover, +.pager li > a:focus { + color: #2cd5b6; +} + +.sidebar_plugin h3{ + border-bottom: 2px solid #18ba9b; +} + +.btn-group.archive-button .dropdown-menu > li > a {color: #2cd5b6;} + +.btn-group.archive-button .dropdown-menu > li > a:hover, +.btn-group.archive-button .dropdown-menu > li > a:focus { + background-color: #2cd5b6; +} + +.archive-button-months-entries {border: 1px solid #18ba9b;} + +.archive-button-months-entries .badge { + background-color: #029377; /* much darker */ +} + +blockquote { + border-left: 5px solid #2cd5b6; +} + +.timeline_freeTag a { + background-color: #18ba9b; + border: 1px solid #18ba9b; +} + +.timeline_freeTag a:hover, +.timeline_freeTag a:focus { + color: #2cd5b6; +} + +#scrollUp { + background-color: #18ba9b; + border: 1px solid #18ba9b; +} +#scrollUp:hover { + color: #2cd5b6; +} \ No newline at end of file diff --git a/templates/timeline/trackbacks.tpl b/templates/timeline/trackbacks.tpl new file mode 100644 index 00000000..ab149a30 --- /dev/null +++ b/templates/timeline/trackbacks.tpl @@ -0,0 +1,27 @@ +<ul class="comment-list"> +{foreach from=$trackbacks item=trackback} + <li id="comment-c{$trackback.id}" class="comment-list-item"> + <a id="c{$trackback.id}"></a> + <div id="div-comment-c{$trackback.id}" class="comment_any{cycle values=" comment_odd, comment_even"} comment_author_{$comment.author|@makeFilename} {if $trackback.author == $blogTitle}serendipity_comment_author_self{/if}"> + {if $trackback.avatar} + {$trackback.avatar} + {/if} + <div class="comment-list-item-body"> + <h5 class="comment-author-heading"> + <span class="comment-author-details">{$trackback.author|@default:$CONST.ANONYMOUS}</span> + <time class="comment-date" datetime="{$trackback.timestamp|@serendipity_html5time}">{if $template_option.comment_time_format =='time'}{$trackback.timestamp|@formatTime:'%b %e. %Y'} {$CONST.AT} {$trackback.timestamp|@formatTime:'%I:%M %p'}{else}{elapsed_time_words from_time=$trackback.timestamp}{/if}</time> + </h5> + <div class="comment-content"> + <a href="{$trackback.url|@strip_tags}" {'blank'|@xhtml_target}>{$trackback.title}</a><br /> + {$trackback.body|@strip_tags|@escape:all} ... + </div> + <div class="comment-meta"> + {if $entry.is_entry_owner} + <a class="comment-source-ownerlink btn btn-sm btn-default btn-theme" href="{$serendipityBaseURL}comment.php?serendipity[delete]={$trackback.id}&serendipity[entry]={$trackback.entry_id}&serendipity[type]=trackbacks" title="{$CONST.DELETE}"><i class="fa fa-lg fa-trash-o"></i><span class="sr-only"> {$CONST.DELETE}</span></a> + {/if} + </div> + </div> + </div> + </li> +{/foreach} +</ul> \ No newline at end of file diff --git a/templates/wp/atom.css b/templates/wp/atom.css deleted file mode 100644 index c7313ed3..00000000 --- a/templates/wp/atom.css +++ /dev/null @@ -1,89 +0,0 @@ -/* Basic CSS taken from http://www.blogger.com/styles/atom.css */ - -feed { - display:block; - font-family:verdana, sans-serif; - margin:2%; - font-size:90%; - color:#000000; - background:#ffffff; -} - -title { - display:block; - font-size:1.3em; - color:inherit; - background:inherit; - font-weight:bold; -} - -tagline, link { - display:block; - font-size:0.9em; -} - -id, modified { - display:none; -} - -generator { - display:block; - font-size:0.9em; -} - -info { - display:block; - margin:3em 4em 3em 4em; - color:#CC3333; - background:#FFFF66; - border:solid #CCCC66 2px; - text-align:center; - padding:1.5em; - font-family:mono; - font-size:0.8em; -} - -entry { - display:block; - color:inherit; - background:inherit; - padding:0; - margin:1em 1em 4em 1em; - -} - -entry modified, entry name { - display:inline; - color:#999999; - background:inherit; - font-size:0.8em; -} - -entry created, entry issued, entry id { - display:none; -} - -/* Using a single 'commentRSS' and 'comments' is used for compatibility to Opera */ -slash\:comments, wfw\:commentRss, commentRss, comments, wfw\:comment, comment { - display:none; -} - -entry title { - display:block; - font-size:1em; - font-weight:bold; - color:inherit; - background:inherit; - padding:1em 1em 0em 1em; - margin:0; - border-top:solid 1px #dddddd; -} - -content { - display:block; - font-size:0.9em; - color:inherit; - background:inherit; - padding:1em; - line-height:1.5em; -} \ No newline at end of file diff --git a/templates/wp/commentform.tpl b/templates/wp/commentform.tpl deleted file mode 100644 index 33bd41a5..00000000 --- a/templates/wp/commentform.tpl +++ /dev/null @@ -1,52 +0,0 @@ -<p> - <p><a href='{$serendipityBaseURL}/rss.php?version=2.0&type=comments&cid={$commentform_id}'><abbr title="Really Simple Syndication">RSS</abbr> feed for comments on this post.</a></p> - <h2 id="postcomment">Leave a comment</h2> - - <form action="{$commentform_action}#feedback" method="post" id="commentform"> - <p> - {serendipity_hookPlugin hook="frontend_comment" data=$commentform_entry} - </p> - <p> - <input id="name" type="text" name="serendipity[name]" value="{$commentform_name}" size="28" tabindex="1" /> - <label for="author">{$CONST.NAME}</label> - </p> - - <p> - <input type="text" id="email" name="serendipity[email]" value="{$commentform_email}" size="28" tabindex="2" /> - <label for="email">{$CONST.EMAIL}</label> - </p> - - <p> - <input id="url" type="text" name="serendipity[url]" value="{$commentform_url}" size="28" tabindex="3" /> - <label for="url">{$CONST.HOMEPAGE}</label> - </p> - - <p> - <label for="comment">{$CONST.COMMENT}</label><br /> - <textarea id="comment" rows="4" cols="40" name="serendipity[comment]">{$commentform_data}</textarea> - </p> - - {if $is_commentform_showToolbar} - <p> - <input id="checkbox_remember" type="checkbox" name="serendipity[remember]" {$commentform_remember} /> - <label for="checkbox_remember">{$CONST.REMEMBER_INFO}</label> - </p> - {if $is_allowSubscriptions} - <p> - <input id="checkbox_subscribe" type="checkbox" name="serendipity[subscribe]" {$commentform_subscribe} /> - <label for="checkbox_subscribe">{$CONST.SUBSCRIBE_TO_THIS_ENTRY}</label> - </p> - {/if} - {/if} - - {if $is_moderate_comments} - <p>{$CONST.COMMENTS_WILL_BE_MODERATED}</p> - {/if} - - <p> - <input type="hidden" name="serendipity[entry_id]" value="{$commentform_id}" /> - <input type="submit" name="serendipity[submit]" value="{$CONST.SUBMIT_COMMENT}" /> - <input type="submit" name="serendipity[preview]" value="{$CONST.PREVIEW}" /> - </p> - </form> -</p> diff --git a/templates/wp/comments.tpl b/templates/wp/comments.tpl deleted file mode 100644 index 0d4cc3ba..00000000 --- a/templates/wp/comments.tpl +++ /dev/null @@ -1,12 +0,0 @@ -{foreach from=$comments item=comment} - <li id="comment-{$comment.id}"> - <p> - {if $comment.body == 'COMMENT_DELETED'} - {$CONST.COMMENT_IS_DELETED} - {else} - {$comment.body} - {/if} - </p> - <p><cite>Comment by {if $comment.url}<a href="{$comment.url}" rel='external'>{$comment.username|@default:$CONST.ANONYMOUS}</a>{else}{$comment.username|@default:$CONST.ANONYMOUS}{/if} — {$comment.timestamp|@formatTime:'%m/%d/%Y'} @ <a href="#comment-{$comment.id}">{$comment.timestamp|@formatTime:'%I:%M %p'}</a></cite></p> - </li> -{/foreach} diff --git a/templates/wp/content.tpl b/templates/wp/content.tpl deleted file mode 100644 index 9f882672..00000000 --- a/templates/wp/content.tpl +++ /dev/null @@ -1,7 +0,0 @@ -<!-- CONTENT START --> - -{$content_message} -{$ENTRIES} -{$ARCHIVES} - -<!-- CONTENT END --> diff --git a/templates/wp/entries.tpl b/templates/wp/entries.tpl deleted file mode 100644 index 95ca707d..00000000 --- a/templates/wp/entries.tpl +++ /dev/null @@ -1,67 +0,0 @@ - {serendipity_hookPlugin hook="entries_header" addData="$entry_id"} - - {foreach from=$entries item="dategroup"} - {if $dategroup.is_sticky} - <h2>{$CONST.STICKY_POSTINGS}</h2> - {else} - <h2>{$dategroup.date|@formatTime:DATE_FORMAT_ENTRY}</h2> - {/if} - - {foreach from=$dategroup.entries item="entry"} - {assign var="entry" value=$entry scope="parent"} - <div class="post"> - <h3 class="storytitle" id="post-{$entry.id}"><a href="{$entry.link}" rel="bookmark" title="Permanent Link: {$entry.title}">{$entry.title}</a></h3> - - <div class="meta">Filed under: - <ul class="post-categories">{foreach from=$entry.categories item="entry_category"} - <li><a title="View all posts in {$entry_category.category_name}" href="{$serendipityHTTPPath}{$serendipityRewritePrefix}{$CONST.PATH_CATEGORIES}/{$entry_category.category_id}-{$entry_category.category_name|@makeFilename}">{$entry_category.category_name}</a></li> - {/foreach}</ul> - — {$entry.author} @ {$entry.timestamp|@formatTime:'%I:%M %p'} - </div> - - <div class="storycontent"> - <p> - {$entry.body} - {if $entry.is_extended} - {$entry.extended} - {/if} - </p> - {if $entry.has_extended and not $is_single_entry and not $entry.is_extended} - <p><a href="{$entry.link}#extended">{$CONST.VIEW_EXTENDED_ENTRY|@sprintf:$entry.title}</a></p> - {/if} - </div> - - <div class="feedback"> - <a href="{$entry.link}#comments">Comments ({$entry.comments+$entry.trackbacks})</a> - {$entry.add_footer} - </div> - - <!-- - <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" - xmlns:dc="http://purl.org/dc/elements/1.1/"> - <rdf:Description - rdf:about="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/ei_{$entry.id}.rdf" - trackback:ping="{$serendipityBaseURL}comment.php?type=trackback&entry_id={$entry.id}" - dc:title="{$entry.title_rdf|@default:$entry.title}" - dc:identifier="{$entry.rdf_ident}" /> - </rdf:RDF> - --> - {$entry.plugin_display_dat} - - {if $is_single_entry and not $is_preview} - <h2 id="comments">Comments <a href="#postcomment" title="Leave a comment">»</a></h2> - <p>The <acronym title="Uniform Resource Identifier">URI</acronym> to TrackBack this entry is: <em>{$serendipityBaseURL}comment.php?type=trackback&entry_id={$entry.id}</em></p> - <ol id="commentlist"> - {serendipity_printTrackbacks entry=$entry.id} - {serendipity_printComments entry=$entry.id mode=$CONST.VIEWMODE_LINEAR} - </ol> - {$COMMENTFORM} - {/if} - </div> - {/foreach} - {foreachelse} - {if not $plugin_clean_page} - {$CONST.NO_ENTRIES_TO_PRINT} - {/if} - {/foreach} diff --git a/templates/wp/entries_archives.tpl b/templates/wp/entries_archives.tpl deleted file mode 100644 index 90906e02..00000000 --- a/templates/wp/entries_archives.tpl +++ /dev/null @@ -1,19 +0,0 @@ -{serendipity_hookPlugin hook="entries_header"} -{foreach from=$archives item="archive"} -<table cellspacing="4" cellpadding="4" border="0"> - <tr> - <td colspan="4"><h2>{$archive.year}</h2></td> - </tr> - {foreach from=$archive.months item="month"} - <tr> - <td width="100"><img src="{serendipity_getFile file="img/graph_bar_horisontal.png"}" height="10" width="{math width=100 equation="count * width / max" count=$month.entry_count max=$max_entries format="%d"}" style="border: 1px solid #000000"></td> - <td>{$month.date|@formatTime:"%B"}</td> - <td>{$month.entry_count} {$CONST.ENTRIES}</td> - <td>({if $month.entry_count}<a href="{$month.link}">{/if}{$CONST.VIEW_FULL}{if $month.entry_count}</a>{/if})</td> - <td>({if $month.entry_count}<a href="{$month.link_summary}">{/if}{$CONST.VIEW_TOPICS}{if $month.entry_count}</a>{/if})</td> - </tr> - {/foreach} -</table> -{/foreach} -<div class='serendipity_entryFooter' style="text-align: center"> -{serendipity_hookPlugin hook="entries_footer"}</div> diff --git a/templates/wp/entries_summary.tpl b/templates/wp/entries_summary.tpl deleted file mode 100644 index 538ad3b2..00000000 --- a/templates/wp/entries_summary.tpl +++ /dev/null @@ -1,15 +0,0 @@ -{serendipity_hookPlugin hook="entries_header"} -<div class='serendipity_date'>{$CONST.TOPICS_OF} {$dateRange.0|@formatTime:"%B, %Y"}</div> - -<div class="serendipity_entry"> - {foreach from=$entries item="sentries"} - <ul> - {foreach from=$sentries.entries item="entry"} - <li><a href="{$entry.link}">{$entry.title}</a> - <br />{$CONST.POSTED_BY} {$entry.username} {$CONST.ON} {$entry.timestamp|@formatTime:DATE_FORMAT_ENTRY}</li> - {/foreach} - </ul> - {/foreach} -</div> -<div class='serendipity_entryFooter' style="text-align: center"> -{serendipity_hookPlugin hook="entries_footer"}</div> diff --git a/templates/wp/index.tpl b/templates/wp/index.tpl deleted file mode 100644 index 8242bd12..00000000 --- a/templates/wp/index.tpl +++ /dev/null @@ -1,59 +0,0 @@ -{if $is_embedded != true} -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> - -<head xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$lang}" lang="{$lang}"> - <title>{$head_title|@default:$blogTitle} {if $head_subtitle} - {$head_subtitle}{/if}</title> - - <meta name="generator" content="Serendipity v.{$serendipityVersion}" /> -{if ($view == "entry" || $view == "start" || $view == "feed" || $view == "plugin" || $staticpage_pagetitle != "" || $robots_index == 'index')} - <meta name="robots" content="index,follow" /> -{else} - <meta name="robots" content="noindex,follow" /> -{/if} -{if ($view == "entry")} - <link rel="canonical" href="{$entry.rdf_ident}" /> -{/if} -{if ($view == "start")} - <link rel="canonical" href="{$serendipityBaseURL}" /> -{/if} - - <style type="text/css" media="screen"> - @import url( {serendipity_getFile file="wp-layout.css"} ); - </style> - {serendipity_hookPlugin hook="frontend_header"} -</head> - -<body> -{/if} - -{if $is_raw_mode != true} -<div id="rap"> -<h1 id="header"><a href="{$serendipityBaseURL}" title="{$head_title|@default:$blogTitle}: {$head_subtitle|@default:$blogDescription}">{$head_title|@default:$blogTitle}</a></h1> - -<div id="content"> - -{$CONTENT} - -</div> -{/if} - -{$raw_data} - -{if $leftSidebarElements or $rightSidebarElements} - <div id="menu"> - <ul> - {if $leftSidebarElements}{serendipity_printSidebar side="left"}{/if} - {if $rightSidebarElements}{serendipity_printSidebar side="right"}{/if} - </ul> - </div> -{/if} - -</div> - -<p class="credit"><cite>Powered by <a href="http://www.s9y.org/" title="Powered by Serendipity PHP Weblog"><strong>Serendipity</strong></a></cite></p> -{serendipity_hookPlugin hook="frontend_footer"} -{if $is_embedded != true} -</body> -</html> -{/if} diff --git a/templates/wp/info.txt b/templates/wp/info.txt deleted file mode 100644 index 6ef6ed62..00000000 --- a/templates/wp/info.txt +++ /dev/null @@ -1,4 +0,0 @@ -Name: WP-compat -Author: Evan Nemerson -Date: 20/11-2004 -Engine: yes diff --git a/templates/wp/plugin_calendar.tpl b/templates/wp/plugin_calendar.tpl deleted file mode 100644 index 7f38fc8c..00000000 --- a/templates/wp/plugin_calendar.tpl +++ /dev/null @@ -1,32 +0,0 @@ -<table id="wp-calendar"> - <caption>{$plugin_calendar_head.month_date|formatTime:"%B '%y":false}</caption> - <thead> - <tr> - <th abbr="Sunday" scope="col" title="Sunday">S</th> - <th abbr="Monday" scope="col" title="Monday">M</th> - <th abbr="Tuesday" scope="col" title="Tuesday">T</th> - <th abbr="Wednesday" scope="col" title="Wednesday">W</th> - <th abbr="Thursday" scope="col" title="Thursday">T</th> - <th abbr="Friday" scope="col" title="Friday">F</th> - <th abbr="Saturday" scope="col" title="Saturday">S</th> - </tr> - </thead> - - <tfoot> - <tr> - <td colspan="3" id="prev">{if $plugin_calendar_head.minScroll le $plugin_calendar_head.month_date}<a href="{$plugin_calendar_head.uri_previous}" title="View posts for previous month">«</a>{/if}</td> - <td class="pad"> </td> - <td colspan="3" id="next">{if $plugin_calendar_head.maxScroll ge $plugin_calendar_head.month_date}<a href="{$plugin_calendar_head.uri_next}" title="View posts for previous month">»</a>{/if}</td> - </tr> - </tfoot> - - <tbody> - {foreach from=$plugin_calendar_weeks item="week"} - <tr> - {foreach from=$week.days item="day"} - <td class="serendipity_calendarDay {$day.classes}"{if isset($day.properties.Title)} title="{$day.properties.Title}"{/if}>{if isset($day.properties.Active) and $day.properties.Active}<a href="{$day.properties.Link}">{/if}{$day.name|@default:" "}{if isset($day.properties.Active) and $day.properties.Active}</a>{/if}</td> - {/foreach} - </tr> - {/foreach} - </tbody> -</table> diff --git a/templates/wp/preview.png b/templates/wp/preview.png deleted file mode 100644 index 799120ad..00000000 Binary files a/templates/wp/preview.png and /dev/null differ diff --git a/templates/wp/sidebar.tpl b/templates/wp/sidebar.tpl deleted file mode 100644 index 6376fc3f..00000000 --- a/templates/wp/sidebar.tpl +++ /dev/null @@ -1,5 +0,0 @@ -{foreach from=$plugindata item=item} - <li id="{$item.class}">{$item.title} - {$item.content} - </li> -{/foreach} diff --git a/templates/wp/trackbacks.tpl b/templates/wp/trackbacks.tpl deleted file mode 100644 index 2a8ce998..00000000 --- a/templates/wp/trackbacks.tpl +++ /dev/null @@ -1,6 +0,0 @@ -{foreach from=$trackbacks item=trackback} - <li id="trackback-{$trackback.id}"> - <p><strong>{$trackback.title}</strong><br />{$trackback.body|@strip_tags|@escape:all}</p> - <p><cite>Trackback by <a href='{$trackback.url|@strip_tags}' rel='external'>{$trackback.author|@default:$CONST.ANONYMOUS}</a> — {$trackback.timestamp|@formatTime:$CONST.DATE_FORMAT_SHORT} @ <a href="#trackback-{$trackback.id}">{$trackback.timestamp|@formatTime:'%g:%M %a'}</a></cite> </p> - </li> -{/foreach} \ No newline at end of file diff --git a/templates/wp/wp-layout.css b/templates/wp/wp-layout.css deleted file mode 100644 index 2ba54b18..00000000 --- a/templates/wp/wp-layout.css +++ /dev/null @@ -1,145 +0,0 @@ -/* Serendipity WP default - By Evan Nemerson - December 11, 2004 - - This is just a simple template modeled after the default one. It is - meant mostly as something to collect dust while you use a custom WP - theme, but it can also be used to guide you in creating your own. - It is licensed under the BSD license, like the rest of Serendipity, - and unlike most WP themes (which are GPL). */ - -#content { - border-right: 1px dashed #000000; - border-bottom: 1px solid #000000; - border-top: 0px; - background-color: #FFFFFF; - position: absolute; - margin-right: 16em; -} - -#menu { - vertical-align: top; - background: white; - width: 16em; - position: absolute; - right: 0; -} - -#content > * { - padding: 10px; - margin: 10px; - width: auto; -} - -#menu > ul { - display: block; - list-style: none; - padding-left: 0; - margin: 1em; -} - -#menu > ul > li { - font-size: 1.2em; - font-weight: bold; - margin-bottom: 1em; - padding-bottom: 1em; - border-bottom: solid 2px #36558C; -} - -#menu > ul > li > * { - font-size: 0.83em; - font-weight: normal; -} - -body { - font-size: 10pt; - margin: 0; - font-size: 10px; - font-family: verdana, arial, helvetica, sans-serif; - margin-bottom: 30px; -} - -input, textarea { - font-size: 10pt; - font-family: verdana, arial, helvetica, sans-serif; -} - -th, td { - font-size: 10pt; -} - -p, td, th, div, span { - font-family: verdana, arial, helvetica, sans-serif; -} - -#header { - margin: auto; - width: 100%; - padding: 1em; - background-image: url(../default/img/background.png); - border-bottom: 1px solid #000000; -} - -#header a, -#header a:hover, -#header a:link, -#header a:visited { - color: #FFFFFF; - font-family: Verdana, Arial, Geneva, Helvetica, sans-serif; - text-decoration: none; -} - -h2 { - font-family: Verdana, Arial, Geneva, Helvetica, sans-serif; - font-size: large; - color: #333333; - margin: 0; - margin-top: 20px; - text-align: right; -} - -.storytitle { - font-family: Verdana, Arial, Geneva, Helvetica, sans-serif; - font-size: medium; - font-weight: bold; - margin-top: 1em; - color: #333333; - border-bottom: 2px solid #36558C; -} - -.storytitle a:link, -.storytitle a:visited { - text-decoration: none; - border: 0; - color: #000000; -} - -.meta > ul > li, ul.post-meta li { - display: inline; -} - -.meta > ul { - display: inline; - list-style: none; - margin: 0; - padding: 0; -} - -.storytitle { - margin: auto; -} - -.storytitle a:hover { - color: #FF0000; -} - -.storycontent { - font-family:Verdana, Arial, Geneva, Helvetica, sans-serif; - color: #333333; - font-size: 1.3em; - font-weight: normal; - padding-right: 10px; - width: 95%; - margin: auto; - margin-top: 1em; -} \ No newline at end of file diff --git a/tests/README b/tests/README index 0d7496ee..06d02c56 100644 --- a/tests/README +++ b/tests/README @@ -1,3 +1,21 @@ +PHPUnit +======= + + 1. In tests/, download PHPUnit + + $ wget https://phar.phpunit.de/phpunit.phar + + +Running the Tests +================= + + + $ php phpunit.phar --configuration config.xml.dist --coverage-html report include/* + + + ---- + + PHPUnit and Selenium RC ======================= diff --git a/tests/coverage/append.php b/tests/coverage/append.php index cf05a534..c43d939f 100644 --- a/tests/coverage/append.php +++ b/tests/coverage/append.php @@ -1,4 +1,8 @@ <?php +if (!isset($GLOBALS['S9Y_SELENIUM_ENABLED'])) { + die('Selenium disabled.'); +} + if ( isset($_COOKIE['PHPUNIT_SELENIUM_TEST_ID']) && !isset($_GET['PHPUNIT_SELENIUM_TEST_ID']) && extension_loaded('xdebug')) { diff --git a/tests/coverage/phpunit_coverage.php b/tests/coverage/phpunit_coverage.php index 857c5339..aeaffd4d 100644 --- a/tests/coverage/phpunit_coverage.php +++ b/tests/coverage/phpunit_coverage.php @@ -1,4 +1,8 @@ <?php +if (!isset($GLOBALS['S9Y_SELENIUM_ENABLED'])) { + die('Selenium disabled.'); +} + require_once 'PHPUnit/Util/FilterIterator.php'; if (isset($_GET['PHPUNIT_SELENIUM_TEST_ID'])) { diff --git a/tests/coverage/prepend.php b/tests/coverage/prepend.php index 453e68f6..49b36042 100644 --- a/tests/coverage/prepend.php +++ b/tests/coverage/prepend.php @@ -1,4 +1,8 @@ <?php +if (!isset($GLOBALS['S9Y_SELENIUM_ENABLED'])) { + die('Selenium disabled.'); +} + if ( isset($_COOKIE['PHPUNIT_SELENIUM_TEST_ID']) && !isset($_GET['PHPUNIT_SELENIUM_TEST_ID']) && extension_loaded('xdebug')) { diff --git a/tests/include/functionsConfigTest.php b/tests/include/functionsConfigTest.php new file mode 100644 index 00000000..52f0a509 --- /dev/null +++ b/tests/include/functionsConfigTest.php @@ -0,0 +1,33 @@ +<?php + +$serendipity['dbType'] = 'pdo-sqlite'; +define('IN_serendipity', true); +require_once dirname(__FILE__) . '/../../include/functions_config.inc.php'; + +/** + * Class functionsTest + */ +class functionsConfigTest extends PHPUnit_Framework_TestCase +{ + /** + * @test + */ + public function test_serendipity_getTemplateFile() + { + global $serendipity; + $serendipity['template'] = 'next'; + $serendipity['template_engine'] = '2k11'; + $serendipity['defaultTemplate'] = '2k11'; + $serendipity['templatePath'] = '/templates/'; + $serendipity['template_backend'] = '2k11'; + $serendipity['serendipityPath'] = realpath('../'); + $serendipity['serendipityHTTPPath'] = realpath('/'); + + $this->assertContains('next/index.tpl', serendipity_getTemplateFile('index.tpl')); + define('IN_serendipity_admin', true); + $this->assertContains('2k11/admin/index.tpl', serendipity_getTemplateFile('admin/index.tpl')); + $this->assertContains('next/index.tpl', serendipity_getTemplateFile('index.tpl', 'serendipityHTTPPath', true)); + } + + +} \ No newline at end of file diff --git a/tests/include/functionsTest.php b/tests/include/functionsTest.php index fd49b718..d20dd2cf 100644 --- a/tests/include/functionsTest.php +++ b/tests/include/functionsTest.php @@ -1,6 +1,7 @@ <?php $serendipity['dbType'] = 'pdo-sqlite'; +define('IN_serendipity', true); require_once dirname(__FILE__) . '/../../include/functions.inc.php'; /**