PDA

View Full Version : [Java] Uno script per vBulletin che non funge come dovrebbe..


|Norman|
02-08-2006, 18:41
Ho trovato questo script:

<if condition="$bbuserinfo[usergroupid] == 1">
<style type="text/css">
HTML {
OVERFLOW-X: auto
}
.borderwrap {
BORDER-RIGHT: #072a66 1px solid; PADDING-RIGHT: 0px; BORDER-TOP: #072a66 1px solid; PADDING-LEFT: 0px; BACKGROUND: #fff; PADDING-BOTTOM: 0px; MARGIN: 0px; BORDER-LEFT: #072a66 1px solid; PADDING-TOP: 0px; BORDER-BOTTOM: #072a66 1px solid
}
</style>
<script type='text/javascript'>
var displaymode = 'always';
var enablefade = 'no';
var autohidebox = ['no', 15];
var showonscroll = 'yes';
var IEfadelength = 1;
var Mozfadedegree = 0.05;
if (parseInt(displaymode) != NaN)
{
var random_num = Math.floor(Math.random() * displaymode);
}
function display_hover_prompt()
{
var ie = document.all && !window.opera;
var dom = document.getElementById;
var iebody = (document.compatMode == 'CSS1Compat') ? document.documentElement : document.body;
var objref = (dom) ? document.getElementById('hoverprompt') : document.all.hoverprompt;
var scroll_top = (ie) ? iebody.scrollTop : window.pageYOffset;
var docwidth = (ie) ? iebody.clientWidth : window.innerWidth;
var docheight = (ie) ? iebody.clientHeight: window.innerHeight;
var objwidth = objref.offsetWidth;
var objheight = objref.offsetHeight;
objref.style.left = docwidth/2-objwidth/2+'px';
objref.style.top = scroll_top+docheight/2-objheight/2+'px';
if (showonscroll == 'yes')
{
var showonscrollvar = setInterval('static_hover_prompt()', 50);
}
if (enablefade == 'yes' && objref.filters)
{
objref.filters[0].duration = IEfadelength;
objref.filters[0].Apply();
objref.filters[0].Play();
}
objref.style.visibility = 'visible';
if (objref.style.MozOpacity)
{
if (enablefade == 'yes')
{
var mozfadevar = setInterval('mozilla_hover_prompt_fade()', 90);
}
else
{
objref.style.MozOpacity = 1;
initiate_hover_prompt_hiding();
}
}
else
{
initiate_hover_prompt_hiding()
}
}
function mozilla_hover_prompt_fade()
{
if (parseFloat(objref.style.MozOpacity) < 1)
{
objref.style.MozOpacity = parseFloat(objref.style.MozOpacity)+Mozfadedegree;
}
else
{
clearInterval(mozfadevar);
controlledhidebox();
}
}
function static_hover_prompt()
{
var ie = document.all && !window.opera;
var dom = document.getElementById;
var iebody = (document.compatMode == 'CSS1Compat') ? document.documentElement : document.body;
var objref = (dom) ? document.getElementById('hoverprompt') : document.all.hoverprompt;
var scroll_top = (ie) ? iebody.scrollTop : window.pageYOffset;
var docwidth = (ie) ? iebody.clientWidth : window.innerWidth;
var docheight = (ie) ? iebody.clientHeight: window.innerHeight;
var objwidth = objref.offsetWidth;
var objheight = objref.offsetHeight;
objref.style.top = scroll_top+docheight/3-objheight/2+'px';
}
function hide_hover_prompt()
{
var ie = document.all && !window.opera;
var dom = document.getElementById;
var iebody = (document.compatMode == 'CSS1Compat') ? document.documentElement : document.body;
var objref = (dom) ? document.getElementById('hoverprompt') : document.all.hoverprompt;
objref.style.visibility = 'hidden';
if (typeof showonscrollvar != 'undefined')
{
clearInterval(showonscrollvar);
}
}
function initiate_hover_prompt_hiding()
{
if (autohidebox[0] == "yes")
{
var delayvar = (enablefade == 'yes' && objref.filters) ? (autohidebox[1]+objref.filters[0].duration)*1000 : autohidebox[1]*1000;
initiate_timer(delayvar);
setTimeout('hide_hover_prompt()', delayvar);
}
}
function initiate_timer(time)
{
var newtime = time-1000;
setTimeout('update_timer('+newtime+')', 1000);
}
function update_timer(time)
{
var timer = time/1000;
var ie = document.all && !window.opera;
var dom = document.getElementById;
if (dom)
{
var hp = document.getElementById('hptimer');
hp.innerHTML = "<small><i>This windows will auto close in "+timer+" seconds</i></small>";
}
var newtime = time-1000;
setTimeout('update_timer('+newtime+')', 1000);
}
function initiate_hover_prompt()
{
setTimeout('display_hover_prompt()', 100);
}
function get_cookie(Name)
{
var search = Name + "=";
var returnvalue = "";
if (document.cookie.length > 0)
{
var offset = document.cookie.indexOf(search);
if (offset != -1)
{
offset += search.length;
var end = document.cookie.indexOf(';', offset);
if (end == -1)
{
end = document.cookie.length;
}
returnvalue = unescape(document.cookie.substring(offset, end));
}
}
return returnvalue;
}
if (displaymode == 'always' || parseInt(displaymode) != NaN && random_num == 0)
{
if (window.addEventListener)
{
window.addEventListener('load', initiate_hover_prompt, false)
}
else if (window.attachEvent)
{
window.attachEvent('onload', initiate_hover_prompt)
}
else if (document.getElementById)
{
window.onload = initiate_hover_prompt;
document.cookie = 'fadedin=yes';
}
}
</script>
<table border="0" cellpadding="3" cellspacing="1" width="752" height="59">
<tr>
<td width="741" height="51">
<style type='text/css'>#hoverprompt{position:absolute; width:350px; left:0; top:-400px; padding:4px; z-index:100; visibility:hidden}</style>
<div id='hoverprompt'><div class='borderwrap'><div class='maintitle' align='center'>Benvenuto a <b>$vboptions[bbtitle]</b> Visitatore!</div>
<table align='center' width='100%' class='row1' cellspacing='0' cellpadding='5'>
<tr>
<td align='center'>
<a href="register.php?">La registrazione è gratuita</a>, e ti permette di:<br>
Inviare nuove discussioni<br>
Rispondere alle discussioni altrui <br>
Editare i tuoi messaggi, e molto altro!

<br><br>Sei già registrato? Enra da quì:<br>
<!-- login form -->
<form action="login.php" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)">
<script type="text/javascript" src="clientscript/vbulletin_md5.js"></script>
<table cellpadding="0" cellspacing="3" border="0">
<tr>
<td class="smallfont">Username</td>
<td><input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="Username" onfocus="if (this.value == 'User Name') this.value = '';" /></td>
<td class="smallfont" colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />Remember Me?</label></td>
</tr>
<tr>
<td class="smallfont">Password</td>
<td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" size="10" accesskey="p" tabindex="102" /></td>
<td><input type="submit" class="button" value="Log in" tabindex="104" title="Immetti i tuoi dati (username e password) nel campo quì sopra per entrare, oppure clica sul bottone "Registrazione" per crearti un nuovo account" accesskey="s" /></td>
</tr>
</table>
<input type="hidden" name="s" value="" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
</form>
<!-- / login form -->
</td>
</tr>
<tr>
<td align='center'><div id='hptimer'><small><i>Questa finestra si autochiuderà in 15 secondi</i></if></small></div></td>
</tr>
<tr>
<td align='center'><small><center>::.::GP by QvnsQ @ <a href="http://www.efz-tm.net">EFZ-TM.NET</a>::.::</center></if></small></div></td>
</tr>
</table></form></div></div>

Il problema, è che: dopo 15 secondi, si dovrebbe auto chiudere, però questo non succede, e non so perché.

Nessuno mi può aiutare? :)

MEMon
02-08-2006, 19:01
Questo è javascript non centra nulla con il java.

|Norman|
02-08-2006, 19:54
Questo è javascript non centra nulla con il java.

Ecco. E più si conferma la mia biubbaggine. :asd:
Dunque, non mi potete aiutare?

|Norman|
02-08-2006, 20:34
Poi, dovrei anche aggiungere del codice che faccia in modo che nella pagina di registrazione del forum scompaia.

La pagina di registrazione è register.php?

<a href="register.php?">

|Norman|
04-08-2006, 23:21
Proprio nessuno? :cry: :p