Форумы / Cotonti / Extensions / [solved]readmore function

lalinux
#1 10.05.2009 01:09
Hi, I'm new here and I've been looking arround to find this topic and didn't found any.
So, is there any hack or plugin to make readmore function on my news page?
any help would be appreciate

*found that function in news.php*

how lovely cms
Отредактировано: lalinux (10.05.2009 01:31, 14 лет назад)
aiwass
#2 10.05.2009 01:40
Row 135 to 146 in plugins/news/news.php
$readmore = mb_strpos($pag['page_text'], "[more]");
					$pag['page_text'] = sed_parse(sed_cc($pag['page_text']), $cfg['parsebbcodepages'], $cfg['parsesmiliespages'], 1);
					if ($readmore>0)
					{
						$pag['page_text'] = mb_substr($pag['page_text'], 0, $readmore)."<br />";
						$pag['page_text'] .= "<a href=\"".$pag['page_pageurl']."\" title=\"".$L['ReadMore']."\">".$L['ReadMore']."</a>";
					}

					sed_news_strip_newpage($pag['page_text']);

					$pag['page_text'] = sed_post_parse($pag['page_text'], 'pages');
					$news->assign('PAGE_ROW_TEXT', $pag['page_text']);

I haven't tried this one myself, but i think it has the function you are looking for.
Take all that money that we spend on weapons and defences each year and instead spend it feeding and clothing and educating the poor of the world, which it would many times over, not one human being excluded, and we could explore space, together, both inner and outer, forever, in peace. - Bill Hicks

https://evlear.com
lalinux
#3 10.05.2009 01:58
Yes, I've already found that function and work like a charm
thanks