WordPress Plugin for Bengali WordPressians (?)

Ah ya, let me call you WordPressian if you are a wordpress fan. Last night I developed a small plugin for bengali wordpress users. If you install this plugin you will be able to write in Unijoy, Phonetic and Plain English mode. You will get three buttons as shown here
editor.gif

Then you can type Unicode on se,ecting either UniJoy or Phonetic
editor2.gif

And you can write english anytime by clicking English button or pressing Control+C

editor3.gif

Thats it. I will release this plugin under Ekushey.org by Tomorrow

Thanks Omi Azad

Day before yesterday my friend Omi Azad gave me a fantastic gift. He registered the domain http://hasinhayder.net for 10 years and gave me control to it. I asm so much surprised. He said “Hey hasin, I didn’t give you any wedding gift” – ha ha ha

You can find Omi Azad’s blog at http://omiazad.net. Omi is a MVP in Windows Shell Category and Localization expert. He is maintaining ekushey.org for number of years.

Thanks Omi.

I am busy with…

1. A linkedIn Profile parser – last couple of days I did some research on the structure of linkedin url and profile structure and I developed this small class which can parse any linked in public profile in a valid set of xml nodes.

2. LinkedIn Address book importer – thats right, all you need to provide is your linkedin username and password and this PHP class will return all your connections in CSV format.

3. A social Networking site – I am currently working on a localized social networking site which will be released pretty soon.

4. My Book – currently I am writing the fifth chapter of my book

5. Amazon ECS – yes, for last couple of days I did some study on amazon ECS web service APIs (REST) to develop some cool apps with that.

6. Software prototyping – this thing attracts my interest recently, as a result I am studying it.

7. Last but not the least, I am working on OpenId to do something with it, actually small RnD.

I am…


Your Five Factor Personality Profile


Extroversion:

You have medium extroversion.
You’re not the life of the party, but you do show up for the party.
Sometimes you are full of energy and open to new social experiences.
But you also need to hibernate and enjoy your “down time.”

Conscientiousness:

You have high conscientiousness.
Intelligent and reliable, you tend to succeed in life.
Most things in your life are organized and planned well.
But you borderline on being a total perfectionist.

Agreeableness:

You have medium agreeableness.
You’re generally a friendly and trusting person.
But you also have a healthy dose of cynicism.
You get along well with others, as long as they play fair.

Neuroticism:

You have medium neuroticism.
You’re generally cool and collected, but sometimes you do panic.
Little worries or problems can consume you, draining your energy.
Your life is pretty smooth, but there’s a few emotional bumps you’d like to get rid of.

Openness to experience:

Your openness to new experiences is high.
In life, you tend to be an early adopter of all new things and ideas.
You’ll try almost anything interesting, and you’re constantly pushing your own limits.
A great connoisseir of art and beauty, you can find the positive side of almost anything.

Thanks to Samiha Esha for this nice Link

Igniting Code with Code Igniter

Day by day I am loving codeigniter more and more. Its so awesome, rick ellis, you are da man. But unfortunately codeigniter was not properly tested with PostgreSQL. Yesterday I fixed active records insert_id() function to work properly with PostgreSQL. I am running it’s version 8.1

Here comes my modified system/database/driver/postgre/postgre_driver.php

function insert_id()
{
$v = pg_version($this->conn_id);
if (isset($v['server'])) $v = $v['server'];

$table = func_num_args() > 0 ? func_get_arg(0) : null;
$column = func_num_args() > 1 ? func_get_arg(1) : null;

if ($table == null && $v >= '8.1')
{
$sql='SELECT LASTVAL() as ins_id';
}
elseif ($table != null && $column != null && $v >= '8.0')
{
$sql = sprintf("SELECT pg_get_serial_sequence('%s','%s') as seq", $table, $column);
$query = $this->query($sql);
$row = $query->row();
$sql = sprintf("SELECT CURRVAL('%s') as ins_id", $row->seq);

}
elseif ($table != null)
{
// seq_name passed in table parameter
$sql = sprintf("SELECT CURRVAL('%s') as ins_id", $table);
}
/**
* another insert id Hack for PostgreSQL
* @author : Hasin Hayder
* @since : March 09, 2007
*/
elseif(is_null($v))
{
$sql='SELECT (LASTVAL()) as ins_id';
}
/**
* End Hack
*/
else
{
return pg_last_oid($this->result_id);
}
$query = $this->query($sql);
$row = $query->row();
return $row->ins_id;
}

Fixing ActiveRecord Class for CodeIgniter to use with PostgreSQL

Hi,

If you are using PostgreSQL and execute the following statement, it will defnitely generate error because of some internal properties in the model.

Controller Code


<?
$model
= $this->load->model("MyModel");
$this->mymodel->insert();
?>

where the model code is


<?
Class MyModel extends Model{
  public $username
;
  
public $password;

  public function insert()
  
{
    $this
->db->insert("table",$this);
  
}
}
?>

So guys – Here I fix the Active Record class in CodeIGniter. Here goes the solution. Just replace the existing insert() function in system\database\DB_active_rec.php

Dont worry, it wont hamper the functionality for other DB providers


/**
     * Insert
     *
     * Compiles an insert string and runs the query
     *
     * @access    public
     * @param    string    the table to retrieve the results from
     * @param    array    an associative array of insert values
     * @return    object
     */
    function insert($table = '', $set = NULL)
    
{
        
if ( ! is_null($set))
        
{
            $this
->set($set);
        
}

        if (count($this->ar_set) == 0)
        
{
            
if ($this->db_debug)
            
{
                
return $this->display_error('db_must_use_set');
            
}
            
return FALSE;
        
}

        if ($table == '')
        
{
            
if ( ! isset($this->ar_from[0]))
            
{
                
if ($this->db_debug)
                
{
                    
return $this->display_error('db_must_set_table');
                
}
                
return FALSE;
            
}

            $table = $this->ar_from[0];
        
}

        /**
         * A small hack for PostgreSQL
         * @author : Hasin Hayder [[email protected]]
         * @since : March 09, 2007
         */
        
if ($this->dbdriver=="postgre"){
            $clone
= $this->ar_set;
            foreach(
$this->ar_set as $key=>$val)
                if (
substr($key,0,1)=="_") unset($clone[$key]);
            
$sql = $this->_insert($this->dbprefix.$table, array_keys($clone), array_values($clone));
        
}
        
else
        
$sql = $this->_insert($this->dbprefix.$table, array_keys($this->ar_set), array_values($this->ar_set));
        
/**
         * End Hack
         */
        
        
$this->_reset_write();
        return
$this->query($sql);
    
}

going for a complete redesign of zephyr

zephyr2.jpg

I am planning for a complete redesign of zephyr, a tiny AJAXed MVC framework for PHP5 developers. So far zephyr has been downloaded 3,975 times from sourceforge and I got several impressive mails from users of zephyr which inspired me a lot. Now it’s time to a complete redesign. Zephyr has been a framework for many of you, but really we can make it more dynamic. Lets make it so easy, so amazing so that a guy who does not know even PHP will be able to use it.

I am planning to make it more “Human” – ha ha ha.

A new look to CodeIgniter, Finally!

CodeIgniter recently gained a lot of attraction from different level of PHP developers because of it’s simplicity and creative flavour. I started learning CakePHP but its so much automated and took time to learn all these stuffs, I moved to CodeIgniter and fall into love with it. Amazing framework.

Recently CodeIgniter website got a new look an feel, a very impressing design indeed. But the sad part of the story is that they also changed the logo which I didn’t like at all. The old logo was much more creative.

Love for CodeIgniter and it’s developers.

Some interesting PHP Apps

While surfing out there, I just find some cool PHP Apps which may come handy for you.

1. Tasks Jr by AlexKing
A task management tool similar to ActiveCollab, BaseCamp and TickSpot

2. MythTv
MythTV is a GPL licensed suite of programs that allow you to build the mythical home media convergence box on your own using Open Source software and operating systems. MythTV is known to work on Linux and Mac OS X (PowerPC and Intel). It does not run on Windows.

3. PHP-Java Bridge
The php/Java bridge is an optimized, XML-based network protocol, which can be used to connect a native script engine, PHP, with a Java or ECMA 335 virtual machine. It is more than 50 times faster than local RPC via SOAP, requires less resources on the web-server side, and it is faster and more reliable than communication via the Java Native Interface.

4. Relay Ajax Directory Manager
An excellent PHP+Ajax directory manager script

5. Vanila
A nice and Simple bulletin board script