Posts

Showing posts from 2013

PHP extension development with Linux and Eclipse CDT. Developing basic extension with ext_skel

Image
Before you start you should setup your developing environment. How to setup it is explained in one of my previous posts - http://cmyker.blogspot.com/2011/11/php-extension-development-with-linux.html My platform is Opensuse 12.2, PHP 5.3.22, Eclipse CDT 8.0.2. If you are experienced in other Linux environments you're welcome to add HOWTOs to the comments. To make extension development process easier to start PHP source code distribution has a nice ext_skel shell script. This script will build your extension skeleton, actually fully functional extension. It is located in /usr/src/packages/BUILD/php-5.X.X/ext directory. To build your new "helloworld" extension skeleton run: # cd /usr/src/packages/BUILD/php-5.3.22 #  ./ext_skel --extname=helloworld Creating directory helloworld Creating basic files: config.m4 config.w32 .svnignore helloworld.c php_helloworld.h CREDITS EXPERIMENTAL tests/001.phpt helloworld.php [done]. To use your new extension, you will have to exe...

Jqgrid show totals in the footer plugin

This plug-in automatically calculates sum of the all numeric rows in your grid and displays it in the new "Totals" row at the bottom of the grid. jqgrid 4.3.2+ is required. (function($) { $.jgrid.extend({ showTotals: function(options) { var o = $.extend({ total: "Totals", totalRow: undefined, includeRows: [] }, options || {}) return this.each(function() { if (!this.grid) { return; } var self = this; var showTotals = function() { var totals = {}; $.each(self.p.colModel, function(index, data) { if (o.totalRow && o.totalRow == data.index) { totals[data.index] = o.total; } else { var sum = NaN; if (...