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.

Hacking JS Event Calendar

9 years 6 months ago
  • Miran's Avatar
    Topic Author
  • Miran
  • Offline
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
Licenses:
JomSocial Active

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

9 years 6 months ago
Licenses:

Hi, Miran.

I'm sorry but we don't support extensive customizations.
Please, consider to hire professional developer:
www.upwork.com/groups/jomsocial


- 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
9 years 6 months ago
  • Miran's Avatar
    Topic Author
  • Miran
  • Offline
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
Licenses:
JomSocial Active

Hi Michal
I understand that! Sorry :)

Could you at least tell me if it is the right file to modify in order to obtain the results i'm aiming?

Thanks

9 years 6 months ago
Licenses:

Hi, Miran.

No, all calendar is dynamically generated in js script file:
ROOT/modules/mod_community_eventscalendar/calendar.js


- 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: Miran
9 years 6 months ago
  • Miran's Avatar
    Topic Author
  • Miran
  • Offline
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
Licenses:
JomSocial Active

Hi Michal

Thank you very much! I will take a look then.
Could i override this file by placing a copy in the template/html folder?

Regards
Miran

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