Is it hard to build a Picture Of The Week widget?
3 posters
Page 1 of 1
Is it hard to build a Picture Of The Week widget?
Is it hard to build a Picture Of The day widget?
If I could preload images that would change automatically, that is what I want, but if that is not possible, something I change daily would work.
If someone could help me make one, that would be great!
Thanks in advance!
If I could preload images that would change automatically, that is what I want, but if that is not possible, something I change daily would work.
If someone could help me make one, that would be great!
Thanks in advance!
Gary- Forumember
- Posts : 34
Reputation : 0
Language : English
Re: Is it hard to build a Picture Of The Week widget?
Go to Widget management // Create Widget // Put a image // Save
Drag and drop widget in Personal Widgets on left or right and click save.
Here is a code you can use but you will need to edit it each day if you like and add more images of the day.
Drag and drop widget in Personal Widgets on left or right and click save.
Here is a code you can use but you will need to edit it each day if you like and add more images of the day.
- Code:
<SCRIPT language=javascript>
var counts = 3;
img1 = new Image();
img1.src = 'IMAGE HERE';
img2 = new Image();
img2.src = 'IMAGE HERE';
img3 = new Image();
img3.src = 'IMAGE HERE';
var smallImg = new Array();
smallImg[0] = 'http://2img.net/i/fa/optimisation_fdf/common/bouton1.gif';
smallImg[1] = 'http://2img.net/i/fa/optimisation_fdf/common/bouton2.gif';
smallImg[2] = 'http://2img.net/i/fa/optimisation_fdf/common/bouton3.gif';
url1 = 'LINK TO IMAGE';
url2 = 'LINK TO IMAGE';
url3 = 'LINK TO IMAGE';
alt1 = new Image();
alt1.alt = 'Black Gold';
alt2 = new Image();
alt2.alt = '360 Elite';
alt3 = new Image();
alt3.alt = 'IP Vista';
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('<a href="javascript:changeimg(' + (i + 1)
+ ');" id="xxjdjj' + (i + 1)
+ '" class="axx" target="_self"><img src="' + smallImg[i]
+ '"></a>');
}
document.write('</div></div>');
change_img();
}
</SCRIPT>
MrMario- Helper
- Posts : 22186
Reputation : 1839
Language : test
Re: Is it hard to build a Picture Of The Week widget?
I knew how to install it, but I do not know where to add the image to the code.
Make yourself clear to a 54 year old man! lol
I have solved the task, but I am interested in seeing what you came up with, as yours is most likely better.
Here is what I have done.
http://cafenikon.twilight-newmoon.org/forum
Make yourself clear to a 54 year old man! lol
I have solved the task, but I am interested in seeing what you came up with, as yours is most likely better.
Here is what I have done.
http://cafenikon.twilight-newmoon.org/forum
Gary- Forumember
- Posts : 34
Reputation : 0
Language : English
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum