locale

WordPress supports internationalization (i18n) and localization (l10n). A locale is indicated by the combination of the language and the region (usually the country). It is represented with ISO codes of the language and countries, e.g., en_US for US Enligsh, en_GB for British English and so on. US English is the default locale. locale global variable is used to store the current locale. It is set in the function get_locale() defined in [wordpress root folder]/wp-includes/wp-l10n.php.

WordPress uses this global variable internally to load the current locale. If the locale is not set already, it takes the value of WPLANG defined in [wordpress root folder]/wp-config.php. If that is empty it falls back to the default locale which is US English.

Plugin and theme developers need not use this global variable as it is part of the internationalization and localization framework. WordPress provides functions for translation.

Back to full list of global variables.

Technorati tags: , , , ,

Of WordPress Search

One of my biggest issues with WordPress is about its search. The default search is not really useful, neither does it show the relevancy nor does it search the entire content for results. In the entire content I include the excerpt and the custom fields of posts at the least. It will become a serious issue as WordPress is getting more attention from the corporate world, and might probably become a factor for its comparisons with other candidates. Even from the usability perspective, it is one of the most popular ways of getting information and cannot be ignored. I have found that it is not only me, there have been rants and inputs and contributions from various corners and from various angles. Here are some contributions and ideas from around the web:

Advanced Search by Weblog Tools Collection

Weblog Tools Collection has a nice plugin (through a hack) for enhancing the search. It provides fuzzy searches and some nicer integration in the WordPress.

However, I have a couple of problems with this plugin:

Search Reloaded Plugin by Semiologic

Denis de Bernady’s Search Reloaded Plugin is a more appropriate solution and is an actual plugin. The plugin actually does dynamic indexing. It reindexes whenever a post is edited, saved or published. This is fine, however, it will slow down the response for a heavier database. To be able to support this, indexing has to be carried out separately and probably as a scheduled task. However, it has its own complications and cannot be solved just through a plugin. And even this plugin does not look into other content types like the custom fields.

Latent Semantic Indexing

Elliott points towards Latent Semantic Indexing (LSI) for improving the search. It might not be a viable option today, but it might be future of the search industry. Natural Language Processing is already being used in certain search functionalities.

Using Google and Yahoo Search

Another option is using Google and Yahoo Search, something what WordPress.org search does. It is not very difficult to setup. However its problems lie elsewhere. It needs a public web presence, which might not be the case for corporate internal blogs. This has become more possible with the WordPress multiuser version out. Secondly, they will have their own restrictions, and thirdly the dependency on it. This is not going to help WordPress to make it a serious contender in the corporate space.

WordPress is one of the leading CMSs for building blogs. But blogs themselves have transformed into media publications and information management sites. With this happening, search will be a bigger factor to consider. WordPress has to support some solution inherently to be part of improved blogging solutions.

Technorati tags: , ,

Copyright Abhijit Nadgouda.

The Best Format For Blogging

Robert Scoble justifies why podcasting is sometimes better than plain blogging. Only recently technology developments have provided multiple formats for blogging – text, audio (podcasts, mp3, …) and visuals (photos, video, …).

I don’t agree with Scoble when he tries to promote podcasts by saying that they can be heard when driving or exercising. It sounds like one of the advertisements for promotional campaigns on TV. I would not like to listen to podcasts while doing something else, unless they are not important. It dilutes both the activities. I read feeds because the information is important to me, as it is with podcasts or videos.

However he is spot on when he says:

When I hang out with developers they tell me “use the right tool for the job.” If you want to communicate with other people text will do the job more times than not. But, if you want to reach people where they are likely to use an iPod then audio is better. If you have something visual, photos or video is better.

I think podcasts provide a unique combination of features that text blogging cannot serve:

  • excellent cohesive unit for conversations when more than one participants are involved, e.g., in interviews, debates, group discussions or public events
  • ease and convenience of recording with the new technologies in hectic places like public events or during travel
  • because it is easy, audio is one of the best formats for capturing interviews. Once recorded, transcripting the entire conversation can be lossy and tedious, providing the audio itself is quick and more straight from the horse’s mouth
  • listening becomes imperative when the content is about sounds and expressions, e.g., poetry or songs
  • listening to podcasts is infact quicker sometimes than reading because lot of times the context has to be built when writing, in audio the context is inbuilt

These would not have mattered some years back, but today there are blogs on all subjects and some of them warrant a better format than text.

Similarly, to express visuals, photo or video blogging is the best way. I would expect a photoblog from a photographer about photography.

A peripheral but technical problem is that accessibility suffers when it is purely in non-text formats. However, blogs are typically informal and the blogger has right to make his own decision.

However, it does not mean that everything should be podcasted. Text blogging has its own place, typically for content, entire or in parts, which you want to go through repeatedly. It is easier to ponder over when the text is in front of view and you can go back and forth without any additional conscious physical actions.

Your take?

Technorati tags: , ,

Copyright Abhijit Nadgouda.

is_IIS

Like is_apache, is_IIS is part of the web server detection. It is set in [wordpress root folder]/wp-includes/vars.php in the following manner:

$is_IIS=strstr($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') 
           ? 1 : 0;

As mentioned in is_apache, the server variable SERVER_SOFTWARE can be blocked by certain hosts. It can be forcibly set to 1 if WordPress is running on Microsoft IIS.

A classic example of using the server detection is the pluggable function wp_redirect function, which handles the difference between IIS and Apache redirects. Plugin and theme developers should similarly use it for web server specific features.

Back to full list of global variables.

Technorati tags: , ,

I Am Now A SOB!

Don’t frown, it is not the offensive abbreviation, it means Successful and Outstanding Blogs. Thanks Liz, for adding my blog to the SOB list and from now on I will be displaying the SOB badge on this blog.

So let me elaborate a bit on what is a SOB. Liz says:

When the SOB program started, I was looking for a way to encourage the sense of community that Successful-Blog stood for. The conversations were fun, fast, and sometimes irreverent. Discussions on the blog often brought up good ideas, and I wanted to make sure those ideas continued and become more out in the blogosphere–everyone making everyone a little bit better. It’s the only way that we can make ourselves strong here in what they call “The Magic Middle.” We talk to each other.

I know the SOB program will help increase visibility of this blog and will extend its reach. My part now is to continue blogging and the SOB program makes it easier for me as it also puts me in touch with so many other blogs and provides me with new topics and ideas to write about. I am glad that I am a SOB!

Technorati tags: , ,

Copyright Abhijit Nadgouda.

is_apache

is_apache global variable can be used to detect which webserver WordPress is running on. It is set in [wordpress root folder]/wp-includes/vars.php as part of the server detection code. It is set in the following manner:

$is_apache=(strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') || 
     strstr($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed')) ? 1 : 0;

is_apache is set to 1 (which means true) if the webserver is either Apache or Litespeed (WordPress.com, i.e., even this blog runs on Litespeed today), which means that both of them can be considered to be practically the same. The other webserver that WordPress supports is Microsoft IIS which is indicated using the global variable is_IIS.

It is possible that certain hosts block the server variable SERVER_SOFTWARE, which can cause problems in using permalinks. is_apache global variable can be forcibly set to 1 for an assured Apache/Litespeed webserver as advised here.

Plugin and theme developers can use these global variables for any web server specific features. One of the biggest features of WordPress – permalinks – requires identification of the web server.

Back to full list of global variables.

Technorati tags: , , , ,

Adaptive Websites – The Future Of Web

Web 2.0 has ushered in a new era of democratic usage of the Web. It is more focused on the user than its earlier version. This has pushed much more information, in many more formats, on the Web.

The Problem

Web is a major source of information today. However, it is also a source of information overload. It is not only the user generated content, but also professional publications like newspapers and magazines taking the online route. In addition to the stiff competition in the online businesses, Web is continuously changing and adapting to the demand by diverse users to display more relevant content. What is the best way to handle this? The answer lies in the not frequently mentioned concept of Adaptive Websites.

The First Bite

Carolyn Wei explains the concept by using Amazon.com as an example.

Adaptive websites use data provided by users and monitor their actions on the website to customize the content and layout that will interest the user, e.g., Lonely Planet could display more relevant weekend getaways by considering the user’s location or by understanding the typesof getaways prefered.

No, the My Yahoo! like portals are not adaptive websites, they allow the user to personalize content, but the onus is on the user. A website, by being adaptive, learns from its usage, learns from user’s experiences and adapts itself. The biggest difference in the two is the ability to learn and adapt. The result can transform the view including changes in the layout along with the content.

The Meal

To be able to serve a user, adaptive websites build the user information within themselves, called user models. The user models depend on two types of information:

  • information provided by the user voluntarily
  • information gathered by the website over a period of time of usage

The earlier one might comprise age, location, gender, profession or other deterministic factors, whereas the latter is more of an experience out of multiple interactions with the website. Users leave breadcrumbs of their visits, which can used to build information about their interests or likes. Sometimes the navigation options used by them can provide more information about related content or popular content.

However, it is difficult to track every single user like this. Adaptive websites use the technique of clustering to group users and build user models for that. Whenever a user visits the website, the cluster is identified and the corresponding user model is loaded.

To keep on improving the user model, continuous monitoring, data logging and mining of the log is required, which can affect the performance. It is possible that the user does not provide accurate voluntary information, in which case the adaptation will fail. It is therefore important that the user is explicitly told about significance of the information.

To think of it, this concept is applied in lot of places – some websites display the appropriate language depending on my language preference or the IP address in the HTTP header (internationalization and localization). Rojo, a feed reader, asks the user about his/her interests and provides the popular feeds in those interest areas. However this concept has to be applied to a much wider aspect of the website – its design and information architecture.

The Digest

Today, with online overtaking print, blogs being used for businesses and networking, and websites getting as common as the common man, it is important that the websites now start understanding the users rather than just recording them. The current path leads to Adaptive Websites which will adapt themselves for the user.

Technorati tags: , , ,

Copyright Abhijit Nadgouda.

Follow

Get every new post delivered to your Inbox.