Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Barry

    (@barryhughes-1)

    Definitely possible ??

    I’d recommend setting up a custom PHP template to display each of the embedded events (see the “How are events displayed?” section here or look through the forum for hints) and check out the RSVP docs in the wiki.

    Hello Barry,

    Thank you for the event rocket plugin! I am following your recommendation, too.

    May I ask if you can give me a hint how to enable RSVP for all events by default?

    Best,
    Jacob

    Plugin Author Barry

    (@barryhughes-1)

    Sure – but would you mind posting a new topic? It’s much easier for others to find things that way.

    yep ??

    Hello Barry,

    I can’t find any hints to the code I need to show the attendees list of an event. I have checked out both the links you have shared with michaely50. Can you point me into the right direction?

    Best,
    Jacob

    Thread Starter michaely50

    (@michaely50)

    I never thought I would be sharing WordPress code. I took up Barry’s challenge and learnt a lot (steep learning).
    I created a tribe-events folder in my theme folder
    created a file rsvp-form.php and copied the original file contents into this
    I added the code below which is a copy of the attendees code in the file with calls for non attendees.I did not cater for anonymous attendees in this code
    It did the job. I am sure there are better ways
    Hope that helps
    Michael

    <?php
    // Repeat for apologies. My Code
    $confirmed = $attendance->count_total_negative_responses();
    $count_text = sprintf( _n( ‘(%d apology)’, ‘(%d apology)’, $confirmed, ‘eventrocket’ ), $confirmed );
    printf( __( ‘Apology list %1$s %2$s %3$s’, ‘eventrocket’ ), ‘<i>’, $count_text, ‘</i>’ );
    ?> </h5>

    <?php if ( 0 === $confirmed ): ?>
    <p> <?php _e( ‘No confirmations so far.’, ‘eventrocket’ ) ?> </p>
    <?php else: ?>
    <?php
    $anon_confirmations = $attendance->count_negative_anon_responses();
    ?>

      <?php if ( $anon_confirmations > 0 ): ?>

    • <?php printf( _n( ‘%d anonymous attendee’, ‘%d anonymous attendees’, $anon_confirmations, ‘eventrocket’ ), $anon_confirmations ) ?>
    • <?php endif ?>

      <?php foreach ( $attendance->list_authed_negatives( true ) as $user ): ?>

    • <?php echo esc_html( $user->display_name ) ?>
    • <?php endforeach ?>

    <?php endif // if we have confirmed attendees ?>
    <?php endif // if show_attendees is enabled ?>
    <?php endif // if the user is logged in ?>

    Hello guys,

    @michaely50 wow, thank you for that piece of help!!

    @barry, can you confirm that this piece of code is okay, or might it cause any problems?

    Best,
    Jacob

    Plugin Author Barry

    (@barryhughes-1)

    Thanks for sharing, Michael – that’s a great example ??

    Jacob: it certainly sounds like it’s working for Michael. Will it work for you? Probably not directly – since if I’ve understood correctly it lists apologies rather than attendances.

    However, it definitely does a great job of illustrating how to make such a change and I’m sure you could take it and adapt it to meet your own needs. For instance, check out the section of Michael’s code beginning:

    foreach ( $attendance->list_authed_negatives( true ) as $user ):

    This is looping over the negative responses (“I will not attend”) for authenticated (logged in) users. There are corresponding methods to retrieve the positive (“I will attend”) responses:

    • $attendance->list_authed_positives()
    • $attendance->list_anon_positives()
    • $attendance->list_positives() (authed and unauthed)

    When you supply true to these methods, as Michael did, that means you get an array of user objects back that you can use however you want.

    Hello Barry,

    I have just seen that what I want (show attendees list) already exists, but I just can’t find out where to activate it.

    I have found the if ( $show_attendees ) in the rsvp-form.php and have also seen that by event rocket 3.2 your changelog says

    Option to show attendees on the frontend added (props: mikejanzen)

    .

    I haven’t found any event rocket settings page where I could activate the attendees list. Where is this possible?

    Thanks for your help,
    Jacob

    Plugin Author Barry

    (@barryhughes-1)

    Hi Jacob,

    It’s configurable via the event editor for each individual event.

    https://eventrocket.files.wordpress.com/2015/06/rsvp-settings.png

    Thank you Barry!

    I was hoping i can turn it on by default for all events. Is there a piece of code I can realize this with?

    Best wishes,
    Jacob

    Plugin Author Barry

    (@barryhughes-1)

    Similar to what we covered here – but you would want to add a line setting EventRocket_RSVPManager::SHOW_ATTENDEES_RSVP to true ??

    Perfect. and if i wanted the avatar image being displayed, i assume i must insert some piece of code into this area?

    <?php foreach ( $attendance->list_authed_positives( true ) as $user ): ?>
    							<li> <?php echo esc_html( $user->display_name ) ?> </li>
    						<?php endforeach ?>
    Plugin Author Barry

    (@barryhughes-1)

    Yep, next to the display name might be a nice spot. WordPress supplies a handy function – get_avatar() – which you might use here.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Show RSVP attendees in Page’ is closed to new replies.