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

XF 1.4 strip bbcode from post template function?

Discussion in 'XenForo Questions and Support' started by electrogypsy, Jun 14, 2015.

  1. electrogypsy

    electrogypsy Active Member

    i'm editing my open_graph_meta template to support twitter cards. so far, i have:

    <xen:if is="{$xenOptions.facebookAppId} OR {$xenOptions.facebookAdmins}">
        <meta property="og:site_name" content="{$xenOptions.boardTitle}" />
        <meta property="og:image" content="{xen:helper fullurl, @ogLogoPath, 1}" />
        <meta property="og:type" content="{xen:if $ogType, $ogType, article}" />
        <meta property="og:url" content="{xen:raw $url}" />
        <meta property="og:title" content="{$thread.title}" />
        <xen:if is="{$description}"><meta property="og:description" content="{xen:raw $description}" /></xen:if>
        {xen:raw $ogExtraHtml}
        <xen:if is="{$xenOptions.facebookAppId}"><meta property="fb:app_id" content="{$xenOptions.facebookAppId}" /></xen:if>
        <xen:if is="{$xenOptions.facebookAdmins}"><meta property="fb:admins" content="{xen:helper implode, {$xenOptions.facebookAdmins}, ','}" /></xen:if>
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:site" content="@SquatThePlanet">
    <meta name="twitter:title" content="{$thread.title}">
    <meta name="twitter:description" content="{xen:raw $description}">
    <meta name="twitter:image" content="{xen:helper fullurl, @ogLogoPath, 1}">
    which works pretty well, but i still occasionally get bbcode like [ ATTACH ] and urls in the description. is there a template tag to display a thread's content without bbcode? thanks!
  2. Mike

    Mike XenForo Developer Staff Member

    BB code is already removed. What you're seeing are intentional placeholders for "rich" content that can't be represented as plain text.
  3. electrogypsy

    electrogypsy Active Member

    huh... is there a way to remove that? it makes the cards look messy.
  4. Mike

    Mike XenForo Developer Staff Member

    It would require code edits.

Share This Page