GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Webmaster Q & Fuckin' A (https://gfy.com/forumdisplay.php?f=27)
-   -   How to display random gallery in html page? anyone know code? (https://gfy.com/showthread.php?t=739745)

teomaxxx 06-05-2007 12:22 PM

How to display random gallery in html page? anyone know code?
 
I guess it should be done by javascript, anyone know code?

MissFireCrotch 06-05-2007 02:37 PM

do you know how to code php? What scripts are you using?

weput 06-07-2007 07:39 PM

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

MissFireCrotch 06-07-2007 08:09 PM

if you have all your images in a database just do a query that is random, mysql has a default by rand function

hormiga 06-07-2007 08:11 PM

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 :mad:

terrymmx 06-08-2007 09:30 AM

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>



All times are GMT -7. The time now is 05:36 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123