Book Image

Drupal 5 Views Recipes

Book Image

Drupal 5 Views Recipes

Overview of this book

The Drupal View modules give you flexibility and freedom to customize the display of your web site's content. Although there are more than 100 views-enabled modules, few site administrators use Drupal Views to its full potential. This book will enable you to realize the fullest potential of this powerful resource by providing a wide variety of powerful recipes for creating and displaying a wide variety of views ñ essential classics you will use again and again to innovative display methods that will make your Drupal site stand out. Pick and choose the ones you would like to prepare for your web site. In this book you will find ninety-four recipes to create a wide selection of views. The list includes event listings, interactive calendars and timelines, maps, proximity search, podcasting, carousels, Views Fusion, and many more. You will also explore default views, views with CCK, and master a variety of ways to associate views with related content. Most people think of Views for site visitors. But Views can also be handy for site administrators. You will get to know the Views Bulk Operations module, along with Editable Fields, and Views Custom Fields. (You'll probably wonder why you never used them before!) If you want to take Views to the next level, the book contains a code-rich chapter on theming. However, you will find most of the recipes detailed by the author do not require any original coding at all. As you progress through the recipes, you will be immersed in such Drupal Views topics as fields, arguments, filters, exposed filters, sorting, style plug-ins, formatters, cloning and copying views. Because Drupal is a worldwide and ever adapting system, the author also includes great tips and resources for navigating the online Drupal community and expanding your knowledge of the recipes. Finally, there is an extensive Appendix, which includes listings of all default views, formatters and style plug-ins for Drupal 5, along with a categorized list of patches.
Table of Contents (22 chapters)
Drupal 5 Views Recipes
Credits
About the Author
Acknowledgement
About the Reviewer
Preface
Default Views in Drupal 5 Modules
Formatters
Style Plugins
Views Hooks for Coders
Modules Included in Recipe Ingredients
Additional Resources and Modules Mentioned in Recipes
Selected Noteworthy Patches to Views
Index

Appendix G. Selected Noteworthy Patches to Views

To apply a patch, go to the command line in the module directory (usually sites/all/modules/views or one of its subdirectories) and type:

patch < filename.patch

These patches are not guaranteed. Be sure to read the issue posts, test the patches in a development environment, and report your results back to the issue queue.

A complete list of Views 1 patches is available at:

http://drupal.org/project/issues/search/views?status[]=13&status[]=8&status[]=14&status[]=15&version[]=5.x

Patch name

URL

Arguments

 

'node: id' argument handling fails on str type values

drupal.org/node/263855

Can't have taxonomy argument and filter

drupal.org/node/277919

Arguments Type Taxonomy Name of Term

drupal.org/node/267435

Add a 'Node: Posted Day' argument

drupal.org/node/150808

Add argument handler for "Front page promoted status"

drupal.org/node/182128

Argument in the beginning of the URL is processed incorrectly

drupal.org/node/180776

Author Role Argument

drupal.org/node/159850

Comparison with NULL fails

drupal.org/node/279478

Node ID argument summary not working

drupal.org/node/238610

Support Day of Month argument

drupal.org/node/199366

using two taxonomy term names as arguments in views

drupal.org/node/77543

views_handler_arg_nodetype() escapes its argument twice

drupal.org/node/293068

well defined paths should override argument based paths

drupal.org/node/170178

Breadcrumbs

 

Breadcrumb - not replaced % mark in the title of views.

drupal.org/node/201704

Malformed menu/breadcrumb when view contains Node: Body field

drupal.org/node/176360

Tokens not substituted in breadcrumb

drupal.org/node/183191

Comments

 

Correct 'Comment: Link' for paged comment lists

drupal.org/node/236264

Comments Distinct

drupal.org/node/219499

Missing plural in new comments mark

drupal.org/node/206934

views_comments: Comments with no subjects have no clickable link text

drupal.org/node/282993

Export

 

$view->menu_tab_default_parent_type not getting exported

drupal.org/node/171067

Bulk export for Drupal 5/Views 1

drupal.org/node/402636

Exported views use of "array" (not up to coding standards)

drupal.org/node/174044

Fields

 

Add field to 'contact' node authors

drupal.org/node/154865

New field for node published status

drupal.org/node/245482

Node: Body outputs entire full node body instead of Body field

drupal.org/node/160641

Truncate node teaser/body field to custom length

drupal.org/node/177082

UID field for views_user.inc

drupal.org/node/339885

Expose node author's email address as a field

drupal.org/node/177494

Port usernode user table definitions to views_user.inc

drupal.org/node/143356

Path (alias) integration

drupal.org/node/257046

Filters

 

"None of" (NOR) filter incorrect on vocabulary name

drupal.org/node/225899

Can't have taxonomy argument and filter

drupal.org/node/277919

Add timestamp support to timestamp filters

drupal.org/node/333123

Adding a range filter operator

drupal.org/node/151989

Exposed filters: URL processing on embeds

drupal.org/node/156130

Filter 'Node: Author Name (text field)'

drupal.org/node/199162

Issue with "Search: Index" exposed filter

drupal.org/node/365656

Node: Created Month' and 'Node: Created Year' filters

drupal.org/node/203407

Adding same filter twice doesn't work

drupal.org/node/250769

clean up filter code to work with alias prefixes

drupal.org/node/150094

Filter nodes by whether author account is active/blocked

drupal.org/node/277963

Node body length filter

drupal.org/node/188376

Path (alias) integration

drupal.org/node/257046

Port usernode user table definitions to views_user.inc

drupal.org/node/143356

views filter Author is Anonymous is broken

drupal.org/node/226570

Views filter to accept timestamps

drupal.org/node/355420

Programmatic Filters Failing

drupal.org/node/150517

RSS

 

extra data necessary for extra_RSS_fields

drupal.org/node/341240

messages generated during rss feed

drupal.org/node/175436

Option to anonymize RSS feeds in Views

drupal.org/node/335934

RSS feeds from views bypass the page cache

drupal.org/node/231424

RSS link on summary view using '*' instead of custom Wildcard

drupal.org/node/102746

Views RSS: view hook results not captured

drupal.org/node/196933

Views_rss doesn't apply input filters to fulltext output

drupal.org/node/147821

Sort

 

Add node handler to sort by promoted to front page

drupal.org/node/262916

Expose node author's email address as a field

drupal.org/node/177494

How do i add the nid from term_node as a sort criteria

drupal.org/node/433396

Path (alias) integration

drupal.org/node/257046

Port usernode user table definitions to views_user.inc

drupal.org/node/143356

tablesort_sql in _views_query->query() escapes characters in output of sort_handler functions causing SQL errors

drupal.org/node/231796

Views_search: Sort by relevance

drupal.org/node/365566

Views sort parameters override table sort.

drupal.org/node/259083

SQL

 

"Is Not Equal To" for LIKE comparisions

drupal.org/node/169709

Add HAVING support

drupal.org/node/170245

Cached queries not available in hook_views_pre_query

drupal.org/node/153924

query limit $start, $count

drupal.org/node/125015

support subqueries

drupal.org/node/143888

tablesort_sql in _views_query->query() escapes characters in output of sort_handler functions causing errors

drupal.org/node/231796

Taxonomy

 

Arguments Type Taxonomy Name of Term

drupal.org/node/267435

Can't have taxonomy argument and filter

drupal.org/node/277919

using two taxonomy term names as arguments in views

drupal.org/node/77543

Missing taxonomy terms in filters (Covered in Recipe 17)

drupal.org/node/199675

Taxonomy Term distinct

drupal.org/node/195790

Taxonomy term id argument breaks without $depth option

drupal.org/node/221000

Taxonomybased view SQL woes

drupal.org/node/298542

Views 1.7 pre-req #2: Write new vocabulary fetcher

drupal.org/node/272289

Theme

 

enable stripes in the views theme wizard

drupal.org/node/268528

Provide $info to views theme function

drupal.org/node/160381

This patch adds a theme function for 'number of new comments'

drupal.org/node/210933

Other Views Patches

 

'more' link appears in block when block is exactly full

drupal.org/node/282508

Add creating module to list of default views

drupal.org/node/237272

Alphabetic summary listing of node titles causes SQL error

drupal.org/node/171565

Ampersand escaped twice in links to files

drupal.org/node/212853

API cannot parse comments

drupal.org/node/198293

Avoid prefixing temporary tables

drupal.org/node/129838

Checkbox data does not display properly on Windows w/Garland

drupal.org/node/167439

Extend the '$node' token to accept multiple node types

drupal.org/node/211093

Little UI typo fix

drupal.org/node/354747

node_invoke_nodeapi is called with incorrect $a4 (page)

drupal.org/node/385742

Node Status Value Should Not Be Hardcoded

drupal.org/node/382872

Search index with no results gives no empty text

drupal.org/node/330481

Small table accessibility improvement

drupal.org/node/183592

Strange behavior w/ blog views, pages titled "My blog"

drupal.org/node/128520

static cache views for views that can't be cached

drupal.org/node/236809

Translate views with i18n

drupal.org/node/245124

Use block title (instead of view's name) in "Configure blocks"

drupal.org/node/257575

view_node.inc handlers not table alias safe

drupal.org/node/142714

Views_search: php-error when nothing was found

drupal.org/node/365013

Views cache too large

drupal.org/node/218187

Views handler for node 'edit' and 'delete' links' node access is faulty

drupal.org/node/325357

Views menu items cannot be translated

drupal.org/node/234153

Wrong feed url when using ags handling code!

drupal.org/node/225416

Other

 

Views fusion support for nodereference

drupal.org/node/123482

Color Coding based on taxonomy or content type

drupal.org/node/121298

Configurable icons for timeline events (Timeline module)

drupal.org/node/104890