software

The days nemesis has been vanquished!

This might seem a bit lame to those who actually know what they’re doing, but I have been bashing my head against the wall trying to figure out how to grab and display more than one post in a category using the archive.php file.

I’m using the archive.php file instead of creating a specific category file because I want to keep the layout the same with the least amount of editing whenever I do need to make a change. Copy pasta maybe easy, but it soon gets tiresome and is needless extra hassle.

After some frantic “help!” posts on twitter (thank you @wpbeginner for responding!) and friendfeed plus a little searching of my own, all roads seemed to lead to this page in the wordpress codex.

Specifically, this solution:

<?php

$categoryvariable=$cat; // assign the variable as current category

$query= ‘cat=’ . $categoryvariable. ‘&orderby=date&order=ASC’; //concatenate the query

query_posts($query); //run the query

?>

Now, dumping this just before the while (have_posts()) : the_post(); line, ensuring you swap out ($query) with (’showposts=10&cat=’.$cat) will give you what you want - upto 10 posts of the category selected by the user.

Sadly, this will break the displaying of your tags, which simply won’t do! Off to the drawing board again!

My starter for ten was to try creating my own bunch of if statements to alter the query based on whether it was a category or a tag just before my while statement. No good, broke the whole page instead of just a specific functionality. Then a lightbulb flickered inside.

There’s already an if statement determining what to do based on the users actions right at the top… why don’t I just sneak them into there? I’m cutting down on additional if statements and making the code cleaner. So, I bodged together the code and got the following:

<?php if (have_posts()) : ?>

<div class=”item entry”>

<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>

<?php /* If this is a category archive */ if (is_category()) { ?>

<h2 class=”pagetitle”><?php single_cat_title(); ?></h2>

<?php

$categoryvariable=$cat;

$query= ‘cat=’ . $categoryvariable. ‘&orderby=date&order=ASC’;

?>

<?php query_posts(’showposts=10&cat=’.$cat); ?>

<?php /* If this is a tag archive */ } elseif( function_exists(’is_tag’) ) { if(is_tag()){ ?>

<h2 class=”pagetitle”>Episodes mentioning <?php single_tag_title(); ?></h2>

<?php

$tagvariable=$tag;

$query= ‘tag=’ . $tagvariable. ‘&orderby=date&order=ASC’;

?>

<?php query_posts(’showposts=10&tag=’.$tag); ?>

Hit refresh and began testing…. it works! No breaking, no spooling out the wrong info!

Check it yourself at http://dev.verticalslice.tv by clicking on “News” on the left and playing around.

Not bad for someone who only knows basic HTML and lacks any knowledge of how wordpress functions internally. Tho, as I said, it’s still prolly lame to those who actually know what they’re doing - but I’m not them, and this was my victory ;)

If you know of a better way of doing this or if this opens the site up to a vulnerability, please let me know in the comments.

iphone app review: iPiMP - updated!

At the start of the month I gave a review of the iPiMP app here and came up with 2 things that would not only turn this into a must have bit of software; but strengthen mediaportal’s position as one of the best media centre applications available for windows users as well.

The first was the ability to stream live tv to the iphone - However, a bit more thought into that and I have come to the conclusion that it’s not such a hot feature after all. Too limiting and would depend on some structural changes to the mediaportal software itself.

The second one is the truly killer feature though… Remote control of a client.

Well, it turns out that I didn’t have to wait long at all after a comment popped up from the developer informing me that version 3.0.0 (latest version is now 3.0.1) now includes that very feature!

The installer now comes with a “client plugin” option that is required on every client you wish to remotely control.

Just remember to untick the server and transcoder options, this could be made a little easier for some people by having a menu before the component selections with 3 radio buttons offering “server and client”, “server only” and “client only” options to auto choose these; but then it isn’t really hard to untick the boxes.

Once installed, remember to enable the plugin from within the mediaportal client settings dialogue and add the port it runs on (55667 tcp) to your firewall.

After you have your server running and all your clients set up and enabled it’s time to fire up the iphone.

Oh, small change - the username field is no longer case sensitive so it doesn’t matter anymore about the recent auto caps’ing Apple included in the latest firmware.

And there we have the addition of “Remote control” to the home menu.

Before you can start controlling any of your clients, you’ll need to add them by tapping onto “administration”.

Tap through to the “MediaPortal clients” and you’ll see a very simple add, delete and edit screen. Tapping onto add will give you the following screen.

Here you can give it a friendly name that can be its location in your house, the name of the PC it is running on and the port the service communicates on.

Unless you changed this within the plugin options in the mediaportal config, you can leave the port setting blank and it will use the default setting; which is a nice bit of design by the developer - fewer settings for users to remember and fiddle with usually results fewer things to break. :)

Once you have configured your clients and saved the settings tap on the home button and go into the Remote control option.

Select your client and you’ll be greated with a two page interface (transitioned by tapping on the little guy holding a number) that is simple, if busy looking at first.

The little guys on the second page represent the different categories such as music, games, videos, pictures and live tv.

The first page is a simple navigation layout, not a bad first config but one I’m sure will be refined over time as people begin using it - the first suggestion that springs to my mind is having the tv guide button on the same page as the navigation buttons.

It is very intuative when moving around mediaportal with the iphone and this app, I can already see my logitech mx air getting even less use now!

As it is, the only fault I have picked up on so far while testing the remote control isn’t overly the fault of the app, instead it’s more to do with the responsiveness of the touch screen on my iphone - it has never been quick enough to keep up with the speed at which I can attempt to use it, causing many of my taps to not register.

The result, browsing a long list of video files can take a lot longer than a mouse to navigate around leaving you to tap, tap, tap, tap your way around. As I said tho, this is more a failing of the iphone than the app.

I wonder how difficult it would be to implement a slide scroll to it.

Anyway, time to navigate aside, this little applet just joined my list of must have apps where-ever I deploy a copy of mediaportal as it finally begins to make PC based TV’s a real and friendly replacement to a traditional TV and seperates solution without having to own expensive remote controls that are pretty much useless beyond the application they were designed for.

Convergence is always a good thing and if you ever lose this TV remote, you can always just call it and discover where they have been vanishing to all these years!

Verdict: If you’re running mediaportal and own an iphone, this just became a part of your standard install!

Taking friendfeed beyond the cloud - Revenue making 101

Every so often you’ll see the question “How will [insert current web 2.0 darling here] make money?” and almost always people will resort to “by placing adverts!”.

Lets get this out into the open now, advertising is not and never will be a realistic business model on the internet - For a laundry list of reasons such as:

  • you horribly restrict your earning potential
  • you piss off your visitors/users
  • you open your site/visitors up to potential security vulnerabilities
  • you subject your visitors/users to privacy busting tracking

Now, to the real meat of this article. Current interwebnet 2.0-ified favourites du jour are the micro blogging sites like twitter, friendfeed, pownce (RIP) et al. They’ve grabbed our attention, got us hooked and now people are starting to ask just how they intend on financing such a lovely system so we can continue our crack like addictions.

I know many of you out there still follow the decades old belief that we shall all migrate to network resident apps and anything not in the cloud will fall away like the death of VHS when DVD came along and gave it a bloody nose and bruised it’s ego.

If you believe this then you’re missing out on a tried and tested means of making money - the inhouse solution and the juicey support contracts that go with them. Real revenue that isn’t reliant upon flakey ad providers that can change your income at a whim. If you have made a product you don’t put it into a public place and slap adverts all over it, you sell the damn product.

In order to explain this, let me pick on my favourite micro-blogging sensation - Friendfeed.

I love the ability for this system to pull in RSS feeds, mainly because this one feature alone can transform friendfeed from a public social time sink into a powerfull private system monitoring tool (among many possible uses).

It can’t really be plumbed into the public friendfeed ’cause the data is of no interest to anyone unless you were seeking vectors of attack or trying to dent the company value. Inhouse is the only place for this and it means deploying the system outside of the cloud and in the murky backwaters of the server room.

Sorry cloud utopians.

But how would it make for a great monitoring tool? Surely there’s no space for yet another competitor when you have systems like Solarwind’s NCM that trawl SNMP and WMI?

Well, pretty much all monitoring tools will fire off alerts via email and as any network admin will tell you this can get pretty annoying if it is a little too eager to inform and is quite difficult to derive any meaningful “big picture” stats from since most will either have their own (non-sharing) reporting module or don’t have one and rely on emails only.

Wouldn’t it be nice if you had a way of picking up alerts (either from RSS or redirecting the email alerts to the inhouse solution instead of you) from various systems that ordinarily can’t talk to each other. You could even create RSS feeds out of your server event logs using Greg Reinackers little applet and watch failures in real time.

Now imagine this info accessible from a desktop widget or via an API so you can integrate it with the corporate intranet instead of cluttering up your inbox every time a grunt trips over something?

Combine this with analysis modules that do things similar to ffholic and friendfeeds power to entertain morphs into the power to knit all of your monitoring systems together and open up avenues for datamining them.

A system that compliments and sits on top of your more expensive or built-in monitoring apps rather than replacing them and provides an interface for a plethora of plugins and ways to share the data across the business.

Surely that would be a far better thing to sell than pithy advertising space?

How to spot a scam email.

With the amount of scam emails that pepper our inboxes every so often, you’d have thought most people would be able to identify them. Sadly, they are getting harder to pick out with a casual glance and there are quite a few people - judging by the users I support - that still can’t identify them.

In order to help remedy this, I decided to give a quick dissection of an email I got today.

Exhibit A

At first glance, it might seem legit - it is in the style of some older emails - but a quick look at the first port of call brings up the first doubts. Who is it from?

Would they use an obscure address like that? If an email is coming from a company they’re unlikely to use addresses like "squiffymonkey269" or, in this case "edr_nick". It’s just unprofessional.

*bzzzt* Strike one.

Bad grammar tends to be the hallmark of scam emails, look out for Over Capitalising Words They Want To Emphasise and missed capital letters not to mention sentences that make zero sense! If it reads like a perfect example of Engrish then chances are it’s fake.

If they show a grasp of the English language then read what it is telling you.

Here it’s informing us that they have too many accounts and need to clear them away, but hang on a second the first line states "we’re sending it to everyone" then the end of the sentence claims to be singling out me.. So they’re deleting every account then? Are they trying to drive up Gmail users?

*bzzzzt* Strike two!

And on it continues…

Stunted English and a sudden call for personal details, why not throw in a request for your mothers maiden name (I still can’t believe some web services continue to ask for this!) and your inside leg measurement while you’re at it?!

So you can detect unused accounts? Why the general mailshot then? Also, why isn’t this an automated webpage on the net instead of using an unreliable system like SMTP?

If the scammer is a little smarter than this turd and supplies a web link to enter your details, hover over the link for a few seconds and check out the address it is really sending you to. If it’s an obscure address or ends with an obscure domain tag (.ir instead of .com for example) you can bet it’s either going to be a fake site that will post your details to the scammer or infested with spyware that will attempt to spunk itself all over your system.

Try it out on this example: http://www.hotmail.com/confirm

If it doesn’t provide a little popup telling you the address, check out the bottom of your browser window as it should tell you I’m really sending you to http://all.your.bank.details.are.all.ours .

*bzzzzzzzzzzt* Strike 3, you’re out!

Just remember the following steps:

  • Be skeptical of these emails
  • Check out who it’s from
  • What do they want
  • Does any of it makes logical and grammatical sense.
  • Keep an eye out for dodgy links

If it smells like BS, it prolly is!

Windows explorer status bar.. in memorial

When the change to Vista came it sounded the deathknell for a single UI element that I loved.

Within windows explorer you could enable something known as the Status bar, along this you would see information such as what security zone you were in, how much space you had left, how many files were in a folder and what size of data this represented.

It was this ability to see not only how much space you had left but how big in terms of storage capacity the folder I had open was consuming that I loved - system info at a glance that was germain to my task.

Not even OSX showed you this information, going out of its way to hide how big a folder is and breaking up the information as to how much space you have left into little locations across applications and folder views.

The only thing I wished it did was count up the values of the folders within that folder, but this would have made explorer very slow. I wonder if this is why browsing the file system in vista is very slow because this functionality was added, but for the tooltip hover instead of the status bar!

My hopes for this to make a return in win7 were dashed when I opened up explorer and it was just the same as vista.

Am I alone in wishing for this little UI element to return? Do you know of a way of returning this to vista/win7? If so, would you be willing to share? ;)

Surely I can’t be the only person who mourns it’s loss?!

windows 7 taskbar


windows 7 taskbar in 60-ish seconds from alphaxion on Vimeo.

Older youtube video - http://uk.youtube.com/watch?v=5dmuR4c1Nlg

OK, I take it back, the PDC version of windows 7 does indeed have the new interface hiding away in there for those who know where to look.

So, joining in with everyone else who has access to this here is my run through of the new taskbar in 60-ish seconds.

Sadly the quality of the video is very poor, so you can download it here (6mb divx file) and I’m pending a vid on revver.

Windows 7 screens

Well, I said I’d post a few screen grabs showing the subtle changes between vista and win7, here they are.

First up is the Solution Centre

The usual incessant blast of messages have been bundled up into a single system tray icon. Also, that little translucent rectangle next to the time is a “show desktop” quick button.

Then we have the streamlined desktop settings

In here the alignment of multiple monitors is now done by dragging and dropping, it also gives hint to one of the windows quick key combos - something of which many still remain unknown by most users (win+e for explore, win+r for run prompt, win+l for a quick lock of the PC and win+f for the search dialogue being 4 extremely useful combos). A very minimalist interface.

The interface has been cleaned up..

Since there is no longer a difference between the interface when opening and exploring, they have finally tidied away the two options and turned them into a single one. Win7 is full of these little cleanups that vista was just missing.

Tablet edition is basically cooked into the system.

Seems to be quite odd in that it’ll pick up words from mindless scribbles :S It must have an inbuilt bablefish for gibberish!

More to come in due time :)

Realtek, your drivers are driving me… into annoyance-ville!

A couple of months ago I finally had the cash to say goodbye to the Shuttle XPC that has served me well for the past 3 years, this was especially urgent as it is now terminally sick. The result, it turns out, of a swollen capacitor - operation lazarus is underway to repair this so that it may live out its retirement years in servitude as my TVPC.

So, toodle-oo to Rumble and hello to Perceptor. I’ve returned from my SFF PC experiment to a midi tower case since I wasn’t able to keep my main rig updated and being ultra small and portable is no longer a requirement since my LAN party days are over for now.

After waiting patiently for my order to arrive I plumbed in all the equipment, installed windows and piled the drivers and software into it. All that’s left is to savour the Fresh PC(tm) sensation you get with a brand new machine.

Well.. I would have if this little annoying bugger didn’t exist.
null

I know I did, it wasn’t an accident! I didn’t fall across the room and land, jack first, into the unsuspecting port. And no, there is no innuendo or hidden message in there no matter how much you look for it! ;)

It even tells me when I’ve unplugged it… I don’t need to know this, yet it insists on alerting me every time I do it.

There has to be a way to turn this incessant and pointless spam off.

A look through the settings brings me no joy.. There only appears to be an option for getting rid of the tray icon which only happens to silence it as an incidental result, bit like tearing out the lenses from your 3D glasses if you want it to stop showing you 3D images.
Still, if you want to silence this annoying message telling you about things you have actively gone out to do you’ll find it here:

* Right click the tray icon and select Sound Manager
* Click the blue "I" in the bottom right (above the OK button)
* Click the blue dot next to "Display Icon in Notification Area" to remove the tray icon, and the popups. It’s not like you needed that icon anyway.

Thanks to Paul Grav for triggering the memory of this issue and Grumpy Gamer for the resolution and image when I’m not at my machine to put them together myself and had to tea leaf them.

Windows 7, naughty me!

Here’s the contents of a few messages as I was streaming my installation of Windows7, which I had to cut short the streaming because my GF entered the room and I respect her privacy. Just as I had people picking up the stream after my flatmate got it linked on EVE Radio .
Sorry for those who were cut off so soon!

Twitter posted a message on Twitter
“naughty me is installing windows 7 here http://www.alphaxion.com/?page… Oops ;)”

  • urgh.. come on microsoft, why can’t I delete a dynamic drive from the setup? do I *really* have to go into another instance of windows to do it? BAD FORM
  • ok, after some jiggery and pokery with storage and moving data across I’m now *finally* moving with installing win7. Just got the 45 min copy of files to wait now :/
  • boredom begins to set in http://www.ustream.tv/recorded…
  • well, after having a play around with the settings and a nose about media centre, the damn thing packed in on me and wouldn’t boot back up again. I think it’s more down to a buggered HDD than the OS. Will explore tonight.

Had plenty of problems, primarily with the fact that I only had sata hdd’s at hand but the machine I was using didn’t have onboard sata. Sadly, the only sata card I have is an Adaptec 1210S which never had vista drivers built and win7 doesn’t have any native support.
I then tried a HDD from an old system, a tiny 10gb and was rejected “windows requires 12gb of free space”.
Found another, but was a dynamic disk and just like vista it refuses to deal with it. This is quite a bad failing really, there should be no reason why you can’t convert it within the setup interface! I had to boot to another OS in order to sort it out before win7 setup (winPE) would even accept the HDD.

To anyone with influence at MS, please get this looked at!
I will be continuing this tonight, as I try to resurrect the damn thing and grab some screenshots. One thing I did notice is that all the changes are very subtle right now.

I know the major interface changes have been omitted right now, but there are still plenty - something I noticed immediately is that the “explore” option when right clicking [my] computer has been eliminated because it is all one view - which it has been since vista.

The display settings interface has been tidied up a bit, I really wish I had got screen caps before it died. It looks a bit more friendly to less experienced users.

Win7 seems to accept vista drivers for hardware quite happily, so maybe the driver hell won’t be as pronounced with this version. I had my sound card (ADI onboard) and Hauppage TV card (PVR350) running quite happily from drivers downloaded from their respective sites.

Windows picked up its own drivers for the 6600GT I was using for the video card, I used an fx5200 when installing it. Wanted to see how it would handle a vid card swap. No problems. :)

Something I didn’t notice was the performance scoring system, it just let me go straight into the aero style without having to redo anything. Whether this will be in the final version or not remains to be seen.

Media Centre is very usable, with some tweaks here and there - teletext buttons onscreen was a nice touch that I don’t remember being there before. It seems to have lost the double right click to go back to the EPG for some reason.

I just plain didn’t have enough time to go through it as it crashed in media centre and wouldn’t let me get to the task manager before it rebooted on its own and complained about the boot device, halting my playtime.

Also, if you’re thinking about running the beta win7 in virtual PC don’t bother. The VM additions software will blue screen on you and stop it from booting. On the plus side, I got to see the recovery wizard that will run through a diagnosis for you and then spit out its recommendation - in this instance it suggested I do a rollback using system restore, don’t know if it will always suggest that or if it can do other things too.

Expect some screenshots in the near future, until now it’s text only :(

Exchange 2003: Moving mailboxes between servers or mail stores leaves behind a disconnected mailbox

When using the mailbox move exchange task, sometimes it’ll leave a "ghost" mailbox in the old mailstore. A mailbox that appears to be disconnected from its user account, but the mailbox has been successfully moved to its new home.

This can be quite annoying and won’t let you clean it away using the purge or mailbox cleanup agent. So how do you get rid of the damn thing?

The quickest and easiest solution I have found is to simply start up the mailbox move exchange task and set it to go back to where you have the now ghostly mailbox. It’ll error, saying that it already exists but the next time you refresh that mailstore, your ghost will have been exorcised away. :)