Last year I published a PHP API Helper class for the ever-growing Debitoor accounting software. The API is a RESTful API meaning it responds to JSON and HTTPS requests.
As I have got to use this class in projects of mine, I have built upon this class adding improvements and a new Debitoor class that will process your requests for you returning a clean PHP array ready for you to use.
So what has changed?
You can find a list below of what I changed in this release and some newly added files.
- Improvements to the API Helper Class
- Added a new Debitoor Class to process requests and return a PHP array.
- Added a example.php file to show you how to use this class.
//Debitoor API Class // Code by Daniel Roizer - http://thatblogger.co // v2.0 define(req_code, "REQUEST_CODE"); define(clientID, "CLIENT_ID"); define(clientSecret, "SECRET_KEY"); define(token, "TOKEN_FROM_API"); define(apiURL, "https://app.debitoor.com/api/v1.0/"); require_once("debitoorapi.class.php"); require_once("debitoor.class.php"); $debitoor = new Debitoor(); // Get list of clients as an array() print_r($debitoor->GetCustomers()); // Get list of products as an array() print_r($debitoor->GetProducts()); // Add a client print_r($debitoor->AddClient($name, $address, $phone, $email, $homepage, $cinumber, $vatnumber, $countrycode));
If you use WordPress often or have a lot of plugins installed you may have come across a PHP memory limit error. This happens when WordPress doesn’t have enough memory to achieve what you are trying to do.
In version 2.5 the WordPress core team added a wp-config.php option WP_MEMORY_LIMIT which allows you to configure the maximum amount of memory that can be used by PHP.
Changing this option in the wp-config.php will only affect your WordPress site and not any other PHP sites.
The default memory allocated to WordPress is 40MB for normal WordPress installations and 64MB for multisite installs. The core will also take into account the php.ini file if there is one and if this number is greater than the default 40MB allocated by WordPress the higher number will then be used.
To change the WordPress memory limit you just add the following into the wp-config.php.
If this doesn’t change your allocated memory limit your hosts may not allow you change this setting, if this is the case you should contact your hosting company.
As you might have been ThatBlogger has been quite quiet recently. This is because since the start of the year I have been extremely busy working on new projects, a new business venture and general life events.
I recently took some time to redesign That Blogger to give it a fresh new look and to finally get round to blogging again!
The New Theme
Having spent some time looking around the net for a theme to fork, saving me time designing and building a new theme. I stumbled upon a theme I really liked. It was clean, simple and used Post Formats, something I had wanted to use for a while to give my posts a facelift. This theme was Sorbet by Automattic. I knew I would have to fork a theme and adapt the code to work the way I wanted and take out the code I didn’t need for That Blogger. However after forking the code I decided to work from the ground up and build a Sorbet based theme using the Bootstrap Framework. What you see now if my finished product.
Take a look at what the theme looks like if you downloaded it right from WordPress.org and you’ll see the difference.
What else has changed?
I have been through and fixed broken links in posts so you don’t need to worry about clicking a link and the website behind it has gone! The next thing to be removed is adverts, I decided to ditch all adverts, this was simply because I want the website to be as clean as it can be to really focus on the content.
I have also made some minor speed improvements in the new theme.
Let me know what you think about the new look in the comments below. I’d love to hear your thoughts.