The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Is it hard to build a Picture Of The Week widget?

View previous topic View next topic Go down

Is it hard to build a Picture Of The Week widget?

Post by Gary on December 20th 2010, 3:53 am

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! :wouhou: :wouhou: :wouhou: :wouhou:

Gary
Forumember

Posts : 34
Reputation : 0
Language : English

Back to top Go down

Re: Is it hard to build a Picture Of The Week widget?

Post by MohammadRN on December 20th 2010, 8:41 am

this is my question too. Exclamation

MohammadRN
New Member

Male Posts : 22
Reputation : 0
Language : Persian / Farsi / English
Location : Iran

http://www.lakposhtha.com

Back to top Go down

Re: Is it hard to build a Picture Of The Week widget?

Post by MrMario on December 20th 2010, 8:47 pm

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.

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://illiweb.com/fa/optimisation_fdf/common/bouton1.gif';
 
 smallImg[1] = 'http://illiweb.com/fa/optimisation_fdf/common/bouton2.gif';
 
 smallImg[2] = 'http://illiweb.com/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
Helper

Male Posts : 22186
Reputation : 1830
Language : test

http://test.com

Back to top Go down

Re: Is it hard to build a Picture Of The Week widget?

Post by Gary on December 22nd 2010, 6:19 am

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

Gary
Forumember

Posts : 34
Reputation : 0
Language : English

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum