Are you new to the forums? PLEASE introduce yourself in the member area so we can welcome you properly, thank you.
0 Members and 1 Guest are viewing this topic.
if ($cutoff !== false) $row['body'] = $smcFunc['substr']($row['body'], 0, $cutoff); $row['body'] .= '...'; }
if ($cutoff !== false) $row['body'] = $smcFunc['substr']($row['body'], 0, $cutoff); $row['body'] .= '...'; } // If you find "" if the body, then process this... if (preg_match('/\/i', $row['body'])) { // First, count each character in the body, and then locate when occurs. $cutoff = strrpos(un_htmlspecialchars($row['body']), ''); // Now, fix the article by only showing the text that was counted before occured. $fixed_article = $smcFunc['substr']($row['body'], 0, $cutoff); // And now, assign the article as the fixed article. $row['body'] = $fixed_article; // The "click here for more" link. $row['body'] .= '... <br /><a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0">(view full article)</a>'; }
// Inside these tags autolink is not recommendable. $no_autolink_tags = array( 'url', 'iurl', 'ftp', 'email', );
// Inside these tags autolink is not recommendable. $no_autolink_tags = array( 'url', 'iurl', 'ftp', 'email', ); # @ccbtimewiz // Edit for Simple Portal's article <more> link. $codes[] = array( 'tag' => 'cutoff', 'type' => 'closed', 'content' => '<!-- // -->', );
$empty_tags = array('br', 'hr');
$empty_tags = array('br', 'hr', 'cutoff');
$all_link = '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0" title="' . $row['subject'] . '">...</a>'; }
$all_link = '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0" title="' . $row['subject'] . '">...</a>'; } // If you find "" if the body, then process this... if (preg_match('/\/i', $row['body'])) { // First, count each character in the body, and then locate when occurs. $cutoff = strrpos(un_htmlspecialchars($row['body']), ''); // Now, fix the article by only showing the text that was counted before occured. $fixed_article = $smcFunc['substr']($row['body'], 0, $cutoff); // And now, assign the article as the fixed article. $row['body'] = $fixed_article; // The "click here for more" link. $row['body'] .= '... <br /><a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0">(view full article)</a>'; }
if ((SMF == 'SSI' && empty($context['standalone'])) || empty($context['template_layers']) || WIRELESS || $initialized) return $tourniquet;
if ((SMF == 'SSI' && empty($context['standalone'])) || empty($context['template_layers']) || WIRELESS || $initialized) return $tourniquet; $tourniquet = str_replace('', '', $tourniquet);
Are you placing the tag in your article-like posts?
Glad to see you got it. Yeah, I should put better instructions The way I coded it, it searches the article for the tag . Together with the edits I put for Subs.php, doesn't actually show up in the post as it parses no content. All it really does is tell my code in SPortal.php or SPortal2.php (depending on what version of SMF you're running) to stop processing the article after it finds that tag, and then breaks a couple times in HTML and produces that "read more" link.At the moment, if you forgot to define a tag, the article will load by your current SP preferences.
Certainly, but I'm not sure which you're talking about.Could you perhaps show me your site and what exactly you'd like to cut off?