cURL is a command-line application for performing requests using a variety of protocols including HTTP. cURL is often used by developers to test Google Data services(cURL is interact with google services), as it supports the HTTP functionality required to interact with the APIs. how to set header Curl in php:-curl_setopt($ch,CURLOPT_HTTPHEADER,array(‘HeaderName: HeaderValue’)); code for post: <?php […]
During adding of any phonegap plugin sometime we get an error like this: [Error: Error fetching plugin: Error: git command line is not installed] To avoid this error you need a aproper set up of your phonegap development environment, that includes. 1- node.js installed 2- phonegap installed 3- Platform (Android) SDK installed optional in case […]
step 1 function register() { add_meta_box ( ‘meta_options_metabox’, ‘my meta Options’, ‘meta_metabox’, ‘post’, ‘normal’, ‘high’ ); } /* add_meta_box( “metabox id” , “metabox title” , “callback function of HTML for metabox” , “position of metabox” “part of page where edit screen section should be shown”,”priority”,”callback arguments” ) a) metabox id -> id can be anything,whatever […]
Step 1 Extend WP_widget class class MyNewWidget extends WP_Widget () /* WP_Widget class located in wp-includes/widgets.php */ Step 2 function MyNewWidget() { // Instantiate the parent object //parent::__construct( false, ‘My New Widget Title’ ); $widget_ops = array( ‘classname’ => ‘postsfromcat’, ‘description’ => ‘Allows you to display a list of thumbnail posts’); $control_ops = array( ‘width’ […]
In Windows 7/Vista In Windows Vista and 7, we’ll use the mklink command to create symbolic links. To use it, we have to open an administrator Command Prompt. Enter “command” in your start menu search, right-click on Command Prompt, and select “Run as administrator”. To create a symbolic link, we need to enter the following […]
In php: convert php array to json: $arr=array(‘name’=>’testre’,’obj’=>’json’ ); echo json_encode(array(‘result’=>’saved successfully’)); OUTPUT: ‘{“name”:”testre”,”obj”:”json”}’ NOW JQUERY : var obj = jQuery.parseJSON(‘{“name”:”testre”,”obj”:”json”}’); alert( obj.name );
WordPress is a widely used CMS because of its simplicity and easy to use admin dashboard. Follow the basic steps to install it on your local machine: – I am considering your lamp/wamp/xampp is already installed and running in your machine. – Download latest version of your wordpress from http://wordpress.org/download/ and unzip it into wamp/www/wordpress folder, you […]
We can make a custom search on CListView listing page with pagination. Following steps, we are making search on left side filters but cList view results will filter on this ajax search : 1 search form 2. js script function with update Clistview grid widget 3. controller action as per values and render view. 1 […]
Following Steps : Make sure your database table has a ‘sortOrder’ field. (Optional) Add the ‘sortOrder’ field to your Rules() function in your model Add the ‘actionSort()’ method to your controller to apply the sorting via ajax Add jQuery UI to your view that has the CGridView Setup the jQuery UI Code to work with […]
Follow following steps: 1. Open root/protected/views/layout/main.php 2. write <?php Yii::app()->clientScript->registerCoreScript(‘jquery’); ?> in head section. 3.Test with <script type=”text/javascript”> $(function(){ alert(“Jquery testing”)}); </script>