Search Engine Friendly Migration

The biggest pain for me, having just migrated from Geeklog to Drupal is that my site has a good index in google and other search engines. All those users finding my site on Google are suddenly getting the 404 error page, giving up, and going away when they could dig a bit deeper and find exactly what they were looking for. So, I harnessed my experience writting HTTP_REFERER logging systems for geeklog to provide myself with a Page with PHP enabled content to parse the Search Engine query from...

What is content management

Drupal is a content management system. This means it's a system for managing website content--like articles, photos, or other files. Drupal is a dynamic rather than a static system. Instead of being in pre-generated (static) files, content like the text on pages is stored in a database. When visitors bring up a page, a script runs on the web server, querying the database and putting the content of the page into a template. (Sometimes, to save time and resources, these scripts are run ahead of...

Collaborative book or documentation writing

The book organises content into a nested hierarchical structure. It is particularly good for manuals, Frequently Asked Questions (FAQs) and the like, allowing you to have chapters, sections, etc. A book is simply a collection of nodes that have been linked together. These nodes are usually of type book page, but you can insert nodes of any type into a book outline. Every node in the book has a parent node which contains it. This is how book.module establishes its hierarchy. At any given level...

Maintaining a FAQ using a collaborative book

Collaborative books let you easily set up a Frequently Asked Questions (FAQ) section on your web site. The main benefit is that you don't have to write all the questions answers by yourself - let the community do it for you In order to set up the FAQ, you have to create a new book which will hold all your content. To do so, click on the create content book page link. Give it a thoughtful title, and body. A title like Estonia Travel - FAQ is nice. You may always edit these fields later. You will...

Naming Conventions Functions and Methods

Functions and methods should be named using lower caps and words should be separated with an underscore. Functions should in addition have the grouping module name as a prefix, to avoid name collisions between modules. Private class members meaning class members that are intended to be used only from within the same class in which they are declared PHP 4 does not support truly-enforceable private namespaces are preceded by a single underscore. For example

How can I change Drupals character encoding UTF and Unicode

Several people have asked how to specify the character encoding that Drupal uses. The short answer is you can't, but you don't have to. Drupal uses UTF-8 for encoding all its data. This is a Unicode encoding, so it can contain data in any language. You no longer need to worry about language specific encodings for your website such as Big5, GB2312, Windows-1251 or 1256, . Also, when Drupal imports external XML data such as RSS or XML-RPC , it is automatically converted into UTF-8 iconv support...

How do I unset the clean urls

After enabling the clean urls in configuration all content is inaccessible, because the system you run drupal on, does not support all clean urls. Clean urls are those fancy looking addresses instead of www.server.com q foo bar you see www.server.com foo bar with clean urls. Problem is that you cannot set it back, because you cannot browse to the specific page anymore. The first one is very handy if you have mysql access. Run the mysql command UPDATE variable SET value 's 1 0 ' WHERE name...

The tolerant Base URL

Instead of using a hard coded domain as your base_url in the includes conf.php file, you might want to use base_url 'http' . _SERVER 'HTTPS' 'on' 's' '' base_url . ' ' . _SERVER 'HTTP_HOST' if dir trim dirname _SERVER 'PHP_SELF' , ' , ' This has the advantage that whatever domain the user used to get to the site, he will maintain throughout his session. Email notifcations may be issued under the domain which is used by the poster. If you access your site using http localhost, you could send...

Open SourceHost

OpenSourceHost is a specialized web hosting company focusing on providing quality web space and support for open source content management systems, as well as other open source software systems. For Drupal hosting, we provide graphical installation instructions, and if you take advantage of our special offer at http drupal.opensourcehost.com you will receive an additional 100 megs of space and 1 gig of bandwidth added to the hosting package of your choice.

Latest stories block

Here is a simple module which displays the titles of the last n changed stories in a block. It was made specifically for my site, and only works on 'story' nodes, though it would be easy to change this. Needs to be topped and tailed with php script open and close angle brackets. php - copy from here latest.module v0.1.0, John Clift, 11 Dec 2003 Module displays a block which lists the titles, linked, of the last five stories to be added or modified Database query to get the latest story nodes...

File permissions

related to Drupal 4.5.2, other versions might yield error messages like this warning mkdir files Permission denied in data www3010 public includes file.inc on line 77. warning mkdir files tmp No such file or directory in on line 77. This means that Drupal needs write access to create and later access the files and files tmp directories. One way to solve this is to give the webserver write access in the directory. Another common solution seems to be granting everybody write access to the files...

Drupal Coding Standards

Note The Drupal Coding Standards applies to code that is to become a part of Drupal. This document is based on the PEAR Coding standards. Use an indent of 2 spaces, with no tabs. These include if, for, while, switch, etc. Here is an example if statement, since it is the most complicated of them if conditionl condition2 actionl elseif condition3 amp amp condition4 action2 Control statements should have one space between the control keyword and opening parenthesis, to distinguish them from...

File directory management

Modules that are not part of core may or may not be supported by their contributor for a Drupal version upgrade. Create a sub directory in modules for each contrib module you install. This helps you track contributed modules vs included core modules. For example a module named foo.module would go in a sub directory of modules foo modules foo Rename or remove update.php from the root of your Drupal directory unless you are actually updating your site. There are protections for it in the update...

How to install a Patch

Patch thread, but I guess I'm missing something. Perhaps that's because it's about creating a patch, not installing a patch. Could someone please explain Does a patch patch the SQL tables Is patch a MySQL command or just a descriptive suffix If this affects the MySQL database, is there a way to install it using phpMyAdmin Does a patch patch the module file If so, how Is it a php program Do I ftp it and point to it with a browser What is it I'm not asking that I should be...