4images code on GitHub Click here to visit GitHub.
0 Members and 1 Guest are viewing this topic.
Bin mir sicher das hier wo gesehen zu haben, dort konnte man die Kat ID eingeben, wo dann nur diese Bilder angezeigt wurden. evtl. kann einer den Link posten.
<?php// PATH to your 4images Gallery / PFAD zu Ihrer 4images Galleriedefine('ROOT_PATH', './4images/');include(ROOT_PATH.'config.php');include(ROOT_PATH.'includes/db_mysql.php');include(ROOT_PATH.'includes/constants.php');$site_db = new Db($db_host, $db_user, $db_password, $db_name);function is_remote($file_name) { return (preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $file_name)) ? 1 : 0;}$sql = "SELECT COUNT(*) as total_images FROM (".IMAGES_TABLE." a, ".CATEGORIES_TABLE." b) WHERE a.image_active=1 AND a.cat_id = b.cat_id AND b.auth_viewcat=".AUTH_ALL." AND b.auth_viewimage=".AUTH_ALL." AND b.cat_parent_id = 1 ";$row = $site_db->query_firstrow($sql);$total_images = $row['total_images'];mt_srand((double)microtime() * 1000000);$number = ($total_images > 1) ? mt_rand(0, $total_images - 1) : 0;$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments FROM (".IMAGES_TABLE." a, ".CATEGORIES_TABLE." b) WHERE a.image_active=1 AND a.cat_id = b.cat_id AND b.auth_viewcat=".AUTH_ALL." AND b.auth_viewimage=".AUTH_ALL." AND b.cat_parent_id = 1 LIMIT $number, 1";$row = $site_db->query_firstrow($sql);$image_id = $row['image_id'];$cat_id = $row['cat_id'];$image_name = $row['image_name'];$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];echo "<a href=\"".ROOT_PATH."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" title=\"$image_name\" alt=\"$image_name\"></a><br>\n";echo "<b>$image_name</b>\n";?>
<script language="javascript" src="http://www.tierfreunde-info.com/tiere.php?1"></script>
,,,Danke Harald, das wäre klasse wenn den jemand findet und postet.
Si, aber Nicky hat ihm ja schon geholfen, wusste nur das es so was schon gabAber evtl. kann Bärchen ja auch deinen Mod nutzen.LG Harald
Quote from: neverkas on July 15, 2009, 08:29:46 PMAh ...!I put the number of categories that I have.you have videos in Cat_id 3 write 3 in the new field!have you videos in Cat_ID 3 and Cat_id 7 and in Cat_id 35 and in Cat_ID 3465write 3,7,35,3465 in the new field.so sorry, i give upmaybe you can help someone else.mfg Andi
Ah ...!I put the number of categories that I have.