Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
  • rgan Friend

    Hi, Do anyone have the problem as the topic ?

    For the reason the module file default.php use PHP Function strip_tags() to remove the tags. According this function instruction, if I edit it as below,it should allow the tags ‘a’ is existed. So you can show the links in the intro text.


    line 41 : strip_tags($item->introtext, '<a>')

    But it not work for me. Can someone can help me ? I want to use the link in intro text.



    Adam M Moderator

    Hi @rgan,

    Please edit the thread (first post), choose Require Help From Staff + Mod/Admin? then provide your site url with temporary admin account there so I can check this matter for you.

    rgan Friend


    Why no body answer my question ? I had edited it again. Could you see that ? Please let me know.


    Adam M Moderator

    Hi @rgan,

    Sorry I didn’t know that you edited the info. Please also provide a temporary FTP account via private reply (as you’re using another template, I need to take a closer look at the code) and reply back here, I will check the code and update it for you.

    rgan Friend

    I didn’t setup the FTP server.But I think you can see the code and edit it in the template manager, if you look the template code only.Also the JA slider module that you have the code. and the problem now is on this module code inside strip_tags(). Could you check the first I post again ? Make sure where the question.


    Adam M Moderator

    Hi @rgan,

    Try to change this line:

    <?php echo $helper->trimString( strip_tags($item->introtext), $descMaxChars); ?>

    as below:

    <?php echo substr( strip_tags($item->introtext, '<a>'), 0, $descMaxChars); ?>
    rgan Friend

    Hi Adam,

    Thank you for your helping. but I try to change it as you still not work.Do we still have any other ways to figure out this problem ?

    Also,the button "more details" doesn’t translate to Chinese when the language is switched.

    Adam M Moderator

    Hi @rgan,

    Actually I did try to code at my end before post it here. If you’re unable to adjust it to suite your need, please setup a temporary FTP account and send it via private reply, I will update it for you then.

    rgan Friend
    This reply has been marked as private.
    rgan Friend

    Anyone can go on helping ?

    Saguaros Moderator

    The Side News module has feature to trim text of introtext or fulltext article Thus, it strips any HTML of content by default, otherwise it will cause error – missing tag html. As a result, when you insert link to introtext of article, it is removed automatically when you view in your front-end. In this case, you can customize as follows: – Open "modules/mod_jasidenews/helper.php" file and find:
    function trimString($subject, $length = 60, $moretxt = '...')
    Then remove following code:
    $subject = strip_tags($subject);

    Next, you open the file: ROOT/templates/ja_your_default_template/html/mod_jasidenews/default.php

    Look for this line of code:
    <?php echo $helper->trimString( strip_tags($item->introtext), $descMaxChars); ?>
    change it to:
    <?php echo $helper->trimString( strip_tags($item->introtext, '<a>'), $descMaxChars); ?>

    The link should work then. Let me know how it goes at your end.

    rgan Friend

    Thanks, it works now.

    Other two things,first I want to add external words before the date like "updated to 2016-03-21",not only "2016-03-21",is it possible ?

    Second,the website is the multi-language. I want to make "More detail" and "updated to" to transfer to Chinese when the visitors switch.

    Saguaros Moderator

    It must be changed via template override for this module. May I know which template are you using?

    You can send me the credentials: URL, Admin & FTP account so I will have a look.

    rgan Friend
    This reply has been marked as private.
    Saguaros Moderator


    As I can’t access FTP account of your site so I will guide you how to add text and translation. Here is the tweak:

    • Go to file: ROOT/templates/your_default_template/html/mod_jasidenews/default.php

    At approx line 38:

    <span class="ja-createdate"><?php echo JHTML::_('date', $item->date, JText::_('DATE_FORMAT_LC4')); ?> - </span>

    replace it with:

    <span class="ja-createdate"> <?php echo JTEXT::_("UPDATED_TO"); ?> <?php echo JHTML::_('date', $item->date, JText::_('DATE_FORMAT_LC4')); ?> - </span>
    • At line 45, change:
      <a class="readon" href="<?php echo  $item->link; ?>"> <?php echo JTEXT::_("More details"); ?></a>


    <a class="readon" href="<?php echo  $item->link; ?>"> <?php echo JTEXT::_("MORE_DETAIL"); ?></a>
    • Now open the language file of this JA Side News module.

    I assume, English is default language, I open the file: ROOT/language/en-GB/en-GB.mod_jasidenews.ini (with other language, it locates in: ROOT/language/xx-XX/xx-XX.mod_jasidenews.ini )

    And add the translated text as you wish:
    UPDATED_TO = "updated to"
    MORE_DETAIL = "More details"

Viewing 15 posts - 1 through 15 (of 17 total)

This topic contains 16 replies, has 3 voices, and was last updated by  Saguaros 3 years, 3 months ago.

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