Category Archives: Programming

Changing FV WordPress Flowplayer

I’ve got the FV WordPress Flowplayer plugin installed on a number of blogs but hit a problem with the “redirect” option that allows you to set a new page to redirect the user to when the video finishes playing.

The problem is that the plugin wants to open a new window when it reaches that point.

In Firefox that works fine.

But in Chrome and Internet Explorer it’s treated as a pop-up. Which means it’s blocked unless the user either accepts it or has changed the defaults to allow pop-ups. Neither of which are exactly likely.

It took me a while but I discovered a very simple change in one of the FV WordPress Flowplayer files would sort this out.

If you’ve hit the same problem, take a backup of the file concerned (always a good idea when you’re doing this kind of thing) before making the modification.

In your WordPress dashboard, click Plugins and then click “Edit” below FV WordPress Flowplayer

The file you’re looking for is called flowplayer-frontend.php – use Ctrl-F to find it then click the link to open that file in the WordPress editor.

Then search for:

fv_redirect_to

and change it to:

_self

The line it’s on should now read:

window.open(‘$redirect’,’_self’);

If that’s the case, click the “Update File” button to save the amended code.

If all has gone well, any video on your site using the plugin that you want to redirect will now redirect to the same window, keeping it safe from over-zealous anti pop-up tendencies in browsers.

Visual Basic 6 Round Error

I just hit an interesting error in VB6 today – it’s best described as a Visual Basic 6 round error.

I was trying to calculate a distance between two points. No problem there except I didn’t want to put something on a page that said “48.723569” miles. That would look dumb.

No problem, I thought, I’ll format the output using VB’s format command, giving the number string as “#####0.0”.

But for certain numbers, format in VB 6 kept giving me the answer 0.0. Not exactly what I was looking for…

No problem, I’ll use Round instead.

Same error. Some calculations worked, others got rounded to zero regardless… Continue reading