SimplePortal
Support => English Support => Topic started by: bizref on September 07, 2008, 11:44:45 AM
-
What is the input for the Parameter that lets you add "More" to the article content, which would instruct someone that there is more to read on the full post and/or how to read more?
I see the instruction on the submission page, but it's not clear what I am supposed to enter as the parameter ... thanks!
-
Anybody have any suggestions for me? Thanks!!
-
I don't know exactly what you mean by putting 'more' at the end of the article, but if you change the 'Article character limit' setting, then your article will be shortened and a '...' will be added to the end... Also, the 'x comments' link will take your users to the topic for the article, as will the article title.
-
I guess I just mean that for people who don't know that there is more to read, because let's say the end of a sentence is right at the cut-off point, I'd like there to be a "Click to read more" indicator right in the article where the break is... because I don't think it's clear to a newbie that clicking the Comments link or title will bring them into the full post. Does this make sense?
-
Find this code ('SPortal.php'):
if (!empty($length) && $func['strlen']($row['body']) > $length)
{
$row['body'] = $func['substr']($row['body'], 0, $length);
$cutoff = max(strrpos($row['body'], ' '), strrpos($row['body'], '<'));
if ($cutoff !== false)
$row['body'] = $func['substr']($row['body'], 0, $cutoff);
$row['body'] .= '...';
}
Replace with this code:
if (!empty($length) && $func['strlen']($row['body']) > $length)
{
$row['body'] = $func['substr']($row['body'], 0, $length);
$cutoff = max(strrpos($row['body'], ' '), strrpos($row['body'], '<'));
if ($cutoff !== false)
$row['body'] = $func['substr']($row['body'], 0, $cutoff);
$row['body'] .= '... <a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0' . (!empty($modSettings['articleview']) ? ';view=article' : '') . '">Click To Read More</a>';
}
-
Awesome, thank you!