My Drupal Setup
- November 2nd, 2010
- Posted in Computer . Internet
- Write comment
I write this article to be able to retrace each and every step of my Drupal setup. All comments are based on my server (hosted by WulfNetworx). I use FileZilla for FTP-Access. I am setting up things for Drupal 6.19. 1. Setup Drupal core (6.19)
- Upload Drupal to a web server (let's say to the directory cms/)
- Copy cms/sites/default/default.settings.php to cms/sites/default/settings.php (do not delete cms/sites/default/default.settings.php - for me that caused an error during the installation)
- Set permissions of cms/sites/default to 667 (you might want to keep it at 767, because changing permissions on the settings.php requires the private execution flag - setting it to 666 as specified in the Drupal documentation did not work for me; it could not create the files/ subdirectory I think) and cms/sites/default/settings.php to 666
- Run the setup
- Set permissions of cms/sites/default/settings.php to 644 and then permissions of cms/sites/default to 755 (the documentation basically says to leave it at 666 but the public execution flag is needed for everything to work ; I leave the owner and group execution flag in place for possible later usage)
2. Setup theme (KiZeLa)
- Next set up the custom theme called KiZeLa (upload it to cms/themes/, enable and set as default in Administer->Site Building->Themes). It is included in the "Files" section . KiZeLa is a slight modification of the "0 Point" theme.
- A few cosmetic changes are to be made: set Toggle display->Site slogan->TRUE. Furthermore Theme specific settings->KiZeLa settings->Node settings->Author & Date is worth mentioning. It might be reasonable to only show those information for Stories or not at all depending on preference. Further customizations will be mentioned later and do not concern the theme itself.
3. Module: Paths
- Activate the module "Paths" in Administer->Modules to allow giving purposeful names to nodes. I used them for example for the "Contact" and the "About us" page.
4. Primary links: Home, Diary, About us, Contact
- Next create the pages "About us" and "Contact" as well as the story "Homepage debut" (Create content->Page, Create content->Story). Give all of them nice names using the Path module (URL path settings).
- Using Administer->Site building->Menus->Primary links->Add item, create links to all three pages as well as a link "Diary" linking to the path "node", which will show all new entries published on the "main page".
- Goto Administer->Site configuration->Site information->Default front page and change it to the name you gave to the "Homepage debut" story. Later the default front page is always supposed to view information about the current tent camp.
5. Module: Locale
- Activate the module "Locale" in Administer->Modules to translate everything to German.
- The menu item Administer>Site configuration>Lanuages will appear, where languages can be added and set as default.
- The added languages might not provide a complete translation yet. The menu item Administer>Site building>Translate interface will provide a dialog where language files can be imported to update the translation. Corresponding files can be found here: http://localize.drupal.org/translate/downloads. There is also a link to the German translation file in the "Files" section below.
- I will continue to refer to the English version of Drupal during this article.
6. Patron block
- The "Patron" block needs an image with the patron logo. Upload that logo to i.e. cms/sites/default/patrons/patron.png.
- Then go to Administer->Site building->Blocks->Add block.
- The description and the title are up to you. For the body add this:
<a href="http://www.foryouev.de/"> <img src="../../sites/default/patrons/patron.png" alt="" /> </a> - Of course "http://url.to.patron.de" needs to adjusted accordingly.
- Before saving the block, choose Block specific settings->Input format->Full HTML and then save.
- Go to Administer->Site building->Blocks to place the block to your liking.
7. Module: Gallery Assist
- Setup the "Gallery Assist" module (see "Setting up module x").
- Set Administer->Site Configuration->Gallery Assist->Assignments->Others->Amount of uploads fields to 1, as we will use the module "Image FUpload" for uploads later. Hence this method will not be used frequently. Note: One file needs to be uploaded using this method before using the "Image FUpload" module unfortunately.
- Set Administer->Site configuration->Gallery Assist->Assignments->Layout->Node settings defaults->Common->Gallery Public Status to public for all. Fine grained permissions settings can then be adjusted using the module "Content Access".
- Enable Administer->User management->Permissions->view gallery_assist content for the appropriate roles. Otherwise the images of the gallery node will not be shown. Also edit the other permissions according to personal preference.
- There was a display problem showing a gallery content only in a very limited column. Editing of gallery_assist/gallery_assist_display.inc was needed:
- Replace this line
$output = ' <div id="gallery-container-'. $conf['nid'] .'" class="'. $type .' gallery-container '. $conf['op'] .' clear-block">';</div>
with
$output = ' <div id="gallery-container-'. $conf['nid'] .'" class="'. $type .' gallery-container '. ''/*$conf['op']*/ .' clear-block">';</div>
- A already modified version is found in the "Files" section.
8. Module: Content Access
- Setup the "Content Access" module (see "Setting up module x"). You will be prompted to rebuild permission in the process: do that.
- Enable Administer->Content management->Content Types->Gallery->Access control->Per content node access control settings->Enable per content node access control settings.
- Not it is possible to adjust permission settings more finely grained when creating galleries. Beware that the gallery's Gallery Assist (GA) settings ->Common->Gallery public status must be set to "public for all" to avoid unexpected behavior.
- Now access can be controlled for each gallery individually using the corresponding Access control tab.
9. Module: Image FUpload
- Setup the "Image FUpload" module (see "Setting up module x").
- After reloading the Administer->Site building->Modules page, an error will be displayed telling you to download SWFUpload Core and place the files swfupload.swf, swfupload.js, swfupload.queue.js in the directory cms/modules/image_fupload/swfupload.
- The files section contains a "Image FUpload" version already containing those mentioned files.
- Note: when using "Image FUpload" with "Gallery Assist" one image must be uploaded using the conventional way before using "Image FUpload". Otherwise the internal folder structure to store the images is not created.
10. Module: Gallery Assist: Image FUpload
- Setup the "Gallery Assist: Image FUpload" module (see "Setting up module x").
- Note again: when using "Image FUpload" with "Gallery Assist" one image must be uploaded using the conventional way before using "Image FUpload". Otherwise the internal folder structure to store the images is not created.
11. Module: Taxonomy, Pathauto, Token
- The module "Taxonomy" is part of Drupal's core and only needs to be enabled in Administer->Site building->Modules.
- "Taxonomy" is used to show some summary pages and the "Views" module can utilize the given tags or vocabulary words (see below).
- Go to Administer » Content management » Taxonomy and create a some vocabulary and terms.
- Setup the "Token" module (see "Setting up module x"). Only activate the actual "Token" module. The other modules contained by "Token" are not relevant. "Taken" is required for "Pathauto" to work.
- Setup the "Pathauto" module (see "Setting up module x"). It will make it possible to access taxonomy terms with nice URLs.
- See Administer » Site building » URL aliases for settings and created aliases.
12. Module: Views
- Setup the "Views" module (see "Setting up module x").
- Views can be imported. The "Files" section lists the views "galleries" and "recent_changes".
- The view "galleries" expects the node type "Gallery" and takes taxonomy terms as arguments. It defines the pages "bildergalerien" and "bildergalerien/liste".
- The view "recent_changes" defines a block showing the five most recently updated nodes with corresponding updates dates.
13. Module: Gallery Assist: Lightboxes
- Setup the "Gallery Assist: Lightboxes" module (see "Setting up module x").
- There was a display problem showing a gallery content only in a very limited column. Editing of gallery_assist/gallery_assist_lightboxes_display.inc was needed:
- Replace this line
$output = ' <div id="gallery-container-'. $conf['nid'] .'" class="'. $type .' gallery-container '. $conf['op'] .' clear-block">';</div>
with
$output = ' <div id="gallery-container-'. $conf['nid'] .'" class="'. $type .' gallery-container '. ">';</div>
- Get the "prettyPhoto" lightbox. An upload the contents of the folder prettyPhoto to cms/modules/gallery_assist_lightboxes/lightboxes/prettyPhoto.
- Enable the lightbox by choosing Administer->Site configuration->Gallery Assist->Extras->Gallery Assist Extras->Lightboxes for Gallery Assist->Lightboxes->prettyPhoto.
- A already modified version including "prettyPhoto" is found in the files section.
14. WYSIWYG: CKEditor
- Setup the "CKEditor" module (see "Setting up module x").
- Get the actual "CKEditor" and upload the contents of "ckeditor" (the one from CKEditor) to "cms/sites/all/libraries/ckeditor".
- Permissions need to adjusted for each role to use and administer "CKEditor".
15. WYSIWYG: IMCE
- Setup the "IMCE" module (see "Setting up module x").
- Permissions concerning the file system can be adjusted in Administer->Site configuration->IMCE
- To enable IMCE in CKEditor, choose Administer->Site configuration->CKEditor->Profiles->[the profile] edit->File browser settings->File browser type->IMCE
Setting up a module x:
- Each module "x" will provide a folder "x".
- Copy the contents of "x" to cms/modules/x.
- Goto Administer->Site Building->Modules and enable the module "x".
- Some modules will add several submodules to the Administer->Site Building->Modules page. Not always every single one is needed or even desired. For example some submodule might only be interesting together with another module.
Files:
- http://files.kizela.fstyle.de/drupal-6.19.zip
- http://files.kizela.fstyle.de/drupal-language-6.19.de.po
- http://files.kizela.fstyle.de/drupal-theme-kizela.zip
- http://files.kizela.fstyle.de/youev_logo_small.png
- http://files.kizela.fstyle.de/drupal-module-gallery_assist-6.x-1.18-display_fixed.zip
- http://files.kizela.fstyle.de/drupal-module-content_access-6.x-1.2.zip
- http://files.kizela.fstyle.de/drupal-module-image_fupload-6.x-3.0-rc2-swfupload_included.zip
- http://files.kizela.fstyle.de/drupal-module-image_fupload_gallery_assist-6.x-1.x-dev.zip
- http://files.kizela.fstyle.de/drupal-module-token-6.x-1.15.zip
- http://files.kizela.fstyle.de/drupal-module-pathauto-6.x-1.5.zip
- http://files.kizela.fstyle.de/drupal-module-views-6.x-2.11.zip
- http://files.kizela.fstyle.de/drupal-module-views-galleries.view
- http://files.kizela.fstyle.de/drupal-module-views-recent_changes.view
- http://files.kizela.fstyle.de/drupal-module-gallery_assist_lightboxes-6.x-1.4-display_fixed-with-prettyPhoto-3.0.zip
- http://files.kizela.fstyle.de/drupal-module-ckeditor-6.x-1.2.zip
- http://files.kizela.fstyle.de/ckeditor_3.4.2.zip
- http://files.kizela.fstyle.de/drupal-module-imce-6.x-2.0-rc2.zip
Update: here are some further notes and some changes I did recently. I may not have time to elaborate on them:
- Note: I use two different languages German as default and English as my administration language. I use the "Path prefix with language fallback" option for resolving languages. With this setting the Path module will change the Alias language to the node language every time you edit that node regardless of that specific alias settings (if the overwrite behavior somewhere in the path settings is changed this might no be true anymore). A solution was to enable the Translate Content module, which allows you to set a node language for each node manually. The default luckily is no specific language. To allow for language choosing when creating/editing nodes you have to enable it for each node type.
- Note: Another thing that is quite useful is the PHP filter module, which allows to create the new input format PHP code. Really nice for conditional content.
- Change: Installed the Lightbox2 module (images have to link to themselves or to their original version; the link has to specify the following attribute rel="lightbox[group]"; [group] is optional and allows grouping of images to get the slideshow effect).
- Change: I switched from prettyPhoto to lightbox (using the Lightbox2 Drupal module) for the "Gallery Assist" module, because I wanted it to be consistent with the Lightbox2 module.
- Change: Switched to WYSIWYG API and TinyMCE due to tremendous frustration with CKEditor especially during table nesting. As of now I am really impressed with this editor.
- Change: Installed IMCE, IMCE mkdir, and IMCE rename as well as the WYSIWYG IMCE bridge to have a file manager. The mkdir and rename modules make IMCE a really nice manager to work with. An alternative was Web File Manager. Yet resizing images in a non-contorting way was missing in WebFM. It also had some other small bugs like root directory specification issues and so on which made me decide not to use it.
No comments yet.