Support » Plugin: GigPress » extend Country list to accommodate “online” performances

  • Resolved nadworks

    (@nadworks)


    It’s increasingly pertinent to be able to detach a concert from a location.
    To show that you are accommodating this global change and continue to help artists to promote events/shows/concert, it would be great to enable this option with the native field system.

    Our current custom solution is being overwritten with each GP update.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author András Guseo

    (@aguseo)

    Hi @nadworks

    Thanks for reaching out!

    This sounds like a great idea and we would be really interested to hear more about your solution! Can you share some details and screenshots maybe?

    Also I want to point out that we are happy to receive ideas and pull request to our GigPress repo on GitHub:
    https://github.com/moderntribe/gigpress

    Feel free to make a PR of your idea there and we will definitely take a look at it!

    Looking forward to checking it out!

    Cheers,
    Andras

    Thread Starter nadworks

    (@nadworks)

    Hi and thanks for the open ears.

    We are currently editing the countries.php file manually each time, adding “countries” i.e. “online” or “virtual” – however, needless to say, that’s highly insufficient and laborious since the file is being overwritten with each plugin update.

    screenshot of countries.php

    Maybe take a leaf out of FB’s event listing fields, where the UI now has an “online event” tick box, which could be adapted for Gigpress to make the country file obsolete when selected. In addition, it could open up the option to add additional time zones. Our audience appreciates knowing when the events start in various time zones (GMT, EDT, CET…).

    We are currently bastardising the “venue” field to carry the platform our events are streamed on, i.e. zoom, Vimeo, FB live etc. still, the requirement for a city is just counter-intuitive.

    An additional request we get every so often are adjustments to the countries list in general. i.e. we like using the full country names, but not for all. “UK” is still more commonly used than “United Kingdom”, “USA” is more standard than “United States of America”, etc. Yet, we want to spell out “Italy”, “Germany”, “Spain” etc. So in essence, if we make those adjustments manually to the countries.php, each update will revert back our changes. Multiply that by the number of websites we run for our artist clients, and we have an entire day of manual edits to do each time Gigpress is updated.

    If improvements for those additional options can be developed without affecting legacy calendars (most of our clients want to keep showing their touring history), then that would be excellent.

    Plugin Author András Guseo

    (@aguseo)

    Hi @nadworks

    The timezones are a bit tricky to do.

    What I submitted for now is making the country list filterable, which would allow you changes like ‘United States’ to ‘US’ and adding your own ‘countries’ like ‘online’.

    That should save you the hassle of always messing with the country list.

    The code needs to be reviewed first, so at this point I cannot say when it’s going to be released.

    Cheers,
    Andras

    Thread Starter nadworks

    (@nadworks)

    Thanks, much appreciated. And that’s definitely a great first step to more flexibility.
    Thanks for keeping this amazing plugin up-to-date and developing it further.

    Plugin Author András Guseo

    (@aguseo)

    I’ll try to add also a filter to make the city not required. :fingers-crossed:

    Thread Starter nadworks

    (@nadworks)

    Has there been any progress on this?
    Just curious.

    Thread Starter nadworks

    (@nadworks)

    Sorry, but has there been any movement on this? It would be a huge improvement for a (relatively) small tweak. Artists need your support here.

    Plugin Author András Guseo

    (@aguseo)

    Hi @nadworks,

    Sorry for the long silence here. I just pinged the team and asked when we can have this released. I’ll get back to you as soon as I get a reply.

    A.

    Plugin Author András Guseo

    (@aguseo)

    Hi @nadworks

    To give you an update, we are checking when we could push an update for GigPress. will probably not fit into Jan, but will do our best to have it out in Feb.

    Cheers

    Thread Starter nadworks

    (@nadworks)

    Thanks for working on this.
    All we need now is a tiny hint on how to actually achieve these requested operations in our installations. It’s great that the new filters are somewhere in the code. But without an idea about how to…
    – make added countries permanent
    – make the city field optional
    … we’re not much further. Thanks.

    • This reply was modified 4 months, 2 weeks ago by nadworks.
    Plugin Author András Guseo

    (@aguseo)

    Hi @nadworks, you are absolutely right.

    This should go either in a new custom plugin or in the functions.php file.

    I added three examples in this snippet. First part will add a country to the existing country list and then there are the examples on how to sort the list by the abbreviation or the country name.

    The second part shows how you can delete a country from the list.

    The third part will create a custom country list and use that only.

    Choose the part that you need.

    add_filter( 'gigpress_country_list', 'my_gigpress_country_list');
    
    function my_gigpress_country_list( array $gp_countries ) {
        // Add a country to the list:
        $gp_countries['XX'] = 'My Country';
    
        // Sort array by key (XX)
        ksort( $gp_countries );
    
        // Sort array by value (My Country)
        asort( $gp_countries );
    
        /****/
    
        // Delete a country, e.g. Bahrain from the list:
        unset( $gp_countries['BH'] );
    
        /****/
    
        // Do a custom country list:
        $gp_countries = [
            'AT' => 'Austria',
            'DE' => 'Germany',
            'CH' => 'Switzerland',
        ];
    
        return (array) $gp_countries;
    }
    • This reply was modified 4 months, 1 week ago by András Guseo. Reason: Added type casting
    Plugin Author András Guseo

    (@aguseo)

    Setting the city field not required can be done like this:

    add_filter( 'gigpress_venue_city_required', '__return_false' );

    Let me know if all this helps.

    Cheers,
    Andras

    Thread Starter nadworks

    (@nadworks)

    Just discovered this by accident. Phew! Finally some instructions. Thanks.
    Maybe worth putting into the documentation.

    Plugin Author András Guseo

    (@aguseo)

    Hi @nadworks

    Happy to hear it helps.

    Good point on the documentation. I’ll try to get it in there.

    I am going to mark this ticket as resolved. If you need anything else please create a new ticket and we’ll be happy to help.

    Cheers,
    Andras

Viewing 14 replies - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.