Random Galley For Index Page

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Random Galley For Index Page

    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

    #2
    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
    Attached Files
    Hate romains that take codes from here and tell to all that they had made that

    Comment


      #3
      <div class='quotetop'>QUOTE (ionutxp @ Nov 20 2008, 05:12 AM) <{POST_SNAPBACK}></div>
      <div class='codetop'>CODE
      <div class='codemain' style='height:200px;white-space:pre;overflow:auto'>$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=&#39;".$who."&#39;"));
      //$xp = "$simbol$user($no[0] pics)";
      $xp = "$user($no[0] pics)";
      $ionutxp = $item[1];
      echo "<img src=\"max2.php?filename=$ionutxp\" alt=\"$xp\"/>
      ";
      }
      }</div> try this and max2.php[/b][/quote]
      tryed it dont work

      Comment


        #4
        w have errors ?
        Hate romains that take codes from here and tell to all that they had made that

        Comment


          #5
          <div class='quotetop'>QUOTE (ionutxp @ Nov 21 2008, 06:05 AM) <{POST_SNAPBACK}></div>
          w have errors ?[/b]
          i&#39;m not getting errors it not showing any thing at all

          Comment


            #6
            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..

            Comment


              #7
              <div class='quotetop'>QUOTE (marwin29 @ Nov 22 2008, 02:21 AM) <{POST_SNAPBACK}></div>
              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..[/b]
              <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>$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=&#39;".$who."&#39;"));
              $xp = "$simbol$user($no[0] pics)";
              $xp = "$user($no[0] pics)";
              $ionutxp = $item[1];
              echo "<img src=\"max2.php?filename=$ionutxp\" alt=\"$xp\"/>
              ";
              }
              }</div> 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

              Comment


                #8
                sorry mate i&#39;m just a n0ob.. Try other way random user avatar might work but i dont kn0w how to code..

                Comment


                  #9
                  <div class='quotetop'>QUOTE (djsammy @ Nov 22 2008, 04:20 AM) <{POST_SNAPBACK}></div>
                  <div class='codetop'>CODE
                  <div class='codemain' style='height:200px;white-space:pre;overflow:auto'>$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=&#39;".$who."&#39;"));
                  $xp = "$simbol$user($no[0] pics)";
                  $xp = "$user($no[0] pics)";
                  $ionutxp = $item[1];
                  echo "<img src=\"max2.php?filename=$ionutxp\" alt=\"$xp\"/>
                  ";
                  }
                  }</div> 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[/b][/quote]

                  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ノ刀ノイリ!

                  Comment


                    #10
                    <div class='quotetop'>QUOTE (metulj @ Nov 22 2008, 05:39 AM) <{POST_SNAPBACK}></div>
                    then what do you use instead ibwf_gallery ?[/b]
                    its in the script some please help

                    Comment


                      #11
                      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

                      Comment


                        #12
                        <div class='quotetop'>QUOTE (ionutxp @ Nov 22 2008, 03:06 PM) <{POST_SNAPBACK}></div>
                        ur crazy ..:| post ur sql ....u want 2 much ...but u dont ofer infos[/b]
                        sent u inbox

                        Comment


                          #13
                          <div class='quotetop'>QUOTE (djsammy @ Nov 22 2008, 04:23 PM) <{POST_SNAPBACK}></div>
                          sent u inbox[/b]
                          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ノ刀ノイリ!

                          Comment

                          Working...
                          X