Viewing 15 posts - 1 through 15 (of 37 total)
  • Author
    Posts
  • gilles007 Friend
    #168743

    I have an issue where a thumbnail of an image in my frontpage aticle is reduced in size (thumbnailed) and inserted in front of the article’s title.

    I looked in the forum, there are references to JA thumbnail but I’m not using this.

    How can I prevent this from happening?

    Thanks for any tips!

    Gilles

    n6rej Friend
    #413749

    this sounds very much like ja_thumbnail behavior. Please check and make sure its “disabled”

    gilles007 Friend
    #413753

    Thanks for getting back to me.

    I just triple-checked and that plugin is nowhere to be seen. I don’t even have it installed.

    G

    n6rej Friend
    #413754

    supply us with login information and we’ll check this out.

    gilles007 Friend
    #413756

    i’m running it on my localhost.

    seriously… there are no JA thumbnail plugins.

    it must be something very simple that I’m overlooking…

    here’s something interesting/ more info.

    If I change the article type for my default home menu item from “featured articles” to “single article”, the thumbnail is not generated and does not appear in front of the article’s title. – this is the behaviour I’m looking for but for the “featured articles” type.

    any ideas?

    gilles007 Friend
    #413864

    any news on this one?

    n6rej Friend
    #413904

    toss me a screenshot of this would you? I can’t think of anyway that this could be happening with our software OR with just plain J!

    btw, I’m using this exact template for my site and its looking great.

    n6rej Friend
    #413905

    you know I just thought of tsomething… do you have “images” set for categorys? This might very well be what you are seeing

    gilles007 Friend
    #413914

    I just checked again and the “Category Image” is not to hide.

    Here’s a screenshot…

    Thanks for tryting to help me out 🙂
    G


    1. j17-screenshot
    n6rej Friend
    #414021

    BAH! ticket time..

    Phill Moderator
    #414023

    I’ve been working on this in another thread (http://www.joomlart.com/forums/topic/image-in-the-front-page-future/) already and asked Gilles007 to open this thread. So if it is OK with you I shall carry on.

    So in this template we have a special layout for the featured page and this is not wanted by all so how do we stop it.

    The first folder we need to look at is the templates>ja_travel>html>com_content folder>featured folder

    In there we find the default_item.php file. One of the things this files does is gets out each featured page image and applies some custom css to it. Here is the code.

    //get images
    $regex = '#<img[^>]*>#';
    $image = '';
    if (preg_match ($regex,$this->item->introtext, $matches)) {
    $image = $matches[0];
    $this->item->introtext = str_replace ($image, '', $this->item->introtext);
    }
    ?>
    <?php if ($image) : ?>
    <div class="article-image"> <?php echo $image ?> </div>
    <?php endif; ?>

    So to stop the image resizing we can simply remove the class applied by removing the bit in red above.

    Next we have the two colums to remove so we simply add the line below to the end of template.css

    .article-content {
    overflow: visible;

    }

    Now the text will wrap around the image assuming you apply a float. In the demo content for JA C+ for J1.7 this is done with the following class in each article which also applies a border. Ovbiously how you construct that article and what classes you apply are up to you.

    <img class="img-border left" src="images/stories/demo/article-3.jpg" border="0" alt="sample image" />

    n6rej Friend
    #414031

    <em>@phill luckhurst 269344 wrote:</em><blockquote>I’ve been working on this in another thread (http://www.joomlart.com/forums/topic/image-in-the-front-page-future/) already and asked Gilles007 to open this thread. So if it is OK with you I shall carry on.

    </blockquote>
    You got it bro, no problems what so ever 😀 Teamwork

    gilles007 Friend
    #414051

    Thanks Phill,

    I think this will do the trick. I’m sure many will appreciate your efforts in providing this solution 🙂

    Gilles

    n6rej Friend
    #414985

    Phil I just had a talk with hoang dat and he suggested we remove all of
    <?php

    //get images

    $regex = '#<img[^>]*>#';

    $image = '';

    if (preg_match ($regex,$this->item->introtext, $matches)) {

    $image = $matches[0];

    $this->item->introtext = str_replace ($image, '', $this->item->introtext);

    }

    ?>

    <?php if ($image) : ?>

    <div class="article-image"> <?php echo $image ?> </div>

    <?php endif; ?>
    lines 49-71
    They will be removing this “feature” in a upcoming release I understand.
    Do we still need to modify the .css?

    I”m kinda surprised he said to leave the onBeforeDisplayContent event but I won’t argue.

    Phill Moderator
    #414986

    I like having the code ther but with JA thumbnail there really is little point in it. That all depend though on whether the plugin is going to become a free one for all members as without this code still makes sense

Viewing 15 posts - 1 through 15 (of 37 total)

This topic contains 37 replies, has 6 voices, and was last updated by  designorama 12 years, 11 months ago.

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