Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC:

See both attending and unattending registrations 6 years 11 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.

See both attending and unattending registrations 6 years 10 months ago #23528

  • jojo12
  • jojo12's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 3802
  • Thank you received: 470
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:
		// 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
		// 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
$register->name . '
you replace that with
$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.
if ($register->status == 1)...
<i class="icon-checkmark-circle" style="color:green"></i>
or
if ($register->status == -1)...
<i class="icon-cancel-circle" style="color:red"></i>
or
if ($register->status == 0)....
<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.

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

Last edit: by jojo12.

See both attending and unattending registrations 6 years 10 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.

See both attending and unattending registrations 6 years 10 months ago #23530

  • jojo12
  • jojo12's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 3802
  • Thank you received: 470
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.

See both attending and unattending registrations 6 years 10 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.

See both attending and unattending registrations 6 years 10 months ago #23532

  • jojo12
  • jojo12's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 3802
  • Thank you received: 470
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.

  • Page:
  • 1
  • 2
Time to create page: 0.327 seconds

Donate

If you find JEM useful and if you use it on your site, please consider a donation to the project.

Private Messages

You are not logged in.

Follow us......