I have a database table field defined as decimal(10,5). I want to use it for various purposes so I don’t want to change the datatype. In most of the forms however I want to keep this field showing none or very…
ACL: Checking Permissions in Views, Fixed
Following the post (http://goo.gl/PLeNJR) for ACL: Checking Permissions in Views like some others I faced a “undefined index User…” and some other PHP warnings when trying to implement this example. After doing some testing following the working code I came…
Create php array from select options
There are many ways to create a dropdown select options list from a given array in any programming language like PHP. Please check how to create a select list from a PHP array. However in this case I will make…
Remember Password, Git bash under Windows
Following an answer (http://goo.gl/EcqpTZ) here’s what I did to setup the Git Bash environment to log me in once when I start it up. This method worked for me to make “remember me” working or to save my password for…
Containable with mixed arguments, the CakePHP Beauty!
Here’s an example of CakePHP Containable behaviour. Although, it was not a very complex find call but the beauty of the containable is this that you can fetch records using “tricky ways” which normally may not be possible with straight…
How to uninstall a program from command line
My Windows 7 operating system asked me to update my skype installation. I did follow update instructions but the upgrade failed. It however was a usual message in which Skype installer had detected an old installation of Skype. Hence it…
WordPress uploads issue files with php in the name are blocked!
iThemes Security (formerly Better WP Security) has implemented some rules to prevent unwanted actions on your WordPress website. One of these Rules is to prevent php execution in side “uploads” folder. The line which is supposed to do it is…
How to paginate a different model with options in CakePHP
Assume you are on a LogsController which has Log as the default model and wanted to paginate another model LogColumn. Here’s How it goes:
How to get model name from controller in cakephp
Suppose we have $controller as an object for our controller class. We can do the following to get the model class: [code]$modelName = $controller->modelClass;[/code]
Gravity Forms PDF Extended Not Working?
Are you facing WordPress admin screens dying on white screens? Especially while using Gravity Forms PDF Extended plugin? It could be the main Gravity Forms “Entries” screen (ex. wp-admin/admin.php?page=gf_entries) and/or the single PDF generation or template page (ex. ?gf_pdf=1&fid=348&lid=2323&template=default-template.php