View Full Version : How to check version...
mADmAX`
05-10-2003, 04:34 PM
I am working on sort of a hack for vbulletin but will have its own admin control panel. I am trying to figure out how to check the version to see if there is an update, like vbulletin does in the admin control panel. How exactly do you do that?
Black Vivi
05-11-2003, 04:46 AM
try
if ($templateversion==version you want)
{
DO THIS
}
else
{
DO THIS INSTEAD
}
mADmAX`
05-11-2003, 06:19 AM
No, I am talking about how vb's admin cp says this...
You are running version xxx
Latest version is xxx
How do you get it to check via the javascript...
I see where it calls vbulletin.com but unsure how to make a script that it calls.
So that way my hack (which has its own cp) will check if a newer version available.
Black Vivi
05-11-2003, 12:59 PM
as far as i know, the version.js script is just this:
var vb_version = 'latest version';
var vb_announcementid = 'latest version thread';
the, to make it display it, they use this code in the ACP:
<script language="Javascript">
if ('<?php echo $templateversion; ?>' < hack_version)
{
document.write("<div align=\"center\" class=\"tblhead\" style=\"padding:4px\"><b><a href=\"http://vbulletin.com/forum/showthread.php?postid="+vb_announcementid+"\"><span class=\"tblhead\"><font size=\"2\">There is a newer version of vBulletin than the version you are running!</font></span></a></b>");
document.write("<br><a href=\"http://vbulletin.com/members/\"><span class=\"tblhead\">Download vBulletin version "+vb_version+" from the Members' Area</span></a>.</div>");
}
</script>
so, for u, it cud be this:
JS script:
var hack_version = 'latest version';
var hack_announcementid = 'latest version thread';
and this to display it:
<script language="javascript">
if ('<?php echo($templateversion); ?>' < vb_version)
{
document.write("<div align=\"center\"><b><a href=\"FORUM URL/showthread.php?postid="+hack_announcementid+"\"><font size=\"2\">There is a newer version of HACK NAME than the version you are running!</font></a></b></div>");
}
</script>
hope thats what u meant.
don't forget to call it with the script tags first;)
mADmAX`
05-11-2003, 04:54 PM
Thanks, that worked =P
Didnt think it was that simple. I see checkversion coming to vbulletin.com. Do you know what needs to be inside that or does vbulletin allow me to run that (cause it works fine just caling it from them).
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.