Author Topic: integration in html page of selected photos ?  (Read 10125 times)

0 Members and 1 Guest are viewing this topic.

Offline titi-fr

  • Newbie
  • *
  • Posts: 25
    • View Profile
integration in html page of selected photos ?
« 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

Offline titi-fr

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: integration in html page of selected photos ?
« Reply #1 on: March 17, 2005, 02:57:06 PM »
 :oops: ouinnnn  :P someone could help me ?  :?:

b.o.fan

  • Guest
Re: integration in html page of selected photos ?
« Reply #2 on: March 17, 2005, 04:24:26 PM »
i donīt understand your question...!

in german? or in a better english?? 8) 8)

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Re: integration in html page of selected photos ?
« Reply #3 on: March 17, 2005, 07:05:17 PM »
Too cryptic without enough details.  I didn't understand the post either.

Offline Vincent

  • 4images Moderator
  • Addicted member
  • *****
  • Posts: 1.195
    • View Profile
    • www.foto-kocher.com
Re: integration in html page of selected photos ?
« Reply #4 on: March 17, 2005, 10:02:26 PM »
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
Beati pauperi spiritus

4images 1.7 // My Installed Mods


Offline titi-fr

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: integration in html page of selected photos ?
« Reply #5 on: March 18, 2005, 02:13:58 PM »
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 ? :)

Offline titi-fr

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: integration in html page of selected photos ?
« Reply #6 on: March 19, 2005, 11:19:00 PM »
not understandable ? :/

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Re: integration in html page of selected photos ?
« Reply #7 on: March 20, 2005, 06:54:32 PM »
No, just too much custom coding to voluneer for.  :wink:

Offline titi-fr

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: integration in html page of selected photos ?
« Reply #8 on: March 22, 2005, 09:02:10 AM »
ok, i wasnt thinking this idea is too strange  :roll:

Offline titi-fr

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: integration in html page of selected photos ?
« Reply #9 on: March 22, 2005, 05:48:54 PM »
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, :

Code: [Select]
<?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 ?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: integration in html page of selected photos ?
« Reply #10 on: March 23, 2005, 01:20:29 AM »
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:
Quote
$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";
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline titi-fr

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: integration in html page of selected photos ?
« Reply #11 on: March 23, 2005, 09:32:34 AM »
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 ... :/