Andie Hunt
Forum Replies Created
-
Sorry if it wasn’t clear. The use case is that I have a template with rather complex HTML that includes line breaks, and I don’t want those line breaks to cause new paragraphs. The WordPress function wpautop() does that.
When rendering posts on the site, a variety of plugins offer the ability to skip wpautop(). However, when preparing a mailing, the Email Subscribers & Newsletters plugin runs everything through wpautop(), as you can see here: https://plugins.trac.ww.wp.xz.cn/browser/email-subscribers/tags/4.3.12/lite/includes/class-es-common.php#L50
I’ve addressed this on the site I manage that has this need, but it’s by hacking your plugin to remove the one line. I’d like to do this in a way that will not require me to do this every time I update the plugin. I also think it would be a useful feature for others to be able to choose whether to process templates with wpautop().
I’m offering to write a patch for the plugin, but first I wanted to be sure that having an option to skip wpautop() is something you’d approve in concept.
Second, I wanted to know whether you’d prefer to have a separate setting for each campaign or to have it be a single setting for all campaigns.
Forum: Plugins
In reply to: [CiviEvent Widget] Events stuck on UTC time?Some others have noticed tricky things with the timezones here, and it reflects issues at the intersection of PHP time, a WordPress user’s timezone, and the server’s system time.
For better or worse, the listing widget and shortcode this plugin provide do not specify the date or time: they take whatever CiviCRM says the upcoming events are. The relevant code is here, and the CiviCRM function it calls just looks for events that start or end after the current PHP time.
(In contrast, it looks like the other plugin you tried keeps looking for any event that starts on or after midnight of the current day, so that may be why you’re seeing different behavior there.)
I suspect there’s a problem between CiviCRM’s handling of time and your configuration, but I don’t know what. This kind of thing has appeared with some folks’ CiviCRM and WordPress for a while now, but I’m not sure exactly in which circumstances it appears. Could you share what your WordPress timezone setting is? That may help, too.
Forum: Plugins
In reply to: [CiviEvent Widget] Fatal errorHmm–no idea. Is anything available when you go to your widgets page?
Forum: Plugins
In reply to: [CiviEvent Widget] Specific Events OnlyYou should set the filter to
{"start_date": {">=": "2016-03-20"}}. There is no handling of complex conditionals (i.e. “whichever is later”): if you want to change it to events after the current date once late March rolls around, you’ll need to change the filter.The parameters are the same as you’d provide the Event.get API.
One final note: custom display and custom filter go together: if you set the custom filter without specifying at least one field to show, the widget will revert to Simple mode.
Forum: Plugins
In reply to: [CiviEvent Widget] Specific Events OnlyI got to the bottom of this–out of habit as a PHP guy I gave a JS function argument a default value. Firefox doesn’t complain, but others do. Upgrade to 3.1 for the fix–sorry!
Forum: Plugins
In reply to: [CiviEvent Widget] Specific Events OnlyThat’s really strange. Those should appear as tabs, with a number of fields in a box below. I just added screenshots at https://ww.wp.xz.cn/plugins/civievent-widget/screenshots/ so the third image is what I’m describing.
Maybe there’s some caching trouble? The admin form now adds some JS and CSS for handling these features, so that may not be loading.
Forum: Plugins
In reply to: [CiviEvent Widget] Specific Events OnlyWhen you edit the widget from the widgets page, you’ll see the field if you select the Custom tab. The one caveat is that you’ll need to select and configure all your display fields manually, so you might create a new widget instance and play with the options and your theme CSS until it looks like you need.
Forum: Plugins
In reply to: [CiviEvent Widget] Order of parametersHey I wanted to let you know that the new version 3.0 has the option to display whatever fields you want, in whatever order. It’ll definitely require some CSS work, since it just wraps the fields in spans with various class names, but it may be a good option for you.
Forum: Plugins
In reply to: [CiviEvent Widget] Something wrong with the theming?I got this fixed as part of the work for 3.0. If you upgrade, things should work fine.
Forum: Plugins
In reply to: [CiviEvent Widget] Specific Events OnlyI just wanted to let you know that I updated the plugin, and the new custom display option will let you filter by CiviCRM API parameters (including date).
Forum: Plugins
In reply to: [CiviEvent Widget] Change link to event detail pageSo I figured it out: the issue is that line 461 looks for the registration link text that’s defined by the event, only defaulting to “register”.
Change the line to replace the whole
CRM_Utils_Array::value( 'registration_link_text', $event, ts( 'Register' ) )with just'Read more'or whatever;Forum: Plugins
In reply to: [CiviEvent Widget] Change link to event detail pageSo I figured it out: the issue is that line 461 looks for the registration link text that’s defined by the event, only defaulting to “register”.
Change the line to instead read:
$reg .= "<a href=\"$reglink\">View more info</a>";I think that should do it.
Forum: Plugins
In reply to: [CiviEvent Widget] Change link to event detail pageI think I figured it out. The plugin pulls the label for your registration link from the event, defaulting to “Register”. I bet you’re changing the default, but it’s pulling the text from your event.
Change line 461 to something like the following:
$reg .= "<a href=\"$reglink\">View more info</a>";Forum: Plugins
In reply to: [CiviEvent Widget] Change link to event detail pageSorry, I was being silly: I thought I had made the registration link optional, when it’s just that it only shows up if you have online registration active.
I’ll be putting together a bunch of updates for a client soon, so I can easily make that optional when I do so.
Forum: Plugins
In reply to: [CiviEvent Widget] Change link to event detail pageThe event title should link to the event info page. That’s why the “register now” link is optional–some people just want visitors to go to the details first. You may want to theme it such that the title looks more like a link, though.
Alternatively, it wouldn’t be hard to hack the plugin to display the info link in place of the register link: you’d go to https://plugins.trac.ww.wp.xz.cn/browser/civievent-widget/tags/2.1/civievent-widget.php#L459 to change it from “civicrm/event/register” to “civicrm/event/info” and then doctor the link text a couple lines later. I just don’t know how many people would want a separate option “display info button”.