Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • akwasi_c Friend
    #137073

    Is there anyway to include date for the “Latest” module, so that when it shows up at the front a heading may look like this;
    1/13/09: Title of the article
    1/12/09: Joomlart is the best

    It would be better even if the date stamp is done once at the first article of the day, so that the subsequent titles wont have the stamp example
    1/13/09: Man on moon
    : Man on earth
    : Man on sune
    1/12/09: Woman on Jupiter

    scotty Friend
    #286296

    I think your first suggestion would be fairly easy. You’d just call the articles creation date and place it in front of the title in the Latest mod.

    I think the second one would be quiet difficult though (for a non PHPer like me anyway) and would require a bigger re-write of the mod_latest.

    I’ll have a stab at the first method tomorrow.

    Good idea BTW!

    mj1256 Friend
    #286297

    there is a new module at joomla extesnions directory that does this with the date

    you should be able to find it with a quick search there

    scotty Friend
    #286350

    Actually I just found the instructions in the Joomla Docs…

    http://docs.joomla.org/Latest_News_module_with_date

    akwasi_c Friend
    #286382

    Good work scotty, but did you actually got it to work

    scotty Friend
    #286385

    No, I didn’t test it. Does it not work?

    scotty Friend
    #286390

    Ahh lol, there is a mistake in it. It tells you to change text from A to B but it should be from B to A.

    Also it adds the date on a new line after the headline but you want it first don’t you?

    Ok so do the first part in helper.php, that part is right, and then in default.php do this…
    Find…
    [php]<a href=”<?php echo $item->link; ?>” class=”latestnews<?php echo $params->get(‘moduleclass_sfx’); ?>”>
    <?php echo $item->text; ?></a>[/php]and change to…

    [php]<a href=”<?php echo $item->link; ?>” class=”latestnews<?php echo $params->get(‘moduleclass_sfx’); ?>”>
    <?php echo $item->creationdate .’ – ‘.$item->text; ?></a>[/php]This will give you a latest mod like…

    • 1/12/09 – News Title 1
    • 1/6/09 – News Title 2
    • 12/16/08 – News Title 3
    • 12/14/08 – News Title 4

    Depending on your date format.

    This is now fixed on the Joomla Docs page also

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

This topic contains 7 replies, has 3 voices, and was last updated by  scotty 15 years, 10 months ago.

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