So with the release of AWS SDK Version 2, I’ve been inspired a little to write better PHP Code, at least in stuff I have on my GitHub. The new SDK is written to match the PHP Framework Interop Group PSR-0, PSR-1 and PSR-2, as well as Composer/Packagist Support.
I been working a on project to make starting a new project easier, (create a repo, setup the deployments, Apache VHost etc). Primarily working off of the ATech Media Suite of products.
Starting from a base of peterjaap’s Codebase PHP Wrapper, where I was just adding missing API endpoints to the class, at which point the new AWS SDK was released and inspiration of a sort struck.
I started a new project from scratch, to implement all the API’s that Atech runs, it’s very much in progress, I’ve currently got full support for DeployHQ and PointHQ end points, (as well as having gotten a few obvious missing end points added to the API).
I’m clunking my way thru the CodeBase API, it’s taking some time as its got a truck load more end points, that DeployHQ and PointHQ put together. It has Projects, which have repos, which have tickets, just to scratch the surface.
At the moment it’s largely functional, it’s just missing some extras, the Time Tracking, File Uploads, and so on.
It’s very much a learning experience in an attempt to follow the coding standards as well as laying the code out properly.
At the moment the CodeBase class itself is pretty large, and I’m pondering about splitting it out to sub classes. Classes to represent Projects and Repos and Tickets and so on, but its the first thing I’ve tried to build in such a way, so much consideration is needed, to hopefully get it right. I keep looking at other Project like the AWS SDK and GoCardless’ PHP Class.
The only thing thats really missing, is Unit Testing, which I still need to sit down and learn properly, but I’m still trying to find a suitable entry point to teach myself, and of late been expanding my knowledge using Code Academy, more on that in another post!
So thats a short update on PHP Development in general, you can checkout the ATech API Class so far on GitHub. Feedback always welcome!
(I’m trying to write more on my blog, as well as more PHP in general, hence a in progress post instead of a “It’s completely finished give it a whirl” post)
￼Building on my work at Your Members, specifically the Adult Payment Gateway Zombaio, I’ve finally gotten around to building a better “recommended WordPress Plugin”.
As the one on Zombaio’s site is little more than a nasty hack sitting in front of WordPress without using any WordPress functions or its Database Abstraction Layer, (it’s using Raw Database functions and is not very WordPress’y at all).
Essentially the plugin listens for ping backs for the Payment Gateway and responds accordingly, creating or deleting the user, using the details passed back from Zombaio, and logging the full result for later reference.
Installing the plugin first guides you thru a easy to use install procedure, meaning no fiddly file editing, or trying to setup and understand ZScript.
Just download, unzip, upload and activate.
Nip thru the (optional) four step quick start wizard and away, you, go!
In addition to the quick setup and user create/delete, the plugin provides a few short codes and widgets, to direct the user from your site off to the Zombaio Join Form and back again.
Included in the plugin is a guide, which describes how to setup and use all the features as well as general information about running a Membership Site and getting the most out of the plugin. Especially the Zombaio Seal, which can be a little fiddly to get the code for.
Security and Access Control
On top of the basic functionality, is included a method to block non members from accessing the site and providing a Splash Page/adult content warning page, meaning no need for additional plugins required to do this, saving you overhead. All guests are redirected to this page, so content is protected!
As well as this, included in the plugin is the ability to create a menu to show to logged out users that is different to logged in users, in case your theme doesn’t provide this.
To top it all, the plugin is designed to run your WordPress site with “Anyone can Register” disabled, meaning the only way users can join is via the Zombaio Payment Form, and this means users/members have paid for access.
What is Coming Next?
I’m currently working on a update, which includes credit purchase, and the spending of credits on access to posts/pages, (this can be configured to be timed access, for Live Broadcasts/Webcam Events, or permanent access, like a image gallery), again helpful instructions and information is included in the guide on how to setup and use these features.
(The update is currently in beta testing to a couple of users who have contacted me about the plugin, but you can always grab the SVN trunk/current build and give the current credits implementation a go! You can grab this from Extend, no guarantee that it is stable or safe to use in production/live, you can get it from the WP Zombaio Developers Tab)
In addition I’m adding graphs and reporting data, to supplement the Zombaio Graphs and reporting to help Admins set how their site is doing. And showing what users are spending their credits on, and how many unspent credits are in the user kitty!
During the development of the next version, to fully support credit purchase in a admin easy to setup and use method, further development time is needed to create a little form builder, as there are several options, which can be difficult to easily describe using just WordPress short code Arguments, hence this blog post is talking about the current release and not about the next release including credits!).
So I shall finish this blog post off quickly and get back to finishing off the next version!
Like the old BBC Celebdaq, its a “Stock” Trading Game, but instead of trading stocks and shares, you are trading links.
In this case the Cost to invest in a link is linked to the number of other sites that link to that site.
So a site such as Facebook.com and Twitter.com, which are linked to from lots of other sites, rank highly and cost more, in comparison to other sites, such as my own.
It’s using data provided by Majestic SEO. To quote the site:
We use the top 50,000 websites from the MajesticSEO Million dataset, this lists the top sites as ordered by links from unique i.p. addresses, we take this information and use a simple formula to give each domain a daily price.
Going to play it for a couple of days to see where it goes, and how things pan out, come and join me if you fancy it! So far I’m down about $600 on my initial investments, but we shall see what happens tomorrow!
For something built in a mere 24 hours its rather good, and it uses Twitter Bootstrap for it’s Framework, and it has a legitimate use of the good old HTML Marquee tag! And Dom should be pushing out updates and things to the site, and tweaking the algorithm.
You can also follow the developments on Twitter @linkDAQ and @TheHodge
There is also a TimeLapse video of the code being written:
I’ve updated my CV and tidied it up a little.
So any feedback on it would be useful! (Drop Me a Line rather than a Comment please)
Link in the SideBar on the right!
I should really write on my blog some more, but not a lot to write about of late.
JetPack Extras is doing OK, but JetPack core decided to implement the main feature I added, that being Pinterest but, Extras has evolved, it still of course has the ability to control button placement and has the extra Twitter Via/Related options, and the ability to share the WP.me shortened URL, makes a nice Twitter Card, embedding a short Preview of the Post with the Tweet, (check this Meta Tweet for an example) works with any wp.me url you share on Twitter by the way!
Most useful, mainly updated to keep up with JetPack core and use the new shiny hooks they have.
You can check it out on extend. Feedback/request are always Welcome!
Made a couple of tweaks and updates to the Blog in the background, added a better 404 page and updated the .htaccess rules, I have all subdomains pointing to the here, (unless their is a separate to show), so its a good idea to redirect non sites to here, rather than duplicating the content.
Also tweaked the Root .htaccess to have a Error Document (404) since it was just standard Apache Error, bit nasty, but now better, LOLCATS TO THE RESCUE! 😀
Heres a extract of the rules, if you find it useful/handy:
Next thing to do, is probably update and replace the MineCraft Server Site probably using Twitter Bootstrap as a new basis. It’s now a whitelisted server for Armchair Heroes or on Facebook, but of late I’ve been getting my MineCraft fix playing over at PhantomCraft, like a lot of open Servers I tend to get robbed/cleaned out and griefed a lot, but then again I am a little close to spawn. It’s a fun server to play on and the regulars are quite nice.
Hopefully moving further away when I get a chance to play some more, thinks are pretty busy at the moment between Magento fun at Day Job and Freshers Fun at the Union.
Then I really should get the Portfolio page on the Blog fixed up to showcase what I’ve done before, since I am a Freelance Web Developer (you got any work going or want a quote for? (Drop me a line)
So a couple more weeks and we’ll be back to the usual grind.
Hopefully I will have more to write about soon!