Pages

Wednesday, January 6, 2016

How to block or prevent spam registrations/spam bots on phpmotion web site?


I have done lots of research and tried many possible ways. Finally I found a solution like to use google recaptcha on the website. To do this we need to follow below steps.

1. Register in Google for captcha using the link https://www.google.com/recaptcha/admin#list.
2. After register you will get site key and secrete key.

Sunday, April 12, 2015

Wordpress custom pages creation?

functions.php
<?php
register_post_type('contact', array('label' => 'contact','description' => '',
'public' => true, 'publicly_queryable' =>true, 'show_ui' => true,'show_in_menu' => true,'capability_type' => 'post',
 'hierarchical' => true, 'rewrite' => array( 'slug' => 'contact', 'with_front' => false),'query_var' => true,'exclude_from_search' => false,
 'has_archive' => true,'supports' => array('title','editor','thumbnail','author','comments'),'labels' => array (
  'name' => 'List of Contacts',
  'singular_name' => 'contact',
  'menu_name' => 'Contacts',
  //'add_new' => 'Add Users Conference',
  //'add_new_item' => 'Add Users Conference',
  'edit' => 'Edit Contacts',
  'edit_item' => 'Edit Contacts',
  'new_item' => 'New Contacts',
  'view' => 'View Contacts',
  'view_item' => 'View Contacts',
  'search_items' => 'Search Contacts',
  'not_found' => 'No Users Found',
  'not_found_in_trash' => 'No Users Found in trash',
  'parent' => 'Contacts',
),) );
/* Meta box for userconfrence*/
add_action("admin_init", "contact_enquerires_meta_box"); 
    function contact_enquerires_meta_box(){ 
        add_meta_box("contact-meta", "Contact Details", "contact_enquerires_meta_options", "contact", "normal", "high"); 
    } 
    function contact_enquerires_meta_options(){ 
            global $post;
            if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) return $post_id; 
            $custom2 = get_post_custom($post->ID);
            $cname = $custom2["contact_name"][0];
             $cemail = $custom2["contact_email"][0];
             $cphone = $custom2["contact_phone"][0];
             $message = $custom2["contact_comments"][0];

          
          
    ?>
 
<div class="my_custom">
<style>
.register_formadmin div.field {
   
    position:relative;
    width:100%;
}
#userconfregadmin label{
display:block;
font-weight:bold;
width:140px;
margin-top:7px;

}
</style>
    <div  class="register_formadmin" id="userconfregadmin">
    <table>
                <tr>
                    <td>Name: </td>
                    <td><input type="text" name="cname" id="cname" value="<?php echo $cname; ?>"></td>
                </tr>
                <tr>
                    <td>Email: </td>
                    <td><input type="text" name="cemail" id="cemail" value="<?php echo $cemail; ?>"></td>
                </tr>
                <tr>
                    <td>Phone: </td>
                    <td><input type="text" name="cphone" id="cphone" value="<?php echo $cphone; ?>"></td>
                </tr>
                <tr>
                    <td>Message: </td>
                    <td><textarea name="message" id="message"><?php echo $message; ?></textarea></td>
                </tr>
               
            </table>
            <input type="hidden" name="trash_metafield" id="trash_metafield" value="<?php echo wp_create_nonce(plugin_basename(__FILE__).$post->ID); ?>" />
    </div>
   
    <?php
    }
    add_action('save_post', 'save_contacts');
    function save_contacts(){ 
        global $post; 
        if (!wp_verify_nonce($_POST['trash_metafield'], plugin_basename(__FILE__).$post->ID)) {
    return $post->ID;
  }   

        if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ){
            return $post_id; 
        } else { 
         update_post_meta($post->ID, "contact_name", $_POST["cname"]);
          update_post_meta($post->ID, "contact_email", $_POST["cemail"]);
          update_post_meta($post->ID, "contact_phone", $_POST["cphone"]);
          update_post_meta($post->ID, "contact_comments", $_POST["message"]);


        } 
    }
   
add_filter( 'manage_edit-contact_columns', 'my_edit_contact_columns' ) ;

function my_edit_contact_columns( $columns ) {

    $columns = array(           
        'title' => __( 'Email' ),
        'ContactName' => __( 'Contact Name' ),
        'Phone' => __( 'Phone' ),
        'date' => __( 'Date' )
    );

return $columns;
}



add_action( 'manage_contact_posts_custom_column', 'my_manage_contact_columns', 10, 1 );

function my_manage_contact_columns( $column, $post_id ) {
    global $post;

    switch( $column ) {

        /* If displaying the 'duration' column. */
        case 'ContactName' :

            /* Get the post meta. */
            $userstatus = get_post_meta($post->ID, 'contact_name', true );

            /* If no duration is found, output a default message. */
           
            echo (  ucwords($userstatus));

            break;
        case 'Phone' :

            /* Get the post meta. */
            $userstatus = get_post_meta($post->ID, 'contact_phone', true );

            /* If no duration is found, output a default message. */
           
            echo (  ucwords($userstatus));

            break;


        /* Just break out of the switch statement for everything else. */
        default :
            break;
    }
}

/* add post price */
add_action( 'admin_menu', 'register_my_custom_menu_page' );
function register_my_custom_menu_page(){
//add_menu_page( 'custom menu title', 'Premium Posts Settings', '', 'premium_post', 'my_custom_premium_post_menu_page', get_template_directory_uri().'/images/admint_settings.png');
add_submenu_page( 'options-general.php', 'My Settings', 'My Settings', 'manage_options', 'premium_post', 'my_custom_premium_post_menu_page');
}

function my_custom_premium_post_menu_page(){
include TEMPLATEPATH .'/price-settings.php';
}
/* end post price */ 
?>

page-contact.php:
<?php
/**
 * The template for displaying all pages
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 *
 * @package WordPress
 * @subpackage Twenty_Twelve
 * @since Twenty Twelve 1.0
 */

get_header();
if(isset($_POST['submit'])){
$cname=$_POST['cname'];
$cemail=$_POST['cemail'];
$cphone=$_POST['cphone'];
$message=$_POST['message'];
$post_title = $cemail;
 global  $wpdb;
/* Checking email exists or not */
 $query = $wpdb->prepare(
      "SELECT ID FROM $wpdb->posts
        WHERE post_title = '$post_title'
        AND post_type = 'contact'
       AND post_status='Publish'"
   );
$wpdb->query( $query );
if ( $wpdb->num_rows ) {
} else{
/*inserting values in to database */
$post_information = array(
'post_title' => $post_title,
'post_type' => 'contact',
'post_status' => 'Publish'
        );
$post_id = wp_insert_post( $post_information, $wp_error );
update_post_meta($post_id,'contact_name',$cname);
update_post_meta($post_id,'contact_email',$cemail);
update_post_meta($post_id,'contact_phone',$cphone);
update_post_meta($post_id,'contact_comments',$message);
echo'<script> window.location="http://www.google.com";</script>';
}
}
?>
<script src="<?php echo get_template_directory_uri()?>/js/jquery.min.js"></script>
<script src="<?php echo get_template_directory_uri()?>/js/jquery.validate.js"></script>
   
 <script type='text/javascript'>
 var $$_ = jQuery;
$$_(document).ready(function(){
 var regxalpha = /^[A-Za-z .-0"']+$/;
var regxalphacaptch = /^[A-Za-z]+$/;
 var regxalpha1 = /^[A-Za-z _.-123456789"'@&-/]+$/;
 var regnum=/^[-0123456789"'-/]+$/;
 var regemail = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
$$_.validator.addMethod("vendornamevalidate", function(value, element) {
                    var cname = jQuery('#cname').val();
                    if (regxalpha.test(cname)) {
                        return cname;
                    }
                }, 'Invalid Name');
              
$$_.validator.addMethod("emailvalidate", function(value, element) {
                    var cemail = jQuery('#cemail').val();
                    if (regemail.test(cemail)) {
                        return cemail;
                    }
                }, 'Invalid Email');
              
$$_.validator.addMethod("vendorphone", function(value, element) {
                    var cphone = jQuery('#cphone').val();
                    if (regnum.test(cphone)) {
                        return cphone;
                    }
                }, 'Invalid Phone');               

$$_('#contact_form').validate({// initialize the plugin
                
                    rules: {
                         cname: {
                            required: true,
                            vendornamevalidate: true

                        },  
                      
                          
                      
                        cemail: {
                            required: true,
                            email: true,
                            emailvalidate: true
                          
                        },  
                        cphone: {
                         required: true,
                         number: true,
                         vendorphone: true
                        },
                  
                    },
                    messages: {
                        cname: {
                            required: "Please specify a First Name"
 
                        },
                        
                      
                        cemail: {
                            required: "Please specify your Email",
                            email: "Invalid Email",
                        },
                        cphone: {
                            required: "Please specify your Phone",
                             number: "Enter numbers only",
                        },
                      
                      
                      
                    }
                });

            });

</script>
    <div id="primary" class="site-content">
        <div id="content" role="main">
        <form name="contacts" id="contact_form" action="" method="post">
            <table>
                <tr>
                    <td>Name: </td>
                    <td><input type="text" name="cname" id="cname"></td>
                </tr>
                <tr>
                    <td>Email: </td>
                    <td><input type="text" name="cemail" id="cemail"></td>
                </tr>
                <tr>
                    <td>Phone: </td>
                    <td><input type="text" name="cphone" id="cphone"></td>
                </tr>
                <tr>
                    <td>Message: </td>
                    <td><textarea name="message" id="message"></textarea></td>
                </tr>
                <tr>                  
                    <td clospan="2"><input type="submit" value="Submit" name="submit" id="submit"></td>
                </tr>
            </table>
        </form>
        </div><!-- #content -->
    </div><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>

page-contact-list.php
<?php
/**
 * The template for displaying all pages
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 *
 * @package WordPress
 * @subpackage Twenty_Twelve
 * @since Twenty Twelve 1.0
 */

get_header(); ?>

    <div id="primary" class="site-content">
        <div id="content" role="main">
        <?php
        $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
        $pr=array(
        'post_type'=>'contact',
        'posts_per_page' => 3,
        'paged' => $paged,
        'post_status'=>'publish'
        );

$obj=new WP_Query($pr);


if($obj ->have_posts() )
{
?>
<table style="width:500px;" cellpadding="1" cellspacing="1">
<tr>
<td>Name</td>
<td>Email</td>
<td>Phone</td>
<tr>
<?php
while($obj ->have_posts())   
   
{
$obj->the_post();
$post_id=$post->ID;
 $page_data =get_page($id); 
 $title = $page_data->post_title;
 //$desc=$page_data->post_content;
 $name=get_post_meta($post_id,'contact_name')[0];
 $phone=get_post_meta($post_id,'contact_phone')[0];
 ?>
 <tr>
<td><?php echo $name?></td>
<td><?php echo $title?></td>
<td><?php echo $phone?></td>
<tr>
 <?php
 }
 ?>
 </table>
 <?php
 }
?>
<!-- pagination -->
<?php next_posts_link(); ?>
<?php previous_posts_link(); ?>
        </div><!-- #content -->
    </div><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>

Price-settings.php
<?php
global $wpdb, $PasswordHash, $current_user, $user_ID;
$registeration_cost = get_option( 'registeration_cost', 'default_value' );
$guest_cost = get_option( 'guest_cost', 'default_value' );
$paypal_emailid = get_option( 'paypal_emailid', 'default_value' );
if($_POST['submit']){
$registeration_cost = trim($_POST['registeration_cost']);
$paypal_emailid = trim($_POST['paypal_emailid']);
$guest_cost = trim($_POST['guest_cost']);
update_option( 'registeration_cost', $registeration_cost);
update_option( 'guest_cost', $guest_cost);
update_option( 'paypal_emailid', $paypal_emailid);
}
?>
<style>
div.field {
    float:left;
    position:relative;
    width:100%;
}

label{
display:block;
font-weight:bold;
text-align:right;
width:140px;
margin-top:7px;
float:left;
}
.settings_submit {
    padding-left: 142px;
}
</style>
<section class="main_cont">
<!-- middle block starts here-->
<section class="mid_block">

<script src="<?php echo get_template_directory_uri(); ?>/js/jquery.validate.js"></script>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<div class="entry-content">
<div id="container">
<div id="content">
<p>
<?php
if($error)
echo $error;
if($success)
echo $success;
?>
</p>
<?php //the_title(); ?>
<div id="user-registration" class="main">
<div id="pwdReset" class="registrationArea">
<form name="postsettings" class="regForm" id="postsettings" method="post">
<dl>
<div class="divider">
<div class="content">


<div class="field">
<label>Registration Fee&nbsp;<span>*</span>
</label>
<input type="text" name="registeration_cost" id="registeration_cost" value="<?php echo $registeration_cost; ?>" class="text-input" size="20" required="required">
(USD)
</div>
<div class="field">
<label>Guest Fee&nbsp;<span>*</span>
</label>
<input type="text" name="guest_cost" id="guest_cost" value="<?php echo $guest_cost; ?>" class="text-input" size="20" required="required">
(USD)
</div>

<div class="field">
<label>Paypal Emailid<span>*</span>
</label>
<input type="text" name="paypal_emailid" id="paypal_emailid" value="<?php echo $paypal_emailid; ?>" class="text-input" size="20"  required="required">
</p>
</div>
<div class="settings_submit"><input type="submit" name="submit" id="pass_submit" value="UDATE" class="button button-primary button-large"></div>



<table style="margin-left:153px">
  <tr>
    <td>
    
    </td>
  
  </tr>
</table>
</div>
<div class="clear"></div>
</div>
</dl>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- .entry-content -->
</div>
<!-- #content -->
</div>
<!-- #primary -->
</section>
<!-- middle block ends here-->

</section>
<?php //} ?>

Tuesday, January 27, 2015

Why User login stopped working or not working properly using active directory integration? and how to solve?

Sometimes user login won't work properly or stop working because of configurations issue. To solve this.. 1. Login at admin side. 2. Goto active directory integration settings. 3. Uncheck the "Use TLS" and save the settings. 4. Clear the cache and try to login.

Tuesday, August 26, 2014

How to disable hyper links in comments section of Wordpress?

To disable hyper links in comment section of Wordpress need to follow below two steps.

1. Open functions.php in the theme which you are using.
2. Place the below code in functions.php and save it.

add_filter('comment_text', 'wp_filter_nohtml_kses');
add_filter('comment_text_rss', 'wp_filter_nohtml_kses');
add_filter('comment_excerpt', 'wp_filter_nohtml_kses');

Monday, July 7, 2014

How to add a Custom Widget in Wordpress?

To add a custom widget just create a plugin by following below steps.

1. Create a folder in plugins folder.
2. Add a php file with folder name(Suppose if folder name is abc the file in folder should abc.php).
3. Add below code in that file.

<?php
/*
Plugin Name: Widget Plugin Name
Plugin URI: Author Link
Description: A simple plugin that adds a calendar of events at rights side
Version: 1.0
Author: Author Name
Author URI: Author Link
License: GPL2
*/
class wp_my_plugin extends WP_Widget {

// constructor
    function wp_my_plugin() {
        parent::WP_Widget(false, $name = __('My Widget', 'wp_widget_plugin') );
    }
    // widget form creation
function form($instance) {

// Check values
if( $instance) {
     $title = esc_attr($instance['title']);
 } else {
     $title = '';
  }
?>

<p>
<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Widget Title', 'wp_widget_plugin'); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" />
</p>


 <?php
}

// update widget
function update($new_instance, $old_instance) {
      $instance = $old_instance;
      // Fields
      $instance['title'] = strip_tags($new_instance['title']);
      $instance['text'] = strip_tags($new_instance['text']);
      $instance['textarea'] = strip_tags($new_instance['textarea']);
     return $instance;
}
// display widget
function widget($args, $instance) {
   extract( $args );
   // these are the widget options
   $title = apply_filters('widget_title', $instance['title']);
   $text = $instance['text'];
   $textarea = $instance['textarea'];
   echo $before_widget;
   // Display the widget
   echo '<div class="widget-text wp_widget_plugin_box">';

   // Check if title is set
   if ( $title ) {
      echo $before_title . $title . $after_title;
   }

//add functionality you want add here..
   echo '</div>';
   echo $after_widget;
}
}

// register widget
add_action('widgets_init', create_function('', 'return register_widget("wp_my_plugin");'));
?>

Wednesday, May 14, 2014

How to solve the permalinks issue of /index.php/%postname% but not with just %postname% in IIS?

When we deploy the wordpress in ISS servers or Amazon windows servers .htaccess won't work untill we install httpd.conf and enable the htaccess there. Because of this we will get the issue of url with index.php/%postname% .

To solve this issue go to web.config file in IIS add below code in between of <rewrite><.rewrite>.

<rules>
<rule name="WordPress Rule" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?page_id={R:0}" />
</rule>
</rules>




Tuesday, April 22, 2014

How to Solve White Screen Death problem in wordpress?

To solve the issue we need to first find out where is the problem. For this add the below code in wp-config.php file.

error_reporting(E_ALL);
ini_set('display_errors', 1);

By this you will easily find where is the code error and do the necessary changes and problem maximum get resolves.

How to solve Fatal error: Internal Zend error - Missing class information for in /server/mywebsite/wp-content/plugins/wp-super-cache/wp-cache-base.php on line 5 in wordpress?

To Solve this, just comment the below code in wp-cache-base.php file.

/*if (!class_exists('CacheMeta')) {
    class CacheMeta {
        var $dynamic = false;
        var $headers = array();
        var $uri = '';
        var $post = 0;
    }
}*/

Wednesday, April 2, 2014

How to solve 404 (Page Not Found) Error in wordpress when i moved the code to windows server?

To solve this, need to follow below steps.

1. Change the .htaccess file as per the code folder path..


# BEGIN WordPress
<IfModule mod_rewrite.so>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

2. If its not worked create a web.config file copy the below code and upload into root folder of the project.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
            <rule name="wordpress" patternSyntax="Wildcard">
                <match url="*"/>
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
                    </conditions>
                <action type="Rewrite" url="index.php"/>
            </rule></rules>
    </rewrite>
  </system.webServer>
</configuration>

Monday, February 3, 2014

how to solve AJAX HTTP error 200, when try to manage field display & Views?

This problem usually we face in 3 scenarios for drupal
1. when we update Jquery Update to new version. This scenario we can easily solve it by reverting back to old version.And be cautious, while doing any updates in drupal, try to do it in test environment later try in rela time.
2. When we try to fulfill our requirement by hard coding like adding .js files manually instead of using modules. To solve this, our first step is we need to find by which file adding we are getting this error.So try to remove each js file which you added manually and test at admin side still problem persists or not?(Don't forget to remove cache for each trial). Continue this until problem  solved.
3. Sometimes when we install some new modules also we face this problem, because sometimes the js files which are used in new module may be not adjusted to old module js files. So uninstall newly added module and check again.


Friday, January 24, 2014

how to solve blank pages or "white screen of death" (WSOD) in drupal?

This issue will come generally because of allocation of memory in mysql, to over come this just run the below query in mysql server.

mysql> SET max_allowed_packet = 1024 * 1024 * 512;
 
or
 
mysql> SET global max_allowed_packet=1024 * 1024 * 512;

Tuesday, October 15, 2013

How to solve Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone in Drupal 7?

This issue will come generally because of allocation of memory in mysql, to over come this just run the below query in mysql server.

mysql> SET max_allowed_packet = 1024 * 1024 * 512;
 
 or  
 
mysql> SET global max_allowed_packet=1024 * 1024 * 512; 

Wednesday, May 15, 2013

how to do form validation using php,json?

Download the below code....

https://docs.google.com/file/d/0B_lKxr7C6K3zRHBPWmhHVFUzT1E/edit?usp=sharing

or
<html>
<head>
<title>JQuery Form Validation</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.min.js"></script>
<script type="text/javascript">
 $(document).ready(function(){
  $("#form1").validate({
         debug: false,
   rules: {
    name: "required",
    dropdown: "required",
    email: {
     required: true,
     email: true
    }
   },
   messages: {
    name: "Please enter your good name.",
    email: "Please enter your valid email address.",
    dropdown: "Please select option from dropdown list.",
   },
   submitHandler: function(form) {
 
    $.post('nextstep.php', $("#form1").serialize(), function(data) {
     $('#result').html(data);
    });
   }
  });
 });
</script>
<style>
 label.error { width: 250px; display: inline; color: red;}
</style>
</head>
<body>
<form name="form1" id="form1" action="" method="POST">
    <label for="name" id="name_label">Name</label>
    <input type="text" name="name" id="name" size="30" value=""/>
 <br>
    <label for="email" id="email_label">Email</label>
    <input type="text" name="email" id="email" size="30" value=""/>
<br>
 Please Select the City:
<select name="dropdown" id="dropdown">
<option value="">None</option>
<option value="mumbai">Mumbai</option>
<option value="delhi">Delhi</option>
<option value="pune">Pune</option>
</select>
 <br>
 <input type="submit" name="submit" value="Submit">
</form>
<!-- We will output the results from process.php here -->
<div id="result"><div>
</body>
</html>

or
http://www.webreference.com/programming/javascript/jquery/form_validation/index.html

http://www.tutorialswitch.com/web-development/quick-and-simple-ajax-forms-with-json-responses/

Monday, April 1, 2013

How to solve 404 page not found error when SEO urls used or SEO url 404 error?

1. check in admin panel whether you are activated Use SEO URL's to Yes or not.

 Goto admin panel system->settings-> Server

Then check  Use SEO URL's to Yes.

Friday, March 8, 2013

How to Solve Notice: Undefined index: highlighted in include() in drupal 7?

To solve this error/notice need to follow below steps.

1. If you have created any block or region need to check the block/region name in .info file of the theme. For example i have created on block/region like..

Wednesday, March 6, 2013

how to add/create a new block in drupal?

To create a new block region just need to following things..
1. In .info file we need to add block name like..
     regions[sidebar_second] = Sidebar Second
2. Then goto template page and add the below code wherever you want add the block of region.
    <div id="right1" class="clearfix">
            <?php print render($page['sidebar_second']); ?>
     </div>
Note: need to give div id unique

Monday, February 25, 2013

how to change title in mail for wordpress website from wordpress to customized text?

Todo this just goto page..
/wp-includes/pluggable.php

Search $from_name = 'WordPress'; and  Replace Wordpress word with
$from_name = 'your own name';

Tuesday, February 5, 2013

How to display total blog posts in a static page?

To display total blog posts in a static page which are created by the developer, need to follow below steps..

1. Create a page with the name posts.php in theme folder which the site using.
2. Copy paste below code

<?php
/**
 * Template Name: Posts Page
 * Description: A Page Template that adds a sidebar to pages
 *
 * @package WordPress
 * @subpackage Twenty_Eleven

Thursday, January 31, 2013

How to Add CKEditor in Drupal

Following Steps need to follow.

First Download 3 file.

  1. Download CKEditor module(ex.ckeditor 7.x-1.2). To download click here.
  2. Download CKEditor Software(ex.CKEditor 3.6.6) .To download click here.
  3.  Download imce Software(ex.imce-7.x-1.4.tar.gz) .To download click here 
  4. Unzip all the zip files which are downloaded. After that copy the CKEditor software folder. 
  5. Inside the CKEDitor module folder there is folder name CKEditor, paste the software folder in that folder.
  6. Now copy the CKEditor module folder and IMCE folder into the drupal project folder in sites/all/module.

How to remove Read more and display Content on front page

Just goto Configuration -> Site Information there we will find an option like "Default front page". There you can give your node id of the page what you are created.


For Ex.


I have created page which i want to make as front page like "Wel Come". When we are created the page it will take a node id a default value like "5".


So we need to add this value in Default Front Page as "node/5"