Making theme set and available by setting theme related properties in controller Prior to cakephp 2.0 class UserController extends AppController { var $view = ‘Theme’; //tells controller to use “ThemeView” class instead of the default “View” class var $theme =…
Get post thumbnail out side of the Loop in wordpress
Just got a way to get the post thumbnail outside of the Loop which (the thumbnail) was entered through the Post Image > Set the URL for an image/icon for this post: field on Edit Post page. Here it is.…
Conditional skip for a field from model validation in a cakephp controller
In a controller, a table field could be skipped from model validations by editing the “validate” property of a model. For example, i have a “date” validation for “dob” (date of birth) field set in my “User” model.
A note on $form->dateTime(‘field_name’) generating offset warning in CakePHP
This is a note on $form->dateTime(‘field_name’) generating offset warning i.e. “Notice (8): Undefined offset: 1 [CORE/cake/libs/view/helpers/form.php, line 1836..“. If your “date” form field in a view is generating a similar warning you may need to look into the following scenario.
Finding files using ‘find’ command in Linux
Here’s a list of most useful linux “find files” commands i have summarized recently. Finding files with filename Find file by exact name $ find / -name ‘script.php’
How to debug a php application in production/live mode
How to debug a live website built in php? Here’s a basic, simple and custom method i usually use to debug live or production web applications (web sites). First of all i place the following lines of code in a…
Keyboard shortcuts to switch among split views in jEdit
Here’s the keyboard shortcuts to navigate or switch among split views or text areas or window panes (whatever you call it) in jEdit. Alt-Page Up Send keyboard focus to previous text area. Alt-Page Down Send keyboard focus to next text…
Fixing “empty characters with grayed background” in LibreOffice document content
I copied one of my email’s content into a LibreOffice document for saving as a .doc or .docx. While looking at the pasted content it was weird to have a lot of empty spaces(tabs, spaces and/or newline characters, whatever) with grayed background…
Changing application shortcuts and home screen applications in Nokia E5
To change the application shortcuts and home screen applications in Nokia E5 do the following: Go to Menu > Control Panel > Modes You will see the current mode selected (you may not want to change it) To change shortcuts…
Sum of values in input fields grouped by class attribute using jQeury
Here is the jQuery way to calculate the sum of all values stored in input fields grouped by class “.subtotal”. In this example the sum will be shown as an alert as soon as you leave a field after entering…