Widget immagini random

Astuzia Widget immagini random

Messaggio Da the crow Mar 14 Dic 2010 - 22:48

Widget immagini random


Pannello > Moduli > Portale & Widgets > widget sull'indice..crea un widget personalizzato

Pannello > Moduli > Configurazione del portale > Struttura ..crea un widget personalizzato


Codice:
<style type="text/css">
.picshow { z-index:444; position:relative; background-color:#ffffff; width: 100%; height: 300px}
.picshow_main { position: relative; width: 170px; height: 300px}
.picshow_main .imgbig { filter: progid:dximagetransform.microsoft.wipe(gradientsize=1.0,wipestyle=4, motion=forward); width: 170px; height: 300px}
.picshow_change {position: absolute; text-align: left; bottom: 0px; height: 30px; right: 0px; left: 50px;}
.picshow_change img {width:15px; height: 15px}
.picshow_change a { border: 1px solid; display: block; float: left; margin-right: 5px; -display: inline}
a.axx { border-color: #555}
a.axx:hover {border-color: #ffffff}
a.axx img { filter: alpha(opacity=40); opacity: 0.4; -moz-opacity: 0.4}
a.axx:hover img {filter: alpha(opacity=100); opacity: 1.0; -moz-opacity: 1.0}
a.bxx { border-color: #000}
a.bxx:hover {border-color: #000}
img{
border:0px}
</style>
<SCRIPT language=javascript>
var counts = 5;
img1 = new Image();
img1.src = 'http://img222.imageshack.us/img222/4057/darkcorners.gif';
img2 = new Image();
img2.src = 'http://img195.imageshack.us/img195/4880/wendywuguerrieraallepri.gif';
img3 = new Image();
img3.src = 'http://img683.imageshack.us/img683/2455/14kilometros.gif';
img4 = new Image();
img4.src = 'http://img401.imageshack.us/img401/5674/yinyangmaster.gif';
img5 = new Image();
img5.src = 'http://img521.imageshack.us/img521/285/2020targetcriminale.jpg';

var smallImg = new Array();
smallImg[0] = 'http://i60.servimg.com/u/f60/12/10/25/45/index_10.gif';
smallImg[1] = 'http://i60.servimg.com/u/f60/12/10/25/45/index_11.gif';
smallImg[2] = 'http://i60.servimg.com/u/f60/12/10/25/45/index_12.gif';
smallImg[3] = 'http://i63.servimg.com/u/f63/11/73/76/86/index_10.gif';
smallImg[4] = 'http://i63.servimg.com/u/f63/11/73/76/86/index_11.gif';

url1 = 'url pagina 1';
url2 = '------ 2';
url3 = '---- 3';
url4 = '------ 4';
url5 = '------5';

alt1 = new Image();
alt1.alt = ' titolo immagine 1';
alt2 = new Image();
alt2.alt = 'titolo immagine 2';
alt3 = new Image();
alt3.alt = 'titolo immagine 3';
alt4 = new Image();
alt4.alt = 'titolo immagine 4';
alt5 = new Image();
alt5.alt = 'titolo immagine 5';
var nn = 1;
var key = 0;
function change_img() {
if (key == 0) {
key = 1;
} else if (document.all) {
document.getElementById("pic").filters[0].Apply();
document.getElementById("pic").filters[0].Play(duration = 2);
}
eval('document.getElementById("pic").src=img' + nn + '.src');
eval('document.getElementById("url_theme").href=url' + nn);
eval('document.getElementById("pic").alt=alt' + nn + '.alt');
if (nn == 1) {
document.getElementById("url_theme").target = "_blank";
document.getElementById("url_theme").style.cursor = "pointer";
} else {
document.getElementById("url_theme").target = "_blank"
document.getElementById("url_theme").style.cursor = "pointer"
}

for ( var i = 1; i <= counts; i++) {
document.getElementById("xxjdjj" + i).className = 'axx';
}
document.getElementById("xxjdjj" + nn).className = 'bxx';
nn++;
if (nn > counts) {
nn = 1;
}
tt = setTimeout('change_img()', 7000);
}
function changeimg(n) {
nn = n;
window.clearInterval(tt);
change_img();
}
function ImageShow() {
document.write('<div class="picshow_main">');
document.write('<div><a id="url_theme"><img id="pic" class="imgbig" /></a></div>');
document.write('<div class="picshow_change">');
for ( var i = 0; i < counts; i++) {
document.write('}
document.write('</div></div>');
change_img();
}
</SCRIPT>
<SCRIPT language="javascript" type="text/javascript">
ImageShow();
</SCRIPT>

Widget immagini random Mostroforumattivo Per domande o chiarimenti Gestire l'aspetto del forum

Tutoriale da :The crow
Copyrigth © FORUMATTIVO.COM


the crow
the crow
Veterano dello staff
Veterano dello staff

Sesso : Maschio
Età : 32
Messaggi : 8782
Località : Roma

https://aiuto.forumattivo.it/forum
the crow è stato ringraziato dall'autore di questo topic.

Visualizza l'argomento precedente Visualizza l'argomento successivo Torna in alto

- Argomenti simili

 
Permessi in questa sezione del forum:
Non puoi rispondere agli argomenti in questo forum.