Support

Home Forums Event Espresso Premium Display Attendees Names / City on website for public?

Display Attendees Names / City on website for public?

Posted: January 7, 2018 at 9:04 am


Allen

January 7, 2018 at 9:04 am

I am curious if there is a way to automatically display the names and city/state of all attendees on our website?

We run a series of billiards tournaments – so, when someone registers for the event, I want their name to appear on a “Registered Players” page … I am sort of new to wordpress, but I familiar with MS Access – So, I am assuming that the data is stored in a table somewhere (I know I can download a CSV file) … I want that data to be automatically posted online after a transaction. Not all data though, just name and location. (keep email, phone, and full address private of course)

Is something like this possible? I don’t really even know what to properly search for…


Seth Shoultes

  • Support Staff

January 8, 2018 at 2:14 pm

Hi Allen,

Yes, you can display the names of attendees using a shortcode, which is documented here: https://eventespresso.com/wiki/ee4-shortcodes-template-variables/#event-attendees

However, I don’t think it shows the city/state data by default, so you may have to customize the template a bit, which is also in the documentation.

Hope that helps. Please let us know if you have further questions.


Allen

January 8, 2018 at 8:08 pm

Thanks Seth, this is great! I am trying some things now – may need more help, but I’ll try first.

But, would be good to know: I have some custom questions/names in Question Groups. Can I have those show up also?

For example, a player “John Smith” can also pay entry for his friend “John Doe” .. he enters John Doe’s name in question fields called “Player’s First Name” Player’s Last Name” (people are allowed to pay for someone else, but we need the “Player Name” to be accurate…

So, I am researching how to do this now. Maybe you can help. I am not very fluent in PHP at all, so, it’s quite a task.


Allen

January 8, 2018 at 8:35 pm

Ok – so I found this: https://eventespresso.com/topic/ee4-modify-list-attendees-shortcode-to-show-additional-attendee-info/

Which is great! However I can’t figure out how to add custom questions. The Questions ID #s are 17 and 18

This is where it will be in use: http://superbilliardsexpo.com/registered-open/

Page is sort of bland for now, I need to style a bit. Is there a way fr me to format the data? Like, make the city/state a smaller font, or different color, or italics?

I have so much to learn, but this is all great!


Seth Shoultes

  • Support Staff

January 24, 2018 at 3:29 pm

Hi,

Sorry I missed your reply. Since the data is output as an HTML list (ul), you can easily style the output using CSS. The CSS code could be added via the WordPress customizer in the Appearance settings.


Allen

January 28, 2018 at 12:15 pm

Thanks Seth!

I’ve been playing around a bit and figuring some things out – making good progress!

Another question: is there a way I can make EE display State Names as abbreviations rather than full names?

You can see how I’ve tweaked things so far here: http://superbilliardsexpo.com/registered-open/

Also, I added some CSS to Capitalize words (since some people enter names in all lowercase) — but, is there a way or trick to fix a name that someone has entered in all caps?

That’s not such a big deal, I’m just trying to make the result page look more professional.

Thanks!


Allen

January 28, 2018 at 8:34 pm

OK – update – think I figured out the State abbreviation issue. I went into General Setting and then under Countries I edited the “Name” of each state to be just an abbreviation — then the dropdown list showed abbreviations and all entries already received updated themselves as well 🙂

Will this action cause any issues somewhere behind the scenes? Or is there a better way to fix this?


Seth Shoultes

  • Support Staff

January 29, 2018 at 2:09 pm

Hi Allen,

I don’t think that changing the names of the states to abbreviations will affect anything. It’s just a label as far as I know.

Regarding converting all caps, here’s a Stackoverflow thread that might help:
https://stackoverflow.com/questions/13793666/how-to-convert-uppercase-text-to-title-case-using-css


Allen

February 5, 2018 at 7:52 pm

Hello again – new related issue:

I have some attendees that register for themself and another person. Using the shortcode does not show each unique entry.

For example, we allow a person (John Smith) to register to play in our event. We also allow John to enroll his wife, Sally Smith.

To do this, “John” adds his entry and an additional one to his cart. I added a custom question to get the “Player’s Name” for anyone other than himself – in this case, “Sally”

The shortcode will show John’s name only once, and if I request the additional “Players Name” it will just show up under his name – rather than as an additional unique entry.

You can see my lists here: http://superbilliardsexpo.com/registered-open/

This is very confusing to explain here – I would gladly pay for phone support. Can you take a look and see if it makes sense?

In this situation, I want two entries to display, such as:

42. John Smith – Anytown, USA
43. John Smith – Anytown, USA
player’s name: Sally Smith

Currently, it is just doing this:
43. John Smith – Anytown, USA
player’s name: Sally Smith

And, therefore – not showing up as 2 unique entries.

Can this be fixed?

Thanks!


Josh

  • Support Staff

February 7, 2018 at 3:42 pm

Hi Allen,

This is something that can be changed by altering the loop-espresso_event_attendees.php. It appears that you’ve already been working on the related content-espresso_event_attendees.php. What you can do is within the main loop, foreach($contacts as $contact):, add a secondary loop that will loop through each registration and display a list item for each registration.

Alternatively you could add some code that shows a count/number of registrations for that contact. There’s some example code that does something similar in this gist:
https://gist.github.com/joshfeck/31d5ac0f3833b9820ccf947d01f243a3


Allen

February 17, 2018 at 6:37 pm

Thanks Josh – I have taken a look at what you’ve suggested, and I have no earthly idea how to “add a secondary loop that will loop through each registration and display a list item for each registration.”

I can see the part of the code you want me to edit, but I have no clue how.

I figured out the edits on the content-espresso_event_attendees.php page by comparing what was there versus what you guys suggested I add/change … but I can’t determine what to change on loop page. Can you help with more guidance? Can I pay you to create the code? I just need to get it working asap

I implemented your second suggestion for now, and figured that out. So now it shows a “count” (you can see here:http://superbilliardsexpo.com/registered-open/) – but, I think maybe editing the loop is what I need?


Allen

February 20, 2018 at 9:25 am

Hello?

Can you, or anyone, please help with this? I can pay for a support token if that will help … I just really need some help, asap.

Thanks!


Josh

  • Support Staff

February 21, 2018 at 2:34 pm

Hi Allen,

This type of request is more along the lines of a customization to exact specifications and is best supplied by a developer. You can get a quote from a developer to build the template to your specifications.

If you decide to do this yourself, we can offer further guidance in the way of pointing you in the direction of where to edit the code you have so far but please understand that Event Espresso support staff is not available for hire to do custom development.

In order to provide any further guidance we’ll need to take a look at the code you’ve got so far, and we prefer that large blocks of code be posted to a pastebin or to a gist so we can review readable code.


Allen

February 21, 2018 at 4:16 pm

Thanks! I haven’t edited the loop file at all, because I have no idea what to add. I know you said to “add a secondary loop that will loop through each registration and display a list item for each registration.” and I can see where you want me to do so – but I don’t know how. Can you post an example on gist hub? Or can you recommend where I could go to find someone to hire to write that code? Thanks!


Josh

  • Support Staff

February 22, 2018 at 10:33 am

Actually when you modify content-espresso_event_attendees.php, you are modifying what’s inside the loop. This is because content-espresso_event_attendees.php is everything that’s happening inside the loop.

Here’s the entire loop from the loop file:

<?php foreach( $contacts as $contact ) :
	EEH_Template::get_template_part( 'content', 'espresso_event_attendees', array( 
		'contact'       => $contact, 
		'event'         => $event,
		'datetime'      => $datetime,
		'ticket'        => $ticket,
		'show_gravatar' => $show_gravatar 
	) );
	endforeach; ?>

All that’s happening in the loop file with the loop is it loads up the template file you’re working on, so when you add an additional loop to the content-espresso_event_attendees.php file it will look like this:

if ($contact instanceof EE_Attendee) {
    $registrations = EEM_Registration::instance()->get_all(array(
        array(
            'ATT_ID' => $contact->ID(),
            'EVT_ID' => $event->ID()
        ),
    ));
}
foreach($registrations as $registration ){
	if($registration instanceof EE_Registration){
		echo '<li>';
		echo $contact->full_name() . ' - ' . $registration->ID();
		echo '</li>';
	}
}


Allen

February 22, 2018 at 1:26 pm

Thanks so much! I will attempt to play around with this code… The big problem/obstacle is that I know almost nothing about PHP coding. All I am doing is trying to decipher what does what and copy/pasting to try things out…

I see that apparently the “if (……) { …..}” IS the loop?

I realize I am ill-equipped for this, I’m doing my best … I’m sure you assumed I had some working knowledge of php, but I do not. It’s all guessing and trying to assess what does what.

I’ll play with this code and see if I can get the result I need. I’m guessing the solution is in here somewhere…

Thanks so much!


Josh

  • Support Staff

February 22, 2018 at 1:29 pm

No worries, and the loop is actually the foreach(){} part. We can help with further guidance if we can take a look at the code you’ve got so far. We ask that large blocks of code be posted to a pastebin or to a gist so we can review readable code.


Allen

February 22, 2018 at 1:48 pm

Ok – hopefully I did this correctly. I created a Pastebin account and made a public paste, is that what you wanted?
Here is the URL to it: https://pastebin.com/uSrB8Bne

As you’ll see, its your content-espresso_event_attendees.php file, with my edits. I havent edited the other Loop file you mentioned.

I have not added in the new code yet (well, I did, but it didn’t work right right away, so I removed it – I need more time to play with it)

Is this what you wanted?


Allen

February 22, 2018 at 1:49 pm

Or maybe this is how you wanted it? (Sorry I’m such a noob)

<iframe src=”https://pastebin.com/embed_iframe/uSrB8Bne” style=”border:none;width:100%”></iframe>


Allen

February 22, 2018 at 1:49 pm

haha, nope, that didnt work …

<iframe src="https://pastebin.com/embed_iframe/uSrB8Bne" style="border:none;width:100%"></iframe>


Allen

February 22, 2018 at 1:50 pm

neither did that, haha — sorry!


Josh

  • Support Staff

February 22, 2018 at 2:41 pm

You could try this:

https://gist.github.com/joshfeck/2cc9773f57abd1bf37cd3bff6ab6c94d


Allen

February 22, 2018 at 5:24 pm

Thanks for sharing this… I think its getting closer. You can see the result here: http://superbilliardsexpo.com/registered-super/

If you notice in the left column, for example, item 34 and 35, like this:
34. WILLIAM E KEENAN JR – ORLANDO, FL
Total Entries By Registrant (If >1): (3)
Player’s Name: GARY ERVIN
35.WILLIAM E KEENAN JR – ORLANDO, FL
Total Entries By Registrant (If >1): (3)
Player’s Name: GARY ERVIN

However – in actuality, William signed up for himself and for Gary.

So, it should read as:

34. WILLIAM E KEENAN JR – ORLANDO, FL
Total Entries By Registrant (If >1): (3)
35.WILLIAM E KEENAN JR – ORLANDO, FL
Total Entries By Registrant (If >1): (3)
Player’s Name: GARY ERVIN

William has one entry for himself, and then one where he answered the question “Is the person listed above the competitor in the event?*” (Question #20) with “No” and then provided a “Player’s” First Name and Last Name…

So, now I see – maybe I need to target Question #20 somehow?

Basically, when William IS the player, I do not need to see “Players Name” under his listing … only when he signs up someone else…

(William also has an entry in a different event, hence the (3) in his listing)

I know this is all tricky (well, definitely to me anyway) and I really appreciate your help immensely. Thank you so much!!


Josh

  • Support Staff

February 23, 2018 at 7:29 am

You can actually avoid the tricky conditionals when someone signs up for someone else and make this simpler by setting up the reg form to capture contact info for each player. So step one is simplify the registration form and set the Personal Information group for Additional Registrants.

Step 2 is you create a contact for each additional registration. For example, if you go to Event Espresso > Registrations and click on the 2 of 2 registration for WILLIAM E KEENAN JR, then you can click on Create Contact and input GARY ERVIN, then save.

After you do the above you can remove most of your custom code.


Allen

February 23, 2018 at 11:01 am

YES!!! This is exactly what I’ve ben trying to do since day one! Well, I’ve only done a quick test – gonna play with it some more.

Just an aside – I think this could’ve been figured out so much quicker (and saved me hours of trial an error and confusion) if you offered some sort of phone support. I would gladly pay for the option, as I am sure others would too. Sometimes it is so much easier to discuss what you need and get instant feedback and collaboration. Sort of a case of “you don’t know what you don’t know” …

Thansk again – gonna play with things some more and get back to you …


Josh

  • Support Staff

February 23, 2018 at 11:23 am

Hi Allen,

Thanks for the feedback. Please see this information about why we do not offer phone support:
https://eventespresso.com/wiki/why-we-dont-have-phone-support/


Allen

February 23, 2018 at 2:40 pm

So, this is all going much better now .. still tinkering …

curious – can I change the checkout pages to sat “Player 1” instead of “Attendee 1”? Not a big deal, but would be better …


Josh

  • Support Staff

February 23, 2018 at 2:55 pm

Hi Allen,

You can use a custom translation function like the example in the documentation to change that and any other strings:

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

You’ll see a few examples within that code where you’ll add/replace with your own strings e.g.
'Attendee %d' => 'Player %d',


Allen

February 23, 2018 at 3:21 pm

Also – can I style elements on the Event Cart page? Specifically, i want to make this message <span style="font-size:1.3em; color:red; font-style: strong;">IMPORTANT: If you are registering someone other than yourself, be sure to indicate the Player's Name and info in the Registration Fields on the following pages. We MUST HAVE the PLAYER's NAME</span> stand out on the checkout page … The Span tags work on this page: http://superbilliardsexpo.com/events/womens-amateur/ but they don’t carry over to the cart, and I don’t know why …

Thanks again!


Allen

February 24, 2018 at 7:38 am

I tried to change ‘Attendees’ to ‘Players’ by modifying the functions.php file in my child theme, but it doesn’t seem to be working… is that the right file?

Here is what I did: https://pastebin.com/Yafbvtey


Tony

  • Support Staff

February 26, 2018 at 2:03 am

Also – can I style elements on the Event Cart page? Specifically, i want to make this message

Looking over your site that message is already style, so I’m guessing you figured this out already?

I tried to change ‘Attendees’ to ‘Players’ by modifying the functions.php file in my child theme, but it doesn’t seem to be working… is that the right file?

Yes thats the correct file, but you are missing the callback for the filter in your code, add:

add_filter( 'gettext', 'mycustom_filter_gettext', 10, 3 );

just after line 49. That should hook the function in and get your translation working.


Allen

February 26, 2018 at 8:21 am

Awesome, thanks! And yes, I did figure out the proper CSS to target the cart. I don’t know why I just didn’t think of that before ..

The new line of code works great, thanks!Seems to be targeted by the same CSS that the ‘description’ was as well, but that’s not an issue.

The support post ‘Display Attendees Names / City on website for public?’ 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Allen 7 months, 3 weeks ago ago

Topic Tags

Notifications

This topic is:
pending
Do NOT follow this link or you will be banned from the site!