Update History Update History
 

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

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

if($matches[1] != 'updatehistory') {

with this

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

if($matches[1] != 'updatehistory') {

with this

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

italian translation attached  ;)
good work Frantz!

François Keller

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

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:
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] 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

François Keller

Your right, for language who don't use  the "s" for the plural you must change the code in codebase.php
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

#5
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

François Keller

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

i know it has something to do with this line
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

François Keller

Hein,

Try with the codebase.php attached
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

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

capecodgal

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)

François Keller

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

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

Farnsi

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?
Regards,
Farnsi

François Keller

#13
Thank's for your contribution. Your langage file will be added in the orignal pack as soon as possible.done
QuoteI 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.  ???
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

#14
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

Regards,
Farnsi

Joachim Müller

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.

Farnsi

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?  :-\
Regards,
Farnsi

François Keller

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

thanks a lot! works perfect!
Regards,
Farnsi

Hein Traag

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:

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