>
The arrows jump 3 months back or forward.
To achieve this, edit the function.displaycalendar.php file.
Replace:
Code: Select all
$prev_month['timestamp'] = strtotime("-1 month", mktime(0,0,0,$month, 1, $year));
$prev_month['year'] = date('Y', $prev_month['timestamp']);
$prev_month['month'] = date('n', $prev_month['timestamp']);
$next_month['timestamp'] = strtotime("+1 month", mktime(0,0,0,$month, 1, $year));
$next_month['year'] = date('Y', $next_month['timestamp']);
$next_month['month'] = date('n', $next_month['timestamp']);
Code: Select all
$prev_month['timestamp'] = strtotime("-1 month", mktime(0,0,0,$month, 1, $year));
$prev_month['year'] = date('Y', $prev_month['timestamp']);
$prev_month['month'] = date('n', $prev_month['timestamp']);
$prev_month1['timestamp'] = strtotime("-2 month", mktime(0,0,0,$month, 1, $year));
$prev_month1['year'] = date('Y', $prev_month1['timestamp']);
$prev_month1['month'] = date('n', $prev_month1['timestamp']);
$prev_month2['timestamp'] = strtotime("-3 month", mktime(0,0,0,$month, 1, $year));
$prev_month2['year'] = date('Y', $prev_month2['timestamp']);
$prev_month2['month'] = date('n', $prev_month2['timestamp']);
$next_month['timestamp'] = strtotime("+1 month", mktime(0,0,0,$month, 1, $year));
$next_month['year'] = date('Y', $next_month['timestamp']);
$next_month['month'] = date('n', $next_month['timestamp']);
$next_month1['timestamp'] = strtotime("+2 month", mktime(0,0,0,$month, 1, $year));
$next_month1['year'] = date('Y', $next_month1['timestamp']);
$next_month1['month'] = date('n', $next_month1['timestamp']);
$next_month2['timestamp'] = strtotime("+3 month", mktime(0,0,0,$month, 1, $year));
$next_month2['year'] = date('Y', $next_month2['timestamp']);
$next_month2['month'] = date('n', $next_month2['timestamp']);
Code: Select all
$navigation['next'] = $module->CreateLink($id, 'default', $returnid, '', array('year'=>$next_month['year'], 'month'=>$next_month['month']), '', true, true, '', false );
$navigation['prev'] = $module->CreateLink($id, 'default', $returnid, '', array('year'=>$prev_month['year'], 'month'=>$prev_month['month']), '', true, true, '', false );
Code: Select all
$navigation['prev'] = $module->CreateLink($id, 'default', $returnid, '', array('year'=>$prev_month['year'], 'month'=>$prev_month['month']), '', true, true, '', false );
$navigation['prev1'] = $module->CreateLink($id, 'default', $returnid, '', array('year'=>$prev_month1['year'], 'month'=>$prev_month1['month']), '', true, true, '', false );
$navigation['prev2'] = $module->CreateLink($id, 'default', $returnid, '', array('year'=>$prev_month2['year'], 'month'=>$prev_month2['month']), '', true, true, '', false );
$navigation['next'] = $module->CreateLink($id, 'default', $returnid, '', array('year'=>$next_month['year'], 'month'=>$next_month['month']), '', true, true, '', false );
$navigation['next1'] = $module->CreateLink($id, 'default', $returnid, '', array('year'=>$next_month1['year'], 'month'=>$next_month1['month']), '', true, true, '', false );
$navigation['next2'] = $module->CreateLink($id, 'default', $returnid, '', array('year'=>$next_month2['year'], 'month'=>$next_month2['month']), '', true, true, '', false );
Code: Select all
$module->smarty->assign_by_ref('prev_month', $prev_month['month']);
$module->smarty->assign_by_ref('prev_month1', $prev_month1['month']);
$module->smarty->assign_by_ref('next_month', $next_month['month']);
$module->smarty->assign_by_ref('next_month1', $next_month1['month']);
Then, in your "Calendar Template", change:
Code: Select all
<caption class="calendar-month"><span class="calendar-prev"><a href="{$navigation.prev}">«</a></span> {$month_names[$month]} {$year} <span class="calendar-next"><a href="{$navigation.next}">»</a></span></caption>
Code: Select all
{if $table_id eq "big"}
<caption class="calendar-month">
<span class="calendar-prev">
<a href="{$navigation.prev2}">«</a>
<a href="{$navigation.prev1}">{$month_names[$prev_month1]|truncate:3:""}</a>
<a href="{$navigation.prev}">{$month_names[$prev_month]|truncate:3:""}</a>
</span>
{$month_names[$month]} {$year}
<span class="calendar-next">
<a href="{$navigation.next}">{$month_names[$next_month]|truncate:3:""}</a>
<a href="{$navigation.next1}">{$month_names[$next_month1]|truncate:3:""}</a>
<a href="{$navigation.next2}">»</a>
</span>
</caption>
{else}
<caption class="calendar-month"><span class="calendar-prev"><a href="{$navigation.prev}">«</a></span> {$month_names[$month]} {$year} <span class="calendar-next"><a href="{$navigation.next}">»</a></span></caption>
{/if}
http://www.petgranny.com/index.php?page ... g-calendar
Nullig