DittoCal
DittoCal 1.3
Updates:
- $calSource: The source can be now also a document-id, for a easier internal use
- $setLocal (Optional parameter): Added the php-func setlocale in the snippet, for non-english sites
- $dateSelection: (Optional parameter): Set a start-month for the calendar (with values of the php-func strtotime).
- $futureDate: (Optional parameter): Activate the link for a future date (next link) with a value (1/0).
- htmlspecialchars removed from nav links, because: When the global option "valid xhtml" is active, the link become a double ampersand -> example.html?cal_month=11&cal_year=2007
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 2 or higher for this calendar to function correctly.
Planned Updates: Full Ajax Functionality
Parameters
- &calSource [string] - the path to the document or document-id 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.
- &setLocal [string locale | 0] (default: 0) - set the category LC_TIME for the php-func setlocale
- &dateSelection [string time | 0] (default: 0) - start-month for the calendar (with values of the php-func strtotime)
- &futureDate [1|0] (default: 0) - activate the link for a future date (next link) with a value
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`!]
Previous Releases
DittoCal 1.2
18-MAR-07 - Mark Kaplan - Made compatible with Ditto 2.0.1. Added &id and &landing for use
with Ditto. If you have a Ditto call on the document with the same id as
&landing and ID as &id with &extenders=`dateFilter`, DittoCal will pass
the required information to filter the results to only show documents on
that day.
Submitted: Mar 18th 2007 | License: GPL - GNU Public | Downloads: 1350
DittoCal 1.1
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.
Submitted: Jul 17th 2006 | License: GPL - GNU Public | Downloads: 1939
DittoCal 1.0
Initial Release
Submitted: Jul 10th 2006 | License: GPL - GNU Public | Downloads: 696
This resource has been deprecated.