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

    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.

    /modules/mod_jasidenews/tmpl/default.php

    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.

    Thanks,

    Raymond

    Adam M Moderator
    #894943

    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
    #896350

    Hey~

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

    Thanks!

    Adam M Moderator
    #896675

    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
    #896718

    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.

    Thanks.

    Adam M Moderator
    #897522

    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
    #898968

    Hi Adam,

    Thank you for your helping. but I try to change it as you said.it 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
    #899817

    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
    #901220
    This reply has been marked as private.
    rgan Friend
    #902272

    Anyone can go on helping ?

    Saguaros Moderator
    #902623

    The Side News module has feature to trim text of introtext or fulltext article http://easycaptures.com/fs/uploaded/626/9898985305.png 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
    #902723

    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
    #902784

    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
    #903703
    This reply has been marked as private.
    Saguaros Moderator
    #904122

    Hi

    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>

    To

    <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 8 years, 8 months ago.

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