SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 24, 2012, 07:08:35 pm

Login with username, password and session length
Members
Total Members: 10071
Latest: cdavidson012
Stats
Total Posts: 28687
Total Topics: 4977
Online Today: 94
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 0
Guests: 43
Total: 43
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Image (random) preview question  (Read 2069 times)
sanax
Newbie
*
Offline Offline

Posts: 14


View Profile
« on: January 22, 2007, 02:35:00 pm »

How can I change this code (if possible) to show 50 images as random preview but not all the images in one line... maybe show them 4 per line?

Code:
global $scripturl,$db_prefix,$modSettings,$boardurl;
  echo'<table cellspacing="0" cellpadding="5" border="0" align="center" width="90%"><tr>';
  if(empty($modSettings['gallery_url']))
  {
    $modSettings['gallery_url'] = $boardurl . '/gallery/';
  }
  $request = db_query("SELECT thumbfilename,ID_PICTURE FROM {$db_prefix}gallery_pic GROUP BY thumbfilename ORDER BY rand() DESC LIMIT 50", __FILE__,__LINE__);
  while ($row = mysql_fetch_assoc($request))
  echo' <td align="center" colspan="3"><a href="', $scripturl, '?action=gallery;sa=view;id=',
  $row['ID_PICTURE'], '"><img src="',  $modSettings['gallery_url'] .

  $row['thumbfilename'] ,'" /></a>';
  echo'</td></tr>';
  echo'</table></br>';
  mysql_free_result($request);
echo '<table width="100%" border="0" cellspacing="0" cellpadding="6">
  <tr>
    <td><div align="center"><a href="http://xxxxxxxxxxxxx.net/index.php?action=gallery">Upload Images</a></div></td>
  </tr>
</table>';
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[Today at 08:02:50 am]

[Today at 04:11:41 am]

[May 21, 2012, 08:54:11 am]

[May 20, 2012, 11:06:52 am]

[May 20, 2012, 05:58:11 am]

[May 19, 2012, 06:16:58 pm]

[May 19, 2012, 05:42:37 pm]

[May 18, 2012, 03:08:38 pm]

[May 17, 2012, 06:07:46 pm]

[May 17, 2012, 02:22:07 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.16 | SMF © 2006-2011, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 0.192 seconds with 21 queries.