Numbers of characters (Title/Header)
8 posts
• Page 1 of 1
Numbers of characters (Title/Header)
Hi all,
is it possible to enter a numeric character limit value likewise "Introtext Limit" but for the "Title"?
e.g. to trim the numbers of characters of long title/header
Installed version 2.5.1 on Joomla 2.5.8
Thanks & Bye
is it possible to enter a numeric character limit value likewise "Introtext Limit" but for the "Title"?
e.g. to trim the numbers of characters of long title/header
Installed version 2.5.1 on Joomla 2.5.8
Thanks & Bye
- MikiTux
- Fresh Boarder

- Posts: 2
- Joined: Tue Dec 18, 2012 10:20 pm
Re: Numbers of characters (Title/Header)
Hi,
You can try implementing a personalized template for the module as follows:
1. Copy modules/mod_featcats/tmpl/default.php to the same location with any other name
2. In the module configuration, under Advanced Options, find that new name under the dropdown list from the Alternative Layout parameter.
3. Edit your new template file, line 31
to
where "25" is the desired characters limit (find it twice in the code).
This way, if you ever need to reinstall the module, your personalized template won't be affected.
Hope this helps!
You can try implementing a personalized template for the module as follows:
1. Copy modules/mod_featcats/tmpl/default.php to the same location with any other name
2. In the module configuration, under Advanced Options, find that new name under the dropdown list from the Alternative Layout parameter.
3. Edit your new template file, line 31
- Code: Select all
<?php echo $article->title; ?>
to
- Code: Select all
<?php echo (strlen($article->title) > 25 ? substr($article->title,0,25).'...' : $article->title); ?>
where "25" is the desired characters limit (find it twice in the code).
This way, if you ever need to reinstall the module, your personalized template won't be affected.
Hope this helps!
-

chus - Administrator

- Posts: 455
- Joined: Thu Sep 13, 2007 2:21 am
- Location: Costa Rica
Re: Numbers of characters (Title/Header)
Many thanks 
I'll try it ASAP, then I'll report the result.
Thanks & Bye
I'll try it ASAP, then I'll report the result.
Thanks & Bye
- MikiTux
- Fresh Boarder

- Posts: 2
- Joined: Tue Dec 18, 2012 10:20 pm
Re: Numbers of characters (Title/Header)
I also need this feature: Title Length limit.
Yes, the author had offered an option to limit the IntroText length, but there is no option for article titles.
I think, both "Main Articles" and "Linked Articles" need this Title Limit option.
Please add this option to next version, hacking code or template overriding is not a good idea.
Thanks.
Yes, the author had offered an option to limit the IntroText length, but there is no option for article titles.
I think, both "Main Articles" and "Linked Articles" need this Title Limit option.
Please add this option to next version, hacking code or template overriding is not a good idea.
Thanks.
-

baijianpeng - Junior Boarder

- Posts: 27
- Joined: Thu Nov 08, 2007 2:24 pm
Re: Numbers of characters (Title/Header)
Hi,
We have included the title limit option in the current 3.0.2 version for both leading and secondary articles.
Thanks for your concern!
We have included the title limit option in the current 3.0.2 version for both leading and secondary articles.
Thanks for your concern!
-

chus - Administrator

- Posts: 455
- Joined: Thu Sep 13, 2007 2:21 am
- Location: Costa Rica
Re: Numbers of characters (Title/Header)
Glad to hear this good news.
I tested this new version v3.0.2, yes, you had added the option to limit title length, but, there is a minor problem:
When the title is English, everything is good. When the title is Chinese words (UTF-8 characters), the end where cut off happens will be a strange symbol instead of normal character , see attached screenshot.
I am not a programmer, but I know something about this issue, it had happened on many Joomla extensions that trying to cut off title or Introtext in Chinese language. Here is a hint:
maybe you used substr function to cut off, in fact, you should use mb_substr, the latter can handle utf-8 characters well.
Hope you will fix this soon.
I tested this new version v3.0.2, yes, you had added the option to limit title length, but, there is a minor problem:
When the title is English, everything is good. When the title is Chinese words (UTF-8 characters), the end where cut off happens will be a strange symbol instead of normal character , see attached screenshot.
I am not a programmer, but I know something about this issue, it had happened on many Joomla extensions that trying to cut off title or Introtext in Chinese language. Here is a hint:
maybe you used substr function to cut off, in fact, you should use mb_substr, the latter can handle utf-8 characters well.
Hope you will fix this soon.
- Attachments
-
- featcats-cut-symbol.png (11.88 KiB) Viewed 1738 times
-

baijianpeng - Junior Boarder

- Posts: 27
- Joined: Thu Nov 08, 2007 2:24 pm
Re: Numbers of characters (Title/Header)
I'm sorry I missed that!
We have fixed the function in the current package as you suggested.
Thanks again
We have fixed the function in the current package as you suggested.
Thanks again
-

chus - Administrator

- Posts: 455
- Joined: Thu Sep 13, 2007 2:21 am
- Location: Costa Rica
Re: Numbers of characters (Title/Header)
Thank you again, I can confirm that you had solved this problem. Good job!
-

baijianpeng - Junior Boarder

- Posts: 27
- Joined: Thu Nov 08, 2007 2:24 pm
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest