[EventCalendar] issue with month

Mike Osterhout mikeosterhout at gmail.com
Sun Feb 8 19:04:48 UTC 2009


Alright I was able to hack the code to get it to work better with my theme.

I changed this section:
// Make a table for this month.
    $title = sprintf(
        __('View posts for %1$s %2$s'),
        $this->dateobj->month_name(),
        $this->dateobj->year_num
      );
    $result =  '<table 
id="'.$this->id.'-'.$this->dateobj->month_id().'">'."\n"
      . '<caption>'
      . '<a href="' . $this->dateobj->month_link($this->show_only_events)
      . '" title="' . $title . '">'
      . $this->dateobj->month_name() . ' ' . $this->dateobj->year_num . 
"</a>"
      . "</caption>\n"
      . $this->_thead
      . "<tbody>\n" . $monthstr . "</tbody>\n</table>\n";
    return $result;
  }


To This:--- Notice I moved the caption to the top and center aligned it. 
However this breaks the php code and doesnt update the caption on 
previous next.
You can check it out at http://www.aquaculturetalk.com. I am guessing it 
is because I have <caption> by itself now, but my PHP skills are very 
minimal to say the least.

// Make a table for this month.
    $title = sprintf(
        __('View posts for %1$s %2$s'),
        $this->dateobj->month_name(),
        $this->dateobj->year_num
      );
    $result = '<caption>'
      . '<table id="'.$this->id.'-'.$this->dateobj->month_id().'">
        <div align="center">'."\n"
      . '<a href="' . $this->dateobj->month_link($this->show_only_events)
      . '" title="' . $title . '">'
      . $this->dateobj->month_name() . ' ' . $this->dateobj->year_num . 
"</a>"
      . "</div>
        </caption>\n"
      . $this->_thead
      . "<tbody>\n" . $monthstr . "</tbody>\n</table>\n";
    return $result;
  }





More information about the EventCalendar mailing list