Version 2.0.0

This commit is contained in:
Neo committed 2025-12-19 00:19:56 -08:00
1 parent 5699abfc0e
commit 0eecc172d9
696 files changed
+120723 -77160

No files matched your search

+443
View File
@@ -0,0 +1,443 @@
//--------------------------------------------
// Set up our simple tag open values
//--------------------------------------------
var B_open = 0;
var I_open = 0;
var U_open = 0;
var QUOTE_open = 0;
var CODE_open = 0;
var SQL_open = 0;
var HTML_open = 0;
var bbtags = new Array();
var fombj = document.REPLIER;
//==========================================
// prep and set up
//==========================================
prep_mode();
function prep_mode()
{
cvalue = my_getcookie( "bbmode" );
if (cvalue == 'ezmode')
{
fombj.bbmode[0].checked = true;
}
else
{
fombj.bbmode[1].checked = true;
}
}
//==========================================
// Set BBCode mode
//==========================================
function setmode(mVal)
{
my_setcookie( 'bbmode', mVal, 1 );
}
function get_easy_mode_state()
{
//--------------------------------------------
// Returns true if we've chosen easy mode
//--------------------------------------------
if ( fombj.bbmode[0].checked )
{
return true;
}
else
{
return false;
}
}
//==========================================
// Set the help bar status
//==========================================
function hstat(msg)
{
fombj.helpbox.value = eval( "help_" + msg );
}
//==========================================
// Set the number of tags open box
//==========================================
function cstat()
{
var c = stacksize(bbtags);
if ( (c < 1) || (c == null) ) {
c = 0;
}
if ( ! bbtags[0] ) {
c = 0;
}
fombj.tagcount.value = c;
}
//==========================================
// Close all tags
//==========================================
function closeall()
{
if (bbtags[0])
{
while (bbtags[0])
{
tagRemove = popstack(bbtags)
fombj.Post.value += "[/" + tagRemove + "]";
//--------------------------------------------
// Change the button status
// Ensure we're not looking for FONT, SIZE or COLOR as these
// buttons don't exist, they are select lists instead.
//--------------------------------------------
if ( (tagRemove != 'FONT') && (tagRemove != 'SIZE') && (tagRemove != 'COLOR') )
{
eval("fombj." + tagRemove + ".value = ' " + tagRemove + " '");
eval(tagRemove + "_open = 0");
}
}
}
//--------------------------------------------
// Ensure we got them all
//--------------------------------------------
fombj.tagcount.value = 0;
bbtags = new Array();
fombj.Post.focus();
}
//==========================================
// EMOTICONS
//==========================================
function emoticon(theSmilie)
{
doInsert(" " + theSmilie + " ", "", false);
}
//==========================================
// ADD CODE
//==========================================
function add_code(NewCode)
{
fombj.Post.value += NewCode;
fombj.Post.focus();
}
//==========================================
// ALTER FONT
//==========================================
function alterfont(theval, thetag)
{
if (theval == 0)
return;
if(doInsert("[" + thetag + "=" + theval + "]", "[/" + thetag + "]", true))
pushstack(bbtags, thetag);
fombj.ffont.selectedIndex = 0;
fombj.fsize.selectedIndex = 0;
fombj.fcolor.selectedIndex = 0;
cstat();
}
//==========================================
// SIMPLE TAGS (such as B, I U, etc)
//==========================================
function simpletag(thetag)
{
var tagOpen = eval(thetag + "_open");
if ( get_easy_mode_state() )
{
inserttext = prompt(prompt_start + "\n[" + thetag + "]xxx[/" + thetag + "]");
if ( (inserttext != null) && (inserttext != "") )
{
doInsert("[" + thetag + "]" + inserttext + "[/" + thetag + "] ", "", false);
}
}
else
{
if (tagOpen == 0)
{
if(doInsert("[" + thetag + "]", "[/" + thetag + "]", true))
{
eval(thetag + "_open = 1");
//--------------------------------------------
// Change the button status
//--------------------------------------------
eval("fombj." + thetag + ".value += '*'");
pushstack(bbtags, thetag);
cstat();
hstat('click_close');
}
}
else
{
//--------------------------------------------
// Find the last occurance of the opened tag
//--------------------------------------------
lastindex = 0;
for (i = 0 ; i < bbtags.length; i++ )
{
if ( bbtags[i] == thetag )
{
lastindex = i;
}
}
//--------------------------------------------
// Close all tags opened up to that tag was opened
//--------------------------------------------
while (bbtags[lastindex])
{
tagRemove = popstack(bbtags);
doInsert("[/" + tagRemove + "]", "", false)
//--------------------------------------------
// Change the button status
//--------------------------------------------
if ( (tagRemove != 'FONT') && (tagRemove != 'SIZE') && (tagRemove != 'COLOR') )
{
eval("fombj." + tagRemove + ".value = ' " + tagRemove + " '");
eval(tagRemove + "_open = 0");
}
}
cstat();
}
}
}
//==========================================
// List tag
//==========================================
function tag_list()
{
var listvalue = "init";
var thelist = "";
while ( (listvalue != "") && (listvalue != null) )
{
listvalue = prompt(list_prompt, "");
if ( (listvalue != "") && (listvalue != null) )
{
thelist = thelist+"[*]"+listvalue+"\n";
}
}
if ( thelist != "" )
{
doInsert( "[LIST]\n" + thelist + "[/LIST]\n", "", false);
}
}
//==========================================
// URL tag
//==========================================
function tag_url()
{
var FoundErrors = '';
var enterURL = prompt(text_enter_url, "http://");
var enterTITLE = prompt(text_enter_url_name, "My Webpage");
if (!enterURL) {
FoundErrors += " " + error_no_url;
}
if (!enterTITLE) {
FoundErrors += " " + error_no_title;
}
if (FoundErrors) {
alert("Error!"+FoundErrors);
return;
}
doInsert("[URL="+enterURL+"]"+enterTITLE+"[/URL]", "", false);
}
//==========================================
// Insert attachment tag
//==========================================
function insert_attach_to_textarea(aid)
{
doInsert( "[attachmentid="+aid+"]" );
}
//==========================================
// Image tag
//==========================================
function tag_image()
{
var FoundErrors = '';
var enterURL = prompt(text_enter_image, "http://");
if (!enterURL) {
FoundErrors += " " + error_no_url;
}
if (FoundErrors) {
alert("Error!"+FoundErrors);
return;
}
doInsert("[IMG]"+enterURL+"[/IMG]", "", false);
}
function tag_email()
{
var emailAddress = prompt(text_enter_email, "");
if (!emailAddress) {
alert(error_no_email);
return;
}
doInsert("[EMAIL]"+emailAddress+"[/EMAIL]", "", false);
}
//--------------------------------------------
// GENERAL INSERT FUNCTION
//--------------------------------------------
// ibTag: opening tag
// ibClsTag: closing tag, used if we have selected text
// isSingle: true if we do not close the tag right now
// return value: true if the tag needs to be closed later
//
function doInsert(ibTag, ibClsTag, isSingle)
{
var isClose = false;
var obj_ta = fombj.Post;
//----------------------------------------
// It's IE!
//----------------------------------------
if ( (ua_vers >= 4) && is_ie && is_win)
{
if (obj_ta.isTextEdit)
{
obj_ta.focus();
var sel = document.selection;
var rng = sel.createRange();
rng.colapse;
if((sel.type == "Text" || sel.type == "None") && rng != null)
{
if(ibClsTag != "" && rng.text.length > 0)
ibTag += rng.text + ibClsTag;
else if(isSingle)
isClose = true;
rng.text = ibTag;
}
}
else
{
if(isSingle)
{
isClose = true;
}
obj_ta.value += ibTag;
}
}
//----------------------------------------
// It's MOZZY!
//----------------------------------------
else if ( obj_ta.selectionEnd )
{
var ss = obj_ta.selectionStart;
var st = obj_ta.scrollTop;
var es = obj_ta.selectionEnd;
if (es <= 2)
{
es = obj_ta.textLength;
}
var start = (obj_ta.value).substring(0, ss);
var middle = (obj_ta.value).substring(ss, es);
var end = (obj_ta.value).substring(es, obj_ta.textLength);
//-----------------------------------
// text range?
//-----------------------------------
if (obj_ta.selectionEnd - obj_ta.selectionStart > 0)
{
middle = ibTag + middle + ibClsTag;
}
else
{
middle = ibTag + middle;
if (isSingle)
{
isClose = true;
}
}
obj_ta.value = start + middle + end;
var cpos = ss + (middle.length);
obj_ta.selectionStart = cpos;
obj_ta.selectionEnd = cpos;
obj_ta.scrollTop = st;
}
//----------------------------------------
// It's CRAPPY!
//----------------------------------------
else
{
if (isSingle)
{
isClose = true;
}
obj_ta.value += ibTag;
}
obj_ta.focus();
return isClose;
}
+14
View File
@@ -0,0 +1,14 @@
//------------------------------------------
// Invision Power Board v2.0
// Boards JS File
// (c) 2003 Invision Power Services, Inc.
//
// http://www.invisionboard.com
//------------------------------------------
function waitforme()
{
}
+108
View File
@@ -0,0 +1,108 @@
resetposition = function()
{
if ( document.getElementById )
{
var div = document.getElementById( divToCenter );
var divWidth = div.offsetWidth ? div.offsetWidth : div.style.width ? parseInt( div.style.width ) : 0;
var divHeight = div.offsetHeight ? div.offsetHeight : div.style.height ? parseInt( div.style.height ) : 0;
var sx = getwidth();
var sy = getheight();
var scrolly = getYscroll();
var setX = ( sx - divWidth ) / 2;
var setY = ( sy - divHeight) / 2 + scrolly;
if( setX < 0 ) setX = 0;
if( setY < 0 ) setY = 0;
div.style.left = setX + "px";
div.style.top = setY + "px";
div.style.visibility = "visible";
}
};
function getwidth()
{
var width = 0;
if( document.documentElement && document.documentElement.clientWidth )
{
width = document.documentElement.clientWidth;
}
else if( document.body && document.body.clientWidth )
{
width = document.body.clientWidth;
}
else if( window.innerWidth )
{
width = window.innerWidth - 18;
}
return width;
}
function getheight()
{
var height = 0;
if( document.documentElement && document.documentElement.clientHeight )
{
height = document.documentElement.clientHeight;
}
else if( document.body && document.body.clientHeight )
{
height = document.body.clientHeight;
}
else if( window.innerHeight )
{
height = window.innerHeight - 18;
}
return height;
}
function getXscroll()
{
var scrollX = 0;
if( document.documentElement && document.documentElement.scrollLeft )
{
scrollX = document.documentElement.scrollLeft;
}
else if( document.body && document.body.scrollLeft )
{
scrollX = document.body.scrollLeft;
}
else if( window.pageXOffset )
{
scrollX = window.pageXOffset;
}
else if( window.scrollX )
{
scrollX = window.scrollX;
}
return scrollX;
}
function getYscroll()
{
var scrollY = 0;
if( document.documentElement && document.documentElement.scrollTop )
{
scrollY = document.documentElement.scrollTop;
}
else if( document.body && document.body.scrollTop )
{
scrollY = document.body.scrollTop;
}
else if( window.pageYOffset )
{
scrollY = window.pageYOffset;
}
else if( window.scrollY )
{
scrollY = window.scrollY;
}
return scrollY;
}
+75
View File
@@ -0,0 +1,75 @@
//------------------------------------------
// Invision Power Board v2.0
// Find User JS File
// (c) 2004 Invision Power Services, Inc.
//
// http://www.invisionboard.com
//------------------------------------------
function add_to_form()
{
var name = document.finduser.username.options[document.finduser.username.selectedIndex].value;
if (separator == 'line')
{
separator = '\n';
}
if (separator == 'none')
{
separator = '';
}
if (entry == 'textarea')
{
// Where shall we put the separator?
var tbox = eval('opener.document.REPLIER.'+in_name+'.value');
var tboxSize = eval('opener.document.REPLIER.'+in_name+'.value.length');
// Remove leading spaces...
while ( tbox.slice(0,1) == " " )
{
tbox = tbox.substr(1, tboxSize - 1);
tboxSize = tboxSize;
}
// Remove trailing spaces...
while ( tbox.slice(tboxSize - 1, tboxSize) == " " )
{
tbox = tbox.substr(0, tboxSize - 1);
tboxSize = tboxSize;
}
// Do we have a leading comma?
while ( tbox.slice(0,1) == "\n" )
{
tbox = tbox.substr(1, tboxSize - 1);
tboxSize = tboxSize;
}
// Do we have a trailing comma?...
while ( tbox.slice(tboxSize - 1, tboxSize) == "\n" )
{
tbox = tbox.substr(0, tboxSize - 1);
tboxSize = tboxSize;
}
// First in box?
if ( tboxSize == 0)
{
eval('opener.document.REPLIER.'+in_name+'.value += name');
}
else
{
eval('opener.document.REPLIER.'+in_name+'.value += separator + name');
}
}
}
+109
View File
@@ -0,0 +1,109 @@
//------------------------------------------
// Invision Power Board v2.0
// Forums JS File
// (c) 2004 Invision Power Services, Inc.
//
// http://www.invisionboard.com
//------------------------------------------
//==========================================
// Who posted
//==========================================
function who_posted(tid)
{
window.open("index.php?act=Stats&CODE=who&t="+tid, "WhoPosted", "toolbar=no,scrollbars=yes,resizable=yes,width=230,height=300");
}
//==========================================
// Check delete
//==========================================
function checkdelete()
{
if ( ! document.modform.selectedtids.value )
{
return false;
}
isDelete = document.modform.tact.options[document.modform.tact.selectedIndex].value;
if (isDelete == 'delete')
{
formCheck = confirm( lang_suredelete );
if (formCheck == true)
{
return true;
}
else
{
return false;
}
}
}
//==========================================
// Toggle selection
//==========================================
function forum_toggle_tid( tid )
{
saved = new Array();
clean = new Array();
add = 1;
//-----------------------------------
// Get form info
//-----------------------------------
tmp = document.modform.selectedtids.value;
saved = tmp.split(",");
//-----------------------------------
// Remove bit if exists
//-----------------------------------
for( i = 0 ; i < saved.length; i++ )
{
if ( saved[i] != "" )
{
if ( saved[i] == tid )
{
add = 0;
}
else
{
clean[clean.length] = saved[i];
}
}
}
//-----------------------------------
// Add?
//-----------------------------------
if ( add )
{
clean[ clean.length ] = tid;
eval("document.img"+tid+".src=selectedbutton");
}
else
{
eval(" document.img"+tid+".src=unselectedbutton");
}
newvalue = clean.join(',');
my_setcookie( 'modtids', newvalue, 0 );
document.modform.selectedtids.value = newvalue;
newcount = stacksize(clean);
document.modform.gobutton.value = lang_gobutton + '(' + newcount + ')';
return false;
}
+415
View File
@@ -0,0 +1,415 @@
//------------------------------------------
// Invision Power Board v2.0
// Global JS File
// (c) 2003 Invision Power Services, Inc.
//
// http://www.invisionboard.com
//------------------------------------------
//==========================================
// Set up
//==========================================
// Sniffer based on http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
var uagent = navigator.userAgent.toLowerCase();
var is_safari = ( (uagent.indexOf('safari') != -1) || (navigator.vendor == "Apple Computer, Inc.") );
var is_ie = ( (uagent.indexOf('msie') != -1) && (!is_opera) && (!is_safari) && (!is_webtv) );
var is_ie4 = ( (is_ie) && (uagent.indexOf("msie 4.") != -1) );
var is_moz = (navigator.product == 'Gecko');
var is_ns = ( (uagent.indexOf('compatible') == -1) && (uagent.indexOf('mozilla') != -1) && (!is_opera) && (!is_webtv) && (!is_safari) );
var is_ns4 = ( (is_ns) && (parseInt(navigator.appVersion) == 4) );
var is_opera = (uagent.indexOf('opera') != -1);
var is_kon = (uagent.indexOf('konqueror') != -1);
var is_webtv = (uagent.indexOf('webtv') != -1);
var is_win = ( (uagent.indexOf("win") != -1) || (uagent.indexOf("16bit") !=- 1) );
var is_mac = ( (uagent.indexOf("mac") != -1) || (navigator.vendor == "Apple Computer, Inc.") );
var ua_vers = parseInt(navigator.appVersion);
//==========================================
// Get cookie
//==========================================
function my_getcookie( name )
{
cname = ipb_var_cookieid + name + '=';
cpos = document.cookie.indexOf( cname );
if ( cpos != -1 )
{
cstart = cpos + cname.length;
cend = document.cookie.indexOf(";", cstart);
if (cend == -1)
{
cend = document.cookie.length;
}
return unescape( document.cookie.substring(cstart, cend) );
}
return null;
}
//==========================================
// Set cookie
//==========================================
function my_setcookie( name, value, sticky )
{
expire = "";
domain = "";
path = "/";
if ( sticky )
{
expire = "; expires=Wed, 1 Jan 2020 00:00:00 GMT";
}
if ( ipb_var_cookie_domain != "" )
{
domain = '; domain=' + ipb_var_cookie_domain;
}
if ( ipb_var_cookie_path != "" )
{
path = ipb_var_cookie_path;
}
document.cookie = ipb_var_cookieid + name + "=" + value + "; path=" + path + expire + domain + ';';
}
//==========================================
// Pop up MyAssistant window
//==========================================
function buddy_pop()
{
window.open( ipb_var_base_url + 'act=buddy','BrowserBuddy','width=250,height=500,resizable=yes,scrollbars=yes');
}
//==========================================
// Pop up chat window
//==========================================
function chat_pop(cw,ch)
{
window.open( ipb_var_base_url + 'act=chat&pop=1','Chat','width='+cw+',height='+ch+',resizable=yes,scrollbars=yes');
}
//==========================================
// Multi Page jumps
//==========================================
function multi_page_jump( url_bit, total_posts, per_page )
{
pages = 1;
cur_st = ipb_var_st;
cur_page = 1;
if ( total_posts % per_page == 0 )
{
pages = total_posts / per_page;
}
else
{
pages = Math.ceil( total_posts / per_page );
}
msg = ipb_lang_tpl_q1 + " " + pages;
if ( cur_st > 0 )
{
cur_page = cur_st / per_page; cur_page = cur_page -1;
}
show_page = 1;
if ( cur_page < pages )
{
show_page = cur_page + 1;
}
if ( cur_page >= pages )
{
show_page = cur_page - 1;
}
else
{
show_page = cur_page + 1;
}
userPage = prompt( msg, show_page );
if ( userPage > 0 )
{
if ( userPage < 1 ) { userPage = 1; }
if ( userPage > pages ) { userPage = pages; }
if ( userPage == 1 ) { start = 0; }
else { start = (userPage - 1) * per_page; }
window.location = url_bit + "&st=" + start;
}
}
//==========================================
// Hide / Unhide menu elements
//==========================================
function ShowHide(id1, id2)
{
if (id1 != '') toggleview(id1);
if (id2 != '') toggleview(id2);
}
//==========================================
// Get element by id
//==========================================
function my_getbyid(id)
{
itm = null;
if (document.getElementById)
{
itm = document.getElementById(id);
}
else if (document.all)
{
itm = document.all[id];
}
else if (document.layers)
{
itm = document.layers[id];
}
return itm;
}
//==========================================
// Show/hide toggle
//==========================================
function toggleview(id)
{
if ( ! id ) return;
if ( itm = my_getbyid(id) )
{
if (itm.style.display == "none")
{
my_show_div(itm);
}
else
{
my_hide_div(itm);
}
}
}
//==========================================
// Set DIV ID to hide
//==========================================
function my_hide_div(itm)
{
if ( ! itm ) return;
itm.style.display = "none";
}
//==========================================
// Set DIV ID to show
//==========================================
function my_show_div(itm)
{
if ( ! itm ) return;
itm.style.display = "";
}
//==========================================
// Change cell colour
//==========================================
function change_cell_color( id, cl )
{
itm = my_getbyid(id);
if ( itm )
{
itm.className = cl;
}
}
//==========================================
// Toggle category
//==========================================
function togglecategory( fid, add )
{
saved = new Array();
clean = new Array();
//-----------------------------------
// Get any saved info
//-----------------------------------
if ( tmp = my_getcookie('collapseprefs') )
{
saved = tmp.split(",");
}
//-----------------------------------
// Remove bit if exists
//-----------------------------------
for( i = 0 ; i < saved.length; i++ )
{
if ( saved[i] != fid && saved[i] != "" )
{
clean[clean.length] = saved[i];
}
}
//-----------------------------------
// Add?
//-----------------------------------
if ( add )
{
clean[ clean.length ] = fid;
my_show_div( my_getbyid( 'fc_'+fid ) );
my_hide_div( my_getbyid( 'fo_'+fid ) );
}
else
{
my_show_div( my_getbyid( 'fo_'+fid ) );
my_hide_div( my_getbyid( 'fc_'+fid ) );
}
my_setcookie( 'collapseprefs', clean.join(','), 1 );
}
//==========================================
// locationjump
//==========================================
function locationjump(url)
{
window.location = ipb_var_base_url + url;
}
//==========================================
// CHOOSE SKIN
//==========================================
function chooseskin(obj)
{
choosebox = obj.options[obj.selectedIndex].value;
extravars = '';
if ( choosebox != -1 && ! isNaN( choosebox ) )
{
if ( document.skinselectorbox.skinurlbits.value )
{
extravars = '&' + document.skinselectorbox.skinurlbits.value;
}
locationjump( 'setskin=1&skinid=' + choosebox + extravars );
}
}
//==========================================
// CHOOSE LANG
//==========================================
function chooselang(obj)
{
choosebox = obj.options[obj.selectedIndex].value;
extravars = '';
if ( document.langselectorbox.langurlbits.value )
{
extravars = '&' + document.langselectorbox.langurlbits.value;
}
locationjump( 'setlanguage=1&langid=' + choosebox + extravars );
}
//==========================================
// pop up window
//==========================================
function PopUp(url, name, width,height,center,resize,scroll,posleft,postop)
{
showx = "";
showy = "";
if (posleft != 0) { X = posleft }
if (postop != 0) { Y = postop }
if (!scroll) { scroll = 1 }
if (!resize) { resize = 1 }
if ((parseInt (navigator.appVersion) >= 4 ) && (center))
{
X = (screen.width - width ) / 2;
Y = (screen.height - height) / 2;
}
if ( X > 0 )
{
showx = ',left='+X;
}
if ( Y > 0 )
{
showy = ',top='+Y;
}
if (scroll != 0) { scroll = 1 }
var Win = window.open( url, name, 'width='+width+',height='+height+ showx + showy + ',resizable='+resize+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no');
}
//==========================================
// Array: Get stack size
//==========================================
function stacksize(thearray)
{
for (i = 0 ; i < thearray.length; i++ )
{
if ( (thearray[i] == "") || (thearray[i] == null) || (thearray == 'undefined') )
{
return i;
}
}
return thearray.length;
}
//==========================================
// Array: Push stack
//==========================================
function pushstack(thearray, newval)
{
arraysize = stacksize(thearray);
thearray[arraysize] = newval;
}
//==========================================
// Array: Pop stack
//==========================================
function popstack(thearray)
{
arraysize = stacksize(thearray);
theval = thearray[arraysize - 1];
delete thearray[arraysize - 1];
return theval;
}
+178
View File
@@ -0,0 +1,178 @@
//------------------------------------------
// Invision Power Board v2.0
// PM JS File
// (c) 2003 Invision Power Services, Inc.
//
// http://www.invisionboard.com
//------------------------------------------
//==========================================
// Check All boxes
//==========================================
function CheckAll(fmobj)
{
for (var i=0;i<fmobj.elements.length;i++)
{
var e = fmobj.elements[i];
if ((e.name != 'allbox') && (e.type=='checkbox') && (!e.disabled))
{
e.checked = fmobj.allbox.checked;
}
}
}
//==========================================
// Check all or uncheck all?
//==========================================
function CheckCheckAll(fmobj)
{
var TotalBoxes = 0;
var TotalOn = 0;
for (var i=0;i<fmobj.elements.length;i++)
{
var e = fmobj.elements[i];
if ((e.name != 'allbox') && (e.type=='checkbox'))
{
TotalBoxes++;
if (e.checked)
{
TotalOn++;
}
}
}
if (TotalBoxes==TotalOn)
{
fmobj.allbox.checked=true;
}
else
{
fmobj.allbox.checked=false;
}
}
//==========================================
// INBOX FUNCTIONS
//==========================================
var ie = document.all ? 1 : 0;
//var ns4 = document.layers ? 1 : 0;
//==========================================
// highlite
//==========================================
function hl(cb)
{
if (ie)
{
while (cb.tagName != "TR")
{
cb = cb.parentElement;
}
}
else
{
while (cb.tagName != "TD")
{
cb = cb.parentNode;
}
}
cb.className = 'row1';
}
//==========================================
// down-lite
//==========================================
function dl(cb)
{
if (ie)
{
while (cb.tagName != "TR")
{
cb = cb.parentElement;
}
}
else
{
while (cb.tagName != "TD")
{
cb = cb.parentNode;
}
}
cb.className = 'row2';
}
//==========================================
// Boxes checked?
//==========================================
function cca(cb)
{
if (cb.checked)
{
hl(cb);
}
else
{
dl(cb);
}
}
//==========================================
// Inbox check all
//==========================================
function InboxCheckAll(cb)
{
var fmobj = document.mutliact;
for (var i=0;i<fmobj.elements.length;i++)
{
var e = fmobj.elements[i];
if ((e.name != 'allbox') && (e.type=='checkbox') && (!e.disabled))
{
e.checked = fmobj.allbox.checked;
if (fmobj.allbox.checked)
{
hl(e);
}
else
{
dl(e);
}
}
}
}
function select_read()
{
var fmobj = document.mutliact;
for (var i=0;i<fmobj.elements.length;i++)
{
var e = fmobj.elements[i];
if ((e.type=='hidden') && (e.value == 1) && (! isNaN(e.name) ))
{
eval("fmobj.msgid_" + e.name + ".checked=true;");
hl(e);
}
}
}
function unselect_all()
{
var fmobj = document.mutliact;
for (var i=0;i<fmobj.elements.length;i++)
{
var e = fmobj.elements[i];
if (e.type=='checkbox')
{
e.checked=false;
dl(e);
}
}
}
+40
View File
@@ -0,0 +1,40 @@
//------------------------------------------
// Invision Power Board v2.0
// Register JS File
// (c) 2004 Invision Power Services, Inc.
//
// http://www.invisionboard.com
//------------------------------------------
function Validate()
{
//------------------------------------------
// Check for Empty fields
//------------------------------------------
if (document.REG.UserName.value == "" || document.REG.PassWord.value == "" || document.REG.PassWord_Check.value == "" || document.REG.EmailAddress.value == "")
{
alert ( ipb_lang_js_blanks );
return false;
}
}
function get_more_info()
{
var chosenid = document.REG.subspackage.options[document.REG.subspackage.selectedIndex].value;
if ( ! chosenid )
{
chosenid = 0;
}
//------------------------------------------
// Toggle view...
//------------------------------------------
eval("document.REG.pkdesc.value=subsdesc_"+chosenid);
toggleview('subspkdiv');
}
+192
View File
@@ -0,0 +1,192 @@
//------------------------------------------
// Invision Power Board v2.0
// Topics JS File
// (c) 2003 Invision Power Services, Inc.
//
// http://www.invisionboard.com
//------------------------------------------
//==========================================
// Link to a post
//==========================================
function link_to_post(pid)
{
temp = prompt( ipb_lang_tt_prompt, ipb_var_base_url + "showtopic=" + ipb_input_t + "&view=findpost&p=" + pid );
return false;
}
//==========================================
// Delete post
//==========================================
function delete_post(theURL)
{
if (confirm( ipb_lang_js_del_1 ))
{
window.location.href=theURL;
}
else
{
alert ( ipb_lang_js_del_2 );
}
}
//==========================================
// Multi quote
//==========================================
function multiquote_add(id)
{
saved = new Array();
clean = new Array();
add = 1;
//-----------------------------------
// Get any saved info
//-----------------------------------
if ( tmp = my_getcookie('mqtids') )
{
saved = tmp.split(",");
}
//-----------------------------------
// Remove bit if exists
//-----------------------------------
for( i = 0 ; i < saved.length; i++ )
{
if ( saved[i] != "" )
{
if ( saved[i] == id )
{
add = 0;
}
else
{
clean[clean.length] = saved[i];
}
}
}
//-----------------------------------
// Add?
//-----------------------------------
if ( add )
{
clean[ clean.length ] = id;
eval("document.mad_"+id+".src=removequotebutton");
}
else
{
eval(" document.mad_"+id+".src=addquotebutton");
}
my_setcookie( 'mqtids', clean.join(','), 0 );
return false;
}
//==========================================
// Check delete
//==========================================
function checkdelete()
{
if ( ! document.modform.selectedpids.value )
{
return false;
}
isDelete = document.modform.tact.options[document.modform.tact.selectedIndex].value;
if (isDelete == 'delete')
{
formCheck = confirm( lang_suredelete );
if (formCheck == true)
{
return true;
}
else
{
return false;
}
}
}
//==========================================
// Toggle selection
//==========================================
function topic_toggle_pid( pid )
{
//-----------------------------------
// Got a number?
//-----------------------------------
if ( isNaN( pid ) )
{
return false;
}
saved = new Array();
clean = new Array();
add = 1;
//-----------------------------------
// Get form info
//-----------------------------------
tmp = document.modform.selectedpids.value;
saved = tmp.split(",");
//-----------------------------------
// Remove bit if exists
//-----------------------------------
for( i = 0 ; i < saved.length; i++ )
{
if ( saved[i] != "" )
{
if ( saved[i] == pid )
{
add = 0;
}
else
{
clean[clean.length] = saved[i];
}
}
}
//-----------------------------------
// Add?
//-----------------------------------
if ( add )
{
clean[ clean.length ] = pid;
eval("document.img"+pid+".src=selectedbutton");
}
else
{
eval(" document.img"+pid+".src=unselectedbutton");
}
newvalue = clean.join(',');
my_setcookie( 'modpids', newvalue, 0 );
document.modform.selectedpids.value = newvalue;
newcount = stacksize(clean);
document.modform.gobutton.value = lang_gobutton + ' (' + newcount + ')';
return false;
}