Wednesday, January 28, 2009

Theme creation in Drupal 6 Modules

In Creating Custom Theme Function in drupal 6 modules You have to register the theme function in that module File

For eg if your module name is post & in that module you are using any theme function then you have to register that theme function

function post_theme() {
return array(
'post_teaser' => array(
'arguments' => array('node' => NULL, 'teaser' => FALSE, 'page' => FALSE),
),
'post_view' => array(
'arguments' => array('node' => NULL, 'teaser' => FALSE, 'page' => FALSE),
),
'post_player' => array(
'arguments' => array('node' => NULL),
),
);
}

Simply you have to add this code in your module file

Here post_view,post_player,post_teaser are some of the theme function

Tuesday, January 6, 2009

Sample Mysql Create & Drop Trigger Query

$sql="CREATE TRIGGER myTrigger BEFORE INSERT ON roles FOR EACH ROW
BEGIN
INSERT INTO roles_history(user_id,role_name,status
,user_node_id,transaction_id,timestamp)VALUES(NEW.user_id,
NEW.role_name,NEW.status,NEW.user_id,'74',CURRENT_TIMESTAMP());
END";

$ss=mysql_query($sql);

$dropTrigger="DROP TRIGGER myTrigger";

$dropTriggerRes=mysql_query($dropTrigger);

Floating and Dimming a Div using JavaScript

Check out this link below to download the files needed to create floating & dimmming div using javascript

http://www.codeproject.com/KB/scripting/js_floating_dimming_div.aspx