Alıntı: http://www.phpbb.com/community/viewtopi ... &t=2121294
feed.php
bul
Kod: Tümünü seç
return $content;
öncesine ekle
Kod: Tümünü seç
$content= substr( $content, 0, 300 );
öncesine ekle
Kod: Tümünü seç
$iMax= 300; // Minimum count of characters to be sent
if( strlen( $content )> $iMax ) { // Text is longer?
$sFirst= substr( $content, 0, $iMax ); // Copy minimum of characters and...
$content= substr( $content, $iMax ); // ...shorten by that amount
$sLast= preg_replace( '#\\s.+$#is', '', $content ); // Cut with next space
if( strlen( $sLast )< $content ) $sLast.= '...'; // Do we still have less than the whole text?
$content= $sFirst. $sLast.= '...'; // Minimum plus continuation of current word
}