• Resolved janhoos

    (@janhoos)


    Hey everyone!

    Started using this plugin and so far its been great! Even thinking about going Pro just to show my support (got everything I need in the free one).

    What I do like to add tho is the group a user belongs to (I have a plug-in that adds groups to my users) in the list of users that is attending an event.

    I dont think I need to make a custom attribute for this as those are only for the event or location. I have a shortcode that displays the group a person belongs to. I just cant get it to work with the events shortcode of displaying a list of attendees.

    http://wordpress.org/plugins/events-manager/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    unfortunately this isn’t possible out of the box and you might need to create custom php codes to handle this but basically you’ve wanted to group each attendees of the event?

    eg.

    Events name x

    Group A – attendees
    User 1
    User 2

    Thread Starter janhoos

    (@janhoos)

    Hmmm 😛 I was afraid of that. It isnt such a big deal, but it would be a nice touch.

    Well, as you might have guessed by my avatar, I’m running an airsoft team. So we have an agenda showing what events we are attending, and which members are attending it. We also have junior members that are not fully a member yet. They can only become a full member when they attend an event with 3 or 4 full members

    So I wanted to show a list of:

    Airsofters attending:
    Jan – Full member
    Steven – Junior Member
    Jeroen – Junior Member
    Bart – Full Member

    For example 🙂 Does not have to be ordered, although I guess thats relativly easy to build in as soon as I have the basic unordered functionality going.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    you might need custom coding for this.

    eg. you can modify template file templates/placeholders/attendeeslist.php then add your custom codes

    then use placeholder #_ATTENDEESLIST

    to use templates: http://wp-events-plugin.com/documentation/using-template-files/

    Thread Starter janhoos

    (@janhoos)

    Ok! Thanks for the answer. Should be doable. Guess I can paste the shortcode that displays a user group in the php file or work out something.

    Thanks a lot!

    Thread Starter janhoos

    (@janhoos)

    I changed the code in the attendeeslist.php to the following to display the BBpress forum roles 🙂

    You might have to add it to the bottom name code also if you have more then one ticket registration open. But on my website, I only allow people to buy one ticket.

    <?php
    /* @var $EM_Event EM_Event */
    $people = array();
    $EM_Bookings = $EM_Event->get_bookings();
    if( count($EM_Bookings->bookings) > 0 ){
    	?>
    	<ul class="event-attendees">
    	<?php
    	$guest_bookings = get_option('dbem_bookings_registration_disable');
    	$guest_booking_user = get_option('dbem_bookings_registration_user');
    	foreach( $EM_Bookings as $EM_Booking){
    		if($EM_Booking->booking_status == 1 && !in_array($EM_Booking->get_person()->ID, $people) ){
    			$people[] = $EM_Booking->get_person()->ID;
    			echo '<li>'. $EM_Booking->get_person()->get_name() . <strong>'&nbsp;-&nbsp;' . '<i>'. bbp_get_user_display_role($people[] = $EM_Booking->get_person()->ID);'</i></strong></li>';
    		}elseif($EM_Booking->booking_status == 1 && $guest_bookings && $EM_Booking->get_person()->ID == $guest_booking_user ){
    			echo '<li>'. $EM_Booking->get_person()->get_name() .'</li>';
    		}
    	}
    	?>
    	</ul>
    	<?php
    }
    Thread Starter janhoos

    (@janhoos)

    Oh sorry! Its not really clear what I did 😛

    I added the following line:

    . '<i>'. bbp_get_user_display_role($people[] = $EM_Booking->get_person()->ID);'</i>

    To get the BBpress forum role to display. Used a line of code from the page itself to see what the user’s ID is.

    Thread Starter janhoos

    (@janhoos)

    Just modified the code with table tags to have it more organised 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Show user group with list of attendees’ is closed to new replies.