1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Brand New XenScript Code For Full Posting

Discussion in 'Announcements' started by LPH, May 25, 2013.

  1. LPH

    LPH Flight Director Flight Instructor

    Likes Received:
    735
    LPH submitted a new blog post:

    Brand New XenScript Code For Full Posting

    Continue reading the Original Blog Post
     
  2. LPH

    LPH Flight Director Flight Instructor

    Likes Received:
    735
    This is the code:

    PHP:
    1.  
    2.             $body = $XF->visitor->get('username') . ' submitted a new blog post:';
    3.            
    4.             $body .= "\n\n[URL='" . get_permalink($post->ID) . "']" . $title . "[/url]\n\n";
    5.            
    6.             $body .= '[quote]' . XenForo_Helper_String::wholeWordTrim(XenForo_Helper_String::autoLinkBbCode(XenForo_Html_Renderer_BbCode::renderFromHtml(nl2br($content))), 500) . '[/quote]';
    7.            
    8.             /* Add preg_replace */
    9.             $body = preg_replace('#\[nlposts .*\]#', '', $body);
    10.  
     
  3. Albert

    Albert Technology Writer

    Likes Received:
    36
    This is much nicer. Is it repetitive to add the title?
     
  4. Gracie

    Gracie Dogs Times Writer

    Likes Received:
    167

Share This Page