Support

Home Forums Event Espresso Premium Espresso-template-calendar-table Display Issue

Espresso-template-calendar-table Display Issue

Posted: January 11, 2016 at 2:54 pm

Viewing 11 reply threads


Chi Bear

January 11, 2016 at 2:54 pm

I’m using the espresso-template-calendar-table plugin and having the following issue: If users are not logged in the espresso-template-calendar-table plugin displays a default message:

————————————————-

You are not logged in.

Before you can reserve a spot, you must register.

If you are a returning user please log in

New users please Register

calendar issue
————————————————-

Additional it show this massage for every unique event month. I’d like to change/abridge/delete the message and/or only show it once per multiple events if a client isn’t logged in. Thanks!


Tony

  • Support Staff

January 13, 2016 at 4:52 am

Hi there,

Because users can set specific events to require a login we show the login message on a per event basis, however that login message should be shown per event within each section rather than breaking out of the window.

Do you require login for all of your events?

If so one way to work around this is to use a plugin such as Members, then you can wrap the Calendar table shortcode within the [members_logged_in] shortcode so its only displayed to logged in members:

[members_logged_in][EVENT_CUSTOM_VIEW template_name=calendar-table][/members_logged_in]

Or you could remove the login check from the Calendar table and have the events do it, would that work? This would then display the events on the table but when the user click to register they will see that login message from above on the event details page.

Would that work?


Chi Bear

January 13, 2016 at 5:40 am

Yes!! Both sulotions are great but the latter solution would work best. How do I implement that into the table. I’m using the calendar table on my homepage and want it to be seen but require visitors to be forced to login to register or book an event.


Tony

  • Support Staff

January 13, 2016 at 9:10 am

I’ve just pushed some changes to our development copy of the Calendar table that allow for this.

Member only events look like this – http://take.ms/1as3Q

If your site is members only the shortcode will just load the login form – http://take.ms/5Z3R4

But I also added a skip_members_check parameter to the shortcode which allows you to bypass both of those and display the events as normal. Then when the user clicks on the event, if you have that event setup as member only EE will show the login form.

The changes are currently under review and will then be run through testing, however I can send you a copy of the add-on to the email address on your user account if you prefer?

Note that is you use that version of the add-on you can not use the auto update feature for that add-on unless you download and install the release version again.


Chi Bear

January 13, 2016 at 2:33 pm

Hi Tony,

Please send a copy of the add-on to my email address. I really appreciate your quick response and help on this development.


Tony

  • Support Staff

January 14, 2016 at 2:03 am

I’ve sent a copy of to your email.

Please let me know if you have any problems.


Chi Bear

January 18, 2016 at 5:59 am

Hi Tony,

We’ve installed the add-on and it works well and asyou described it would. I have one last question/request on this matter: Is there a way to bypass the event expresso registration message and redirect into the wordpress login page? I would like to eliminate this extra step:

You are not logged in.
Before you can reserve a spot, you must register.
If you are a returning user please log in
New users please Register

Thanks!


Tony

  • Support Staff

January 18, 2016 at 6:41 am

Great, I’m glad that works 🙂

Currently there’s no option to bypass that section and redirect directly to the login page. The user would need to login prior to visiting that page or use the link and return to the event after logging in.


Chi Bear

January 18, 2016 at 7:19 am

Thanks Again! Is it possible to have access to edit or modify the that section? Where can I find it in the source code?


Tony

  • Support Staff

January 18, 2016 at 7:25 am

You’ll need to copy the templates within /event-espresso/templates/

You’ll need registration_page.php and registration_page_display.php

Place them within /wp-content/uploads/espresso/templates/

EE will load the modified templates from there.

The login check is done within registration_page.php around line 259 before the _display template is called.


Chi Bear

January 18, 2016 at 7:48 am

I’ve reviewed and searched within registration_page.php and registration_page_display.php and cannot find the verbiage that matches:

You are not logged in.
Before you can reserve a spot, you must register.
If you are a returning user please log in
New users please Register

I did find the instance of the call for the login page but I simply want to modify the verbiage and possible the look and feel of the section/message.


Tony

  • Support Staff

January 18, 2016 at 8:01 am

Ah, sorry.

That section is not loaded through a template, its fairly simple to change the verbiage, you’ll need to translate each string to do so. You can use the function shown here:

https://eventespresso.com/wiki/how-to-change-wording-with-poedit/#custom-function

Its broken into multiple strings and there is only so much you can change with this:

function mycustom_filter_gettext( $translated, $original, $domain ) {
 
    // This is an array of original strings
    // and what they should be replaced with
    $strings = array(
        'You are not logged in.' => 'Custom Text 1.',
        'Before you can reserve a spot, you must register.' => 'Custom Text 2.',
        'If you are a returning user please ' => 'Custom Text 3',
        'log in' => 'Custom Text 4',
        'New users please' => 'Custom Text 5',
        // Add some more strings here
    );
 
    // See if the current string is in the $strings array
    // If so, replace its translation
    if ( isset( $strings[$original] ) ) {
        // This accomplishes the same thing as __()
        // but without running it through the filter again
        $translations = get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
 
    return $translated;
}
 
add_filter( 'gettext', 'mycustom_filter_gettext', 10, 3 );

Change each of the ‘Custom Text #’ strings to your new phrasing and add that to either your themes functions.php file or preferably a Site Specific Plugin.

If you need more customization that the above you’ll need to edit the registration_page.php template and rather than call event_espresso_user_login(), add your custom output there.

Viewing 11 reply threads

The support post ‘Espresso-template-calendar-table Display Issue’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso