<?php       
/*    
Plugin Name:Dantoon
Plugin URI: http://www.dantoon.com/wordpress/plugin/2
Description: This plugin shows the faces of your subscribers on your blog and connects your blog to Dantoon.com
Author: Agile Technosys
tags: dantoon,social,widget,bloggers     
Version: 2.0   
Author URI: http://agiletechnosys.com

Copyright 2010 Dantoon LLC

This file is part of the Dantoon plugin for WordPress.      

The Dantoon plugin for WordPress is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Dantoon plugin for WordPress is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Foobar.  If not, see <http://www.gnu.org/licenses/>. 


*/
	function create_key_table() 	
	{            
		global $wpdb;              
		$table = $wpdb->prefix."KEY";                
		$sql = "CREATE TABLE $table (           
				key_id INT(11) NOT NULL AUTO_INCREMENT,
				key_value VARCHAR(255) NOT NULL ,
				UNIQUE KEY id (key_id) )"; 
        	$wpdb->query($sql);
        	//This function create table for dantoon key
        }
    add_action('activate_dantoon/dantoon.php' ,'create_key_table'); //to call the function use the hooks name add_action
    
	
    add_action('admin_menu','Dantoon_menu');//this for creting menu at admin side 
    
    	function Dantoon_menu() 
    	{    
    		add_options_page('Dantoon Options', 'Dantoon Options', 'administrator', 'dantoonoption', 'dantoon_function');        
    	}
	
	function dantoon_function()
	{ 
		include'dantoon-menu.php';
	}
	
	function widget_dantoon()//function to register plugin
	{
		register_sidebar_widget("Dantoon widget", 'widget_dantoon_subcribe');
	}
	
    add_action('plugins_loaded', 'widget_dantoon');
	
	function widget_dantoon_subcribe()
	{
 		global $wpdb;
 		include'dantoon-widget.php';
    	}
?>
