Monthly Archives: June 2014
PHP Smarty var_dump alternative and prestashop errors
PHP Smarty var_dump alternative and prestashop errors If you work on prestashop for example, and you want to make a debug for all or a certain variable from within a page you will have problems because you cannot use var_dump since Smarty is a templating language for PHP. Method 1
1 2 3 4 5 6 7 |
{php} $var = $this->get_template_vars('var'); var_dump($var); {/php} |
Method 2
1 |
{$var|@print_r} |
Method
How to change wordpress multisite URL
How to change WordPress Multisite URL I recently had a client that was trying to change WordPress Multisite URL to a new domain name, well for those that do not know already, WordPress usually hard code the URL inside the database, the table wp_options (wp_ being the table prefix of course). Right so why so
Disable jqueryui calendar days EXCEPT the mondays of every week
Disable jqueryui calendar days EXCEPT the mondays of every week Let’s say you want the user to be able to see all days from within the month, but to be able to select only the mondays of every week.
1 2 3 4 5 6 |
$("#datepicker").datepicker({ beforeShowDay: function (date) { var day = date.getDay(); return [(day == 1)]; } }); |
Here is a DEMO. You can disable all “Sundays” by switching from “day == 1”