forum.coppermine-gallery.net

Support => cpg1.4 plugins => cpg1.4.x Support => Older/other versions => cpg1.4 plugin contributions => Topic started by: François Keller on June 10, 2007, 09:04:08 pm

Title: Calendar: search for images per date of addition through a calendar
Post by: François Keller on June 10, 2007, 09:04:08 pm
Calendar plugin

This plugin allow you, from a new menu button, to make a search on a precise date:
Choose the month in which you wish to carry out research from the displayed list.
A calendar show you the days where files were added. While clicking on the link of the day display the thumbs from these files.

This plugin use the phpclalendar class (http://www.cascade.org.uk/software/php/calendar/index.php (http://www.cascade.org.uk/software/php/calendar/index.php))

INSTALL:
- unzip package to plugins folder and use plugin manager to install it


CONFIG:
- Modify the clalendar.inc.css to catch your theme

demo (http://f.keller.free.fr/index.php?file=calendar/calendar)

LANGUAGE:
english.php and french.php are avaible in the package. Feel free translate in your language  ;)
Italian.php added (Thank's Lontano)
Dutch.php added (Thank's Hein)
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: Davide Renda on June 10, 2007, 10:16:46 pm
Quote
Feel free translate in your language
I do feel absolutely free today ;-) herewith attached italian translation.
Great work Frantz (as usual) :-))
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: François Keller on June 11, 2007, 02:24:47 pm
Thank's Lontano for your translation (will add it in the pack asp...)
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: Hein Traag on June 11, 2007, 02:51:43 pm
Frantz, keep on going  :D Another great plugin.

Dutch language added and i have a minor typo in the english.php

line 33
Code: [Select]
  'in_gallery'  => ' in he gallery', Missing a t there.

Hein

p.s. Slightly updated dutch.php
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: François Keller on June 11, 2007, 03:07:17 pm
Thank's Hein for yout contribution and for the typo report. Will be corrected asp.
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: Hein Traag on June 11, 2007, 03:33:19 pm
Frantz,

A small suggestion for this plugin. Would it be possible to add two arrows on the screen where the plugin displays the days in a month. One arrow for going one month back and one for going a month forward.

I updated dutch.php slightly again (again).. it reads better now in my language  ;)

Hein
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: François Keller on June 11, 2007, 04:14:04 pm
Quote
A small suggestion for this plugin. Would it be possible to add two arrows on the screen where the plugin displays the days in a month. One arrow for going one month back and one for going a month forward.
certainly possible but i must see how  ;)
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: Hein Traag on June 12, 2007, 10:20:53 am
I was toying with EXIF data on some pictures and then it came to me. Would it be possible to let the calendar sort the pictures on the date that they were actually taken. That date can be retrieved from the EXIF data. Not sure if this is possible, it just sounded cool ;)
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: MarkP on June 13, 2007, 06:52:48 pm
I was toying with EXIF data on some pictures and then it came to me. Would it be possible to let the calendar sort the pictures on the date that they were actually taken. That date can be retrieved from the EXIF data. Not sure if this is possible, it just sounded cool ;)

Excellent plugin....the idea above would be truly awesome!
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: François Keller on June 14, 2007, 07:40:56 am
I'll see if it's possible to make this for the next version (possibility to choose between the two ways)
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: AlexL on August 22, 2007, 08:51:25 am
German lang-file added

and a question - how to arrange the button ? As not to be the first ? If you use the userdefined Menue-Button from DesignSettings-CoppermineSettings the Calender-button and the userdefinedButton was both shown in the LeftButtonDesign - see my screenshot

The second screenshot maybe a misconfig in my css - the "Used" Dates from your Calender are shown in a nearly not visible yellow - its from css or from PlugIn? I Use Igames theme.

And the last question for now - The used day shown in the 2nd pict is 2.8.2007 - after klick on this you come to 1.8.2007 and this was the rrealy day from upload - I'm sure! Have a look to next post
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: AlexL on August 22, 2007, 08:52:08 am
Look at this
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: François Keller on August 22, 2007, 10:11:57 am
Quote
German lang-file added
Thank's AlexL for your contribution, will ad the lang file asp
Quote
The second screenshot maybe a misconfig in my css - the "Used" Dates from your Calender are shown in a nearly not visible yellow - its from css or from PlugIn? I Use Igames theme.
It's probably in the plugin CSS, you must change this according your design
Quote
And the last question for now - The used day shown in the 2nd pict is 2.8.2007 - after klick on this you come to 1.8.2007 and this was the rrealy day from upload - I'm sure! Have a look to next post
I must have a look at this problem, thank's for reporting
Quote
and a question - how to arrange the button ? As not to be the first ? If you use the userdefined Menue-Button from DesignSettings-CoppermineSettings the Calender-button and the userdefinedButton was both shown in the LeftButtonDesign - see my screenshot
problem depending from the theme. I will see if it's possible to find a solution.
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: tycho on August 28, 2007, 04:17:57 pm
Hi, I might have discovered a bug.... I'm a real CPG newbee so fogive if I'm wrong.  ???

I only want registered user to see my pics. So the logon is prompted when they visit the site.
But when when they do not logon but click on the Calendar button on the menu instead... the calendar is displayed  :o even when they are not logged on...
I really don't want this so I had to remove the plugin  :(
Then again I might did something really stupid. I'm not really sure.

Grtz, Tycho
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: François Keller on August 28, 2007, 04:46:53 pm
it's not a bug.
did you see this lines in the codebase.php ?
Code: [Select]
function calendar_page_start()
{
 
  global $template_sub_menu, $template_sub_menu_spacer, $template_sub_menu_button, $sub_menu_buttons;
    global $CONFIG, $lang_plugin_calendar;

    require ('plugins/calendar/include/init.inc.php');
    //if(USER_ID){//uncomment this line if you will only registred users to see the link
  calendar_add_admin_button('index.php?file=calendar/calendar',$lang_plugin_calendar['menu_link'],$lang_plugin_calendar['menu_link'],$lang_plugin_calendar['menu_link']);
//}//uncomment this line if you will only registred users to see the link
also just uncomment the two lines... ;)
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: tycho on August 28, 2007, 05:10:50 pm
Oopss... no i didn't.  ::)
As i said i'm a real noob. I learn everyday!

I was afraid i could not use your contribution but now i can!  ;D
Thanks!
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: François Keller on August 28, 2007, 05:13:04 pm
Quote
Oopss... no i didn't.  Roulement des yeux
As i said i'm a real noob. I learn everyday!
It's not a problem but use the word 'bug' carrefully  ;)
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: Farnsi on August 28, 2007, 05:47:32 pm
nice work, thanks!  :)

two little problems seem to appear:
the thumbnails of the videofiles are not displayed (no custom thumbs, just the ones which are shown on every videofile)
not all pcturethumbs are displayed, some are missing or the whole page shows no thumbs. on other dates it works perfedtly!

using a stramms modded 1.4.12.
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: François Keller on August 28, 2007, 06:47:06 pm
Quote
the thumbnails of the videofiles are not displayed (no custom thumbs, just the ones which are shown on every videofile)
i doesn't use videofiles so i can't replicate the problem.
Quote
not all pcturethumbs are displayed, some are missing or the whole page shows no thumbs. on other dates it works perfedtly!
not sure to understant what you mean. Can you post a link to your gallery ?
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: Farnsi on August 28, 2007, 10:56:32 pm
sorry, i was a bit in a hurry when i wrote that post and sure, here is my gallery (http://gallery)
what i tried to tell you was, that on some dates all thumbs are displayed as they should be, on other dates they are only displayed partially and on others none are shown. a IE user would get a red cross. but see for yourself.  :)
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: François Keller on August 29, 2007, 07:45:53 am
Quote
sorry, i was a bit in a hurry when i wrote that post and sure, here is my gallery
ok, i've seen your problem but i can't replicate this on my test bed. perhaps stramms modpack interfere with the pkugin ? but i'm not sure....
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: AlexL on August 29, 2007, 08:13:28 am
Maybe it's be a problem with rights - are all the files allowed to see for everybody?
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: Farnsi on August 29, 2007, 11:17:22 am
no none of theses files are aollowed to be see from anybody. i only let the calendar be rightless, u know. but this happens as an admin too, and the rds crosses do not seem to care of userrights, they are in every group.  >:(
thanks for your contribution anyways, it is a real cool idea!  :)
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: eka on September 05, 2007, 03:09:11 am
Hi,

I love this plugin - it is really like another very useful search function (this time by dates).
Wonderful  !!

But how do I correct the typo error -  take the "l" out of "jully".



Title: Re: Calendar: search for images per date of addition through a calendar
Post by: AlexL on September 05, 2007, 08:16:30 am
In the english.php in the lang folder of this plugin - corrected version enclosed
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: eka on September 05, 2007, 02:39:25 pm
Thanks AlexL.
Got it corrected.
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: Hot Rides on November 19, 2007, 11:19:54 pm
Did you ever see about the search by date taken option?
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: disposition on November 20, 2007, 04:32:24 pm
How do I change the color of the font for the dates on the calender?  If you look at my calender you can see that the dates that actually have something the font is white.

Thanks!
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: François Keller on November 20, 2007, 08:26:35 pm
look into the calendar.css file (in the calendar plugin directory)
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: disposition on November 20, 2007, 09:04:42 pm
I only see one area for color and that didn't change anything.
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: François Keller on November 20, 2007, 09:51:54 pm
and in include/calendar.inc.css ?
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: disposition on November 20, 2007, 11:42:30 pm
Thanks!
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: mivola on March 04, 2008, 09:09:18 pm
Hi,

I really like the plugin created by François. Nevertheless I wanted to change a few things to fit my needs. Since this is my first contribution, please let me know what I can do better!

Here is a list of changes that I've done:
- all queries respect the users rights
- use the date the picture was taken, not the date the picture was added (requires http://forum.coppermine-gallery.net/index.php/topic,43278.0.html)
- display all month of a year; those with at least one picture in it are a link to the month's calendar
- display next/prev buttons on the calender page
- change the layout of the overview using a table
- show more information about the picture on the thumbnail page
- display proper thumbnail for non image files (eg movies)
- adjusted layout to water_drop theme
- use Monday as the first day of the week

I left a few obsolete lines of code in it to compare it with the original version. When my changes prove to be ok, I'll remove the old stuff.

Have fun!
Michael
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: François Keller on March 04, 2008, 09:32:52 pm
Quote
use the date the picture was taken, not the date the picture was added (requires http://forum.coppermine-gallery.net/index.php/topic,43278.0.html)
do we apply the whole mod ? if yes, it will be difficult to use the plugin after an upgrade from coppermine. if not, what is it to do. You must be more explicit in the install procedure (i have on the moment an error message due to the changes to do in the pictures table...)
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: mivola on March 04, 2008, 09:43:26 pm
do we apply the whole mod ? if yes, it will be difficult to use the plugin after an upgrade from coppermine. if not, what is it to do. You must be more explicit in the install procedure (i have on the moment an error message due to the changes to do in the pictures table...)

Yes, you need to install the whole mod. Probably it would be a good idea to have a configuration option to choose the date: date_take vs date_upload.

To revert the changes regarding the date you need to replace the string "ptime" with "ctime" in all files in the plugin/calendar directory. Warnung: this is not tested at all, just from my memories...
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: François Keller on March 04, 2008, 09:50:51 pm
Quote
Yes, you need to install the whole mod.
hum, not simple for a basic user. Should be better if it can be made by the plugin install(but not so easy to code  ;))
Quote
Probably it would be a good idea to have a configuration option to choose the date: date_take vs date_upload.
probaly yes. On the moment, you must write a clear explanation for the install of your modified plugin.
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: mivola on March 11, 2008, 08:18:38 pm
ok, since I currently dont have the time to change the plugin in a proper way, I created another version of it which doesnt use the date hack.
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: François Keller on March 12, 2008, 06:26:14 pm
look's fine but i have a fatal error after clicking on a day (i'kkkook into the code to see if i can found what fails)
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: dills84 on April 05, 2008, 08:17:52 am
i like this plugin, very nice! thanks.

one question, is it possible to bypass the "calender view" page, and just show pictures added within a months span instead of day by day?

example:

date list:
march 2008
april 2008
may 2008
june 2008

and when one of these links are clicked it brings you to a thumbnail page showing all images added within that month?

I tried looking through the code to see if i could do this, but i was stumped. Thanks again!
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: François Keller on April 05, 2008, 08:42:15 am
should be possible but with code correction
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: dills84 on April 05, 2008, 03:40:45 pm
should be possible but with code correction

thanks for the quick answer. any idea what part of the code i'd need to change?
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: François Keller on April 05, 2008, 07:42:50 pm
have a look to the calendar.php file. All files for this plugin are in the calendar folder
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: hlabout on May 08, 2008, 08:59:58 pm
Like this plugin but I like to change it to show the days the photographs are taken.
Is this possible, and if yes, how is this done?
Tried the moliva version, but no result, getting errors.

Regards,

Harald

www.haraldlabout.nl
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: chicks53 on May 08, 2008, 10:12:16 pm
CONFIG:
- Modify the clalendar.inc.css to catch your theme


Okay but how or what do I modify, what am I suppose to do?
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: ksawery on May 09, 2008, 03:06:37 pm
Spanish language added  ;D.

In the calendar_without_date_change I have also a fatal error after clicking on a day >:(. Any idea.
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: ksawery on May 09, 2008, 03:40:20 pm
I find the error! It's in the display_pics.php file, in the next line:
Quote
$queryOwner = "SELECT user_name FROM cpg132_users WHERE user_id=".$row['owner_id'];

In my case, my database isn't a cpg132, but a cpg145.

I've change the line and now it works.

Sorry for my English.
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: Joachim Müller on May 09, 2008, 05:10:54 pm
That file doesn't contain the line you refer to. Make sure that you're actually looking at the proper file.
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: ksawery on May 09, 2008, 06:19:23 pm
Sorry, if it's my fault ???!

I use the file attached in the mivola's post on 11-03-2008 (20:18:38) (http://forum.coppermine-gallery.net/index.php/topic,44402.msg246787.html#msg246787).
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: Joachim Müller on May 10, 2008, 08:42:55 pm
Well, that's a user-contribution (and not a very valid one) - use it at your own risk. The issue you describe doesn't happen with the original plugin, which is the only supported code.
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: pixstreet on June 10, 2008, 07:13:47 pm
Here is Polish language file for Calendar ;)
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: elzam on April 01, 2009, 10:43:14 pm
russian language
Title: Re: Calendar: search for images per date of addition through a calendar
Post by: t0256soma on May 29, 2009, 10:12:53 pm
Hi,

I had gallery presentation problems(order of pics was like uploaded) - so I installed the exif mod -> everything fine.(http://forum.coppermine-gallery.net/index.php?topic=43278.0)
But I wanted a calendar like piwigo too! I installed the plugin and it's working fine - just replaced all 'ctime' values with 'ptime' and now the calendar does exif sorting :-)

thx to all of you guys - great work

cheers   ;D