Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2   Go Down

Author Topic: Photo Summary  (Read 42109 times)

0 Members and 1 Guest are viewing this topic.

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Photo Summary
« on: November 11, 2006, 05:05:10 pm »

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)
« Last Edit: July 23, 2007, 05:52:07 pm by Frantz »
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Photo Summary
« Reply #1 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
« Last Edit: January 19, 2007, 05:41:28 pm by Frantz »
Logged
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

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 107
Re: Photo Summary
« Reply #2 on: January 06, 2007, 11:22:59 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!
Logged
a

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Photo Summary
« Reply #3 on: January 07, 2007, 07:57:15 am »

Quote
Great work for me!! many tnx!

Thank's angeldevil  :)
Logged
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

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 107
Re: Photo Summary
« Reply #4 on: January 07, 2007, 05:49:50 pm »

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   :-[
Logged
a

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Photo Summary
« Reply #5 on: January 07, 2007, 06:36:59 pm »

in summary.php change (line 38)
Code: [Select]
$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
Code: [Select]
$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)
Code: [Select]
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
Code: [Select]
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
Code: [Select]
'owner_name' => 'Pic Poster',(you can change "Pic Poster" with another word)
just before
Code: [Select]
);
?>
Logged
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

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 107
Re: Photo Summary
« Reply #6 on: January 08, 2007, 03:19:47 pm »

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

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Photo Summary
« Reply #7 on: January 08, 2007, 04:00:19 pm »

Quote
Hi 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
Logged
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

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 107
Re: Photo Summary
« Reply #8 on: January 08, 2007, 07:13:40 pm »

Yes, I've changed:

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

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Photo Summary
« Reply #9 on: January 09, 2007, 07:27:39 am »

No your code is not good,
try this (replace all code in summary.php):
Code: [Select]
<?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();
?>
Logged
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

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 107
Re: Photo Summary
« Reply #10 on: January 09, 2007, 11:17:47 am »

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

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Photo Summary
« Reply #11 on: January 09, 2007, 11:49:14 am »

No Problem,  ;)

Logged
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

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 107
Re: Photo Summary
« Reply #12 on: January 19, 2007, 10:15:09 am »

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

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Photo Summary
« Reply #13 on: January 19, 2007, 05:26:44 pm »

Hi Angeldevil,

Thank's for your contribution, I add your language file in the pack in the first post
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Photo Summary
« Reply #14 on: February 11, 2007, 05:12:40 pm »

Again.. nice work!

Dutch.php attached.

Greets
Hein
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Photo Summary
« Reply #15 on: February 11, 2007, 06:13:19 pm »

Again... Thank's Hein :D

Your lang file is added in the pack
Logged
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

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 189
    • Velvet Photos
Re: Photo Summary
« Reply #16 on: February 14, 2007, 04:16:18 pm »

Hello Frantz

German Lang File attached

Maybe in english File the owner_name missing?

Greetings AlexL
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Photo Summary
« Reply #17 on: February 14, 2007, 08:27:36 pm »

Thank's AlexL, your fil is added in the pack
Quote
Maybe in english File the owner_name missing?
You're right, corrected
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Photo Summary
« Reply #18 on: July 23, 2007, 02:29:50 pm »

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.
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Photo Summary
« Reply #19 on: July 23, 2007, 05:40:56 pm »

Quote
Only 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
Quote
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.
euh sorry, but i don't know how to do this, my codding knowledge are to limited  :-\
Logged
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
Pages: [1] 2   Go Up
 

Page created in 0.025 seconds with 22 queries.