if ($inline) {
$cd .= "inline";
} else{
- $cd .= "attached";
+ $cd .= "attachment";
}
if ($fileName) {
$cd .= '; filename="' . $fileName . '"';
--- /dev/null
+body: //div[@class='panel-panel panel-main-3 content-column']
+title: //div[@class='panel-pane pane-node-title']
+date: //div[@class='updated-date']
+
+test_url: https://www.aclu.org/blog/free-future/chinas-nightmarish-citizen-scores-are-warning-americans
--- /dev/null
+body: //div[@class='text_art']
+strip: //div[@class='cab_datos_opinion']
+strip: //div[@class='sumario2_left']
+
+test_url: http://www.bez.es/382758623/otros-fracasos-empresas.html
# Instapaper gets this back to front and only gets the blog title instead of the article title.
-title: substring-before(//title, '-')
+title: //div[@class='title']
author: //a[ contains(@href, '/people') ]
-body: //div[ @class='post' ]
+body: //div[ @class='post-content' ]
# Date is impossible to retrieve since they use those stupid "fuzzy" dates, inserted through javascript, at posterous.
-test_url: http://blog.cloudflare.com/understanding-analytics-when-is-a-page-view-n
\ No newline at end of file
+test_url: http://blog.cloudflare.com/understanding-analytics-when-is-a-page-view-n
+test_url: https://blog.cloudflare.com/sha-1-deprecation-no-browser-left-behind
--- /dev/null
+body: //div[@class="pf-content"]
+
+test_url: http://www.caffereggio.net/2016/01/16/115327/
title: //h1[contains(@class, "entry-title")]
author: //p[contains(@class, "byline")]
-# blog articles (chronicle.com/blogs/*)
-body: //div[contains(@class, "abstract")]
-date: //p[contains(@class, "time")]
-
# all (?) other articles
-body: //div[@id="article-body"]
+body: //div[@class="content-item__story"]
date: //p[contains(@class, "dateline")]
-# remove sidebars containing images (I assume this is desired for Instapaper)
-strip: //div[@id="related"]
-strip: //div[contains(@class, "image")]
-
-# note that if you're not a Chronicle subscriber (personally or institutionally), you'll only see the first couple of paragraphs of the article, and Instapaper will display that with some crap above and below. thank goodness for that bookmarklet
-test_url: http://chronicle.com/article/In-a-Land-of-Second-Chances/128375/
\ No newline at end of file
+# note that if you're not a Chronicle subscriber (personally or institutionally), you'll only see the first couple of paragraphs of the article, and Instapaper $
+test_url: http://chronicle.com/article/In-a-Land-of-Second-Chances/128375/
+test_url: http://chronicle.com/blogs/wiredcampus/university-run-boot-camps-offer-students-marketable-skills-but-not-course-credit/57494
--- /dev/null
+body: //div[@class='widget full_article']
+strip: //div[@class='Herramientas']
+
+test_url: http://www.deia.com/2015/10/03/politica/euskadi/el-envilecimiento-de-la-politica-y-de-los-medios-de-comunicacion
--- /dev/null
+body: //div[@class='field__items']
+title: //div[@class='art_titulo']
+
+test_url: https://www.diagonalperiodico.net/global/27947-cuanto-mas-tiempo-nos-aferremos-este-sistema-peor-y-menores-seran-nuestras-opciones
--- /dev/null
+body: //div[@class='blog-content']
+
+test_url: http://www.esglobal.org/el-caos-en-el-este-los-socios-de-la-ue-necesitan-que-se-les-preste-atencion/
--- /dev/null
+body: //div[@class='field-items']
+title: //div[@class='title']
+
+test_url: https://lawfareblog.com/limits-panopticon
--- /dev/null
+single_page_link: concat(link[@rel="canonical"], "?page=full")
+
+test_url: http://www.letraslibres.com/revista/dossier/quien-manda-en-europa
--- /dev/null
+body: //div[contains(@class,'widget full_article')]
+
+test_url: http://www.naiz.eus/eu/actualidad/noticia/20151002/adegi-afirma-que-los-jovenes-viven-una-vida-muy-comoda-y-no-tienen-hambre-para-emprender#
+test_url: http://www.naiz.eus/eu/actualidad/noticia/20151012/podemos-euskadi-critica-que-otegi-y-sus-companeros-quieran-pasar-por-grandes-pacifistas
--- /dev/null
+body: //div[@id='article']
+
+test_url: http://www.pieria.co.uk/articles/need_a_fiscal_rule_george__try_get_the_economy_growing
--- /dev/null
+title: //div[@class='entry-title']
+author: //div[@class='entry-author']
+date: //div[@class='entry-time']
+body: //div[@class='entry-content']
+
+test_url: https://popehat.com/2015/12/16/eric-posner-the-first-amendments-nemesis/
--- /dev/null
+title: //div[@class='entry-title']
+author: //div[@class='entry-author']
+date: //div[@class='entry-time']
+body: //div[@class='entry-content']
+
+test_url: http://rasgolatente.es/estupidez-psicologia-estupidos/
--- /dev/null
+body: //div[@class='entry-content']
+
+test_url: http://www.thenews.coop/98221/news/co-operatives/jeremy-corbyn-needs-co-op-movement/
--- /dev/null
+body: //div[@class="col-md-12 radix-layouts-contentheader panel-panel"]
+strip: //div[@class="htmlContent subscribe_box"]
+test_url: https://www.timeshighereducation.com/blog/jeremy-corbyn-serious-about-free-higher-education
--- /dev/null
+title: //meta[@name='Title']/@content
+author: //meta[@name='Author']/@content
+date: //meta[@name='DisplayDate']/@content
+body: //div[@class='article-content']
+strip: //div[@class='article-sidebar']
+
+test_url: https://www.wired.de/collection/latest/der-vw-skandal-zeigt-ohne-vertrauen-ist-software-nicht-mehr-als-bose-magie
+
{
case 'add':
$content = Tools::getPageContent($url);
- $title = ($content['rss']['channel']['item']['title'] != '') ? $content['rss']['channel']['item']['title'] : _('Untitled');
+ $title = ($content['rss']['channel']['item']['title'] != '') ? $content['rss']['channel']['item']['title'] : parse_url($url, PHP_URL_HOST);
$body = $content['rss']['channel']['item']['description'];
// clean content from prevent xss attack
$entries = $this->store->retrieveAllWithTags($this->user->getId());
if ($entries) {
echo $this->tpl->render('export.twig', array(
- 'export' => Tools::renderJson($entries),
+ 'export' => Tools::renderJson(Tools::utf8ize($entries)),
));
Tools::logm('export view');
} else {
public static function getFile($url)
{
$timeout = 15;
- $useragent = "Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0";
+ $useragent = "Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0";
if (in_array ('curl', get_loaded_extensions())) {
# Fetch feed from URL
exit();
}
+ /**
+ * UTF-8 encode array of string
+ *
+ * @param $data
+ */
+ public static function utf8ize($data)
+ {
+ if (is_array($data))
+ {
+ foreach ($data as $k => $v)
+ {
+ $data[$k] = self::utf8ize($v);
+ }
+ }
+ else if (is_string ($data) && '' == mb_detect_encoding($data))
+ {
+ return utf8_encode($data);
+ }
+ return $data;
+ }
+
/**
* Create new line in log file
*
<li><label for="mysql_password">Password</label> <input type="password" placeholder="p4ssw0rd" id="mysql_password" name="mysql_password" /></li>
<li><label for="mysql_utf8_mb4">Use UTF-8 MB4</label> <input id="mysql_utf8_mb4" type="checkbox" name="mysql_utf8_mb4">
<div id="utf8_mb4_infos"><em>Warning :</em> UTF-8 MB4 is used to fully support unicode characters. It is available only with MySQL starting with version 5.5.3.
- Install will failed if you check this while using an older MySQL server.</div></li>
+ Install will fail if you check this while using an older MySQL server.</div></li>
</ul>
<?php } else { ?>
<div class="messages notice">
<script>
var baseurl = "{{ poche_url }}";
- console.log(baseurl);
var data = {
"name": "wallabag",
+.messages {
+ display: block;
+ clear: both;
+ width: 400px;
+ margin: 10px auto 10px;
+ padding: 10px 0;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+
+.messages p {
+ margin: 3px 0 3px 10px !important;
+ padding: 0 10px 0 23px !important;
+ font-size: 14px;
+ line-height: 16px;
+}
+
.messages.error.install {
border: 1px solid #c42608;
color: #c00 !important;
border: 1px solid #6dc70c;
background: #e0fbcc !important;
text-align: left;
+}
+
+.messages.information,
+.messages.info {
+ border: 1px solid #82aee7;
+ background: #dfebfb;
}
\ No newline at end of file
{{ nb_results }} {% trans "articles" %}
{% endif %}
{% if view == 'home' or view == 'fav' or view == 'archive' %}
- <a href="?action=random&view={{ view }}" class="icon icon-random"><span> {% trans "random" %}</span></a>{% endif %}
+ <a href="?action=random&view={{ view }}" title="{% trans "random" %}" class="icon icon-random"><span> {% trans "random" %}</span></a>{% endif %}
</div>
{{ page_links | raw }}
</div>
// use keyboard to do actions
actionArticle('{{ entry.id|e }}');
-
- // swipe to right or left on mobile to navigate
- $('article').on("swiperight", function(){
- goLeft('?view=view&id={{ navigate.nextid|e }}');
- });
- $('article').on("swipeleft", function(){
- goRight('?view=view&id={{ navigate.previousid|e }}');
- });
-
</script>
{% endblock %}
<script>
var baseurl = "{{ poche_url }}";
- console.log(baseurl);
var data = {
"name": "wallabag",
- {{ messages | raw }}
\ No newline at end of file
+ {{ messages | raw }}
+ {% if view == 'home' %}
+ <div class="messages information">
+ <p><a href="http://doc.wallabag.org">wallabag v2 is out, please read the documentation to upgrade.</a></p>
+ </div>
+ {% endif %}
\ No newline at end of file
{{ nb_results }} {% trans "articles" %}
{% endif %}
{% if view == 'home' or view == 'fav' or view == 'archive' %}
- <a href="?action=random&view={{ view }}" class="icon icon-random"><span> {% trans "random" %}</span></a>{% endif %}
+ <a href="?action=random&view={{ view }}" title="{% trans "random" %}" class="icon icon-random"><span> {% trans "random" %}</span></a>{% endif %}
</div>
{{ page_links | raw }}
</div>
// Use left and right arrow to navigate on with keyboard
navigateKeyboard('?view=view&id={{ navigate.nextid|e }}','?view=view&id={{ navigate.previousid|e }}');
- // swipe to right or left on mobile to navigate
- $('article').on("swiperight", function(){
- goLeft('?view=view&id={{ navigate.nextid|e }}');
- });
- $('article').on("swipeleft", function(){
- goRight('?view=view&id={{ navigate.previousid|e }}');
- });
-
</script>
{% endblock %}