Views integration in D6 version

marcvangend - May 16, 2009 - 22:27
Project:Auto Expire
Version:6.x-1.0-rc1
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Today I was testing the initial D6 port of Auto Expire and I figured that it needs Views integration... so I went ahead and did it. I'm only attaching a .zip with the complete altered module (based on the D6 version found at http://drupal.org/node/313280#comment-1484562) because WinMerge doesn't allow me to create proper patches when new files are added.

I added a couple of lines of code to auto_expire.module (an implementation of hook_views_api) and added two new files: auto_expire.views.inc and views_handler_field_auto_expire_link_extend.inc (I know, it's a long file name, but it follows the pattern of similar files). I didn't have to change any of the existing code, so this patch can be easily re-rolled in case of changes to the D6 port.

In views, this provides the following features:
- Filters: expiration date (date), extended (integer), warned (boolean)
- Fields: expiration date (date), extended (integer), warned (boolean), extend (link to node/[nid]/expiry, only when _auto_expire_can_user_extend() returns true)

I'm curious to read your reactions.

AttachmentSize
auto_expire_views.zip21.8 KB

#1

Liliplanet - May 24, 2009 - 13:03

Fantastic! thank you, it works perfectly ..

#2

skizzo - June 22, 2009 - 22:24

I was going to file a feature request for that... but it's there already! :-)
and so far It's working fine for me too. Thank you.

#3

marcvangend - June 28, 2009 - 22:13
Status:needs review» reviewed & tested by the community

Two positive reviews and no problems so far... setting this to RTBC.

#4

marcvangend - June 28, 2009 - 23:20
Version:5.x-1.x-dev» 6.x-1.0-rc1
Status:reviewed & tested by the community» fixed

committed to 6.x-1.0-rc1.

#5

jfmoore - July 3, 2009 - 21:53

Thanks for the update. Just what I needed. I don't see a way, however, to display the expiration date in the node. Am I missing something, or is this not possible?

#6

marcvangend - July 4, 2009 - 06:38

You mean that you want to display the expiration date on the node page, ie. www.example.com/node/123? Currently, the expiration date is not read from the database when a node is loaded. It wouldn't be too hard to do this. Can you please open a new issue for this?

#7

jfmoore - July 4, 2009 - 11:50

You mean that you want to display the expiration date on the node page, ie. www.example.com/node/123? Currently, the expiration date is not read from the database when a node is loaded. It wouldn't be too hard to do this. Can you please open a new issue for this?

Done. And thanks for the module!

#8

System Message - July 18, 2009 - 12:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.