I want to change the event view so it shows the description first.
Earlier I found some code for this in this forum, but cannot find it (the changes I did got overwritten after update).
How do I swap the two views, and how do I prevent this from being overwritten again?
I also implemented other tweaks I found in this forum, which are all overwritten now, and I had to change them again.
Trude wrote: I want to change the event view so it shows the description first.
Earlier I found some code for this in this forum, but cannot find it (the changes I did got overwritten after update).
Trude wrote: How do I swap the two views, and how do I prevent this from being overwritten again?
I also implemented other tweaks I found in this forum, which are all overwritten now, and I had to change them again.
Hi, Trude.
Make a safe copy first.
You will need to edit template file components/com_community/templates/default/events.viewevent.php, line 216 to 244
change from:
<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="cTabsBar clearfull">
<ul class="cPageTabs cResetList cFloatedList clearfix">
<li <?php if( !$showStream ) {echo 'class="cTabDisabled"';} ?>><a href="javascript:void(0)"><?php echo JText::_('COM_COMMUNITY_FRONTPAGE_RECENT_ACTIVITIES');?></a></li>
<li <?php 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">
<!-- 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 cTabsContentCurrent">
Thank you, yes that's the one I was looking for! :)
Only problem now is that the activity stream under events disappeared completely, and the option to view details remains even in detail view.
Hi,
Let's try again. Find this text: "<!-- begin: .cMain -->".
Should be around line 216/217. And replace:
<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">
<div class="important">
<i class="icon-calendar"></i>
<?php echo $event->startdateHTML ?>
</div>
<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>
<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_EVENTS_DETAIL');?></a></li>
<li <?php if(!$isEventGuest && !$showStream) {echo 'class="cTabCurrent"';} ?>><a href="javascript:void(0)"><?php echo JText::_('COM_COMMUNITY_FRONTPAGE_RECENT_ACTIVITIES');?></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 2: Event Details -->
<div class="cTabsContent <?php if($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">
<div class="important">
<i class="icon-calendar"></i>
<?php echo $event->startdateHTML ?>
</div>
<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 -->
<!-- Tab 1: Activity Stream Container -->
<?php if( $showStream ) { ?>
<div class="cTabsContent <?php if(!$isEventGuest && !$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 -->
</div>
<!-- END: Global Application Tab bar contents -->
</div>
Thank you,
but I'm afraid it still removes the option to view the event activity stream in my page, and still leaves a tab option to view the details I am already viewing (nothing happens pressing this).
I did this very carefully twice now, so I am pretty sure I replaced the correct code?
Hi, Trude.
Then revert changes, make a safe copy and replace your file with mine.
I added to your first post credential to my site where you can see that it works.
Thank you,
really nice of you, but I'm afraid the problem remains... Also, I can't find your working site anywhere in the posts?
You can login frontend with the admin credentials and have a look at one of the events. As you can see, the activity stream is gone, even with your file. And the option to view details is still there :)
Hi, Trude.
Ok, I sent you credentials to test site via PM.
Enter here:
prolusatia.nazwa.pl/test/
Log with credentials.
Enter to a link I provided you.
As for your site, upgrade to current JomSocial -> 3.1.0.4
Hi, Trude.
Yes, so upgrade, switch files and check again.
Hi, Trude.
We have not received any response back from you in over 7 days, and would like to know if you consider this issue to be resolved. If you have any further questions, simply reply to this post.