Sunday, 15 December 2013

Steps to upload your Site into the web Server (C-Panel)

Step 1: Login to C-Panel -- (A website is hosted in.)

Step 2: Go to the "File Manager" you find this on your C-Panel Dashboard
file_manager_icon

Step 3: Now you seen the Web Root directory
public_html/www

Step 4: Go to your local Directory where the website is located Ex. xampp/htdocs/mywebsite

Step 5: Copy the folder "mywebsite" into the "webroot/public_html/www/" directory

Step 6: Go to your localhost mySqlAdmin --> get Backup the Data Base from is
Ex. mywebsite_db.sql

Step 7: Go to the MySqlAdmin in your C-Panel and Restore the "mywebsite_db.sql" into the server

Step 8: Go to the Website URL from your Browser.
            Ex. http://www.mywebsite.in
If web root having TWO folder then you can get that like.
     Let Call another folder name "myanotherwebsite"
      Ex. http://www.mywebsite.in/myanotherwebsite/

Thank you
Ravi



Wednesday, 11 December 2013

Procedure To Increase File Upload SIZE in CAKEPHP
STEP 1 : Goto .htaccess your root folder ( projectname/.htaccess )
STEP 2 : Paste Following code in .htaccess file
                   <code>
                   <IfModule mod_rewrite.c>
                         RewriteEngine on
                          RewriteRule    ^$ app/webroot/    [L]
                          RewriteRule    (.*) app/webroot/$1 [L]
                          php_value upload_max_filesize 100M
                         php_value post_max_size 100M
                  </IfModule>
</code>
STEP 3 : The Above code have two php lines that is
                 php_value upload_max_filesize 100M  //This line helps to increase file size to
                 //upload into SERVER up to 100 MB
                 php_value post_max_size 100M //This line helps to send data to server up to 100 MB
STEP 4 : Thank you
                  by Ravi Arsid
Creating Wordpress Plugin
Step 1 : \wp-content\plugins
Step 2 : create a folder "myplugin"
Step 3 : create a php file "my_plugin.php"
Step 4 : add following code into the file
<code>

<?php
/*
Plugin Name: Hi Plugin
Plugin URI: http://www.example.com
Description: This test Plugin Created by me.
Author: RK
Version: 1.0
Author URI: http://www.example2.com
*/

//add_action('admin_notices','hello_world'); // display notice bar on the admin panel
header('content-type: text/plain'); 
//add_filter('admin_head','hello_world');
add_filter('the_content','hello_world');
add_action('init','hello_add_js_to_doc_head'); // function initialize the javaScript.
//add_action('get_header','hello_world');
//add_action('admin_footer','hello_world'); // display content on footer

// function to include external js file
function hello_add_js_to_doc_head(){
$src=plugins_url('hello.js',__FILE__); // locate the file path
wp_register_script('hello',$src); // include the file
wp_enqueue_script('hello'); // execute the js file for onload initialization.
}
// function display content and a twitter link -- $input means actual posted content
function hello_world($input){
$chos = hello_get_me();
return $input."<p id='me'> $chos</p>";
}
// function to display a label on the content as Follow me on Twitter.
function hello_get_me(){
?>
<a href="http://www.example.com" target="_blank" onclick="myalertbx()">Follow Me Twitter</a>
<?php
}
?>

</code>
Step 5 : create an another file "hello.js"
Step 6 : add following code into the file
<code>

(function() {
var s = document.createElement('SCRIPT'), s1 = document.
getElementsByTagName('SCRIPT')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://widgets.digg.com/buttons.js';
s1.parentNode.insertBefore(s, s1);
//alert("hi there");
})();

function myalertbx(){
alert("Hello you Clickme : Go to my Twitter Page");
}

</code>

Step 7 : Execute in wordpress plugin menu
Step 8 : Active the plugin
Step 9 : Enjoy 
by Ravi Arsid.