François Keller 
Dev Team member
   
Gender:
 France
Posts: 7369
aka Frantz
|
 |
« 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.0this 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.0see 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, 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 
Dev Team member
   
Gender:
 France
Posts: 7369
aka Frantz
|
 |
« Reply #1 on: December 23, 2006, 04:19:07 pm » |
|
New version 2.0in 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 $rownumberA 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, 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: 
Posts: 107
|
 |
« Reply #2 on: January 06, 2007, 10:22:59 pm » |
|
New version 2.0in 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 $rownumberA 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
   
Gender:
 France
Posts: 7369
aka Frantz
|
 |
« Reply #3 on: January 07, 2007, 06:57:15 am » |
|
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
 
Gender: 
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 
|
|
|
|
|
Logged
|
a
|
|
|
François Keller 
Dev Team member
   
Gender:
 France
Posts: 7369
aka Frantz
|
 |
« Reply #5 on: January 07, 2007, 05:36:59 pm » |
|
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 ); ?>
|
|
|
|
|
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: 
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  whats wrong?
|
|
|
|
|
Logged
|
a
|
|
|
François Keller 
Dev Team member
   
Gender:
 France
Posts: 7369
aka Frantz
|
 |
« Reply #7 on: January 08, 2007, 03:00:19 pm » |
|
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: 
Posts: 107
|
 |
« Reply #8 on: January 08, 2007, 06:13:40 pm » |
|
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
|
|
|
|
|
Logged
|
a
|
|
|
François Keller 
Dev Team member
   
Gender:
 France
Posts: 7369
aka Frantz
|
 |
« Reply #9 on: January 09, 2007, 06:27:39 am » |
|
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 = -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[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: 
Posts: 107
|
 |
« Reply #10 on: January 09, 2007, 10:17:47 am » |
|
Many thanks Frantz! now all works fine! 
|
|
|
|
|
Logged
|
a
|
|
|
François Keller 
Dev Team member
   
Gender:
 France
Posts: 7369
aka Frantz
|
 |
« Reply #11 on: January 09, 2007, 10: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
 
Gender: 
Posts: 107
|
 |
« Reply #12 on: January 19, 2007, 09:15:09 am » |
|
Hi Frantz, I've traslated your plugin in italian language
|
|
|
|
Logged
|
a
|
|
|
François Keller 
Dev Team member
   
Gender:
 France
Posts: 7369
aka Frantz
|
 |
« 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:
 Netherlands
Posts: 2153
A, B, Cpg
|
 |
« Reply #14 on: February 11, 2007, 04:12:40 pm » |
|
Again.. nice work!
Dutch.php attached.
Greets Hein
|
|
|
|
Logged
|
|
|
|
François Keller 
Dev Team member
   
Gender:
 France
Posts: 7369
aka Frantz
|
 |
« Reply #15 on: February 11, 2007, 05:13:19 pm » |
|
Again... Thank's Hein  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:
 Germany
Posts: 177
|
 |
« 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
|
|
|
|
Logged
|
|
|
|
François Keller 
Dev Team member
   
Gender:
 France
Posts: 7369
aka Frantz
|
 |
« Reply #17 on: February 14, 2007, 07:27:36 pm » |
|
Thank's AlexL, your fil is added in the pack 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
|
 |
« 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.
|
|
|
|
Logged
|
|
|
|
François Keller 
Dev Team member
   
Gender:
 France
Posts: 7369
aka Frantz
|
 |
« Reply #19 on: July 23, 2007, 04:40:56 pm » |
|
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 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
|
|
|
|