Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Drupal 6.16
Calendar 6x-2.2 (with calendar Popup module enabled)
Views 6x-2.10
The following code displays events for the current date in the calendar view header. Problem is that I can not get the event's detail popup to display event node teaser like it does from the calendar month view. When the link in the header is clicked the popup opens but is empty.
Any suggestions on how to get this to work?
Thanks!
<?php
//date_now() is a Drupal function which accounts for user selected time zone.
$today_date = strtotime(date_now() ->format("Y-m-d"));
// load view object
$view = views_get_current_view();
// execute view query
$view->execute();
foreach ( $view->result as $result ) {
$event_date = strtotime($result->node_data_field_spec_event_date_field_spec_event_date_value);
if ($event_date == $today_date) {
print "<b>$result->node_title</b><br />";
print '<a class="popup" href="http://example.com/node/' . $result->nid . '"><b>' . $result->node_title . '</b></a><br />';
print '<br />';
}
}
?>
Comments
Comment #1
WiredEscape CreditAttribution: WiredEscape commentedFound the following code in '\modules\calendar\jcalendar\jcalendar.js' which creates the popup which display node content in bubble.
Could someone explain how the NodeID and ItemID vars are being grabbed by this JS in the calendar view but are not accessible from within the view header?
What do I need to add to code in view header to make this JS work on the link in the view header?
Much appreciated!
Comment #2
NickDickinsonWilde6.x is entirely unmaintained.