Apr 28, 2009

When do you need cHash in TYPO3

cHash is one of the most mysterious and misunderstood parameters in TYPO3. There are several articles about cHash on the web (including my own, see below) but it still remains a mystery.

cHash is important for proper caching in TYPO3. Therefore I decided to write when you need it and when not.

When to use cHash

You need cHash when:

  • the content of the page depends on the parameter of the URL, and
  • you do not use conditions, and
  • you want the content to be cached

This typically happens in extensions. The extension must produce links with cHash if its output depends on the URL and the extension is of USER type.

When not to use cHash

You do not need cHash if:

  • you create a USER_INT (non–cached) extension
  • you generate different output using TypoScript conditions on the URL parameter
  • you limit pages or site content to various user groups

In other words, care about cHash if you write PHP code. Forget cHash for the rest of TYPO3.

Apr 27, 2009

A new TYPO3 security web site

There is a new web site dedicated to the TYPO3 security. It is created and managed by Marcus Krause, who is the most active TYPO3 security team member. Marcus is known for his strong position about security, his dedication to this work and attention to details.
I highly recommend this new site to anyone who is interested in TYPO3 security.

Apr 22, 2009

One day TYPO3 performance improvement

Just a fact: yesterday I was able to speed up one TYPO3 web site 7x times. I did it by optimizing TypoScript and web server environment. I guess I could do more but my customer did not want to touch one area that could speed up the loading a little more.

I like doing this kind of performance work. It is always a challenge and I like challenging work!

Apr 21, 2009

Stopping maintenance of some TYPO3 extensions

Since today I stop maintaining the following TYPO3 extensions:
  • Comments (comments / 1.5.2)
  • Comments: individual closing (comments_ic / 1.1.2)
  • Comments: IP blocking (comments_ipbl / 0.1.2)
  • Comments: report a bad comment (comments_report / 1.0.1)
  • Ratings (ratings / 1.0.10)
  • Login user tracking (loginusertrack / 2.0.3)
  • tt_news: most popular news (nc_ttnews_mostpopular / 0.2.3)
  • Yet Another Feed Importer (yafi / 1.0.7)

Apr 17, 2009

mnoGoSearch TYPO3 extension now ranks pages like Google

Yesterday I released a new version of mnoGoSearch TYPO3 extension. There are tweaks for better page rank calculation and some bug fixes. Now mnoGoSearch runs more Google–like. It ranks TYPO3 pages with keywords in titles higher than pages with keywords only in text.

Thanks to Netcreators for support and sponsoring!

Apr 15, 2009

Was your e-mail to typo3.org rejected?

Currently most mails to typo3.org e–mail addresses are being rejected. I must tell that this is not a rejection from my side, it is a technical issue on typo3.org side (none of my control).

However if you contacted me and it caused you any inconvenience, I apologize and kindly ask you to resend your e–mail to my other e-mail address.

Thank you and sorry again for any inconvenience caused!

Apr 13, 2009

Microsoft's msnbot acts crazy

Today I saw a number of requests from various Microsoft Addresses with msnbot/20b as user agent.
This msnbot behaves wrong. It requests sites that neither existed, nor exist, nor will ever exist on this server. Here is an example (caught by mod_security2):
--f59dce4f-A--
[13/Apr/2009:20:10:48 +0300] y67Xt38AAAIAAG26Z64AAAAa 65.55.106.206 48082 213.21.217.206 80
--f59dce4f-B--
GET / HTTP/1.0
Accept: */*
Host: lionessk.livejournal.com
User-Agent: msnbot/2.0b
Connection: Keep-Alive
Cache-Control: no-cache
Requests come from from msnbot-a-b-c-d.search.msn.com hosts, which belongs to the Microsoft Corporation. There are several requests per hour for non–existing host names. For example:
  • 65.55.106.114 — lists.hosef.org
  • 65.55.106.181 — sunsyria.com
  • 65.55.106.124 — opensource.become.com
  • 65.55.106.196 — 404.capitan-trash.com
  • 65.55.106.182 — pa2.php.net
  • 65.55.106.188 — www.server318.com
  • 65.55.106.133 — www.bagenlaw.com
And so on. There are much more entries.
Has someone infected msnbot with something?

Apr 11, 2009

Artificial intelligence

Artificial intelligence has grown a lot past years. While looking for some AI issues for one of my projects, I found a chat bot that can answer questions. The program uses PHP and MySQL. I spent nearly 10 minutes talking to bot and trying to confuse it. Questions varies a lot from simple to quite sophisticated. I almost failed. So I decided to write a final statement and give up. But this was the statement where the bot choked:

But in general it was very impressive how AI bot could communicate. Interestingly it did not repeat the same answers to same questions.

Apr 10, 2009

cbrealurl: preconfigure your RealURL

Michael Cannon from the Acqal TYPO3 agency created a very nice TYPO3 extension. This extensions preconfigures RealURL for other extensions. Here is the list of supported extensions:

Apr 9, 2009

HCI: bad error message example

I have several PHP IDEs installed and switch between them sometimes. I prefer Komodo IDE for most cases but sometimes I need Zend Studio (Eclipse–based). Today is exactly that day.

The problem

There are six TYPO3 projects in my Zend Studio workspace. I tried to close one and open another. Here is what I got from Eclipse:

Apr 7, 2009

TYPO3 SEO: keep your links working

One important and commonly overlooked way to make TYPO3 sites search engine friendly and well–ranked is too keep links working. In addition to SEO it also makes users happy: if they bookmark a page, they know they will get to the destination even if the page changes.

The problem

Most (may be all) content management systems do not offer any way to keep links working. When a page is renamed or moved, the site usually replies with a 404 error to search engines and regular visitors. Search engines remove a [well–ranked] page from the index and the site looses its position. Users become frustrated by a broken bookmark.

Automatic solution

Somewhat automatic solution exists for TYPO3. Latest versions of RealURL will redirect from old paths to new paths when the page is renamed in the Frontend. This works only for the renamed page, not for the subpages. Same principle works for moving: if the page is moved, old links will redirect to a new location.
The problem with this solution is obvious: subpages still show a 404 error.

Better manual solution

There are several ways to solve the problem. They work for different cases. There is no single preferred way. Everything described below has its own use case. Normally a site will use more than one of these ways to avoid broken links. Let's see them.

Apr 5, 2009

Screenshots from Google (sunday leisure post)

I do not like to work on weekends. Therefore I will not post high–tech articles as usual but just give two screenshots from Google. Here they are are:

Google Analytics Certified

I have passed the Google Analytics Individual Qualification test. Now I am recognized as a Google Analytics specialist. According to the test FAQ:
The Google Analytics Individual Qualification is a proof of proficiency in Google Analytics that is available to any individual who has passed the Google Analytics IQ test...
...While Google Analytics is easy to use for beginners, it's also a very powerful tool in the hands of knowledgeable users. Qualified users will be effective at leveraging Google Analytics within their organizations and at helping others to do the same.
Here is how the certificate looks like:

Apr 3, 2009

Creating a mobile version of a web site

Mobile phones become smarter at displaying the web. According to Google Analytics reports for several web sites, the number of visitors coming from phones grows every week. Therefore having a mobile version of the web site becomes an important business advantage. In this article I describe how to easily create a mobile version of the web site using TYPO3 and TemplaVoila.
The way is fully created by me (except for one regular expression that I will mention in appropriate time). Currently it works successfully at www.calis.lv web site.

Terminology

Every time when I use the "mobile user agent" term it means the same as a "mobile phone that can browse the web". There are no other specific terms in this article.

How to make a mobile version of the site

We are going to use a combination the following tools and technologies: