Benutzer-Werkzeuge

Webseiten-Werkzeuge


becki:linux:drupal

Drupal Tips

Forms

Newsletter

Calendar Events

All is done on Drupal 6.9 / information source (screencast) / General info

Basic principle

  1. Create a new content (node) type for events
  2. Add a date field to this new event type

FIXME

Detailled Instructions

  1. Install this modules:
    • cck allows you to add custom fields to nodes using a web browser.
    • date defines CCK date/time fields and widgets.
    • views to create customized lists and queries from your database.
    • calendar is a Views plugin to display views containing dates as Calendars.
  2. Enable in Administer → Modules
    • CCK: Content (and optionally Number, Option widgets & Text for later usage)
    • Date/Time: Calendar, Date, Date API & Date Timezone
    • Views: Views & Views UI
  3. Set Timezone anew in Administer → Date and time
  4. Administer → Content types → Add content type:
    • Name: Event, Type: event (proposal)
    • Uncheck: Workflow settings → Default options → Promoted to front page
  5. Administer → Content types → „Event“ → Manage fields
    • Add new field: Label: Date; field name: field_date; Field type: Date; Widget: Select list
    • Save
    • Global Settings → Required: yes; Global Settings → To Date: optional
    • Save
  6. Administer → Blocks: Enable Upcoming
  7. Administer → Views → calander → Enable
  8. Administer → Views → calander → edit → Defaults:
    • Arguments: Date: Date Content: Datum (field_datum value)
    • Fields Node: Title (remove date field)
    • Sort criteria: Content: Datum (field_datum value) asc
  9. Administer → Views → calander → edit → Upcoming: (Take care not to overwrite the Defaults when editing this view!)
    • Arguments → Date: Date → Granularity: Day (Overwrite Upcoming, don't modfy Default!)
    • Fields:
      • Node: Title
      • Content: Datum (field_datum value) Short
    • Filters:
      • Node: Published Yes
      • Date: Date Content: Datum (field_datum value) >= now

WYSIWYG with FCKEditor

  1. Download the module and the editor
  2. Follow the instructions in README.TXT of the Module :!:
    1. Install module and editor
    2. Enable the module in Administer → Modules
    3. Grant fckeditor access permissions for user with story/page write access (eg. self-created role authors) and authenticated users
    4. Under Administer → FCKeditor, allow authors to use the advanced profile and optionally authenticated users to use the default profile
    5. Under Administer → Input formats
      1. Make Filtered HTML the default format
      2. Add the tags <p> <br /> to the list of allowed HTML tags in Filtered HTML
      3. Allow the role authors to use Full HTML
      4. Uncheck Line break converter in both formats
  3. Optionally disable the conversion of special characters to HTML entities by adding the line FCKConfig.ProcessHTMLEntities = false; to the file /sites/all/modules/fckeditor/fckeditor.config.js (Source: REAMDE of fckeditor drupal module)

Handling Images

The image module is easy to use and allows to add one image per node. See Attaching images to other nodes.

Install additional Modules

Install a different Language

Update: It seems to be better to select the default language at installation (Drupal 6.9) — 2009-01-19

This refers to Drupal 6.2:

  • Downlad a language tarball from drupal>project/Translations
  • Enable: Administer → Site building → Modules → Locale
  • Upload language tarball to drupa root dir and unpack it
  • Home › Administer › Site configuration > Languages > Add language
  • Make new language the default language on the same page

Cron

Some modules need to be triggered periodically. This is done by calling the script /drupal/cron.php with lynx. Therfore add a hourly conjob. With Slackware this is achieved by simply creating and making runnable /etc/cron.hourly/drupal whith the following content:

#!/bin/bash
lynx -source http://localhost/drupal/cron.php

Update modules

  1. Log into your Drupal install with HTTP as Admin
  2. Check if they are up to date in drupal/admin/reports/updates
  3. Place the site in „Off-line“ mode in drupal/admin/settings/site-maintenance
  4. cd drupal/sites/all; cp -a modules modules.new
  5. Download new module tarballs into modules.new/ with wget
  6. Remove outdated module dirs in modules.new
  7. Unpack and remove tarballs
  8. Merge your changed in module config files into the new config files
  9. mv modules modules.old; mv modules.new modules
  10. Point Browser to http://<mysite>/drupal/update.php and follow instructions

Minor Update Drupal Core

  1. Log into your Drupal install with HTTP as Admin an go to http://<mysite>/drupal/admin/reports/updates and copy Link to latest core package into clipboard
  2. Log into your Drupal server with SSH and download core package with wget
  3. Extract core package in your web root (near old core package)
  4. Read drupal.new/UPGRADE.txt
  5. Place the site in „Off-line“ mode in drupal/admin/settings/site-maintenance
  6. Backup db with mysqldump –default-character-set=utf8 –user=<user> –password=<pass> –opt <dbname> > dbbak.sql
  7. Switch to Garland or Bluemarine core theme drupal/admin/build/themes
  8. Write down all custom and contributed modules drupal/admin/build/modules and save it into drupal.new/MY_MODULES (to reuse it for later updates)
  9. Disable all custom and contributed modules (all exept 'Core - required')
  10. Merge your custom changes (ie. database access data) of drupal/sites/default/settings.php into newly created drupal.new/sites/default/settings.php (use eg diff3 -m)
  11. cd drupal/sites/all; cp -a modules themes drupal.new/sites/all/
  12. cd drupal/sites/default; cp files drupal.new/sites/default/
  13. cd <wwwroot>; rm drupal; ln -s drupal.new drupal
  14. Point Browser to http://<mysite>/drupal/update.php and follow instructions
  15. Re-enable custom and contributed modules and check if they are up to date in drupal/admin/reports/updates
  16. Update all outdated modules
  17. Return the site to its original theme
  18. Return your site to Online

Major Upgrade Drupal Core

  1. Minor Update Drupal Core

FIXME

Install Drupal Core

  • Download and extract Drupal somewhere in apache document root, on Slackware /var/www/htdocs. Maybe its better not to extract directly on the server but to ftp the files up to the server, because otherwise you get strange permissions for the directories i.e. drwxr-sr-x instead of drwxr-xr-x
  • Symlink drupal → drupal-<versionnumber>
  • chown -R nobody:nobody /var/www/htdocs/drupal/* :?: Maybe it's more secure to just give write permission to only the files wich drupal wants to edit, eg. drupal/sites/default/settings.php
  • Make sure that you use PHP5 not 4. Otherwise you may get an error message about register_globals being illegally on. You can check this by creating a file containing „<?php phpinfo(); ?>“ inside the drupal directory on your server. You can switch to PHP5 by adding the line „AddHandler php-fastcgi5 .php .php5“ to the file .htaccess in the drupal directory.
  • Point your Browser to http://yourhostname/drupal and follow installation instructions.

Obsolete instructins for drupal 5.2:

  • Create the drupal database by help of INSTALL.mysql.txt. Don't omit @localhost in the SQL statement :!: Otherwise you might not connect to the database. (See column mysql.user.Host)
  • Create administrator account
  • Create a directory called 'files' in root dir of drupal and make it writable by httpd

Test / Todo

Attic

WYSIWYG with Tinymce

This paragraph is obsolete!

Download tinymce module and follow the instructions in INSTALL.txt and optionally at the Drupal Handbook

Notes:

  • If seems better to try additonal features (eg images) with WYSIWYG turned off in order to get the proper source code and then perhaps config tinymce to produce that source code.
  • Images to be set up with tinymce.
  • For config HTML-Filters see: node/59769
  • There is also a FCKEditor module, but Tinymce seems to be more lightweight & better supported
  • Recommendation for tinymce & freelinking instead of a wiki
Cookies helfen bei der Bereitstellung von Inhalten. Diese Website verwendet Cookies. Mit der Nutzung der Website erklären Sie sich damit einverstanden, dass Cookies auf Ihrem Computer gespeichert werden. Außerdem bestätigen Sie, dass Sie unsere Datenschutzerklärung gelesen und verstanden haben. Wenn Sie nicht einverstanden sind, verlassen Sie die Website. Weitere Information
becki/linux/drupal.txt · Zuletzt geändert: 2011-12-20 17:21 von becki

Impressum - Datenschutzerklärung