Lunes, 26 Enero 2015 18:28

Fetch thumb instead of big picture?

Groups your news by sections or by categories

Fetch thumb instead of big picture?

Postby BadaB » Mon Sep 28, 2009 1:19 pm

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:

I am guessing that it is here I need to ad a line or something:


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.
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: Wed May 06, 2009 7:34 pm

Return to Global News

Who is online

Users browsing this forum: No registered users and 1 guest