-
AuthorPosts
-
akwasi_c Friend
akwasi_c
- Join date:
- August 2008
- Posts:
- 124
- Downloads:
- 0
- Uploads:
- 5
- Thanks:
- 10
- Thanked:
- 8 times in 1 posts
January 13, 2009 at 9:16 pm #137073Is 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 bestIt 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 Jupiterscotty Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
January 13, 2009 at 11:44 pm #286296I 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 Friendmj1256
- Join date:
- June 2007
- Posts:
- 1473
- Downloads:
- 10
- Uploads:
- 35
- Thanks:
- 84
- Thanked:
- 225 times in 118 posts
scotty Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
January 14, 2009 at 9:32 am #286350Actually I just found the instructions in the Joomla Docs…
akwasi_c Friendakwasi_c
- Join date:
- August 2008
- Posts:
- 124
- Downloads:
- 0
- Uploads:
- 5
- Thanks:
- 10
- Thanked:
- 8 times in 1 posts
January 14, 2009 at 12:09 pm #286382Good work scotty, but did you actually got it to work
scotty Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
January 14, 2009 at 12:21 pm #286385No, I didn’t test it. Does it not work?
scotty Friendscotty
- Join date:
- March 2008
- Posts:
- 2339
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 76
- Thanked:
- 827 times in 595 posts
January 14, 2009 at 12:33 pm #286390Ahh 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
-
AuthorPosts
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