Page Index Toggle Pages: 1
Topic Tools
Normal Topic YaBB Administration Center Version Information fix (Read 292 times)
xnoddyx
Support Team
Documentation Team
YaBB Moderators
YaBB Next Team
Beta Testers
****
Offline



Posts: 1,587
Location: UK:Scotland/livingston

None
YaBB Administration Center Version Information fix
Jul 19th, 2013 at 1:45am
Post Tools
Bug post by RonS2

at least as far back as YaBB 2.4 there is a code error with Version Information due to missing variable if YaBB is unable to retriever this variable from
http://www.yabbforum.com/update/versioncheck.js

the variable is var STABLE;

Code
Select All
  <script language="JavaScript" type="text/javascript">
  <!-- //hide from dinosaurs
	var STABLE;
  // -->
  </script> 



My fix is not to re add the missing code but to put a proper check in the code.

in Admin.pl find
Code
Select All
if (!STABLE) { 




and replace it with
Code
Select All
if (typeof STABLE == "undefined" || STABLE == null ) { 



Edited:
From Carsten
http://www.carsten-dalgaard.dk/cgi-bin/yabb2/YaBB.pl?num=1374198266/8#1
additional code to fix

For Forum Statistics:
find:
Code
Select All
          document.write("$versiontxt{'4'} <b>$YaBBversion</b> - $versiontxt{'5'} <b>"+STABLE+"</b> <p>"); 

   

and replace it with:
Code
Select All
	if (typeof STABLE == "undefined" || STABLE == null ) {
          document.write("$versiontxt{'4'} <b>$YaBBversion</b> - $versiontxt{'5'} <b>$rna</b> <p>");
	} else {
          document.write("$versiontxt{'4'} <b>$YaBBversion</b> - $versiontxt{'5'} <b>"+STABLE+"</b> <p>");
	} 



For Detailed Version Check:
find:
Code
Select All
			document.write("$versiontxt{'5'} <b>"+STABLE+"</b><br />$versiontxt{'7'} <b>"+BETA+"</b>");

and replace it with:
		if (typeof STABLE == "undefined" || STABLE == null) {
			document.write("$versiontxt{'5'} <b>$rna</b><br />$versiontxt{'7'} <b>$rna</b>");
		} else {
			document.write("$versiontxt{'5'} <b>"+STABLE+"</b><br />$versiontxt{'7'} <b>"+BETA+"</b>");
		} 

« Last Edit: Jul 20th, 2013 at 1:43am by xnoddyx »  

YaBB install help video
1. what yabb forum are you running and the url
2. describe in as much detail as you can what happens and also post screenshots if you can
3. please be patient we live in different time zones and have other commitments but we will help you
as bill and ted say (Be excellent to each other)
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top