SimplePortal

Support => English Support => Topic started by: bizref on September 07, 2008, 11:44:45 AM

Title: Parameter for "More" link to appear in article
Post 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!
Title: Re: Parameter for "More" link to appear in article
Post by: bizref on September 12, 2008, 01:28:53 PM
Anybody have any suggestions for me?  Thanks!!
Title: Re: Parameter for "More" link to appear in article
Post by: Nathaniel on September 12, 2008, 07:32:24 PM
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.
Title: Re: Parameter for "More" link to appear in article
Post by: bizref on September 21, 2008, 11:18:13 AM
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?
Title: Re: Parameter for "More" link to appear in article
Post by: Nathaniel on September 21, 2008, 07:59:02 PM
Find this code ('SPortal.php'):
Code: [Select]
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:
Code: [Select]
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>';
}
Title: Re: Parameter for "More" link to appear in article
Post by: bizref on September 26, 2008, 11:14:46 PM
Awesome, thank you!
SimplePortal 2.3.8 © 2008-2024, SimplePortal