show your drupal site who’s the boss! how to take control away from the system and give it back to...

54
Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Upload: philomena-benson

Post on 15-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Show your Drupal site who’s the boss!

How to take control away from the systemand give it back to the users!

Page 2: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Presented By:Stan Ascher (sascher)

Senior Drupal Developer:

[email protected]

Page 3: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!
Page 4: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

By default, Drupal is the boss

Page 5: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Here are six ways we said otherwise!

Page 6: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

“I need my staff to know when someone posts a

resource”

Scenario 1: With Rules, we told Drupal how to keep the client informed.

Page 7: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Scenario 2: With Rules, we told Drupal how to automate 508 Compliance

“I need to make sure all images have alt text so our users with screen readers can use this.”

Page 8: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Scenario 3: With Rules and VBO, we told Drupal to engage our business users!

“Surprise!I need someone to tag

a whole bunch of nodes as letters- Oh, you want me to

do it?”

Page 9: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Scenario 4: We told Drupal to make the client look good too!

“I want to brag to everyone how well we are

doing.

Page 10: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

“The Gov’t client wants to archive some of these,

delete the rest once they’re past date!

Scenario 5: With Rules and Views Rules, we told Drupal to meet FISMA requirements

Page 11: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Scenario 6: With Conditional Rules, We told Drupal to save our users tedious work.

“If I create an event tagged as planning, I want

to create a resource at the same time.

if you create an event tagged as seminar, I want to create an article at the

same time

Page 12: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

With Rules, Drupal wasn’t the Boss

Page 13: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

I was the boss!

And I’ll show you how you can be the boss too!

Page 14: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Here’s some Assumptions

You have set up at least one Drupal site You have used the views module You have heard of the rules module

Page 15: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Scenerio 1:how we used Rules to keep the client informed

Page 16: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

“I need my staff to know when someone posts a

resource”

Example of some basic rules construction.

Scenario 1

Page 17: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Using Rules to keep the client informed.

Lets Review the setup

All staff have an account on this Drupal site With emails

All staff have a role in this Drupal site Called, staff member

We have approved text for emails Someone posted a message at X time titled Y

with the body of ZScenario 1

Page 18: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Notify staff members when a resource is posted One Event

Saving new Content One Condition

Content is of Type One Action

Send email to all users of a role

Scenario 1

Page 19: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Notify all staff members when someone posts a resource

Pretty Easy!

Scenario 1

Page 20: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Scenario 2: how we used rules to automate 508 Compliance

Page 21: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

“I need to make sure all images have alt text”

Another example of some basic rules construction.

Scenario 2

Page 22: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Use rules to automate 508 Compliance

Lets Review the setup:

Section 508 compliance Images all need to have alt text for screen

readersUse alt tag function of Image module!

Alt text field can be set on the image field settings on the entity form

May need to be done retroactively What if you have 8,000 nodes? Scenario

2

Page 23: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Automatically create Alt Text for Images based on the node title

A look inside the rule:

Two Events Content is updated Content is saved

One Condition Content is of type

One Action Set a data value

Scenario 2

Page 24: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Use rules to automate 508 Compliance

Here’s the Rule

Scenario 2

Page 25: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Scenario 3:How we put business users in control (and freed up our developers) with VBO!

Page 26: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

“Surprise!I need someone to tag

a whole bunch of nodes as letters- Oh, you want me to

do it?”

Using Rules Components &the Views Bulk Operations Module

Scenario 3

Page 27: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Mass add a value to a term reference field

Let’s talk about components

Component is a part of a rule A recyclable condition set A recyclable action set A rule without a trigger

Components can be triggered by other rules, the scheduler, or by the users

Scenario 3

Page 28: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Mass add a value to a term reference field

Let’s look at the rule:

One Condition Entity has a field

One Action Add item to a list

Add letter to the list of terms on the resource type term reference field

Scenario 3

Page 29: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Here’s the Rule

Scenario 3

Mass add a value to a term reference field

Page 30: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Mass add a value to a term reference field

Let’s talk about VBO:

Views Bulk Operations Add on to rules to let users perform

functions on several entitles at onceVBO is smart

A VBO field can help you apply the right component to the right entity

Scenario 3

Page 31: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Mass add a value to a term reference field

Look at the awesome tool you gave your admins!

Scenario 3

Page 32: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Scenario 4:How we helped the GOV’t Client show off so she can get more funding for her program.

Page 33: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

“I want to brag to everyone how well we are

doing. ”

Using the Views Rules Module

Scenario 4

Page 34: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Mass add a value to a term reference fieldRemember this view?

Scenario 4

Page 35: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

I want to celebrate our 100th resource One Event

Content is viewed Two Conditions

Content is of Type Check the results of a VBO view

Comes with Views Rules Module One Action

Show a message on the site

Scenario 4

Page 36: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Lets loop through it was rule!

Scenario 4

Page 37: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Scenario 5:How we got a site FISMA compliant.

Page 38: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

“The GPO wants to archive some of these,

delete the rest once they’re past date! ”

Using the Views Rules Module: Another example

Scenario 5

Page 39: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Once an event is past, delete it if it’s not archivedLet’s look at the situation:

All Event nodes have a checkbox field to mark it as archivedSome events contain PII and need to deleted from the site.The client wants to be engaged in the process.

Gave them an easy to understand interface Added benefit of ease when passing to next

developer. Scenario 5

Page 40: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Once an event is past, delete it if it’s not archived Two Triggers

Cron Maintenance task are performed No Conditions One Action

Load a VBO view One Loop

Delete all entitles from that loaded VBO view

What a view!

Scenario 5

Page 41: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Once an event is past, delete it if it’s not archived One Trigger

Cron Maintenance task are performed No Conditions One Action

Load that VBO view Comes with Views Rules Module

One Loop Delete all entitles in that VBO view

Scenario 5

Page 42: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Once an event is past, check it to see if it’s archived Two Triggers

Cron Maintenance task are performed No Conditions One Action

Load a VBO view One Loop

Delete all entitles from that loaded VBO view

Lets loop a rule through it!

Scenario 5

Page 43: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Scenerio 6:How we used Conditional Rules to save business users tedious work

Page 44: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

“If you create an event tagged as planning, I

want to create a resource, if you create an event tagged as seminar,

I want to create an article”

Conditional Rules Module in action!

Scenario 6

Page 45: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Creating corresponding content One Trigger

Content is saved One Condition

Content is of type One Action

Conditional with two if statements If event is planning meeting make resource If(else) event is seminar make article

Scenario 6

Page 46: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Creating corresponding content One Trigger

Content is saved One Condition

Content is of type One Action

Conditional with two if statements If event is planning meeting make resource If(else) event is seminar make article

Here’s The Rule

Scenario 6

Page 47: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

”Holy Crapoli! Look at all these reaction

rules!

Use Conditional Rules to cut down on your Reaction Rules

Page 48: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Use Rules with other modules

Workbench Webform

Drupal Commerce Content Access Flag Organic Groups Token Ubercart Voting Twitter Features Context

Message

Page 49: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

In Conclusion

Basic Rules can do a lot out of the box Sent out specialized emails Automatically fill in fields

VBO lets us build great admin views Get Business users into act and save developer time.

Views Rules Module lets you leverage views Act upon number of results in a view Loop through a view and take action

Conditional Rules Module lets you branch out your rules Create complicated logic in one rule Reduce strain on your resources by turning reaction

rules into components and then acting on those components with a conditional rule.

Page 50: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Special Thanks to these folksRules Module:

Wolfgang Ziegler Klaus Purer (fago) (klausi)

Drupal: Because working alone sucks!

Page 51: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Special Thanks to these folks

Views Bulk Operations Module:

Karim Ratib

(INFOJUNKIE)

Drupal: Because working alone sucks!

Page 52: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Special Thanks to these folks

Views Rules Module &Conditional Rules Module

Taihao Zhang (zhangtaihao)

Drupal: Because working alone sucks!

Page 53: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

http://nodeone.se/en/learn-the-rules-framework

Special Thanks to these folks

Rules Tutorials

Johan Falk

(Itangalo)

Drupal: Because working alone sucks!

Page 54: Show your Drupal site who’s the boss! How to take control away from the system and give it back to the users!

Be the boss with Rules!!!

Drink the Kool-Aid, It tastes like Drupal!