test
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • mesasel Friend
    #200260

    Hello,

    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.


    1. Articles
    chavan Friend
    #544648

    Add this code to this File: /templates/ja_beranis/css/themes/orange/template.css

    .home .pull-none img{
    margin : 0 !important;

    }
    .article-image img{
    width:100%;
    }

    mesasel Friend
    #544651

    Thank 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.


    1. Articles-images-problem
    chavan Friend
    #544654

    Add this code to this File: /templates/ja_beranis/css/themes/orange/template.css

    .blog .pull-none {
    margin: 0 !important;

    }

    mesasel Friend
    #544760

    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!

    chavan Friend
    #544774

    you 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

    Ninja Lead Moderator
    #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>

    mesasel Friend
    #544810

    Chavan, 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 Moderator
    #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

    mesasel Friend
    #544988

    Ninja Lead, I sent you a message with link to my site and admin username and password. Thank you!!!

    Ninja Lead Moderator
    #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

Viewing 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, 4 months ago.

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