commit bb5fcfe67c2e33add517d824856046be801559a0
parent 60e28166bbd727b8b99473b52fd9543f39863578
Author: MTRNord <mtrnord1@gmail.com>
Date: Sun, 23 Nov 2014 18:24:13 +0100
Short Text when sow all Posts :D
Diffstat:
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/core/backend/blog/posts.php b/core/backend/blog/posts.php
@@ -38,6 +38,7 @@
$post_author = $daten->author;
$post_date = $daten->date;
$post_categrory = $daten->category;
+ $post_text_short = shortText($post_text,70);
}
$resultat->close();
} else {
@@ -57,6 +58,20 @@
+function shortText($string,$lenght) {
+ if(strlen($string) > $lenght) {
+ $string = substr($string,0,$lenght)."...";
+ $string_ende = strrchr($string, " ");
+ $string = str_replace($string_ende," ...", $string);
+ }
+ return $string;
+}
+//$longtext = $post_text;
+
+
+
+
+
diff --git a/themes/jumbotron/index.php b/themes/jumbotron/index.php
@@ -99,7 +99,7 @@
</div>
<div>
<p>
- $post_text</br>
+ $post_text_short</br>
</p>
</div>
<p>