has any one got ramdom galley coding please one that works please i am after it for my site toptunes i looked on ere and tryed over ome and not one of them works so if you could helo i would be very greatful
Random Galley For Index Page
Started on the old forum in November 2008 · view the original in the archive · old links redirect here
$sql = "SELECT DISTINCT uid, itemurl FROM ibwf_gallery ORDER BY RAND() LIMIT 0, 1";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$who = $item[0];
$user=getnick_uid($who);
//$simbol = getsimbol($who);
$no = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_gallery WHERE uid='".$who."'"));
//$xp = "$simbol$user($no[0] pics)";
$xp = "$user($no[0] pics)";
$ionutxp = $item[1];
echo "<img src=\"max2.php?filename=$ionutxp\" alt=\"$xp\"/>
";
}
}
try this and max2.php
Hate romains that take codes from here and tell to all that they had made that External image (may be gone)
QUOTE (ionutxp @ Nov 20 2008, 05:12 AM) <{POST_SNAPBACK}>
CODE $sql = "SELECT DISTINCT uid, itemurl FROM ibwf_gallery ORDER BY RAND() LIMIT 0, 1"; $items = mysql_query($sql); echo mysql_error(); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { $who = $item[0]; $user=getnick_uid($who); //$simbol = getsimbol($who); $no = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_gallery WHERE uid='".$who."'")); //$xp = "$simbol$user($no[0] pics)"; $xp = "$user($no[0] pics)"; $ionutxp = $item[1]; echo "<img src="max2.php?filename=$ionutxp" alt="$xp"/> "; } } try this and max2.php tryed it dont work
w have errors ?
Hate romains that take codes from here and tell to all that they had made that External image (may be gone)
QUOTE (ionutxp @ Nov 21 2008, 06:05 AM) <{POST_SNAPBACK}>
w have errors ? i'm not getting errors it not showing any thing at all
LOL check ur ibwf_gallery table it might imageurl or imagescr ... Try to use this other way $randomm = mysql_fetch_array(mysql_query("SELECT itemurl, uid FROM baz_gallery WHERE id ORDER BY RAND() LIMIT 1")); echo "<img src="$randomm[0]" height="40" width="40" alt="$randomm[1]"/>"; change the table..
QUOTE (marwin29 @ Nov 22 2008, 02:21 AM) <{POST_SNAPBACK}>
LOL check ur ibwf_gallery table it might imageurl or imagescr ... Try to use this other way $randomm = mysql_fetch_array(mysql_query("SELECT itemurl, uid FROM baz_gallery WHERE id ORDER BY RAND() LIMIT 1")); echo "<img src="$randomm[0]" height="40" width="40" alt="$randomm[1]"/>"; change the table..
CODE$sql = "SELECT DISTINCT uid, itemurl FROM ibwf_gallery ORDER BY RAND() LIMIT 0, 1"; $items = mysql_query($sql); echo mysql_error(); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { $who = $item[0]; $user=getnick_uid($who); $simbol = getsimbol($who); $no = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_gallery WHERE uid='".$who."'")); $xp = "$simbol$user($no[0] pics)"; $xp = "$user($no[0] pics)"; $ionutxp = $item[1]; echo "<img src="max2.php?filename=$ionutxp" alt="$xp"/> "; } } can some one sort this out so i can use it on my site please some one help please my site dont use ibwf_gallery
QUOTE (djsammy @ Nov 22 2008, 04:20 AM) <{POST_SNAPBACK}>
CODE $sql = "SELECT DISTINCT uid, itemurl FROM ibwf_gallery ORDER BY RAND() LIMIT 0, 1"; $items = mysql_query($sql); echo mysql_error(); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { $who = $item[0]; $user=getnick_uid($who); $simbol = getsimbol($who); $no = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_gallery WHERE uid='".$who."'")); $xp = "$simbol$user($no[0] pics)"; $xp = "$user($no[0] pics)"; $ionutxp = $item[1]; echo "<img src="max2.php?filename=$ionutxp" alt="$xp"/> "; } } can some one sort this out so i can use it on my site please some one help please my site dont use ibwf_gallery
then what do you use instead ibwf_gallery ?
It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!
QUOTE (metulj @ Nov 22 2008, 05:39 AM) <{POST_SNAPBACK}>
then what do you use instead ibwf_gallery ?
its in the script some please help
ur crazy ..:| post ur sql ....u want 2 much ...but u dont ofer infos
Hate romains that take codes from here and tell to all that they had made that External image (may be gone)
QUOTE (ionutxp @ Nov 22 2008, 03:06 PM) <{POST_SNAPBACK}>
ur crazy ..:| post ur sql ....u want 2 much ...but u dont ofer infos
sent u inbox
QUOTE (djsammy @ Nov 22 2008, 04:23 PM) <{POST_SNAPBACK}>
sent u inbox
inbox? then you dont need this topic so.. CLOSED
It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!