View Single Post
Old 04-11-2004, 23:12   #1
punky
Inactive
 
Join Date: Jun 2003
Age: 44
Posts: 14,750
punky has a golden aurapunky has a golden aura
punky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aura
Javascript Gallery Creator

I stumbled across this, it is great and should be of use to someone else. It takes a directory listing of pictures, and automatically makes a gallery out of them. I have tried it in IE and FireFox and it works.

Instructions:

1. Save the following code as a bookmark. (If you are using IE, add any page as a bookmark, then right click on the bookmark in Favourites, and then goto properties, and manually change the link. Click accept if it gives you a warning).

Code:
javascript:var sHTML='<html><head><title>gallery</title><body><center><table border=0>';var y=0;links=document.getElementsByTagName(%22a%22); for(x=0;x<links.length;x++){a=links[x].href; if (a.match(/jpeg|jpg/i)){sHTML+='<td style=%22border-style:solid;border-width:1px%22><a target=%22_new%22 href=%22'+a+'%22><img border=%220%22 width=%22100%22 src=%22'+a+'%22></a></td>'; if (!((x+1)%5)) sHTML+='</tr><tr>'}};document.body.innerHTML=sHTML+'</table></center></body></html>';document.close();
2. Go to a directory with some pics in it.

3. Click the bookmark and it will automatically thumbnail the pictures for browsing.

EDIT: Now fixed, the board kept screwing the JS link up.
punky is offline   Reply With Quote