hello
i know there is already a issue about this topic but i cant find it anymore :(
sorry for openening a new one!
i need the fullcalendar to show 3 Month instead of only 1 Month.
The default output is just 1 month, right?
Or can i change it by simple configure the fullcalendar module?
at the moment iam pretty sure its only possible by e.g. hacking some php code
into the body field of a node like this:
// Set number of months to display
$amount = 3;
$today = getdate();
// To debug, view the array
// print_r($today);
// Date elements now $today[year], $today[mon], $today[mday]
// Start with previous month if today is before the middle of current month
if ($today["mday"] <= 15)
{
$today["mon"]--;
if ($today["mon"] == 0)
{ $today["year"]--;
$today["mon"] = 12;
}
}
// Display months, one by one
for ($i=1;$i<=$amount;$i++)
{
// i created a view with a cck date field and placed it into a contentype
$view = views_get_view('calendar');
$view->set_display('block');
$view->set_arguments(array($today["year"].'-'.$today["mon"]));
print $view->preview();
$today["mon"]++;
if ($today["mon"] == 13)
{ $today["year"]++;
$today["mon"] = 1;
}
}
this work's fine eccept i get 3 times the same month
because i dont get the right Contextual filters settings!
$view->set_arguments(array($today["year"].'-'.$today["mon"]));
how do i have to setup the context.filter
so that will match this argument ?
what i tryed:
->Provide default value Type 'Raw value from URL' (?)
okay but then wich 'Path component' numbering do i have to choose?
the url to the calendar is
/calendar
so i would guess it's the 2nd one
but it did not work!
well, i get 3 month displayed but all of some containing the same data of
the currend month...
now iam stuck ..
someone an idea?
happy about any advice!!
Comments
Comment #1
cocq commentedHi,
Here is the solution I found in this forum some weeks ago
this work fine but I would like to update the "next" link (and obviously the "previous" : by default, the "next" jump to the following month, but I would like to jump from 3 to 3....
So, I would like to find this code again in order to ask the question, but i did not succeed...
if you have an idea!
rgds
Comment #2
mmtt commentedWhere to put this code? How are the 3 month displayed? one after the other? Are there other solutions to get a 3-month-display or maybe more month displayed?
Comment #3
dddave commentedIt seems that you would put this code into the body of a node using the php filter. Caution: This is very far from being best practice.
Comment #4
izmeez commentedSo this code should be put into a custom module.
Comment #5
spanners commentedI tried creating a simple custom module with the above code in #1, but as soon as I enable the module I get a 500 error.
I looked in my log and the following notice was there...
I just created a folder sites/all/modules/fullcalendar_extend and added the following two files (attached).
It looks like there is French in there. My website is English. Do I need to update this module to use an English version of the FullCalendar module and library?
Any help would be greatly appreciated.
Comment #6
timellemeet commentedIsnt this a matter of patching fullcalendars Javascript instead of php, as Views essentially outputs all items and fullcalendars Javascript displays it in whatever format?
Comment #7
dcam commentedI've volunteered to help clean up the FullCalendar issue queue. As part of that effort I'm closing issues open for unsupported versions of the module as "Closed (outdated)". That includes any Drupal 7-compatible versions because no active maintainer is supporting them.
If this issue is still relevant for version 3.x of FullCalendar, then feel free to re-open it and update the issue version number.