I am new to Drupal but have managed to get everything working so far except the Calendar Block. I have read a couple of other threads that have asked the main question I have but there were no answers.
1) The hook_calendar_block() code. Where does it go? I have tried everything I could think of with no luck and the documentation does not specify this. I thought it should be in calendar_block.module but it didn't work there. The module loads in my sidebar but there is no info, just gray background.
2) It works with the modules Colorpicker and Textfield to slider. I have them both installed and neither seem to work. I am pretty sure the problem with the ColorPicker is the Widget module. It has the following: Adds a color picker widget.
Depends on: Colorpicker (enabled), Content (missing), Text (missing)
I have read and applied patches and modifications to the farbtastic.js file as instructed here on the site, but it still doesn't show up with the color wheel as the screenshot images show.
The Textfield to Slider say the following: Depends on: Jqp (missing). I understand that this possible won't work until a new version comes out on the jquery.js. Is that correct.
I am running Drupal 6.13 and everything is good in my Status Report and am getting no log errors in regard to my questions above.
Thanks for the help..
Comments
Comment #1
TeamThunder commentedI'm in the same boat as you. I got the module installed but all it does is sit there, telling me what date it is, and looking all so pretty. I would like to be able to click on a date and have it go to my calendar, but alas I haven't been able to figure it out. Even the all might Google doesn't have answer. Perhaps I'll try Bing and then see if Wolfram Alpha can deduce the solution.
Thomas
Comment #2
TeamThunder commentedGreetings,
Me again. I was finally able to figure this out. In order to get this to work you need to create a new module. In order to do this do the following:
Create a new folder, I created mycalendar
Create a new text file and save it as an .info file, mine was mycalendar.info
create a new text file and save it as a .module file, mine was mycalendar.module
For the .info file look at other .info files for examples of what need to go in it. Here is what mine looks like:
; $Id: mycalendar.info,v 1.3 2008/11/24 15:40:13
name = My Calendar
description = Custom calendar settings for the Calendar_Block module
core = "6.x"
package = User Interface
dependencies[] = calendar_block
The hook_calendar_block() code will go in the .module file. Again here is an example:
<?php
function mycalendar_calendar_block(&$calendar, &$date, $op) {
switch($op) {
case 'load':
// Change the weekday's format and set the first day of the week to sunday.
$calendar->weekdays = array(
'su' => 'S',
'mo' => 'M',
'tu' => 'T',
'we' => 'W',
'th' => 'T',
'fr' => 'F',
'sa' => 'S',
);
break;
}
}
The key here and what I was doing wrong was naming the module files I was creating mycalendar_calendar_blocks and this was incorrect. As soon as I just mycalendar in the file name all worked will.
Finally just put your newly created module in the modules folder for your site and activate the module as normal.
Hope this helps
Thomas
Comment #3
amogiz commentedI realy appreciate your tuto and it works fine :)
Now, could you explain us maybe how to "communicate" with a date cck field ?
It would be Heaven …
Thanx
Comment #4
jbomb commented#574828: Help integration has been marked duplicate, updating title.