TeamCal Pro script for german holidays

If you need support with TeamCal Pro (installation, configuration, usage) post your request here.
Post Reply
bock68@yahoo.com
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 2010-01-08, 15:52

TeamCal Pro script for german holidays

Post by bock68@yahoo.com » 2010-01-08, 11:35

Hello,
is there a script to import holidays?

best regards Norman
User avatar
George
Platinum Boarder
Platinum Boarder
Posts: 407
Joined: 2004-11-29, 21:20
Are you a spam bot?: No
Contact:

Re:TeamCal Pro script for german holidays

Post by George » 2010-01-09, 19:50

Hi Norman,

unfortunately there is no script to import holidays. You have to enter them manually. You might wanna look at the "Region" feature. It gives you the option to provide several sets of Holidays, e.g. Germany, Canada etc.

Best regards,
George
TeamCal Neo is free for private use but requires licensing for use in a commercial environment:
https://georgelewe.atlassian.net/wiki/s ... eo+License
snaker
Junior Boarder
Junior Boarder
Posts: 20
Joined: 2010-04-19, 14:44
Location: Germany - Bavaria

Re:TeamCal Pro script for german holidays

Post by snaker » 2010-04-21, 08:51

Hi there, if theres is interest i can upload an excelsheet which generates you the sql-source for phpmyadmin (or query browser maybe, i didn't test this) for every year you choose. But remember, I genereated this sheet only for own so you only find bavarian holidays in there and maybe you have to edit the exelsheet cause the tables are renamed in your database. Let me know if you have interest in it.
User avatar
George
Platinum Boarder
Platinum Boarder
Posts: 407
Joined: 2004-11-29, 21:20
Are you a spam bot?: No
Contact:

Re:TeamCal Pro script for german holidays

Post by George » 2010-04-21, 14:25

hi snaker,

thanks for your offer. note however, that holidays are not static in TeamCal Pro. users can define what a holiday is. there might be users that don't even have a 'Public Holiday' or something like that configured in TCP. they use the holidays for something completely different.

but for those who do and know how to manually import stuff into the database your script might be very helpful. why dont you attache it here as an attachment?

best regards
george
TeamCal Neo is free for private use but requires licensing for use in a commercial environment:
https://georgelewe.atlassian.net/wiki/s ... eo+License
snaker
Junior Boarder
Junior Boarder
Posts: 20
Joined: 2010-04-19, 14:44
Location: Germany - Bavaria

Re:TeamCal Pro script for german holidays

Post by snaker » 2010-04-21, 14:33

Of course, its only for german people which want to see the offical holidays of its country in tcpro.

I didn't uploaded the excel-sheet yet cause I want to change some options in it to be more flexible for the federal states (Bundeslaender) and the districts of bavaria and I want to be more flexible in the input for other DB-syntaxes, too =)

Hope I can complete it this week.
snaker
Junior Boarder
Junior Boarder
Posts: 20
Joined: 2010-04-19, 14:44
Location: Germany - Bavaria

Re:TeamCal Pro script for german holidays

Post by snaker » 2010-04-21, 16:25

A bit of time and work is done faster i thought before ;)

Hope the excelsheet works on office 2003 cause I created it with office 2007 (german version!).
After opening the sheet you will find 3 "workbooks"? "subsheets"? (dont know the name in english, in German it's a "Arbeitsmappe").

The whole sheet is safed against destroying by user but this can removed, no password is set.

First: "Config"
The area i worked for the last minutes. Orange areas can be edited. This is self-explanatory i think. "Tabellensyntax" means the syntax on every tables name beginning (please see the example). Region means the db-name of the region!

Second: "Calc"
The calculating heart of this sheet, a user shouldn't change entrys here.

Third: "SQL-Output"
The created SQL-Source you have to insert in a query browser (only tested with "phpmyadmin" in SQL-Tab!!!).

Of course there are more options to put the table into your database but here's the most easiest way to insert the created code into your TCPro:

(to tell the truth, I'm not sure what happens, if table already filled with an entry for example yearmonth "201004" (April 2010). I would suggest to remove all entrys of table my_tc_months before importing!)

Open your phpmyadmin-webpage.
Select your tcpro-database (which contains for example: my_tc_months)
Select the Tab "SQL"
Paste the excel-generated Source and press "OK".

Thats it ;)

Remember, i'm not responsible for erros or something like this. Everybody can edit everything in this sheet to fit it to his own requirements. I garantee for a 100%-virus-free excelsheet. If you have questions or suggestions please post it here :)

Please find the attatchment in this post!
User avatar
George
Platinum Boarder
Platinum Boarder
Posts: 407
Joined: 2004-11-29, 21:20
Are you a spam bot?: No
Contact:

Re:TeamCal Pro script for german holidays

Post by George » 2010-04-21, 22:26

Hi Snaker,

that's some good work there. Thanks you for sharing this with us.

I think what you call "Arbeitsmappe" is the whole file and an "Arbeitsblatt" is each sheet in it. The safest bet is to call it 'tab' in English. It is similar to 'Reiter' in German.

Under certain circumstances your Excel file can be very helpful. A couple of things should be considered though.

It only works if '2' is the current ID for a 'Public Holiday. That is the case if the sample data were used when installing Tcpro. But if you deleted, renamed or configured your Holidays in any other way you cannot use '2'. Maybe that could be another setting on your Conf tab.

Th SQL statement will run into problems if records for the months already exist. If you delete the old ones first, you must be aware that you loose your previous Holidays. E.g. if you have already mraked School Holidays, they will be gone.

But again, if you don't have any templates for a region yet, this is a great help.

Thanks again and best regards,
George
TeamCal Neo is free for private use but requires licensing for use in a commercial environment:
https://georgelewe.atlassian.net/wiki/s ... eo+License
snaker
Junior Boarder
Junior Boarder
Posts: 20
Joined: 2010-04-19, 14:44
Location: Germany - Bavaria

Re:TeamCal Pro script for german holidays

Post by snaker » 2010-04-21, 23:36

Updated the sheet. Enjoy =)
Attachments
generate_german_tcpro_holidays-75b90707eebd706735496a952fc106f1.zip
(26.7 KiB) Downloaded 273 times
trepo
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 2010-05-02, 18:47

Re:TeamCal Pro script for german holidays

Post by trepo » 2010-05-02, 14:52

Thanks, works great!
snaker
Junior Boarder
Junior Boarder
Posts: 20
Joined: 2010-04-19, 14:44
Location: Germany - Bavaria

Re:TeamCal Pro script for german holidays

Post by snaker » 2011-02-28, 09:23

Had to update the file cause of a problem with the query, here's the new file! [file name=generate_german_tcpro_holidays-ad65421b6297f188b3532da69dcdc017.zip size=24066]http://lewe.com/images/fbfiles/files/ge ... cdc017.zip[/file]
snaker
Junior Boarder
Junior Boarder
Posts: 20
Joined: 2010-04-19, 14:44
Location: Germany - Bavaria

Re:TeamCal Pro script for german holidays

Post by snaker » 2011-08-25, 15:03

Seems that the bots like my holiday-sheet :D
Franz
Fresh Boarder
Fresh Boarder
Posts: 13
Joined: 2012-04-05, 16:34
Are you a spam bot?: No
Location: Dresden
Contact:

Re: TeamCal Pro script for german holidays

Post by Franz » 2012-04-16, 15:09

i just posted a patch that solves this problem with a ical import function
have a look at http://www.lewe.com/fo/viewtopic.php?f=20&t=3244
Post Reply