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 B. Formatters

In the Views UI, formatters display as a drop-down list of Field Options.

Formatters are discussed in Recipes 25 to 27.

Module Name

Module Page

Formatter

ASIN Field

drupal.org/project/asin

Cover and publishing info

Cover image

Cover image (small)

Cover image (large)

Publishing info only

Asset

drupal.org/project/asset

Default

Asset API

drupal.org/project/asset_api

Default

Plain text

Trimmed

Assetfield

drupal.org/project/assetfield

Default

Imagecache Rule Names

Autonode CCK widget

drupal.org/project/autonode

Default

Plain text

Body Builder

drupal.org/project/bodybuilder

Default

Brazilian IDs

drupal.org/project/brazilian_ids

Default

Content Construction Kit (CCK)

drupal.org/project/cck

Default

Plain text

Trimmed

CCK Link to Map

drupal.org/project/cck_link_to_map

Default

Plain text

Link to Map

CCK Node Reference

drupal.org/project/cck

Title (link)

Title (no link)

Full node

Teaser

CCK Number

drupal.org/project/cck

9999

9,999

9,999.9

9,999.99

9.999

9.999,9

9.999,99

9 999

9 999, 9

9 999, 99 Unformatted

CCK Text

drupal.org/project/cck

Default

Plain text

Trimmed

CCK User Reference

drupal.org/project/cck

Default

Plain text

Address field for CCK

drupal.org/project/cck_address

Default

CCK Button

drupal.org/project/cck_button

Button representation

CCK Download Dropdown

drupal.org/project/cck_download_dropdown

Default

CCK Extras

drupal.org/project/cck_extras

Selectable textarea

Sample PHP Code

Link redirection

1 Pixel Out player

Button player

Preview image (tiny)

Preview image (small)

CCK Flashcard

drupal.org/project/cck_flashcard

Default

Plain text

Trimmed

CCK Formatters - Flash

drupal.org/project/cck_formatters

As Flash (SWF file)

CCK Formatters - KML

drupal.org/project/cck_formatters

As Google Map (KML file)

Fullname field for CCK

drupal.org/project/cck_fullname

Default, prefix first middle last suffix

Last name only

First name only

Last, first middle

CCK GMap Address

drupal.org/project/cck_gmapaddress

Address

Longitude

Latitude

Longitude and Latitude

Accuracy

GMap - Single

GMap - All addresses in one

Route Link - Single

Route Link - All addresses in one

GMap Route

GMap User-Route

CCK IP Address

drupal.org/project/cck_ipaddr

IP address

cck_map

drupal.org/project/cck_map

Default map output

CCK Multimage

drupal.org/project/cck_multimage

CCK Multimage

CCK Node Menu

drupal.org/project/cck_nodemenu

Custom Node Menu

Custom Node Menu - Single Item

CCK Redirection

drupal.org/project/cck_redirection

Default: Suppress

Show as Link

Show as Plain Text

CCK Table Field

drupal.org/project/cck_table

Default

CCK Taxonomy Fields

drupal.org/project/cck_taxonomy

Default

CCK Taxonomy Super Select Ultra

drupal.org/project/cck_taxonomy_ssu

Default

CiviNode And Civinode CCK

drupal.org/project/civinode

Default

Contact Profile

Default (title)

Using Profile

Colorpicker

drupal.org/project/colorpicker

Colorpicker field

Comic View

drupal.org/project/comicview

Comic Paginated

Comic Paginated (Imagecache Rule Names)

CCK comment reference

drupal.org/project/commentreference

Default

Plain text

Computed Field

drupal.org/project/computed_field

Raw text

Plain text

Markup

Content Taxonomy

drupal.org/project/content_taxonomy

As Text

As Link

Craqbox

drupal.org/project/craqbox

craqbox: (Imagecache Rule Names)

CCK Currency

drupal.org/project/currency_cck

Default

Plain text

Date

drupal.org/project/date

Default

Long

Medium

Short

ISO

Timestamp

Feed

iCal

As Time Ago

editablefields

drupal.org/project/editablefields

Editable

Education Field

drupal.org/project/education_field

Default

Email Field

drupal.org/project/email

Default Email-Link

Email-Contact Form

Email-Invisimail

Embedded Media Field - Audio

drupal.org/project/emfield

Default

Full Size Audio Player

Preview Size Audio Player

Image Thumbnail

Embed Code

Embedded Media Field - Image

drupal.org/project/emfield/

Default

Full Size Image

Preview Size Image

Image Thumbnail

Embed Code

Embedded Media Field - Video

drupal.org/project/emfield

Default

Full Size Video

Preview Video

Image Thumbnail

Embed Code

Thickbox: Image Thumbnail -> Full Size Video

Employment Field

drupal.org/project/employment_field

Default

Evoca Media Services – EMS

No project page, but available via CVS at /contributions/modules/evoca_ms

Default player

Single file player

Explainfield CCK widget

drupal.org/project/explainfield

Default

Replace with explanation

Value only

Explanation only

Eye-drop Editor (Deprecated)

drupal.org/project/eyedrop

Default

Eyedrop Fieldnames

Field Reference

drupal.org/project/fieldreference

Default

Full

Teaser

FileField

drupal.org/project/filefield

Default

Fivestar

drupal.org/project/fivestar

As Stars

Rating (i.e. 4.2/5)

Percentage (i.e. 92)

Flickr

drupal.org/project/flickr

photo_id

set_id

Geonames CCK

drupal.org/project/geonames_cck

Default

No geotag

Hidden geo code

With disambiguation link

GMap Addons

drupal.org/project/gmap_addons

Default Map

GSIV

GSIV: Imagecache Rule Names

Giant Scalable Image Viewer

drupal.org/node/187640

Guitar

drupal.org/project/guitar

Default

ImageCache

drupal.org/project/imagecache

Default

Preset Name

Preset Name as link to node

Preset Name as link to image

Path to Preset Name derivative

URL to Preset Name derivative

ImageField

drupal.org/project/imagefield

Default

link to node

link to image

path to image

url to image

Inventory field

drupal.org/project/inventory

Default

Skip Empty Fields

jQuery Lightbox

drupal.org/project/jlightbox

jLightbox: Imagecache Rule name gallery

jLightbox: Imagecache Rule name

jQuery Gallery View for CCK multiple imagefield

drupal.org/project/jqgalview

jqGalView: Preset name

JQZoom

drupal.org/project/jqzoom

JQZoom Imagecache Rule name

JSNodeload

drupal.org/project/jsnodeload

Reference + text

Text only

Reference only

Lightbox2

drupal.org/project/lightbox2

Lightbox2 iframe: original->node page

Lightbox2: original->View Rule

Lightbox2: View Rule->original

Lightbox2 slideshow: original->View Rule

Lightbox2 slideshow: View Rule->original

Lightbox2: View Rule->Lightbox Rule

Lightbox2 slideshow: View Rule->Lightbox Rule

  

Lightbox2 iframe:View Rule->node page

Lightbox2: Image Thumbnail -> Original

Lightbox2 slideshow: Image Thumbnail -> Original

Lightbox2 iframe: Image Thumbnail -> Content

Lightbox2: Image Thumbnail -> Full Size Video

Lightbox2 iframe

Link

drupal.org/project/link

Title, as link (default)

URL, as link

URL, plain text

Short, as link with title "Link"

Label, as link with label as title

Separate title and URL

Location (API, module)

drupal.org/project/location

Default

Matrix Field

drupal.org/project/matrix

Table View

Media Field - Audiofield

drupal.org/project/mediafield

Default

Media Field - Videofield

drupal.org/project/mediafield

Default

Media Field - Display

drupal.org/project/mediafield_display

1 Pixel Out player

1 Pixel Out player plus download link

Button player

Button player plus download link

Money CCK field

drupal.org/project/money

3-letter code after amount

3-letter code before amount

Full name after amount

Full name before amount

Symbol after amount

Symbol before amount

Multireference CCK field

drupal.org/project/multireference

list

table

Namefield

drupal.org/project/namefield

Default

Office Hours

drupal.org/project/office_hours

Default

OpenPackage Video

drupal.org/project/op_video

Inline player

Preview image - link to node

Preview image - play in layer

Phone (CCK)

drupal.org/project/phone

Default

Pollfield

drupal.org/project/pollfield

Default

All choices

All results

Voting widget

Question

Runtime

Active

Choice item (Views only)

Vote item (Views only)

Postal

drupal.org/project/postal

Default

Preset Widget Options

drupal.org/project/preset_widget_options

Creative Commons license (when installed with http://drupal.org/project/cc_widget)

Private Number

drupal.org/project/private_number

Default

Plain text

Role Reference

drupal.org/project/rolereference

Default

Plain text

See Map

drupal.org/project/see_map

Default

Shadowbox

drupal.org/project/shadowbox

shadowbox: original to View Rule

shadowbox: View Rule to original

shadowbox gallery: original to View Rule

shadowbox gallery: View Rule to original

shadowbox: View Rule to Shadowbox Rule

shadowbox gallery: View Rule to Shadowbox Rule

SMS Framework

drupal.org/project/smsframework

SMS Link

State Reference

drupal.org/project/statereference

Default

Plain text

Text Field Tags

drupal.org/project/text_field_tags

Heading 1

Heading 2

Heading 3

Heading 4

Bold

Italic

Underline

Block quote (indent)

As link

Thickbox

drupal.org/project/thickbox

Thickbox: Preset Name

Timer

drupal.org/project/timer

Default

Trackfield

drupal.org/project/trackfield

unformatted

Trackfield - Graph

drupal.org/project/trackfield

Format Sizes

Trackfield - Map

drupal.org/project/trackfield

Map Format Sizes

Trackfield - Stats

drupal.org/project/trackfield

Default

Metric - Auto

9999m

9.99Km

9.9%

hh:mm:ss

99h99m99s

Ubercart Add to Cart CCK Field

drupal.org/project/uc_cart_widget

Add to Cart (w/attributes)

Add to Cart (no attributes)

VCalfield

drupal.org/project/vcalfield

VCalendar

Video Upload

drupal.org/project/video_upload

Default

Thumbnail Image

Thumbnail Image as link

Small Video

Viewfield

drupal.org/project/viewfield

Use view "Page" settings

Use view "Block" settings

Count of items in view

Style plugins

zipcode (CCK)

drupal.org/project/zipcode

Default

Zoomify

drupal.org/project/zoomify

Zoomify

Zoomify: Imagecache Rule Names