stephenharris / event-organiser Goto Github PK
View Code? Open in Web Editor NEWWordPress plug-in, Event Organiser, development repository
Home Page: http://wordpress.org/extend/plugins/event-organiser/
License: GNU General Public License v3.0
WordPress plug-in, Event Organiser, development repository
Home Page: http://wordpress.org/extend/plugins/event-organiser/
License: GNU General Public License v3.0
This issue constitutes the following:
update_option_siteurl
and update_option_home
.Looking at the source (1) really shouldn't be an issue (requires verifying by using wp_die()
. (2) is easily fixed.
I have migrated a site and despite all theme settings being the same (done via export) and event organiser settings and version being the same, the calendar widget appears different - shaded days and too wide - at the new address
please help me fix this very annoying little bug! as I cannot work out why it doesn't behave the same...????
As discussed here: http://wp-event-organiser.com/forums/topic/day-archive-not-showing-events-spanning-several-days/#post-3371
From ahto on the forums:
But if you consider my example one more time, that is not how it actually works at the moment.
- The event is scheduled to occur later today.
- It highlights todays date in the calendar widget.
- I click on that date โ the date that event starts on โ and the list is empty.
It does not show an event starting on that day if the event crosses over to the days after. It only shows the event if it also ends on the same day.
It appears this bug affect would month & year archives too. The fix is to change https://github.com/stephenharris/Event-Organiser/blob/1.7/includes/event-organiser-archives.php#L83 to
$query->set('event_end_before', $ondate_end);
Also discussed changing it so the archives list 'running events', i.e.:
$query->set('event_start_before', $ondate_end );
$query->set('event_end_after', $ondate_start );
Location information information should persist on cancel.
Steps to reproduce:
Expected result: location information should persist
Actual result: all location information is cleared
As reported in http://wordpress.org/support/topic/googlemap-doesnt-shown-on-event-detail-page the Comprehensive Google Map Plugin removes any Google maps script. Event Organiser needs to prevent if from doing this.
First of, awesome plugin. You guys already know how amazing it is =).
Regarding [eo_events], even though the ul/li elements can be styled via css, it would be nice to present the option (not) to output ul / li and just use whatever html is present between the [eo_events][/eo_events] tags.
Not really an issue, more of an enhancement request =X !
Not sure which version of the API you're using, but the following is all from the v3.10 specs.
Here's my idea: instead of typing in an address and then the map navigating to that address, the user should be able to right click on the map to set (at the least) the city and possible address. There's also a places API which deals with getting closest 'places' like restaurants, schools, etc. but I think that may be a bit too much for this.
A bit of sample code for my idea:
google.maps.event.addListener(map, 'rightclick', function(e) {
placeMarker(e.latLng, map);
reverseGeocode(e);
});
function reverseGeocode(latlng) {
var geocoder = new google.maps.Geocoder();
geocoder.geocode({'latLng': latlng, 'bounds': map.getBounds()}, function(result, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setZoom(13);
map.setCenter(latlng);
$("eo_venue_add").val(result[0].formatted_address);
$("eo_venue_pcode").val(_.find(result[0].address_components, function(type){ return type.types == "postal_code"; }).long_name);
$("eo_venue_country").val(_.find(result[0].address_components, function(type){ return type.types == "country,political"; }).long_name);
}
})
}
This is really crude and basic right now and would love to know if you have any suggestions for improvements in this code. I'll take a look around your plugin to see where this logic might go but I think the general idea is a good start.
Oh, one more thing: I used underscore.js which I believe is included with 3.5 (not sure about earlier versions). I might change it to use jquery but underscore just seems like a more efficient js library.
Currently the ?ondate=2013-01-11
parameter provides a day based archive.
Suggesting to:
?ondate=2013-01
and ?ondate=2013
events/event/on/2013/01
ondate
behaves. Rather than being considered 'active on', it'll be 'starts on'.eo_get_event_archive_link( $year, $month, $day)
This was reported here http://wordpress.org/support/topic/bug-reocurring-monthly-event-is-one-week-off-each-month?replies=1.
Steps to reproduce:
The summary on the event edit admin page uses the date and other details given in the form. In this case its correctly deeming that a monthly recurring (by week day) event starting on the 7th should occur on the first week day of the month.
When the actual dates are being translated, it seems EO is then deeming the 7th to be the second week day of the month and so generates the dates according to an incorrect rule.
The error is here: https://github.com/stephenh1988/Event-Organiser/blob/master/includes/event.php#L469
Specifically the ordinal is given by:
$n = ceil(($date+1)/7); // nth weekday of month.
$date
is the date (e.g. 1-31) of the start event/ For values 7, 14, 21, and 28 this will incorrectly give the date has been the 2nd, 3rd, 4th and last week day of the month rather than 1st, 2nd, 3rd and 4th.
Fix is simple;
$n = ceil($date/7); // nth weekday of month.
When an occurrence is 'broken' from its series, the post meta is not copied across. This is done so as not to over-ride the WordPress & EO generated meta of the newly created event (post) with that of the original post meta - as this may cause problems.
However we should be able to copy all meta, and just ensure that 'problematic' meta isn't (either via blacklisting them, or by checking that because we use add_post_meta()
this problem won't occur).
As suggested here: http://wp-event-organiser.com/forums/topic/eo_get_current_occurrence_of/
As discussed there, there is a problem with ambiguity when occurrences overlap. While its technically possible, its probably unlikely that this happens 'in the real world'. For that reason I want to just return an occurrence (rather than array of occurrence) as this may cause conversion (overwhelming we'll be dealing with an array of on occurrence).
Can always create eo_get_current_occurrences_of()
if their is demand...
Since we have to pick which occurrence will be used - I'll probably go with the later as suggested in the forum.
As suggested here http://wp-event-organiser.com/forums/topic/backend-fullcalendar-remembers-the-last-date/
The date (and view) of the admin calendar should persist between page loads. This should be reset after 24 hours (or less - 1 hour?) so that the calendar does not 'lag'.
To avoid clashes with themes, this should be a condensed jQuery UI stylesheet containing only things the plug-in explicitly needs (thinking removing things like tabs).
It should be filterable too.
I can select the .ics file when I click upload the browser wants to download the file.
I have custom template that I am using for single-event.php, and have my own calls to the event meta, but now with the update, it is inserting a ul (eo-event-meta) with information that I can't get rid of. I don't want it in my the_content() call. Can you tell me how to get rid of it??
Steps to reproduce:
Expected result: venue fields and map should disappear
Actual result: venue fields disappear, map persists
Would be great to have a 'print' button for the fullCalendar. This would trigger a window to open with a printable version of the calendar (for the current view).
It seems the author of fullCalendar has looked at this before (http://code.google.com/p/fullcalendar/issues/detail?id=35) but the ticket went cold.
I keep a fork of his plug-in (with a branch specifically containing adjustments made for Event Organiser at https://github.com/stephenh1988/fullcalendar ).
I'll start a ticket there, and hopefully it can be achieved for 1.7.
Suggestions and/or code and/or +1s welcome! But I'd like to keep this ticket on EO integration with this potential new feature - so for things regarding this functionality that is only related to fullCalendar please use this ticket: https://github.com/stephenh1988/fullcalendar/issues/1
I get the following error line before the post content on a clean installation of Event Organizer Plugin Version 1.6 on Wordpress 3.4.2
Warning: Missing argument 2 for eventorganiser_update_venue_meta_cache() in /home/content/p/u/e/puentesnoinc/html/wp/wp-content/plugins/event-organiser/includes/event-organiser-cpt.php on line 734
I do not know why argument 2 is missing, can you help with this?
The url is http://puentesno.org/events/event/lets-talk-pizza-party/
Hey Stephen,
thanks for your 1.6 Update!
I've found a bug after the update. If I try to change occurences or venue for an event created before 1.6 - I can't because of an error with the Interface. There is only simple one line field with venue inside (no + or dropdown arrow)(no chance to change it) and no map -only a big white box. (look at the image)
Whats more important: If I click on "Include/Exclude occurrences: " nothing happens. I would say it's a javascript error but im not sure. In the browser js console no error is listed.
If I create a new event everything works like it should. If I save and reedit it everything is ok too and I can use the "Include/Exclude occurrences: "
And it's not browser related. I get this error in firefox, chrome and ie.
Thanks, Konrad
I'd like to support network activation.
This may initially be just installed on each of the sites separately with potential support for 'network' events.
I get following error when I try to update the start / end-time of an event, and the time is not updated:
implode() [function.implode]: Invalid arguments passed in /home/ppache/public_html/wp-content/plugins/event-organiser/event-organiser-edit.php on line 375
It is impossible to modify the schedule for an event!
I'm using latest versions: wordpress 3.5.1, plugin 1.7.3
As requested in: http://wordpress.org/support/topic/removing-the-add-to-google-calendar-from-agenda-widget?replies=4
The idea is to include an option to allow the link to be removable, and directly link the agenda item to the events page.
Either an option could be added to the widget, or the link is removed by default and can be re-added via filter (with few to minimising UI).
The follow will need to be completed
eo_insert_venue()
and eo_update_venue()
too, no? https://github.com/stephenh1988/Event-Organiser/blob/dev-1.7/includes/event-organiser-venue-functions.php#L366eo_get_venue_address()
(https://github.com/stephenh1988/Event-Organiser/blob/dev-1.7/includes/event-organiser-venue-functions.php#L289)venue.js
(https://github.com/stephenh1988/Event-Organiser/blob/dev-1.7/js/venues.js#L25)event.js
(https://github.com/stephenh1988/Event-Organiser/blob/dev-1.7/js/event.js#L81 andevent-organiser-edit.php
(https://github.com/stephenh1988/Event-Organiser/blob/dev-1.7/event-organiser-edit.php#L187)eventorganiser_sanitize_meta()
- https://github.com/stephenh1988/Event-Organiser/blob/dev-1.7/includes/event-organiser-venue-functions.php#L665Also possibly related;
Lastly changes will need to be made to https://github.com/stephenh1988/Event-Organiser/blob/dev-1.7/classes/class-eo-venue-list-table.php to allow ordering/filtering by city.
Possible a change to re-factor venue handling - particularly the address fields (DRY). Need to keep in mind #4 and #5.
As discussed here: http://wp-event-organiser.com/forums/topic/calendar-widget-improvements/
The following bug occurs only using Internet Explorer. I wanted to add a new event, that reoccurs yearly (in my example Valentine's day). So I klicked on "add new" then gave the event the name "Valentine's day", then set the start date and end date to for example "14-02-2013", checked the field "all day", set repeat "yearly", repeat every "1" year, until "14-02-2099". Then I klicked on update. Now the newly set event is shown but the date of "reoccurence until" is set back to today's date. Now I have to check "Check to edit this event and its reoccurences" and set the date again. After updating again it is finally saved.
Firefox and Opera work totaly fine, they accept all settings on first try.
We use WordPress 3.5.1 with Event Organizer 1.6.3 and Internet Explorer 9.0.8112.16421 (64-bit Edition).
Ok here is my use case and what happened :
I have repeating events on custom schedule, the user select all the dates and save
so far so good
Now he see that he forgot a date so he goes back to the event and click on the 'Include/Exclude occurrences' link without checking the checkbox that unlock all the other fields
He saves again but his new date is not added because he didn't check the box !
Possible fixes :
Steps to reproduce use eo_get_venue_map()
or [eo_venue_map]
with the zoom set. Map does not appear.
It's happening because the zoom is being passed as a string. See this line: https://github.com/stephenh1988/Event-Organiser/blob/1.6.1/includes/event-organiser-venue-functions.php#L546
$zoom = (int) $args['zoom'];
Should be
$args['zoom'] = (int) $args['zoom'];
I installed 1.7 on a clean 3.5 site and imported the ics from my 1.6.3 install and all the address info is missing. All events are held at sea! I've not tried an upgrade from 1.6.3 to 1.7 to see if the data persists but will try in the am.
1.6.2 introduced a bug - the following JS error appears on some pages:
Uncaught ReferenceError: EOAjax is not defined frontend.min.js:8
(anonymous function) frontend.min.js:8
1.6.2 introduced support for a 'goto mini calendar' to allow users to use a mini calendar to jump to specific dates (similar to the admin calendar). This is being initialised regardless of whether a fullcalendar is being displayed - hence the error.
Fix is simple and due shortly.
If a widget calendar is selected to show past events, but the archives do not, then a link is generated on past events which points to a 'No events found' message.
Possible workarounds:
Right now, when adding a venue, the map defaults to a zoom level and location such that only sea appears (I believe this is actually the exact middle of the whole map). Would it be possible to somehow (if the user has it set) set the default marker in the timezone/city the user has set for their timezone settings?
I would like to improve the default templates. Many users find that the default templates are inadequate (they're right).
The 'old' ones should be moved to templates/deprecated so that they can still be copied across into the theme in case the users want the old templates back they can copy them across into their theme.
A notice should display on activation informing them of the change, with a dismiss button (this should check if this is necessary - i.e. don't display if EO is not handling templates and does theme provide the templates?).
This will be added to as/when I think of them. It will be 'smart' - i.e. don't show a venue map if there is no venue associated.
I'll be looking into changing how default templates are handled to improve theme compatibility without loosing the flexibility of the plug-in: See #13
Since the database has been re-factored the 'recurrence_start', 'recurrence_end' columns are no longer present. This breaks the use of %schedule_start%
and %schedule_end%
. The bug can be found here and was reported here.
Unrelated issues include the use of the ambiguous (and should be deprecated) term schedule_end. This should be replaced with schedule_last.
Furthermore both of these should refer to the start date of the last occurrence rather than the end date (Though schedule_end may be used for this as thats its 'current implementation).
A quick 'fix' (currently untested):
case 'start':
case 'end':
//As before
case 'schedule_start':
case 'schedule_last'
case 'schedule_end': //Backwards compat
switch(count($matches)):
case 2:
$dateFormat = get_option('date_format');
$dateTime = get_option('time_format');
break;
case 3:
$dateFormat = self::eo_clean_input($matches[2]);
$dateTime='';
break;
case 5:
$dateFormat = self::eo_clean_input($matches[3]);
$dateTime = self::eo_clean_input($matches[4]);
break;
endswitch;
if( eo_is_all_day( get_the_ID() ) ){
if( 'schedule_start' == $matches[1] ){
$replacement = eo_get_schedule_start( $dateFormat );
}else{
$replacement = eo_get_schedule_end( $dateFormat );
}
}else{
if( 'schedule_start' == $matches[1] ){
$replacement = eo_get_schedule_start( $dateFormat . $dateTime );
}else{
$replacement = eo_get_schedule_end( $dateFormat . $dateTime );
}
}
break;
As reported by Tzvook here - by appending a language argument we can localise Google Maps.
Unfortunately Google maps takes a two-letter language identifier as opposed to the (country specific) four letter language identifier used by WordPress.
The idea is to use get_locale()
to extract the language-country identifier and then extract the first two characters (language identifier) to use with Google language parameter.
$identifier = substr(get_locale(), 0, 2);
Google is limited in its support of languages, but hopefully unsupported languages (e.g. Portuguese) fallback to English.
Hello,
There is a conflict with this plugin for sending newsletters.
When sending a newsletter, a dialog opens shows the error in the title, caused at line 345 of /event-organiser/includes/event-organiser-register.php
Simply preceding that line with if(!function_exists('get_current_screen')) return;
should solve the issue.
Workaround: select a text before creating the link
I fell in this trap and had to create several times the link until I understood there was a problem (I didn't check why my link always disappeared), so this is error prone for the user.
I think that the button for creating a link in text mode should be disabled if no text is selected, as in Visual mode. Or another soultion could be to use the tilte entered in the link crestion dialog as text so the http code would be correct.
This occurs with Event-Organiser 1.7.3, WordPress 3.5.1-fr_FR, Safari 6.0.2, Mac OS X 10.7.5
Is there a way to copy an event. I have events similar that need to be added.
This enables the widget titles to work well with multilingual plug-ins and others like Front-end Editor.
This bug affects weekly events, but also causes problems when you select a weekly occurrence. It was originally reported here: http://wordpress.org/support/topic/includeexclude-occurrences-failing-in-editing-event?replies=4#post-3588029
Browser console reveals that the error originates from: https://github.com/stephenh1988/Event-Organiser/blob/1.6/js/event.js#L176 and https://github.com/stephenh1988/Event-Organiser/blob/1.6/js/event.js#L354 (which calls the previous).
So the cause is 'buttonset' (error in console):
Uncaught Error: cannot call methods on buttonset prior to initialization; attempted to call method 'enable'
As reported here: http://wp-event-organiser.com/forums/topic/break-this-series-loses-end-time-of-event/
Ooops! At least its easy to fix: https://github.com/stephenharris/Event-Organiser/blob/1.7.3/event-organiser-calendar.php#L187
(Generally that part of the code needs refactoring - maybe create eo_break_occurrence( $event_id, $occurrence_id )
?)
A lot of the venue API accepts the venue slug or the venue ID. Because of this ambiguity, venue IDs must be passed as integers.
However the function eo_get_venues()
is a simple wrapper for get_terms()
which returns term IDs cast as strings. This can cause unexpected behaviour.
eo_get_venues()
should cast IDs as integers.
I prefer the existing type, but the truth is that it results in theme compatibility problems. And this can't be -satisfactorily resolved without the user editing the template files.
The fact of the matter is that we can't guess the structure of the theme being used.
I'm suggesting switching to using the_content
filter in the page.php
template. This works as follows:
template_include
to check if viewing event and no template was found (if so use page.php
from theme).In this way (since EO is only dealing with the content of the page, not the page itself (which is deal with by the theme's page.php
) - this will greatly improve theme compatibility.
It can still be completely over-ridden by the appropriate templates in the theme.
My only concern is the use of object buffering - which can cause problems.
This is simple: look in wp-content/language
for the .mo file first. Then fallback to the plug-in provided .mo file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.