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.

Timezone code in events.form.php incorrect?

10 years 2 months ago
  • Matthew's Avatar
    Topic Author
  • Matthew
  • Offline
  • Fresh Boarder
  • Posts: 18
  • Thank you received: 0
Licenses:
JomSocial Expired

events.form.php contains the following code:

<?php
if( $config->get('eventshowtimezone') )
{
?>
<li>
<label class="form-label">
<?php echo JText::_('COM_COMMUNITY_TIMEZONE'); ?><span class="required-sign"> *</span>
</label>
<div class="form-field">
<span class="jomNameTips" title="<?php echo JText::_('COM_COMMUNITY_EVENTS_SET_TIMEZONE'); ?>">
<select name="offset">
<?php
$defaultTimeZone = isset($event->offset)?$event->offset:$systemOffset;
foreach( $timezones as $offset => $value ){
?>
<option value="<?php echo $offset;?>"<?php echo $defaultTimeZone == $offset ? ' selected="selected"' : '';?>><?php echo $value;?></option>
<?php
}
?>
</select>
</span>
</div>
</li>
<?php
}
?>

It does not seem to get the correct timezone (the default system/user timezone) when creating a new event, but it selects the correct timezone when editing an event...

If I change
<option value="<?php echo $offset;?>"<?php echo $defaultTimeZone == $offset ? ' selected="selected"' : '';?>><?php echo $value;?></option>
to
<option value="<?php echo $offset;?>"<?php echo $defaultTimeZone == ($event->id > 0?$offset:$value) ? ' selected="selected"' : '';?>><?php echo $value;?></option>
it works...

Can you please check to see if the current code is wrong, or I'm missing something???

Also, I've noticed that the list of timezones in the user settings (dropdown list when editing user preferences) of Joomla are different to those listed in com_community/helpers/time.php (line 334). It would be far more compatible if Joomla and Jomsocial had the same list of timezones available so that, for example, the timezones listed when setting up an event are the same as can be chosen when setting your preference in your user profile (i.e. I can set Australia/Sydney in Joomla but it is not in JomSocial's time.php so I can't pre-select it in the event dropdown of timezone). Can you please look into this?

Matthew

10 years 1 month ago
Licenses:

Hi, Matthew.

I assigned developer to this thread. He need to look at it.


- 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
10 years 1 month ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi There,

I see, well actually the bahavior and the result is same, the different is in Jomsocial we use the global timezone, but in Joomla they use the detail timezone (can select the city)

thank you

10 years 1 month ago
  • Matthew's Avatar
    Topic Author
  • Matthew
  • Offline
  • Fresh Boarder
  • Posts: 18
  • Thank you received: 0
Licenses:
JomSocial Expired

Ok, maybe I thought it was doing something that it isn't... I was getting London preselected in the list for any new event, and I felt that it should be pre-selecting the system default time zone (or the user's selected time zone). Maybe it is not trying to do that...? My modification seemed to get a result closer to what I thought it was doing, but London was probably being preselected because it is the base time zone (offset == 0).

Anyway, it would be better to preselect the user's preferred time zone so that they don't have to change it every time they create an event.

Also, related to the same page, I don't seem to get the error messages defined in GB.com_community.ini when, for example, I try to save without a title. The span errtitlemsg seems to get a Joomla error message saying that the field should be filled in, instead of the com_community defined error. Also, there are no error messages (div/spans) set on the date/time field to indicate that the start time is in the past (the date can't be in the past because it automatically blacks it out, but if is late in the day the time of day may have passed, so errors should be displayed here in an appropriate element.

Thanks,
Matthew

10 years 1 month ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi Matthew,

#1 you can disabled the timezone configuration in event Jomsocial configuration (Jomsocial->Events->Events Setting->Show Time Zone->No)

#2 This is UX issue, we need improve this later in version 3.3

Thank you

10 years 1 month ago
Licenses:

Hi, Matthew.

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.


- 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
10 years 1 month ago
  • Matthew's Avatar
    Topic Author
  • Matthew
  • Offline
  • Fresh Boarder
  • Posts: 18
  • Thank you received: 0
Licenses:
JomSocial Expired

Hi. Thanks for following up.

I understand that the timezone list not matching Joomla's list is a UX issue that will be updated in the future (or maybe it is the lack of errors that is being updated?).

Anyway, ideally I'd like to have the event timezone dropdown preselect the user's preferred timezone from their user settings. Because the actual time of the event is very important in my case (I use it in other code), knowing the correct timezone is important to me as I need to know exactly when it starts (locally).

Matthew

10 years 1 month ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi Matthew,

Regarding this issue, we will try to improve this in version 3.3

thank you

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