Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | Web Host (Re-Sellers) Linux WANTED

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > Internet Discussion
Register FAQ Community Calendar

Javascript Gallery Creator
Reply
 
Thread Tools
Old 04-11-2004, 22: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
Advertisement
Old 04-11-2004, 22:39   #2
homealone
Guest
 
Posts: n/a
Re: Javascript Gallery Creator

hey - it works

oh bouncy one - way to pogo
  Reply With Quote
Old 04-11-2004, 22:41   #3
Bifta
Inactive
 
Join Date: Jul 2003
Location: Eglinton, Co. Derry
Posts: 7,640
Bifta has a nice shiny starBifta has a nice shiny star
Bifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny star
Re: Javascript Gallery Creator

If only you could resample images with javascript too
Bifta is offline   Reply With Quote
Old 04-11-2004, 22:45   #4
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
Re: Javascript Gallery Creator

Yeah it is a shame PHP isn't interactive where you could.

I probably could do it, by hosting a PHP doc, which takes a url as a value, and does it. This is fairly quick and easy though.
punky is offline   Reply With Quote
Old 04-11-2004, 23:38   #5
Bifta
Inactive
 
Join Date: Jul 2003
Location: Eglinton, Co. Derry
Posts: 7,640
Bifta has a nice shiny starBifta has a nice shiny star
Bifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny starBifta has a nice shiny star
Re: Javascript Gallery Creator

Ah I've got PHP scripts that do exactly the same, someone posted one on their blog (elsewhere), admittedly it was a little bit more than one line of code, but you still only had to upload a single document into the folder with the images in. Very handy.
Bifta is offline   Reply With Quote
Old 04-11-2004, 23:49   #6
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 46
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Re: Javascript Gallery Creator

Quote:
Originally Posted by Bifta
Ah I've got PHP scripts that do exactly the same, someone posted one on their blog (elsewhere), admittedly it was a little bit more than one line of code, but you still only had to upload a single document into the folder with the images in. Very handy.
I created my own gallery script which I think you nicked code out of before - it's best to experiment really.
I rarely use Javascript these days because PHP is so much more powerful, especially in cases like this.

BTW Punky - you could make that code standards compliant if you wanted to.
Richard M is offline   Reply With Quote
Old 10-08-2009, 22:41   #7
Dude111
An Awesome Dude
 
Join Date: Mar 2009
Posts: 4,825
Dude111 has a bronzed appealDude111 has a bronzed appeal
Dude111 has a bronzed appealDude111 has a bronzed appealDude111 has a bronzed appealDude111 has a bronzed appealDude111 has a bronzed appealDude111 has a bronzed appealDude111 has a bronzed appealDude111 has a bronzed appealDude111 has a bronzed appealDude111 has a bronzed appealDude111 has a bronzed appealDude111 has a bronzed appealDude111 has a bronzed appealDude111 has a bronzed appealDude111 has a bronzed appealDude111 has a bronzed appeal
Thumbs up

THAT IS QUITE AWESOME!!!!!!

I can find alot of uses for something like this
Dude111 is offline   Reply With Quote
Old 10-08-2009, 22:44   #8
joglynne
Born again teenager.
 
joglynne's Avatar
 
Join Date: Feb 2007
Location: Manchester. (VM area 20)
Age: 77
Services: Maxit TV, M250 Fibre BB. Phone-Anytime Chatter
Posts: 13,838
joglynne has a golden aurajoglynne has a golden aurajoglynne has a golden aurajoglynne has a golden aura
joglynne has a golden aurajoglynne has a golden aurajoglynne has a golden aurajoglynne has a golden aurajoglynne has a golden aurajoglynne has a golden aurajoglynne has a golden aurajoglynne has a golden aurajoglynne has a golden aurajoglynne has a golden aurajoglynne has a golden aura
Re: Javascript Gallery Creator

WOW Dude you sure dig deep.
__________________
"I intend to live forever, or die trying" - Groucho Marx..... "but whilst I do I shall do so disgracefully." Jo Glynne
joglynne is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 00:14.


Server: osmium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum