Most challenging project
January 10th, 2008These days I have lot’s of fun and blitheness

Add this blog to Del.icio.us, Digg or Furl | Create Watchlist for this blog
These days I have lot’s of fun and blitheness

On my search about if search engines like small site or big sites I found no satisfying answer. So I set up a little experiment on my own. I drive a lawyer directory with like about 20.000 pages for two years now. For search terms like “Rechtsanwalt Berlin” - I am aiming for city specific searches - I rank very well on the first SERP.
Now I set up special pages for the most biggest cities in Germany, having urls like rechtsanwalt–berlin (double dash - cause single was already taken for sure) and put three pages there. So it’s a real small site with a very specific topic.
Today - with this entry - I make it public and give em some PR power. In four weeks we’ll see how they do.
Rechtsanwalt Berlin
This is Germanys most biggest city. My current anwalt-seiten ranking on Google is 10. Now I started the special site Rechtsanwalt Berlin - let’s see what happens in like two weeks.
Rechtsanwalt Hamburg
This is Germanys second biggest city close to the North Sea. My current ranking on Google is 9. I set up the special site Rechtsanwalt Hamburg lately - let’s see what happens.
Rechtsanwalt München
This is Germanys third biggest city and I always have troubles with the “ü”. You probably now it from the Oktoberfest!
My current ranking on Google is 18. I launched Rechtsanwalt München view days ago - be patient…
I’ll keep you informed here.
Users told me they had problems with some online mail clients (like gmx and gmail) viewing mails sent with my MIMEMailxPHP4_V2 PHP class when cid (base64 coded inline) images are contained.
There was a bug initially found by Patrick Kränzlin. This bug is fixed now, you find the current (2.1.3) Version for download (it’s open source) here.
According to the RFC2111:
Note: in Internet mail messages, the addr-spec in a Content-ID [MIME] or Message-ID [822] header are enclosed in angle brackets (<>). Since addr-spec in a Message-ID or Content-ID might contain characters not allowed within a URL; any such character (including “/”, which is reserved within the “mid” scheme) must be hex-encoded using the %hh escape mechanism in [URL].
I forgot the angle brackets in version 2.1.2
Sorry for that!
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';
}
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 site is very much web2.0 like, that means it has
So, if you are addicted to Wii - come join us

I recently wanted to check my entries in dmoz and found some of my sites were kicked out. Why did they do this? Didn’t get any explanation for sure. They did some work like reorganizing the structure - or whatever. Well, I’m a little bit angry currently - but it doesn’t make sense anyway anymore (except for backlinks - is dmoz a huge link-farm?).
Do you know a single person that uses a directory to browse the internet? Don’t think so.. but if yes - she will not use dmoz more then two times. In the “rich subject tree” you’re everytime a dozen clicks away from your goal - and the choice is subject to ‘editors’, and what’s the relation to AOL? That’s exactly not what the democratic web2.0 is for.
Google claims a few hours to add an interesting new site to its index - the dmoz wants some weeks or months. So maybe we miss some important happening when using dmoz?
Thanks a lot to all the hundreds of thousands of editors that were building the biggest directory of the universe - I am afraid it’s out-dated now - you can not take the challenge of the rapidly growing web anymore.
Yahoo already gave up - when will dmoz power off?
Last 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.
After 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).
– just a note –
Will write about it next days.
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.
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 ""
...
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.
Go to Administer / Site building / Modules and activate the “Locale” menu.
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.
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.