Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • ar2solutions Friend
    #158054

    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?


    1. LimitTitleToMaxChar
    Sherlock Friend
    #369282

    Dear 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 wanted

    I hope this make sense !

    Windig Friend
    #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?

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

This topic contains 3 replies, has 3 voices, and was last updated by  Windig 13 years, 11 months ago.

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