News Archive Issues

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
marklyon

News Archive Issues

Post by marklyon »

Hi everyone! Firsdt of all I confess I'm a total newbie as far as PHP goes.
I'm just wondering what code I'd have to put in a page so that I can have an archive of expired news? At the moment I've used the code from the default contents in CMSMS to create a news section in the menu but I'd really like to offer an archive of older news.

Cheers!
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: News Archive Issues

Post by RonnyK »

marklyon,

I don't think that news shows expired news, I only use "number=5" on the main-page to show the last 5 posts, and on the archive-page without this option, so that all items are show, except the expired ones.

I found this topic however that points to an development change to handle it


http://forum.cmsmadesimple.org/index.php/topic,5230.msg29008.html#msg29008


Ronny
Last edited by RonnyK on Wed Feb 28, 2007 7:08 pm, edited 1 time in total.
mahjong

Re: News Archive Issues

Post by mahjong »

Marklyon,

Go to Extensions->Modules->Help (News)
Parameters

    * (optional) start="5" - Start at the nth item -- leaving empty will start at the first item.
    * (optional) number="5" - Maximum number of items to display =- leaving empty will show all items.
    * (optional) dateformat="%b %d, %Y" - Format to display the article's post date with. This is based on the strftime function and can be used in your template with $entry->formatpostdate. It defaults to %x, which is the default date format for the server's locale.
    * (optional) makerssbutton="true" - Make a button to link to an RSS feed of the News items.
    * (optional) category="category" - Only display items for that category. Use * after the name to show children. Multiple categories can be used if separated with a comma. Leaving empty, will show all categories.
    * (optional) moretext="more..." - Text to display at the end of a news item if it goes over the summary length. Defaults to "more..."
    * (optional) summarytemplate="sometemplate.tpl" - Use a separate template for displaying the article summary. It have to live in modules/News/templates.
    * (optional) detailtemplate="sometemplate.tpl" - Use a separate template for displaying the article detail. It have to live in modules/News/templates.
    * (optional) detailpage="pagealias" - Page to display News details in. This can either be a page alias or an id. Used to allow details to be displayed in a different template from the summary.
    * (optional) sortby="news_date" - Field to sort by. Options are: "news_date", "summary", "news_data", "news_category", "news_title". Defaults to "news_date".
    * (optional) sortasc="true" - Sort news items in ascending date order rather than descending.
    * (optional) showarchive="true" - Show only expired news articles.
    * (optional) browsecat="true" - Shows a browseable category list.
    * (optional) lang="en_US" - Parameter is used to specify what language to use for display on the frontend. Not all modules support or need this.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: News Archive Issues

Post by RonnyK »

mahjong,

what version of NEWS are you using then. I run 2.1 and my help doesn't show the option "showarchive" and I can't install news manually as it is embedded in core. I run 1.0.2 of cmsms by the way.
Parameters
(optional) start="5" - Start at the nth item -- leaving empty will start at the first item.
(optional) number="5" - Maximum number of items to display =- leaving empty will show all items.
(optional) dateformat="%b %d, %Y" - Format to display the article's post date with. This is based on the strftime function and can be used in your template with $entry->formatpostdate. It defaults to %x, which is the default date format for the server's locale.
(optional) makerssbutton="true" - Make a button to link to an RSS feed of the News items.
(optional) category="category" - Only display items for that category. Use * after the name to show children. Multiple categories can be used if separated with a comma. Leaving empty, will show all categories.
(optional) moretext="more..." - Text to display at the end of a news item if it goes over the summary length. Defaults to "more..."
(optional) summarytemplate="sometemplate.tpl" - Use a separate template for displaying the article summary. It have to live in modules/News/templates.
(optional) detailtemplate="sometemplate.tpl" - Use a separate template for displaying the article detail. It have to live in modules/News/templates.
(optional) detailpage="pagealias" - Page to display News details in. This can either be a page alias or an id. Used to allow details to be displayed in a different template from the summary.
(optional) sortby="news_date" - Field to sort by. Options are: "news_date", "summary", "news_data", "news_category", "news_title". Defaults to "news_date".
(optional) sortasc="true" - Sort news items in ascending date order rather than descending.
(optional) lang="en_US" - Parameter is used to specify what language to use for display on the frontend. Not all modules support or need this.

Ronny
cyberman

Re: News Archive Issues

Post by cyberman »

Hi Ronny,

It's funny - 2.1 is not in version info ... current version is 2.2.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: News Archive Issues

Post by RonnyK »

Cyberman,

in my module-manager it says i'm running on 2.1.See attached image. Can I upgrade to 2.2 without having to go to CMSMS 1.0.4.

Ronny



[gelöscht durch Administrator]
cyberman

Re: News Archive Issues

Post by cyberman »

Should work - the only change in version info is browsecat functionality.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: News Archive Issues

Post by RonnyK »

Cyberman,

where can I find the latest news-version, as it isn't listed in the module-manager and also not visible in the list of modules in the development area.

I also installed 1.0.4 on a seperate environment, that one is also 2.1.

Ronny
cyberman

Re: News Archive Issues

Post by cyberman »

Hmm, very curiously - I've got it from a 1.02 -> 1.04 update.

[gelöscht durch Administrator]
Last edited by cyberman on Fri Mar 02, 2007 1:04 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: News Archive Issues

Post by RonnyK »

Ah Cyberman,

my mistake, I reinstalled that environment to 1.0.2 after it first was 1.0.4. I had some problems with 1.0.4. and installed 1.0.2 over there as well. I didn't double-check and have 2.1 there as well as it comes with the core of 1.0.2.

Sorry for the disturbance,

Ronny
theothersimon
Forum Members
Forum Members
Posts: 29
Joined: Wed Apr 26, 2006 5:11 pm

Re: News Archive Issues

Post by theothersimon »

I had a similar problem with show categories. 

The solution is here:  http://forum.cmsmadesimple.org/index.ph ... 409.0.html

instead of ='true' 

try ='1'

Sorry this is a bit of a sparse reply,I have to run out the door. Have a loook at the links and it should explain itself.

it has since been submitted for correction here: http://viewsvn.cmsmadesimple.org/viewsv ... e&view=rev
Locked

Return to “CMSMS Core”