This is a rebuild of the original http://drupal.org/project/ed_classified module for Drupal 6 (and later), dropping any 4.x/5.x remnants.
Download or clone from http://bit.ly/cIBtcN
As per #195494, the goal is to support multiple node types.
The module defines two form extra fields, expires_fs
on forms
and expires
for display
expires_fs
expires
The module has inner knowledge of the specifics of the expiration extra fields.
Lists are built either using custom built lists including it, or using the new custom view mode introduced in 7.3. With multiple node types, this is no longer doable so we replace these lists by taxonomy-filtered views.
With the extra field gone, its Views field handler no longer works.
Most of the module complexity lies in the expiration handling: automatic expires generation and update. This needs to be adapted for the additional complexity of a field over an extra field. Existing node form hooks and handlers must be replaced by field hooks since we no longer know which forms to intercept.
A number of users have expressed frustration at the lack of i18n support in the module. Switching the extra fields to a field and the custom lists to Views will help with this. New code should be i18n-compatible, so that later changes can bring full i18n compliance
The code currently has 100% S0 test coverage. This should not go down, but increase towards 100% C0.
Any significant work should take into account the directions taken by D8. The move from an extra field to a normal field is in the right direction. Other significant changes regard code placement outside the module file and the use of autoloaded namespaced classes, one per file.
classloader
. xautoload
or classloader
to apply PSR-0, or declare classes the D7 way, manually in the info file.- 1 specific vocabulary: `classified_categories`, supplied with 2 sample terms (Wanted and For Sale) - 1 specific node type: `classified` equipped with
- 3 blocks:
- 1 Context Condition plugin - 1 CTools “content type” plugin to expose the `expires` pseudo field - 2 permissions
- 2 extra fields
- 1 notifications submodule: send notifications
- 3 drush commands
- 1 custom view mode for `node` - 2 menu loaders
- 3 user tokens
- 2 theme items
- 1 field formatter for term_reference fields, linking to the per-term ad list instead of the default term page, with an optional link title - node form logic
- node access logic - requirements logic
- taxonomy change logic for terms and vocabularies - URL outbound rewriting logic to redirect term links to ad lists when applicable - Views integration logic
- configuration variables
- 100% S0 Simpletest coverage - pages
- 7 advanced help pages - custom CSS
contact
taxonomy/term/<tid>
links with ed_classified/<tid>
Note that “administer” right should include “reset expiration” and all the other rights.
All currently as themeable functions, redo as templates