Events Made Easy Forums How do I … calendar php file

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #42585
    Anonymous
    Inactive

    I’d like to edit the calendar php file so that when it compiles the calendar it includes the weekday name in the class name. Right now, it just puts eventless-pre, eventless, etc… I’ve tried adding to the function that creates these particular tables but it always breaks it. Basically I want to be able to have the day table classes say:

    <td class=”eventless-pre Mon”>

    That way I can edit the css to modify the days of the week, like blacking out Mondays because the club isn’t open those days that I’m using this calendar for.

    I know where the php is I need to edit, I’m just having issues doing so.

    // Now we break each key of the array

    // into a week and create a new table row for each

    // week with the days of that week in the table data

    $i = 0;

    $curr_day=date(‘j’);

    $curr_month=date(‘m’);

    $curr_year=date(‘Y’);

    foreach ($weeks as $week) {

    $calendar .= “<tr>n”;

    foreach ($week as $d) {

    if ($i < $offset_count) { //if it is PREVIOUS month

    $calendar .= “<td class=’eventless-pre’>$d</td>n”;

    }

    if (($i >= $offset_count) && ($i < ($num_weeks * 7) – $outset)) {

    // if it is THIS month

    if($d == $curr_day && $month == $curr_month && $year == $curr_year) {

    $calendar .= “<td class=’eventless-today’>$d</td>n”;

    } else {

    $calendar .= “<td class=’eventless’>$d</td>n”;

    }

    } elseif(($outset > 0)) {

    //if it is NEXT month

    if(($i >= ($num_weeks * 7) – $outset)) {

    $calendar .= “<td class=’eventless-post’>$d</td>n”;

    }

    }

    $i++;

    }

    $calendar .= “</tr>n”;

    }

    $calendar .= ” </table>n</div>”;

    #47017
    Franky
    Keymaster

    Don’t do that … just use the available filters for this:

    http://www.e-dynamics.be/wordpress/?cat=41

    #47018
    Anonymous
    Inactive

    I’ve never really used filters with wordpress at all, so I’ll take a look into that, thanks! Any pointers on doing something like this?

    #47019
    Franky
    Keymaster

    The pointers are also in that link 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top