git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
nieuws: first paragraph teaser as page description
[minimedit.git]
/
nieuws.inc.php
diff --git
a/nieuws.inc.php
b/nieuws.inc.php
index 40313e4b868eaca401db2331b303ae17261015b4..6d84d1ac54b5930a19f2f26af75dcc13a96d6c14 100644
(file)
--- a/
nieuws.inc.php
+++ b/
nieuws.inc.php
@@
-86,6
+86,13
@@
class ArchiveArticle
return $rest;
}
+ function teaser()
+ {
+ if (preg_match('{<p>(.*?)</p>}s', $this->body, $bodyp)) {
+ return $bodyp[1];
+ }
+ }
+
function img()
{
$this->body;