Support Forum Project Downloads FAQ Documentation About Demo Tutorials Blog Plugins
November 21, 2009, 02:56:58 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: cpg1.5.2 beta released
The brand new cpg1.5.x series that comes with a lot of new features finally has reached the release stage: a first public beta release cpg1.5.2 has been released that is mainly aimed at translators, testers and community members that have contributed in the past. The beta release is not meant to be used in a production environment, but only on testbeds and for evaluation purposes. There is currently no support for cpg1.5.x yet!
[more]
   Home   Help Search Board rules Login Register  
Pages: [1] 2   Go Down
  Send this topic  |  Print  
Author Topic: Photo Summary  (Read 11384 times)
0 Members and 1 Guest are viewing this topic.
François Keller Topic starter
Dev Team member
****
Gender: Male
France France

Posts: 7369


aka Frantz


WWW
« on: November 11, 2006, 04: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)

* photo_summary.zip (5.73 KB - downloaded 241 times.)
* photo_summary_2_0.zip (11.71 KB - downloaded 324 times.)

* photo_summary.jpg (78.44 KB, 800x421 - viewed 938 times.)
« Last Edit: July 23, 2007, 04: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 Topic starter
Dev Team member
****
Gender: Male
France France

Posts: 7369


aka Frantz


WWW
« Reply #1 on: December 23, 2006, 04: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  Wink)

You can see the plugin in action  here
« Last Edit: January 19, 2007, 04: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
**
Gender: Male
Posts: 107



« Reply #2 on: January 06, 2007, 10: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  Wink)

You can see the plugin in action  here

Great work for me!! many tnx!
Logged

a
François Keller Topic starter
Dev Team member
****
Gender: Male
France France

Posts: 7369


aka Frantz


WWW
« Reply #3 on: January 07, 2007, 06:57:15 am »

Quote
Great work for me!! many tnx!

Thank's angeldevil  Smiley
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
**
Gender: Male
Posts: 107



« Reply #4 on: January 07, 2007, 04: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   Embarrassed
Logged

a
François Keller Topic starter
Dev Team member
****
Gender: Male
France France

Posts: 7369


aka Frantz


WWW
« Reply #5 on: January 07, 2007, 05:36:59 pm »

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



« Reply #6 on: January 08, 2007, 02:19:47 pm »

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

a
François Keller Topic starter
Dev Team member
****
Gender: Male
France France

Posts: 7369


aka Frantz


WWW
« Reply #7 on: January 08, 2007, 03: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
**
Gender: Male
Posts: 107



« Reply #8 on: January 08, 2007, 06:13:40 pm »

Yes, I've changed:

Code:
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 Topic starter
Dev Team member
****
Gender: Male
France France

Posts: 7369


aka Frantz


WWW
« Reply #9 on: January 09, 2007, 06:27:39 am »

No your code is not good,
try this (replace all code in summary.php):
Code:
<?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
**
Gender: Male
Posts: 107



« Reply #10 on: January 09, 2007, 10:17:47 am »

Many thanks Frantz! now all works fine!  Cheesy
Logged

a
François Keller Topic starter
Dev Team member
****
Gender: Male
France France

Posts: 7369


aka Frantz


WWW
« Reply #11 on: January 09, 2007, 10:49:14 am »

No Problem,  Wink

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
**
Gender: Male
Posts: 107



« Reply #12 on: January 19, 2007, 09:15:09 am »

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

* italian.zip (0.79 KB - downloaded 159 times.)
Logged

a
François Keller Topic starter
Dev Team member
****
Gender: Male
France France

Posts: 7369


aka Frantz


WWW
« Reply #13 on: January 19, 2007, 04: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
****
Gender: Male
Netherlands Netherlands

Posts: 2153


A, B, Cpg


WWW
« Reply #14 on: February 11, 2007, 04:12:40 pm »

Again.. nice work!

Dutch.php attached.

Greets
Hein

* dutch.zip (0.78 KB - downloaded 165 times.)
Logged

François Keller Topic starter
Dev Team member
****
Gender: Male
France France

Posts: 7369


aka Frantz


WWW
« Reply #15 on: February 11, 2007, 05:13:19 pm »

Again... Thank's Hein Cheesy

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
**
Gender: Male
Germany Germany

Posts: 177



WWW
« Reply #16 on: February 14, 2007, 03:16:18 pm »

Hello Frantz

German Lang File attached

Maybe in english File the owner_name missing?

Greetings AlexL

* german.zip (0.83 KB - downloaded 172 times.)
Logged
François Keller Topic starter
Dev Team member
****
Gender: Male
France France

Posts: 7369


aka Frantz


WWW
« Reply #17 on: February 14, 2007, 07: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
Administrator
*****
Gender: Male
Germany Germany

Posts: 45051


aka "GauGau"


WWW
« Reply #18 on: July 23, 2007, 01: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.


* photo_summary.jpg (68.28 KB, 800x421 - viewed 310 times.)
Logged
François Keller Topic starter
Dev Team member
****
Gender: Male
France France

Posts: 7369


aka Frantz


WWW
« Reply #19 on: July 23, 2007, 04: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  Undecided
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
  Send this topic  |  Print  
 
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.112 seconds with 17 queries.