How to display random gallery in html page? anyone know code?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • teomaxxx
    Confirmed User
    • May 2003
    • 2737

    #1

    How to display random gallery in html page? anyone know code?

    I guess it should be done by javascript, anyone know code?
  • MissFireCrotch
    Confirmed User
    • Jun 2007
    • 187

    #2
    do you know how to code php? What scripts are you using?
    Need some web dev? Contact ME
    ICQ - 366621126

    Comment

    • weput
      Registered User
      • May 2007
      • 19

      #3
      I know about an html rotator that runs in cgi...
      i use it on my proxy site to rotate banners on proxified pages..

      it is easy to use... just paste the html code and that´s it.

      h t t p : / / w w w .focalmedia.net/htmlrotate_docs.html

      Comment

      • MissFireCrotch
        Confirmed User
        • Jun 2007
        • 187

        #4
        if you have all your images in a database just do a query that is random, mysql has a default by rand function
        Need some web dev? Contact ME
        ICQ - 366621126

        Comment

        • hormiga
          Registered User
          • Jun 2007
          • 1

          #5
          this code

          this is php, im use in nenasnenas.com.ar and this code to "add to blog".

          Code add to blog/mySpace
          Code:
          <!-- inicio imagen aleatoria NenasNenas.com.ar -->
          <a href="yourwebsite" style="display:block; width:135px;height:87px;margin:5px auto auto;border-top:1px solid #fff;border-left:1px solid #fff;
          border-bottom:1px solid #000;border-right:1px solid #000;text-align:center;vertical-align:middle;text-decoration:none;line-height:20px;color:#000;">
          <img src="yourwebsite/aleatoria.php" alt="Nenas, nenas y mas nenas!" style="margin:2px auto 3px;border:none; height:80px;" center></a>
          <a href="yourwebsite" style="display:block; width:135px;height:20px;margin:0px auto 5px;border-top:1px solid #fff;border-left:1px solid #fff;
          border-bottom:1px solid #000;border-right:1px solid #000;text-align:center;vertical-align:middle;text-decoration:none;line-height:20px;font-family:Symbol, serif;
          color:#0a00c4;">Más nenas!</a>
          <!-- Fin imagen aleatoria NenasNenas.com.ar -->
          And this code aleatoria.php

          PHP Code:
          <?php
          //donde estan guardadas las fotos
          $dir_imagenes ='albums/miniaturas/';
          $elementos1 =array();
          $n1 = 0;
          $r1 = 0;
          $directorio1 = opendir ($dir_imagenes);
          while ($elemento = readdir ($directorio1)){
          if (($elemento != '.') && ($elemento != '..')){
          $elementos1[$n1] = $elemento;
          $n1++;
          }
          }
          $r1 = rand(0,$n1-1);
          
          <img src="albums/imagenes/grupo/'. $elementos2[$r2] . '" alt ="otra foto" WIDTH=150 HEIGTH=150 /></a>';
          closedir ($directorio1);
          
          $url=$dir_imagenes.$elementos1[$r1];
          
          /*$fichero=fopen($url,"r");
          while(!feof($fichero))
          $texto.=fread($fichero,1024);
          fclose($fichero);*/
          
          // la abrimos para recuperar su contenido
          $fichero=fopen($url,"r");
          while(!feof($fichero))
          $texto.=fread($fichero,1024);
          fclose($fichero);
          
          // y finalmente mostramos el contenido de la imágen recuperada
          echo $texto;
          
          ?>
          sorry my english, came from jujuy, argentina

          Comment

          • terrymmx
            Registered User
            • May 2006
            • 24

            #6
            I write a javascript for you,enjoy it

            Code:
            <script language="javascript">
            var list = new Array(); //define the gallery content array
            //replace the "your_url" and "your_img" with your own
            list[0]="<a href=\"your_url\"><img src=\"your_img1\"></a>";
            list[1]="<a href=\"your_url\"><img src=\"your_img2\"></a>";
            list[2]="<a href=\"your_url\"><img src=\"your_img3\"></a>";
            list[3]="<a href=\"your_url\"><img src=\"your_img4\"></a>";
            list[4]="<a href=\"your_url\"><img src=\"your_img5\"></a>";
            list[5]="<a href=\"your_url\"><img src=\"your_img5\"></a>";
            list[6]="<a href=\"your_url\"><img src=\"your_img5\"></a>";
            list[7]="<a href=\"your_url\"><img src=\"your_img5\"></a>";
            list[8]="<a href=\"your_url\"><img src=\"your_img5\"></a>";
            list[9]="<a href=\"your_url\"><img src=\"your_img5\"></a>";
            list[10]="<a href=\"your_url\"><img src=\"your_img5\"></a>";
            list[11]="<a href=\"your_url\"><img src=\"your_img5\"></a>";
            list[12]="<a href=\"your_url\"><img src=\"your_img5\"></a>";
            list[13]="<a href=\"your_url\"><img src=\"your_img5\"></a>";
            
            var list_count = list.length; 
            
            function show_list(n) {
            show = n;
            var temp;
            var ran = rand();
            for (i=0;i<show;i++){
            temp="";
            temp=list[ran];
            document.write(temp);
            ran++;
            }
            }
            
            function rand()
            {
            var num=Math.random( );
            var num=Math.floor(num * (list_count-show+1));
            return num;
            }
            
            show_list(3);
            </script>
            Free dickgirl hentai manga

            Comment

            Working...