Update History - Page 2 Update History - Page 2
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Update History

Started by François Keller, November 05, 2006, 11:55:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

François Keller

Hein,

attach your codebase.php file
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

Quote from: Frantz on November 30, 2006, 10:08:18 PM
Hein,

attach your codebase.php file

Done  ;)

François Keller

Hein,

its this line who make problem:
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  :-\
normal code is
if ($u > 0) $links[] = $lang_plugin_update_history['by']."<a href=\"profile.php?uid=$u\">". get_username($u) ."</a>";
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

It's the codebase you adjusted so only registered users could click on a username to see the profile details.  ;D

François Keller

replace in your codebase.php file this code
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++;
}

with
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) ? '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++;
}
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

For a stone carver you do know what to code to make it work Frantz  ;D

Works on both fototest.scouting.nl and rondvierkant.nl (my personal CPG)

Thanks
Hein

Hein Traag

Frantz,

just a idea but would it be possible to add a "Archive" function in this plugin which can be seen by clicking on the Archive button or link in the table cel. Which can be set to be viewed by everybody, only registered or only admin.

Ciao
Hein

François Keller

Hein,

it's surely possible. I look for thi sfeature if i find time  ;)
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

New version (V.1.1)

Asked by Hein, this new version show a button to go to an archive page if you're logged as admin.
On this archive page you can set the number of days ago to start history.
The button can be shown for registred users or for all users by modify the codebase.php (see comments on the code)
Caution: the langage files are modified. Only english and french files in the pack are modified.
Pack attached on the very first post from thisthread
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

 ;D Thanks Frantz, it's exactly like i wanted it. Hopefully others will see it as a benefit as wel.

New dutch.php zipped and attached to this post.

Hein

François Keller

Quote from: Hein on February 19, 2007, 09:09:24 AM
;D Thanks Frantz, it's exactly like i wanted it. Hopefully others will see it as a benefit as wel.

New dutch.php zipped and attached to this post.

Hein
:D
Your language file is added in the pack thank's
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

#31
Hallo Frantz

Another nice PlugIn from you - my German Lang File attached.
But the translatet line  'configure' =>'... dont work on my site - This line after installation is shown in english although I've translatet this line.
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.

Furthermore I have any moding wishes for the PlugIn too. ;D
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.php ;)
The Archive-Button to adjust this temporary works fine for me - but not every day I upload new pictures - so that I wish to set it to the last 30 days for example. Maybe to adjust it with the last numbers the Admin has used with the Archive Button?
Alternate a setting to adjust the lines that are shown - for example the last 5 updates instead a 4 day history. Maybe this is the best way because the layout for the Mainpage is so set and fix.
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.
The from user... I don't want to show, because there is only one user - it's me.

You can see this work on my page www.velvet-photos.de

François Keller

AlexL,
QuoteThe 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) :-\
modif added in the pack
Change this code
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>" ;
}

with
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>" ;
}

Quote1st 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.php
even 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)
for the other changes, i'll see what is possible to so  ;)
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

#33
Quotethe last 5 updates instead a 4 day history
The 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.
It's an nice informativ way to show the users what's new - I love this idea  :-*
The only you have to mod is to read out the history as before and than short the list to the last 5 lines.
I m not the coder - but I hope this is a little job ;)
In this case you don't need a table  - set the numbers of lines as a variable and do this in a set.php file.
Everybody that's able to upload a PlugIn is able to edit this one line in a file too.

François Keller

Yes, your proposition to put the settings in a file is a quick solution. But, i think it can be usefull to have a really admin config page to set the preference:
* upload for the last x days or x last upload on the main page
* who can access to the archive page
* what is to display on the archive page

.... (for the 2.0 version  :D)

P.S. The modifs from my previous post must also be made on the history_admin.php file
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

Quotewhat is to display on the archive page
and what is to display on the main page
Quotea quick solution... it can be usefull...
Yes, of cource!
You try to be perfect  ::)
Quotefor the 2.0 version
I can already smell it  ;D - you too?

Hein Traag

<offtopic>
Oh good.. i thought it was my laptop cpu overheating  ;D
</offtopic>

François Keller

 :D :D :D
version 2.0 will come asp  ;)
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

I know - because I've smell it ;D :D ;D

Megachip

#39
Update History shows all albums, even the albums which aren't visible for the user... e.g. no one is loged on, but he can see all albums with new pictures...

in the orginal mod by nibbler, the user see only updates to albums which are visible 4 him

P.S. It seems that $FORBIDDEN_SET not initialized (add it as global???)