Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #405541

    I thought I might be able to use the magazine content element in conjunction with Events Manager (EM) since it displays Categories separately. However, it apparently only understands posts/events in the order of when they are posted and not event dates that are set up within EM. For instance, what’s showing in each magazine module, defined by a single category, are events displayed by the date I added the event and not the actual date of the event (as defined in EM). Is there a workaround for this?

    I am using the current versions of everything – WP, Enfold, Events Manager

    #406008

    Hey Blaise!

    Try opening up /enfold/config-templatebuilder/avia-shortcodes/magazine.php and find line 549.

    $markupTime 	= avia_markup_helper(array('context' => 'entry_time','echo'=>false, 'id'=>$entry->ID, 'custom_markup'=>$this->atts['custom_markup']));
    

    And change it to this.

    if ( get_post_type() === TribeEvents::POSTTYPE ) { 
    	$markupTime = tribe_get_start_date(); 
    } else { 
    	$markupTime 	= avia_markup_helper(array('context' => 'entry_time','echo'=>false, 'id'=>$entry->ID, 'custom_markup'=>$this->atts['custom_markup']));
    }
    

    Best regards,
    Elliott

    #406176

    Thanks. But when I did that, I get a blank page with this warning:
    Parse error: syntax error, unexpected ‘}’ in /home/fakce/public_html/wordpress/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/magazine.php on line 553

    Line 553 is where your code fix ends if I replace your fix directly into line 549. I tried removing ‘}’ but got a different error. Should I have removed line 549 and placed your fix elsewhere – outside of the brackets that resides in?

    #406627

    Hi!

    Lines 547 – 555 should look like this.

    $markupTitle 	= avia_markup_helper(array('context' => 'entry_title','echo'=>false, 'id'=>$entry->ID, 'custom_markup'=>$this->atts['custom_markup']));
    $markupContent 	= avia_markup_helper(array('context' => 'entry_content','echo'=>false, 'id'=>$entry->ID, 'custom_markup'=>$this->atts['custom_markup']));
    if ( get_post_type() === TribeEvents::POSTTYPE ) { 
    	$markupTime = tribe_get_start_date(); 
    } else { 
    	$markupTime 	= avia_markup_helper(array('context' => 'entry_time','echo'=>false, 'id'=>$entry->ID, 'custom_markup'=>$this->atts['custom_markup']));
    }
    $format			= get_post_format($entry->ID) ? get_post_format($entry->ID) : 'standard';
    $type			= get_post_type($entry->ID);
    

    Best regards,
    Elliott

    #406686

    I made the change but it’s not doing anything – or the right thing.
    Also, wouldn’t a change like this could be wiped out by an Enfold upgrade?

    #407159

    Hey!

    Sorry, that was working fine for another customization I was doing in the loop but I didn’t check it here with the custom query. Instead try reverting all of the previous changes and then change line 532 from this.

    $time			= get_the_time(get_option('date_format'), $entry->ID);
    

    To this.

    if ( $entry->post_type == 'tribe_events' ) { $time = tribe_get_start_date($entry->ID, false, 'M j Y'); } else { $time = get_the_time(get_option('date_format'), $entry->ID); }
    

    Regards,
    Elliott

    • This reply was modified 9 years, 1 month ago by Elliott.
    #421884

    Hello
    We would like to do the same, combine Magazine and Event Manager.
    My conclusion from what is written above is that I should only change line 532. Is that correct?
    This doesn’t work in our case.
    Do you have another solution for us?
    Thanx,
    Joke
    (MediateamWingerd)

    #422280

    Hi!

    In what way does it not work? Are you getting any error messages, blank screen etc?

    Best regards,
    Rikard

    #422353

    When we only change line 532 nothing happens.
    When we change all the lines written above, the whole screen below the menu buttons turns black.

    #422747

    Hey!

    You should only do this one, https://kriesi.at/support/topic/magazine-and-events-manager/#post-407159.

    Deactivate all plugins and send us a link to your page and we’ll take a look.

    Regards,
    Elliott

    #422864

    Since I started this, I should note that the fixes Elliott gave us never worked. My code expert said at the time, “Elliotr is sending you fixes for the wrong calendar module. This tribe prefixed stuff is probably for https://theeventscalendar.com/product/wordpress-events-calendar/ . Also, he’s just changing the date display, and not anything to do with the ordering of the list – it’s probably fetching events by post date. I can’t imagine this working correctly if the code was correct for our module, even if it sorts in PHP by the event date. Also the issue about modifying the plugin files directly.”

    So we ended up grabbing the magazine module code and added the Events Manager shortcodes to get it to do what we needed.

    #422917

    Hey!

    Not sure if I understand you correctly, did you get your issue fixed?

    Cheers!
    Rikard

    #423196

    Basically, I had to abandon the module as it normally exists and recreate it using Events Manager shortcodes (all caps below) like this:

    <div id=”av-magazine-1″ class=”av-magazine av-magazine-hero-left av-magazine-top-bar-active av-magazine-tabs-active”>
    <div class=”av-magazine-top-bar”>

    </div>
    <div class=”av-magazine-group sort_all”>
    <div class=”av-magazine-hero first flex_column av_one_half”>
    [events_list offset=0 limit=1 scope=”future” category=”workshops”]
    <article class=”hentry av-magazine-entry av-magazine-format-standard av-magazine-type-event av-magazine-entry-big”>
    <div class=”av-magazine-thumbnail”>
    #_EVENTIMAGE
    </div>
    <div class=”av-magazine-content-wrap”>
    <header class=”entry-content-header”>
    <time class=”av-magazine-time updated”>#_EVENTDATES</time>
    <h3 class=”av-magazine-title entry-title” itemprop=”headline”>#_EVENTNAME</h3>
    </header>
    <div class=”av-magazine-content entry-content” itemprop=”text”>#_EVENTEXCERPT{10,…}</div>
    </div>
    <footer class=”entry-footer”></footer>
    </article>
    [/events_list]
    </div>
    <div class=”av-magazine-sideshow flex_column av_one_half”>
    [events_list offset=1 limit=4 scope=”future” category=”workshops”]
    <article class=”hentry av-magazine-entry av-magazine-format-standard av-magazine-type-event av-magazine-entry-small”>
    <div class=”av-magazine-thumbnail”>
    #_EVENTIMAGE{80,80}
    </div>
    <div class=”av-magazine-content-wrap”>
    <header class=”entry-content-header”>
    <time class=”av-magazine-time updated”>#_EVENTDATES</time>
    <h3 class=”av-magazine-title entry-title” itemprop=”headline”>#_EVENTNAME</h3>
    </header>
    </div>
    <footer class=”entry-footer”></footer>
    </article>
    [/events_list]
    </div>
    </div>
    </div>
    <hr>
    <h3>All Workshops</h3>
    <div class=’css-events-list’>
    [events_list_grouped mode=”monthly” scope=”future” category=”workshops” limit=”10″ pagination=”1″ /]
    </div>

    So that works as long as categories are assigned – and I had several. So using/tweaking the code without the WYSIWYG interface ultimately solved my problem. I put this here to help anyone else in this situation.

    #423365

    Hey!

    Ok great, glad you got it fixed and thanks for sharing.

    Cheers!
    Rikard

    #429512

    Thanks, but we stopped this option.

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Magazine and Events Manager’ is closed to new replies.