Sep 08, 2008, 10:57 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
Pages: [1] 2 3 ... 5   Go Down
  Print  
Author Topic: [plugin] DirectResize 0.8  (Read 11450 times)
0 Members and 2 Guests are viewing this topic.
Metaller
Committed to MODx
*****
Posts: 942



« on: Oct 23, 2007, 01:58 PM »

Hello.

Sorry for my english, part of text is translated with google...

Here is my first release of plugin DirectResize ver. 0.8.0. This version of the plugin is based on idea and developments of Arnaud, the author of previous versions of the DirectResize.

I did not have much  time to complete writing of plugin, testing and translating documentation. So i release it only now.

I have many ideas,  some of them have been realized, some not, release the plugin permanently detained because wanted to do everything and immediately. I cant to do all the test by myself, it is simply impossible, if you add new functions could be that old stopped working.

So please report about all found bugs here. And of course write your ideas. And please - try to use very simple phrases in your reports if it's possible, i don't know english very well. Thank you!

Detailed documentation on the pluging is inside the archive. Here is only discription

Short and simple

Its like Maxigallery but for single images.

Full

Fully customizable plugin with a number of functions like: automatic thumbnails creation, watermarking (text or transparent PNG), using config files to set plugin parameters, big images openning with AJAX (lightbox, slimbox, highslide...), fully templateable output, thumbnails for WYSIWYG-editor etc...

Features

    * Possible to integrate any javascript display mode: Slidebox, Lightbox v2.0, Slimbox, Highslide etc
    * Watermarking (text or transparent PNG)
    * Plugin settings in the config file with a big number of plugin parameters
    * Fully templateable output
    * Using plugin to show a remote images
    * Special preview for WYSIWYG-editor
    * Creation of thumbnails with cropping
    * New images will be generated if it is needed, in other cases they will be taken from the cache
    * Support for JPG and PNG files (GIF is not currently supported)

How it works

First of all this plugin is intended for using with the WYSIWYG-editor and the target audience of plugin users is the clients who doesn’t have any knowledges in web-development and HTML and who needs to use images in the text with thumbnails. It would be rather uneasy to explain such man that firstly it is necessary to create the reduced copy of the image, then to insert it into the document through the WYSIWYG-editor and after it to make a hyperlink to the big image.

So the actions have been simpified to the minimum – when the big image is inserted to the text and the sizes of the thumbnail are established the plugin will create automatically the thumbnail with needed hyperlinks.

Also while the opening of a document that has such images the thumbnails will be displayed with a special watermark in the WYSIWYG-editor instead of the big images. This watermark speaks conditionally that the given image is not small image only but it is a hyperlink to the big image and it allows to tell the difference between such images and the really small images that can be in the document.

If the sizes of the thumbnails is changed then in the next using of the plugin will be created new thumbnails in compliance with new sizes.

Of course you can use the plugin without the WYSIWYG-editor simply when you insert the image as HTML-code or TV.


Bugfixes

It will be included in the main package later.

* bug with duplicate names in the same document
* bug with using DirectResize and MaxiGallery in the same document
* if lightbox word is used in template (rel="lightbox") plugin removes it from output html as label name (see readme). So label names was changed to drlightbox and drthumbonly
*  bug causing the message "Fatal error: Call to undefined function: size() in ...assets\plugins\directresize\directResize.php on line 141" (if file is not exist by path taken from img tag)
* big image and lightbox link is not created when using lightbox_mode = 1 and "drlightbox" label
+ add new label - drskip. Images with this label is not processed by plugin.
* bug with gif-images on the page
* fix with ftp commands
+ new placeholders for style, align, valign of a source image
+ absolute path for images is now supported and correctly works (File Manager Path in System configuration must be correctly set)
+ New parameter $allow_from_allremote. This parameter allowed to use plugin on all images from remote sources w/o needed to list them all in $allow_from

New in repository release
* Highslide updated to 3.3.6
+ Added standart configuration packs for slimbox, slidebox, lightbox v2

Added to repository http://modxcms.com/DirectResize-0.8.0-1804.html
« Last Edit: Jan 10, 2008, 11:03 AM by Metaller » Logged

Perrine
Moderators
*
Posts: 1,677



WWW
« Reply #1 on: Oct 25, 2007, 08:07 AM »

Hi Metaller and thank you for this update !

I try to resize images from remote server but can't figure out how to do. Hum only thing to do is to specify the remote adress in $allow_from parameter   Embarrassed (I read too fast ^^)

I get images from a RSS feed with Feedx and the image is not resized... but I don't know if I have to use a particular parameter ?
Also tried to resize image without Feedx (ie only inserting img tag in content) : image is not resized.


Very nice update Smiley

Edit : by the way, just tested with an image hosted on my server : works fine ! Really nice highslide effect Wink
« Last Edit: Oct 25, 2007, 08:17 AM by Perrine » Logged

Nouveau sur MODx ? ||
Recherche
Communauté FR
Documentation FR
Réalisations sous MODx
Webolution
Entreprise AGS
J'aurais dû lui dire...
Atelier d'architecture Gambino
Déco'In : l'idée déco qu'il vous faut
HistWar : jeu de stratégie napoléonien

Ma config : MODx 0.9.6.2 || Apache 2.2.8 || PHP 5.2.5 || MySQL 5.0.45 || Debian 4.0 (Etch)

Aidez à nous gagner le Busby SEO challenge ! Donnez-nous des backlinks Cheesy
Perrine
Moderators
*
Posts: 1,677



WWW
« Reply #2 on: Oct 25, 2007, 08:50 AM »

I'm still working on the RSS feed to display images with DR.

I have, let's say, 3 articles (a, b, c) with 3 images in each article. I want to display these 3 articles in the same document. Remote adresses for these images are:

domain.tld/aaa/1.jpg
domain.tld/aaa/2.jpg
domain.tld/aaa/3.jpg

domain.tld/bbb/1.jpg
domain.tld/bbb/2.jpg
domain.tld/bbb/3.jpg

domain.tld/ccc/1.jpg
domain.tld/ccc/2.jpg
domain.tld/ccc/3.jpg

So when resizing, DR creates thumb_1.jpg, thumb_2.jpg and thumb_3.jpg but it doesn't take into account the /aaa/, /bbb/, /ccc/ folders. So images for article 2 and 3 are the same like the ones of article 1.

Am I clear ?

Strange issue to manage I guess :/
Logged

Nouveau sur MODx ? ||
Recherche
Communauté FR
Documentation FR
Réalisations sous MODx
Webolution
Entreprise AGS
J'aurais dû lui dire...
Atelier d'architecture Gambino
Déco'In : l'idée déco qu'il vous faut
HistWar : jeu de stratégie napoléonien

Ma config : MODx 0.9.6.2 || Apache 2.2.8 || PHP 5.2.5 || MySQL 5.0.45 || Debian 4.0 (Etch)

Aidez à nous gagner le Busby SEO challenge ! Donnez-nous des backlinks Cheesy
Metaller
Committed to MODx
*****
Posts: 942



« Reply #3 on: Oct 25, 2007, 10:14 AM »

Quote
only thing to do is to specify the remote adress in $allow_from parameter
i think that this parameter is important and mandatory, becouse without it plugin will be processed all images that we are not want to (design images for example)

I think to add an additional parameter for allowing to use all remote resources without need to list them all.

Or you can  list all forbidden folders (with design images for example) in $deny_from parameter. All other resources will be allowed. You can use  $deny_from or $allow_from parameters in each case

About your 2nd post - its realy bug with duplicate names in the same document. I'll fix it. Bugfix in the fitst.
« Last Edit: Nov 02, 2007, 09:41 AM by Metaller » Logged

Yass
Jr. Member
*
Posts: 30


« Reply #4 on: Nov 01, 2007, 07:27 PM »

Hello,


I'm currently trying to use maxiGallery and Direct resize and it seems that both are using the same phpclass:
On uploading new picture, I get this error:
Code:
Fatal error: Cannot redeclare class thumbnail in /home.10.29/finitech/www/assets/plugins/directresize/includes/Thumbnail.class.php on line 68

However, all images are processed correctly.

Any trick to avoid this ?

Thanks in advance.

Logged
Metaller
Committed to MODx
*****
Posts: 942



« Reply #5 on: Nov 02, 2007, 09:33 AM »

Hi. Thanks for your report. See for bugfix in the first message.
« Last Edit: Nov 02, 2007, 09:39 AM by Metaller » Logged

Metaller
Committed to MODx
*****
Posts: 942



« Reply #6 on: Nov 06, 2007, 05:00 AM »

Small bugfix with label name "lightbox".
Logged

Metaller
Committed to MODx
*****
Posts: 942



« Reply #7 on: Nov 14, 2007, 06:37 PM »

Bugfix with "Fatal error: Call to undefined function: size()" message.
Logged

aour
Moderators
*
Posts: 835



« Reply #8 on: Nov 15, 2007, 01:53 AM »

Hi

Do we need to download both directresize080en.zip and direcresize_bugfix.zip ?
Logged

MediaGuy
Full Member
***
Posts: 160


Mediaguy.nl


WWW
« Reply #9 on: Nov 15, 2007, 04:43 AM »

What do I have to set in the config file if I don't want to stretch out images?

I have a place on my site where I want to have a maximum WIDTH for the images, but smaller images now get resized to the maximum width.
Logged

Met vriendelijke groet | Kind regards,

Ronald Lokers
Interactive designer

Metaller
Committed to MODx
*****
Posts: 942



« Reply #10 on: Nov 15, 2007, 09:21 AM »

@aour Yes,you do. directresize080en.zip is the first release. All founded bugs fixed in direcresize_bugfix.zip only not in directresize080en.zip


@ronaldlokers Do you mean that thumbs becoming larger than the original source image? If sizes for image is set more than original sizes - this images is not processed by plugin and skipped. It stretched by browser.
Logged

MediaGuy
Full Member
***
Posts: 160


Mediaguy.nl


WWW
« Reply #11 on: Nov 15, 2007, 10:00 AM »

@ronaldlokers Do you mean that thumbs becoming larger than the original source image? If sizes for image is set more than original sizes - this images is not processed by plugin and skipped. It stretched by browser.

So I need to create templates that don't have a with and heigth set?
Logged

Met vriendelijke groet | Kind regards,

Ronald Lokers
Interactive designer

Metaller
Committed to MODx
*****
Posts: 942



« Reply #12 on: Nov 15, 2007, 03:03 PM »

There is no function in plugin  to make images with the specified size. If original image is bigger than size that you set, then thumbs will be created, but if image is lesser - plugin is not process this image.

You can try to use specified  $thumb_default_width, $thumb_default_height and $thumb_default_sizemode = 1 and not set image width and height in img tag.
« Last Edit: Nov 15, 2007, 03:06 PM by Metaller » Logged

Mazso
Full Member
***
Posts: 132


WWW
« Reply #13 on: Nov 27, 2007, 06:58 AM »

First of all I must say thank you, Metaller, because this ist the plugin I was looking for.

Nevertheless I´ve problems to get it work.

When I get you right I have just to put in a simple img-element like this

Code:
<img src="/assets/images/test.jpg" height="150" />

and leave the this plugin configuration

Code:
&config=Configuration;string;highslide
&clearCache=Cache clear mode;list;0,1,2;2

untouched to resize the image from a height of 200px to 150px?

But unfortunatally nothing will happen. Did I miss anything?

Thanks for any advice.
Logged
Metaller
Committed to MODx
*****
Posts: 942



« Reply #14 on: Nov 27, 2007, 07:10 AM »

Hi Mazso. Don't use absolute path for images, only relative. Not "/assets/images/test.jpg" but "assets/images/test.jpg".

Try to use <base href="[(site_url)]" /> in your <HEAD> section  if you have broken links with relative path.
Logged

Pages: [1] 2 3 ... 5   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF 1.1.4 | SMF © 2005, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!