Ruby on Rails 3.0 released with new features

I am working on Ruby on Rails for past three and half year. It is really great to working with Ruby on Rails. Because working on Ruby on Rails is a really great feeling daily inventing new things, trying new things and contributing to ROR community. Discussing new things with ROR developers is really great.

Ruby on Rails 3.0 released with new features
Ruby on Rails 3.0 released with new features

On 5th Feb we got news about release of Rails 3.0 beta. We all developers are really waiting for that day. We checked the new version of Rails but what is more interesting.

The interesting part is what is new in Rails 3.0. So many developers contributed in Rails 3.0. They really worked and planned so hard.

Here I am making list what Rails 3.0  has, means new features:

  • Brand new router with an emphasis on RESTful declarations
  • New Action Mailer API modelled after Action Controller (now without the agonizing pain of sending multipart messages!)
  • New Active Record chainable query language built on top of relational algebra
  • Unobtrusive JavaScript helpers with drivers for Prototype, jQuery, and more coming (end of inline JS)
  • Explicit dependency management with Bundler

If you want to use the Rails 3.0 then you should install first following gems.

#gem install tzinfo builder memcache-client rack rack-test rack-mount erubis mail text-format thor bundler i18n
#gem install rails --pre

Or you can use following command to install whole Rails 3.0 with dependencies

gem uninstall rubygems-update
gem update --system
#gem install rails3b

Important Note: Rails 3 requires Ruby 1.8.7+ , you should install latest Ruby version. You can download latest Ruby version from here.

Ruby 1.9.1

Here I am giving the list of gems and plugins which are compilable of Rails 3.0. you should check the following URL:

http://wiki.rubyonrails.org/rails/version3/plugins_and_gems

Now I am started working on Rails 3.0 and I am searching for the issues with Rails 3.0 because Rails 3.0 is in Beta so all ROR developer need to come up with issues of Rails 3.0 and try to fix that or submit that issue to community.

wordpress migration to new hosting service or domain

how to do wordpress migration to new hosting service – This question always came to web developers. After searching on Internet I really did not found satisfied answer for this question. Using our steps wordpress migration to new hosting service or domain made easy

wordpress migration to new hosting service or domain

Earlier I did wordpress migration to new hosting service or new domain so many times. It was like 5 minutes job for any web developer. Don’t be afraid about wordpress migration at all.

Many people suggest to use wordpress utility which import and export xml. This is given by wordpress itself. But I strongly say don’t use that tool. that is not really full proof.

Just follow my steps to do wordpress migration to new hosting or domain.

1. First take backup of file system of your wordpress website using FTP credential.

2. Open wp-config.php file and change database name(what you want)

3. wp_options -Table name
option_name column – change(siteurl and home)

4. wp_blogs- Table name
domain column – change to your domain name

5. wp_site- Table name
domain column – change to your domain name

6. wp_usermeta
meta_key column – change(source_domain)

Most important part of migration. Fixing the image path of wordpress website

7. Just run following query using phpmyadmin or command prompt and any sql editor.

UPDATE wp_posts SET post_content = REPLACE(post_content, ’NEW_DOMAIN.com’, ‘OLD_DOMAIN.com’);

For changing the mysql queries you can use the following URL:

https://purabtech.in/mysql-queries-wordpress-website-migration/

Follow above steps and your are done with migration.

wordpress migration to new hosting service or domain
wordpress migration to new hosting, question always came to web developers. Using our steps wordpress migration to new hosting service or domain made easy

That sit!

fetch wordpress posts which starting with specific word or alphabet

If you want to fetch wordpress posts which is starts with specific word or alphabet. That is really easy to achieve in wordpress.

Article for fetch wordpress posts which starting with specific word.

Just follow my steps:

Open your functions.php file from your wordpress theme folder.


add_action( 'posts_where', 'starting_word' );
function starting_word( $sql ){
 global $wpdb;
 $starting_word = get_query_var( 'starting_word' );

 if( $startswith ){
 $sql .= $wpdb->prepare( " AND $wpdb->posts.post_title LIKE %s ", $starting_word.'%' );
 }

 return $sql;
}

Open your index.php file or any file where you want show the wordpress posts which is starting with specific word or alphabet.

Use following code in that file.


<?php  query_posts('paged='.$paged.'&starting_word=wordpressapi&category_name=Your Category&posts_per_page=10'); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>

<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
<?php the_title(); ?></a>

<br />
<?php the_content(); ?>
<?php endwhile; ?>

fetch wordpress posts which starting with specific word
fetch wordpress posts which starting with specific word

WordPress vs Joomla vs Drupal, Which is more popular and user friendly

Which CMS is most popular and most user-friendly in the world. WordPress vs Joomla vs Drupal all are best cms. you need to decide what type of site you want.  This is most common question among the developers and clients.

So many times this question is questioned the answered But still I am going answer this question with my opinions.

WordPress vs Joomla vs Drupal

Biggest growth of jobs is WordPress. I am wordpress developer and  I can feel this trend today.
We can this graph that displays the growth of wordpress. Seeing this graph We can say that in 2009 and 2010 wordpress is really rocking.

Wordpress vs Joomla vs Drupal
WordPress vs Joomla vs Drupal

I worked on all the  cms like wordpress, drupal, joomla and many more. But in this year I worked on wordpress for quite some extra time.

When we choose CMS we consider following points.

1. Which CMS will provide you Best Seo options

Ans: When we see and check the all CMS then I can easily say that wordpress has ability to provide you best seo option. After that I will must say Drupal is best option to go with. This will also provide you best seo option.

2. Which CMS is easy to make custom theme from custom design PSD

Ans: I can say with wordpress and drupal both creating a theme is very easy. any web developer who have very basic knowledge of PHP they can develop custom theme very easily.

3. Which CMS is easy  for developer to make custom plugins, modules and components easily

Ans: If you started learning API’s of both the CMS. All are good and easy and all provided good amount of help on internet. But I can rate myself as follows:

a. WordPress

b. Drupal

c. Joomla

Anyways that is depending on your knowledge and understanding. All you need to spend some time to understand the API’s of all CMS.

4. Which CMS admin is most user-friendly and easy to use for non-technical people

Ans: For this point I must say wordpress is the best tool. Drupal has admin panel but little complex to understand and same with joomla.

5. Which CMS is most good for  E-commerce site, Blog, Small site, News sites and company website.

Ans:  I recommend again wordpress here. you can set up wordpress very easily and quickly with minium effort. For big websites like magazine and news sites wordpress is the great tool.

Next point is,  for ecommerce and blogging wordpress is the great tool. If you are aware with wordpress then go with drupal.

Conclusion:  If you want to develop very complex website with multiple features like ad management, forums, client support, video gallery, media gallery then go with Drupal.

So many very big websites are built-in Drupal and WordPress. Choosing the CMS is all depending on your client requirement.

how to use Graphic pen tool in photoshop with photo

In this article I will show you how to use the Graphic pen tool in photoshop with photo effect. Using this tool we can create easily photo effect. This is very simple effect but still this look very cool.

Graphic pen tool in photoshop

Follow my steps for creating photo effect using graphic pen tool in photoshop

First step

Open a Photoshop then File>>new (Ctrl+N)

Graphic pen tool in photoshop
Graphic pen tool in photoshop

Second step

create a new document

Third step

File >> open (Ctrl+O) then select image as per your choise

Fourth Step

Now select filter >> select Sketch effect >> Graphic pen… (Ctrl+F)

Fifth step



click on graphic pen option

Ok and you can see the photo with graphic pen effect in photoshop…

How to use Seo Meta Tags wordpress plugin

we created Seo Meta Tags wordpress plugin. We really happy to announce this news. This is our fourth wordpress plugin by our team which helpful for seo.

How to install SEO meta Tags?

Follow the usual routine;

  1. Open WP admin – Plugins – Add New
  2. Enter “Seo Meta Tags” under search and hit Enter
  3. Plugin will show up as the first on the list, click “Install Now”

Or if needed, upload manually. Follow the steps below to install the plugin.

  1. Upload the seo-meta-tags directory to the /wp-content/plugins/directory
  2. Activate the plugin through the ‘Plugins’ menu in wp
  3. Go to “Seo Meta Tags” option to configure the button

Launched the Seo Meta Tags wordpress plugin

Seo Meta Tags

Using this plugin you will get following features:

We ensure you that Seo Meta Tags plugin will increase your website SEO with two week so drastically.

You can enter your meta keywords and description for your homepage.
This plugin will add different Meta description for each individual post as your excerpt of your post.
This will help your blog to rank better in google. You can easily increase your blog traffic using this plugin.

Using SEO meta tags you can create sitemap for google, yahoo, bing, yandex. It has facility to add  Google, Bing Verify ownership with wordpress website.

This plugin is really helpful to SEO. Search engine will read meta description for each page.
Using this plugin your blog will have different meta description and relative meta description as per your single post.
That is really helpful to your blog.

Here you can see the screen shot of Seo Meta Tags Admin panel:

How to use Seo Meta Tags wordpress plugin
How to use Seo Meta Tags wordpress plugin

You can download Seo Meta Tags from following URL:

Add Webmaster Tool Information.

Official URL of Seo Meta Tags wordpress plugin:

http://wordpress.org/extend/plugins/seo-meta-tags/

how to use Graphic pen tool in photoshop with text

In this article I will show you how to use Graphic pen tool for text effect. Using this tool we can create easily text effect.

use Graphic pen tool

Draw straight line segments with the Pen tool.
The simplest path you can draw with the Pen tool is a straight line, made by clicking the Pen tool to create two anchor points. By continuing to click, you create a path made of straight line segments connected by corner points.

Select a text write on workspace “Graphic pen”

Then, go to filter option >> sketch option >>Graphic pen…

Then  go to effect for Graphic pen this will be show you

Then effect will show you for Graphic Pen……

use Graphic pen tool
use Graphic pen tool

How to find wordpress posts by category name

You can fetch the wordpress posts by category name. We have given simple code snippet for find wordpress posts by category name.  Many developer want to do this. I will show how easily achieve this.
You can control the per page post showing and pagination also. You can use following code in any of your page.

How to find wordpress posts by category name

Use following code :

<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php  query_posts('paged='.$paged.'&category_name=Your Category&posts_per_page=10'); ?>
<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php while ($my_query->have_posts()) : $my_query->the_post(); ?>

php the_permalink() ?>" title="<!--?php the_title(); ?-->">
<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php the_title(); ?>

<br />
<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php the_content(); ?>
<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php endwhile; ?>

find wordpress posts by category name
find wordpress posts by category name

Best IDE for WordPress, Drupal Plugin and Theme development

Many developer who are experienced in development. But with another CMS development. we look for Best IDE for WordPress, Drupal Plugin and Theme development.  But still that comes to another cms or project development. We are always search for good IDE which are free and open source that is the first requirement.

Best IDE for WordPress, Drupal Plugin and Theme development

Our basic need are as follows in any IDE, the IDE need to support following things:

  • CSS
  • XHTML/HTML
  • JavaScript
  • PHP
  • MySQL

I created a list of IDE which I used daily  to do a development. Here I need to clarify IDE is language specific. I work in PHP, Ruby on Rails, Adobe Air, Flex, Javascript, CSS.

I recommend following IDEs which I really found useful for all the developer who are working in wordpress, joomla, drupal development.

1. eclipse (Compatible  on Windows and Linux)

Best IDEs for WordPress, Joomla, Drupal Plugin and Theme development
Best IDE for WordPress, Drupal

Description: Eclipse is best IDE for all language development. Eclipse IdE is basically Java development but still that provides PHP, ROR and other language support. I like this IDE for java development but I did not recommend for PHP or Ruby on Rails.

2. NetBeans (Compatible  on Windows and Linux)

Best IDEs for WordPress, Joomla, Drupal Plugin and Theme development
Best IDE for WordPress, Drupal

Description: This IDE has also all language support. I specially like this IDE from Ruby on Rails development. I Used this IDE for Ruby on Rails development as well as some times for PHP development. Among the Ruby on Rails developer this IDE is so popular.

3. Komodo (Compatible  on Windows and Linux)

Best IDE for WordPress, Drupal
Best IDE for WordPress, Drupal

Description : This IDE is also support for all languages. This IDE is really good support for PHP. I really love this IDE for PHP development. Simple and fast and still nice features about PHP. This IDE is really popular among the PHP developers.

4. Aptana (Compatible  on Windows and Linux)

Best IDE for WordPress, Drupal
Best IDE for WordPress, Drupal

Description : This IDE is mainly made for Ruby on Rails development. This is also popular among Ruby developers. This IDE has features like eclipse. I like this IDE for Adobe Air and flex development.  This IDE has also PHP support.

5. EditPlus (Compatible  on Windows)

Best IDE for WordPress, Drupal
Best IDE for WordPress, Drupal

Description: This IDE is plain simple text editor. Shows you simple color highlight features. I specially recommend this IDE for PHP development and new PHP developer always start with this IDE so they will get filmier with PHP functions and methods because this IDE is does not provide any help. I love the use this IDE in daily use for any language development.

If you want to add any more IDEs. You can comments on this article.

how can we execute custom queries on wordpress

We can use the custom queries in wordpress. Using the custom queries we can fetch the wordpress table data as per our custom requirement.

how can we execute custom queries on wordpress

We you create your table then you can fetch values from that table using following command.

$ourdata = $wpdb->( "SELECT id, name FROM yourtable" );

If you want to create the table in wordpress then use following article.

https://purabtech.in/create-add-tables-wordpress-theme/

More example about executing the own custom quries.

$wpdb->query("
	DELETE FROM $wpdb->postmeta WHERE post_id = '123'
	AND meta_key = 'google'");

another example about adding the data into table which is from wordpress:

$table_name = "your_table";
 $welcome_name = "Mr. WordPressapi";
  $welcome_text = "Congratulations, you just completed the installation!";

  $insert = "INSERT INTO " . $table_name .
            " (time, name, text) " .
            "VALUES ('" . time() . "','" . $wpdb->escape($welcome_name) . "','" . $wpdb->escape($welcome_text) . "')";

  $results = $wpdb->query( $insert );

Getting the single value from any table

$user_count = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM $wpdb->users;"));

Get the single row value from wordpress table

$mylink = $wpdb->get_row("SELECT * FROM $wpdb->links WHERE link_id = 10", ARRAY_A);
how can we execute custom queries on wordpress
how can we execute custom queries on wordpress

you can use inner join, outer join and multiple join in wordpress custom queries.