.  

 

 

.
.

21 / 12 / 2014

Usuarios conectados: 11

Cargando documento...

Buscar:

.

Este Sitio:

Principal

Dreamweaver

Fireworks

JavaScript

CSS

Sonido

Artículos

Links

E-ufemismos

Descargas

Historial

 

Mailing List:

Suscríbete a la lista de correo, No practico spamming y ofrece algunas ventajas.

Pulsa aquí para saber más y suscribirte.

 

Recomendados:

Tecnorama >Dreamweaver Extensions

 

PHP Dynamic Thumbnail

Versión para imprimir | Translate this page

PHP/MySQL Server Model: With this extension you can generate thumbnails from the image names stored in your database.  Besides, it can open the original image in a popup window and display an optional image if there are errors (if image is not stored in the folder or the database field is empty, for example).

Requirements:

  • GD 1.x or 2.x installed on your server.
  • The DB field should store the image's name (as text) and not the image itself (as blob)
  • The image must be a JPEG file: it won't work with GIF's (GD does not support them) or PNG's (Explorer badly supports them).
  • The folder where images are stored must have write permissions.

Features:

  • Thumbnails are cached, saving systems resources.
  • An optional image can be displayed if an error occurs (if the field is empty, if image can't be found, if image is a gif...).
  • The code also checks if the image is a true JPEG file, checking its extension and its file type: Any file that it is not a JPEG (even if it has the *.jpg extension) will return an error (and will show the optional image). Only jpeg files with the extensions *.jpg and *.jpeg will work. The others will show the optional image.
  • A translator is included to put a placeholder where thumbnails wil be displayed
  • Works inside a repeat region. 

The extension window looks like this:

Images Folder: Browse to the folder where images will be stored.

Recordset/Image Field: Select the recordset and the field that stores the names. You must note that the join of the Images Folder path and the content of the image field should give a valid path.(For example: if you select the folder "../images" and the filename field in the DB returns "myimage.jpg" the code will search for the file "../images/myimage.jpg").

Width and Height: Only Width is important, because the code will generate the thumbnail using it (and height will be proportional). However, the Height value is useful for the placeholder (See image below).

Thumb Prefix: the thumbnails generated will be stored with this prefix and the thumbnail's width. For example the image "myimage.jpeg" can create a thumbnail called "thumb_200_myimage.jpg. It may sound a bit weird, but it has an explanation. Creating a thumbnail uses quite a lot of system resources, so I prefer to keep a copy with all the sizes that I will use. This way, if my thumb is 200px wide in one page and 300px in another, I can keep a copy of both of them ("thumb_200_myimage.jpg" and "thumb_300_myimage.jpg"). The next time the page is executed, it will use these files instead of creating new ones.

Add PopUp: If you check it, The users will be able to click on the thumbnail to open a popup window with the original image. 

Alternate Image: if an error occurs, this image will be displayed. Common errors should be: DB field is empty, the file can't be found or the file is not a jpg file. If you don't want to show an image, just leave this field blank and nothing will be displayed in the document.

And most important of it all: If you find a bug, please let me know!!!

Download it here (Current version:1.1.0)

June 21, 2004: New in version 1.1.0:

  • "OK" Bug: fixed
  • Improved GD Version Check
  • File extension bug: Fixed

TODO List:

-I'm thinking about adding a new feature to next release: I want to make it to delete orphaned thumbs automatically. I have some code already done and working, but I'd like to know your suggestions about it: Should it delete the files?, move them to another folder? Post your ideas as a comment below. Thank you!!

-I'll try to add an option to select thumbnail quality in thumnails.

Comments? 81, so far. Displaying 11 ->15

11.- I'm just commenting to let you know of the cool dovcisery my wife's child enjoyed visiting yuor web blog. She figured out plenty of details, which included what it's like to have an amazing giving style to have other folks quite simply completely grasp some advanced subject areas. You really exceeded my expected results. Thank you for displaying these productive, dependable, revealing and in addition unique thoughts on your topic to Tanya. http://spisjsxkoxs.com [url=http://boyaxlfitd.com]boyaxlfitd[/url] [link=http://weryufquren.com]weryufquren[/link]

12.- One method that's been put fwaorrd is to have on-the-fly captioning, similar to TRS or VRS. Then the newly-captioned version could be placed back on the server (with the originator's permission) so that the next people who want captioned vieo have it on demand. I wonder what the total demand would be for such a service, compared to real-time conversations maybe equal, maybe a bit greater?Key to having such a service (aside from the law or other social program that would require or support it) is building a culture that is aware of accessibility.

13.- This piece was cogent, wewnllritte-, and pithy.

14.- The data collected in the Garmin watch is extremely easily downloaded in the ANT+ dongle. It's apparent the narrator thinks he suspects that people suspect madness as they claims this next part of evidence will convince us he really isn't mad: he places the dismembered corpse underneath the floor planks inside the old man's room (I'm not convinced). Between the white leather band and also the Swarovski-encrusted dial, this watch will truly light up your thing, whether you are going for the formal or informal look. The relatively young designer Alexander Wang offers a reputation for relaxed & somewhat manly lines. The main good thing about using these Swiss replica watches is the fact that one can purchase multiple of them yet do not bother.
Cartier Roadster Replica

15.- It does not need to be very expensive to possess 2 or 3 good quality watches. Meanwhile, fine watches for guys are made by experts who put each of the parts of their signature timepieces in state-of-the-art facilities, being sure that every element is excellent condition. You can purchase a Limes Klassik Maxime having a stainless steel case and a leather strap plus an automatic (self-winding mechanical) movement for about seven hundred dollars. A lot in the newest varieties in diesel watches you need to buy contain the DZ7127 along with the DZ1232. Just much like the shoes and handbags of ladies, invicta watches for men convey private style and present mood.
2013 Cartier Watches

« Previous | 1 - 5 | 6 - 10 | 11 - 15 | 16 - 20 | 21 - 25 | 26 - 30 | 31 - 35 | 36 - 40 | 41 - 45 | 46 - 50 | Next »

Add your Comments



Escribe el código de la imagen superior:

:

TECNORAMA es simplemente una página personal. No sirve ni de promoción del autor ni cosas por el estilo.
Todos los códigos, textos y tutoriales son de libre uso mientras se mencione al autor (no es mucho pedir)
Este sitio es compatible con IE6/NS6/Mozilla1.0
Para contactar, puedes enviarme un e-mail a tecnorama@hotmail.com