• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

Brand New XenScript Code For Full Posting

LPH

Flight Director
Flight Instructor
LPH submitted a new blog post:

Brand New XenScript Code For Full Posting

I was asked to modify the XenScript code for posting portions of the WordPress blog post into the XenForo community forums. The link to continue to the blog posting was posting inside the quote tags.

This is the latest version of the code. The new code is now live on this site and appears to be working. I will post it to the XenScripts forums after testing this code more than just a few times.

The code change begins on line 79 of the $body. The line spacing may be adjusted so that the final...
Continue reading the Original Blog Post
 

LPH

Flight Director
Flight Instructor
This is the code:

PHP:
            $body = $XF->visitor->get('username') . ' submitted a new blog post:';
            
            $body .= "\n\n[URL='" . get_permalink($post->ID) . "']" . $title . "[/url]\n\n";
            
            $body .= '[quote]' . XenForo_Helper_String::wholeWordTrim(XenForo_Helper_String::autoLinkBbCode(XenForo_Html_Renderer_BbCode::renderFromHtml(nl2br($content))), 500) . '[/quote]';
            
            /* Add preg_replace */
            $body = preg_replace('#\[nlposts .*\]#', '', $body);
 
Top