Showing posts with label drupal. Show all posts
Showing posts with label drupal. Show all posts

Drupal Small Guide & Arquitecture

While looking for some specific Drupal architecture information, I came across this small, focused tutorial.
I recommend it for beginners: Tutorial Drupal.

I also find what I was looking for:
Specially using Oracle database as the data repository for Drupal:
./M6

Drupal makes people life harder.

Out of the box Drupal is not very good.
Actually, it is quite over simplistic...

When I see a piece of software, I instantly assume that it will be helpful to some people, but Drupal philosophy is quite the oposite, it deliberately makes people life harder.
When one installs a Drupal site, most people will not get a solution, they'll just get more problems to solve.
Drupal states to be, and I quote, "an open source content management", but after it has been installed, it's totally useless since no one can really manage any content except text. And let's be fair, in the 21st century, supporting only text is extremely limited.
So, in order to support other types of content, one has to install plugins, the same plugins that should already come in the Drupal core system.

Another mistake Drupal makes is it's lack of support for common SEO stuff. In such a competitive world, it's a total fail not to support meta tags out of the box, again, another plugin is required.

Only after a considerable set of plugins has been installed, activated and configured, Drupal starts to be useful.
I consider such philosophy a real mistake because Drupal misses the whole point of software making people life easier. With such a plug-in world, Drupal makes people life harder.
Sometimes it actually states "go and use Joomla!".

./M6

Drupal shows only front page

Trocaqui has gone "mad".
It was working fine and, suddenly, it started to show the front page, no matter what link I selected nor what address I inserted in the address bar...
This was so critical that I could't even login into the system to put the system on maintenance mode while fixing the problem...

I've researched and it look to be an Apache mod_rewrite problem.
It started to look like a clean URL problem so I decided to try the non-clean URL format and voilá, Drupal started to responde correctly...
Using the /?q= format I was able to login, set the system in maintenance mode and disable the clean URL format.
By now, I was at least able to manage it.

When in a similar situation, just change the clean URL with the standard Drupal format, it's actually quite easy. Just insert a ?q= between the first / and the following character.
Here's an example: http://www.trocaqui.net/forum is equivalent to http://www.trocaqui.net/?q=forum.

While this was good enough as a starting point, it was not the best solution, thus I continued the quest for the real solution.

I cloned the production site on my testing environment and was able to reproduce the problem, which is a great first step.
While analyzing the problem, I've found out that my .htaccess was broke and tried to fixed it following the steps of others that had .htaccess and Clean URLs problems.
Once the clean URLs were disables, I was unable to set them on again since Drupal tests clean URLs and only allows them to be activated if they will work.

Here's what worked for me, I edited the .htaccess and fixed things by setting the following:
  • RewriteEngine ON
  • RewriteRule "(^|/)\." - [F]
  • RewriteBase /
  • RewriteCond %{REQUEST_FILENAME} !-f
  • RewriteCond %{REQUEST_FILENAME} !-d
  • RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Have special attention to the RewriteEngine ON, it may be case sensitive.

I hope this is helpful for others with a similar problem.
./M6

Drupal contact limitation

I've just set up a Portuguese speaking item exchange free service, named Trocaqui, based on Drupal. And I'm, obliviously, the website administrator.

I was contacting some of the earliest registered users when Drupal showed the following message:
Não pode contactar mais do que 3 utilizadores por hora. Por favor, tente novamente mais tarde.

It means "You cannot contact more than 3 users per hour. Please try again later.".
What kind of stupid limitation is this? I do understand this limitation when applied to common users, but the administrator?
Seriously, why can't the administrator use his own system without artificial limitations?

I've searched the subject and found out that, obviously, I was not the only one complaining about this for years, and there is no real workaround for it. So, I've just increased the number of messages per hour and will have to reconfigure it back when I finish the user contact task.

./M6

Free Cheat Sheets for Developers

Here's a set of free cheat sheets for developers: http://refcardz.dzone.com/
There's lot of information about Drupal, Java Concurrency, Java Server Pages, Maven, JavaFX and a many more.

./M6

Setting up Drupal

Here's a quick guide for Drupal installation and configuration with a minimum of useful base components.

To exemplify, I'll use Lampp, but for Xampp it won't be much different.

Before you start, go to your php.ini file and increase the memory_limit parameter to, at least, 16 megabytes and restart your webserver in order to apply the changes. This amount of memory is usually enough, but when in trouble, use a bigger value, like 24 or 32.
The php.ini file location depends on your system. In Lampp, for instance, it is in /opt/lampp/etc/php.ini, in Windows it is somewhere under the apache directory.

First, get the latest version of Drupal, currently 6.10.

Uncompress the .tar.gz using tar -zxvf drupal-6.10.tar.gz and copy its contents into the web server web site location.
From now on, the Drupal install location is referred only as {install_location} and the web site will be referred as {mywebsite}.
A Lampp/Xampp example of the {install_location} would be {lampp}/htdocs/{mywebsite}.

If you want Drupal in diferent languages, get the necessary translations for your Drupal version. Uncompress the files and copy the contents into the Drupal install location. Using the previous example, the file contents go into {install_location}.

Copy the {install_location}/sites/default/default.settings.php file to {install_location}/sites/default/settings.php, i. e., make a copy of the file in the same directory and rename it to settings.php.
In the same location, create a new directory named files and make it writable.
Under Linux, both settings.php file and the {install_location}/sites/default/files directory must be writable, therefor perform a chmod +w to both.

Access your database engine, currently MySQL and PostgreSQL and create the database and correspondent user and password for the created database.
This has to be done because Drupal installation does not perform the database creation.

Assuming there's a web server already running on localhost, install Drupal by pointing your browser address to http://localhost/{mywebsite} and just follow the installation wizard. In the database configuration remember to refer the previously created database and user.

After the creation of the database fill in the site configuration information and save the changes.

The installation should finish without trouble. At the end, there is a link pointing to your new site. Just click on it and you will be redirected to the web site using administration credentials.

But that is raw Drupal installation. Usually one wants a nice template a WYSIWYG editor, an integrated content media management, so that one can upload videos, pictures and other documents.
Some of these modules actually should already be part of the Drupal default modules and should already be configured for default usage.

The add-on modules and themes go into a special directory, they are not mixed up with the default modules nor themes, and they have a standard installation procedure. The themes go into {install_location}/sites/all/themes/ and the modules go into {install_location}/sites/all/modules/. These directories do not exist on a new Drupal installation. When using Linux, do not forget to give the appropriate access permissions to these directories and its contents.
When in doubt, read to the module or template documentation.

Start with the template, get a template for your Drupal version and download it. Uncompress it and copy its contents to {install_location}/sites/all/themes/{newtheme}. It is possible to and install as many themes as necessary.
To select a new theme, go to the menu option Home › Administer › Site building, mark the desired template as the default nd press the Save configuration button.

Installing a WYSIWYG HTML editor requires two modules, the base WYSIWYG API module and an HTML editor, like FCK Editor. Uncompress the WYSIWYG API module file and copy its contents into {install_location}/sites/all/modules/wysiwyg. As a curiosity, the {install_location}/sites/all/modules/wysiwyg/editors directory have all the supported HTML editors, there is an .inc file for each supported editor.
To install the FCK Editor, uncompress the file and copy its contents into the editor directory inside the WYSIWYG API install directory, {install_location}/sites/all/modules/wysiwyg/fckeditor.

To activate the HTML editor module, go to the menu option Home › Administer › Site building, enable the Wysiwyg user interface module and press the Save configuration.

To configure the HTML editor, go to the menu option Administer > Site configuration > Input Formats, press Add input format. Name it Default HTML Editor, select both roles, and disable HTML filter, Line break converter and URL filter. Press Save configuration button, go back to Administer > Site configuration > Input Formats and select the Default HTML Editor as the default HTML editor.

Now setup editor profiles in Administer > Site configuration > Wysiwyg menu option.
Select FKCEditor (version) for all Input formats and press Save.

There are many available modules for many extra functionalities. A recomended administration module is the Administration Menu, witch provides easy and fast access to administration items.

For instance, if you're looking for an e-commerce solution, check out Ubercart. To set it up, check the How to make an online store look great with your new theme from TopNotchThemes and the Ubercart User's Guide for a quick start.

./M6

Evaluating open source CMS

I've used Mambo, then I've changed to Joomla! and, more recently, I've evaluated Drupal, after discussing open source CMSs with a friend, and I've concluded that it suits me better.

When one has used other CMSs before, the comparison is inevitable.
But this time I had the change to perform the comparison with non-technical people beside me.

Here's an overview of the conclusions.

Overall, Drupal is less user friendly when it comes to system management and it's event less attractive, as I've seen non-technical people saying they liked Joomla! better because it looks nicer. And they are right. Drupal is by far the less attractive and the hardest to manage of the three.

While a module installation in Drupal requires manual intervention like unziping and moving the files to the correct location, which is not always straight forward and is much less error-free, Joomla! and Mambo haver a nice management GUI where one can upload, or specify the URL, of the component to install and everything is easy and straight forward. Some Joomla! add-ons, like internationalization, are usually manually installed, but that seems a non-issue by non-technical people.

When it comes to content management I find Drupal more goal oriented, while in Joomla! to publish something one has to make a lot of mouse clicks. But even though, non-technical people prefer the looks over the functionality, and even here Joomla! wins for most people.

Regarding other functionality, like menu creation, component configuration and placeholder content definition, I find Drupal easier and, again, more goal oriented.

After some reasoning about what would be the best CMS for me, I've decided to move to Drupal, even if I have to live with manual intervention and use a less attractive management look.

./M6