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

Archive for the ‘Drupal’ Category

Created a dark Drupal Theme

Sunday, June 28th, 2009

On my track to become a designer I released my first general drupal theme now. It a pretty dark theme that supports most core modules. Live test is available at http://www.gothnics.de.

Screenshot of the dark drupal theme - adarkproxisstheme

Next in queue

Thursday, March 19th, 2009

EQUIRA logo
Actually I’ve lot’s of projects in my “web-queue” - but my favorite is EQUIRA. EQUIRA is a stock chart analyzer C++ software I wrote in 1999. It’s full of AI and FUZZY and GA (that’s Artificial Intelligence, Fuzzy Logic and Genetic Algorithms).
With the today available hosting technology and prices it’s ready for a public offering as webservice and a Drupal frontend for subscribers.

Stay tuned…

Another new Drupal 6.x project

Friday, January 9th, 2009

isartal.info Screenshot Thumb

Yesterday we went to public with another very complex Drupal 6 project. It’s kind of a “local collaboration” platform with classical news attributes.
Pretty much of the business is done in a self-developed module but we also use lot’s of contributed modules from Drupal.org:

cck - to create content types
checkbox_validate + legal - for registration issues
computed_field - for workflows and hidden attributes
content_taxonomy - for taxonomies in cck types
event - for events :-)
fivestar - for content rating
flag - for flagging content for several reasons
flatcomments - to avoid comment-threading
image - for images
masquerade - for testing
mass_contact - for mailings
nice_menus - for some dropdowns as second level navigation
pathauto - for nice URLs
privatemsg - for user postboxes
quicktabs - for tabbed blocks in the sidebar
user_stats - for some forum enrichments
views - for customized views on cck types
votingapi - for fivestar
workflow - for workflows like published purchased content

… puh, that’s a lot - and there are still some modules missing.
Maybe you wanna take a look at isartal.info?

New Drupal 6 Project

Thursday, November 6th, 2008

I’ve started to “refactor” my German IT consulting webpages with Drupal 6. Although the update frequency of V6 is still pretty annoying it’s a very stable system already. Most important contributed modules are at least in beta state.
I did a new theme from scratch and thereby got great support from the “devel” module and it’s “theme developer”.
The project runs on a multisite installation together with nine other D6 sites now.

Again I was using

  • cck - for my project type and listings
  • views - for :-) views
  • date - for cck date fields
  • token and pathauto - for url naming
  • image - for attached images

And as always I’ve written a supporting module to provide some data (like a month name array) and blocks.

Installing Drupal 6 “upgrade save”

Friday, April 11th, 2008

Drupal is upgrading very frequently. Specially nowadays as V6 is out for a view weeks. If you don’t want to get mad upgrading Drupal every other day - here are some hints to follow when installing Drupal6.

Most important: If you have more sites running on one server: Do a multisite installation!

Assuming you have your Apache root at /srv/htdocs do the following:

  1. Download Drupal 6.1 and tar xvzf it in /srv
  2. Now you have /srv/drupal-6.1
  3. Create a symlink like ln -s drupal-6.1 drupal
  4. Now you also have /srv/drupal (pointing to /srv/drupal-6.1)
  5. Now create a symlink for apache: I.e. ln -s /srv/drupal /srv/htdocs/drupalweb and let your virtual domain (or where ever Drupal will run) point to /srv/htdocs/drupalweb as httdocs root.

Your ready with your update-prepared ionstallation.

When an upgrade to Drupal 6.2 appears (it did view days ago), do the following:

  • mysqldump your drupal database (just for security and possible rollbacks)
  • copy cp -r -p /srv/drupal-6.1 /srv/drupal-6.2 the 6.1 to the new 6.2 installation (so you can rollback if necessary)
  • in /srv/drupal-6.2 preserve your sites directory by renaming it, i.e. mv sites sites_old
  • now, in /srv untar the 6.2 distribution tar xvzf drupal-6.2.tar.gz
  • remove the new sites dir and move back your preserved: rm -r sites, mv sites_old sites
  • now relink your master: rm /srv/drupal; ln -s drupal-6.2 drupal
  • and browse to update.php of your site.

Keep in mind to check, if there’s something important new in settings.php…
And with this kind of installation you are perfectly prepared for multisite! And for sure it doesn’t work with MS scrappy OS’s.

And have fun!

Feeding “static” sites from Drupal nodes

Tuesday, February 26th, 2008

This is about how I manage to create content for domains without CMS from a Drupal enabled domain without any manual work.

On address www.immobilien-spot.de I am running a community for real estate agents. It’s primary focused on Immobilien in München (that’s German for real estate in Munich).

Estate agents can become members, can show 10 of their best buildings and act like usual in communities (Blog, Forum, Contact…). Additionally the agents can book a special site to promote one of their offers, i.e. an office loft for rent. This office loft is shown in the offer list and also on a static site called officeloft.de (this is an example, I don’t own that domain). To feed the content of officeloft.de from the Drupal content on immobilien-spot.de, I’ve established a special node type called a “promotion”.

A promotion node consists of a node-ref (pointing to the estate offer node), an entry place (office-loft.de) and a booking period (March 2008). To render the promotion node completely different from all other nodes, I have installed the sections and pathauto modules for Drupal. With pathauto one can automatically create special paths for nodetypes, and with sections.module one can assign special page.tpl.php for this path.

What’s left is to have a nightly cronjob that copies the rendered promotion node to the special site’s http-root directory (what should be a subdirectory of the main domains http-root - else you have to struggle with your OS). And finally transpose all of the relative path’s inside the copy to be absolute.

Have fun!

Drupal: Using node and user information in block code

Monday, January 7th, 2008

This is for Drupal 5, don’t know if it works also in version 6.

Usually block content is not related to the currently displayed node. I.e. the block that displays the recent blog posts always displays the same content, regardless of on what page you are currently looking.
I often had situations where I wanted the block content to be related to the currently viewed node. To keep the example: When viewing a blog post, I wanted a block to display the most recent post of the author of the currently displayed post, and additionally print some profile fields like age and a gravatar.

The key to achieve this goal is the Drupal arg() function. This function returns the components of the currently viewed path before any URL aliasing. So if you view the node 5, that is yourdomain.com/node/5 (and sometimes a trailing “view”), you will get following results from function arg():

arg(0) -> "node"
arg(1) -> "5"
arg(2) -> "" or "view"

Now, if you want to get some information about node 5, you use node_load(). And to get information about the user that is the author of node 5, you use user_load().

In PHP code it works out like:

if (arg(0) == 'node'
    && is_numeric(arg(1))
    && (arg(2) == '' || arg(2) == 'view')) {
 $node = node_load(arg(1));
 if (is_numeric($node->uid))
   $user = user_load(array('uid' => "$node->uid"));
 ... do something with $node and $user here
}

BTW: If you need this a lot, you should consider writing a module for your content type :-)

To make a useful example out of it…
I use the following “debug-block” while developing to view my node and user objects:

if (arg(0) == 'node' && is_numeric(arg(1))
    && (arg(2) == '' || arg(2) == 'view')) {
 $node = node_load(arg(1));
 if (is_numeric($node->uid))
   $user = user_load(array('uid' => "$node->uid"));
 print "node object<br>";
 foreach ($node as $k => $v) {
  print "[$k] = $v<br>";
 }
 print "<br>user object<br>";
 if ($user) foreach ($user as $k => $v) {
  print "[$k] = $v<br>";
 }
} else {
print 'not a node';
}

Started Beta of new Wii Community based on Drupal 5.3

Wednesday, December 5th, 2007

Yesterday I stared the beta run (this is very 2.0 webish) of my wiiclub project. It’s a community for Wii Gamers in German. It makes extensive use of lots of Drupals community features, like i.e.

  • the userpoints api
  • the fivestar rating
  • the buddylist module
  • the chartroom module
  • lots of image galleries
  • features cck types like a “game report”
  • uses forum, blog, poll

The site is very much web2.0 like, that means it has

  • community features
  • bright colors
  • orange button with gradient
  • gradients in backgrounds
  • big primary navigation
  • a star like beta-batch
  • rounded corners
  • centered non-table layout
  • cute icons
  • clear breadcumb

So, if you are addicted to Wii - come join us :-)

bildschirmfoto-wii-club.png

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).