I am a web & mobile app developer based in Lahore. I have been developing creative, interactive, usable & successful web apps, web portals, php and Flash action scripting, REST apis, WordPress plugins & themes. In recent years, I have worked on Ionic, Angular and TypeScript for hybrid mobile apps, Flutter & Dart, React & React Native, and Swift native iOS mobile app development.

Fix W3 Total Cache WordPress Plugin Error ‘Warning: Cannot modify header information – headers already sent’

Using W3 Total Cache , If you get following error: Warning: Cannot modify header information – headers already sent by (output started at /home/account/public_html/wp-content/plugins/w3-total-cache/lib/W3/Referrer.php on line 64 Resolve W3 Total Cache Error You can resolve this by going to the following file in your WordPress blog installation directory: Open wp-config.php Find this ini_set(‘display_errors’, ‘1’); And…

Multiple External SWF Slideshow – Loading & Playing Multiple External SWFs in AS3 Flash Movie

I have previously posted several blog posts for loading external swf file and controlling its timeline by adding play/pause/forward/rewind player buttons. Some days back, I got a related and interesting question which involved loading and playing multiple external swf files one after another. It’s a very common scenario and I decided to give it a…

Resolve Facebook “App temporarily unavailable Runtime errors” & FBJS Errors

If you are getting “App temporarily unavailable” FBJS errors like following on your Facebook apps pages: App temporarily unavailable Runtime errors: URLExceptionInvalid scheme for url (javascript:) URLExceptionInvalid scheme for url (javascript:void(null)) Solution Search in your html code any reference to javascript in a href=”javascript:” tags. Just remove them and use onClick event instead. Hope that…

Displaying Global Configuration Settings Values in Joomla Website

To get and display the configurations settings values in any Joomla website, Joomla’s JFactory object is used. Using JFactory, we can load configurations values and use them anywhere in our Joomla templates like this: $config =&JFactory::getConfig(); $website_name = $config->getValue(‘config.sitename’); $MetaDesc = $config->getValue(‘config.MetaDesc’); $MetaKeys = $config->getValue(‘config.MetaKeys’); Hope that helps. Cheers.

PHP Function to Clean Data before using in JavaScript or FBJS

Single quotes, double quotes, slashes and all kinds of other junk data will break your application code, especially the js and FBJS dialog boxes for sharing and components if the data is not cleaned properly. Following PHP function will clean your data for such garbage. function cleanData($data) { $cleaned = preg_replace(“/[^A-Za-z0-9\s\.\-\/+\!;\n\t\r]/”,””, $data); $cleaned = preg_replace(“/\s+/”,”…