how to get images like posts

Started on the old forum in July 2010 · view the original in the archive · old links redirect here

2 replies · 382 views · started 16 years ago · 2 min read

2 participants
pretend Developer · 107 posts #1

hi these are the codings of calling images from user gallery

//changable sql

$sql = "SELECT uid, id, imageurl FROM ibwf_usergallery WHERE sex='M' ORDER BY id DESC LIMIT $limit_start, $items_per_page";

echo "

"; $items = mysql_query($sql);

echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
	$sql = "SELECT rating FROM ibwf_usergallery_rating WHERE imageid='".$item[1]."'";		
	$imginfo = mysql_query($sql);
	
	echo mysql_error();
    if(mysql_num_rows($imginfo)>0)
    {
       while ($imginfos = mysql_fetch_array($imginfo)){ 
          $ratingtotal = $ratingtotal + $imginfos[0];}
    }

it calls the image with the sex if it is male M and female F like these in the forum topics are called as above

{ $iml = "<img src="images/onl.gif" alt="+"/>"; }else{ $iml = "<img src="images/ofl.gif" alt="-"/>"; } $usl = " <a href="index.php?action=viewuser&sid=$sid&who=$ttext[0]">$iml$unick</a>"; $topt = "<a href="index.php?action=tpcopt&sid=$sid&tid=$tid"></a>"; if($go==$tid) { $fli = "<img src="images/flag.gif" alt="!"/>"; }else{ $fli =""; } $pst = parsemsg($ttext[1],$sid); $dtot = date("d/m/y - H:i:s",$ttext[2]); echo "<large>$usl: $dtot</large> $fli$pst $topt "; if($ttext[3]>0) { echo "<a href="index.php?action=viewtpl&sid=$sid&who=$tid">POLL</a> "; } } if($page>1) { $limit_start--; } $sql = "SELECT id, text, uid, dtpost, quote , imageurl FROM ibwf_posts WHERE tid='".$tid."' ORDER BY dtpost LIMIT $limit_start, $posts_per_page"; $posts = mysql_query($sql); while($post = mysql_fetch_array($posts)) { $unick = getnick_uid($post[2]); if(isonline($post[2])) { $iml = "<img src="images/onl.gif" alt="+"/>"; }else{ $iml = "<img src="images/ofl.gif" alt="-"/>"; } $usl = " <a href="index.php?action=viewuser&sid=$sid&who=$post[2]">$iml$unick</a>"; $pst = parsemsg($post[1], $sid); $topt = "<a href="index.php?action=pstopt&sid=$sid&pid=$post[0]&page=$page&fid=$tinfo[5]"></a>"; if($post[4]>0) { $qtl = "<large><a href="index.php?action=viewtpc&sid=$sid&tid=$tid&pst=">(quote:p=blaze,d=16-04-2006)</a></large>"; } if($go==$post[0]) { $fli = "<img src="images/flag.gif" alt="!"/>"; }else{ $fli =""; }

$dtot = date("d/m/y - H:i:s",$post[3]);
echo "<large>$usl: $dtot</large>

$fli$pst $topt "; }

i want the image calling code without the sex i want it to be called as common for example like posts are called in forums when you open and have a look on a topic many would have posted on it like that i want this image codings in the gallery also to be called as common without sex i didnt mean male and female both just want from a certain Ibwf_example to call images like every posts are called

Nice Effects

pretend Developer · 107 posts #3

and also can you sya me how to combine the image calling codes together with the posts calling ones? what i am trying to do is i am done with the rest of the codes on uploading images to forums now just need to do the image calling thing after the upload is done

Nice Effects

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close