Hi everyone
On my j3 website i have the jomsocial v411 installed.
The JS Event Calendar as it is presented is not exactly what i wanted so i am trying to modify it. I'm not a php coder at all...
I'm on this file modules/mod_community_eventscalendar/tmpl/default.php
i would just want to delete the description part below the calendar and on the calendar:
- add the title and the hour of event or events on every day
- add the link to the event page
I have deleted the detail part. But i just can't add the title, hour and link on the date of the day.
Is there a simple way?
By now my code is like that (no more description)...
<?php
/**
* @copyright (C) 2015 iJoomla, Inc. - All rights reserved.
* @license GNU General Public License, version 2 (
www.gnu.org/licenses/gpl-2.0.html
)
* @author iJoomla.com <This email address is being protected from spambots. You need JavaScript enabled to view it.>
* @url
www.jomsocial.com/license-agreement
* The PHP code portions are distributed under the GPL license. If not otherwise stated, all images, manuals, cascading style sheets, and included JavaScript *are NOT GPL, and are released under the IJOOMLA Proprietary Use License v1.0
* More info at
www.jomsocial.com/license-agreement
*/
defined('_JEXEC') or die('Unauthorized Access'); ?>
<div class="joms-module">
<?php // if($user->isOnline()):?>
<?php // else:?>
<!-- If not logged in -->
<?php // endif;?>
<div class="joms-module--eventscalendar">
<div id="calendar"></div>
</div>
</div>
<script>
// load library
joms.onStart(function ($) {
var scriptUrl = '<?php echo JURI::root(true) . "/modules/mod_community_eventscalendar/calendar.js" ?>';
joms.$LAB.script(scriptUrl).wait(function () {
$(function () {
joms_mod_eventscalendar_init($);
});
});
});
// initialize calender
function joms_mod_eventscalendar_init($) {
$('#calendar').eCalendar({
weekDays: ,
months: ,
textArrows: {previous: '◀', next: '▶'},
eventTitle: 'Sorties',
url: '',
events: [
<?php
$config = CFactory::getConfig();
$showAmpm = $config->get('eventshowampm');
foreach ($events as $event) {
$date = CTimeHelper::convertSQLtimetoChunk($event->startdate);
?>
{
title: '<?php echo str_replace("'", "\'", $event->title); ?>',
// description: '<?php echo str_replace("'", "\'", preg_replace( "/\r?\n/", " ", $event->description )); ?>',
url: '<?php echo CRoute::_('index.php?option=com_community&view=events&task=viewevent&eventid='.$event->id); ?>',
showAmpm: +'<?php echo $showAmpm ?>',
datetime: new Date(
<?php echo $date;?>,
<?php echo intval($date) - 1;?>,
<?php echo $date;?>,
<?php echo $date;?>,
<?php echo $date;?>,
<?php echo $date;?>
)
},
<?php } ?>
]
});
}
</script>
Thank you, regards
Miran