Random Banner

HellishHades

Pure Evil
  • 731
    Posts
    21
    Years
    I've coded my layout so that a random logo image appears when loading a page on Pok?monFAQs. The banners also do a little colour-addition transition when the mouse goes over them.

    Any comments would be appreciated. Should I add more banners, or are there enough? There's about five right now: Pikachu and Porygon2, Porygon, Pikachu and Friends, Jigglypuff, and Psyduck.
     
    Server is down. -_-;;

    *will try again tomorrow*
     
    I think it looks very cute. It would be nice if you had a banner for every Pok?mon, but that would take too long to do XD
     
    Do what you want to do. Too many banners gets a bit annoying... so just as many as you feel reasonable.
     
    @_@ Loads... too... slow...
     
    The transition looks really nice, but i think a larger banner would be better -it's a tiny title and picture ^^; you want ppl to remember the title of your site
     
    JKaizer said:
    Server is down. -_-;;

    *will try again tomorrow*


    My host has had lots of down-time lately. I'm too stingy to get a paid hosting account; I get what I pay for, I suppose.

    @_@ Loads... too... slow...

    That may a server issue at the time you visited the site, or it could be that you have a slow Internet connection. I'd rather have a nice layout than one that loads quickly. I used to have a simpler layout, but I got too much flak from visitor saying that it was too simple, so I changed it.

    The site loads in under one second on my Internet connection. I don't believe many people use 56k connections anymore. I could be wrong.



    The transition looks really nice, but i think a larger banner would be better -it's a tiny title and picture ^^; you want ppl to remember the title of your site

    I hate having large, obnoxious banners, though. I thought it would be enough that the logo is largely isolated from the rest of the site -- navigation, sontent et cetera.

    I tried to use the line design to attract the viewer's eyes to the top logo panel, but I guess it's not working as well as I thought it would be.
     
    HellishHades said:
    I hate having large, obnoxious banners, though
    ..i didn't say a "large obnoxious banner", just a larger banner so that people see the title of your site -.-
     
    I have a very fast internet connection, but all the images haven't fully loaded until around one minute after I click the link.
     
    whats the code for the banner i was searching everywhere for it?


    and your site is really cool i go on it most of the time to look at the faqs
     
    Last edited:
    Very cool, but adds time to loading. I mean instead of having the same image stored in temperary internet files, it must load again, but since you aren't designing for speed I guess that isn't a big of an issue, even if you were concerned about loading time. Adds something to the already nice layout. I think that alternate style sheets with alternate banners are much cooler, but that's just my opinion ;)
     
    nice, i really like it, keep it up helly!
     
    pokefuture said:
    whats the code for the banner i was searching everywhere for it?


    and your site is really cool i go on it most of the time to look at the faqs


    PHP:
    <?php
    
    $imageNum=rand(1,5);
    
    // The last number, in this case 5, indicates the total number of "random" images.
    
    $imageName="logo";
    
    /* The above represents the consistent name of the images (i.e. for logo.gif,
     logo2.gif, and logo3.gif; the name would be "logo". 
    
    You can also put the directory of the images up there.  Remember that 
    directory separations must be represented by foreward slashes (/) not 
    backward ones (\), otherwise you'll be cueing an escape character and have 
    to use two backslashes (\\).
    */
    
    $fileType=".gif";
    
    /* The type of image being used.  Use .gif, .jpg, whatever you want.  Just 
    
    indicate it here.
    */
    
    if ($imageNum!=1){
    	$imageName.=$imageNum.$fileType;
    } // end if
    
    /* The first image shouldn't have a number.
    
    So...
    
    logo.gif
    logo2.gif
    logo3.gif
    
    is okay.
    
    
    And...
    
    logo1.gif
    logo2.gif
    logo3.gif
    
    is not.
    
    */
    
    ?>

    Somewhere in your page...

    PHP:
    <?php
    
    echo "<img src=\"$imageName\">";
    
    ?>


    That's it minus the onMouseOver stuff. If you want the image-over change, then I suggest preloading the images -- don't use any of that JavaScript preloading rubbish, either. Simply abolute-position the images you want to load off of the visible page.

    I didn't find the code, I just wrote it. That's the advantage of learning how to code: you can write code that does nearly anything you want.
     
    Last edited:
    i cant do it if i give you the pics i want can you fix it up for me?
     
    pokefuture said:
    i cant do it if i give you the pics i want can you fix it up for me?


    Yes, but each image must be formatted to the same size already. Otherwise, they won't work very well in your layout.

    Your host will also have to be PHP compatible.
     
    More people still use a 56k connection than not, so you'd best be careful in that case.
     
    ..i didn't say a "large obnoxious banner", just a larger banner so that people see the title of your site -.-

    True. I find large banners obnoxious, not to say that's what you were recommending -- the obnoxious part, that is.


    Jedi_Amara said:
    More people still use a 56k connection than not, so you'd best be careful in that case.

    I wanted to make the site more 56k firendly, but I couldn't get the proper feel for the layout that way. I decided to just forget the 56k users. That may sound rude; but after all the flack and cack I got for the simpler layout, I decided that I'd just make the site look pretty and disregard loading times.
     
    the way hellish uses it, it looks nice ^^
     
    Back
    Top