-
AuthorPosts
-
mesasel Friend
mesasel
- Join date:
- November 2012
- Posts:
- 37
- Downloads:
- 0
- Uploads:
- 22
- Thanks:
- 22
- Thanked:
- 7 times in 1 posts
August 5, 2014 at 12:02 pm #200260Hello,
I got a problem, images in articles in new articles that I add on my site are not showing as they are on demo site. Image has width longer than site body, and on my front page they are now using space like they should.
When I edit demo article on my site, picture isn’t showing right.
Please help me today to finish my project on time.
Thank you!
Image is in attachment.
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
mesasel Friendmesasel
- Join date:
- November 2012
- Posts:
- 37
- Downloads:
- 0
- Uploads:
- 22
- Thanks:
- 22
- Thanked:
- 7 times in 1 posts
August 5, 2014 at 2:00 pm #544651Thank you Cavan, this have solved my first problem. Now leading article is showing like it should. But I still have problem with intro articles, images aren’t showing like they should. Image is in attachment.
Please help me with this too.
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
mesasel Friendmesasel
- Join date:
- November 2012
- Posts:
- 37
- Downloads:
- 0
- Uploads:
- 22
- Thanks:
- 22
- Thanked:
- 7 times in 1 posts
August 6, 2014 at 6:49 am #544760Chavan, THANK YOU VERY MUCH!!!
This have solved my problem. Now articles are showing like they should. Great support!
Btw. can I ask something that is offtopic, how to limit article title in blog layout, in Joomla? And article content before Read more button, so that articles have same height?
Thank you again on everything!
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
August 6, 2014 at 8:45 am #544774you could not restrict the article title but the article description content can be restricted in article options.
But we could do a hard coded customization to restrict the Article title. If so, let me know the limit
1 user says Thank You to chavan for this useful post
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
August 6, 2014 at 10:53 am #544800<em>@mesasel 439792 wrote:</em><blockquote>Chavan, THANK YOU VERY MUCH!!!
This have solved my problem. Now articles are showing like they should. Great support!
Btw. can I ask something that is offtopic, how to limit article title in blog layout, in Joomla? And article content before Read more button, so that articles have same height?
Thank you again on everything!</blockquote>
You can try to work with my solution below, hope it helps
+ Open templates/ja_beranis/html/layouts/joomla/content/item_title.php file
Change
defined('_JEXEC') or die;
To
defined('_JEXEC') or die;
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 in item_title.php file
Change
<?php echo $this->escape($item->title); ?></a>
To
<?php echo cut_string($this->escape($item->title),20); ?></a>
1 user says Thank You to Ninja Lead for this useful post
mesasel Friendmesasel
- Join date:
- November 2012
- Posts:
- 37
- Downloads:
- 0
- Uploads:
- 22
- Thanks:
- 22
- Thanked:
- 7 times in 1 posts
August 6, 2014 at 11:15 am #544810Chavan, thank you on your opinion and help so far!
Ninja, this is great. It is working!
But I just won’t to ask, is it possible to make it show only on front page, so when I open my blog and one article alone that I have full article name? I know that I am asking too much, so if it is too much work, please just skip my question.
Thank you on everything!!!
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
August 6, 2014 at 11:17 am #544811<blockquote>
is it possible to make it show only on front page, so when I open my blog and one article alone that I have full article name?
</blockquote>Which area are you referring to on your site? Please send me the link URL of your site to get it. I will check it further
1 user says Thank You to Ninja Lead for this useful post
mesasel Friendmesasel
- Join date:
- November 2012
- Posts:
- 37
- Downloads:
- 0
- Uploads:
- 22
- Thanks:
- 22
- Thanked:
- 7 times in 1 posts
August 7, 2014 at 6:11 am #544988Ninja Lead, I sent you a message with link to my site and admin username and password. Thank you!!!
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
August 7, 2014 at 8:31 am #545019<em>@mesasel 440065 wrote:</em><blockquote>Ninja Lead, I sent you a message with link to my site and admin username and password. Thank you!!!</blockquote>
I see the article in front-page is using Menu Item Type: Category Blog like other menu page but you can try with my workaround as below:
– Open templates/ja_beranis/html/layouts/joomla/content/item_title.php file
– Change
<?php echo cut_string($this->escape($item->title),20); ?>
To
<?php echo (($_GET['Itemid']=='435')? cut_string($this->escape($item->title),20):$this->escape($item->title)); ?>
Let me know if it helps
AuthorPostsViewing 11 posts - 1 through 11 (of 11 total)This topic contains 11 replies, has 3 voices, and was last updated by Ninja Lead 10 years, 3 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum