Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • metastorm Friend
    #184261

    Hello,

    I have Ja SideNews module with settings “show description”. And description contain leaked title of the image in article (html code img title=”some title”). Please see screenshot, image title is marked green.

    Just to make clear, there is no such text in the article text, SideNews gets it from the image tag “title”. And this is unwanted item, of course. 🙂

    2. Is it possible to block in SideNews output (description) some text by class?
    For example, if article starts with a <p class=”some_class”>TEXT</p> (Text=ERR at the screenshot), can I block this TEXT from being show in SideNews?

    Regards,


    1. sn-bug_cr
    Saguaros Moderator
    #481217

    Hi,

    1. I cannot reproduce such error in my end, pls post your url here and if possible, pm me admin and FTP account, I shall detect the code of this module for you

    2. You need some 3rd party extension to hide specific part of content appearing in article

    This thread was missed to reply and apologies for the same.

    metastorm Friend
    #481247

    Hi Saguaros,

    Please check PM

    1. I just realized that this problem occurs when EasyImageCaption plugin is active. It’s a 3’rd party system plugin which automatically create image’s caption from “alt” or “title” tags.

    Seems when SideNews module takes article content, EIC plugin executed and image in article now has a caption and this caption as part of article’s text is going to SideNews and shows in SideNews module. :((

    I thought plugins are not executed this way?

    Will be grateful for any advice for workaround this problem.

    2. No, I don’t need to hide some text in article itself, I need to block some text in SideNews module.
    For example, in JaNewsPro’s output I can block article’s text with class=”author” by adding in template.css code:

    .ja-zincontent p.author {
    display: none;}

    I’ve tried to find out similar way for SideNews but failed. Looks like SideNews just strip all tags from article and I can’t block anything.

    Full example:
    Article’s code:

    <p class="author">NOBODY</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>

    I need in SideNews module after article’s Title:

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    But as for now SideNews looks like:

    NOBODY Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    I’ve changed code in modulesmod_jasidenewshelper.php as in this post but old and new code are just strip all tags.

    metastorm Friend
    #481524

    Hi,

    1. Problem solved by disabling in /modules/mod_jasidenews/helper.php code:
    $item->introtext = JHtml::_(‘content.prepare’, $item->introtext);

    Since I don’t need any plugins to run in this module (at least I hope so), so this is acceptable workaround. 🙂

    2. Problem with blocking text by class is still open.
    Perhaps I need to get the right code from JaNewsPro module because there I can block what I need.

    Regards,

    Saguaros Moderator
    #481703

    Hi,

    You can try adding allowable tag (the tag you use in article) in that strip_tags function.

    metastorm Friend
    #481870

    Hi Saguaros,

    Thanks for a tip, It works! 🙂

    I’ve added <p> tag as exclusion in strip_tags function in 2 files:

    file /modules/mod_jasidenews/helper.php , line 603:
    return JString::substr( strip_tags($title, ‘<p>’), 0, $max );

    file /templates/ja_nex/html/mod_jasidenews/default.php , line 40:
    <?php echo $helper->trimString( strip_tags($item->introtext, ‘<p>’), $descMaxChars); ?>

    And in css:
    .ja-slidenews-item p.myclass {
    display: none;
    }

    Regards,

    Saguaros Moderator
    #481942

    Glad it works :laugh:

    And let me know if you need further help.

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

This topic contains 7 replies, has 2 voices, and was last updated by  Saguaros 11 years, 9 months ago.

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