Create Wordpress User in phpMyadmin SQL
This simple sql script will create a Wordpress user.
You'll need access to the database via phpMyadmin or another means..
INSERT INTO wp_users (user_login, user_pass, user_nicename, user_email, user_status)
VALUES ('username', MD5('password'), 'Firstname Lastname', 'email address', '0');
INSERT INTO wp_usermeta (umeta_id, user_id, meta_key, meta_value)
VALUES (NULL, (Select max(id) FROM wp_users), 'wp_capabilities',
Magento 1 Rest Api Multiple SKU Query
It took me a long time to track down this solution to get multiple products by SKU out of the Magento Rest API... But here's the solution I've found:
Find Magento Layout Handle for Current Controller/Action
I is still getting the hang of the whole Magento layout functionality but have just found a couple of tips that have helped me greatly.
As I understand it the layout handle of and xml file is the node that is called when a particular…
Magento block caching
If you set it to false, Zend cache will get default value of 7200 seconds!! If you want infinite never expired cache set it to 9999999999, which is Zend_Cache maximum value, or something else big enough.
Magento block caching • Inchoo
Load A Joomla! Template File From A Separate View
I am working hard to improve the quality of my php code and one of significant technique is to use the DRY principle.
However this can become a little harder to stick to when using a framework / CMS. I mostly work with…
Search a Multi-Dimensional PHP Array with Standard PHP Library Recursive Iterator
(That's definitely the best blog post title I've ever come up with...)
Messing with php arrays often messes with my head...
So I needed to search a multi-dimensional array and return the results in an easily accessible format.
A bit of research uncovered…
PHP DateTime Class - Or why it pays to read the documentation (sometimes!)
I've always struggled with dates in PHP, more specifically writing dates submitted by a PHP form to a database correctly formatted.
I've done a few weird and wacky things to get the dates into the database as proper datetime…
Joomla! Styleguide Component
Website Styleguides are very 'de rigueur' at the moment. I work with Joomla! a lot and felt that a Styleguide component could be useful.
These website styleguides are often also called Pattern Libraries.
I think they can be very useful!
My component is currently available on Github
A Couple of Tips for Using PHP at the Command Line
On vary rare occasion I find it useful to run php in the command line.
There are a couple of easy ways to do this, but the first thing you might want to do is check your php version.
This is easily…
500 - PHP regular expression limit reached
Starting getting this error message on a Joomla site I'm working on:
500 - PHP regular expression limit reached (pcre.backtrack_limit)
I'm building my own component for the site.
The weird thing was the error message went away when I echoed out the MySQL query...
But as soon as…