Beginning the Drupal Version 22/12/2009 by AZ Multisite? YES NO Installation of 6.X or 7.X-dev Local or/and online GENERAL CONCEPTS Beginning the Drupal THE 11 COMMANDMENTS GENERAL ADVERTISSEMENTS Security Update REAL STARTING OF DRUPAL FOR CREATING CONTENT Multisite? YES Installation of 6.X or 7.X-dev Beginning the Drupal NO Please follow another tutorial for the installation of Drupal locally or/and online. See for example the file drupalunderfree.doc GENERAL CONCEPTS THE 11 COMMANDMENTS GENERAL ADVERTISSEMENTS Security Update REAL STARTING OF DRUPAL FOR CREATING CONTENT Installation of 6.X or 7.X-dev Multisite? YES Beginning the Drupal NO If interested in local multisite installation on windows system, please follow Labs.1 of this tutorial. GENERAL CONCEPTS THE 11 COMMANDMENTS GENERAL ADVERTISSEMENTS Security Update REAL STARTING OF DRUPAL FOR CREATING CONTENT Multisite? YES Installation of 6.X or 7.X-dev Beginning the Drupal NO GENERAL CONCEPTS To learn some elementary jargons: see the General concepts slides of this tutorial THE 11 COMMANDMENTS GENERAL ADVERTISSEMENTS Security Update REAL STARTING OF DRUPAL FOR CREATING CONTENT Multisite? YES Installation of 6.X or 7.X-dev NO GENERAL CONCEPTS The 11 Most Important Things To Do Beginning After You Install Drupal. the Drupal Refer to corresponding section. THE 11 COMMANDMENTS GENERAL ADVERTISSEMENTS Bonus: Also includes Labs.2 giving the usual steps for installing contributed modules to Security Update Drupal. REAL STARTING OF DRUPAL FOR CREATING CONTENT Multisite? YES Installation of 6.X or 7.X-dev Beginning the Drupal NO You have to be aware of several points before starting working with Drupal: see the general advertissements given in the drupal documentation. Also do not forget to update Drupal if needed (alerts). These points are not detailed in the following slides. GENERAL CONCEPTS THE 11 COMMANDMENTS GENERAL ADVERTISSEMENTS Security Update REAL STARTING OF DRUPAL FOR CREATING CONTENT Multisite? YES Installation of 6.X or 7.X-dev Beginning the Drupal NO GENERAL CONCEPTS THE 11 COMMANDMENTS GENERAL ADVERTISSEMENTS Then you can really start using Drupal. To do that fine, a set of lessons will be the subject of further tutorial… Security Update REAL STARTING OF DRUPAL FOR CREATING CONTENT LABS.1 MULTI-SITE ON WINDOWS Labs. 1 Multi-site on Windows • Step1. Set up Drupal as usual 4 sub-steps: A-INSTALL Latest release of WampServer 2.0i [07/11/09] Includes : - Apache 2.2.11 - MySQL 5.1.36 - PHP 5.3.0 http://www.wampserver.com/en/ http://drupal.org/node/288126 Labs. 1 Multi-site on Windows B-Open PhpAdmin, Create a new database -- we'll call it drupal7 because this will be our base installation which we will leave untouched. While you're here create a second and third database, which we'll call site2 and site3. You can also change the database privileges if you want, but to keep things simple here, we'll stick with the default user root and no password for these tutorial. Labs. 1 Multi-site on Windows • C-Download Drupal x into WampServer's wamp/www folder Labs. 1 Multi-site on Windows D-Do your first Drupal installation by pointing your browser to your Drupal folder, which should be something like http://localhost/drupal-7.x-dev. Enter the site1 database and user settings (root, no password). Complete the installation. Step2.Prepare the files for your new multi-sites • A-Find Drupal's sites folder, make a copy of the default folder and rename it to the URL you want for your first test site. To keep it simple, we'll make it the same as the first test site database: site2. While you're here, create files, tmp and themes sub-folders within this new folder. The themes sub-folder will be used for any custom theme you create specifically for this site. Similarly, you can create a modules sub-folder for any module you use only with this site. However, generally, I find it easier to keep all contributed modules together in the sites/all/modules folder so I can use them with all my test sites. Labs. 1 Multi-site on Windows B- Use a text editor to open the settings.php file in your new site2 folder and change $db_url line to reflect your first test site database, and the database user name and password, eg: mysql://username:password@localhost/site2 Also, change the $base_url to the above site URL, eg: $base_url = 'http://site2'; // NO trailing slash! Labs. 1 Multi-site on Windows C-Repeat the above 2 sub-steps (A,B) for the other test site (site3) Step3. Adjust windows so it can find the new site at a new made-up name • Find the Windows hosts file, which should be in Windows' System32/drivers/etc folder, make a backup of that file and then open the hosts file in a text editor. Here, add new lines mapping your localhost IP address to match the URLs of your test sites and your original Drupal site. In our example, it would look like this: 127.0.0.1 localhost 127.0.0.1 site2 127.0.0.1 site3 127.0.0.1 drupal7 Step4. Adjust Apache so it responds to requests for the new names A-Find the Apache httpd.conf file which, in WampServer, should be in the wamp/bin/ApacheX.X/conf folder (where X.X is the Apache version number). make sure the "Virtual hosts" line is active by removing the # before Include conf/extra/httpd-vhosts.conf. B-Make a backup of that httpd-vhosts.conf file (which is in Apache's conf/extra folder), then open httpd-vhosts.conf with a text editor and add these lines: <VirtualHost *:80> DocumentRoot D/wamp/www/drupal-7.x-dev ServerName site2 </VirtualHost> where C:/wamp/www/drupal-6.x is the path to the Drupal installation folder and site1 is the URL for your first test site. Add another entry for your other test site, another entry for your original Drupal installation and another entry for WampServer's localhost URL (if you want to keep this active), eg: <VirtualHost *:80> DocumentRoot D:/wamp/www/drupal-7.x-dev ServerName site3 </VirtualHost> <VirtualHost *:80> DocumentRoot D:/wamp/www/drupal-7.x-dev ServerName drupal7 </VirtualHost> <VirtualHost *:80> DocumentRoot D:/wamp/www ServerName localhost </VirtualHost> Labs. 1 Multi-site on Windows C-Restart Apache for the changes to take effect. With WampServer, this is done by selecting the WampServer icon in the system tray and then "Restart all services". Step5. Launching brower • Now you're ready to install each Drupal test site using your browser, eg: http://site2/install.php http://site3/install.php And that's it! You can access your two test sites anytime WampServer is running by using the http://site1 and http://site1 URLs. And the first created is available at http://drupal7/ Labs. 1 Multi-site on Windows • If you mess up with, say, site1, just delete the site1 folder, the site1 database in phpMyAdmin and the site1 entries in the Windows hosts and Apache httpd-vhosts.conf files and start again Tada! GENERAL CONCEPTS General concepts (1) • A module is software (code) that extends Drupal features and/or functionality: – Core modules – (downloaded) Contributed modules – creating own modules (advanced) 26 General concepts (2) • User : Every visitor to your site, logged in or not (anonym): – Anonymous users have a user ID of 0 – The user with user ID 1 is special, it corresponds to user account created when you install Drupal: that user has permission to do absolutely eveything on the site. – Other users on your site can be assigned permissions via roles. special built-in roles: "anonymous user” and "authenticated user" / new roles: create a role 27 General concepts (3) • A node : each item of content is called a node – Pages in books – Discussion topics in forums – Entries in blogs –… • Note that each node belongs to a Content Type. (type de contenu) 28 Screenshot: Types de contenu 29 Basic Content types associated with core Drupal modules • • • • • • • Blog Entry A Blog (short for weblog) is an online journal or diary, and the core Blog module allows registered users on your site to create their own blogs. Each entry in a user blog has content type Blog Entry. Book Page Book pages are designed to be part of a collaborative book, enabled by the core Book module. Forum A Forum node defines a topic for a forum discussion; people can reply to the topic by using comments. Forum nodes are organized into subject areas via a Taxonomy (list of categories). Page The Page content type is enabled in Drupal in the default installation profile. Typically Pages are used for static content that can (but are not required to) be linked into the main navigation bar. Poll A poll is where a multiple choice question is asked, and users can answer and see other people's answers to questions. Story The Story content type is enabled in Drupal in the default installation profile. Stories are generally used for information whose relevance decreases as time passes (such as news items), so that newer Stories will typically be placed higher on the page than older Stories Comment Comments actually aren't nodes, so Comment is technically not a "content type". Enabling the Comment module allows site visitors to add comments (typically short notes and replies to other comments) to nodes on the site. 30 • Custom content types can also be created by going to Administer > Content > Content types > Add content type 31 Note • If you want to add fields to your custom content types, install the Content Const. ruction Kit (CCK) contributed module, etc. 32 General concepts (4) • Comment: Comments are another type of content you can have on your site (if you have enabled the core Comment module). • Taxonomy: Drupal has a system for classifying content, which is known as taxonomy (taxonomie*) and implemented in the core Taxonomy module. You can define your own vocabularies (groups of taxonomy terms), and add terms to each vocabulary. Vocabularies can be flat or hierarchical, can allow single or multiple selection, and can also be "free tagging" (meaning that when creating or editing content, you can add new terms on the fly). Each vocabulary can then be attached to one or more content types, and in this way, nodes on your site can be grouped into categories, tagged, or classified in any way you choose. *La taxinomie ou taxonomie est la science qui a pour objet de décrire les organismes vivants et de les regrouper en entités appelées taxons afin de les identifier puis les nommer, et enfin les classer. Elle complète la systématique qui est la science qui organise le classement des taxons et leur relations. La taxonomie s'étend maintenant à d'autres sciences, entre autres les sciences humaines, les sciences de l'information ou l'informatique. 33 General concepts (5) • Database: Drupal stores information in a database; each type of information has its own database table. – For instance, the basic information about the nodes of your site are stored in the Node table, and if you use the CCK module to add fields to your nodes, the field information is stored in separate tables. – Comments and Users also have their own database tables, and roles, permissions, and other settings are also stored in database tables. 34 General concepts (6) • Path: When you visit a URL within your Drupal site, the part of the URL after your base site address is known as the path. When you visit a path in your Drupal site, Drupal figures out what information should be sent to your browser, via one or more database queries. – For instance, this page is http://drupal.org/node/19828, whose path is "node/19828". The module that is responsible for this path is the core Node module, so when you visit this page, Drupal lets the Node module determine what to display. – To determine the path to a particular page on your site, for purposes of creating a link, go to the page you want to link to and look at the URL in the address bar. By default the URL, after the base address of your site, will begin with '?q='. When 'Clean URLs' are enabled you will see a directory structure in the URL. The "path" for use in a menu item is the part of the URL after the site's base address and without the "?q=". 35 General concepts (7) • Theme: The theme controls how your site is displayed, including the graphic look, layout, and colors. – A theme consists of one or more PHP* files that define the HTML output of your site's pages, along with one or more CSS** files that define the layout, fonts, colors, and other styles. *Personal Home Page Tools **Cascading Style Sheets : feuilles de style en cascade 36 General concepts (8) • Pages on your Drupal site are laid out in regions, which can include the header, footer, sidebars, and main content section; your theme may define additional regions. • Blocks (Blocs) are discrete chunks of information that are displayed in the regions of your site's pages. • Blocks can take the form of menus (Menus) (which are concerned with site navigation), the output from modules, or dynamic and static chunks of information that you've created yourself… – There are three standard menus in Drupal • Primary and Secondary links are built by site administrators, and displayed automatically in the page header of many themes (if not, you can enable their blocks to display them). • Navigation is the catch-all menu that contains your administration menus, as well as links supplied by modules on your site. • You can also create your own custom menus, and display them by enabling their blocks. 37 SOS: Acronyms & jargons • http://drupal.org/node/937 • http://drupal.org/node/302232 • http://drupal.org/node/122018 38 THE 11 COMMANDEMENTS • • It is assumed that you have successfully installed Drupal and are looking at a "Welcome to Drupal" screen. If not, see for a tutorial. The next slides reflects only a personal choice. Of course, these choice are debatable. The complete origin article can be found in the references section at the end. 40 The 11 Most Important Things To Do After You Install Drupal 1. Disable Unnecessary Core Modules Go to modules and disable: Color module Administrer >> Construction du site >> Modules 41 2. Enable Necessary Core Modules • Go to modules and enable: Path module. Also enable PHP filter module. And don't forget about Search module. 42 • 3. Make It Easier To Navigate • The Drupal administration menu module displays the entire administrative menu tree (and most local tasks) in a drop-down menu, providing administrators one- or two-click access to most pages. Other modules may also add menu links to administration menu using hook_admin_menu(). 43 The 11 commandements • 4. Feel The Power Of Content Type Creation InsTall CCK (Content Construction Kit )http://drupal.org/project/cck) Part of CCK is moving to core in the Drupal 7 version. 44 The 11 commandements • 5. Control Category and Content Output • Install Views (http://drupal.org/project/views) 45 The 11 commandements • 6. Configure The Way Drupal Works With Urls Pathauto (http://drupal.org/project/pathauto), Token (http://drupal.org/project/token) and Globalredirect (http://drupal.org/project/globalredirect). 46 The 11 commandements • 7. Tune Your SEO There are two main modules for SEO to be installed: Nodewords (second name Meta Tags, http://drupal.org/project/nodewords) and Page Title (http://drupal.org/project/page_title) L'optimisation pour les moteurs de recherche (en anglais, Search engine optimization : SEO) est un ensemble de techniques visant à favoriser la compréhension de la thématique et du contenu d'une ou de l'ensemble des pages d'un site web par les moteurs de recherche. Ces techniques visent donc à apporter un maximum d'informations concernant le contenu d'une page web aux robots d'indexation des moteurs de recherche. 47 The 11 commandements • 8. Configure Search One of the main features of every site is the Search. Web Users often use web site search and this feature should be properly configured, you need to build a proper and regular built-in Drupal search index. Go to Site configuration -> Search settings and check your settings. Paramètres de recherche 48 The 11 commandements • 9. Don't Forget About a Backup Always do backups, especially, before doing any significant changes. There are plenty of various solutions for FTP and MySQL backup, but start with small: install Backup and Migrate (http://drupal.org/project/backup_migrate) 49 • 10. Configure Your Cron cron est le nom d'un programme qui permet aux utilisateurs des systèmes Unix d'exécuter automatiquement des scripts, des commandes ou des logiciels à une date et une heure spécifiées à l'avance, ou selon un cycle défini à l'avance. Le nom est dérivé du grec chronos (χρόνος), signifiant le temps[1],[2]. Il s'agit d'une fonctionnalité très utile pour des tâches routinières d'administration système, mais elle peut très bien être exploitée pour toute autre chose. Par exemple, on peut demander à cron de jouer tel fichier ogg tous les jours à sept heures sauf le samedi et le dimanche afin de se réveiller en musique. 50 • 11. Buy a Good Drupal Book (!) 51 Extra commandements… • 12. Server Tweaks Bump your memory limit to 96MB. Most of hosting providers allow to do this, if yours doesn't, leave him with no regrets. You can extent a memory limit either in htaccess or settings.php. 52 • 13. Lower The Number Of Http Requests • Drupal modules produce numerous .css and .js files. Almost every enabled module adds its own files. The more .css and .js files you have to load on every page, the more http requests your server should serve, the longer loading and page rendering time your visitors will experience. • But there is a nice solution built in the Drupal: enable caching and css /js compression in admin/settings/performance. This will compress all of your .css and .js files in one combined file each which will reduce the time of page rendering and the number of http requests. As a result, your pages will load much faster and your server will experience lower load. But use this function wisely, enable it only on a production web site. 53 LABS.2 ADDING CONTRIBUTED MODULES Labs.2: Installing contributed modules • Step1. Download the module Here a tar.gz file at http://drupal.org/project/admin_menu • Step2. Extract the files • Step3. Upload the folder. sites/all/modules • Step4.Read the directions. If the module has an installation file (usually INSTALL.txt and/or README.txt), read it for specific instructions (not here) • Step5. Enable the module Check the 'Enabled' box next to the module and then click the 'Save Configuration' button at the bottom. 55 Apparu NOTE: If you're upgrading an existing module you'll need to browse to your update page at www.example.com/update.php and click on 'run the database upgrade script'. 56 • Step6. Set up permissions. Some modules will require you change permissions to get them working. Permissions information may be in the instructions that came with the module. Usually, go to Administer > User management > Permissions Scroll down to see if the module appears in the list and, if it does, give the appropriate permissions to desired roles. 57 Example of README.txt -- CONFIGURATION – * Configure user permissions in Administer >> User management >> Permissions >> admin_menu module: Administrer >> Gestion des utilisateurs >> Droits d'accès - access administration menu (accéder au menu d'administration) Users in roles with the "access administration menu" permission will see the administration menu at the top of each page. - display drupal links (afficher les liens drupal) Users in roles with the "display drupal links" permission will receive links to Drupal.org issue queues for all enabled contributed modules. The issue queue links appear under the administration menu icon. Note that the menu items displayed in the administration Menu depend on the actual permissions of the viewing user. For example, the "User management" menu item is not displayed to a user who is not a member of a role with the "administer permissions" and "administer users" permissions. * Customize the menu settings in Administer >> Site configuration >> Administration menu. Administrer >> Configuration du site >> Menu d'administration * To prevent administrative menu items from appearing twice, you may hide the "Navigation" menu block, or move the "Administer" menu items into a separate menu. 58 • Step7. Adjust settings. Most modules will have some type of settings page. It will vary from module to module but but if not described in the README.txt file it will usually be located under Administer > Site building or Administer > Site configuration. If you have trouble locating a module's settings page try navigating to "admin/by-module" and see if the module appears in the list. If it does, it's settings page(s) will be listed also. If all else fails, check the module's .module file for a 'modulename_menu' function-- even if you're not a coder the settings path, if there is one, should be pretty easy to discern. • Step8. If you run into problems, search the module's issue queue and the forums. If your problem hasn't already been addressed, post a question or issue and someone will try to help you out. 59 REFERENCES SECTION References • Adapted from « Drupal for beginners » (cookbook) and « getting started » Drupal documentations (drupal.org) • www.wikipedia.fr • http://timonweb.com/the-11-most-important-things-to-do-after-youinstall-drupal • http://www.wampserver.com/en
© Copyright 2024