•  » Beta testing
  •  » BSF_20041126 .... about iptc sinchro in DB and search function

#1 2004-11-29 17:51:06

vimages
Member
2004-03-27
2116

BSF_20041126 .... about iptc sinchro in DB and search function

hello,

a little problem... I search all the days.. but.... don't find...

you can see if you want on http://www.v-images.com/visiteurs/ the work I do to modify the PWG... 

if you go to folder : 2004/trophee andros/val thorens/auto/1  ,
open a picture , you can see the iptc directly displayed..
(the others folders are not yet ready for this exemple)
It's only my choice for my galleries.... :o)

I change picture.php, picture.tpl, category.php, category.tpl, and others...

in config.inc.php I change this :

// $conf['show_exif_fields'] = array('CameraMake','CameraModel','DateTime');
//
$conf['show_exif_fields'] = array('');

and this :


// To know how to associated iptc_field with their meaning, use
// tools/metadata.php
$conf['show_iptc_mapping'] = array(
  'iptc_caption'                => '2#120',
  'iptc_keywords'             => '2#025',
  'iptc_date_creation'       => '2#055',
  'iptc_credit'                  => '2#080',
  'iptc_copyright_notice'   => '2#110',
  'iptc_instructions'          => '2#040'
  );

// use_iptc_mapping : in which IPTC fields will PhpWebGallery find image
// information ? This setting is used during metadata synchronisation. It
// associates a phpwebgallery_images column name to a IPTC key
$conf['use_iptc_mapping'] = array(
  'name'              => '2#005',
  'comment'         => '2#120',
  'keywords'         => '2#025',
  'date_creation'   => '2#055',
  'author'             => '2#080',
  );

to fill pictures IPTC fileds with "image" table fields
the display is now ok.
we can see all this informations under the pictures .

THE PROBLEM IS :
after the modifications, I set in admin/config metadata : ok for IPTC synchro and ok forIPTC and EXIF display.
I synchronise. in first folders, and after IPTC.

!!! but no informations are included in the "images" table.. !!!
and I cannot use the search functions....

Last edited by vimages (2004-11-29 17:59:30)

Offline

 

#2 2004-11-29 23:21:15

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
14087

Re: BSF_20041126 .... about iptc sinchro in DB and search function

in include/config.inc.php, set $conf['show_queries'] to true and try a new metadata synchronization. Copy/paste here the queries displayed on the page.

Offline

 

#3 2004-11-30 09:31:03

vimages
Member
2004-03-27
2116

Re: BSF_20041126 .... about iptc sinchro in DB and search function

zOrglub,

here is the queries. I do what you ask. I put only the begining and the end of the queries... there is to many pictures to put all... I think you don't need all.. :o).



[1]

SELECT param,value
FROM pwg_config
;
(this query time : 0.001 s)
(total SQL time  : 0.001 s)
[2]

SELECT user_id,expiration,ip
  FROM pwg_sessions
  WHERE id = 'U9xtNGnjm5'
;
(this query time : 0.002 s)
(total SQL time  : 0.003 s)
[3]
SELECT * FROM pwg_users WHERE id = 1;
(this query time : 0.001 s)
(total SQL time  : 0.005 s)
[4]
SELECT id FROM pwg_waiting WHERE validated='false';
(this query time : 0.003 s)
(total SQL time  : 0.007 s)
[5]
SELECT id FROM pwg_comments WHERE validated='false';
(this query time : 0.001 s)
(total SQL time  : 0.009 s)
[6]

SELECT id, dir
  FROM pwg_categories
  WHERE dir IS NOT NULL
;
(this query time : 0.003 s)
(total SQL time  : 0.012 s)
[7]

SELECT id, uppercats
  FROM pwg_categories
  WHERE site_id = 1
    AND dir IS NOT NULL
;
(this query time : 0.002 s)
(total SQL time  : 0.013 s)
[8]

SELECT galleries_url
  FROM pwg_sites
  WHERE id = 1

(this query time : 0.009 s)
(total SQL time  : 0.022 s)
[9]

SELECT id, file, storage_category_id
  FROM pwg_images
  WHERE storage_category_id IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14-----(I CUT THIS LIST)------------)
;
(this query time : 0.075 s)
(total SQL time  : 0.097 s)
0.162 s for get_filelist
[10]
SELECT VERSION() AS version;
(this query time : 0.002 s)
(total SQL time  : 0.099 s)
[11]

DESCRIBE pwg_images
;
(this query time : 0.000 s)
(total SQL time  : 0.100 s)

[12]

CREATE TEMPORARY TABLE pwg_image_metadata
(
id mediumint(8) unsigned NOT NULL,
date_creation date,
name varchar(255),
comment text,
author varchar(255),
filesize mediumint(9) unsigned,
width smallint(9) unsigned,
height smallint(9) unsigned,
keywords varchar(255),
date_metadata_update date,
PRIMARY KEY (id)
)
;
(this query time : 0.021 s)
(total SQL time  : 0.121 s)
[13]

INSERT INTO pwg_image_metadata
  (id,filesize,width,height,name,author,comment,date_creation,keywords,date_metadata_update)
   VALUES
   
(1,58,640,451,NULL,NULL,NULL,NULL,NULL,2004-11-30)
,(2,53,640,428,NULL,NULL,NULL,NULL,NULL,2004-11-30)
,(3,56,640,428,NULL,NULL,NULL,NULL,NULL,2004-11-30)
,(4,51,640,428,NULL,NULL,NULL,NULL,NULL,2004-11-30)



____________________END____________________________

(7745,73,640,428,'v-images 1','eric Fabre','N\'utiliser qu\'avec autorisation de l\'agence V\'IMAGES et ne pas oublier la signature des photos !!!
Use only with autorisation from V\'IMAGES agency and don\'t forget to write the copyright near the pictures !!!','2004-05-06',NULL,2004-11-30)
,(7746,86,640,428,'v-images 1','eric Fabre','N\'utiliser qu\'avec autorisation de l\'agence V\'IMAGES et ne pas oublier la signature des photos !!!
Use only with autorisation from V\'IMAGES agency and don\'t forget to write the copyright near the pictures !!!','2004-05-06',NULL,2004-11-30)
,(7816,99,640,428,NULL,'V-IMAGES/Fabre',NULL,'2004-07-16','2004,mans,24h,ambiance',2004-11-30)
,(7817,112,640,427,NULL,'V-IMAGES/Fabre',NULL,'2004-07-16','2004,mans,24h,ambiance',2004-11-30)
,(7818,118,640,428,NULL,'V-IMAGES/Fabre',NULL,'2004-07-16','2004,mans,24h,ambiance',2004-11-30)
,(7819,138,640,428,NULL,'V-IMAGES/Fabre',NULL,'2004-07-16','2004,mans,24h,ambiance',2004-11-30)
,(7820,123,640,428,NULL,'V-IMAGES/Fabre',NULL,'2004-07-16','2004,mans,24h,ambiance',2004-11-30)
,(7821,126,640,427,NULL,'V-IMAGES/Fabre',NULL,'2004-07-16','2004,mans,24h,ambiance',2004-11-30)
,(7822,117,640,428,NULL,'V-IMAGES/Fabre',NULL,'2004-07-16','2004,mans,24h,ambiance',2004-11-30)
,(7823,122,640,427,NULL,'V-IMAGES/Fabre',NULL,'2004-07-16','2004,mans,24h,ambiance',2004-11-30)
,(7824,125,640,427,NULL,'V-IMAGES/Fabre',NULL,'2004-07-16','2004,mans,24h,ambiance',2004-11-30)
,(7825,113,640,427,NULL,'V-IMAGES/Fabre',NULL,'2004-07-16','2004,mans,24h,ambiance',2004-11-30)
,(7826,119,640,427,NULL,'V-IMAGES/Fabre',NULL,'2004-07-16','2004,mans,24h,ambiance',2004-11-30)
,(7827,125,640,427,NULL,'V-IMAGES/Fabre',NULL,'2004-07-16','2004,mans,24h,ambiance',2004-11-30)
;
(this query time : 0.026 s)
(total SQL time  : 0.147 s)
UPDATE pwg_images AS images, pwg_image_metadata as metadata
  SET images.filesize = metadata.filesize
    , images.width = metadata.width
    , images.height = metadata.height
    , images.name = metadata.name
    , images.author = metadata.author
    , images.comment = metadata.comment
    , images.date_creation = metadata.date_creation
    , images.keywords = metadata.keywords
    , images.date_metadata_update = metadata.date_metadata_update
  WHERE images.id = metadata.id
;
[14]

UPDATE pwg_images AS images, pwg_image_metadata as metadata
  SET images.filesize = metadata.filesize
    , images.width = metadata.width
    , images.height = metadata.height
    , images.name = metadata.name
    , images.author = metadata.author
    , images.comment = metadata.comment
    , images.date_creation = metadata.date_creation
    , images.keywords = metadata.keywords
    , images.date_metadata_update = metadata.date_metadata_update
  WHERE images.id = metadata.id
;
(this query time : 0.633 s)
(total SQL time  : 0.780 s)

when you  will put a new snapshot, I will intall it and make again all changes but this time, I will write all of them and put them  here..


so don't spend to much time with this problem...

many thanks  !!!!

eric.

Last edited by vimages (2004-11-30 09:33:12)

Offline

 

#4 2004-11-30 09:38:13

vimages
Member
2004-03-27
2116

Re: BSF_20041126 .... about iptc sinchro in DB and search function

as an exemple, with a picture from the folder I show up on the topic, in PWG metadata tools I have this :


IPTC Fields in sample.jpg

2#000 = 
2#010 = 5
2#025 = 2004
2#040 = N'utiliser qu'avec autorisation de l'agence V'IMAGES et ne pas oublier la signature des photos !!!
2#055 = 20041121
2#080 = ©V-IMAGES/Fabre
2#090 = Val Thorens
2#101 = France
2#110 = V'IMAGES2004/E.Fabre
2#116 = contact : agence@v-images.com
2#120 = Trophée Andros 2004/2005

maybe I will use this, I'not sure yet.. I seaching the best way....

Offline

 

#5 2004-11-30 09:43:54

vimages
Member
2004-03-27
2116

Re: BSF_20041126 .... about iptc sinchro in DB and search function

Choubs,

ok for this !!

setting display EXIF OFF would do the same...

but yes, of course, I've synchronised all...

thanks.

I HAVE CHANGED ALL TODAY....

it realy better....

have a look (same folder for the exemple)
I conserve all link in the displayed metadata under the pictures and the search link is ok !!!!!!!!!!!

I think I made a mistake yesterday...

Last edited by vimages (2004-11-30 12:26:41)

Offline

 

#6 2004-11-30 12:34:32

vimages
Member
2004-03-27
2116

Re: BSF_20041126 .... about iptc sinchro in DB and search function

here are the todays changes

1)Change category page and create new links to open new windows

    a) in « category.tpl » change place of the logo on the top of the menu.

        cut and put :
<div style="padding:3px;"><img src="template/default/images/logo.jpg"></div>
        after : 
<td valign="top" style="padding:0px 10px 0px 10px;width:1%;">
        <div class="table1">
       

    b) put a new next and previous link on the top of the thumbnails.

        Duplicate :
                                  <!-- BEGIN cat_infos -->
              <!-- BEGIN navigation -->
              <div class="navigationBar">{cat_infos.navigation.NAV_BAR}</div>
              <!-- END navigation -->
              <!-- BEGIN comment -->
              <div class="info">{cat_infos.comment.COMMENTS}</div>
              <!-- END comment -->
              <!-- END cat_infos -->

          and copy it under : <!-- END calendar -->
   
    c)  put under the new logo line (with you own links and url name !!!) :

  <!-- ajout fenetre-->
         <div class="titreMenu">AGENCE V'IMAGES</div>
         <div class="menu"> <a href="#" onClick="MM_openBrWindow       ('.../annexes/contact.htm','contact','width=240,height=360')" >contact</a><br>
          <a href="#" onClick="MM_openBrWindow('.../annexes/news.htm','news','width=300,height=400')" >news</a><br>
          <a href="#" onClick="MM_openBrWindow('.../annexes/infos.htm','infos','width=390,height=390')" >services</a><br>
          <a href="../abonnes/index.php" target="_blank">galerie privée - private
          gallery</a><br>
        </div>
        <!-- /fin d'ajout -->

     d) write in « script.js » :

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


2)change display of picture page.. IPTC... and others..
you will choose on admin setting :  use only iptc, show only iptc.


a) in « config.inc.php »

put this setting to reduce slideshow time :
line 64 : $conf['slideshow_period'] = 3;

put this setting to have more pictures displayed on specials cat. :
line 79 : $conf['top_number'] = 30;

put this setting to change mapping and display of metedata (according to the IPTC  fields I want)
line 96 and following :

// To know how to associated iptc_field with their meaning, use
// tools/metadata.php
$conf['show_iptc_mapping'] = array(
  );

// use_iptc_mapping : in which IPTC fields will PhpWebGallery find image
// information ? This setting is used during metadata synchronisation. It
// associates a phpwebgallery_images column name to a IPTC key
$conf['use_iptc_mapping'] = array(
  'keywords'          => '2#025',
  'date_creation'   => '2#055',
  'author'               => '2#110',
  'name'                => '2#005',
  'comment'          => '2#120'
  );

b) to erase the info button :

erase in « picture.tpl » :

<div class="imgMenu" id="left">
  <a href="{U_METADATA}" title="{L_PICTURE_METADATA}">
    <img src="template/default/theme/metadata.gif" alt="{L_PICTURE_METADATA}" />
  </a>
</div>

c) you erase metadata titles under the picure :

erase : in « picture.tpl »

  <!-- BEGIN headline -->
    <tr>
      <th colspan="2">{metadata.headline.TITLE}</th>
    </tr>
<!-- END headline -->


       d) so, you have to show anytime the metadata under the pictures :

in « picture.php »

line 424 change to « true »

$metadata_showable = true;

line 776 change :

if ($metadata_showable and isset($_GET['show_metadata']))
{
  include_once(PHPWG_ROOT_PATH.'/include/functions_metadata.inc.php');
to :
if ($metadata_showable )
{
  include_once(PHPWG_ROOT_PATH.'/include/functions_metadata.inc.php');


line 429 change :

if ($metadata_showable and !isset($_GET['show_metadata']))
by :
if ($metadata_showable)


           

d) to make a good display,  erase the lines includes between <--infos lines--> and <-- metadata lines--->  to replace them by the following ones , write them in line 78 :

<!-- BEGIN metadata -->
            <table style="margin:auto;margin-top:5px;margin-bottom:5px;">
            <!-- BEGIN headline -->
            <!-- END headline -->
            <!-- BEGIN line -->
            <tr>
              <td class="infos_metadata">{metadata.line.KEY}</td>
              <td class="infos_metadata">{metadata.line.VALUE}</td>
            </tr>
            <!-- END line -->
          <!-- END metadata -->
      <!-- BEGIN info_line -->
      <tr>
         <td class="infos_metadata">{info_line.INFO} : </td>
         <td class="infos_metadata">{info_line.VALUE}</td>
      </tr>
      <!-- END info_line -->
  </table>


e) create the style in « defaut.css » :

.infos_metadata {
  text-align:left;
  font-size:10px;
}

f)

Offline

 
  •  » Beta testing
  •  » BSF_20041126 .... about iptc sinchro in DB and search function

Board footer

Powered by FluxBB