Add this blog to Del.icio.us, Digg or Furl | Create Watchlist for this blog

Archive for the ‘CMS’ Category

New Drupal company site on air

Tuesday, November 13th, 2007

Website der proxiss GmbH MünchenLast weeks I was working on a new Drupal driven company site. This time I wanted to create my theme from scratch (calles “ANewCompany”) and wanted to use heavy taxonomy for cross linking.
The site is on air now and promises professional web2.0 programming (German).

On the site I use following modules:

Blog, Book, Forum, Poll - for content creation
Comment, Contact - for visitor interaction
Drupal - for site registry
Locale - for string translation and adjustment
Menu, Path - for site navigation
Taxonomy - for cross linking and navigation
Search - for site wide full text search
Statistics - for access statistics
Akismet - for spam protection
Comment mail - for admin notifications
Service links - for social network linking
TinyMCE - as wysiwyg editor
Views - for some data mining and block representation
Fivestar, Voting API - for content voting

I developed a new page.tpl.php template where I’ve foreseen the regions as follows

  function ANewCompany_regions() {
      return array(
	  'header' => t ('header'),
          'content_top' => t('content top'),
          'content' => t('content'),
          'sidebar_left' => t('sidebar left'),
          'sidebar_right' => t('sidebar right'),
          'content_bottom' => t('content bottom'),
          'footer' => t('footer'),
          'super_footer' => t('super footer')
      );
  }


For the sidebars I use a table-less floating CSS layer concept for reasons i.e. stated here.
In my template.php file I overwrite theme_links for primary_links (to achieve rounded tabs as primary navigation) and the book navigation theme_book_navigation($node) to make it more nice. Special theming for blog and book content is done by node-blog.tpl.php and node-book.tpl.php files.

Next days I will working on a generalization of the theme to contribute it to the drupal theme repository.

Offering professional Drupal service

Saturday, October 6th, 2007

Rainer Feike Drupal ServicesAfter some months work with the fabulous Drupal system I have decided to offer professional services for that CMS in Germany. Based on Drupal 5.x I have created four websites last months, one for a community in the real estate business, one for stock investors and two drupal company sites.

I am really good in techniques like hooks, callbacks, templates and modularization from my business experience of the last years with C, C++, JAVA, PHP … on Unix and Windows. So it was pretty easy to get deep into Drupal (also thanks to my experiences with Wordpress and b2evolution as CMS’s). Drupal is fantastic.

Certainly, I will contribute my results (as far as allowed by my customers) back to the Drupal community as open source - and, if requested, I am willing to donate time and work to a German or international Drupal project. And to support the Drupal association with money, I will donate 5% of each Drupal related turnover (must check this against German tax laws first, probably I will have to use that 5% for advertising on drupal.org).

Drupal 6 entered beta stage

Wednesday, September 26th, 2007

– just a note –

Will write about it next days.

Drupal localization and string adjustment

Monday, September 17th, 2007

Sometimes when setting up a drupal site, the situation appears, that I need a “special translation” for a standard module. I.e. I need a blogging functionality - but I don’t want to call the system a “blog”.
That’s when I need a customized translation of the blogging module. This article is about how to customize drupal strings with the localization feature.

Find the strings to translate

What you need first the the GNU gettext package (it’s contained in every linux distro). From this package you need the program “xgettext”. This program is able to extract the strings from the module code that can be translated (if the module is programed very well, this should be all strings in the code).
Now go the the module’s location (usualy /modules/blog) and type:

xgettext.exe --keyword=t -L PHP blog.module

The L tells xgettext, that this code is PHP code, the keyword tells xgettext, that function “t()” is used for gettext translations. The output of xgettext is by default a file called messages.po. This file contains all translateable strings of blog.module.

...
#: blog.module:137
msgid "Post new blog entry."
msgstr ""

#: blog.module:140
msgid "You are not allowed to post a new blog entry."
msgstr ""

#: blog.module:178
msgid "RSS - blogs"
msgstr ""

#: blog.module:222 blog.module:257
msgid "Blogs"
msgstr ""

#: blog.module:239
msgid "@username's blog"
msgstr ""

#: blog.module:261
msgid "My blog"
msgstr ""

#: blog.module:277 blog.module:286
msgid "Recent blog posts"
msgstr ""

#: blog.module:285
msgid "more"
msgstr ""

#: blog.module:285
msgid "Read the latest blog entries."
msgstr ""
...

Translate the strings

Keep each string in messages.po that you want to translate, delete the one’s you don’t want to translate, rename the file to i.e. myBlogStrings.po. Now put your translation of each string into the “msgstr” field.
I.e.

#: blog.module:222 blog.module:257
msgid "Blogs"
msgstr "Articles"

#: blog.module:239
msgid "@username's blog"
msgstr "@username's articles"

#: blog.module:261
msgid "My blog"
msgstr "My articles"

Then save the file myBlogStrings.po.

Activate the drupal localization module

Go to Administer / Site building / Modules and activate the “Locale” menu.

Import your “translation” of the blog.module

Go to Administer / Site configuration / Localization and choose “importing a translation”.
Use the file selector to choose your “myBlogStrings.po” file, choose to import to your current language (most times it’s english (en)). And check “Strings in the uploaded file replace existing ones, new ones are added”. Then import the strings with button “import”.

You’re done, your blog is now a article collection.

Things to watch out

The character-set of your file must be correct (i.e. UTF-8). That means, you need an editor that’s capable of saving files in UTF-8 (I use PSPad) and don’t forget to change the CHARSET in line “Content-Type: text/plain; charset=CHARSET\n” of the xgettext program’s output.

Started New Drupal Project

Wednesday, August 29th, 2007

I’ve started a new Drupal project in the DAX Investment business. It’s kind of “pre-alpha” but it’s already a very interesting project from a technology view. It will contain blocks with high dynamical image content as well as stock quotes. So I will need to look somewhat deeper to caching technology and AJAX.
It will also contain community features like blogs and a forum, so there’s also lot of work to do with taxonomy.
I’ll keep you informed.

Five most important drupal modules

Sunday, August 26th, 2007

drupal rules Drupal ships with a lot of necessary modules like Blog, Forum, Taxonomy, Poll, Locale …
They do most necessary tasks when building a website. But some modules I frequently need are provided by third parties.

Here is my list of five important third-party modules when building a site with drupal:

  • CCK - The Content Construction Kit allows you create and customize UI fields that can be added to any content types (Example: When building a song review database you could add a field like “Best top-ten rating” to your song-review content type.).
  • Views - The views module provides a flexible method to control how lists of content (nodes) are presented. It is essentially a smart query builder that, given enough information, can build the proper query, execute it, and display the results - including but not limited to CCK fields (Example: Create a node that displays song title and best top-ten rating).
  • Google Analytics - sophisticated integration of google’s urchin tracker code for your drupal site.
  • Google AdSense - Very good integration of Google AdSense for drupal. Allows grouping by ad format and utilization of Google’s ad channels.
  • Meta Tags - Even if Google ignores meta, it might be important once. At least there’s no harm. This module allows you to set some meta tags for each node, view or panels page.

Other webmasters, other opinions, so here are some links to several drupal module top lists:
Troy Schneider’s top ten
Daan’s list of used drupal modules
A SEO view on modules from fiLi
And 5 musts from Keith’s marketing perspective