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 ... 7   Go Down

Author Topic: Update History  (Read 116385 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
Update History
« on: November 05, 2006, 11:55:56 am »

UPDATE HISTORY: Display an update history block on main page
curent stable version 1.1
curent developpement version 2.0.1.beta
original MOD by Nibbler: http://forum.coppermine-gallery.net/index.php?topic=9540.0
Adapted for CPG 1.4.* by deejaymoni: http://forum.coppermine-gallery.net/index.php?topic=26629.0

Install:
- unzip package to plugins folder and use plugin manager to install it
- after installation add updatehistory to :
    config => Album list view => The content of the main page
Version 1.0
config:
- Intitialy the plugin is configured to start update history 4 days ago, you can change this setting by editing plugins/update_history/codebase.php and change the $day value on line 68.
- if you want to show this stat to admin only , open up plugins/update_history/codebase.php and replace (around line 63)
this

Code: [Select]
if($matches[1] != 'updatehistory') {
with this
Code: [Select]
if($matches[1] != 'updatehistory' || !GALLERY_ADMIN_MODE) {

- if you want to show this stat to Registered user only , open up plugins/update_history/codebase.php and replace (around line 63)
this

Code: [Select]
if($matches[1] != 'updatehistory') {
with this

Code: [Select]
if($matches[1] != 'updatehistory' || !USER_ID) {
LANGUAGE:
english.php, italian.php (thank's Lontano)and french.php are avaible in the package. You can translate in your language
New
german.php added (thank's farnsi)
possibility in codebase.php to show uploader name only for registred users (see comments in the code)
New version 1.1
see this post for détails http://forum.coppermine-gallery.net/index.php?topic=38148.msg196311#msg196311
*Dutch lang file added (thank's HEIN)
*German lang file added (Thank's AlexL)
*little modif in the code to solve typo proble (thank's AlexL for report)
New version 2.0
See this post for more details
language files avaible:
*english.php
*french.php
*dutch.php (thank' Hein)
*italian.php (thank's Lontano)
http://forum.coppermine-gallery.net/index.php?topic=38148.msg203782#new
« Last Edit: April 15, 2007, 03:08:16 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

Davide Renda

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1427
  • aka "Lontano"
    • www.daviderenda.eu
Re: Update History
« Reply #1 on: November 05, 2006, 01:53:41 pm »

italian translation attached  ;)
good work Frantz!

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Update History
« Reply #2 on: November 05, 2006, 02:01:37 pm »

Thak's Lontano for your contribution.
I'll add your file 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

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 #3 on: November 06, 2006, 11:46:55 am »

Goodmorning,

installed this neat little plugin to my CPG.

I added the changed files for the dutch lang version to this post.
The file dutch.php contains the translations. Codebase.php needs some editing as wel.
Change:
Code: [Select]
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'] ;
Into:
Code: [Select]
[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]

It changes the s which is used to add to the word file so it spells files into (en) which is used to add to bestand so it spells bestand(en).

I do get to see the catlist twice now. Any idea why that is ? I think it has something to do with the order in which the plugins are loaded into CPG. I will try something out in the sort list of the plugins and let you know.
**UPDATE** I had the same dual catlist when i installed the Onlinestats plugin. I placed that one on top of the plugin list and the Updates plugin underneath it. Now i see 1 catlist as usual. Problem solved.

Cheers!
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 #4 on: November 06, 2006, 11:52:59 am »

Your right, for language who don't use  the "s" for the plural you must change the code in codebase.php
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 #5 on: November 06, 2006, 03:48:49 pm »

Frantz,

the plugin provides a way to show the updates to registered or admins only.
But is it also possible to show the updates to guest users but then without the information of which user uploaded the new pictures ? So guest users only get to see the added updates to the CPG.

Cheers!
Hein
« Last Edit: November 06, 2006, 03:58:42 pm by 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 #6 on: November 06, 2006, 04:13:57 pm »

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)
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 #7 on: November 06, 2006, 04:56:18 pm »

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)

i know it has something to do with this line
Code: [Select]
if ($u > 0) $links[] = "<a href=\"profile.php?uid=$u\">". get_username($u) ."</a>";
Somewhere in that line USER_ID has to be added. I tried adding it a couple of times but can not find the right way to insert it. If do, by a stroke of luck, get it done i'll post here (unless you are faster  ;D )

Cheers!
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 #8 on: November 06, 2006, 05:54:40 pm »

Hein,

Try with the codebase.php attached
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 #9 on: November 07, 2006, 08:37:56 am »

Frantz,

thanks for the new codebase. It worked! I attached the dutch version of codebase.php for registered users on this post.

Kind regards,
Hein
Logged

capecodgal

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 123
Re: Update History
« Reply #10 on: November 16, 2006, 07:54:09 pm »

Got 2 quick questions relating to this mod and I hope it is ok to post them here-

#1 how to change the description on the box? It states "Recent Update" and I want it to say "Recent Gallery Updates" since there is more than one update or something to that effect-

#2 how can I remove the user protion of the code? So it will not say 20 files into album by user (I just want to drop the "by user" because it comes up on the second line since my table is not 100% and it would look nicer if I could drop that and keep it on 1 single line)
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 #11 on: November 17, 2006, 07:20:42 am »

question 1: make the change in the lang/english.php file

question 2: in codebase.php search this code and comment it
Quote
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

Farnsi

  • LocalSupporter
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 177
Re: Update History
« Reply #12 on: November 27, 2006, 12:35:38 pm »

Thanks for this plugin, it is really great!
I attached the a german version of the files, with the activated option "for registered users".

I have one question, is there a chance to change the mod in that way, that it is only shown on the index page?
Logged
Regards,
Farnsi

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Update History
« Reply #13 on: November 27, 2006, 03:52:56 pm »

Thank's for your contribution. Your langage file will be added in the orignal pack as soon as possible.done
Quote
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.  ???
« Last Edit: November 27, 2006, 05:15:20 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

Farnsi

  • LocalSupporter
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 177
Re: Update History
« Reply #14 on: November 28, 2006, 11:08:24 am »

unfortunately not, the box is also shown inside the categories. and i would prefer to have it shown only on the mainpage.
to my gallery

« Last Edit: November 29, 2006, 12:34:35 pm by Farnsi »
Logged
Regards,
Farnsi

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Update History
« Reply #15 on: November 28, 2006, 11:19:56 am »

The category pages are being displayed using index.php as well. You'll have to add a switch the checks if $cat==0 if you want it to only show on the root category page.
Logged

Farnsi

  • LocalSupporter
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 177
Re: Update History
« Reply #16 on: November 28, 2006, 11:35:02 am »

sounds logical, thanks, but unfortunatly i'm not a good coder so could you tell me how and where to put this switch?
or should i post this question in a new thread?  :-\
Logged
Regards,
Farnsi

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9093
  • aka Frantz
    • Ma galerie
Re: Update History
« Reply #17 on: November 29, 2006, 10:55:56 am »

try this:
in codebase.php find
Code: [Select]
GLOBAL $CONFIG, $matches;replace with
Code: [Select]
GLOBAL $CONFIG, $matches,$cat;
Code: [Select]
if($matches[1] != 'updatehistory'{replace with
Code: [Select]
if($matches[1] != 'updatehistory'|| !$cat==0 ) {
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

Farnsi

  • LocalSupporter
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 177
Re: Update History
« Reply #18 on: November 29, 2006, 12:34:06 pm »

thanks a lot! works perfect!
Logged
Regards,
Farnsi

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 #19 on: November 30, 2006, 09:18:47 pm »

Frantz,

i am using, trying to, the plugin on my personal CPG. It's using the MorpheusX Blue theme from DaMysterious.
When i try to install the Update History plugin it comes back with this:
Code: [Select]
Parse error: syntax error, unexpected T_STRING in /kill-9.be/users/hop/public_html/cpg/plugins/update_history/codebase.php on line 101
Any idea what might be causing that ?

Hein
Logged
Pages: [1] 2 3 4 5 ... 7   Go Up
 

Page created in 0.026 seconds with 21 queries.