Reputation: 3
Here's the scenario, upon successfully installing our software, we launch your web browser and display a thank you page.
I'm trying to figure out how to display an additional block of html that notifies the user if they've just installed an older version and provides a download link to the latest.
Upon install, an older version would display something like this: www.oursite.com/thanks/?v=2.2.0
While the current version should generate something like this www.oursite.com/thanks/?v=3.0.0.20932
(They both bring you to the same page, just have a different token)
I've considered adding redirects to our .htaccess -but we've released many incremental versions and that could get messy quick.
We're running wordpress - so php or js should work fine, i just don't have the programming chops for something like this and don't even know where to begin.
Upvotes: 0
Views: 441
Reputation: 47776
You could simply compare the version string with a "latest version" constant that you would update manually.
<?php
define(LATEST_VERSION, "3.0.0.20932");
if ($_GET['v'] != LATEST_VERSION)
echo "<p>You don't have the latest version.</p>";
?>
Upvotes: 3