Active
Project:
Availability Calendars
Version:
7.x-4.1
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Dec 2013 at 22:21 UTC
Updated:
21 Dec 2013 at 22:21 UTC
Jump to comment: Most recent
Comments
Comment #1
fietserwinIf you want to add this to the project, that would be st be done in the form of a field formatter and, if you want to show it that way on the edit screen as well, as a field widget as well.
Start by copying the formatter (and widget) hooks and replace it with your own code. Then add your formatter to the formatter_info hook so it can be selected by the user. Formatters don't need to be in the same project that defines the field. But if it all works good and is customisable to different needs, I can add it to this project. Until that time it is perhaps better to work in a sandbox project. I'm willing to review the code then.
Comment #2
munge83 commentedI did try what you suggested but I'm totally lost in this files.
I newer coded in drupal.
I see the all formatting of one month is done in function theme_availability_calendar_month but then again I clueless how it's all connected with the hooks and format settings.
Can someone more experienced with drupal coding try to implement this in this project. I assume to someone who knows how to code in drupal this is peace of cake but to me it's science fiction.
Thanks
Comment #3
fietserwinWell, this would be a good place to start coding in Drupal. I will review your code, so yo can learn from it.
To start with the field hooks, try reading some blogs or such om defining a field:
- http://getlevelten.com/blog/ian-whitcomb/defining-custom-field-types-drupal
- http://www.grasmash.com/article/field-api-creating-your-own-field-format... (more specific on creating your own formatter).
Themes functions have to be defined in hook_theme before they can be called. The advantag of putting the real work in a theme function is that it allows others to override the theming or preporecess the data.