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.


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

My First Ever Post On Someone Else’s Blog

Look at this! Well, not much, a post by me, about me, but on The Blog Herald. Thanks Matt for the opportunity, it felt good!

I am sure, for many of you this might not be something novel, but for me – a newbie blogger – it is a very satisfying feeling. A feeling that more people will read what I write, and of course that I will get more exposure. I have learnt a lot from the How I Blog series. It provided a chance to read about how others write, how they motivate themselves to write. Some of the posts have even seeded some ideas in my mind.

Since this piece I have expanded my reading list and have started using coComment to track my conversations. As I have mentioned in the post, I want to start blogs on a lot more topics but cannot fully commit to all of them. For now, I have started two blogs for now, however they are in beta, as I have not been able to define a schedule or pattern for them.


code::gallery is for my love of coding and programming. This blog is looks at the bigger picture of software development, but coding is still a dear topic to me. Lot of times the code design is not acknowledged and implemented. The posts on this blog will highlight the importance of code design in writing good software. I created this on Blogsome.com because I wanted some control on the theme to make it more appropriate for reading code. Currently it is sporting a theme designed by yours truly.

This is my other weblog. My main weblog is Abhijit Nadgouda @ iface. Starting this blog was really an impulsive decision. I love coding, I think it is not just a mechanical task. It is the aspect of software engineering that is closest to art. Coding is not only about syntax, a good code requires much wider knowledgescape. I will try to portrait it here in this blog.

I am also a language (of course programming language!) lover, I love learning new languages. I also like to analyze and come up with scenarios when ceratin languages are applicable. This has come from my understanding that programming language should never be the hindrance, rather the right programming language should be chosen for the job. I personally think, that a good programmer should always know more than one language, it brings in the other perspective.

The Two Bay Areas

The Two Bay Areas is about Mumbai and San Francisco. My experiences in both the places, comparisons between them will come out of this blog as an effort to improve Mumbai – to make it a better place. Mumbai should not be San Francisco, every city has its own color and value, but it can definitely adapt some of the ideas. This blog is hosted on Blogger for no specific reason – just because! But it is definitely fun to use more than one blogging tools, makes you appreciate the finer things.

Todate, I have lived my life in the two most popular bay areas in the world – Mumbai (Bombay) and San Francisco. I know the latter is called the bay area, Mumbai is not much different in what nature has given. The difference is how we humans have treated them. As naive as I am, I cannot help but compare the two. Through this comparison I want to bring out the good and bad in both the places, adopt the goods that we can and change aamchi Mumbai for better. I would like to know your opinions; and your contributions are welcome.

I have been blabbering about this to a lot of people, but haven’t been able to reach many yet. This is my second attempt at it, this time through writings instead of mouth. Hopefully the result will be different!

One more thing I want from this exercise is more feedback from the readers about my blogs. That is the only way I can improve myself. So, feel free to opine/comment/analyze/suggest/recommend (or any form of expression), I’ll be looking forward.

Technorati tags: , , ,

Copyright Abhijit Nadgouda.


post_meta_cache is one more global variable used for caching as WordPress. It is a multi-dimensional array which stores the custom fields for a post. The custom fields are stored by the post ID and then by the custom field key. Multiple instances of custom fields are allowed.

Plugin and theme developers need not access post_meta_cache directly, it is used by WordPress internally in the following internal and template functions.

Internal Functions

  • add_post_meta($post_id, $key, $value, $unique = false): adds custom field with specified key and value to the specified post. If unique is true, another custom field with duplicate key is not added. This can be used by developers who are developing plugins for the the admin area, especially for adding more information to the post structure.
  • delete_post_meta($post_id, $key, $value): deletes the custom field with specified key and value from the specified post.
  • get_post_meta($post_id, $key, $single = false): returns custom field value for specified key for the specified post.
  • update_post_meta($post_id, $key, $value, $prev_value = ''): updates the custom field value for specified key in the specified post.

Template Functions

  • get_post_custom($post_id = 0): returns all the custom fields for specified post as an array. If post ID is not specified, current post is considered.
  • get_post_custom_keys(): returns keys of all the custom fields for specified post as an array
  • get_post_custom_values($key = ''): returns all values of the specified custom fields key for specified post as an array
  • post_custom($key = ''): returns all the custom fields with specified key for the current post.
  • the_meta(): displays all the custom fields of the current post as a unordered list.

Back to full list of global variables.

Technorati tags: , ,

Is Internet Fueling Collectivism?

An amazing essay by Jaron Lanier about Digital Maoism delves into the behavior of collectivism and whether the Internet Age is fueling it. However, the core subject is much deeper than the digital world encouraging mob madness. It is about whether we can benefit from groupism and Wisdom of Crowds, and if so when.

As Lanier mentions, this collectivism is seen in many places, through participation of individuals. The American Idol (or Indian Idol), elections, Wikipedia and stock markets are some examples. However, there is primary difference in Wikipedia and the American Idol model. Wikipedia nurtures objective factual information, as against subjective opinions. The fact remains the fact and its truth is not influenced by who has written about it or how many have written about it. The strength of a group can influence how much information is available. What Wikipedia has done is make this immense information available by using a open group of authors rather than a closed one. If a piece of information is not accurate or right, it can be re-edited to reflect the truth. In other words, inaccurate information by authors is corrected by its accurate version. They are written by humans, errors are possible and will be corrected. However, the probability of correction improves with the number of people involved. It is not chaos, it is a system where inaccurate information is replaced by the accurate one which can be verified because of the objectiveness.

Wikipedia, an aggregator, does not mean that the individual authorities are undermined. They still are respected and are read. However, Wikipedia serves just as a singular storage of information and not is not intelligent in itself. But it serves as one of the best references to have.

On the other hand, American Idol model works on gathering votes based on subjective opinions and judgements from the common man. The tragedy is that people who do not have enough knowledge can not only participate but their vote gets counted, whether any other knowledgable person votes or not. Usually, a minority of the population is an expert on any subject. However, with votes being counted, the majority is always going to overrule the minority thereby throwing away the argument for merit. Surprisingly, this model has been replicated in many countries and even there the model is raking in money, which seems to be the primary goal. I haven’t seen the Indian Idols chosen improving their musical or performance abilities. However, the average talent that comes out of the model has improved, now there are more performers have exposure than before. The average beats the best!

While I agree that American Idol probably has the best business model and it brilliantly exploits the mob mentality, it is not a good example of collectivism bringing out the best. If I say, I don’t like a certain painting, that does not mean that the painting is not good, it is my subjective opinion, and the painting itself should not judged by it. A couple of years later I might change my perception and take a liking to the same artifact.

And there is also the blogosphere. Isn’t it an another form of collectivism? What blogosphere, as a whole, does is bring a subject in view of many others. Frankly, I would not have read this essay if it was not for the blogosphere. However, this neither means that the subject is important nor does it say whose opinions are important. It is entirely the onus of the individual to act and how to act on the information. This probably applies even in the stock market. The mob mania causes spikes or trenches in the sensex graph, but it is momentary. Whether to react to it or not will depend on the individual investor.

Elections are probably true processes of democratic participation by individuals to form a collective voice. However, there are multiple instances that they have completely failed. They have failed, not because collectivism does not work here, but maybe because the citizens did not have enough information, or enough did not participate or that they were completely rigged. However, this is another example, where the total number of votes might not bring out the best.

While discussing with a friend, what also came up was that not only the subjective opinion but also aspect of the subject might matter sometimes. In a software, the users opinions count a lot when its usability is being tested. I wonder how it will work if they are asked about the software engineering or the software process used for it. However, I see it works for usability as it is targetted towards the users and hence they are the best candidates for opinions on it. In this case, the proportion of the mass that reacted or opined is important.

Now to the more resident issue – is the internet fueling collectivism? We are seeing more and more aggregator models being used by businesses. The aggregator is a matter of convenience rather than intelligence. For example, it is convenient to read everything in one single place. Why they have worked in business models because they supply convenience, which is in demand by the users. If you look at Slashdot, it has been brilliant in reporting news that were not available in many places earlier. Sometimes even the discussions provide lot of value, but it never tries to snatch the credit or highlight from the original article itself. The aggregator model can build intelligence over and above the one provided by an individual, which is not harmful. In fact, collaboration between groups of people has also led to generative internet and community marketing as in case of Mozilla Firefox.

Whether collectivism is good or not, whether it works or not is more dependent on the subject it is applied for, and what it is used for. It, by itself, is not good or bad, its usage is. By nature, even this post is again just another opinion of an individual, probably even a subjective opinion and should not be counted as a vote.

Technorati tags: , , ,

Copyright Abhijit Nadgouda.


Get every new post delivered to your Inbox.