Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

August 19, 2022, 04:59:05 AM

Login with username, password and session length
Members
  • Total Members: 3843
  • Latest: Tricky
Stats
  • Total Posts: 193479
  • Total Topics: 21088
  • Online today: 51
  • Online ever: 1035
  • (November 26, 2020, 04:45:12 AM)
Users Online
Users: 1
Guests: 36
Total: 37

Author Topic: Image Viewer ~ FrontPage or Center Block  (Read 26419 times)

0 Members and 1 Guest are viewing this topic.

crip

  • Guest
Image Viewer ~ FrontPage or Center Block
« on: January 29, 2006, 01:35:20 PM »
I found this little script that can be used for a Fontpage block or Center Block, front or center only as it is a faily big snippet. It shows pictures and thumbs without opening a new window..it's all on one page..

Just put it in a Script/block and there you go.
Code: [Select]
<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  Jenny Blewitt (webmaster@webdesignsdirect.com) -->
<!-- Web Site:  http://www.webdesignsdirect.com -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);

ns3up = (browserName == "Netscape" && browserVer >= 3);
ie4up = (browserName.indexOf("Microsoft") >= 0 && browserVer >= 4);

function doPic(imgName) {
if (ns3up || ie4up) {
imgOn = ("" + imgName);
document.mainpic.src = imgOn;
   }
}
//  End -->
</script>

<center>
<table width=800 border=0 cellspacing=0 cellpadding=0>
<tr>
<td><a href="javascript:doPic('p1.jpg');"><img src="p1.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('p2.jpg');"><img src="p2.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('p3.jpg');"><img src="p3.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('p4.jpg');"><img src="p4.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('p5.jpg');"><img src="p5.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('p6.jpg');"><img src="p6.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('p7.jpg');"><img src="p7.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('p8.jpg');"><img src="p8.jpg" width=90 height=60 border=0></a></td>
</tr>
<tr>
<td colspan=8 align=center><img name="mainpic" src="p1.jpg" width=800 height=600 border=0></td>
</tr>
<tr>
<td><a href="javascript:doPic('p9.jpg');"><img src="p9.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('p10.jpg');"><img src="p10.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('p11.jpg');"><img src="p11.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('p12.jpg');"><img src="p12.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('p13.jpg');"><img src="p13.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('p14.jpg');"><img src="p14.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('p15.jpg');"><img src="p15.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('p16.jpg');"><img src="p16.jpg" width=90 height=60 border=0></a></td>
</tr>
</table>
</center>

Guys, enjoy! 8) :P
« Last Edit: January 22, 2008, 06:50:00 AM by Crip »

Offline RoarinRow

  • Hero Member
  • *****
  • Posts: 1034
  • Ride my AV!
    • Avalanche Style
Re: FrontPage or Center Block
« Reply #1 on: January 29, 2006, 05:45:12 PM »
Now that is cool.  What directory do you store the pics and how does it call it out?  Awesome snippet for sure. 

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

crip

  • Guest
Re: FrontPage or Center Block
« Reply #2 on: January 31, 2006, 04:30:06 AM »
Put your pics in your ./root/pics where all your directories are. It just calls out the path you need from your ./pics/to/your/forum/pic1.jpg..thumbs and full image are the same file.

I have this script working on a Frontpage Block on my testing site so I know it works good.

Enjoy, Crrip~ ;D

Offline RoarinRow

  • Hero Member
  • *****
  • Posts: 1034
  • Ride my AV!
    • Avalanche Style
Re: FrontPage or Center Block
« Reply #3 on: January 31, 2006, 08:19:00 AM »
Put your pics in your ./root/pics where all your directories are. It just calls out the path you need from your ./pics/to/your/forum/pic1.jpg..thumbs and full image are the same file.

I have this script working on a Frontpage Block on my testing site so I know it works good.

Enjoy, Crrip~ ;D


I'll give it a try thanks!

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

Offline Lesmond

  • Do what you have to!
  • Administrator
  • *
  • Posts: 3169
    • Tiny Pix... Free Image Hosting and Sharing.
Re: FrontPage or Center Block
« Reply #4 on: January 31, 2006, 09:34:21 AM »
I tried it on my test site but all I get is blank images that flash across the screen i.e the little red x's, you can see it here http://lesmond.homedns.org/forum/index.php (only on line for a short while though)
Please don't PM me for support without an invitation.


evilopinions

  • Guest
Re: FrontPage or Center Block
« Reply #5 on: January 31, 2006, 10:47:37 AM »
My question is from where did you get those pics from ? Speacially the 4th in the top row looks awesome.

Offline Lesmond

  • Do what you have to!
  • Administrator
  • *
  • Posts: 3169
    • Tiny Pix... Free Image Hosting and Sharing.
Re: FrontPage or Center Block
« Reply #6 on: January 31, 2006, 10:58:44 AM »
are you asking me or the OP?
Please don't PM me for support without an invitation.


crip

  • Guest
Re: FrontPage or Center Block
« Reply #7 on: January 31, 2006, 11:26:08 AM »
I tried it on my test site but all I get is blank images that flash across the screen i.e the little red x's, you can see it here http://lesmond.homedns.org/forum/index.php (only on line for a short while though)

You just don't have you paths to the pic correct..take a look at your image paths and you'll see.


crip

  • Guest
Re: FrontPage or Center Block
« Reply #8 on: January 31, 2006, 11:29:46 AM »
My question is from where did you get those pics from ? Speacially the 4th in the top row looks awesome.

Nice ant they..
I use those for my wallpaper on my computer, they all came from Here! it's updated daily with new walls. ;D

Later, crip~

crip

  • Guest
Re: FrontPage or Center Block
« Reply #9 on: January 31, 2006, 11:35:23 AM »
Here is another look at the way I have it set.

Code: [Select]
<table width=800 border=0 cellspacing=0 cellpadding=0>
<tr>
<td><a href="javascript:doPic('/pix/1.jpg');"><img src="/pix/1.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('/pix/2.jpg');"><img src="/pix/2.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('/pix/3.jpg');"><img src="/pix/3.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('/pix/4.jpg');"><img src="/pix/4.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('/pix/5.jpg');"><img src="/pix/5.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('/pix/6.jpg');"><img src="/pix/6.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('/pix/7.jpg');"><img src="/pix/7.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('/pix/8.jpg');"><img src="/pix/8.jpg" width=90 height=60 border=0></a></td>
</tr>
<tr>
<td colspan=8 align=center><img name="mainpic" src="/pix/1.jpg" width=800 height=600 border=0></td>
</tr>
<tr>
<td><a href="javascript:doPic('/pix/9.jpg');"><img src="/pix/9.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('/pix/10.jpg');"><img src="/pix/10.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('/pix/11.jpg');"><img src="/pix/11.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('/pix/12.jpg');"><img src="/pix/12.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('/pix/13.jpg');"><img src="/pix/13.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('/pix/14.jpg');"><img src="/pix/14.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('/pix/15.jpg');"><img src="/pix/15.jpg" width=90 height=60 border=0></a></td>
<td><a href="javascript:doPic('/pix/16.jpg');"><img src="/pix/16.jpg" width=90 height=60 border=0></a></td>
</tr>
</table>

I have all the images in root directory [pix]
« Last Edit: January 22, 2008, 06:50:45 AM by Crip »