-
AuthorPosts
-
John Wesley Brett Moderator
John Wesley Brett
- Join date:
- July 2013
- Posts:
- 2142
- Downloads:
- 17
- Uploads:
- 26
- Thanks:
- 175
- Thanked:
- 645 times in 426 posts
October 14, 2015 at 6:13 pm #705074Many of you have posted questions regarding issues with the Date and Time of EVENTS in Teline V.
After getting pointed in the right direction, I was able to solve it further with good results and wanted to share the process here in hopes it will help you too.
Here are the results – Date + Time: on the main EVENTS page
Here are the results – Date and Time: On the single EVENT page:
These can be modified even further to your liking.
FIRST – Create Override for your TIME
Goto – Extentions > Language(s) > Overides
The Teline VI Event Dates are set to the constant DATE_FORMAT_LC3.
The “F j Y” formula outputs a date like: “January 1 2015”.
(Those unfamiliar with how you can easily Formatting Date and Time will find THIS LIST to come in handy.)
To create an Override to display the TIME of the event , like the “9:00 am” we did above, click NEW > type in a name for your LANGUAGE CONSTANT, I decided to use DATE_FORMAT_LC5 just to keep it similar to all the others, and simply added the formula g:i a in the TEXT box.You should have something similar to this:
Save and you have now created an Override that will display the TIME. All we need to do now, is plug it into our template.
We’ll be working with two files – one for the MAIN EVENT PAGE and one for the SINGLE EVENT PAGE.MAIN EVENT PAGE
Open /templates/ja_teline_v/html/layouts/joomla/content/intro/event.phpAt line 41-44 replace this:
<span itemprop="startDate"><?php echo JHtml::_('date', $item->params->get('ctm_start',''), 'DATE_FORMAT_LC3'); ?></span> <?php if($item->params->get('ctm_end') != ''): ?>
-<span itemprop="endDate"><?php echo JHtml::_('date', $item->params->get('ctm_end',''), 'DATE_FORMAT_LC3'); ?></span>
With this:
<span itemprop="startDate"><?php echo JHtml::_('date', $item->params->get('ctm_start',''), 'DATE_FORMAT_LC3'); ?></span> <?php if($item->params->get('ctm_end') != ''): ?>
at
<span itemprop="endDate"><?php echo JHtml::_('date', $item->params->get('ctm_start',''), 'DATE_FORMAT_LC5'); ?></span>SINGLE EVENT PAGE
Open /templates/ja_teline_v/html/layouts/joomla/content/item/event.phpReplace Line 36-38 with:
<?php echo JLayoutHelper::render('joomla.content.blog_style_default_item_title', $item); ?> <h3>Date: <?php echo JHtml::_('date', $item->params->get('ctm_start',''), 'DATE_FORMAT_LC3'); ?><br/>
Time: <?php echo JHtml::_('date', $item->params->get('ctm_start',''), 'DATE_FORMAT_LC5'); ?></h3>
And finally Replace Lines 104-110 with the following:<address itemprop="address"> <strong><?php echo $item->params->get('ctm_venue'); ?></strong><br />
Date: <?php echo JHtml::_('date', $item->params->get('ctm_start',''), 'DATE_FORMAT_LC3'); ?><br/>
Time: <?php echo JHtml::_('date', $item->params->get('ctm_start',''), 'DATE_FORMAT_LC5'); ?> <br />
<?php echo $item->params->get('ctm_addr1'); ?><br />
<?php echo $item->params->get('ctm_addr2'); ?>
</address>I hope this gets you on the path to reaching the results you have been looking for.
I hope you are seeing the pattern in the code and can see how easy it is to mix it up with other Date and Time combinations.Hope this helps.
Have fun!
John.1 user says Thank You to John Wesley Brett for this useful post
melvine Friendmelvine
- Join date:
- August 2012
- Posts:
- 160
- Downloads:
- 162
- Uploads:
- 2
- Thanks:
- 37
- Thanked:
- 33 times in 9 posts
October 14, 2015 at 8:37 pm #705175Hello John,
Thank you for these tips
Another solution, with a result a little bit different
NO NEED to CHANGE your TIME HERE
You can do like that too
SINGLE EVENT PAGE
templatesja_teline_vhtmllayoutsjoomlacontentitemevent.php
Find Lines 102 to 108
<address itemprop="address">
<strong><?php echo $item->params->get('ctm_venue'); ?></strong><br />
<?php echo $item->params->get('ctm_addr1'); ?><br />
<?php echo $item->params->get('ctm_addr2'); ?>
</address><?php if($item->params->get('ctm_latitude') && $item->params->get('ctm_longitude')): ?>
Remplace by<address itemprop="address">
<strong><?php echo $item->params->get('ctm_venue'); ?></strong><br />
<?php echo $item->params->get('ctm_addr1'); ?><br />
<?php echo $item->params->get('ctm_addr2'); ?>
<?php if($item->params->get('ctm_end') != ''); ?>
</address><i class="fa fa-calendar-o"></i>
<span itemprop="startDate"><?php echo JHtml::_('date', $item->params->get('ctm_start',''), 'DATE_FORMAT_LC3'); ?></span>
<?php if($item->params->get('ctm_end') != ''): ?>
-
<span itemprop="endDate"><?php echo JHtml::_('date', $item->params->get('ctm_end',''), 'DATE_FORMAT_LC3'); ?></span>
<?php endif; ?><?php if($item->params->get('ctm_latitude') && $item->params->get('ctm_longitude')): ?>
Here the result
Or with the hour
<address itemprop="address">
<strong><?php echo $item->params->get('ctm_venue'); ?></strong><br />
<?php echo $item->params->get('ctm_addr1'); ?><br />
<?php echo $item->params->get('ctm_addr2'); ?>
<?php if($item->params->get('ctm_end') != ''); ?>
</address><i class="fa fa-calendar-o"></i>
<span itemprop="startDate"><?php echo JHTML::_('date', $item->params->get('ctm_start',''), JText::_('DATE_FORMAT_LC3')).' at '.JHTML::_('date',$item->params->get('ctm_start',''), JText::_('H:i')); ?></span>
<?php if($item->params->get('ctm_end') != ''): ?>
-
<span itemprop="endDate"><?php echo JHtml::_('date', $item->params->get('ctm_end',''), JText::_('DATE_FORMAT_LC3')).' at '.JHTML::_('date',$item->params->get('ctm_end',''), JText::_('H:i')); ?></span>
<?php endif; ?><?php if($item->params->get('ctm_latitude') && $item->params->get('ctm_longitude')): ?>
Here the Result
And same code as before for the Homepage
<i class="fa fa-calendar-o"></i>
<span itemprop="startDate"><?php echo JHTML::_('date', $item->params->get('ctm_start',''), JText::_('DATE_FORMAT_LC3')).' at '.JHTML::_('date',$item->params->get('ctm_start',''), JText::_('H:i')); ?></span>
<?php if($item->params->get('ctm_end') != ''): ?>
-
<span itemprop="endDate"><?php echo JHtml::_('date', $item->params->get('ctm_end',''), JText::_('DATE_FORMAT_LC3')).' at '.JHTML::_('date',$item->params->get('ctm_end',''), JText::_('H:i')); ?></span>
<?php endif; ?><?php if($item->params->get('ctm_latitude') && $item->params->get('ctm_longitude')): ?>
Remplace “at” by your language
Best Regards
Melvine
melvine Friendmelvine
- Join date:
- August 2012
- Posts:
- 160
- Downloads:
- 162
- Uploads:
- 2
- Thanks:
- 37
- Thanked:
- 33 times in 9 posts
October 14, 2015 at 8:37 pm #751726Hello John,
Thank you for these tips
Another solution, with a result a little bit different
NO NEED to CHANGE your TIME HERE and No Need to override your Language
You can do like that too
SINGLE EVENT PAGE
templatesja_teline_vhtmllayoutsjoomlacontentitemevent.php
Find Lines 102 to 108
<address itemprop="address">
<strong><?php echo $item->params->get('ctm_venue'); ?></strong><br />
<?php echo $item->params->get('ctm_addr1'); ?><br />
<?php echo $item->params->get('ctm_addr2'); ?>
</address><?php if($item->params->get('ctm_latitude') && $item->params->get('ctm_longitude')): ?>
Remplace by<address itemprop="address">
<strong><?php echo $item->params->get('ctm_venue'); ?></strong><br />
<?php echo $item->params->get('ctm_addr1'); ?><br />
<?php echo $item->params->get('ctm_addr2'); ?>
<?php if($item->params->get('ctm_end') != ''); ?>
</address><i class="fa fa-calendar-o"></i>
<span itemprop="startDate"><?php echo JHtml::_('date', $item->params->get('ctm_start',''), 'DATE_FORMAT_LC3'); ?></span>
<?php if($item->params->get('ctm_end') != ''): ?>
-
<span itemprop="endDate"><?php echo JHtml::_('date', $item->params->get('ctm_end',''), 'DATE_FORMAT_LC3'); ?></span>
<?php endif; ?><?php if($item->params->get('ctm_latitude') && $item->params->get('ctm_longitude')): ?>
Here the result
Or with the hour
<address itemprop="address">
<strong><?php echo $item->params->get('ctm_venue'); ?></strong><br />
<?php echo $item->params->get('ctm_addr1'); ?><br />
<?php echo $item->params->get('ctm_addr2'); ?>
<?php if($item->params->get('ctm_end') != ''); ?>
</address><i class="fa fa-calendar-o"></i>
<span itemprop="startDate"><?php echo JHTML::_('date', $item->params->get('ctm_start',''), JText::_('DATE_FORMAT_LC3')).' at '.JHTML::_('date',$item->params->get('ctm_start',''), JText::_('H:i')); ?></span>
<?php if($item->params->get('ctm_end') != ''): ?>
-
<span itemprop="endDate"><?php echo JHtml::_('date', $item->params->get('ctm_end',''), JText::_('DATE_FORMAT_LC3')).' at '.JHTML::_('date',$item->params->get('ctm_end',''), JText::_('H:i')); ?></span>
<?php endif; ?><?php if($item->params->get('ctm_latitude') && $item->params->get('ctm_longitude')): ?>
Here the Result
And same code as before for the Homepage
<i class="fa fa-calendar-o"></i>
<span itemprop="startDate"><?php echo JHTML::_('date', $item->params->get('ctm_start',''), JText::_('DATE_FORMAT_LC3')).' at '.JHTML::_('date',$item->params->get('ctm_start',''), JText::_('H:i')); ?></span>
<?php if($item->params->get('ctm_end') != ''): ?>
-
<span itemprop="endDate"><?php echo JHtml::_('date', $item->params->get('ctm_end',''), JText::_('DATE_FORMAT_LC3')).' at '.JHTML::_('date',$item->params->get('ctm_end',''), JText::_('H:i')); ?></span>
<?php endif; ?><?php if($item->params->get('ctm_latitude') && $item->params->get('ctm_longitude')): ?>
Remplace “at” by your language
Best Regards
Melvine
zdiar Friendzdiar
- Join date:
- June 2008
- Posts:
- 36
- Downloads:
- 85
- Uploads:
- 1
- Thanks:
- 6
- Thanked:
- 6 times in 3 posts
February 18, 2016 at 2:28 am #885928Hi,
is there a possibility to obtain an updated and fixed versions of these 2 files mentined before.
I have tried to follow this guide and commit changes, but my date is still not working in the Events section.Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
-
AuthorPosts
This topic contains 5 replies, has 4 voices, and was last updated by zdiar 8 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum