[pLog-svn] r3300 - plog/trunk/class/dao
reto at devel.lifetype.net
reto at devel.lifetype.net
Sat Apr 29 14:57:44 GMT 2006
Author: reto
Date: 2006-04-29 14:57:43 +0000 (Sat, 29 Apr 2006)
New Revision: 3300
Modified:
plog/trunk/class/dao/article.class.php
Log:
fixes http://bugs.lifetype.net/view.php?id=786
{$post->getText()} still behaves as expected and splits the intro and the extended text with a <br/>. {$post->getText(false)} still returns the text with the POST_EXTENDED_TEXT_MODIFIER
BUT: you may now use {$post->getText('</div><div>')} or other fancy syntax (maybe even google ad code...) in your templates to split the two parts of an article.
@the team: do you think it would be worth to implement a configuration option to overwrite the default behaviour per blog? let me know...
Modified: plog/trunk/class/dao/article.class.php
===================================================================
--- plog/trunk/class/dao/article.class.php 2006-04-28 16:32:44 UTC (rev 3299)
+++ plog/trunk/class/dao/article.class.php 2006-04-29 14:57:43 UTC (rev 3300)
@@ -132,12 +132,14 @@
/**
* Returns the text of the article
+ * @param replace a string, usually html syntax, to "split"
+ * the intro and the extendet text. Default is <br/>.
* @return The text
*/
- function getText( $replace = true )
+ function getText( $replace = '<br/>' )
{
- if( $replace )
- return str_replace( POST_EXTENDED_TEXT_MODIFIER, "<br/>", $this->_text );
+ if( $replace !== false )
+ return str_replace( POST_EXTENDED_TEXT_MODIFIER, $replace, $this->_text );
else
return $this->_text;
}
More information about the pLog-svn
mailing list