-
AuthorPosts
-
March 3, 2016 at 4:22 pm #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 ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
March 8, 2016 at 1:55 am #896350Hey~
Why no body answer my question ? I had edited it again. Could you see that ? Please let me know.
Thanks!
Adam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
March 8, 2016 at 4:34 pm #896718I 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 ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
March 13, 2016 at 12:42 pm #898968Hi 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 ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
March 17, 2016 at 12:45 pm #901220This reply has been marked as private.March 20, 2016 at 2:07 am #902272Anyone can go on helping ?
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
March 21, 2016 at 3:52 am #902623The 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.
March 21, 2016 at 8:18 am #902723Thanks, 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 ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
March 23, 2016 at 7:49 am #903703This reply has been marked as private.Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
March 24, 2016 at 1:53 am #904122Hi
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"1 user says Thank You to Saguaros for this useful post
-
AuthorPosts
This topic contains 16 replies, has 3 voices, and was last updated by Saguaros 8 years, 7 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum