Photo Summary Photo Summary
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Photo Summary

Started by François Keller, November 11, 2006, 05:05:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

François Keller

Photo Summary:Displaying an file index page

original MOD by fotofreek http://forum.coppermine-gallery.net/index.php?topic=4419.0
this plugin add a new menu button to open an index page

INSTALL:
unzip package to plugins folder and use plugin manager to install it

Here's what the plugin does:
It adds a menu item to Coppermine's menu (next to the login/logout link) labelled "Photo Summary". If a user clicks on it, he'll be sent to a page that contains a list of all albums and all pics that reside in it (in a sort of table).
The links are clickable and will send you directly to the pics you have. When you hover your mouse pointer over one of the links that point to the individual files, a small pop-up will be displayed that contains the thumbnail and the image title and dsecription.
See attached screenshot.

   
CAUTION:
to work properly, your pictures must minimum have a title. If not, you can use "Updates titles from filename" feature from Admin utilities.
New version 2.0
see next post for details

LANGUAGE:
english.php and french.php are avaible in the package. You can translate in your language
*Italian.php file added (thank's Angeldevil)
*Dutch.php file added (thank's Hein)
*german.php file added (thank's AlexL)
*little correction in english file (thank's alexL for repporting)
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

François Keller

#1
New version 2.0

in this new version, the titles of the images are posted in column in order to gain place.
By default rownumber is set on 3 but you can change this in the summary.php file by changin $rownumber
A preview feature has been added to this plugin:
a css popup window with thumbnail preview, description and keywords is displayed when you pass with the mouse over the title (great thank's to Wirewolf for his code  ;))

You can see the plugin in action  here
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

angeldevil

Quote from: Frantz on December 23, 2006, 05:19:07 PM
New version 2.0

in this new version, the titles of the images are posted in column in order to gain place.
By default rownumber is set on 3 but you can change this in the summary.php file by changin $rownumber
A preview feature has been added to this plugin:
a css popup window with thumbnail preview, description and keywords is displayed when you pass with the mouse over the title (great thank's to Wirewolf for his code  ;))

You can see the plugin in action  here

Great work for me!! many tnx!
a

François Keller

QuoteGreat work for me!! many tnx!

Thank's angeldevil  :)
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

angeldevil

A little question for you: how to display the pic poster name  instead of keywords in thumb preview?

Many tnx in advance

Sorry for my poor english   :-[
a

François Keller

in summary.php change (line 38)
$result = cpg_db_query("SELECT a.pid, a.aid, a.title, a.caption, a.keywords, a.filepath, a.filename, b.title atitle from {$CONFIG['TABLE_PICTURES']} a, {$CONFIG['TABLE_ALBUMS']} b where a.aid = b.aid $album_filter order by a.aid, a.pid desc");
with
$result = cpg_db_query("SELECT a.pid, a.aid, a.title, a.caption, a.keywords,a.owner_name, a.filepath, a.filename, b.title atitle from {$CONFIG['TABLE_PICTURES']} a, {$CONFIG['TABLE_ALBUMS']} b where a.aid = b.aid $album_filter order by a.aid, a.pid desc");
replace (line 59-61 and 67-69)
echo "<span><img border=\"1\" src=\"albums/$row[filepath]thumb_$row[filename]\" alt=\"$row[title]\" title=\"$row[title]{$lang_plugin_photo_summary['click_view']}\"  />";
            echo "<br /><b>{$lang_plugin_photo_summary[pic_caption]}</b>: {$row[caption]}<br />";
            echo "<b>{$lang_plugin_photo_summary[keywords]}</b>: {$row[keywords]}</span></a></td>";

with
echo "<span><img border=\"1\" src=\"albums/$row[filepath]thumb_$row[filename]\" alt=\"$row[title]\" title=\"$row[title]{$lang_plugin_photo_summary['click_view']}\"  />";
            echo "<br /><b>{$lang_plugin_photo_summary[pic_caption]}</b>: {$row[caption]}<br />";
            echo "<b>{$lang_plugin_photo_summary[owner_name]}</b>: {$row[owner_name]}</span></a></td>";

In your lang file add
'owner_name' => 'Pic Poster',(you can change "Pic Poster" with another word)
just before
);
?>
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

angeldevil

Hi Frantz, I've tryed your modification but works in the first column only  ???
whats wrong?
a

François Keller

QuoteHi Frantz, I've tryed your modification but works in the first column only

look the code, you must change the code twice: line 59 and line 67
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

angeldevil

Yes, I've changed:

pageheader($lang_plugin_photo_summary['name']);
$album_filter = '';
if($FORBIDDEN_SET){
$album_filter = ' and ' . str_replace('p.', 'a.', $FORBIDDEN_SET);
}
$result = cpg_db_query("SELECT a.pid, a.aid, a.title, a.caption, a.keywords,a.owner_name, a.filepath, a.filename, b.title atitle from {$CONFIG['TABLE_PICTURES']} a, {$CONFIG['TABLE_ALBUMS']} b where a.aid = b.aid $album_filter order by a.aid, a.pid desc");

if (!mysql_num_rows($result)) cpg_die(ERROR, $lang_errors['non_exist_ap']);

$p_aid = -1 ;
$i=0;
// Result to table
starttable("100%", $lang_plugin_photo_summary['name'], $rownumber);

   while ($row = mysql_fetch_array($result))
        {
                if ($row[aid] != $p_aid) {
                  // Display Album title
                  $atitle=$lang_plugin_photo_summary['pic_title']."<i>".$row['atitle']."</i>";
                  echo "<tr><td class=\"tableh2\" colspan = \"$rownumber\"><b>$atitle</b> {$lang_plugin_photo_summary[click_image]}</td></tr>" ;
            }
            //Display picture title
            if ($i==0){
            echo "<tr>";
            echo "<td><a href=\"displayimage.php?pos=-$row[pid]\" title=\"$row[title]\"class=\"summary\">$row[title]";//display file title
            //css popup contain
            echo "<span><img border=\"1\" src=\"albums/$row[filepath]thumb_$row[filename]\" alt=\"$row[title]\" title=\"$row[title]{$lang_plugin_photo_summary['click_view']}\"  />";
            echo "<br /><b>{$lang_plugin_photo_summary[owner_name]}</b>: {$row[owner_name]}<br />";
            echo "<b>{$lang_plugin_photo_summary[pic_caption]}</b>: {$row[caption]}</span></a></td>";
            $i++;
            }
            else{
            echo "<td><a href=\"displayimage.php?pos=-$row[pid]\" title=\"$row[title]\"class=\"summary\">$row[title]";//display file title
            //css popup contain
            echo "<span><img border=\"1\" src=\"albums/$row[filepath]thumb_$row[filename]\" alt=\"$row[title]\" title=\"$row[title]{$lang_plugin_photo_summary['click_view']}\"  />";
            echo "<br /><b>{$lang_plugin_photo_summary[pic_caption]}</b>: {$row[caption]}<br />";
            echo "<b>{$lang_plugin_photo_summary[keywords]}</b>: {$row[keywords]}</span></a></td>";
            $i++;
            if ($i==$rownumber){
            echo "</tr>";
            $i=0;}
            }
       $p_aid = $row[aid] ;
    } ; // while   
endtable(); 
pagefooter();
mysql_free_result($result);

ob_end_flush();
?>


like your suggestion
a

François Keller

No your code is not good,
try this (replace all code in summary.php):
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2005 Coppermine Dev Team
  v1.1 originaly written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.8
  $Source: /cvsroot/cpg-contrib/master_template/codebase.php,v $
  $Revision: 1.3 $
  $Author: donnoman $
  $Date: 2005/12/08 05:46:49 $
**********************************************/
/*************************
fotofreek's mod addapted by Frantz for Coppermine photo_summary plugin
adding image preview with wirefolf css popup window
**************************/

require('include/init.inc.php');
require (
'plugins/photo_summary/include/init.inc.php');
echo 
"<link rel=\"stylesheet\" type=\"text/css\" href=\"plugins/photo_summary/summary_css.php\">\n";
/***************************
$rownumber will set the row number of picture title to display, 
change this value according your theme or yout wishes (default 3 rows)
***************************/
$rownumber=3;
/*************************/
pageheader($lang_plugin_photo_summary['name']);
$album_filter '';
if(
$FORBIDDEN_SET){
$album_filter ' and ' str_replace('p.''a.'$FORBIDDEN_SET);
}
$result cpg_db_query("SELECT a.pid, a.aid, a.title, a.caption,a.owner_name, a.keywords, a.filepath, a.filename, b.title atitle from {$CONFIG['TABLE_PICTURES']} a, {$CONFIG['TABLE_ALBUMS']} b where a.aid = b.aid $album_filter order by a.aid, a.pid desc");

if (!
mysql_num_rows($result)) cpg_die(ERROR$lang_errors['non_exist_ap']);

$p_aid = -;
$i=0;
// Result to table
starttable("100%"$lang_plugin_photo_summary['name'], $rownumber);

   while (
$row mysql_fetch_array($result)) 
        { 
                if (
$row[aid] != $p_aid) {
                  
// Display Album title
                  
$atitle=$lang_plugin_photo_summary['pic_title']."<i>".$row['atitle']."</i>";
                  echo 
"<tr><td class=\"tableh2\" colspan = \"$rownumber\"><b>$atitle</b> {$lang_plugin_photo_summary[click_image]}</td></tr>" ;
            }
            
//Display picture title
            
if ($i==0){
            
echo "<tr>";
            echo 
"<td><a href=\"displayimage.php?pos=-$row[pid]\" title=\"$row[title]\"class=\"summary\">$row[title]";//display file title
            //css popup contain
           
echo "<span><img border=\"1\" src=\"albums/$row[filepath]thumb_$row[filename]\" alt=\"$row[title]\" title=\"$row[title]{$lang_plugin_photo_summary['click_view']}\"  />";
            echo 
"<br /><b>{$lang_plugin_photo_summary[pic_caption]}</b>: {$row[caption]}<br />";
            echo 
"<b>{$lang_plugin_photo_summary[owner_name]}</b>: {$row[owner_name]}</span></a></td>";
            
$i++;
            }
            else{
            echo 
"<td><a href=\"displayimage.php?pos=-$row[pid]\" title=\"$row[title]\"class=\"summary\">$row[title]";//display file title
            //css popup contain
            
echo "<span><img border=\"1\" src=\"albums/$row[filepath]thumb_$row[filename]\" alt=\"$row[title]\" title=\"$row[title]{$lang_plugin_photo_summary['click_view']}\"  />";
            echo 
"<br /><b>{$lang_plugin_photo_summary[pic_caption]}</b>: {$row[caption]}<br />";
            echo 
"<b>{$lang_plugin_photo_summary[owner_name]}</b>: {$row[owner_name]}</span></a></td>";
            
$i++;
            if (
$i==$rownumber){
            
echo "</tr>";
            
$i=0;}
            }
       
$p_aid $row[aid] ;
    } ; 
// while    
endtable();  
pagefooter();
mysql_free_result($result);

ob_end_flush();
?>
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

angeldevil

Many thanks Frantz! now all works fine!  :D
a

François Keller

Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

angeldevil

Hi Frantz, I've traslated your plugin in italian language
a

François Keller

Hi Angeldevil,

Thank's for your contribution, I add your language file in the pack in the first post
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Hein Traag

Again.. nice work!

Dutch.php attached.

Greets
Hein

François Keller

Again... Thank's Hein :D

Your lang file is added in the pack
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

AlexL

Hello Frantz

German Lang File attached

Maybe in english File the owner_name missing?

Greetings AlexL

François Keller

Thank's AlexL, your fil is added in the pack
QuoteMaybe in english File the owner_name missing?
You're right, corrected
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Joachim Müller

Only today I realized what this Plugin actually does. I suggest reviewing the initial posting and adding some more descriptive text.

Here's what the plugin does:
It adds a menu item to Coppermine's menu (next to the login/logout link) labelled "Photo Summary". If a user clicks on it, he'll be sent to a page that contains a list of all albums and all pics that reside in it (in a sort of table).
The links are clickable and will send you directly to the pics you have. When you hover your mouse pointer over one of the links that point to the individual files, a small pop-up will be displayed that contains the thumbnail and the image title and dsecription.
See attached screenshot.

Missing feature:
If the image description contains bbcode, the code will show through on the mouse-over. The output should be sent through the corresponding function first.

François Keller

QuoteOnly today I realized what this Plugin actually does. I suggest reviewing the initial posting and adding some more descriptive text.
Yes your right, i'll do that and add your description text in the first post
QuoteMissing feature:
If the image description contains bbcode, the code will show through on the mouse-over. The output should be sent through the corresponding function first.
euh sorry, but i don't know how to do this, my codding knowledge are to limited  :-\
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog