I required to clear all cache including views and database routes context after i called an existing recurring profile action. Placing the following command near the end of the action/function helped me. [text]cache_remove_by_pattern(‘recurring_profile*’);[/text]
Redirecting users to same pages while migrating to new domain
While migrating my previous domain name to current one i had to gather some domain redirection tools in order to help myself to redirect my old domain pages and posts to current one. Fortunately i did not change the site…
Useful url rewriting examples using .htaccess
1)Rewriting product.php?id=12 to product-12.html It is a simple redirection in which .php extension is hidden from the browser’s address bar and dynamic url (containing “?” character) is converted into a static URL.
Creating a new page in ActiveCollab 3
Just created a new page in ActiveCollab 3. I wanted a new ipn (Instant Payment Notifications) handler page for paypal recurring payments. The name of my new module is PaypalRecurring.
Customizing PHPBB3’s template files or styles
PHPBB is one of the most popular forums scripts available in php scripting language. Although the default phpBB template is nice and clean, you can choose to customize it to match the look and feel of your website. This allows…
Covert PHP config size values to bytes
Convert PHP config value (2M, 8M, 200K…) to bytes. Use full when converting values received, for an example, through ini_get(‘memory_limit’).
Ideal way to define directory separator in PHP
Ideal way to define directory separator in PHP // Directory separator if(!defined(‘DIRECTORY_SEPARATOR’)) { define(‘DIRECTORY_SEPARATOR’, strtoupper(substr(PHP_OS, 0, 3) == ‘WIN’) ? ‘\\’ : ‘/’); } // if
Creating a module in ActiveCollab3
One page guide on creating a new modules to create home screen widget in ActiveCollab3 application. First we need to create a directory for our module. We are going to create it under a /path/to/activecollab/custom/modules directory (where /path/to/activecollab is full…
Creating and Parsing JSON data with PHP
What is JSON? JSON is ultra-weight data interchange data format used over the internet for transferring the data. While XML is a dominant data interchange format over the internet but JSON is less complex and light-weight data.
Caching large menus or header/footer links in WordPress
Even if you are not using some robust caching plugin or tool in wordpress you can cache small chunks of data using basic caching techniques of PHP. In my example i had been creating a few dozens of links in…