How to add custom javascript file in drupal

March 26, 2009 1 comment
Categories: 1, Drupal, JQuery, Php

How to delete a folder/directory using cmd

March 24, 2009 1 comment

Suppose you would like to delete a file or directory to ease some time.

let’s start with locating our folder, our folder is inside My Documents we will name this deletethisfolder

open your cmd, then locate your folder.

Follow this path in your cmd

C:\Documents and Settings\admin> cd “My Documents”

Press Enter,

C:\Documents and Settings\admin\My Documents>rmdir /s /q

ex.

C:\Documents and Settings\admin\My Documents>rmdir /s /q “C:\Documents and Settings\admin\My Documents\deletethisfolder”

or this:

C:\>rmdir /s /q “C:\Documents and Settings\admin\My Documents\deletethisfolder”

That’s it! your folder is now deleted!!!

If you want only a sub-folder under “deletethisfolder” directory let’s say another_sub_directory

then we’ll append the name of the sub directory/folder:

C:\Documents and Settings\admin\My Documents>rmdir /s /q “C:\Documents and Settings\admin\My Documents\deletethisfolder\another_sub_directory”

Hope this Help you GUYS! stick around!!!

Categories: Windows Tags: , ,

how to unzip/untar files with extensions .tar

using your terminal, locate the file where it is being placed.

Let’s say you have a file file.tar located in your /usr/local/bin

just, type : tar xvf file.tar to unzip/untar the files inside file.tar

hope this helps you….

Categories: Linux Tags: ,

IE6 PNG-Fix

Please visit my site http://www.arnelbornales.site90.net/content/ie6-png-fix there i put my code about this.

Categories: CSS Tags:

Remove simple attribute with attr()

February 26, 2009 Leave a comment

Remove simple attribute with removeAttr() method

$("#t2").click(function() { $(this).removeAttr("class") });
Well, this code has no problem except under IE

this code seems to be the solution using attr(“class”, “”)

Remove the same attribute with attr() method

$("#t3").click(function() { $(this).attr("class", "") });

Read more…

Categories: JQuery

Get the current date using jquery

February 25, 2009 Leave a comment

In this first jQuery tutorial we will develop a simple program that retrieves the current time from server and displays on the user browser. In this example we will be calling a server side PHP script to get the current server time. You can easily replace PHP with JSP, or ASP program.

Read more…

Categories: JQuery Tags: , ,

How to add a collapsible fieldset in your theme/template

February 25, 2009 2 comments

Creating a class collapsible inside a Fieldset in your template file or in your theme functio

is not enough like “fieldset class=”collapsible skills_group”>TESTfieldset”

you need to include

drupal_add_js(‘misc/collapse.js’);

in your hook load or in your theme function.

Categories: Drupal Tags:

How to add a contact form in a page

February 25, 2009 2 comments

Here is my sample code which I made from http://kinse.net/contact_us

<?php
require_once drupal_get_path('module', 'contact') .'/contact.pages.inc';
//no need to maintain two version of node.tpl.php
//include "node.tpl.php";
function local_contact_page(){
$form = contact_mail_page();
// override default values here if you want
// next one will select a different category
//$form['cid']['#default_value'] = 0;
return($form);
}

function local_contact_page_submit($form_id, $form_values){
return(contact_mail_page_submit($form_id, $form_values));
}

function local_contact_page_validate($form, $form_state){
return(contact_mail_page_validate($form, $form_state));
}
?>

Welcome to KINSE Systems Website
<?php print t(‘Contact Us’); ?>
<?php // here we will render the contact form
print drupal_get_form(‘local_contact_page’); ?>

How to add a new region in drupal 6 themes

February 25, 2009 4 comments

When you want to configure your default theme like
adding new region just edit your .info file of your theme
e.g garland.info

Here is an example code:

regions[logout] = Logout
regions[left] = Left sidebar
regions[right] = Right sidebar
regions[header] = Header
regions[content] = Content
regions[footer] = Footer

Categories: Drupal Tags: ,