Drupal basic kit
This page exemplifies a common but advanced Drupal installation and management scenario.
Languages
- Download the languages you need (Spanish): http://drupal.org/project/translations (and from March 2010 http://localize.drupal.org)
Installation
- Download the latest release of Drupal
- Download at least one language different than English (i.e., Spanish)
- Create a folder and uncompress Drupal
- Copy language package file (.tgz, .zip, etc.) contents in your drupal website folder merging all folders (some of them may exist)
- cp sites/default/default.settings.php sites/default/settings.php
- chmod a+w sites/default/settings.php
- Create the DB (i.e., textmess20drupal) (intime.dlsi.ua.es/phpmyadmin/) with the DB user you will give after in Drupal installation (give as much permissions as possible). If DB new user SQL “flush privileges;”
- HACK: To simplify and avoid extra problems lets make it easy: chmod -R a+w * (in your drupal website folder)
- HACK: To enable Clean URLS -> Make sure that modrewrite is enabled and create an .htaccess file in your website folder that looks like this:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/(PUT HERE—YOUR-SITE—)/(.*)$
RewriteRule ^(.*)$ /(PUT HERE—YOUR-SITE—)/index.php?q=$1 [L,QSA]
</IfModule>
- Go to your new site and the installation will be guided (IMP: link web in/var/www/ if needed)(eg, from /var/www/ run -> ln -s /home/mse/gplsi2010/)
- Try to install in a lanuage other than english to manage internatonalization from the beginning.
- Use Clean URLs (permalinks/slugs) from the beggining (tune up your appache if needed)
- You need to mkdir sites/default/files, chmod o+w sites/default/files
- Go to administer and see if you have some issues (reports)
- Set up cron: crontab -e
#textmess20
1 * * * * wget -O – -q -t 1 http://intime.dlsi.ua.es/textmess20/cron.php
- IMPORTANTE: NO CREAR CONTENIDO ANTES TE TERMINAR ESTOS PASOS
- If localization module is disabled -> enable it
- Then go to manage languages. If you default to Spanish and it does not work delete it and decompress again the full package in your website folder (merge all). Then default it and see how everything turns to Spanish. Now you can configure the languages to be in /es/ /en/ remember to set English language code to “en”, by default is “”.
- Enable content_translation module
- IMPORTANTE: ir a administrar tipos de contenidos entrar en pagina (editar)->workflow options: multilingue and set to “enabled, with translation”
- IMPRESCINDIBLE: Instalar los módulos internationalization (i18n) y opcionalmente (languageicons)
- Luego en los tipos de contenido otra vez en pagina en multilingual opitons decir require language (neutral not allowed), and the option “set current language as default”
- Put your site name instead of xxx.com in site information.
- Modulos importantes: token, pathauto (see MODULES section)
Update
Follow UPDATE.txt of the new version. Uncompress the new version read update.txt. Nrmally you have to backup your sites directory and empty your drupal directory. Then you delete everything, copy the new files and then copy back your sites directory (and execute yoursite.com/update.php, to update the database).
To backup the data base use “mysqldump -u username -h localhost -p database_name | gzip -9 > backup_db.sql.gz”
Modules
- Imprescindible activar de los preinstalados: Path, Porfile, Taxonomy, locale, content_translation, search y update
- Pathauto (geting proper slugs/permalinks) -> dowload token and pathauto modules (download and exract in in sites/all/modules) then activate them (but STARTER) and run update.php. Then go to Site_building->URL aliases->automated settings, then node path settings and set bulk generate aliases to generate aliases for the already created content.
- ContentAccess module to create new user types which different permisions.
- Wyswyg CKEditor (editor tipo word para contenidos):
- Descargar e instalar wysiwyg module y aplicar patch para que soporte el nuevo CKEditor (hasta q lo resuelvan, buscar patch en foros)
- Descargar CKeditor de su propia página y hacer lo siguiente:
cd [$drupal]/sites/all/modules
tar vxzf wysiwyg-6.x-2.0.tar.gz
cd [$drupal]/sites/all/modules/wysiwyg/editors
patch -p1 < wysiwyg2-08262009.patch
cd [$drupal]/sites/all
mkdir libraries
tar vxzf ckeditor_3.0.tar.gz
-
- run update.php in your drupal
- enable wyswyg plugin and save the configuration
- go to admin->settings->wyswsg->profile and follow installation instructions
- put it into Full HTML and HTML filter
- Internazionalization (i18n) and language icons (download the modules and activate all but not needed things like poll for examle)
- Events content -> in calendars!!
- Follow this tutorial http://www.jmstudio.org/archives/32
- Install and activate the following modules in this order: JQueryUI, CCK, Views, Date, and Calendar.
- Install JQuery, CCK and Views. (forget about the CCK permisions for the moment)
- IMPORTANT: JQuery distribution must be downloaded apart and extracted inside the module (follow README)
- Then, Date and make sure to configure date (time zone, format…). Poner formato europeo: dd/mm/yyyy
- Finally install Calendar.
- Now let’s create a new type of content “Event”:
- slug: event, description: events for the calendar
- configure it: comments and multilingual options dissabled.
- Let’s add a date field to Event “Date”
- slug: field_date, type: Date, inputformat: calendar popup with repeat options
- configure it: default value=now,default to_date=empty, required=true, to_date=optional.
- Let’s create our first event: create content -> event -> fill it!
- Now create a calendar view to see events (Site building->views)
- Activate the default view “calendar”
- Edit it that way (in default):
- Edit argument Date (uncheck “update date”, and check “field_date_date_from”)
- Remove “update date” from fields, and add (Content:from_date)
- Add filter to event type
- Remove sort cirteria to from_date
- REMEMBER CLICK ON “SAVE”
- Click on see calendar page!
- Then you have 2 options:
- 1: Use calendar in a sidebar (you may also add upcoming events). Just go to blocks and move calendar and upcoming to the sidebar you want.
- 2: Go to calendar “page view” and in page settings set menu -> navigation (for example)
Themes
Set your LOGO by going to themes, configure the default theme and go to GLOBAL SETTINGS, upload your logo (forget about the path) and remove, if needed, “show site name”, that may be is included in the logo.
Set your Shortcut icon or go to the global settings and disable “show shortcut icon”.
Install NEW themes can be dowloaded. Download whichever you like and extract it in /sites/all/themes. Then go to themes and enable and default it. Then you can change colors and many features. If you gave specific needs you should edit the css in (/sites/all/themes/THEME_NAME/style.css).
Themes I like: wabi,….
Example theme: WABI-TEXTMESS2.0
I changed the base color to #4aa0e0 and the text color to #333333.
Then I modified the css in /sites/all/themes/wabi/style.css (basic colors) (h2 color: #222222 menu color to:#333333 and when hover to: #ff0084)
Table#content background to #e4e9ee;
In “.node” I put background to nearly white (#f4f9ff)
En configuracion->menus: se pone My account, create content, y log out en vez de en navegación en primarios. También se crea una página contacto que permanece siempre a la derecha de los enlaces primarios.