Calendar Navで向こう4ヶ月のカレンダーを表示させるには?

2012年2月20日 at 22:39

初めて投稿させて頂きます。
concrete5のアドオンで、Calendar Naveをインストールしました。
向こう4ヶ月のカレンダーを表示させたいのですが、
1ヶ月分しか表示されません。解決策を教えてください。

http://ashiyanpo.net/meeting/

タグ:

Re: Calendar Navで向こう4ヶ月のカレンダーを表示させるには?

2012年2月20日 at 23:26
カスタムテンプレートを使い、1ヶ月後を表示するテンプレート、2ヶ月後を表示するテンプレート、3ヶ月後を表示するテンプレートを作成し、1ページに4つカレンダーをブロックとして並べたらいけると思います!

カスタムテンプレートの使い方
http://concrete5-japan.org/help/developer/block_custom_template/

Calendar Navのview.php
$(document).ready( function() {
// attach the mouseover class
$('.surefyre_calendar_row .surefyre_calendar_cell').live('mouseover', function() {
$(this).addClass('surefyre_calendar_hover');
});
$('.surefyre_calendar_row .surefyre_calendar_cell').live('mouseout', function() {
$(this).removeClass('surefyre_calendar_hover');
});

// handle clicks
$('.surefyre_calendar_cell').live('click', function(e) {
var list_page = <?php echo $listPage; ?>;
if($(this).is('.surefyre_calendar_highlight')) {
var id = $(this).attr('id');
top.document.location = '/index.php?cID=' + list_page + '&d=' + escape(id);
}
});

// prevnext
$('.surefyre_calendar_prev').live('click', function(e) {
output_surefyre_calendar(cur_year, cur_month, cur_day);
});

$('.surefyre_calendar_next').live('click', function(e) {
output_surefyre_calendar(cur_year, cur_month+2, cur_day);
});

output_surefyre_calendar(<?php echo date('Y') . ', ' . date('m') . ', ' . date('d');?>);
});

function output_surefyre_calendar(year, month, day) {


カスタムテンプレート(1ヶ月後)
$(document).ready( function() {
<?php $next = mktime(0, 0, 0, date('n')+1, date('j'), date('Y')); ?>
output_surefyre_calendar_next(<?php echo date('Y',$next) . ', ' . date('m',$next) . ', ' . date('d',$next);?>);
});

function output_surefyre_calendar_next(year, month, day) {
 

Re: Calendar Navで向こう4ヶ月のカレンダーを表示させるには?

2012年3月3日 at 6:16
hissy伯爵、ありがとうございました。
無事、解決しました。

カスタムテンプレートの作り方は、こうやるんですね^^
勉強になりました。