help to better help you:

Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!

See both attending and unattending registrations

See both attending and unattending registrations

7 years 8 months ago
#23503
Hi,
In Joomla backend I can see which users have registered as attending and not attending an event.
Events in the Joomla frontend only shows attending users, not unattending users. I would like to show both attending and not attending users, is there some way to configure this?
The following user(s) said Thank You: jojo12

Please Log in or Create an account to join the conversation.

Re: See both attending and unattending registrations

7 years 8 months ago - 7 years 8 months ago
#23528
Hi Thomsus (and others)
With the help of Hoffi I got a hack for the frontend.
You must go to site/models/event.php save it, then go inside and search for:
Code:
// Get registered users $db = $this->getDbo(); $query = $db->getQuery(true); $query = 'SELECT ' . $name . ' AS name, r.uid' . $avatar . ' FROM #__jem_register AS r' . ' LEFT JOIN #__users AS u ON u.id = r.uid' . $join . ' WHERE event = '. $db->quote($event) . ' AND waiting = 0 ' . ' AND status = 1 '; $db->setQuery($query);
and replace this with
Code:
// Get registered users $db = $this->getDbo(); $query = $db->getQuery(true); $query = 'SELECT IF(r.status = 1 AND r.waiting = 1, 2, r.status) AS status, ' . $name . ' AS name, r.uid' . $avatar . ' FROM #__jem_register AS r' . ' LEFT JOIN #__users AS u ON u.id = r.uid' . $join . ' WHERE event = '. $db->quote($event); //. ' AND waiting = 0 ' //. ' AND status = 1 '; $db->setQuery($query);
then you create an template override for: event/default_attendees.php
there are 4 lines with
Code:
$register->name . '
you replace that with
Code:
$register->name . ' (' . $register->status . ')

then you will see all attending (1) or nonattending (-1) or invited (0) persons.

With more experience you can add icons for a better sight:
for protostar template e.g.
Code:
if ($register->status == 1)...
Code:
<i class="icon-checkmark-circle" style="color:green"></i>
or
Code:
if ($register->status == -1)...
Code:
<i class="icon-cancel-circle" style="color:red"></i>
or
Code:
if ($register->status == 0)....
Code:
<i class="icon-question-circle" style="color:orange"></i>

ATTENTION: the model will be changed after an update!
This makes sense only for small groups where all participants need to see who is not attending
In the settings you can give the permission who can see it.
Last edit: 7 years 8 months ago by jojo12.

Please Log in or Create an account to join the conversation.

Re: See both attending and unattending registrations

7 years 8 months ago
#23529
That's great.
I have just a little side note, plus a few questions.

1) For those who do not know what is 1 (-1) so it might be better to display text (attendee, not atendee etc ..) How to do it?

2) How to get each name on one line?
3) How to add to this listing login date and user comments?

Please Log in or Create an account to join the conversation.

Re: See both attending and unattending registrations

7 years 8 months ago
#23530
1) I personally omitted the (1) (0) or (-1) and choosed the Icons with the if.
2) In my case (template) each Name is on one line
3) I don't want the Login date and user comments readable for all. So I don't care

I personally use the template adaptions of Egnarts for Joomla 3.6.5 with fontawesome Icons
and have a template which uses bootstrap 3+ (ja_purity_iii and ja_simpli)

Please Log in or Create an account to join the conversation.

Re: See both attending and unattending registrations

7 years 8 months ago
#23531
jojo12, Thank you for more information.

Add 1) My point is that the user does not know what an icon means ... so I wanted to see the text.

Add 2) Me users are displayed in the row behind you, thank you for directions, try to check and modify the template.

Add 3) In my case, I need to view the comments for other users, like " I'll come back later ... " etc. Date may not be displayed, but myself I see no problem.

Please Log in or Create an account to join the conversation.

Re: See both attending and unattending registrations

7 years 8 months ago
#23532
Hi Kralyk
ad 1)
Icons and colors would make it more clear and I think they don't need explications (see image)
If they are needed you can add a line of explications
ad 3) not my interests. But I think the comments need much more place, then you need the possibility to open the special window for all. This will be much more complicated, because of the permissions.

Attachments:

The following user(s) said Thank You: Kralyk

Please Log in or Create an account to join the conversation.

Time to create page: 0.898 seconds