Content last modified Tuesday 24 August 2021
hop to #bottom
Categories:
Author:
Current version:
1.2
About It:
Get it:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

cnn_month_select

This is a very simple plugin (hack) that adds functionality to either mdp_calendar or zem_event. It simply creates a select form that will allow you to choose a month and year and automatically jump to the month.

I figure that if I needed it, maybe someone else will also. It’s my first plugin, so if I did something stupid or if there are any bugs, let me know (but be nice…). It’s so simple though, I can’t imagine that there are any huge problems…

Download

cnn_month_select-1.2.txt

Usage:

Just place a <txp:cnn_month_select /> tag wherever you want the form to appear.

Attributes:

  • plugin
    • the plugin that creates the calendar
    • optional values are zem_event or mdp_calendar
    • default is zem_event
  • id
    • the id attribute of the form element
    • default is monthSelectForm
  • action
    • the action attribute of the form
    • default is blank
    • this only needs to be used if you want to place the form on a different page from the calendar itself.
  • wraptag
    • the html tag to wrap the form elements in
    • default is div
  • monthselectid
    • the id attribute of the month select element
    • default is monthSelect
  • monthlabel
    • the label text for the month select element
    • default is Month:
    • example usage: <txp:cnn_month_select monthlabel="Choose a month: " />
  • yearselectid
    • the id attribute of the year select element
    • default is yearSelect
    • only needed used with mdp_calendar
  • yearlabel
    • the label text for the year select element
    • default is Year:
    • only needed used with mdp_calendar
  • submitvalue
    • the value of the form’s submit button
    • default is Go
  • submitid
    • the id attribute of the submit button
    • default is blank
  • submitclass
    • the class attribute of the submit button
    • default is button

Changelog

July 14, 2008 – Version 1.2

  • Fixed a bug where the list options would always show the same months, regardless of what month was being viewed.
  • Cleaned up the code a little to be easier to read and (possibly) update.

July 10, 2008 – Version 1.1

  • I forgot to add the id attribute to the select elements. This is fixed.
  • Added the monthlabel and yearlabel attributes to the plugin. (See above or the plugin help for usage instructions.)

June 30, 2008 – Version 1.0

  • Fixed a bug that caused the form to show the current month instead of the month being viewed by the calendar.
Article Request Count:
Keywords/tags:
Initially released:
June 27, 2008
Posted here:
27 Jun 2008

You know you want to visit the Archives.
Published with Textpattern