PSD to HTML: An Effective Way for Developing Top-notch Website

At present, website has become an imperative medium for online visibility and branding. Many webmaster are very sensible about the design and development of their websites. The great design brings more audience. And hence, improvises their conversion rate. Today’s every professional as well as the beginner developers are wondering about how to develop the best website that not only have the great design, but also the internet-friendly. And, the answer is PSD to HTML conversion. Indeed, PSD to HTMLenables users to deploy the website with real designed format.

PSD to HTML: An Effective Way for Developing Top-notch Website

PSD to HTML: An Effective Way for Developing Top-notch Website
PSD to HTML: An Effective Way for Developing Top-notch Website

Photoshop, as we all know, has come with enormous features that ensure designer to go beyond the creativity. And, this advantage adds weight to the website too. With this, there are other benefits of PSD to HTML conversion that result to the effective and seamless websites. Let’s know how much effective it to convert PSD to HTML is.
Benefits of PSD to HTML Conversion:

  1. PSD to HTML conversion supports impressive website design

Photoshop is packed with trendiest widgets that not only ensure speedy delivery of design, but also the creative one. This enables designer to go beyond level for developing an astonishing design within short time.

  1. Minimizing the loading times and improvising the User Experience

Most of the webmasters deploy their website with heavy impressive images that slow down the loading time of the website on browser and this distracts potential audience to choose another site. PSD to HTML lightens website and enhances the User Experience throughout the site.

  1. PSD to HTML CSS enables strong website layout

Every webmaster wants website that should be completely error-free and has the clean architecture. PSD to HTML CSS helps in developing the website with clean or easy to understand architecture. That not only makes laying out the webpage with strong base, but also supports error free page.

  1. Delivering the Contentfriendly Sites

PSD to HTML CSS assists in deploying the website with clean architecture. This will support also content-friendly site. It means website owner can easily upload the content and organize it timely. That will also ensure the search engine crawlers to spot the content and make it visible to the audience.

  1. Implementing Websites with Cross-Browser Compatibility

Today, there are numerous of browsers available in the market like Internet Explorer, Opera, Chrome, Firefox, etc. It will be nightmare for webmasters, if their websites do not work on any of the major browsers. PSD to HTML conversion ensures the website compatible with every major platform.

  1. Improvising the brand value with SEOfriendly coding

PSD to HTML service assists in deploying the SEO-friendly websites, which will enhance the brand value too among the online audience. If the site is SEO-friendly,then it will be easy for implementing the effective keyword in the websites through Meta tags. Hence, the visibility of the site will surely boom.

  1. Deploying Responsive Website with superb contour

Today, there is the trend for smartphone. Therefore, audience prefers mostly to use their phone for accessing internet. To grab more audience, it will be good if the site works same on the smartphone as on the desktop. For this, it should possess responsive layout, which can only be possible with the help of PSD to HTML CSS.

  1. Featuring W3C Coding Standard

To make the website finish with perfect standard, PSD to HTML conversion ensures W3C coding standard. That supports every trendiest platform to be compatible with the websites.

Conclusion
PSD to HTML service will be the great option for webmaster to have the seamless as well as the features-rich websites. The clean architecture gives users a lot of options to make the site customizable according to the future need. Hope, you get understood that how good it will be for webmasters to adopt PSD to HTML conversion for having the great site. If you find any problem in this blog, then please share through the comment section given below.

wordpress XMLRPC api integration with ruby and rails

Ruby on Rails is really OOPs based framework. I personally love this framework. I worked on this for many years. Many Ruby lovers are looking to integrate the wordpress with Ruby on Rails. I strongly suggest to integrate wordpress with ROR using XMLRPC APIs. Using following code you can easily add the wordpress into Ruby on Rails Project. Use my following steps:

wordpress XMLRPC api integration with ruby and rails

Note: There are so many XMLRPC APIs provided by wordpress. I given the some simple example here.

First setup wordpress. Login to wordpress admin and enable the XMLRPC.
Go to Settings->writing and enable the XMLRPC checkbox.

wordpress XMLRPC api integration with ruby and rails
wordpress XMLRPC api integration with ruby and rails

Now you can fetch the wordpress posts, pages, tags etc.. using XMLRPC.

Following script is written in Ruby.

[viral-lock message=”Solution code is Hidden! It’s Visible for Users who Liked/Shared This article on Facebook or Twitter or Google+. Like or Tweet this article to reveal the content.”]

require 'xmlrpc/client'

# build a post

#Use this for reference - http://codex.wordpress.org/XML-RPC_wp , http://codex.wordpress.org/XML-RPC_WordPress_API

post = {
'post_title'       => 'Post Title',
'post_excerpt'       => 'Post excerpt',
'post_content'       => 'this is Post content'
}

# initialize the connection - Change

connection = XMLRPC::Client.new2('http://www.purabtech.in/wordpress3/xmlrpc.php')  #Replace your wordpress URL

# make the call to publish a new post

#result = connection.call('metaWeblog.getRecentPosts', 1,'admin','123456') // Get Recent 10 Post
#result = connection.call('wp.getPost', 1,'admin','123456',19) // Get Single Post
#result = connection.call('wp.getPage', 1,'admin','123456',1) // Get Single Page
#result = connection.call('wp.getPages', 1,'admin','123456',10) // Get Pages
#result = connection.call('wp.getPosts', 1,'admin','123456') // Get 10 Posts from wordpress
result = connection.call('wp.getPosts', 1,'admin','123456',1000) // Get 10000 Posts from wordpress
#result = connection.call('wp.newPost', 1,'admin','123456',post) //For New Creating the Post

puts result // Printresult
puts result.length // Printresult

[/viral-lock]

If you are facing any issue then write to me.

how to create simple shadow effect in photoshop

photoshop tutorial, how to create simple shadow effect in photoshop. we given step by step guide with screen shots and their details.

how to create simple shadow effect in photoshop

how to create simple shadow effect in photoshop
how to create simple shadow effect in photoshop

Create your own design in photoshop

Type a text as a “wordpressapi”

photoshop_shawdo

now select filter option >> artistic >> corked pencil

it will look like below

photoshop3

Now select >> layer style >>  blending option

select drop shadow

photoshop4

convert plain text URI to HTML links in wordpress themes

When you put some URL and email address you need to manually add the link URL to that text. This action always takes the some time of wordpress blogger. WordPress has facility to add the links to your URL and email address automatically.

 

convert plain text URI to HTML links in wordpress

This facility is available in wordpress since wordpress 2.7 version but many wordpress theme and plugin developers never used this functionality.

WordPress provides the make_clickable() function for convert plain text URI to HTML links. This function able to convert URI, www, ftp, and email addresses. Finishes by fixing links within links. You just need to pass the string parameter to this method.

More detail information you can find in following file.
wp-includes/formatting.php.

You can use this method in your functions.php file also. Use the following code.

add_filter('the_content', 'make_clickable');

By using this code you are able to covert the URI, www, ftp, and email addresses in to link.

If you are having any issues or question about make_clickable method then please write to me.

What is reset css and How to use the reset CSS

Many new web developers or web application developers may be did not hear about reset CSS. Many web developers use the global selectors and global CSS styling. That is very basic reason behind that. They want to display their CSS style across the various browsers.

What is reset css and How to use the reset CSS

The goal of a reset stylesheet is to reduce browser inconsistencies in things like default line heights, margins and font sizes of headings, and so on. With reset CSS you are overriding the setting of various browser setting and elements. There are inconsistencies with every browser. For reducing the issues and setting of browser you need to reset the browser properties.

What is reset css and How to use the reset CSS
What is reset css and How to use the reset CSS

With reset CSS you can set the border, font color, color, margin, padding, img, h1, a, etc properties. The problem is that every browser’s stylesheet has subtle but fundamental differences. By using a CSS reset. There are many big sites and tool available for using the reset the CSS.

In reset CSS you need to use the most common HTML tags and their properties for reset there CSS properties.

you can also create you reset CSS as per your website need. There are many useful and good reset available. I like the YUI reset CSS most because that is really useful.

For using the YUI reset CSS you need to just add the following line in your website.

<!-- Source File -->
css" href="http://yui.yahooapis.com/3.2.0/build/cssreset/reset-min.css">

For more information about YUI reset css you can visit the following URL
http://developer.yahoo.com/yui/3/cssreset/

Following reset css is most common in each and every website and following code is useful for every website.

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	font-size: 100%;
	vertical-align: baseline;
	background: transparent;
}

Reset CSS is really useful for every website. do use the reset CSS in you stylesheet. There is another good reset CSS called blueprint which you download from following URL.
http://code.google.com/p/blueprintcss/.


Some people are saying dont use the reset css because that will increase the your css size but I must admin this thing.
you should use the reset css that will save your big time.

What is reset css and How to use the reset CSS
What is reset css and How to use the reset CSS

How to configure haproxy load balancing on amazon ec2

Confused how to configure load balancer on Amazon. Here we given you detail instructions about How to configure haproxy load balancing on amazon EC2

Many people take amazon EC2 cloud hosting. Amazon does gives the load balancer for application load balancing. But Amazon load balancer is not that much good. Amazon load balancer is not working on hardware or software base. That balancer just sending request to server one by one. Many people confused how to configure load balancer on Amazon EC2.

Here I am going to give you detail instructions about setting up the HaProxy load balancer on Amazon EC2.

How to configure haproxy load balancing on amazon ec2

What is Haproxy?

AProxy is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications. It is particularly suited for web sites crawling under very high loads while needing persistence or Layer7 processing. Supporting tens of thousands of connections is clearly realistic with todays hardware. Its mode of operation makes its integration into existing architectures very easy and riskless.

How to configure haproxy load balancing on amazon ec2
How to configure haproxy load balancing on amazon ec2

For Haproxy load balancing I recommend to create the micro instance first. Then login to micro instance and install haproxy on that machine. I taken the Centos 5.0 virgin os. Use following command for install the haproxy.

#yum install haproxy

Then Open the haproxy config file.

# vi /etc/haproxy.cfg

For detail configuration you should read the Haproxy config documentation.

http://haproxy.1wt.eu/download/1.3/doc/configuration.txt

Haproxy’s default load balancing style is roundrobin. Which is trusted and good. With this load balancing I am serving around two million pages daily. Means I am handling 6 to 7 million requests per day. I am not having any issues.

I used the three backend server for delivery of my application and one server for serving the static data which is having images and js and css and application files.

Here is my configuration file


global
 maxconn     4096 # Total Max Connections. This is dependent on ulimit
 daemon
 nbproc      4 # Number of processing cores. Dual Dual-core Opteron is 4 cores for example.

#---------------------------------------------------------------------
# common defaults that all the 'listen' and 'backend' sections will
# use if not designated in their block
#---------------------------------------------------------------------
defaults
 mode        http
 log         global
 option      dontlognull
 option      httpclose
 option      httplog
 option      forwardfor
 option      redispatch
 timeout connect 10000 # default 10 second time out if a backend is not found
 timeout client 300000
 timeout server 300000
 maxconn     60000
 retries     3

#---------------------------------------------------------------------
# main frontend which proxys to the backends
#---------------------------------------------------------------------
#frontend  main *:80
frontend http-in
 bind :80
 acl url_static       path_beg       -i /static /images /javascript /stylesheets
 acl url_static       path_end       -i .jpg .gif .png .css .js
 acl url_stats        path_beg    /haproxy-stats
 use_backend        be_stats    if url_stats

 use_backend static          if url_static
 default_backend             app

#-------------------------------------------------
#back-end statistics section
#----------------------------------------------------------------
backend be_stats
 stats uri /haproxy-stats
#    stats show-node

#---------------------------------------------------------------------
# static backend for serving up images, stylesheets and such
#---------------------------------------------------------------------
backend static
 balance     roundrobin
 server      static 10.211.164.138:80 check
 #server      static 10.211.185.111:80 check

#---------------------------------------------------------------------
# round robin balancing between the various backends
#---------------------------------------------------------------------
backend app
 balance     roundrobin
 server  app1 10.214.284.241:80 check
 server  app2 10.208.168.131:80 check
 server  app3 10.212.158.126:80 check

You can use the above code in haproxy.cfg file. You just need to change the IP address which are listed under backend static and backend app section. You just put your static server(amazon EC2 instance’s internal IP address).

You should use internal IP address of server because that will reduce the bandwidth uses of Amazon EC2 server. Do not use the public IP address for load balance because that will cost you.

Put application database and application files on all the server. Point your domain to your load balancer machine’s Public IP address.

Let say your application is running on following domain.

www.YOURDOMAIN.COM – point to Load balancer macine.

Open your all application and static server’s apache configuration file. put following entry in that file.


<VirtualHost *:80>
DocumentRoot /var/www/html
ServerName www.YOURDOMAIN.COM

# Other directives here

</VirtualHost>

after this just restart the apache server of all servers.

If you are having any issues or questions about setting up the haproxy on amazon EC2 server Please write to me.

How to use custom post type in wordpress

From wordpress 3.0 version release wordpress gives the facility to add a custom post type functionality. With custom post type wordpress is became more powerful and expendable and more advanced We given info about, How to use custom post type in wordpress.

How to use custom post type in wordpress

WordPress recognized the need to people and industry and they introduced the custom post type. In this tutorial I will tell you how to use the custom post type very effectively.

Adding Custom post type is very easy. Using theme or plugin file you can add the custom post types in wordpress admin area.

Here I am going to give you example using wordpress theme files. Open you functions.php file and copy paste the following code in that file.


add_action('init', 'create_product');
 function create_product() {
 $product_args = array(
 'label' => __('Product'),
 'singular_label' => __('Product'),
 'public' => true,
 'show_ui' => true,
 'capability_type' => 'post',
 'hierarchical' => false,
 'rewrite' => true,
 'supports' => array('title', 'editor', 'thumbnail')
 );
 register_post_type('product',$product_args);
 }

How to use custom post type in wordpress
How to use custom post type in wordpress

The function register_post_type() accepts two arguments: the name we want to give our post type, and a list of arguments used to create that post type, which we put in an array called $args.

Using above code that code will add the product post type to wordpress panel.

Now you can add the meta fields to custom post type. Use the following code in file for add the meta fields. Custom meta fields function is available from quite some time. add_meta_box() function is very useful to adding custom fields to wordpress post.


<?php

 add_action("admin_init", "add_product");
 add_action('save_post', 'update_thumbnail_url');
 function add_product(){
 add_meta_box("product_details", "product Options", "product_options", "product", "normal", "low");
 }
 function product_options(){
 global $post;
 $custom = get_post_custom($post->ID);
 $thumbnail_url = $custom["thumbnail_url"][0];
 $product_info = $custom["product_info"][0];
 $product_infos = $custom["product_infos"][0];
 $video_code = $custom["video_code"][0];

?>
 <div id="product-options">
 <label>Thumbnail URL:</label><input size="100" name="thumbnail_url" value="<?php echo $thumbnail_url; ?>" /><br>
 <label>Product Info:</label><input size="100" name="product_info" value="<?php echo $product_info; ?>" /><br>
 <img src="<?php echo $product_infos; ?>"><br>
 <label>Video Code:</label><textarea cols="50" rows="5" name="video_code"><?php $video_code; ?></textarea>
 </div><!--end product-options-->
<?php
 }
 function update_thumbnail_url(){
 global $post;
 update_post_meta($post->ID, "thumbnail_url", $_POST["thumbnail_url"]);
 update_post_meta($post->ID, "product_info", $_POST["product_info"]);
 update_post_meta($post->ID, "video_code", $_POST["video_code"]);

 }
?>

Using following code you can see the product information in edit product page and you can able to see the all information in for edit. Admin will know which fields are available to edit.

How to use custom post type in wordpress
How to use custom post type in wordpress

<?php
add_action("manage_posts_custom_column",  "product_custom_columns");
add_filter("manage_edit-product_columns", "product_edit_columns");

function product_edit_columns($columns){
 $columns = array(
 "cb" => "<input type=\"checkbox\" />",
 "title" => "Product Title",
 "thumbnail_url" => "Thumbnail URL",
 "product_info" => "Product Info",
 "video_code" => "Video Code",
 );
 return $columns;
}
function product_custom_columns($column){
 global $post;
 switch ($column) {
 case "thumbnail_url":
 $custom = get_post_custom();
 echo $custom["thumbnail_url"][0];
 break;
 case "product_info":
 $custom = get_post_custom();
 echo $custom["product_info"][0];
 break;
 case "video_code":
 $custom = get_post_custom();
 echo $custom["video_code"][0];
 break;
 }
}

?>

Using custom post type and add meta tag you can develop very nice applications. Now I am going to show you how you can extract the custom posts in wordpress frontend.

Using wp_query you can easily extract product posts. In any category page or conditionally you can use following code.


$loop = new WP_Query( array( 'post_type' => 'product', 'posts_per_page' => 10 ) );
while ( $loop->have_posts() ) : $loop->the_post();
 the_title();
the_content();
global $post;
 $custom = get_post_custom($post->ID);
echo $thumbnail_url = $custom["thumbnail_url"][0];
echo $product_info = $custom["product_info"][0];
echo $video_code = $custom["video_code"][0];
 echo '<div>';
 the_content();
 echo '</div>';
endwhile;

Or you can create the custom theme page using following code. Just create product.php page in your wordpress theme folder.Put following code in that file.


<?php

/*Template Name: Product*/

?>

<?php get_header(); ?>

<div id="container">

<div id="content" role="main">

<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>

<?php $recent = new WP_Query('post_type=product&posts_per_page=10′); while($recent->have_posts()) : $recent->the_post();?>

<?php the_title( '<h2><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0′ ) . '" rel="bookmark">', '</a></h2>' ); ?>

<div>

<?php the_content(); ?>

<?php

the_content();
global $post;
$custom = get_post_custom($post->ID);
echo $thumbnail_url = $custom["thumbnail_url"][0];
echo $product_info = $custom["product_info"][0];
echo $video_code = $custom["video_code"][0];

?>

<?php wp_link_pages( array( 'before' => '<div>' . __( 'Pages:', 'wordpressapi' ), 'after' => '</div>' ) ); ?>

<?php edit_post_link( __( 'Edit', 'wordpressapi' ), '<span>', '</span>' ); ?>

</div><!– .entry-content –>

<?php comments_template( ", true ); ?>

<?php endwhile; ?>

</div><!– #content –>

</div><!– #container –>

<?php get_sidebar(); ?>

<?php get_footer(); ?>

Now create product page and product as template.

If you have any issues or doubts then write to me.

How to install Mongodb on linux

Mongodb is used for many projects now, it is quite fast. I given full detailed information about How to install Mongodb on linux box. Before installing the Mongodb on linux box you need to install following packages on box.

How to install Mongodb on linux

[root@sonyk-pc Download]# sudo yum -y install git tcsh scons gcc-c++ glibc-devel
[root@sonyk-pc Download]# sudo yum -y install boost-devel pcre-devel js-devel readline-devel
[root@sonyk-pc Download]# sudo yum -y install boost-devel-static readline-static ncurses-static

For 32bit user use following command

[root@sonyk-pc Download]# wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz

For 64bit use following command

[root@sonyk-pc Download]# wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-1.6.2.tgz
[root@sonyk-pc Download]# tar xzf mongodb-linux-i686-1.6.2.tgz
[root@sonyk-pc Download]#  cd mongodb-linux-i686-1.6.2

Mongo stores database in data/db folder. so we need to create those folder using following command.

[root@sonyk-pc mongodb-linux-i686-1.6.2]# sudo mkdir -p /data/db/
[root@sonyk-pc mongodb-linux-i686-1.6.2]# sudo chown `id -u` /data/db
[root@sonyk-pc mongodb-linux-i686-1.6.2]# ./bin/mongod
./bin/mongod --help for help and startup options
Thu Sep  9 13:10:55 MongoDB starting : pid=22159 port=27017 dbpath=/data/db/ 32-bit
** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data
**       see http://blog.mongodb.org/post/137788967/32-bit-limitations
Thu Sep  9 13:10:55 db version v1.6.2, pdfile version 4.5

If you want to create mongodb service in linux then use following steps:

[root@sonyk-pc Download]# wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz
[root@sonyk-pc Download]# tar xzf http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz
[root@sonyk-pc Download]# mv mongodb-linux-i686-1.6.2 /opt/mongodb
[root@sonyk-pc Download]# mkdir -p /srv/db/mongodb
[root@sonyk-pc Download]# touch /srv/db/mongodb.log
[root@sonyk-pc Download]# mkdir /opt/bin/
[root@sonyk-pc Download]# mkdir /opt/config/

create the File: /opt/bin/mongodb-stop
Put following code in that file:

#!/bin/bash
pid=`ps -o pid,command ax | grep mongod | awk '!/awk/ && !/grep/ {print $1}'`;
if [ "${pid}" != "" ]; then
kill -2 ${pid};
fi

create the File: /opt/bin/mongodb-start
Put following code in that file:

#!/bin/sh
/opt/mongodb/bin/mongod --config /opt/config/mongodb \
## --upgrade \ ##runs a database upgrade option if needed \

File: /opt/config/mongodb
Put following code in that file:

# Configuration Options for MongoDB
#
# For More Information, Consider:
# - Configuration Parameters: http://www.mongodb.org/display/DOCS/Command+Line+Parameters
# - File Based Configuration: http://www.mongodb.org/display/DOCS/File+Based+Configuration
dbpath = /srv/db/mongodb
logpath = /srv/db/mongodb.log
logappend = true
bind_ip = 127.0.0.1
port = 27017
fork = true
auth = true
# noauth = true

Do that file as linux executable
chmod +x /opt/bin/mongodb-start
chmod +x /opt/bin/mongodb-stop
We’ve also created a very basic “init script” as a wrapper around the mongodb-start and mongo-stop scripts described above. You will still need to modify and manage the configuration of your MongoDB server in the files above. This script only provides a means for ensuring that MongoDB will start at boot. Issue the following commands:
wget http://library.linode.com/databases/mongodb/reference/init-rpm.sh
mv init-rpm.sh /etc/rc.d/init.d/mongodb
chmod +x /etc/rc.d/init.d/mongodb /etc/init.d/mongodb
chkconfig –add mongodb
chkconfig –level 35 mongodb on
You will also need to create a user and group for mongodb; issue the following command:

useradd -M -r --home-dir /opt/mongodb mongodb

Now issue the following command to ensure that the MongoDB user you just created will have access to all required files in the /srv/db/ hierarchy:
chown mongodb:mongodb -R /srv/db/
To start and stop MongoDB using the init script, issue the appropriate command from the following:
/etc/init.d/mongodb start
/etc/init.d/mongodb stop
For checking the web admin interface of Mongodb – listening on port 28017
Check this URL : http://localhost:28017/
Before installing the Mongodb on linux box you need to install following packages on box.[root@sonyk-pc Download]# sudo yum -y install git tcsh scons gcc-c++ glibc-devel[root@sonyk-pc Download]# sudo yum -y install boost-devel pcre-devel js-devel readline-devel[root@sonyk-pc Download]# sudo yum -y install boost-devel-static readline-static ncurses-static

For 32bit user use following command[root@sonyk-pc Download]# wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz
For 64bit use following command[root@sonyk-pc Download]# wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-1.6.2.tgz

[root@sonyk-pc Download]# tar xzf mongodb-linux-i686-1.6.2.tgz [root@sonyk-pc Download]# cd mongodb-linux-i686-1.6.2
Mongo stores database in data/db folder. so we need to create those folder using following command.
[root@sonyk-pc mongodb-linux-i686-1.6.2]# sudo mkdir -p /data/db/[root@sonyk-pc mongodb-linux-i686-1.6.2]# sudo chown `id -u` /data/db
Using following command you can start the mongo database.
[root@sonyk-pc mongodb-linux-i686-1.6.2]# ./bin/mongod./bin/mongod –help for help and startup optionsThu Sep 9 13:10:55 MongoDB starting : pid=22159 port=27017 dbpath=/data/db/ 32-bit
** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data** see http://blog.mongodb.org/post/137788967/32-bit-limitations
Thu Sep 9 13:10:55 db version v1.6.2, pdfile version 4.5

If you want to create mongodb service in linux then use following steps:
[root@sonyk-pc Download]# wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz [root@sonyk-pc Download]# tar xzf http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.2.tgz[root@sonyk-pc Download]# mv mongodb-linux-i686-1.6.2 /opt/mongodb[root@sonyk-pc Download]# mkdir -p /srv/db/mongodb[root@sonyk-pc Download]# touch /srv/db/mongodb.log
[root@sonyk-pc Download]# mkdir /opt/bin/[root@sonyk-pc Download]# mkdir /opt/config/
create the File: /opt/bin/mongodb-stopPut following code in that file;

#!/bin/bash
pid=`ps -o pid,command ax | grep mongod | awk '!/awk/ && !/grep/ {print $1}'`;if [ "${pid}" != "" ]; then    kill -2 ${pid};fi

create the File: /opt/bin/mongodb-startPut following code in that file:

#!/bin/sh
/opt/mongodb/bin/mongod --config /opt/config/mongodb \## --upgrade \ ##runs a database upgrade option if needed \

File: /opt/config/mongodbPut following code in that file:

# Configuration Options for MongoDB## For More Information, Consider:# - Configuration Parameters: http://www.mongodb.org/display/DOCS/Command+Line+Parameters# - File Based Configuration: http://www.mongodb.org/display/DOCS/File+Based+Configuration
dbpath = /srv/db/mongodblogpath = /srv/db/mongodb.loglogappend = true
bind_ip = 127.0.0.1port = 27017fork = true
auth = true# noauth = true

Do that file as linux executatblechmod +x /opt/bin/mongodb-startchmod +x /opt/bin/mongodb-stop

We’ve also created a very basic “init script” as a wrapper around the mongodb-start and mongo-stop scripts described above. You will still need to modify and manage the configuration of your MongoDB server in the files above. This script only provides a means for ensuring that MongoDB will start at boot. Issue the following commands:
wget http://library.linode.com/databases/mongodb/reference/init-rpm.shmv init-rpm.sh /etc/rc.d/init.d/mongodbchmod +x /etc/rc.d/init.d/mongodb /etc/init.d/mongodbchkconfig –add mongodbchkconfig –level 35 mongodb on

You will also need to create a user and group for mongodb; issue the following command:

useradd -M -r --home-dir /opt/mongodb mongodb

Now issue the following command to ensure that the MongoDB user you just created will have access to all required files in the /srv/db/ hierarchy:
chown mongodb:mongodb -R /srv/db/
To start and stop MongoDB using the init script, issue the appropriate command from the following:
/etc/init.d/mongodb start/etc/init.d/mongodb stop

For checking the web admin interface of Mongodb – listening on port 28017Check this URL : http://localhost:28017/

How to install Mongodb on linux
How to install Mongodb on linux

create install script for drupal module and create tables

Drupal is most popular CMS in the world for creating the web application. For custom purpose we need to create the drupal modules. We need the custom tables for creating the drupal.

create install script for drupal module and create tables

create install script for drupal module and create tables
create install script for drupal module and create tables

In this article I will tell how you can create the sample drupal module with custom two table. When you activate the drupal module then tables which are defined in the module will be get installed. When you unactive the drupal module tables will get deleted from database.

For creating the drupal module three files are necessary and that as follow:

1. yourmodule.info (you can use your module name

2. yourmodule.install

3. yourmodule.module

First .info file is important and in that file we will put module related information. mymodule.info file has following content.


; $Id$
name = My module
description = This module is to test the install feature
core = 6.x

For creating custom tables you can use following code in mymodule.install file.


<?php
function mymodule_schema() {
 $schema['mymodule_test'] = array(
 'description' =--> t('The base table for saved articles.'),
 'fields' => array(
 'id' => array(
 'description' => t('The primary identifier'),
 'type' => 'int',
 'unsigned' => TRUE,
 'not null' => TRUE),
 'uid' => array(
 'description' => t('The user identifier.'),
 'type' => 'int',
 'unsigned' => TRUE,
 'not null' => TRUE,
 'default' => 0),
 'name' => array(
 'description' => t('The name.'),
 'type' => 'varchar',
 'length' => '100',
 'not null' => TRUE,
 'not null' => TRUE),
 ),
 'primary key' => array('id'),
 );

 $schema['mymodule_test1'] = array(
 'description' => t('The base table for saved articles.'),
 'fields' => array(
 'id' => array(
 'description' => t('The primary identifier'),
 'type' => 'int',
 'unsigned' => TRUE,
 'not null' => TRUE),
 'uid1' => array(
 'description' => t('The user identifier.'),
 'type' => 'int',
 'unsigned' => TRUE,
 'not null' => TRUE,
 'default' => 0),
 'name' => array(
 'description' => t('The name.'),
 'type' => 'varchar',
 'length' => '100',
 'not null' => TRUE,
 'not null' => TRUE),
 ),
 'primary key' => array('id'),
 );

 return $schema;
}

function mymodule_install() {
 // Create my tables.
 drupal_install_schema('mymodule');
}

function mymodule_uninstall() {
 // Drop my tables.
 drupal_uninstall_schema('mymodule');
}
?>

.Module file is most important. In this file you can put the code which for you written the module. Now in this file Now I am giving you the sample menu code. mymodule.module file has following content.


<?php
function mymodule_menu() {

 $items['mymodule'] = array(
 'title' =--> 'mymodule View',
 'page callback' => 'mymodule_view',
 'access arguments' => array('access content'),
 );

 return $items;
}

function mymodule_view()
{
 return 'test';
}

?>

If you have some more doubts then please content me and comment on this article.

If you want more drupal tutorials than visit here

60+ latest photoshop tutorials all time favorite

Photoshop is great tool for image editing. It is very powerful tool. In this post we are brought to you beautiful & creative 60+ latest photoshop tutorials.

latest photoshop tutorials

Just follow them and increase your creativity.

1: How to Create a Greek Mythology Inspired Photo Manipulation

latest photoshop tutorials
latest photoshop tutorials

2: Create an Angelic Sculpture Made of Ice in Photoshop

3: Easy HDR Technique by Cristian Iancu

4: Create a Magical Four Piece Stardust Composition

5: Create a Digital Camera With Wooden Accents Using Photoshop

6: How to Create a Highly Detailed Hi-Tech Power Button

7: Concept Art: Create a Sci-Fi Interior Using Digital Painting Techniques

8: Create a Shiny Psdtuts+ Folder Icon in Photoshop

9: 3D Water Text Effect with Repoussé in Photoshop CS5

10: Playing with Inflate in Repoussé in Photoshop CS5 Extended

11: Mixing Brushes and Layers in Photoshop by Josh Overton

12: 3D Type with Repoussé in Photoshop CS5 Extended

13: Clash of the Titans Text Effect in Photoshop

14: Melting Girl in Photoshop

15: haunted castle movie poster

16: Super Easy Neon Style in Photoshop – Screencast

17: Photoshop Quick Tips: Neon with Layer Styles

18: Super Easy Typographic Portrait in Photoshop

19: Lost in Space Typography in Photoshop

20: create water drops

21: Easy Digital Painting Illustration in Photoshop

22: Abduzeedo 2010 Light Effects in Photoshop

23: Wind Blow by Francesco di Pietro

24: Very Easy Heroes Eclipse in Photoshop – Screencast

25: Create a Knife in Photoshop – Screencast

26: Create a Realistic Soda Bottle in Photoshop

27: Create a Retro Urban Gig Poster in Photoshop – Screencast

28: How to Create a Nuclear Disaster Landscape – Basix

29: Create a Beautiful and Dramatic Scene With Photo Manipulations – Basix

30: glossy buttons for website using photoshop

31: Create a Chalkboard Icon Using Photoshop and IconBuilder – Screencast

32: Quick Tip: Create Metallic Text on a Concrete Background

33: Create a Photo Realistic USB Cable in Photoshop

34: Create a Sleek and Stylish MP3 Player in Photoshop

35: convert photo in a hollywood movie poster using photoshop

36: Create a Bulletin Board With Realistic Shadows

37: Turn a Flawless Blonde Beauty Into a Sword-Wielding Fantasy Action Hero

38: How to Draw a Watch in Photoshop

39: How to Create an Incredible Typographic Illustration

40: convert a photo into polaroid effect using photoshop

41: Create a Cardboard Box Filled With Glossy Icons

42: Create a Dark and Surreal Poster Using Your Own Portrait

43: Make a Freezing Cold Snow-themed Abstract Piece

44: How to Create a Stylish Media Player in Photoshop

45: How to Create a Realistic Fountain Pen

46: How to Create a Shiny Paint Bucket Icon

47: How to Create a Stylish Pair of Headphones

48: Create a Fantastic Abstract Fan Poster

49: Create an Abstract Cloud Jumper in Photoshop

50: Create a Face Paint Dripping Effect

51: Create a Vibrant Colorful Alcohol Product Ad in Photoshop

52: Achieve Brilliant Lighting Effects in Photoshop

53: Combine Renders and Light Effects for Awesome Results

54: Design an Underwater Omega Code Poster

55: Create A Beautiful 3D Text Composition

56: Create a Funny Wooden Type Treatment in Photoshop

57: How to create a retro-style text effect in Cinema 4D and Photoshop

58: Jungle 3D text in Photoshop

59: Draw a 3D Umbrella with Photoshop

60: Make a Surreal 3D Outdoor Room Scene in Photosho

61: How to Create a Matte Painting Inspired Scene

62: Make a Vivid Flaming Skull Conceptual Composition

63: Create Detailed Letters of Gold and Diamond

64: Create a Cartoon Car Similar to Cars Movie

65: Paint an Iron Man’s Helmet Digitally in Photoshop

66: Creating an Impactful Disco Party Poster

67: Creating an Ecological Fairy Tale Wallpaper

68: Combine 3D Shapes and Vectors for a Dynamic Composition