if($matches[1] != 'updatehistory') {
if($matches[1] != 'updatehistory' || !GALLERY_ADMIN_MODE) {
if($matches[1] != 'updatehistory') {
if($matches[1] != 'updatehistory' || !USER_ID) {
echo '<tr><td class="tableb">' .$date. ": $number". $lang_plugin_update_history['new_files'].(($number > 1) ? 's' : '').$lang_plugin_update_history['update_file']."<a href=\"thumbnails.php?album={$album_info['aid']}\">$album</a>".$lang_plugin_update_history['by'] ;
[code] echo '<tr><td class="tableb">' .$date. ": $number". $lang_plugin_update_history['new_files'].(($number > 1) ? '(en)' : '').$lang_plugin_update_history['update_file']."<a href=\"thumbnails.php?album={$album_info['aid']}\">$album</a>".$lang_plugin_update_history['by'] ;
[/code]Hein,
Yes it' seems to be possible. I'll look at this when i find time.
Thank's for your contribution foe dutch lang file (will be added to the pack)
if ($u > 0) $links[] = "<a href=\"profile.php?uid=$u\">". get_username($u) ."</a>";
if ($u > 0) $links[] = $lang_plugin_update_history['by']."<a href=\"profile.php?uid=$u\">". get_username($u) ."</a>";
I have one question, is there a chance to change the mod in that way, that it is only shown on the index page?I don't understant what you mean. The update history box is only shown on the index page. ???
GLOBAL $CONFIG, $matches;
replace withGLOBAL $CONFIG, $matches,$cat;
if($matches[1] != 'updatehistory'{
replace withif($matches[1] != 'updatehistory'|| !$cat==0 ) {
Parse error: syntax error, unexpected T_STRING in /kill-9.be/users/hop/public_html/cpg/plugins/update_history/codebase.php on line 101
Hein,
attach your codebase.php file
if ($u > 0) $links[] = ".(USER_ID ? "<a href=\"profile.php?uid=$u\">" : '') . get_username($u) .(USER_ID ? "</a>" : '');
what do you want to display with this ? I don't understant your code :-\if ($u > 0) $links[] = $lang_plugin_update_history['by']."<a href=\"profile.php?uid=$u\">". get_username($u) ."</a>";
foreach ($counter as $day) {
foreach ($day as $album => $number) {
$date = $test[$i];
$album_info = $info[$date][$album];
echo '<tr><td class="tableb">' .$date. ": $number". $lang_plugin_update_history['new_files'].(($number > 1) ? '(en)' : '').$lang_plugin_update_history['update_file']."<a href=\"thumbnails.php?album={$album_info['aid']}\">$album</a>".$lang_plugin_update_history['by'] ;
$links = array();
foreach ($users[$date][$album] as $u) {
if ($u > 0) $links[] = ".(USER_ID ? "<a href=\"profile.php?uid=$u\">" : '') . get_username($u) .(USER_ID ? "</a>" : '');
}
$out = array_unique($links);
echo implode(', ',$out);
echo "</td></tr>";
}
$i++;
}
withforeach ($counter as $day) {
foreach ($day as $album => $number) {
$date = $test[$i];
$album_info = $info[$date][$album];
echo '<tr><td class="tableb">' .$date. ": $number". $lang_plugin_update_history['new_files'].(($number > 1) ? 's' : '').$lang_plugin_update_history['update_file']."<a href=\"thumbnails.php?album={$album_info['aid']}\">$album</a>" ;
$links = array();
foreach ($users[$date][$album] as $u) {
//if (USER_ID){ //uncoment this line if you don't want to show uploader name to unregistred users
if ($u > 0) $links[] = $lang_plugin_update_history['by']."<a href=\"profile.php?uid=$u\">". get_username($u) ."</a>";
}
//}//uncoment this line if you don't want to show uploader name to unregistred users
$out = array_unique($links);
echo implode(', ',$out);
echo "</td></tr>";
}
$i++;
}
;D Thanks Frantz, it's exactly like i wanted it. Hopefully others will see it as a benefit as wel.:D
New dutch.php zipped and attached to this post.
Hein
The from... is shown doubly on my site "von von Username" There is only one "von" in the lang file. The other come from Coppermine self.Ok, it's a typo error (I made a modif in the code and the 'by' was shown twice) :-\
if ($number == 1) {
echo '<tr><td class="tableb">' .$date. ": $number". $lang_plugin_update_history['new']."<a href=\"thumbnails.php?album={$album_info['aid']}\">$album</a>".$lang_plugin_update_history['by'] ;
} else {
echo '<tr><td class="tableb">' .$date. ": $number". $lang_plugin_update_history['news']."<a href=\"thumbnails.php?album={$album_info['aid']}\">$album</a>" ;
}
withif ($number == 1) {
echo '<tr><td class="tableb">' .$date. ": $number". $lang_plugin_update_history['new']."<a href=\"thumbnails.php?album={$album_info['aid']}\">$album</a>" ;
} else {
echo '<tr><td class="tableb">' .$date. ": $number". $lang_plugin_update_history['news']."<a href=\"thumbnails.php?album={$album_info['aid']}\">$album</a>" ;
}
1st On the Mainpage of Galerie to show more than a 4 day historie as default - to configure for admin in a settings dialog for the PlugIn. Instead of editing the codebase.phpeven asked by Jujuv on the french board. It's on my todo list (but need a deep modif in this plugin by adding a database table to store the settings)
the last 5 updates instead a 4 day historyThe more I think about - so I think this is the best way. Because in the hole world are thousands coppermine gallerys and any of this has hundred users - this makes many entries only on one day - this breack open every layout. And instead to have a dynamic list with hundreds entries, it's nice to have this 5 or 10 entries,and the layout is under control.
what is to display on the archive pageand what is to display on the main page
a quick solution... it can be usefull...Yes, of cource!
for the 2.0 versionI can already smell it ;D - you too?
Version 2.0 in work@ Frantz - If you need changed german.php and liesmich.txt feel free to PM me
$FORBIDDEN_SET needs to be added to the globalsOk i'll note this thank's
If you need changed german.php and liesmich.txt feel free to PM meOk, i PM you before posting the 2.0 version ;)
Is there a way to add a little thumbnail before the text parts ?what do you mean ?
Which would make it a good replacement for the lastup sectionYes but not sure that will be usefull :-\
Although a thumbnail added like suggested by JohannM stil sounds very slick GrimaçantOk, Ok, wy not a popup thumbnail on mouse over ? ;)
Uninstall and reinstall update history so that all goes back in the order.How to do this?
But no Config button to found in Admin Toolbar for update historyIt's normal, admin button is diplayed in the block title from the plugin when logged as admin. (see screeshot attached)
After uninstall with or without save settingstable - is there no way to reinstall the V2in the plugin table from the database, erase the updatehistory entry
After uninstall with or without save settingstable - is there no way to reinstall the V2OK I'll try this - but you should fix it in V2 Final
in the plugin table from the database, erase the updatehistory entry
DROP TABLE IF EXISTS `cpg132_update_history_config`;
CREATE TABLE `cpg132_update_history_config` ( `Group_Id` varchar(40) NOT NULL default '', `bloc` varchar(255) NOT NULL default '', `archive` varchar(255) NOT NULL default '', `uploader_name` varchar(255) NOT NULL default '', `days` varchar(255) NOT NULL default '', `number` varchar(255) NOT NULL default '', PRIMARY KEY (`Group_Id`) ) TYPE=MyISAM;
INSERT INTO `cpg132_update_history_config` VALUES('1','1','1','1','1','4');
INSERT INTO `cpg132_update_history_config` VALUES('2','1','1','1','1','4');
INSERT INTO `cpg132_update_history_config` VALUES('3','1','0','0','1','4');
INSERT INTO `cpg132_update_history_config` VALUES('4','0','0','0','1','4');
Februar 24, 2007: 21 new files added to the album Folklorum 2003second:last 4 uploaded files
Februar 24, 2007: 2 new files added to the album 10.09.1998 Steeg
Februar 24, 2007: PICT0502.jpg added in the album Folklorum 2003And I miss the
Februar 24, 2007: PICT0496.jpg added in the album Folklorum 2003
Februar 24, 2007: 21 new files added to the album Folklorum 2003
Februar 24, 2007: 2 new files added to the album 10.09.1998 Steeg
I emptied the update_history_config tableHow to do this? silly question?
first: Uploads from last 4 days - grouped as in this exampleWhat's the difference between first and third way ? I don't understant what you mean :-\
Citation
Februar 24, 2007: 21 new files added to the album Folklorum 2003
Februar 24, 2007: 2 new files added to the album 10.09.1998 Steeg
second:last 4 uploaded files
Citation
Februar 24, 2007: PICT0502.jpg added in the album Folklorum 2003
Februar 24, 2007: PICT0496.jpg added in the album Folklorum 2003
And I miss the
third:the last X Uploads grouped for albums and not every file separately
Citation
Februar 24, 2007: 21 new files added to the album Folklorum 2003
Februar 24, 2007: 2 new files added to the album 10.09.1998 Steeg
How to do this? silly question?
What's the difference between first and third wayOK OK OK - I have cheat to show this first. Have a look at the Date - it's from February - if I take the variant First and take the last 5 days - then the report is empty. That's why i take 100 days. This is the Problem - I need a grouped variant - but not from last X days - because of no need to adjust the days to a valid value.
But I cant reinstall it without PhpMyAdmin - It's high time that I get access to it.Yes i think so ;)
Do you have the same effekt like I in this Screenshot?
To workaround the install-problem - I've delete the folder updatehistory on my server (was V 2.0) and upload the V2.0.1 updatehistory folder on the same position without deinstalling/installing the PlugIn. It works fine for me. (@Frantz - Is this ok? - or you predict problems with this way because of tablechanges?)It's correct, no table change
But a blue outline is shown - mismatch to my design - would be better without an outline)Yes, it's due by the link on the thumbnail. Look in your style.css to change this
I do not get that thumbnail displayed in front of the line which displays how many pictures have been updated where.In the mode updates from last 5 days you cannot see this - it's only (at this time) for mode last 20 files - and then you see the thumb for every file
And, small detail, shouldn't the plugin be named "Update History v2.0.1" in plugin manager ?as the plugin is still in version beta, I did'nt want to change the version number.
I think it's better to take the user chosen album-thumbOk, ok, i'll see if i can do this ;)
Ok, ok, i'll see if i can do thisDavaitje boschalista :D ;D :D
in category <category name>Not possible at this time - but nice if in V 2.0.2 ;)
2nd The line:
Date: new Files added to album ... from ...
This line I need in an other modus
Date: new Files added to categorie,subcategorie,subcategorie,album.
I need this because the album-name in my Galerie is not meaningfully it's only the date and place - the band-name is in the categorie.
1363 new files added to the albumtoo much files for batch add - your server is going to sleep then ;D :D ;D
No Sorry needed - if more users ask for it, it's increases the chance that V2.0.2 can do this. :):D :D :D:D with so many requests, I believe that I will ask to make me pay :D :D :D :D
on testing your Backup Plugin V2.2 I found back the errors from Update HistoryYes i know
If you find time for this - it would be nice if you can correct this two thingson this moment, i did'nt find what the cause for this two errors, but it's on my todo list ;)
06 August 2007 : 32 Neue Dateien hinzugefügt zum Album 3.12.2006 ZwickauThat's not correct - all 23 rows show the date 06 August 2007.
06 August 2007 : 52 Neue Dateien hinzugefügt zum Album 3.12.2006 Zwickau
fixes:
=====
- Compatible with 1.4.12's new plugin api
Maybe your PlugIns need an update to? Maybe this is the reason for my new error with the Update-history-PlugIn date that's wrong shown?Possible, but on this moment, i don't know what to update. I must look the difference between two versions of the captcha plugin...
I Fixed (I hope) a situation in the plugin api that caused bizarre plugin behavior when plugins called underlying plugin api hooks.
Typical results were some plugins running multiple times per hook call, and some not running at all.
Changing the ordering of the plugins could alleviate the problem.
The two plugins that I definately found a problem with is minicms and cpgmark.
If cpgmark was second in the list, minicms content began being added twice, and some cpgmark actions weren't being run.
When I reversed the order minicms stopped duplicating its output, though cpgmark still didn't seem to operate completely.
I tracked it down to a situation where cpgmark was causing hooks to be executed while it's own code was executing. Thus $thisplugin was being moved around under it's nose.
The crux of the problem I found is this (summarized):Code: [Select]// Reference current plugin to local scope
$thisplugin = $CPG_PLUGINS[$plugin_id]; //PHP4 makes a copy, PHP5 would make a reference.
if (function_exists($plugin_function)) {
// Pass the value to the filter's function and get a value back
$value = call_user_func($plugin_function,$value);
// if the user function calls a plugin api hook $thisplugin becomes inconsistent
// Copy back to global scope
$CPG_PLUGINS[$plugin_id] = $thisplugin; //copying this inconsistent $thisplugin is whats creating the problem.
}
To fix the issue I removed the copy back to the global scope and made sure $thisplugin is always copied by reference.
It fixed the issue and I haven't seen any negative effects. The fix has been committed to stable and devel.
The Update History shows on my website the history from last 200 days = 23 rowsSame problem..i think about the 1.4.12 update.
If I take only the last 4 days = 2 rows - it's ok
But It shows That's not correct - all 23 rows show the date 06 August 2007.
Weirdly because I know that this was shown correct different days in the past.
The things I have changed: I tested the Backup PlugIn V2.2 - for this reason I've deinstalled and reinstalled the Update History repeatedly (with deleting db-table per phpmyadmin) and also used your KeywordsAdd PlugIn. And I've updated to Coppermine 1.4.12 on 1.8.2007
The first I've see this error is after Update to 1.4.12, but I've think then it's from Update - because the Update.php has write to db. Therefore I think all dates was reseted to 1.8.2007 - but yesterday I upload new photos and after this the all date is 6.8.2007 - but I don't touch the other photos at this day.
Maybe the db fields changed between 1.4.10 and 1.4.12?
But the selection 4 or 200 days works correctly only the date that's displays is wrong.
// Copy back to global scope
//$CPG_PLUGINS[$plugin_id] = $thisplugin;
to// Copy back to global scope
$CPG_PLUGINS[$plugin_id] = $thisplugin;
as Sami quoted. $day = localised_date($row['ctime'],$plugin_update_history_date_fmt);
//$day = ($day, $lastup_date_fmt);
$counter[$day][$row[album_title]] += 1;
$info[$day][$row[album_title]] = $row;
$users[$day][$row[album_title]][] = $row['owner'];
}
$end = $start;
}
$i = 0;
$test = array_keys($counter);
foreach ($counter as $day) {
foreach ($day as $album => $number) {
$date = $test[$i];
$album_info = $info[$date][$album];
if ($number == 1) {
echo '<tr><td class="tableb">' .$date. ": $number". $lang_plugin_update_history['new']."<a href=\"thumbnails.php?album={$album_info['aid']}\">$album</a>";
} else {
echo '<tr><td class="tableb">' .$date. ": $number". $lang_plugin_update_history['news']."<a href=\"thumbnails.php?album={$album_info['aid']}\">$album</a>" ;
}
$links = array();
foreach ($users[$date][$album] as $u) {
if ($uploader_name==1){ //show the uploader name if $uploader_name set to 1
if ($u > 0) $links[] = $lang_plugin_update_history['by']."<a href=\"profile.php?uid=$u\">". get_username($u) ."</a>";
}
}
}
$out = array_unique($links);
echo implode(', ',$out);
echo "</td></tr>";
}
$i++;
}else{
//otheerway Show n last uploaded files according settings
to be in bond with the changes of versionHave you tested with a clean 1.4.10 and a clean 1.4.12?
2007-01-14 [Bugfix] Fixed situation in plugin api that caused bizarre plugin behavior when plugins called underlying plugin api hooks {Donnoman}Maybe Donnoman has an idea...?
2006-11-12 [Bugfix] Fixed plugin api sleep and wake actions to be scoped correctly. {Donnoman}
Have you tested with a clean 1.4.10 and a clean 1.4.12?No, only with 1.4.12
have a bug to report:The same problem on my site (it is still 1.4.12 - I have to update I know - but no time at this time :'()
everything seems to be working just fine on my 1.4.14 gallery, however only the LATEST update "hotlink" does work.
mysql_free_result($result);
Still not fixed...Code: [Select]mysql_free_result($result);