Hi,
I am new to CMSMS and have found it simple to put a site together, but there are a few puzzling design decisions, or features I am unaware of.
One of them is the ability to display news articles by date - I have done some searching on the forum and there seems to be no documentation on doing this - yet it seems such a common thing to want to achieve?
My client would like a menu down the left-hand side of the screen with options for each month of the year. When you click the month, you'll see the articles from that month - yet I can't find out how to do this! Any help would be greatly appreciated.
Show News articles by date
Re: Show News articles by date
Well if you looked in the help for the News module you would find:
Jeff
As for the months, there is a "archive" option, but if you want it as a select box with options then you probably will need to write a UDT for that.# (optional) sortasc="true" - Sort news items in ascending date order rather than descending.
# (optional) sortby="news_date" - Field to sort by. Options are: "news_date", "summary", "news_data", "news_category", "news_title", "news_extra", "end_time", "start_time", "random". Defaults to "news_date". If "random" is specified, the sortasc param is ignored.
Jeff
Re: Show News articles by date
I saw that in the very short Help page - and realised it wasn't what I was looking for.
It's not a big ask to have a menu split by date, and I'm really surprised the news module doesn't seem to have this option built in.
It's not a big ask to have a menu split by date, and I'm really surprised the news module doesn't seem to have this option built in.
Re: Show News articles by date
Just wondering if anyone knows how to do this.
For example, I would like a list of options:
July 2009
June 2009
May 2009
April 2009
and so on...
Making the links isn't a problem - knowing how to get {news} to show the articles however, is! Any help would be greatly appreciated.
For example, I would like a list of options:
July 2009
June 2009
May 2009
April 2009
and so on...
Making the links isn't a problem - knowing how to get {news} to show the articles however, is! Any help would be greatly appreciated.
Re: Show News articles by date
Very simple. Just apply a free patch.
If you want to merge the patch in the core you have to pay/pray developers (as sponsor).
regards
blast
If you want to merge the patch in the core you have to pay/pray developers (as sponsor).
regards
blast
Re: Show News articles by date
Hi Blast - thanks for this. Only problem is, when I click the link:
The page you were looking for doesn't exist.
You may have mistyped the address or the page may have moved.
Re: Show News articles by date
This is the link:
http://forum.cmsmadesimple.org/index.ph ... 969.0.html
Read entire post for explanation
http://forum.cmsmadesimple.org/index.ph ... 969.0.html
Read entire post for explanation
Re: Show News articles by date
Okay let's cut through the politics and save people from a LOT of reading in the future. I have made available the merged files below for anyone else wanting to do this.
First of all download http://www.asdsolutions.co.uk/files/news_update_v2_9.zip and extract the files. Then, in your CMS Made Simple installation, replace the following files with the ones you just extracted:
/modules/News/News.module.php
/modules/News/action.default.php
/modules/News/lang/en_US.php
Note - the merge was performed on version 2.9 bundled with CMS Made Simple at the time of posting.
The changes are those made by blast2007 originally and are minor and will not break the news module! However proceed at your own risk, as we have had the lectures that any amendments will render the module unsupported.
To use, simply call the News module like this:
This would show all the articles from July 2009.
I am going to work on a menu that automatically renders based on a start month/year and the current month/year, and will post a link once the code is ready - shouldn't be too long.
I hope this helps even one person using CMS Made Simple's News module and saves a lot of reading in the forums to accomplish something quite simple.
If I have broken any rules in posting this - feel free to moderate / delete.
First of all download http://www.asdsolutions.co.uk/files/news_update_v2_9.zip and extract the files. Then, in your CMS Made Simple installation, replace the following files with the ones you just extracted:
/modules/News/News.module.php
/modules/News/action.default.php
/modules/News/lang/en_US.php
Note - the merge was performed on version 2.9 bundled with CMS Made Simple at the time of posting.
The changes are those made by blast2007 originally and are minor and will not break the news module! However proceed at your own risk, as we have had the lectures that any amendments will render the module unsupported.
To use, simply call the News module like this:
Code: Select all
{news startperiod="2009/07/01" endperiod="2009/07/31"}
I am going to work on a menu that automatically renders based on a start month/year and the current month/year, and will post a link once the code is ready - shouldn't be too long.
I hope this helps even one person using CMS Made Simple's News module and saves a lot of reading in the forums to accomplish something quite simple.
If I have broken any rules in posting this - feel free to moderate / delete.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Show News articles by date
Anybody applying these patches please keep in mind that they are UNSUPPORTED... and therefore we cannot support any of your questions after you've hacked the code.
If you apply your own patches to the code, so be it.. it is therefore expected that you're proficient enough with PHP and system to solve your own difficulties from then on in.
If you apply your own patches to the code, so be it.. it is therefore expected that you're proficient enough with PHP and system to solve your own difficulties from then on in.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Show News articles by date
Considering the "difficulties" to integrate period patch in news module, here you can find how to achieve same results with vanilla news core files (no patch is needed).
regards
blast
regards
blast