View Thread
Private Stock » Administrative and Housekeeping » Site Notes
 Print Thread
Edited random_photo_center_panel.php in BACK ROOM ONLY
Royce
I customized the code in the random_photo_center_panel.php file IN THE BACK ROOM ONLY to make the images smaller and more of them displayed.

Original:
Download source  Code

if (!defined("IN_FUSION")) { die("Access Denied"); }

if (file_exists(INFUSIONS."random_photo_center_panel/locale/".$settings['locale'].".php")) {
   include INFUSIONS."random_photo_center_panel/locale/".$settings['locale'].".php";
} else {
   include INFUSIONS."random_photo_center_panel/locale/English.php";
}

$result=dbquery(
   "SELECT ta.album_id,album_title,photo_id,photo_title,photo_thumb1 FROM ".$db_prefix."photo_albums ta ".
   "JOIN ".$db_prefix."photos USING (album_id) ORDER BY RAND() LIMIT 6"
   );

opentable($locale['rpc100']);
if (dbrows($result)!= "0") {
   echo "<br><table width='100%' border='0' cellpadding='0' cellspacing='0'><tr>";
   while($data = dbarray($result)) {
      echo "<td width='1%' align='center' valign='top' class='tbl'>";
      echo "<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='side'>";
      echo "<img src='".PHOTOS."album_".$data['album_id']."/".$data['photo_thumb1']."' width='100' height='75' title='".$data['photo_title']."' alt='".$data['photo_title']."' border='0'></a>";
      echo "<br /><a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."'>".$data['photo_title']."</a>";
      echo "<br />".$locale['rpc101']."<br /><a href='".BASEDIR."photogallery.php?album_id=".$data['album_id']."' title='".$data['album_title']."'>".$data['album_title']."</a>";
      echo "</td>";
   }
   echo "</tr></table>";
} else {
   echo $locale['rpc102'];
}


Modified to:
Download source  Code

if (!defined("IN_FUSION")) { die("Access Denied"); }

if (file_exists(INFUSIONS."random_photo_center_panel/locale/".$settings['locale'].".php")) {
   include INFUSIONS."random_photo_center_panel/locale/".$settings['locale'].".php";
} else {
   include INFUSIONS."random_photo_center_panel/locale/English.php";
}

$result=dbquery(
   "SELECT ta.album_id,album_title,photo_id,photo_title,photo_thumb1 FROM ".$db_prefix."photo_albums ta ".
   "JOIN ".$db_prefix."photos USING (album_id) ORDER BY RAND() LIMIT 10"
   );

opentable($locale['rpc100']);
if (dbrows($result)!= "0") {
   echo "<br><table width='100%' border='0' cellpadding='0' cellspacing='0'><tr>";
   while($data = dbarray($result)) {
      echo "<td width='1%' align='center' valign='top' class='tbl'>";
      echo "<a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."' class='side'>";
      echo "<img src='".PHOTOS."album_".$data['album_id']."/".$data['photo_thumb1']."' width='50' height='38' title='".$data['photo_title']."' alt='".$data['photo_title']."' border='0'></a>";
      echo "<br /><a href='".BASEDIR."photogallery.php?photo_id=".$data['photo_id']."'>".$data['photo_title']."</a>";
      echo "<br />".$locale['rpc101']."<br /><a href='".BASEDIR."photogallery.php?album_id=".$data['album_id']."' title='".$data['album_title']."'>".$data['album_title']."</a>";
      echo "</td>";
   }
   echo "</tr></table>";
} else {
   echo $locale['rpc102'];
}

 
Jump to Forum:
Top Top  2,137,477 unique visits  Top Top