Display content of page with id=XX anywhere in site
Trustmaster |
|
---|---|
You could make a shortened version {PAGE_TEXT_SHORT_ID_XX} using something like this:
// Cutpost
function sed_cutpost($text, $max_chars, $parse_bbcodes = true)
{
$text = $max_chars == 0 ? $text : sed_cutstring(strip_tags($text), $max_chars);
// Fix partial cuttoff
$text = preg_replace('#\[[^\]]*?$#', '...', $text);
// Parse the BB-codes or skip them
if($parse_bbcodes)
{
// Parse it
$text = sed_bbcode_parse($text);
}
else $text = preg_replace('#\[[^\]]+?\]#', '', $text);
return $text;
} May the Source be with you!
|