about images

Discuss phpwcms here, please do not post support requests, bug reports, or feature requests! Non-phpwcms questions, discussion goes in General Chat!
Post Reply
design
Posts: 68
Joined: Thu 17. Feb 2005, 17:19

about images

Post by design »

Hello! Just two questions:

1. Is it possible to avoid the images (in CP images DIV) take a name like this: 46f81f98e1f3d19c7db53a6e9b7cb282.jpg. I would prefer the real name.

2. Do you know when phpwcms will allow cropping images not only in the center zone? The cropping (1.3.5.) is fantastic, but I'm creating a site for a graphic designer and - unfortunatly - his characters are never in the center!! Ooooppsss! ;-)
Just a general forecast. Six month, one year...

Thanks!!
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi,

I don´t know when but this is a hint: http://www.phpwcms.de/forum/viewtopic.php?p=93393#93393
I think the new filemanager will support real file name.

Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
nebenaube
Posts: 139
Joined: Fri 23. Nov 2007, 20:39
Location: Redlands, CA
Contact:

Re: about images

Post by nebenaube »

I hope so I'm having a difficult time getting this one to work. Also, does anyone know why the system chokes on certain jpg images. I have some obsolete tools for creating images and the jpg file produced rarely renders in the current filemanager. Note: same images upload and render fine in WYSIWYG content parts.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Re: about images

Post by flip-flop »

Have you set the right size in conf.inc.php?
e.g.

Code: Select all

$phpwcms['img_prev_width']    = 800;      //max width of the large preview image
$phpwcms['img_prev_height']   = 600;      //max height of the large preview image
If your image has a size e.g. 789x588px the system don´t reduces this image.
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
nebenaube
Posts: 139
Joined: Fri 23. Nov 2007, 20:39
Location: Redlands, CA
Contact:

Re: about images

Post by nebenaube »

I'll try it... BTW, those images don't show in the image browser either.

No, that wasn't it.

Ok found it... imagemajick can't handle the 'optional' jpg file header format. Works with the standard header.
Last edited by nebenaube on Tue 6. May 2008, 00:59, edited 1 time in total.
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Re: about images

Post by Jensensen »

regarding the cropping of images this might be helpful, also:

http://forum.phpwcms.org/viewtopic.php?f=8&t=16196
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
nebenaube
Posts: 139
Joined: Fri 23. Nov 2007, 20:39
Location: Redlands, CA
Contact:

Re: about images

Post by nebenaube »

hassles with jpg rendering after upload continue... (1.3.5) finally reconfigured from imagemajick to gd2 and now it appears the problem is solved. If this thing proves me to be a liar again, I'll update this thread.

Also, when I get the time I'll review the imagemajick and php conf files... maybe the limitation is in there.
User avatar
marcus@localhorst
Posts: 815
Joined: Fri 28. May 2004, 11:31
Location: localhorst
Contact:

Cropping Thumbnails via CSS

Post by marcus@localhorst »

this thread is maybe out of date but a solution of the thumbnailissue would be the following.
thumbnails are cropped in center for default. The newest phpwcms version can render images in templates in various ways - means, there is a set of new Replacementtags like this:

Code: Select all

	<!-- 

		Thumbnail image: {THUMB_NAME}
		  relative:      {THUMB_REL}
		  absolute:      {THUMB_ABS}
		  height/width:  {THUMB_HEIGHT}px/{THUMB_WIDTH}px
		  image ID:      {IMAGE_ID}
		  image Hash:    {IMAGE_HASH}
		
		If you are not sure wrap zoomed image:
		[ZOOM]
		Zoomed (big) image: {IMAGE_NAME}
		  relative: {IMAGE_REL}
		  absolute: {IMAGE_ABS}
		  height/width: {IMAGE_HEIGHT}px/{IMAGE_WIDTH}px
		[/ZOOM]		

	//-->
a possible solution, for an imagegallery template could be (do not set cropping in Contentpart!):

Code: Select all


<!--IMAGES_HEADER_START//-->

[TITLE]<h1>{TITLE}</h1>[/TITLE]
[SUBTITLE]<h2>{SUBTITLE}</h2>[/SUBTITLE]
[TEXT]{TEXT}[/TEXT]

<div class="images" id="images{ID}">
<!--IMAGES_HEADER_END//-->


<!--IMAGES_ENTRY_START//-->
	<div class="imageEntry" id="img{IMGID}">
		<div style="width:160px;height:160px;overflow:hidden;background:url({THUMB_ABS}) no-repeat top center"></div>
		[CAPTION]<p>{CAPTION}</p>[/CAPTION][CAPTION_ELSE]<p>{IMGNAME}</p>[/CAPTION_ELSE]
	</div>
<!--IMAGES_ENTRY_END//-->


<!--IMAGES_ENTRY_SPACER_START//-->

	<!-- space between images {SPACE}px -->

<!--IMAGES_ENTRY_SPACER_END//-->


<!--IMAGES_ROW_SPACER_START//-->

	<!-- space between image rows {SPACE}px -->

<!--IMAGES_ROW_SPACER_END//-->


<!--IMAGES_FOOTER_START//-->
</div>
<!--IMAGES_FOOTER_END//-->

so, the CSS do the job.

Code: Select all

width:160px;height:160px;overflow:hidden;background:url({THUMB_ABS}) no-repeat top center
I did not try this and the [ZOOM] need to set too, but I think this should work.
It's a bit late, but maybe someone got a similar problem
Post Reply