PHP Classes

Adapting

Recommend this page to a friend!

      Mini Gallery  >  All threads  >  Adapting  >  (Un) Subscribe thread alerts  
Subject:Adapting
Summary:What if..
Messages:3
Author:Joao da Silva
Date:2005-04-19 16:33:57
Update:2005-04-20 20:48:41
 

  1. Adapting   Reply   Report abuse  
Picture of Joao da Silva Joao da Silva - 2005-04-19 16:33:57
What if my images have bigger width than height, what do I have to change?
And what do I have to do to disable the tooltip texts?

  2. Re: Adapting   Reply   Report abuse  
Picture of Dave Dave - 2005-04-20 10:07:47 - In reply to message 1 from Joao da Silva
Q: What if my images have bigger width than height, what do I have to change?

A: I assume that you mean that you want to have them resized in the display area, but the pictures are in landscape mode, not portrait mode. That's exactly why I didn't have the display area size determined with a set widht or height: the display area's size (if set) is a kind of bounding square, with side of length "disp_l".
So if you set disp_l to 600 and you have:
an image that is 600x400 :: the image is not resized
an image that is 400x600 :: the image is not resized
an image that is 800x600 :: the image is resized to 600x450
an image that is 600x800 :: the image is resized to 450x600
This resizing is done with the image object in the page, using javascript -- your original image is not altered, and a person who downloads that image will get the full-size version.
The thumbnail generation uses a similar approach, with "thumb_l" being the longest side of a thumbnail image that will be generated.

Q: And what do I have to do to disable the tooltip texts?

A: Just don't set them. Have a look at the minigal_conf.php that I included. Notice how the texts and titles are associated with image file names. Unless you associate a tip with an image filename, you get no tips. I noticed a small bug on the minigal.php that was here, and I've fixed that, as well as making it possible to have texts on some images but not others (well, correctly, now ;p)
The shortest answer is that you just shouldn't define a texts array in your minigal_conf.php file -- that way, no tip texts are created. Also, forgetting to place tooltips.js in the same directory as minigal.php will have the same effect.


PLEASE GET THE LATEST VERSION -- I'VE MADE SOME ENHANCEMENTS!

  3. Re: Adapting   Reply   Report abuse  
Picture of J Raff J Raff - 2005-04-20 20:48:41 - In reply to message 2 from Dave
I have the class running on this site;
s90950543.onlinehome.us/tcf-05/mini ...

The configuration file did not work for the individual image files.
I installed "tooltips.js" in the directory.

What's with the "no status bar" (JavaScript Application)?

It takes a LONG time for the full 100+ images to come up.
Can't you save the thumbnails in the current directory or in another directory to make loading quicker?

See the regular "index.htm" file.

I'm using Mozilla 1.8b for most of my browsing.

--------------------

Internet Explorer 6.0.2600 seems to repeatedly read the index file and never complete.