display pic below users profile

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Rksk
    replied
    01.
    Code:
    ORDER BY RAND()
    this will select 3 random photos only if available. if the user haven't photos, this wont return anything.

    02. don't post crazy replies without reading the whole thread!
    Last edited by Rksk; 29.07.12, 17:46.

    Leave a comment:


  • arevel
    replied
    this is the right syntax
    PHP Code:
    $countpics mysql_num_rows(mysql_query ("SELECT * FROM ibwf_usergallery WHERE
    uid='"
    .$who."'")); echo "<a href=\"usergallery.php? action=viewuserphoto&amp;who= $who&amp;sid=$sid\">MY GALLERY</a>('.$countpics.')<br/ >"
    .
    Last edited by arnage; 31.07.12, 17:38.

    Leave a comment:


  • Vayne
    replied
    PHP Code:
    ORDER BY RAND() 
    i hope those users dont have tons of pictures. anyway, better would be randomize in php side.

    Leave a comment:


  • Rksk
    replied
    Try below one.
    *I coded it using general lavalair file names. It can be changed in ur site.
    *this will show 3 random photos of the user.
    PHP Code:
    echo "<p><a href='gallery2.php?action=viewuserphoto&who=$who'>";

    $itemsmysql_query("SELECT `imageurl` FROM `ibwf_usergallery` where `uid`='$who' ORDER BY RAND() LIMIT 3");
      while (
    $pic mysql_fetch_array($items))
      {
        echo 
    "<img alt='Loading...' src='phpthumb.php?image=$pic[0]' width='30' height='30'>";
      }

    echo 
    "</a></p>"

    Leave a comment:


  • mirror
    replied
    Originally posted by Rksk View Post
    this code just print a link to user gallery. do u want to show photo thumbs?
    yes bro i want to show photos of a users profile as thumbnails below their profiles , i have the column of imageurl for path, in my ibwf_gallery , how to link it to show image , images are uploaded in folder gallery

    Leave a comment:


  • Rksk
    replied
    this code just print a link to user gallery. do u want to show photo thumbs?

    Leave a comment:


  • mirror
    replied
    Originally posted by arnage View Post
    Cant count that, try this. * means something like ALL

    PHP Code:
    $countpics mysql_fetch_array(mysql_query("SELECT * FROM ibwf_usergallery WHERE uid='".$who."'"));
      echo 
    "<a href=\"usergallery.php?action=viewuserphoto&amp;who=$who&amp;sid=$sid\">MY GALLERY</a>($countpics[0])<br/>"
    not working bro , do i hve to use phpthumb

    Leave a comment:


  • $XTREME$
    replied
    use a while coding

    Leave a comment:


  • arnage
    replied
    Cant count that, try this. * means something like ALL

    PHP Code:
    $countpics mysql_fetch_array(mysql_query("SELECT * FROM ibwf_usergallery WHERE uid='".$who."'"));
      echo 
    "<a href=\"usergallery.php?action=viewuserphoto&amp;who=$who&amp;sid=$sid\">MY GALLERY</a>($countpics[0])<br/>"

    Leave a comment:


  • mirror
    started a topic display pic below users profile

    display pic below users profile

    hey friends i want to display the pics below users profile , this is the coding for gallery link in profile how can i display their gallery pics as thumbnails ,
    PHP Code:
    $countpics mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_usergallery WHERE uid='".$who."'"));
      echo 
    "<a href=\"usergallery.php?action=viewuserphoto&amp;who=$who&amp;sid=$sid\">MY GALLERY</a>($countpics[0])<br/>"
Working...
X