• Resolved frisii

    (@frisii)


    I noticed that when I added My Calendar to my website, the Fridays column in the month view was very different from the other weekdays.

    It took a bit of searching but I traced the problem to this bit of the cell code for that particular table:

    <td class='no-events vrijdag <span style="text-decoration: underline;">vr</span> past-day past-date no-events day-with-date'>

    The abbreviation “vr” is the short name for Friday in the Dutch language and the <span style=”text-decoration: underline;”>vr</span> class is defined in the css of the Minimal Muse theme (which I don’t want to get rid of) but this is causing the look of those particular cells to be way off. Very annoying.

    The static css of the My Calendar plugin does not seem contain any definitions for vr but it could be generated dynamically somehow. I’m pretty sure this class tag is generated in the My Calendar code somewhere but I don’t know where (yet).

    I may be able to fix it in my install but then it has a good chance of getting wiped at the next update so if (and that’s a big if) I manage to fix this I’ll post it here for review and hopefully it will be merged into the next update. If (more likely) I don’t manage to find and fix this I hope someone will post a solution here.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter frisii

    (@frisii)

    The problem seems to come out of the $dateclass variable in my-calendar-output.php, which is generated by the function mc_dateclass() in date-utilities.php.

    The line containing sanitize_html_class( strtolower( date_i18n( 'D', $current ) ) ); being the actual culprit here.

    The full line in there was $dayclass = sanitize_html_class( strtolower( date_i18n( 'l', $current ) ) ) . ' ' . sanitize_html_class( strtolower( date_i18n( 'D', $current ) ) ); which I commented out and added a line below without the culprit to have a proper Friday column in my calendar now.

    Now this is actually a hack and not a fix (at least I’d classify it as such) but my knowledge of css and php are practically zero so I don’t have an elegant fix for this right now.

    Thread Starter frisii

    (@frisii)

    Oh crap I just noticed the original post instead of showing bold and underlines shows the code for bold and underline instead. Well luckily I managed to trace the problem. Hopefully someone will come up with a proper fix for this.

    Plugin Author Joe Dolson

    (@joedolson)

    Yes, My Calendar adds the day abbreviation in the current language as a class on table cells. That’s probably not something I’ll change anytime soon, as it would potentially break custom CSS for users, and I have no way to predict the impact it could have.

    It would probably make the most sense to override your theme’s CSS for this context; something like

    .mc-main td.vr {
       // your overrides here.
    }

    I can’t really provide specific feedback about the overrides you need, not knowing what your theme is doing or the level of specificity used.

    Thread Starter frisii

    (@frisii)

    This bit of additional CSS seems to have done the trick:

    .mc-main .mc-content td.vr {
    display: table-cell;
    align-self: unset;
    width: unset;
    min-height: unset;
    opacity: unset;
    }

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problem with My Calendar under Minimal Muse in Dutch’ is closed to new replies.