. .

 

 

.
.

09 / 09 / 2010

Usuarios conectados: 7

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 Random Image

Versión para imprimir | Translate this page

With this extension you can put a random image into your document without the need of storing the names in a mysql database. The code will scan your selected folder (and subfolders, if you want to) and will select one random image.

You don't have to modify the extension's parameters everytime you upload a new image: the script searches for all the images available (gif and jpg) everytime the page is executed, so you only have to upload images to the folder you selected and they will be included in the list of available images.

To use it, select: "Server Behaviors->Tecnorama->Random Image"

Q.: Can the script search in subfolders?
A.: Yes if you want to: just select the "include subfolders" option and they will be included in the search. If you want to use only the selected folder (but not the subfolders), uncheck it.

Q.: Can I use it more than once in the same document?
A.: Yes, and you can use different folders for each random image. And you can also choose if subfolders should be included for the first random image, but not for the second, if another folder should be used for the third random image....

Q.: How can I guess the dimensions for the image the script has chosen?
A.: Don't worry, the script will do it for you and it will be added to the image properties in the resulting HTML code.
The script returns something like: <img src="image.gif" width="30" height="80"> (if "image.gif" were 30 pixel wide and 80 pixel high).

Q.: What if a folder does not contain images at all?
A.: That's part of the TODO list: At least one of the folders/subfolders must contain an image. Note that it doesn't mean that all the folders/subfolders must contain one: Only one folder/subfolder with one image is enough, even if the others are empty. 

See a demo here

New Version 1.0.1 (Sep,8 2003): Support for image extensions in uppercase (*.GIF, *.JPG, *.JPEG, *.PNG). Support for jpeg and png files.

You can download it here (current version: 1.0.1)

Comments? 8, so far. Displaying 1 ->5

1.- Im a relative beginner at working between fireworks and dreamweaver as a designer..but with a lot to learn re code. i have downloaded this extension but im stuck on how to actually get it on the page. It doesnt appear in my list of server behaviours. Infact i just have

create a site for this file
choose a document type
set up the sites testing server

the +- buttons do nothing

this is probably real simple but i need a basic step by step tutorial if anyone can help me

2.- I was looking for a php similar to what you have, only I have two questions...

1. Does that come in PHP? I downloaded it as an MXP file.

2. Could it be 'tweaked' (by you if possible) to have it get the images from a MYSql db, instead of folders?

Tia,
-Brian

3.- FUNCIONA DE LA PMARE... pero como puedo hacer (a las imagenes mostradas), ponerle un link para q se habran esas mismas imágenes¿?¿?...

TA CAÑON la extension

4.- in firefox it changes only 5 times on reload... after that every time the same imgages is displayed... help :-)

5.- HELP !!!!!!!!!!!!!!
I installed the file but when I go to Server Behaviors (as specified above) I do not see a Technorama Link. All I see is Site, document type, and testing server.

« Previous | 1 - 5 | 6 - 8 | 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