Page 1 of 1
Thumbnail image with CGBlog Summary
Posted: Mon Aug 26, 2013 5:07 pm
by delve2013
This has been mentioned before but I could not get it to work and it was for version 1.9 I believe.
I have version 1.11.5 and I want to display a thumbnail image with my CGBlog summary post.
If possible I would also like the detail template to display the same image but as a larger version.
I believe it's possible to get the image to change sizes etc through CGSmartImage but I'm not sure how to get it working.
I also know I should be using a custom field definition too. So I have created one and called it 'blogthumbpic'
Any help would be appreciated, thanks.
Re: Thumbnail image with CGBlog Summary
Posted: Mon Aug 26, 2013 5:53 pm
by velden
News, Blog, any module which lets you customize it's templates:
http://forum.cmsmadesimple.org/viewtopi ... =7&t=67570
Of course you need to know how the variables are named, but that should be obvious when examining the default templates.
Re: Thumbnail image with CGBlog Summary
Posted: Mon Aug 26, 2013 7:37 pm
by delve2013
I'm lost. I've tried using smart image, and it doesn't change the way I upload images through the WYSIWYG editor. It's the same as before?
If you use it to replace the {image} tag It does not let me choose an image to upload to my page from a drop down or anything.
If i use the tag provided in the example
Code: Select all
{cgsi_convert filter_grayscale=1 filter_watermark=1}{content}{/cgsi_convert}
It works and changes my colour image into greyscale. But again the only way I can upload an image to the page is using the image upload function in the WYSIWYG panel.
I'm also getting this in the img tag which is not right:
Code: Select all
data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gNzUKTXEQFsuCfuGoxCoVQCcAUUUAKYl29T1phhXJ5NFFADRCuTyaRoF80DJoooAgaBWuRktTXgXZLy33sUUUAKIEMDgk1IkKmIEk9KKKAKTW6ByMt1pv2dPVqKKAD7Onq1H2dPVqKKAD7Onq1FFFAH/2Q==
the above string is constant and extremely long. I've shortened it down.
Re: Thumbnail image with CGBlog Summary
Posted: Mon Aug 26, 2013 8:34 pm
by velden
delve2013 wrote:
I'm lost. I've tried using smart image, and it doesn't change the way I upload images through the WYSIWYG editor. It's the same as before?
I'm sorry, I should have mentioned my example is used with a extra added 'File' field definition in the News module. I don't know Blog module but guess it has similar field definitions that can be added.
In my example the field alias is 'foto'.
delve2013 wrote:
If you use it to replace the {image} tag It does not let me choose an image to upload to my page from a drop down or anything.
Don't think it's ment to replace the {image} tag.
delve2013 wrote:
If i use the tag provided in the example
Code: Select all
{cgsi_convert filter_grayscale=1 filter_watermark=1}{content}{/cgsi_convert}
It works and changes my colour image into greyscale. But again the only way I can upload an image to the page is using the image upload function in the WYSIWYG panel.
Exactly what it's ment for. But that's not how you want to use it.
delve2013 wrote:
I'm also getting this in the img tag which is not right:
Code: Select all
data:image/jpeg;base64,/9j/4AAQSkZJRgABA...
the above string is constant and extremely long. I've shortened it down.
It's perfectly right but many web developers don't know that use.
http://en.wikipedia.org/wiki/Data_URI_scheme
Don't like it? use noembed=1 parameter in the tag (it's in the help).
CGSmartImage really is a very useful module. Once you know how to use it (I admit it took me a few tries the first time) you can't do without.