aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc
diff options
context:
space:
mode:
authorNicolas Lœuillet <nicolas@loeuillet.org>2015-08-03 13:21:11 +0200
committerNicolas Lœuillet <nicolas@loeuillet.org>2015-08-03 13:21:11 +0200
commitc766284d522206578e7ec154961e0fce456f70c8 (patch)
treea5246151bf8278a0e8053b9dd1ce9d770073c50b /inc
parentc0cb52c07439c974075c302a190a034a8cce4f92 (diff)
parente968ec6c2244aee600358b3c87648b2409c97945 (diff)
downloadwallabag-1.9.1.tar.gz
wallabag-1.9.1.tar.zst
wallabag-1.9.1.zip
Merge pull request #1267 from wallabag/dev1.9.1
1.9.1
Diffstat (limited to 'inc')
-rw-r--r--inc/3rdparty/Session.class.php4
-rwxr-xr-xinc/3rdparty/site_config/standard/20min.ch.txt24
-rwxr-xr-xinc/3rdparty/site_config/standard/24.ae.txt8
-rwxr-xr-xinc/3rdparty/site_config/standard/9gag.com.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/ad.nl.txt7
-rwxr-xr-xinc/3rdparty/site_config/standard/albayan.ae.txt2
-rwxr-xr-xinc/3rdparty/site_config/standard/androidpolice.com.txt3
-rwxr-xr-xinc/3rdparty/site_config/standard/artofmanliness.com.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/au.businessinsider.com.txt12
-rwxr-xr-xinc/3rdparty/site_config/standard/au.news.yahoo.com.txt4
-rw-r--r--inc/3rdparty/site_config/standard/bastamag.net.txt10
-rwxr-xr-xinc/3rdparty/site_config/standard/bbc.co.uk.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/bbc.com.txt6
-rw-r--r--inc/3rdparty/site_config/standard/bearmetal.eu.txt6
-rw-r--r--inc/3rdparty/site_config/standard/blog.niqnutn.com.txt9
-rwxr-xr-xinc/3rdparty/site_config/standard/blogs.msdn.com.txt4
-rwxr-xr-xinc/3rdparty/site_config/standard/brandeins.de.txt14
-rwxr-xr-xinc/3rdparty/site_config/standard/brokernews.com.au.txt2
-rwxr-xr-xinc/3rdparty/site_config/standard/business.time.com.txt17
-rw-r--r--inc/3rdparty/site_config/standard/captaineconomics.fr.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/choice.com.au.txt4
-rw-r--r--inc/3rdparty/site_config/standard/cloudacademy.com.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/cnet.com.au.txt17
-rw-r--r--inc/3rdparty/site_config/standard/codebase64.org.txt9
-rwxr-xr-xinc/3rdparty/site_config/standard/computerbase.de.txt4
-rwxr-xr-xinc/3rdparty/site_config/standard/contrepoints.org.txt21
-rwxr-xr-xinc/3rdparty/site_config/standard/cooper.com.txt4
-rwxr-xr-xinc/3rdparty/site_config/standard/cwnp.com.txt14
-rw-r--r--inc/3rdparty/site_config/standard/cyrille-borne.com.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/dailymail.co.uk.txt9
-rwxr-xr-xinc/3rdparty/site_config/standard/dailytelegraph.com.au.txt5
-rwxr-xr-xinc/3rdparty/site_config/standard/deadspin.com.txt1
-rwxr-xr-xinc/3rdparty/site_config/standard/derbund.ch.txt13
-rw-r--r--inc/3rdparty/site_config/standard/des-livres-pour-changer-de-vie.fr.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/designbuildsource.com.au.txt2
-rwxr-xr-xinc/3rdparty/site_config/standard/dilbert.com.txt12
-rwxr-xr-xinc/3rdparty/site_config/standard/dn.se.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/economie.gouv.fr.txt4
-rwxr-xr-xinc/3rdparty/site_config/standard/entwickler.de.txt7
-rw-r--r--inc/3rdparty/site_config/standard/espacepolitique.revues.org.txt10
-rwxr-xr-xinc/3rdparty/site_config/standard/explosm.net.txt4
-rwxr-xr-xinc/3rdparty/site_config/standard/facebook.com.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/fastcompany.com.txt34
-rwxr-xr-xinc/3rdparty/site_config/standard/fok.nl.txt4
-rwxr-xr-xinc/3rdparty/site_config/standard/forsvaret.no.txt3
-rwxr-xr-xinc/3rdparty/site_config/standard/france24.com.txt14
-rw-r--r--inc/3rdparty/site_config/standard/frankdenneman.nl.txt2
-rw-r--r--inc/3rdparty/site_config/standard/frontburner.dmagazine.com.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/galwayindependent.com.txt3
-rwxr-xr-xinc/3rdparty/site_config/standard/gameblog.fr.txt4
-rw-r--r--inc/3rdparty/site_config/standard/ganglia.info.txt2
-rwxr-xr-xinc/3rdparty/site_config/standard/gawker.com.txt2
-rwxr-xr-xinc/3rdparty/site_config/standard/getpocket.com.txt1
-rwxr-xr-xinc/3rdparty/site_config/standard/gist.github.com.txt8
-rwxr-xr-xinc/3rdparty/site_config/standard/gizmodo.com.au.txt8
-rwxr-xr-xinc/3rdparty/site_config/standard/gizmodo.com.txt2
-rwxr-xr-xinc/3rdparty/site_config/standard/globalgrind.com.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/gocomics.com.txt5
-rw-r--r--inc/3rdparty/site_config/standard/gokulkrishh.github.io.txt6
-rw-r--r--inc/3rdparty/site_config/standard/hackersrepublic.org.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/help.fivefilters.org.txt2
-rwxr-xr-xinc/3rdparty/site_config/standard/heraldsun.com.au.txt12
-rwxr-xr-xinc/3rdparty/site_config/standard/hiiraan.com.txt10
-rw-r--r--inc/3rdparty/site_config/standard/iceblog.free.fr.txt7
-rwxr-xr-xinc/3rdparty/site_config/standard/independent.co.uk.txt11
-rwxr-xr-xinc/3rdparty/site_config/standard/io9.com.txt1
-rwxr-xr-xinc/3rdparty/site_config/standard/ippmedia.com.txt4
-rw-r--r--inc/3rdparty/site_config/standard/iso.500px.com.txt6
-rw-r--r--inc/3rdparty/site_config/standard/it-connect.fr.txt9
-rwxr-xr-xinc/3rdparty/site_config/standard/itnews.com.au.txt5
-rwxr-xr-xinc/3rdparty/site_config/standard/jalopnik.com.txt3
-rwxr-xr-xinc/3rdparty/site_config/standard/jezebel.com.txt1
-rw-r--r--inc/3rdparty/site_config/standard/jsforcats.com.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/kotaku.com.txt3
-rw-r--r--inc/3rdparty/site_config/standard/lapin-blanc.blogs.docteo.net.txt6
-rw-r--r--inc/3rdparty/site_config/standard/lececil.org.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/lefigaro.fr.txt5
-rwxr-xr-xinc/3rdparty/site_config/standard/lifehacker.com.txt8
-rwxr-xr-xinc/3rdparty/site_config/standard/linuxjournal.com.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/m.bbc.co.uk.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/m.facebook.com.txt12
-rwxr-xr-xinc/3rdparty/site_config/standard/m.theregister.co.uk.txt4
-rwxr-xr-xinc/3rdparty/site_config/standard/marketingmag.com.au.txt1
-rwxr-xr-xinc/3rdparty/site_config/standard/medium.com.txt2
-rwxr-xr-xinc/3rdparty/site_config/standard/menshealth.com.sg.txt9
-rw-r--r--inc/3rdparty/site_config/standard/metrocop.net.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/mitchellrepublic.com.txt3
-rwxr-xr-xinc/3rdparty/site_config/standard/mobile.nytimes.com.txt3
-rwxr-xr-xinc/3rdparty/site_config/standard/moneymanagement.com.au.txt2
-rw-r--r--inc/3rdparty/site_config/standard/n0where.net.txt5
-rwxr-xr-xinc/3rdparty/site_config/standard/nbnnews.com.au.txt3
-rwxr-xr-xinc/3rdparty/site_config/standard/news.com.au.txt3
-rwxr-xr-xinc/3rdparty/site_config/standard/news.menshealth.com.txt1
-rwxr-xr-xinc/3rdparty/site_config/standard/news.ninemsn.com.au.txt3
-rwxr-xr-xinc/3rdparty/site_config/standard/parool.nl.txt7
-rwxr-xr-xinc/3rdparty/site_config/standard/perthnow.com.au.txt12
-rwxr-xr-xinc/3rdparty/site_config/standard/planetsave.com.txt1
-rwxr-xr-xinc/3rdparty/site_config/standard/presseportal.de.txt11
-rw-r--r--inc/3rdparty/site_config/standard/pérotin.com.txt6
-rw-r--r--inc/3rdparty/site_config/standard/quechoisir.org.txt10
-rwxr-xr-xinc/3rdparty/site_config/standard/quora.com.txt18
-rwxr-xr-xinc/3rdparty/site_config/standard/rockpapershotgun.com.txt4
-rwxr-xr-xinc/3rdparty/site_config/standard/saadaalnews.net.txt11
-rwxr-xr-xinc/3rdparty/site_config/standard/smh.com.au.txt14
-rwxr-xr-xinc/3rdparty/site_config/standard/smh.drive.com.au.txt13
-rwxr-xr-xinc/3rdparty/site_config/standard/smithsonianmag.com.txt5
-rwxr-xr-xinc/3rdparty/site_config/standard/snip.ly.txt3
-rwxr-xr-xinc/3rdparty/site_config/standard/soundcity.tv.txt3
-rwxr-xr-xinc/3rdparty/site_config/standard/spiegel.de.txt25
-rw-r--r--inc/3rdparty/site_config/standard/spiil.org.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/srf.ch.txt24
-rwxr-xr-xinc/3rdparty/site_config/standard/sueddeutsche.de.txt2
-rwxr-xr-xinc/3rdparty/site_config/standard/sunshinecoastdaily.com.au.txt10
-rwxr-xr-xinc/3rdparty/site_config/standard/sz.de.txt2
-rwxr-xr-xinc/3rdparty/site_config/standard/tagesanzeiger.ch.txt14
-rwxr-xr-xinc/3rdparty/site_config/standard/tagesschau.de.txt29
-rwxr-xr-xinc/3rdparty/site_config/standard/taz.de.txt3
-rwxr-xr-xinc/3rdparty/site_config/standard/theatlantic.com.txt9
-rwxr-xr-xinc/3rdparty/site_config/standard/theaustralian.com.au.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/thebostonchannel.com.txt4
-rwxr-xr-xinc/3rdparty/site_config/standard/theguardian.com.txt4
-rwxr-xr-xinc/3rdparty/site_config/standard/theregister.co.uk.txt15
-rwxr-xr-xinc/3rdparty/site_config/standard/theverge.com.txt2
-rwxr-xr-xinc/3rdparty/site_config/standard/titanic-magazin.de.txt8
-rw-r--r--inc/3rdparty/site_config/standard/tofugu.com.txt3
-rwxr-xr-xinc/3rdparty/site_config/standard/truongtx.me.txt9
-rwxr-xr-xinc/3rdparty/site_config/standard/utdailybeacon.com.txt7
-rwxr-xr-xinc/3rdparty/site_config/standard/volkskrant.nl.txt15
-rwxr-xr-xinc/3rdparty/site_config/standard/warnerbros.fr.txt5
-rwxr-xr-xinc/3rdparty/site_config/standard/washingtonpost.com.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/watoday.com.au.txt7
-rwxr-xr-xinc/3rdparty/site_config/standard/weeklytimesnow.com.au.txt4
-rwxr-xr-xinc/3rdparty/site_config/standard/westernadvocate.com.au.txt11
-rwxr-xr-xinc/3rdparty/site_config/standard/wsj.com.txt29
-rw-r--r--inc/3rdparty/site_config/standard/yosko.net.txt6
-rwxr-xr-xinc/3rdparty/site_config/standard/yourerie.com.txt4
-rwxr-xr-xinc/3rdparty/site_config/standard/zeit.de.txt7
-rwxr-xr-xinc/poche/Database.class.php165
-rwxr-xr-xinc/poche/Poche.class.php177
-rwxr-xr-xinc/poche/Routing.class.php16
-rwxr-xr-xinc/poche/Tools.class.php39
-rw-r--r--inc/poche/WallabagEBooks.class.php16
-rwxr-xr-xinc/poche/config.inc.default.php3
143 files changed, 1194 insertions, 232 deletions
diff --git a/inc/3rdparty/Session.class.php b/inc/3rdparty/Session.class.php
index b56e4c54..6ff73a76 100644
--- a/inc/3rdparty/Session.class.php
+++ b/inc/3rdparty/Session.class.php
@@ -51,9 +51,9 @@ class Session
51 public static function init($longlastingsession = false) 51 public static function init($longlastingsession = false)
52 { 52 {
53 //check if session name is correct 53 //check if session name is correct
54 if ( (session_id() && !empty(self::$sessionName) && session_name()!=self::$sessionName) || $longlastingsession ) { 54 /*if ( (session_id() && !empty(self::$sessionName) && session_name()!=self::$sessionName) || $longlastingsession ) {
55 session_destroy(); 55 session_destroy();
56 } 56 }*/
57 57
58 // Force cookie path (but do not change lifetime) 58 // Force cookie path (but do not change lifetime)
59 $cookie = session_get_cookie_params(); 59 $cookie = session_get_cookie_params();
diff --git a/inc/3rdparty/site_config/standard/20min.ch.txt b/inc/3rdparty/site_config/standard/20min.ch.txt
new file mode 100755
index 00000000..cd8e3fc0
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/20min.ch.txt
@@ -0,0 +1,24 @@
1# Author: cirnod@gmail.com
2
3tidy: no
4prune: no
5
6title: //h1
7date: /html/body/div[3]/div[1]/div[6]/div/div[1]/div[2]/div[1]/div/p
8body: //div[@class='published clearfix'] | //div[@class='story_titles']/h3 | //div[@class='story_text']
9
10# General Cleanup
11strip_id_or_class: info_panel
12strip_id_or_class: info_poll
13strip_id_or_class: teaser
14strip_id_or_class: panelbox
15strip_id_or_class: polls
16strip_id_or_class: warning
17strip_id_or_class: vplaceholder
18
19# visual removal only -> complete removal doesn't work
20replace_string(Print</a>): </a>
21
22# Try yourself
23test_url: http://www.20min.ch/wissen/news/story/31588952
24test_url: http://www.20min.ch/digital/dossier/apple/story/So-einfach-laesst-sich-das-iPhone-6-Plus-verbiegen-24651169
diff --git a/inc/3rdparty/site_config/standard/24.ae.txt b/inc/3rdparty/site_config/standard/24.ae.txt
new file mode 100755
index 00000000..6e515076
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/24.ae.txt
@@ -0,0 +1,8 @@
1title: //div[@id='DivTitle']
2body: //div[@id='divImages' or @id='Divkhabarcontent']
3author: //div[@id='DivAuthor']
4
5prune: no
6
7test_url: http://24.ae/article.aspx?ArticleId=123304
8test_url: http://24.ae/rss.aspx?pageId=30
diff --git a/inc/3rdparty/site_config/standard/9gag.com.txt b/inc/3rdparty/site_config/standard/9gag.com.txt
new file mode 100755
index 00000000..4ebb62ad
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/9gag.com.txt
@@ -0,0 +1,6 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2F9gag.com%2Fgag%2FaDwQnO7
4
5body: //div[contains(concat(' ',normalize-space(@class),' '),' badge-post-container ')]
6test_url: http://9gag.com/gag/aDwQnO7
diff --git a/inc/3rdparty/site_config/standard/ad.nl.txt b/inc/3rdparty/site_config/standard/ad.nl.txt
new file mode 100755
index 00000000..422faa57
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/ad.nl.txt
@@ -0,0 +1,7 @@
1#bypass cookie check
2single_page_link: //a[contains(@href, '/acceptCookieCheck.do?url=')]
3
4test_url: http://www.ad.nl/ad/nl/10444/Offside/article/detail/4043834/2015/05/31/Dani-Alves-voetbalt-met-drol-op-zijn-hoofd.dhtml
5test_contains: De nieuwe coupe van Alves
6
7test_url: http://www.ad.nl/digitaal/rss.xml \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/albayan.ae.txt b/inc/3rdparty/site_config/standard/albayan.ae.txt
index f6c093d2..d52700b3 100755
--- a/inc/3rdparty/site_config/standard/albayan.ae.txt
+++ b/inc/3rdparty/site_config/standard/albayan.ae.txt
@@ -1,5 +1,7 @@
1body: //div[@id='main-column']//div[@class='content'] 1body: //div[@id='main-column']//div[@class='content']
2 2
3strip_id_or_class: social-buttons
4
3prune: no 5prune: no
4 6
5test_url: http://www.albayan.ae/across-the-uae/education/2013-08-29-1.1949645 7test_url: http://www.albayan.ae/across-the-uae/education/2013-08-29-1.1949645
diff --git a/inc/3rdparty/site_config/standard/androidpolice.com.txt b/inc/3rdparty/site_config/standard/androidpolice.com.txt
index 8f9b1a21..660f29d9 100755
--- a/inc/3rdparty/site_config/standard/androidpolice.com.txt
+++ b/inc/3rdparty/site_config/standard/androidpolice.com.txt
@@ -1,5 +1,6 @@
1body: //div[@class='post_content'] 1body: //div[@class='post_content']
2date: //div[@class='date_day'] | div[@class='date_month'] 2date: //div[@class='date_day'] | div[@class='date_month']
3strip_id_or_class: author-box
4author: //h2[@class='author-box-heading']/a
3 5
4test_url: http://www.androidpolice.com/2014/03/30/music-boss-for-pebble-can-now-control-playback-and-volume-on-chromecast-content-from-your-smartwatch/ 6test_url: http://www.androidpolice.com/2014/03/30/music-boss-for-pebble-can-now-control-playback-and-volume-on-chromecast-content-from-your-smartwatch/
5
diff --git a/inc/3rdparty/site_config/standard/artofmanliness.com.txt b/inc/3rdparty/site_config/standard/artofmanliness.com.txt
new file mode 100755
index 00000000..b29ea0db
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/artofmanliness.com.txt
@@ -0,0 +1,6 @@
1parser: html5php
2date: //article/p[contains(@class, 'single-date')]
3author: //article/p[contains(@class, 'byline')]
4
5test_url: http://www.artofmanliness.com/2013/01/31/relationship-red-flags/
6test_contains: It seems that once we get close to a person \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/au.businessinsider.com.txt b/inc/3rdparty/site_config/standard/au.businessinsider.com.txt
new file mode 100755
index 00000000..46bcddf2
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/au.businessinsider.com.txt
@@ -0,0 +1,12 @@
1title://div[@class="sl-layout-post"]/h1
2body: //div[@id='content_post']
3strip: //div[contains(@class, "post-sidebar")]
4strip: //div[@id='related-links']
5strip: //img[@class='size_xlarge']
6author://div[@class="byline"]/a
7date://div[@class="byline"]/span[@class="date"]
8prune: no
9tidy: no
10
11
12test_url: http://www.businessinsider.com/microsoft-just-put-one-of-its-hardcore-technical-geniuses-on-xbox-2012-1
diff --git a/inc/3rdparty/site_config/standard/au.news.yahoo.com.txt b/inc/3rdparty/site_config/standard/au.news.yahoo.com.txt
new file mode 100755
index 00000000..8e84cbbb
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/au.news.yahoo.com.txt
@@ -0,0 +1,4 @@
1strip: //a[contains(text(), "RELATED:")]
2author: //div[@class="info"]//span[@class="association printer-source"]
3author: //div[@class="info"]//span[@class="stamp printer-date"]
4
diff --git a/inc/3rdparty/site_config/standard/bastamag.net.txt b/inc/3rdparty/site_config/standard/bastamag.net.txt
new file mode 100644
index 00000000..142c959c
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/bastamag.net.txt
@@ -0,0 +1,10 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Fwww.bastamag.net%2FEncadrement-des-loyers-pourquoi-Anne-Hidalgo-ferait-bien-de-visiter-Vienne-l
4
5body: //div[@id='content']//article
6
7strip_id_or_class: appel-soutien
8strip_id_or_class: liste dossiers-content
9
10test_url: http://www.bastamag.net/Encadrement-des-loyers-pourquoi-Anne-Hidalgo-ferait-bien-de-visiter-Vienne-l
diff --git a/inc/3rdparty/site_config/standard/bbc.co.uk.txt b/inc/3rdparty/site_config/standard/bbc.co.uk.txt
index bad77654..7bef73ad 100755
--- a/inc/3rdparty/site_config/standard/bbc.co.uk.txt
+++ b/inc/3rdparty/site_config/standard/bbc.co.uk.txt
@@ -30,6 +30,12 @@ strip: //div[contains(@class, 'comment-introduction')]
30strip: //div[contains(@class, 'share-tools')] 30strip: //div[contains(@class, 'share-tools')]
31strip: //div[@id='also-related-links'] 31strip: //div[@id='also-related-links']
32 32
33find_string: http://ichef.bbci.co.uk/news/200/
34replace_string: http://ichef.bbci.co.uk/news/624/
35
36find_string: http://ichef.bbci.co.uk/news/304/
37replace_string: http://ichef.bbci.co.uk/news/624/
38
33strip_id_or_class: share-help 39strip_id_or_class: share-help
34strip_id_or_class: comments_module 40strip_id_or_class: comments_module
35 41
diff --git a/inc/3rdparty/site_config/standard/bbc.com.txt b/inc/3rdparty/site_config/standard/bbc.com.txt
index c04a683e..200dba63 100755
--- a/inc/3rdparty/site_config/standard/bbc.com.txt
+++ b/inc/3rdparty/site_config/standard/bbc.com.txt
@@ -33,6 +33,12 @@ strip: //div[@id='also-related-links']
33strip_id_or_class: share-help 33strip_id_or_class: share-help
34strip_id_or_class: comments_module 34strip_id_or_class: comments_module
35 35
36find_string: http://ichef.bbci.co.uk/news/200/
37replace_string: http://ichef.bbci.co.uk/news/624/
38
39find_string: http://ichef.bbci.co.uk/news/304/
40replace_string: http://ichef.bbci.co.uk/news/624/
41
36replace_string(<noscript>): <div> 42replace_string(<noscript>): <div>
37replace_string(</noscript>): </div> 43replace_string(</noscript>): </div>
38 44
diff --git a/inc/3rdparty/site_config/standard/bearmetal.eu.txt b/inc/3rdparty/site_config/standard/bearmetal.eu.txt
new file mode 100644
index 00000000..44d34655
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/bearmetal.eu.txt
@@ -0,0 +1,6 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=https%3A%2F%2Fbearmetal.eu%2Ftheden%2Fits-not-about-you%2F
4
5body: //div[contains(concat(' ',normalize-space(@class),' '),' entry-content ')]
6test_url: https://bearmetal.eu/theden/its-not-about-you/
diff --git a/inc/3rdparty/site_config/standard/blog.niqnutn.com.txt b/inc/3rdparty/site_config/standard/blog.niqnutn.com.txt
new file mode 100644
index 00000000..aa2f1865
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/blog.niqnutn.com.txt
@@ -0,0 +1,9 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Fblog.niqnutn.com%2Farticle35%2Fsteganographie-l-art-de-dissimuler-un-message
4
5body: //article[contains(concat(' ',normalize-space(@class),' '),' article-content ')]//section
6
7strip_id_or_class: sommaire
8
9test_url: http://blog.niqnutn.com/article35/steganographie-l-art-de-dissimuler-un-message
diff --git a/inc/3rdparty/site_config/standard/blogs.msdn.com.txt b/inc/3rdparty/site_config/standard/blogs.msdn.com.txt
index b2ff8332..11b8d42d 100755
--- a/inc/3rdparty/site_config/standard/blogs.msdn.com.txt
+++ b/inc/3rdparty/site_config/standard/blogs.msdn.com.txt
@@ -1,6 +1,6 @@
1title: //h3[@class="post-name"] 1title: //h3[@class="post-name"]
2author: //span[@class="user-name"] 2author: //span[@class="user-name"]
3date: //div[@class="post-date"] 3date: //div[@class="post-date"]/span[@class="value"]
4body: //div[@class="post-content user-defined-markup"] 4body: //div[@class="post-content user-defined-markup"]
5footnotes: no 5footnotes: no
6test_url: http://blogs.msdn.com/b/b8/archive/2011/10/04/designing-the-start-screen.aspx \ No newline at end of file 6test_url: http://blogs.msdn.com/b/b8/archive/2011/10/04/designing-the-start-screen.aspx
diff --git a/inc/3rdparty/site_config/standard/brandeins.de.txt b/inc/3rdparty/site_config/standard/brandeins.de.txt
index 36aa2efa..be326346 100755
--- a/inc/3rdparty/site_config/standard/brandeins.de.txt
+++ b/inc/3rdparty/site_config/standard/brandeins.de.txt
@@ -1,7 +1,9 @@
1# set body
2body: //div[@id='theContent']
3 1
4# set title 2body: //div[@class="articleTeaser"] | //section[@class="contentSection"]
5title: //div[@id='theContent']/h3 3
6strip: //div[@id='theContent']/h3 4strip: //section[@class="greenBox italic"]
7test_url: http://www.brandeins.de/archiv/magazin/gegessen-wird-immer/artikel/hunger.html \ No newline at end of file 5
6author: //div[@class="articleAuthor"]
7# no publish date on page (the articles are from a monthly periodical)
8
9test_url: http://www.brandeins.de/archiv/2015/fuehrung/ministry-group-mach-doch-mal-ne-ansage/
diff --git a/inc/3rdparty/site_config/standard/brokernews.com.au.txt b/inc/3rdparty/site_config/standard/brokernews.com.au.txt
new file mode 100755
index 00000000..814da38a
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/brokernews.com.au.txt
@@ -0,0 +1,2 @@
1author: //span[@itemprop="author"]
2date: //span[@itemprop="datePublished"]
diff --git a/inc/3rdparty/site_config/standard/business.time.com.txt b/inc/3rdparty/site_config/standard/business.time.com.txt
new file mode 100755
index 00000000..5502beae
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/business.time.com.txt
@@ -0,0 +1,17 @@
1# 2011-10-25 - carlo@... - Initial setup.
2
3single_page_link: //li[@class='print']/a/@href
4
5title: //h1
6author: //meta[@name="byline"]/@content
7date: //meta[@name="date"]/@content
8
9strip: //span[@class="see"]
10strip: //div[@class="byline"]
11strip: //div[@id="date2"]
12strip: //h1
13strip: //div[@class='post-rail-ad']
14strip: //div[@class='post-rail-content']
15strip: //aside[@class='post-rail']
16
17test_url: http://www.time.com/time/specials/packages/article/0,28804,2094921_2094923_2094924,00.html
diff --git a/inc/3rdparty/site_config/standard/captaineconomics.fr.txt b/inc/3rdparty/site_config/standard/captaineconomics.fr.txt
new file mode 100644
index 00000000..036e0281
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/captaineconomics.fr.txt
@@ -0,0 +1,6 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Fwww.captaineconomics.fr%2F-les-immigres-recemment-arrives-en-france-qui-sont-ils-insee
4
5body: //div[contains(concat(' ',normalize-space(@class),' '),' post_content ')]
6test_url: http://www.captaineconomics.fr/-les-immigres-recemment-arrives-en-france-qui-sont-ils-insee
diff --git a/inc/3rdparty/site_config/standard/choice.com.au.txt b/inc/3rdparty/site_config/standard/choice.com.au.txt
new file mode 100755
index 00000000..02714755
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/choice.com.au.txt
@@ -0,0 +1,4 @@
1
2body: //div[@id='content']//div[@id='mainBlogContentWrapper']//*[self::p or self::img or self::ul] | //div[@class='mainArticleIntro')]
3
4date: //span[@class='date']
diff --git a/inc/3rdparty/site_config/standard/cloudacademy.com.txt b/inc/3rdparty/site_config/standard/cloudacademy.com.txt
new file mode 100644
index 00000000..f5b67840
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/cloudacademy.com.txt
@@ -0,0 +1,6 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Fcloudacademy.com%2Fblog%2Fberkshelf-manage-chef-cookbooks%2F
4
5body: //div[contains(concat(' ',normalize-space(@class),' '),' entry-content ')]
6test_url: http://cloudacademy.com/blog/berkshelf-manage-chef-cookbooks/ \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/cnet.com.au.txt b/inc/3rdparty/site_config/standard/cnet.com.au.txt
new file mode 100755
index 00000000..d5719d40
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/cnet.com.au.txt
@@ -0,0 +1,17 @@
1title: //meta[@property="og:title"]/@content
2body: //div[contains(@class, 'postBody')]
3date: //div[@id='nameAndTime']/time
4author: //div[@id='nameAndTime']/span[@class='author']
5
6strip_id_or_class: image-credit
7strip_id_or_class: noAutolink
8strip_id_or_class: related
9strip_id_or_class: cite
10
11prune: no
12tidy: no
13
14# early end
15replace_string(Download today's podcast</a>): Download today's podcast</a></div></body></html>
16
17test_url: http://www.cnet.com/8301-13952_1-57367607-81/the-404-981-where-the-world-is-a-vampire-podcast/
diff --git a/inc/3rdparty/site_config/standard/codebase64.org.txt b/inc/3rdparty/site_config/standard/codebase64.org.txt
new file mode 100644
index 00000000..d992d2f1
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/codebase64.org.txt
@@ -0,0 +1,9 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Fcodebase64.org%2Fdoku.php%3Fid%3Dbase%3Ademo_coding_introduction
4
5body: //div[contains(concat(' ',normalize-space(@class),' '),' page ')]
6
7strip_id_or_class: dw__toc
8
9test_url: http://codebase64.org/doku.php?id=base:demo_coding_introduction
diff --git a/inc/3rdparty/site_config/standard/computerbase.de.txt b/inc/3rdparty/site_config/standard/computerbase.de.txt
index 5973c50b..214fcceb 100755
--- a/inc/3rdparty/site_config/standard/computerbase.de.txt
+++ b/inc/3rdparty/site_config/standard/computerbase.de.txt
@@ -2,7 +2,7 @@ title://h1
2 2
3author://div[@id="news-meta"]/a 3author://div[@id="news-meta"]/a
4 4
5body://*[@id="main"]/div[1] 5body: //div[contains(@class, 'text-content')]
6 6
7strip://*[@id="main"]/div[2] 7strip://*[@id="main"]/div[2]
8strip://*[@id="main"]/div[3] 8strip://*[@id="main"]/div[3]
@@ -15,4 +15,4 @@ strip://img
15 15
16#figures are not displayed in instapaper... 16#figures are not displayed in instapaper...
17strip://figure | //figcaption 17strip://figure | //figcaption
18test_url: http://www.computerbase.de/news/2012-06/verbraucherzentrale-mahnt-blizzard-fuer-diablo-3-ab/ \ No newline at end of file 18test_url: http://www.computerbase.de/news/2012-06/verbraucherzentrale-mahnt-blizzard-fuer-diablo-3-ab/
diff --git a/inc/3rdparty/site_config/standard/contrepoints.org.txt b/inc/3rdparty/site_config/standard/contrepoints.org.txt
new file mode 100755
index 00000000..8a6a1250
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/contrepoints.org.txt
@@ -0,0 +1,21 @@
1# Contrepoints.org
2# As of 2015-04, it's a wordpress-powered website.
3
4title: //h1[contains(concat(' ',normalize-space(@class),' '),' page-title ')]//span[contains(concat(' ',normalize-space(@class),' '),' inner-text ')]
5date: //time[contains(concat(' ',normalize-space(@class),' '),' art-date ')]
6author: //h1[contains(concat(' ',normalize-space(@class),' '),' author-name ')]
7body: //article[contains(concat(' ',normalize-space(@class),' '),' plain-art ')]
8
9# no toolbar, meta, etc, but misses excerpt
10# body: //div[contains(concat(' ',normalize-space(@class),' '),' entry ')]
11
12# Thus, we need to strip useless elements from the "plain-art"
13strip: //div[contains(concat(' ',normalize-space(@class),' '),' plain-post-topbar ')]
14strip: //div[contains(concat(' ',normalize-space(@class),' '),' single-type-block ')]
15strip: //header[contains(concat(' ',normalize-space(@class),' '),' entry-header ')]
16
17# And no pruning is needed because we stripped unwanted elements.
18prune: no
19
20test_url: http://www.contrepoints.org/2015/04/25/205709-leconomie-selon-ray-dalio
21test_url: http://www.contrepoints.org/2015/04/25/205734-huile-et-gaz-de-schiste-revolution-durable \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/cooper.com.txt b/inc/3rdparty/site_config/standard/cooper.com.txt
index a4244097..fc156f7b 100755
--- a/inc/3rdparty/site_config/standard/cooper.com.txt
+++ b/inc/3rdparty/site_config/standard/cooper.com.txt
@@ -1,4 +1,4 @@
1body: //*[contains(@class,'body')] 1body: //div[contains(@class,'post-body')]
2date: //abbr[@class='published'] 2date: //abbr[@class='published']
3 3
4test_url: http://www.cooper.com/journal/2012/08/2-weeks-left-to-win-your-way-to-the-woodstock-of-ux-coopers-ux-boot-camp.html/ \ No newline at end of file 4test_url: http://www.cooper.com/journal/2015/6/creating-personas
diff --git a/inc/3rdparty/site_config/standard/cwnp.com.txt b/inc/3rdparty/site_config/standard/cwnp.com.txt
new file mode 100755
index 00000000..169fdf84
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/cwnp.com.txt
@@ -0,0 +1,14 @@
1title: //div[@class='entry-pad']//h2
2body: //div[contains(concat(' ',normalize-space(@class),' '),' entry-pad ')]
3strip: //h1
4strip: //p
5strip: //h2
6strip: //div[@class='clear']
7
8prune: no
9tidy: no
10
11autodetect_on_failure: no
12
13test_url: https://www.cwnp.com/wotd.php
14test_url: https://www.cwnp.com/qotd.php
diff --git a/inc/3rdparty/site_config/standard/cyrille-borne.com.txt b/inc/3rdparty/site_config/standard/cyrille-borne.com.txt
new file mode 100644
index 00000000..7b41aa0b
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/cyrille-borne.com.txt
@@ -0,0 +1,6 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Fwww.cyrille-borne.com%2Farticle511%2Fun-an-de-zte-open-c-plus-tard
4
5body: //article//section
6test_url: http://www.cyrille-borne.com/article511/un-an-de-zte-open-c-plus-tard \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/dailymail.co.uk.txt b/inc/3rdparty/site_config/standard/dailymail.co.uk.txt
index cd29a4d4..8535b19f 100755
--- a/inc/3rdparty/site_config/standard/dailymail.co.uk.txt
+++ b/inc/3rdparty/site_config/standard/dailymail.co.uk.txt
@@ -7,6 +7,15 @@ strip_id_or_class: googleAds
7strip_id_or_class: digg-button 7strip_id_or_class: digg-button
8strip_id_or_class: article-icon-links-container 8strip_id_or_class: article-icon-links-container
9strip_id_or_class: clickToEnlarge 9strip_id_or_class: clickToEnlarge
10strip_id_or_class: articleIconLinksContainer
11strip_id_or_class: related-carousel
12strip_id_or_class: reader-comments
13strip_id_or_class: most-watched
14strip_id_or_class: most-read
15
16find_string:blkBorder img-share
17replace_string: nothing
18
10tidy: no 19tidy: no
11 20
12test_url: http://www.dailymail.co.uk/news/article-1375423/Royal-wedding-Texan-billionaire-Joe-Albritton-invited-Prince-Charles.html \ No newline at end of file 21test_url: http://www.dailymail.co.uk/news/article-1375423/Royal-wedding-Texan-billionaire-Joe-Albritton-invited-Prince-Charles.html \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/dailytelegraph.com.au.txt b/inc/3rdparty/site_config/standard/dailytelegraph.com.au.txt
new file mode 100755
index 00000000..571e8111
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/dailytelegraph.com.au.txt
@@ -0,0 +1,5 @@
1title: //h1[@class="heading"]
2author: //cite[@class='author']
3date: //li[contains(@class, 'date-and-time')]
4
5
diff --git a/inc/3rdparty/site_config/standard/deadspin.com.txt b/inc/3rdparty/site_config/standard/deadspin.com.txt
new file mode 100755
index 00000000..e6ca16ae
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/deadspin.com.txt
@@ -0,0 +1 @@
http_header(user-agent): PHP/5.3 \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/derbund.ch.txt b/inc/3rdparty/site_config/standard/derbund.ch.txt
new file mode 100755
index 00000000..1363eff6
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/derbund.ch.txt
@@ -0,0 +1,13 @@
1# Author: cirnod@gmail.com
2
3tidy: no
4prune: no
5
6body: //div[@id="article"]/h3 | //*[@id="mainContent"]
7
8# General Cleanup
9#strip_id_or_class: info_panel
10
11
12# Try yourself
13test_url: http://www.derbund.ch/bern/nachrichten/Fossilienforscher-stehen-auf-Heavy-Metal/story/20919522
diff --git a/inc/3rdparty/site_config/standard/des-livres-pour-changer-de-vie.fr.txt b/inc/3rdparty/site_config/standard/des-livres-pour-changer-de-vie.fr.txt
new file mode 100644
index 00000000..56b0ea27
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/des-livres-pour-changer-de-vie.fr.txt
@@ -0,0 +1,6 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Fwww.des-livres-pour-changer-de-vie.fr%2Fbit-literacy-2%2F
4
5body: //div[@id='getsocialmain']
6test_url: http://www.des-livres-pour-changer-de-vie.fr/bit-literacy-2/ \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/designbuildsource.com.au.txt b/inc/3rdparty/site_config/standard/designbuildsource.com.au.txt
new file mode 100755
index 00000000..93d3507e
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/designbuildsource.com.au.txt
@@ -0,0 +1,2 @@
1date: substring-after(//p[@class='post_date'], 'on')
2
diff --git a/inc/3rdparty/site_config/standard/dilbert.com.txt b/inc/3rdparty/site_config/standard/dilbert.com.txt
index 85cc78e5..b8788553 100755
--- a/inc/3rdparty/site_config/standard/dilbert.com.txt
+++ b/inc/3rdparty/site_config/standard/dilbert.com.txt
@@ -1,11 +1,9 @@
1#title: substring(substring-after(//title, ':'), 1, string-length(substring-after(//title, ':')) - 10) 1title: //a[@class="post-title"]/text()
2title: //div[contains(@class, 'SB_Title')]//a 2title: //meta[@name="twitter:title"]/@content
3body: //div[contains(@class, 'STR_Image')] 3body: //img[@class="img-responsive img-comic"]
4body: //*[contains(@class, 'SB_Content')]
5author: string('Scott Adams') 4author: string('Scott Adams')
6date: //*[contains(@class, 'SB_Detail')]/text()[1] 5date: //meta[@property="article:publish_date"]/@content
7
8 6
9test_url: http://dilbert.com/blog/entry/death_by_hypnosis_or_not/ 7test_url: http://dilbert.com/blog/entry/death_by_hypnosis_or_not/
10test_url: http://dilbert.com/strips/comic/2013-10-22 8test_url: http://dilbert.com/strips/comic/2013-10-22
11test_url: http://feed.dilbert.com/dilbert/daily_strip \ No newline at end of file 9test_url: http://feed.dilbert.com/dilbert/daily_strip
diff --git a/inc/3rdparty/site_config/standard/dn.se.txt b/inc/3rdparty/site_config/standard/dn.se.txt
index 5283a0cd..a2ad609b 100755
--- a/inc/3rdparty/site_config/standard/dn.se.txt
+++ b/inc/3rdparty/site_config/standard/dn.se.txt
@@ -15,6 +15,9 @@ strip_id_or_class: hook
15strip_id_or_class: right 15strip_id_or_class: right
16strip_id_or_class: footer 16strip_id_or_class: footer
17 17
18strip_id_or_class: ad-head
19strip_id_or_class: atc-share-title
20
18# Other news 21# Other news
19strip: //div[@id="mirrors"] 22strip: //div[@id="mirrors"]
20 23
@@ -25,4 +28,5 @@ author: //div[@id="byline"]/div/p/strong
25date: substring(substring-after(//p[@class="published"], 'Publicerad '), 0, 11) 28date: substring(substring-after(//p[@class="published"], 'Publicerad '), 0, 11)
26 29
27test_url: http://www.dn.se/nyheter/varlden/landade-flygplan-mitt-i-villaomrade 30test_url: http://www.dn.se/nyheter/varlden/landade-flygplan-mitt-i-villaomrade
28test_url: http://www.dn.se/m/rss/senaste-nytt \ No newline at end of file 31test_contains: Ett tekniskt haveri tvingade
32test_url: http://www.dn.se/rss/senaste-nytt
diff --git a/inc/3rdparty/site_config/standard/economie.gouv.fr.txt b/inc/3rdparty/site_config/standard/economie.gouv.fr.txt
new file mode 100755
index 00000000..b0db03c1
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/economie.gouv.fr.txt
@@ -0,0 +1,4 @@
1body: //div[contains(@class, 'txtVisu')]
2prune: no
3
4test_url: http://www.economie.gouv.fr/dgccrf/Publications/Vie-pratique/Fiches-pratiques/Assurance \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/entwickler.de.txt b/inc/3rdparty/site_config/standard/entwickler.de.txt
new file mode 100755
index 00000000..316f3991
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/entwickler.de.txt
@@ -0,0 +1,7 @@
1title: //h1[@class="post-title"]
2body: //section[@class="article-content"]
3author: //div[@class="post-bottom-meta"]/span[@class="post-author"]
4date: //div[@class="post-date"]/time/@datetime
5
6test_url: https://entwickler.de/online/mobile-welt-offline-welt-was-der-offline-first-ansatz-fuer-app-entwickler-heisst-140602.html
7test_url: https://entwickler.de/online/development/plex-docker-joomla-165345.html
diff --git a/inc/3rdparty/site_config/standard/espacepolitique.revues.org.txt b/inc/3rdparty/site_config/standard/espacepolitique.revues.org.txt
new file mode 100644
index 00000000..c4acb26e
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/espacepolitique.revues.org.txt
@@ -0,0 +1,10 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Fespacepolitique.revues.org%2F284
4
5body: //div[@id='text']
6
7strip_id_or_class: paranumber
8strip_id_or_class: go-top
9
10test_url: http://espacepolitique.revues.org/284
diff --git a/inc/3rdparty/site_config/standard/explosm.net.txt b/inc/3rdparty/site_config/standard/explosm.net.txt
new file mode 100755
index 00000000..f2d0a20f
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/explosm.net.txt
@@ -0,0 +1,4 @@
1body: //img[@id='main-comic']
2author: substring(//small[@class="author-credit-name"], 4)
3
4test_url: http://explosm.net/comics/3954/
diff --git a/inc/3rdparty/site_config/standard/facebook.com.txt b/inc/3rdparty/site_config/standard/facebook.com.txt
index 26d4f905..2641a0b2 100755
--- a/inc/3rdparty/site_config/standard/facebook.com.txt
+++ b/inc/3rdparty/site_config/standard/facebook.com.txt
@@ -1,12 +1,14 @@
1body: //div[@id='imagestage'] 1body: //div[@id='imagestage']
2body: //div[contains(@class, 'userContentWrapper')] 2body: //div[contains(@class, 'userContentWrapper')]
3 3body: //div[@id='m_story_permalink_view' or contains(@data-sigil, 'm-story-view')]
4strip_id_or_class: commentable 4strip_id_or_class: commentable
5strip: //div[contains(@data-sigil, 'm-mentions-expand')]
5 6
6prune: no 7prune: no
7tidy: no 8tidy: no
8 9
9# single_page_link: replace(substring-after(//noscript//meta[@http-equiv="refresh"]/@content, 'URL='), "&amp;", "&") 10single_page_link: concat("https://m.", substring-after(//link[@rel="alternate" and @media="handheld"]/@href, "//www."))
11if_page_contains: //link[@rel="alternate" and @media="handheld"]
10 12
11test_url: https://www.facebook.com/permalink.php?story_fbid=10154584776550183&id=294468630182 13test_url: https://www.facebook.com/permalink.php?story_fbid=10154584776550183&id=294468630182
12test_contains: holding an extraordinary session in Brussels this month 14test_contains: holding an extraordinary session in Brussels this month
diff --git a/inc/3rdparty/site_config/standard/fastcompany.com.txt b/inc/3rdparty/site_config/standard/fastcompany.com.txt
index a6417237..bf8375ee 100755
--- a/inc/3rdparty/site_config/standard/fastcompany.com.txt
+++ b/inc/3rdparty/site_config/standard/fastcompany.com.txt
@@ -1,16 +1,20 @@
1title: //h1 1author: //div[@class='byline']//a
2author: //h5[@class='byline']//a 2date: //meta[@property='article:published_time']/@content
3date: //h5[@class='date'] 3body: //figure[@class='jumbotron'] | //div[@itemprop='body']
4body: //figure[@class='node-poster'] | //div[contains(@class, "node-content")] 4
5strip_id_or_class: article-top-wrapper 5prune: no
6strip_id_or_class: footer-message 6
7strip_id_or_class: print-logo 7#strip_id_or_class: article-top-wrapper
8strip: //cite 8#strip_id_or_class: footer-message
9strip://*[@class='timestamp'] 9#strip_id_or_class: print-logo
10strip://div[@id='page_right'] 10#strip: //cite
11strip://section[@id='header_region'] 11#strip://*[@class='timestamp']
12strip://h1[@class='node-title'] 12#strip://div[@id='page_right']
13strip://div[@class='node-submitted'] 13#strip://section[@id='header_region']
14strip_id_or_class: skipnav 14#strip://h1[@class='node-title']
15#strip://div[@class='node-submitted']
16#strip_id_or_class: skipnav
17
15test_url: http://www.fastcompany.com/3000226/link-between-quietness-and-productivity 18test_url: http://www.fastcompany.com/3000226/link-between-quietness-and-productivity
16test_url: http://www.fastcompany.com/3003586/6-simple-rituals-reach-your-potential-every-day \ No newline at end of file 19test_contains: Some of you may have tried to reach me this morning
20test_url: http://www.fastcompany.com/3003586/6-simple-rituals-reach-your-potential-every-day
diff --git a/inc/3rdparty/site_config/standard/fok.nl.txt b/inc/3rdparty/site_config/standard/fok.nl.txt
new file mode 100755
index 00000000..012f07df
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/fok.nl.txt
@@ -0,0 +1,4 @@
1# skip cookie warning
2single_page_link: concat(//form/@action, '?allowcookies=yes')
3
4test_url: http://fok.nl/687116 \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/forsvaret.no.txt b/inc/3rdparty/site_config/standard/forsvaret.no.txt
index c1bd2bac..ec9e5807 100755
--- a/inc/3rdparty/site_config/standard/forsvaret.no.txt
+++ b/inc/3rdparty/site_config/standard/forsvaret.no.txt
@@ -6,4 +6,5 @@ strip: //div[contains(@class,"aside")]
6# remove some SharePoint webpart label junk 6# remove some SharePoint webpart label junk
7strip: //div[@id="ctl00_PlaceHolderMain_ArticleLeadField_label"] 7strip: //div[@id="ctl00_PlaceHolderMain_ArticleLeadField_label"]
8strip: //div[@id="ctl00_PlaceHolderMain_PublishingPageContentField_label"] 8strip: //div[@id="ctl00_PlaceHolderMain_PublishingPageContentField_label"]
9test_url: http://forsvaret.no/aktuelt/publisert/nyheter/Sider/F5-fly-til-Skedsmo.aspx \ No newline at end of file 9test_url: https://forsvaret.no/aktuelt/historisk-medaljeutdeling
10test_contains: Samarbeidet med Marinen har vært en sann glede
diff --git a/inc/3rdparty/site_config/standard/france24.com.txt b/inc/3rdparty/site_config/standard/france24.com.txt
new file mode 100755
index 00000000..6356e048
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/france24.com.txt
@@ -0,0 +1,14 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Fwww.france24.com%2Fen%2F20150427-togo-gnassingbe-poised-extend-power-election%2F
4
5body: //article[contains(concat(' ',normalize-space(@class),' '),' article-long ')]//div[contains(concat(' ',normalize-space(@class),' '),' bd ')]
6title: //h1[@class="title"]
7author://p[@class="author"]
8date://p[@class="modification"]
9
10find_string: <p class="modification">Latest update :
11replace_string: <p class="modification">
12
13
14test_url: http://www.france24.com/en/20150427-togo-gnassingbe-poised-extend-power-election/ \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/frankdenneman.nl.txt b/inc/3rdparty/site_config/standard/frankdenneman.nl.txt
new file mode 100644
index 00000000..c6011002
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/frankdenneman.nl.txt
@@ -0,0 +1,2 @@
1body: //*[(@class = "content")]
2test_url: http://frankdenneman.nl/
diff --git a/inc/3rdparty/site_config/standard/frontburner.dmagazine.com.txt b/inc/3rdparty/site_config/standard/frontburner.dmagazine.com.txt
new file mode 100644
index 00000000..73f44324
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/frontburner.dmagazine.com.txt
@@ -0,0 +1,6 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Ffrontburner.dmagazine.com%2F2015%2F04%2F23%2Fthe-barrett-brown-review-of-arts-and-letters-and-jail-a-sign-of-things-to-come%2F
4
5body: //div[@id='article-body']
6test_url: http://frontburner.dmagazine.com/2015/04/23/the-barrett-brown-review-of-arts-and-letters-and-jail-a-sign-of-things-to-come/
diff --git a/inc/3rdparty/site_config/standard/galwayindependent.com.txt b/inc/3rdparty/site_config/standard/galwayindependent.com.txt
new file mode 100755
index 00000000..d45b7acf
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/galwayindependent.com.txt
@@ -0,0 +1,3 @@
1title: //div[@class='leftCol']/h1
2
3prune: no
diff --git a/inc/3rdparty/site_config/standard/gameblog.fr.txt b/inc/3rdparty/site_config/standard/gameblog.fr.txt
index 73f8342f..227d39ac 100755
--- a/inc/3rdparty/site_config/standard/gameblog.fr.txt
+++ b/inc/3rdparty/site_config/standard/gameblog.fr.txt
@@ -1,5 +1,7 @@
1title: //meta[@property="og:title"]/@content 1title: //meta[@property="og:title"]/@content
2body: //div[@id='GBTVPlayer'] | //div[contains(@class, 'col490')] 2body: //div[@id='GBTVPlayer'] | //div[contains(@class, 'col490')]
3author: //span[contains(concat(' ',normalize-space(@class),' '),' author ')]
4date: //header[@id='gbArticleHeader']//div//time/@datetime
3 5
4prune: no 6prune: no
5 7
@@ -7,4 +9,4 @@ strip_id_or_class: noprint
7strip: //div[@id='gbNewsTextContent']/following-sibling::* 9strip: //div[@id='gbNewsTextContent']/following-sibling::*
8 10
9test_url: http://www.gameblog.fr/news/26330-les-sims-3-showtime-s-annonce-en-video 11test_url: http://www.gameblog.fr/news/26330-les-sims-3-showtime-s-annonce-en-video
10test_url: http://www.gameblog.fr/news/26306-mise-a-jour-du-dashboard-de-la-xbox-360-disponible \ No newline at end of file 12test_url: http://www.gameblog.fr/news/26306-mise-a-jour-du-dashboard-de-la-xbox-360-disponible
diff --git a/inc/3rdparty/site_config/standard/ganglia.info.txt b/inc/3rdparty/site_config/standard/ganglia.info.txt
new file mode 100644
index 00000000..2ae27b48
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/ganglia.info.txt
@@ -0,0 +1,2 @@
1body: //*[(@id = "mid")]
2test_url: http://ganglia.info/
diff --git a/inc/3rdparty/site_config/standard/gawker.com.txt b/inc/3rdparty/site_config/standard/gawker.com.txt
index 9bc5613a..27e4b4bb 100755
--- a/inc/3rdparty/site_config/standard/gawker.com.txt
+++ b/inc/3rdparty/site_config/standard/gawker.com.txt
@@ -3,4 +3,6 @@ body: //div[@class="post-body"]
3# Remove 'content is restricted' 3# Remove 'content is restricted'
4strip: //div[@id='agegate_IDHERE'] 4strip: //div[@id='agegate_IDHERE']
5 5
6http_header(user-agent): PHP/5.3
7
6test_url: http://gawker.com/#!5782070/russian-bomb-squad-successfully-defuses-sex-toy \ No newline at end of file 8test_url: http://gawker.com/#!5782070/russian-bomb-squad-successfully-defuses-sex-toy \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/getpocket.com.txt b/inc/3rdparty/site_config/standard/getpocket.com.txt
new file mode 100755
index 00000000..e6ca16ae
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/getpocket.com.txt
@@ -0,0 +1 @@
http_header(user-agent): PHP/5.3 \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/gist.github.com.txt b/inc/3rdparty/site_config/standard/gist.github.com.txt
index f11b7b42..90207862 100755
--- a/inc/3rdparty/site_config/standard/gist.github.com.txt
+++ b/inc/3rdparty/site_config/standard/gist.github.com.txt
@@ -1,4 +1,6 @@
1body: //div[@class="highlight"]/pre
1 2
2title: //div[contains(@class,'gist-description')] 3prune: no
3body: //div[contains(@class,'blob-wrapper')] 4tidy: no
4test_url: https://gist.github.com/staltz/868e7e9bc2a7b8c1f754 5
6test_url: https://gist.github.com/1258908 \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/gizmodo.com.au.txt b/inc/3rdparty/site_config/standard/gizmodo.com.au.txt
new file mode 100755
index 00000000..9dbfc152
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/gizmodo.com.au.txt
@@ -0,0 +1,8 @@
1body: //div[@id='content_post' or @class="post-body" or contains(@class, 'illustration top')]
2author: (//cite//span[@class="plus-icon"])[1]
3date: //span[@class="date"]
4date: //time
5
6prune: no
7
8test_url: http://gizmodo.com/5880147/kuhn-rikon-improves-their-spice-grinder-with-grade-school-science
diff --git a/inc/3rdparty/site_config/standard/gizmodo.com.txt b/inc/3rdparty/site_config/standard/gizmodo.com.txt
index e73ec9d2..535041cd 100755
--- a/inc/3rdparty/site_config/standard/gizmodo.com.txt
+++ b/inc/3rdparty/site_config/standard/gizmodo.com.txt
@@ -6,6 +6,8 @@ date: //span[@class="date"]
6 6
7prune: no 7prune: no
8 8
9http_header(user-agent): PHP/5.3
10
9test_url: http://gizmodo.com/5880147/kuhn-rikon-improves-their-spice-grinder-with-grade-school-science 11test_url: http://gizmodo.com/5880147/kuhn-rikon-improves-their-spice-grinder-with-grade-school-science
10test_url: http://gizmodo.com/what-van-goghs-paintings-would-look-like-if-they-came-874035680 12test_url: http://gizmodo.com/what-van-goghs-paintings-would-look-like-if-they-came-874035680
11test_url: http://gizmodo.com/vip.xml \ No newline at end of file 13test_url: http://gizmodo.com/vip.xml \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/globalgrind.com.txt b/inc/3rdparty/site_config/standard/globalgrind.com.txt
new file mode 100755
index 00000000..e2f4e233
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/globalgrind.com.txt
@@ -0,0 +1,6 @@
1body: //div[contains(@class, 'content-body')]
2
3prune: no
4
5test_url: http://globalgrind.com/2015/04/26/listen-jeremih-featuring-chance-the-rapper-the-social-experiment-planes-remix-new-music/
6test_contains: The Chicago rapper has made a name for himself \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/gocomics.com.txt b/inc/3rdparty/site_config/standard/gocomics.com.txt
new file mode 100755
index 00000000..212c02d5
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/gocomics.com.txt
@@ -0,0 +1,5 @@
1body: //a[@class="photo"]/img[@class="strip"]
2author: //meta[@name="author"]/@content
3date: //meta[@property="gocomics:publish_date"]/@content
4
5test_url: http://www.gocomics.com/garfield/2015/06/13
diff --git a/inc/3rdparty/site_config/standard/gokulkrishh.github.io.txt b/inc/3rdparty/site_config/standard/gokulkrishh.github.io.txt
new file mode 100644
index 00000000..b395fa9e
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/gokulkrishh.github.io.txt
@@ -0,0 +1,6 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=https%3A%2F%2Fgokulkrishh.github.io%2FJavascript-Guidelines%2F
4
5body: //section[contains(concat(' ',normalize-space(@class),' '),' main-content ')]
6test_url: https://gokulkrishh.github.io/Javascript-Guidelines/
diff --git a/inc/3rdparty/site_config/standard/hackersrepublic.org.txt b/inc/3rdparty/site_config/standard/hackersrepublic.org.txt
new file mode 100644
index 00000000..da01c213
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/hackersrepublic.org.txt
@@ -0,0 +1,6 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Fwww.hackersrepublic.org%2Fculture-du-hacking%2Fune-histoire-de-privileges
4
5body: //div[contains(concat(' ',normalize-space(@class),' '),' field-name-body ')]//div[contains(concat(' ',normalize-space(@class),' '),' field-items ')]//div[contains(concat(' ',normalize-space(@class),' '),' field-item ') and (contains(concat(' ',normalize-space(@class),' '),' even '))]
6test_url: http://www.hackersrepublic.org/culture-du-hacking/une-histoire-de-privileges
diff --git a/inc/3rdparty/site_config/standard/help.fivefilters.org.txt b/inc/3rdparty/site_config/standard/help.fivefilters.org.txt
new file mode 100755
index 00000000..70a7d156
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/help.fivefilters.org.txt
@@ -0,0 +1,2 @@
1title: //div[@class="title"]/h3
2date: substring-after(//div[@class="meta"], ": ")
diff --git a/inc/3rdparty/site_config/standard/heraldsun.com.au.txt b/inc/3rdparty/site_config/standard/heraldsun.com.au.txt
new file mode 100755
index 00000000..b0ce56c5
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/heraldsun.com.au.txt
@@ -0,0 +1,12 @@
1#body: //div[@class='story-body']
2body: //div[contains(@class, 'story-body')]
3title: //div[@class='story-headline']//h1
4author: //cite[contains(@class, 'author')]
5date: //span[@class='datestamp']
6
7strip_id_or_class: story-info
8strip: //div[contains(@class, 'story-promo')]
9strip: //div[contains(@class, 'story-related')]
10
11prune: no
12tidy: no
diff --git a/inc/3rdparty/site_config/standard/hiiraan.com.txt b/inc/3rdparty/site_config/standard/hiiraan.com.txt
new file mode 100755
index 00000000..cf1f7942
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/hiiraan.com.txt
@@ -0,0 +1,10 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Fwww.hiiraan.com%2Fnews%2F2014%2FDec%2Fwararka_maanta20-89428.htm
4
5body: //div[contains(concat(' ',normalize-space(@class),' '),' single ')]//div[contains(concat(' ',normalize-space(@class),' '),' description ')]
6
7prune: no
8
9test_url: http://www.hiiraan.com/news/2014/Dec/wararka_maanta20-89428.htm
10test_url: http://rss.hiiraan.com/wararka_maanta_rss.xml \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/iceblog.free.fr.txt b/inc/3rdparty/site_config/standard/iceblog.free.fr.txt
new file mode 100644
index 00000000..9d1ce214
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/iceblog.free.fr.txt
@@ -0,0 +1,7 @@
1
2# Generated by FiveFilters.org's web-based selection tool
3# Place this file inside your site_config/custom/ folder
4# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Ficeblog.free.fr%2Findex.php%3Farticle102%2Fweb-histoire-geek-4
5
6body: //article//section
7test_url: http://iceblog.free.fr/index.php?article102/web-histoire-geek-4
diff --git a/inc/3rdparty/site_config/standard/independent.co.uk.txt b/inc/3rdparty/site_config/standard/independent.co.uk.txt
index af742209..6711a0a2 100755
--- a/inc/3rdparty/site_config/standard/independent.co.uk.txt
+++ b/inc/3rdparty/site_config/standard/independent.co.uk.txt
@@ -1,9 +1,16 @@
1title: //meta[@property='og:title']/@content 1title: //meta[@property='og:title']/@content
2body: //div[contains(@class, 'articleContent')] 2body: //img[contains(@class, 'FirstImage')] | //div[contains(@class, 'articleContent')]
3date: //meta[@property='article:published_time']/@content 3date: //meta[@property='article:published_time']/@content
4author: //div[@id='main']//div[@class='byline']//span[@class='authorName'] 4author: //div[@id='main']//div[@class='byline']//span[@class='authorName']
5 5
6strip_id_or_class: RelatedArtTag 6strip_id_or_class: RelatedArtTag
7 7
8strip: //h5[contains(., 'READ MORE:')]
9strip: //h5[contains(., 'Read more:')]
10
8tidy: no 11tidy: no
9test_url: http://www.independent.co.uk/news/world/middle-east/syria-could-face-human-rights-probe-2274326.html \ No newline at end of file 12test_url: http://www.independent.co.uk/news/world/middle-east/syria-could-face-human-rights-probe-2274326.html
13test_url: http://www.independent.co.uk/voices/comment/robert-fisk-on-the-cia-torture-report-once-again-language-is-distorted-in-order-to-hide-us-state-wrongdoing-9924501.html
14test_contains: Thank God for Noam Chomsky.
15
16test_url: http://www.independent.co.uk/news/uk/rss \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/io9.com.txt b/inc/3rdparty/site_config/standard/io9.com.txt
new file mode 100755
index 00000000..e6ca16ae
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/io9.com.txt
@@ -0,0 +1 @@
http_header(user-agent): PHP/5.3 \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/ippmedia.com.txt b/inc/3rdparty/site_config/standard/ippmedia.com.txt
new file mode 100755
index 00000000..99f25dc0
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/ippmedia.com.txt
@@ -0,0 +1,4 @@
1title: //div[@class="content_title"]//h2
2author: substring-after(//div[@class="byline"], "By ")
3date: //div[@class="publish_date"]
4strip: //div[@class="read_image_box"]
diff --git a/inc/3rdparty/site_config/standard/iso.500px.com.txt b/inc/3rdparty/site_config/standard/iso.500px.com.txt
new file mode 100644
index 00000000..ffa29a1d
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/iso.500px.com.txt
@@ -0,0 +1,6 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=https%3A%2F%2Fiso.500px.com%2Fhow-i-post-processed-the-most-successful-image-of-my-career%2F
4
5body: //div[contains(concat(' ',normalize-space(@class),' '),' post-content ')]
6test_url: https://iso.500px.com/how-i-post-processed-the-most-successful-image-of-my-career/
diff --git a/inc/3rdparty/site_config/standard/it-connect.fr.txt b/inc/3rdparty/site_config/standard/it-connect.fr.txt
new file mode 100644
index 00000000..80c95e68
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/it-connect.fr.txt
@@ -0,0 +1,9 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Fwww.it-connect.fr%2Fdebuter-avec-docker-et-les-containers-sous-debian-8%2F
4
5body: //div[contains(concat(' ',normalize-space(@class),' '),' post_inner_wrapper ')]
6
7strip_id_or_class: toc_container
8
9test_url: http://www.it-connect.fr/debuter-avec-docker-et-les-containers-sous-debian-8/
diff --git a/inc/3rdparty/site_config/standard/itnews.com.au.txt b/inc/3rdparty/site_config/standard/itnews.com.au.txt
new file mode 100755
index 00000000..47cbb0f3
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/itnews.com.au.txt
@@ -0,0 +1,5 @@
1title: //h1[@class='article-header']
2body: //div[@class='body-content']
3author: //span[@class='author-byline']/a[contains(@id, 'Author')]
4
5strip: //span[contains(@id, 'Article_SourceLabel')]
diff --git a/inc/3rdparty/site_config/standard/jalopnik.com.txt b/inc/3rdparty/site_config/standard/jalopnik.com.txt
index fc2eef8e..7823dbd7 100755
--- a/inc/3rdparty/site_config/standard/jalopnik.com.txt
+++ b/inc/3rdparty/site_config/standard/jalopnik.com.txt
@@ -1,2 +1,5 @@
1author: //span[@class='plus-icon'] 1author: //span[@class='plus-icon']
2
3http_header(user-agent): PHP/5.3
4
2test_url: http://jalopnik.com/5892124/1955-porsche-550-spyder-sells-for-record-3685-million/ \ No newline at end of file 5test_url: http://jalopnik.com/5892124/1955-porsche-550-spyder-sells-for-record-3685-million/ \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/jezebel.com.txt b/inc/3rdparty/site_config/standard/jezebel.com.txt
new file mode 100755
index 00000000..e6ca16ae
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/jezebel.com.txt
@@ -0,0 +1 @@
http_header(user-agent): PHP/5.3 \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/jsforcats.com.txt b/inc/3rdparty/site_config/standard/jsforcats.com.txt
new file mode 100644
index 00000000..f2699ef1
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/jsforcats.com.txt
@@ -0,0 +1,6 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Fjsforcats.com%2F
4
5body: //div[contains(concat(' ',normalize-space(@class),' '),' post-content ')]
6test_url: http://jsforcats.com/
diff --git a/inc/3rdparty/site_config/standard/kotaku.com.txt b/inc/3rdparty/site_config/standard/kotaku.com.txt
index be439d75..61ccbc46 100755
--- a/inc/3rdparty/site_config/standard/kotaku.com.txt
+++ b/inc/3rdparty/site_config/standard/kotaku.com.txt
@@ -1,2 +1,5 @@
1author: //span[@class="plus-icon"] 1author: //span[@class="plus-icon"]
2
3http_header(user-agent): PHP/5.3
4
2test_url: http://kotaku.com/5920211/save-the-furries-on-your-wii-in-this-weeks-nintendo-download \ No newline at end of file 5test_url: http://kotaku.com/5920211/save-the-furries-on-your-wii-in-this-weeks-nintendo-download \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/lapin-blanc.blogs.docteo.net.txt b/inc/3rdparty/site_config/standard/lapin-blanc.blogs.docteo.net.txt
new file mode 100644
index 00000000..38835a90
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/lapin-blanc.blogs.docteo.net.txt
@@ -0,0 +1,6 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Flapin-blanc.blogs.docteo.net%2F2015%2F01%2F20%2Flencadrement-doctoral-deviendrait-il-un-sujet-dactualite%2F
4
5body: //div[contains(concat(' ',normalize-space(@class),' '),' entry-content ')]
6test_url: http://lapin-blanc.blogs.docteo.net/2015/01/20/lencadrement-doctoral-deviendrait-il-un-sujet-dactualite/
diff --git a/inc/3rdparty/site_config/standard/lececil.org.txt b/inc/3rdparty/site_config/standard/lececil.org.txt
new file mode 100644
index 00000000..8a38bbf3
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/lececil.org.txt
@@ -0,0 +1,6 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Fwww.lececil.org%2Fnode%2F7688
4
5body: //div[contains(concat(' ',normalize-space(@class),' '),' field-body ')]
6test_url: http://www.lececil.org/node/7688
diff --git a/inc/3rdparty/site_config/standard/lefigaro.fr.txt b/inc/3rdparty/site_config/standard/lefigaro.fr.txt
index e720e377..7e1d12d7 100755
--- a/inc/3rdparty/site_config/standard/lefigaro.fr.txt
+++ b/inc/3rdparty/site_config/standard/lefigaro.fr.txt
@@ -2,7 +2,8 @@ title: //meta[@name='title']/@content
2author: //span[@class='sign']//a[@class='journaliste'] 2author: //span[@class='sign']//a[@class='journaliste']
3author: //meta[@name='author']/@content 3author: //meta[@name='author']/@content
4body: //*[@id='article']/div[@class='photo'] | //*[@id='article']/h2 | //*[@id='article']/div[@class='texte'] 4body: //*[@id='article']/div[@class='photo'] | //*[@id='article']/h2 | //*[@id='article']/div[@class='texte']
5date: //time[@pubdate]/@datetime 5date: //li[contains(concat(' ',normalize-space(@class),' '),' fig-date-pub ')]//time
6prune: no 6prune: no
7test_url: http://www.lefigaro.fr/environnement/2011/11/10/01029-20111110ARTFIG00801-la-chine-confrontee-a-un-immense-defi-ecologique.php 7test_url: http://www.lefigaro.fr/environnement/2011/11/10/01029-20111110ARTFIG00801-la-chine-confrontee-a-un-immense-defi-ecologique.php
8test_url: http://www.lefigaro.fr/conjoncture/2012/11/20/20002-20121120ARTFIG00609-l-usager-devrait-payer-plus-pour-financer-les-transports.php \ No newline at end of file 8test_url: http://www.lefigaro.fr/conjoncture/2012/11/20/20002-20121120ARTFIG00609-l-usager-devrait-payer-plus-pour-financer-les-transports.php
9test_url: http://www.lefigaro.fr/social/2015/03/10/09010-20150310ARTFIG00312-encore-une-annee-noire-pour-l-emploi-salarie.php
diff --git a/inc/3rdparty/site_config/standard/lifehacker.com.txt b/inc/3rdparty/site_config/standard/lifehacker.com.txt
index ec97f06c..330c4e78 100755
--- a/inc/3rdparty/site_config/standard/lifehacker.com.txt
+++ b/inc/3rdparty/site_config/standard/lifehacker.com.txt
@@ -42,6 +42,12 @@ strip: //p[@class="arrow"]
42 42
43# Remove "track" image from article body 43# Remove "track" image from article body
44strip: //img[@alt="track"] 44strip: //img[@alt="track"]
45
46# Remove hidden URLs
47strip: //a[@x-inset="hidden"]
48
49http_header(user-agent): PHP/5.3
50
45test_url: http://lifehacker.com/5925801/how-can-i-turn-vague-goals-into-actionable-to+dos 51test_url: http://lifehacker.com/5925801/how-can-i-turn-vague-goals-into-actionable-to+dos
46test_url: http://lifehacker.com/5941600/hack-an-old-computer-mouse-into-a-wireless-bluetooth-mouse 52test_url: http://lifehacker.com/5941600/hack-an-old-computer-mouse-into-a-wireless-bluetooth-mouse
47test_url: http://lifehacker.com/what-happens-to-the-brain-when-you-meditate-and-how-it-1202533314 \ No newline at end of file 53test_url: http://lifehacker.com/what-happens-to-the-brain-when-you-meditate-and-how-it-1202533314
diff --git a/inc/3rdparty/site_config/standard/linuxjournal.com.txt b/inc/3rdparty/site_config/standard/linuxjournal.com.txt
new file mode 100755
index 00000000..c5e64463
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/linuxjournal.com.txt
@@ -0,0 +1,6 @@
1body: //div[@class='content-area']
2next_page_link: //a[@title='Go to next page']
3author: //a[@title='View user profile.']
4strip_id_or_class: comments
5
6test_url: http://www.linuxjournal.com/content/be-mechanicwith-android-and-linux
diff --git a/inc/3rdparty/site_config/standard/m.bbc.co.uk.txt b/inc/3rdparty/site_config/standard/m.bbc.co.uk.txt
index d1ff0b43..7037c64b 100755
--- a/inc/3rdparty/site_config/standard/m.bbc.co.uk.txt
+++ b/inc/3rdparty/site_config/standard/m.bbc.co.uk.txt
@@ -3,6 +3,12 @@ body: //div[@class="story-body"]
3date: //p[@class='date']/strong 3date: //p[@class='date']/strong
4author: substring-after(//div[@class="story-inner"]/div[@class="byline"]//span[@class='name'], 'By') 4author: substring-after(//div[@class="story-inner"]/div[@class="byline"]//span[@class='name'], 'By')
5 5
6find_string: http://ichef.bbci.co.uk/news/200/
7replace_string: http://ichef.bbci.co.uk/news/624/
8
9find_string: http://ichef.bbci.co.uk/news/304/
10replace_string: http://ichef.bbci.co.uk/news/624/
11
6strip: //div[@class="story-inner"]/div[@class="byline"] 12strip: //div[@class="story-inner"]/div[@class="byline"]
7 13
8test_url: http://m.bbc.co.uk/news/science-environment-19144464 \ No newline at end of file 14test_url: http://m.bbc.co.uk/news/science-environment-19144464 \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/m.facebook.com.txt b/inc/3rdparty/site_config/standard/m.facebook.com.txt
new file mode 100755
index 00000000..1b9c1b34
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/m.facebook.com.txt
@@ -0,0 +1,12 @@
1body: //div[@id='m_story_permalink_view' or contains(@data-sigil, 'm-story-view')]
2
3title: //div[@id='m_story_permalink_view' or contains(@data-sigil, 'm-story-view')]//h3
4
5strip_id_or_class: commentable
6strip: //*[contains(@data-sigil, 'm-mentions-expand') or contains(@data-sigil, 'story-popup-context') or contains(@data-sigil, 'share') or contains(@data-sigil, 'translate')]
7
8prune: no
9tidy: no
10
11test_url: https://www.facebook.com/permalink.php?story_fbid=10154584776550183&id=294468630182
12test_contains: holding an extraordinary session in Brussels this month
diff --git a/inc/3rdparty/site_config/standard/m.theregister.co.uk.txt b/inc/3rdparty/site_config/standard/m.theregister.co.uk.txt
new file mode 100755
index 00000000..64cb1c32
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/m.theregister.co.uk.txt
@@ -0,0 +1,4 @@
1strip: //div[@class='wptl btm']
2body: //div[@id='article']//h2 | //div[@id='body']
3
4test_url: http://m.theregister.co.uk/2015/07/06/geeks_guide_spaceguard_center/
diff --git a/inc/3rdparty/site_config/standard/marketingmag.com.au.txt b/inc/3rdparty/site_config/standard/marketingmag.com.au.txt
new file mode 100755
index 00000000..910741f3
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/marketingmag.com.au.txt
@@ -0,0 +1 @@
strip: //h3[@class="related-posts"]
diff --git a/inc/3rdparty/site_config/standard/medium.com.txt b/inc/3rdparty/site_config/standard/medium.com.txt
index 9e9c6895..5ab3ac5e 100755
--- a/inc/3rdparty/site_config/standard/medium.com.txt
+++ b/inc/3rdparty/site_config/standard/medium.com.txt
@@ -1,4 +1,4 @@
1body: //div[contains(@class, 'postContent-inner')] 1body: //div[contains(@class, 'postArticle-content')]
2strip_id_or_class: supplementalPostContent 2strip_id_or_class: supplementalPostContent
3 3
4prune: no 4prune: no
diff --git a/inc/3rdparty/site_config/standard/menshealth.com.sg.txt b/inc/3rdparty/site_config/standard/menshealth.com.sg.txt
index 6a669253..af450b5e 100755
--- a/inc/3rdparty/site_config/standard/menshealth.com.sg.txt
+++ b/inc/3rdparty/site_config/standard/menshealth.com.sg.txt
@@ -3,10 +3,5 @@ body: //div[@style="float:left;width:740px;"]
3 3
4tidy: no 4tidy: no
5 5
6test_url: http://www.menshealth.com.sg/fitness/mh-picks-under-armour-clutchfit-nitro-mid-cleats 6# broken feed?
7test_contains: These cleats are made for one thing 7test_url: http://www.menshealth.com.sg/fitness/feed
8
9test_url: http://www.menshealth.com.sg/fitness/top-10-fat-burning-bodyweight-moves-you-can-do-10-minutes
10test_contains: let this workout fool you
11
12test_url: http://www.menshealth.com.sg/fitness/feed \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/metrocop.net.txt b/inc/3rdparty/site_config/standard/metrocop.net.txt
new file mode 100644
index 00000000..9535f125
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/metrocop.net.txt
@@ -0,0 +1,6 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Fmetrocop.net%2Fmythic-comics%2Fissue-1%2F
4
5body: //div[contains(concat(' ',normalize-space(@class),' '),' entry ')]
6test_url: http://metrocop.net/mythic-comics/issue-1/
diff --git a/inc/3rdparty/site_config/standard/mitchellrepublic.com.txt b/inc/3rdparty/site_config/standard/mitchellrepublic.com.txt
new file mode 100755
index 00000000..fae858a3
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/mitchellrepublic.com.txt
@@ -0,0 +1,3 @@
1body: //div[@class='section']
2strip_id_or_class: mediumtxt
3strip: //strong[contains
diff --git a/inc/3rdparty/site_config/standard/mobile.nytimes.com.txt b/inc/3rdparty/site_config/standard/mobile.nytimes.com.txt
index c60252ef..ef1ce98d 100755
--- a/inc/3rdparty/site_config/standard/mobile.nytimes.com.txt
+++ b/inc/3rdparty/site_config/standard/mobile.nytimes.com.txt
@@ -1,4 +1,7 @@
1title: //h1[contains(@class, 'headline')] 1title: //h1[contains(@class, 'headline')]
2body: //article[contains(@class, 'full-art')] 2body: //article[contains(@class, 'full-art')]
3date: //meta[@name="pdate"]/@content
4author: //meta[@name="byl"]/@content
5
3strip_id_or_class: image-credit 6strip_id_or_class: image-credit
4test_url: http://mobile.nytimes.com/2014/06/19/opinion/gail-collins-romney-and-the-2016-contenders-huddle.html \ No newline at end of file 7test_url: http://mobile.nytimes.com/2014/06/19/opinion/gail-collins-romney-and-the-2016-contenders-huddle.html \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/moneymanagement.com.au.txt b/inc/3rdparty/site_config/standard/moneymanagement.com.au.txt
new file mode 100755
index 00000000..9892f662
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/moneymanagement.com.au.txt
@@ -0,0 +1,2 @@
1date: //span[@class="publishdate"]//time
2author: //span[@class="byline"]
diff --git a/inc/3rdparty/site_config/standard/n0where.net.txt b/inc/3rdparty/site_config/standard/n0where.net.txt
new file mode 100644
index 00000000..e91159ea
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/n0where.net.txt
@@ -0,0 +1,5 @@
1title://div[@class='main-title single-title entry-title']
2body://div[@id="content-anchor-inner"]
3date://meta[@content]
4
5strip: //noscript
diff --git a/inc/3rdparty/site_config/standard/nbnnews.com.au.txt b/inc/3rdparty/site_config/standard/nbnnews.com.au.txt
new file mode 100755
index 00000000..a2409878
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/nbnnews.com.au.txt
@@ -0,0 +1,3 @@
1body: //div[contains(concat(' ',normalize-space(@class),' '),' entry ') or contains(@class, 'single-post-thumb')]
2test_url: http://www.nbnnews.com.au/2015/03/24/lismore-man-will-attempt-to-run-around-australia/
3test_url: http://www.nbnnews.com.au/category/nthn-rivers-sport/feed/
diff --git a/inc/3rdparty/site_config/standard/news.com.au.txt b/inc/3rdparty/site_config/standard/news.com.au.txt
new file mode 100755
index 00000000..57b89a54
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/news.com.au.txt
@@ -0,0 +1,3 @@
1body: //div[@class='story-body']
2prune: no
3tidy: no
diff --git a/inc/3rdparty/site_config/standard/news.menshealth.com.txt b/inc/3rdparty/site_config/standard/news.menshealth.com.txt
new file mode 100755
index 00000000..a07fdacc
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/news.menshealth.com.txt
@@ -0,0 +1 @@
strip: //span[@style="color: #cf1206;"]
diff --git a/inc/3rdparty/site_config/standard/news.ninemsn.com.au.txt b/inc/3rdparty/site_config/standard/news.ninemsn.com.au.txt
new file mode 100755
index 00000000..ddd64065
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/news.ninemsn.com.au.txt
@@ -0,0 +1,3 @@
1strip: //a[@class="contact"]
2strip: //div[@class="article-media video-item"]
3date: //div[@class='display-date']
diff --git a/inc/3rdparty/site_config/standard/parool.nl.txt b/inc/3rdparty/site_config/standard/parool.nl.txt
new file mode 100755
index 00000000..2ceef940
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/parool.nl.txt
@@ -0,0 +1,7 @@
1#bypass cookie check
2single_page_link: //a[contains(@href, '/acceptCookieCheck.do?url=')]
3
4test_url: http://www.parool.nl/parool/nl/4/AMSTERDAM/article/detail/4042734/2015/05/29/MRSA-bacterie-niet-verder-verspreid-in-Bijlmerbajes.dhtml
5test_contains: De twee gevangenen die
6
7test_url: http://www.parool.nl/amsterdam/rss.xml \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/perthnow.com.au.txt b/inc/3rdparty/site_config/standard/perthnow.com.au.txt
new file mode 100755
index 00000000..b0ce56c5
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/perthnow.com.au.txt
@@ -0,0 +1,12 @@
1#body: //div[@class='story-body']
2body: //div[contains(@class, 'story-body')]
3title: //div[@class='story-headline']//h1
4author: //cite[contains(@class, 'author')]
5date: //span[@class='datestamp']
6
7strip_id_or_class: story-info
8strip: //div[contains(@class, 'story-promo')]
9strip: //div[contains(@class, 'story-related')]
10
11prune: no
12tidy: no
diff --git a/inc/3rdparty/site_config/standard/planetsave.com.txt b/inc/3rdparty/site_config/standard/planetsave.com.txt
new file mode 100755
index 00000000..d6f34e22
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/planetsave.com.txt
@@ -0,0 +1 @@
strip_id_or_class: author-bio-box
diff --git a/inc/3rdparty/site_config/standard/presseportal.de.txt b/inc/3rdparty/site_config/standard/presseportal.de.txt
new file mode 100755
index 00000000..703806d8
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/presseportal.de.txt
@@ -0,0 +1,11 @@
1body: //div[contains(concat(' ',normalize-space(@class),' '),' story-text ')]
2
3strip_id_or_class: news-bodycopy
4
5parser: html5php
6tidy: no
7
8test_url: http://www.presseportal.de/pm/103258/2930232/felix-neureuther-vor-der-ski-wm-ich-denke-von-rennen-zu-rennen
9test_url: http://www.presseportal.de/pm/66749/2933779/koelner-stadt-anzeiger-bahnmitarbeiter-werden-in-nrw-immer-haeufiger-angegriffen-zahl-der/rss
10test_contains: kleineren Bahnhöfen installieren und erhofft
11test_url: http://www.presseportal.de/rss/presseportal.rss2
diff --git a/inc/3rdparty/site_config/standard/pérotin.com.txt b/inc/3rdparty/site_config/standard/pérotin.com.txt
new file mode 100644
index 00000000..7784fa4c
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/pérotin.com.txt
@@ -0,0 +1,6 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=xn--protin-bva.com%2Fpost%2F2009%2F06%2F09%2FSAV-Free-un-sketch-kafkaien
4
5body: //div[contains(concat(' ',normalize-space(@class),' '),' post ')]
6test_url: http://xn--protin-bva.com/post/2009/06/09/SAV-Free-un-sketch-kafkaien
diff --git a/inc/3rdparty/site_config/standard/quechoisir.org.txt b/inc/3rdparty/site_config/standard/quechoisir.org.txt
new file mode 100644
index 00000000..a8bacdb7
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/quechoisir.org.txt
@@ -0,0 +1,10 @@
1title: //h1[@id='titre']
2body://h2[@id="surtitre"]|//div[@id="ctn_introarticle"]|//div[@class="ctn_globalcontent"]
3
4strip_id_or_class: qc-container-main
5strip_id_or_class: article_footer
6
7tidy: no
8prune: no
9
10test_url: http://www.quechoisir.org/alimentation/securite-hygiene/actualite-acrylamide-un-contaminant-trop-present-dans-nos-assiettes
diff --git a/inc/3rdparty/site_config/standard/quora.com.txt b/inc/3rdparty/site_config/standard/quora.com.txt
index 732d12d7..f2b75a99 100755
--- a/inc/3rdparty/site_config/standard/quora.com.txt
+++ b/inc/3rdparty/site_config/standard/quora.com.txt
@@ -1,8 +1,10 @@
1tidy: no 1tidy: no
2prune: no 2prune: no
3body: //div[contains(@class, 'main_col')] 3body: //div[contains(concat(' ',normalize-space(@class),' '),' Answer ')] | //div[contains(concat(' ',normalize-space(@class),' '),' header ')] | //div[contains(concat(' ',normalize-space(@class),' '),' AnswerWikiArea ')] | //hr
4title: //h1 4#body: //div[contains(@class, 'main_col')]
5 5
6strip_id_or_class: AnswerFooter
7strip_id_or_class: ActionBar
6strip_id_or_class: hidden 8strip_id_or_class: hidden
7strip_id_or_class: item_action_bar 9strip_id_or_class: item_action_bar
8strip_id_or_class: answer_voters 10strip_id_or_class: answer_voters
@@ -13,5 +15,15 @@ strip_id_or_class: view_tag
13strip_id_or_class: include_details 15strip_id_or_class: include_details
14strip_id_or_class: sig_edit 16strip_id_or_class: sig_edit
15strip_id_or_class: profile_photo_img 17strip_id_or_class: profile_photo_img
18strip_id_or_class: question_text_icons
16 19
17test_url: http://www.quora.com/What-everyday-habit-do-you-wish-you-had-developed-earlier-in-life \ No newline at end of file 20# insert hr between answers
21find_string: <div class="Answer"
22replace_string: <hr /><div class="Answer"
23
24test_url: http://www.quora.com/What-everyday-habit-do-you-wish-you-had-developed-earlier-in-life
25test_contains: Please provide a specific practical/measurable action-based everyday
26test_contains: Exercise every day
27
28test_url: http://www.quora.com/What-is-the-greatest-illusion-in-life
29test_contains: What is the greatest illusion in life?
diff --git a/inc/3rdparty/site_config/standard/rockpapershotgun.com.txt b/inc/3rdparty/site_config/standard/rockpapershotgun.com.txt
index f8c9541f..83342cb7 100755
--- a/inc/3rdparty/site_config/standard/rockpapershotgun.com.txt
+++ b/inc/3rdparty/site_config/standard/rockpapershotgun.com.txt
@@ -1,8 +1,10 @@
1title: //h2 1title: //h2
2 2
3strip: //div[ contains(@class, 'respond') ] | //h2 | //h1 3strip: //div[ contains(@class, 'respond') ] | //h2 | //h1
4strip_id_or_class: social
5strip_id_or_class: dd_post_share
4 6
5date: substring-after(//p[@class='info'], ' on ') 7date: substring-after(//p[@class='info'], ' on ')
6 8
7author: //p[@class='info']//a 9author: //p[@class='info']//a
8test_url: http://www.rockpapershotgun.com/2010/07/29/rps-half-verdict-starcraft-2/ \ No newline at end of file 10test_url: http://www.rockpapershotgun.com/2010/07/29/rps-half-verdict-starcraft-2/
diff --git a/inc/3rdparty/site_config/standard/saadaalnews.net.txt b/inc/3rdparty/site_config/standard/saadaalnews.net.txt
new file mode 100755
index 00000000..b9ce04e5
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/saadaalnews.net.txt
@@ -0,0 +1,11 @@
1body: //div[contains(@class, 'section-content-left')]
2
3strip_id_or_class: related
4strip_id_or_class: nocontent
5strip_id_or_class: comment
6strip_id_or_class: widget
7strip_id_or_class: respond
8strip: //h3[.='Comments']
9strip: //p[.='comments']
10
11test_url: http://saadaalnews.net/?p=42624
diff --git a/inc/3rdparty/site_config/standard/smh.com.au.txt b/inc/3rdparty/site_config/standard/smh.com.au.txt
new file mode 100755
index 00000000..f647f812
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/smh.com.au.txt
@@ -0,0 +1,14 @@
1body: //div[@id='content']
2title: //h1[@class='cN-headingPage']
3author: //h3[@class='authorName']
4date: //dd[@class='updated dtstamp']
5
6strip: //ul[@class='social sponsored cfix']
7strip: //div[contains(@class, 'hiddenVisually')]
8strip: //dd[@class='updated dtstamp']
9strip: //h3[@class='authorName']
10strip: //ul[@class='social cfix']
11strip: //div[contains(@id, 'adspot')]
12
13strip: //div[contains(@class, 'overlayPlayCountdown')]
14strip: //div[@class='fdVideoWof']//span[@class='gone']
diff --git a/inc/3rdparty/site_config/standard/smh.drive.com.au.txt b/inc/3rdparty/site_config/standard/smh.drive.com.au.txt
new file mode 100755
index 00000000..463fd88b
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/smh.drive.com.au.txt
@@ -0,0 +1,13 @@
1body: //div[@id='content']
2title: //h1[@class='cN-headingPage']
3author: //h3[@class='authorName']
4date: //dd[@class='updated dtstamp']
5
6strip: //ul[@class='social sponsored cfix']
7strip: //div[contains(@class, 'hiddenVisually')]
8strip: //dd[@class='updated dtstamp']
9strip: //h3[@class='authorName']
10strip: //ul[@class='social cfix']
11strip: //div[contains(@id, 'adspot')]
12
13test_url: http://smh.drive.com.au/roads-and-traffic/driver-distraction-responsible-for-more-car-crashes-than-alcohol-20130503-2iyg0.html
diff --git a/inc/3rdparty/site_config/standard/smithsonianmag.com.txt b/inc/3rdparty/site_config/standard/smithsonianmag.com.txt
index 3e8fee95..fc479c2a 100755
--- a/inc/3rdparty/site_config/standard/smithsonianmag.com.txt
+++ b/inc/3rdparty/site_config/standard/smithsonianmag.com.txt
@@ -7,6 +7,9 @@ body://div[@id = 'article-body']
7# full content 7# full content
8single_page_link://td/li[@class = 'article-singlepage']/a 8single_page_link://td/li[@class = 'article-singlepage']/a
9 9
10# continue link
11single_page_link: //a[@id='continue-btn']
12
10# caption clean up 13# caption clean up
11wrap_in(i)://span[@class='articleImageCaptionwide'] 14wrap_in(i)://span[@class='articleImageCaptionwide']
12move_into (//span[@class='articleImageCaptionwide'])://div[@id = 'articleImage']/p 15move_into (//span[@class='articleImageCaptionwide'])://div[@id = 'articleImage']/p
@@ -17,4 +20,4 @@ strip://p[@id = 'articlePaginationWrapper']
17strip://ul[contains(@class, 'cat-breadcrumb')] 20strip://ul[contains(@class, 'cat-breadcrumb')]
18strip://div [@class= 'viewMorePhotos'] 21strip://div [@class= 'viewMorePhotos']
19 22
20test_url: http://www.smithsonianmag.com/history-archaeology/The-Goddess-Goes-Home.html \ No newline at end of file 23test_url: http://www.smithsonianmag.com/history-archaeology/The-Goddess-Goes-Home.html
diff --git a/inc/3rdparty/site_config/standard/snip.ly.txt b/inc/3rdparty/site_config/standard/snip.ly.txt
new file mode 100755
index 00000000..4e80fcae
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/snip.ly.txt
@@ -0,0 +1,3 @@
1single_page_link: //meta[@property="og:url"]/@content
2
3test_url: http://snip.ly/qa1R \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/soundcity.tv.txt b/inc/3rdparty/site_config/standard/soundcity.tv.txt
new file mode 100755
index 00000000..c26b9f95
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/soundcity.tv.txt
@@ -0,0 +1,3 @@
1strip_id_or_class: sharing
2
3test_url: http://soundcity.tv/feed/
diff --git a/inc/3rdparty/site_config/standard/spiegel.de.txt b/inc/3rdparty/site_config/standard/spiegel.de.txt
index 413e0155..7b7b1752 100755
--- a/inc/3rdparty/site_config/standard/spiegel.de.txt
+++ b/inc/3rdparty/site_config/standard/spiegel.de.txt
@@ -8,6 +8,9 @@
8# - Fixed single_page_link 8# - Fixed single_page_link
9# - Included intro text in single page view 9# - Included intro text in single page view
10# - Added body in default view 10# - Added body in default view
11# stesie@
12# - removed copyright box
13# - removed "print more" box
11 14
12# set body 15# set body
13tidy: no 16tidy: no
@@ -15,6 +18,7 @@ tidy: no
15body: //div[@id="spArticleContent"] 18body: //div[@id="spArticleContent"]
16# body in default view 19# body in default view
17body: //div[@id="spArticleSection"] 20body: //div[@id="spArticleSection"]
21body: //div[contains(@class, 'article-section')] | //div[@id='js-article-top-wide-asset'] | //p[contains(@class, 'article-intro')] | //div[contains(@class, 'js-module-box-image')]
18# body in "Fotostrecke" 22# body in "Fotostrecke"
19body: //div[@id="spBigaContent"] 23body: //div[@id="spBigaContent"]
20 24
@@ -25,6 +29,8 @@ strip: //div[@id="spArticleContent"]/h3
25# set date in "Fotostrecke" 29# set date in "Fotostrecke"
26date: //div[@id="spBigaDatum"] 30date: //div[@id="spBigaDatum"]
27 31
32# title in default view
33title: //h2[contains(@class, 'article-title')]
28#set title in single page view 34#set title in single page view
29title: //div[@id='spArticleContent']/h2 35title: //div[@id='spArticleContent']/h2
30# strip title 36# strip title
@@ -49,7 +55,7 @@ strip: //*/div[@class='spCredit']/following-sibling::p
49strip: //div[@class='spMInline'] 55strip: //div[@class='spMInline']
50 56
51# remove photogalleries and extras 57# remove photogalleries and extras
52strip: //div[@class='spPhotoGallery'] 58strip: //div[contains(@class, 'spPhotoGallery')]
53strip: //div[@class='spPhotoGallery']/following-sibling::br 59strip: //div[@class='spPhotoGallery']/following-sibling::br
54strip: //div[@class='spAssetAlignleft'] 60strip: //div[@class='spAssetAlignleft']
55strip: //div[contains(@class,'spAsset')] 61strip: //div[contains(@class,'spAsset')]
@@ -67,9 +73,24 @@ strip: //div[@id='spBigaLatestEntries']
67strip: //div[contains(@class, 'spBigaNavi')] 73strip: //div[contains(@class, 'spBigaNavi')]
68strip: //div[@class='spDottedLine'] 74strip: //div[@class='spDottedLine']
69 75
76strip: //div[@class='asset-box article-print-more']
77strip: //div[@class='article-copyright']
78strip: //span[@class='image-buttons']
79
70# Use link to print article for single page view 80# Use link to print article for single page view
71single_page_link: //a[contains(@href, '-druck')] 81single_page_link: //a[contains(@href, '-druck')]
82if_page_contains: //div[contains(@class, 'multi-pager-control')]
83
84# Clean up title in print view
85find_string: <title>Druckversion -
86replace_string: <title>
72 87
73# use next link in "Fotostrecke" 88# use next link in "Fotostrecke"
74next_page_link: //a[@class='spBigaControlForw'] 89next_page_link: //a[@class='spBigaControlForw']
75test_url: http://www.spiegel.de/politik/deutschland/0,1518,787602,00.html \ No newline at end of file 90test_url: http://www.spiegel.de/politik/deutschland/0,1518,787602,00.html
91
92# regular article
93test_url: http://www.spiegel.de/wirtschaft/soziales/griechenland-was-den-griechischen-buergern-nun-droht-a-1042682.html
94
95# multipage article
96test_url: http://www.spiegel.de/spiegel/a-710880.html \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/spiil.org.txt b/inc/3rdparty/site_config/standard/spiil.org.txt
new file mode 100644
index 00000000..dd12fb88
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/spiil.org.txt
@@ -0,0 +1,6 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=https%3A%2F%2Fwww.spiil.org%2Fguide-bonnes-pratiques-editeurs-de-presse-ligne
4
5body: //div[contains(concat(' ',normalize-space(@class),' '),' node-content ')]
6test_url: https://www.spiil.org/guide-bonnes-pratiques-editeurs-de-presse-ligne
diff --git a/inc/3rdparty/site_config/standard/srf.ch.txt b/inc/3rdparty/site_config/standard/srf.ch.txt
new file mode 100755
index 00000000..d07a9050
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/srf.ch.txt
@@ -0,0 +1,24 @@
1# Author: cirnod@gmail.com
2
3tidy: no
4prune: no
5
6body: //div[@id="article-content"]/p | //div[@class="main-article-content clearfix"]
7
8# General Cleanup
9strip_id_or_class: offscreen
10strip_id_or_class: video-description
11strip_id_or_class: v2 big-video
12strip_id_or_class: module smb freetext
13strip_id_or_class: asset span3
14strip_id_or_class: module smb related-links
15
16# fix image-galleries
17strip_id_or_class: module lightbox-gallery image hide
18replace_string(width="624"): width="100%"
19replace_string(height="468"): height="%"
20
21# Try yourself
22test_url: http://www.srf.ch/news/wirtschaft/weltbank-korrigiert-konjunktur-erwartungen-nach-unten
23test_url: http://www.srf.ch/news/wirtschaft/ural-statt-alpen-russische-touristen-bleiben-zuhause
24test_url: http://www.srf.ch/news/international/zwei-schweizer-bei-blutigem-attentat-in-mali-verletzt \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/sueddeutsche.de.txt b/inc/3rdparty/site_config/standard/sueddeutsche.de.txt
index 74b8d451..26e05605 100755
--- a/inc/3rdparty/site_config/standard/sueddeutsche.de.txt
+++ b/inc/3rdparty/site_config/standard/sueddeutsche.de.txt
@@ -1,6 +1,6 @@
1# 2012-12-04: complete rewrite after Süddeutsche.de relaunch - carlo@... 1# 2012-12-04: complete rewrite after Süddeutsche.de relaunch - carlo@...
2 2
3single_page_link: //a[ contains( @href, "/2.220/" ) ] 3single_page_link: //li[@id="article-sidebar-action-print"]/@data-clickurl
4 4
5body: //article[@id="sitecontent"]/section[@class="body"] 5body: //article[@id="sitecontent"]/section[@class="body"]
6author: //address[@class="author"] 6author: //address[@class="author"]
diff --git a/inc/3rdparty/site_config/standard/sunshinecoastdaily.com.au.txt b/inc/3rdparty/site_config/standard/sunshinecoastdaily.com.au.txt
new file mode 100755
index 00000000..bf5e9189
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/sunshinecoastdaily.com.au.txt
@@ -0,0 +1,10 @@
1body: //section//article//p
2
3strip: //aside
4strip: //div[@class='margin-top-15']
5strip: //p[@class='tags']
6
7author: //span[@class='byline']//ul[@class='piped']//li[1]
8date: //span[@class='byline']//ul[@class='piped']//li[2]
9
10parser: html5lib
diff --git a/inc/3rdparty/site_config/standard/sz.de.txt b/inc/3rdparty/site_config/standard/sz.de.txt
index f67637d2..f194271f 100755
--- a/inc/3rdparty/site_config/standard/sz.de.txt
+++ b/inc/3rdparty/site_config/standard/sz.de.txt
@@ -1,6 +1,6 @@
1# 2012-12-04: complete rewrite after Süddeutsche.de relaunch - carlo@... 1# 2012-12-04: complete rewrite after Süddeutsche.de relaunch - carlo@...
2 2
3single_page_link: //a[ contains( @href, "/2.220/" ) ] 3single_page_link: //li[@id="article-sidebar-action-print"]/@data-clickurl
4 4
5body: //article[@id="sitecontent"]/section[@class="body"] 5body: //article[@id="sitecontent"]/section[@class="body"]
6author: //address[@class="author"] 6author: //address[@class="author"]
diff --git a/inc/3rdparty/site_config/standard/tagesanzeiger.ch.txt b/inc/3rdparty/site_config/standard/tagesanzeiger.ch.txt
new file mode 100755
index 00000000..45c5cd02
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/tagesanzeiger.ch.txt
@@ -0,0 +1,14 @@
1# Author: cirnod@gmail.com
2
3tidy: no
4prune: no
5
6body: //div[@id="article"]/h3 | //*[@id="mainContent"]
7
8# General Cleanup
9#strip_id_or_class: info_panel
10
11
12# Try yourself
13test_url: http://www.tagesanzeiger.ch/zuerich/stadt/Nach-spektakulaerer-Abseilaktion-verhaftet/story/18039895
14test_url: http://www.tagesanzeiger.ch/ausland/naher-osten-und-afrika/IS-zerstoert-auch-das-antike-Hatra/story/19865699
diff --git a/inc/3rdparty/site_config/standard/tagesschau.de.txt b/inc/3rdparty/site_config/standard/tagesschau.de.txt
index be76cd05..ba3b1d3b 100755
--- a/inc/3rdparty/site_config/standard/tagesschau.de.txt
+++ b/inc/3rdparty/site_config/standard/tagesschau.de.txt
@@ -1,23 +1,14 @@
1title://h1[1] 1body: //div[contains(@class, 'sectionArticle')]//div[contains(concat(' ',normalize-space(@class),' '),' box ')]
2 2
3author: substring-after(//em, 'Von ') 3strip_id_or_class: infokasten
4author:string('tagesschau.de') 4strip_id_or_class: teaserImTeaser
5strip_id_or_class: Comments
6strip_id_or_class: mediaInfo
7strip: //div[contains(@class, 'mediaCon')]//iframe
5 8
6date:substring-after(//div[@class='standDatum'], 'Stand: ') 9prune: no
7 10
8body://div[contains(@class, 'article')] | //div[contains(@class, 'centerCol')] 11test_url: http://www.tagesschau.de/ausland/snowden-dateien-entschluesselung-101.html
12test_contains: Snowden hatte zunächst für
9 13
10strip://h1[1] 14test_url: http://www.tagesschau.de/xml/rss2
11strip: //div[contains(@class, 'directLinks')]
12strip: //div[contains(@class, 'zitatBox')]
13strip: //div[contains(@class, 'teaserBox metaBlock')]
14strip: //*[contains(@class, 'inv')]
15strip: //span[@class='imgSubline']
16strip: //*[contains(@class, 'topline')][1]
17strip: //div[@id='rightCol'][1]
18strip: //div[@id="footer"][1]
19strip: //div[@class="fPlayer"]
20strip: //div[@id='seitenanfang']
21strip: //div[@class='standDatum']
22strip: //em
23test_url: http://www.tagesschau.de/ausland/wahlkampffrankreich102.html \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/taz.de.txt b/inc/3rdparty/site_config/standard/taz.de.txt
index cf853662..a3368568 100755
--- a/inc/3rdparty/site_config/standard/taz.de.txt
+++ b/inc/3rdparty/site_config/standard/taz.de.txt
@@ -1,8 +1,9 @@
1date: //div[@class='secthead'] 1date: //div[@class='secthead']
2body: //div[@class='sectbody'] 2body: (//div[@class='sectbody'])[1]
3title: concat(//div[@class='sectbody']/h4,': ',//div[@class='sectbody']/h1) 3title: concat(//div[@class='sectbody']/h4,': ',//div[@class='sectbody']/h1)
4author: //span[@class='author'] 4author: //span[@class='author']
5strip: //p[@class='caption'] 5strip: //p[@class='caption']
6strip_id_or_class: ad_bin
6strip_id_or_class: rack 7strip_id_or_class: rack
7 8
8test_url: http://www.taz.de/Protestbewegung-Occupy/!80188/ \ No newline at end of file 9test_url: http://www.taz.de/Protestbewegung-Occupy/!80188/ \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/theatlantic.com.txt b/inc/3rdparty/site_config/standard/theatlantic.com.txt
index 3fc5611b..36864197 100755
--- a/inc/3rdparty/site_config/standard/theatlantic.com.txt
+++ b/inc/3rdparty/site_config/standard/theatlantic.com.txt
@@ -1,5 +1,6 @@
1title: //div[contains(@class, 'articleHead')]//h1 1title: //div[contains(@class, 'articleHead')]//h1
2 2
3body: //div[@itemprop='articleBody']
3body: //div[@class='articleText'] 4body: //div[@class='articleText']
4body: //div[@class='articleContent'] 5body: //div[@class='articleContent']
5body: //div[@id='article'] 6body: //div[@id='article']
@@ -13,10 +14,14 @@ strip: //p[contains(., 'This article available online at:')]
13strip: //p[contains(., 'This article available online at:')]/following::* 14strip: //p[contains(., 'This article available online at:')]/following::*
14strip: //div[@class='earthbox'] 15strip: //div[@class='earthbox']
15 16
16single_page_link: //article//a[contains(@class, 'print')] 17single_page_link: //div[contains(@class, 'article-tools')]//a[contains(@class, 'print')]
17 18
18native_ad_clue: //meta[@property="og:url" and contains(@content, '/sponsored/')] 19native_ad_clue: //meta[@property="og:url" and contains(@content, '/sponsored/')]
19 20
21#multi-page article
22test_url: http://www.theatlantic.com/magazine/archive/2014/12/the-real-roots-of-midlife-crisis/382235/
23test_contains: The curve tends to evince itself
24
20test_url: http://www.theatlantic.com/technology/archive/2011/04/want-to-see-how-crazy-a-bot-run-market-can-be/237773/ 25test_url: http://www.theatlantic.com/technology/archive/2011/04/want-to-see-how-crazy-a-bot-run-market-can-be/237773/
21test_url: http://www.theatlantic.com/magazine/archive/2007/11/the-autumn-of-the-multitaskers/6342/ 26test_url: http://www.theatlantic.com/magazine/archive/2007/11/the-autumn-of-the-multitaskers/6342/
22test_url: http://www.theatlantic.com/entertainment/archive/2012/04/30-rock-live-a-funny-reminder-of-why-sitcoms-arent-shot-live-anymore/256447/ \ No newline at end of file 27test_url: http://www.theatlantic.com/entertainment/archive/2012/04/30-rock-live-a-funny-reminder-of-why-sitcoms-arent-shot-live-anymore/256447/
diff --git a/inc/3rdparty/site_config/standard/theaustralian.com.au.txt b/inc/3rdparty/site_config/standard/theaustralian.com.au.txt
new file mode 100755
index 00000000..1245efca
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/theaustralian.com.au.txt
@@ -0,0 +1,6 @@
1body: //div[contains(@class, 'story-body')]
2author: //cite[contains(@class, 'author')]
3date: //span[@class='datestamp']
4
5strip: //div[@class='story-info']
6
diff --git a/inc/3rdparty/site_config/standard/thebostonchannel.com.txt b/inc/3rdparty/site_config/standard/thebostonchannel.com.txt
index b74442de..808876da 100755
--- a/inc/3rdparty/site_config/standard/thebostonchannel.com.txt
+++ b/inc/3rdparty/site_config/standard/thebostonchannel.com.txt
@@ -1,7 +1,7 @@
1title: //meta[@name='og:title']/@content 1title: //meta[@name='og:title']/@content
2date: //meta[@name='created']/@content 2date: //meta[@name='created']/@content
3body: //div[@class="StoryBody" or @class="storyTeaser"] 3body: //div[contains(@class, "article-body")]
4 4
5replace_string(<p></p>): <br /><br /> 5replace_string(<p></p>): <br /><br />
6 6
7test_url: http://www.thebostonchannel.com/slideshow/news/28210648/detail.html \ No newline at end of file 7test_url: http://www.wcvb.com/news/2-teens-arrested-in-fatal-dorchester-shooting-of-16yearold-boy/33564886
diff --git a/inc/3rdparty/site_config/standard/theguardian.com.txt b/inc/3rdparty/site_config/standard/theguardian.com.txt
index 88e2ecf4..c8b70e6f 100755
--- a/inc/3rdparty/site_config/standard/theguardian.com.txt
+++ b/inc/3rdparty/site_config/standard/theguardian.com.txt
@@ -1,5 +1,5 @@
1title: //div[@id='main-article-info']//h1 1title: //div[@id='main-article-info']//h1
2body: //div[@id='article-wrapper'] 2body: //figure[contains(@itemprop, "associatedMedia")] | //div[contains(@itemprop, "articleBody")]
3date: //li[@class='publication']//time[@pubdate] | //li[@class='publication']//data[@pubdate] 3date: //li[@class='publication']//time[@pubdate] | //li[@class='publication']//data[@pubdate]
4strip: //div[contains(@class, 'email-subscription')] 4strip: //div[contains(@class, 'email-subscription')]
5strip: //div[contains(@class, 'kindleWidget')] 5strip: //div[contains(@class, 'kindleWidget')]
@@ -11,6 +11,8 @@ native_ad_clue: //meta[@property="video:tag" and contains(@content, "Partner zon
11prune: no 11prune: no
12tidy: no 12tidy: no
13 13
14strip_id_or_class: -expand-
15
14test_url: http://www.theguardian.com/world/2013/oct/04/nsa-gchq-attack-tor-network-encryption 16test_url: http://www.theguardian.com/world/2013/oct/04/nsa-gchq-attack-tor-network-encryption
15test_contains: The National Security Agency has made repeated attempts to develop 17test_contains: The National Security Agency has made repeated attempts to develop
16test_contains: The agency did not directly address those questions, instead providing a statement. 18test_contains: The agency did not directly address those questions, instead providing a statement.
diff --git a/inc/3rdparty/site_config/standard/theregister.co.uk.txt b/inc/3rdparty/site_config/standard/theregister.co.uk.txt
index 5d30230d..70d3d437 100755
--- a/inc/3rdparty/site_config/standard/theregister.co.uk.txt
+++ b/inc/3rdparty/site_config/standard/theregister.co.uk.txt
@@ -1,8 +1,9 @@
1# Updated 25-Jan-2014 1single_page_link: //link[contains(@href, 'm.theregister')]
2single_page_link: //a[contains(@href, '/Print/')] 2if_page_contains: //div[@id='nextpage']
3strip: //div[@class='wptl btm']
4body: //div[contains(@class,'article_head')]//h2 | //div[@id='body']
3 5
4title: //div[@id="article"]/h2 6#multipage
5author: //p[@class="byline"]/a 7test_url: http://www.theregister.co.uk/2015/07/06/geeks_guide_spaceguard_center/
6date: //p[@class="dateline"]/a[last()] 8#singlepage
7 9test_url: http://www.theregister.co.uk/2015/07/06/us_japan_massive_robots_in_the_ring/
8test_url: http://www.theregister.co.uk/2014/01/24/thirty_years_of_the_apple_macintosh_part_2/
diff --git a/inc/3rdparty/site_config/standard/theverge.com.txt b/inc/3rdparty/site_config/standard/theverge.com.txt
index 78f8654a..cee50c9b 100755
--- a/inc/3rdparty/site_config/standard/theverge.com.txt
+++ b/inc/3rdparty/site_config/standard/theverge.com.txt
@@ -33,6 +33,8 @@ strip_id_or_class: m-ad
33strip_id_or_class: social-sharing 33strip_id_or_class: social-sharing
34strip_id_or_class: m-video-entry__excerpt 34strip_id_or_class: m-video-entry__excerpt
35strip_id_or_class: hidden 35strip_id_or_class: hidden
36strip_id_or_class: m-article__follow-bar
37strip_id_or_class: m-article__share-buttons
36 38
37replace_string(<noscript>): <div> 39replace_string(<noscript>): <div>
38replace_string(</noscript>): </div> 40replace_string(</noscript>): </div>
diff --git a/inc/3rdparty/site_config/standard/titanic-magazin.de.txt b/inc/3rdparty/site_config/standard/titanic-magazin.de.txt
new file mode 100755
index 00000000..70108e36
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/titanic-magazin.de.txt
@@ -0,0 +1,8 @@
1body: //div[contains(@class, 'tt_news-bodytext')]
2
3# cut html short
4find_string: <!--TYPO3SEARCH_end-->
5replace_string: </div></body></html>
6
7test_url: http://www.titanic-magazin.de/ich.war.bei.der.waffen.rss
8test_url: http://www.titanic-magazin.de/news/wenig-bekannte-fakten-ueber-2014-6986/ \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/tofugu.com.txt b/inc/3rdparty/site_config/standard/tofugu.com.txt
new file mode 100644
index 00000000..5ac9d6a0
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/tofugu.com.txt
@@ -0,0 +1,3 @@
1body://div[@class='entry-content']
2
3test_url: http://www.tofugu.com/2015/07/20/interview-with-toriena-japanese-chiptune/
diff --git a/inc/3rdparty/site_config/standard/truongtx.me.txt b/inc/3rdparty/site_config/standard/truongtx.me.txt
new file mode 100755
index 00000000..6b10adce
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/truongtx.me.txt
@@ -0,0 +1,9 @@
1prune: false
2tidy: false
3
4body: //div[@class='col-md-9']
5author: //meta[@name='author']
6date: //i[@class='fa fa-calendar']/../span
7title: //div[@class='page-header']/h1
8
9test_url: https://truongtx.me/2014/04/20/emacs-javascript-completion-and-refactoring/
diff --git a/inc/3rdparty/site_config/standard/utdailybeacon.com.txt b/inc/3rdparty/site_config/standard/utdailybeacon.com.txt
index d37911bc..c4593d55 100755
--- a/inc/3rdparty/site_config/standard/utdailybeacon.com.txt
+++ b/inc/3rdparty/site_config/standard/utdailybeacon.com.txt
@@ -1,5 +1,2 @@
1title: //h1 1body: //div[@id='blox-story-text']
2author: //*[@class='byline'] 2test_url: http://www.utdailybeacon.com/news/article_ccf6d024-0f15-11e5-ae29-9f63598deb81.html
3date: substring-after(//*[@class='pubdatetime'], 'Published: ')
4body: //*[@class='body-block']
5test_url: http://utdailybeacon.com/news/2012/oct/8/energy-forum-continues/ \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/volkskrant.nl.txt b/inc/3rdparty/site_config/standard/volkskrant.nl.txt
new file mode 100755
index 00000000..c2770349
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/volkskrant.nl.txt
@@ -0,0 +1,15 @@
1#bypass cookie check
2single_page_link: //a[contains(@href, '/cookiewall/accept.do?')]
3
4title: //h1[@itemprop="headline"]
5body: //figure[contains(@class, 'article__top-image')] | //div[@itemprop="articleBody"]
6
7strip: //div[contains(@class, 'media-container') and contains(@class, 'pull-right')]
8
9tidy: no
10prune: no
11
12test_url: http://www.volkskrant.nl/sport/dossier-wereldvoetbalbond-fifa-wankelt~a4042695/
13test_contains: De belangrijkste spil in het
14
15test_url: http://www.volkskrant.nl/nieuws/rss.xml \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/warnerbros.fr.txt b/inc/3rdparty/site_config/standard/warnerbros.fr.txt
index 21f56352..6215b727 100755
--- a/inc/3rdparty/site_config/standard/warnerbros.fr.txt
+++ b/inc/3rdparty/site_config/standard/warnerbros.fr.txt
@@ -1,3 +1,2 @@
1title: //h3 1body: //div[@class="article-body"]
2body: //div[@class="content_wysiwyg"] 2test_url: https://www.warnerbros.fr/articles/magic-mike-xxl-adam-rodriguez-portrait
3test_url: http://www.warnerbros.fr/game-of-thrones-un-junket-vu-de-l-interieur-268.html \ No newline at end of file
diff --git a/inc/3rdparty/site_config/standard/washingtonpost.com.txt b/inc/3rdparty/site_config/standard/washingtonpost.com.txt
index 0aa9f1d8..c29af00f 100755
--- a/inc/3rdparty/site_config/standard/washingtonpost.com.txt
+++ b/inc/3rdparty/site_config/standard/washingtonpost.com.txt
@@ -5,9 +5,14 @@ body: //div[contains(@class, "article_body")]
5body: //div[@id='print_facet']//div[@id='body'] 5body: //div[@id='print_facet']//div[@id='body']
6 6
7author://meta[@name='DC.creator']/@content 7author://meta[@name='DC.creator']/@content
8author://span[@class="pb-byline"]
9author://h3[@property='dc.creator']//a[@rel='author']
8title://meta[@name='title']/@content 10title://meta[@name='title']/@content
9date://div[contains(@class,'byline')]//span[contains(@class,'published')]/@title 11date://div[contains(@class,'byline')]//span[contains(@class,'published')]/@title
10date://meta[@name="DC.date.issued"]/@content 12date://meta[@name="DC.date.issued"]/@content
13date://span[contains(@class,"pb-timestamp")]
14date://meta[@name="eomportal-lastUpdate"]/@content
15
11strip://div[@class="relative primary-slot padding-top img-border gallery-container photo-wrapper"] 16strip://div[@class="relative primary-slot padding-top img-border gallery-container photo-wrapper"]
12strip://div[@id="wp-column six end"] 17strip://div[@id="wp-column six end"]
13strip://div[contains(@class,'hidden')] 18strip://div[contains(@class,'hidden')]
@@ -23,6 +28,7 @@ strip_id_or_class: module
23 28
24# Change gJQAwdJG4U_story.html to gJQAwdJG4U_print.html 29# Change gJQAwdJG4U_story.html to gJQAwdJG4U_print.html
25single_page_link: concat(substring-before(//link[@rel="canonical"]/@href, "_story.html"), "_print.html") 30single_page_link: concat(substring-before(//link[@rel="canonical"]/@href, "_story.html"), "_print.html")
31if_page_contains: //link[@rel="canonical" and contains(@href, '_story.html')]
26 32
27# [OLD] Change gJQAwdJG4U_story.html to gJQAwdJG4U_story_print.html 33# [OLD] Change gJQAwdJG4U_story.html to gJQAwdJG4U_story_print.html
28#single_page_link: concat(substring-before(//link[@rel="canonical"]/@href, "_story.html"), "_story_print.html") 34#single_page_link: concat(substring-before(//link[@rel="canonical"]/@href, "_story.html"), "_story_print.html")
diff --git a/inc/3rdparty/site_config/standard/watoday.com.au.txt b/inc/3rdparty/site_config/standard/watoday.com.au.txt
new file mode 100755
index 00000000..4302ac5e
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/watoday.com.au.txt
@@ -0,0 +1,7 @@
1author: //h3[@class="authorName"]
2date: //dd[@class='updated dtstamp']//time
3
4strip: //div[contains(@class, "adspot")]
5strip: //noscript
6strip: //p//small
7
diff --git a/inc/3rdparty/site_config/standard/weeklytimesnow.com.au.txt b/inc/3rdparty/site_config/standard/weeklytimesnow.com.au.txt
new file mode 100755
index 00000000..a79871f3
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/weeklytimesnow.com.au.txt
@@ -0,0 +1,4 @@
1body: //div[@class='main-col' or @class='article-image-wide']
2title: //h1[@class='article-title']
3author: substring-before(//span[@class='author'], "|")
4date: //span[@class='date']
diff --git a/inc/3rdparty/site_config/standard/westernadvocate.com.au.txt b/inc/3rdparty/site_config/standard/westernadvocate.com.au.txt
new file mode 100755
index 00000000..eb00f776
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/westernadvocate.com.au.txt
@@ -0,0 +1,11 @@
1title: //header[contains(@class, "news-article-title")]//h1
2date: //div[@class="news-article-byline"]//time
3author: //h2[@class="news-article-author"]//cite
4
5# Turns out that westernadvocate is doing funky things with the slide show images. :<
6# body: //ul[@class="slides"]//img | //div[contains(@class, "news-article-body")]
7body: //div[contains(@class, "news-article-body")]
8
9strip: //div[contains(@class, "flexslider")]
10
11test_url: http://www.westernadvocate.com.au/story/1532050/roos-accept-ziebell-ban-commentators-do-not/
diff --git a/inc/3rdparty/site_config/standard/wsj.com.txt b/inc/3rdparty/site_config/standard/wsj.com.txt
new file mode 100755
index 00000000..467c39c2
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/wsj.com.txt
@@ -0,0 +1,29 @@
1title: //meta[@property="og:title"]/@content
2body: //div[@id='wsj-article-wrap']
3# is this still used?
4body: //div[@id='article_story_body']
5
6author: //h3[@class='byline']/a
7# for slide show content
8body: //ul[@id='imageSlide']//li[@class='firstSlide']//img | (//div[@class='txt_body']//p)[1]
9date: //li[@class='dateStamp']/small
10
11strip_id_or_class: insetFullBracket
12strip_id_or_class: insettipBox
13#strip_id_or_class: legacyInset
14strip_id_or_class: recipeACShopAndBuyText
15
16strip: //div[contains(@class, 'insetContent')]//cite
17strip: //*[contains(@style, 'visibility: hidden;')]
18strip: //div[contains(@class, 'insetContent') and not(contains(@class, 'image'))]
19strip: //div[contains(@class, 'carousel')]
20
21prune: no
22tidy: no
23
24test_url: http://www.wsj.com/articles/airasia-flight-8501-tail-recovered-1420878809
25test_contains: Saturday evening that the black boxes
26test_url: http://www.wsj.com/news/articles/SB10001424052702304626304579509100018004342
27test_url: http://www.wsj.com/article/SB10001424052970203363504577185322849515102.html
28# slide show
29test_url: http://www.wsj.com/article/SB10001424052970204791104577110550376458164.html
diff --git a/inc/3rdparty/site_config/standard/yosko.net.txt b/inc/3rdparty/site_config/standard/yosko.net.txt
new file mode 100644
index 00000000..99e711e3
--- /dev/null
+++ b/inc/3rdparty/site_config/standard/yosko.net.txt
@@ -0,0 +1,6 @@
1# Generated by FiveFilters.org's web-based selection tool
2# Place this file inside your site_config/custom/ folder
3# Source: http://siteconfig.fivefilters.org/grab.php?url=http%3A%2F%2Fwww.yosko.net%2Farticle33%2Fsnippet-06-javascript-capturer-des-raccourcis-clavier-utilises-par-votre-navigateur
4
5body: //article//section
6test_url: http://www.yosko.net/article33/snippet-06-javascript-capturer-des-raccourcis-clavier-utilises-par-votre-navigateur
diff --git a/inc/3rdparty/site_config/standard/yourerie.com.txt b/inc/3rdparty/site_config/standard/yourerie.com.txt
index b46b09e8..46ee5ba1 100755
--- a/inc/3rdparty/site_config/standard/yourerie.com.txt
+++ b/inc/3rdparty/site_config/standard/yourerie.com.txt
@@ -1,2 +1,2 @@
1body: //div[@class="nxFullTextData"] 1body: //div[@itemprop="articleBody"]
2test_url: http://yourerie.com/fulltext?nxd_id=306552 2test_url: http://www.yourerie.com/news/news-article/d/story/cd-release-party-at-pi-downs/22898/G_gFL3mSQkWH_DW2wLuMOA
diff --git a/inc/3rdparty/site_config/standard/zeit.de.txt b/inc/3rdparty/site_config/standard/zeit.de.txt
index 9815d478..4e008946 100755
--- a/inc/3rdparty/site_config/standard/zeit.de.txt
+++ b/inc/3rdparty/site_config/standard/zeit.de.txt
@@ -1,3 +1,4 @@
1# 2015.07.08 [Marvin Dickhaus] fixed single_page_link
1# 2013.10.30 [rezor92] fixed single_page_link 2# 2013.10.30 [rezor92] fixed single_page_link
2# 2012-12-23 [carlo@...] fixed half-assed headlines in articles, removed inline author profiles, adjusted picture captions 3# 2012-12-23 [carlo@...] fixed half-assed headlines in articles, removed inline author profiles, adjusted picture captions
3# 2012-03-17 [dkless@...] Cut metadata parts in the beginning and the ends of the content block; copyright entries for pictures removed; Author fixed, not sure if old entries still valid (I left them); Weird problems with some pages addressed (see last section for removing hidden section) 4# 2012-03-17 [dkless@...] Cut metadata parts in the beginning and the ends of the content block; copyright entries for pictures removed; Author fixed, not sure if old entries still valid (I left them); Weird problems with some pages addressed (see last section for removing hidden section)
@@ -5,8 +6,7 @@
5# 2011-08-23 [carlo@...] changed single page link to use print version: page works better, less ambiguity. Related cleanups and simplifications. 6# 2011-08-23 [carlo@...] changed single page link to use print version: page works better, less ambiguity. Related cleanups and simplifications.
6# 2011-08-20 [carlo@...] added author, fixed date 7# 2011-08-20 [carlo@...] added author, fixed date
7 8
8 9single_page_link: //a[contains(@href, 'komplettansicht')]
9single_page_link: //a[@title='Auf einer Seite']
10tidy: no 10tidy: no
11 11
12title: //title 12title: //title
@@ -24,6 +24,8 @@ strip: //p[@class="copyright"]
24strip: //div[@class="copyright"] 24strip: //div[@class="copyright"]
25#Removes pagination links at the end 25#Removes pagination links at the end
26strip: //div[@class="pagination"] 26strip: //div[@class="pagination"]
27#Removes link to main page at the bottom of some articles (Zur Startseite)
28strip: //a[@href='http://www.zeit.de']
27 29
28# Fix picture captions 30# Fix picture captions
29wrap_in(small): //p[@class="caption"]/text() 31wrap_in(small): //p[@class="caption"]/text()
@@ -43,3 +45,4 @@ strip_id_or_class:"pagination"
43 45
44footnotes: no 46footnotes: no
45test_url: http://www.zeit.de/kultur/film/2012-12/Kurzfilmtag 47test_url: http://www.zeit.de/kultur/film/2012-12/Kurzfilmtag
48test_url: http://www.zeit.de/kultur/2015-07/kapitalismuskritik-selbstberuhigung-armin-nassehi
diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php
index 65675afe..7ec1602d 100755
--- a/inc/poche/Database.class.php
+++ b/inc/poche/Database.class.php
@@ -156,11 +156,14 @@ class Database {
156 { 156 {
157 $sql = "SELECT * FROM users_config WHERE user_id = ?"; 157 $sql = "SELECT * FROM users_config WHERE user_id = ?";
158 $query = $this->executeQuery($sql, array($id)); 158 $query = $this->executeQuery($sql, array($id));
159 $result = $query->fetchAll(); 159 $result = ($query) ? $query->fetchAll() : false;
160 $user_config = array(); 160 $user_config = false;
161 if ($query) {
162 $user_config = array();
161 163
162 foreach ($result as $key => $value) { 164 foreach ($result as $key => $value) {
163 $user_config[$value['name']] = $value['value']; 165 $user_config[$value['name']] = $value['value'];
166 }
164 } 167 }
165 168
166 return $user_config; 169 return $user_config;
@@ -171,11 +174,7 @@ class Database {
171 $sql = "SELECT * FROM users WHERE username=?"; 174 $sql = "SELECT * FROM users WHERE username=?";
172 $query = $this->executeQuery($sql, array($username)); 175 $query = $this->executeQuery($sql, array($username));
173 $login = $query->fetchAll(); 176 $login = $query->fetchAll();
174 if (isset($login[0])) { 177 return (isset($login[0]) && $query) ? true : false;
175 return true;
176 } else {
177 return false;
178 }
179 } 178 }
180 179
181 public function login($username, $password, $isauthenticated = FALSE) 180 public function login($username, $password, $isauthenticated = FALSE)
@@ -187,10 +186,10 @@ class Database {
187 $sql = "SELECT * FROM users WHERE username=? AND password=?"; 186 $sql = "SELECT * FROM users WHERE username=? AND password=?";
188 $query = $this->executeQuery($sql, array($username, $password)); 187 $query = $this->executeQuery($sql, array($username, $password));
189 } 188 }
190 $login = $query->fetchAll(); 189 $login = ($query) ? $query->fetchAll() : false;
191 190
192 $user = array(); 191 $user = array();
193 if (isset($login[0])) { 192 if ($login[0]) {
194 $user['id'] = $login[0]['id']; 193 $user['id'] = $login[0]['id'];
195 $user['username'] = $login[0]['username']; 194 $user['username'] = $login[0]['username'];
196 $user['password'] = $login[0]['password']; 195 $user['password'] = $login[0]['password'];
@@ -243,7 +242,7 @@ class Database {
243 { 242 {
244 $sql = 'SELECT count(*) FROM users'.( $username ? ' WHERE username=?' : ''); 243 $sql = 'SELECT count(*) FROM users'.( $username ? ' WHERE username=?' : '');
245 $query = $this->executeQuery($sql, ( $username ? array($username) : array())); 244 $query = $this->executeQuery($sql, ( $username ? array($username) : array()));
246 list($count) = $query->fetch(); 245 list($count) = ($query) ? $query->fetch() : false;
247 return $count; 246 return $count;
248 } 247 }
249 248
@@ -252,7 +251,7 @@ class Database {
252 $sql = "SELECT * FROM users WHERE id=?"; 251 $sql = "SELECT * FROM users WHERE id=?";
253 $query = $this->executeQuery($sql, array($userID)); 252 $query = $this->executeQuery($sql, array($userID));
254 $password = $query->fetchAll(); 253 $password = $query->fetchAll();
255 return isset($password[0]['password']) ? $password[0]['password'] : null; 254 return ($query) ? $password[0]['password'] : false;
256 } 255 }
257 256
258 public function deleteUserConfig($userID) 257 public function deleteUserConfig($userID)
@@ -260,18 +259,22 @@ class Database {
260 $sql_action = 'DELETE from users_config WHERE user_id=?'; 259 $sql_action = 'DELETE from users_config WHERE user_id=?';
261 $params_action = array($userID); 260 $params_action = array($userID);
262 $query = $this->executeQuery($sql_action, $params_action); 261 $query = $this->executeQuery($sql_action, $params_action);
263 return $query; 262 return ($query) ? $query : false;
264 } 263 }
265 264
266 public function deleteTagsEntriesAndEntries($userID) 265 public function deleteTagsEntriesAndEntries($userID)
267 { 266 {
268 $entries = $this->retrieveAll($userID); 267 $entries = $this->retrieveAll($userID);
269 foreach($entries as $entryid) { 268 if ($entries) {
270 $tags = $this->retrieveTagsByEntry($entryid); 269 foreach($entries as $entry) {
271 foreach($tags as $tag) { 270 $tags = $this->retrieveTagsByEntry($entry['id']);
272 $this->removeTagForEntry($entryid,$tags); 271 foreach($tags as $tag) {
272 $this->removeTagForEntry($entry['id'], $tags);
273 }
274 $this->deleteById($entryid,$userID);
273 } 275 }
274 $this->deleteById($entryid,$userID); 276 } else {
277 return false;
275 } 278 }
276 } 279 }
277 280
@@ -302,7 +305,7 @@ class Database {
302 $query = $this->executeQuery($sql, array($user_id)); 305 $query = $this->executeQuery($sql, array($user_id));
303 $entries = $query->fetchAll(); 306 $entries = $query->fetchAll();
304 307
305 return $entries; 308 return ($query) ? $entries : false;
306 } 309 }
307 310
308 public function retrieveUnfetchedEntriesCount($user_id) 311 public function retrieveUnfetchedEntriesCount($user_id)
@@ -320,29 +323,44 @@ class Database {
320 $query = $this->executeQuery($sql, array($user_id)); 323 $query = $this->executeQuery($sql, array($user_id));
321 $entries = $query->fetchAll(); 324 $entries = $query->fetchAll();
322 325
326 return ($query) ? $entries : false;
327 }
328
329 public function retrieveAllWithTags($user_id)
330 {
331 $entries = $this->retrieveAll($user_id);
332 if ($entries) {
333 $count = count($entries);
334 for ($i = 0; $i < $count; $i++) {
335 $tag_entries = $this->retrieveTagsByEntry($entries[$i]['id']);
336 $tags = [];
337 foreach ($tag_entries as $tag) {
338 $tags[] = $tag[1];
339 }
340 $entries[$i]['tags'] = implode(',', $tags);
341 }
342 }
323 return $entries; 343 return $entries;
324 } 344 }
325 345
326 public function retrieveOneById($id, $user_id) 346 public function retrieveOneById($id, $user_id)
327 { 347 {
328 $entry = NULL;
329 $sql = "SELECT * FROM entries WHERE id=? AND user_id=?"; 348 $sql = "SELECT * FROM entries WHERE id=? AND user_id=?";
330 $params = array(intval($id), $user_id); 349 $params = array(intval($id), $user_id);
331 $query = $this->executeQuery($sql, $params); 350 $query = $this->executeQuery($sql, $params);
332 $entry = $query->fetchAll(); 351 $entry = $query->fetchAll();
333 352
334 return isset($entry[0]) ? $entry[0] : null; 353 return ($query) ? $entry[0] : false;
335 } 354 }
336 355
337 public function retrieveOneByURL($url, $user_id) 356 public function retrieveOneByURL($url, $user_id)
338 { 357 {
339 $entry = NULL;
340 $sql = "SELECT * FROM entries WHERE url=? AND user_id=?"; 358 $sql = "SELECT * FROM entries WHERE url=? AND user_id=?";
341 $params = array($url, $user_id); 359 $params = array($url, $user_id);
342 $query = $this->executeQuery($sql, $params); 360 $query = $this->executeQuery($sql, $params);
343 $entry = $query->fetchAll(); 361 $entry = $query->fetchAll();
344 362
345 return isset($entry[0]) ? $entry[0] : null; 363 return ($query) ? $entry[0] : false;
346 } 364 }
347 365
348 public function reassignTags($old_entry_id, $new_entry_id) 366 public function reassignTags($old_entry_id, $new_entry_id)
@@ -380,7 +398,8 @@ class Database {
380 $query = $this->executeQuery($sql, $params); 398 $query = $this->executeQuery($sql, $params);
381 $entries = $query->fetchAll(); 399 $entries = $query->fetchAll();
382 400
383 return $entries; 401 return ($query) ? $entries : false;
402
384 } 403 }
385 404
386 public function getEntriesByViewCount($view, $user_id, $tag_id = 0) 405 public function getEntriesByViewCount($view, $user_id, $tag_id = 0)
@@ -407,17 +426,57 @@ class Database {
407 } 426 }
408 427
409 $query = $this->executeQuery($sql, $params); 428 $query = $this->executeQuery($sql, $params);
410 list($count) = $query->fetch(); 429 list($count) = ($query) ? $query->fetch() : array(false);
411 430
412 return $count; 431 return $count;
413 } 432 }
414 public function getRandomId($user_id) { 433 public function getRandomId($user_id, $view) {
415 $random = (STORAGE == 'mysql') ? 'RAND()' : 'RANDOM()'; 434 $random = (STORAGE == 'mysql') ? 'RAND()' : 'RANDOM()';
416 $sql = "SELECT id FROM entries WHERE user_id=? ORDER BY ". $random . " LIMIT 1"; 435 switch ($view) {
417 $params = array($user_id); 436 case 'archive':
437 $sql = "SELECT id FROM entries WHERE user_id=? AND is_read=? ORDER BY ". $random . " LIMIT 1";
438 $params = array($user_id,1);
439 break;
440 case 'fav':
441 $sql = "SELECT id FROM entries WHERE user_id=? AND is_fav=? ORDER BY ". $random . " LIMIT 1";
442 $params = array($user_id,1);
443 break;
444 default:
445 $sql = "SELECT id FROM entries WHERE user_id=? AND is_read=? ORDER BY ". $random . " LIMIT 1";
446 $params = array($user_id,0);
447 break;
448 }
418 $query = $this->executeQuery($sql, $params); 449 $query = $this->executeQuery($sql, $params);
419 $id = $query->fetchAll(); 450 $id = $query->fetchAll();
420 451
452 return ($query) ? $id : false;
453 }
454
455 public function getPreviousArticle($id, $user_id)
456 {
457 $sqlcondition = "is_read=0";
458 if (STORAGE == 'postgres') {
459 $sqlcondition = "is_read=false";
460 }
461 $sql = "SELECT id FROM entries WHERE id = (SELECT max(id) FROM entries WHERE id < ? AND " . $sqlcondition . ") AND user_id=? AND " . $sqlcondition;
462 $params = array($id, $user_id);
463 $query = $this->executeQuery($sql, $params);
464 $id_entry = ($query) ? $query->fetchAll() : false;
465 $id = ($query) ? $id_entry[0][0] : false;
466 return $id;
467 }
468
469 public function getNextArticle($id, $user_id)
470 {
471 $sqlcondition = "is_read=0";
472 if (STORAGE == 'postgres') {
473 $sqlcondition = "is_read=false";
474 }
475 $sql = "SELECT id FROM entries WHERE id = (SELECT min(id) FROM entries WHERE id > ? AND " . $sqlcondition . ") AND user_id=? AND " . $sqlcondition;
476 $params = array($id, $user_id);
477 $query = $this->executeQuery($sql, $params);
478 $id_entry = ($query) ? $query->fetchAll() : false;
479 $id = ($query) ? $id_entry[0][0] : false;
421 return $id; 480 return $id;
422 } 481 }
423 482
@@ -493,7 +552,7 @@ class Database {
493 $sql_action .= $this->getEntriesOrder().' ' . $limit; 552 $sql_action .= $this->getEntriesOrder().' ' . $limit;
494 $params_action = array($user_id, $search, $search, $search); 553 $params_action = array($user_id, $search, $search, $search);
495 $query = $this->executeQuery($sql_action, $params_action); 554 $query = $this->executeQuery($sql_action, $params_action);
496 return $query->fetchAll(); 555 return ($query) ? $query->fetchAll() : false;
497 } 556 }
498 557
499 public function retrieveAllTags($user_id, $term = NULL) 558 public function retrieveAllTags($user_id, $term = NULL)
@@ -506,23 +565,23 @@ class Database {
506 GROUP BY tags.id, tags.value 565 GROUP BY tags.id, tags.value
507 ORDER BY tags.value"; 566 ORDER BY tags.value";
508 $query = $this->executeQuery($sql, (($term)? array($user_id, strtolower('%'.$term.'%')) : array($user_id) )); 567 $query = $this->executeQuery($sql, (($term)? array($user_id, strtolower('%'.$term.'%')) : array($user_id) ));
509 $tags = $query->fetchAll(); 568 $tags = ($query) ? $query->fetchAll() : false;
510 569
511 return $tags; 570 return $tags;
512 } 571 }
513 572
514 public function retrieveTag($id, $user_id) 573 public function retrieveTag($id, $user_id)
515 { 574 {
516 $tag = NULL;
517 $sql = "SELECT DISTINCT tags.* FROM tags 575 $sql = "SELECT DISTINCT tags.* FROM tags
518 LEFT JOIN tags_entries ON tags_entries.tag_id=tags.id 576 LEFT JOIN tags_entries ON tags_entries.tag_id=tags.id
519 LEFT JOIN entries ON tags_entries.entry_id=entries.id 577 LEFT JOIN entries ON tags_entries.entry_id=entries.id
520 WHERE tags.id=? AND entries.user_id=?"; 578 WHERE tags.id=? AND entries.user_id=?";
521 $params = array(intval($id), $user_id); 579 $params = array(intval($id), $user_id);
522 $query = $this->executeQuery($sql, $params); 580 $query = $this->executeQuery($sql, $params);
523 $tag = $query->fetchAll(); 581 $tags = ($query) ? $query->fetchAll() : false;
582 $tag = ($query) ? $tags[0] : false;
524 583
525 return isset($tag[0]) ? $tag[0] : NULL; 584 return $tag[0];
526 } 585 }
527 586
528 public function retrieveEntriesByTag($tag_id, $user_id) 587 public function retrieveEntriesByTag($tag_id, $user_id)
@@ -532,7 +591,7 @@ class Database {
532 LEFT JOIN tags_entries ON tags_entries.entry_id=entries.id 591 LEFT JOIN tags_entries ON tags_entries.entry_id=entries.id
533 WHERE tags_entries.tag_id = ? AND entries.user_id=? ORDER by entries.id DESC"; 592 WHERE tags_entries.tag_id = ? AND entries.user_id=? ORDER by entries.id DESC";
534 $query = $this->executeQuery($sql, array($tag_id, $user_id)); 593 $query = $this->executeQuery($sql, array($tag_id, $user_id));
535 $entries = $query->fetchAll(); 594 $entries = ($query) ? $query->fetchAll() : false;
536 595
537 return $entries; 596 return $entries;
538 } 597 }
@@ -544,7 +603,7 @@ class Database {
544 LEFT JOIN tags_entries ON tags_entries.tag_id=tags.id 603 LEFT JOIN tags_entries ON tags_entries.tag_id=tags.id
545 WHERE tags_entries.entry_id = ?"; 604 WHERE tags_entries.entry_id = ?";
546 $query = $this->executeQuery($sql, array($entry_id)); 605 $query = $this->executeQuery($sql, array($entry_id));
547 $tags = $query->fetchAll(); 606 $tags = ($query) ? $query->fetchAll() : false;
548 607
549 return $tags; 608 return $tags;
550 } 609 }
@@ -554,38 +613,40 @@ class Database {
554 $sql_action = "DELETE FROM tags_entries WHERE tag_id=? AND entry_id=?"; 613 $sql_action = "DELETE FROM tags_entries WHERE tag_id=? AND entry_id=?";
555 $params_action = array($tag_id, $entry_id); 614 $params_action = array($tag_id, $entry_id);
556 $query = $this->executeQuery($sql_action, $params_action); 615 $query = $this->executeQuery($sql_action, $params_action);
557 return $query; 616 return ($query) ? $query : false;
558 } 617 }
559 618
560 public function cleanUnusedTag($tag_id) 619 public function cleanUnusedTag($tag_id)
561 { 620 {
562 $sql_action = "SELECT tags.* FROM tags JOIN tags_entries ON tags_entries.tag_id=tags.id WHERE tags.id=?"; 621 $sql_action = "SELECT tags.* FROM tags JOIN tags_entries ON tags_entries.tag_id=tags.id WHERE tags.id=?";
563 $query = $this->executeQuery($sql_action,array($tag_id)); 622 $query = $this->executeQuery($sql_action,array($tag_id));
564 $tagstokeep = $query->fetchAll(); 623 $tagstokeep = ($query) ? $query->fetchAll() : false;
565 $sql_action = "SELECT tags.* FROM tags LEFT JOIN tags_entries ON tags_entries.tag_id=tags.id WHERE tags.id=?"; 624 $sql_action = "SELECT tags.* FROM tags LEFT JOIN tags_entries ON tags_entries.tag_id=tags.id WHERE tags.id=?";
566 $query = $this->executeQuery($sql_action,array($tag_id)); 625 $query = $this->executeQuery($sql_action,array($tag_id));
567 $alltags = $query->fetchAll(); 626 $alltags = ($query) ? $query->fetchAll() : false;
568 627
569 foreach ($alltags as $tag) { 628 if ($tagstokeep && $alltags) {
570 if ($tag && !in_array($tag,$tagstokeep)) { 629 foreach ($alltags as $tag) {
571 $sql_action = "DELETE FROM tags WHERE id=?"; 630 if ($tag && !in_array($tag,$tagstokeep)) {
572 $params_action = array($tag[0]); 631 $sql_action = "DELETE FROM tags WHERE id=?";
573 $this->executeQuery($sql_action, $params_action); 632 $params_action = array($tag[0]);
574 return true; 633 $this->executeQuery($sql_action, $params_action);
634 return true;
635 }
575 } 636 }
637 } else {
638 return false;
576 } 639 }
577
578 } 640 }
579 641
580 public function retrieveTagByValue($value) 642 public function retrieveTagByValue($value)
581 { 643 {
582 $tag = NULL;
583 $sql = "SELECT * FROM tags WHERE value=?"; 644 $sql = "SELECT * FROM tags WHERE value=?";
584 $params = array($value); 645 $params = array($value);
585 $query = $this->executeQuery($sql, $params); 646 $query = $this->executeQuery($sql, $params);
586 $tag = $query->fetchAll(); 647 $tag = ($query) ? $query->fetchAll() : false;
587 648
588 return isset($tag[0]) ? $tag[0] : null; 649 return ($query) ? $tag[0] : false;
589 } 650 }
590 651
591 public function createTag($value) 652 public function createTag($value)
@@ -593,7 +654,7 @@ class Database {
593 $sql_action = 'INSERT INTO tags ( value ) VALUES (?)'; 654 $sql_action = 'INSERT INTO tags ( value ) VALUES (?)';
594 $params_action = array($value); 655 $params_action = array($value);
595 $query = $this->executeQuery($sql_action, $params_action); 656 $query = $this->executeQuery($sql_action, $params_action);
596 return $query; 657 return ($query) ? $query : false;
597 } 658 }
598 659
599 public function setTagToEntry($tag_id, $entry_id) 660 public function setTagToEntry($tag_id, $entry_id)
@@ -601,7 +662,7 @@ class Database {
601 $sql_action = 'INSERT INTO tags_entries ( tag_id, entry_id ) VALUES (?, ?)'; 662 $sql_action = 'INSERT INTO tags_entries ( tag_id, entry_id ) VALUES (?, ?)';
602 $params_action = array($tag_id, $entry_id); 663 $params_action = array($tag_id, $entry_id);
603 $query = $this->executeQuery($sql_action, $params_action); 664 $query = $this->executeQuery($sql_action, $params_action);
604 return $query; 665 return ($query) ? $query : false;
605 } 666 }
606 667
607 private function getEntriesOrder() 668 private function getEntriesOrder()
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index fd2600f3..9014f455 100755
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -200,27 +200,34 @@ class Poche
200 200
201 //search for possible duplicate 201 //search for possible duplicate
202 $duplicate = NULL; 202 $duplicate = NULL;
203 $duplicate = $this->store->retrieveOneByURL($url->getUrl(), $this->user->getId()); 203 $clean_url = $url->getUrl();
204 204
205 $last_id = $this->store->add($url->getUrl(), $title, $body, $this->user->getId()); 205 // Clean URL to remove parameters from feedburner and all this stuff. Taken from Shaarli.
206 $i=strpos($clean_url,'&utm_source='); if ($i!==false) $clean_url=substr($clean_url,0,$i);
207 $i=strpos($clean_url,'?utm_source='); if ($i!==false) $clean_url=substr($clean_url,0,$i);
208 $i=strpos($clean_url,'#xtor=RSS-'); if ($i!==false) $clean_url=substr($clean_url,0,$i);
209
210 $duplicate = $this->store->retrieveOneByURL($clean_url, $this->user->getId());
211
212 $last_id = $this->store->add($clean_url, $title, $body, $this->user->getId());
206 if ( $last_id ) { 213 if ( $last_id ) {
207 Tools::logm('add link ' . $url->getUrl()); 214 Tools::logm('add link ' . $clean_url);
208 if (DOWNLOAD_PICTURES) { 215 if (DOWNLOAD_PICTURES) {
209 $content = Picture::filterPicture($body, $url->getUrl(), $last_id); 216 $content = Picture::filterPicture($body, $clean_url, $last_id);
210 Tools::logm('updating content article'); 217 Tools::logm('updating content article');
211 $this->store->updateContent($last_id, $content, $this->user->getId()); 218 $this->store->updateContent($last_id, $content, $this->user->getId());
212 } 219 }
213 220
214 if ($duplicate != NULL) { 221 if ($duplicate != NULL) {
215 // duplicate exists, so, older entry needs to be deleted (as new entry should go to the top of list), BUT favorite mark and tags should be preserved 222 // duplicate exists, so, older entry needs to be deleted (as new entry should go to the top of list), BUT favorite mark and tags should be preserved
216 Tools::logm('link ' . $url->getUrl() . ' is a duplicate'); 223 Tools::logm('link ' . $clean_url . ' is a duplicate');
217 // 1) - preserve tags and favorite, then drop old entry 224 // 1) - preserve tags and favorite, then drop old entry
218 $this->store->reassignTags($duplicate['id'], $last_id); 225 $this->store->reassignTags($duplicate['id'], $last_id);
219 if ($duplicate['is_fav']) { 226 if ($duplicate['is_fav']) {
220 $this->store->favoriteById($last_id, $this->user->getId()); 227 $this->store->favoriteById($last_id, $this->user->getId());
221 } 228 }
222 if ($this->store->deleteById($duplicate['id'], $this->user->getId())) { 229 if ($this->store->deleteById($duplicate['id'], $this->user->getId())) {
223 Tools::logm('previous link ' . $url->getUrl() .' entry deleted'); 230 Tools::logm('previous link ' . $clean_url .' entry deleted');
224 } 231 }
225 } 232 }
226 233
@@ -235,7 +242,7 @@ class Poche
235 } 242 }
236 else { 243 else {
237 $this->messages->add('e', _('error during insertion : the link wasn\'t added')); 244 $this->messages->add('e', _('error during insertion : the link wasn\'t added'));
238 Tools::logm('error during insertion : the link wasn\'t added ' . $url->getUrl()); 245 Tools::logm('error during insertion : the link wasn\'t added ' . $clean_url);
239 } 246 }
240 247
241 if ($autoclose == TRUE) { 248 if ($autoclose == TRUE) {
@@ -259,6 +266,15 @@ class Poche
259 } 266 }
260 foreach($entry_ids as $id) { 267 foreach($entry_ids as $id) {
261 $msg = 'delete link #' . $id; 268 $msg = 'delete link #' . $id;
269
270 // deleting tags and tags_entries
271 $tags = $this->store->retrieveTagsByEntry($id);
272 foreach ($tags as $tag) {
273 $this->store->removeTagForEntry($id, $tag['id']);
274 $this->store->cleanUnusedTag($tag['id']);
275 }
276
277 // deleting pictures
262 if ($this->store->deleteById($id, $this->user->getId())) { 278 if ($this->store->deleteById($id, $this->user->getId())) {
263 if (DOWNLOAD_PICTURES) { 279 if (DOWNLOAD_PICTURES) {
264 Picture::removeDirectory(ABS_PATH . $id); 280 Picture::removeDirectory(ABS_PATH . $id);
@@ -303,11 +319,16 @@ class Poche
303 if ( Tools::isAjaxRequest() ) { 319 if ( Tools::isAjaxRequest() ) {
304 echo 1; 320 echo 1;
305 exit; 321 exit;
306 } 322 } else {
307 else {
308 Tools::redirect(); 323 Tools::redirect();
309 } 324 }
310 break; 325 break;
326 case 'archive_and_next' :
327 $nextid = $this->store->getPreviousArticle($id, $this->user->getId());
328 $this->store->archiveById($id, $this->user->getId());
329 Tools::logm('archive link #' . $id);
330 Tools::redirect('?view=view&id=' . $nextid);
331 break;
311 case 'archive_all' : 332 case 'archive_all' :
312 $this->store->archiveAll($this->user->getId()); 333 $this->store->archiveAll($this->user->getId());
313 Tools::logm('archive all links'); 334 Tools::logm('archive all links');
@@ -394,8 +415,9 @@ class Poche
394 /* For some unknown reason I can't get displayView() to work here (it redirects to home view afterwards). So here's a dirty fix which redirects directly to URL */ 415 /* For some unknown reason I can't get displayView() to work here (it redirects to home view afterwards). So here's a dirty fix which redirects directly to URL */
395 case 'random': 416 case 'random':
396 Tools::logm('get a random article'); 417 Tools::logm('get a random article');
397 if ($this->store->getRandomId($this->user->getId())) { 418 $view = $_GET['view'];
398 $id_array = $this->store->getRandomId($this->user->getId()); 419 if ($this->store->getRandomId($this->user->getId(),$view)) {
420 $id_array = $this->store->getRandomId($this->user->getId(),$view);
399 $id = $id_array[0]; 421 $id = $id_array[0];
400 Tools::redirect('?view=view&id=' . $id[0]); 422 Tools::redirect('?view=view&id=' . $id[0]);
401 Tools::logm('got the article with id ' . $id[0]); 423 Tools::logm('got the article with id ' . $id[0]);
@@ -426,8 +448,9 @@ class Poche
426 $themes = $this->tpl->getInstalledThemes(); 448 $themes = $this->tpl->getInstalledThemes();
427 $languages = $this->language->getInstalledLanguages(); 449 $languages = $this->language->getInstalledLanguages();
428 $token = $this->user->getConfigValue('token'); 450 $token = $this->user->getConfigValue('token');
429 $http_auth = (isset($_SERVER['PHP_AUTH_USER']) || isset($_SERVER['REMOTE_USER'])) ? true : false; 451 $http_auth = isset($_SERVER['REMOTE_USER']);
430 $only_user = ($this->store->listUsers() > 1) ? false : true; 452 $only_user = ($this->store->listUsers() > 1) ? false : true;
453 $https = substr(Tools::getPocheUrl(), 0, 5) == 'https';
431 $tpl_vars = array( 454 $tpl_vars = array(
432 'themes' => $themes, 455 'themes' => $themes,
433 'languages' => $languages, 456 'languages' => $languages,
@@ -440,7 +463,8 @@ class Poche
440 'token' => $token, 463 'token' => $token,
441 'user_id' => $this->user->getId(), 464 'user_id' => $this->user->getId(),
442 'http_auth' => $http_auth, 465 'http_auth' => $http_auth,
443 'only_user' => $only_user 466 'only_user' => $only_user,
467 'https' => $https
444 ); 468 );
445 Tools::logm('config view'); 469 Tools::logm('config view');
446 break; 470 break;
@@ -453,9 +477,31 @@ class Poche
453 Tools::redirect(); 477 Tools::redirect();
454 } 478 }
455 $tags = $this->store->retrieveTagsByEntry($id); 479 $tags = $this->store->retrieveTagsByEntry($id);
480 $all_tags = $this->store->retrieveAllTags($this->user->getId());
481 $maximus = 0;
482 foreach ($all_tags as $eachtag) { // search for the most times a tag is present
483 if ($eachtag["entriescount"] > $maximus) $maximus = $eachtag["entriescount"];
484 }
485 foreach ($all_tags as $key => $eachtag) { // get the percentage of presence of each tag
486 $percent = floor(($eachtag["entriescount"] / $maximus) * 100);
487
488 if ($percent < 20): // assign a css class, depending on the number of entries count
489 $cssclass = 'smallesttag';
490 elseif ($percent >= 20 and $percent < 40):
491 $cssclass = 'smalltag';
492 elseif ($percent >= 40 and $percent < 60):
493 $cssclass = 'mediumtag';
494 elseif ($percent >= 60 and $percent < 80):
495 $cssclass = 'largetag';
496 else:
497 $cssclass = 'largesttag';
498 endif;
499 $all_tags[$key]['cssclass'] = $cssclass;
500 }
456 $tpl_vars = array( 501 $tpl_vars = array(
457 'entry_id' => $id, 502 'entry_id' => $id,
458 'tags' => $tags, 503 'tags' => $tags,
504 'alltags' => $all_tags,
459 'entry' => $entry, 505 'entry' => $entry,
460 ); 506 );
461 break; 507 break;
@@ -509,6 +555,20 @@ class Poche
509 $flattr->checkItem($entry['url'], $entry['id']); 555 $flattr->checkItem($entry['url'], $entry['id']);
510 } 556 }
511 557
558 # previous and next
559 $previous = FALSE;
560 $previous_id = $this->store->getPreviousArticle($id, $this->user->getId());
561 $next = FALSE;
562 $next_id = $this->store->getNextArticle($id, $this->user->getId());
563
564 if ($this->store->retrieveOneById($previous_id, $this->user->getId())) {
565 $previous = TRUE;
566 }
567 if ($this->store->retrieveOneById($next_id, $this->user->getId())) {
568 $next = TRUE;
569 }
570 $navigate = array('previous' => $previous, 'previousid' => $previous_id, 'next' => $next, 'nextid' => $next_id);
571
512 # tags 572 # tags
513 $tags = $this->store->retrieveTagsByEntry($entry['id']); 573 $tags = $this->store->retrieveTagsByEntry($entry['id']);
514 574
@@ -516,7 +576,8 @@ class Poche
516 'entry' => $entry, 576 'entry' => $entry,
517 'content' => $content, 577 'content' => $content,
518 'flattr' => $flattr, 578 'flattr' => $flattr,
519 'tags' => $tags 579 'tags' => $tags,
580 'navigate' => $navigate
520 ); 581 );
521 } 582 }
522 else { 583 else {
@@ -529,6 +590,7 @@ class Poche
529 'page_links' => '', 590 'page_links' => '',
530 'nb_results' => '', 591 'nb_results' => '',
531 'listmode' => (isset($_COOKIE['listmode']) ? true : false), 592 'listmode' => (isset($_COOKIE['listmode']) ? true : false),
593 'view' => $view,
532 ); 594 );
533 595
534 //if id is given - we retrieve entries by tag: id is tag id 596 //if id is given - we retrieve entries by tag: id is tag id
@@ -539,7 +601,7 @@ class Poche
539 601
540 $count = $this->store->getEntriesByViewCount($view, $this->user->getId(), $id); 602 $count = $this->store->getEntriesByViewCount($view, $this->user->getId(), $id);
541 603
542 if ($count > 0) { 604 if ($count && $count > 0) {
543 $this->pagination->set_total($count); 605 $this->pagination->set_total($count);
544 $page_links = str_replace(array('previous', 'next'), array(_('previous'), _('next')), 606 $page_links = str_replace(array('previous', 'next'), array(_('previous'), _('next')),
545 $this->pagination->page_links('?view=' . $view . '&sort=' . $_SESSION['sort'] . (($id)?'&id='.$id:'') . '&' )); 607 $this->pagination->page_links('?view=' . $view . '&sort=' . $_SESSION['sort'] . (($id)?'&id='.$id:'') . '&' ));
@@ -593,9 +655,6 @@ class Poche
593 */ 655 */
594 private function credentials() 656 private function credentials()
595 { 657 {
596 if (isset($_SERVER['PHP_AUTH_USER'])) {
597 return array($_SERVER['PHP_AUTH_USER'], 'php_auth', true);
598 }
599 if (!empty($_POST['login']) && !empty($_POST['password'])) { 658 if (!empty($_POST['login']) && !empty($_POST['password'])) {
600 return array($_POST['login'], $_POST['password'], false); 659 return array($_POST['login'], $_POST['password'], false);
601 } 660 }
@@ -635,6 +694,7 @@ class Poche
635 setlocale(LC_ALL, $language); 694 setlocale(LC_ALL, $language);
636 bindtextdomain($language, LOCALE); 695 bindtextdomain($language, LOCALE);
637 textdomain($language); 696 textdomain($language);
697 bind_textdomain_codeset($language, 'UTF-8');
638 698
639 $this->messages->add('s', _('welcome to your wallabag')); 699 $this->messages->add('s', _('welcome to your wallabag'));
640 Tools::logm('login successful'); 700 Tools::logm('login successful');
@@ -681,23 +741,45 @@ class Poche
681 $html->load_file($_FILES['file']['tmp_name']); 741 $html->load_file($_FILES['file']['tmp_name']);
682 $data = array(); 742 $data = array();
683 $read = 0; 743 $read = 0;
684 foreach (array('ol','ul') as $list) { 744
685 foreach ($html->find($list) as $ul) { 745 if (Tools::get_doctype($html)->innertext == "<!DOCTYPE NETSCAPE-Bookmark-file-1>") {
686 foreach ($ul->find('li') as $li) { 746 // Firefox-bookmarks HTML
687 $tmpEntry = array(); 747 foreach (array('DL','ul') as $list) {
688 $a = $li->find('a'); 748 foreach ($html->find($list) as $ul) {
689 $tmpEntry['url'] = $a[0]->href; 749 foreach ($ul->find('DT') as $li) {
690 $tmpEntry['tags'] = $a[0]->tags; 750 $tmpEntry = array();
691 $tmpEntry['is_read'] = $read; 751 $a = $li->find('A');
692 if ($tmpEntry['url']) { 752 $tmpEntry['url'] = $a[0]->href;
693 $data[] = $tmpEntry; 753 $tmpEntry['tags'] = $a[0]->tags;
754 $tmpEntry['is_read'] = $read;
755 if ($tmpEntry['url']) {
756 $data[] = $tmpEntry;
757 }
694 } 758 }
695 } 759 # the second <ol/ul> is for read links
696 # the second <ol/ul> is for read links 760 $read = ((sizeof($data) && $read)?0:1);
697 $read = ((sizeof($data) && $read)?0:1); 761 }
698 } 762 }
699 } 763 } else {
700 } 764 // regular HTML
765 foreach (array('ol','ul') as $list) {
766 foreach ($html->find($list) as $ul) {
767 foreach ($ul->find('li') as $li) {
768 $tmpEntry = array();
769 $a = $li->find('a');
770 $tmpEntry['url'] = $a[0]->href;
771 $tmpEntry['tags'] = $a[0]->tags;
772 $tmpEntry['is_read'] = $read;
773 if ($tmpEntry['url']) {
774 $data[] = $tmpEntry;
775 }
776 }
777 # the second <ol/ul> is for read links
778 $read = ((sizeof($data) && $read)?0:1);
779 }
780 }
781 }
782 }
701 783
702 // for readability structure 784 // for readability structure
703 785
@@ -715,7 +797,7 @@ class Poche
715 $urlsInserted = array(); //urls of articles inserted 797 $urlsInserted = array(); //urls of articles inserted
716 foreach($data as $record) { 798 foreach($data as $record) {
717 $url = trim(isset($record['article__url']) ? $record['article__url'] : (isset($record['url']) ? $record['url'] : '')); 799 $url = trim(isset($record['article__url']) ? $record['article__url'] : (isset($record['url']) ? $record['url'] : ''));
718 if ($url and !in_array($url, $urlsInserted)) { 800 if (filter_var($url, FILTER_VALIDATE_URL) and !in_array($url, $urlsInserted)) {
719 $title = (isset($record['title']) ? $record['title'] : _('Untitled - Import - ') . '</a> <a href="./?import">' . _('click to finish import') . '</a><a>'); 801 $title = (isset($record['title']) ? $record['title'] : _('Untitled - Import - ') . '</a> <a href="./?import">' . _('click to finish import') . '</a><a>');
720 $body = (isset($record['content']) ? $record['content'] : ''); 802 $body = (isset($record['content']) ? $record['content'] : '');
721 $isRead = (isset($record['is_read']) ? intval($record['is_read']) : (isset($record['archive']) ? intval($record['archive']) : 0)); 803 $isRead = (isset($record['is_read']) ? intval($record['is_read']) : (isset($record['archive']) ? intval($record['archive']) : 0));
@@ -820,14 +902,18 @@ class Poche
820 */ 902 */
821 public function export() 903 public function export()
822 { 904 {
823 $filename = "wallabag-export-".$this->user->getId()."-".date("Y-m-d").".json"; 905 $filename = "wallabag-export-".$this->user->getId()."-".date("Y-m-d").".json";
824 header('Content-Disposition: attachment; filename='.$filename); 906 header('Content-Disposition: attachment; filename='.$filename);
825 907
826 $entries = $this->store->retrieveAll($this->user->getId()); 908 $entries = $this->store->retrieveAllWithTags($this->user->getId());
827 echo $this->tpl->render('export.twig', array( 909 if ($entries) {
828 'export' => Tools::renderJson($entries), 910 echo $this->tpl->render('export.twig', array(
829 )); 911 'export' => Tools::renderJson($entries),
830 Tools::logm('export view'); 912 ));
913 Tools::logm('export view');
914 } else {
915 Tools::logm('error accessing database while exporting');
916 }
831 } 917 }
832 918
833 /** 919 /**
@@ -903,7 +989,7 @@ class Poche
903 if (0 == $limit) { 989 if (0 == $limit) {
904 $limit = count($entries); 990 $limit = count($entries);
905 } 991 }
906 if (count($entries) > 0) { 992 if ($entries && count($entries) > 0) {
907 for ($i = 0; $i < min(count($entries), $limit); $i++) { 993 for ($i = 0; $i < min(count($entries), $limit); $i++) {
908 $entry = $entries[$i]; 994 $entry = $entries[$i];
909 $newItem = $feed->createNewItem(); 995 $newItem = $feed->createNewItem();
@@ -915,7 +1001,10 @@ class Poche
915 $feed->addItem($newItem); 1001 $feed->addItem($newItem);
916 } 1002 }
917 } 1003 }
918 1004 else
1005 {
1006 Tools::logm("database error while generating feeds");
1007 }
919 $feed->genarateFeed(); 1008 $feed->genarateFeed();
920 exit; 1009 exit;
921 } 1010 }
diff --git a/inc/poche/Routing.class.php b/inc/poche/Routing.class.php
index 177b74d5..fb37a838 100755
--- a/inc/poche/Routing.class.php
+++ b/inc/poche/Routing.class.php
@@ -15,6 +15,7 @@ class Routing
15 protected $view; 15 protected $view;
16 protected $action; 16 protected $action;
17 protected $id; 17 protected $id;
18 protected $autoclose;
18 protected $url; 19 protected $url;
19 protected $file; 20 protected $file;
20 protected $defaultVars = array(); 21 protected $defaultVars = array();
@@ -74,15 +75,6 @@ class Routing
74 } elseif (ALLOW_REGISTER && isset($_GET['register'])){ 75 } elseif (ALLOW_REGISTER && isset($_GET['register'])){
75 $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser'], $_POST['newuseremail']); 76 $this->wallabag->createNewUser($_POST['newusername'], $_POST['password4newuser'], $_POST['newuseremail']);
76 Tools::redirect(); 77 Tools::redirect();
77 } elseif(isset($_SERVER['PHP_AUTH_USER'])) {
78 if($this->wallabag->store->userExists($_SERVER['PHP_AUTH_USER'])) {
79 $this->wallabag->login($this->referer);
80 } else {
81 $this->wallabag->messages->add('e', _('login failed: user doesn\'t exist'));
82 Tools::logm('user doesn\'t exist');
83 $tplFile = Tools::getTplFile('login');
84 $tplVars['http_auth'] = 1;
85 }
86 } elseif(isset($_SERVER['REMOTE_USER'])) { 78 } elseif(isset($_SERVER['REMOTE_USER'])) {
87 if($this->wallabag->store->userExists($_SERVER['REMOTE_USER'])) { 79 if($this->wallabag->store->userExists($_SERVER['REMOTE_USER'])) {
88 $this->wallabag->login($this->referer); 80 $this->wallabag->login($this->referer);
@@ -111,9 +103,7 @@ class Routing
111 $tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0); 103 $tag_id = (isset($_GET['tag_id']) ? intval($_GET['tag_id']) : 0);
112 $limit = (isset($_GET['limit']) ? intval($_GET['limit']) : 0); 104 $limit = (isset($_GET['limit']) ? intval($_GET['limit']) : 0);
113 $this->wallabag->generateFeeds($_GET['token'], filter_var($_GET['user_id'],FILTER_SANITIZE_NUMBER_INT), $tag_id, $_GET['type'], $limit); 105 $this->wallabag->generateFeeds($_GET['token'], filter_var($_GET['user_id'],FILTER_SANITIZE_NUMBER_INT), $tag_id, $_GET['type'], $limit);
114 } //elseif (ALLOW_REGISTER && isset($_GET['register'])) { 106 }
115 //$this->wallabag->register
116 //}
117 107
118 //allowed ONLY to logged in user 108 //allowed ONLY to logged in user
119 if (\Session::isLogged() === true) 109 if (\Session::isLogged() === true)
@@ -142,7 +132,7 @@ class Routing
142 $pdf->producePDF(); 132 $pdf->producePDF();
143 } elseif (isset($_GET['import'])) { 133 } elseif (isset($_GET['import'])) {
144 $import = $this->wallabag->import(); 134 $import = $this->wallabag->import();
145 $tplVars = array_merge($this->vars, $import); 135 $this->vars = array_merge($this->vars, $import);
146 } elseif (isset($_GET['empty-cache'])) { 136 } elseif (isset($_GET['empty-cache'])) {
147 Tools::emptyCache(); 137 Tools::emptyCache();
148 } elseif (isset($_GET['export'])) { 138 } elseif (isset($_GET['export'])) {
diff --git a/inc/poche/Tools.class.php b/inc/poche/Tools.class.php
index d0b31d4f..9c748391 100755
--- a/inc/poche/Tools.class.php
+++ b/inc/poche/Tools.class.php
@@ -40,6 +40,8 @@ final class Tools
40 */ 40 */
41 public static function getPocheUrl() 41 public static function getPocheUrl()
42 { 42 {
43 $baseUrl = "";
44
43 $https = (!empty($_SERVER['HTTPS']) 45 $https = (!empty($_SERVER['HTTPS'])
44 && (strtolower($_SERVER['HTTPS']) == 'on')) 46 && (strtolower($_SERVER['HTTPS']) == 'on'))
45 || (isset($_SERVER["SERVER_PORT"]) 47 || (isset($_SERVER["SERVER_PORT"])
@@ -72,8 +74,15 @@ final class Tools
72 $serverport = ''; 74 $serverport = '';
73 } 75 }
74 76
75 return 'http' . ($https ? 's' : '') . '://' 77 // check if BASE_URL is configured
76 . $host . $serverport . $scriptname; 78 if(BASE_URL) {
79 $baseUrl = BASE_URL;
80 } else {
81 $baseUrl = 'http' . ($https ? 's' : '') . '://' . $host . $serverport;
82 }
83
84 return $baseUrl . $scriptname;
85
77 } 86 }
78 87
79 /** 88 /**
@@ -392,8 +401,11 @@ final class Tools
392 ); 401 );
393 402
394 foreach ($files as $fileInfo) { 403 foreach ($files as $fileInfo) {
395 $todo = ($fileInfo->isDir() ? 'rmdir' : 'unlink'); 404 $filename = $fileInfo->getFilename();
396 $todo($fileInfo->getRealPath()); 405 if (!$filename[0] == '.') {
406 $todo = ($fileInfo->isDir() ? 'rmdir' : 'unlink');
407 $todo($fileInfo->getRealPath());
408 }
397 } 409 }
398 410
399 Tools::logm('empty cache'); 411 Tools::logm('empty cache');
@@ -417,4 +429,23 @@ final class Tools
417 return str_replace('+', '', $token); 429 return str_replace('+', '', $token);
418 } 430 }
419 431
432 /**
433 *
434 * Returns the doctype for an HTML document (used for Mozilla Bookmarks)
435 * @param simple_html_dom $doc
436 * @return doctype $el
437 *
438 */
439
440 public static function get_doctype($doc)
441 {
442 $els = $doc->find('unknown');
443
444 foreach ($els as $e => $el)
445 if ($el->parent()->tag == 'root')
446 return $el;
447
448 return NULL;
449 }
450
420} 451}
diff --git a/inc/poche/WallabagEBooks.class.php b/inc/poche/WallabagEBooks.class.php
index 55831571..ec1e4b27 100644
--- a/inc/poche/WallabagEBooks.class.php
+++ b/inc/poche/WallabagEBooks.class.php
@@ -96,7 +96,6 @@ class WallabagEpub extends WallabagEBooks
96 $bookEnd = "</body>\n</html>\n"; 96 $bookEnd = "</body>\n</html>\n";
97 97
98 $log = new Logger("wallabag", TRUE); 98 $log = new Logger("wallabag", TRUE);
99 $fileDir = CACHE;
100 99
101 $book = new EPub(EPub::BOOK_VERSION_EPUB3, DEBUG_POCHE); 100 $book = new EPub(EPub::BOOK_VERSION_EPUB3, DEBUG_POCHE);
102 $log->logLine("new EPub()"); 101 $log->logLine("new EPub()");
@@ -121,8 +120,12 @@ class WallabagEpub extends WallabagEBooks
121 $book->addDublinCoreMetadata(DublinCore::CONTRIBUTOR, "PHP"); 120 $book->addDublinCoreMetadata(DublinCore::CONTRIBUTOR, "PHP");
122 $book->addDublinCoreMetadata(DublinCore::CONTRIBUTOR, "wallabag"); 121 $book->addDublinCoreMetadata(DublinCore::CONTRIBUTOR, "wallabag");
123 122
124 $cssData = "body {\n margin-left: .5em;\n margin-right: .5em;\n text-align: justify;\n}\n\np {\n font-family: serif;\n font-size: 10pt;\n text-align: justify;\n text-indent: 1em;\n margin-top: 0px;\n margin-bottom: 1ex;\n}\n\nh1, h2 {\n font-family: sans-serif;\n font-style: italic;\n text-align: center;\n background-color: #6b879c;\n color: white;\n width: 100%;\n}\n\nh1 {\n margin-bottom: 2px;\n}\n\nh2 {\n margin-top: -2px;\n margin-bottom: 2px;\n}\n"; 123 /*
125 124 * Line not used but planned to be used
125 *
126 *$cssData = "body {\n margin-left: .5em;\n margin-right: .5em;\n text-align: justify;\n}\n\np {\n font-family: serif;\n font-size: 10pt;\n text-align: justify;\n text-indent: 1em;\n margin-top: 0px;\n margin-bottom: 1ex;\n}\n\nh1, h2 {\n font-family: sans-serif;\n font-style: italic;\n text-align: center;\n background-color: #6b879c;\n color: white;\n width: 100%;\n}\n\nh1 {\n margin-bottom: 2px;\n}\n\nh2 {\n margin-top: -2px;\n margin-bottom: 2px;\n}\n";
127 */
128
126 $log->logLine("Add Cover"); 129 $log->logLine("Add Cover");
127 130
128 $fullTitle = "<h1> " . $this->bookTitle . "</h1>\n"; 131 $fullTitle = "<h1> " . $this->bookTitle . "</h1>\n";
@@ -180,8 +183,6 @@ class WallabagMobi extends WallabagEBooks
180 $mobi = new MOBI(); 183 $mobi = new MOBI();
181 $content = new MOBIFile(); 184 $content = new MOBIFile();
182 185
183 $messages = new Messages(); // for later
184
185 Tools::logm('Filling metadata for Mobi...'); 186 Tools::logm('Filling metadata for Mobi...');
186 187
187 $content->set("title", $this->bookTitle); 188 $content->set("title", $this->bookTitle);
@@ -243,10 +244,9 @@ class WallabagPDF extends WallabagEbooks
243 244
244 $pdf->writeHTMLCell(0, 0, '', '', $intro, 0, 1, 0, true, '', true); 245 $pdf->writeHTMLCell(0, 0, '', '', $intro, 0, 1, 0, true, '', true);
245 246
246 $i = 1;
247 Tools::logm('Adding actual content...'); 247 Tools::logm('Adding actual content...');
248 foreach ($this->entries as $item) { 248 foreach ($this->entries as $item) {
249 $tags = $this->wallabag->store->retrieveTagsByEntry($entry['id']); 249 $tags = $this->wallabag->store->retrieveTagsByEntry($item['id']);
250 foreach ($tags as $tag) { 250 foreach ($tags as $tag) {
251 $pdf->SetKeywords($tag['value']); 251 $pdf->SetKeywords($tag['value']);
252 } 252 }
@@ -260,7 +260,7 @@ class WallabagPDF extends WallabagEbooks
260 $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); 260 $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
261 261
262 262
263 $pdf->Output($this->bookFileName . '.pdf', 'FD'); 263 $pdf->Output('cache/' . $this->bookFileName . '.pdf', 'FD');
264 } 264 }
265 catch (Exception $e) { 265 catch (Exception $e) {
266 Tools::logm('TCPDF has encountered an error : '.$e->getMessage()); 266 Tools::logm('TCPDF has encountered an error : '.$e->getMessage());
diff --git a/inc/poche/config.inc.default.php b/inc/poche/config.inc.default.php
index 09d3aa9a..5d889ffd 100755
--- a/inc/poche/config.inc.default.php
+++ b/inc/poche/config.inc.default.php
@@ -31,6 +31,9 @@
31// Change this if not using the standart port for SSL - i.e you server is behind sslh 31// Change this if not using the standart port for SSL - i.e you server is behind sslh
32@define ('SSL_PORT', 443); 32@define ('SSL_PORT', 443);
33 33
34// Define this only if you use wallabag behind a proxy and if you encounter problems
35@define ('BASE_URL', '');
36
34@define ('MODE_DEMO', FALSE); 37@define ('MODE_DEMO', FALSE);
35@define ('DEBUG_POCHE', FALSE); 38@define ('DEBUG_POCHE', FALSE);
36 39