Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-05-03 07:58:54

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 535

Calendar

This was my first outing with smd_calendar in what turned out to be quite a complex project. A big thank you to Stef without whom I would not have been able to finish the project.

Plugin’s Used

adi_gps – For feeding variables into the URL to output different dates, events, sections, etc.
cnk_versioning – To allow me to work on the site in my own text editor.
glz_custom_fields – To create custom fields in which you can tag an events status (New, Cancelled, Moved, etc).
smd_calendar – A heavily modified version of the plugin that eventually became v0.50
upm_savenew – A modified version that allows you to post new calendar items without the date/time resetting after each new save.

Last edited by Algaris (2013-07-10 22:50:34)

Offline

#2 2011-05-03 19:02:07

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Calendar

Wow, very nice use of smd_calendar!

Offline

#3 2011-05-10 08:06:13

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 535

Re: Calendar

Thanks Els.

It was a lot more work than I originally anticipated and was complicated by the fact that the calendar is hosted on a Windows server. In fact working on a Windows server highlighted some issues with the PHP date functions, which had it not been for Stef doing some complicated updating to his plugin would have stopped me dead in my tracks.

For the future I want to investigate integrating jmd_csv: Batch-import articles from a CSV into the calendar. Currently every new term I’m having to manually enter hundreds of events, often to tight deadlines.

Last edited by Algaris (2011-05-11 11:20:24)

Offline

#4 2011-05-10 19:43:19

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Calendar

Algaris wrote:

For the future I want to investigate integrating md_csv: Batch-import articles from a CSV into the calendar.

Wow again :) Once you’ve got that working I’ll be very interested to hear how you did it!

Offline

#5 2011-05-11 14:47:30

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 535

Re: Calendar

I’ve managed to get jmd_csv working. It’s actually pretty easy. For the most part I just followed the instructions that came with the plugin.

1. Create a file category, “jmd_csv”
2. Content>Files: Upload a file to the “jmd_csv” category
3. Extensions>jmd_csv: Click import

CSV template
The plugin requires you specify a header row. An example header row:

Title, Body, Excerpt, Section, Category1, Category2, custom_1, custom_2, custom_3, custom_4, custom_5, custom_6, custom_7, custom_8, custom_9, custom_10
Note: You may remove Category* and custom_*.

In the plugin I removed the code that dealt with the date/time posted and the url_title so that I could specify my own in the spreadsheet.

My header row looks something like this:

Title , url_title, Body, Excerpt, Section, Category1, Category2, Posted, feed_time, LastMod

The posted, feed_time and LastMod data use the same format as it does in the mySQL database for example, 2011-10-10 13:00:00

Last edited by Algaris (2011-05-11 14:48:24)

Offline

Board footer

Powered by FluxBB