Topic: DirectResize : Plugin to resize your images  (Read 10026 times)

Pages: [1] 2  All   Go Down

#1: 12-Apr-2007, 07:42 AM

Moderators

Perrine
Posts: 1,776

WWW
Before starting this thread, I wand to say that I'm not the developer of this wonderful plugin but I wanted to help Arnaud in translating his plugin (maybe I shouldn't... let's see how I write english !  Grin)

DirectResize is a plugin to resize your images. It also generates the lightbox link if necessary.

You just have to upload your image, add it in a document or a chunck (or anything else you want to display) and DirectResize will generate a thumbnail for the image.

Try this and if you have any question, we will help !

* DirectResize-0.5.zip (5.81 KB - downloaded 676 times.)
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 deco qu'il vous faut
HistWar : jeu de stratégie napoléonien

Ma config : MODx 0.9.6.3 / 1.0 || Apache 2.2.14 || PHP 5.2.11 || MySQL 5.0.45 || Debian 4.0 (Etch)

#2: 29-Aug-2007, 12:42 PM

krypto
Posts: 36

Salut!

I am trying to use this plugin but I cannot get the lightbox effects to work.

The instructions say to put lightbox in your template but I don't know if I am doing it correctly here is my call in the head of my template:

<script type="text/javascript" src="assets/snippets/maxigallery/lightboxv2/js/prototype.js"></script>
<script type="text/javascript" src="assets/snippets/maxigallery/lightboxv2/js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="assets/snippets/maxigallery/lightboxv2/js/lightbox.js"></script>

The plugin generates the thumbnail but it does not seem to be using lightboxv2 to display the full image.

Any help is appreciated

#3: 29-Aug-2007, 02:16 PM

Moderators

Perrine
Posts: 1,776

WWW
Hi Krypto,

Li 9 of the plugin, do you have $lightbox set to 1 ? If so, you have to add a class="lightbox" to img tag in order the link is built.
If you set $lightbox to 2, DirectResize will build the link whatever class you have.
If you set $lightbox to 0, DirectResize will not build the link.
Also, lightbox link is built only if the image you want to link is bigger than the thumbnail.


I personnaly use slimbox with this call in head :
Code:
<script type="text/javascript" src="assets/js/mootools.js"></script>
<script type="text/javascript" src="assets/js/slimbox/js/slimbox.js"></script>
<link rel="stylesheet" href="assets/js/slimbox/css/slimbox.css" type="text/css" media="screen" />

Hope that helps Wink
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 deco qu'il vous faut
HistWar : jeu de stratégie napoléonien

Ma config : MODx 0.9.6.3 / 1.0 || Apache 2.2.14 || PHP 5.2.11 || MySQL 5.0.45 || Debian 4.0 (Etch)

#4: 29-Aug-2007, 02:24 PM

Moderators

Perrine
Posts: 1,776

WWW
krypto : I guess this post will help you : http://modxcms.com/forums/index.php/topic,17751.msg111505.html#msg111505 Wink
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 deco qu'il vous faut
HistWar : jeu de stratégie napoléonien

Ma config : MODx 0.9.6.3 / 1.0 || Apache 2.2.14 || PHP 5.2.11 || MySQL 5.0.45 || Debian 4.0 (Etch)

#5: 29-Aug-2007, 04:29 PM

krypto
Posts: 36

Hi Perrine~

I am trying but still not having any success.

I have tried the slimbox method you posted, but I get the same result.  A thumbnail is generated on the page but when I click on the thumbnail it opens a larger image but without the slimbox javascript.  Do I need to set a different css class type for slimbox.

I followed the steps outlined here:http://netambition.dynalias.org/dr/3.html and in tools->configuration set up a css selector for tinyMCE.  Do I need a different selector for the slimbox method?

Thanks for your reply Smiley

#6: 29-Aug-2007, 04:38 PM

Moderators

Perrine
Posts: 1,776

WWW
The only thing you need to do is add class="lightbox" to your <img />

Do you have a url where I could see this ?
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 deco qu'il vous faut
HistWar : jeu de stratégie napoléonien

Ma config : MODx 0.9.6.3 / 1.0 || Apache 2.2.14 || PHP 5.2.11 || MySQL 5.0.45 || Debian 4.0 (Etch)

#7: 29-Aug-2007, 04:45 PM

alphanono
Posts: 43

WWW
Hello,

For using Lightbox, you muste have these 4 lignes :

<script src="....../prototype.js" type="text/javascript"></script>
<script src="....../scriptaculous.js" type="text/javascript"></script>
<script src="....../lightbox.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="....../lightbox.css" />

and be sure that the files are at the right place.

(Krypto, you have say 'Salut', are you french ?)

#8: 29-Aug-2007, 04:55 PM


Metaller
Posts: 1,207

Hello.

Some time im working on new version of this plugin. It based on ver 0.7 by alphanono but has many improvements and new features like:

* all options removed to config file (like in ditto or wayfinder), no need to change plugin in DB
* tempale system with using Chunkie class and PHx class allow to use any gallery script to enlarge picture (highslide, slimbox, slidebox...) not only lightbox
* using Thumbnail and Watermark Class for resizing. Its allow to watermark thumbs and  big images (all parameters like in MG, thanks doze)
* new resizing method - crop image
* when we edit document with images wich will resized by plugin in WYSIWYG editor in backend, plugin replace big images with they thumbs to reduce  traffic. But we can also resize this thumb and  thumb whith new sizes and with lightbox link on original image (if needed)  will be created next time.

I cant explain all coming features with my knowlege of english, but when plugin is released, i hope you like it.
« Last Edit: 29-Aug-2007, 05:02 PM by Metaller »
DirectResize 0.9 beta. PHPThumb, sets of configurations, configuration, binded to specific path. No backward compatibility. | DirectResize 0.9. PHPThumb, наборы параметров, параметры, привязанные к определенным путям. Без обратной совместимости.

Unfortunately, DirectResize project is closed. If you want to continue development, PM me for access to project page on Google Code. К сожалению, проект DirectResize закрыт. Если вы желаете продолжить разработки, обращайтесь через ПМ для получения доступа к репозиторию на Google Code.

[PLUGIN] DirectResize - as Maxigallery but for single images :: Download :: Support :: Old topic
Maxigallery для одиночных изображений - русскоязычный топик

#9: 29-Aug-2007, 05:19 PM

krypto
Posts: 36

Right now I am testing this plugin out locally, I will put it up somewhere online tomorrow because I still can't get the proper result and maybe we can work from there.  I am pretty sure all my script and css calls are pointing to the right place...

Just a few more pieces of information.  I have uploaded the full size images to assets/images/Nekretnine which is the same as $lien_base

I have another folder assets/images/cache which is the same as $path

(No alpha I am not French, I studied it in school for many years and can still understand most of it when I read it, and love to listen to it spoken.  If I were to try to speak [or type], ca serait une tragedie Smiley)

#10: 30-Aug-2007, 01:24 AM

Moderators

Perrine
Posts: 1,776

WWW
If you can click on thumbnail, that means that DirectResize built the link and if you have $lightbox to 1 or 2, the link should be opened with slimbox or lightbox.

The only thing I see now is either a conflit in .js, or the .js part is not found.

If you use Firefox, you should install Firebug to get all js errors and be able to see what's wrong Wink

@Metaller : Glad to see you're working on it. Tell us when it's ready ! Wink
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 deco qu'il vous faut
HistWar : jeu de stratégie napoléonien

Ma config : MODx 0.9.6.3 / 1.0 || Apache 2.2.14 || PHP 5.2.11 || MySQL 5.0.45 || Debian 4.0 (Etch)

#11: 30-Aug-2007, 01:15 PM

krypto
Posts: 36

You were right Perrine, I added Firebug and it comes up with an error.

In slimbox.js on line 244:

fileLoadingImage is not defined

I don't know if you know what that means or what can be done to fix it.

I tried it online and the same thing happens, you can see it here: http://shop.server-019.com/~drvolik/

#12: 30-Aug-2007, 05:01 PM

Moderators

Perrine
Posts: 1,776

WWW
I don't konw where this error comes from. Are you sur you downloaded the good version of Mootools ?

I give you here the version of Mootools and Slimbox I use.

Hope this helps !
« Last Edit: 31-Aug-2007, 10:11 AM by Perrine »
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 deco qu'il vous faut
HistWar : jeu de stratégie napoléonien

Ma config : MODx 0.9.6.3 / 1.0 || Apache 2.2.14 || PHP 5.2.11 || MySQL 5.0.45 || Debian 4.0 (Etch)

#13: 31-Aug-2007, 10:04 AM

krypto
Posts: 36

Hi Perrine~

Your link for slimbox seems to be wrong, but it does not matter.  I went to the slimbox site and downloaded latest slimbox.js and mootools.js and did everything as per the instructions on the page but I still have the same problem.

I don't know why I cannot get the js to work on my pages which is too bad because I could really use this and it seems to work so well on all the example pages.

Thank you for all your effort!

#14: 31-Aug-2007, 10:13 AM

Moderators

Perrine
Posts: 1,776

WWW
Oops, sorry, was not a slimbox.js but slimbox.zip ! Try again... we never know ^^ (I've changed the link above)

I guess it can be a problem with the newest version of Mootools or Slimbox... or maybe you didn't get the good mootools package ?

I don't know what to say if it's not that :/
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 deco qu'il vous faut
HistWar : jeu de stratégie napoléonien

Ma config : MODx 0.9.6.3 / 1.0 || Apache 2.2.14 || PHP 5.2.11 || MySQL 5.0.45 || Debian 4.0 (Etch)

#15: 11-Sep-2007, 06:12 PM

Nitrok
Posts: 6

Hi!
I just installed MODx and i love it.
Now i tried to install this DirectResize plugin and did everything as install.txt told me to. Still when i insert picture on document and test the page i don't see any changes. All images i have inserted are in their original sizes. Seems that plugin hasn't done anything... And when i look folders through my ftpclient there are no thumbnail files Sad
So any idea where would the problem be?

Edit: I feel so dumb now. I had to resize it myself. Dunno why i thought it would resize image automatically Cheesy
« Last Edit: 11-Sep-2007, 06:50 PM by Nitrok »

#16: 12-Sep-2007, 01:22 AM

Moderators

Perrine
Posts: 1,776

WWW
Hi Nitrok,

No, you don't have to resize images yourself... DirectResize is here for that Wink

You only have to call the image in big size, and DirectResize uses width or height or both in img tag to resize your image.

Did you add a width or height in img tag ?

Did you check OnWebPagePrerender when adding the plugin code ?
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 deco qu'il vous faut
HistWar : jeu de stratégie napoléonien

Ma config : MODx 0.9.6.3 / 1.0 || Apache 2.2.14 || PHP 5.2.11 || MySQL 5.0.45 || Debian 4.0 (Etch)

#17: 12-Sep-2007, 04:20 AM

Nitrok
Posts: 6

I mean that i had to resize inserted image in TinyMCE editor. If i just insert image and don't do anything to it the image shows up it's original size on document.
Should this plugin resize images also when i'm not resizing images in TinyMCE? (i doubt this because the thumbnail sizes aren't defined anywhere in the parameters)
And yes, i clicked OnWebPagePrerender.

Anyway it's working now fine!
Thanks for great script!

#18: 12-Sep-2007, 04:26 AM

Moderators

Perrine
Posts: 1,776

WWW
Ah ok, if you insert images with TinyMCE, then you have to change width and height in the 2d tab of the popup (don't remember how this tab is called in english).

But, I guess that by resizing your image with TinyMCE, the size of the image is changed so it's ok !

Hope I'm clear Wink
« Last Edit: 12-Sep-2007, 04:40 AM by Perrine »
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 deco qu'il vous faut
HistWar : jeu de stratégie napoléonien

Ma config : MODx 0.9.6.3 / 1.0 || Apache 2.2.14 || PHP 5.2.11 || MySQL 5.0.45 || Debian 4.0 (Etch)

#19: 12-Sep-2007, 05:44 AM

Marketing & Design Team

davidm
MODx evangelist
Posts: 7,073

The best way to predict the future is to invent it

WWW
As Perrine implies, you NEED to set the height or (and) width (depending on the method you choose for resizing).

The way it works is that DirectResize uses width and height attributes to resize the image : it first reads its value, then resizes the image (according to one of the methods available : w, h, w+h... etc), strips it from height and width, caches the new image and then insert the path to the cached resized image instead of the original.
.: nodeo.net : Pour un web libre, moderne et ouvert ! :: david-molliere.net : Suivez en "live" mes expérimentations et billets sur les CMS et autres applications web :.

*** Forums modxcms.fr Participez à l'élaboration du site MODx francophone ! ***

! Nouveau !  En live, ne manquez pas les news de modxcms.fr sur Twitter   ! Nouveau !

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.67 - PHP 5.2.8 | Debian 4.0 (Etch)

Réalisations sous MODx : | pargade-notaires.fr | soleil.info | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | jocelyne-violet.net

#20: 12-Sep-2007, 12:27 PM

Nitrok
Posts: 6

Hi again,
Resizer runs great and slimbox link works great but i have one problem. When i click thumb slimbox it shows this fancy animation and all but when ready the whole thing is under other elements.
You can see it here when you click the picture. http://poreo.com/modx/index.php?id=32
Any idea how to show slimbox on the top of all other elements?
Pages: [1] 2  All   Go Up
0 Members and 1 Guest are viewing this topic.