Use core table in custom plugin

Use core table in custom plugin
Many times when we develop custom plugin we need a listing table for records.  Wordpress has inbuilt  table template class for listing and it can be inherit in our plugin to use core style of table and pagination. Wordpress use class WP_List_Table to display data of posts, comments etc and this class have all important methods ...

Refresh Oauth token for google APIs

OAuth 2.0 is the next evolution of the OAuth protocol and it provide specific authorization flows for web applications, desktop applications, mobile phones, and living room devices. Google use OAuth2.0 for authentication while accessing the Google APIs. We need access token from the Google Authorization Server to access data from google. Here are basic steps and ...

Flow diagram by SVG in PHP

Flow diagram is a diagram which define process cycle. SVG can be use to display diagram. SVG is Scalable Vector Graphics and it defines graphics in XML format. Here is class to get all co-ordinate points. class svgGen { var $radius = 200; var $cx = 270; var $cy = 220; var $svgwidth = 600; ...

useful sql function

SQL stands for Structured Query Language and it allows to access and manipulate databases. SQL has many built-in functions which process on string or numeric data of database table. We can define built-in functions in two categories SQL Aggregate Functions These functions return a single value after calculation from column. These functions are COUNT(), AVG(), ...

safe upgrade approach in sugarcrm

Upgrade safe approach is best development practice not only sugarCRM but all type of coding specially in open source projects. In sugarCRM upgrade safe approch means upgrade code without loss of modification/customization, If our modules/plugins or other customization are upgrade safe then we will no loss data/customization in future when upgrade the sugar version or upgrade ...

zen cart shipping module for latest change of USPS

USPS has recently changed their rates effectively from 7 september 2014 and included some welcome postage savings when you ship packages. Now a days most of the zen cart stores are not working properly with USPS, and in shipping details USPS rates are not appearing. This issue is occurring on all the websites which are ...

Add javascript in sugarcrm view

Many time developers need to add custom Javascript to a SugarCRM View. The important thing should keep in mind is that code would be upgrade safe so that any future enhancement in core files should not affect your modification. Here we are going to implement custom javascript in view for all edition of sugarcrm and ...

DDL (Data Definition Language) in mysql

Data Definition Language normally known as DDL are the mysql statements or query which are used to define and modify the structure of database schema or tables. DDL have these commands: CREATE, ALTER, TRUNCATE, DROP, COMMENT, RENAME. CREATE query is to create a new table in database. Syntax of create statement is given below. CREATE ...

Common mistakes in PHP development

No doubt now a days PHP is most popular open source scripting language. PHP can run on various plateform lke Windows, Linux, Unix, Mac OS X, etc and it is compatible to all servers Apache, IIS, etc. Biggest blogging system WORDPRESS is in PHP, largest social network FACEBOOK is in PHP and it is easy ...

Canonical url

Canonical url
In content management application or online shopping systems, the most common thing is the same content to be accessed through multiple URLs. It can be some kind of duplicate content issues. For example www.mysite.com/search.html would be considered by search engines to be an entirely different page from www.mysite.com/search.html?country=us. It is possible that both URLs will ...