• Hello –

    I’m using the Ajax Event Calendar plugin and I want to include the event description in the upcoming events eventlist function. I’m not very PHP literate but I’ve isolated the code that renders the eventlist, around line 800 in ajax-event-calendar.php:

    $out .= '<li class="fc-event round5' . $class . '" onClick="jQuery.aecDialog({\'id\':' . $row->id . ',\'start\':\'' . $row->start . '\',\'end\':\'' . $row->end . '\'});">';
    					$out .= '<span class="fc-event-time">';
    					$out .= $row->start_date;
    
    					if (!$row->allDay) {
    						$out .= ' ' . $row->start_time;
    					}
    					$out .= '</span>';
    					$out .= '<span class="fc-event-title">' . $this->render_i18n_data($row->title) . '</span>';
    					$out .= '</li>';

    I’ve tried a couple different things to call up the description text:

    $out .= '<span class="description">' . $this->render_i18n_data($row->description) . '</span>';

    Didn’t work. Tried this:

    $out .= '<p class="description">{$description}</p>';

    Didn’t work, and I’m out of ideas. Anyone have any suggestions?

    Thanks,
    Jeremy

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi there,

    You’ve got to modify the function db_query_events around line 1260 and add description, after title, in the result query

    [Code moderated as per the Forum Rules. Please use the pastebin]

    2 Add ‘description’ => $input->description, after ‘title’ => $input->title
    in the function ‘generate_event’ (around line 1010)

    [Code moderated as per the Forum Rules. Please use the pastebin]

    And now you can add
    $out .= '<span class="fc-event-title">' . $this->render_i18n_data($row->description) . '</span>';
    in the ‘render_eventlist_events’ function.

    That should be working fine.

    I tried this and it didn’t work. Please review code and let me know what might be wrong. Thanks.

    [1359 lines of code moderated as per the Forum Rules. The limit is 10 lines, Please use the pastebin]

    Didn’t work for me either. This would be a great help, I can see there’s a lot of people out there looking for that same feature.

    I am trying for the same thing – to show excerpts from the description on the page as well as in the sidebar in Upcoming Events.

    I reproduced the code

    $out .= ‘<span class=”description”>’ .
    $this->render_i18n_data($row->description) . ‘</span>’; (instead of the suggested $out .= ‘<span class=”fc-event-title”>’ . $this->render_i18n_data($row->description) . ‘</span>’; which resulted in a fatal error).
    The code I used shows at least the following in FireBug:
    <span class=”description”></span>
    But nothing shows up on the page or in the sidebar. Is there any way to
    improve on the code?

    Also, it seems that this forum is hardly getting any support from the developers which is a shame.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Ajax Event Calendar – how to add event description to upcoming eventlist’ is closed to new replies.