I develop websites using drupal and in the course of doing so have written a number of bespoke modules but also worked to enhance existing modules via the issue queues and submitting patches etc.
One such patch is to enhance the repeating date functionality in the date project as outlined in this module here: http://drupal.org/node/397902. The feature hasn't be declined and was originally encouraged, however, a lack of response lately leads me to believe that the maintainers are busy enough maintaining the considerable code base/porting to D7 etc and that this functionality would be better implemented as a separate module. Indeed I think there is already too much complexity in the Date project! Therefore I wish to have CVS account so that I can share this module.
The main aim of the module is to simplify the repeating date input UI for various use cases in common with other calendar applications and web sites where recurring date information needs to be captured. It does this via preset recurring date rules.
The module supports two types of preset:
1. Select a preset repeat from a list. (E.g. every year, every month, every week). Up to 5 configurable reset repeat rules are allowed as well as the options to not repeat or, if configured, to specify a custom repeat rule via the standard form. This is similar to the way Apple's iCal does it.
2. A single configurable preset rule which is either applied automatically for a specialised date field e.g. your birthday, anniversary etc) or via a checkbox for a more general "is this an annual event" type field.
It is completely flexible as all the rule presets can be set by the administrator. Furthermore it can prevent excessive processing of repeating date rules by limiting the rules that can be entered where custom rule entry is not required.
Many thanks for considering this application,
Andy Chapman
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | date_repeat_presets-6.x-1.x-dev.tar_.gz | 8.08 KB | chaps2 |
| #1 | date_repeat_presets.tar_.gz | 4.95 KB | chaps2 |
Comments
Comment #1
chaps2 commentedComment #2
avpadernoHello, and thank you for applying for a CVS account. I am adding the review tags, and some volunteers will review the code, pointing out what it needs to be changed.
As per requirements, the motivation message should be expanded to contain more features of the proposed project. For themes, it should include also a screenshot of the theme, and (when possible) a link to a working demo site; for modules, it should include also a comparison with the existing solutions.
Comment #3
chaps2 commentedHello,
I have attached a new version of the module for review which is complete. There is also a demonstration site at http://drpdemo.locologic.co.uk where you can try configuring repeat date widget presets and setting repeat options on node edit forms.
A more complete summary of the module taken from the README.txt follows:
SUMMARY
This module can greatly simplify user entry of repeating dates. It supports a number of use cases as follows:
The user enters a date which may be repeated in a number of pre-determined ways e.g. no repeat, every week, every month, every year. Up to 5 rules may be set by the administrator per field. The options may be presented as a group of radio buttons or as a select box, which also serves to clearly indicate the current repeat setting without having to expand and interpret the standard repeat rule form.
As above, but the user is also given the option to enter a custom rule via the standard repeat rule form. The standard form is displayed only when the custom rule option is selected.
The user enters a date which by it's nature is a repeating date (e.g. birthday, anniversary). On submission the date is automatically repeated using a repeat rule provided by the administrator.
The user enters a date which may be a repeating date as defined by a single rule provided by the administrator. The user may select to apply the repeat rule via a simple checkbox.
INSPIRATION
The following sites/apps inspired the repeat date presets module:
INSTALLATION
The ahah_helper module is required.
Comment #4
chaps2 commentedComment #5
chaps2 commentedIf you need anything else to process this application please let me know!
Comment #6
entrigan commentedI fully support giving chaps2 a cvs account.
He has written two modules (that I know of) which are sitting in the issue queues.
1. Date Repeat Presets: I have tested this module and it both works well, and adds some very useful functionality to the Date module. It basically gives an alternate (and for most use cases superior) UI for the date repeat widget. #397902: Support for simplified date field with repeat options widget
2. Community Tags Unitag: This module will go into the community tags project, and provide integration with Unitag. Community Tags and Unitag are a logical combination, as community tags opens up the number of people who can tag nodes, and unitag implements tag moderation. He has also requested co-maintainership of Community Tags (I am a maintainer). I have reviewed his code, and it is well written and well commented, and utilizes important drupal concepts like hook_schema, fapi, and hooks. #306916: Make CT work with/like Unitag
There is no doubt having him as a cvs contributor will improve the community. Please approve.
Comment #7
entrigan commentedThis is my first CVS app review:
Review of Date Repeat Presets module:
Done: See #3.
Done: There is no third party code.
Done: The module does not display user input as HTML, does not have any db queries, or ajax callbacks. It uses FAPI, and variable_set/get to do most of its work.
Done: The module uses existing API's (date repeat, fapi), has small functions, uses t() on interface strings, and is very well commented (both inline comments and function explanations). While this module may not be perfect (e.g. it is hard-coded to allow for at most 5 presets), it is definitely ready for the wild.
Done: The code at least ostensibly follows Drupal standards. It uses double spaces for tabs, properly spaces function and variables, and uses Doxygen formatting for comments.
Todo: Create a README.txt.
Comment #8
entrigan commentedWoops, I did not see the tarball from #3. It looks like everything from #7 still holds true, and a README.txt has been added.
Fantastic work.
Comment #9
michelleApproved based on entrigan's review.
Michelle
Comment #12
avpadernoComment #13
avpadernoI am giving credits to the users who participated in this issue.