I'm using a tumblr like grid to show products so I need the height to be 'Auto" rather than being fixed and creating the borders.
I've seen plenty of tutorials for doing this in OC's system image.php but I can't implement it into this mod...I've tried everything i can think of...What would be great is if there was no height or width defined, but I can deal with just height
Here is the code, I hope someone knows what i'm talking about and can help me out.
Code: Select all
foreach ($results as $result) {
if ($result['image']) {
$image = $this->model_tool_image->resize($result['image'], $setting['image_width'], $setting['image_height']);
} else {
$image = $this->model_tool_image->resize('blog_no_image.jpg', $setting['image_width'], $setting['image_height']);
}
$this->data['posts'][] = array(
'post_id' => $result['post_id'],
'author_name' => $result['author_name'],
'thumb' => $image,
'name' => $result['name'],
'short_description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 300) . '..',
'views' => sprintf($this->language->get('text_views'), (int)$result['viewed']),
'reviews' => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),
'href' => $this->url->link('blog/post', 'post_id=' . $result['post_id']),
'comments_href' => $this->url->link('blog/post', 'post_id=' . $result['post_id'] . '&to_comments=1'),
'author_href' => $this->url->link('blog/search', '&filter_author_id=' . $result['author_id']),
);
}