Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Name of User in Attendance List for Events

1 year 9 months ago
  • Pete's Avatar
    Topic Author
  • Pete
  • Offline
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 2
Licenses:
JomSocial Active

Hi,

Really hoping you can help me and put me out of my misery!

I have successfully been able to include a members full name to appear underneath their username when the full members list is shown after clicking on the members menu item.

I've used this snippet of code:

<?php echo $row->user->name; ?>

And I've inserted it in to the people.browse.php file in the <!-- friends count --> section...

What's driving me 'Crazy' is I now want to do the same for the 'Attendees' listing of an event ie, include a members full name to appear underneath their username in the list for attending an event but I just can not find which file to use to insert the above code.

So my question is can someone point me in the right direction as to which 'php' file to use and preferably exactly where to insert my snippet of code.

Many Thanks
Pete

1 year 9 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Pete,

Please try this :

echo $member->name

If doesnt work please try this one
$user = CFactory::getUser($member->id);
echo $user->name;

This is not tested code, but I hope it will work :)

cheers!

1 year 9 months ago
  • Pete's Avatar
    Topic Author
  • Pete
  • Offline
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 2
Licenses:
JomSocial Active

Hi Dimas,

Err, thank you for your reply, and thank you for the code...

I would try what you have supplied... but which php file do I add it to, and where about's in the file do I add it!

Just to recap ...

I have successfully been able to include a members full name to appear underneath their username when the full members list is shown after clicking on the members menu item.

My question is:

Can someone point me in the right direction as to which 'php' file to use and preferably exactly where to insert a snippet of code, to show the same for the 'Attendees' listing of an event ie, include a members full name to appear underneath their username in the list for attending an event.

I hope this is a bit clearer, as in your reply, you have given me a snippet of code but not told me which php file to include it in or where to place it!

Many thanks
Pete

1 year 9 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Pete,

Oh ya I forget to tell you the file lol.. you can add that code inside this file components/com_community/templates/jomsocial/layouts/events.members.php

thank you!

1 year 9 months ago
  • Pete's Avatar
    Topic Author
  • Pete
  • Offline
  • Fresh Boarder
  • Posts: 15
  • Thank you received: 2
Licenses:
JomSocial Active

Hi Dimas,

This doesn't work!
Plus the php file is the wrong one.

Finally with a lot of trial and error, going through any file that looked like it might be the one, I finally cracked it.

The actual php file to use is 'events.viewguest.php' and the code snippet I finally got to work is:

<?php $data = $guest->name;
echo $data; ?>

What I don't understand is, I also got it to work in the listing for members of a group using the php file 'groups.viewmembers.php',

but for it to work the same I had to use a different snipett of code:

<?php $user = CFactory::getUser($member->id);
echo $user->name; ?>

So for all 4 areas I wanted this to show the users name and their username I have had to use 4 different snippets of code!

Just seems very strange that one piece of code can not be used in all 4 instances.

Anyways it all seems to be working fine now,

Thanks

1 year 9 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Pete,

Nice played :) I am sorry I didnt give you correct file.. and the positive point is you could learn with this :)

cheers!

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW