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