Chaitanya Lakshmi
  • About Me
    • Knowledge Blog
    • Linked In
    • Facebook
  • Static
  • PHP
  • Drupal
  • JAVA
  • Learning Tutorials
  • Contact Us
  • About Me
    • Knowledge Blog
    • Linked In
    • Facebook
  • Static
  • PHP
  • Drupal
  • JAVA
  • Learning Tutorials
  • Contact Us

How to create Customm Theme in Wordpress?

3/20/2012

1 Comment

 
Refer:

http://webdesignerwall.com/tutorials/building-custom-wordpress-theme
1 Comment

How to install wordpress?

3/20/2012

0 Comments

 
Installation Steps:
  1. Download and unzip the WordPress package if you haven't already.
  2. Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and modifying it.
  3. Rename the wp-config-sample.php file to wp-config.php.
  4. Open wp-config.php in a text editor and fill in your database details as explained in Editing wp-config.php to generate and use your secret key password.
  5. Upload the WordPress files in the desired location on your web server:
    • If you want to integrate WordPress into the root of your domain (e.g. http://example.com/), move or upload all contents of the unzipped WordPress directory (but excluding the directory itself) into the root directory of your web server.
    • If you want to have your WordPress installation in its own subdirectory on your web site (e.g. http://example.com/blog/), create the blog directory on your server and upload WordPress to the directory via FTP.
  6. Run the WordPress installation script by accessing wp-admin/install.php in a web browser.
    • If you installed WordPress in the root directory, you should visit: http://example.com/wp-admin/install.php
    • If you installed WordPress in its own subdirectory called blog, for example, you should visit: http://example.com/blog/wp-admin/install.php
Refer:
http://codex.wordpress.org/Installing_WordPress#Things_to_Know_Before_Installing_WordPress
0 Comments

Exaplin !, @ and % with Examples?

3/8/2012

0 Comments

 
!variable, which indicates that the text should be inserted as-is. This is useful for inserting variables into things like e-mail.
<?php
    $message = t("If you don't want to receive such e-mails, you can change your settings at !url.", array('!url' => l(t('My account'), "user/$account->uid"))); 
?>

@variable, which indicates that the text should be run through check_plain, to escape HTML characters. Use this for any output that's displayed within a Drupal page.

<?php
    $title = t("@name's blog", array('@name' => $account->name));
?>

%variable, which indicates that the string should be HTML escaped and highlighted with theme_placeholder() which shows up by default as emphasized.

<?php
    $message = t('%name-from sent %name-to an e-mail.', array('%name-from' => $user->name, '%name-to' => $account->name));
?>
0 Comments

What is the usage of !, @ and % attributes in t() Druapl?

3/8/2012

1 Comment

 
  • !variable: Inserted as is. Use this for text that has already been sanitized.
  • @variable: Escaped to HTML using check_plain(). Use this for anything displayed on a page on the site.
  • %variable: Escaped as a placeholder for user-submitted content using drupal_placeholder(), which shows up as <em>emphasized</em> text.
1 Comment

What does hook_exit() will do in drupal?

3/8/2012

0 Comments

 
Perform cleanup tasks.

This hook is run at the end of each page request. It is often used for page logging and printing out debugging information.

Only use this hook if your code must run even for cached page views. If you have code which must run once on all non cached pages, use hook_init instead. Thats the usual case. If you implement this hook and see an error like 'Call to undefined function', it is likely that you are depending on the presence of a module which has not been loaded yet. It is not loaded because Drupal is still in bootstrap mode.

Parameters $destination: If this hook is invoked as part of a drupal_goto() call, then this argument will be a fully-qualified URL that is the destination of the redirect. Modules may use this to react appropriately; for example, nothing should be output in this case, because PHP will then throw a "headers cannot be modified" error when attempting the redirection.

Return value None.

0 Comments

How to secure our form entries in Drupal?

3/8/2012

1 Comment

 
User-submitted data in Drupal can be divided into three categories:

  1. Plain-text
  2. Rich text
  3. Admin-only HTML

No piece of user-submitted content should ever be placed as-is into HTML.

    * Use check_plain or theme('placeholder') for plain text.
    * Use check_markup or filter_xss for markup containing text.
    * Use the t() function with @ or % placeholders to construct safe, translatable strings.

Refer: http://drupal.org/node/28984
1 Comment

What is Cross Site Scripting?

3/8/2012

1 Comment

 
Cross site scripting (also known as XSS) occurs when a web application gathers malicious data from a user.

The data is usually gathered in the form of a hyperlink which contains malicious content within it.

The user will most likely click on this link from another website, instant message, or simply just reading a web board or email message.

Usually the attacker will encode the malicious portion of the link to the site in HEX (or other encoding methods) so the request is less suspicious looking to the user when clicked on.

After the data is collected by the web application, it creates an output page for the user containing the malicious data that was originally sent to it, but in a manner to make it appear as valid content from the website.

Many popular guestbook and forum programs allow users to submit posts with html and javascript embedded in them.

If for example I was logged in as "john" and read a message by "joe" that contained malicious javascript in it, then it may be possible for "joe" to hijack my session just by reading his bulletin board post.
1 Comment

What is filter_xss() function usage in Drupal?

3/8/2012

0 Comments

 
filter_xss() will Filters HTML to prevent cross-site-scripting (XSS) vulnerabilities.

Syntax:filter_xss($string, $allowed_tags = array('a', 'em', 'strong', 'cite', 'blockquote', 'code', 'ul', 'ol', 'li', 'dl', 'dt', 'dd'))


This code does four things:
  • Removes characters and constructs that can trick browsers.
  • Makes sure all HTML entities are well-formed.
  • Makes sure all HTML tags and attributes are well-formed.
  • Makes sure no HTML tags contain URLs with a disallowed protocol (e.g. javascript:).
Parameters $string: The string with raw HTML in it. It will be stripped of everything that can cause an XSS attack.

$allowed_tags: An array of allowed tags.

Return value An XSS safe version of $string, or an empty string if $string is not valid UTF-8.


Refer: http://api.drupal.org/api/drupal/modules!filter!filter.module/function/filter_xss/6
0 Comments

What is Makefile in Linux?

3/1/2012

0 Comments

 
Make file is used for compiling no of files by using single command MAKE.

It will be very useful in big projects, if we changed one file the time sence will be different for that particular file for that we have to compile all the files, by using this we can able to compile all by using single command.


The make utility:

If we run make command.

this program will look for a file named makefile in your directory, and then execute it.

If you have several makefiles, then you can execute them with the command:

make -f MyMakefile

There are several other switches to the make utility. For more info, man make. Build Process
  1. Compiler takes the source files and outputs object files
  2. Linker takes the object files and creates an executable
0 Comments

    Archives

    April 2012
    March 2012
    February 2012

    Categor

    All
    Ajax
    Api
    Cross Site Scripting
    Css
    Curl
    Design Patterns
    Drupal
    Exception Handling
    Htaccess
    Html
    Javascript
    Jquery
    Json
    Linux
    Mysql
    Oops
    Php
    Regular Expressions
    Web 2.0
    Webservices
    Wordpress
    Xhtml

    RSS Feed

Powered by Create your own unique website with customizable templates.