Changeable untested version using AnyVar
Nov 26th, 2009 by Hoi Lo
3.0 Changeable untested version using AnyVar
3.1 Introduction
Similar to changing the certified version, users can change the range of untested plugin versions using AnyVar.
3.2 Instructions
Changing the untested range is as easy as changing the certified version. The only difference is that you need to change the untested_minversion and untest_maxversion.
For example, in the AnyVar variable list, there are the variables java_untested_minversion and java_untested_maxversion, as illustrated below:
Figure 5. AnyVar Untested Version Variables
Changing the minversion variable to “1.0” and maxversion to “1.4” will correspond in the front-end as seen below:
If the user is using a java version that is within the untested range but do not have the certified version, a question mark will appear on the Java sidebar.
3.3 Programming Description
The programming of the untested range of plugins is implemented by simple if and else statements.
function javac() {
var version=parseFloat(PluginDetect.getVersion (“Java”));
if (version==[java_version]) {
document.getElementById(“javab1″).src =”http://oltubc.com/sandbox/images/javacheck.bmp”;
} else {
if(version >=[java_untested_minversion]){
if(version <=[java_untested_maxversion]) {
document.getElementById(‘javab1’).src =”http://oltubc.com/sandbox/images/javaquestion.bmp”; }
else { document.getElementById(“javab1″).src =”http://oltubc.com/sandbox/images/javacross.bmp”; }
}
else { document.getElementById(“javab1″).src=”http://oltubc.com/sandbox/images/javacross.bmp”; }
}
}
The start of the code is an if statement that checks if the plugin version equal to the certified version created by the user using AnyVar, if so a check mark will appear of the plugin sidebar. If not, if the plugin is in the untested range, then a question mark will appear. If not within the range, then a cross mark will appear indicating that the plugin version being used is not certified and untested.