SimplePortal

Customization => Custom Coding => Topic started by: Aw06 on April 02, 2010, 10:55:56 PM

Title: 2.3.2 All alticles showing the read more link ...
Post by: Aw06 on April 02, 2010, 10:55:56 PM
Just updated, all articles seem to be showing the read more link ....
Title: Re: 2.3.2 All alticles showing the read more link ...
Post by: MultiformeIngegno on April 03, 2010, 03:26:17 AM
Yes! With 2.3.2 SP added the [cutoff] tag! :)
Title: Re: 2.3.2 All alticles showing the read more link ...
Post by: Aw06 on April 03, 2010, 06:22:35 AM
Yes! With 2.3.2 SP added the [cutoff] tag! :)

Yeah, but it's cutting off every article, even ones lesser than the cut off amount ?? need to fix
Title: Re: 2.3.2 All alticles showing the read more link ...
Post by: [SiNaN] on April 03, 2010, 11:07:08 AM
You mean the three dots? I don't think having that even when the full content is displayed is an issue. But if it is for you, I could provide the edits to change it for you.
Title: Re: 2.3.2 All alticles showing the read more link ...
Post by: Aw06 on April 03, 2010, 11:25:45 AM
You mean the three dots? I don't think having that even when the full content is displayed is an issue. But if it is for you, I could provide the edits to change it for you.

yeah, would love not to show it .. tell me how thanks 8)
Title: Re: 2.3.2 All alticles showing the read more link ...
Post by: [SiNaN] on April 03, 2010, 11:30:10 AM
Sources/PortalArticles.php

Code: (Find) [Select]
if (($cutoff = $smcFunc['strpos']($row['body'], '')) !== false)
$row['body'] = $smcFunc['substr']($row['body'], 0, $cutoff);
elseif (!empty($modSettings['articlelength']) && $smcFunc['strlen']($row['body']) > $modSettings['articlelength'])
$row['body'] = $smcFunc['substr']($row['body'], 0, $modSettings['articlelength']);

$row['body'] = parse_bbc($row['body'], $row['smileys_enabled'], $row['id_message']) . '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0" title="' . $row['subject'] . '">...</a>';

Code: (Replace) [Select]
if (($cutoff = $smcFunc['strpos']($row['body'], '')) !== false)
{
$row['body'] = $smcFunc['substr']($row['body'], 0, $cutoff);
$cutoff = true;
}
elseif (!empty($modSettings['articlelength']) && $smcFunc['strlen']($row['body']) > $modSettings['articlelength'])
{
$row['body'] = $smcFunc['substr']($row['body'], 0, $modSettings['articlelength']);
$cutoff = true;
}

$row['body'] = parse_bbc($row['body'], $row['smileys_enabled'], $row['id_message']) . (!empty($cutoff) ? '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0" title="' . $row['subject'] . '">...</a>' : '');
Title: Re: 2.3.2 All alticles showing the read more link ...
Post by: Aw06 on April 03, 2010, 11:36:09 AM
Thanks ... edits made :nervous-happy:
Title: Re: 2.3.2 All alticles showing the read more link ...
Post by: Aw06 on April 05, 2010, 04:32:36 PM
Hey sinan, this is what sent me in loop with the errors...

You Had Find
Code: [Select]
if (($cutoff = $smcFunc['strpos']($row['body'], '')) !== false)
But it's actually
Code: [Select]
[nobbc]if (($cutoff = $smcFunc['strpos']($row['body'], '[cutoff]')) !== false)[/nobbc]
So because the bbc hid the cutoff tag i pasted that into the file.
Title: Re: 2.3.2 All alticles showing the read more link ...
Post by: [SiNaN] on April 06, 2010, 01:45:06 AM
Right. Glad that you could find it. ;)
SimplePortal 2.3.8 © 2008-2024, SimplePortal