Year: 2008

  • Google takes down HuddleChat

    After a lot of hue and cry over the blogosphere over the similarity between Campfire and HuddleChat, a sample application for the Google AppEngine, Google team has decided to take down the app.

    huddlechat.JPG

    While I appreciate the quick action over the reaction of a lot bloggers, I find it pretty stupid. The web is full of examples of similar apps, and taking down one because it is similar to other, even though it is simpler and free, is just plain stupid. I have no idea why the bloggers took offense at it in the first place! While I do agree that the similarity was pretty obvious (from screenshots that is – never got a chance to use it), doesn’t the same logic apply to MS Office & OpenOffice??

    Come on people, grow up. People are going to develop similar apps, only that they would be easier to use and FREE – not paid. I was looking forward to using it 🙁

  • Experiments with Wiki

    This is a purely tech post, and so if you do not have a nerdy side, please skip.

    I have had to work with Mediawiki quite a lot in recent times. As I am not very well versed with PHP or the Mediawiki software in general, I have had to depend on the Wiki community at Mediawiki Forums. Its an amazingly helpful and quick forum and you would get you answers pretty quick. Just one advice. Try out your changes on a local setup.

    This post is a listing of the problems I have faced and how to tweak your way around it.

    1. Installation problem

    I was using 1and1 shared hosting to host the wiki. Also, I was first emulating all steps on a XAMPP installation on my system. I was able to install Mediawiki on XAMPP, but the installation failed on the 1and1 account. Google then came to resuce. I saw that many more were facing this problem. You would have to rename the config folder to config2 (or anything else you want), change permissions to 777. Then run http://www.youdomain.com/config2/index.php and take it forward from there. Also, you might need to create a .htaccess file with the following line:

    AddType x-mapp-php5 .php

    2. Restricted user access

    Due to some security concerns, I had to restrict the access to the wiki. Here is the what you need to do to disallow any unregistered user from accessing the wiki. Add the lines below to your wiki.

    $wgGroupPermissions['*']['edit']            = false;
    $wgGroupPermissions['*']['createpage']      = false;
    $wgGroupPermissions['*']['createtalk']      = false;

    3. Redirect to login page

    After you block unregistered users above, mediawiki takes you to an error page instead of the login page. To go directly to the login page make the following pages. Add 2 entries in Localsettings.php

    $wgUseAlternateLandingPage = true;
    $wgAlternateLandingPage = "Special:Userlogin";

    Also, make the following changes to index.php

    CODE BEFORE
    # Query string fields
    $action = $wgRequest->getVal( 'action', 'view' );
    $title = $wgRequest->getVal( 'title' ); // This is the line that is changed
    $wgTitle = $mediaWiki->checkInitialQueries( $title,$action,$wgOut, $wgRequest, $wgContLang );
    if ($wgTitle == NULL) {
    unset( $wgTitle );
    }
    
    CODE AFTER
    $action = $wgRequest->getVal( 'action', 'view' );
    $title = ( $wgUseAlternateLandingPage && ($wgUser->getID() == 0 ) ) ? Title::newFromText($wgAlternateLandingPage) : $wgRequest->getVal( 'title' ); //This is the line that is changed
    $wgTitle = $mediaWiki->checkInitialQueries( $title,$action,$wgOut, $wgRequest, $wgContLang );
    if ($wgTitle == NULL) {
    unset( $wgTitle );
    }

    4. Redirect after login

    For a reason that still eludes me, Wiki redirects to a stupid intermediate page instead of the page itself. To implement this make the following changes in SpecialUserLogin.php.

    Before:
    
    function successfulLogin( $msg, $auto = true ) {
    global $wgUser;
    global $wgOut;
    
    # Run any hooks; ignore results
    
    wfRunHooks('UserLoginComplete', array(&$wgUser));
    
    $wgOut->setPageTitle( wfMsg( 'loginsuccesstitle' ) );
    $wgOut->setRobotpolicy( 'noindex,nofollow' );
    $wgOut->setArticleRelated( false );
    $wgOut->addWikiText( $msg );
    if ( !empty( $this->mReturnTo ) ) {
    $wgOut->returnToMain( $auto, $this->mReturnTo );
    } else {
    $wgOut->returnToMain( $auto );
    }
    }
    
    After:
    
    function successfulLogin( $msg, $auto = true ) {
    global $wgUser;
    global $wgOut;
    
    # Run any hooks; ignore results
    
    wfRunHooks('UserLoginComplete', array(&$wgUser));
    
    $wgOut->setPageTitle( wfMsg( 'loginsuccesstitle' ) );
    $wgOut->setRobotpolicy( 'noindex,nofollow' );
    $wgOut->setArticleRelated( false );
    $wgOut->addWikiText( $msg );
    if ( !empty( $this->mReturnTo ) ) {
    $wgOut->returnToMain( $auto, $this->mReturnTo );
    } else {
    $wgOut->returnToMain( $auto );
    }
    //
    header('Location: ./index.php?title=' . $this->mReturnTo);
    }

    Also, incidentally this the first post from home. More regular updates expected.

  • Update

    I am back from the trip home. However, due to the work that has piled up, I haven’t had much time to post or do pretty much anything else. Plus we (Bansal and me) are shifting to a new flat over the coming weekend.

    Good news is that the new place has broadband so the internet activity would hopefully see a surge. Also, I saw The Bucket List yesterday; will review once I am free.

  • Sweet home..

    .. SIliguri.

    I am home for the entire next week. See you folks once I am back. Meanwhile, don’t forget to check out the F1 race in Australia this weekend.