Pixelpadre fix:
1. \includes\templates\YourTemplate\common\tpl_main_page.php
change
Code:
<?php
}
?>
<!--eof- banner #6 display -->
</body>
to
Code:
<!--eof- banner #6 display -->
</body>
<?php
}
?>
2. To change the sidebox subheading from "MonthYear <>" to "<< MonthYear >>", in \includes\classes\calendar.php, replace the following code within function getMonthHTML($m, $y, $show = 0):
Code:
$prevMonth = '<a href=index.php?main_page='. FILENAME_EVENTS_CALENDAR_INCLUDE . '&eventmode=eventframe' .$this->getCalendarLink($prev[0], $prev[1]).' target=calendar title='. $this->monthNames[$month - 2] . (($month-2 < 1) ? $D.($year-1) : ' '. $year) .' ><</a>';
$nextMonth = '<a href=index.php?main_page='. FILENAME_EVENTS_CALENDAR_INCLUDE . '&eventmode=eventframe' . $this->getCalendarLink($next[0], $next[1]).' target=calendar title='. $this->monthNames[$month + 0] . (($month+0 > 11) ? $J.($year+1) : ' '. $year) .' >></a>';
}
else
{
$prevMonth = "";
$nextMonth = "";
}
$s .= "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n";
$s .= "<tr class=\"calendarHeader\">\n";
$linkHeader = zen_href_link(FILENAME_EVENTS_CALENDAR, "_month=$month&_year=$year");
$s .= "<td align=\"left\"><a href=\"$linkHeader\" target=\"_parent\">$header</a></td>\n";
$s .= "<td align=\"center\" class=\"yearHeader\">\n";
if(mktime (0,0,0,$month ,0,$year) > mktime (0,0,0,$this_month ,0,$this_year))
{
$s .= $prevMonth;
}
else
{
$s .= $prevMonth;
}
$s .= "</td>\n";
$s .= "<td align=\"center\" class=\"yearHeader\">$nextMonth</td></tr>\n";
$s .= "<tr><td colspan=\"3\">\n";
with
Code:
$prevMonth = '<a href=index.php?main_page='. FILENAME_EVENTS_CALENDAR_INCLUDE . '&eventmode=eventframe' .$this->getCalendarLink($prev[0], $prev[1]).' target=calendar title='. $this->monthNames[$month - 2] . (($month-2 < 1) ? $D.($year-1) : ' '. $year) .' ><<</a>';
$nextMonth = '<a href=index.php?main_page='. FILENAME_EVENTS_CALENDAR_INCLUDE . '&eventmode=eventframe' . $this->getCalendarLink($next[0], $next[1]).' target=calendar title='. $this->monthNames[$month + 0] . (($month+0 > 11) ? $J.($year+1) : ' '. $year) .' >>></a>';
}
else
{
$prevMonth = "";
$nextMonth = "";
}
$s .= "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n";
$s .= "<tr class=\"calendarHeader\">\n";
$linkHeader = zen_href_link(FILENAME_EVENTS_CALENDAR, "_month=$month&_year=$year");
$s .= "<td align=\"left\" class=\"yearHeader\">\n";
if(mktime (0,0,0,$month ,0,$year) > mktime (0,0,0,$this_month ,0,$this_year))
{
$s .= $prevMonth;
}
else
{
$s .= $prevMonth;
}
$s .= "</td>\n";
$s .= "<td align=\"center\"><a href=\"$linkHeader\" target=\"_parent\">$header</a></td>\n";
$s .= "<td align=\"right\" class=\"yearHeader\">$nextMonth</td></tr>\n";
$s .= "<tr><td colspan=\"3\">\n";
2a. If you only want "< Month Year >" instead of "<< Month Year >>" in the above code, replace:
Code:
$prevMonth = '<a href=index.php?main_page='. FILENAME_EVENTS_CALENDAR_INCLUDE . '&eventmode=eventframe' .$this->getCalendarLink($prev[0], $prev[1]).' target=calendar title='. $this->monthNames[$month - 2] . (($month-2 < 1) ? $D.($year-1) : ' '. $year) .' ><<</a>';
$nextMonth = '<a href=index.php?main_page='. FILENAME_EVENTS_CALENDAR_INCLUDE . '&eventmode=eventframe' . $this->getCalendarLink($next[0], $next[1]).' target=calendar title='. $this->monthNames[$month + 0] . (($month+0 > 11) ? $J.($year+1) : ' '. $year) .' >>></a>';
with
Code:
$prevMonth = '<a href=index.php?main_page='. FILENAME_EVENTS_CALENDAR_INCLUDE . '&eventmode=eventframe' .$this->getCalendarLink($prev[0], $prev[1]).' target=calendar title='. $this->monthNames[$month - 2] . (($month-2 < 1) ? $D.($year-1) : ' '. $year) .' ><</a>';
$nextMonth = '<a href=index.php?main_page='. FILENAME_EVENTS_CALENDAR_INCLUDE . '&eventmode=eventframe' . $this->getCalendarLink($next[0], $next[1]).' target=calendar title='. $this->monthNames[$month + 0] . (($month+0 > 11) ? $J.($year+1) : ' '. $year) .' >></a>';
2b. To show "<< Month >>" instead of "<< Month Year >>", change:
Code:
function getMonthHTML($m, $y, $show = 1)
to
Code:
function getMonthHTML($m, $y, $show = 0)
2c. To add some lines of space after the whole Year calendar view table in the centre column, replace this code
Code:
$s .= "</table>\n";
return $s;
}
function adjustDate($month, $year)
with
Code:
$s .= "</table>\n";
$s .= "<br/><br/>\n";
return $s;
}
function adjustDate($month, $year)
For more lines, add more <br />.
3. This mod needs to be tested against the latest zencart upgrade 1.3.9.