test
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • manasopa Friend
    #182553

    How to modify strip tag in introtext JA WALL?

    Luna Garden Moderator
    #474236

    <em>@manasopa 347783 wrote:</em><blockquote>How to modify strip tag in introtext JA WALL?</blockquote>

    Hi Manasopa,

    Code defines strip tag in JA Wall locate in:
    1. For Category view:

    templatesja_wallhtmlcom_contentcategoryblog_item.php
    Here is the code for strip tag:

    // build intro content
    // get some first paragraph in introtext, trip tags (keep a, strong, br, b...)
    $introtext = $this->item->introtext;
    // get first paragraph
    $regex = '#<p[^>]*>(.*)</p>#i';
    if (preg_match_all ($regex, $introtext, $matches)) {
    $p = array();
    $c = 0;
    foreach ($matches[1] as $match) {
    $t = trim(strip_tags ($match, '<a><b><strong><br>'));
    if ($t) $p[] = $t;
    $c += strlen($t);
    if ($c > 50) break;
    }
    $introtext = implode ('<br />', $p);
    } else {
    $introtext = trim(strip_tags ($introtext, '<a><b><strong><br>'));
    }
    // add p tag

    2. For Feature View:

    templatesja_wallhtmlcom_contentfeatureddefault_item.php
    The code is the same as Category view

    phenomeno Friend
    #484048

    HeLLo, I followed your guide, but this doesnt work with <span> tags! I absolutely need to insert span in intro-text for seo rich snippets. Please help! thanks

    Luna Garden Moderator
    #484124

    <em>@phenomeno 361011 wrote:</em><blockquote>HeLLo, I followed your guide, but this doesnt work with <span> tags! I absolutely need to insert span in intro-text for seo rich snippets. Please help! thanks</blockquote>

    Hello,

    In JA Wall new version, code part for strip tag is located in file <blockquote>templatesja_walltemplate_tools.php</blockquote>

    start in about line 146.

    If you want to allow tag <span>, please find this line:

    static $allowtag = '<a><b><strong><br>';

    add tag span

    static $allowtag = '<a><b><strong><br><span>';

Viewing 4 posts - 1 through 4 (of 4 total)

This topic contains 4 replies, has 3 voices, and was last updated by  Luna Garden 11 years, 10 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum