Fetch thumb instead of big picture?
1 post
• Page 1 of 1
Fetch thumb instead of big picture?
Currently I am displaying a number of articles on the frontpage with the picture from the article scaled to a smaller size via HTML. The problem is that the page loads these big pictures, just to show the smaller ones on the frontpage.
This is what I want to do:
Fetch the thumbnail instead of the big image when I call GN_image. It should be rather easy as this is the url to my big picture:
www.somesite.com/images/picture.png
thumbnail:
www.somesite.com/images/thumb/thumb_picture.png
I am guessing that it is here I need to ad a line or something:
helper.php
Thanks in advance.
This is what I want to do:
Fetch the thumbnail instead of the big image when I call GN_image. It should be rather easy as this is the url to my big picture:
www.somesite.com/images/picture.png
thumbnail:
www.somesite.com/images/thumb/thumb_picture.png
I am guessing that it is here I need to ad a line or something:
helper.php
- Code: Select all
if ( preg_match("/GN_image/", $html) ) {
$regex = "/<img[^>]+src\s*=\s*[\"']\/?([^\"']+)[\"'][^>]*\>/";
$search = $row->introtext . $row->fulltext;
preg_match ($regex, $search, $matches);
$images = (count($matches)) ? $matches : array();
if ( count($images) ) {
$gn_image = modGlobalNewsHelper::getGN_Img ( $params, $link, $images[1], 'item' );
}
}
Thanks in advance.
- BadaB
- Fresh Boarder

- Posts: 2
- Joined: Wed May 06, 2009 7:34 pm
1 post
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest