Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • teletrance Friend
    #139369

    Hello, I need same help, please.
    I am using Opal and mod-janews publised in user5, set to show intros of articles publised in a section where I will publish just the latest news.

    I need to show the date (just hour, in fact) when the article was published.
    link live: http://www.ziuadevest.eu/
    How should I do?

    Thank you

    Anonymous Moderator
    #298165

    Hi,

    For this case, please open modulesmod_latestnewstmpldefault.php file, find following code:

    <a href="<?php echo $item->link; ?>" class="latestnews<?php echo $params->get('moduleclass_sfx'); ?>">
    <?php echo $item->text; ?>
    </a>

    and change to:

    <a href="<?php echo $item->link; ?>" class="latestnews<?php echo $params->get('moduleclass_sfx'); ?>">
    <?php echo $item->text; ?>
    </a>
    <?php if ($this->params->get('show_create_date')) : ?>
    <?php echo JHTML::_('date', $item->created, JText::_('DATE_FORMAT_LC2')) ?>
    <?php endif; ?>

    teletrance Friend
    #298218

    Unfortunately, that does not working.
    I am nor using mod_latestnews. I am using mod_janews to publish articles in user 5 module position. This news are publish in a Latest News section, that is why I need to show the hour when this article was published.

    On the other hand, if I am trying to use mod_latestnews instead mod_janews, beyond the fact that I am not able anymore to show the title and the first 50 words from every latest news, but I get tihis error:

    Fatal error: Call to a member function get() on a non-object in /home/gxj47/public_html/modules/mod_latestnews/tmpl/default.php on line 9

    Anonymous Moderator
    #298379

    You can change to:

    <a href="<?php echo $item->link; ?>" class="latestnews<?php echo $params->get('moduleclass_sfx'); ?>">
    <?php echo $item->text; ?>
    </a>

    <?php echo JHTML::_('date', $item->created, JText::_('DATE_FORMAT_LC2')) ?>

    teletrance Friend
    #298394

    I am sorry, it does not work. I am not using mod_latestnews, but mod_janews to show my latest news in user 5, where I need the intro of news to be precedeed by hour (created date).

    thank you anyway

    Anonymous Moderator
    #298997

    For this case, please open templatesja_opalhtmlmod_janewsblog_item.php file, at about line 44, find following code:

    <h4 class=”jazin-title”><a href=”<?php echo $link;?>” title=”<?php echo strip_tags($row->title);?>”><?php echo $row->title;?></a></h4>

    and change to:

    <h4 class="jazin-title"><a href="<?php echo $link;?>" title="<?php echo strip_tags($row->title);?>"><?php echo $row->title;?></a> <?php echo JHTML::_('date', $row->created, JText::_('DATE_FORMAT_LC2')) ?></h4>

    teletrance Friend
    #299016

    Thank you, this time it worked! Thank you again

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

This topic contains 7 replies, has 2 voices, and was last updated by  teletrance 15 years, 8 months ago.

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