[EventCalendar] issue with month

Alex Tingle alex at firetree.net
Mon Feb 9 02:38:36 UTC 2009


Mike,

"caption" elements go inside "table" elements - you can't move them around
without profoundly breaking things. If you want to learn HTML, then hacking
Event-Calendar is probably not the place to start.

-Alex

--

Mike Osterhout wrote:
> 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;
>  }
> 
> 
> 
> _______________________________________________
> Blog: http://wpcal.firetree.net/
> EventCalendar at firetree.net mailing list
> Unsubscribe: http://penguin.firetree.net/eventcalendar


-- 
:: Let me solve your problems: http://www.firetree.net/alex/
:: alex.tingle AT firetree.net  +44-7901-552763

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://penguin.firetree.net/pipermail/eventcalendar/attachments/20090209/350d5679/signature.pgp


More information about the EventCalendar mailing list