-
AuthorPosts
-
vernontee Friend
vernontee
- Join date:
- November 2015
- Posts:
- 440
- Downloads:
- 53
- Uploads:
- 22
- Thanks:
- 18
- Thanked:
- 4 times in 4 posts
January 27, 2016 at 10:28 am #869587For the words before the read more tag, the last word is always removed and replaced with "…" . Please see screenshot attached.
-
Saguaros Moderator
Saguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
January 28, 2016 at 3:47 am #870305Hi
You’re mentioning the articles in Articles Category module in Homepage, right?
Just go to Extensions > Modules > find Articles Category module you want to change > Display Options tab > change the limit value for the introtext as you wish: http://prntscr.com/9vs7qx
vernontee Friendvernontee
- Join date:
- November 2015
- Posts:
- 440
- Downloads:
- 53
- Uploads:
- 22
- Thanks:
- 18
- Thanked:
- 4 times in 4 posts
February 3, 2016 at 3:31 am #875034Its not related to the "limit". The bug is that the system will remove the LAST WORD regardless of the limit. Do take a look at the previous screenshots.
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
February 3, 2016 at 4:39 am #875101You can update credentials of your site: URL & Admin account in this topic so I can have a look
http://static.joomlart.com/images/blog/2015/nov/Add-new-post.gif
vernontee Friendvernontee
- Join date:
- November 2015
- Posts:
- 440
- Downloads:
- 53
- Uploads:
- 22
- Thanks:
- 18
- Thanked:
- 4 times in 4 posts
February 3, 2016 at 7:30 am #875155This 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
February 4, 2016 at 7:56 am #876114I checked your site and saw that it belongs to the featured articles of your site. You can try this tweak:
-
Open the file: ROOT/templates/ja_magz_ii/html/com_content/featured/default.php
- Underneath this line:
defined('_JEXEC') or die;
add this code snippet:
if(!function_exists('cut_string')){ function cut_string($title, $max) { if($title!=''){ if(is_array($title)) list($string, $match_to) = $title; else { $string = $title; $match_to = $title{0}; } $match_start = stristr($string, $match_to); $match_compute = strlen($string) - strlen($match_start); if (strlen($string) > $max) { if ($match_compute < ($max - strlen($match_to))) { $pre_string = substr($string, 0, $max); $pos_end = strrpos($pre_string, " "); if($pos_end === false) $string = $pre_string."..."; else $string = substr($pre_string, 0, $pos_end)."..."; } else if ($match_compute > (strlen($string) - ($max - strlen($match_to)))) { $pre_string = substr($string, (strlen($string) - ($max - strlen($match_to)))); $pos_start = strpos($pre_string, " "); $string = "...".substr($pre_string, $pos_start); if($pos_start === false) $string = "...".$pre_string; else $string = "...".substr($pre_string, $pos_start); } else { $pre_string = substr($string, ($match_compute - round(($max / 3))), $max); $pos_start = strpos($pre_string, " "); $pos_end = strrpos($pre_string, " "); $string = "...".substr($pre_string, $pos_start, $pos_end)."..."; if($pos_start === false && $pos_end === false) $string = "...".$pre_string."..."; else $string = "...".substr($pre_string, $pos_start, $pos_end)."..."; } $match_start = stristr($string, $match_to); $match_compute = strlen($string) - strlen($match_start); } return $string; }else{ return $string =''; } } }
-
Find the following line of code:
<?php $this->item->introtext = substr(strip_tags($this->item->introtext), 0, 200); $this->item->introtext = substr($this->item->introtext, 0, strrpos($this->item->introtext, ' ')) . " ..."; echo $this->item->introtext; ?>
Change it to:
<?php echo cut_string($this->item->introtext, 300); ?>
Then change 300 to your desired value
Hope it helps.
vernontee Friendvernontee
- Join date:
- November 2015
- Posts:
- 440
- Downloads:
- 53
- Uploads:
- 22
- Thanks:
- 18
- Thanked:
- 4 times in 4 posts
February 4, 2016 at 10:33 am #876230would you mind to give me the file that i can just replace instead? So much code im afraid i paste it in create some error somewhere…. and btw.. i cant find code you were asking for in that file either
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
February 5, 2016 at 3:03 am #876794I attach it below.
You can download and unzip & copy to directory: ROOT/templates/ja_magz_ii/html/com_content/featured/
Remember to backup the old file first.
To change number of character, check line 117:
echo cut_string($this->item->introtext, 300);
vernontee Friendvernontee
- Join date:
- November 2015
- Posts:
- 440
- Downloads:
- 53
- Uploads:
- 22
- Thanks:
- 18
- Thanked:
- 4 times in 4 posts
February 16, 2016 at 4:13 pm #884466solved thanks
vernontee Friendvernontee
- Join date:
- November 2015
- Posts:
- 440
- Downloads:
- 53
- Uploads:
- 22
- Thanks:
- 18
- Thanked:
- 4 times in 4 posts
February 17, 2016 at 4:27 pm #885579Hi this is not solved…. it was only solved in the home page but not the other menu items…. its ok here
but not here
http://rapidfy.com/blog/home-living/
http://rapidfy.com/blog/events/
and so on…Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
February 18, 2016 at 3:33 am #885954Yes, the above solution is applied for Featured Blog content in homepage. Try to check the menu item of that page and see which type it is, then apply the same changes as above for associated file of that menu item.
The associated file locate in this path: ROOT/templates/ja_magz_ii/html/com_content/category/
-
AuthorPosts
Viewing 11 posts - 1 through 11 (of 11 total)This topic contains 10 replies, has 2 voices, and was last updated by Saguaros 8 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum