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.

Hide Attende and Seats

9 years 11 months ago
  • trevor's Avatar
    Topic Author
  • trevor
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 1
Licenses:
JomSocial Expired

Hi, it would be really nice to be able to hide the attendee and seats text
Also the hosted by field...

As the site admin I create events on and behalf of customers so the events are never hosted by me.

But it would be great to be able to hide the attendee and seats field as to is akin to a booking and not really an event.
The event attendees box in the event detail page would also need to be hidden.

I hope that these options will be in back end soon...

I hope you can help.

9 years 11 months ago
Licenses:

Hi, Trevor.

Copy this file:

ROOT/components/com_community/templates/jomsocial/layouts/events/single.php

to:

ROOT/templates/your-template/html/com_community/layouts/events (if you don't have any of those folders, feel free to create them)

Edit file, scroll to line 251 and remove those lines:

<li class="full"><?php echo ($event->ticket) ? JText::sprintf('COM_COMMUNITY_EVENTS_TICKET_STATS', $event->ticket, $eventMembersCount, ($event->ticket - $eventMembersCount)) : JText::sprintf('COM_COMMUNITY_EVENTS_UNLIMITED_SEAT'); ?></li>
            <li class="full"><a href="<?php echo CRoute::_('index.php?option=com_community&view=events&task=viewguest&eventid=' . $event->id . '&type='.COMMUNITY_EVENT_STATUS_ATTEND )?>"><?php
                    echo JText::sprintf((CStringHelper::isPlural($eventMembersCount)) ? 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_MANY':'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT', $eventMembersCount);
                    #echo $eventMembersCount > 1 ? JText::_('COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_MANY') . ' <span class="joms-text--light">' . $eventMembersCount . '</span>' : JText::_('COM_COMMUNITY_EVENTS_ATTANDEE_COUNT') . ' <span class="joms-text--light">' . $eventMembersCount . '</span>'

                    ?></a></li>

            <?php if(isset($groupEventDetails) && !empty($groupEventDetails->groupName)){ ?>
            <li class="full"><?php echo JText::sprintf('COM_COMMUNITY_GROUP_EVENT_HOSTED_BY',$groupEventDetails->groupLink,$groupEventDetails->groupName,CRoute::_('index.php?option=com_community&view=profile&userid=' . $groupEventDetails->creator->id),$groupEventDetails->creator->getDisplayName()) ?></li>
            <?php }else{ ?>
                <li class="full"><?php echo JText::sprintf('COM_COMMUNITY_EVENT_HOSTED_BY',CRoute::_('index.php?option=com_community&view=profile&userid=' . $creator->id), $creator->getDisplayName()) ?></li>
            <?php } ?>


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
The following user(s) said Thank You: trevor
9 years 11 months ago
  • trevor's Avatar
    Topic Author
  • trevor
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 1
Licenses:
JomSocial Expired

Hi thank you it has almost worked..

In the list view it appears to be ok.. I just noticed in the event view it says event created by...


The attendee has gone - thank you....... but it still shows the text unlimited seats - also it still shows hosted by.

In the list view it appears to be ok.. I just noticed in the event view it says event created by...

So maybe in the event detail page I could change the text from hosted by to created by or just remove it...

Attachment events.JPG not found

Attachments:
9 years 11 months ago
  • trevor's Avatar
    Topic Author
  • trevor
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 1
Licenses:
JomSocial Expired

Don't worry I found It- Thank you :) Very much for your excellent and fast support...

9 years 11 months ago
  • trevor's Avatar
    Topic Author
  • trevor
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 1
Licenses:
JomSocial Expired

I get it - think...

so when I edit what is in the main template folder overrides the other files.

Would it be possible for me to add a line of code for the attendee, so it only displays for the user that created it, maybe something like if userid=creator then display
??

That way the admin could always see who is attending the event...

9 years 11 months ago
Licenses:

Hi, Trevor.

Yes, it's possible, just don't remove that li's but before them add this:

<?php if($isMine || $isCommunityAdmin || $isAdmin) { ?>
here goes li's <li></li>

And after them:

<?php } ?>

So full code should look like:

<?php if($isMine || $isCommunityAdmin || $isAdmin) { ?>
<li class="full"><?php echo ($event->ticket) ? JText::sprintf('COM_COMMUNITY_EVENTS_TICKET_STATS', $event->ticket, $eventMembersCount, ($event->ticket - $eventMembersCount)) : JText::sprintf('COM_COMMUNITY_EVENTS_UNLIMITED_SEAT'); ?></li>
            <li class="full"><a href="<?php echo CRoute::_('index.php?option=com_community&view=events&task=viewguest&eventid=' . $event->id . '&type='.COMMUNITY_EVENT_STATUS_ATTEND )?>"><?php
                    echo JText::sprintf((CStringHelper::isPlural($eventMembersCount)) ? 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_MANY':'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT', $eventMembersCount);
                    #echo $eventMembersCount > 1 ? JText::_('COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_MANY') . ' <span class="joms-text--light">' . $eventMembersCount . '</span>' : JText::_('COM_COMMUNITY_EVENTS_ATTANDEE_COUNT') . ' <span class="joms-text--light">' . $eventMembersCount . '</span>'

                    ?></a></li>
 
            <?php if(isset($groupEventDetails) && !empty($groupEventDetails->groupName)){ ?>
            <li class="full"><?php echo JText::sprintf('COM_COMMUNITY_GROUP_EVENT_HOSTED_BY',$groupEventDetails->groupLink,$groupEventDetails->groupName,CRoute::_('index.php?option=com_community&view=profile&userid=' . $groupEventDetails->creator->id),$groupEventDetails->creator->getDisplayName()) ?></li>
            <?php }else{ ?>
                <li class="full"><?php echo JText::sprintf('COM_COMMUNITY_EVENT_HOSTED_BY',CRoute::_('index.php?option=com_community&view=profile&userid=' . $creator->id), $creator->getDisplayName()) ?></li>
            <?php } ?>
<?php } ?>

Those lines will be displayed for event owner, community admin and SU.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
The following user(s) said Thank You: trevor
9 years 11 months ago
  • trevor's Avatar
    Topic Author
  • trevor
  • Offline
  • Fresh Boarder
  • Posts: 19
  • Thank you received: 1
Licenses:
JomSocial Expired

Wow, you are brilliant!! Thank you so much..

In order to hide the attendee tab I also added the line to;

<?php if($isMine || $isCommunityAdmin || $isAdmin) { ?>
<div id="joms-event--attend" class="joms-tab__content">
<div class="joms-module__body">
<?php if($eventMembersCount>0) { ?>
<ul class="joms-list--thumbnail">
<?php foreach($eventMembers as $member) { ?>
<li class="joms-list__item">
<a href="<?php echo CUrlHelper::userLink($member->id); ?>" class="joms-avatar">
<img src="<?php echo $member->getThumbAvatar(); ?>" alt="<?php echo $member->getDisplayName(); ?>" />
</a>
</li>
<?php } ?>
</ul>
<div class="joms-gap"></div>
<a class="joms-button--link" href="<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=viewguest&eventid=' . $event->id . '&type='.COMMUNITY_EVENT_STATUS_ATTEND );?>"><?php echo JText::_('COM_COMMUNITY_VIEW_ALL');?> </a>

<?php } else {
echo JText::_('COM_COMMUNITY_EVENTS_NO_USER_ATTENDING_MESSAGE');
} ?>
</div>
</div>
<?php } ?>

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