Pages

Saturday, 8 February 2014

A PHP script to aid migration and other aspects of a Wordpress install.

Wordpress has without doubt made a huge mark on the world of blogging and content management in general, and although its framework coding concepts are really quite outdated (which could well take up the content of another blog article entirely), it doesn't show many signs of disappearing anytime soon.

One of the issues that always causes me headaches though, is the problem that crops up from migration from development to production. Wordpress doesn't seem to have a grasp of how to handle this, and the result is database tables that are riddled with wrong domain or path information. Some of this wrong data is also often embedded inside serialized arrays or objects which again, compounds any simple 'find and change' technique.

There are a few scripts out by developers (which I am pleased to see) that try to bridge this issue and allow for deep searching and replacing. To me though, these scripts seemed a little complicated, and I wanted something that, for example, already knew database details because it could leverage them directly from Wordpress itself.

So, I wrote this. Its a simple single page script with a little security that can be uploaded to a host and gives an authenticated user the ability to do a simple find and replace irrespective of database field data format. It uses the Wordpress database configuration as well as CSS styles to allow for a clearer user interface.

It can be downloaded from GitHub here.
https://github.com/SandboxTechnologies/WPSiteToolkit

Tuesday, 5 November 2013

A solution to dependency injection into multiple nested ZF2 fieldset classes

After a couple of days spent trying to get the ZF2 Element Manager to let me inject services into my nested fieldsets, I found a solution which seems to work with minimal changes to the Element Manager example or fieldset classes.

Note: My project was slightly different, but, I'll describe my solution in the context of ZF2's own Form Collections documentation. I have also posted this solution in the comments of the ZF website.

Thursday, 1 August 2013

Bootstrap 3 released

If you are a web developer or a frequent web user, you may have heard of Twitter Bootstrap, a style and layout framework created by Mark Otto and Jacob Thornton at Twitter. Since its release, its been used on a huge amount of projects including many blog templates leading to a much more streamlined and consistent web experience for web users.

Well, on July the 27th, the version 3 release candidate was made available to the masses at http://getbootstrap.com
After a few teething issues with bad links and such, the new documentation seems to be working nicely. The framework is drastically different to version 2 to the extent that the developers have decided to prioritise mobile platforms before desktop, but there are still familiar styles and approaches that maintain that Bootstrap feel.

I look forward to seeing how version 3 progresses and seeing how template developers integrate the new framework into their projects.

Thursday, 9 May 2013

Adobe kills Fireworks. Where do we go from here?

Its been a few days now since Adobe announced that they were stopping the Creative Suite and moving 100% to the Creative Cloud (essentially the Master Collection tied heavily to online components). While there are numerous views around the web on the benefits and drawbacks of this decision, one thing that is going to cause a larger gasp from the Adobe user base is the killing off of Fireworks.

Fireworks is the go-to application for quick and easy web graphics, and without it, users will find themselves with some significant hurdles ahead of themselves. Yes, there are some alternatives out there, but there will definitely be a steep learning curve now for the majority of Fireworks users irrespective of which path they now decide to take.

Adobe has justified this decision by claiming that numerous other applications from the Creative Suite (or Creative Cloud) already provide the same functionality that Fireworks does, and so it makes sense to move to those. While that might be true, what they don't say is that you will be required to potentially learn about 3+ additional applications, and that those applications will be chock full of functions that have nothing to do with the kind of simple web work that you will used to do.

I can't see Adobe reversing this decision, but both they and Adobe users should be aware of the implications. After all, we're still having to deal with the bad decisions Adobe have made on the other applications they aquired when they purchased Macromedia.

Thursday, 4 April 2013

Passwords and security

Password security has never been more of an important issue than it is today, and no doubt it will continue to be a very relevant topic for some time to come.

Generally, people who want to know how to tackle this will Google advice on the internet which can be quite helpful, but other advice not so much. It can often leave users frustrated about how to create a password and in quite a few cases they forget their password completely.

Below I provide what I'd term as reasonable practices for the average user.

Thursday, 14 March 2013

Google dropping the RSS ball?

Last Thursday I awoke to the news that Google had decided to retire its Google Reader service. News I was particularly surprised at.

Google have always struck me as a company that stood out from the rest, much the same as Apple have (or had depending on your point of view or OS allegiance). I've watched interviews with its founders, used their services for many years and have been very happy with what I would describe as a reasonably best case example of an integrated online toolbox that caters to the vast majority of daily user requirements.

They have undeniably, one of the best and most well respected search engines on the entire planet. They've also provide an extremely flexible and dependable email service with Gmail. Over recent years, they've also ventured into the social networking scene with Google+ which is a great example, in my humble opinion, of how to do social networking the right way.

Lets look at that last service a little more.

Wednesday, 13 March 2013

Custom jQuery events

I'd been working on some javascript elements recently when I realised I needed to create an interaction or call between two different scripts. These areas would potentially be absent and if present would need data pushed. After discounting some global variable registration ideas, I found that custom jQuery events would fit the bill perfectly.

The following is code for both the event declaration and the triggers.
// do this when triggered
$.bind('onMySelect', function(event, argData){
 console.log(argData);
});

// the trigger
$.event.trigger('onMySelect', 'my test data');
One additional thing seems to be that, if the event declaration isn't present then it silently fails without errors (at least in Firefox my primary development browser of choice).