Month: November 2011

How to create custom table from plugin in WordPress 3

How to create custom table from plugin in WordPress 3

When creating plugin, we need to create a custom table. We will use register hook activation, de-activation and uninstall to handle database creation and removal. Now, we start with database created automatically when plugin installed / activated. 123456789101112131415161718/* Register installation into hook */ register_activation_hook(__FILE__, ‘your_plugin_install’); /* Install montage SQL into database */ function your_plugin_install() { …

+ Read More

Showing WordPress 3 query database error

Showing WordPress 3 query database error

When you building plugin or themes, sometimes you need to contact with database ( select, update, insert or delete ). Somehow after executing database, there no result and no changes in database. That mean some problem with your code. You should check it with showing query error in WordPress by : 1$wpdb->show_errors(); For example : …

+ Read More

How to load Zend Framework in WordPress 3 plugin

How to load Zend Framework in WordPress 3 plugin

Loading Zend Framework into WordPress 3 plugin is quite easy. You can download latest ZendFramework on http://framework.zend.com/download/latest . To use Zend Framework with our plugin, extract it on inside plugin folder. 1234set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) ); require_once ‘Zend/Loader/Autoloader.php’; Zend_Loader_Autoloader::getInstance();

How to load Zend Framework into PHP files

How to load Zend Framework into PHP files

Zend Framework provide a lot of interesting libraries. Instead re-invent the wheel, using Zend Framework libraries will boost our development time. You can download latest ZendFramework on http://framework.zend.com/download/latest . To use Zend Framework with our system like individual php files, CMS or Framework, we should configure our path. This is scheme of folders and extracted …

+ Read More

How to create WordPress 3 Custom Plugin for dummies

How to create WordPress 3 Custom Plugin for dummies

Creating custom plugin in WordPress 3.2 is easy and it will fast if we do on the right way. So, what we need to know as newbie / n00b to build a custom wordpress plugin ? First, you should read : http://codex.wordpress.org/Writing_a_Plugin. Now you have insight to build a plugin on WordPress. I will guide …

+ Read More