Views integration in D6 version
| Project: | Auto Expire |
| Version: | 6.x-1.0-rc1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
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.
| Attachment | Size |
|---|---|
| auto_expire_views.zip | 21.8 KB |

#1
Fantastic! thank you, it works perfectly ..
#2
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
Two positive reviews and no problems so far... setting this to RTBC.
#4
committed to 6.x-1.0-rc1.
#5
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
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
Done. And thanks for the module!
#8
Automatically closed -- issue fixed for 2 weeks with no activity.