I would be great to display the whole calendar per year. In such way that months would be in a row and days in a column.
Take a look at the image.
I have created that calendar in php with ability to select the days with javascript and store them in mySQL but I don't know wow to implement that on this project. Can someone help me do that? I can provide the php code from my project if necessary.

CommentFileSizeAuthor
yearcalendar.jpg170.43 KBmunge83

Comments

fietserwin’s picture

If 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.

munge83’s picture

I 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

fietserwin’s picture

Well, 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.