Drupal meetup presentation flag, flag weights and draggable views
-
Upload
nicholas-thompson -
Category
Technology
-
view
2.795 -
download
1
description
Transcript of Drupal meetup presentation flag, flag weights and draggable views
![Page 1: Drupal meetup presentation flag, flag weights and draggable views](https://reader031.fdocuments.in/reader031/viewer/2022020110/548da27ab47959763e8b460b/html5/thumbnails/1.jpg)
1
![Page 2: Drupal meetup presentation flag, flag weights and draggable views](https://reader031.fdocuments.in/reader031/viewer/2022020110/548da27ab47959763e8b460b/html5/thumbnails/2.jpg)
Flaghttp://drupal.org/project/flag
Flag Weightshttp://drupal.org/project/flag_weights
DraggableViewshttp://drupal.org/project/draggableviews
2
Introduction to...
![Page 3: Drupal meetup presentation flag, flag weights and draggable views](https://reader031.fdocuments.in/reader031/viewer/2022020110/548da27ab47959763e8b460b/html5/thumbnails/3.jpg)
So what are they?
Flag: Provides the ability to “mark” a node or user in a list
Flag Weights: Extends Flag to allow marked items to be ordered
DraggableViews: Provides an extension to Views for administering ordered lists
3
![Page 4: Drupal meetup presentation flag, flag weights and draggable views](https://reader031.fdocuments.in/reader031/viewer/2022020110/548da27ab47959763e8b460b/html5/thumbnails/4.jpg)
FlagsFlag is a flexible system for flagging nodes, comments and users
Flags can be “global” or per-user
Integrates with Views, Token, Rules, Features, Services and Activity
Has an API for extending functionality even further
4
![Page 5: Drupal meetup presentation flag, flag weights and draggable views](https://reader031.fdocuments.in/reader031/viewer/2022020110/548da27ab47959763e8b460b/html5/thumbnails/5.jpg)
Flag Weights
Flag Weights is a simple extension to the Flags module
It alters each flagged item to have a weight
This allows you to create arbitrary ordered lists of nodes, users and comments
5
![Page 6: Drupal meetup presentation flag, flag weights and draggable views](https://reader031.fdocuments.in/reader031/viewer/2022020110/548da27ab47959763e8b460b/html5/thumbnails/6.jpg)
Draggable Views
Draggable Views provides a plugin for Views which produces a sortable list of items
The sorting system is the same one used to order Blocks and Terms in the normal Drupal interface
6
![Page 7: Drupal meetup presentation flag, flag weights and draggable views](https://reader031.fdocuments.in/reader031/viewer/2022020110/548da27ab47959763e8b460b/html5/thumbnails/7.jpg)
Nodequeue?
Anybody heard of Nodequeue? Doesn’t it do the same thing already?
Yes - but only for nodes. And the admin interface is “fixed” to use autocomplete for node titles.
7
![Page 8: Drupal meetup presentation flag, flag weights and draggable views](https://reader031.fdocuments.in/reader031/viewer/2022020110/548da27ab47959763e8b460b/html5/thumbnails/8.jpg)
Configuringa Flag
Flag comes with a “bookmark” flag by default. This provides a per-user node flag.
Let’s create a new one called sidebar_items.
8
![Page 9: Drupal meetup presentation flag, flag weights and draggable views](https://reader031.fdocuments.in/reader031/viewer/2022020110/548da27ab47959763e8b460b/html5/thumbnails/9.jpg)
Configuringa Flag
The next form has a whole load of settings, but fortunately they’re all pretty simple.
You’ll need a Title, Flag and Unflag text, enabled Global checkbox, enabled node types and appropriate Display options.
9
![Page 10: Drupal meetup presentation flag, flag weights and draggable views](https://reader031.fdocuments.in/reader031/viewer/2022020110/548da27ab47959763e8b460b/html5/thumbnails/10.jpg)
Configuringa Flag
And that’s it!
10
![Page 11: Drupal meetup presentation flag, flag weights and draggable views](https://reader031.fdocuments.in/reader031/viewer/2022020110/548da27ab47959763e8b460b/html5/thumbnails/11.jpg)
Admin View - Page11
![Page 12: Drupal meetup presentation flag, flag weights and draggable views](https://reader031.fdocuments.in/reader031/viewer/2022020110/548da27ab47959763e8b460b/html5/thumbnails/12.jpg)
Admin View - Attachment12
![Page 13: Drupal meetup presentation flag, flag weights and draggable views](https://reader031.fdocuments.in/reader031/viewer/2022020110/548da27ab47959763e8b460b/html5/thumbnails/13.jpg)
Other Admin Options
13
Exposed Filters for Node Title, Type, Post Date, etc
More fields on the table for sorting
Imagefield thumbnails
![Page 14: Drupal meetup presentation flag, flag weights and draggable views](https://reader031.fdocuments.in/reader031/viewer/2022020110/548da27ab47959763e8b460b/html5/thumbnails/14.jpg)
The Admin View14
![Page 15: Drupal meetup presentation flag, flag weights and draggable views](https://reader031.fdocuments.in/reader031/viewer/2022020110/548da27ab47959763e8b460b/html5/thumbnails/15.jpg)
The Admin View15
![Page 16: Drupal meetup presentation flag, flag weights and draggable views](https://reader031.fdocuments.in/reader031/viewer/2022020110/548da27ab47959763e8b460b/html5/thumbnails/16.jpg)
So how does it look?
16
Well, how do you want it to look? :-)
![Page 17: Drupal meetup presentation flag, flag weights and draggable views](https://reader031.fdocuments.in/reader031/viewer/2022020110/548da27ab47959763e8b460b/html5/thumbnails/17.jpg)
Example Result
17
This just shows one way of using Flags, Flag Weights and Draggable
Views.
![Page 18: Drupal meetup presentation flag, flag weights and draggable views](https://reader031.fdocuments.in/reader031/viewer/2022020110/548da27ab47959763e8b460b/html5/thumbnails/18.jpg)
Any questions?
18
Slides available:http://bit.ly/flag-slides
Photo:http://flic.kr/p/5KrE8c
by “pinprick”