Welcome, Guest. Please login or register.
Did you miss your activation email?
03 Jul 2009, 23:50

Login with username, password and session length
Home Chat Help Search Calendar Login Register
Pages: [1]
Print
Author Topic: Auto thumbnail in content? thumbnail size?  (Read 546 times)
0 Members and 1 Guest are viewing this topic.
trentfred
Forum Members
**

Karma: 0
Offline Offline

Posts: 12



« on: 10 Aug 2008, 17:06 »

Alright, here is what I am wanting:
I want for when my client adds content and adds an image that its automatically a thumbnail image (or at least smaller size images) that links to the big image. I'm afraid that he will be adding the very large images and making the page take forever to load. I could teach him to make sure he uses the thumbnails, but if there is an automatic way of doing it, that mite be the best solution.
Something like having the system find anything in the content area that says "/uploads/images/" and changing it to "/uploads/images/thumb_" would work wouldn't it?

This may be wishful thinking  but if there was some kind of way he could make the size he wants his picture on the WYSISYG editor and have that image be generated at that size with a link that would be awesome.

Also is there any way to make the default thumbnail size be bigger? I'm pretty sure there is a way because I have found snippets of people doing so on this forum, but they haven't gone into detail on how to do it.

Overall I'm just trying to make the process of him updating the site as easy as possible with the least chance of messing something up.

I'm also going to be making an image gallery. Any suggestions on best way to go about this. I've done very little with the imagegallery in the tags section and it was only making links with no thumbnail images, but I only messed with it for about 5 minute so the answer could be right there. Is any of the other modules or anything good?

Thanks in advance for any help or suggestions.


EDIT--------------
So my main question now. Is there a way I can make a default setting for all images put into content areas (using WSISYG).

for example: They put an image "uploads/images/donkey.jpg" which would make this currently: "<img src="uploads/images/donkey.jpg" alt="" width="1401" height="1052" />"

but I would want it to be something like this by default: <a onclick="window.open('/uploads/images/donkey.jpg','image','width=1401,height=1052,left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-300)+'');return false;" href="uploads/images/donkey.jpg"><img src="uploads/images/thumb_donkey.jpg" alt=""  width="200"/>
« Last Edit: 10 Aug 2008, 18:10 by trentfred » Logged
Kangaby
Peanut Gallery


Karma: 0
Offline Offline

Posts: 6


« Reply #1 on: 11 Aug 2008, 06:25 »

This may or may not help.

I uploaded a bunch of images to a new folder via FTP. When viewed them on the page, I only got the link on the index page with no thumbnails. Then I went into Image Manager and selected the directory I had created with FTP, and placed the images into. This then made the thumbnails for me, and the index page now shows the thumbnails.
Logged
faglork
Power Poster
***

Karma: 5
Offline Offline

Posts: 335


« Reply #2 on: 11 Aug 2008, 06:30 »

Hi!

Alright, here is what I am wanting:
I want for when my client adds content and adds an image that its automatically a thumbnail image (or at least smaller size images) that links to the big image. I'm afraid that he will be adding the very large images and making the page take forever to load. I could teach him to make sure he uses the thumbnails, but if there is an automatic way of doing it, that mite be the best solution.
Something like having the system find anything in the content area that says "/uploads/images/" and changing it to "/uploads/images/thumb_" would work wouldn't it?

This may be wishful thinking  but if there was some kind of way he could make the size he wants his picture on the WYSISYG editor and have that image be generated at that size with a link that would be awesome.

Try the ImageUpload module. You can specify categories, and according to the categories it will auto-resize the images and load them into pre-specified folders. Almost perfect, but not in the wysiwyg editor.
CAVEAT: Won't work if he uploads gigantic image files. Either the browser times out or the server reaches memory limit.

Also is there any way to make the default thumbnail size be bigger? I'm pretty sure there is a way because I have found snippets of people doing so on this forum, but they haven't gone into detail on how to do it.

This is a setting in /lib/filemanager/ImageManager/config.inc.php
I changed it to 150 px:
Code:
/*
  Thumbnail dimensions.
*/
$IMConfig['thumbnail_width'] = 150;
$IMConfig['thumbnail_height'] = 150;

I've been whining for a long time that this should be an option in image manager admin.

I'm also going to be making an image gallery. Any suggestions on best way to go about this. I've done very little with the imagegallery in the tags section and it was only making links with no thumbnail images, but I only messed with it for about 5 minute so the answer could be right there. Is any of the other modules or anything good?

Try the ALBUM module. Works nice.
e.g.:
http://www.vacation-hotel-germany.com/landscape/gallery.shtml


So my main question now. Is there a way I can make a default setting for all images put into content areas (using WSISYG).

for example: They put an image "uploads/images/donkey.jpg" which would make this currently: "<img src="uploads/images/donkey.jpg" alt="" width="1401" height="1052" />"

but I would want it to be something like this by default: <a onclick="window.open('/uploads/images/donkey.jpg','image','width=1401,height=1052,left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-300)+'');return false;" href="uploads/images/donkey.jpg"><img src="uploads/images/thumb_donkey.jpg" alt=""  width="200"/>

TinyMCE offers the option to add a popup to an image. Just insert an image, right cklick the image and chose "add link". You get a dialogue where you can chose POPUP. It has a number of nice options.

hth,
Alex

« Last Edit: 11 Aug 2008, 06:32 by faglork » Logged
trentfred
Forum Members
**

Karma: 0
Offline Offline

Posts: 12



« Reply #3 on: 13 Aug 2008, 09:24 »

thanks for the suggestions...
I will do the thumbnail resize for sure. I thought that was the code for it because I found that on the forum, but I couldn't find the path to that file.

Thanks for the other answers, although I'm not 100% to my destination on the auto thumbnail image in content rather than full size.

I don't know php or anything like that, but I do suspect there would be a way to put some kind of if then statement in the template before the content to only affect the content like this:

IF "<img src="uploads/images/"
THEN print "<img src="uploads/images/thumb_"

well that would almost work except it would make an infinite loop because it would always find <img src="uploads/images/" even when it is a thumbnail...

maybe something like
IF "<img src="uploads/images/"
IF NOT "<img src="uploads/images/thumb_"
THEN print "<img src="uploads/images/thumb_"

so this:
<img src="uploads/images/donkey.jpg" alt="" width="1401" height="1052" />
would turn into this:
"<img src="uploads/images/thumb_donkey.jpg" alt="" width="1401" height="1052" />"
Logged
Pages: [1]
Print
Jump to: