Code Monkey home page Code Monkey logo

sugarcalendar-core's People

Contributors

cklosowski avatar d4mation avatar devinsays avatar douglsmith avatar jchristopher avatar jjj avatar pippinsplugins avatar spencerfinnell avatar szepeviktor avatar trepmal avatar vejeta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sugarcalendar-core's Issues

Date and time not displayed when viewing event details

Steps to replicate:
Create a new event with a specified date, time, location, and details.
Save the event to the calendar of your choice.
Screen Shot 2019-10-11 at 9 59 53 AM
View the event. The date and time are not displayed.
Screen Shot 2019-10-11 at 10 04 07 AM
When using the paid version the event date and time are displayed. Screenshot below shows the lite version on the right.
Screen Shot 2019-10-11 at 9 54 34 AM

Expected behavior:
When viewing the details of an event the date and time are displayed.

First reported by a customer: https://secure.helpscout.net/conversation/978382551/134070?folderId=1909447
Screen Shot 2019-10-11 at 10 05 52 AM

Add setting for Default Calendar when adding new Events

Request came in via HelpScout to enforce a default Calendar when adding new Events.

This does make sense, and is also how WordPress works with most things that use Taxonomies ("Uncategorized" for Posts as an example.)

Because Events are limited to a single Calendar by default, and because all calendar applications expect for Events to be associated to a single Calendar, I think this is probably a good area of UI improvement.

Update screenshots

The screenshots of the plugin UI are severely out of date.

Let's them them updated to show the new, shiny interfaces!

Show Recurring events in archive view

The archive view (example https://sugarlocal.com/events/ ) should show recurring events in the list of posts.

from sugarcalendar/standard#48:

I think you'd need to hook into pre_get_posts, perform a look up with sc_get_all_events(), extract the post IDs, then set post__in. Essentially duplicating the queries.

Let's go ahead and punt the archive view so we can get this finished up.

Introduce Sequence concept as a collection of Events

Recurring Events ultimately consist of an ordered series of events, all relating back to a single source instance of an Event object. This series of Events currently has no way of being calculated on a per-Event basis. Rather, they are built just-in-time based on the current database query and/or Calendar view boundaries.

It should be possible, given any number of Events or any boundaries, for these Sequences of Events to be built up relative to either the initial instance or the boundary.

In short, a Sequence is a Collection of objects, though each object in the Sequence ends up with a unique identifier that is calculable relative to its source.

Option to display thumbnails in event lists

Any plans to add a thumbnail option, maybe to the show parameter in sc_get_events_list()?

The post-type supports thumbnails. Might be nice to display them in the events_list shortcodes and widgets.

Admin: 24 hour option not recognized when scheduling an event

Reported on this HS ticket about the same time I noticed it in testing. I happen to use a 24hr clock on all my time-things:
https://secure.helpscout.net/conversation/829226730/118230/?folderId=1909468

My Screen Options settings match my Calendar > Settings > Display:

screen-options

When creating or editing an event, the edit screen doesn't show the 24-hour hourly digits. Instead it shows 01-12 and AM/PM:

add-edit-event-24-hr

The same event does show correct on the frontend when published/updated:

published-fronend-viewpng

Add ability to remove or lock calendar selector list to specific calendar

Request from this pre-sales HS ticket:
https://secure.helpscout.net/conversation/1083532293/145621?folderId=1909452

Can more than one Sugar Calendar be active on the same website simultaneously? One organization ideally wants two calendars: one for the public to see for local events and announcements and another restricted to registered volunteers only to view and signup.

I used a specific category (calendar) in my shortcode and it displays that calendar correctly. However, it does still have the ability to switch to another calendar. I thought this might be a good feature request, to have the ability to either remove the dropdown list selector or lock it to a single entry.

[sc_events_calendar category="lunch"]

image

Pull recent readme.txt improvements in from WordPress.org repository

Recently, @brashrebel and friends made some improvements to the Read-Me text.

This issue is being created simply to track the imminent pull request to merge those improvements back into this repository.

It's possible more issues will be created like this when changes happen in the future, or they may simply get pushed directly in. But for this first time, I'm following standard pull request protocols.

PM time bug with sc_event_date_time

A slight bug in includes/meta-boxes.php on line 145-148

It ignores PM times when setting the sc_event_date_time meta value.

    if( $am_pm == 'pm' && $hour < 12 )
        $hour += 12;
    elseif( $am_pm == 'am' && $hour >= 12 )
        $hour -= 12;

// $hour should be $hours

    if( $am_pm == 'pm' && $hours < 12 )
        $hours += 12;
    elseif( $am_pm == 'am' && $hours >= 12 )
        $hours -= 12;

Port from non-lite 2.0

Just a reminder issue that Lite needs be updated to 2.0 at the same time that Standard is released.

Dutch translation strings requested in default.po file

Reported from HS ticket:
https://secure.helpscout.net/conversation/647066685/88460?folderId=1909468

...the Dutch translation of the plugin contains the following issues:

  • The admin pages for creating/editing a calendar item displays an AM/PM selection option. In the Dutch language we don't use AM/PM, instead we use the 24-hour time format.
  • The date format on the single calendar item page is 'MONTHNAME DATE, YEAR' instead of the usual Dutch format 'DATE MONTHNAME YEAR'. The settings of the plugin also don't allow me to select an other format which is usually used in Dutch like 'DATE-MONTH-YEAR'.
  • The time format on the single calendar item page contains two spaces instead of one before and after the word 'tot' (the Dutch word for 'until'), for example '10:00 tot 17:00'.
  • The date range on the single calendar item page is not fully translated (only the month/weekday names are translated). For example: 'Starts augustus 8, 2018 then every woensdag' instead of 'Start 8 augustus 2018, daarna elke woensdag'. I've already looked into the translation file but I couldn't find a field to add this translation to.

Possible debug notices in sugar_calendar_post_meta_caps

Reported via Sandhills support:

Steps to reproduce:

  1. Create WP Multisite
  2. In the WP Multisite, create a one blog in addition to the default one
  3. Install and activate Imagify plugin network wide
  4. Install and activate Sugar Calendar plugin network wide
  5. A PHP error (E_NOTICE) is thrown from sugar-calendar/sugar-event-calendar/includes/events/capabilities.php:46 because $args[0] is undefined offset

Sugar Calendar: please do not blindly trust that map_meta_cap filter $cap parameter is always string because looks like all developers don't read or follow instructions on what kind of parameters pass to WordPress core functions. Consider returning the $cap instantly if it's a boolean or casting the $cap to string. Tested both solutions and those seem to fix the issue for now.

Possible conflict with WP-Ultimo

Reported on this HS ticket:
https://secure.helpscout.net/conversation/953591490/131195/

User on WordPress Multisite and reported a plugin conflict with WP-Ultimo. He was not able to change the start day of the week option in Sugar Calendar settings. It would revert back to the default after he clicked to save. Also had an error when clicking on the update database link. When he deactivated WP-Ultimo, all features worked correctly. This is just an FYI for the future, we do not currently have a copy of WP-Ultimo to test with, but I'm not sure we need to at this point.

Fatal error when activating twice

Sugar Calendar will fatal error on activation if it is already activated. This can happen in a few different circumstances:

  • Trying to have Lite & Standard activated at the same time
  • Active on a single site, then trying to network activate
  • Loaded via an mu-plugin, then trying to activate anywhere

While rare, and kind of silly, it is easily avoidable, so let's avoid it.

Add support for w.org translations

See details here. If we ditch load_plugin_textdomain(), add the domain and path to the header, change the domain to match the slug and require WP 4.6 or higher we can let community translations on w.org work instead of shipping them ourselves.

Add Today option to month/weekly calendar view

Would love the Today option that is on iOS/macOS calendars added to especially the large monthly calendar view, but I can see it on:

  • monthly
  • weekly
  • 2 weeks

When I'm viewing something 8 months out, it would be convenient to click a Today button to go back to the current day.

Replace year inputs with date-pickers in Events List view

Now that sugarcalendar/standard#153 is merged, there is a need to add a more intelligent range picker to that list table. It's currently based on the Month range, which is likely not ideal when choosing to view events as a list.

screen shot 2019-01-08 at 12 42 32 pm

We could add a select to narrow the results down to a year/month/day, or we could eliminate the range entirely and make it feel more like a regular paginated list. Going to experiment with this a bit to see what's easiest and feels best.

Add ability to use custom fields in event content

We've had some HS tickets requesting the use of custom fields in their events. Some are using ACF and some are using Beaver Themer.

These are the tickets I found using search, I'll keep adding as they come in :

https://secure.helpscout.net/conversation/590601088/83184/
https://secure.helpscout.net/conversation/925524308/127346/
https://secure.helpscout.net/conversation/953994129/131243/
https://secure.helpscout.net/conversation/1024910507/139264/
https://secure.helpscout.net/conversation/1025564695/139346/

Port theme compatibility (likely from bbPress)

Events need theme compatibility.

bbPress is the most likely candidate, because it integrates directly with shortcodes, widgets, and any custom rewrite rules we may end up with later.

The overly simplistic process here is:

  1. Port the code from bbPress
  2. Rename everything to fit our Sugar Calendar naming
  3. Ensure things like widgets and shortcodes work OK
  4. Ensure similar-enough back-compat exists with SC1.x

Possible issues/confusion:

  • Whether to include rewrite rules for events (probably?) or use the events post type (meh)
  • How deeply should we go with theme-side styling (shallow is ugly, deep is opinionated)
  • Full theme compat is not as simple as other APIs. It's necessary, but introduces support burden.
  • Will include 1 template pack by default, could/should include more later

Feature request to add css class to an event shortcode and add page builder support

Request from this HS ticket:
https://secure.helpscout.net/conversation/909891170/125789/?folderId=1909468

The looks of a single event can only be changed by overriding a template file.

Do you have plans to offer more and better ways?

Like maybe add a shortcode for event where you have a sort of a format setting eg. [suger_single_event format="

{event_name}

{event_time}

"]

Or make it work so one can design in a page builder while having access to the fields and one can make a template for the event cpt?

Add "Duplicate Event" functionality to make copying events easy

To reproduce the issue:

  • Installed the plugin Duplicate Post from the WP.org repo as I do on most of my test sites to easily duplicate data https://wordpress.org/plugins/duplicate-post/
  • Navigated to the plugin settings to enable the post type Calendar
  • Hover over an existing event on my list, click the Clone link
  • Results were: the screen refreshes but no new calendar event was created

Expected behavior:

With previous version 1.6.x, you would receive a duplicate event in Draft status.

Allow multiple calendars to belong to a single event

First brought to my attention by Naomi on this HS ticket:
https://secure.helpscout.net/conversation/854098642/120683?folderId=1909452

The 1.6x of Sugar Calendar had the traditional category selection using a checkbox so you could assign multiple categories to an event:

old-sc-categories-calendars

The 2.x updated version of categories, now calendars, uses a radio option so only one calendar can be assigned to an event:

new-sc-cateories-calendars

The request is can we change it back to checkboxes or otherwise allow multiple calendars to be assigned to an event in some way?

Invalid Taxonomies

I write a plugin that emails on WordPress content publication. It has the potential to work very well with your plugin but for one problem, the custom taxonomy is not registering and I think this is because the includes/taxonomies.php file is not included anywhere else in the code.

Adding:
include_once( SC_PLUGIN_DIR . '/includes/taxonomies.php');

To the main plugin files remedies this issue.

Feature parity with non-Lite, minus recurring

Sugar Calendar (Lite) that is on WordPress.org is more different from regular Sugar Calendar than I remembered or thought.

It omits: categories, widgets, settings, feeds, end-time, and recurring.
(I thought it was only missing recurring for some reason.)

I think we should update (Lite) to include everything but recurring, and bump it to 1.6.8 so we have version parity between GitHub, Lite, and Licensed.

That provides a more functional base product, and incentivizes upgrading to 2.0 later.
(It also somewhat simplifies the deployment process to WordPress.org, but not enough where I consider that a huge bonus.)

Add timezone support to events

A potential customer has requested that we include support for setting timezones on an event-specific basis.

I really like this idea as it would allow for a site to publish events from multiple timezones.

In terms of implementation, I think events should always default to the site's timezone but then support a custom timezone to be set on the event.

sc_get_events_list() returns past events when getting upcoming

I have an event that starts today at 12pm (EST/New York set in WP), and ends at 2pm.

Expected behavior using [sc_events_list display="upcoming"]:
The event would show as upcoming until it starts or until it is over.

Expected behavior using [sc_events_list display="past"]:
The event would show as past once it is over (to the minute/second).

Actual behavior using [sc_events_list display="upcoming"]:
The event is still showing as upcoming, even 2 hours after the event is over.

Actual behavior using [sc_events_list display="past"]:
The event has been showing as a past event since we checked it this morning.

sc_event_list_widget widget missing from sc_using_widget

Reported via Sandhills support, the Events List widget is not included in the check for loading CSS and JS assets. I'm still in the process of troubleshooting their setup, but this is a simple and obvious fix that deserves some documentation.

Going to commit this directly to master, as the changes are benign and simple.

WP 5.3.1: wp_kses should not be passed an array

More info on what was changed in this ticket: https://core.trac.wordpress.org/ticket/48955

Location: https://github.com/sugarcalendar/lite/blob/master/sugar-event-calendar/includes/admin/list-tables/class-wp-list-table-base.php#L1667

Seeing errors like this:

Warning: preg_match() expects parameter 2 to be string, array given in /wp-includes/class-wp-block-parser.php on line 417 [www.salinasfairways.com/wp-admin/admin.php?page=sugar-calendar&cy=2020&cm=6&cd=13&mode=month] [wp-includes/class-wp-block-parser.php:417 preg_match(), wp-includes/class-wp-block-parser.php:256 WP_Block_Parser->next_token(), wp-includes/class-wp-block-parser.php:236 WP_Block_Parser->proceed(), wp-includes/blocks.php:521 WP_Block_Parser->parse(), wp-includes/blocks.php:274 parse_blocks(), wp-includes/formatting.php:4842 filter_block_content(), wp-includes/class-wp-hook.php:286 wp_pre_kses_block_attributes(), wp-includes/plugin.php:208 WP_Hook->apply_filters(), wp-includes/kses.php:914 apply_filters('pre_kses'), wp-includes/kses.php:737 wp_kses_hook(), wp-content/plugins/sugar-calendar/sugar-event-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1702 wp_kses(), wp-content/plugins/sugar-calendar/sugar-event-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1529 Sugar_Calendar\Admin\Mode\Base_List_Table->get_pointer_text(), wp-content/plugins/sugar-calendar/sugar-event-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1330 Sugar_Calendar\Admin\Mode\Base_List_Table->setup_pointer(), wp-content/plugins/sugar-calendar/sugar-event-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1272 Sugar_Calendar\Admin\Mode\Base_List_Table->get_event_link(), wp-content/plugins/sugar-calendar/sugar-event-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1226 Sugar_Calendar\Admin\Mode\Base_List_Table->get_event(), wp-content/plugins/sugar-calendar/sugar-event-calendar/includes/admin/list-tables/class-wp-list-table-month.php:200 Sugar_Calendar\Admin\Mode\Base_List_Table->get_events_for_cell(), wp-content/plugins/sugar-calendar/sugar-event-calendar/includes/admin/list-tables/class-wp-list-table-month.php:248 Sugar_Calendar\Admin\Mode\Month->get_row_cell(), wp-content/plugins/sugar-calendar/sugar-event-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2208 Sugar_Calendar\Admin\Mode\Month->display_mode(), wp-content/plugins/sugar-calendar/sugar-event-calendar/includes/admin/menu.php:156 Sugar_Calendar\Admin\Mode\Base_List_Table->display(), wp-includes/class-wp-hook.php:286 Sugar_Calendar\Admin\Menu\calendar_page(), wp-includes/class-wp-hook.php:310 WP_Hook->apply_filters(), wp-includes/plugin.php:465 WP_Hook->do_action(), wp-admin/admin.php:253 do_action('toplevel_page_sugar-calendar')]

Warning: strlen() expects parameter 1 to be string, array given in /wp-includes/class-wp-block-parser.php on line 489 [www.salinasfairways.com/wp-admin/admin.php?page=sugar-calendar&cy=2020&cm=6&cd=13&mode=month] [wp-includes/class-wp-block-parser.php:267 WP_Block_Parser->add_freeform(), wp-includes/class-wp-block-parser.php:236 WP_Block_Parser->proceed(), wp-includes/blocks.php:521 WP_Block_Parser->parse(), wp-includes/blocks.php:274 parse_blocks(), wp-includes/formatting.php:4842 filter_block_content(), wp-includes/class-wp-hook.php:286 wp_pre_kses_block_attributes(), wp-includes/plugin.php:208 WP_Hook->apply_filters(), wp-includes/kses.php:914 apply_filters('pre_kses'), wp-includes/kses.php:737 wp_kses_hook(), wp-content/plugins/sugar-calendar/sugar-event-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1702 wp_kses(), wp-content/plugins/sugar-calendar/sugar-event-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1529 Sugar_Calendar\Admin\Mode\Base_List_Table->get_pointer_text(), wp-content/plugins/sugar-calendar/sugar-event-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1278 Sugar_Calendar\Admin\Mode\Base_List_Table->setup_pointer(), wp-content/plugins/sugar-calendar/sugar-event-calendar/includes/admin/list-tables/class-wp-list-table-base.php:1226 Sugar_Calendar\Admin\Mode\Base_List_Table->get_event(), wp-content/plugins/sugar-calendar/sugar-event-calendar/includes/admin/list-tables/class-wp-list-table-month.php:200 Sugar_Calendar\Admin\Mode\Base_List_Table->get_events_for_cell(), wp-content/plugins/sugar-calendar/sugar-event-calendar/includes/admin/list-tables/class-wp-list-table-month.php:248 Sugar_Calendar\Admin\Mode\Month->get_row_cell(), wp-content/plugins/sugar-calendar/sugar-event-calendar/includes/admin/list-tables/class-wp-list-table-base.php:2208 Sugar_Calendar\Admin\Mode\Month->display_mode(), wp-content/plugins/sugar-calendar/sugar-event-calendar/includes/admin/menu.php:156 Sugar_Calendar\Admin\Mode\Base_List_Table->display(), wp-includes/class-wp-hook.php:286 Sugar_Calendar\Admin\Menu\calendar_page(), wp-includes/class-wp-hook.php:310 WP_Hook->apply_filters(), wp-includes/plugin.php:465 WP_Hook->do_action(), wp-admin/admin.php:253 do_action('toplevel_page_sugar-calendar')]

Migrating from 1.x to 2.x will cause some Events to go missing

From: https://wordpress.org/support/topic/migrating-from-older-version-to-new/

The migrator will finish successfully, but then some Events will just be completely missing.

I've tracked it down, and it happens when an Event from 1.x has no end date/time value (missing or omitting the sc_event_end_date_time post meta key entirely).

This is causing the migrator to assign the Unix Epoch as the value, and there is no logic to prevent this from happening in this instance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.