Inserts the DateChanger plugin and removes the second Akismet instance
This commit is contained in:
commit
d96892fc5e
@ -8,13 +8,10 @@ $fp_plugins = array(
|
|||||||
'lightbox2', // fancy usable img overlay effect, needs jquery
|
'lightbox2', // fancy usable img overlay effect, needs jquery
|
||||||
'thumb', // creates thumbnails adding scale=NN% to [img] tags :)
|
'thumb', // creates thumbnails adding scale=NN% to [img] tags :)
|
||||||
'bbcode', // bbcode-style formatting; if you disable this
|
'bbcode', // bbcode-style formatting; if you disable this
|
||||||
// you'll loose some features, but you will be able to use xhtml
|
// you'll loose some features, but you will be able to use html
|
||||||
// as a default
|
// as a default
|
||||||
// 'syntaxhighlighter',//fancy js to color code
|
|
||||||
'accessibleantispam',
|
'accessibleantispam',
|
||||||
'qspam', // quick spam filter
|
'qspam', // quick spam filter
|
||||||
// 'akismet', // powerful antispam; requires you to have a wordpress api key
|
|
||||||
// open the plugin file to set your key
|
|
||||||
'adminarea',
|
'adminarea',
|
||||||
'archives',
|
'archives',
|
||||||
// 'calendar', //time consuming, not really recommended :p
|
// 'calendar', //time consuming, not really recommended :p
|
||||||
@ -29,6 +26,8 @@ $fp_plugins = array(
|
|||||||
'favicon',
|
'favicon',
|
||||||
'commentcenter',
|
'commentcenter',
|
||||||
'mediamanager',
|
'mediamanager',
|
||||||
|
// 'datechanger' // Lets you change the publish date for (new) entries.
|
||||||
'gallerycaptions',
|
'gallerycaptions',
|
||||||
'photoswipe'
|
'photoswipe'
|
||||||
);
|
);
|
||||||
|
?>
|
||||||
|
@ -1,391 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Akismet anti-comment spam service
|
|
||||||
*
|
|
||||||
* The class in this package allows use of the {@link http://akismet.com Akismet} anti-comment spam service in any PHP5 application.
|
|
||||||
*
|
|
||||||
* This service performs a number of checks on submitted data and returns whether or not the data is likely to be spam.
|
|
||||||
*
|
|
||||||
* Please note that in order to use this class, you must have a vaild {@link http://wordpress.com/api-keys/ WordPress API key}. They are free for non/small-profit types and getting one will only take a couple of minutes.
|
|
||||||
*
|
|
||||||
* For commercial use, please {@link http://akismet.com/commercial/ visit the Akismet commercial licensing page}.
|
|
||||||
*
|
|
||||||
* Please be aware that this class is PHP5 only. Attempts to run it under PHP4 will most likely fail.
|
|
||||||
*
|
|
||||||
* See the Akismet class documentation page linked to below for usage information.
|
|
||||||
*
|
|
||||||
* @package Akismet
|
|
||||||
* @author Alex Potsides, {@link http://www.achingbrain.net http://www.achingbrain.net}, Bret Kuhns {@link http://www.miphp.net}
|
|
||||||
* @version 0.1
|
|
||||||
* @copyright Alex Potsides, {@link http://www.achingbrain.net http://www.achingbrain.net}
|
|
||||||
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The Akismet PHP4 Class
|
|
||||||
*
|
|
||||||
* This class takes the functionality from the Akismet WordPress plugin written by {@link http://photomatt.net/ Matt Mullenweg} and allows it to be integrated into any PHP5 application or website.
|
|
||||||
*
|
|
||||||
* The original plugin is {@link http://akismet.com/download/ available on the Akismet website}.
|
|
||||||
*
|
|
||||||
* <b>Usage:</b>
|
|
||||||
* <code>
|
|
||||||
* $akismet = new Akismet('http://www.example.com/blog/', 'aoeu1aoue');
|
|
||||||
* $akismet->setCommentAuthor($name);
|
|
||||||
* $akismet->setCommentAuthorEmail($email);
|
|
||||||
* $akismet->setCommentAuthorURL($url);
|
|
||||||
* $akismet->setCommentContent($comment);
|
|
||||||
* $akismet->setPermalink('http://www.example.com/blog/alex/someurl/');
|
|
||||||
* if($akismet->isCommentSpam())
|
|
||||||
* // store the comment but mark it as spam (in case of a mis-diagnosis)
|
|
||||||
* else
|
|
||||||
* // store the comment normally
|
|
||||||
* </code>
|
|
||||||
*
|
|
||||||
* @package akismet
|
|
||||||
* @name Akismet
|
|
||||||
* @version 0.2
|
|
||||||
* @author Alex Potsides (converted to PHP4 by Bret Kuhns)
|
|
||||||
* @link http://www.achingbrain.net/
|
|
||||||
*/
|
|
||||||
class Akismet {
|
|
||||||
|
|
||||||
var $version = '0.2';
|
|
||||||
|
|
||||||
var $wordPressAPIKey;
|
|
||||||
|
|
||||||
var $blogURL;
|
|
||||||
|
|
||||||
var $comment;
|
|
||||||
|
|
||||||
var $apiPort;
|
|
||||||
|
|
||||||
var $akismetServer;
|
|
||||||
|
|
||||||
var $akismetVersion;
|
|
||||||
|
|
||||||
// This prevents some potentially sensitive information from being sent accross the wire.
|
|
||||||
var $ignore = array(
|
|
||||||
'HTTP_COOKIE',
|
|
||||||
'HTTP_X_FORWARDED_FOR',
|
|
||||||
'HTTP_X_FORWARDED_HOST',
|
|
||||||
'HTTP_MAX_FORWARDS',
|
|
||||||
'HTTP_X_FORWARDED_SERVER',
|
|
||||||
'REDIRECT_STATUS',
|
|
||||||
'SERVER_PORT',
|
|
||||||
'PATH',
|
|
||||||
'DOCUMENT_ROOT',
|
|
||||||
'SERVER_ADMIN',
|
|
||||||
'QUERY_STRING',
|
|
||||||
'PHP_SELF'
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @throws Exception An exception is thrown if your API key is invalid.
|
|
||||||
* @param
|
|
||||||
* string Your WordPress API key.
|
|
||||||
* @param string $blogURL
|
|
||||||
* The URL of your blog.
|
|
||||||
*/
|
|
||||||
function __construct($blogURL, $wordPressAPIKey) {
|
|
||||||
$this->blogURL = $blogURL;
|
|
||||||
$this->wordPressAPIKey = $wordPressAPIKey;
|
|
||||||
|
|
||||||
// Set some default values
|
|
||||||
$this->apiPort = 80;
|
|
||||||
$this->akismetServer = 'rest.akismet.com';
|
|
||||||
$this->akismetVersion = '1.1';
|
|
||||||
|
|
||||||
// Start to populate the comment data
|
|
||||||
$this->comment ['blog'] = $blogURL;
|
|
||||||
$this->comment ['user_agent'] = $_SERVER ['HTTP_USER_AGENT'];
|
|
||||||
$this->comment ['referrer'] = $_SERVER ['HTTP_REFERER'];
|
|
||||||
|
|
||||||
// This is necessary if the server PHP5 is running on has been set up to run PHP4 and
|
|
||||||
// PHP5 concurently and is actually running through a separate proxy al a these instructions:
|
|
||||||
// http://www.schlitt.info/applications/blog/archives/83_How_to_run_PHP4_and_PHP_5_parallel.html
|
|
||||||
// and http://wiki.coggeshall.org/37.html
|
|
||||||
// Otherwise the user_ip appears as the IP address of the PHP4 server passing the requests to the
|
|
||||||
// PHP5 one...
|
|
||||||
$this->comment ['user_ip'] = $_SERVER ['REMOTE_ADDR'] != getenv('SERVER_ADDR') ? $_SERVER ['REMOTE_ADDR'] : getenv('HTTP_X_FORWARDED_FOR');
|
|
||||||
|
|
||||||
// Check to see if the key is valid
|
|
||||||
$response = $this->http_post('key=' . $this->wordPressAPIKey . '&blog=' . $this->blogURL, $this->akismetServer, '/' . $this->akismetVersion . '/verify-key');
|
|
||||||
|
|
||||||
if ($response [1] != 'valid') {
|
|
||||||
// Whoops, no it's not. Throw an exception as we can't proceed without a valid API key.
|
|
||||||
trigger_error('Invalid API key. Please obtain one from http://wordpress.com/api-keys/', E_USER_ERROR);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function http_post($request, $host, $path) {
|
|
||||||
$http_request = "POST " . $path . " HTTP/1.0\r\n" . //
|
|
||||||
"Host: " . $host . "\r\n" . //
|
|
||||||
"Content-Type: application/x-www-form-urlencoded; charset=utf-8\r\n" . //
|
|
||||||
"Content-Length: " . strlen($request) . "\r\n" . //
|
|
||||||
"User-Agent: Akismet PHP5 Class " . $this->version . " | Akismet/1.11\r\n" . //
|
|
||||||
"\r\n" . //
|
|
||||||
$request;
|
|
||||||
|
|
||||||
$socketWriteRead = new SocketWriteRead($host, $this->apiPort, $http_request);
|
|
||||||
$socketWriteRead->send();
|
|
||||||
|
|
||||||
return explode("\r\n\r\n", $socketWriteRead->getResponse(), 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Formats the data for transmission echo $sql;
|
|
||||||
function getQueryString() {
|
|
||||||
foreach ($_SERVER as $key => $value) {
|
|
||||||
if (!in_array($key, $this->ignore)) {
|
|
||||||
if ($key == 'REMOTE_ADDR') {
|
|
||||||
$this->comment [$key] = $this->comment ['user_ip'];
|
|
||||||
} else {
|
|
||||||
$this->comment [$key] = $value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$query_string = '';
|
|
||||||
|
|
||||||
foreach ($this->comment as $key => $data) {
|
|
||||||
|
|
||||||
@$query_string .= $key . '=' . urlencode(stripslashes($data)) . '&';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $query_string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tests for spam.
|
|
||||||
*
|
|
||||||
* Uses the web service provided by {@link http://www.akismet.com Akismet} to see whether or not the submitted comment is spam. Returns a boolean value.
|
|
||||||
*
|
|
||||||
* @return bool True if the comment is spam, false if not
|
|
||||||
*/
|
|
||||||
function isSpam() {
|
|
||||||
$response = $this->http_post($this->getQueryString(), $this->wordPressAPIKey . '.rest.akismet.com', '/' . $this->akismetVersion . '/comment-check');
|
|
||||||
|
|
||||||
return ($response [1] == 'true');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Submit spam that is incorrectly tagged as ham.
|
|
||||||
*
|
|
||||||
* Using this function will make you a good citizen as it helps Akismet to learn from its mistakes. This will improve the service for everybody.
|
|
||||||
*/
|
|
||||||
function submitSpam() {
|
|
||||||
$this->http_post($this->getQueryString(), $this->wordPressAPIKey . '.' . $this->akismetServer, '/' . $this->akismetVersion . '/submit-spam');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Submit ham that is incorrectly tagged as spam.
|
|
||||||
*
|
|
||||||
* Using this function will make you a good citizen as it helps Akismet to learn from its mistakes. This will improve the service for everybody.
|
|
||||||
*/
|
|
||||||
function submitHam() {
|
|
||||||
$this->http_post($this->getQueryString(), $this->wordPressAPIKey . '.' . $this->akismetServer, '/' . $this->akismetVersion . '/submit-ham');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* To override the user IP address when submitting spam/ham later on
|
|
||||||
*
|
|
||||||
* @param string $userip
|
|
||||||
* An IP address. Optional.
|
|
||||||
*/
|
|
||||||
function setUserIP($userip) {
|
|
||||||
$this->comment ['user_ip'] = $userip;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* To override the referring page when submitting spam/ham later on
|
|
||||||
*
|
|
||||||
* @param string $referrer
|
|
||||||
* The referring page. Optional.
|
|
||||||
*/
|
|
||||||
function setReferrer($referrer) {
|
|
||||||
$this->comment ['referrer'] = $referrer;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A permanent URL referencing the blog post the comment was submitted to.
|
|
||||||
*
|
|
||||||
* @param string $permalink
|
|
||||||
* The URL. Optional.
|
|
||||||
*/
|
|
||||||
function setPermalink($permalink) {
|
|
||||||
$this->comment ['permalink'] = $permalink;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The type of comment being submitted.
|
|
||||||
*
|
|
||||||
* May be blank, comment, trackback, pingback, or a made up value like "registration" or "wiki".
|
|
||||||
*/
|
|
||||||
function setType($commentType) {
|
|
||||||
$this->comment ['comment_type'] = $commentType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The name that the author submitted with the comment.
|
|
||||||
*/
|
|
||||||
function setAuthor($commentAuthor) {
|
|
||||||
$this->comment ['comment_author'] = $commentAuthor;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The email address that the author submitted with the comment.
|
|
||||||
*
|
|
||||||
* The address is assumed to be valid.
|
|
||||||
*/
|
|
||||||
function setAuthorEmail($authorEmail) {
|
|
||||||
$this->comment ['comment_author_email'] = $authorEmail;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The URL that the author submitted with the comment.
|
|
||||||
*/
|
|
||||||
function setAuthorURL($authorURL) {
|
|
||||||
$this->comment ['comment_author_url'] = $authorURL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The comment's body text.
|
|
||||||
*/
|
|
||||||
function setContent($commentBody) {
|
|
||||||
$this->comment ['comment_content'] = $commentBody;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Defaults to 80
|
|
||||||
*/
|
|
||||||
function setAPIPort($apiPort) {
|
|
||||||
$this->apiPort = $apiPort;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Defaults to rest.akismet.com
|
|
||||||
*/
|
|
||||||
function setAkismetServer($akismetServer) {
|
|
||||||
$this->akismetServer = $akismetServer;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Defaults to '1.1'
|
|
||||||
*/
|
|
||||||
function setAkismetVersion($akismetVersion) {
|
|
||||||
$this->akismetVersion = $akismetVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Utility class used by Akismet
|
|
||||||
*
|
|
||||||
* This class is used by Akismet to do the actual sending and receiving of data. It opens a connection to a remote host, sends some data and the reads the response and makes it available to the calling program.
|
|
||||||
*
|
|
||||||
* The code that makes up this class originates in the Akismet WordPress plugin, which is {@link http://akismet.com/download/ available on the Akismet website}.
|
|
||||||
*
|
|
||||||
* N.B. It is not necessary to call this class directly to use the Akismet class. This is included here mainly out of a sense of completeness.
|
|
||||||
*
|
|
||||||
* @package akismet
|
|
||||||
* @name SocketWriteRead
|
|
||||||
* @version 0.1
|
|
||||||
* @author Alex Potsides
|
|
||||||
* @link http://www.achingbrain.net/
|
|
||||||
*/
|
|
||||||
class SocketWriteRead {
|
|
||||||
|
|
||||||
var $host;
|
|
||||||
|
|
||||||
var $port;
|
|
||||||
|
|
||||||
var $request;
|
|
||||||
|
|
||||||
var $response;
|
|
||||||
|
|
||||||
var $responseLength;
|
|
||||||
|
|
||||||
var $errorNumber;
|
|
||||||
|
|
||||||
var $errorString;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param string $host
|
|
||||||
* The host to send/receive data.
|
|
||||||
* @param int $port
|
|
||||||
* The port on the remote host.
|
|
||||||
* @param string $request
|
|
||||||
* The data to send.
|
|
||||||
* @param int $responseLength
|
|
||||||
* The amount of data to read. Defaults to 1160 bytes.
|
|
||||||
*/
|
|
||||||
function __construct($host, $port, $request, $responseLength = 1160) {
|
|
||||||
$this->host = $host;
|
|
||||||
$this->port = $port;
|
|
||||||
$this->request = $request;
|
|
||||||
$this->responseLength = $responseLength;
|
|
||||||
$this->errorNumber = 0;
|
|
||||||
$this->errorString = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends the data to the remote host.
|
|
||||||
*
|
|
||||||
* @throws An exception is thrown if a connection cannot be made to the remote host.
|
|
||||||
*/
|
|
||||||
function send() {
|
|
||||||
$this->response = '';
|
|
||||||
|
|
||||||
$fs = fsockopen($this->host, $this->port, $this->errorNumber, $this->errorString, AKISMET_TIMEOUT);
|
|
||||||
|
|
||||||
if ($this->errorNumber != 0) {
|
|
||||||
trigger_error('Error connecting to host: ' . $this->host . ' Error number: ' . $this->errorNumber . ' Error message: ' . $this->errorString, E_USER_ERROR);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($fs !== false) {
|
|
||||||
@fwrite($fs, $this->request);
|
|
||||||
|
|
||||||
while (!feof($fs)) {
|
|
||||||
$this->response .= fgets($fs, $this->responseLength);
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose($fs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the server response text
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function getResponse() {
|
|
||||||
return $this->response;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the error number
|
|
||||||
*
|
|
||||||
* If there was no error, 0 will be returned.
|
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
function getErrorNumber() {
|
|
||||||
return $this->errorNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the error string
|
|
||||||
*
|
|
||||||
* If there was no error, an empty string will be returned.
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function getErrorString() {
|
|
||||||
return $this->errorString;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
?>
|
|
@ -1,24 +0,0 @@
|
|||||||
<?php
|
|
||||||
$lang ['plugin'] ['akismet'] ['errors'] = array (
|
|
||||||
-1 => 'Kľíč API není nastavený. Otevřte plugin a nastavte klíč API. Zaregistrujte sa na <a href="https://akismet.com/signup/" target="_blank">akismet.com</a> a získejte nějaký.'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['submenu'] ['akismet'] = 'Nastavení Akismet';
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] = array(
|
|
||||||
'head' => 'Nastavení Akismet',
|
|
||||||
'description '=> 'Většině uživatelům, <a href="https://akismet.com/" target="_blank">Akismet</a> výrazně znižuje ' . //
|
|
||||||
'nebo úplně eliminuje spam v komentářích a trackbacky na stránkách. ' . //
|
|
||||||
'Pokud ještě nemáte účet na akismet.com, založte si ho ' . //
|
|
||||||
'<a href="https://akismet.com/signup/" target="_blank">akismet.com/signup<a>.',
|
|
||||||
'apikey' => 'akismet.com API klíč',
|
|
||||||
'whatis' => '(<a href="https://akismet.com/support/getting-started/api-key/" target="_blank">Co to je?</a>)',
|
|
||||||
'submit' => 'Uložit klíč API'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang['admin']['plugin']['akismet']['msgs'] = array(
|
|
||||||
1 => 'Klíč API uložený',
|
|
||||||
-1 => 'Klíč API je neplatný'
|
|
||||||
);
|
|
||||||
|
|
||||||
?>
|
|
@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
$lang ['plugin'] ['akismet'] ['errors'] = array (
|
|
||||||
-1 => 'Ingen API-nøgle tilgængelig, indtast venligst denne for pluginet eller gå til <a href="https://akismet.com/signup/" target="_blank">akismet.com</a> for at anmode om en gyldig API-nøgle ved at registrere dig.'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['submenu'] ['akismet'] = 'Akismet Konfiguration';
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] = array(
|
|
||||||
'head' => 'Akismet Konfiguration',
|
|
||||||
'description' => 'Med <a href="https://akismet.com/" target="_blank">Akismet</a> kan du reducere eller helt fjerne spam, ' . //
|
|
||||||
'der når denne blog via kommentarer eller trackbacks. ' . //
|
|
||||||
'Hvis du ikke har en Wordpress.com-konto endnu, kan du oprette en på ' . //
|
|
||||||
'<a href="https://akismet.com/signup/" target="_blank">akismet.com/signup<a> for at anmode om en API-nøgle.',
|
|
||||||
'apikey' => 'Akismet API-nøgle',
|
|
||||||
'whatis' => '(<a href="https://akismet.com/support/getting-started/api-key/" target="_blank">Hvad er en API-nøgle?</a>)',
|
|
||||||
'submit' => 'Gem API-nøgle'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] ['msgs'] = array(
|
|
||||||
1 => 'API-nøglen er blevet gemt',
|
|
||||||
-1 => 'API-nøglen er ikke gyldig'
|
|
||||||
);
|
|
||||||
?>
|
|
@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
$lang ['plugin'] ['akismet'] ['errors'] = array (
|
|
||||||
-1 => 'Kein API Key vorhanden, bitte diesen für das Plugin eintragen oder auf <a href="https://akismet.com/signup/" target="_blank">akismet.com</a> einen gültigen API Key durch Registrierung beantragen.'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['submenu'] ['akismet'] = 'Akismet Konfiguration';
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] = array(
|
|
||||||
'head' => 'Akismet Konfiguration',
|
|
||||||
'description'=>'Mit <a href="https://akismet.com/" target="_blank">Akismet</a> kann man Spam reduzieren ' . //
|
|
||||||
'oder komplett eliminieren der durch Kommentare oder Trackbacks dieses Blog erreicht. ' . //
|
|
||||||
'Wenn bis jetzt noch kein Akismet Account existiert, so kann man auf ' . //
|
|
||||||
'<a href="https://akismet.com/signup/" target="_blank">akismet.com/signup<a> einen anlegen um einen API key zu beantragen.',
|
|
||||||
'apikey' => 'Akismet API Key',
|
|
||||||
'whatis' => '(<a href="https://akismet.com/support/getting-started/api-key/" target="_blank">Was ist ein API Key?</a>)',
|
|
||||||
'submit' => 'API key speichern'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] ['msgs'] = array(
|
|
||||||
1 => 'Der API key wurde gespeichert',
|
|
||||||
-1 => 'Der API key ist nicht gültig'
|
|
||||||
);
|
|
||||||
?>
|
|
@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
$lang ['plugin'] ['akismet'] ['errors'] = array (
|
|
||||||
-1 => 'Δεν έχει οριστεί κλειδί API. Ανοίξτε το πρόσθετο για να ρυθμίσετε το API κλειδί σας. Εγγραφείτε στο <a href="https://akismet.com/signup/" target="_blank">akismet.com</a> για να λάβετε ένα.'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['submenu'] ['akismet'] = 'Ρύθμιση του Akismet';
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] = array(
|
|
||||||
'head' => 'Ρύθμιση του Akismet',
|
|
||||||
'description' => 'Για πολλούς ανθρώπους, το <a href="https://akismet.com/" target="_blank">Akismet</a> θα μειώσει αξιοσημείωτα ' . //
|
|
||||||
'ή ακόμη και θα εξαλείψει πλήρως τα κακόβουλα αυτοματοποιημένα μηνύματα που δέχεται η ιστοσελίδα. ' . //
|
|
||||||
'Εάν δεν έχετε ακόμη έναν λογαριασμό akismet.com, μπορείτε να δημιουργήσετε έναν στο ' . //
|
|
||||||
'<a href="https://akismet.com/signup/" target="_blank">akismet.com/signup<a>.',
|
|
||||||
'apikey' => 'Akismet κλειδί API',
|
|
||||||
'whatis' => '(<a href="https://akismet.com/support/getting-started/api-key/" target="_blank">Τι είναι αυτό;</a>)',
|
|
||||||
'submit' => 'Αποθήκευση κλειδιού API'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] ['msgs'] = array(
|
|
||||||
1 => 'Το κλειδί API αποθηκεύτηκε',
|
|
||||||
-1 => 'Το κλειδί API δεν είναι έγκυρο'
|
|
||||||
);
|
|
||||||
?>
|
|
@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
$lang ['plugin'] ['akismet'] ['errors'] = array (
|
|
||||||
-1 => 'API key not set. Open the plugin to set your API key. Register on <a href="https://akismet.com/signup/" target="_blank">akismet.com</a> to get one.'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['submenu'] ['akismet'] = 'Akismet Config';
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] = array(
|
|
||||||
'head' => 'Akismet Configuration',
|
|
||||||
'description' => 'For many people, <a href="https://akismet.com/" target="_blank">Akismet</a> will greatly reduce ' . //
|
|
||||||
'or even completely eliminate the comment and trackback spam you get on your site. ' . //
|
|
||||||
'If you don\'t have a akismet.com account yet, you can get one at ' . //
|
|
||||||
'<a href="https://akismet.com/signup/" target="_blank">akismet.com/signup<a>.',
|
|
||||||
'apikey' => 'Akismet API Key',
|
|
||||||
'whatis' => '(<a href="https://akismet.com/support/getting-started/api-key/" target="_blank">What is an API key?</a>)',
|
|
||||||
'submit' => 'Save API key'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] ['msgs'] = array(
|
|
||||||
1 => 'API key saved',
|
|
||||||
-1 => 'API key is not valid'
|
|
||||||
);
|
|
||||||
?>
|
|
@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
$lang ['plugin'] ['akismet'] ['errors'] = array (
|
|
||||||
-1 => 'No se estableció la clave de API. Abra el Plugin para configurar su clave de API. Registrarse en <a href="https://akismet.com/signup/" target="_blank">akismet.com</a> para conseguir uno.'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['submenu'] ['akismet'] = 'Configuración de Akismet';
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] = array(
|
|
||||||
'head' => 'Configuración de Akismet',
|
|
||||||
'description' => 'Para muchas personas, <a href="https://akismet.com/" target="_blank">Akismet</a> reducirá en gran medida ' . //
|
|
||||||
'o incluso eliminar por completo el spam de comentarios y trackback que recibe en su sitio. ' . //
|
|
||||||
'Si aún no tiene una cuenta de akismet.com, puede obtener una en ' . //
|
|
||||||
'<a href="https://akismet.com/signup/" target="_blank">akismet.com/signup<a>.',
|
|
||||||
'apikey' => 'Akismet API Key',
|
|
||||||
'whatis' => '(<a href="https://akismet.com/support/getting-started/api-key/" target="_blank">¿Que es esto?</a>)',
|
|
||||||
'submit' => 'Guardar clave de API'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] ['msgs'] = array(
|
|
||||||
1 => 'Clave de API guardada',
|
|
||||||
-1 => 'La clave de API no es válida'
|
|
||||||
);
|
|
||||||
?>
|
|
@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
$lang ['plugin'] ['akismet'] ['errors'] = array (
|
|
||||||
-1 => 'Clef API non définie. Configurez le plugin afin de configurer la clef API. Enregistrez vous sur <a href="https://akismet.com/signup/" target="_blank">akismet.com</a> pour en obtenir une.'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['submenu'] ['akismet'] = 'Configuration Akismet';
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] = array(
|
|
||||||
'head' => 'Configuration Akismet',
|
|
||||||
'description' => 'La plupart du temps, <a href="https://akismet.com/" target="_blank">Akismet</a> va grandement ' . //
|
|
||||||
'ou complètement éliminer les commentaires indésirables sur votre blog. ' . //
|
|
||||||
'Si vous n\'avez pas de compte sur akismet.com, vous pouvez vous en créer un sur ' . //
|
|
||||||
'<a href="https://akismet.com/signup/" target="_blank">akismet.com/signup<a>.',
|
|
||||||
'apikey' => 'Clef API akismet.com',
|
|
||||||
'whatis' => '(<a href="https://akismet.com/support/getting-started/api-key/" target="_blank">Qu\'est-ce que c\'est?</a>)',
|
|
||||||
'submit' => 'Sauvegarder'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet']['msgs'] = array(
|
|
||||||
1 => 'Clef API sauvegardée',
|
|
||||||
-1 => 'Clef API non valide'
|
|
||||||
);
|
|
||||||
?>
|
|
@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
$lang ['plugin'] ['akismet'] ['errors'] = array (
|
|
||||||
-1 => 'La chiave API non è stata impostata. Esegui il plugin per impostare la chiave API. Registrati su <a href="https://akismet.com/signup/" target="_blank">akismet.com</a> per riceverne una.'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['submenu'] ['akismet'] = 'Configurazione di Akismet';
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] = array(
|
|
||||||
'head' => 'Configurazione di Akismet',
|
|
||||||
'description' => 'Per molte persone, <a href="https://akismet.com/" target="_blank">Akismet</a> riduce enormemente ' . //
|
|
||||||
'o perfino elimina completamente i commenti e i collegamenti traccianti di spam che compaiono sul proprio sito. ' . //
|
|
||||||
'Se non hai ancora un profilo su akismet.com, puoi crearne uno su ' . //
|
|
||||||
'<a href="https://akismet.com/signup/" target="_blank">akismet.com/signup</a>.',
|
|
||||||
'apikey' => 'Chiave API di akismet.com',
|
|
||||||
'whatis' => '(<a href="https://akismet.com/support/getting-started/api-key/" target="_blank">What is this?</a>)',
|
|
||||||
'submit' => 'Salva chiave API'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] ['msgs'] = array(
|
|
||||||
1 => 'Chiave API salvata',
|
|
||||||
-1 => 'La chiave API non è valida'
|
|
||||||
);
|
|
||||||
?>
|
|
@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
$lang ['plugin'] ['akismet'] ['errors'] = array (
|
|
||||||
-1 => 'API key not set. Open the plugin to set your API key. Register on <a href="https://akismet.com/signup/" target="_blank">akismet.com</a> to get one.'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['submenu'] ['akismet'] = 'Akismetの設定';
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] = array(
|
|
||||||
'head' => 'Akismetの設定',
|
|
||||||
'description' => 'For many people, <a href="https://akismet.com/" target="_blank">Akismet</a> will greatly reduce ' . //
|
|
||||||
'or even completely eliminate the comment and trackback spam you get on your site. ' . //
|
|
||||||
'If you don\'t have a akismet.com account yet, you can get one at ' . //
|
|
||||||
'<a href="https://akismet.com/signup/" target="_blank">akismet.com/signup<a>.',
|
|
||||||
'apikey' => 'Akismet API Key',
|
|
||||||
'whatis' => '(<a href="https://akismet.com/support/getting-started/api-key/" target="_blank">What is this?</a>)',
|
|
||||||
'submit' => 'API keyを保存する'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] ['msgs'] = array(
|
|
||||||
1 => 'API keyを保存しました',
|
|
||||||
-1 => 'API key is not valid'
|
|
||||||
);
|
|
||||||
?>
|
|
@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
$lang ['plugin'] ['akismet'] ['errors'] = array (
|
|
||||||
-1 => 'API-sleutel niet ingesteld. Open de plug-in om jouw API-sleutel in te stellen. Registreer op <a href="https://akismet.com/signup/" target="_blank">akismet.com</a> om een te krijgen.'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['submenu'] ['akismet'] = 'Akismet Configuratie';
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] = array(
|
|
||||||
'head' => 'Akismet Configuratie',
|
|
||||||
'description' => 'Voor veel mensen, <a href="https://akismet.com/" target="_blank">Akismet</a> zal sterk verminderen ' . //
|
|
||||||
'of zelfs compleet elimineren de opmerkingen en trackback spam die je krijgy op je site. ' . //
|
|
||||||
'Als je nog geen akismet.com-account hebt, kun je er een krijgen op ' . //
|
|
||||||
'<a href="https://akismet.com/signup/" target="_blank">akismet.com/signup<a>.',
|
|
||||||
'apikey' => 'Akismet API Key',
|
|
||||||
'whatis' => '(<a href="https://akismet.com/support/getting-started/api-key/" target="_blank">wat is dit?</a>)',
|
|
||||||
'submit' => 'Sla API key op'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] ['msgs'] = array(
|
|
||||||
1 => 'API key opgeslagen',
|
|
||||||
-1 => 'API key is niet geldig'
|
|
||||||
);
|
|
||||||
?>
|
|
@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
$lang ['plugin'] ['akismet'] ['errors'] = array (
|
|
||||||
-1 => 'Chave da API não definida. Abra o plugin para definir sua chave de API. Registre-se no <a href="https://akismet.com/signup/" target="_blank">akismet.com</a> para obter uma.'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['submenu'] ['akismet'] = 'Akismet Configuração';
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] = array(
|
|
||||||
'head' => 'Configure o Akismet',
|
|
||||||
'description' => 'Para muitas pessoas, o <a href="https://akismet.com/" target="_blank">Akismet</a> reduzirá bastante ' . //
|
|
||||||
'ou até eliminará completamente o comentário e o spam de trackback que você recebe no seu site.' . //
|
|
||||||
'Se você ainda não possui uma conta no akismet.com, pode obtê-la em ' . //
|
|
||||||
'<a href="https://akismet.com/signup/" target="_blank">akismet.com/signup</a>.',
|
|
||||||
'apikey' => 'Akismet API Key',
|
|
||||||
'whatis' => '(<a href="https://akismet.com/support/getting-started/api-key/" target="_blank">O que é isso?</a>)',
|
|
||||||
'submit' => 'Salvar a chave da API'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] ['msgs'] = array(
|
|
||||||
1 => 'A chave da API foi salva',
|
|
||||||
-1 => 'A chave da API não é válida'
|
|
||||||
);
|
|
||||||
?>
|
|
@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
$lang ['plugin'] ['akismet'] ['errors'] = array (
|
|
||||||
-1 => 'Не установлен API-ключ. Откройте плагин для установки API-ключа. Зарегистрируйтесь на сайте <a href="https://akismet.com/signup/" target="_blank">akismet.com</a> чтобы получить его.'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['submenu'] ['akismet'] = 'Конфигурация плагина Akismet';
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] = array(
|
|
||||||
'head' => 'Конфигурация плагина Akismet',
|
|
||||||
'description' => 'Для многих <a href="https://akismet.com/">Akismet</a> значительно уменьшит ' . //
|
|
||||||
'или даже полностью устранит спам в комментариях и трекбэках, который вы получаете на своем сайте. ' . //
|
|
||||||
'Если у вас еще нет учетной записи akismet.com, вы можете получить ее на сайте ' . //
|
|
||||||
'<a href="https://akismet.com/signup/" target="_blank">akismet.com/signup</a>.',
|
|
||||||
'apikey' => 'akismet.com API Key',
|
|
||||||
'whatis' => '(<a href="https://akismet.com/support/getting-started/api-key/" target="_blank">Что это?</a>)',
|
|
||||||
'submit' => 'Сохранить API-ключ'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] ['msgs'] = array(
|
|
||||||
1 => 'API-ключ сохранен',
|
|
||||||
-1 => 'API-ключ не действителен'
|
|
||||||
);
|
|
||||||
?>
|
|
@ -1,22 +0,0 @@
|
|||||||
<?php
|
|
||||||
$lang ['plugin'] ['akismet'] ['errors'] = array (
|
|
||||||
-1 => 'API ključ ni nastavljen. Odpri vtičnik in nastavi svoj API ključ. Registriraj se na <a href="https://akismet.com/signup/" target="_blank">akismet.com</a>, da ga pridobiš.'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['submenu'] ['akismet'] = 'Nastavitve Akismet-a';
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] = array(
|
|
||||||
'head' => 'Nastavitve Akismet-a',
|
|
||||||
'description' => 'Za veliko ljudi bo <a href="https://akismet.com/" target="_blank">Akismet</a> zelo zmanjšal ali celo popolnoma odpravil komentarje in sledenje spamu na vaši spletni strani. ' . //
|
|
||||||
'Če še nimate akismet.com računa, si ga lahko pridobite na ' .
|
|
||||||
'<a href="https://akismet.com/signup/" target="_blank">akismet.com/signup<a>.',
|
|
||||||
'apikey' => 'Akismet API Ključ',
|
|
||||||
'whatis' => '(<a href="https://akismet.com/support/getting-started/api-key/" target="_blank">Kaj je to?</a>)',
|
|
||||||
'submit' => 'Shrani API ključ'
|
|
||||||
);
|
|
||||||
|
|
||||||
$lang ['admin'] ['plugin'] ['akismet'] ['msgs'] = array(
|
|
||||||
1 => 'API ključ je bil shranjen',
|
|
||||||
-1 => 'API ključ ni veljaven'
|
|
||||||
);
|
|
||||||
?>
|
|
@ -1,84 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*
|
|
||||||
* Plugin Name: Akismet
|
|
||||||
* Plugin URI: https://www.flatpress.org
|
|
||||||
* Author: FlatPress
|
|
||||||
* Author URI: https://www.flatpress.org
|
|
||||||
* Description: Integration with Akismet powerful Antispam system. Part of the standard distribution.
|
|
||||||
* Version: 1.0
|
|
||||||
*/
|
|
||||||
define('AKISMET_TIMEOUT', 10);
|
|
||||||
|
|
||||||
require plugin_getdir('akismet') . '/inc/Akismet.class.php';
|
|
||||||
|
|
||||||
function plugin_akismet_setup() {
|
|
||||||
global $fp_config;
|
|
||||||
|
|
||||||
if (!plugin_getoptions('akismet', 'apikey')) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (plugin_getoptions('akismet', 'apikey')) {
|
|
||||||
add_filter('comment_validate', 'plugin_akismet_validate', 10, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
function plugin_akismet_validate($bool, $contents) {
|
|
||||||
if (!$bool)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
global $fp_config;
|
|
||||||
|
|
||||||
$akismet = new Akismet($fp_config ['general'] ['www'], plugin_getoptions('akismet', 'apikey'));
|
|
||||||
$akismet->setAuthor($contents ['name']);
|
|
||||||
$akismet->setAuthorEmail(isset($contents ['email']) ? $contents ['email'] : '');
|
|
||||||
$akismet->setAuthorURL(isset($contents ['url']) ? $contents ['url'] : '');
|
|
||||||
$akismet->setContent($contents ['content']);
|
|
||||||
|
|
||||||
if ($v = $akismet->isSpam()) {
|
|
||||||
global $smarty;
|
|
||||||
$smarty->assign('error', array(
|
|
||||||
'ERROR: Comment is invalid'
|
|
||||||
));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (class_exists('AdminPanelAction')) {
|
|
||||||
|
|
||||||
class admin_plugin_akismet extends AdminPanelAction {
|
|
||||||
|
|
||||||
var $langres = 'plugin:akismet';
|
|
||||||
|
|
||||||
function setup() {
|
|
||||||
$this->smarty->assign('admin_resource', "plugin:akismet/admin.plugin.akismet");
|
|
||||||
}
|
|
||||||
|
|
||||||
function main() {
|
|
||||||
$akismetconf = plugin_getoptions('akismet');
|
|
||||||
$this->smarty->assign('akismetconf', $akismetconf);
|
|
||||||
}
|
|
||||||
|
|
||||||
function onsubmit($data = null) {
|
|
||||||
global $fp_config;
|
|
||||||
|
|
||||||
if ($_POST ['wp-apikey']) {
|
|
||||||
|
|
||||||
plugin_addoption('akismet', 'apikey', $_POST ['wp-apikey']);
|
|
||||||
plugin_saveoptions('akismet');
|
|
||||||
|
|
||||||
$this->smarty->assign('success', 1);
|
|
||||||
} else {
|
|
||||||
$this->smarty->assign('success', -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
admin_addpanelaction('plugin', 'akismet', true);
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
<h2>{$plang.head}</h2>
|
|
||||||
<p>{$plang.description}</p>
|
|
||||||
|
|
||||||
{include file="shared:errorlist.tpl"}
|
|
||||||
|
|
||||||
<div style="margin: 0 auto; width: 20em;">
|
|
||||||
|
|
||||||
{html_form}
|
|
||||||
|
|
||||||
<h4><label for="wp-apikey">{$plang.apikey}</label></h4>
|
|
||||||
<p><input id="wp-apikey" type="text" name="wp-apikey" value="{$akismetconf.apikey|default:''}" />
|
|
||||||
<input type="submit" value="{$plang.submit}"/> </p>
|
|
||||||
<p> {$plang.whatis} </p>
|
|
||||||
|
|
||||||
{/html_form}
|
|
||||||
|
|
||||||
</div>
|
|
9
fp-plugins/datechanger/doc_datechanger.txt
Normal file
9
fp-plugins/datechanger/doc_datechanger.txt
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
Description
|
||||||
|
-----------
|
||||||
|
Lets you change the publish date for (new) entries. Therefore, it adds the edit interface with a date drop down menu.
|
||||||
|
|
||||||
|
This plugin only works for new entries. Once published, the date cannot be changed again!
|
||||||
|
|
||||||
|
About
|
||||||
|
-----
|
||||||
|
The DateChanger plugin was built by Edoardo Vacchi (NoWhereMan).
|
7
fp-plugins/datechanger/lang/lang.cs-cz.php
Normal file
7
fp-plugins/datechanger/lang/lang.cs-cz.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
$lang ['admin'] ['plugin'] ['datechanger'] = array(
|
||||||
|
'title' => 'Změna času/datumu zveřejnění',
|
||||||
|
'date' => 'Datum',
|
||||||
|
'time' => 'Denní doba'
|
||||||
|
);
|
||||||
|
?>
|
7
fp-plugins/datechanger/lang/lang.da-dk.php
Normal file
7
fp-plugins/datechanger/lang/lang.da-dk.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
$lang ['admin'] ['plugin'] ['datechanger'] = array(
|
||||||
|
'title' => 'Ændre udgivelsestidspunkt/dato',
|
||||||
|
'date' => 'Dato',
|
||||||
|
'time' => 'Tid på dagen'
|
||||||
|
);
|
||||||
|
?>
|
7
fp-plugins/datechanger/lang/lang.de-de.php
Normal file
7
fp-plugins/datechanger/lang/lang.de-de.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
$lang ['admin'] ['plugin'] ['datechanger'] = array(
|
||||||
|
'title' => 'Veröffentlichungszeit/-Datum ändern',
|
||||||
|
'date' => 'Datum',
|
||||||
|
'time' => 'Uhrzeit'
|
||||||
|
);
|
||||||
|
?>
|
7
fp-plugins/datechanger/lang/lang.el-gr.php
Normal file
7
fp-plugins/datechanger/lang/lang.el-gr.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
$lang ['admin'] ['plugin'] ['datechanger'] = array(
|
||||||
|
'title' => 'Αλλαγή ώρας/ημερομηνίας δημοσίευσης',
|
||||||
|
'date' => 'ημερομηνία',
|
||||||
|
'time' => 'Ώρα της ημέρας'
|
||||||
|
);
|
||||||
|
?>
|
7
fp-plugins/datechanger/lang/lang.en-us.php
Normal file
7
fp-plugins/datechanger/lang/lang.en-us.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
$lang ['admin'] ['plugin'] ['datechanger'] = array(
|
||||||
|
'title' => 'Change publication time/-date',
|
||||||
|
'date' => 'Date',
|
||||||
|
'time' => 'Time'
|
||||||
|
);
|
||||||
|
?>
|
7
fp-plugins/datechanger/lang/lang.es-es.php
Normal file
7
fp-plugins/datechanger/lang/lang.es-es.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
$lang ['admin'] ['plugin'] ['datechanger'] = array(
|
||||||
|
'title' => 'Cambiar la hora/fecha de publicación',
|
||||||
|
'date' => 'Fecha',
|
||||||
|
'time' => 'Hora del día'
|
||||||
|
);
|
||||||
|
?>
|
7
fp-plugins/datechanger/lang/lang.fr-fr.php
Normal file
7
fp-plugins/datechanger/lang/lang.fr-fr.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
$lang ['admin'] ['plugin'] ['datechanger'] = array(
|
||||||
|
'title' => 'Modifier l\'heure/la date de publication',
|
||||||
|
'date' => 'Date',
|
||||||
|
'time' => 'Heure'
|
||||||
|
);
|
||||||
|
?>
|
7
fp-plugins/datechanger/lang/lang.it-it.php
Normal file
7
fp-plugins/datechanger/lang/lang.it-it.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
$lang ['admin'] ['plugin'] ['datechanger'] = array(
|
||||||
|
'title' => 'Modifica dell\'ora/data di pubblicazione',
|
||||||
|
'date' => 'Data',
|
||||||
|
'time' => 'Ora del giorno'
|
||||||
|
);
|
||||||
|
?>
|
7
fp-plugins/datechanger/lang/lang.ja-jp.php
Normal file
7
fp-plugins/datechanger/lang/lang.ja-jp.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
$lang ['admin'] ['plugin'] ['datechanger'] = array(
|
||||||
|
'title' => '発行日時の変更',
|
||||||
|
'date' => '日付',
|
||||||
|
'time' => '時間帯'
|
||||||
|
);
|
||||||
|
?>
|
7
fp-plugins/datechanger/lang/lang.nl-nl.php
Normal file
7
fp-plugins/datechanger/lang/lang.nl-nl.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
$lang ['admin'] ['plugin'] ['datechanger'] = array(
|
||||||
|
'title' => 'Publicatie tijd/datum wijzigen',
|
||||||
|
'date' => 'Datum',
|
||||||
|
'time' => 'Tijd van de dag'
|
||||||
|
);
|
||||||
|
?>
|
7
fp-plugins/datechanger/lang/lang.pt-br.php
Normal file
7
fp-plugins/datechanger/lang/lang.pt-br.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
$lang ['admin'] ['plugin'] ['datechanger'] = array(
|
||||||
|
'title' => 'Alterar data/hora de publicação',
|
||||||
|
'date' => 'Data',
|
||||||
|
'time' => 'Hora do dia'
|
||||||
|
);
|
||||||
|
?>
|
7
fp-plugins/datechanger/lang/lang.ru-ru.php
Normal file
7
fp-plugins/datechanger/lang/lang.ru-ru.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
$lang ['admin'] ['plugin'] ['datechanger'] = array(
|
||||||
|
'title' => 'Изменить время/дату публикации',
|
||||||
|
'date' => 'дата',
|
||||||
|
'time' => 'Время суток'
|
||||||
|
);
|
||||||
|
?>
|
7
fp-plugins/datechanger/lang/lang.sl-si.php
Normal file
7
fp-plugins/datechanger/lang/lang.sl-si.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
$lang ['admin'] ['plugin'] ['datechanger'] = array(
|
||||||
|
'title' => 'Sprememba časa/datuma objave',
|
||||||
|
'date' => 'Datum',
|
||||||
|
'time' => 'Čas dneva'
|
||||||
|
);
|
||||||
|
?>
|
116
fp-plugins/datechanger/plugin.datechanger.php
Normal file
116
fp-plugins/datechanger/plugin.datechanger.php
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Plugin Name: DateChanger
|
||||||
|
* Plugin URI: https://www.flatpress.org
|
||||||
|
* Type: Block
|
||||||
|
* Author: FlatPress
|
||||||
|
* Description: Allows to change the date and time for <a href="./admin.php?p=entry&action=write" title="Write Entry">new entries</a> via a drop-down menu. Part of the standard distribution. <a href="./fp-plugins/datechanger/doc_datechanger.txt" title="Instructions" target="_blank">[Instructions]</a>
|
||||||
|
* Version: 1.0.4
|
||||||
|
* Author URI: https://www.flatpress.org
|
||||||
|
*/
|
||||||
|
if (!(basename($_SERVER ['PHP_SELF']) == 'admin.php' && // must be admin area
|
||||||
|
@$_GET ['p'] == 'entry' && // must be right panel
|
||||||
|
@$_GET ['action'] == 'write' && // must be right action
|
||||||
|
!(@$_POST ['timestamp'] || @$_REQUEST ['entry']))) // must be a new entry
|
||||||
|
return;
|
||||||
|
|
||||||
|
function plugin_datechanger_toolbar() {
|
||||||
|
$time = time();
|
||||||
|
|
||||||
|
$h = date('H', $time);
|
||||||
|
$m = date('i', $time);
|
||||||
|
$s = date('s', $time);
|
||||||
|
|
||||||
|
$Y = date('Y', $time);
|
||||||
|
$M = date('m', $time);
|
||||||
|
$D = date('d', $time);
|
||||||
|
|
||||||
|
$lang = lang_load('plugin:datechanger'); // Multilingual support by Plugin
|
||||||
|
global $lang; // Multilingual support by FlatPress
|
||||||
|
|
||||||
|
echo '<div id="admin-date"><fieldset id="plugin_datechanger"><legend>' . $lang ['admin'] ['plugin'] ['datechanger'] ['title'] . '</legend><p>' . $lang ['admin'] ['plugin'] ['datechanger'] ['time'] . ': ';
|
||||||
|
|
||||||
|
// set time
|
||||||
|
echo '<label><select name="date[]">';
|
||||||
|
for($i = 0; $i < 24; $i++) {
|
||||||
|
$v = sprintf('%02d', $i);
|
||||||
|
echo '<option value="' . $v . '"' . (($v == $h) ? ' selected="selected"' : '') . '>' . $v . '</option>';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '</select></label>:';
|
||||||
|
|
||||||
|
echo '<label><select name="date[]">';
|
||||||
|
for($i = 0; $i < 60; $i++) {
|
||||||
|
$v = sprintf('%02d', $i);
|
||||||
|
echo '<option value="' . $v . '"' . (($v == $m) ? ' selected="selected"' : '') . '>' . $v . '</option>';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '</select></label>:';
|
||||||
|
|
||||||
|
echo '<label><select name="date[]">';
|
||||||
|
for($i = 0; $i < 60; $i++) {
|
||||||
|
$v = sprintf('%02d', $i);
|
||||||
|
echo '<option value="' . $v . '"' . (($v == $s) ? ' selected="selected"' : '') . '>' . $v . '</option>';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '</select> </label> ';
|
||||||
|
|
||||||
|
// set date
|
||||||
|
echo '' . $lang ['admin'] ['plugin'] ['datechanger'] ['date'] . ': <select name="date[]">';
|
||||||
|
for($i = 1; $i <= 31; $i++) {
|
||||||
|
$v = sprintf('%02d', $i);
|
||||||
|
echo '<option value="' . $v . '"' . (($v == $D) ? ' selected="selected"' : '') . '>' . $v . '</option>';
|
||||||
|
}
|
||||||
|
echo '</select> ';
|
||||||
|
|
||||||
|
$mths = $lang ['date'] ['month'];
|
||||||
|
|
||||||
|
echo '<select name="date[]">';
|
||||||
|
for($i = 0; $i < 12; $i++) {
|
||||||
|
$v = sprintf('%02d', $i + 1);
|
||||||
|
echo '<option value="' . $v . '"' . (($v == $M) ? ' selected="selected"' : '') . '>' . $mths [$i] . '</option>';
|
||||||
|
}
|
||||||
|
echo '</select> ';
|
||||||
|
|
||||||
|
echo '<select name="date[]">';
|
||||||
|
foreach (range(2000, intval($Y) + 10) as $v) {
|
||||||
|
echo '<option value="' . $v . '"' . (($v == $Y) ? ' selected="selected"' : '') . '>' . $v . '</option>';
|
||||||
|
}
|
||||||
|
echo '</select>';
|
||||||
|
|
||||||
|
echo '</p></fieldset></div><!-- end of #admin-date -->';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Meh, {toolbar} no longer works with fp-1.3 dev -> #17
|
||||||
|
//add_action('editor_toolbar', 'plugin_datechanger_toolbar', 0);
|
||||||
|
add_filter('simple_datechanger_form', 'plugin_datechanger_toolbar', 0);
|
||||||
|
|
||||||
|
|
||||||
|
function plugin_datechanger_check() {
|
||||||
|
if ((isset($_GET ['p']) && $_GET ['p'] != 'entry') || (isset($_GET ['action']) && $_GET ['action'] != 'write'))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (empty($_POST))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!empty($_POST ['date']))
|
||||||
|
$date = $_POST ['date'];
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
|
||||||
|
foreach ($date as $v) {
|
||||||
|
if (!is_numeric($v))
|
||||||
|
return;
|
||||||
|
else
|
||||||
|
$date [] = intval($v);
|
||||||
|
}
|
||||||
|
|
||||||
|
list ($hour, $minute, $second, $day, $month, $year) = $date;
|
||||||
|
|
||||||
|
$time = mktime($hour, $minute, $second, $month, $day, $year);
|
||||||
|
|
||||||
|
$_POST ['timestamp'] = $time;
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action('init', 'plugin_datechanger_check');
|
||||||
|
?>
|
Loading…
x
Reference in New Issue
Block a user