thomastrethan
Forum Replies Created
-
Forum: Plugins
In reply to: [Antispam Bee] Idea: email summaryGithub issue created: #26 – thx Tom
Forum: Plugins
In reply to: [Events Made Easy] custom filter for placeholdersconfirmed, I currently have the following hack running pretty fine:
in events-manager.php in function eme_replace_placeholders():
if (has_filter('eme_events_format_prefilter')) $format=apply_filters('eme_events_format_prefilter',$format,$event);
and in my theme’s function.php:
function my_eme_events_format_prefilter($html, $event) {
...
}add_filter('eme_events_format_prefilter', 'my_eme_events_format_prefilter', 10, 2);
Forum: Plugins
In reply to: [Events Made Easy] custom filter for placeholdersworks pretty good, but one thing: it’ll be great to pass the event to the filter:
if (has_filter(’eme_events_format_prefilter’)) $format=apply_filters(’eme_events_format_prefilter’,$format,$event);
Forum: Plugins
In reply to: [Events Made Easy] custom filter for placeholderscorrect, that would do. but how to get exactly there: after eme puts the templates together and before replacing the placeholders? does an appropriate filter exist already?
Forum: Plugins
In reply to: [Events Made Easy] custom filter for placeholdersunfortunately not, because results are handled by another plugin; I’d need to hook a separate function to eme shortcodes before they get replaced.
maybe an idea using conditional tags would be to check the date and show the shortcode #ATTENDEES for future events and use another (new/unused) marker (eg #RESULTS) for past events. later hook to the final text using wp filters and replace this marker. This would work, if there always would be results, but in case where no results exist I still would like to display the list of attendees.
Forum: Plugins
In reply to: [Events Made Easy] get category id fails for category names with spacesworks pretty well, good job, thx!
Forum: Plugins
In reply to: [Events Made Easy] get category id fails for category names with spacesgreat! thumbs up
Forum: Plugins
In reply to: [Events Made Easy] get category id fails for category names with spacesdid some more analyzing and made another mistake: I don’t use eme_permalink_convert() for URLs (just for IDs), for URLs I use eme_event_category_url() (eme built in function in eme_functions.php), which then uses eme_permalink_convert().
So this is eme core function, creating category URLs this way. Therefore I still think eme_get_category_ids() is incorrect because it is not respecting this.
eme_permalink_convert() uses sanitize_title_with_dashes() and remove_accents() and trailingslashit(), which should all be considered when querying for category ids, which is tricky when trying to solve in sql. The only correct solution would be to query all categories, iterate and eme_permalink_convert() them and then compare them, but which is not very performant. Another idea would be to store a real slug for categories…
Forum: Plugins
In reply to: [Events Made Easy] get category id fails for category names with spacesOk, probably was too fast, did a bit of analyzing, here’s the whole story:
1) created an event category containing a space, eg “Test Cat”
2) have a custom widget, which creates a menu structure depending on which page you’re currently are, in case of events it reads all event categories and uses eme_permalink_convert(category_name) to create the links, thus getting …/cat/test-cat/
3) now we’re there at what I wrote in my first post, eme_get_category_ids() doesn’t convert the space in the category name like eme_permalink_convertMaybe the way of using eme_permalink_convert() for categories is wrong in this place? But I still think that there’s an inconsistency here… And you’re right, any other special charaters would cause troubles too. However, the other solution is to adapt my custom widget, so no modification in eme is necessary if I’m wrong using eme_permalink_convert(). Both is ok with me.