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 (http://f.keller.free.fr/index.php?file=photo_summary/summary)
Great work for me!! many tnx!
$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>";
withecho "<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));
?>
Hi Frantz, I've tryed your modification but works in the first column only
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();
?>
<?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();
?>
Maybe in english File the owner_name missing?You're right, corrected
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:euh sorry, but i don't know how to do this, my codding knowledge are to limited :-\
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.