Downloads » Resources » DittoCal » DittoCal | 1.1

DittoCal 1.1

  • Currently 4.2941176470588/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
17 vote(s).

DittoCal creates a customizable calendar for your Modx blog. The calendar allows your users to navigate through your blog posts by clicking on the date to view the post.

Works with MODx Version(s): 0.9.2.1
Submitted: Jul 17th 2006 | License: GPL - GNU Public | Downloads: 2041

Description

You may be asking why the name DittoCal, well you have to use the Ditto snippet to setup the data for your calendar. Get the latest version of Ditto here.

You must use Ditto version 1.0.2 or higher for this calendar to function correctly.

Planned Updates: Full Ajax Functionality

Parameters

  • &calSource [string] - the path to the document created to output tour posts in json format. (i.e. http://www.muddydogpaws.com/blog_json_output)
  • &linkClass [string] (default: cal_link) - class for table cells (td) that contain links.
  • &dayNameLength [0|1|2|3|4] (default: 3) - how many characters of the week day name to display, 4 shows full name.
  • &firstDay [0|1|2|3|4|5|6] (default: 0) - Which day should start the week. 0=sunday, 1=monday, etc...
  • &showPn [0|1] (default: 1) - Show the previous/next links with your calendar.
  • &debug [0|1] (default: 0) - Set to 1 t oview debug information.
  • &ph [string] - Name of the placeholder you want to output to.
  • &activeDay [string] (default: curDay) - Class to use for current post when clicked from calendar.


In the snippet code there is an array named monthLinks. This array allows you to specify a link to a page on your site for each month of the calendar. When a link is specified, the month name will become the hyperlink. An example use of this would be if you have setup a page that contains the posts for the month of March 2006.

To see this calendar working you can view it on my site here: http://www.muddydogpaws.com/notebook

Instructions

  • Create a new snippet named DittoCal.
  • Copy the contents of snippet.dittocal.php into the snippet.
  • Create a folder under assets/snippets named DittoCal.
  • Upload the file JSON.php into the new directory.
  • Create a new document with the following settings:
    • title: blog json output
    • template: blank
    • show in menu: no
    • published: yes
    • searchable: no
    • content type: text/plain
    • document content: [!Ditto?startID=`yourblogfolder` &summarize=`100` &format=`json` &dateFormat=`%d-%m-%Y` &sortDir=`desc`!]

    This document is used to output your post data so that it can be read into the calendar. You should set the startId to your blog folder and set summarize to the max number of posts you expect to have. Leave everything else the same as above.
  • Add the snippet call to the pages you want your calendar displayed on.


Example Snippet Call:
[!DittoCal? &calSource=`http://www.muddydogpaws.com/blog_json_output` &dayNameLength=`1`!]

Updates

Here is a list of the new features:

  • Placeholder output support - there is now a parameter you can set to output the calendar to a placeholder.
  • Future Month Removal - The next link will not be displayed when user reaches the last post.
  • When a user clicks a day in the calendar the month displayed will stay the same when the new page loads. The selected post will have the class specified in the parameter &activeDay.
  • Debug Output - set the parameter debug equal to 1 to see information to help fix errors.


( back to top )