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.

Default timezone

7 years 9 months ago
  • Gary's Avatar
    Topic Author
  • Gary
  • Offline
  • Fresh Boarder
  • Thank you received: 0
Licenses:
JomSocial Active

ISSUE SUMMARY:

How can I make the default timezone selection when adding an event the one I need?

7 years 9 months ago
Licenses:

Hi,

here the steps:
copy /components/com_community/templates/jomsocial/layouts/events.forms.php
to
/templates/rt_ambrosia/html/com_community/layouts/events.forms.php
create that folder if not exist
edit that file (new location), at line 387
find this code

$defaultTimeZone = isset($event->offset) ? $params->get('timezone') : $systemOffset;
changing it to
$defaultTimeZone = isset($event->offset) ? $params->get('timezone') : JFactory::getConfig()->get('offset');
if ($defaultTimeZone == null) $defaultTimeZone = JFactory::getConfig()->get('offset');

with this override method, the changes will not disappear at jomsocial upgrade.

FYI:
documentation.jomsocial.com/wiki/Customizing_Template

Regards

The following user(s) said Thank You: Brian
7 years 9 months ago
  • Gary's Avatar
    Topic Author
  • Gary
  • Offline
  • Fresh Boarder
  • Thank you received: 0
Licenses:
JomSocial Active

copy the original - unedited file - to the directory you instructed, same old behavior (as expected) and no new problems. Editing the newly copied file as instructed produces:

0 syntax error, unexpected '&'

7 years 9 months ago
Licenses:

Hi,

that error because you put invalid code. please copy paste the code carefully.
if still cant, please edit your first post at this topic and at site info form please provide me FTP access detail.
I will do it for you.

this custom code has been tested at my test site, and it works like expected.

Regards

The following user(s) said Thank You: Gary
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