LPH
Well-known member
Hi
I have two lines of code which are leading to a posting behavior that is not as I desire.
The problem is that the Continue reading the Original Blog ends up inside the quote tags.
I keep looking at this code and trying to figure out how to make sure that the link is outside the quote. The resource manager uses a template to achieve the above but I'm not sure how to add templates and get them called properly here.
Does anyone have any suggestions? If you think a template is the best way to accomplish this then is there a write up I've missed which might help?
I have two lines of code which are leading to a posting behavior that is not as I desire.
PHP:
$body = '';
if($post_contains == 'full')
{
$body = $XF->visitor->get('username') . ' submitted a new blog post';
$body .= '[quote]' . XenForo_Helper_String::autoLinkBbCode(XenForo_Html_Renderer_BbCode::renderFromHtml(nl2br($content))) . "[/quote]";
/* Add preg_replace */
$body = preg_replace('#\[nlposts .*\]#', '', $body);
/* Add Trim to 500 Words */
$body = XenForo_Helper_String::wholeWordTrim($body, 500);
}
$body .= "[URL='" . get_permalink($post->ID) . "']Continue reading the Original Blog Post[/URL]";
The problem is that the Continue reading the Original Blog ends up inside the quote tags.
I keep looking at this code and trying to figure out how to make sure that the link is outside the quote. The resource manager uses a template to achieve the above but I'm not sure how to add templates and get them called properly here.
Does anyone have any suggestions? If you think a template is the best way to accomplish this then is there a write up I've missed which might help?