Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2] 3 4 5 6 7   Go Down

Author Topic: Update History  (Read 116269 times)

0 Members and 1 Guest are viewing this topic.

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Update History
« Reply #20 on: November 30, 2006, 10:08:18 pm »

Hein,

attach your codebase.php file
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
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Update History
« Reply #21 on: November 30, 2006, 11:19:15 pm »

Hein,

attach your codebase.php file

Done  ;)
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Update History
« Reply #22 on: December 01, 2006, 07:52:55 am »

Hein,

its this line who make problem:
Code: [Select]
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
Code: [Select]
if ($u > 0) $links[] = $lang_plugin_update_history['by']."<a href=\"profile.php?uid=$u\">". get_username($u) ."</a>";
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
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Update History
« Reply #23 on: December 01, 2006, 11:35:47 am »

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

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Update History
« Reply #24 on: December 01, 2006, 11:44:56 am »

replace in your codebase.php file this code
Code: [Select]
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
Code: [Select]
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++;
}
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
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Update History
« Reply #25 on: December 01, 2006, 01:03:29 pm »

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
Logged

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Update History
« Reply #26 on: February 12, 2007, 11:23:42 am »

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
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Update History
« Reply #27 on: February 12, 2007, 11:56:44 am »

Hein,

it's surely possible. I look for thi sfeature if i find time  ;)
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
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Update History
« Reply #28 on: February 18, 2007, 07:24:05 pm »

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
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
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Update History
« Reply #29 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
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Update History
« Reply #30 on: February 19, 2007, 09:43:50 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
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
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 189
    • Velvet Photos
Re: Update History
« Reply #31 on: February 19, 2007, 10:29:38 am »

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
« Last Edit: April 18, 2007, 09:54:49 am by AlexL »
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Update History
« Reply #32 on: February 19, 2007, 11:41:33 am »

AlexL,
Quote
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) :-\
modif added in the pack
Change this code
Code: [Select]
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
Code: [Select]
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>" ;
}
Quote
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
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  ;)
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
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 189
    • Velvet Photos
Re: Update History
« Reply #33 on: February 19, 2007, 12:14:11 pm »

Quote
the 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.
« Last Edit: February 19, 2007, 12:20:31 pm by AlexL »
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Update History
« Reply #34 on: February 19, 2007, 12:56:17 pm »

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
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
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 189
    • Velvet Photos
Re: Update History
« Reply #35 on: February 19, 2007, 02:37:36 pm »

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

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Update History
« Reply #36 on: February 19, 2007, 02:44:25 pm »

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

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Update History
« Reply #37 on: February 19, 2007, 05:20:59 pm »

 :D :D :D
version 2.0 will come asp  ;)
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
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 189
    • Velvet Photos
Re: Update History
« Reply #38 on: February 19, 2007, 07:29:09 pm »

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

Megachip

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 35
Re: Update History
« Reply #39 on: March 11, 2007, 08:28:58 pm »

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???)

« Last Edit: March 11, 2007, 08:52:34 pm by Megachip »
Logged
Pages: 1 [2] 3 4 5 6 7   Go Up
 

Page created in 0.032 seconds with 21 queries.