• Resolved mediocrefred

    (@mediocrefred)


    Hello,

    I’ve read through most of the Events Manager documentation and tutorials but have a few lingering questions. Would appreciate any help.

    My website is a brand new WP 3.2.1 install. It’s for a non-profit organization and will be used chiefly to announce events, sell tickets (tiered – different prices for donors, members and non-members) and the occasional blog posts/announcements. Since the organization is setup with Google Checkout, that is the only checkout option I have available.

    I need to display upcoming events (works with EM – except that I need to fix the layouts – I only want the Google map when the location field is clicked. On the event detail page, I want the event image instead of the Google map since most of the events are in the same location). I’d also like to list ticket prices and sell them, but, cannot do that with the non-pro version of EM. The booking option is of no use to me without the payment option. Looked at the Pro version, but, it only supports PayPal and so, no dice.

    So, my plan/desire is to use EM to display the list of upcoming events. However, when an event is clicked, instead of going to the single event page, I’d like to go to a custom page that has a single-event widget (is there one?) that displays all the relevant information as well as a shopping cart widget (I currently have WP e-commerce set up) that lists the tickets for that event. With WP e-commerce, I would have to create a category for each event and list the various ticket options as products within that category. For events with different prices for members and non-members, I would have to create multiple categories and display the correct one after the user logs in.

    Can this be done? Has anybody done anything like this before? Any suggestions? gotchas? To give a better idea of scale, we’ll have at most 12 events in a year and about 200 paid memberships (members and donors).

    Another question. I need to build a page that lists all the past events so prospective members can see what they can expect to get. How would I do this? EM’s Settings page allows me to select either future events or past events. The “events” page is good for upcoming events, but, I need one for past events – ideally grouped by year.

    Apologize for rambling. I really appreciate any/all suggestions.

    Thanks in advance,
    MediocreFred

    https://www.ads-software.com/extend/plugins/events-manager/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    could be done, but you’d need a somewhat experienced developer to add the extra functionality.

    Thread Starter mediocrefred

    (@mediocrefred)

    Hi Marcus, can you please be a little more specific? I realize that I rambled, but, here are the basic questions…

    1. Events Manager has a shortcode called “event” (it’s not documented, but, I found it in the shortcodes.php and it appears to work fine). How do I customize what info gets displayed? For instance, I might want an image, a description and the venue and date/time in 3 separate columns. Will the options in the Events Manager settings page that let me customize a single event page apply to this too?

    2. If I use the Events_List shortcode or the out-of-the-box Events page to list the events, can I (if so, how) change the target of the event link to point to my WP page (that has the event shortcode in it)?

    3. How do I build a page that has a list of past events? Can I use the events_list shortcode and pass in date arguments/parameters (before today) to it? If yes, can this list be formatted differently than the list on the events page?

    4. How can I display the Google map only on the Location page and not on the event detail page or the one that is displayed using the “event” shortcode?

    5. The integration with wp e-commerce (as described in my previous post) seems straightforward – using EM’s “event” shortcode and wpec’s shortcode for a shopping cart that takes in “category” as a parameter. Do you see any gotchas?

    Can you please tell me which of these requires an experienced developer and for the other questions, can you please suggest solutions. I am a Java/c#/asp.net developer and work with css, javascript and html everyday. Have never done any php (except during my struggles with Drupal a few years back… <shudder>).

    Thanks,
    MediocreFred

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    1. [event …]#_EVENTIMAGE … etc.[/event]

    2. see the events > settings area, you can change the format of most things using placeholders (see events > help)

    3. scope=past in your shortcode (see docs)

    … if you can figure out the php nuances e.g. undocumented shortcodes, pretty much all your questions can be sorted by reading the docs – wp-events-plugin.com/documentation/, specifically placeholders and search attributes.

    Thread Starter mediocrefred

    (@mediocrefred)

    Hi Marcus,

    Thanks for the replies. I really appreciate your help – unlike most other plugins that only support those that pay for the pro versions.

    I’ve been playing around with EM’s settings and the ability to customize the events list and event pages. A couple of follow up questions.

    1. What gets overwritten when I upgrade EM (minor/major upgrades)? Specifically, the page layout customizations made on the Settings page as well as new attributes added on the Settings page – do these get overeritten?

    2. We have events in the future that don’t have firm dates yet. For instance, we have some in “Spring 2012” or “Fall 2012” and others in “May 2012”. To be able to add these, I added a custom attribute called “ApproxDate”. I can set this value and have it show up just fine. However, I need to conditionally hide the Date and Time fields (since I cannot leave them blank while creating an event and need to dynamically decide to show either my ApproxDate attribute or the standard Date/Time fields). I am thinking of writing a function similar to HasBilling – that would check if the ApproxDate is not empty. If yes, it’ll display the ApproxDate, else, display the default Date/Time fields. Now, my questions is is this the best (well, good) way of implementing this and if so, where would I write this function? If your suggestions is to use one of EM’s php files, do I need to make sure I merge my changes in after every update?

    Thanks,
    MediocreFred.

    Thread Starter mediocrefred

    (@mediocrefred)

    OK. I’ve answered both of my questions in the previous post.

    Read through the custom placeholders and conditional placeholders tutorials a couple of times. I have now created a WP plugin and am trying to come up with a function that can check the value of my custom attribute “ApproxDate” (#_ATT{ApproxDate}) and display the default date/time if this is blank/null or display the value of the custom attribute if not null.

    I am a little lost on how to write this function. I would really appreciate a code snippet that will do this for me.

    I have a couple of other similar custom attributes where I can then use this similar functionality.

    Thanks,
    MediocreFred.

    Thread Starter mediocrefred

    (@mediocrefred)

    Tearing my hear out on this one…

    In Event Settings, I have this custom attribute: #_ATT{ApproxDate}

    In Event Settings -> Default Single Event Format, I have replaced the date and time bits with <p> When #_ATT{ApproxDate} </p>

    I created a plugin with a single file and this function (followed tutorial and WP Codex instructions):

    add_filter('em_event_output_placeholder','my_em_approxdate_placeholder',1,3);
    function my_em_approxdate_placeholder($replace, $EM_Event, $result){
    	global $wp_query, $wp_rewrite;
    
    //	switch( $result ){
    //		case '#_ATT{ApproxDate}'
    	$findme = 'ApproxDate';
    	$pos = strpos($result, $findme);
    
    	if ($pos === false) { }
    	else {
    		$replace = 'none';
    		if( $EM_Event->attributes[$result] == '' ){
    		     // $replace = #j #M #Y #@_{ \u\n\t\i\l j M Y} at <i>#_12HSTARTTIME - #_12HENDTIME</i>;
    			$replace = $EM_Event->event_start_date;
    		}
    		break;
    	}
    	return $replace;
    }

    My goal is to replace the #_ATT{ApproxDate} placeholder in the Single Event Format with the event date and time at runtime if ApproxDate has been left blank. If not, I want to display whatever is in ApproxDate (typically, March 2012 or Spring 2012).

    I have 2 events one that has a blank ApproxDate and another that doesn’t. They both show up with no substitution. What am I doing wrong?

    Thanks,
    MediocreFred.

    Thread Starter mediocrefred

    (@mediocrefred)

    Figured it out…

    First mistake – Had forgotten to activate my plugin ??

    Final function:

    add_filter('em_event_output_placeholder','my_em_approxdate_placeholder',1,3);
    function my_em_approxdate_placeholder($replace, $EM_Event, $result){
    	global $wp_query, $wp_rewrite;
    
    	$findme = 'ApproxDate';
    	$pos = strpos($result, $findme);
    
    	if ($pos === false) { }
    	else {
    		$replace = 'none';
    		if( $EM_Event->attributes[$result] == '' ){
    			$sd = new DateTime($EM_Event->start_date .T. $EM_Event->start_time);
    			$replace = $sd->Format("F j, Y") ." <strong>at</strong> ". $sd->Format("g:i a");
    
    		}
    	}
    	return $replace;
    }

    Please let me know if there are any glaring errors in this approach.

    Thanks,
    MediocreFred.

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    looks ok to me

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: Events Manager] New to EM. A few questions’ is closed to new replies.