I'm happy to announce my patch (in a slightly better form) is an official part of Geeklog v1.4!
Alas, there's still a problem! See, it's only good for sites that are
either one language based (the user can't choose anything else) or multilingual.
A site that lets you choose a language just for the overall feeling while in reality it has a content only in one language (like English [i.e. LTR] in geeklog.net) becomes
unreadable when a visitor chooses an opposite direction language (in this case, a RTL language)
(Don't try it in geeklog.net. They actually hardcoded LTR just for that problem. But you can see it in action in demo.geeklog.net).
Therefore, here's my new patch for Geeklog v1.4:
config.php (a new parameter):Text Formatted Code
$_CONF[content_direction] = 'ltr';
// Choose the direction of the primary content in your site.
// The choices are:
// 'ltr' (default) - if your content is written from left to right.
// 'rtl' - if your content is written from right to left.
// 'multilingual' - if you use parallel contents and at least one of them uses a
different direction than the rest. Note: only bother choosing this if you use the
multilingual content's patch!
The phrase if ($_CONF[content_direction] == 'multilingual') could even come in handy for the multilingual patch itself (it sure beats the current way to turn it on/off by having to comment/uncomment it).
public_html/lib-common.php:Text Formatted Code
// custom code - start
if ($_CONF[content_direction] == 'multilingual')
{
// custom code - end
if( empty( $LANG_DIRECTION ))
{
// default to left-to-right
$header->set_var( 'direction', 'ltr' );
}
else
{
$header->set_var( 'direction', $LANG_DIRECTION );
}
// custom code - start
}
else
$header->set_var( 'direction', $_CONF[content_direction] );
// custom code - end