4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: titi-fr on March 16, 2005, 10:43:48 AM
-
hello all
i've installed few weeks ago the mod who permit to see in html pages the last x images or random images...
but in fact i search the same, but with "selected images" aka i go the admin panel, & i select images i want to display in html pages
does it exist ? i'm not a programmer so :x
-
:oops: ouinnnn :P someone could help me ? :?:
-
i don´t understand your question...!
in german? or in a better english?? 8) 8)
-
Too cryptic without enough details. I didn't understand the post either.
-
Hello
i think he would like to have the possibility to make a group of a couple of picture!
maybe he is looking for something like that http://www.foto-kocher.com/sol.php
but in my case it is done by hand in html
because i am not able to code this in php
sincerly
vincent
-
ok sorry i'm french, i'll try to be comprehensible, i search for a mod who works like the " last images integration in html page" ( to show last images tn in an other site written in html) but the same mod with thumbnail i selected in the gallery, not the last xxx images.
so in the admin, a mod interface who permit the selection of tn images i want to display in html pages ...
better ? :)
-
not understandable ? :/
-
No, just too much custom coding to voluneer for. :wink:
-
ok, i wasnt thinking this idea is too strange :roll:
-
maybe an idea ... I have installed the integration in html page ( who display the last ten pix).
here the source of the file latest.php, :
<?php
define('ROOT_PATH', './annonces/');
define('SITE_URL', /');
$db_servertype = "mysql";
$db_host = "xxxx";
$db_name = "xxxx";
$db_user = "xxxx";
$db_password = "xxxx";
$table_prefix = "4images_";
define('4IMAGES_ACTIVE', 1);
include_once('db_mysql.php');
define('PIC_CATEGORIES_TABLE', '4images_categories');
define('PIC_IMAGES_TABLE', '4images_images');
define('THUMB_DIR', 'data/thumbnails');
define('AUTH_ALL', 0);
define('AUTH_USER', 2);
define('AUTH_ACL', 3);
define('AUTH_ADMIN', 9);
$pics_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 ".PIC_IMAGES_TABLE." a, ".PIC_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."";
$row = $pics_db->query_firstrow($sql);
$total_images = $row['total_images'];
$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments, a.image_date FROM ".PIC_IMAGES_TABLE." a, ".PIC_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." ORDER BY a.image_date DESC LIMIT 3";
$result = $pics_db->query($sql);
while ($row = $pics_db->fetch_array($result)) {
$image_id = $row['image_id'];
$cat_id = $row['cat_id'];
$image_name = $row['image_name'];
$image_comments = $row['image_comments'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : SITE_URL.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];
echo "<font size=\"1\" face=\"Arial, Helvetica, sans-serif\"><a target=\"a\" href=\"".SITE_URL."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" vspace=\"2\" alt=\"$image_name\"><br>Cliquez sur l'image</a><br>\n";
echo "$image_name<br>\n";
echo "</font>\n";
}
if i add a additional filed ( ex. "promote"), with : 1 for promoting pictures is there a way to use the script to find & display the pictures with promote value=1 ?
-
if i add a additional filed ( ex. "promote"), with : 1 for promoting pictures is there a way to use the script to find & display the pictures with promote value=1 ?
yep, that would be your best bet ;)
ones u added the new field, u can retreve your "promote" images by adding AND promote = 1 into sql query:$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments, a.image_date FROM ".PIC_IMAGES_TABLE." a, ".PIC_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 promote = 1 ORDER BY a.image_date DESC LIMIT 3";
-
whoooaaaa seems good :lol:
hum i dont find the original post for adding extra custom fields ... :/
ex http://www.4homepages.de/forum/index.php?topic=1413.0
i think the tutorial was not reup after the attack ... :/