Script to rotate images? Any good one?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tranza
    ICQ: 197-556-237
    • Jun 2003
    • 57559

    #1

    Script to rotate images? Any good one?

    Do you guys know any script to rotate pictures AND the links of those pictures (each picture should have it own unique link)?

    Anybody can help me out?
    I'm just a newbie.
  • Dirty F
    Too lazy to set a custom title
    • Jul 2001
    • 59204

    #2

    Comment

    • tranza
      ICQ: 197-556-237
      • Jun 2003
      • 57559

      #3
      Stop posting your picture on every thread Franck
      I'm just a newbie.

      Comment

      • psili
        Confirmed User
        • Apr 2003
        • 5526

        #4
        Here's a basic PHP one I pulled out of my ass:

        pictures.txt
        Code:
        image1.jpg|http://somelink.com/
        imaagagads3.jpg|http://notherlinkg.com/
        akadsfd.jpg|http://asdfasdf/
        random_image.php
        Code:
        $file = file("pictures.txt");
        list($img,$link) = each(explode("|",$filerand (0, (count($file)-1)));
        echo "<a href=\"".$link."\"><img src=\"".$img."\"></a>";
        * note, code not checked or validated to work
        Your post count means nothing.

        Comment

        • Antonio
          Too lazy to set a custom title
          • Oct 2001
          • 14136

          #5
          http://www.tgpwiz.com/

          see the free script and download it from there, it has thumbs/links option too (for building thumb TGP), the thing is it's been a long time since I used it so I can't really help you with install etc, good luck, hope it's what you're looking for

          Comment

          • mikeyddddd
            Viva la vulva!
            • Mar 2003
            • 16557

            #6
            This PHP requires a separate text file to be created for 0-60 seconds:

            Code:
            $num = date("s");
            $ads = "/path/to/text/file/$num.txt";
            
            if (file_exists($ads)) {
            
            $ads_in = file ("$ads");
            
            for($i = 0; $i < sizeof($ads_in); $i++) 
            { print("$ads_in[$i]\n"); }
            
            } else {
            print("Try Again - $num.txt - $ads");
            }
            date("s") can be changed to whatever time interval you want and will require a text file for each possible value.

            Just set the text file up like you would normally code your HTML.
            Last edited by mikeyddddd; 05-06-2006, 09:01 AM.

            Comment

            • Lazonby
              Confirmed User
              • Feb 2006
              • 2262

              #7
              Originally posted by Franck
              Borat says "I hev..... liquid explosion....... in my pants. IS NICE!"

              He also says to have a look on google. You'll find loads of examples and you can swap and change them to find one which works best.

              Comment

              • OG LennyT
                Wall Street Pimp
                • Jun 2003
                • 14345

                #8
                Code:
                <script language="Javascript">
                <!--
                
                
                var currentdate = 0;
                var core = 0;
                
                function initArray() {
                
                this.length = initArray.arguments.length;
                  for (var i = 0; i < this.length; i++) {
                  this[i] = initArray.arguments[i];
                  }
                }
                
                link = new initArray(
                "http://www.yourlink1",
                "http://www.yourlink2",
                "http://www.yourlink3",
                "http://www.yourlink4"
                );
                
                image = new initArray(
                "http://imagelink.gif",
                "http://imagelink.gif",
                "http://imagelink.gif",
                "http://imagelink.gif"
                );
                
                text = new initArray(
                "textforlink!",
                "text!",
                "texxt!",
                "rollovertext!"
                );
                
                var currentdate = new Date();
                var core = currentdate.getSeconds() % image.length;
                var ranlink  = link[core];
                var ranimage = image[core];
                var rantext  = text[core];
                
                document.write('<a href=\"' +ranlink+ '\" target=\"_blank\"><img src=\"'+ranimage+'\" border="0" alt=\"'+rantext+'\"></a>');
                
                //-->
                </SCRIPT>
                I use this for banner rotation, works well.
                Tradeking - my online broker | 4.95 a trade | make real $$

                Comment

                Working...