News in a block

kosie99 - September 11, 2009 - 05:36

Hi Everybody,

I am new to Drupal and must say that I am impressed with the scope of this project. Wow!

Can someone please inform me if a module like this exist?:

I want to have a block on the right column that displays news, but expires it when a certain date/time is reached. So, ideally, the block would allow a person to create an entry and supply it the start and end date of when that specific piece of information should be visible to all users.

Not sure if my explanation is clear enough!

Regards,
Kosie

Views / Blocks

matt blaine - September 11, 2009 - 06:09

I think you'd want to make a custom content type with cck that has a field for expiration date and then create a view with a block display that lists content (title link to node) then (beyond the scope of this reply) filter based on that date

You could look at

expandonline - September 11, 2009 - 08:52

Thanks for the replies - I am

kosie99 - September 11, 2009 - 09:33

Thanks for the replies - I am looking at the scheduler module to see how it functions and I think I will be able to learn enough from it to create a custom module.

Also, just to elaborate on my idea and getting people's comments on how much sense it makes trying to do it the way I was thinking:

The Drupal site I want to create will not have any users that login, except for a "content creator" and of course, myself as the webmaster.

I was thinking that 2 authenticated users have access to a blog entry form to create news entries. On each page then will be a block that displays these blog entries (the entries will be short, 200 characters at most), but somehow there will have to be an end date for each entry to indicate that it should not be displayed in the block anymore.

I could introduce a convention, I guess, where the blog entry will always end with something like ":YYYYMMDD:" and then I can just filter that string out and use that as an end date. I don't want to delete the blog entries from the node table, just not display it.

I wonder of the "node" table(s) in Drupal maybe has a column that can be used for an end date. Not at a machine with drupal installed, so cannot look at the schema right now.

Does any of this make sense?

Kosie

_

WorldFallz - September 11, 2009 - 14:53

I think you're way over complicating this-- the scheduler module already does exactly what you asked for in the op.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

Agree with above, you appear

expandonline - September 15, 2009 - 12:58

Agree with above, you appear to be reinventing the wheel.

Scheduler allows you to enter a date to publish and/or unpublish your node: when the time passes, the 'published' setting gets updated - in your case you would ignore the publish date and just set the unpublish date, and from that time the node will no longer displays on the website. It will still be available in the admin should you wish to edit and re-publish it.

Peter

 
 

Drupal is a registered trademark of Dries Buytaert.