Setting a publish date

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
MikePearce

Setting a publish date

Post by MikePearce »

Hey all,

Is there a way to set a publish date on any pages like you can with the news articles? I've had a search but can't find it anywhere.

Cheers,

Mike
pishkus

Re: Setting a publish date

Post by pishkus »

{modified_date format="%Y-%m-%d "}
MikePearce

Re: Setting a publish date

Post by MikePearce »

Thanks pishkus,

I don't think I was clear enough, what I meant was, to have the ability to give a page in the CMS a publish date, so that, up to that date, the page isn't available for visitors to view, but when it gets to the publish date, the page becomes live on the site.

Cheers,

Mike
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Setting a publish date

Post by Ted »

That's on a big list of stuff that I'll be doing for a company after 1.0 comes out.  You'll get to reap the benefits sometime in the near future.  :)
MikePearce

Re: Setting a publish date

Post by MikePearce »

Hello again,

I've got the date and time dropdowns functioning in the admin and writing to the db.

What I need to do now is to stop use these datetimes to stop the pages showing on the site.

I can hide the actual pages by editing the two queries in LoadPageInfoByContentAlias(), but I cannot find where to add " AND (c.publish = NOW() OR c.expiry = '0000-00-00 00:00:00')" to stop the pages appearing in the menus!

Can anyone help?

Cheers,

Mike
slloyd
Forum Members
Forum Members
Posts: 195
Joined: Mon Apr 24, 2006 9:09 pm

Re: Setting a publish date

Post by slloyd »

Thanks for the code! I just happened to be looking for this yesterday and finally gave up!
Locked

Return to “CMSMS Core”