====== Drupal Tips ====== ===== Forms == See [[drupal>project/webform]] ===== Newsletter == FIXME Check * [[drupal>node/197057|Simplenews]]! * [[http://www.developertutorials.com/tutorials/miscellaneous/creating-an-online-newsletter-with-drupal-8-07-11/|developertutorials.com]] ===== Calendar Events == All is done on Drupal 6.9 / [[http://www.drupaltherapy.com/node/76|information source]] (screencast) / [[drupal>node/262062|General info]] ==== Basic principle == - Create a new content (node) type for events - Add a date field to this new event type FIXME ==== Detailled Instructions == - Install this modules: * [[drupal>project/cck|cck]] allows you to add custom fields to nodes using a web browser. * [[drupal>project/date|date]] defines CCK date/time fields and widgets. * [[drupal>project/views|views]] to create customized lists and queries from your database. * [[drupal>project/calendar|calendar]] is a Views plugin to display views containing dates as Calendars. - 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'' - Set Timezone anew in Administer -> Date and time - Administer -> Content types -> Add content type: * Name: Event, Type: event (proposal) * Uncheck: Workflow settings -> Default options -> Promoted to front page - 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 - Administer -> Blocks: Enable Upcoming - Administer -> Views -> calander -> Enable - 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'' - 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 == - Download the [[drupal>project/fckeditor|module]] and the [[http://www.fckeditor.net/download|editor]] - Follow the instructions in ''README.TXT'' of the Module :!: - Install module and editor - Enable the module in ''Administer -> Modules'' - Grant ''fckeditor access'' permissions for user with story/page write access (eg. self-created role ''authors'') and ''authenticated users'' - Under ''Administer -> FCKeditor'', allow ''authors'' to use the advanced profile and optionally ''authenticated users'' to use the default profile - Under ''Administer -> Input formats'' - Make ''Filtered HTML'' the default format - Add the tags ''
'' to the list of allowed HTML tags in ''Filtered HTML''
- Allow the role authors to use ''Full HTML''
- Uncheck Line break converter in both formats
- 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 [[drupal>project/image|image module]] is easy to use and allows to add one image per node. See [[drupal>node/191718|Attaching images to other nodes]].
===== Install additional Modules ==
See [[drupal>documentation/install/modules-themes/modules-5-6]]
===== 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 ==
- Log into your Drupal install with HTTP as Admin
- Check if they are up to date in ''drupal/admin/reports/updates''
- Place the site in "Off-line" mode in ''drupal/admin/settings/site-maintenance''
- cd drupal/sites/all; cp -a modules modules.new
- Download new module tarballs into modules.new/ with wget
- Remove outdated module dirs in modules.new
- Unpack and remove tarballs
- Merge your changed in module config files into the new config files
- mv modules modules.old; mv modules.new modules
- Point Browser to %%http://