1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-23 17:42:15 -05:00

Merge remote-tracking branches 'upstream/dev' and 'origin/master' into dev

This commit is contained in:
camporez 2014-03-15 15:03:26 -03:00
commit 8754bd88a5
46 changed files with 4102 additions and 491 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ vendor
composer.phar
db/poche.sqlite
inc/poche/config.inc.php
inc/3rdparty/htmlpurifier/HTMLPurifier/DefinitionCache/Serializer/

View File

@ -62,6 +62,6 @@ So, you are almost done.
This step may be required if your web server runs php scripts in name of, say, www user (i.e. Apache with mod_php, not cgi).
##To create new tanslation
##To create new translation
Please simple create appropriate directories in locale folder and perform all steps, described above. Instead of opening an existing file just create new one.

View File

@ -13,16 +13,6 @@ if (version_compare(PHP_VERSION, '5.4.0', '<')) {
}
}
// Check PDO Sqlite
if (! extension_loaded('pdo_sqlite')) {
die('PHP extension required: pdo_sqlite');
}
// Check ZIP
if (! extension_loaded('zip')) {
die('PHP extension required: zip');
}
// Check if /cache is writeable
if (! is_writable('cache')) {
die('The directory "cache" must be writeable by your web server user');

53
cron.php Normal file
View File

@ -0,0 +1,53 @@
<?php
error_reporting(E_ALL);
include_once 'inc/poche/global.inc.php';
include_once 'inc/poche/config.inc.php';
if (php_sapi_name() === 'cli') {
$options_cli = getopt('', array(
'limit::',
'user-id::',
'token::',
));
}
else {
$options_cli = $_GET;
}
$limit = ! empty($options_cli['limit']) && ctype_digit($options_cli['limit']) ? (int) $options_cli['limit'] : 10;
$user_id = ! empty($options_cli['user-id']) && ctype_digit($options_cli['user-id']) ? (int) $options_cli['user-id'] : null;
$token = ! empty($options_cli['token']) ? $options_cli['token'] : null;
if (is_null($user_id)) {
die('You must give a user id');
}
if (is_null($token)) {
die('You must give a token');
}
$store = new Database();
$config = $store->getConfigUser($user_id);
if ($token != $config['token']) {
die(_('Uh, there is a problem with the cron.'));
}
$items = $store->retrieveUnfetchedEntries($user_id, $limit);
foreach ($items as $item) {
$url = new Url(base64_encode($item['url']));
$content = Tools::getPageContent($url);
$title = ($content['rss']['channel']['item']['title'] != '') ? $content['rss']['channel']['item']['title'] : _('Untitled');
$body = $content['rss']['channel']['item']['description'];
// // clean content from prevent xss attack
$config = HTMLPurifier_Config::createDefault();
$purifier = new HTMLPurifier($config);
$title = $purifier->purify($title);
$body = $purifier->purify($body);
$store->updateContentAndTitle($item['id'], $title, $body, $user_id);
}

View File

@ -33,7 +33,7 @@ class Session
// his/her session is considered expired (3600 sec. = 1 hour)
public static $inactivityTimeout = 86400;
// Extra timeout for long sessions (if enabled) (82800 sec. = 23 hours)
public static $longSessionTimeout = 31536000;
public static $longSessionTimeout = 604800; // 604800 = a week
// If you get disconnected often or if your IP address changes often.
// Let you disable session cookie hijacking protection
public static $disableSessionProtection = false;
@ -61,7 +61,7 @@ class Session
if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") {
$ssl = true;
}
session_set_cookie_params($cookie['lifetime'], $cookiedir, $_SERVER['HTTP_HOST'], $ssl);
session_set_cookie_params(self::$longSessionTimeout, $cookiedir, $_SERVER['HTTP_HOST'], $ssl);
// Use cookies to store session.
ini_set('session.use_cookies', 1);
// Force cookies for session (phpsessionID forbidden in URL)
@ -143,7 +143,14 @@ class Session
*/
public static function logout()
{
unset($_SESSION['uid'],$_SESSION['ip'],$_SESSION['expires_on'],$_SESSION['tokens'], $_SESSION['login'], $_SESSION['pass'], $_SESSION['longlastingsession'], $_SESSION['poche_user']);
// unset($_SESSION['uid'],$_SESSION['ip'],$_SESSION['expires_on'],$_SESSION['tokens'], $_SESSION['login'], $_SESSION['pass'], $_SESSION['longlastingsession'], $_SESSION['poche_user']);
// Destruction du cookie (le code peut paraître complexe mais c'est pour être certain de reprendre les mêmes paramètres)
$args = array_merge(array(session_name(), ''), array_values(session_get_cookie_params()));
$args[2] = time() - 3600;
call_user_func_array('setcookie', $args);
// Suppression physique de la session
session_destroy();
}
/**

View File

@ -156,6 +156,7 @@
if($this->version == RSS2 || $this->version == RSS1)
{
$this->setElement('link', $link);
$this->setElement('guid', $link);
}
else
{

View File

@ -230,8 +230,30 @@ class Database {
}
}
public function updateContentAndTitle($id, $title, $body, $user_id) {
$sql_action = 'UPDATE entries SET content = ?, title = ? WHERE id=? AND user_id=?';
$params_action = array($body, $title, $id, $user_id);
$query = $this->executeQuery($sql_action, $params_action);
return $query;
}
public function retrieveUnfetchedEntries($user_id, $limit) {
$sql_limit = "LIMIT 0,".$limit;
if (STORAGE == 'postgres') {
$sql_limit = "LIMIT ".$limit." OFFSET 0";
}
$sql = "SELECT * FROM entries WHERE (content = '' OR content IS NULL) AND user_id=? ORDER BY id " . $sql_limit;
$query = $this->executeQuery($sql, array($user_id));
$entries = $query->fetchAll();
return $entries;
}
public function retrieveAll($user_id) {
$sql = "SELECT * FROM entries WHERE user_id=? ORDER BY id";
$sql = "SELECT * FROM entries WHERE content <> '' AND user_id=? ORDER BY id";
$query = $this->executeQuery($sql, array($user_id));
$entries = $query->fetchAll();
@ -250,7 +272,7 @@ class Database {
public function retrieveOneByURL($url, $user_id) {
$entry = NULL;
$sql = "SELECT * FROM entries WHERE url=? AND user_id=?";
$sql = "SELECT * FROM entries WHERE content <> '' AND url=? AND user_id=?";
$params = array($url, $user_id);
$query = $this->executeQuery($sql, $params);
$entry = $query->fetchAll();
@ -267,21 +289,22 @@ class Database {
public function getEntriesByView($view, $user_id, $limit = '', $tag_id = 0) {
switch ($view) {
case 'archive':
$sql = "SELECT * FROM entries WHERE user_id=? AND is_read=? ";
$sql = "SELECT * FROM entries WHERE content <> '' AND user_id=? AND is_read=? ";
$params = array($user_id, 1);
break;
case 'fav' :
$sql = "SELECT * FROM entries WHERE user_id=? AND is_fav=? ";
$sql = "SELECT * FROM entries WHERE content <> '' AND user_id=? AND is_fav=? ";
$params = array($user_id, 1);
break;
case 'tag' :
$sql = "SELECT entries.* FROM entries
LEFT JOIN tags_entries ON tags_entries.entry_id=entries.id
WHERE entries.user_id=? AND tags_entries.tag_id = ? ";
WHERE entries.content <> '' AND
entries.user_id=? AND tags_entries.tag_id = ? ";
$params = array($user_id, $tag_id);
break;
default:
$sql = "SELECT * FROM entries WHERE user_id=? AND is_read=? ";
$sql = "SELECT * FROM entries WHERE content <> '' AND user_id=? AND is_read=? ";
$params = array($user_id, 0);
break;
}
@ -297,21 +320,22 @@ class Database {
public function getEntriesByViewCount($view, $user_id, $tag_id = 0) {
switch ($view) {
case 'archive':
$sql = "SELECT count(*) FROM entries WHERE user_id=? AND is_read=? ";
$sql = "SELECT count(*) FROM entries WHERE content <> '' AND user_id=? AND is_read=? ";
$params = array($user_id, 1);
break;
case 'fav' :
$sql = "SELECT count(*) FROM entries WHERE user_id=? AND is_fav=? ";
$sql = "SELECT count(*) FROM entries WHERE content <> '' AND user_id=? AND is_fav=? ";
$params = array($user_id, 1);
break;
case 'tag' :
$sql = "SELECT count(*) FROM entries
LEFT JOIN tags_entries ON tags_entries.entry_id=entries.id
WHERE entries.user_id=? AND tags_entries.tag_id = ? ";
WHERE entries.content <> '' AND
entries.user_id=? AND tags_entries.tag_id = ? ";
$params = array($user_id, $tag_id);
break;
default:
$sql = "SELECT count(*) FROM entries WHERE user_id=? AND is_read=? ";
$sql = "SELECT count(*) FROM entries WHERE content <> '' AND user_id=? AND is_read=? ";
$params = array($user_id, 0);
break;
}
@ -365,12 +389,15 @@ class Database {
return $this->getHandle()->lastInsertId($column);
}
public function retrieveAllTags($user_id) {
$sql = "SELECT DISTINCT tags.* FROM tags
public function retrieveAllTags($user_id, $term = null) {
$sql = "SELECT DISTINCT tags.*, count(entries.id) AS entriescount FROM tags
LEFT JOIN tags_entries ON tags_entries.tag_id=tags.id
LEFT JOIN entries ON tags_entries.entry_id=entries.id
WHERE entries.user_id=?";
$query = $this->executeQuery($sql, array($user_id));
WHERE entries.content <> '' AND entries.user_id=?
". (($term) ? "AND lower(tags.value) LIKE ?" : '') ."
GROUP BY tags.id, tags.value
ORDER BY tags.value";
$query = $this->executeQuery($sql, (($term)? array($user_id, strtolower('%'.$term.'%')) : array($user_id) ));
$tags = $query->fetchAll();
return $tags;
@ -381,7 +408,7 @@ class Database {
$sql = "SELECT DISTINCT tags.* FROM tags
LEFT JOIN tags_entries ON tags_entries.tag_id=tags.id
LEFT JOIN entries ON tags_entries.entry_id=entries.id
WHERE tags.id=? AND entries.user_id=?";
WHERE entries.content <> '' AND tags.id=? AND entries.user_id=?";
$params = array(intval($id), $user_id);
$query = $this->executeQuery($sql, $params);
$tag = $query->fetchAll();
@ -393,7 +420,8 @@ class Database {
$sql =
"SELECT entries.* FROM entries
LEFT JOIN tags_entries ON tags_entries.entry_id=entries.id
WHERE tags_entries.tag_id = ? AND entries.user_id=?";
WHERE entries.content <> '' AND
tags_entries.tag_id = ? AND entries.user_id=?";
$query = $this->executeQuery($sql, array($tag_id, $user_id));
$entries = $query->fetchAll();

View File

@ -35,6 +35,7 @@ class Poche
'ru_RU.utf8' => 'Pусский',
'sl_SI.utf8' => 'Slovenščina',
'uk_UA.utf8' => 'Українська',
'pt_BR.utf8' => 'Brasileiro',
);
public function __construct()
{
@ -361,60 +362,6 @@ class Poche
);
}
protected function getPageContent(Url $url)
{
// Saving and clearing context
$REAL = array();
foreach( $GLOBALS as $key => $value ) {
if( $key != "GLOBALS" && $key != "_SESSION" ) {
$GLOBALS[$key] = array();
$REAL[$key] = $value;
}
}
// Saving and clearing session
$REAL_SESSION = array();
foreach( $_SESSION as $key => $value ) {
$REAL_SESSION[$key] = $value;
unset($_SESSION[$key]);
}
// Running code in different context
$scope = function() {
extract( func_get_arg(1) );
$_GET = $_REQUEST = array(
"url" => $url->getUrl(),
"max" => 5,
"links" => "preserve",
"exc" => "",
"format" => "json",
"submit" => "Create Feed"
);
ob_start();
require func_get_arg(0);
$json = ob_get_flush();
return $json;
};
$json = $scope( "inc/3rdparty/makefulltextfeed.php", array("url" => $url) );
// Clearing and restoring context
foreach( $GLOBALS as $key => $value ) {
if( $key != "GLOBALS" && $key != "_SESSION" ) {
unset($GLOBALS[$key]);
}
}
foreach( $REAL as $key => $value ) {
$GLOBALS[$key] = $value;
}
// Clearing and restoring session
foreach( $_SESSION as $key => $value ) {
unset($_SESSION[$key]);
}
foreach( $REAL_SESSION as $key => $value ) {
$_SESSION[$key] = $value;
}
return json_decode($json, true);
}
/**
* Call action (mark as fav, archive, delete, etc.)
*/
@ -423,17 +370,25 @@ class Poche
switch ($action)
{
case 'add':
$content = $this->getPageContent($url);
$title = ($content['rss']['channel']['item']['title'] != '') ? $content['rss']['channel']['item']['title'] : _('Untitled');
$body = $content['rss']['channel']['item']['description'];
if (!$import) {
$content = Tools::getPageContent($url);
$title = ($content['rss']['channel']['item']['title'] != '') ? $content['rss']['channel']['item']['title'] : _('Untitled');
$body = $content['rss']['channel']['item']['description'];
// clean content from prevent xss attack
$config = HTMLPurifier_Config::createDefault();
$purifier = new HTMLPurifier($config);
$title = $purifier->purify($title);
$body = $purifier->purify($body);
// clean content from prevent xss attack
$config = HTMLPurifier_Config::createDefault();
$config->set('Cache.SerializerPath', CACHE);
$purifier = new HTMLPurifier($config);
$title = $purifier->purify($title);
$body = $purifier->purify($body);
}
else {
$title = '';
$body = '';
}
//search for possible duplicate if not in import mode
$duplicate = NULL;
if (!$import) {
$duplicate = $this->store->retrieveOneByURL($url->getUrl(), $this->user->getId());
}
@ -534,25 +489,33 @@ class Poche
Tools::logm('error : article not found');
Tools::redirect();
}
//get all already set tags to preven duplicates
$already_set_tags = array();
$entry_tags = $this->store->retrieveTagsByEntry($entry_id);
foreach ($entry_tags as $tag) {
$already_set_tags[] = $tag['value'];
}
foreach($tags as $key => $tag_value) {
$value = trim($tag_value);
$tag = $this->store->retrieveTagByValue($value);
if ($value && !in_array($value, $already_set_tags)) {
$tag = $this->store->retrieveTagByValue($value);
if (is_null($tag)) {
# we create the tag
$tag = $this->store->createTag($value);
$sequence = '';
if (STORAGE == 'postgres') {
$sequence = 'tags_id_seq';
}
$tag_id = $this->store->getLastId($sequence);
}
else {
$tag_id = $tag['id'];
}
if (is_null($tag)) {
# we create the tag
$tag = $this->store->createTag($value);
$sequence = '';
if (STORAGE == 'postgres') {
$sequence = 'tags_id_seq';
}
$tag_id = $this->store->getLastId($sequence);
}
else {
$tag_id = $tag['id'];
}
# we assign the tag to the article
$this->store->setTagToEntry($tag_id, $entry_id);
# we assign the tag to the article
$this->store->setTagToEntry($tag_id, $entry_id);
}
}
if(!$import) {
Tools::redirect();
@ -581,8 +544,12 @@ class Poche
switch ($view)
{
case 'config':
$dev = trim($this->getPocheVersion('dev'));
$prod = trim($this->getPocheVersion('prod'));
$dev_infos = $this->getPocheVersion('dev');
$dev = trim($dev_infos[0]);
$check_time_dev = date('d-M-Y H:i', $dev_infos[1]);
$prod_infos = $this->getPocheVersion('prod');
$prod = trim($prod_infos[0]);
$check_time_prod = date('d-M-Y H:i', $prod_infos[1]);
$compare_dev = version_compare(POCHE, $dev);
$compare_prod = version_compare(POCHE, $prod);
$themes = $this->getInstalledThemes();
@ -594,6 +561,8 @@ class Poche
'languages' => $languages,
'dev' => $dev,
'prod' => $prod,
'check_time_dev' => $check_time_dev,
'check_time_prod' => $check_time_prod,
'compare_dev' => $compare_dev,
'compare_prod' => $compare_prod,
'token' => $token,
@ -619,7 +588,17 @@ class Poche
break;
case 'tags':
$token = $this->user->getConfigValue('token');
$tags = $this->store->retrieveAllTags($this->user->getId());
//if term is set - search tags for this term
$term = Tools::checkVar('term');
$tags = $this->store->retrieveAllTags($this->user->getId(), $term);
if (Tools::isAjaxRequest()) {
$result = array();
foreach ($tags as $tag) {
$result[] = $tag['value'];
}
echo json_encode($result);
exit;
}
$tpl_vars = array(
'token' => $token,
'user_id' => $this->user->getId(),
@ -660,6 +639,7 @@ class Poche
'entries' => '',
'page_links' => '',
'nb_results' => '',
'listmode' => (isset($_COOKIE['listmode']) ? true : false),
);
//if id is given - we retrive entries by tag: id is tag id
@ -895,7 +875,9 @@ class Poche
# the second <ol> is for read links
$read = 1;
}
$this->messages->add('s', _('import from instapaper completed'));
$unlink = unlink($targetFile);
$this->messages->add('s', _('import from instapaper completed. You have to execute the cron to fetch content.'));
Tools::logm('import from instapaper completed');
Tools::redirect();
}
@ -939,7 +921,9 @@ class Poche
# the second <ul> is for read links
$read = 1;
}
$this->messages->add('s', _('import from pocket completed'));
$unlink = unlink($targetFile);
$this->messages->add('s', _('import from pocket completed. You have to execute the cron to fetch content.'));
Tools::logm('import from pocket completed');
Tools::redirect();
}
@ -995,7 +979,9 @@ class Poche
}
}
}
$this->messages->add('s', _('import from Readability completed. ' . $count . ' new links.'));
unlink($targetFile);
$this->messages->add('s', _('import from Readability completed. You have to execute the cron to fetch content.'));
Tools::logm('import from Readability completed');
Tools::redirect();
}
@ -1041,7 +1027,9 @@ class Poche
}
}
$this->messages->add('s', _('import from Poche completed. ' . $count . ' new links.'));
unlink($targetFile);
$this->messages->add('s', _('import from Poche completed. You have to execute the cron to fetch content.'));
Tools::logm('import from Poche completed');
Tools::redirect();
}
@ -1066,13 +1054,7 @@ class Poche
Tools::redirect();
}
$targetDefinition = 'IMPORT_' . strtoupper($from) . '_FILE';
$targetFile = constant($targetDefinition);
if (! defined($targetDefinition)) {
$this->messages->add('e', _('Incomplete inc/poche/define.inc.php file, please define "' . $targetDefinition . '".'));
Tools::redirect();
}
$targetFile = CACHE . '/' . constant(strtoupper($from) . '_FILE');
if (! file_exists($targetFile)) {
$this->messages->add('e', _('Could not find required "' . $targetFile . '" import file.'));
@ -1082,6 +1064,22 @@ class Poche
$this->$providers[$from]($targetFile);
}
public function uploadFile() {
if(isset($_FILES['file']))
{
$dir = CACHE . '/';
$file = basename($_FILES['file']['name']);
if(move_uploaded_file($_FILES['file']['tmp_name'], $dir . $file)) {
$this->messages->add('s', _('File uploaded. You can now execute import.'));
}
else {
$this->messages->add('e', _('Error while importing file. Do you have access to upload it?'));
}
}
Tools::redirect('?view=config');
}
/**
* export poche entries in json
* @return json all poche entries
@ -1103,15 +1101,17 @@ class Poche
private function getPocheVersion($which = 'prod')
{
$cache_file = CACHE . '/' . $which;
$check_time = time();
# checks if the cached version file exists
if (file_exists($cache_file) && (filemtime($cache_file) > (time() - 86400 ))) {
$version = file_get_contents($cache_file);
$check_time = filemtime($cache_file);
} else {
$version = file_get_contents('http://static.wallabag.org/versions/' . $which);
file_put_contents($cache_file, $version, LOCK_EX);
}
return $version;
return array($version, $check_time);
}
public function generateToken()
@ -1136,6 +1136,10 @@ class Poche
$allowed_types = array('home', 'fav', 'archive', 'tag');
$config = $this->store->getConfigUser($user_id);
if ($config == null) {
die(_('User with this id (' . $user_id . ') does not exist.'));
}
if (!in_array($type, $allowed_types) ||
$token != $config['token']) {
die(_('Uh, there is a problem while generating feeds.'));
@ -1145,8 +1149,9 @@ class Poche
$feed = new FeedWriter(RSS2);
$feed->setTitle('wallabag — ' . $type . ' feed');
$feed->setLink(Tools::getPocheUrl());
$feed->setChannelElement('updated', date(DATE_RSS , time()));
$feed->setChannelElement('author', 'wallabag');
$feed->setChannelElement('pubDate', date(DATE_RSS , time()));
$feed->setChannelElement('generator', 'wallabag');
$feed->setDescription('wallabag ' . $type . ' elements');
if ($type == 'tag') {
$entries = $this->store->retrieveEntriesByTag($tag_id, $user_id);
@ -1159,7 +1164,7 @@ class Poche
foreach ($entries as $entry) {
$newItem = $feed->createNewItem();
$newItem->setTitle($entry['title']);
$newItem->setLink(Tools::getPocheUrl() . '?view=view&amp;id=' . $entry['id']);
$newItem->setLink($entry['url']);
$newItem->setDate(time());
$newItem->setDescription($entry['content']);
$feed->addItem($newItem);

73
inc/poche/Tools.class.php Normal file → Executable file
View File

@ -193,7 +193,7 @@ class Tools
public static function logm($message)
{
if (DEBUG_POCHE) {
if (DEBUG_POCHE && php_sapi_name() != 'cli') {
$t = strval(date('Y/m/d_H:i:s')) . ' - ' . $_SERVER["REMOTE_ADDR"] . ' - ' . strval($message) . "\n";
file_put_contents(CACHE . '/log.txt', $t, FILE_APPEND);
error_log('DEBUG POCHE : ' . $message);
@ -241,7 +241,6 @@ class Tools
}
}
public static function download_db() {
header('Content-Disposition: attachment; filename="poche.sqlite.gz"');
self::status(200);
@ -252,4 +251,74 @@ class Tools
exit;
}
public static function getPageContent(Url $url)
{
// Saving and clearing context
$REAL = array();
foreach( $GLOBALS as $key => $value ) {
if( $key != 'GLOBALS' && $key != '_SESSION' && $key != 'HTTP_SESSION_VARS' ) {
$GLOBALS[$key] = array();
$REAL[$key] = $value;
}
}
// Saving and clearing session
if ( isset($_SESSION) ) {
$REAL_SESSION = array();
foreach( $_SESSION as $key => $value ) {
$REAL_SESSION[$key] = $value;
unset($_SESSION[$key]);
}
}
// Running code in different context
$scope = function() {
extract( func_get_arg(1) );
$_GET = $_REQUEST = array(
"url" => $url->getUrl(),
"max" => 5,
"links" => "preserve",
"exc" => "",
"format" => "json",
"submit" => "Create Feed"
);
ob_start();
require func_get_arg(0);
$json = ob_get_contents();
ob_end_clean();
return $json;
};
$json = $scope( "inc/3rdparty/makefulltextfeed.php", array("url" => $url) );
// Clearing and restoring context
foreach( $GLOBALS as $key => $value ) {
if( $key != "GLOBALS" && $key != "_SESSION" ) {
unset($GLOBALS[$key]);
}
}
foreach( $REAL as $key => $value ) {
$GLOBALS[$key] = $value;
}
// Clearing and restoring session
if ( isset($REAL_SESSION) ) {
foreach( $_SESSION as $key => $value ) {
unset($_SESSION[$key]);
}
foreach( $REAL_SESSION as $key => $value ) {
$_SESSION[$key] = $value;
}
}
return json_decode($json, true);
}
/**
* Returns whether we handle an AJAX (XMLHttpRequest) request.
* @return boolean whether we handle an AJAX (XMLHttpRequest) request.
*/
public static function isAjaxRequest()
{
return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH']==='XMLHttpRequest';
}
}

View File

@ -8,10 +8,9 @@
* @license http://www.wtfpl.net/ see COPYING file
*/
define ('POCHE', '1.5.2');
define ('POCHE', '1.5.3');
require 'check_setup.php';
require_once 'inc/poche/global.inc.php';
session_start();
# Start Poche
$poche = new Poche();
@ -75,6 +74,8 @@ if (isset($_GET['login'])) {
$poche->updateTheme();
} elseif (isset($_GET['updatelanguage'])) {
$poche->updateLanguage();
} elseif (isset($_GET['uploadfile'])) {
$poche->uploadFile();
} elseif (isset($_GET['feed'])) {
if (isset($_GET['action']) && $_GET['action'] == 'generate') {
$poche->generateToken();

View File

@ -225,7 +225,11 @@ php composer.phar install</code></pre></li>
<p>
Database engine:
<ul>
<li><label for="sqlite">SQLite</label> <input name="db_engine" type="radio" checked="" id="sqlite" value="sqlite" /></li>
<li><label for="sqlite">SQLite</label> <input name="db_engine" type="radio" checked="" id="sqlite" value="sqlite" />
<div id="pdo_sqlite" class='messages error install'>
<p>You have to enable <a href="http://php.net/manual/ref.pdo-sqlite.php">pdo_sqlite extension</a>.</p>
</div>
</li>
<li>
<label for="mysql">MySQL</label> <input name="db_engine" type="radio" id="mysql" value="mysql" />
<ul id="mysql_infos">
@ -263,26 +267,49 @@ php composer.phar install</code></pre></li>
</p>
</fieldset>
<input type="submit" value="Install wallabag" name="install" />
<input type="submit" id="install_button" value="Install wallabag" name="install" />
</form>
</div>
<script>
$("#mysql_infos").hide();
$("#pg_infos").hide();
<?php
if (!extension_loaded('pdo_sqlite')) : ?>
$("#install_button").hide();
<?php
else :
?>
$("#pdo_sqlite").hide();
<?php
endif;
?>
$("input[name=db_engine]").click(function()
{
if ( $("#mysql").prop('checked')) {
$("#mysql_infos").show();
$("#pg_infos").hide();
$("#pdo_sqlite").hide();
$("#install_button").show();
}
else {
if ( $("#postgresql").prop('checked')) {
$("#mysql_infos").hide();
$("#pg_infos").show();
$("#pdo_sqlite").hide();
$("#install_button").show();
}
else {
$("#mysql_infos").hide();
$("#pg_infos").hide();
<?php
if (!extension_loaded('pdo_sqlite')) : ?>
$("#pdo_sqlite").show();
$("#install_button").hide();
<?php
endif;
?>
}
}
});

View File

@ -1,135 +1,129 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Project-Id-Version: Wallabag\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-02-25 15:28+0300\n"
"POT-Creation-Date: 2014-03-04 11:48+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Maryana <mariroz@mr.lviv.ua>\n"
"Last-Translator: Kevin Meyer <wallabag@kevin-meyer.de>\n"
"Language-Team: \n"
"Language: \n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.5.7\n"
"X-Poedit-Language: German\n"
"X-Generator: Poedit 1.6.4\n"
"X-Poedit-Basepath: .\n"
"X-Poedit-SearchPath-0: /home/mariroz/_DEV/web/wallabag/wallabag-master-testing\n"
msgid "wallabag, a read it later open source system"
msgstr ""
msgid "login failed: user doesn't exist"
msgstr ""
msgid "return home"
msgstr ""
"X-Poedit-SearchPath-0: /Users/kevinmeyer/Dropbox/dev_web/wallabag-dev\n"
msgid "config"
msgstr "Konfiguration"
msgid "Saving articles"
msgstr ""
msgstr "Artikel speichern"
msgid "There are several ways to save an article:"
msgstr ""
msgstr "Es gibt viele Methoden um Artikel zu speichern:"
msgid "read the documentation"
msgstr "Die Dokumentation lesen"
msgid "download the extension"
msgstr ""
msgstr "installiere die Erweiterung"
msgid "via F-Droid"
msgstr ""
msgstr "via F-Droid"
msgid " or "
msgstr ""
msgstr " oder "
msgid "via Google Play"
msgstr ""
msgstr "via Google Play"
msgid "download the application"
msgstr ""
msgstr "lade die App"
#, fuzzy
msgid "By filling this field"
msgstr "durch das ausfüllen dieses Feldes:"
msgstr "Durch Ausfüllen dieses Feldes"
msgid "bag it!"
msgstr ""
msgstr "bag it!"
msgid "Bookmarklet: drag & drop this link to your bookmarks bar"
msgstr ""
msgstr "Bookmarklet: Ziehe diesen Link in deine Lesezeichen-Leiste"
msgid "Upgrading wallabag"
msgstr ""
msgstr "Upgrade wallabag"
#, fuzzy
msgid "Installed version"
msgstr "Neuste stabile Version"
msgstr "Installierte Version"
#, fuzzy
msgid "Latest stable version"
msgstr "Neuste stabile Version"
#, fuzzy
msgid "A more recent stable version is available."
msgstr "Eine neuere stabile Version ist verfügbar."
#, fuzzy
msgid "You are up to date."
msgstr "Du bist auf den neuesten Stand."
#, fuzzy
msgid "Last check:"
msgstr "Zuletzt geprüft:"
msgid "Latest dev version"
msgstr "Neuste Entwicklungsversion"
#, fuzzy
msgid "A more recent development version is available."
msgstr "Eine neuere Entwicklungsversion ist verfügbar."
msgid "Feeds"
msgstr ""
msgid "You can clear cache to check the latest release."
msgstr "Leere den Cache um die neueste Version zu prüfen."
msgid "Your feed token is currently empty and must first be generated to enable feeds. Click <a href='?feed&amp;action=generate'>here to generate it</a>."
msgid "Feeds"
msgstr "Feeds"
msgid ""
"Your feed token is currently empty and must first be generated to enable "
"feeds. Click <a href='?feed&amp;action=generate'>here to generate it</a>."
msgstr ""
"Dein Feed Token ist noch nicht vorhanden und muss zunächst generiert werden, "
"um deine Feeds zu aktivieren. Klicke <a href='?feed&amp;"
"action=generate'>hier um ihn zu generieren</a>."
msgid "Unread feed"
msgstr ""
msgstr "Ungelesen Feed"
#, fuzzy
msgid "Favorites feed"
msgstr "Favoriten"
msgstr "Favoriten Feed"
#, fuzzy
msgid "Archive feed"
msgstr "Archiv"
msgstr "Archiv Feed"
msgid "Your token:"
msgstr ""
msgstr "Dein Token:"
msgid "Your user id:"
msgstr ""
msgstr "Deine User ID:"
msgid "You can regenerate your token: <a href='?feed&amp;action=generate'>generate!</a>."
msgid ""
"You can regenerate your token: <a href='?feed&amp;action=generate'>generate!"
"</a>."
msgstr ""
"Hier kannst du dein Token erzeugen: <a href='?feed&amp;"
"action=generate'>Generieren!</a>."
#, fuzzy
msgid "Change your theme"
msgstr "Passwort ändern"
msgstr "Theme ändern"
msgid "Theme:"
msgstr ""
msgstr "Theme:"
msgid "Update"
msgstr "Aktualisieren"
#, fuzzy
msgid "Change your language"
msgstr "Passwort ändern"
msgstr "Sprache ändern"
msgid "Language:"
msgstr ""
msgstr "Sprache:"
msgid "Change your password"
msgstr "Passwort ändern"
@ -146,74 +140,47 @@ msgstr "Neues Passwort wiederholen:"
msgid "Import"
msgstr "Import"
#, fuzzy
msgid "Please execute the import script locally as it can take a very long time."
msgstr "Bitte führe das Import Script lokal aus, dies kann eine Weile dauern."
msgid ""
"Please execute the import script locally as it can take a very long time."
msgstr ""
"Bitte führe das Import Script lokal aus, da dies eine Weile dauern kann."
#, fuzzy
msgid "More info in the official documentation:"
msgstr "Mehr Informationen in der offiziellen Dokumentation:"
#, fuzzy
msgid "Import from Pocket"
msgstr "Import aus Pocket"
#, php-format
msgid "(you must have a %s file on your server)"
msgstr ""
msgstr "(du brauchst eine %s Datei auf deinem Server)"
#, fuzzy
msgid "Import from Readability"
msgstr "Import aus Readability"
#, fuzzy
msgid "Import from Instapaper"
msgstr "Import aus Instapaper"
#, fuzzy
msgid "Import from wallabag"
msgstr "Import aus Readability"
#, fuzzy
msgid "Export your wallabag data"
msgstr "Exportieren Sie Ihre Poche Daten."
msgstr "Exportieren Sie Ihre wallabag Daten."
msgid "Click here"
msgstr "Klicke hier"
msgid "to download your database."
msgstr ""
msgstr "um deine Datenbank herunterzuladen"
#, fuzzy
msgid "to export your wallabag data."
msgstr "um deine Daten aus Poche zu exportieren."
msgstr "um deine Daten aus wallabag zu exportieren."
msgid "Cache"
msgstr ""
msgstr "Cache"
msgid "to delete cache."
msgstr ""
msgid "You can enter multiple tags, separated by commas."
msgstr ""
msgid "return to article"
msgstr ""
msgid "plop"
msgstr "plop"
msgid "You can <a href='wallabag_compatibility_test.php'>check your configuration here</a>."
msgstr ""
msgid "favoris"
msgstr ""
msgid "archive"
msgstr "Archiv"
msgid "unread"
msgstr "ungelesen"
msgstr "um den Cache zu löschen."
msgid "by date asc"
msgstr "nach Datum aufsteigend"
@ -233,316 +200,349 @@ msgstr "nach Titel"
msgid "by title desc"
msgstr "nach Titel absteigend"
msgid "Tag"
msgstr ""
msgid "No articles found."
msgstr ""
#, fuzzy
msgid "Toggle mark as read"
msgstr "Als gelesen markieren"
msgid "toggle favorite"
msgid "toggle view mode"
msgstr "Favorit"
msgid "delete"
msgstr "Löschen"
msgid "original"
msgstr "Original"
msgid "estimated reading time:"
msgstr ""
msgid "mark all the entries as read"
msgstr ""
msgid "results"
msgstr "Ergebnisse"
msgid "installation"
msgstr "Installieren"
#, fuzzy
msgid "install your wallabag"
msgstr "Installiere dein Poche"
#, fuzzy
msgid "wallabag is still not installed. Please fill the below form to install it. Don't hesitate to <a href='http://doc.wallabag.org/'>read the documentation on wallabag website</a>."
msgstr "Poche ist noch nicht installiert. Bitte fülle die Felder unten aus, um die Installation durchzuführen. Zögere nicht, <a href='http://inthepoche.com/doc'>die Dokumentation auf der Website von Poche zu lesen falls du Probleme haben solltest."
msgid "Login"
msgstr "Benutzername"
msgid "Repeat your password"
msgstr "Wiederhole dein Passwort"
msgid "Install"
msgstr "Installieren"
#, fuzzy
msgid "login to your wallabag"
msgstr "Bei Poche anmelden"
msgid "Login to wallabag"
msgstr ""
msgid "you are in demo mode, some features may be disabled."
msgstr "Du befindest dich im Demomodus, einige Funktionen könnten deaktiviert sein."
msgid "Username"
msgstr ""
msgid "Stay signed in"
msgstr "Angemeldet bleiben"
msgid "(Do not check on public computers)"
msgstr "(nicht auf einem öffentlichen Computer anhaken)"
msgid "Sign in"
msgstr "Einloggen"
msgid "favorites"
msgstr "Favoriten"
msgid "estimated reading time :"
msgstr ""
msgid "Mark all the entries as read"
msgstr ""
msgid "Return home"
msgstr ""
#, fuzzy
msgid "Back to top"
msgstr "Nach Oben"
#, fuzzy
msgid "Mark as read"
msgstr "Als gelesen markieren"
#, fuzzy
msgid "Favorite"
msgstr "Favoriten"
#, fuzzy
msgid "Toggle favorite"
msgstr "Favorit"
#, fuzzy
msgid "Delete"
msgstr "Löschen"
#, fuzzy
msgid "Tweet"
msgstr "Twittern"
#, fuzzy
msgid "Email"
msgstr "senden per E-Mail"
msgid "shaarli"
msgstr "Shaarli"
msgid "flattr"
msgstr "flattr"
#, fuzzy
msgid "Does this article appear wrong?"
msgstr "dieser Artikel erscheint falsch?"
msgid "tags:"
msgstr ""
msgid "Edit tags"
msgstr ""
msgid "save link!"
msgstr ""
msgid "home"
msgstr "Start"
msgid "favorites"
msgstr "Favoriten"
msgid "archive"
msgstr "Archiv"
msgid "tags"
msgstr ""
msgstr "Tags"
msgid "save a link"
msgstr "Speichere einen Link"
msgid "logout"
msgstr "Logout"
msgid "return home"
msgstr "Zurück zum Start"
msgid "You can enter multiple tags, separated by commas."
msgstr "Du kannst mehrere Tags, durch Kommata getrennt, eingeben."
msgid "return to article"
msgstr "zurück zum Artikel"
msgid "save link!"
msgstr "Link speichern!"
msgid "powered by"
msgstr "bereitgestellt von"
msgid "debug mode is on so cache is off."
msgstr "Debug Modus ist aktiviert, das Caching ist somit deaktiviert"
#, fuzzy
msgid "your wallabag version:"
msgstr "Deine Version"
msgstr "Deine wallabag Version"
msgid "storage:"
msgstr "Speicher:"
msgid "save a link"
msgstr ""
msgid "Back to top"
msgstr "Nach Oben"
msgid "back to home"
msgstr "züruck zur Hauptseite"
msgid "original"
msgstr "Original"
msgid "toggle mark as read"
msgid "Mark as read"
msgstr "Als gelesen markieren"
msgid "tweet"
msgid "Toggle mark as read"
msgstr "Als gelesen markieren"
msgid "Favorite"
msgstr "Favoriten"
msgid "Toggle favorite"
msgstr "Favorit"
msgid "Delete"
msgstr "Löschen"
msgid "Tweet"
msgstr "Twittern"
msgid "email"
msgstr "senden per E-Mail"
msgid "Email"
msgstr "per E-Mail senden"
msgid "this article appears wrong?"
msgstr "dieser Artikel erscheint falsch?"
msgid "shaarli"
msgstr "Shaarli"
msgid "No link available here!"
msgstr "Kein Link verfügbar!"
msgid "flattr"
msgstr "flattr"
msgid "Poching a link"
msgstr "Poche einen Link"
msgid "Does this article appear wrong?"
msgstr "Erscheint dieser Artikel falsch?"
msgid "by filling this field"
msgstr "durch das ausfüllen dieses Feldes:"
msgid "Edit tags"
msgstr "Tags bearbeiten"
msgid "bookmarklet: drag & drop this link to your bookmarks bar"
msgstr ""
msgid "unread"
msgstr "ungelesen"
msgid "your version"
msgstr "Deine Version"
msgid "Tag"
msgstr "Tag"
msgid "latest stable version"
msgstr "Neuste stabile Version"
msgid "No articles found."
msgstr "Keine Artikel gefunden."
msgid "a more recent stable version is available."
msgstr "Eine neuere stabile Version ist verfügbar."
msgid "estimated reading time:"
msgstr "geschätzte Lesezeit:"
msgid "you are up to date."
msgstr "Du bist auf den neuesten Stand."
msgid "estimated reading time :"
msgstr "geschätzte Lesezeit:"
msgid "latest dev version"
msgstr "Neuste Entwicklungsversion"
msgid "toggle favorite"
msgstr "Favorit"
msgid "a more recent development version is available."
msgstr "Eine neuere Entwicklungsversion ist verfügbar."
msgid "delete"
msgstr "Löschen"
msgid "Please execute the import script locally, it can take a very long time."
msgstr "Bitte führe das Import Script lokal aus, dies kann eine Weile dauern."
msgid "Mark all the entries as read"
msgstr "Markiere alle als gelesen"
#, fuzzy
msgid "More infos in the official doc:"
msgstr "Mehr Informationen in der offiziellen Dokumentation:"
msgid "import from Pocket"
msgstr "Import aus Pocket"
msgid "import from Readability"
msgstr "Import aus Readability"
msgid "import from Instapaper"
msgstr "Import aus Instapaper"
msgid "Tags"
msgstr ""
msgid "results"
msgstr "Ergebnisse"
#, fuzzy
msgid "Untitled"
msgstr "nach Titel"
msgid "the link has been added successfully"
msgstr ""
msgstr "Speichern des Links erfolgreich"
msgid "error during insertion : the link wasn't added"
msgstr ""
msgstr "Fehler beim Einfügen: Der Link wurde nicht hinzugefügt"
msgid "the link has been deleted successfully"
msgstr ""
msgstr "Löschen des Links erfolgreich"
msgid "the link wasn't deleted"
msgstr ""
msgstr "Der Link wurde nicht entfernt"
msgid "Article not found!"
msgstr ""
msgstr "Artikel nicht gefunden!"
msgid "previous"
msgstr ""
msgstr "vorherige"
msgid "next"
msgstr ""
msgstr "nächste"
msgid "in demo mode, you can't update your password"
msgstr ""
msgstr "im Demo-Modus kann das Passwort nicht geändert werden"
msgid "your password has been updated"
msgstr ""
msgstr "Dein Passwort wurde geändert"
msgid "the two fields have to be filled & the password must be the same in the two fields"
msgstr ""
msgid ""
"the two fields have to be filled & the password must be the same in the two "
"fields"
msgstr "Beide Felder müssen mit selbem Inhalt ausgefüllt sein"
msgid "still using the \""
msgstr ""
msgstr "nutze immernoch die \""
msgid "that theme does not seem to be installed"
msgstr ""
msgstr "dieses Theme scheint nicht installiert zu sein"
msgid "you have changed your theme preferences"
msgstr ""
msgstr "Du hast deine Theme Einstellungen geändert"
msgid "that language does not seem to be installed"
msgstr ""
msgstr "Diese Sprache scheint nicht installiert zu sein"
msgid "you have changed your language preferences"
msgstr ""
msgstr "Du hast deine Spracheinstellungen geändert"
msgid "login failed: you have to fill all fields"
msgstr ""
msgstr "Anmeldung fehlgeschlagen: Alle Felder müssen ausgefüllt werden"
msgid "welcome to your wallabag"
msgstr ""
msgstr "Willkommen bei deiner wallabag"
msgid "login failed: bad login or password"
msgstr ""
msgstr "Anmeldung fehlgeschlagen: Falscher Benutzername oder Passwort"
#, fuzzy
msgid "import from instapaper completed"
msgstr "Import aus Instapaper"
msgstr "Import aus Instapaper erfolgreich"
#, fuzzy
msgid "import from pocket completed"
msgstr "Import aus Pocket"
msgstr "Import aus Pocket erfolgreich"
#, fuzzy
msgid "import from Readability completed. "
msgstr "Import aus Readability"
msgstr "Import aus Readability erfolgreich"
#, fuzzy
msgid "import from Poche completed. "
msgstr "Import aus Pocket"
msgstr "Import aus Poche erfolgreich"
msgid "Unknown import provider."
msgstr ""
msgstr "Unbekannter Import Anbieter."
msgid "Incomplete inc/poche/define.inc.php file, please define \""
msgstr ""
msgstr "Unvollständige inc/poche/define.inc.php Datei, bitte setze \""
msgid "Could not find required \""
msgstr ""
msgstr "Nicht gefunden: \""
msgid "Uh, there is a problem while generating feeds."
msgstr ""
msgstr "Oh, es gab ein Problem beim Erstellen des Feeds."
#, fuzzy
msgid "Cache deleted."
msgstr "Löschen"
msgstr "Cache gelöscht"
msgid "Oops, it seems you don't have PHP 5."
msgstr ""
msgstr "Oops, es scheint als würde PHP 5 fehlen."
msgid "wallabag, a read it later open source system"
msgstr "wallabag, ein Später-Lesen Open Source System"
msgid "login failed: user doesn't exist"
msgstr "Anmeldung fehlgeschlagen: Benutzer existiert nicht"
#, fuzzy
#~ msgid "favoris"
#~ msgstr "Favoriten"
#~ msgid "mark all the entries as read"
#~ msgstr "Markiere alle als gelesen"
#~ msgid "Return home"
#~ msgstr "Zurück zum Start"
#~ msgid "tags:"
#~ msgstr "Tags:"
#~ msgid "login to your wallabag"
#~ msgstr "Bei wallabag anmelden"
#~ msgid "you are in demo mode, some features may be disabled."
#~ msgstr ""
#~ "Du befindest dich im Demomodus, einige Funktionen könnten deaktiviert "
#~ "sein."
#~ msgid "Login"
#~ msgstr "Benutzername"
#~ msgid "Stay signed in"
#~ msgstr "Angemeldet bleiben"
#~ msgid "(Do not check on public computers)"
#~ msgstr "(nicht auf einem öffentlichen Computer anhaken)"
#~ msgid "plop"
#~ msgstr "plop"
#~ msgid "Tags"
#~ msgstr "Tags"
#~ msgid "Login to wallabag"
#~ msgstr "Bei wallabag anmelden"
#~ msgid "Username"
#~ msgstr "Benutzername"
#~ msgid "Sign in"
#~ msgstr "Einloggen"
#~ msgid "installation"
#~ msgstr "Installieren"
#~ msgid "install your wallabag"
#~ msgstr "Installiere deine wallabag"
#~ msgid ""
#~ "wallabag is still not installed. Please fill the below form to install "
#~ "it. Don't hesitate to <a href='http://doc.wallabag.org/'>read the "
#~ "documentation on wallabag website</a>."
#~ msgstr ""
#~ "wallabag ist noch nicht installiert. Bitte fülle die Felder unten aus, um "
#~ "die Installation durchzuführen. Zögere nicht, <a href='http://doc."
#~ "wallabag.org/'>die Dokumentation auf der Website von wallabag zu lesen, "
#~ "falls du Probleme haben solltest."
#~ msgid "Repeat your password"
#~ msgstr "Wiederhole dein Passwort"
#~ msgid "Install"
#~ msgstr "Installieren"
#~ msgid "No link available here!"
#~ msgstr "Kein Link verfügbar!"
#~ msgid "toggle mark as read"
#~ msgstr "Als gelesen markieren"
#~ msgid ""
#~ "You can <a href='wallabag_compatibility_test.php'>check your "
#~ "configuration here</a>."
#~ msgstr ""
#~ "Du kannst deine Konfiguration <a href='wallabag_compatibility_test."
#~ "php'>hier testen</a>."
#~ msgid "back to home"
#~ msgstr "züruck zur Hauptseite"
#~ msgid "tweet"
#~ msgstr "Twittern"
#~ msgid "email"
#~ msgstr "senden per E-Mail"
#~ msgid "this article appears wrong?"
#~ msgstr "dieser Artikel erscheint falsch?"
#~ msgid "Poching a link"
#~ msgstr "Poche einen Link"
#~ msgid "by filling this field"
#~ msgstr "durch das ausfüllen dieses Feldes:"
#~ msgid "bookmarklet: drag & drop this link to your bookmarks bar"
#~ msgstr "Bookmarklet: Ziehe diesen Link in deine Lesezeichen-Leiste"
#~ msgid "your version"
#~ msgstr "Deine Version"
#~ msgid "latest stable version"
#~ msgstr "Neuste stabile Version"
#~ msgid "a more recent stable version is available."
#~ msgstr "Eine neuere stabile Version ist verfügbar."
#~ msgid "you are up to date."
#~ msgstr "Du bist auf den neuesten Stand."
#~ msgid "latest dev version"
#~ msgstr "Neuste Entwicklungsversion"
#~ msgid "a more recent development version is available."
#~ msgstr "Eine neuere Entwicklungsversion ist verfügbar."
#~ msgid ""
#~ "Please execute the import script locally, it can take a very long time."
#~ msgstr ""
#~ "Bitte führe das Import Script lokal aus, dies kann eine Weile dauern."
#~ msgid "More infos in the official doc:"
#~ msgstr "Mehr Informationen in der offiziellen Dokumentation:"
#~ msgid "import from Pocket"
#~ msgstr "Import aus Pocket"
#~ msgid "import from Readability"
#~ msgstr "Import aus Readability"
#~ msgid "import from Instapaper"
#~ msgstr "Import aus Instapaper"
#~ msgid "poche it!"
#~ msgstr "Poche es!"

View File

@ -8,6 +8,7 @@
<link rel="stylesheet" href="{{ poche_url }}/themes/{{theme}}/css/messages.css" media="all">
<link rel="stylesheet" href="{{ poche_url }}/themes/{{theme}}/css/print.css" media="print">
<script src="{{ poche_url }}/themes/{{theme}}/js/jquery-2.0.3.min.js"></script>
<script src="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/js/autoClose.js"></script>
<script src="{{ poche_url }}/themes/{{theme}}/js/jquery.cookie.js"></script>
<script src="{{ poche_url }}/themes/{{theme}}/js/init.js"></script>
<script src="{{ poche_url }}/themes/{{ constant('DEFAULT_THEME') }}/js/closeMessage.js"></script>

View File

@ -4,9 +4,10 @@
<li><a href="./?view=fav" {% if view == 'fav' %}class="current"{% endif %}>{% trans "favorites" %}</a></li>
<li><a href="./?view=archive" {% if view == 'archive' %}class="current"{% endif %}>{% trans "archive" %}</a></li>
<li><a href="./?view=tags" {% if view == 'tags' %}class="current"{% endif %}>{% trans "tags" %}</a></li>
<li><a href="javascript: void(null);" id="pocheit">{% trans "save a link" %}</a></li>
<li style="position: relative;"><a href="javascript: void(null);" id="bagit">{% trans "save a link" %}</a>
{% include '_pocheit-form.twig' %}
</li>
<li><a href="./?view=config" {% if view == 'config' %}class="current"{% endif %}>{% trans "config" %}</a></li>
<li><a class="icon icon-power" href="./?logout" title="{% trans "logout" %}">{% trans "logout" %}</a></li>
</ul>
{% include '_pocheit-form.twig' %}

10
themes/baggy/_pocheit-form.twig Executable file
View File

@ -0,0 +1,10 @@
<div id="bagit-form" class="messages info">
<form method="get" action="index.php" target="_blank" id="bagit-form-form">
<h2><a href="javascript: void(null);" id="bagit-form-close">X</a>
{% trans "Save a link" %}</h2>
<input type="hidden" name="autoclose" value="1" />
<input required placeholder="example.com/article" class="addurl" id="plainurl" name="plainurl" type="url" />
<input type="submit" value="{% trans "save link!" %}" />
<div id="add-link-result"></div>
</form>
</div>

View File

@ -8,10 +8,11 @@
<h2>{% trans "Saving articles" %}</h2>
<p>{% trans "There are several ways to save an article:" %} (<a href="http://doc.wallabag.org/" title="{% trans "read the documentation" %}">?</a>)</p>
<ul>
<li>Firefox: <a href="https://addons.mozilla.org/firefox/addon/poche/" title="download the firefox extension">{% trans "download the extension" %}</a></li>
<li>Firefox: <a href="https://addons.mozilla.org/firefox/addon/wallabag/" title="download the firefox extension">{% trans "download the extension" %}</a></li>
<li>Chrome: <a href="http://doc.wallabag.org/doku.php?id=users:chrome_extension" title="download the chrome extension">{% trans "download the extension" %}</a></li>
<li>Android: <a href="https://f-droid.org/repository/browse/?fdid=fr.gaulupeau.apps.Poche" title="download the application">{% trans "via F-Droid" %}</a> {% trans " or " %} <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" title="download the application">{% trans "via Google Play" %}</a></li>
<li>Windows Phone: <a href="https://www.windowsphone.com/en-us/store/app/poche/334de2f0-51b5-4826-8549-a3d805a37e83" title="download the window phone application">{% trans "download the application" %}</a></li>
<li>Android: <a href="https://f-droid.org/app/fr.gaulupeau.apps.InThePoche" title="download the application">{% trans "via F-Droid" %}</a> {% trans " or " %} <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" title="download the application">{% trans "via Google Play" %}</a></li>
<li>iOS: <a href="https://itunes.apple.com/app/wallabag/id828331015?mt=8" title="download the iOS application">{% trans "download the application" %}</a></li>
<li>Windows Phone: <a href="http://www.windowsphone.com/en-us/store/app/wallabag/ff890514-348c-4d0b-9b43-153fff3f7450" title="download the window phone application">{% trans "download the application" %}</a></li>
<li>
<form method="get" action="index.php">
<label class="addurl" for="config_plainurl">{% trans "By filling this field" %}:</label>
@ -25,9 +26,10 @@
<h2>{% trans "Upgrading wallabag" %}</h2>
<ul>
<li>{% trans "Installed version" %} : <strong>{{ constant('POCHE') }}</strong></li>
<li>{% trans "Latest stable version" %} : {{ prod }}. {% if compare_prod == -1 %}<strong><a href="http://wallabag.org/">{% trans "A more recent stable version is available." %}</a></strong>{% else %}{% trans "You are up to date." %}{% endif %}</li>
{% if constant('DEBUG_POCHE') == 1 %}<li>{% trans "Latest dev version" %} : {{ dev }}. {% if compare_dev == -1 %}<strong><a href="http://wallabag.org/">{% trans "A more recent development version is available." %}</a></strong>{% else %}{% trans "You are up to date." %}{% endif %}</li>{% endif %}
<li>{% trans "Latest stable version" %} : {{ prod }}. {% if compare_prod == -1 %}<strong><a href="http://wallabag.org/">{% trans "A more recent stable version is available." %}</a></strong>{% else %}{% trans "You are up to date." %}{% endif %} ({% trans "Last check:" %} {{ check_time_prod }})</li>
{% if constant('DEBUG_POCHE') == 1 %}<li>{% trans "Latest dev version" %} : {{ dev }}. {% if compare_dev == -1 %}<strong><a href="http://wallabag.org/">{% trans "A more recent development version is available." %}</a></strong>{% else %}{% trans "You are up to date." %}{% endif %} ({% trans "Last check:" %} {{ check_time_dev }}){% endif %}</li>
</ul>
<p>{% trans "You can clear cache to check the latest release." %}</p>
<h2>{% trans "Feeds" %}</h2>
{% if token == '' %}
@ -103,15 +105,37 @@
{% endif %}
<h2>{% trans "Import" %}</h2>
<p>{% trans "Please execute the import script locally as it can take a very long time." %}</p>
<p>{% trans "More info in the official documentation:" %} <a href="http://doc.wallabag.org/doku.php?id=users:migrate">wallabag.org</a></p>
<p>{% trans "Importing from other services can be quite long, and webservers default configuration often prevents long scripts execution time, so it must be done in multiple parts." %}</p>
<p>1. {% trans "First, select the export file on your computer and upload it." %}</p>
<form method="post" action="?uploadfile" name="uploadfile" enctype="multipart/form-data">
<fieldset class="w500p">
<div class="row">
<label class="col w150p" for="file">{% trans "File:" %}</label>
<input class="col" type="file" id="file" name="file" tabindex="4">
</div>
<div class="row mts txtcenter">
<button class="bouton" type="submit" tabindex="4">{% trans "Upload" %}</button>
</div>
</fieldset>
<input type="hidden" name="MAX_FILE_SIZE" value="1048576">
<input type="hidden" name="returnurl" value="{{ referer }}">
</form>
<p>2. {% trans "Then, click on the right link below." %}</p>
<ul>
<li><a href="./?import&amp;from=pocket">{% trans "Import from Pocket" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('POCKET_FILE')) }}</li>
<li><a href="./?import&amp;from=readability">{% trans "Import from Readability" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('READABILITY_FILE')) }}</li>
<li><a href="./?import&amp;from=instapaper">{% trans "Import from Instapaper" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('INSTAPAPER_FILE')) }}</li>
<li><a href="./?import&amp;from=poche">{% trans "Import from wallabag" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('POCHE_FILE')) }}</li>
<li><a href="./?import&amp;from=pocket">{% trans "Import from Pocket" %}</a> {{ '(after uploaded %s file)'|trans|format(constant('POCKET_FILE')) }}</li>
<li><a href="./?import&amp;from=readability">{% trans "Import from Readability" %}</a> {{ '(after uploaded %s file)'|trans|format(constant('READABILITY_FILE')) }}</li>
<li><a href="./?import&amp;from=instapaper">{% trans "Import from Instapaper" %}</a> {{ '(after uploaded %s file)'|trans|format(constant('INSTAPAPER_FILE')) }}</li>
<li><a href="./?import&amp;from=poche">{% trans "Import from wallabag" %}</a> {{ '(after uploaded %s file)'|trans|format(constant('POCHE_FILE')) }}</li>
</ul>
{% if token == '' %}
<p>{% trans "3. Your feed token is currently empty and must first be generated to fetch content. Click <a href='?feed&amp;action=generate'>here to generate it</a>." %}</p>
{% else %}
<p>3. {% trans "Finally, you have to fetch content for imported items." %} <a href="cron.php?limit=10&amp;user-id={{ user_id }}&amp;token={{token}}" target="_blank">{% trans "Click here" %}</a> {% trans "to fetch content for 10 articles" %}.</p>
<p>{% trans "If you have console access to your server, you can also create a cron task:" %}</p>
<pre><code>0 */4 * * * cd /path/to/wallabag && php cron.php --limit=10 --user-id={{user_id}} --token={{token}} >/dev/null 2>&1</code></pre>
{% endif %}
<h2>{% trans "Export your wallabag data" %}</h2>
{% if constant('STORAGE') == 'sqlite' %}
<p><a href="?download" target="_blank">{% trans "Click here" %}</a> {% trans "to download your database." %}</p>{% endif %}

View File

@ -173,7 +173,7 @@ h2:after {
#links {
position: fixed;
top: 0;
width: 9em;
width: 10em;
left: 0;
text-align: right;
background: #333;
@ -184,7 +184,7 @@ h2:after {
}
#main {
margin-left: 12em;
margin-left: 13em;
position: relative;
z-index: 10;
padding-right: 5%;
@ -228,7 +228,7 @@ h2:after {
#links li:last-child {
position: fixed;
bottom: 1em;
width: 9em;
width: 10em;
}
#links li:last-child a:before {
@ -322,6 +322,15 @@ footer a {
letter-spacing:-5px;
}
.listmode .entrie {
width: 100%!important;
margin-left: 0!important;
}
.listmode .entrie p {
display: none;
}
.list-entries + .results {
margin-bottom: 2em;
}
@ -343,10 +352,10 @@ footer a {
letter-spacing:normal;
box-shadow: 0 3px 7px rgba(0,0,0,0.3);
display: inline-block;
width: 32%;
width: 32%!important;
margin-bottom: 1.5em;
vertical-align: top;
margin-left: 1.5%;
margin-left: 1.5%!important;
position: relative;
overflow: hidden;
padding: 1.5em 1.5em 3em 1.5em;
@ -481,7 +490,7 @@ footer a {
}
.entrie:nth-child(3n+1) {
margin-left: 0;
margin-left: 0!important;
}
.results {
@ -525,6 +534,84 @@ footer a {
display: none;
}
/* ==========================================================================
2.1 = "save a link" popup div related styles
========================================================================== */
#bagit-form {
background: rgba(0,0,0,0.5);
position: absolute;
top: 0;
left: 10em;
z-index: 20;
height: 100%;
width: 100%;
margin: 0;
margin-top: -30%;
padding: 2em;
display: none;
border-left: 1px #EEE solid;
}
#bagit-form form {
background: #FFF;
position: absolute;
top: 0;
left: 0;
z-index: 20;
border: 10px solid #000;
width: 400px;
height: 200px;
/* margin: -150px 0 0 -300px; */
padding: 2em;
}
a#bagit-form-close {
background: #000;
color: #FFF;
padding: 0.2em 0.5em;
text-decoration: none;
display: inline-block;
float: right;
font-size: 0.6em;
}
a#bagit-form-close:hover {
background: #999;
color: #000;
}
.active-current {
background-color: #999;
}
.active-current:after {
content: "";
width: 0;
height: 0;
position: absolute;
border-style: solid;
border-width: 10px;
border-color: transparent #EEE transparent transparent;
right: 0;
top: 50%;
margin-top: -10px;
}
.opacity03 {
opacity: 0.3;
}
.add-to-wallabag-link-after {
background-color: #000;
color: #fff;
padding: 0 3px 2px 3px;
}
#add-link-result {
font-weight: bold;
margin-top: 10px;
}
/* ==========================================================================
3 = Pictos
========================================================================== */
@ -659,6 +746,7 @@ footer a {
#article {
width: 70%;
margin-bottom: 3em;
text-align: justify;
}
#article .tags {
@ -884,4 +972,8 @@ blockquote {
#display-mode {
display: none;
}
#bagit-form {
left: 0;
}
}

8
themes/baggy/edit-tags.twig Normal file → Executable file
View File

@ -4,6 +4,11 @@
{% include '_menu.twig' %}
{% endblock %}
{% block content %}
<script src="{{ poche_url }}/themes/default/js/jquery-ui-1.10.4.custom.min.js"></script>
<script src="{{ poche_url }}/themes/default/js/autoCompleteTags.js"></script>
<link rel="stylesheet" href="{{ poche_url }}/themes/default/css/jquery-ui-1.10.4.custom.min.css" media="all">
<div id="article">
<h2>{{ entry.title|raw }}</21>
</div>
@ -17,7 +22,8 @@
<input type="hidden" name="entry_id" value="{{ entry_id }}" />
<label for="value">Add tags: </label><input type="text" placeholder="interview, editorial, video" id="value" name="value" required="required" />
<input type="submit" value="Tag" />
<p>{% trans "You can enter multiple tags, separated by commas." %}</p>
<p>{% trans "Start typing for auto complete." %}<br>
{% trans "You can enter multiple tags, separated by commas." %}</p>
</form>
<a class="icon icon-reply return" href="./?view=view&id={{ entry_id }}">{% trans "return to article" %}</a>
{% endblock %}

View File

@ -30,9 +30,9 @@
</div>
{% endif %}
{% endblock %}
<div class="list-entries">
<div id="list-entries" class="list-entries">
{% for entry in entries %}
<div id="entry-{{ entry.id|e }}" class="entrie">
<div id="entry-{{ entry.id|e }}" class="entrie"{% if listmode %} style="width:100%; margin-left:0;"{% endif %}>
<h2><a href="index.php?view=view&amp;id={{ entry.id|e }}">{{ entry.title|raw }}</a></h2>
{% if entry.content| getReadingTime > 0 %}
<div class="estimatedTime"><a target="_blank" title="{% trans "estimated reading time:" %} {{ entry.content| getReadingTime }} min" class="tool reading-time"><span>{% trans "estimated reading time :" %} {{ entry.content| getReadingTime }} min</span></div>

View File

@ -1,36 +1,126 @@
$(document).ready(function() {
$.fn.ready(function() {
var $listmode = $('#listmode'),
$listentries = $("#list-entries"),
$bagit = $('#bagit'),
$bagitForm = $('#bagit-form');
$bagitFormForm = $('#bagit-form-form');
/* ==========================================================================
Menu
========================================================================== */
$("#menu").click(function(){
$("#links").toggle();
});
/* ==========================================================================
List mode or Table Mode
========================================================================== */
$("#listmode").click(function(){
$listmode.click(function(){
if ( $.cookie("listmode") == 1 ) {
$(".entrie").css("width", "");
$(".entrie").css("margin-left", "");
// Cookie
$.removeCookie("listmode");
$("#listmode").removeClass("tablemode");
$("#listmode").addClass("listmode");
$listentries.removeClass("listmode");
$listmode.removeClass("tablemode");
$listmode.addClass("listmode");
}
else {
// Cookie
$.cookie("listmode", 1, {expires: 365});
$(".entrie").css("width", "100%");
$(".entrie").css("margin-left", "0");
$("#listmode").removeClass("listmode");
$("#listmode").addClass("tablemode");
$listentries.addClass("listmode");
$listmode.removeClass("listmode");
$listmode.addClass("tablemode");
}
});
/* ==========================================================================
Cookie listmode
========================================================================== */
if ( $.cookie("listmode") == 1 ) {
$(".entrie").css("width", "100%");
$(".entrie").css("margin-left", "0");
$("#listmode").removeClass("listmode");
$("#listmode").addClass("tablemode");
$listentries.addClass("listmode");
$listmode.removeClass("listmode");
$listmode.addClass("tablemode");
}
/* ==========================================================================
bag it link and close button
========================================================================== */
function toggleSaveLinkForm(url) {
$bagit.toggleClass("active-current");
$bagitForm.toggle();
$('#content').toggleClass("opacity03");
if (url !== 'undefined' && url) {
$('#plainurl').val(url);
}
$('#plainurl').focus();
}
$bagit.click(function(){
toggleSaveLinkForm();
});
$("#bagit-form-close").click(function(){
toggleSaveLinkForm();
});
//send "bag it link" form request via ajax
$bagitFormForm.submit( function(event) {
$bagitFormForm.css("cursor", "wait");
$("#add-link-result").empty();
$.ajax({
type: $bagitFormForm.attr('method'),
url: $bagitFormForm.attr('action'),
data: $bagitFormForm.serialize(),
success: function(data) {
$('#add-link-result').html("Done!");
$('#plainurl').val('');
$('#plainurl').blur('');
$bagitFormForm.css("cursor", "auto");
//setTimeout( function() { toggleSaveLinkForm(); }, 1000); //close form after 1000 delay
},
error: function(data) {
$('#add-link-result').html("Failed!");
$bagitFormForm.css("cursor", "auto");
}
});
event.preventDefault();
});
/* ==========================================================================
Keyboard gestion
========================================================================== */
$(window).keydown(function(e){
if ( ( e.target.tagName.toLowerCase() !== 'input' && e.keyCode == 83 ) || e.keyCode == 27 ) {
toggleSaveLinkForm();
return false;
}
});
/* ==========================================================================
Process all links inside an article
========================================================================== */
$("article a[href^='http']").after(function() {
return " <a href=\"" + $(this).attr('href') + "\" class=\"add-to-wallabag-link-after\" alt=\"add to wallabag\" title=\"add to wallabag\">w</a> ";
});
$(".add-to-wallabag-link-after").click(function(event){
toggleSaveLinkForm($(this).attr('href'));
event.preventDefault();
});
});

2
themes/baggy/tags.twig Normal file → Executable file
View File

@ -6,7 +6,7 @@
{% block content %}
<h2>{% trans "Tags" %}</h2>
<ul class="list-tags">
{% for tag in tags %}<li>{% if token != '' %}<a class="icon icon-rss" href="?feed&amp;type=tag&amp;user_id={{ user_id }}&amp;tag_id={{ tag.id }}&amp;token={{ token }}" target="_blank"><span>rss</span></a>{% endif %} <a href="./?view=tag&amp;id={{ tag.id }}">{{ tag.value }}</a>
{% for tag in tags %}<li>{% if token != '' %}<a class="icon icon-rss" href="?feed&amp;type=tag&amp;user_id={{ user_id }}&amp;tag_id={{ tag.id }}&amp;token={{ token }}" target="_blank"><span>rss</span></a>{% endif %} <a href="./?view=tag&amp;id={{ tag.id }}">{{ tag.value }}</a> ({{ tag.entriescount }})
</li>
{% endfor %}
</ul>

View File

@ -14,7 +14,7 @@
{% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@wallabagapp" target="_blank" class="tool twitter icon icon-twitter" title="{% trans "Tweet" %}"><span>{% trans "Tweet" %}</span></a></li>{% endif %}
{% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&amp;body={{ entry.url|url_encode }}%20via%20@wallabagapp" class="tool email icon icon-mail" title="{% trans "Email" %}"><span>{% trans "Email" %}</span></a></li>{% endif %}
{% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %}
{% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span></a></li>{% elseif flattr.status == constant('FLATTRED') %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span> ({{ flattr.numflattrs }})</a></li>{% endif %}{% endif %}
{% if constant('FLATTR') == 1 %}{% if flattr.status == constant('FLATTRABLE') %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span></a></li>{% elseif flattr.status == constant('FLATTRED') %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr icon icon-flattr" target="_blank" title="{% trans "flattr" %}"><span>{% trans "flattr" %}</span> ({{ flattr.numflattrs }})</a></li>{% endif %}{% endif %}
<li><a href="mailto:hello@wallabag.org?subject=Wrong%20display%20in%20wallabag&amp;body={{ entry.url|url_encode }}" title="{% trans "Does this article appear wrong?" %}" class="tool bad-display icon icon-delete"><span>{% trans "Does this article appear wrong?" %}</span></a></li>
</ul>
</div>
@ -29,4 +29,23 @@
{{ content | raw }}
</article>
</div>
<script src="{{ poche_url }}/themes/{{theme}}/js/restoreScroll.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(window).scroll(function(e){
var scrollTop = $(window).scrollTop();
var docHeight = $(document).height();
var scrollPercent = (scrollTop) / (docHeight);
var scrollPercentRounded = Math.round(scrollPercent*100)/100;
savePercent({{ entry.id|e }}, scrollPercentRounded);
});
retrievePercent({{ entry.id|e }});
$(window).resize(function(){
retrievePercent({{ entry.id|e }});
});
});
</script>
{% endblock %}

View File

@ -8,10 +8,11 @@
<h2>{% trans "Saving articles" %}</h2>
<p>{% trans "There are several ways to save an article:" %} (<a href="http://doc.wallabag.org/" title="{% trans "read the documentation" %}">?</a>)</p>
<ul>
<li>Firefox: <a href="https://addons.mozilla.org/firefox/addon/poche/" title="download the firefox extension">{% trans "download the extension" %}</a></li>
<li>Firefox: <a href="https://addons.mozilla.org/firefox/addon/wallabag/" title="download the firefox extension">{% trans "download the extension" %}</a></li>
<li>Chrome: <a href="http://doc.wallabag.org/doku.php?id=users:chrome_extension" title="download the chrome extension">{% trans "download the extension" %}</a></li>
<li>Android: <a href="https://f-droid.org/repository/browse/?fdid=fr.gaulupeau.apps.Poche" title="download the application">{% trans "via F-Droid" %}</a> {% trans " or " %} <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" title="download the application">{% trans "via Google Play" %}</a></li>
<li>Windows Phone: <a href="https://www.windowsphone.com/en-us/store/app/poche/334de2f0-51b5-4826-8549-a3d805a37e83" title="download the window phone application">{% trans "download the application" %}</a></li>
<li>Android: <a href="https://f-droid.org/app/fr.gaulupeau.apps.InThePoche" title="download the application">{% trans "via F-Droid" %}</a> {% trans " or " %} <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" title="download the application">{% trans "via Google Play" %}</a></li>
<li>iOS: <a href="https://itunes.apple.com/app/wallabag/id828331015?mt=8" title="download the iOS application">{% trans "download the application" %}</a></li>
<li>Windows Phone: <a href="http://www.windowsphone.com/en-us/store/app/wallabag/ff890514-348c-4d0b-9b43-153fff3f7450" title="download the window phone application">{% trans "download the application" %}</a></li>
<li>
<form method="get" action="index.php">
<label class="addurl" for="config_plainurl">{% trans "By filling this field" %}:</label>
@ -103,15 +104,37 @@
{% endif %}
<h2>{% trans "Import" %}</h2>
<p>{% trans "Please execute the import script locally as it can take a very long time." %}</p>
<p>{% trans "More info in the official documentation:" %} <a href="http://doc.wallabag.org/doku.php?id=users:migrate">wallabag.org</a></p>
<p>{% trans "Importing from other services can be quite long, and webservers default configuration often prevents long scripts execution time, so it must be done in multiple parts." %}</p>
<p>1. {% trans "First, select the export file on your computer and upload it." %}</p>
<form method="post" action="?uploadfile" name="uploadfile" enctype="multipart/form-data">
<fieldset class="w500p">
<div class="row">
<label class="col w150p" for="file">{% trans "File:" %}</label>
<input class="col" type="file" id="file" name="file" tabindex="4">
</div>
<div class="row mts txtcenter">
<button class="bouton" type="submit" tabindex="4">{% trans "Upload" %}</button>
</div>
</fieldset>
<input type="hidden" name="MAX_FILE_SIZE" value="1048576">
<input type="hidden" name="returnurl" value="{{ referer }}">
</form>
<p>2. {% trans "Then, click on the right link below." %}</p>
<ul>
<li><a href="./?import&amp;from=pocket">{% trans "Import from Pocket" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('POCKET_FILE')) }}</li>
<li><a href="./?import&amp;from=readability">{% trans "Import from Readability" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('READABILITY_FILE')) }}</li>
<li><a href="./?import&amp;from=instapaper">{% trans "Import from Instapaper" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('INSTAPAPER_FILE')) }}</li>
<li><a href="./?import&amp;from=poche">{% trans "Import from wallabag" %}</a> {{ '(you must have a %s file on your server)'|trans|format(constant('POCHE_FILE')) }}</li>
<li><a href="./?import&amp;from=pocket">{% trans "Import from Pocket" %}</a> {{ '(after uploaded %s file)'|trans|format(constant('POCKET_FILE')) }}</li>
<li><a href="./?import&amp;from=readability">{% trans "Import from Readability" %}</a> {{ '(after uploaded %s file)'|trans|format(constant('READABILITY_FILE')) }}</li>
<li><a href="./?import&amp;from=instapaper">{% trans "Import from Instapaper" %}</a> {{ '(after uploaded %s file)'|trans|format(constant('INSTAPAPER_FILE')) }}</li>
<li><a href="./?import&amp;from=poche">{% trans "Import from wallabag" %}</a> {{ '(after uploaded %s file)'|trans|format(constant('POCHE_FILE')) }}</li>
</ul>
{% if token == '' %}
<p>{% trans "3. Your feed token is currently empty and must first be generated to fetch content. Click <a href='?feed&amp;action=generate'>here to generate it</a>." %}</p>
{% else %}
<p>3. {% trans "Finally, you have to fetch content for imported items." %} <a href="cron.php?limit=10&amp;user-id={{ user_id }}&amp;token={{token}}" target="_blank">{% trans "Click here" %}</a> {% trans "to fetch content for 10 articles" %}.</p>
<p>{% trans "If you have console access to your server, you can also create a cron task:" %}</p>
<pre><code>0 */4 * * * cd /path/to/wallabag && php cron.php --limit=10 --user-id={{user_id}} --token={{token}} >/dev/null 2>&1</code></pre>
{% endif %}
<h2>{% trans "Export your wallabag data" %}</h2>
{% if constant('STORAGE') == 'sqlite' %}
<p><a href="?download" target="_blank">{% trans "Click here" %}</a> {% trans "to download your database." %}</p>{% endif %}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -0,0 +1,560 @@
/*! jQuery UI - v1.10.4 - 2014-03-09
* http://jqueryui.com
* Includes: jquery.ui.core.css, jquery.ui.autocomplete.css, jquery.ui.menu.css, jquery.ui.theme.css
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
/* Layout helpers
----------------------------------*/
.ui-helper-hidden {
display: none;
}
.ui-helper-hidden-accessible {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.ui-helper-reset {
margin: 0;
padding: 0;
border: 0;
outline: 0;
line-height: 1.3;
text-decoration: none;
font-size: 100%;
list-style: none;
}
.ui-helper-clearfix:before,
.ui-helper-clearfix:after {
content: "";
display: table;
border-collapse: collapse;
}
.ui-helper-clearfix:after {
clear: both;
}
.ui-helper-clearfix {
min-height: 0; /* support: IE7 */
}
.ui-helper-zfix {
width: 100%;
height: 100%;
top: 0;
left: 0;
position: absolute;
opacity: 0;
filter:Alpha(Opacity=0);
}
.ui-front {
z-index: 100;
}
/* Interaction Cues
----------------------------------*/
.ui-state-disabled {
cursor: default !important;
}
/* Icons
----------------------------------*/
/* states and images */
.ui-icon {
display: block;
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat;
}
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.ui-autocomplete {
position: absolute;
top: 0;
left: 0;
cursor: default;
}
.ui-menu {
list-style: none;
padding: 2px;
margin: 0;
display: block;
outline: none;
}
.ui-menu .ui-menu {
margin-top: -3px;
position: absolute;
}
.ui-menu .ui-menu-item {
margin: 0;
padding: 0;
width: 100%;
/* support: IE10, see #8844 */
list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);
}
.ui-menu .ui-menu-divider {
margin: 5px -2px 5px -2px;
height: 0;
font-size: 0;
line-height: 0;
border-width: 1px 0 0 0;
}
.ui-menu .ui-menu-item a {
text-decoration: none;
display: block;
padding: 2px .4em;
line-height: 1.5;
min-height: 0; /* support: IE7 */
font-weight: normal;
}
.ui-menu .ui-menu-item a.ui-state-focus,
.ui-menu .ui-menu-item a.ui-state-active {
font-weight: normal;
margin: -1px;
}
.ui-menu .ui-state-disabled {
font-weight: normal;
margin: .4em 0 .2em;
line-height: 1.5;
}
.ui-menu .ui-state-disabled a {
cursor: default;
}
/* icon support */
.ui-menu-icons {
position: relative;
}
.ui-menu-icons .ui-menu-item a {
position: relative;
padding-left: 2em;
}
/* left-aligned */
.ui-menu .ui-icon {
position: absolute;
top: .2em;
left: .2em;
}
/* right-aligned */
.ui-menu .ui-menu-icon {
position: static;
float: right;
}
/* Component containers
----------------------------------*/
.ui-widget {
font-family: Verdana,Arial,sans-serif;
font-size: 1.1em;
}
.ui-widget .ui-widget {
font-size: 1em;
}
.ui-widget input,
.ui-widget select,
.ui-widget textarea,
.ui-widget button {
font-family: Verdana,Arial,sans-serif;
font-size: 1em;
}
.ui-widget-content {
border: 1px solid #aaaaaa;
background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;
color: #222222;
}
.ui-widget-content a {
color: #222222;
}
.ui-widget-header {
border: 1px solid #aaaaaa;
background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;
color: #222222;
font-weight: bold;
}
.ui-widget-header a {
color: #222222;
}
/* Interaction states
----------------------------------*/
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default {
border: 1px solid #d3d3d3;
background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;
font-weight: normal;
color: #555555;
}
.ui-state-default a,
.ui-state-default a:link,
.ui-state-default a:visited {
color: #555555;
text-decoration: none;
}
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus {
border: 1px solid #999999;
background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;
font-weight: normal;
color: #212121;
}
.ui-state-hover a,
.ui-state-hover a:hover,
.ui-state-hover a:link,
.ui-state-hover a:visited,
.ui-state-focus a,
.ui-state-focus a:hover,
.ui-state-focus a:link,
.ui-state-focus a:visited {
color: #212121;
text-decoration: none;
}
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active {
border: 1px solid #aaaaaa;
background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;
font-weight: normal;
color: #212121;
}
.ui-state-active a,
.ui-state-active a:link,
.ui-state-active a:visited {
color: #212121;
text-decoration: none;
}
/* Interaction Cues
----------------------------------*/
.ui-state-highlight,
.ui-widget-content .ui-state-highlight,
.ui-widget-header .ui-state-highlight {
border: 1px solid #fcefa1;
background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;
color: #363636;
}
.ui-state-highlight a,
.ui-widget-content .ui-state-highlight a,
.ui-widget-header .ui-state-highlight a {
color: #363636;
}
.ui-state-error,
.ui-widget-content .ui-state-error,
.ui-widget-header .ui-state-error {
border: 1px solid #cd0a0a;
background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;
color: #cd0a0a;
}
.ui-state-error a,
.ui-widget-content .ui-state-error a,
.ui-widget-header .ui-state-error a {
color: #cd0a0a;
}
.ui-state-error-text,
.ui-widget-content .ui-state-error-text,
.ui-widget-header .ui-state-error-text {
color: #cd0a0a;
}
.ui-priority-primary,
.ui-widget-content .ui-priority-primary,
.ui-widget-header .ui-priority-primary {
font-weight: bold;
}
.ui-priority-secondary,
.ui-widget-content .ui-priority-secondary,
.ui-widget-header .ui-priority-secondary {
opacity: .7;
filter:Alpha(Opacity=70);
font-weight: normal;
}
.ui-state-disabled,
.ui-widget-content .ui-state-disabled,
.ui-widget-header .ui-state-disabled {
opacity: .35;
filter:Alpha(Opacity=35);
background-image: none;
}
.ui-state-disabled .ui-icon {
filter:Alpha(Opacity=35); /* For IE8 - See #6059 */
}
/* Icons
----------------------------------*/
/* states and images */
.ui-icon {
width: 16px;
height: 16px;
}
.ui-icon,
.ui-widget-content .ui-icon {
background-image: url(images/ui-icons_222222_256x240.png);
}
.ui-widget-header .ui-icon {
background-image: url(images/ui-icons_222222_256x240.png);
}
.ui-state-default .ui-icon {
background-image: url(images/ui-icons_888888_256x240.png);
}
.ui-state-hover .ui-icon,
.ui-state-focus .ui-icon {
background-image: url(images/ui-icons_454545_256x240.png);
}
.ui-state-active .ui-icon {
background-image: url(images/ui-icons_454545_256x240.png);
}
.ui-state-highlight .ui-icon {
background-image: url(images/ui-icons_2e83ff_256x240.png);
}
.ui-state-error .ui-icon,
.ui-state-error-text .ui-icon {
background-image: url(images/ui-icons_cd0a0a_256x240.png);
}
/* positioning */
.ui-icon-blank { background-position: 16px 16px; }
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-on { background-position: -96px -144px; }
.ui-icon-radio-off { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-all,
.ui-corner-top,
.ui-corner-left,
.ui-corner-tl {
border-top-left-radius: 4px;
}
.ui-corner-all,
.ui-corner-top,
.ui-corner-right,
.ui-corner-tr {
border-top-right-radius: 4px;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-left,
.ui-corner-bl {
border-bottom-left-radius: 4px;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-right,
.ui-corner-br {
border-bottom-right-radius: 4px;
}
/* Overlays */
.ui-widget-overlay {
background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
opacity: .3;
filter: Alpha(Opacity=30);
}
.ui-widget-shadow {
margin: -8px 0 0 -8px;
padding: 8px;
background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
opacity: .3;
filter: Alpha(Opacity=30);
border-radius: 8px;
}

File diff suppressed because one or more lines are too long

8
themes/default/css/style.css Normal file → Executable file
View File

@ -347,3 +347,11 @@ a.reading-time span {
margin-left: -30px;
}
.two-column {
display: block;
width: 50%;
paddig-right: 20px;
float: left;
vertical-align: top;
}

10
themes/default/edit-tags.twig Normal file → Executable file
View File

@ -5,6 +5,10 @@
{% endblock %}
{% block content %}
<script src="{{ poche_url }}/themes/default/js/jquery-ui-1.10.4.custom.min.js"></script>
<script src="{{ poche_url }}/themes/default/js/autoCompleteTags.js"></script>
<link rel="stylesheet" href="{{ poche_url }}/themes/default/css/jquery-ui-1.10.4.custom.min.css" media="all">
<div id="article">
<header class="mbm">
<h1>{{ entry.title|raw }}</h1>
@ -17,13 +21,15 @@ no tags
<ul>
{% for tag in tags %}<li>{{ tag.value }} <a href="./?action=remove_tag&amp;tag_id={{ tag.id }}&amp;id={{ entry_id }}">✘</a></li>{% endfor %}
</ul>
<form method="post" action="./?action=add_tag">
<form method="post" action="./?action=add_tag" id="editTags">
<input type="hidden" name="entry_id" value="{{ entry_id }}" />
<label for="value">Add tags: </label>
<input type="text" placeholder="interview, editorial, video" id="value" name="value" required="required" />
<input type="submit" value="Tag" />
<p>{% trans "You can enter multiple tags, separated by commas." %}</p>
<p>{% trans "Start typing for auto complete." %}<br>
{% trans "You can enter multiple tags, separated by commas." %}</p>
</form>
<br>
<a href="./?view=view&id={{ entry_id }}">&laquo; {% trans "return to article" %}</a>
{% endblock %}

View File

@ -0,0 +1,47 @@
jQuery(function($) {
function split( val ) {
return val.split( /,\s*/ );
}
function extractLast( term ) {
return split( term ).pop();
}
$("#value").bind("keydown", function(event) {
if (event.keyCode === $.ui.keyCode.TAB && $(this).data("ui-autocomplete").menu.active) {
event.preventDefault();
}
}).autocomplete({
source : function(request, response) {
$.getJSON("./?view=tags", {
term : extractLast(request.term),
//id: $(':hidden#entry_id').val()
}, response);
},
search : function() {
// custom minLength
var term = extractLast(this.value);
if (term.length < 1) {
return false;
}
},
focus : function() {
// prevent value inserted on focus
return false;
},
select : function(event, ui) {
var terms = split(this.value);
// remove the current input
terms.pop();
// add the selected item
terms.push(ui.item.value);
// add placeholder to get the comma-and-space at the end
terms.push("");
this.value = terms.join(", ");
return false;
}
});
});

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

12
themes/default/tags.twig Normal file → Executable file
View File

@ -4,5 +4,15 @@
{% include '_menu.twig' %}
{% endblock %}
{% block content %}
{% for tag in tags %}<a href="./?view=tag&amp;id={{ tag.id }}">{{ tag.value }}</a> {% if token != '' %}<a href="?feed&amp;type=tag&amp;user_id={{ user_id }}&amp;tag_id={{ tag.id }}&amp;token={{ token }}" target="_blank"><img src="{{ poche_url }}/themes/{{ theme }}/img/{{ theme }}/rss.png" /></a>{% endif %} {% endfor %}
<div class="two-column">
{% for tag in tags %}
<a href="./?view=tag&amp;id={{ tag.id }}">{{ tag.value }}</a> ({{ tag.entriescount }}) {% if token != '' %}<a href="?feed&amp;type=tag&amp;user_id={{ user_id }}&amp;tag_id={{ tag.id }}&amp;token={{ token }}" target="_blank"><img src="{{ poche_url }}/themes/{{ theme }}/img/{{ theme }}/rss.png" /></a>{% endif %}
<br>
{% if loop.index == '%d'|format(loop.length/2 + 0.5) %}
</div><div class="two-column">
{% endif %}
{% endfor %}
</div>
{% endblock %}