• Hi there, I love this plugin it’s just what I’m looking for!
    Is it possible to extract the description from an event? As I can read in the documentation you can only extract the title.

    Thank you very much

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author kimipooh

    (@kimipooh)

    Thank you for your question.
    Yes, you are right. The current version hasn’t the function. You can read the description by click on the title link.
    ex. “Event List2 on https://en.kyoto.cseas.kyoto-u.ac.jp/

    Of course, I can add it if it’s meaningful.

    What kind of situation do you want to extract a description? The purpose of the plugin is the list view of Google Calendar. If a description is long, I think that it becomes hard to read the list.

    Thread Starter justsousa

    (@justsousa)

    Thank you kimipooh. Description won’t be so long: we’ll use google calendar to show our customer’s tour dates in the wp website. We don’t need the link to the event’s calendar, or rather if need there will be a link to the ticket sellers but in the text.

    ex. “Event Title Festival x / Buy ticket

    Considering that our customer should set the link (if need), we can’t use the title field so w’re thinking to use the description field: using the description area is possible to add a link to any word.

    If I’m not wrong I’ll add a couple of lines to your plugin:

    line 131: $gc_description = esc_html($gc_value['description']);
    line 156: 'gc_description'=> $gc_description,

    so ee should be able to get the formatted text set in the google calendar event’s description.

    What do you think?

    Thank you,
    Dario

    Plugin Author kimipooh

    (@kimipooh)

    O.K. I understand your request.

    I added the value “gc_descriotion” on the hook on version 4.4.
    Please update this plugin to version 4.4.

    ex.
    shortcode (added hook_secret_key=”[secret strings]”)
    [gc_list_view hook_secret_key=”hogehoge”]

    functions.php on a theme (use the hook)

    add_filter( 'lvgc_each_output_data' , 'lvgc_each_output_data_fix' , 10 , 2 );
    
    function lvgc_each_output_data_fix($out, $out_atts){
      extract($out_atts);
      $hook_secret_key = 'hogehoge'; // setting up the value of "hook_secrey_key" on the shortcode.
    
      $out = <<< ___EOF___
        <li class="${html_tag_class}_item"><span class="${html_tag_class}_date">$start_date_value</span> $gc_title</a><br/>$gc_description</li>
    
    ___EOF___;
    
      return array('hook_secret_key'=>$hook_secret_key, 'data'=>$out);
    }
    Thread Starter justsousa

    (@justsousa)

    Thank you kimipooh. It works but we can’t extract the description as hypertext (we need for text linked in the description). Is there a way to get the hypertext description?

    We also can’t filter the events by year. We’re using this shortcode: [gc_list_view start_date=”2017-01-01″ end_date=”2017-12-31″ hook_secret_key=”hogehoge”]
    Do we get anything wrong?

    Thank you

    Plugin Author kimipooh

    (@kimipooh)

    Thank you for the inquiry.

    I fixed “start_date” and “end_date” shortcode’s option bug on version 4.5.
    Please update the plugin.

    The security issue needs to be resolved for resolving the escape issue of the description. I’m going to consider it…

    Plugin Author kimipooh

    (@kimipooh)

    Version 4.6 was allowed HTML tag on “description” of Google Calendar (escaped wp_kses_post function).

    Please update to version 4.6.

    Thread Starter justsousa

    (@justsousa)

    Hi Kimipooh, that’s just what we need and it works very good!

    Thank you very much!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Extract the description from an event’ is closed to new replies.