mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-17 02:39:24 +01:00
Fixed bugs, added a flattr button and an option
There's a button and an option in define.inc.php to show the button or not.
This commit is contained in:
parent
af1d279226
commit
964481d023
@ -602,7 +602,7 @@ class FlattrItem{
|
||||
|
||||
private function cacheflattrfile($urltoflattr){
|
||||
if (!is_dir('cache/flattr')){
|
||||
mkdir('./cache/flattr', 0700);
|
||||
mkdir('./cache/flattr', 0777);
|
||||
}
|
||||
// if a cache flattr file for this url already exists and it's been less than one day than it have been updated, see in /cache
|
||||
if ((!file_exists("cache/flattr/".base64_encode($urltoflattr).".cache")) || (time() - filemtime("cache/flattr/".base64_encode($urltoflattr).".cache") > 86400))
|
||||
|
@ -20,8 +20,9 @@ define ('DEBUG_POCHE', FALSE);
|
||||
define ('DOWNLOAD_PICTURES', FALSE);
|
||||
define ('SHARE_TWITTER', TRUE);
|
||||
define ('SHARE_MAIL', TRUE);
|
||||
define ('SHARE_SHAARLI', FALSE);
|
||||
define ('SHARE_SHAARLI', TRUE);
|
||||
define ('SHAARLI_URL', 'http://myshaarliurl.com');
|
||||
define ('FLATTR', TRUE);
|
||||
define ('ABS_PATH', 'assets/');
|
||||
define ('TPL', __DIR__ . '/../../tpl');
|
||||
define ('LOCALE', __DIR__ . '/../../locale');
|
||||
|
@ -48,6 +48,10 @@ a.shaarli span {
|
||||
background: url('../img/light/shaarli.png') no-repeat;
|
||||
}
|
||||
|
||||
a.flattr span {
|
||||
background: url('../img/light/flattr.png');
|
||||
}
|
||||
|
||||
a.email span {
|
||||
background: url('../img/light/envelop.png') no-repeat;
|
||||
}
|
||||
|
BIN
tpl/img/light/flattr.png
Normal file
BIN
tpl/img/light/flattr.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
@ -11,6 +11,7 @@
|
||||
{% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@getpoche" target="_blank" class="tool twitter" title="{% trans "tweet" %}"><span>{% trans "tweet" %}</span></a></li>{% endif %}
|
||||
{% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&body={{ entry.url|url_encode }}%20via%20@getpoche" class="tool email" title="{% trans "email" %}"><span>{% trans "email" %}</span></a></li>{% endif %}
|
||||
{% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %}
|
||||
{% if constant('FLATTR') == 1 %}{% if flattr.status == "flattrable" %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr" title="flattr"><span>flattr</span></a></li>{% elseif flattr.status == "flattred" %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr"><span>flattr</span>{{ flattr.numflattrs }}</a></li>{% else %}{% endif %}{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
<header class="mbm">
|
||||
@ -31,7 +32,7 @@
|
||||
{% if constant('SHARE_TWITTER') == 1 %}<li><a href="https://twitter.com/home?status={{entry.title|url_encode}}%20{{ entry.url|url_encode }}%20via%20@getpoche" target="_blank" class="tool twitter" title="{% trans "tweet" %}"><span>{% trans "tweet" %}</span></a></li>{% endif %}
|
||||
{% if constant('SHARE_MAIL') == 1 %}<li><a href="mailto:?subject={{ entry.title|url_encode }}&body={{ entry.url|url_encode }}%20via%20@getpoche" class="tool email" title="{% trans "email" %}"><span>{% trans "email" %}</span></a></li>{% endif %}
|
||||
{% if constant('SHARE_SHAARLI') == 1 %}<li><a href="{{ constant('SHAARLI_URL') }}/index.php?post={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="{% trans "shaarli" %}"><span>{% trans "shaarli" %}</span></a></li>{% endif %}
|
||||
<li>{% if flattr.status == "flattrable" %} This thing is flattrable !{% elseif flattr.status == "flattred" %} <a href="{{ flattr.flattrItemURL }}" >This thing has already been flattred {{ flattr.numflattrs }} times and can be flattred !</a>{% else %}This article cannot be flattred{% endif %}</li>
|
||||
{% if constant('FLATTR') == 1 %}{% if flattr.status == "flattrable" %}<li><a href="http://flattr.com/submit/auto?url={{ entry.url }}" class="tool flattr" title="flattr"><span>flattr</span></a></li>{% elseif flattr.status == "flattred" %}<li><a href="{{ flattr.flattrItemURL }}" class="tool flattr"><span>flattr</span>{{ flattr.numflattrs }}</a></li>{% else %}{% endif %}{% endif %}
|
||||
</ul>
|
||||
<p>{% trans "this article appears wrong?" %} <a href="https://github.com/inthepoche/poche/issues/new">{% trans "create an issue" %}</a> {% trans "or" %} <a href="mailto:support@inthepoche.com?subject=Wrong%20display%20in%20poche&body={{ entry.url|url_encode }}">{% trans "contact us by mail" %}</a></p>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user