[PhotoAlbum]

- Bilder in diesem Fenster zeigen.
- Bilder in eigenem Fenster zeigen.

Suche nach Photo:

Ein schönes Photoalbum erzeugen Sie mit diesem Script. Die Fotos können im gleichen oder in Popup- Fenstern angezeigt werden. Das Script verfügt über eine Suchfunktion.

[Code]

[zwischen <BODY> und </BODY>]

<!-- Original: Susan K. (kitykity@hotmail.com) -->
<!-- Web Site: http://www.kitykity.com/photoalbum -->

<SCRIPT LANGUAGE="JavaScript"> var javascript_version = 1.0;</SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.1"> javascript_version = 1.1;</SCRIPT>
<script language=javascript>
/**********************************************************
* Suzy's Javascript Photo Album, version 5.5, March 2, 2003
*
* Changed this version: can now use HTML tags in picture description.
*
* This javascript code may be used on other Websites if:
* 1) This notice is left unchanged.
* 2) A link to http://www.kitykity.com is placed on that page.
* Please search the FAQ for answers to common problems and questions.
* You may contact me at kitykity@hotmail.com for assistance.
*
**********************************************************/

self.name = "main"; // names current window as "main"
PicVar = 0;
// Object Fix
function Fix(DatVal, PicVal, TitVal, TxtVal) {
this.DatVal = DatVal
this.PicVal = PicVal
this.TitVal = TitVal
this.TxtVal = TxtVal
}
// Create new main array.
var SuzyArray = new Array()
// Die folgenden Zeilen sind die einzigen, die angepasst werden müssen!
// SuzyArray[PicVar++] = new Fix("date", "picname.jpg", "pic title", "pic description")
SuzyArray[PicVar++] = new Fix("2/25/2003", "lara04.jpg", "Lara Croft I", "Dies ist ein Beispieltext für das Script.")
SuzyArray[PicVar++] = new Fix("1/5/2003", "lara05.jpg", "Lara Croft II", "Sie können für die Beschreibung auch HTML verwenden.")
SuzyArray[PicVar++] = new Fix("1/31/2003", "lara07.jpg", "Lara Croft III", "Jaja, blabla, .... hier kann alles mögliche stehen...")
SuzyArray[PicVar++] = new Fix("12/7/2002", "lara12.jpg", "Lara Croft IV", "Das letzte Beispiel....")
last = PicVar - 1;
current = 0;
function ShowSuzyPic(newpic) {
// (not working on some browsers) document.playsound.play();
current = newpic;
SelectionBox = document.SuzyForm.SuzyDropdown;
SelectionBox.options[current].selected = true;
document.getElementById("SuzySpot").innerHTML = '<a href=javascript:SuzyPicRemote("' + SuzyArray[current].PicVal + '","last");><img name="PicShowing" src=' + SuzyArray[current].PicVal + ' height=200 border=0></a>';
document.getElementById("Journal").outerHTML = '<div id=journal><br>' + SuzyArray[current].DatVal + '<p style="text-align:justify; text-indent:25px">' + SuzyArray[current].TxtVal + '</div>';
if (document.SuzyForm.WhereView[1].checked) {
timerID = setTimeout("SuzyPicRemote(SuzyArray[current].PicVal,'current')",1000)
}
}
function RandomSuzyPic() {
randompic = Math.floor(Math.random()*PicVar);
last = current;
ShowSuzyPic(randompic);
}
function PreviousSuzyPic() {
last = current;
current--;
if(current<0) current = PicVar - 1;
ShowSuzyPic(current);
}
function NextSuzyPic() {
last = current;
TotalImages = document.SuzyForm.SuzyDropdown.options.length;
current++;
if (current>=PicVar) current = 0;
ShowSuzyPic(current);
}
function SuzyPicRemote(picName,whichPic) {
ShowingImage = new Image();
ShowingImage.src = picName;
wid = ShowingImage.width + 50;
hei = ShowingImage.height + 50;
if (wid < 30 || hei < 30) {
wid=650;
hei=490;
}
if (screen.width < wid || screen.height < hei) {
wid = screen.width - 50;
hei = screen.height - 50;
}
OpenWindow = window.open("dummy.htm", "remoteWin", "resizable=1, scrollbars=1, toolbar=0, left=15, top=10, width=" + wid + ", height=" + hei);
OpenWindow.document.write('<html><body background=parchment.jpg><img src=' + picName + '></body></html>');
OpenWindow.document.close();
}
function FindPic() {
TotalFound = 0;
SearchString = document.SuzyForm.SearchWord.value;
SearchString = SearchString.toLowerCase();
WriteResults = window.open("dummy.html","resultwindow","height=300, width=300, toolbar=0, status=0, menubar=0, resizable=1, scrollbars=1");
WriteResults.document.open();
WriteResults.document.write('<div style="text-align:center; font:8pt verdana">'
+ 'Sie suchten nach:<br><i>' + SearchString + '</i><br><b>Resultate:</b><br>');
for (loop=0; loop < PicVar ; loop++) {
Keyword = SuzyArray[loop].TxtVal;
Keyword = Keyword.toLowerCase();
URL = SuzyArray[loop].PicVal;
title = SuzyArray[loop].TitVal;
title = title.toLowerCase();
SearchResult = Keyword.indexOf(SearchString);
SearchResult2 = title.indexOf(SearchString);
if (SearchResult != "-1" || SearchResult2 != "-1") {
last = current;
WriteResults.document.write('<br><a href=javascript:ShowSuzyPic(' + loop + '); target="main">' + title + '</a>');
TotalFound++;
}
}
WriteResults.document.write('<p><b>Gefunden wurden ' + TotalFound + ' Ergebnisse.</b>');
WriteResults.document.close();
if(javascript_version > 1.0) {
//delay a bit here because IE4 encounters errors
//when trying to focus a recently opened window
setTimeout('WriteResults.focus();',250);
}
}
// -->
</script>
<form name="SuzyForm">
<table border=0><tr><td>
<table style="padding:0px; margin:0px" border=0 cellspacing=0><tr align=center>
<td bgcolor=f9f9f9 style="background:url(parchment.jpg); width:275px; border-top:2px groove #888888;border-left:4px groove #888888;border-bottom:4px groove #888888; padding:10px; margin:0px">
<div id="SuzySpot">
<script language=javascript>
document.write('<a href=javascript:SuzyPicRemote("' + SuzyArray[current].PicVal + '","last");><img name="PicShowing" src=' + SuzyArray[current].PicVal + ' height=200 border=0></a>');
</script>
</div>
</td>
<td style="background:url(parchmentring.jpg); width:36px; border-top:2px groove #888888; border-bottom:4px groove #888888" border=0> </td>
<td style="background:url(parchment.jpg); border-top:2px groove #888888; border-right:4px groove #888888; border-bottom:4px groove #888888; padding:5px; padding-right:20px; width:225px; font:8pt verdana; color:#000044; margin-left:0px" valign=top>
<div id="Journal">
<script language=javascript>
document.write('<br>' + SuzyArray[current].DatVal + '<p style="text-align:justify; text-indent:25px">' + SuzyArray[current].TxtVal);
</script>
</div>
</td>
</tr></table>
<p>
<table border=0><tr align=center>
<td>
<input type=button value="<<" onClick="PreviousSuzyPic();" style="font:8pt verdana,helvetica,arial; text-align:center">
<input type=button value="random" onClick="RandomSuzyPic();" style="font:8pt verdana,helvetica,arial">
<input type=button value=">>" onClick="NextSuzyPic();" style="font:8pt verdana,helvetica,arial; text-align:center">
<p>
<SELECT size=12 style='font:8pt verdana' name='SuzyDropdown' onChange='ShowSuzyPic(SuzyForm.SuzyDropdown.options.selectedIndex);'>
<script language=javascript>
TotalImages = PicVar;
for (loop=0; loop < TotalImages; loop++)
{
document.write("<option value=" + SuzyArray[loop].PicVal + ">" + SuzyArray[loop].TitVal + "</option>");
}
</script>
</SELECT>
</td>
<td style="padding-left:25px; font:8pt verdana">
<p style="text-align:left"><input type=radio name="WhereView" value="chkLocal" CHECKED>- Bilder in diesem Fenster zeigen.
<br><input type=radio name="WhereView" value="chkRemote">- Bilder in eigenem Fenster zeigen.</p>
<p>Suche nach Photo:
<br><input name="SearchWord" size=10 style="font:8pt verdana">
<br><input type="button" value="Find it!" onClick="javascript:FindPic();" style="font:8pt verdana">
</td></tr></table>
</td></tr></table>
</FORM>
<p><SCRIPT Language="Javascript">
document.write("Dieses Album enthät " + PicVar + " Photos und wurde zuletzt am " + document.lastModified +" bearbeitet.");
</script>

[Autor]

kitykity

[Download]

Kopieren Sie bitte den Code.

Copyright © 1998- Nightfire Webworker Archiv Script No: 450