Convert to PHP 5
Use tree behaviour

You need to alter the database:

ALTER TABLE `cakemarks_keywords` ADD `lft` INT NULL AFTER `parent_id` ,
ADD `rght` INT NULL AFTER `lft`
Add parenteses