WPIntell

Source evidence

Group by month

List View Google Calendar · support · 2022-02-01T19:56:00+00:00

complaintsentiment
mediumseverity
0.93relevance
8replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 26 rows with source links

15.4% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

22 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
De Werkkamer unresolved
Hi, Is it possible to group the data by month like: February Date 1 Date 2 Date 3 March Date 4 April Date 5 Date 6 ect Thanks! This topic was modified 4 years, 3 months ago by De Werkkamer . Thank you for having an interesting my plugin. I implemented the special shortcode option by version 6.7. Please update the plugin on version 6.7 and set html_tag=“li-month” shortcode option. ex. [gc_list_view html_tag=”li-month”] Awesome! Thank you! Do you have an example how to customize this in functions.php? you can be customized using the hook function. For more information, please refer to “How to use Hooks” in the following document. https://info.cseas.kyoto-u.ac.jp/en/links-en/plugin-en/wordpress-dev-info-en/google-calendar-list-view Hi, I did use the hook function with multiple ID’s but I don’t understand how to edit li-month. 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 = 'markiezaat'; if ($id === 'screen'): $out = <<< ___EOF___ <div class="${html_tag_class}_item"> <div class="details"> <span class="title">$output_category_temp $gc_title</span> <div style="clear:both"></div> <span class="date">$start_date_value</span> <span class="desc">$description</span> </div> </div> ___EOF___; elseif ($id === 'page'): $out = <<< ___EOF___ // Here I want to edit li-month structure ___EOF___; endif; return array('hook_secret_key'=>$hook_secret_key, 'data'=>$out); } Do I copy the code from library/tags/li-month.php, because than I get errors about $this. Also lang=”nl” is not working. The date is still in english instead of Dutch. Thanks! There was a problem customizing it with hooks, so I released a fixed version, 6.7.1. Note that the month names cannot be translated using the WordPress translation function. Therefore, month names are only available in English. If you want to make it multilingual, you need to build it in. A sample code is available at https://info.cseas.kyoto-u.ac.jp/en/links-en/plugin-en/wordpress-dev-info-en/google-calendar-list-view The sample code has been added to the “Notes on customizing li-month” section of The code shown would look like the following. 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 = 'markiezaat'; // Set a program to determine the language as follows. For Dutch, it will be nl_NL. //However, this may not be the case if you have installed multilingual plug-ins, so please check the actual value of get_locale. $lang = get_locale(); // var_dump(get_locale()); $convert_month = array( "nl_NL"=> array( "January" => "Januari", "February" => "Februari", "March" => "Maart", "April" => "April", "May" => "Mei", "June" => "Juni", "July" => "Juli", "August" => "Augustus", "September" => "Aeptember", "October" => "Oktober", "November" => "November", "December" => "December", ), ); if( !empty($month_value) && isset($convert_month[$lang])): foreach($convert_month[$lang] as $org_lang=>$con_lang): if($month_value === $org_lang): $month_value = $con_lang; break; endif; endforeach; endif; if ($id === 'screen'): $out = <<< ___EOF___ <div class="${html_tag_class}_item"> <div class="details"> <span class="title">$output_category_temp $gc_title</span> <div style="clear:both"></div> <span class="date">$start_date_value</span> <span class="desc">$description</span> </div> </div> ___EOF___; elseif ($id === 'page'): $out = ''; if($pre_start_date_month_value === $start_date_month_value): $month_value = ''; else: if( isset($month_value) && !empty($month_value) ) : $out .= <<< ___EOF___ </ul> ___EOF___; endif; endif; if( isset($month_value) && !empty($month_value) ) : $out .= <<< ___EOF___ <span style='font-weight: bold;' class='${html_tag_class}_item_month'>$month_value</span> <ul class='${html_tag_class}_item'> ___EOF___; endif; if ( isset($no_event_link) && !empty($no_event_link) ): $out .= <<< ___EOF___ <li class='${html_tag_class}_item'><span class='${html_tag_class}_date'>$start_date_value</span> $output_category_temp <span title="$gc_description_title">$gc_title</span> ___EOF___; else: $out .= <<< ___EOF___ <li class='${html_tag_class}_item'><span class='${html_tag_class}_date'>$start_date_value</span> $output_category_temp <a target="_blank" class='${html_tag_class}_link' href='$gc_link' title="$gc_description_title">$gc_title</a> ___EOF___; endif; if ( isset($view_location) && !empty($view_location) ): if( isset($view_location_name) && !empty($view_location_name) ): $location_header_name = $view_location_name; else: $location_header_name = __("Location:", $plugin_name); endif; $out .= <<< ___EOF___ <br/><span class='${html_tag_class}_location_head'>$location_header_name</span> <span class='${html_tag_class}_location'>$gc_location</span> ___EOF___; endif; $out .= <<< ___EOF___ </li> ___EOF___; endif; return array('hook_secret_key'=>$hook_secret_key, 'data'=>$out); } Changed to apply WordPress’ translation feature for month names on version 6.7.2. For more detail, please see “Notes on customizing li-month” section in https://info.cseas.kyoto-u.ac.jp/en/links-en/plugin-en/wordpress-dev-info-en/google-calendar-list-view . In your functions.php code, it would look something like this. 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 = 'markiezaat'; if ($id === 'screen'): $out = <<< ___EOF___ <div class="${html_tag_class}_item"> <div class="details"> <span class="title">$output_category_temp $gc_title</span> <div style="clear:both"></div> <span class="date">$start_date_value</span> <span class="desc">$description</span> </div> </div> ___EOF___; endif; return array('hook_secret_key'=>$hook_secret_key, 'data'=>$out); } Then, I think you set like this. in case of “id” is “screen”, set [gc_list_view hook_secret_key =”markiezaat” id=”screen”]. in case of “id” is “page”, set [gc_list_view hook_secret_key =”markiezaat” id=”page” html_tag=”li-month”]. This reply was modified 4 years, 3 months ago by kimipooh . Sorry, I didn’t have time to look at this earlier. But these updates are really great! Thank you!

Comments

8 shown
kimipooh 2022-02-04T06:31:00+00:00

Thank you for having an interesting my plugin. I implemented the special shortcode option by version 6.7. Please update the plugin on version 6.7 and set html_tag=“li-month” shortcode option. ex. [gc_list_view html_tag=”li-month”]

De Werkkamer 2022-02-05T14:37:00+00:00

Awesome! Thank you!

De Werkkamer 2022-02-05T16:52:00+00:00

Do you have an example how to customize this in functions.php?

kimipooh 2022-02-06T02:44:00+00:00

you can be customized using the hook function. For more information, please refer to “How to use Hooks” in the following document. https://info.cseas.kyoto-u.ac.jp/en/links-en/plugin-en/wordpress-dev-info-en/google-calendar-list-view

De Werkkamer 2022-02-06T12:25:00+00:00

Hi, I did use the hook function with multiple ID’s but I don’t understand how to edit li-month. 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 = 'markiezaat'; if ($id === 'screen'): $out = <<< ___EOF___ <div class="${html_tag_class}_item"> <div class="details"> <span class="title">$output_category_temp $gc_title</span> <div style="clear:both"></div> <span class="date">$start_date_value</span> <span class="desc">$description</span> </div> </div> ___EOF___; elseif ($id === 'page'): $out = <<< ___EOF___ // Here I want to edit li-month structure ___EOF___; endif; return array('hook_secret_key'=>$hook_secret_key, 'data'=>$out); } Do I copy the code from library/tags/li-month.php, because than I get errors about $this. Also lang=”nl” is not working. The date is still in english instead of Dutch. Thanks!

kimipooh 2022-02-07T09:24:00+00:00

There was a problem customizing it with hooks, so I released a fixed version, 6.7.1. Note that the month names cannot be translated using the WordPress translation function. Therefore, month names are only available in English. If you want to make it multilingual, you need to build it in. A sample code is available at https://info.cseas.kyoto-u.ac.jp/en/links-en/plugin-en/wordpress-dev-info-en/google-calendar-list-view The sample code has been added to the “Notes on customizing li-month” section of The code shown would look like the following. 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 = 'markiezaat'; // Set a program to determine the language as follows. For Dutch, it will be nl_NL. //However, this may not be the case if you have installed multilingual plug-ins, so please check the actual value of get_locale. $lang = get_locale(); // var_dump(get_locale()); $convert_month = array( "nl_NL"=> array( "January" => "Januari", "February" => "Februari", "March" => "Maart", "April" => "April", "May" => "Mei", "June" => "Juni", "July" => "Juli", "August" => "Augustus", "September" => "Aeptember", "October" => "Oktober", "November" => "November", "December" => "December", ), ); if( !empty($month_value) && isset($convert_month[$lang])): foreach($convert_month[$lang] as $org_lang=>$con_lang): if($month_value === $org_lang): $month_value = $con_lang; break; endif; endforeach; endif; if ($id === 'screen'): $out = <<< ___EOF___ <div class="${html_tag_class}_item"> <div class="details"> <span class="title">$output_category_temp $gc_title</span> <div style="clear:both"></div> <span class="date">$start_date_value</span> <span class="desc">$description</span> </div> </div> ___EOF___; elseif ($id === 'page'): $out = ''; if($pre_start_date_month_value === $start_date_month_value): $month_value = ''; else: if( isset($month_value) && !empty($month_value) ) : $out .= <<< ___EOF___ </ul> ___EOF___; endif; endif; if( isset($month_value) && !empty($month_value) ) : $out .= <<< ___EOF___ <span style='font-weight: bold;' class='${html_tag_class}_item_month'>$month_value</span> <ul class='${html_tag_class}_item'> ___EOF___; endif; if ( isset($no_event_link) && !empty($no_event_link) ): $out .= <<< ___EOF___ <li class='${html_tag_class}_item'><span class='${html_tag_class}_date'>$start_date_value</span> $output_category_temp <span title="$gc_description_title">$gc_title</span> ___EOF___; else: $out .= <<< ___EOF___ <li class='${html_tag_class}_item'><span class='${html_tag_class}_date'>$start_date_value</span> $output_category_temp <a target="_blank" class='${html_tag_class}_link' href='$gc_link' title="$gc_description_title">$gc_title</a> ___EOF___; endif; if ( isset($view_location) && !empty($view_location) ): if( isset($view_location_name) && !empty($view_location_name) ): $location_header_name = $view_location_name; else: $location_header_name =...

kimipooh 2022-02-10T01:44:00+00:00

Changed to apply WordPress’ translation feature for month names on version 6.7.2. For more detail, please see “Notes on customizing li-month” section in https://info.cseas.kyoto-u.ac.jp/en/links-en/plugin-en/wordpress-dev-info-en/google-calendar-list-view . In your functions.php code, it would look something like this. 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 = 'markiezaat'; if ($id === 'screen'): $out = <<< ___EOF___ <div class="${html_tag_class}_item"> <div class="details"> <span class="title">$output_category_temp $gc_title</span> <div style="clear:both"></div> <span class="date">$start_date_value</span> <span class="desc">$description</span> </div> </div> ___EOF___; endif; return array('hook_secret_key'=>$hook_secret_key, 'data'=>$out); } Then, I think you set like this. in case of “id” is “screen”, set [gc_list_view hook_secret_key =”markiezaat” id=”screen”]. in case of “id” is “page”, set [gc_list_view hook_secret_key =”markiezaat” id=”page” html_tag=”li-month”]. This reply was modified 4 years, 3 months ago by kimipooh .

De Werkkamer 2022-02-13T13:24:00+00:00

Sorry, I didn’t have time to look at this earlier. But these updates are really great! Thank you!