View Full Version : "Top Stories" Thing
Hey, on clubhabbo.net
They have in the middle, a top sotries where the images change by there self. Has anybody got a link to this (preferebly dynamicdrive.com)
+rep
Thanks
Luke
ScottDiamond.
08-09-2007, 12:17 PM
Ummm....what?
on clubhabbo, in the middle of the three boxes at the top, it like has a slideshow of top stories
Can anyone find this?
ScottDiamond.
08-09-2007, 12:52 PM
on clubhabbo, in the middle of the three boxes at the top, it like has a slideshow of top stories
Can anyone find this?
It's using Javascript, though it would be SOOOOOOOOOOOOOO much easier using PHP. Invent posted code for the random switcher in PHP a while back.
timROGERS
08-09-2007, 12:53 PM
Just use a random image script in PHP, and then make the iFrame it's in auto refresh, or alternatively if you're not using iFrames you could just update it with Javascript.
hmm, i'd prefer one of dynamic drive xD
Is there a tut or something?
ScottDiamond.
08-09-2007, 04:48 PM
hmm, i'd prefer one of dynamic drive xD
Is there a tut or something?
Dynamic Drive uses vomit loads of code.
RedCrisps
08-09-2007, 04:59 PM
why not take it of clubhabbo like?
Aflux
08-09-2007, 05:08 PM
hmm, i'd prefer one of dynamic drive xD
Is there a tut or something?
Why are you so insistent on using DD?
Just use setTimeout and getElementById to update the image (No I am not going to give you copy and paste code, you should learn).
Eccentric
08-09-2007, 07:24 PM
Lol tomm<3
Ill look on dd for u now soon as ure so desp.
http://dynamicdrive.com/dynamicindex18/gajaxrssticker.htm
http://dynamicdrive.com/dynamicindex2/ajaxticker.htm
http://dynamicdrive.com/dynamicindex2/xmlticker2.htm
WARNING THIS WAS TAKEN FROM CLUBHABBO AND YOU MAY NEED PERMISSION!
<script type="text/javascript">
var preloaded = new Array();
function preloadImages() {
for (var i = 0; i < arguments.length; i++){
preloaded[i] = document.createElement('img');
preloaded[i].setAttribute('src',arguments[i]);
};
};
preloadImages(
'../images/sitebanners/clubhabbowood.gif',
'../images/sitebanners/donate.gif',
'../images/sitebanners/meetthedjs.gif'
);
var links = new Array(
'../community/habbowoodcomp.html',
'../clubhabbo/donate.php',
'../cutenews/show_news.php?subaction=showfull&id=1188621825&archive=&start_from=&ucat=25&'
);
var text = new Array(
'ClubHabboWood is back! Can you win the <b>ClubHabbo Digital Movie Awards</b>!?',
'Want <b>your</b> name on ClubHabbo? If so, why not donate some furniture?',
'Come and <b>Meet The DJs</b> who make ClubHabbo Radio what it is! Just <b>click here!</b>'
);
var curOffset = 1;
window.onload=function() {
document.getElementById('randLink').href = links[0];
document.getElementById('randImage').src = preloaded[0].src;
document.getElementById('randText').innerHTML = text[0];
setInterval(
function() {
document.getElementById('randLink').href = links[curOffset];
document.getElementById('randImage').src = preloaded[curOffset].src;
document.getElementById('randText').innerHTML = text[curOffset];
curOffset = (curOffset >= preloaded.length-1) ? 0 : curOffset + 1;
}, 10000);
};
</script>
and displays id="randlink" on images and iframe :)
Scania
08-09-2007, 07:46 PM
As someone said, Invent posted one.. It should be in the coding section.
ScottDiamond.
08-09-2007, 08:14 PM
As someone said, Invent posted one.. It should be in the coding section.
This made me LOL.
QuickScriptz
08-09-2007, 08:30 PM
Just Google "php image switcher".
Scania
08-09-2007, 09:55 PM
He already got it in the above post..
thanks ecronic (fogot name ) :P
EDIT: Sorry, gotta spread :(
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.