72
Drupal and the CMS Project

Drupal and the CMS Project

  • Upload
    amalie

  • View
    40

  • Download
    0

Embed Size (px)

DESCRIPTION

Drupal and the CMS Project. Lesson Learned #1. Keep your modules updated, especially when there are security concerns in the update notes. Update Status Email. - PowerPoint PPT Presentation

Citation preview

Page 1: Drupal and  the  CMS Project

Drupal and the CMS Project

Page 2: Drupal and  the  CMS Project

Lesson Learned #1• Keep your modules updated, especially

when there are security concerns in the update notes

2010 | The Sky’s the Limit

Page 3: Drupal and  the  CMS Project

• From: <[email protected]>Date: Thu, Dec 2, 2010 at 3:39 PMSubject: New release(s) available for <Your Site Name>To: [email protected]

There are security updates available for one or more of your modules or themes. To ensure the security of your server, you should update immediately!

See the available updates page for more information:http://www.yoursite.com/admin/reports/updates

2010 | The Sky’s the Limit

Update Status Email

Page 4: Drupal and  the  CMS Project

Update Status Report

2010 | The Sky’s the Limit

Page 5: Drupal and  the  CMS Project

Lesson Learned #2• Set up a cron job or Windows

scheduled task to hit cron.php on your Drupal installation at regular intervals

• Usually every hour

2010 | The Sky’s the Limit

Page 6: Drupal and  the  CMS Project

The Drupal /sites folder• When you install Drupal, the /sites folder contains

2 directories, “all” and “default”

• You can host additional sites by making new directories in the /sites folder with the name of the site and copying the settings.php file there from the default directory

– For instance, /sites/krisbase.com

2010 | The Sky’s the Limit

Page 7: Drupal and  the  CMS Project

The Drupal /sites folder• Modules and themes you want available to every

site go in the /sites/all/modules and /sites/all/themes folders

• Modules you only want available to a specific site go in that site’s modules and themes folders– ex. /sites/krisbase.com/modules

2010 | The Sky’s the Limit

Page 8: Drupal and  the  CMS Project

2010 | The Sky’s the Limit

Page 9: Drupal and  the  CMS Project

Lesson Learned #3• Don’t modify the Drupal Core files

• (Don’t touch anything outside of the /sites directory)

2010 | The Sky’s the Limit

Page 10: Drupal and  the  CMS Project

2010 | The Sky’s the Limit

Page 11: Drupal and  the  CMS Project

The End of the Road

2010 | The Sky’s the Limit

Page 12: Drupal and  the  CMS Project

Hooks in Drupal• foo_bar()

– “foo” is the name of the module– “bar” is the name of the hook

• uwblogs_block()

2010 | The Sky’s the Limit

Page 13: Drupal and  the  CMS Project

Theme Developer Module

2010 | The Sky’s the Limit

Page 14: Drupal and  the  CMS Project

2010 | The Sky’s the Limit

Page 15: Drupal and  the  CMS Project

2010 | The Sky’s the Limit

Page 16: Drupal and  the  CMS Project

Lesson Learned #4• There is a module for that!

• Most common needs already have one or more modules built to address them

2010 | The Sky’s the Limit

Page 17: Drupal and  the  CMS Project

Drupal Inline Image Solutions• Linodef + • Linodef Taglists + • Linodef WYSIWYG + • WYSIWYG

2010 | The Sky’s the Limit

Page 18: Drupal and  the  CMS Project

Drupal Inline Image Solutions• Image + • Image Assist + • WYSIWYG + • TinyMCE

2010 | The Sky’s the Limit

Page 19: Drupal and  the  CMS Project

Drupal Inline Image Solutions• Imagefield + • Imagefield Assist + • Imagecache

2010 | The Sky’s the Limit

Page 20: Drupal and  the  CMS Project

Drupal Inline Image Solutions• Imagebrowser (v1) + • Image + • ImageCache + • FCKEditor

2010 | The Sky’s the Limit

Page 21: Drupal and  the  CMS Project

Drupal Inline Image Solutions• Imagebrowser (v2) + • WYSIWYG + • ImageCache + • Views

2010 | The Sky’s the Limit

Page 22: Drupal and  the  CMS Project

Drupal Inline Image Solutions• Inline

2010 | The Sky’s the Limit

Page 23: Drupal and  the  CMS Project

Drupal Inline Image Solutions• Insert + • WYSIWYG + • ImageField + • ImageCache

2010 | The Sky’s the Limit

Page 24: Drupal and  the  CMS Project

Drupal Inline Image Solutions• Media + • Styles + • WYSIWYG + • CKEditor

2010 | The Sky’s the Limit

Page 25: Drupal and  the  CMS Project

Drupal Inline Image Solutions• Nodereference Explorer, + • Insert + • WYSIWYG

2010 | The Sky’s the Limit

Page 26: Drupal and  the  CMS Project

Drupal Inline Image Solutions• Prosepoint Modules

2010 | The Sky’s the Limit

Page 27: Drupal and  the  CMS Project

Drupal Inline Image Solutions• WYSIWYG + • CKEditor (js) + • WYSIWYG Image Upload

2010 | The Sky’s the Limit

Page 28: Drupal and  the  CMS Project

Drupal Inline Image Solutions• WYSIWYG + • CKEditor (js) + • CKFinder

2010 | The Sky’s the Limit

Page 29: Drupal and  the  CMS Project

Drupal Inline Image Solutions

2010 | The Sky’s the Limit

Page 30: Drupal and  the  CMS Project

2010 | The Sky’s the Limit

Page 31: Drupal and  the  CMS Project

2010 | The Sky’s the Limit

Page 32: Drupal and  the  CMS Project

Module Description

2010 | The Sky’s the Limit

Page 33: Drupal and  the  CMS Project

2010 | The Sky’s the Limit

Page 34: Drupal and  the  CMS Project

Bug and Issue Queues

2010 | The Sky’s the Limit

Page 35: Drupal and  the  CMS Project

2010 | The Sky’s the Limit

Page 36: Drupal and  the  CMS Project

Project Information (good)

2010 | The Sky’s the Limit

Page 37: Drupal and  the  CMS Project

Project Information (yikes!)

2010 | The Sky’s the Limit

Page 38: Drupal and  the  CMS Project

Sometimes modules don’t play nicely together

2010 | The Sky’s the Limit

Page 39: Drupal and  the  CMS Project

Now what?

2010 | The Sky’s the Limit

Page 40: Drupal and  the  CMS Project

Lesson Learned #5

• Contributed modules go in the /sites/all/modules folder

• or /sites/<sitename>/modules

• not in /modules folder with the core modules that ship with Drupal

2010 | The Sky’s the Limit

Page 41: Drupal and  the  CMS Project

Enabling Modules with Drush• Navigate to one of your Drupal sites in the shell

• drush dl <module_name> downloads the most recent production version of the module

• drush en <module_name> enables it

• You can also disable modules with drush, which is handy if you have a WSOD and can’t access your admin menu

2010 | The Sky’s the Limit

Page 42: Drupal and  the  CMS Project

Drush .make Files

2010 | The Sky’s the Limit

Page 43: Drupal and  the  CMS Project

Drupal Commons

2010 | The Sky’s the Limit

Page 44: Drupal and  the  CMS Project

Managing News

2010 | The Sky’s the Limit

Page 45: Drupal and  the  CMS Project

Open Atrium

2010 | The Sky’s the Limit

Page 46: Drupal and  the  CMS Project

Blog Requirements• Bloggers should be able to tag their posts

– Should be simple using the Drupal Taxonomy module

– Tags should have auto-complete functionality and bloggers should only see the suggestions that they previously entered

• Blogs should share some taxonomies

2010 | The Sky’s the Limit

Page 47: Drupal and  the  CMS Project

Blog Requirements• Bloggers should be able to use a

WYSIWYG editor so they can style their posts without HTML knowledge

• Bloggers should be able to upload photos and place them where they want in their posts

2010 | The Sky’s the Limit

Page 48: Drupal and  the  CMS Project

Blog Requirements• Users should be allowed to comment on

blog posts if the blogger allows it

• Users should be able to login with CAS

• The Blogger’s real name should appear beside their posts, not their username

2010 | The Sky’s the Limit

Page 49: Drupal and  the  CMS Project

Blog Requirements• The blog must meet accessibility standards

• Blog owners should be allowed to customize their banner image

• Blog owners should be able to add pages to their blogs (ex. About Us)

2010 | The Sky’s the Limit

Page 50: Drupal and  the  CMS Project

Blog Requirements• Blogs should be allowed to have more

than one blogger

– For instance a blog for a research lab may have several people posting to it

– The blog owner should have the ability to moderate these posts

2010 | The Sky’s the Limit

Page 51: Drupal and  the  CMS Project

Approach #1Drupal Core Blog Module

• Drupal ships with a module that is described as a “multi user blog”– Each user can create a blog under their own

username

– A block is created that shows recent blog posts

– The Blog content type can be extended to meet some of the requirements that are not met

2010 | The Sky’s the Limit

Page 52: Drupal and  the  CMS Project

Approach #1Drupal Core Blog Module

• It only provides one blog per user

• It doesn’t meet our requirements, let’s try something else…

2010 | The Sky’s the Limit

Page 53: Drupal and  the  CMS Project

Approach #2Organic Groups

• Allows users to create and manage groups that can have subscribers

• Each group can have more than one moderator

• Each group can have a different theme

• Blog posts can be tied to organic groups

2010 | The Sky’s the Limit

Page 54: Drupal and  the  CMS Project

Approach #2Organic Groups

2010 | The Sky’s the Limit

Page 55: Drupal and  the  CMS Project

Approach #2Organic Groups

2010 | The Sky’s the Limit

Page 56: Drupal and  the  CMS Project

Approach #2Organic Groups

2010 | The Sky’s the Limit

Page 57: Drupal and  the  CMS Project

Approach #3: Custom Content Types and Node Relationships

• Content Construction Kit

• Lets you extend nodes with custom fields– Text, Links– File and image uploads– Links to taxonomies– And much more!

2010 | The Sky’s the Limit

Page 58: Drupal and  the  CMS Project

Approach #3: Custom Content Types and Node Relationships

• We will make 2 custom content types– Blogs and Blog Posts

– Blogs are tied to the users who are allowed to post to them with a User Reference field

– Blog Posts are tied to Blogs with a Node Reference field

2010 | The Sky’s the Limit

Page 59: Drupal and  the  CMS Project

Approach #3: Custom Content Types and Node Relationships

2010 | The Sky’s the Limit

Page 60: Drupal and  the  CMS Project

Approach #3: Custom Content Types and Node Relationships

2010 | The Sky’s the Limit

Page 61: Drupal and  the  CMS Project

Lesson Learned #6• Internet Explorer freaks out if you link

to more than 31 CSS files!

2010 | The Sky’s the Limit

Page 62: Drupal and  the  CMS Project

Approach #3: Custom Content Types and Node Relationships

2010 | The Sky’s the Limit

Page 63: Drupal and  the  CMS Project

Approach #3: Custom Content Types and Node Relationships

2010 | The Sky’s the Limit

Page 64: Drupal and  the  CMS Project

Lesson Learned #7• If the changes you make aren’t

appearing, be sure to clear your Drupal cache

• (and possibly the browser cache as well)

2010 | The Sky’s the Limit

Page 65: Drupal and  the  CMS Project

Approach #3: Custom Content Types and Node Relationships

For a specific post:• http://blogs.uwaterloo.ca/kris-blog/2010/12/17/my-blog-post-name

For all posts in December:• http://blogs.uwaterloo.ca/kris-blog/2010/12

For all posts in 2010:• http://blogs.uwaterloo.ca/kris-blog/2010

2010 | The Sky’s the Limit

Page 66: Drupal and  the  CMS Project

Approach #3: Custom Content Types and Node Relationships

2010 | The Sky’s the Limit

Page 67: Drupal and  the  CMS Project

Approach #3: Custom Content Types and Node Relationships

2010 | The Sky’s the Limit

Page 68: Drupal and  the  CMS Project

Approach #3: Custom Content Types and Node Relationships

2010 | The Sky’s the Limit

Page 69: Drupal and  the  CMS Project

Approach #3: Custom Content Types and Node Relationships

2010 | The Sky’s the Limit

Page 70: Drupal and  the  CMS Project

Approach #3: Custom Content Types and Node Relationships

2010 | The Sky’s the Limit

Page 71: Drupal and  the  CMS Project

Approach #3: Custom Content Types and Node Relationships

2010 | The Sky’s the Limit

Page 72: Drupal and  the  CMS Project

Conclusion• Contributed modules will often get you

90% of the way there, but that last 10% can be a killer

• It is worth the effort to use Drupal so we can get our content into one place and do fine grained searches on it

2010 | The Sky’s the Limit