Brian Hogg
Forum Replies Created
-
@almaz78 how did you end up solving the problem?
Forum: Plugins
In reply to: [The Events Calendar Shortcode & Block] Duration TimeHey narrowback,
You have a couple options: either use CSS like overflow:hidden; or another method to keep it on one line, or else filter out the end date. The easiest way I see is to add something like the following to your theme or a functionality plugin to strip off everything after the separator (ie. after the – dash):
function ecs_remove_end_date( $date ) { if ( strpos( $date, tribe_get_option( 'timeRangeSeparator', ' - ' ) ) !== FALSE ) { $date = substr( $date, 0, strpos( $date, tribe_get_option( 'timeRangeSeparator', ' - ' ) ) ); } return $date; } add_filter( 'ecs_event_list_details', 'ecs_remove_end_date' );
The cat parameter needs to have the exact slug or the category name (separated by commas if more than one) to display correctly.
@ lalas
From what I can see when you go to the event category link (under “Veranstaltung Kategorie”) you see the url as:
https://www.quirmbach.com/veranstaltungen/kategorie/persoenliche-coachings/
From this the shortcode should likely have cat=’persoenliche-coachings’ not just cat=’coaching’. Just ‘coachings’ https://www.quirmbach.com/veranstaltungen/kategorie/coachings/ doesn’t have any events in it.
What is your complete shortcode?
Forum: Plugins
In reply to: [The Events Calendar Shortcode & Block] Example of start date?The key value is used for ordering, not for specifying the start date (I can see the confusion in the wording):
key – Order with Start Date [ecs-list-events cat=’festival’ key=’start date’]
Though looking at the code it seems to be doing a comparison operation rather than ordering. Regardless, there does not appear to be a key to specify an exact start date – you’ll need to use month:
month – Show only specific Month. Type ‘current’ for displaying current month only. [ecs-list-events cat=’festival’ month=’2015-06′]
Forum: Plugins
In reply to: [Event Calendar] WordPress 4.3.1 CompatibilityIt works in 4.3.1, but is throwing a couple warnings:
Declaration of aec_contributor_list::form() should be compatible with WP_Widget::form($instance)
The called constructor method for WP_Widget is deprecated since version 4.3.0! Use __construct() instead.
That said, I’d recommend not using this plugin since if JavaScript is disabled for the user, the plugin does not work. It also does not work properly on mobile. Might be best to try The Events Calendar (by Modern Tribe) or Simple Calendar (for Google Calendar feeds) instead.
Version 1.5 now has 1, 2 and 3 week options for events.
Any other questions let me know!
Thanks for the feedback! Very glad to hear it’s helping with the newsletter and keeping people up to date on local United Way initiatives ??
1) I’ve had a couple requests for a shorter time span (ie. weeks) and will be looking into it for the next version.
2) With regards to a link to the event details, this does not appear to be possible with Ajax Event Calendar. There are no custom post types registered with that plugin and the content is only output via JavaScript on whatever page you add the [calendar] shortcode too, so the only URL would be the “Website Link” which you can add into each calendar event.
This URL can be added to the event calendar output via the “Event Link” or “Event Link (URL Only)” option in the dropdown or else you could add a link to your website’s calendar page in your template.
If you know of an actual website link within Ajax Event Calendar that I’m missing let me know, otherwise hopefully the Website Link will do the trick!
Forum: Plugins
In reply to: [Event Calendar Newsletter] other languages avaibleHi Jonny,
I’ve added translation support in version 1.3. You’ll need to translate the event-calendar-newsletter.pot file in the languages folder, and send back the event-calendar-newsletter-de_DE.po/.mo files for inclusion in my plugin. You can send it to [email protected].
You can use a program like POEdit to translate the file. The “Translate This Plugin” button in the plugin page does not yet work, it might take some time for it to be picked up by www.ads-software.com.
https://wordpress.stackexchange.com/questions/57219/how-to-translate-a-plugin-via-po-mo
Any questions let me know!
Brian
Forum: Plugins
In reply to: [Event Calendar Newsletter] other languages avaibleHi Jonny!
There is currently no German version, but will create a file for you to translate asap.
No problem re: delay!
I did not try the ajax submission option, was hoping it could reload the previous image regardless. Will give that a try.
For my other question, adding a filter to specify the initial image could also provide an easy way to remember the previously uploaded image regardless of using AJAX or regular form submission. If you have a suggestion of the best place to add this great otherwise will see if I can put together a patch.
There was an issue with the version update, it’s now been fixed.
Thanks!
BrianI just pushed an update version 1.2 that allows you to modify the capabilities a user needs to be able to view the menu item and admin screen. As an example you could create a new functionality plugin by adding a file “ecn-change-cap.php” in your plugins folder with the following:
<?php /* Plugin Name: Event Calendar Newsletter Change Cap Description: Allow other users to access the Event Calendar Newsletter screen Version: 1.0 Author: Brian Hogg Author URI: https://brianhogg.com License: GPL2 */ function ecn_change_cap( $cap ) { return 'publish_posts'; } add_filter( 'ecn_admin_capability', 'ecn_change_cap' );
And this would change the capability required from ‘add_users’ to ‘publish_posts’ which by default will allow users with the Author, Editor and Admin roles to use it, but not Contributors and Subscribers:
https://codex.www.ads-software.com/Roles_and_Capabilities
Thanks!
Forum: Plugins
In reply to: [Event Calendar Newsletter] How to use it?Thanks for trying the plugin!
Currently there’s no direct integration or automatic sending, but the plugin will help you quickly build the content for the newsletter:
– Click the Events Calendar Newsletter option in the admin menu
– Pick the timeframe of future events to use (ie. events in the next 1 month)
– Either change the format or leave the default
– Click Generate NewsletterYou can then copy and paste either the text or HTML version of what’s generated into your favourite email sending program like Mailchimp.
Any questions let me know, and what email provider do you use? Automated sending of newsletters is certainly on the roadmap.
Thanks!
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Empty value for "s" returns no resultsI ended up having to do this to say the search was not okay:
function ocrc_disable_relevanssi_search_if_empty( $search_ok ) { if ( isset( $_GET['s'] ) and ! trim( $_GET['s'] ) ) $search_ok = false; return $search_ok; } add_filter( 'relevanssi_search_ok', 'ocrc_disable_relevanssi_search_if_empty' );
but it still returned no results with s= (blank) in the query string, so I also had to do this:
function ocrc_remove_relevanssi_hooks_if_search_empty() { if ( isset( $_GET['s'] ) and ! trim( $_GET['s'] ) ) { remove_action( 'init', 'relevanssi_query' ); remove_filter( 'posts_request', 'relevanssi_prevent_default_request' ); } } add_action( 'init', 'ocrc_remove_relevanssi_hooks_if_search_empty', 1 );
If there’s another filter I’m missing let me know, and might be worth adding something like this for the next update?
Thanks!
Forum: Hacks
In reply to: Redirect to listing page after post saveCheck out the
redirect_post_location
filter. Here’s a sample for a custom post type ‘school’ to redirect to the admin page after save:function my_redirect_after_save( $location, $post_id ) { if ( 'school' == get_post_type( $post_id ) ) { $location = admin_url( 'admin.php?page=schools' ); } return $location; } add_filter( 'redirect_post_location', 'my_redirect_after_save' );