WordPress.org

Support

Support » Plugins and Hacks » Pls more chars in the event title

Pls more chars in the event title

  • I’ve manipulated the line

    VARCHAR(30)

    to VARCHAR(300)

    in the Database and also changed

    <input type="text" name="event_title" class="input" size="40" maxlength="30" value="<?php if ( !empty($data) ) echo htmlspecialchars(stripslashes($data->event_title)); ?>" />

    to <input type="text" name="event_title" class="input" size="60" maxlength="300" value="<?php if ( !empty($data) ) echo htmlspecialchars(stripslashes($data->event_title)); ?>" />

    in the source code, so that it is possible to have long event names. I would appreciate if you could implement this in the core of calendar plugin, so I’m update safe. 😉

    http://wordpress.org/extend/plugins/calendar/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Kieran O'Shea
    Member

    @kieranoshea

    The problem here is that when displaying the calendar on a page, an event title as long as 300 characters would almost certainly wrap and look unsightly in the mouse over. Is there something you have done to your instance to mitigate this?

    I use this CSS, with that it looks fine:

    .onecolumnp {
    margin:0;
    }
    .calnka:hover {
    background-position:00;
    text-decoration:none;
    color:#000000;
    }
    .calnka:visited {
    text-decoration:none;
    color:#000000;
    }
    .calnka {
    text-decoration:none;
    color:#000000;
    }
    .calnkaspan {
    display:none;
    }
    .calnka:hoverspan {
    color:#333333;
    display:block;
    position:absolute;
    margin-top:1px;
    padding:5px;
    width:350px;
    z-index:100;
    line-height:1.8em;
    }
    .calendar-table {
    border:none;
    width:100%;
    }
    .calendar-heading {
    height:25px;
    text-align:center;
    border:1pxsolid#D6DED5;
    background-color:#E4EBE3;
    }
    .calendar-next {
    width:25%;
    text-align:center;
    }
    .calendar-prev {
    width:25%;
    text-align:center;
    }
    .calendar-month {
    width:50%;
    text-align:center;
    font-weight:bold;
    font-size:1.8em;
    }
    .normal-day-heading {
    text-align:center;
    width:25px;
    height:25px;
    font-size:13px;
    border:1pxsolid#DFE6DE;
    background-color:#EBF2EA;
    }
    .weekend-heading {
    text-align:center;
    width:25px;
    height:25px;
    font-size:13px;
    border:1pxsolid#DFE6DE;
    background-color:#EBF2EA;
    color:#FF0000;
    }
    .day-with-date {
    vertical-align:text-top;
    text-align:left;
    line-height:1.2em;
    width:60px;
    height:60px;
    border:1pxsolid#DFE6DE;
    }
    .no-events {
    }
    .day-without-date {
    width:60px;
    height:60px;
    border:1pxsolid#E9F0E8;
    }
    span.weekend {
    color:#FF0000;
    }
    .current-day {
    vertical-align:text-top;
    text-align:left;
    line-height:1.2em;
    width:60px;
    height:60px;
    border:1pxsolid#BFBFBF;
    background-color:#E4EBE3;
    }
    span.event {
    color:#333;
    font-size:13px;
    line-height:18px;
    }
    .calendar-date-switcher {
    height:25px;
    text-align:center;
    border:1pxsolid#D6DED5;
    background-color:#E4EBE3;
    }
    .calendar-date-switcherform {
    margin:0;
    padding:0;
    }
    .calendar-date-switcherinput {
    border:1px#D6DED5solid;
    }
    .calendar-date-switcherselect {
    border:1px#D6DED5solid;
    }
    .cat-key {
    width:100%;
    margin-top:10px;
    padding:5px;
    border:1pxsolid#D6DED5;
    }
    .calnka:hoverspanspan.event-title {
    padding:0;
    text-align:left;
    font-weight:bold;
    font-size:13px;
    line-height:18px;
    }
    .calnka:hoverspanspan.event-title-break {
    text-align:left;
    }
    .calnka:hoverspanspan.event-content-break {
    text-align:left;
    }
    .page-upcoming-events {
    font-size:80%;
    }
    .page-todays-events {
    font-size:80%;
    }

    Btw. these two lines also has to be changed to “300” to make more chars work…

    line 1172

    // The title must be at least one character in length and no more than 30
    if (preg_match('/^.{1,30}$/',$title))

    line 1333

    // The title must be at least one character in length and no more than 30
    if (preg_match('/^.{1,30}$/',$title))

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Pls more chars in the event title’ is closed to new replies.