Hi, MJay.
Yes, it can be done with little Magic Mike hack :)
Copy this file:
ROOT/components/com_community/templates/default/events.viewevent.php
to:
ROOT/templates/your-template/html/com_community (if you don't have "html" or "com_community" folders, feel free to create them)
Edit file and replace this (line 230 to 311):
<div class="cMain">
<!-- Global Application Tab bar framework -->
<div class="cTabsBar clearfull">
<ul class="cPageTabs cResetList cFloatedList clearfix">
<li <?php if( $showStream ) {echo 'class="cTabCurrent"';} else {echo 'class="cTabDisabled"';} ?>><a href="javascript:void(0)"><?php echo JText::_('COM_COMMUNITY_FRONTPAGE_RECENT_ACTIVITIES');?></a></li>
<li <?php if(!$isEventGuest && !$showStream) {echo 'class="cTabCurrent"';} ?>><a href="javascript:void(0)"><?php echo JText::_('COM_COMMUNITY_EVENTS_DETAIL');?></a></li>
<!--li <?php if(!$isEventGuest) {echo 'class="cTabDisabled"';} ?>><a href="javascript:void(0)">Event Program</a></li-->
</ul>
</div>
<!-- END: Global Application Tab bar framework -->
<!-- START: Global Application Tab bar contents -->
<div class="cTabsContentWrap">
<!-- Tab 1: Activity Stream Container -->
<?php if( $showStream ) { ?>
<div class="cTabsContent <?php if($showStream) {echo 'cTabsContentCurrent';} ?>">
<!-- Stream -->
<?php if( $showStream ) { $status->render(); } ?>
<div class="cActivity cEvent-Activity" id="activity-stream-container">
<div class="cActivity-LoadLatest joms-latest-activities-container">
<a id="activity-update-click" class="btn btn-block" href="javascript:void(0);"></a>
</div>
<?php echo $streamHTML; ?>
</div>
<!-- end: stream -->
</div>
<?php } ?>
<!-- Tab 1: END -->
<!-- Tab 2: Event Details -->
<div class="cTabsContent <?php if(!$isEventGuest && !$showStream ) {echo 'cTabsContentCurrent';} ?>">
<div class="cEvent-Description">
<?php
if( !CStringHelper::isHTML($event->description) ) {
echo CStringHelper::nl2br($event->description);
}
else {
echo $event->description;
}
?>
<!-- Focus Details expand/collapse -->
<div class="js-focus-details">
<div class="row-fluid">
<div class="span12">
<dl>
<!-- Event Category -->
<dt><?php echo JText::_('COM_COMMUNITY_EVENTS_CATEGORY'); ?></dt>
<dd><a href="<?php echo CRoute::_('index.php?option=com_community&view=events&categoryid=' . $event->catid);?>"><?php echo JText::_( $event->getCategoryName() ); ?></a></dd>
<!-- Event Date & Time -->
<dt><?php echo JText::_('COM_COMMUNITY_EVENTS_TIME')?></dt>
<dd>
<?php echo ($allday) ? JText::sprintf('COM_COMMUNITY_EVENTS_ALLDAY_DATE',$event->startdateHTML) : JText::sprintf('COM_COMMUNITY_EVENTS_DURATION',$event->startdateHTML,$event->enddateHTML); ?>
<?php if( $config->get('eventshowtimezone') ) { ?>
<span class="small"><?php echo $timezone; ?></span>
<?php } ?>
</dd>
<!-- Event Location -->
<dt><?php echo JText::_('COM_COMMUNITY_EVENTS_LOCATION');?></dt>
<dd id="community-event-data-location">
<a href="http://maps.google.com/?q=<?php echo urlencode($event->location); ?>" target="_blank"><?php echo $event->location; ?></a>
</dd>
<!--Event Occurence -->
<?php if ($event->isRecurring()) { ?>
<dt><?php echo JText::_('COM_COMMUNITY_EVENTS_OCCURENCE');?></dt>
<dd><?php echo JText::_('COM_COMMUNITY_EVENTS_REPEAT_' . strtoupper($event->repeat)); ?></dd>
<?php }?>
<!--Event Admins-->
<dt><?php echo JText::_('COM_COMMUNITY_EVENTS_ADMINS')?></dt>
<dd><?php echo $adminsList;?></dd>
</dl>
</div>
</div>
</div>
</div>
</div>
<!-- Tab 2: END -->
</div>
<!-- END: Global Application Tab bar contents -->
</div>
<?php if($isEventGuest || $isMine || $isAdmin || $isCommunityAdmin) { ?>
<div class="cMain">
<!-- Global Application Tab bar framework -->
<div class="cTabsBar clearfull">
<ul class="cPageTabs cResetList cFloatedList clearfix">
<li <?php if( $showStream ) {echo 'class="cTabCurrent"';} else {echo 'class="cTabDisabled"';} ?>><a href="javascript:void(0)"><?php echo JText::_('COM_COMMUNITY_FRONTPAGE_RECENT_ACTIVITIES');?></a></li>
<li <?php if(!$isEventGuest && !$showStream) {echo 'class="cTabCurrent"';} ?>><a href="javascript:void(0)"><?php echo JText::_('COM_COMMUNITY_EVENTS_DETAIL');?></a></li>
<!--li <?php if(!$isEventGuest) {echo 'class="cTabDisabled"';} ?>><a href="javascript:void(0)">Event Program</a></li-->
</ul>
</div>
<!-- END: Global Application Tab bar framework -->
<!-- START: Global Application Tab bar contents -->
<div class="cTabsContentWrap">
<!-- Tab 1: Activity Stream Container -->
<?php if( $showStream ) { ?>
<div class="cTabsContent <?php if($showStream) {echo 'cTabsContentCurrent';} ?>">
<!-- Stream -->
<?php if( $showStream ) { $status->render(); } ?>
<div class="cActivity cEvent-Activity" id="activity-stream-container">
<div class="cActivity-LoadLatest joms-latest-activities-container">
<a id="activity-update-click" class="btn btn-block" href="javascript:void(0);"></a>
</div>
<?php echo $streamHTML; ?>
</div>
<!-- end: stream -->
</div>
<?php } ?>
<!-- Tab 1: END -->
<!-- Tab 2: Event Details -->
<div class="cTabsContent <?php if(!$isEventGuest && !$showStream ) {echo 'cTabsContentCurrent';} ?>">
<div class="cEvent-Description">
<?php
if( !CStringHelper::isHTML($event->description) ) {
echo CStringHelper::nl2br($event->description);
}
else {
echo $event->description;
}
?>
<!-- Focus Details expand/collapse -->
<div class="js-focus-details">
<div class="row-fluid">
<div class="span12">
<dl>
<!-- Event Category -->
<dt><?php echo JText::_('COM_COMMUNITY_EVENTS_CATEGORY'); ?></dt>
<dd><a href="<?php echo CRoute::_('index.php?option=com_community&view=events&categoryid=' . $event->catid);?>"><?php echo JText::_( $event->getCategoryName() ); ?></a></dd>
<!-- Event Date & Time -->
<dt><?php echo JText::_('COM_COMMUNITY_EVENTS_TIME')?></dt>
<dd>
<?php echo ($allday) ? JText::sprintf('COM_COMMUNITY_EVENTS_ALLDAY_DATE',$event->startdateHTML) : JText::sprintf('COM_COMMUNITY_EVENTS_DURATION',$event->startdateHTML,$event->enddateHTML); ?>
<?php if( $config->get('eventshowtimezone') ) { ?>
<span class="small"><?php echo $timezone; ?></span>
<?php } ?>
</dd>
<!-- Event Location -->
<dt><?php echo JText::_('COM_COMMUNITY_EVENTS_LOCATION');?></dt>
<dd id="community-event-data-location">
<a href="http://maps.google.com/?q=<?php echo urlencode($event->location); ?>" target="_blank"><?php echo $event->location; ?></a>
</dd>
<!--Event Occurence -->
<?php if ($event->isRecurring()) { ?>
<dt><?php echo JText::_('COM_COMMUNITY_EVENTS_OCCURENCE');?></dt>
<dd><?php echo JText::_('COM_COMMUNITY_EVENTS_REPEAT_' . strtoupper($event->repeat)); ?></dd>
<?php }?>
<!--Event Admins-->
<dt><?php echo JText::_('COM_COMMUNITY_EVENTS_ADMINS')?></dt>
<dd><?php echo $adminsList;?></dd>
</dl>
</div>
</div>
</div>
</div>
</div>
<!-- Tab 2: END -->
</div>
<!-- END: Global Application Tab bar contents -->
</div>
<?php } ?>
<div class="cSidebar">
<?php $this->renderModules( 'js_side_top' ); ?>
<?php $this->renderModules( 'js_events_side_top' ); ?>
<?php if( ( $isMine || $isAdmin || $isCommunityAdmin) && ( $unapproved > 0 ) ) { ?>
<div class="cModule cPage-Approval app-box control-approval">
<ul class="app-box-list for-menu cResetList">
<li>
<i class="com-icon-user-plus"></i>
<a href="<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=viewguest&type='.COMMUNITY_EVENT_STATUS_REQUESTINVITE.'&eventid=' . $event->id);?>">
<?php echo JText::sprintf((CStringHelper::isPlural($unapproved)) ? 'COM_COMMUNITY_EVENTS_PENDING_INVITE_MANY' :'COM_COMMUNITY_EVENTS_PENDING_INVITE' , $unapproved ); ?>
</a>
</li>
</ul>
</div>
<?php } ?>
<div id="community-event-members" class="cModule cEvent-Member app-box">
<h3 class="app-box-header"><?php echo JText::sprintf('COM_COMMUNITY_EVENTS_CONFIRMED_GUESTS'); ?></h3>
<?php if($eventMembersCount>0){ ?>
<div class="app-box-content">
<ul class="cThumbsList cResetList clearfix">
<?php
if($eventMembers) {
foreach($eventMembers as $member) {
?>
<li>
<a href="<?php echo CUrlHelper::userLink($member->id); ?>">
<img class="cAvatar jomNameTips" src="<?php echo $member->getThumbAvatar(); ?>" title="<?php echo CTooltip::cAvatarTooltip($member);?>" alt="" />
</a>
</li>
<?php
}
}
?>
</ul>
</div>
<div class="app-box-footer">
<?php if( ( ($isEventGuest && ($event->allowinvite)) || $isMine || $isCommunityAdmin || $isAdmin ) && $handler->hasInvitation() && $handler->isExpired()) { ?>
<span><?php echo $inviteHTML; ?></span>
<?php } ?>
<a 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');?> (<?php echo $eventMembersCount; ?>)
</a>
</div>
<?php }
else
echo JText::_('COM_COMMUNITY_EVENTS_NO_USER_ATTENDING_MESSAGE')
?>
</div>
<!-- begin: map -->
<?php if( $config->get('eventshowmap') && ( $handler->isAllowed() || $event->permission != COMMUNITY_PRIVATE_EVENT ) ) { ?>
<?php
if(CMapping::validateAddress($event->location)){
?>
<div id="community-event-map" class="cModule cEvent-Map app-box">
<h3 class="app-box-header"><?php echo JText::_('COM_COMMUNITY_MAP_LOCATION');?></h3>
<div class="app-box-content event-description">
<!-- begin: dynamic map -->
<?php echo CMapping::drawMap('event-map', $event->location); ?>
<div id="event-map" style="height:210px;width:100%;margin:5px 0;">
<?php echo JText::_('COM_COMMUNITY_MAPS_LOADING'); ?>
</div>
<!-- end: dynamic map -->
<div class="event-address small"><?php echo CMapping::getFormatedAdd($event->location); ?></div>
</div>
<div class="app-box-footer">
<a href="http://maps.google.com/?q=<?php echo urlencode($event->location); ?>" target="_blank"><?php echo JText::_('COM_COMMUNITY_EVENTS_FULL_MAP'); ?></a>
</div>
</div>
<?php } ?>
<?php } ?>
<!-- end: map -->
<!-- Event in the series -->
<?php if ($eventSeries && $seriesCount > 1) { ?>
<div class="cGroup-Events cModule app-box">
<h3><?php echo JText::_('COM_COMMUNITY_EVENTS_SERIES');?></h3>
<div class="app-box-content">
<div id="community-group-container">
<ul class="unstyled">
<?php
$grouplink = '';
if ($event->contentid > 0) {
$grouplink = '&groupid=' . $event->contentid;
}
foreach( $eventSeries as $series ) {
?>
<li class="clearfix">
<img class="joms-stream-avatar pull-left" src="<?php echo $series->getThumbAvatar();?>" alt="<?php echo $this->escape( $series->title );?>" />
<div class="event-detail jsDetail">
<p class="reset-gap"><i class="joms-icon-calendar"></i> <?php echo CEventHelper::formatStartDate($series, $config->get('eventdateformat') ); ?></p>
<a href="<?php echo CRoute::_('index.php?option=com_community&view=events&task=viewguest&eventid=' . $series->id . $grouplink);?>"><i class="joms-icon-users"></i> <?php echo JText::sprintf((CStringHelper::isPlural($series->confirmedcount)) ? 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_MANY':'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT', $series->confirmedcount);?></a>
</div>
<div class="clr"></div>
</li>
<?php } ?>
</ul>
</div>
</div>
<div class="app-box-footer">
<a href="<?php echo CRoute::_('index.php?option=com_community&view=events' . $grouplink . '&parent=' . $event->parent);?>"><?php echo JText::_('COM_COMMUNITY_EVENTS_VIEW_SERIES'). '(' . $seriesCount . ')';?></a>
</div>
</div>
<?php } ?>
<!-- Event in the series -->
<?php $this->renderModules( 'js_events_side_bottom' ); ?>
<?php $this->renderModules( 'js_side_bottom' ); ?>
</div>
<?php if($isEventGuest || $isMine || $isAdmin || $isCommunityAdmin) { ?>
<div class="cSidebar">
<?php $this->renderModules( 'js_side_top' ); ?>
<?php $this->renderModules( 'js_events_side_top' ); ?>
<?php if( ( $isMine || $isAdmin || $isCommunityAdmin) && ( $unapproved > 0 ) ) { ?>
<div class="cModule cPage-Approval app-box control-approval">
<ul class="app-box-list for-menu cResetList">
<li>
<i class="com-icon-user-plus"></i>
<a href="<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=viewguest&type='.COMMUNITY_EVENT_STATUS_REQUESTINVITE.'&eventid=' . $event->id);?>">
<?php echo JText::sprintf((CStringHelper::isPlural($unapproved)) ? 'COM_COMMUNITY_EVENTS_PENDING_INVITE_MANY' :'COM_COMMUNITY_EVENTS_PENDING_INVITE' , $unapproved ); ?>
</a>
</li>
</ul>
</div>
<?php } ?>
<div id="community-event-members" class="cModule cEvent-Member app-box">
<h3 class="app-box-header"><?php echo JText::sprintf('COM_COMMUNITY_EVENTS_CONFIRMED_GUESTS'); ?></h3>
<?php if($eventMembersCount>0){ ?>
<div class="app-box-content">
<ul class="cThumbsList cResetList clearfix">
<?php
if($eventMembers) {
foreach($eventMembers as $member) {
?>
<li>
<a href="<?php echo CUrlHelper::userLink($member->id); ?>">
<img class="cAvatar jomNameTips" src="<?php echo $member->getThumbAvatar(); ?>" title="<?php echo CTooltip::cAvatarTooltip($member);?>" alt="" />
</a>
</li>
<?php
}
}
?>
</ul>
</div>
<div class="app-box-footer">
<?php if( ( ($isEventGuest && ($event->allowinvite)) || $isMine || $isCommunityAdmin || $isAdmin ) && $handler->hasInvitation() && $handler->isExpired()) { ?>
<span><?php echo $inviteHTML; ?></span>
<?php } ?>
<a 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');?> (<?php echo $eventMembersCount; ?>)
</a>
</div>
<?php }
else
echo JText::_('COM_COMMUNITY_EVENTS_NO_USER_ATTENDING_MESSAGE')
?>
</div>
<!-- begin: map -->
<?php if( $config->get('eventshowmap') && ( $handler->isAllowed() || $event->permission != COMMUNITY_PRIVATE_EVENT ) ) { ?>
<?php
if(CMapping::validateAddress($event->location)){
?>
<div id="community-event-map" class="cModule cEvent-Map app-box">
<h3 class="app-box-header"><?php echo JText::_('COM_COMMUNITY_MAP_LOCATION');?></h3>
<div class="app-box-content event-description">
<!-- begin: dynamic map -->
<?php echo CMapping::drawMap('event-map', $event->location); ?>
<div id="event-map" style="height:210px;width:100%;margin:5px 0;">
<?php echo JText::_('COM_COMMUNITY_MAPS_LOADING'); ?>
</div>
<!-- end: dynamic map -->
<div class="event-address small"><?php echo CMapping::getFormatedAdd($event->location); ?></div>
</div>
<div class="app-box-footer">
<a href="http://maps.google.com/?q=<?php echo urlencode($event->location); ?>" target="_blank"><?php echo JText::_('COM_COMMUNITY_EVENTS_FULL_MAP'); ?></a>
</div>
</div>
<?php } ?>
<?php } ?>
<!-- end: map -->
<!-- Event in the series -->
<?php if ($eventSeries && $seriesCount > 1) { ?>
<div class="cGroup-Events cModule app-box">
<h3><?php echo JText::_('COM_COMMUNITY_EVENTS_SERIES');?></h3>
<div class="app-box-content">
<div id="community-group-container">
<ul class="unstyled">
<?php
$grouplink = '';
if ($event->contentid > 0) {
$grouplink = '&groupid=' . $event->contentid;
}
foreach( $eventSeries as $series ) {
?>
<li class="clearfix">
<img class="joms-stream-avatar pull-left" src="<?php echo $series->getThumbAvatar();?>" alt="<?php echo $this->escape( $series->title );?>" />
<div class="event-detail jsDetail">
<p class="reset-gap"><i class="joms-icon-calendar"></i> <?php echo CEventHelper::formatStartDate($series, $config->get('eventdateformat') ); ?></p>
<a href="<?php echo CRoute::_('index.php?option=com_community&view=events&task=viewguest&eventid=' . $series->id . $grouplink);?>"><i class="joms-icon-users"></i> <?php echo JText::sprintf((CStringHelper::isPlural($series->confirmedcount)) ? 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_MANY':'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT', $series->confirmedcount);?></a>
</div>
<div class="clr"></div>
</li>
<?php } ?>
</ul>
</div>
</div>
<div class="app-box-footer">
<a href="<?php echo CRoute::_('index.php?option=com_community&view=events' . $grouplink . '&parent=' . $event->parent);?>"><?php echo JText::_('COM_COMMUNITY_EVENTS_VIEW_SERIES'). '(' . $seriesCount . ')';?></a>
</div>
</div>
<?php } ?>
<!-- Event in the series -->
<?php $this->renderModules( 'js_events_side_bottom' ); ?>
<?php $this->renderModules( 'js_side_bottom' ); ?>
</div>
<?php } ?>
lol... magic mike hack.....
nice perfect... just one thing... I want to hide the event info only on private events............ this is also hiding the event info on public events...
is there any way to show the event info on public events?
Let me know.
I really appreciate your help.
Thank you.
Hi, MJay.
Edit:
Ok, condition needs to be more complicated that I thought previously:
<?php if(($event->permission != COMMUNITY_PRIVATE_EVENT) || (($event->permission == COMMUNITY_PRIVATE_EVENT) && ($isEventGuest || $isMine || $isAdmin || $isCommunityAdmin))) { ?>
Sweet......... it worked......
can you make 1 more tweak to the code you provided me? if possible.
is there any way to show 'recent activities' for public events?
Example:
www.jomsocial.com/forum/events/12054-can...r-updating-3-1#60972
so users that are not attending the event can see the recent activities...
Thanks a lot.
MJay.
I think that this don't need any hacks. Thread you linked is 10 months old. On my test site (JomSocial 3.2.1.5) I can see recent events with no problem. And if I disable "Only Responders can Write in Events" in Configuration -> Site I can even post an activity not beeing a event responder.
OMG... you are right.... I missed that......................... my bad.
Hey I noticed something ...................
The code that you provided me is also hiding the event info for the event admin. on *PRIVATE EVENTS*... (like recent activities, events details, confirmed guests, map location... etc)
check it out and let me know... maybe I'm missing something..
Thanks a lot.
Hi, MJay.
My mistake, it should be <?php if($event->permission == COMMUNITY_PRIVATE_EVENT) { ?>
Please, try now.
lol. sorry mike...
but now if the event is Private:
* Event Admin - Full Access (recent activities, event details, confirmed guests, map location)
* Visitors - Access to Event Details, confirmed guests
* Confirmed Guests - Full Access (recent activities, event details, confirmed guests, map location)
If the event is public:
* Event Admin - Info N/A
* Visitors: Info N/A
* Confirmed Guests - Info N/A
Hi, MJay.
Ok, now i tested it correctly. It's still in one condition but a bit more complicated.
Please, check my original post.