Saturday, September 26, 2015

Remove Multisite Option from Wordpress

WordPress blog when you want to create multi language or multi site than it allow you option by some changes in coding. This functionality is useful when you want to set different post content for each website or many countries, languages then you must create multi website. Multi site also use when you want to create multi domain website.
To Enable multi site option or create a multi site in your current WordPress website than see details here.
Some times you does not need multi website option or back to same or original wordpress site from multi website than here simple and basic steps for remove multi website or network option in WordPress
  1. Open your wp-config file on WordPress root folder
  2. Find define('WP_ALLOW_MULTISITE',true); and replace to define('WP_ALLOW_MULTISITE',false);
  3. Remove below code from that file which is added during create multi site

    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/wordpress/';
    define( 'DOMAIN_CURRENT_SITE', 'localhost' ); //Server path
    define( 'PATH_CURRENT_SITE', '/wordpress/' ); //WordPress directory name
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );
  4. Delete current .htaccess file and recreate by default WordPress(Login to admin panel and change permalink than .htaccess auto generate if folder permission is 777)
  5. Now enter into phpMyAdmin for database access.
  6. Remove spam and deleted field from wp_users table (where 'wp_' is table prefix). Enter below sql query for that.

    ALTER TABLE `wp_users` DROP `spam`, DROP `deleted`;
  7.  Delete all tables which are related to second blog like `wp_2_commentmeta` where 2 is site id of second site which you can find in wp_site table
  8. Now delete all below tables for multi site
    • wp_blogs
    • wp_blog_versions
    • wp_registration_log
    • wp_signups
    • wp_site
    • wp_sitemeta
    For delete above tables use below sql query

    DROP TABLE `wp_blogs`, `wp_blog_versions`, `wp_registration_log`, `wp_signups`, `wp_site`, `wp_sitemeta`;
Run website and check admin panel multi site option was removed.

Top 10 Adult Bollywood Movies

From Bollywood all types of movies come out every year. in that adult movie is also one category of the Bollywood movie here list of top 10 Bollywood movies which is most famous because of adult scenes in the movie

1. MAYA MEMSAAB

Release Year : 1993
Director :  Ketan Mehta
Producer :  Ketan Mehta
Cast : Sharukh Khan, Deepa Sahi, Raj Babbar, Farooq Shaik,Paresh Rawal

2. AASTHA

Release Date: 28th January 1997
Director :  Basu Bhattacharya
Producer :  Basu Bhattacharya
Cast : Rekha, Om Puri, Dinesh Thakur, Navin Nischol, Daisy Irani

3. EK CHOTI SI LOVE STORY

Release Date: 6th September 2002
Director :  Shashilal K. Nair
Producer : Shashilal K. Nair
Cast : Manisha Koirala, Ranvir Shorey, Aditya Seal, Saroj Bhargava

4. MURDER

Release Date: 2nd April 2004
Director :  Anurag Basu
Producer :Anurag Basu
Cast :  Mallika Sherawat, Emraan Hashmi, Ashmit Patel

5. GIRLFRIEND

Release Date: 11th June 2004
Director :  Karan Razdan
Producer : Pammi Baweja
Cast : Amrita Arora, Ishaa Koppikar, Aashish Chaudhary, Sumeet Nijhawan

6. HATE STORY

Release Date: 20th April 2012
Director :  Vivek Agnihotra
Producer : Vikram Bhatt
Cast : Paoli Dam, Nikhil Dwivedi, Gulshan Devaiya


7. JISM 2

Release Date: 3rd August 2012
Director :  Pooja Bhatt
Producer : Pooja Bhatt
Cast : Sunny Leone, Randeep Hooda, Arunoday Singh


8. NASHA

 

Release Date: 26th July 2013
Director :  Amit Saxena
Producer : Aditya Bhatia
Cast : Poonam Pandey, Shivam Patil, Ranbir Chakma, Sheetal Singh



9. BA PASS

Release Date: 2nd August 2013
Director :  Ajay Bahl
Producer : Ajay Bahl
Cast : Shilpa Shukla, Dibyendu Bhattacharya, Rajesh Sharma

10. KAMASUTRA 3D

Release Date: 28th January 2014
Director :  Rupesh Paul
Producer : Rupesh Paul
Cast : Sherlyn Chopra, Tumul Balyan, Jaypal Khichar, Mohit Keswani

Saturday, August 8, 2015

Split PDF File Using Google Chrome

Now a days PDF is most useful and free available format which is most read in Adobe reader software.PDF file is use to read any document or information without any changes. There are many free books available in PDF format for download but main problem is when you download that than some extra advertize pages or publisher pages also available which is not useful to you or sometimes you need only one or two pages from book than it's hard to split that PDF file without software.
Here you can split PDF file using Google Chrome without using any extra software. Just simple steps follow as described below.
  1. First Download latest Chrome version if not installed in your system
  2. Now open any PDF file in Chrome by Right Click > Open with > Google Chrome (If not available Google Chrome option update latest version of chrome)
  3. You can read PDF file in chrome than click on Print from the menu or press Ctrl+P
  4. There is a print window display in chrome now click on change button in destination
  5. Now select Save as PDF option in local documents
  6. Here below display Page option as Pages.fills pages number range or single page (like 2-5 or 4).
  7. Now click on Save button for save that PDF file after saving popup confirm.

Sunday, July 26, 2015

Convert WordPress Menu to Bootstrap Navigation Menu

WordPress is using for blogging and simple information website, Now every website required responsive for comparable all devices (Mobile, Tablet, Desktop) for that every website, create as responsive site. From that Bootstrap is most known as HTML, CSS and JavaScript platform for developing responsive website. So there are many WordPress free and paid theme available based on bootstrap platform.
When you create your own theme in WordPress using Bootstrap platform that most conman problems is converting WordPress menu to Bootstrap navigation menu. Here display solution for converting WordPress menu to Bootstrap navigation menu without using any extra script or function. Convert WordPress menu to Bootstrap using jQuery.
For download and use Bootstrap see main website http://getbootstrap.com/
Integrate Bootstrap into WordPress website add below script and CSS in header.php file.

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

Here enter CSS and script path according to Bootstrap path in your theme.
Now create any WordPress menu from admin panel Appearance->Menu.Save that menu with menu name.Now display menu anywhere in website using `wp_nav_menu` function as below.

wp_nav_menu(array('menu'=>'Main menu','menu_class'=>'nav navbar-nav','container'=>''));

Now convert menu to Bootstrap using jQuery.for that add latest jQuery script if not use in theme as below.(In WordPress already define jQuery in `wp_head()` function)
Now add below script for menu.

<script>
jQuery(document).ready(function(){
    jQuery("#menu-header-menu li").each(function(){
     if(jQuery(this).children('ul').length)
  {
   jQuery(this).addClass('dropdown');
   jQuery(this).children('a').addClass('dropdown-toggle');
   jQuery(this).children('a').attr('data-toggle','dropdown');
   jQuery(this).children('ul').addClass('dropdown-menu');
  }
    });
    //This jQuery use for a link redirection in Bootstrap navigation.
    jQuery('ul.nav > li a').click(function(e){
 window.location = jQuery(this).attr("href");
    });
});
</script>
 
Now check website in browser WordPress menu convert into Bootstrap navigation menu.This script use only first level of WordPress menu not use for WordPress M=multi level menu.

Upload Website Logo from Admin in Magento

In default Magento when ever you want to change the website logo than must upload a logo into folder and assign that logo path in admin panel. So it's some complicated method for upload logo in Magento. Better is that you can directly upload a logo from Magento admin panel and also delete and change whatever you want only from admin panel.
For that you must change some core functionality.here below listed changes in files with location
For website logo change from admin in System -> Configuration -> General -> Design -> Header in Logo Image Source field which is text field defaul so you must change it to image upload field for upload image.that field declares in app\code\core\Mage\Page\etc\system.xml
Open that file and find below code

<logo_src translate="label">
    <label>Logo Image Src</label>
    <frontend_type>text</frontend_type>
    <sort_order>10</sort_order>
    <show_in_default>1</show_in_default>
    <show_in_website>1</show_in_website>
    <show_in_store>1</show_in_store>

which defines image, logo source and save logo path also now replace below code instead of this.

<logo_src translate="label comment">
    <label>Logo Image Source</label>
    <comment>Allowed file types: PNG, GIF, JPEG files</comment>
    <frontend_type>image</frontend_type>
    <backend_model>adminhtml/system_config_backend_image_logo</backend_model>
    <base_url type="media" scope_info="1">logo</base_url>
    <sort_order>10</sort_order>
    <show_in_default>1</show_in_default>
    <show_in_website>1</show_in_website>
    <show_in_store>1</show_in_store>
</logo_src>
Here we just add image incited of text and add a new model for handling upload image file. Here enter any message in `comments` and `base_url` declare save logo path in 'media' folder.

Now you must create a model for logo image for handling uploaded image file.For that see `app\code\core\Mage\Adminhtml\Model\System\Config\Backend\Image\` folder in that `Favicon.php` file already exits so just copy that file and rename to `Logo.php`


  • Change class name `Mage_Adminhtml_Model_System_Config_Backend_Image_Favicon` to `Mage_Adminhtml_Model_System_Config_Backend_Image_Logo`(Here file name and class name same as `backend_model` declare in system.xml file)
  • Change `const UPLOAD_DIR = 'favicon';` to `const UPLOAD_DIR = 'logo';` (Here directory name same as `base_url` declare in system.xml file)
  • In that file also can change `_getAllowedExtensions()` function's return array according to requirement.

Now clear all caches and check on backed website logo image directly upload from admin and also display logo there after upload.

Now for display logo in front-end you must change `getLogoSrc()` function which declare in header.html file for display logo.Open app\code\core\Mage\Page\Block\Html\Header.php file and file function code as below.

public function getLogoSrc()
{
 if (empty($this->_data['logo_src'])) {
     $this->_data['logo_src'] = Mage::getStoreConfig('design/header/logo_src');
    }
    return $this->getSkinUrl($this->_data['logo_src']);
}

Replace this function as below for just add `media` folder URL.

public function getLogoSrc()
{
 if (empty($this->_data['logo_src'])) {
     $this->_data['logo_src'] = Mage::getStoreConfig('design/header/logo_src');
    }
    return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'logo/'.$this->_data['logo_src'];
}

Now uploaded logo display in fronted.

Saturday, July 11, 2015

Top 10 Expensive Indian Movie


Yesterday,10th July release India's most expensive movie 'Bahubali - The Beginning'.There are 40 US million dollar used which is near to 250 crore Indian rupees engaged to build this movie. South Indian filmmaker SS Rajamouli with South Indian film star Rana Dggubti and Prabhas are in the main role in this movie.Film for power between the two brothers is based on the confrontation. It is now India's most expensive film.
There are many other movies are much expensive, but this movie breaks all records. Here list of top 10 expensive movie in the Indian movie list.

1.  Bahubali - The Beginning

Budget :-  ₹250.00 Crore
Release Date:- 10th July 2015
Language :- Telugu
Director :-  S.S.Rajamoulsd
Producer :-  Shobu Yarlagadda, Prasad Devineni
Cast :- Prabhas, Rana Daggubati, Anushka Shetty, Tamannaah

2.  Enthiran (Robot)

Budget :-  ₹132.00 Crore
Release Date:- 1st October 2010
Language :- Tamil
Director :-  S. Shankar
Producer :-  Kalanithi Maran
Cast :- Rajinikanth, Aishwarya Rai Bachchan, Danny Denzongpa, Santhanam

3.  Ra.One

Budget :-  ₹125.00 Crore
Release Date:- 26th October 2011
Language :- Hindi
Director :-  Anubhav Sinha
Producer :-  Gauri Khan
Cast :- Shahrukh Khan, Kareena Kapoor, Arjun Rampal

4.  Dhoom 3

Budget :-  ₹125.00 Crore
Release Date:- 20th December 2013
Language :- Hindi
Director :-  Vijay Krishna Acharya
Producer :-  Aditya Chopra
Cast :- Aamir Khan, Abhishek Bachchan, Katrina Kaif, Uday Chopra

5.  Kochadaiiyaan: The Legend

Budget :-  ₹125.00 Crore
Release Date:- 23rd May 2014
Language :- Tamil
Director :-  Soundarya R. Ashwin
Producer :-  Sunanda Murali Manohar, Sunil Lulla
Cast :- Rajinikanth, Deepika Padukone, R. Sarathkumar

6.  Puli

Budget :-  ₹120.00 Crore
Release Date:- 22nd June 2015
Language :- Tamil
Director :-  Chimbu Deven
Producer :-  Shibu Thameens, PT Selvakumar
Cast :- Vijay, Sridevi, Sudeep, Prabhu, Shruti Haasan, Hansika Motwani

7.  Krrish 3

Budget :-  ₹115.00 Crore
Release Date:- 1st November 2013
Language :- Hindi
Director :-  Rakesh Roshan
Producer :-  Rakesh Roshan
Cast :- Hrithik Roshan, Vivek Oberoi, Priyanka Chopra, Kangna Ranaut

8.  I

Budget :-  ₹100.00 Crore
Release Date:- 14th January 2015
Language :- Tamil
Director :-  Shankar
Producer :-  V. Ravichandran, D. Ramesh Babu
Cast :- Vikram, Amy Jackson, Suresh Gopi

9.  Vishwaroopam

Budget :-  ₹95.00 Crore
Release Date:- 25th January 2013
Language :- Tamil
Director :-  Kamal Haasan
Producer :-  S. Chandrahasan, Kamal Haasan, Prasad Vara Potluri
Cast :- Kamal Haasan, Rahul Bose, Pooja Kumar, Andrea Jeremiahi

10.  Kaththi

Budget :-  ₹90.00 Crore
Release Date:- 22nd October 2014
Language :- Tamil
Director :-  AR Murugadoss
Producer :-  Ayngaran International, Lyca Productions
Cast :- Vijay, Samantha Ruth Prabhu, Neil Nitin Mukesh

Sunday, July 5, 2015

Winners of 16th IIFA Awards 2015


Today IIFA award broadcast on television, which is hold on 7th June 2015 in Ritz Carlton Kuala Lumpur, Malaysia. IIFA award also known as international Indian film academy awards and also famous in Bollywood industry like as Filmfare. current year IIFA completing 16th year of awards so it`s 16th IIFA awards which awarded top Bollywood celebrities according to last year 2014th performance in the movie.
Here complete list of winners in IIFA award 2015.
Best Sound Recoding :- Eric Pillai(Galliyan – Ek Villain)
Best Action :- Parvez Shaikh & Andy Armstrong(Bang Bang)
Best Choreography :- Ahmed Khan(Kick)
Best Cinematography :- Binod Pradhan(2States)
Best Costume Design :- Dolly Ahluwalia(Haider)
Best Dialogs :- Abhijat Joshi & Rajkumar Hirani(PK)
Best Payback Singer (Male) :- Ankit Tiwari(Galliyan – Ek Villain)
Best Payback Singer (Female) :- Kanika Kapoor(Baby Doll – Ragini MMS 2)
Best Lyrics :- Manoj Muntashir(Galliyan - Ek Villain)
Best Music Directions :- Shankar-Ehsaan-Loy(2 States)
Best Performance in Negative Role :- Kay Kay Menon(Haider)
Best Performance in Comic Role :- Varun Dhawan(Main Tera Hero)
Best Debut (Male) :- Tiger Shroff(Heropanti)
Best Debut (Female) :- Kriti Sanon(Heropanti)
Best Actor in Supporting Role :- Riteish Deshmukh(Ek Villain)
Best Actress in Supporting Role :- Tabu(Haider)
Best Actor in Leading Role :- Shahid Kapoor(Haider)
Best Actor in Leading Role :- Kangana Ranaut(Queen)
Best Director :- Rajkumar Hirani(PK)
Best Movie :- Queen

Monday, June 29, 2015

Disable Update Notification in Wordpress Without Plugin


WordPress provide auto update functionality for update all sources and plugin with the latest updated from it's admin panel which is called `wp-admin`. After some specific time or event update function of Wordpress finds the latest version of exiting resources from the internet and also provide direct download and install to current resource functionality.
This is very nice functionality for use latest version and updated functions and supports of Wordpress. But Sometimes when you make some customize of Wordpress functionality by modification of files than when you upgrade than previous updated files removed and replace it to a new file and again make changes to new file according to theme or customization so that time must stop upgrade the latest version of Wordpress resource.
When an update available than in admin panel display notification for update version so you must remove that notification for stop update.
In Wordpress there are three types of  update.

1) Wordpress Core Update 

This update is for change Wordpress version to latest version and update all Wordpress core functionality and files which are in `wp-include` and `wp-admin` folder.Wordpress core update notification display at the header of the admin panel. so remove that notification by two ways.
  • Edit File
    For stop Wordpress core notification just set Wordpress version to latest version.Wordpress define it's version as global variable as `$wp_version` in wp-include/version.php file.So just change new version in that variable.For these changes must check Mysql and PHP version and comparability.
  • Modifying Core Functions
    Wordpress check latest version according to last checked time so changed that time to latest time.for that add below function in theme `function.php` file
    
    function remove_core_updates(){
     global $wp_version;
     return(object) array('last_checked'=> time(),'version_checked'=> $wp_version);
    }
    add_filter('pre_site_transient_update_core','remove_core_updates');
    

2) Wordpress Plugin Update

Wordpress plugin update notification display in `Update` and `Plugins` menu so remove that notification as below.
  • Edit File
    For stop Wordpress plugin update notification just change the version to latest version in the plugin main file where define plugin name and description.
  • Modifying Core Functions
    Add below function in theme `function.php` file or plugin file.
    
    function remove_plugin_updates(){
     global $wp_version;
     return(object) array('last_checked'=> time(),'version_checked'=> $wp_version);
    }
    add_filter('pre_site_transient_update_plugins','remove_plugin_updates');
    
    or use below code for any specify plugin
    
    function stop_plugin_updates( $value ) {
        unset( $value->response['akismet/akismet.php'] ); //Plugin file name
        return $value;
    }
    add_filter( 'site_transient_update_plugins', 'stop_plugin_updates' );
    

3) Wordpress Theme Update 

Wordpress theme update notification display in `Update` and `Appearance` menu so remove that notification as below.
  • Edit File
    For stop Wordpress them update notification just change the version to the latest version of theme `style.css` file where theme name and description define.
  • Modifying Core Functions
    Add below function in theme `function.php` file.
    
    function remove_plugin_updates(){
     global $wp_version;
     return(object) array('last_checked'=> time(),'version_checked'=> $wp_version);
    }
    add_filter('pre_site_transient_update_themes','remove_theme_updates');
    
Here when you changes in a file for remove update notification than every time you make changes in the file whenever a new update available. So it's better to add new functions for stop update notification. Here single function use for stop all Wordpress notifications as below.

function remove_all_updates(){
 global $wp_version;
 return(object) array('last_checked'=> time(),'version_checked'=> $wp_version);
}
add_filter('pre_site_transient_update_core','remove_all_updates'); // Core update
add_filter('pre_site_transient_update_plugins','remove_all_updates'); //Plugin update
add_filter('pre_site_transient_update_themes','remove_all_updates'); //Theme update

Saturday, June 27, 2015

Add or Remove Table Rows Using jQuery

When you create any dynamic HTML website than in website must save records. For that you use HTML tables for display records from database or from some array variable. Sometimes in table row data should be added dynamically by input text without no limit and not sure about how much row add or remove. That time you can use buttons to add and remove rows. For that see below code to add and remove table rows using jQuery.
For implement that code or integrate to any table first create HTML table with basic table tags.

<table cellpadding="1" id="tabledata" cellspacing="1" width="100%" border="1">
<thead>
<tr>
    <th>NO</th>
    <th>NAME</th>
    <th>EMAIL</th>
    <th>REMOVE</th>
</tr>
</thead>
<tbody>
<tr>
    <td align="center">1</td>
    <td align="center"><input type="text" /></td>
    <td align="center"><input type="email" /></td>
    <td align="center"><input type="button" class="removebutton" value="REMOVE" /></td>
</tr>
</tbody>
<tfoot>
<tr>
    <td colspan="4" align="right"><input type="button" class="addnewbutton" value="ADD NEW" /></td>
</tr>
</tfoot>
</table>
 
Now you want to set add and remove row data by click on `Add New` and `Remove` button, then use jQuery for that put live latest jQuery link from https://jquery.com/download on your page as below.

<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
 

Add new table row using jQuery

For an added new row with name and email id input text when click on add a new button on above table, then adds jQuery event as script on `Add New` button click. for that assign class `addnewbutton` for that button as above table and script as below.

<script>
$(document).on('click', '.addnewbutton', function (){ //Add new row below Add New button row
$(this).closest('tr').before('<tr>'+
    '<td align="center">1</td>'+
    '<td align="center"><input type="text" /></td>'+
    '<td align="center"><input type="email" /></td>'+
    '<td align="center"><input type="button" class="removebutton" value="REMOVE" /></td>'+
    '</tr>');
     return false;
 });
</script>

Add row with number

Here for adding new row you want to also add an auto increment number for count total records than using jQuery find total table rows and then add an extra row of that table according to the next increment number. For that add `tabledata`as table id as above table and script as below.

<script>
$(document).on('click', '.addnewbutton', function (){
var totaltr = ($("#tabledata").find('tr').length) - 2; //For calculation of data row after remove table head and footer
$(this).closest('tr').before('<tr>'+
    '<td align="center">'+(totaltr + 1)+'</td>'+ //Add next increment value for new row
    '<td align="center"><input type="text" /></td>'+
    '<td align="center"><input type="email" /></td>'+
    '<td align="center"><input type="button" class="removebutton" value="REMOVE" /></td>'+
    '</tr>');
     return false;
 });
</script>
 

Remove table row using jQuery

For removing any row and its data when click on remove button in a table than add jQuery remove function use. For that create new class `removebutton` for each new Remove button and remove table row script as below.

<script>
  $(document).on('click', '.removebutton', function (){
      $(this).closest('tr').remove();
 });
</script>

Wednesday, June 10, 2015

IOS 9 improve iPhone Battery Life with 'Low Power Mode'

Apple industry IOS 9 improve battery life as three hours extra with 'Low Power Mode' And Performance Tweaks on compatible devices.The company’s latest mobile operating system, apps and features have been optimized to reduce power consumption from Apple smartphones.
Apple giving a preview of iOS 9 for new iPhone, iPad and iPod touch software.In that new 'low power' mode makes iPhones last longer as focuses on speed, reliability and a smarter Siri with new update which was unveiled on Monday.Meanwhile, Google is making similar features like battery life and speed in the next version of its own operating system,called Android M.
Apple always make best features for new version of IOS which is use most reliable and high performance and user friendly for easily uses.for improve battery life When switched on Apple OS on smartphone or ipad, emails are only fetched manually, background app refreshes and downloads are disabled, motion effects and brightness are reduced, network speeds may be slowed and animated wallpapers are disabled so it's reduce power consumption and improve battery life more than normal.