Post by unknownmale1 » Wed Jul 17, 2013 11:24 pm

Not really an issue I guess...More of a preference.

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']),		
			);
		}

Active Member

Posts

Joined
Sat Aug 28, 2010 6:46 pm

Post by unknownmale1 » Wed Jul 17, 2013 11:35 pm

Resolved this by doing this:

Code: Select all

$image = 'image/' .$result['image'];

Active Member

Posts

Joined
Sat Aug 28, 2010 6:46 pm
Who is online

Users browsing this forum: No registered users and 60 guests