Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • John Wesley Brett Moderator
    #705074

    Many 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.php

    At 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.php

    Replace 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.

    melvine Friend
    #705175

    Hello 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 Friend
    #751726

    Hello 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 Friend
    #885928

    Hi,

    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 Moderator
    #886508

    @zdiar: We already upgraded it into JA Teline V v1.0.7. You can get it from download page here

    zdiar Friend
    #886863

    Thank you, got it and working fine.

Viewing 6 posts - 1 through 6 (of 6 total)

This topic contains 5 replies, has 4 voices, and was last updated by  zdiar 8 years, 8 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum