-
AuthorPosts
-
ar2solutions Friend
ar2solutions
- Join date:
- August 2009
- Posts:
- 74
- Downloads:
- 5
- Uploads:
- 5
- Thanks:
- 26
- Thanked:
- 5 times in 1 posts
December 29, 2010 at 11:02 pm #158054Hello,
I’ve notice the limit for the mod_janews_fp (the article rotator for Teline IV) article content but nothing for the article title. My article title are rather long and its taking a considerable amount of space + the long title makes it obnoxious/not look good.
Any way to limit the number of char for the article title in the mod_janews_fp module?
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
December 30, 2010 at 4:34 am #369282Dear ar2solutions,
You can try as following to get the title shorter
Go to the file of modulesmod_janews_fptmpldefaultblog.php, Look for these codes
[PHP] <?php foreach ($rows as $news) {[/PHP] And add the following code below it :
[PHP]
$doc = JDocument::getInstance ();
if (function_exists ( ‘mb_substr’ )) {
$news->title = SmartTrim::mb_trim ( $news->title , 0, 20, $doc->_charset );
} else {
$news->title = SmartTrim::trim ( $news->title , 0, 20 );
}
[/PHP] Note that you should replace the 20 with the maxchar value you wantedI hope this make sense !
2 users say Thank You to Sherlock for this useful post
Windig FriendWindig
- Join date:
- September 2014
- Posts:
- 17
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 3
- Thanked:
- 1 times in 1 posts
December 31, 2010 at 10:35 am #369498<em>@ar2solutions 211653 wrote:</em><blockquote>Hello,
I’ve notice the limit for the mod_janews_fp (the article rotator for Teline IV) article content but nothing for the article title. My article title are rather long and its taking a considerable amount of space + the long title makes it obnoxious/not look good.
Any way to limit the number of char for the article title in the mod_janews_fp module?
</blockquote>
😉
Any way to limit the number of char for the article title in the mod_janews_fp module?AuthorPostsViewing 3 posts - 1 through 3 (of 3 total)This topic contains 3 replies, has 3 voices, and was last updated by Windig 13 years, 10 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Limit the # of chars/words for mod_janews_fp article title
Viewing 3 posts - 1 through 3 (of 3 total)