aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Vogel <icarus@dabo.de>2012-03-10 15:50:35 +0100
committerMichael Vogel <icarus@dabo.de>2012-03-10 15:50:35 +0100
commit74b3e9f273b019729d213f3ccaeba1bb11d61d24 (patch)
treedd6d72d425d2a95d95c3633b266ce673d4580d9a
parente098147c24bd45bc15c14fc597bd101b66011458 (diff)
downloadvolse-hubzilla-74b3e9f273b019729d213f3ccaeba1bb11d61d24.tar.gz
volse-hubzilla-74b3e9f273b019729d213f3ccaeba1bb11d61d24.tar.bz2
volse-hubzilla-74b3e9f273b019729d213f3ccaeba1bb11d61d24.zip
Enabled Caching for items. Changed color of tags in diabook.
-rw-r--r--include/text.php17
-rw-r--r--view/theme/diabook/style.css4
2 files changed, 18 insertions, 3 deletions
diff --git a/include/text.php b/include/text.php
index 5ad0154d7..38736d836 100644
--- a/include/text.php
+++ b/include/text.php
@@ -874,6 +874,14 @@ function link_compare($a,$b) {
if(! function_exists('prepare_body')) {
function prepare_body($item,$attach = false) {
+ $cache = get_config('system','itemcache');
+
+ if (($cache != '')) {
+ $cachefile = $cache."/".$item["guid"]."-".strtotime($item["edited"])."-".$attach;
+ if (file_exists($cachefile))
+ return(file_get_contents($cachefile));
+ }
+
call_hooks('prepare_body_init', $item);
$s = prepare_text($item['body']);
@@ -882,8 +890,11 @@ function prepare_body($item,$attach = false) {
call_hooks('prepare_body', $prep_arr);
$s = $prep_arr['html'];
- if(! $attach)
+ if(! $attach) {
+ if ($cache != '')
+ file_put_contents($cachefile, $s);
return $s;
+ }
$arr = explode(',',$item['attach']);
if(count($arr)) {
@@ -917,6 +928,10 @@ function prepare_body($item,$attach = false) {
$prep_arr = array('item' => $item, 'html' => $s);
call_hooks('prepare_body_final', $prep_arr);
+
+ if ($cache != '')
+ file_put_contents($cachefile, $prep_arr['html']);
+
return $prep_arr['html'];
}}
diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css
index 2d4670dca..0504ce96a 100644
--- a/view/theme/diabook/style.css
+++ b/view/theme/diabook/style.css
@@ -1277,14 +1277,14 @@ section {
}
.tag {
/*background: url("../../../images/tag_b.png") repeat-x center left;*/
- color: #3465A4;
+ color: #999;
padding-left: 3px;
font-size: 12px;
}
.tag a {
padding-right: 5px;
/*background: url("../../../images/tag.png") no-repeat center right;*/
- color: #3465A4;
+ color: #999;
}
.wwto {
position: absolute !important;