Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2005
    Location
    Scotland
    Posts
    1,530
    Tokens
    50
    Habbo
    OhLiam

    Latest Awards:

    Default Help with Latest News..

    See on Habbo they have Latest news, which changes from different ones, how would I go about creating something like this?

    Which I could edit manually not automated.

    If anyone could help/ create this for me, it would be very much appreciated =]

  2. #2
    Join Date
    Nov 2007
    Location
    London
    Posts
    1,577
    Tokens
    36

    Latest Awards:

    Default

    Hope this helps:

    Put this in the <head> </head> area in the code of your page. Go through it, you edit the text that appears and the image in it.

    Code:
    <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(
    
    'image1.gif',
    
    'image2.gif',
    
    'image3.gif'
    
    
    
    );
    
    
    
    var links = new Array(
    
    'http://yoursite.com/resultofclickimage1.html',
    
    'http://yoursite.com/resultofclickimage2.html',
    
    'http://yoursite.com/resultofclickimage3.html'
    
    
    
    );
    
    
    
    var text = new Array(
    
    '<center>Text for Image 1</center>',
    
    '<center>Text for Image 2</center>',
    
    '<center>Text for Image 3</center>'
    
    
    
    
    
            );
    
    
    
            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>
    Then this where you want the image and text to appear:

    You have to go through this as well and edit everything you want to edit.

    Code:
     <div id="ts_image" style="padding-top: 4px;" align="center">
    
      <span class="style9"><a id="randLink" href="http://yoursite.com/resultofclickingimage1.html" target="iframename"><img src="image1.gif" name="randImage" width="150" height="150" border="0" id="randImage"></a></span></div>
    
                    <div align="left" class="font" id="ts_text" style="padding-top: 4px;">
    
      <div id="randText"> 
    
        <div align="center">First Image Text</div>
    
      </div>
    
    </div>
    I hope that is helpful for you. The easiest way to edit the fonts is through CSS... you could put something like this in the <head></head> before the code I put earlier for you to put into the header:

    Code:
    <style>
    
    .font {
    
        font-family: Verdana;
    
        font-size: 12px;
    
    }
    
    </style>
    That code will automatically set the font for the text that appears (I've coded it in, but if you don't add that CSS then it'll just use the computer's default font.

    If you need anymore help, let me know
    Kind Regards,

    Guy
    __________________

    Since 2007. Unbelievable Uptime. Web hosting, resellers, master resellers, linux VPS, windows VPS, shoutcasts, at the lowest prices on the net.
    Tech-Hosts.co.uk.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •