Más contenido relacionado
Similar a Drupal 6 my experience (20)
Drupal 6 my experience
- 1. Drupal (6) my experience
W.G. Paseman
2/23/2012
1 © W. G.Paseman 2/23/12
- 2. Agenda
My Experience
Drupal (6) Content Authoring
Web Site 1.0 – Microsoft Frontpage
Edit Hierarchical Document on your computer
Web Site 2.0 – Drupal
CMS (Content Management System) in the cloud
Drupal (6) Site Development
Web Application –SAAS
Choosing a Development Process
Selecting a Host
Deploy
Creating a UI
2 © W. G.Paseman 2/23/12
- 4. Web Site 1.0/Site Example/Frontpage
Word Class Styled Text Menus
Hypertext Links
Three Column Layout
4 © W. G.Paseman 2/23/12
- 6. Web Site 1.0 - Edit a Hierarchical
Document on your computer
Site Example: paseman.com
Multiple users browse a site containing a File System of hyperlinked documents.
Directory Hierarchy maps to Site Structure
Authoring: Frontpage
Provides a “Word – like” WYSIWYG model of Web document.
Generates HTML automatically
Deploys Directories/Files to Host
CLIENT ONLY SOFTWARE
Architecture
Client: Browser(Http(Url))
Transport: html+ css+ javascript+ img + …
<div class="content"><p>Some Content<p></div>
Server: Two Tier Architecture
Tier 1: Web Server - Presentation
Tier 2: File System - Storage
<div class="content"><p>Some Content<p></div>
6 © W. G.Paseman 2/23/12
- 7. Web Site 1.0/Authoring/Issues
Novelty
People don't come back to static Web pages so I need to continually publish new stuff.
Manage Volume
I have more content than fits on my home page
I have more content than I want to display at one time.
e.g. Hermitage displays only 150K items at a time of a 3M item collection
Fixed File hierarchies are a poor organizational principle for large volumes of data
Manage Variety of Structured Data
I have fundamentally different types of content, and I need a checklist for each type to make sure it
is filled in consistently and correctly.
Destinations have location, theme, best times, categories, contact….
Tours are a collection of Destinations…
Products have prices…
Volume and Variety mean I should keep content in a relational (SQL) database.
Manage Workflow
Version Control: I need to update old stuff
Revision Control: I need controlled release of new content (E.g. Weekly issues)
I manage different groups, in different locations, each responsible for a portion of the site.
Workflow is easier to manage in a centralized fashion, so I ought move CMS behavior from
client to the server. This means I ought add a “behavior” tier to the server.
7 © W. G.Paseman 2/23/12
- 8. Web Site 2.0/Site Example/Drupal View
How Drupal uses the SQL database for the reader (user)
What happens if we drill down here?
Slideshow“View”
- Banner
Content Type
- SQL Select &
Sort
Grid “View”
Taxonomy - Destination
- ount of
C Content Type
Product - SQL Select &
Content Types Sort
- SQL Project
8 © W. G.Paseman 2/23/12
- 9. Web Site 2.0/Site Example/Drupal Node
Wysiwyg Stuff
- Embedded Media
- Formatted Text
- Hyperlinks
User Defined Fields
- Acts as Checklist
- Aids Search
- Aids Integration
- Types include
- ext
T
- icture
P
- ocation
L
9 © W. G.Paseman 2/23/12
- 10. Web Site 2.0/Authoring/
Content Management System/Drupal
How Drupal uses the SQL database for the author
What happens if we drill down here?
Navigate content as rows in a Relational DB
Not Files in a File System
Multiple Content Types
Release Management Multiple Authors
10 © W. G.Paseman 2/23/12
- 11. Web Site 2.0/Authoring/Drupal/Node
WYSIWYG Functionality
Code for this editor resides on the server, not the client.
It is accessed by the authors through their browsers.
In my case, the same code is accessed by an author in a
Saratoga living room and an author in a Cebu Cybercafe.
11 © W. G.Paseman 2/23/12
- 13. Web Site 2.0/Authoring/Drupal/
Management
Menus let me create a direct link to this piece of content
from the menus
Vocabularies put Taxonomy system “tags” on the content so I
Can sort content
Can create Drilldowns
Revisions let me record changes I made to the same piece of
content over time.
Authoring information lets me know which author added/
changed the content.
Publishing options let me control content visibility.
File attachments let me associate downloadable files with this
content
Comment settings let me control who (if anyone) can
comment on the content
URL path setting let me create “Frontpage-like” hierarchical
links to the content. E.g. this “node’s” name is
http://pacificseduction.com/node/62, however this
setting let’s me refer to it as
http://pacificseduction.com/Carnaza
13 © W. G.Paseman 2/23/12
- 14. Web Site 2.0/CMS in the cloud
Site Example: pacificseduction.com
1.0 Multiple users browse a site containing a File System of hyperlinked documents.
2.0 Multiple User Types access a Site that frontends a Database of multiple Content types.
Authoring
“Frontpage on Client” becomes “CMS In Cloud”
Permissions + Roles (later)
Architecture
Client: Browser(Http(Url))
Transport: html+ css+ javascript+ img + …
<div class="content"><p>Some Content<p></div>
Server: 3 Tier
Tier 1: Web Server - Presentation
<div class="content"><p>Some Content<p></div>
Tier 2: App Server - Logic
<div class="content"><?php print $content ?></div>
Implements CMS functionality in the cloud
Tier 3: File System is replaced with DB Storage
Hierarchical Database becomes Relational
14 © W. G.Paseman 2/23/12
- 15. Web Site 2.0/Issues
I need more than just Content, I need Engagement
I need to treat different types of users differently
Change what people see depending on their "role".
Need to model users explicitly.
Access Control – role/permissions
I can increase engagement via some standard applications, E.g.
All Users can see content.
Registered Users can comment (comment module) on content.
Paid Users can blog (blog module) and access premium content.
But I would like more behavior…. Add more cloud applications, E.g.
Products have price … and need a shopping cart!
Destinations have price … and need a reservation system.
15 © W. G.Paseman 2/23/12
- 17. Agenda
Procedural (Amateur) vs. Declarative (Expert) Knowledge
20101009_619_BarkadaStores
20110322_620_BarkadaMall_DNAsolutions
20110506_620_resortsmall
20110821_622_internationaltouristboards
20111120_622_pacificseduction
Selecting a Host
Select/Modify your hosting Platform
Choosing a Development Process
Manage How site changes over time.
Deploy
Prep Host
From drupal.org download core or distribution (e.g. opendeals) and Patch locally
From drupal.org Select and Download, Modules
Upload, Configure Site
Enable, Configure Modules
Set Roles and Permissions
Creating a UI
Select/Modify your “theme”
17 © W. G.Paseman 2/23/12
- 18. Selecting a Host/Options
Localhost
Free, but you might get shut down if you open it up.
Shared Server
order.1and1.com - $20/mo (Where I’ve been for a year)
Dedicated Server
People seem to be migrating to to cloud instead
Cloud Server
www.rackspace.com/cloud/cloud_hosting_products $150/mo
linode.com 1536 (barebones) - $60.00
AWS free usage tier - http://aws.amazon.com/free/
www.coursera.org/saas
Drupal optimized Hosts
www.acquia.com/cloud-pricing $169/mo <- support is $100 of this
Omega8.cc $64/mo <- trying Aegir out, but support is “early”
18 © W. G.Paseman 2/23/12
- 19. Selecting a Host/Issues
Resources required
Compare http://drupal.org/requirements
15 Meg disk, Apache 1.3, 2.x. , MySQL 5, php 5.3
To phpinfo on your site choice e.g.
http://blossomdiagnostics.com/phpinfo.php
<?php phpinfo(); ?>
Php.ini
Drupal 6
register_globals = false
memory_limit = 36M
Drupal 7
register_globals = false
memory_limit = 128M
19 © W. G.Paseman 2/23/12
- 20. Choosing a Development Process
Drupal Structure: Their files, your files and a DB
Development Approach
Local + Upload
My Local environment was different from Target
Backup DB, Upload Files (onErr migrate oldfiles + Backup)
Utilize a drupal specific methodology (Aegir)
Site(DB) -> PSV8.0 -> PSV8.0 -> PSV9.0
Platform -> Drupal6.22 -> Drupal6.24 -> Drupal6.24
My Tools
On Host: phpMyAdmin
On Dev machine
Browser + firebug
Cyberduck - ftp
SSH – crontab
Drupal Update
20 © W. G.Paseman 2/23/12
- 22. Deploy/Prep Host
MySQL Administration
Database name : db396153918
User name : dbo396153918
Host name : db396153918.db.1and1.com
Port : 3306
Description : 20120222_624_pacificseduction
Version : MySQL5.0
Password: xxxxx
Domain Administration
pacificseduction.com -> /drupal/20120222_624_pacificseduction
Email Administration
*@pacificseduction.com -> pacificseduction@gmail.com
Create /drupal/keys directory if you are using SSL (must be peer)
22 © W. G.Paseman 2/23/12
- 23. Deploy/Download Core or Distribution, Patch
Download/unzip distribution (or) Drupal core (6.24 or 7.13)
OpenDeals, commerce_kickstart
Rename top directory {root} to mySQL Description String
(e.g. 20120222_624_pacificseduction)
uncomment "RewriteBase /" in {root}/.htaccess
Needed for Clean URLs
Create {root}/php.ini containing
register_globals = off
memory_limit = 96M
Duplicate the {root}/sites/default/default.settings.php file to
{root}/sites/default/settings.php.
“Get Info” and change settings.php permissions to “everyone Read and
write”
23 © W. G.Paseman 2/23/12
- 24. Deploy/Select, Download Modules
Drupal adds behavior via distributions and Modules
14,900 modules – about 11,000 a year ago
Token – Why this isn’t in core, I don’t know…
Cck – Add User Defined Fields
Filefield – Uploadable Files
Imagefield, imagecache, imageapi – Uploadable images
Views – Create Slideshows, Lists, Grids
google_analytics – Track your site via google.com/analytics/
Ubercart – product catalog + shopping cart
Thickbox – lightbox for Products
Add Modules to {root}/sites/all/modules
Follow per module README file instructions
E.g. ubercart_marketplace Place packingslip.itpl in {root}/sites/all/
modules/ubercart/uc_order/templates directory.
24 © W. G.Paseman 2/23/12
- 25. Deploy/Select, Download Modules
My Primary “Function” (Module) “How
To” Resource is “Using Drupal”
Example sites for job postings, product
reviews, wikis, photo galleries, stores,
event management
Addresses multilingual, workflow
Theming - not so much
Other Resources
drupal.org
ubercart.org
youtube
25 © W. G.Paseman 2/23/12
- 26. Deploy/Download Modules
20111120_622_pacificseduction
token captcha Ubercart
cck menu_block thickbox
imageapi nice_menus securepages
imagecache taxonomy_menu uc_coupon
imagefield ubercart_
Pathauto
filefield marketplace
date Gmap, location*
Imce, ckeditor
calendar
admin_menu embed_gmap
jquery_ui
vertical_tabs ad
jquery_update
advanced_help advcontact
libraries
Chart
views Devel*
faq
views_slideshow Skinr
Fb*
Drupad* google_analytics
26 © W. G.Paseman 2/23/12
- 27. Deploy/Upload, Configure Site
All subsequent configuration is done from your url in your browser
Choose profile(done) Open Deals
Choose language(done) English (built-in)
Verify requirements(done)
Set up database(done)
Database name : db396153918
User name : dbo396153918
Database password: xxxxxx
Host name : db396153918.db.1and1.com
Port : 3306
Install profile(done) => Completed 95 of 95. Installed Open Deals module.
Configure site
Site name: pacificseduction.com
Site e-mail address: webmaster pacificseduction.com
Username: webmaster
E-mail address: webmaster@pacificseduction.com
Default country: Philippines
Default time Zone: Asia/Hong Kong
27 © W. G.Paseman 2/23/12
- 28. Deploy/Enable Modules
Modules are enabled
Modules use memory
Modules use CPU
Modules get updated
This modifies your DB
Modules are configured
28 © W. G.Paseman 2/23/12
- 30. Quiz
How many lines of custom php code are in Pacific Seduction?
30 © W. G.Paseman 2/23/12
- 32. Creating a UI
This is “A Whole Nother presentation”, but to start
/admin/build/themes/settings/global
Upload logo image: gsmlogo2_80.jpg
Upload icon image: PacificSeduction_favicon.ico
Note: need to clear cache to see new icon
admin/build/block
move “Powered by Drupal” to “disabled”
32 © W. G.Paseman 2/23/12
- 33. Summary
My Experience
Drupal (6) Content Authoring
Web Site 1.0 – Microsoft Frontpage
Edit Hierarchical Document on your computer
Web Site 2.0 – Drupal
CMS (Content Management System) in the cloud
Drupal (6) Site Development
Web Application –SAAS
Choosing a Development Process
Selecting a Host
Deploy
Creating a UI
33 © W. G.Paseman 2/23/12
Notas del editor
- Redundancy: Keep content in one place and refer to it from other places.