Drupal 7 install with modules and themes

Embed Size (px)

Citation preview

  • 1.
    • Drupal Content Management System - Installation
    • YIPL Dev Team 25 October 2011

2. Agenda

  • Download and install Drupal

3. Add some nodes (Article/page) 4. Install Drupal modules 5. User permissions overview 6. Configurations in Drupal introduction 7. Install and change Drupal theme and settings 8. To do ;) 9.

  • Download Drupal Drupal.org
  • Download Drupal fromhttp://Drupal.org/download

10. Save the file

  • Save the file

11. Extract at web root, generally /var/www in ubuntu linux (or user specific settings like /home/user-name/public_html) 12. Tar -zxvf drupal-7.x.tar.gz 13. Rename extracted dir to desired name (project name assume d7-tutorial) 14. Or do drush dl on /var/www 15. Create a user and database

  • Go tohttp://localhost/phpmyadmin(assumed mysql and phpmyadmin installed)

16. Login if necessary (preferably as root) 17. Go to Previllages tab 18. Click Add a new user with given settings. 19. Create user and database 2 Remember username and password, username and db name are same. 20. Install Drupal

  • http://localhost/d7-tutorial

21. Install Drupal 2 22. Install Drupal 3 (Linux settings)

  • Create a files directory at /sites/default/files

23. Give the files directory 777 permission 24. Copy default.settings.php to settings.php in /sites/default 25. Give the settings.php file 777 permission 26. How?? see next slide 27. Linux Permission for Drupal 7

  • Remember to remove write permission from settings.php after installation (755 is ok).

28. Install Drupal 4 29. Install Drupal 5 30. Install Drupal 6 31. Install Drupal 7 32. Drupal Installed 33. Drupal 7 First Glimpse 34. First Node in Drupal 7

  • This overlay appears after you click on the content link on the top left corner.

35. Add a basic page in Drupal 7 36. Adding a basic page in Drupal 7

  • Enter the title and body for the page.

37. Node submission settings

  • Edit needed submission settings (demo shows menu settings)

38. Select Menu, Lighter weights float above. 39. Page Created 40. Homepage selection Drupal 7

  • Configuration>>Site Information (under System)

41. Scroll to front page section. 42. Solve 2 home links

  • Structure >> Menus

43. Click link shown below (we choose Main Menu when creating the node) 44. Deleting extra home

  • The extra home link was created when creating basic page node (nid 1).

45. Confirm in next overlay after clicking appropriate delete. 46. Double home link solved 47. Some Drupal Fundas

  • Most things are configurable (from UI itself).

48. Custom code is generally not required. 49. Practice things well so you know where the configuration are located. 50. Example: to configure homepage go to Configurations>>Site information 51. Menus are at - Structure>>Menus 52. To do About Us Page

  • Create About Us page which is similar to the page just created.

53. Should also have a link About Us besides home. 54. Should have a path /about-us 55. After creating the page, the website should look like: 56. After About Us Page

  • Notice the URL as well.

57. Things learned on the way

  • Text Format: Filtered HTML

58. Menu Description appears on mouse over on the menu link. 59. Comments can be open or closed on a per node basis. 60. Nodes can be authored by and on (time) when creating or editing. 61. Nodes can be unpublished as well. 62. Things learned on the way

  • Drupal provides 2 content types by default
  • Basic Page

63. Article Menu items are sorted as per weight (lighter appear first 1 appears before 2) 64. Main menu is by default placed in Main Links - earlier called Primary Links 65. Recipe: Brochure site

  • Has some pages.

66. News with pictures (will be dealt later cck and views) 67. Contact Us page. 68. An attractive looking theme ;) 69. A well structured homepage (for later - panels) 70. Turn on Drupal core modules

  • For now only Contact Module, how?

71. Module>>Check required Module(s) 72. Scroll down, click Save Configurations 73. Use drush to enable module

  • Drush en

74. can be module or theme 75. taken from d.o URL or core module/theme. 76. Http://drupal.org/project/views=> drush dl views; drush en views 77. Example: drush en contact 78. After enabling contact

  • Try http://localhost/d7-tutorial/contact

79. Add Contact Us link

  • Add a link Contact Us besides About Us in the main menu.

80. Should look like below: 81. Permission Problem

  • The admin (uid 1) sees the website as above slide but.

82. The visitor (anonymous user) sees the website as: 83. Permission Problem 2

  • Module is turned on but not configured as per the user types (roles in Drupal)

84. Go to People>> Permissions Tab 85. Check Use the site-wide contact form then scroll down and click Save Permissions. 86. Permission problem solved

  • Now Anonymous User can see contact form and send message from it.

87. Things to consider

  • Turning on modules is not enough, take note of permissions as per user role(s).

88. User roles are dependent on scale and size of the project. 89. Be very careful of what permissions are granted to which user roles. 90. Drupal saves much of the content and configurations (including permissions) in the database. 91. Lets change the theme

  • Theme defines the look and feel of the website.

92. It can be changed as and when needed. 93. How?? ==> Appearance 94. Lets change the theme 2

  • Appearance/Themes has 3 sections
  • Enabled Themes

95. Disabled Themes 96. Administration Themes For now to change the theme to Seven Click Set Default link under Seven 7.8 97. Homepage in theme Seven 98. Things to consider - theme

  • When theme is changed blocks are placed arbitrarily.

99. Block settings Structure >> Blocks should be set again. 100. Make sure the new layout and theme incorporates elements of current theme. 101. Take care of the logo and fav icon as well. 102. Take note of rendered HTML (SEO) 103. Change logo in theme

  • Switch back to Bartik 7.8 theme.

104. Change the logo. 105. Changed Logo on homepage 106. To do

  • Monkey around with all the settings.

107. Practice to know what is where. 108. Add some more content (pages and articles) 109. Experiment with text format and node settings. 110. Install a new contributed module (cck and views) and a contributed theme (corporate clean) 111. Practice drush and command line things. 112. To do 2

  • Study about Content Types, CCK, Views

113. Other modules like Token, Path auto 114. Check out backup and migrate module.