Presentation is loading. Please wait.

Presentation is loading. Please wait.

Drupal Jumpstart Information Systems 337 Prof. Harry Plantinga.

Similar presentations


Presentation on theme: "Drupal Jumpstart Information Systems 337 Prof. Harry Plantinga."— Presentation transcript:

1 Drupal Jumpstart Information Systems 337 Prof. Harry Plantinga

2 Lab 5 Debrief Understand HTTP? Understand HTTP? Difference between GET and POST for forms action? Difference between GET and POST for forms action? Did any crawler visit your site? Implications? Did any crawler visit your site? Implications? Cookies – how to set with element? Cookies – how to set with element?

3 Lab 6—Drupal Jumpstart In Lab 6 you'll be installing and configuring PHP, MySQL, and Drupal In Lab 6 you'll be installing and configuring PHP, MySQL, and Drupal Most remaining labs – continue to configure your Drupal website. Most remaining labs – continue to configure your Drupal website. We'll have two website running on systems lab servers: We'll have two website running on systems lab servers: yourID-dev.calvincs.com yourID-dev.calvincs.com yourID-lab.calvincs.com yourID-lab.calvincs.com A few things you'll need to know… A few things you'll need to know…

4 PHP What is PHP? What is PHP? If PHP is not already installed, you'll be installing it on your server If PHP is not already installed, you'll be installing it on your server Packages Packages Php5, php5-cli, php5-mysql Php5, php5-cli, php5-mysql

5 MySQL Open-source, free Database server Open-source, free Database server Most popular database server, especially for websites Most popular database server, especially for websites Your website will connect to MySQL, store all its data there Your website will connect to MySQL, store all its data there You'll need to issue some common commands You'll need to issue some common commands Create databases Create databases Create logins with appropriate privileges Create logins with appropriate privileges Make backups Make backups mysqldump -u login –p databasename > filename.sql mysqldump -u login –p databasename > filename.sql

6 Installing Drupal How to download and install files in Linux? How to download and install files in Linux? apt-get, etc apt-get, etc Download, unpack, install manually Download, unpack, install manually wget, tar, mv wget, tar, mv How to see or move files like ".htaccess"? How to see or move files like ".htaccess"? Who should own the files of your website? Why? Who should own the files of your website? Why? How to change the owner of a file? How to change the owner of a file?

7 How… …would you design a content management system? …would you design a content management system? What does it have to do? What does it have to do? How to install modules, themes? How to install modules, themes?

8 Drupal File Layout Drupal file layout Drupal file layout index.php index.php modules modules themes themes sites sites sites/prepsoccer.org/settings.php sites/prepsoccer.org/settings.php sites/all/themes sites/all/themes sites/all/modules sites/all/modules How does drupal get "started" when you access a server, e.g. prepsoccer.org? How does drupal get "started" when you access a server, e.g. prepsoccer.org? What directory should all of this stuff go in? What directory should all of this stuff go in?

9 Themes How to select a theme? How to select a theme? Layout you want (columns, menus, slogan, etc) Layout you want (columns, menus, slogan, etc) Menu structure you want Menu structure you want Version compatible Version compatible Fixed vs. liquid Fixed vs. liquid Install Install Configure Configure Make it default (only?) Make it default (only?)

10 Installing a Theme How? How?

11 Virtual Hosts Can configure multiple domain names to refer to the same IP address Can configure multiple domain names to refer to the same IP address Web requests arrive with hostname in header Web requests arrive with hostname in header Your server can run different sites for different hostnames (/etc/apache2/sites-enabled) Your server can run different sites for different hostnames (/etc/apache2/sites-enabled) Configure drupal for multiple sites (/var/www/sites) Configure drupal for multiple sites (/var/www/sites) Can optionally share filesystem, database Can optionally share filesystem, database We'll run two per student on the system lab servers: We'll run two per student on the system lab servers: yourlogin-dev.calvincs.com yourlogin-dev.calvincs.com yourlogin-lab.calvincs.com yourlogin-lab.calvincs.com

12 More Tidbits (Lab 7) Hostname, /etc/hostname Hostname, /etc/hostname Mail service, postfix Mail service, postfix PHP memory requirements PHP memory requirements Cron, crontab Cron, crontab See /etc/crontab, cron.hourly, cron.daily, etc See /etc/crontab, cron.hourly, cron.daily, etc Edit with sudo crontab –e Edit with sudo crontab –e Add something like this: Add something like this: 7 * * * * /usr/bin/wget http://yoursite.com/cron.php

13 Drupal Overview Themes Themes Modules Modules Menus Menus Blocks Blocks Content types Content types Roles Roles

14 Modules What do you use modules for? What do you use modules for? How to find, select? How to find, select? How, where to install? How, where to install? Configuration Configuration Effects on performance, usability Effects on performance, usability

15 Menus Primary Primary e.g. Home, Standings, Forum, Store e.g. Home, Standings, Forum, Store Typically top of the page Typically top of the page My be hierarchical My be hierarchical Secondary Secondary e.g. About, Contact us, Log out, Terms of Service, Privacy Policy e.g. About, Contact us, Log out, Terms of Service, Privacy Policy Navigation Navigation All of the tasks you can do All of the tasks you can do May not be displayed for unauthenticated users May not be displayed for unauthenticated users Configuration Configuration Set location, visibility in theme (or blocks) Set location, visibility in theme (or blocks)

16 Blocks Modules present their information as 'blocks' Modules present their information as 'blocks' You configure what blocks go where, on which pages You configure what blocks go where, on which pages This is the primary means of configuring the functionality of your website This is the primary means of configuring the functionality of your website

17 Users Creating logins Creating logins User Settings User Settings Registration options Registration options Text of emails that Drupal sends Text of emails that Drupal sends Signature, picture support Signature, picture support Profiles Profiles Each user has a profile page Each user has a profile page Use the Profile module to customize contents Use the Profile module to customize contents

18 Roles For PrepSoccer.org: For PrepSoccer.org: administrator (can do everything) administrator (can do everything) team manager (can update scores and schedule, add games, post photos, stories and comments) team manager (can update scores and schedule, add games, post photos, stories and comments) authenticated user (can post photos, stories, and comments) authenticated user (can post photos, stories, and comments) unauthenticated user (can read anything and change nothing) unauthenticated user (can read anything and change nothing) In Drupal In Drupal Configure with User Management -> Roles, Permissions Configure with User Management -> Roles, Permissions

19 What if site is down? Debugging is a key skill… Debugging is a key skill… How to debug your site? How to debug your site? What part is malfunctioning? What part is malfunctioning? Is server running and connected to the Internet? Is server running and connected to the Internet? Is webserver running? Is webserver running? Is database server running? Is database server running? Web server logs are your friends Web server logs are your friends /var/log/apache2 /var/log/apache2

20 Content Types Create a content type for every type of 'thing' on your website (blog post, story, newsletter, photograph, calendar entry, bulletin, team, game result, …) Create a content type for every type of 'thing' on your website (blog post, story, newsletter, photograph, calendar entry, bulletin, team, game result, …) Add and configure custom content types Add and configure custom content types Add custom ways for displaying content types Add custom ways for displaying content types To add content, use Create Content -> … To add content, use Create Content -> …

21 Adding Content Types Default content types Default content types Page : Intended for static content such as “About Us” Page : Intended for static content such as “About Us” Story : Intended for content that will be frequently posted, such as news articles Story : Intended for content that will be frequently posted, such as news articles You can add content types in various ways You can add content types in various ways Add a module, e.g. Blog, that adds a content type Add a module, e.g. Blog, that adds a content type Create your own custom content types Create your own custom content types

22 When should I use Story vs. Blog? Blog module adds Blog module adds “blog” content type “blog” content type overview of all blog posts at /blog overview of all blog posts at /blog overview of each blogger’s posts at /blog/3 overview of each blogger’s posts at /blog/3 links at the bottom of each blog post to the author’s other blog posts links at the bottom of each blog post to the author’s other blog posts filtered RSS feed for blogger’s posts filtered RSS feed for blogger’s posts a private “my blog” link in the navigation menu for each user who has permission to create blog posts a private “my blog” link in the navigation menu for each user who has permission to create blog posts

23 Stories We want users who don’t know HTML to be able to add game stories, event updates, etc We want users who don’t know HTML to be able to add game stories, event updates, etc Install FCKeditor Install FCKeditorFCKeditor We want to be able to include images in the game stories We want to be able to include images in the game stories Install IMCE Install IMCEIMCE

24 Comments Users (with permission) can add comments to pages Users (with permission) can add comments to pages Spam vs. Ham? Spam vs. Ham? Mollom Mollom Auto-delete spam identified by stats of millions of other blots’ content Auto-delete spam identified by stats of millions of other blots’ content Also blocks spam in contact form, nodes, user registration forms, etc. Also blocks spam in contact form, nodes, user registration forms, etc. Displays captcha in questionable cases Displays captcha in questionable cases Can also delete low-quality, abusive content (flames) Can also delete low-quality, abusive content (flames)

25

26


Download ppt "Drupal Jumpstart Information Systems 337 Prof. Harry Plantinga."

Similar presentations


Ads by Google