Following on from a previous note about Japanese and code igniter, I just found a Japanese language pack for code igniter on http://www.cilab.info/. There’s a Japanese turorial and user guide aswell if that takes your fancy.
Archive for January, 2008
Not long after the first time I arrived in Tokyo I noticed (amongst a vast array of other wierd and wonderful things) a common trend among the advertisements on the metro, TV and just about anywhere, and that was the ’search term’ call to action. Although most of the paper adverts will at least list a URL the real call to action is search box with the keywords inside and a mouse pointer hovering over the search button.
This struck me as a dangerous strategy - intstantly you’re telling your competition which terms to bid on and in many cases these terms are quite esoteric and not particularly hard to get natural rankings for. In fact I actually did a little experiment, and for the keyword of one particular advert I put up an almost empty page with the japanese keyword as the title and within a few weeks start receiving search traffic, I think the page still ranks about 6th (look for anglojapanese.net): search for てんるす.
However I have since come to the realisation that this search call to action is much easier for the Japanese customers to remember than a URL using the (less familiar) Roman alphabet, therefore it’s a risk advertisers have to take. So why not use japanese words in the domain? Anyone West of Turkey will be familiar with the heavy use of keyword domains - www.cheapfilghts.co.uk etc. Can’t the japanese do this aswell?
Well they can, as any ‘domainer’ out there will tell you, one has been able to register “International Domain Names” (i.e. domains with non-roman alphabets - chinese, cyrillic etc.) for a number of years now. But (a big but) good old microsoft have only started to support use of IDNs with IE7, so this is probably a key factor.
Anyway I would expect this trend to change in the near future as IE6 usuage shrinks while more modern browsers with IDN support, such as firefox and IE7 take hold. So I’d hazzard a guess Japanese Language urls start cropping up on the metro ads. In fact I’ve taken a punt myself: インテリアアート.jp
オフショア.jp
モダンアート.jp
アート販売.com
オフィスレンタル.jp
水彩.jp
現代作家.com
ネットギャラリー.jp
Wikia Search having launched into Alpha today has received a number of negative reivews, but I these reviewers are clearly missing the point. I would forgive them for not understanding what an “alpha relase” is, but the apparent tech centricity of their publishing sites does not allow such concession.
When I heard Mr Wales speak at the FCCJ in Tokyo last April, I was inspired by his plans for an open search engine. Clearly the key point behind Wikia Search is to built a platform based on openess and to share the technology with the world. To compare an alpha release of this bold project with Google is like comparing a spritely toddler with a top olympic athlete as though they were both adults.
Anyway Jimmy posted a response on the tech crunch article which eloqently makes this point:
Release early, release often.
It’s a project to *build* a search engine, not a search engine. We’ve been telling everyone that constantly. I’m sorry Michael’s disappointed, but having said that, we didn’t build it for him, but for people who think that openness, transparency, and participation are more important than slick releases.
When I launched Wikipedia, I wrote at the top of the first page “Wikipedia, the free encyclopedia”. On that day, anyone reviewing it would have laughed. What’s this? There’s nothing here! This is not an encyclopedia, it is an empty website with some funny editing syntax!
So the comparison to Google on day one is just mistaken. Google didn’t launch a project to build a human-powered search engine, they launched an algorithmic search engine with a clever new idea. So they didn’t have to wait for the humans to come in and start building it.
We aren’t even running with a real index yet, just a placeholder index. Yeah, the search sucks today. But that’s not the point. The point is that we are building something different.
Adding a user to phpbb3 from an external script
Published by January 5th, 2008 in webmastering. 31 CommentsSo working on a phpbb2 -> phpbb3 upgrade this weekend and the final part was updating the script to sync my applications user table with phpbb3, so users of my application automatically have an account on the forum with the same credentials.
phpbb3 has a new password handling system so it’s not so simple to write raw queries to insert/update the phpbb database. Instead, after a little research I opted to use phpbb’s own functions to add a new user. As noted here and here you can call the user_add function from includes/functions_user.php. This works fine until you want to call the function from inside another function as noted on the above links, it’s a little tricky getting it to work.
I managed to come up with a fairly simple solution - you need to declare a number of key variables as global at the top of your function so they are in scope when you include the phpbb files.
define(’IN_PHPBB’, true);
/* set scope for variables required later */
global $phpbb_root_path;
global $phpEx;
global $db;
global $config;
global $user;
global $auth;
global $cache;
global $template;# your php extension
$phpEx = substr(strrchr(__FILE__, ‘.’), 1);
$phpbb_root_path =; /* includes all the libraries etc. required */
require($phpbb_root_path .”common.php”);
$user->session_begin();
$auth->acl($user->data);/* the file with the actual goodies */
require($phpbb_root_path .”includes/functions_user.php”);/* All the user data (I think you can set other database fields aswell, these seem to be required )*/
$user_row = array(
‘username’ => “Username”,
‘user_password’ => md5(”Password”), ‘user_email’ => “Email”,
‘group_id’ => $default_group_id,
‘user_timezone’ => ‘1.00′,
‘user_dst’ => 0,
‘user_lang’ => ‘en’,
‘user_type’ => ‘0′,
‘user_actkey’ => ”,
‘user_dateformat’ => ‘d M Y H:i’,
‘user_style’ => $not_sure_what_this_is,
‘user_regdate’ => time(),
);/* Now Register user */
$phpbb_user_id = user_add($user_row);
