test
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • kennyd Friend
    #163531

    O.K. It seems I fixed it myself following http://www.joomlart.com/forums/topic/when-creating-an-article-titles-appear-below-pictures-using-the-community-plus-theme/ and another thread in this forum.

    I am using joomla 1.5. try to put some artilces on the frontpage and in the artilces I try to insert some images, but I found all the images are with fixed size and position, how to fix it? here is two pictures I use for illustration.
    I want the images and the text displayed as demo of “JA business” frontpage. (text can be around the images, images can set to have different size), but on the “JA Community plus” the images are very small and fix size and fix position (left to the text).
    Thank you in advance.


    1. donotlike
    2. needthis
    Saguaros Moderator
    #389668

    in the list, the image is resized by css code, you open the file template.css file and find the following code

    div.article-image img {
    background: #fff;
    border: 4px solid #eeece8;
    margin: 0;
    padding: 1px;
    width: 95px;
    }

    you adjust value for the width attribute to change the image size
    2) with the position, in the override layout : htmlcom_contentfrontpagedefault_item.php and find :
    [PHP]
    <?php
    //get images
    $regex = ‘#<img[^>]*>#’;
    $image = ”;
    if (preg_match ($regex, $this->item->text, $matches)) {
    $image = $matches[0];
    $this->item->text = str_replace ($image, ”, $this->item->text);
    }
    ?>
    <?php if ($image) : ?>
    <div class=”article-image”>
    <?php echo $image ?>
    </div>
    <?php endif; ?>
    [/PHP]

    the image is extracted via using php , so only remove these code and the image will display following to a format you made in the editor, or you change css code to change the image position via the following css rule:

    div.article-image {
    float: left;
    margin: 10px 20px 0 0;
    width: 105px;
    }

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

This topic contains 2 replies, has 2 voices, and was last updated by  Saguaros 13 years, 7 months ago.

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