Forums

Ajax Event Calendar - how to add event description to upcoming eventlist (3 posts)

  1. earthtojeremy
    Member
    Posted 5 months ago #

    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

  2. Bratarath
    Member
    Posted 4 months ago #

    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.

  3. RitaDRobinette
    Member
    Posted 2 months ago #

    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]

Reply

You must log in to post.

About this Topic