Version 2.2.2
This commit is contained in:
1 parent
22f1b963ee
commit
a3bb603c96
858 files changed
+479463
-188140
No files matched your search
@@ -1,447 +0,0 @@
|
||||
//--------------------------------------------
|
||||
// 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, jsfile_myweb_lang);
|
||||
|
||||
if (!enterURL) {
|
||||
FoundErrors += " " + error_no_url;
|
||||
}
|
||||
if (!enterTITLE) {
|
||||
FoundErrors += " " + error_no_title;
|
||||
}
|
||||
|
||||
if (FoundErrors) {
|
||||
alert(jsfile_error_lang + 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(jsfile_error_lang + 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;
|
||||
}
|
||||
@@ -1,328 +0,0 @@
|
||||
//------------------------------------------
|
||||
// Invision Power Board v2
|
||||
// Text Editor Global Functions
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
//
|
||||
// http://www.invisionboard.com
|
||||
//------------------------------------------
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
var dontpassgo = 0;
|
||||
|
||||
//-------------------------------
|
||||
// Keep an array of open tags
|
||||
//-------------------------------
|
||||
|
||||
var bbtags = new Array();
|
||||
|
||||
//-------------------------------
|
||||
// Define font faces
|
||||
//-------------------------------
|
||||
|
||||
var ips_primary_fonts = new Array(
|
||||
"arial",
|
||||
"arial black",
|
||||
"arial narrow",
|
||||
"book antiqua",
|
||||
"century gothic",
|
||||
"comic sans ms",
|
||||
"courier new",
|
||||
"fixedsys",
|
||||
"franklin gothic medium",
|
||||
"garamond",
|
||||
"georgia",
|
||||
"impact",
|
||||
"lucida console",
|
||||
"lucida sans unicode",
|
||||
"microsoft sans serif",
|
||||
"palatino linotype",
|
||||
"system",
|
||||
"tahoma",
|
||||
"times new roman",
|
||||
"trebuchet ms",
|
||||
"verdana"
|
||||
);
|
||||
|
||||
//-------------------------------
|
||||
// Remap font sizes
|
||||
//-------------------------------
|
||||
|
||||
var ips_fontsizes =
|
||||
{
|
||||
'8px' : 1,
|
||||
'10pt' : 2,
|
||||
'12pt' : 3,
|
||||
'14pt' : 4,
|
||||
'18pt' : 5,
|
||||
'24pt' : 6,
|
||||
'36pt' : 7
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Define sizes
|
||||
//-------------------------------
|
||||
|
||||
var ips_font_sizes = new Array( 1, 2, 3, 4, 5, 6, 7 );
|
||||
|
||||
//-------------------------------
|
||||
// Reverse them so we can look up
|
||||
// by ID
|
||||
//-------------------------------
|
||||
|
||||
var ips_reverse_primary_fonts = new Array();
|
||||
var ips_reverse_font_sizes = new Array();
|
||||
var ips_reverse_fontsizes = new Array();
|
||||
|
||||
for( var i in ips_primary_fonts )
|
||||
{
|
||||
ips_reverse_primary_fonts[ ips_primary_fonts[i] ] = i;
|
||||
}
|
||||
|
||||
for( var i in ips_font_sizes )
|
||||
{
|
||||
ips_reverse_font_sizes[ ips_font_sizes[i] ] = i;
|
||||
}
|
||||
|
||||
for( var i in ips_fontsizes )
|
||||
{
|
||||
ips_reverse_fontsizes[ ips_fontsizes[i] ] = i;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Close all tags
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function closeall()
|
||||
{
|
||||
if ( bbtags[0] )
|
||||
{
|
||||
while ( bbtags[0] )
|
||||
{
|
||||
tagRemove = popstack( bbtags )
|
||||
postformobj.Post.value += "[/" + tagRemove + "]";
|
||||
|
||||
if ( i_am == 'std' )
|
||||
{
|
||||
toggle_button( tagRemove );
|
||||
}
|
||||
else
|
||||
{
|
||||
rte_button_update( tagRemove );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
// Ensure we got them all
|
||||
//--------------------------------------------
|
||||
|
||||
bbtags = new Array();
|
||||
postformobj.Post.focus();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Close all nested tags
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function smart_close_tags( thetag )
|
||||
{
|
||||
//--------------------------------------------
|
||||
// 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);
|
||||
|
||||
wrap_tags("[/" + tagRemove + "]", "")
|
||||
|
||||
//--------------------------------------------
|
||||
// Change the button status
|
||||
//--------------------------------------------
|
||||
|
||||
if ( i_am == 'std' )
|
||||
{
|
||||
toggle_button( tagRemove );
|
||||
}
|
||||
else
|
||||
{
|
||||
rte_button_update( tagRemove );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Write font face box
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function write_fontface_box()
|
||||
{
|
||||
html = "";
|
||||
|
||||
for( var i in ips_primary_fonts )
|
||||
{
|
||||
option = ips_primary_fonts[i];
|
||||
display = ips_primary_fonts[i];
|
||||
|
||||
//-------------------------------
|
||||
// Tidy up show name
|
||||
// Make "courier new" "Courier New"
|
||||
//-------------------------------
|
||||
|
||||
var tmp = display.split( " " );
|
||||
var rtn = new Array;
|
||||
|
||||
for ( var id in tmp )
|
||||
{
|
||||
rtn[id] = tmp[id].substr(0, 1).toUpperCase() + tmp[id].substr(1);
|
||||
}
|
||||
|
||||
display = rtn.join( " " );
|
||||
|
||||
html += "\n<option style='font-family:" + display + "' value='" + display + "'>" + display + "</option>";
|
||||
}
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Write font size box
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function write_fontsize_box()
|
||||
{
|
||||
html = "";
|
||||
|
||||
for( var i in ips_font_sizes )
|
||||
{
|
||||
option = ips_font_sizes[i];
|
||||
display = ips_font_sizes[i];
|
||||
|
||||
html += "\n<option value='" + display + "'>" + display + "</option>";
|
||||
}
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT Editor
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function init_editor()
|
||||
{
|
||||
if ( ! postformid )
|
||||
{
|
||||
postformid = 'postingform';
|
||||
}
|
||||
|
||||
if ( ! postfieldid )
|
||||
{
|
||||
postfieldid = 'postcontent';
|
||||
}
|
||||
|
||||
postformobj = document.getElementById( postformid );
|
||||
postfieldobj = document.getElementById( postfieldid );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Remove an attachment
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function removeattach(id)
|
||||
{
|
||||
if ( id != "" )
|
||||
{
|
||||
Override = 1;
|
||||
postformobj.removeattachid.value = id;
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Insert attachment tag
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function insert_attach_to_textarea(aid)
|
||||
{
|
||||
rtewindow.focus();
|
||||
|
||||
wrap_tags( "[attachmentid="+aid+"]", "" );
|
||||
|
||||
rtewindow.focus();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Open emoticon window
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
var emowindow = '';
|
||||
|
||||
function emo_pop()
|
||||
{
|
||||
emowindow = window.open( ipb_var_base_url + "act=legends&CODE=emoticons","Legends","width=250,height=500,resizable=yes,scrollbars=yes");
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// BBCode window
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function bbc_pop()
|
||||
{
|
||||
window.open( ipb_var_base_url + "act=legends&CODE=bbcode","Legends","width=700,height=500,resizable=yes,scrollbars=yes");
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Fix the amount of digging parents up.
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function getOffsetTop(elm)
|
||||
{
|
||||
var mOffsetTop = elm.offsetTop;
|
||||
var mOffsetParent = elm.offsetParent;
|
||||
var parents_up = 2;
|
||||
|
||||
while(parents_up > 0)
|
||||
{
|
||||
mOffsetTop += mOffsetParent.offsetTop;
|
||||
mOffsetParent = mOffsetParent.offsetParent;
|
||||
parents_up--;
|
||||
}
|
||||
|
||||
return mOffsetTop;
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Fix the amount of digging parents up.
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function getOffsetLeft(elm)
|
||||
{
|
||||
var mOffsetLeft = elm.offsetLeft;
|
||||
var mOffsetParent = elm.offsetParent;
|
||||
var parents_up = 2;
|
||||
|
||||
while(parents_up > 0)
|
||||
{
|
||||
mOffsetLeft += mOffsetParent.offsetLeft;
|
||||
mOffsetParent = mOffsetParent.offsetParent;
|
||||
parents_up--;
|
||||
}
|
||||
|
||||
return mOffsetLeft;
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,934 +0,0 @@
|
||||
//------------------------------------------
|
||||
// Invision Power Board v2
|
||||
// STD Editor Functions
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
//
|
||||
// http://www.invisionboard.com
|
||||
// SHOULD BE CALLED AFTER ipb_editor.js
|
||||
//------------------------------------------
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
var i_am = 'std';
|
||||
var rtewindow;
|
||||
var buttonbar;
|
||||
|
||||
var opentags =
|
||||
{
|
||||
'b' : 0,
|
||||
'i' : 0,
|
||||
's' : 0,
|
||||
'u' : 0,
|
||||
'img' : 0,
|
||||
'quote' : 0,
|
||||
'left' : 0,
|
||||
'center' : 0,
|
||||
'right' : 0,
|
||||
'color' : 0,
|
||||
'background' : 0,
|
||||
'indent' : 0,
|
||||
'code' : 0
|
||||
};
|
||||
|
||||
var tags_to_div =
|
||||
{
|
||||
'b' : 'do_bold',
|
||||
'i' : 'do_italic',
|
||||
's' : 'do_strikethrough',
|
||||
'u' : 'do_underline',
|
||||
'quote' : 'do_quote',
|
||||
'left' : 'do_justifyleft',
|
||||
'center' : 'do_justifycenter',
|
||||
'right' : 'do_justifyright',
|
||||
'color' : 'forecolor',
|
||||
'background' : 'hilitecolor',
|
||||
'indent' : 'do_indent',
|
||||
'code' : 'do_code'
|
||||
};
|
||||
|
||||
var rte_to_std =
|
||||
{
|
||||
'forecolor' : 'color',
|
||||
'hilitecolor' : 'background'
|
||||
};
|
||||
|
||||
var easymode = 0;
|
||||
|
||||
// IE bug fix
|
||||
var ie_range_cache = '';
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function init_std_editor()
|
||||
{
|
||||
//--------------------------------------------
|
||||
// Pull in width of textarea
|
||||
//--------------------------------------------
|
||||
|
||||
try
|
||||
{
|
||||
rtewindow = document.getElementById( 'postcontent' );
|
||||
oldwidth = parseInt(document.getElementById( 'postcontent' ).style.width);
|
||||
buttonbar = document.getElementById( 'std-table-buttons' );
|
||||
widthunit = document.getElementById( 'postcontent' ).style.width.match( /%/ ) ? '%' : 'px';
|
||||
|
||||
if ( widthunit == 'px' )
|
||||
{
|
||||
if ( is_opera )
|
||||
{
|
||||
document.getElementById( 'postcontent' ).style.width = oldwidth - 4 + widthunit;
|
||||
buttonbar.style.width = parseInt( buttonbar.style.width ) - 4 + widthunit;
|
||||
}
|
||||
else if ( is_safari )
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById( 'postcontent' ).style.width = oldwidth - 6 + widthunit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( is_ie || is_moz )
|
||||
{
|
||||
document.getElementById( 'postcontent' ).style.width = oldwidth - 1 + widthunit;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(e)
|
||||
{}
|
||||
|
||||
cvalue = my_getcookie( "bbmode" );
|
||||
|
||||
if ( cvalue == 1 )
|
||||
{
|
||||
document.getElementById('togglebbmode').value = js_bbeasy_on;
|
||||
easymode = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById('togglebbmode').value = js_bbeasy_off;
|
||||
easymode = 0;
|
||||
}
|
||||
|
||||
|
||||
faceobj = document.getElementById('fontface');
|
||||
faceregex = /\<\!--FONTFACE--\>/gi;
|
||||
facecontent = faceobj.innerHTML.replace( faceregex, write_fontface_box() );
|
||||
faceobj.innerHTML = facecontent;
|
||||
|
||||
sizeobj = document.getElementById('fontsize');
|
||||
sizeregex = /\<\!--FONTSIZE--\>/gi;
|
||||
sizecontent = sizeobj.innerHTML.replace( sizeregex, write_fontsize_box() );
|
||||
sizeobj.innerHTML = sizecontent;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Toggle button highlighting (used when clicked on)
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function toggle_button( tag )
|
||||
{
|
||||
//--------------------------------------------
|
||||
// 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 ( (tag == 'font') || (tag == 'size') )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( opentags[ tag ] )
|
||||
{
|
||||
document.getElementById( tags_to_div[ tag ] ).className = 'rteimage';
|
||||
|
||||
// Turn off
|
||||
opentags[ tag ] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById( tags_to_div[ tag ] ).className = 'rteImageRaised';
|
||||
|
||||
// Turn on
|
||||
opentags[ tag ] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Set BBCode mode
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function toggle_bbmode(mVal)
|
||||
{
|
||||
if ( easymode )
|
||||
{
|
||||
document.getElementById('togglebbmode').value = js_bbeasy_off;
|
||||
easymode = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById('togglebbmode').value = js_bbeasy_on;
|
||||
easymode = 1;
|
||||
}
|
||||
|
||||
my_setcookie( 'bbmode', easymode, 1 );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Get easy mode state
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function get_easy_mode_state()
|
||||
{
|
||||
//--------------------------------------------
|
||||
// Returns true if we've chosen easy mode
|
||||
//--------------------------------------------
|
||||
|
||||
if ( easymode )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Pop open and set up the color palette
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function popcolor( command )
|
||||
{
|
||||
//-------------------------------
|
||||
// Already open?
|
||||
//-------------------------------
|
||||
|
||||
if ( opentags[ rte_to_std[ command ] ] )
|
||||
{
|
||||
//--------------------------------------------
|
||||
// Smart close tags
|
||||
//--------------------------------------------
|
||||
|
||||
smart_close_tags( rte_to_std[ command ] );
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//-------------------------------
|
||||
// Save current values
|
||||
//-------------------------------
|
||||
|
||||
parent.command = command;
|
||||
|
||||
if ( is_ie )
|
||||
{
|
||||
postfieldobj.focus();
|
||||
ie_range_cache = document.selection.createRange();
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Position and show color palette
|
||||
//-------------------------------
|
||||
|
||||
buttonElement = document.getElementById(command);
|
||||
|
||||
var iLeftPos = getOffsetLeft(buttonElement);
|
||||
var iTopPos = getOffsetTop(buttonElement) + (buttonElement.offsetHeight + 30);
|
||||
|
||||
document.getElementById('cp').style.left = (iLeftPos) + "px";
|
||||
document.getElementById('cp').style.top = (iTopPos) + "px";
|
||||
|
||||
if (document.getElementById('cp').style.visibility == "hidden")
|
||||
{
|
||||
document.getElementById('cp').style.visibility = "visible";
|
||||
document.getElementById('cp').style.display = "inline";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById('cp').style.visibility = "hidden";
|
||||
document.getElementById('cp').style.display = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Write the color
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function setColor(color)
|
||||
{
|
||||
var parentCommand = parent.command;
|
||||
|
||||
if ( parentCommand == "hilitecolor" )
|
||||
{
|
||||
if ( wrap_tags("[background=" +color+ "]", "[/background]", true ) )
|
||||
{
|
||||
toggle_button( "background" );
|
||||
pushstack(bbtags, "background");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( wrap_tags("[color=" +color+ "]", "[/color]", true ) )
|
||||
{
|
||||
toggle_button( "color" );
|
||||
pushstack(bbtags, "color");
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('cp').style.visibility = "hidden";
|
||||
document.getElementById('cp').style.display = "none";
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// EMOTICONS
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function emoticon(theSmilie)
|
||||
{
|
||||
doInsert(" " + theSmilie + " ", "", false);
|
||||
|
||||
if ( (ua_vers >= 4) && is_ie && is_win && emowindow != '' && emowindow != 'undefined' )
|
||||
{
|
||||
emowindow.focus();
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// ALTER FONT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function alterfont(theval, thetag)
|
||||
{
|
||||
if (theval == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( wrap_tags("[" + thetag + "=" + theval + "]", "[/" + thetag + "]", true ) )
|
||||
{
|
||||
pushstack(bbtags, thetag);
|
||||
}
|
||||
|
||||
postformobj.ffont.selectedIndex = 0;
|
||||
postformobj.fsize.selectedIndex = 0;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// SIMPLE TAGS (such as B, I S U, etc)
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function simpletag(thetag)
|
||||
{
|
||||
var tagOpen = opentags[ thetag ];
|
||||
|
||||
if ( get_easy_mode_state() )
|
||||
{
|
||||
inserttext = prompt(prompt_start + "\n[" + thetag + "]xxx[/" + thetag + "]");
|
||||
|
||||
if ( (inserttext != null) && (inserttext != "") )
|
||||
{
|
||||
wrap_tags("[" + thetag + "]" + inserttext + "[/" + thetag + "] ", "", false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( tagOpen == 0 )
|
||||
{
|
||||
if ( wrap_tags("[" + thetag + "]", "[/" + thetag + "]", true ) )
|
||||
{
|
||||
//--------------------------------------------
|
||||
// Toggle
|
||||
//--------------------------------------------
|
||||
|
||||
toggle_button( thetag );
|
||||
|
||||
pushstack(bbtags, thetag);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//--------------------------------------------
|
||||
// Smart close tags
|
||||
//--------------------------------------------
|
||||
|
||||
smart_close_tags( thetag );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// List tag
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function tag_list( type )
|
||||
{
|
||||
var listvalue = "init";
|
||||
var thelist = "";
|
||||
|
||||
opentag = ( type == 'ordered' ) ? '[list=1]' : '[list]';
|
||||
|
||||
while ( (listvalue != "") && (listvalue != null) )
|
||||
{
|
||||
listvalue = prompt(list_prompt, "");
|
||||
|
||||
if ( (listvalue != "") && (listvalue != null) )
|
||||
{
|
||||
thelist = thelist+"[*]"+listvalue+"\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ( thelist != "" )
|
||||
{
|
||||
wrap_tags( opentag + "\n" + thelist + "[/list]\n", "");
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// URL tag
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function tag_url()
|
||||
{
|
||||
var FoundErrors = '';
|
||||
|
||||
//----------------------------------------
|
||||
// Do we have ranged text?
|
||||
//----------------------------------------
|
||||
|
||||
if ( check_range() )
|
||||
{
|
||||
//----------------------------------------
|
||||
// Yes, just ask for the URL and wrap
|
||||
//----------------------------------------
|
||||
|
||||
var enterURL = prompt(text_enter_url, "http://");
|
||||
|
||||
if ( ! enterURL)
|
||||
{
|
||||
alert(error_no_url);
|
||||
return;
|
||||
}
|
||||
|
||||
wrap_tags( "[url="+enterURL+"]", "[/url]", "" );
|
||||
}
|
||||
else
|
||||
{
|
||||
var enterURL = prompt(text_enter_url, "http://");
|
||||
var enterTITLE = prompt(text_enter_url_name, jsfile_myweb_lang );
|
||||
|
||||
if ( ! enterURL)
|
||||
{
|
||||
FoundErrors += " " + error_no_url;
|
||||
}
|
||||
if ( ! enterTITLE)
|
||||
{
|
||||
FoundErrors += " " + error_no_title;
|
||||
}
|
||||
|
||||
if ( FoundErrors )
|
||||
{
|
||||
alert( jsfile_error_lang +FoundErrors);
|
||||
return;
|
||||
}
|
||||
|
||||
wrap_tags("[url="+enterURL+"]"+enterTITLE+"[/url]", "");
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Image tag
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function tag_image()
|
||||
{
|
||||
var FoundErrors = '';
|
||||
|
||||
//----------------------------------------
|
||||
// Do we have ranged text?
|
||||
//----------------------------------------
|
||||
|
||||
if ( check_range() )
|
||||
{
|
||||
//----------------------------------------
|
||||
// Yes, just wrap text
|
||||
//----------------------------------------
|
||||
|
||||
wrap_tags( "[img]", "[/img]", "" );
|
||||
}
|
||||
else
|
||||
{
|
||||
var enterURL = prompt(text_enter_image, "http://");
|
||||
|
||||
if ( ! enterURL )
|
||||
{
|
||||
alert(error_no_url);
|
||||
return;
|
||||
}
|
||||
|
||||
wrap_tags("[img]"+enterURL+"[/img]", "");
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Email tag
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function tag_email()
|
||||
{
|
||||
//----------------------------------------
|
||||
// Do we have ranged text?
|
||||
//----------------------------------------
|
||||
|
||||
if ( check_range() )
|
||||
{
|
||||
//----------------------------------------
|
||||
// Yes, just wrap text
|
||||
//----------------------------------------
|
||||
|
||||
wrap_tags( "[email]", "[/email]", "" );
|
||||
}
|
||||
else
|
||||
{
|
||||
var emailAddress = prompt(text_enter_email, "");
|
||||
|
||||
if ( ! emailAddress )
|
||||
{
|
||||
alert(error_no_email);
|
||||
return;
|
||||
}
|
||||
|
||||
wrap_tags( "[email]"+emailAddress+"[/email]", "" );
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Do we have ranged text?
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function check_range()
|
||||
{
|
||||
var has_range = false;
|
||||
|
||||
//----------------------------------------
|
||||
// It's IE!
|
||||
//----------------------------------------
|
||||
|
||||
if ( (ua_vers >= 4) && is_ie && is_win )
|
||||
{
|
||||
var sel = document.selection;
|
||||
var rng = sel.createRange();
|
||||
rng.colapse;
|
||||
|
||||
if ( (sel.type == "Text" || sel.type == "None") && rng != null )
|
||||
{
|
||||
if ( rng.text.length > 0)
|
||||
{
|
||||
has_range = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
// It's MOZZY!
|
||||
//----------------------------------------
|
||||
|
||||
else if ( postfieldobj.selectionEnd )
|
||||
{
|
||||
var ss = postfieldobj.selectionStart;
|
||||
var st = postfieldobj.scrollTop;
|
||||
var es = postfieldobj.selectionEnd;
|
||||
|
||||
if (es <= 2)
|
||||
{
|
||||
es = postfieldobj.textLength;
|
||||
}
|
||||
|
||||
var start = (postfieldobj.value).substring(0, ss);
|
||||
var middle = (postfieldobj.value).substring(ss, es);
|
||||
var end = (postfieldobj.value).substring(es, postfieldobj.textLength);
|
||||
|
||||
//-----------------------------------
|
||||
// text range?
|
||||
//-----------------------------------
|
||||
|
||||
if (postfieldobj.selectionEnd - postfieldobj.selectionStart > 0)
|
||||
{
|
||||
has_range = true;
|
||||
}
|
||||
}
|
||||
|
||||
return has_range;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Check message length
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function check_length()
|
||||
{
|
||||
MessageLength = postfieldobj.value.length;
|
||||
message = "";
|
||||
|
||||
if (MessageMax > 0)
|
||||
{
|
||||
message = js_post + ": " + js_max_length + " " + MessageMax + " " + js_characters +".";
|
||||
}
|
||||
else
|
||||
{
|
||||
message = "";
|
||||
}
|
||||
|
||||
alert(message + " " + js_used + " " + MessageLength + " " + js_characters + ".");
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// GENERAL INSERT FUNCTION
|
||||
// opentext : opening tag
|
||||
// closetext: closing tag, used if we have selected text
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function wrap_tags(opentext, closetext, issingle)
|
||||
{
|
||||
var has_closed = false;
|
||||
|
||||
if ( ! issingle )
|
||||
{
|
||||
issingle = false;
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
// It's IE!
|
||||
//----------------------------------------
|
||||
|
||||
if ( (ua_vers >= 4) && is_ie && is_win )
|
||||
{
|
||||
if ( postfieldobj.isTextEdit )
|
||||
{
|
||||
postfieldobj.focus();
|
||||
|
||||
var sel = document.selection;
|
||||
|
||||
var rng = ie_range_cache ? ie_range_cache : sel.createRange();
|
||||
|
||||
var stored_range = rng.duplicate()
|
||||
stored_range.moveToElementText( postfieldobj );
|
||||
stored_range.setEndPoint( 'EndToEnd', rng );
|
||||
|
||||
// Stores start position of text selection
|
||||
postfieldobj.selectionStart = stored_range.text.length - rng.text.length;
|
||||
// Stores end position of text selection
|
||||
postfieldobj.selectionEnd = postfieldobj.selectionStart + rng.text.length;
|
||||
|
||||
rng.colapse;
|
||||
|
||||
if ( (sel.type == "Text" || sel.type == "None") && rng != null)
|
||||
{
|
||||
if (closetext != "" && rng.text && rng.text.length > 0)
|
||||
{
|
||||
opentext += rng.text + closetext;
|
||||
}
|
||||
else if ( issingle )
|
||||
{
|
||||
has_closed = true;
|
||||
}
|
||||
|
||||
rng.text = rng.text.charAt(rng.text.length - 1) == ' ' ? opentext + ' ' : opentext;
|
||||
}
|
||||
else
|
||||
{
|
||||
postfieldobj.value += opentext;
|
||||
has_closed = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
postfieldobj.value += opentext;
|
||||
has_closed = true;
|
||||
}
|
||||
|
||||
ie_range_cache = null;
|
||||
|
||||
rng.select();
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
// It's MOZZY!
|
||||
//----------------------------------------
|
||||
|
||||
else if ( postfieldobj.selectionEnd )
|
||||
{
|
||||
var ss = postfieldobj.selectionStart;
|
||||
var st = postfieldobj.scrollTop;
|
||||
var es = postfieldobj.selectionEnd;
|
||||
|
||||
if (es <= 0)
|
||||
{
|
||||
es = postfieldobj.textLength;
|
||||
}
|
||||
|
||||
var start = (postfieldobj.value).substring(0, ss);
|
||||
var middle = (postfieldobj.value).substring(ss, es);
|
||||
var end = (postfieldobj.value).substring(es, postfieldobj.textLength);
|
||||
|
||||
//-----------------------------------
|
||||
// text range?
|
||||
//-----------------------------------
|
||||
|
||||
if ( postfieldobj.selectionEnd - postfieldobj.selectionStart > 0 )
|
||||
{
|
||||
middle = opentext + middle + closetext;
|
||||
}
|
||||
else
|
||||
{
|
||||
middle = opentext + middle;
|
||||
|
||||
if ( issingle )
|
||||
{
|
||||
has_closed = true;
|
||||
}
|
||||
}
|
||||
|
||||
postfieldobj.value = start + middle + end;
|
||||
|
||||
var cpos = ss + (middle.length);
|
||||
|
||||
postfieldobj.selectionStart = cpos;
|
||||
postfieldobj.selectionEnd = cpos;
|
||||
postfieldobj.scrollTop = st;
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
// It's CRAPPY!
|
||||
//----------------------------------------
|
||||
|
||||
else
|
||||
{
|
||||
if ( issingle )
|
||||
{
|
||||
has_closed = false;
|
||||
}
|
||||
|
||||
postfieldobj.value += opentext + ' ' + closetext;
|
||||
}
|
||||
|
||||
postfieldobj.focus();
|
||||
|
||||
return has_closed;
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Make current STD window (n)px bigger
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function std_window_resize( pix )
|
||||
{
|
||||
var box = postfieldobj;
|
||||
var cur_height = parseInt( box.style.height ) ? parseInt( box.style.height ) : 300;
|
||||
var new_height = cur_height + pix;
|
||||
|
||||
if ( new_height > 0 )
|
||||
{
|
||||
box.style.height = new_height + "px";
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Validate form (must always have this method defined!)
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function ValidateForm( isMsg )
|
||||
{
|
||||
MessageLength = postfieldobj.value.length;
|
||||
errors = "";
|
||||
|
||||
//-----------------------------------------
|
||||
// Check for remove attachments
|
||||
//-----------------------------------------
|
||||
|
||||
try
|
||||
{
|
||||
if ( postformobj.removeattachid.value > 0 )
|
||||
{
|
||||
okdelete = confirm( js_remove_attach );
|
||||
|
||||
if ( okdelete == true )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
postformobj.removeattachid.value = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(error)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
if ( isMsg == 1)
|
||||
{
|
||||
if ( postformobj.msg_title.value.length < 2 )
|
||||
{
|
||||
errors = js_msg_no_title;
|
||||
}
|
||||
}
|
||||
|
||||
if ( MessageLength < 2 )
|
||||
{
|
||||
errors = js_no_message;
|
||||
}
|
||||
|
||||
if ( MessageMax !=0 )
|
||||
{
|
||||
if (MessageLength > MessageMax)
|
||||
{
|
||||
errors = js_max_length + " " + MessageMax + " " + js_characters + ". " + js_current + ": " + MessageLength;
|
||||
}
|
||||
}
|
||||
|
||||
if ( errors != "" && ! Override )
|
||||
{
|
||||
alert(errors);
|
||||
return false;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
postformobj.submit.disabled = true;
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
try
|
||||
{
|
||||
postformobj.dosubmit.disabled = true;
|
||||
}
|
||||
catch(e) { }
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
var bbtags = new Array();
|
||||
|
||||
var fombj = document.REPLIER;
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=windows-1251" />
|
||||
<meta name="author" content="Êîìïàíèÿ IBResource è Invision Power Services Inc.">
|
||||
<title>Îøèáêà ðóññêîé âåðñèè Invision Power Board</title>
|
||||
</head><body>
|
||||
<h1>Îøèáêà <a href="http://www.ibresource.ru/">ðóññêîé âåðñèè Invision Power Board</a></h1>
|
||||
<font size="4">Âû ïîïàëè íà íåñóùåñòâóþùóþ ñòðàíèöó!<br>Ïîæàëóéñòà íàæìèòå íà êíîïî÷êó «<b>Íàçàä</b>» â âàøåì áðàóçåðå äëÿ âîçâðàùåíèÿ íà ïðåäûäóùóþ ñòðàíèöó.</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,9 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Insert Custom BBCode</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=windows-1251" />
|
||||
<title>Äîáàâëåíèå BB-êîäà</title>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Attempt to get editor ID
|
||||
//-----------------------------------------
|
||||
@@ -15,11 +16,11 @@
|
||||
var allow_advanced = null;
|
||||
var current_selection = null;
|
||||
var bbcode = parent.ips_bbcode_items[ bbcode_id ];
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
function Init()
|
||||
{
|
||||
var allow_advanced = parent.IPS_editor[ editor_id ].allow_advanced;
|
||||
@@ -28,96 +29,96 @@
|
||||
//-----------------------------------------
|
||||
// Set up main close button
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
parent.document.getElementById( editor_id + '_cb-close-window' ).onclick = do_cancel;
|
||||
parent.document.getElementById( editor_id + '_cb-close-window' ).style.cursor = 'pointer';
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Resize window
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
parent.document.getElementById( editor_id + '_htmlblock_' + this_module + '_menu' ).style.height = this_height + 'px';
|
||||
parent.document.getElementById( editor_id + '_iframeblock_' + this_module + '_menu' ).style.height = ( this_height - 10 ) + 'px';
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Module specific stuff
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
document.getElementById("f_content_text").focus();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up initial text value
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
document.getElementById("f_content_text").value = current_selection;
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Add in data
|
||||
//-----------------------------------------
|
||||
|
||||
document.getElementById("_title").innerHTML += ' ' + bbcode['title'];
|
||||
|
||||
document.getElementById("_title").innerHTML += ' «' + bbcode['title'] + '»';
|
||||
document.getElementById("_example").innerHTML += ' ' + bbcode['example'];
|
||||
document.getElementById("_option").innerHTML += ' ' + bbcode['text_option'];
|
||||
document.getElementById("_content").innerHTML += ' ' + bbcode['text_content'];
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Using option?
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
if ( parseInt( bbcode['use_option'] ) == 1 )
|
||||
{
|
||||
document.getElementById( 'use-option' ).style.display = '';
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up initial text value
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
document.getElementById("f_content_text").value = parent.IPS_editor[ editor_id ].strip_empty_html( current_selection );
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Do cancel
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
function do_cancel()
|
||||
{
|
||||
parent.IPS_editor[ editor_id ].module_remove_control_bar();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Do submit (low tech)
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
function do_submit()
|
||||
{
|
||||
var fields = [ "f_option_text", "f_content_text" ];
|
||||
|
||||
|
||||
var param = new Object();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Compile data
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
for ( var i in fields )
|
||||
{
|
||||
param[ fields[i] ] = document.getElementById( fields[i] ).value;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up required fields
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
var required = {
|
||||
"f_option_text" : "You must enter option text",
|
||||
"f_content_text": "You must enter content text"
|
||||
"f_option_text" : "Âû äîëæíû ââåñòè îïöèè òåãà",
|
||||
"f_content_text": "Âû äîëæíû ââåñòè ñîäåðæèìîå äëÿ òåãà"
|
||||
};
|
||||
|
||||
|
||||
for (var i in required)
|
||||
{
|
||||
var el = document.getElementById(i);
|
||||
|
||||
|
||||
if ( i == 'f_option_text' )
|
||||
{
|
||||
if ( parseInt( bbcode['use_option'] ) != 1 )
|
||||
@@ -125,7 +126,7 @@
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( ! el.value )
|
||||
{
|
||||
alert( required[i] );
|
||||
@@ -133,15 +134,15 @@
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Now prep the table
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
var _html = '';
|
||||
var _content = document.getElementById( 'f_content_text' ).value;
|
||||
var _option = document.getElementById( 'f_option_text' ).value;
|
||||
|
||||
|
||||
if ( parseInt( bbcode['use_option'] ) == 1 )
|
||||
{
|
||||
if ( parseInt( bbcode['switch_option'] ) == 1 )
|
||||
@@ -156,22 +157,31 @@
|
||||
else
|
||||
{
|
||||
_html = '[' + bbcode['tag'] + ']' + _content + '[/' + bbcode['tag'] + ']';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Is this RTE?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( parent.IPS_editor[ editor_id ].is_rte )
|
||||
{
|
||||
_html = _html.replace( /(\n|\r|<br>|<br \/>)/g, "<br />" );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Return..
|
||||
//-----------------------------------------
|
||||
|
||||
parent.IPS_editor[ editor_id].editor_check_focus();
|
||||
|
||||
|
||||
parent.IPS_editor[ editor_id ].insert_text( _html );
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill Window
|
||||
//-----------------------------------------
|
||||
|
||||
|
||||
do_cancel();
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
//-->
|
||||
@@ -184,10 +194,10 @@
|
||||
|
||||
<body onload="Init()">
|
||||
|
||||
<div class="title" id="_title">Insert</div>
|
||||
<div class="title" id="_title">Òåã</div>
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend><strong>Example</strong></legend>
|
||||
<legend><strong>Ïðèìåð</strong></legend>
|
||||
<div id="_example" style='font-family:"Courier New", Monaco, Courier;font-size:12px'></div>
|
||||
</fieldset>
|
||||
|
||||
@@ -197,7 +207,7 @@
|
||||
|
||||
<div id='use-option' style='display:none'>
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend><strong>Option Text</strong></legend>
|
||||
<legend><strong>Îïöèè òåãà</strong></legend>
|
||||
<div id='_option' style='padding:2px;color:#555;'></div>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
@@ -211,7 +221,7 @@
|
||||
</div>
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend><strong>Content Text</trong></legend>
|
||||
<legend><strong>Ñîäåðæèìîå òåãà</trong></legend>
|
||||
<div id='_content' style='padding:2px;color:#555;'></div>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
@@ -227,8 +237,8 @@
|
||||
|
||||
<div style="text-align: center;">
|
||||
<hr />
|
||||
<button type="button" class='tblbutton' name="ok" onclick="return do_submit();">OK</button>
|
||||
<button type="button" class='tblbutton' name="cancel" onclick="return do_cancel();">Cancel</button>
|
||||
<button type="button" class='tblbutton' name="ok" onclick="return do_submit();">Äîáàâèòü</button>
|
||||
<button type="button" class='tblbutton' name="cancel" onclick="return do_cancel();">Îòìåíà</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Insert Div/Span</title>
|
||||
<title>Âñòàâêà</title>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
@@ -158,16 +158,16 @@
|
||||
|
||||
<body onload="Init()">
|
||||
|
||||
<div class="title">Insert DIV/SPAN</div>
|
||||
<div class="title">Âûðàâíèâàíèå</div>
|
||||
|
||||
<form action="" method="get">
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="1%" nowrap="nowrap">Type:</td>
|
||||
<td width="99%"><select size="1" name="type" id="f_type" title="Div or Span?">
|
||||
<option value="div" selected="1" >DIV</option>
|
||||
<option value="span" >SPAN</option>
|
||||
<td width="1%" nowrap="nowrap">Òèï:</td>
|
||||
<td width="99%"><select size="1" name="type" id="f_type" title="Div èëè Span?">
|
||||
<option value="div" selected="1" ><DIV></option>
|
||||
<option value="span" ><SPAN></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -177,20 +177,20 @@
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Font</legend>
|
||||
<legend>Òåêñò</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Family:</td>
|
||||
<td><input type="text" name="fontfamily" id="f_fontfamily" size="20" value="Verdana" title="Enter name of font-family" /></td>
|
||||
<td>Øðèôò:</td>
|
||||
<td><input type="text" name="fontfamily" id="f_fontfamily" size="20" value="Verdana" title="Ââåäèòå èìÿ øðèôòà" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Size:</td>
|
||||
<td><input type="text" name="fontsize" id="f_fontsize" size="7" value="10px" title="Enter size and unit" /></td>
|
||||
<td>Ðàçìåð:</td>
|
||||
<td><input type="text" name="fontsize" id="f_fontsize" size="7" value="10px" title="Ââåäèòå ðàçìåð" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Color:</td>
|
||||
<td><input type="text" name="color" id="f_color" size="7" value="#000" title="Enter color" /></td>
|
||||
<td>Öâåò:</td>
|
||||
<td><input type="text" name="color" id="f_color" size="7" value="#000" title="Ââåäèòå öâåò" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -199,20 +199,20 @@
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Background</legend>
|
||||
<legend>Ôîí</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Image:</td>
|
||||
<td><input type="text" name="backgroundimage" id="f_backgroundimage" size="15" value="" title="Leave blank for no image" /></td>
|
||||
<td>Èçîáðàæåíèå:</td>
|
||||
<td><input type="text" name="backgroundimage" id="f_backgroundimage" size="15" value="" title="ìîæíî íå çàïîëíÿòü" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Repeat:</td>
|
||||
<td><input type="text" name="backgroundrepeat" id="f_backgroundrepeat" size="15" value="" title="Leave blank for no repeat" /></td>
|
||||
<td>Ïîâòîð:</td>
|
||||
<td><input type="text" name="backgroundrepeat" id="f_backgroundrepeat" size="15" value="" title="ìîæíî íå çàïîëíÿòü" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Color:</td>
|
||||
<td><input type="text" name="backgroundcolor" id="f_backgroundcolor" size="7" value="" title="Leave blank for no color" /></td>
|
||||
<td>Öâåò:</td>
|
||||
<td><input type="text" name="backgroundcolor" id="f_backgroundcolor" size="7" value="" title="ìîæíî íå çàïîëíÿòü" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -221,27 +221,27 @@
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Box Model</legend>
|
||||
<legend>Áëîê</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Border:</td>
|
||||
<td><input type="text" name="border" id="f_border" size="20" value="" title="Enter border values" /></td>
|
||||
<td>Ãðàíèöû:</td>
|
||||
<td><input type="text" name="border" id="f_border" size="20" value="" title="Ââåäèòå ðàçìåðû ãðàíèö" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Padding:</td>
|
||||
<td><input type="text" name="padding" id="f_padding" size="20" value="4px" title="Enter size and unit" /></td>
|
||||
<td>Ðàçìåð ïîëåé:</td>
|
||||
<td><input type="text" name="padding" id="f_padding" size="20" value="4px" title="Ââåäèòå ðàçìåð" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Margin:</td>
|
||||
<td><input type="text" name="margin" id="f_margin" size="20" value="" title="Enter size and unit" /></td>
|
||||
<td>Îòñòóï:</td>
|
||||
<td><input type="text" name="margin" id="f_margin" size="20" value="" title="Ââåäèòå ðàçìåð" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Custom Elements</legend>
|
||||
<legend>Äðóãèå ýëåìåíòû</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
@@ -254,8 +254,8 @@
|
||||
|
||||
<div style="text-align: center;">
|
||||
<hr />
|
||||
<button type="button" class='tblbutton' name="ok" onclick="return do_submit();">OK</button>
|
||||
<button type="button" class='tblbutton' name="cancel" onclick="return do_cancel();">Cancel</button>
|
||||
<button type="button" class='tblbutton' name="ok" onclick="return do_submit();">ÎÊ</button>
|
||||
<button type="button" class='tblbutton' name="cancel" onclick="return do_cancel();">Îòìåíà</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Insert Div/Span</title>
|
||||
<title>Âñòàâêà</title>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
@@ -113,8 +113,8 @@
|
||||
//-----------------------------------------
|
||||
|
||||
var required = {
|
||||
"f_email": "You must enter an email address",
|
||||
"f_text": "You must enter some text for the email body"
|
||||
"f_email": "Âû îáÿçàíû ââåñòè e-mail àäðåñ",
|
||||
"f_text": "Âû îáÿçàíû ââåñòè òåêñò ïèñüìà"
|
||||
};
|
||||
|
||||
for (var i in required)
|
||||
@@ -166,16 +166,16 @@
|
||||
|
||||
<body onload="Init()">
|
||||
|
||||
<div class="title">Insert Email</div>
|
||||
<div class="title">Âñòàâèòü e-mail</div>
|
||||
|
||||
<form action="" method="get">
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Email Address</legend>
|
||||
<legend>E-mail àäðåñ</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><textarea name="email" id="f_email" style='width:100%;height:60px' cols='23' onfocus='this.select()' rows='4'>user@domain.com</textarea></td>
|
||||
<td><textarea name="email" id="f_email" style='width:100%;height:60px' cols='23' onfocus='this.select()' rows='4'>user@domain.ru</textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -184,7 +184,7 @@
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Email Text</legend>
|
||||
<legend>Òåêñò ïèñüìà</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
@@ -199,7 +199,7 @@
|
||||
<div style="text-align: center;">
|
||||
<hr />
|
||||
<button type="button" class='tblbutton' name="ok" onclick="return do_submit();">OK</button>
|
||||
<button type="button" class='tblbutton' name="cancel" onclick="return do_cancel();">Cancel</button>
|
||||
<button type="button" class='tblbutton' name="cancel" onclick="return do_cancel();">Îòìåíà</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Insert Div/Span</title>
|
||||
<title>Âñòàâêà</title>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
//-----------------------------------------
|
||||
|
||||
var required = {
|
||||
"f_src": "You must enter an image location"
|
||||
"f_src": "Âû îáÿçàíû óêàçàòü ìåñòîïîëîæåíèå ôàéëà ñ èçîáðàæåíèåì"
|
||||
};
|
||||
|
||||
for (var i in required)
|
||||
@@ -174,12 +174,12 @@
|
||||
|
||||
<body onload="Init()">
|
||||
|
||||
<div class="title">Insert Image</div>
|
||||
<div class="title">Âñòàâèòü èçîáðàæåíèå</div>
|
||||
|
||||
<form action="" method="get">
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Image Location</legend>
|
||||
<legend>Ìåñòîïîëîæåíèå èçîáðàæåíèÿ</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
@@ -193,20 +193,20 @@
|
||||
<div id='advanced-options' style='display:none'>
|
||||
<br />
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Advanced Options</legend>
|
||||
<legend>Äîïîëíèòåëüíûå îïöèè</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Border:</td>
|
||||
<td><input type="text" name="border" id="f_ad_border" size="4" value="0" title="Image Border" /></td>
|
||||
<td>Ðàìêà:</td>
|
||||
<td><input type="text" name="border" id="f_ad_border" size="4" value="0" title="Ðàìêà" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title:</td>
|
||||
<td><input type="text" name="title" id="f_ad_title" size="20" value="" title="Image Title" /></td>
|
||||
<td>Çàãîëîâîê:</td>
|
||||
<td><input type="text" name="title" id="f_ad_title" size="20" value="" title="Íàçâàíèå" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Alt Text:</td>
|
||||
<td><input type="text" name="fontsize" id="f_ad_alt" size="20" value="" title="Image ALT" /></td>
|
||||
<td>Ïîäïèñü ïîä êàðòèíêîé:</td>
|
||||
<td><input type="text" name="fontsize" id="f_ad_alt" size="20" value="" title="ALT" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -222,7 +222,7 @@
|
||||
<div style="text-align: center;">
|
||||
<hr />
|
||||
<button type="button" class='tblbutton' name="ok" onclick="return do_submit();">OK</button>
|
||||
<button type="button" class='tblbutton' name="cancel" onclick="return do_cancel();">Cancel</button>
|
||||
<button type="button" class='tblbutton' name="cancel" onclick="return do_cancel();">Îòìåíà</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Insert Div/Span</title>
|
||||
<title>Âñòàâêà</title>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
@@ -136,8 +136,8 @@
|
||||
//-----------------------------------------
|
||||
|
||||
var required = {
|
||||
"f_href": "You must enter a link location",
|
||||
"f_text": "You must enter some text for the link body"
|
||||
"f_href": "Âû îáÿçàíû ââåñòè URL àäðåñ ññûëêè",
|
||||
"f_text": "Âû îáÿçàíû ââåñòè òåêñò ññûëêè"
|
||||
};
|
||||
|
||||
for (var i in required)
|
||||
@@ -195,12 +195,12 @@
|
||||
|
||||
<body onload="Init()">
|
||||
|
||||
<div class="title">Insert Link</div>
|
||||
<div class="title">Âñòàâèòü ññûëêó</div>
|
||||
|
||||
<form action="" method="get">
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Link Location</legend>
|
||||
<legend>URL àäðåñ ññûëêè</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
@@ -213,7 +213,7 @@
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Link Text</legend>
|
||||
<legend>Òåêñò ññûëêè</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
@@ -226,16 +226,16 @@
|
||||
<div id='advanced-options' style='display:none'>
|
||||
<br />
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Advanced Options</legend>
|
||||
<legend>Äîïîëíèòåëüíûå îïöèè</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Title:</td>
|
||||
<td><input type="text" name="title" id="f_ad_title" size="20" value="" title="Link Title" /></td>
|
||||
<td>Çàãîëîâîê:</td>
|
||||
<td><input type="text" name="title" id="f_ad_title" size="20" value="" title="Çàãîëîâîê" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Target:</td>
|
||||
<td><input type="text" name="fontsize" id="f_ad_target" size="20" value="" title="Link Target" /></td>
|
||||
<td>Ãäå îòêðûâàòü ññûëêó:</td>
|
||||
<td><input type="text" name="fontsize" id="f_ad_target" size="20" value="" title="Â êàêîì îêíå îòêðûâàòü" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -251,7 +251,7 @@
|
||||
<div style="text-align: center;">
|
||||
<hr />
|
||||
<button type="button" class='tblbutton' name="ok" onclick="return do_submit();">OK</button>
|
||||
<button type="button" class='tblbutton' name="cancel" onclick="return do_cancel();">Cancel</button>
|
||||
<button type="button" class='tblbutton' name="cancel" onclick="return do_cancel();">Îòìåíà</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
||||
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
|
||||
<meta HTTP-EQUIV="Expires" CONTENT="Mon, 06 May 1996 04:57:00 GMT">
|
||||
<title>Insert Table</title>
|
||||
<title>Âñòàâêà</title>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
if ( ! editor_id )
|
||||
{
|
||||
alert("Could not locate the editor ID");
|
||||
alert("Íåâîçìîæíî íàéòè ID ðåäàêòîðà");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -73,8 +73,8 @@
|
||||
//-----------------------------------------
|
||||
|
||||
var required = {
|
||||
"f_rows": "You must enter a number of rows",
|
||||
"f_cols": "You must enter a number of columns"
|
||||
"f_rows": "Âû äîëæíû ââåñòè êîëè÷åñòâî ñòðîê",
|
||||
"f_cols": "Âû äîëæíû ââåñòè êîëè÷åñòâî ñòîëáöîâ"
|
||||
};
|
||||
|
||||
for (var i in required)
|
||||
@@ -207,28 +207,28 @@
|
||||
|
||||
<body onload="Init()">
|
||||
|
||||
<div class="title">Insert Table</div>
|
||||
<div class="title">Âñòàâèòü òàáëèöó</div>
|
||||
|
||||
<form action="" method="get">
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Basics</legend>
|
||||
<legend>Îñíîâû</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Rows:</td>
|
||||
<td><input type="text" name="rows" id="f_rows" size="5" title="Number of rows" value="2" /></td>
|
||||
<td>Ñòðîê:</td>
|
||||
<td><input type="text" name="rows" id="f_rows" size="5" title="×èñëî ñòðîê" value="2" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cols:</td>
|
||||
<td><input type="text" name="cols" id="f_cols" size="5" title="Number of columns" value="4" /></td>
|
||||
<td>Ñòîëáöîâ:</td>
|
||||
<td><input type="text" name="cols" id="f_cols" size="5" title="×èñëî ñòîëáöîâ" value="4" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Width:</td>
|
||||
<td><input type="text" name="width" id="f_width" size="5" title="Width of the table" value="100" />
|
||||
<select size="1" name="unit" id="f_unit" title="Width unit">
|
||||
<option value="%" selected="1" >Percent</option>
|
||||
<option value="px" >Pixels</option>
|
||||
<option value="em" >Em</option>
|
||||
<td>Øèðèíà òàáëèöû:</td>
|
||||
<td><input type="text" name="width" id="f_width" size="5" title="Øèðèíà òàáëèöû" value="100" />
|
||||
<select size="1" name="unit" id="f_unit" title="Âåëè÷èíà">
|
||||
<option value="%" selected="1" >ïðîöåíòîâ</option>
|
||||
<option value="px" >ïèêñåëåé</option>
|
||||
<option value="em" >ïóíêòîâ</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -239,24 +239,24 @@
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Layout</legend>
|
||||
<legend>Ðàçìåùåíèå</legend>
|
||||
<table border="0" width='100%' >
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Alignment:</td>
|
||||
<td>Âûðàâíèâàíèå:</td>
|
||||
<td>
|
||||
<select size="1" name="align" id="f_align"
|
||||
title="Positioning of this image">
|
||||
<option value="" selected="1" >Not set</option>
|
||||
<option value="left" >Left</option>
|
||||
<option value="right" >Right</option>
|
||||
<option value="texttop" >Texttop</option>
|
||||
<option value="absmiddle" >Absmiddle</option>
|
||||
<option value="baseline" >Baseline</option>
|
||||
<option value="absbottom" >Absbottom</option>
|
||||
<option value="bottom" >Bottom</option>
|
||||
<option value="middle" >Middle</option>
|
||||
<option value="top" >Top</option>
|
||||
title="Ðàñïîëîæåíèe èçîáðàæåíèÿ">
|
||||
<option value="" selected="1" >íå äåëàòü</option>
|
||||
<option value="left" >ñëåâà</option>
|
||||
<option value="right" >ñïðàâà</option>
|
||||
<option value="texttop" >íàä òåêñòîì</option>
|
||||
<option value="absmiddle" >àáñîëþòíî ïî ñåðåäèíå</option>
|
||||
<option value="baseline" >íà áàçîâîé ëèíèè</option>
|
||||
<option value="absbottom" >âíèçó ïî ñåðåäèíå</option>
|
||||
<option value="bottom" >âíèçó</option>
|
||||
<option value="middle" >ïî ñåðåäèíå</option>
|
||||
<option value="top" >íàâåðõó</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -267,20 +267,20 @@
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Spacing</legend>
|
||||
<legend>Ðàçáèâêà</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Cell Spacing:</td>
|
||||
<td><input type="text" name="cols" id="f_spacing" size="5" title="Cell Spacing" value="0" /></td>
|
||||
<td>Ðàññòîÿíèå ìåæäó ÿ÷åéêàìè:</td>
|
||||
<td><input type="text" name="cols" id="f_spacing" size="5" title="ðàññòîÿíèå ìåæäó" value="0" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cell Padding:</td>
|
||||
<td><input type="text" name="cols" id="f_padding" size="5" title="Cell Padding" value="0" /></td>
|
||||
<td>Îòñòóï â ÿ÷åéêàõ:</td>
|
||||
<td><input type="text" name="cols" id="f_padding" size="5" title="îòñòóï" value="0" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Border thickness:</td>
|
||||
<td><input type="text" name="border" id="f_border" size="5" value="1" title="Leave empty for no border" />
|
||||
<td>Òîëùèíà ãðàíèö:</td>
|
||||
<td><input type="text" name="border" id="f_border" size="5" value="1" title="åñëè áåç ãðàíèöû - îñòàâüòå ïóñòûì" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -290,7 +290,7 @@
|
||||
<hr />
|
||||
<div align='center'>
|
||||
<button type="button" class='tblbutton' name="ok" onclick="return do_submit();">OK</button>
|
||||
<button type="button" class='tblbutton' name="cancel" onclick="return do_cancel();">Cancel</button>
|
||||
<button type="button" class='tblbutton' name="cancel" onclick="return do_cancel();">Îòìåíà</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>Invision Power Board - Bulletin Board System</title></head>␍<body>␍<h1>403: Invision Power Board -> Forbidden</h1>␍<hr>␍You have reached this Page in error, please use␍your back button to return to Invision Board.␍<hr>␍<a href="http://www.invisionboard.com/">Invision Power Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=windows-1251" />
|
||||
<meta name="author" content="Êîìïàíèÿ IBResource è Invision Power Services Inc.">
|
||||
<title>Îøèáêà ðóññêîé âåðñèè Invision Power Board</title>
|
||||
</head><body>
|
||||
<h1>Îøèáêà <a href="http://www.ibresource.ru/">ðóññêîé âåðñèè Invision Power Board</a></h1>
|
||||
<font size="4">Âû ïîïàëè íà íåñóùåñòâóþùóþ ñòðàíèöó!<br>Ïîæàëóéñòà íàæìèòå íà êíîïî÷êó «<b>Íàçàä</b>» â âàøåì áðàóçåðå äëÿ âîçâðàùåíèÿ íà ïðåäûäóùóþ ñòðàíèöó.</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
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_mode();function prep_mode(){cvalue=my_getcookie("bbmode");if(cvalue=='ezmode'){fombj.bbmode[0].checked=true;}else{fombj.bbmode[1].checked=true;}}function setmode(mVal){my_setcookie('bbmode',mVal,1);}function get_easy_mode_state(){if(fombj.bbmode[0].checked){return true;}else{return false;}}function hstat(msg){fombj.helpbox.value=eval("help_"+msg);}function cstat(){var c=stacksize(bbtags);if((c<1)||(c==null)){c=0;}if(!bbtags[0]){c=0;}fombj.tagcount.value=c;}function closeall(){if(bbtags[0]){while(bbtags[0]){tagRemove=popstack(bbtags)fombj.Post.value+="[/"+tagRemove+"]";if((tagRemove!='FONT')&&(tagRemove!='SIZE')&&(tagRemove!='COLOR')){eval("fombj."+tagRemove+".value = ' "+tagRemove+" '");eval(tagRemove+"_open = 0");}}}fombj.tagcount.value=0;bbtags=new Array();fombj.Post.focus();}function emoticon(theSmilie){doInsert(" "+theSmilie+" ","",false);}function add_code(NewCode){fombj.Post.value+=NewCode;fombj.Post.focus();}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();}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");eval("fombj."+thetag+".value += '*'");pushstack(bbtags,thetag);cstat();hstat('click_close');}}else{lastindex=0;for(i=0;i<bbtags.length;i++){if(bbtags[i]==thetag){lastindex=i;}}while(bbtags[lastindex]){tagRemove=popstack(bbtags);doInsert("[/"+tagRemove+"]","",false)if((tagRemove!='FONT')&&(tagRemove!='SIZE')&&(tagRemove!='COLOR')){eval("fombj."+tagRemove+".value = ' "+tagRemove+" '");eval(tagRemove+"_open = 0");}}cstat();}}}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);}}function tag_url(){var FoundErrors='';var enterURL=prompt(text_enter_url,"http://");var enterTITLE=prompt(text_enter_url_name,jsfile_myweb_lang);if(!enterURL){FoundErrors+=" "+error_no_url;}if(!enterTITLE){FoundErrors+=" "+error_no_title;}if(FoundErrors){alert(jsfile_error_lang+FoundErrors);return;}doInsert("[URL="+enterURL+"]"+enterTITLE+"[/URL]","",false);}function insert_attach_to_textarea(aid){doInsert("[attachmentid="+aid+"]");}function tag_image(){var FoundErrors='';var enterURL=prompt(text_enter_image,"http://");if(!enterURL){FoundErrors+=" "+error_no_url;}if(FoundErrors){alert(jsfile_error_lang+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);}function doInsert(ibTag,ibClsTag,isSingle){var isClose=false;var obj_ta=fombj.Post;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;}}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);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;}else{if(isSingle){isClose=true;}obj_ta.value+=ibTag;}obj_ta.focus();return isClose;}
|
||||
@@ -1 +0,0 @@
|
||||
var dontpassgo=0;var bbtags=new Array();var ips_primary_fonts=new Array("arial","arial black","arial narrow","book antiqua","century gothic","comic sans ms","courier new","fixedsys","franklin gothic medium","garamond","georgia","impact","lucida console","lucida sans unicode","microsoft sans serif","palatino linotype","system","tahoma","times new roman","trebuchet ms","verdana");var ips_fontsizes={'8px':1,'10pt':2,'12pt':3,'14pt':4,'18pt':5,'24pt':6,'36pt':7}var ips_font_sizes=new Array(1,2,3,4,5,6,7);var ips_reverse_primary_fonts=new Array();var ips_reverse_font_sizes=new Array();var ips_reverse_fontsizes=new Array();for(var i in ips_primary_fonts){ips_reverse_primary_fonts[ips_primary_fonts[i]]=i;}for(var i in ips_font_sizes){ips_reverse_font_sizes[ips_font_sizes[i]]=i;}for(var i in ips_fontsizes){ips_reverse_fontsizes[ips_fontsizes[i]]=i;}function closeall(){if(bbtags[0]){while(bbtags[0]){tagRemove=popstack(bbtags)postformobj.Post.value+="[/"+tagRemove+"]";if(i_am=='std'){toggle_button(tagRemove);}else{rte_button_update(tagRemove);}}}bbtags=new Array();postformobj.Post.focus();}function smart_close_tags(thetag){lastindex=0;for(i=0;i<bbtags.length;i++){if(bbtags[i]==thetag){lastindex=i;}}while(bbtags[lastindex]){tagRemove=popstack(bbtags);wrap_tags("[/"+tagRemove+"]","")if(i_am=='std'){toggle_button(tagRemove);}else{rte_button_update(tagRemove);}}}function write_fontface_box(){html="";for(var i in ips_primary_fonts){option=ips_primary_fonts[i];display=ips_primary_fonts[i];var tmp=display.split(" ");var rtn=new Array;for(var id in tmp){rtn[id]=tmp[id].substr(0,1).toUpperCase()+tmp[id].substr(1);}display=rtn.join(" ");html+="\n<option style='font-family:"+display+"' value='"+display+"'>"+display+"</option>";}return html;}function write_fontsize_box(){html="";for(var i in ips_font_sizes){option=ips_font_sizes[i];display=ips_font_sizes[i];html+="\n<option value='"+display+"'>"+display+"</option>";}return html;}function init_editor(){if(!postformid){postformid='postingform';}if(!postfieldid){postfieldid='postcontent';}postformobj=document.getElementById(postformid);postfieldobj=document.getElementById(postfieldid);}function removeattach(id){if(id!=""){Override=1;postformobj.removeattachid.value=id;}}function insert_attach_to_textarea(aid){rtewindow.focus();wrap_tags("[attachmentid="+aid+"]","");rtewindow.focus();}var emowindow='';function emo_pop(){emowindow=window.open(ipb_var_base_url+"act=legends&CODE=emoticons","Legends","width=250,height=500,resizable=yes,scrollbars=yes");}function bbc_pop(){window.open(ipb_var_base_url+"act=legends&CODE=bbcode","Legends","width=700,height=500,resizable=yes,scrollbars=yes");}function getOffsetTop(elm){var mOffsetTop=elm.offsetTop;var mOffsetParent=elm.offsetParent;var parents_up=2;while(parents_up>0){mOffsetTop+=mOffsetParent.offsetTop;mOffsetParent=mOffsetParent.offsetParent;parents_up--;}return mOffsetTop;}function getOffsetLeft(elm){var mOffsetLeft=elm.offsetLeft;var mOffsetParent=elm.offsetParent;var parents_up=2;while(parents_up>0){mOffsetLeft+=mOffsetParent.offsetLeft;mOffsetParent=mOffsetParent.offsetParent;parents_up--;}return mOffsetLeft;}
|
||||
@@ -1 +0,0 @@
|
||||
var i_am='rte';var DEBUG=0;var isRichText=false;var css_off=false;var rng;var currentRTE;var allRTEs="";var rte="";var rtewindow;var rtedocument;var rteready;var isIE;var isGecko;var isSafari;var isKonqueror;var imagesPath;var includesPath;var g_buttons;var g_rte;var g_tablewidth;var g_width_unit;var g_imagesPath;var g_width;var g_height;var g_readOnly;var g_includesPath var g_html;var g_DEBUG;var currentfont;var currentsize;var button_status=new Array();var viewingHTML=0;var viewingFS=0;var buttons_update=new Array("bold","italic","underline","strikethrough","justifyleft","justifycenter","justifyright","insertorderedlist","insertunorderedlist");var opentags={'bold':0,'italic':0,'strikethrough':0,'underline':0,'forecolor':0,'fontname':0,'fontsize':0};function init_rte(imgPath,incPath){var ua=navigator.userAgent.toLowerCase();isIE=((ua.indexOf("msie")!=-1)&&(ua.indexOf("opera")==-1)&&(ua.indexOf("webtv")==-1));isGecko=(ua.indexOf("gecko")!=-1);isSafari=(ua.indexOf("safari")!=-1);isKonqueror=(ua.indexOf("konqueror")!=-1);if(document.getElementById&&document.designMode&&!isSafari&&!isKonqueror){isRichText=true;}if(isIE){document.onmouseover=ie_raise_button;document.onmouseout=ie_normal_button;document.onmousedown=ie_lower_button;document.onmouseup=ie_raise_button;}imagesPath=imgPath;includesPath=incPath;}function write_rte_editor(fieldname,html,width,height,buttons,readOnly){rte=fieldname;if(isRichText){if(allRTEs.length>0){allRTEs+=";";}allRTEs+=rte;write_rte(html,width,height,buttons,readOnly);}else{write_default(html,width,height,buttons,readOnly);}}function write_default(html,width,height,buttons,readOnly){if(!readOnly){document.writeln('<textarea name="'+rte+'" id="'+rte+'" style="width: '+width+'px; height: '+height+'px;">'+html+'</textarea>');}else{document.writeln('<textarea name="'+rte+'" id="'+rte+'" style="width: '+width+'px; height: '+height+'px;" readonly>'+html+'</textarea>');}}function write_rte(html,width,height,buttons,readOnly){if(readOnly)buttons=false;var o_width=width;var o_height=height;width=parseInt(width);height=parseInt(height);if(isIE){if(!o_width.match( /%/)){if(buttons&&(width<400)){width=400;}g_width_unit='px';var tablewidth=width+4;}else{g_width_unit='%';var tablewidth=width;width=width;}}else{if(!o_width.match( /%/)){if(buttons&&(width<400)){width=400;}g_width_unit='px';var tablewidth=width+2;}else{g_width_unit='%';var tablewidth=width;width=width;}}g_buttons=buttons;g_rte=rte;g_tablewidth=tablewidth;g_imagesPath=imagesPath;g_width=width;g_height=height;g_readOnly=readOnly;g_includesPath=includesPath;g_html=html;g_DEBUG=DEBUG;boo_to_int=isRichText==true?1:0;document.writeln("<input type='hidden' id='wysiwyg_used' name='wysiwyg_used' value='"+boo_to_int+"' />");write_rte_html();document.getElementById('hdn_rte_content').value=html;enable_design_mode(make_newlines_safe(html),readOnly);poss_images=document.getElementsByTagName('img');if(poss_images.length){for(var i in poss_images){if(poss_images[i].className=='rteimage'){poss_images[i].unselectable=true;}}}if(isIE&&ie_ptags_to_newlines){rtewindow=frames[rte];var _test=new Array('Indent','Outdent','JustifyLeft','JustifyCenter','JustifyRight','InsertOrderedList','InsertUnorderedList');rtewindow.document.onkeydown=function(){if(rtewindow.event.keyCode==13){for(var i in _test){if(rtewindow.document.queryCommandState(_test[i])){return true;}}var sel=rtewindow.document.selection;var ts=rtewindow.document.selection.createRange();var t=ts.htmlText.replace(/<p([^>]*)>(.*)<\/p>/i,'$2');if((sel.type=="Text"||sel.type=="None")){ts.pasteHTML("<br />"+t+"\n");}else{rtewindow.document.body.innerHTML+="<br />\n";}rtewindow.event.returnValue=false;ts.select();rtewindow.focus();return false;}}}}function enable_design_mode(html,readOnly){var use_charset='';try{use_charset=g_CHARSET;}catch(e){}use_charset=use_charset?use_charset:'iso-8859-1';var frameHtml="<html id=\""+rte+"\">\n";frameHtml+="<head>\n";frameHtml+='<meta http-equiv="content-type" content="text/html; charset='+use_charset+'" />'+"\n";frameHtml+="<style type='text/css' media='all'>\n";frameHtml+="body {\n";frameHtml+=" background: #FFFFFF;\n";frameHtml+=" margin: 0px;\n";frameHtml+=" padding: 4px;\n";frameHtml+=" font-family: arial, verdana, sans-serif;\n";frameHtml+=" font-size: 10pt;\n";frameHtml+=" cursor: text;\n";frameHtml+=" height: 95%;\n";frameHtml+="}\n";frameHtml+="p {\n";frameHtml+=" margin:0px;\n";frameHtml+=" padding:0px;\n";frameHtml+="}\n";frameHtml+="</style>\n";frameHtml+="</head>\n";frameHtml+="<body>\n";frameHtml+=html+"\n";frameHtml+="</body>\n";frameHtml+="</html>";if(isIE){try{rtewindow=frames[rte];rtewindow.document.open();rtewindow.document.write(frameHtml);rtewindow.document.close();}catch(e){alert(e);}if(!readOnly){rtewindow.document.designMode="On";}rtewindow.document.onmouseup=rte_button_update;rtewindow.document.onkeyup=rte_button_update;}else{try{rtewindow=document.getElementById(rte).contentWindow;rtedocument=document.getElementById(rte).contentDocument;iLine truncated
|
||||
@@ -1 +0,0 @@
|
||||
var i_am='std';var rtewindow;var buttonbar;var opentags={'b':0,'i':0,'s':0,'u':0,'img':0,'quote':0,'left':0,'center':0,'right':0,'color':0,'background':0,'indent':0,'code':0};var tags_to_div={'b':'do_bold','i':'do_italic','s':'do_strikethrough','u':'do_underline','quote':'do_quote','left':'do_justifyleft','center':'do_justifycenter','right':'do_justifyright','color':'forecolor','background':'hilitecolor','indent':'do_indent','code':'do_code'};var rte_to_std={'forecolor':'color','hilitecolor':'background'};var easymode=0;var ie_range_cache='';function init_std_editor(){try{rtewindow=document.getElementById('postcontent');oldwidth=parseInt(document.getElementById('postcontent').style.width);buttonbar=document.getElementById('std-table-buttons');widthunit=document.getElementById('postcontent').style.width.match( /%/)?'%':'px';if(widthunit=='px'){if(is_opera){document.getElementById('postcontent').style.width=oldwidth-4+widthunit;buttonbar.style.width=parseInt(buttonbar.style.width)-4+widthunit;}else if(is_safari){}else{document.getElementById('postcontent').style.width=oldwidth-6+widthunit;}}else{if(is_ie||is_moz){document.getElementById('postcontent').style.width=oldwidth-1+widthunit;}}}catch(e){}cvalue=my_getcookie("bbmode");if(cvalue==1){document.getElementById('togglebbmode').value=js_bbeasy_on;easymode=1;}else{document.getElementById('togglebbmode').value=js_bbeasy_off;easymode=0;}faceobj=document.getElementById('fontface');faceregex= /\<\!--FONTFACE--\>/gi;facecontent=faceobj.innerHTML.replace(faceregex,write_fontface_box());faceobj.innerHTML=facecontent;sizeobj=document.getElementById('fontsize');sizeregex= /\<\!--FONTSIZE--\>/gi;sizecontent=sizeobj.innerHTML.replace(sizeregex,write_fontsize_box());sizeobj.innerHTML=sizecontent;}function toggle_button(tag){if((tag=='font')||(tag=='size')){return;}if(opentags[tag]){document.getElementById(tags_to_div[tag]).className='rteimage';opentags[tag]=0;}else{document.getElementById(tags_to_div[tag]).className='rteImageRaised';opentags[tag]=1;}}function toggle_bbmode(mVal){if(easymode){document.getElementById('togglebbmode').value=js_bbeasy_off;easymode=0;}else{document.getElementById('togglebbmode').value=js_bbeasy_on;easymode=1;}my_setcookie('bbmode',easymode,1);}function get_easy_mode_state(){if(easymode){return true;}else{return false;}}function popcolor(command){if(opentags[rte_to_std[command]]){smart_close_tags(rte_to_std[command]);return false;}else{parent.command=command;if(is_ie){postfieldobj.focus();ie_range_cache=document.selection.createRange();}buttonElement=document.getElementById(command);var iLeftPos=getOffsetLeft(buttonElement);var iTopPos=getOffsetTop(buttonElement)+(buttonElement.offsetHeight+30);document.getElementById('cp').style.left=(iLeftPos)+"px";document.getElementById('cp').style.top=(iTopPos)+"px";if(document.getElementById('cp').style.visibility=="hidden"){document.getElementById('cp').style.visibility="visible";document.getElementById('cp').style.display="inline";}else{document.getElementById('cp').style.visibility="hidden";document.getElementById('cp').style.display="none";}}}function setColor(color){var parentCommand=parent.command;if(parentCommand=="hilitecolor"){if(wrap_tags("[background="+color+"]","[/background]",true)){toggle_button("background");pushstack(bbtags,"background");}}else{if(wrap_tags("[color="+color+"]","[/color]",true)){toggle_button("color");pushstack(bbtags,"color");}}document.getElementById('cp').style.visibility="hidden";document.getElementById('cp').style.display="none";}function emoticon(theSmilie){doInsert(" "+theSmilie+" ","",false);if((ua_vers>=4)&&is_ie&&is_win&&emowindow!=''&&emowindow!='undefined'){emowindow.focus();}}function alterfont(theval,thetag){if(theval==0){return;}if(wrap_tags("["+thetag+"="+theval+"]","[/"+thetag+"]",true)){pushstack(bbtags,thetag);}postformobj.ffont.selectedIndex=0;postformobj.fsize.selectedIndex=0;}function simpletag(thetag){var tagOpen=opentags[thetag];if(get_easy_mode_state()){inserttext=prompt(prompt_start+"\n["+thetag+"]xxx[/"+thetag+"]");if((inserttext!=null)&&(inserttext!="")){wrap_tags("["+thetag+"]"+inserttext+"[/"+thetag+"] ","",false);}}else{if(tagOpen==0){if(wrap_tags("["+thetag+"]","[/"+thetag+"]",true)){toggle_button(thetag);pushstack(bbtags,thetag);}}else{smart_close_tags(thetag);}}}function tag_list(type){var listvalue="init";var thelist="";opentag=(type=='ordered')?'[list=1]':'[list]';while((listvalue!="")&&(listvalue!=null)){listvalue=prompt(list_prompt,"");if((listvalue!="")&&(listvalue!=null)){thelist=thelist+"[*]"+listvalue+"\n";}}if(thelist!=""){wrap_tags(opentag+"\n"+thelist+"[/list]\n","");}}function tag_url(){var FoundErrors='';if(check_range()){var enterURL=prompt(text_enter_url,"http://");if(!enterURL){alert(error_no_url);return;}wrap_tags("[url="+enterURL+"]","[/url]","");}else{var enterURL=prompt(text_enter_url,"http://");var enterTITLE=prompt(text_enter_url_name,jsfile_myweb_lang);if(!enterURL){FoundErrors+=" "+error_no_url;}if(!enterTITLE){FounLine truncated
|
||||
@@ -20,8 +20,7 @@ return false;
|
||||
}
|
||||
_desc_clicked = 1;
|
||||
desc_html[ tid ] = document.getElementById( 'tid-desc-' + tid ).innerHTML;
|
||||
perm_max_length = perm_max_length ? perm_max_length : 50;
|
||||
document.getElementById( 'tid-desc-' + tid ).innerHTML = '<input id="edit-'+tid+'" maxlength="'+perm_max_length+'" class="dny-edit-title" type="text" size="40" onblur="tid_blur(\''+tid+'\', \'desc\')" onkeypress="tid_keypress(event, \''+tid+'\',\'desc\')" value="'+desc_html[tid].replace( /"/g,'"')+'" />';//"'
|
||||
document.getElementById( 'tid-desc-' + tid ).innerHTML = '<input id="edit-'+tid+'" maxlength="70" class="dny-edit-title" type="text" size="40" onblur="tid_blur(\''+tid+'\', \'desc\')" onkeypress="tid_keypress(event, \''+tid+'\',\'desc\')" value="'+desc_html[tid].replace( /"/g,'"')+'" />';//"'
|
||||
document.getElementById( 'edit-' + tid ).focus();
|
||||
return false;
|
||||
}
|
||||
@@ -226,11 +225,11 @@ document.modform.selectedtids.value = newvalue;
|
||||
newcount = stacksize(clean);
|
||||
if( oldvalue > 0 )
|
||||
{
|
||||
document.modform.gobutton.value = lang_gobutton + ' (' + newcount + ') (' + oldvalue + ' ' + lang_otherpage +' )';
|
||||
document.modform.gobutton.value = ipsclass.html_entity_decode( lang_gobutton ) + ' (' + newcount + ') (' + oldvalue + ' ' + ipsclass.html_entity_decode( lang_otherpage ) +' )';
|
||||
}
|
||||
else
|
||||
{
|
||||
document.modform.gobutton.value = lang_gobutton + ' (' + newcount + ')';
|
||||
document.modform.gobutton.value = ipsclass.html_entity_decode( lang_gobutton ) + ' (' + newcount + ')';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -297,11 +296,11 @@ document.modform.selectedtids.value = newvalue;
|
||||
newcount = stacksize(clean);
|
||||
if ( oldvalue > 0 )
|
||||
{
|
||||
document.modform.gobutton.value = lang_gobutton + ' (' + newcount + ') (' + oldvalue + ' ' + lang_otherpage +' )';
|
||||
document.modform.gobutton.value = ipsclass.html_entity_decode( lang_gobutton ) + ' (' + newcount + ') (' + oldvalue + ' ' + ipsclass.html_entity_decode( lang_otherpage ) +' )';
|
||||
}
|
||||
else
|
||||
{
|
||||
document.modform.gobutton.value = lang_gobutton + ' (' + newcount + ')';
|
||||
document.modform.gobutton.value = ipsclass.html_entity_decode( lang_gobutton ) + ' (' + newcount + ')';
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -343,7 +342,7 @@ 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;
|
||||
window.location = url_bit + "&st=" + start + "&start=" + start;
|
||||
}
|
||||
}
|
||||
function boards_send_marker_update( fid, is_subforum )
|
||||
|
||||
@@ -1 +1 @@
|
||||
var input_red='input-warn';var input_green='input-ok';var input_ok_box='input-ok-content';var input_warn_box='input-warn-content';var img_blank='blank.gif';var img_tick='aff_tick.gif';var img_cross='aff_cross.gif';var uagent=navigator.userAgent.toLowerCase();var is_safari=((uagent.indexOf('safari')!=-1)||(navigator.vendor=="Apple Computer, Inc."));var is_opera=(uagent.indexOf('opera')!=-1);var is_webtv=(uagent.indexOf('webtv')!=-1);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_ie7=((is_ie)&&(uagent.indexOf("msie 7.")!=-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_kon=(uagent.indexOf('konqueror')!=-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);var ipb_pages_shown=0;var ipb_pages_array=new Array();var ipb_skin_url=ipb_skin_url?ipb_skin_url:ipb_var_image_url;function gbl_check_search_box(){try{var _cb=document.getElementById('gbl-search-checkbox');var _fd=document.getElementById('gbl-search-forums');if(_cb.checked&&ipb_input_f){_fd.value=ipb_input_f;}else{_fd.value='all';}}catch(error){}};function show_inline_messages(){var _string=window.location.toString();var _msg_box=null;if(_string.indexOf('?___msg=')!=-1||_string.indexOf(';___msg=')!=-1||_string.indexOf('&___msg=')!=-1){try{if(parent.document.getElementById('ipd-msg-text')){_msg_box=parent.document.getElementById('ipd-msg-text');}else{_msg_box=document.getElementById('ipd-msg-text');}}catch(error){alert(error);}var message=_string.replace( /^.*[\?;&]___msg=(.+?)(&.*$|$)/,"$1");message=unescape(message);if(message_pop_up_lang[message]){try{_msg_box.innerHTML=message_pop_up_lang[message];centerdiv=new center_div();centerdiv.divname='ipd-msg-wrapper';centerdiv.move_div();var _this_to=setTimeout("hide_inline_messages_instant()",2000);}catch(anerror){alert(message_pop_up_lang[message]);}}}};function show_inline_messages_instant(msg){_msg_box=document.getElementById('ipd-msg-text');_msg_box.innerHTML=message_pop_up_lang[msg];centerdiv=new center_div();centerdiv.divname='ipd-msg-wrapper';centerdiv.move_div();var _this_to=setTimeout("hide_inline_messages_instant()",2000);};function hide_inline_messages_instant(){try{document.getElementById('ipd-msg-wrapper').style.display='none';parent.document.getElementById('ipd-msg-wrapper').style.display='none';}catch(acold){}};function iframe_include(){this.iframe_id=null;this.iframe_obj=null;this.iframe_add_to_div=null;this.iframe_add_to_div_obj=null;this.iframe_main_wrapper=null;this.iframe_classname='GBL-component-iframe';this.ok_to_go=1;this.iframe_height=300;this.ajax='';};iframe_include.prototype.init=function(){try{this.iframe_add_to_div_obj=document.getElementById(this.iframe_add_to_div);}catch(error){this.ok_to_go=0;}};iframe_include.prototype.include=function(url){if(!this.ok_to_go){return false;}var iheight=parseInt(this.iframe_add_to_div_obj.style.height);var iwidth=this.iframe_add_to_div_obj.style.width;if(this.iframe_obj){this.iframe_add_to_div_obj.removeChild(this.iframe_obj);}this.iframe_obj=document.createElement('IFRAME');this.iframe_obj.src=url;this.iframe_obj.id=this.iframe_id;this.iframe_obj.name=this.iframe_id;this.iframe_obj.scrolling='no';this.iframe_obj.frameBorder='no';this.iframe_obj.border='0';this.iframe_obj.className=this.iframe_classname;this.iframe_obj.style.width=iwidth?iwidth:'100%';this.iframe_obj.style.height=iheight?iheight-5+'px':this.iframe_height+'px';this.iframe_obj.style.overflow='hidden';this.iframe_obj.style.padding='0px';this.iframe_obj.style.margin='0px';this.ajax=new ajax_request();this.iframe_add_to_div_obj.style.padding='0px';this.iframe_add_to_div_obj.style.margin='0px';this.iframe_obj.iframe_loaded=0;this.iframe_obj.iframe_init=0;this.iframe_obj._this=this;this.iframe_add_to_div_obj.style.overflow='';this.iframe_add_to_div_obj.appendChild(this.iframe_obj);this.ajax.show_loading("Loading content...");if(is_ie){this.iframe_obj.allowTransparency=true;this.iframe_obj.onreadystatechange=this.iframe_on_load_ie;}else{this.iframe_obj.onload=this.iframe_onload;}};iframe_include.prototype.iframe_onload=function(e){var _document=this._this.iframe_obj.contentDocument;if(is_safari){_document=window.frames[this.id].document;}if(!this.iframe_init){this.iframe_init=1;this.iframe_loaded=1;_document.onmousedown=menu_action_close;}else{this.iframe_loaded=1;_document.onmousedown=menu_action_close;}this._this.ajax.hide_loading();try{_document.getElementsByTagName('body')[0].style.padding='0px';_document.getElementsByTagName('body')[0].style.margin='0px';}catch(error){}var _new_height=parseInt(_document.getElementById(this._this.iframe_main_wrapper).offsetHeight);ifLine truncated
|
||||
var input_red='input-warn';var input_green='input-ok';var input_ok_box='input-ok-content';var input_warn_box='input-warn-content';var img_blank='blank.gif';var img_tick='aff_tick.gif';var img_cross='aff_cross.gif';var uagent=navigator.userAgent.toLowerCase();var is_safari=((uagent.indexOf('safari')!=-1)||(navigator.vendor=="Apple Computer, Inc."));var is_opera=(uagent.indexOf('opera')!=-1);var is_webtv=(uagent.indexOf('webtv')!=-1);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_ie7=((is_ie)&&(uagent.indexOf("msie 7.")!=-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_kon=(uagent.indexOf('konqueror')!=-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);var ipb_pages_shown=0;var ipb_pages_array=new Array();var ipb_skin_url=ipb_skin_url?ipb_skin_url:ipb_var_image_url;function gbl_check_search_box(){try{var _cb=document.getElementById('gbl-search-checkbox');var _fd=document.getElementById('gbl-search-forums');if(_cb.checked&&ipb_input_f){_fd.value=ipb_input_f;}else{_fd.value='all';}}catch(error){}};function show_inline_messages(){var _string=window.location.toString();var _msg_box=null;if(_string.indexOf('?___msg=')!=-1||_string.indexOf(';___msg=')!=-1||_string.indexOf('&___msg=')!=-1){try{if(parent.document.getElementById('ipd-msg-text')){_msg_box=parent.document.getElementById('ipd-msg-text');}else{_msg_box=document.getElementById('ipd-msg-text');}}catch(error){alert(error);}var message=_string.replace( /^.*[\?;&]___msg=(.+?)(&.*$|$)/,"$1");message=unescape(message);if(message_pop_up_lang[message]){try{_msg_box.innerHTML=message_pop_up_lang[message];centerdiv=new center_div();centerdiv.divname='ipd-msg-wrapper';centerdiv.move_div();var _this_to=setTimeout("hide_inline_messages_instant()",2000);}catch(anerror){alert(message_pop_up_lang[message]);}}}};function show_inline_messages_instant(msg){_msg_box=document.getElementById('ipd-msg-text');_msg_box.innerHTML=message_pop_up_lang[msg];centerdiv=new center_div();centerdiv.divname='ipd-msg-wrapper';centerdiv.move_div();var _this_to=setTimeout("hide_inline_messages_instant()",2000);};function hide_inline_messages_instant(){try{document.getElementById('ipd-msg-wrapper').style.display='none';parent.document.getElementById('ipd-msg-wrapper').style.display='none';}catch(acold){}};function iframe_include(){this.iframe_id=null;this.iframe_obj=null;this.iframe_add_to_div=null;this.iframe_add_to_div_obj=null;this.iframe_main_wrapper=null;this.iframe_classname='GBL-component-iframe';this.ok_to_go=1;this.iframe_height=300;this.ajax='';};iframe_include.prototype.init=function(){try{this.iframe_add_to_div_obj=document.getElementById(this.iframe_add_to_div);}catch(error){this.ok_to_go=0;}};iframe_include.prototype.include=function(url){if(!this.ok_to_go){return false;}var iheight=parseInt(this.iframe_add_to_div_obj.style.height);var iwidth=parseInt(this.iframe_add_to_div_obj.style.width);if(this.iframe_obj){this.iframe_add_to_div_obj.removeChild(this.iframe_obj);}this.iframe_obj=document.createElement('IFRAME');this.iframe_obj.src=url;this.iframe_obj.id=this.iframe_id;this.iframe_obj.name=this.iframe_id;this.iframe_obj.scrolling='no';this.iframe_obj.frameBorder='no';this.iframe_obj.border='0';this.iframe_obj.className=this.iframe_classname;this.iframe_obj.style.width=iwidth?iwidth+'px':'100%';this.iframe_obj.style.height=iheight?iheight-5+'px':this.iframe_height+'px';this.iframe_obj.style.overflow='hidden';this.iframe_obj.style.padding='0px';this.iframe_obj.style.margin='0px';this.ajax=new ajax_request();this.iframe_add_to_div_obj.style.padding='0px';this.iframe_add_to_div_obj.style.margin='0px';if(is_ie&&!is_ie7){this.iframe_add_to_div_obj.style.paddingLeft='6px';this.iframe_add_to_div_obj.style.paddingRight='6px';}this.iframe_obj.iframe_loaded=0;this.iframe_obj.iframe_init=0;this.iframe_obj._this=this;this.iframe_add_to_div_obj.style.overflow='';this.iframe_add_to_div_obj.appendChild(this.iframe_obj);this.ajax.show_loading(ajax_load_msg);if(is_ie){this.iframe_obj.allowTransparency=true;this.iframe_obj.onreadystatechange=this.iframe_on_load_ie;}else{this.iframe_obj.onload=this.iframe_onload;}};iframe_include.prototype.iframe_onload=function(e){var _document=this._this.iframe_obj.contentDocument;if(is_safari){_document=window.frames[this.id].document;}if(!this.iframe_init){this.iframe_init=1;this.iframe_loaded=1;_document.onmousedown=menu_action_close;}else{this.iframe_loaded=1;_document.onmousedown=menu_action_close;}this._this.ajax.hide_loading();try{_document.getElementsByTagName('body')[0].style.padding='0px';_document.getElementsByTagName('body')[0].sLine truncated
|
||||
@@ -1 +1 @@
|
||||
var gnp_div='get-new-posts_menu';var msg_div='get-new-msgs_menu';var mem_div='get-members';var divobj;var divopen=0;var xmlobj;var reg_img='';var myass_main;var myass_loaded=0;var pm_cycle_count=0;var search_cache={};var posts_st=0;function xml_show_new_posts(st){posts_st=st;xml_myassistant_init('posts');}function xml_myassistant_init(tab){myass_main=document.getElementById('get-myassistant');myass_drag=document.getElementById('myass-drag');myass_content=document.getElementById('myass-content');do_request_function=function(){if(!xmlobj_myass.readystate_ready_and_ok()){return;}var html=xmlobj_myass.xmlhandler.responseText;if(is_ie){html="<iframe id='myass-shim' src='"+ipb_var_image_url+"/iframe.html' class='iframshim' scrolling='no' frameborder='0' style='position:absolute; top:0px; left:0px; right:0px; display: none;'></iframe>"+html;}myass_content.innerHTML=html;if(is_ie){drag_html=myass_drag.innerHTML;main_drag_html="<iframe id='myass-shim-two' src='"+ipb_var_image_url+"/iframe.html' class='iframshim' scrolling='no' frameborder='0' style='position:absolute; top:0px; left:0px; right:0px; display: none;'></iframe>"+drag_html;myass_drag.innerHTML=main_drag_html;}if(is_ie){myass_shim=document.getElementById('myass-shim');myass_shim.style.width=myass_content.offsetWidth;myass_shim.style.height=myass_content.offsetHeight;myass_shim.style.zIndex=myass_content.style.zIndex-1;myass_shim.style.top=myass_content.style.top;myass_shim.style.left=myass_content.style.left;myass_shim.style.display="block";myass_shim_d=document.getElementById('myass-shim-two');myass_shim_d.style.width=myass_drag.offsetWidth;myass_shim_d.style.height=myass_drag.offsetHeight;myass_shim_d.style.zIndex=myass_drag.style.zIndex-1;myass_shim_d.style.top=myass_drag.style.top;myass_shim_d.style.left=myass_drag.style.left;myass_shim_d.style.display="block";}};xmlobj_myass=new ajax_request();xmlobj_myass.onreadystatechange(do_request_function);if(!tab){xmlobj_myass.process(ipb_var_base_url+'act=buddy&xml=1');}else if(tab=='newpms'){var limit_a=0;pm_cycle_count++;if(pm_cycle_count<=ipb_new_msgs){limit_a=pm_cycle_count-1;}else{pm_cycle_count=1;}xmlobj_myass.process(ipb_var_base_url+'act=buddy&xml=1&tab='+tab+'&limit='+limit_a);myass_content.style.width='398px';myass_content.style.overflow='auto';myass_content.style.overflowX='hidden';}else if(tab=='posts'){xmlobj_myass.process(ipb_var_base_url+'act=buddy&xml=1&tab='+tab+'&st='+posts_st);}else{xmlobj_myass.process(ipb_var_base_url+'act=buddy&xml=1&tab='+tab);}myass_main.style.position='absolute';myass_main.style.display='block';myass_main.style.zIndex=99;if(!myass_loaded){var my_width=0;var my_height=0;if(typeof(window.innerWidth)=='number'){my_width=window.innerWidth;my_height=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){my_width=document.documentElement.clientWidth;my_height=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){my_width=document.body.clientWidth;my_height=document.body.clientHeight;}var divheight=parseInt(myass_main.style.Height);var divwidth=parseInt(myass_main.style.Width);divheight=divheight?divheight:400;divwidth=divwidth?divwidth:400;var divxy=my_getcookie('ipb-myass-div');var co_ords;if(divxy&&divxy!=null){co_ords=divxy.split(',');if(co_ords.length){var final_width=co_ords[0];var final_height=co_ords[1];if(co_ords[0]>my_width){final_width=my_width-divwidth;}if(co_ords[1]>my_height){final_height=my_height-divheight;}myass_main.style.left=final_width+'px';myass_main.style.top=final_height+'px';}}else{myass_main.style.left=my_width/2-(divwidth/2)+'px';myass_main.style.top=my_height/2-(divheight/2)+'px';}Drag.cookiename='ipb-myass-div';Drag.init(myass_drag,myass_main);myass_loaded=1;}};function xml_myassistant_search(url){var keywords=document.getElementById('myass-search-input').value;var msg_field=document.getElementById('myass-search-message');var url=ipb_var_base_url+'act=Search&CODE=01&forums=all&cat_forum=forum&joinname=1&search_in=posts&result_type=topics&xml=1&keywords='+escape(keywords);if(keywords.length<4){msg_field.innerHTML=ipb_myass_chars_lang;return false;}if(search_cache[keywords]){msg_field.innerHTML=search_cache[keywords];return;}do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){xmlobj.show_loading();return;}xmlobj.hide_loading();var html=xmlobj.xmlhandler.responseText;msg_field.innerHTML=html;search_cache[keywords]=html;};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(url);};function xml_dst_set(url){do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){return;}var html=xmlobj.xmlhandler.responseText;if(html=='error'){window.location=url.replace('&xml=1','&xml=0');}};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(url);};function init_gd_image(){reg_img=document.getElementById('gd-antispam');try{regLine truncated
|
||||
var gnp_div='get-new-posts_menu';var msg_div='get-new-msgs_menu';var mem_div='get-members';var divobj;var divopen=0;var xmlobj;var reg_img='';var myass_main;var myass_loaded=0;var pm_cycle_count=0;var search_cache={};var posts_st=0;function xml_show_new_posts(st){posts_st=st;xml_myassistant_init('posts');}function xml_myassistant_init(tab){myass_main=document.getElementById('get-myassistant');myass_drag=document.getElementById('myass-drag');myass_content=document.getElementById('myass-content');do_request_function=function(){if(!xmlobj_myass.readystate_ready_and_ok()){return;}var html=xmlobj_myass.xmlhandler.responseText;if(is_ie){html="<iframe id='myass-shim' src='"+ipb_var_image_url+"/iframe.html' class='iframshim' scrolling='no' frameborder='0' style='position:absolute; top:0px; left:0px; right:0px; display: none;'></iframe>"+html;}myass_content.innerHTML=html;if(is_ie){drag_html=myass_drag.innerHTML;main_drag_html="<iframe id='myass-shim-two' src='"+ipb_var_image_url+"/iframe.html' class='iframshim' scrolling='no' frameborder='0' style='position:absolute; top:0px; left:0px; right:0px; display: none;'></iframe>"+drag_html;myass_drag.innerHTML=main_drag_html;}if(is_ie){myass_shim=document.getElementById('myass-shim');myass_shim.style.width=myass_content.offsetWidth;myass_shim.style.height=myass_content.offsetHeight;myass_shim.style.zIndex=myass_content.style.zIndex-1;myass_shim.style.top=myass_content.style.top;myass_shim.style.left=myass_content.style.left;myass_shim.style.display="block";myass_shim_d=document.getElementById('myass-shim-two');myass_shim_d.style.width=myass_drag.offsetWidth;myass_shim_d.style.height=myass_drag.offsetHeight;myass_shim_d.style.zIndex=myass_drag.style.zIndex-1;myass_shim_d.style.top=myass_drag.style.top;myass_shim_d.style.left=myass_drag.style.left;myass_shim_d.style.display="block";}};xmlobj_myass=new ajax_request();xmlobj_myass.onreadystatechange(do_request_function);if(!tab){xmlobj_myass.process(ipb_var_base_url+'act=buddy&xml=1');}else if(tab=='newpms'){var limit_a=0;pm_cycle_count++;if(pm_cycle_count<=ipb_new_msgs){limit_a=pm_cycle_count-1;}else{pm_cycle_count=1;}xmlobj_myass.process(ipb_var_base_url+'act=buddy&xml=1&tab='+tab+'&limit='+limit_a);myass_content.style.width='604px';myass_content.style.overflow='auto';myass_content.style.overflowX='hidden';}else if(tab=='posts'){xmlobj_myass.process(ipb_var_base_url+'act=buddy&xml=1&tab='+tab+'&st='+posts_st);}else{xmlobj_myass.process(ipb_var_base_url+'act=buddy&xml=1&tab='+tab);}myass_main.style.position='absolute';myass_main.style.display='block';myass_main.style.zIndex=99;if(!myass_loaded){var my_width=0;var my_height=0;if(typeof(window.innerWidth)=='number'){my_width=window.innerWidth;my_height=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){my_width=document.documentElement.clientWidth;my_height=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){my_width=document.body.clientWidth;my_height=document.body.clientHeight;}var divheight=parseInt(myass_main.style.Height);var divwidth=parseInt(myass_main.style.Width);divheight=divheight?divheight:400;divwidth=divwidth?divwidth:400;var divxy=my_getcookie('ipb-myass-div');var co_ords;if(divxy&&divxy!=null){co_ords=divxy.split(',');if(co_ords.length){var final_width=co_ords[0];var final_height=co_ords[1];if(co_ords[0]>my_width){final_width=my_width-divwidth;}if(co_ords[1]>my_height){final_height=my_height-divheight;}myass_main.style.left=final_width+'px';myass_main.style.top=final_height+'px';}}else{myass_main.style.left=my_width/2-(divwidth/2)+'px';myass_main.style.top=my_height/2-(divheight/2)+'px';}Drag.cookiename='ipb-myass-div';Drag.init(myass_drag,myass_main);myass_loaded=1;}};function xml_myassistant_search(url){var keywords=document.getElementById('myass-search-input').value;var msg_field=document.getElementById('myass-search-message');var url=ipb_var_base_url+'act=Search&CODE=01&forums=all&cat_forum=forum&joinname=1&search_in=posts&result_type=topics&xml=1&keywords='+escape(keywords);if(keywords.length<4){msg_field.innerHTML=ipb_myass_chars_lang;return false;}if(search_cache[keywords]){msg_field.innerHTML=search_cache[keywords];return;}do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){xmlobj.show_loading();return;}xmlobj.hide_loading();var html=xmlobj.xmlhandler.responseText;msg_field.innerHTML=html;search_cache[keywords]=html;};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(url);};function xml_dst_set(url){do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){return;}var html=xmlobj.xmlhandler.responseText;if(html=='error'){window.location=url.replace('&xml=1','&xml=0');}};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(url);};function init_gd_image(){var reg_img=document.getElementById('gd-antispam');tryLine truncated
|
||||
@@ -1,909 +1 @@
|
||||
//------------------------------------------
|
||||
// Invision Power Board v2.1
|
||||
// Register JS File
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
//
|
||||
// http://www.invisionboard.com
|
||||
//------------------------------------------
|
||||
|
||||
var user_display_name_max_length = 26;
|
||||
var reg_got_dname = 0;
|
||||
var reg_oktogo = 0;
|
||||
var reg_field_ids = new Array();
|
||||
var reg_img_ids = new Array();
|
||||
var reg_box_ids = new Array();
|
||||
var reg_msg_ids = new Array();
|
||||
|
||||
var ucp_dname_illegal_chars = new Array( '[', ']', '|', ',', ';', '$' );
|
||||
var ucp_dname_illegal_regex = '';
|
||||
|
||||
for ( var i in ucp_dname_illegal_chars )
|
||||
{
|
||||
ucp_dname_illegal_regex += '\\' + ucp_dname_illegal_chars[i];
|
||||
}
|
||||
|
||||
var error_email = 0;
|
||||
|
||||
var in_member_id = 0;
|
||||
|
||||
RegExp.escape = function(text)
|
||||
{
|
||||
if (!arguments.callee.sRE)
|
||||
{
|
||||
var specials = [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$' ];
|
||||
|
||||
arguments.callee.sRE = new RegExp( '(\\' + specials.join('|\\') + ')', 'g' );
|
||||
}
|
||||
|
||||
return text.replace(arguments.callee.sRE, '\\$1');
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT Reg form
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function init_reg_form( got_dname, register_method )
|
||||
{
|
||||
//------------------------------------------
|
||||
// INIT objects
|
||||
//------------------------------------------
|
||||
|
||||
reg_got_dname = got_dname;
|
||||
|
||||
//------------------------------------------
|
||||
// Fields...
|
||||
//------------------------------------------
|
||||
|
||||
if( register_method == 'username' )
|
||||
{
|
||||
reg_field_ids['name'] = document.getElementById( 'reg-name' );
|
||||
}
|
||||
|
||||
reg_field_ids['password'] = document.getElementById( 'reg-password' );
|
||||
reg_field_ids['password-check'] = document.getElementById( 'reg-password-check' );
|
||||
reg_field_ids['emailaddress'] = document.getElementById( 'reg-emailaddress' );
|
||||
reg_field_ids['emailaddress-two'] = document.getElementById( 'reg-emailaddress-two' );
|
||||
|
||||
//------------------------------------------
|
||||
// Images
|
||||
//------------------------------------------
|
||||
|
||||
if( register_method == 'username' )
|
||||
{
|
||||
reg_img_ids['name'] = document.getElementById( 'img-name' );
|
||||
}
|
||||
|
||||
reg_img_ids['password'] = document.getElementById( 'img-password' );
|
||||
reg_img_ids['emailaddress'] = document.getElementById( 'img-emailaddress' );
|
||||
|
||||
//------------------------------------------
|
||||
// Boxes
|
||||
//------------------------------------------
|
||||
|
||||
if( register_method == 'username' )
|
||||
{
|
||||
reg_box_ids['name'] = document.getElementById( 'box-name' );
|
||||
}
|
||||
|
||||
reg_box_ids['password'] = document.getElementById( 'box-password' );
|
||||
reg_box_ids['emailaddress'] = document.getElementById( 'box-emailaddress' );
|
||||
|
||||
//------------------------------------------
|
||||
// Messages
|
||||
//------------------------------------------
|
||||
|
||||
if ( register_method == 'username' )
|
||||
{
|
||||
reg_msg_ids['name'] = document.getElementById( 'msg-name' );
|
||||
}
|
||||
|
||||
reg_msg_ids['password'] = document.getElementById( 'msg-password' );
|
||||
reg_msg_ids['emailaddress'] = document.getElementById( 'msg-emailaddress' );
|
||||
|
||||
//------------------------------------------
|
||||
// Set up onblur
|
||||
//------------------------------------------
|
||||
|
||||
if( register_method == 'username' )
|
||||
{
|
||||
reg_field_ids['name'].onblur = check_user_name;
|
||||
}
|
||||
|
||||
reg_field_ids['password-check'].onblur = check_passwords;
|
||||
reg_field_ids['emailaddress'].onblur = check_email_addresses_one;
|
||||
reg_field_ids['emailaddress-two'].onblur = check_email_addresses;
|
||||
|
||||
//------------------------------------------
|
||||
// Already got error messages?
|
||||
//------------------------------------------
|
||||
|
||||
if ( register_method == 'username' )
|
||||
{
|
||||
if ( ! reg_msg_ids['name'].innerHTML )
|
||||
{
|
||||
reg_box_ids['name'].style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! reg_msg_ids['password'].innerHTML )
|
||||
{
|
||||
reg_box_ids['password'].style.display = 'none';
|
||||
}
|
||||
|
||||
if ( ! reg_msg_ids['emailaddress'].innerHTML )
|
||||
{
|
||||
reg_box_ids['emailaddress'].style.display = 'none';
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// Display name. ..
|
||||
//------------------------------------------
|
||||
|
||||
if ( reg_got_dname )
|
||||
{
|
||||
reg_field_ids['dname'] = document.getElementById( 'reg-members-display-name' );
|
||||
reg_box_ids['dname'] = document.getElementById( 'box-dname' );
|
||||
reg_msg_ids['dname'] = document.getElementById( 'msg-dname' );
|
||||
reg_img_ids['dname'] = document.getElementById( 'img-members-display-name' );
|
||||
|
||||
if ( ! reg_msg_ids['dname'].innerHTML )
|
||||
{
|
||||
reg_box_ids['dname'].style.display = 'none';
|
||||
}
|
||||
|
||||
reg_field_ids['dname'].onblur = check_display_name;
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT Reg form
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function init_complete_login_form()
|
||||
{
|
||||
//------------------------------------------
|
||||
// INIT objects
|
||||
//------------------------------------------
|
||||
|
||||
reg_got_dname = got_dname;
|
||||
|
||||
//------------------------------------------
|
||||
// Fields...
|
||||
//------------------------------------------
|
||||
|
||||
reg_field_ids['emailaddress'] = document.getElementById( 'reg-emailaddress' );
|
||||
reg_field_ids['emailaddress-two'] = document.getElementById( 'reg-emailaddress-two' );
|
||||
|
||||
//------------------------------------------
|
||||
// Images
|
||||
//------------------------------------------
|
||||
|
||||
reg_img_ids['emailaddress'] = document.getElementById( 'img-emailaddress' );
|
||||
|
||||
//------------------------------------------
|
||||
// Boxes
|
||||
//------------------------------------------
|
||||
|
||||
reg_box_ids['emailaddress'] = document.getElementById( 'box-emailaddress' );
|
||||
|
||||
//------------------------------------------
|
||||
// Messages
|
||||
//------------------------------------------
|
||||
|
||||
reg_msg_ids['emailaddress'] = document.getElementById( 'msg-emailaddress' );
|
||||
|
||||
//------------------------------------------
|
||||
// Set up onblur
|
||||
//------------------------------------------
|
||||
|
||||
reg_field_ids['emailaddress'].onblur = check_email_addresses_one;
|
||||
reg_field_ids['emailaddress-two'].onblur = check_email_addresses;
|
||||
|
||||
//------------------------------------------
|
||||
// Already got error messages?
|
||||
//------------------------------------------
|
||||
|
||||
if ( ! reg_msg_ids['emailaddress'].innerHTML )
|
||||
{
|
||||
reg_box_ids['emailaddress'].style.display = 'none';
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// Display name...
|
||||
//------------------------------------------
|
||||
|
||||
if ( reg_got_dname )
|
||||
{
|
||||
reg_field_ids['dname'] = document.getElementById( 'reg-members-display-name' );
|
||||
reg_box_ids['dname'] = document.getElementById( 'box-dname' );
|
||||
reg_msg_ids['dname'] = document.getElementById( 'msg-dname' );
|
||||
reg_img_ids['dname'] = document.getElementById( 'img-members-display-name' );
|
||||
|
||||
if ( ! reg_msg_ids['dname'].innerHTML )
|
||||
{
|
||||
reg_box_ids['dname'].style.display = 'none';
|
||||
}
|
||||
|
||||
reg_field_ids['dname'].onblur = check_display_name;
|
||||
}
|
||||
|
||||
in_member_id = member_id;
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Check email address validity
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function check_email_addresses_one( event )
|
||||
{
|
||||
//----------------------------------
|
||||
// INIT
|
||||
//----------------------------------
|
||||
|
||||
var error_found = '';
|
||||
|
||||
//----------------------------------
|
||||
// Ajax: check for existing email address
|
||||
//----------------------------------
|
||||
|
||||
if ( use_enhanced_js && reg_field_ids['emailaddress'].value )
|
||||
{
|
||||
var url = ipb_var_base_url+'act=xmlout&do=check-email-address&email='+escape( reg_field_ids['emailaddress'].value );
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Main function to do on request
|
||||
// Must be defined first!!
|
||||
/*--------------------------------------------*/
|
||||
|
||||
do_request_function = function()
|
||||
{
|
||||
//----------------------------------
|
||||
// Ignore unless we're ready to go
|
||||
//----------------------------------
|
||||
|
||||
if ( ! xmlobj.readystate_ready_and_ok() )
|
||||
{
|
||||
// Could do a little loading graphic here?
|
||||
return;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// INIT
|
||||
//----------------------------------
|
||||
|
||||
var html = xmlobj.xmlhandler.responseText;
|
||||
|
||||
if ( html == 'found' )
|
||||
{
|
||||
error_found += reg_error_email_taken + "<br />";
|
||||
}
|
||||
if ( html == 'banned' )
|
||||
{
|
||||
error_found += reg_error_email_ban + "<br />";
|
||||
}
|
||||
if ( html == 'invalid' )
|
||||
{
|
||||
error_found += reg_error_email_invalid + "<br />";
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Show errors
|
||||
//----------------------------------
|
||||
|
||||
if ( error_found )
|
||||
{
|
||||
reg_field_ids['emailaddress'].className = input_red;
|
||||
reg_img_ids['emailaddress'].src = ipb_var_image_url + '/' + img_cross;
|
||||
reg_msg_ids['emailaddress'].innerHTML = error_found;
|
||||
reg_box_ids['emailaddress'].style.display = 'block';
|
||||
error_email = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
error_email = 0;
|
||||
}
|
||||
|
||||
error_found = '';
|
||||
};
|
||||
|
||||
//----------------------------------
|
||||
// LOAD XML
|
||||
//----------------------------------
|
||||
|
||||
xmlobj = new ajax_request();
|
||||
xmlobj.onreadystatechange( do_request_function );
|
||||
xmlobj.process( url );
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Check email addresses
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function check_email_addresses( event )
|
||||
{
|
||||
//----------------------------------
|
||||
// INIT
|
||||
//----------------------------------
|
||||
|
||||
var error_found = '';
|
||||
|
||||
//----------------------------------
|
||||
// Check
|
||||
//----------------------------------
|
||||
|
||||
if ( ! reg_field_ids['emailaddress'].value.match( /[@\.]/ ) )
|
||||
{
|
||||
error_found += reg_error_email_missing + "<br />";
|
||||
}
|
||||
|
||||
if ( ! reg_field_ids['emailaddress'].value || ! reg_field_ids['emailaddress-two'].value )
|
||||
{
|
||||
error_found += reg_error_email_missing + "<br />";
|
||||
}
|
||||
|
||||
if ( reg_field_ids['emailaddress'].value != reg_field_ids['emailaddress-two'].value )
|
||||
{
|
||||
error_found += reg_error_email_nm + "<br />";
|
||||
}
|
||||
|
||||
if ( error_found )
|
||||
{
|
||||
reg_field_ids['emailaddress'].className = input_red;
|
||||
reg_field_ids['emailaddress-two'].className = input_red;
|
||||
reg_img_ids['emailaddress'].src = ipb_var_image_url + '/' + img_cross;
|
||||
reg_msg_ids['emailaddress'].innerHTML = error_found;
|
||||
reg_box_ids['emailaddress'].style.display = 'block';
|
||||
error_email = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
error_email = 0;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// No error....
|
||||
//----------------------------------
|
||||
|
||||
if ( error_email == 0 )
|
||||
{
|
||||
check_email_addresses_one();
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Still no errors...
|
||||
//----------------------------------
|
||||
|
||||
if ( error_email == 0 )
|
||||
{
|
||||
reg_field_ids['emailaddress'].className = input_green;
|
||||
reg_field_ids['emailaddress-two'].className = input_green;
|
||||
reg_img_ids['emailaddress'].src = ipb_var_image_url + '/' + img_tick;
|
||||
reg_box_ids['emailaddress'].style.display = 'none';
|
||||
reg_msg_ids['emailaddress'].innerHTML = '';
|
||||
}
|
||||
|
||||
if( reg_field_ids['emailaddress'].className == input_red )
|
||||
{
|
||||
reg_field_ids['emailaddress-two'].className = input_red;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Check passwords match
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function check_passwords( event )
|
||||
{
|
||||
//----------------------------------
|
||||
// INIT
|
||||
//----------------------------------
|
||||
|
||||
var error_found = '';
|
||||
|
||||
//----------------------------------
|
||||
// Check
|
||||
//----------------------------------
|
||||
|
||||
if ( ! reg_field_ids['password'].value || ! reg_field_ids['password-check'].value )
|
||||
{
|
||||
error_found += reg_error_no_pass + "<br />";
|
||||
}
|
||||
|
||||
if ( reg_field_ids['password'].value != reg_field_ids['password-check'].value )
|
||||
{
|
||||
error_found += reg_error_pass_nm + "<br />";
|
||||
}
|
||||
|
||||
if ( error_found )
|
||||
{
|
||||
reg_field_ids['password'].className = input_red;
|
||||
reg_field_ids['password-check'].className = input_red;
|
||||
reg_img_ids['password'].src = ipb_var_image_url + '/' + img_cross;
|
||||
reg_msg_ids['password'].innerHTML = error_found;
|
||||
reg_box_ids['password'].style.display = 'block';
|
||||
}
|
||||
else
|
||||
{
|
||||
reg_field_ids['password'].className = input_green;
|
||||
reg_field_ids['password-check'].className = input_green;
|
||||
reg_img_ids['password'].src = ipb_var_image_url + '/' + img_tick;
|
||||
reg_box_ids['password'].style.display = 'none';
|
||||
reg_msg_ids['password'].innerHTML = '';
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Check display name
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function check_display_name( event )
|
||||
{
|
||||
//----------------------------------
|
||||
// INIT
|
||||
//----------------------------------
|
||||
|
||||
var error_found = '';
|
||||
|
||||
//----------------------------------
|
||||
// Make sure we have sommat
|
||||
//----------------------------------
|
||||
|
||||
if ( ! reg_field_ids['dname'].value || reg_field_ids['dname'].value.length < 3 || reg_field_ids['dname'].value.length > user_display_name_max_length )
|
||||
{
|
||||
error_found += reg_error_no_name + "<br />";
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Check for illegal chars
|
||||
//----------------------------------
|
||||
|
||||
if ( reg_field_ids['dname'].value.match( new RegExp( "[" + ucp_dname_illegal_regex + "]" ) ) )
|
||||
{
|
||||
error_found += reg_error_chars + "<br />";
|
||||
}
|
||||
|
||||
if ( allowed_chars != "" )
|
||||
{
|
||||
var test_regex = new RegExp();
|
||||
test_regex.compile( "^[" + RegExp.escape(allowed_chars) + "]+$" );
|
||||
|
||||
if ( !test_regex.test( reg_field_ids['dname'].value ) )
|
||||
{
|
||||
error_found += allowed_error + "<br />";
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Ajax: check for existing member name
|
||||
//----------------------------------
|
||||
|
||||
if ( use_enhanced_js && reg_field_ids['dname'].value )
|
||||
{
|
||||
var url = ipb_var_base_url+'act=xmlout&do=check-display-name&name='+escape( reg_field_ids['dname'].value );
|
||||
|
||||
// Complete reg form?
|
||||
|
||||
if ( in_member_id )
|
||||
{
|
||||
url += '&id=' + in_member_id;
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Main function to do on request
|
||||
// Must be defined first!!
|
||||
/*--------------------------------------------*/
|
||||
|
||||
do_request_function = function()
|
||||
{
|
||||
//----------------------------------
|
||||
// Ignore unless we're ready to go
|
||||
//----------------------------------
|
||||
|
||||
if ( ! xmlobj.readystate_ready_and_ok() )
|
||||
{
|
||||
// Could do a little loading graphic here?
|
||||
return;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// INIT
|
||||
//----------------------------------
|
||||
|
||||
var html = xmlobj.xmlhandler.responseText;
|
||||
|
||||
if ( html == 'found' )
|
||||
{
|
||||
error_found += reg_error_taken + "<br />";
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Show errors
|
||||
//----------------------------------
|
||||
|
||||
if ( error_found )
|
||||
{
|
||||
reg_field_ids['dname'].className = input_red;
|
||||
reg_img_ids['dname'].src = ipb_var_image_url + '/' + img_cross;
|
||||
reg_msg_ids['dname'].innerHTML = error_found;
|
||||
reg_box_ids['dname'].style.display = 'block';
|
||||
}
|
||||
else
|
||||
{
|
||||
reg_field_ids['dname'].className = input_green;
|
||||
reg_img_ids['dname'].src = ipb_var_image_url + '/' + img_tick;
|
||||
reg_box_ids['dname'].style.display = 'none';
|
||||
reg_msg_ids['dname'].innerHTML = '';
|
||||
}
|
||||
|
||||
error_found = '';
|
||||
};
|
||||
|
||||
//----------------------------------
|
||||
// LOAD XML
|
||||
//----------------------------------
|
||||
|
||||
xmlobj = new ajax_request();
|
||||
xmlobj.onreadystatechange( do_request_function );
|
||||
xmlobj.process( url );
|
||||
}
|
||||
else
|
||||
{
|
||||
//----------------------------------
|
||||
// Show errors
|
||||
//----------------------------------
|
||||
|
||||
if ( error_found )
|
||||
{
|
||||
reg_field_ids['dname'].className = input_red;
|
||||
reg_img_ids['dname'].src = ipb_var_image_url + '/' + img_cross;
|
||||
reg_msg_ids['dname'].innerHTML = error_found;
|
||||
reg_box_ids['dname'].style.display = 'block';
|
||||
}
|
||||
else
|
||||
{
|
||||
reg_field_ids['dname'].className = input_green;
|
||||
reg_img_ids['dname'].src = ipb_var_image_url + '/' + img_tick;
|
||||
reg_box_ids['dname'].style.display = 'none';
|
||||
reg_msg_ids['dname'].innerHTML = '';
|
||||
}
|
||||
|
||||
error_found = '';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Check username
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function check_user_name( event )
|
||||
{
|
||||
//----------------------------------
|
||||
// INIT
|
||||
//----------------------------------
|
||||
|
||||
var error_found = '';
|
||||
|
||||
//----------------------------------
|
||||
// Make sure we have sommat
|
||||
//----------------------------------
|
||||
|
||||
if ( ! reg_field_ids['name'].value || reg_field_ids['name'].value.length < 3 || reg_field_ids['name'].value.length > user_display_name_max_length )
|
||||
{
|
||||
error_found += reg_error_username_none + "<br />";
|
||||
}
|
||||
|
||||
if ( allowed_chars != "" )
|
||||
{
|
||||
var test_regex = new RegExp();
|
||||
test_regex.compile( "^[" + RegExp.escape(allowed_chars) + "]+$" );
|
||||
|
||||
if ( !test_regex.test( reg_field_ids['name'].value ) )
|
||||
{
|
||||
error_found += allowed_error + "<br />";
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Ajax: check for existing member name
|
||||
//----------------------------------
|
||||
|
||||
if ( use_enhanced_js && reg_field_ids['name'].value )
|
||||
{
|
||||
// + symbols get stripped due to escape
|
||||
reg_field_ids['name'].value = reg_field_ids['name'].value.replace("+", "+");
|
||||
|
||||
//----------------------------------
|
||||
// Get new xhttp obj
|
||||
//----------------------------------
|
||||
|
||||
var url = ipb_var_base_url+'act=xmlout&do=check-user-name&name='+escape( reg_field_ids['name'].value );
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Main function to do on request
|
||||
// Must be defined first!!
|
||||
/*--------------------------------------------*/
|
||||
|
||||
do_request_function = function()
|
||||
{
|
||||
//----------------------------------
|
||||
// Ignore unless we're ready to go
|
||||
//----------------------------------
|
||||
|
||||
if ( ! xmlobj.readystate_ready_and_ok() )
|
||||
{
|
||||
// Could do a little loading graphic here?
|
||||
return;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// INIT
|
||||
//----------------------------------
|
||||
|
||||
var html = xmlobj.xmlhandler.responseText;
|
||||
|
||||
if ( html == 'found' )
|
||||
{
|
||||
error_found += reg_error_username_taken + "<br />";
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Show errors
|
||||
//----------------------------------
|
||||
|
||||
if ( error_found )
|
||||
{
|
||||
reg_field_ids['name'].className = input_red;
|
||||
reg_img_ids['name'].src = ipb_var_image_url + '/' + img_cross;
|
||||
reg_msg_ids['name'].innerHTML = error_found;
|
||||
reg_box_ids['name'].style.display = 'block';
|
||||
}
|
||||
else
|
||||
{
|
||||
reg_field_ids['name'].className = input_green;
|
||||
reg_img_ids['name'].src = ipb_var_image_url + '/' + img_tick;
|
||||
reg_box_ids['name'].style.display = 'none';
|
||||
reg_msg_ids['name'].innerHTML = '';
|
||||
}
|
||||
|
||||
error_found = '';
|
||||
};
|
||||
|
||||
//----------------------------------
|
||||
// LOAD XML
|
||||
//----------------------------------
|
||||
|
||||
xmlobj = new ajax_request();
|
||||
xmlobj.onreadystatechange( do_request_function );
|
||||
xmlobj.process( url );
|
||||
}
|
||||
else
|
||||
{
|
||||
//----------------------------------
|
||||
// Show errors
|
||||
//----------------------------------
|
||||
|
||||
if ( error_found )
|
||||
{
|
||||
reg_field_ids['name'].className = input_red;
|
||||
reg_img_ids['name'].src = ipb_var_image_url + '/' + img_cross;
|
||||
reg_msg_ids['name'].innerHTML = error_found;
|
||||
reg_box_ids['name'].style.display = 'block';
|
||||
}
|
||||
else
|
||||
{
|
||||
reg_field_ids['name'].className = input_green;
|
||||
reg_img_ids['name'].src = ipb_var_image_url + '/' + img_tick;
|
||||
reg_box_ids['name'].style.display = 'none';
|
||||
reg_msg_ids['name'].innerHTML = '';
|
||||
}
|
||||
|
||||
error_found = '';
|
||||
}
|
||||
|
||||
reg_field_ids['name'].value = reg_field_ids['name'].value.replace("+", "+");
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Validate the complete log in form
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function validate_complete_login_form( event )
|
||||
{
|
||||
//------------------------------------------
|
||||
// Simply run the functions
|
||||
//------------------------------------------
|
||||
|
||||
reg_oktogo = 1;
|
||||
|
||||
if ( ! email_ok )
|
||||
{
|
||||
check_email_addresses( event );
|
||||
|
||||
//------------------------------------------
|
||||
// Got error messages
|
||||
//------------------------------------------
|
||||
|
||||
if ( reg_msg_ids['emailaddress'].innerHTML )
|
||||
{
|
||||
reg_oktogo = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// Display name...
|
||||
//------------------------------------------
|
||||
|
||||
if ( reg_got_dname )
|
||||
{
|
||||
check_display_name( event );
|
||||
|
||||
if ( reg_msg_ids['dname'].innerHTML )
|
||||
{
|
||||
reg_oktogo = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// Return
|
||||
//------------------------------------------
|
||||
|
||||
return reg_oktogo ? true : false;
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Validate the registration form
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function validate_reg_form( event )
|
||||
{
|
||||
//------------------------------------------
|
||||
// Simply run the functions
|
||||
//------------------------------------------
|
||||
|
||||
reg_oktogo = 1;
|
||||
|
||||
check_email_addresses( event );
|
||||
check_passwords( event );
|
||||
check_user_name( event );
|
||||
|
||||
//------------------------------------------
|
||||
// Got error messages
|
||||
//------------------------------------------
|
||||
|
||||
if ( reg_msg_ids['name'].innerHTML )
|
||||
{
|
||||
reg_oktogo = 0;
|
||||
}
|
||||
|
||||
if ( reg_msg_ids['password'].innerHTML )
|
||||
{
|
||||
reg_oktogo = 0;
|
||||
}
|
||||
|
||||
if ( reg_msg_ids['emailaddress'].innerHTML )
|
||||
{
|
||||
reg_oktogo = 0;
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// Display name...
|
||||
//------------------------------------------
|
||||
|
||||
if ( reg_got_dname )
|
||||
{
|
||||
check_display_name( event );
|
||||
|
||||
if ( reg_msg_ids['dname'].innerHTML )
|
||||
{
|
||||
reg_oktogo = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// Return
|
||||
//------------------------------------------
|
||||
|
||||
return reg_oktogo ? true : false;
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// They are a COPPA :D
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function coppa_save()
|
||||
{
|
||||
//------------------------------------------
|
||||
// Set cookie
|
||||
//------------------------------------------
|
||||
|
||||
my_setcookie( 'coppa', 'yes', 1 );
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Run from the COPPA
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function coppa_cancel()
|
||||
{
|
||||
//------------------------------------------
|
||||
// Set cookie
|
||||
//------------------------------------------
|
||||
|
||||
//my_setcookie( 'coppa', '0', 1 );
|
||||
locationjump( '' );
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Run from the COPPA
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function coppa_check()
|
||||
{
|
||||
//------------------------------------------
|
||||
// Set cookie
|
||||
//------------------------------------------
|
||||
|
||||
var coppa_check = my_getcookie( 'coppa' );
|
||||
|
||||
if ( coppa_check == 'yes' )
|
||||
{
|
||||
alert( coppa_bounce );
|
||||
|
||||
locationjump( 'act=reg&CODE=coppa_two' );
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Show a more info button?
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
function reg_get_more_check()
|
||||
{
|
||||
var dropdown = document.getElementById( 'subspackage' );
|
||||
var chosenid = dropdown.options[dropdown.selectedIndex].value;
|
||||
|
||||
if ( ! chosenid )
|
||||
{
|
||||
chosenid = 0;
|
||||
}
|
||||
|
||||
if ( subdesc[chosenid] )
|
||||
{
|
||||
document.getElementById( 'reg-get-more-info' ).style.display = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById( 'reg-get-more-info' ).style.display = 'none';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Show subs more info form
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function get_more_info()
|
||||
{
|
||||
var dropdown = document.getElementById( 'subspackage' );
|
||||
var chosenid = dropdown.options[dropdown.selectedIndex].value;
|
||||
|
||||
if ( ! chosenid )
|
||||
{
|
||||
chosenid = 0;
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// Toggle view...
|
||||
//------------------------------------------
|
||||
|
||||
if ( subdesc[chosenid] )
|
||||
{
|
||||
document.getElementById('pkdesc').innerHTML = subdesc[chosenid];
|
||||
|
||||
toggleview('subspkdiv');
|
||||
}
|
||||
};
|
||||
var user_display_name_max_length=26;var reg_got_dname=0;var reg_oktogo=0;var reg_field_ids=new Array();var reg_img_ids=new Array();var reg_box_ids=new Array();var reg_msg_ids=new Array();var ucp_dname_illegal_chars=new Array('[',']','|',',',';','$');var ucp_dname_illegal_regex='';for(var i in ucp_dname_illegal_chars){ucp_dname_illegal_regex+='\\'+ucp_dname_illegal_chars[i];}var error_email=0;var in_member_id=0;RegExp.escape=function(text){if(!arguments.callee.sRE){var specials=['/','.','*','+','?','|','(',')','[',']','{','}','\\','$'];arguments.callee.sRE=new RegExp('(\\'+specials.join('|\\')+')','g');}return text.replace(arguments.callee.sRE,'\\$1');};function init_reg_form(got_dname,register_method){reg_got_dname=got_dname;if(register_method=='username'){reg_field_ids['name']=document.getElementById('reg-name');}reg_field_ids['password']=document.getElementById('reg-password');reg_field_ids['password-check']=document.getElementById('reg-password-check');reg_field_ids['emailaddress']=document.getElementById('reg-emailaddress');reg_field_ids['emailaddress-two']=document.getElementById('reg-emailaddress-two');if(register_method=='username'){reg_img_ids['name']=document.getElementById('img-name');}reg_img_ids['password']=document.getElementById('img-password');reg_img_ids['emailaddress']=document.getElementById('img-emailaddress');if(register_method=='username'){reg_box_ids['name']=document.getElementById('box-name');}reg_box_ids['password']=document.getElementById('box-password');reg_box_ids['emailaddress']=document.getElementById('box-emailaddress');if(register_method=='username'){reg_msg_ids['name']=document.getElementById('msg-name');}reg_msg_ids['password']=document.getElementById('msg-password');reg_msg_ids['emailaddress']=document.getElementById('msg-emailaddress');if(register_method=='username'){reg_field_ids['name'].onblur=check_user_name;}reg_field_ids['password-check'].onblur=check_passwords;reg_field_ids['emailaddress'].onblur=check_email_addresses_one;reg_field_ids['emailaddress-two'].onblur=check_email_addresses;if(register_method=='username'){if(!reg_msg_ids['name'].innerHTML){reg_box_ids['name'].style.display='none';}}if(!reg_msg_ids['password'].innerHTML){reg_box_ids['password'].style.display='none';}if(!reg_msg_ids['emailaddress'].innerHTML){reg_box_ids['emailaddress'].style.display='none';}if(reg_got_dname){reg_field_ids['dname']=document.getElementById('reg-members-display-name');reg_box_ids['dname']=document.getElementById('box-dname');reg_msg_ids['dname']=document.getElementById('msg-dname');reg_img_ids['dname']=document.getElementById('img-members-display-name');if(!reg_msg_ids['dname'].innerHTML){reg_box_ids['dname'].style.display='none';}reg_field_ids['dname'].onblur=check_display_name;}};function init_complete_login_form(){reg_got_dname=got_dname;if(!reg_email_ok){reg_field_ids['emailaddress']=document.getElementById('reg-emailaddress');reg_field_ids['emailaddress-two']=document.getElementById('reg-emailaddress-two');reg_img_ids['emailaddress']=document.getElementById('img-emailaddress');reg_box_ids['emailaddress']=document.getElementById('box-emailaddress');reg_msg_ids['emailaddress']=document.getElementById('msg-emailaddress');reg_field_ids['emailaddress'].onblur=check_email_addresses_one;reg_field_ids['emailaddress-two'].onblur=check_email_addresses;if(!reg_msg_ids['emailaddress'].innerHTML){reg_box_ids['emailaddress'].style.display='none';}}if(reg_got_dname){reg_field_ids['dname']=document.getElementById('reg-members-display-name');reg_box_ids['dname']=document.getElementById('box-dname');reg_msg_ids['dname']=document.getElementById('msg-dname');reg_img_ids['dname']=document.getElementById('img-members-display-name');if(!reg_msg_ids['dname'].innerHTML){reg_box_ids['dname'].style.display='none';}reg_field_ids['dname'].onblur=check_display_name;}in_member_id=member_id;};function check_email_addresses_one(event){var error_found='';if(use_enhanced_js&®_field_ids['emailaddress'].value){var url=ipb_var_base_url+'act=xmlout&do=check-email-address&email='+escape(reg_field_ids['emailaddress'].value);do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){return;}var html=xmlobj.xmlhandler.responseText;if(html=='found'){error_found+=reg_error_email_taken+"<br />";}if(html=='banned'){error_found+=reg_error_email_ban+"<br />";}if(html=='invalid'){error_found+=reg_error_email_invalid+"<br />";}if(error_found){reg_field_ids['emailaddress'].className=input_red;reg_img_ids['emailaddress'].src=ipb_var_image_url+'/'+img_cross;reg_msg_ids['emailaddress'].innerHTML=error_found;reg_box_ids['emailaddress'].style.display='block';error_email=1;}else{error_email=0;}error_found='';};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(url);}};function check_email_addresses(event){var error_found='';if(!reg_field_ids['emailaddress'].value.match( /[@\.]/)){error_found+=reg_error_email_missing+"<br />";}if(!reg_field_ids['emailaddress'].value||!reg_field_idLine truncated
|
||||
@@ -1 +1 @@
|
||||
var mystored_selection='';var post_cache=new Array();var ajax_loaded=1;var ignore_cache=new Array();var rate_value=0;add_onload_event(fix_linked_image_sizes);function fix_linked_image_sizes_attach_thumb(attach_id,width,height,file_size){var _img='<img src="'+ipb_var_image_url+'/img-resized.png" style="vertical-align:middle" border="0" alt="" />';var img_obj=document.getElementById('ipb-attach-img-'+attach_id);var div_obj=document.getElementById('ipb-attach-div-'+attach_id);var ct_obj=document.getElementById('ipb-attach-ct-'+attach_id);var cb_obj=document.getElementById('ipb-attach-cb-'+attach_id);var url_obj=document.getElementById('ipb-attach-url-'+attach_id);var tbl_obj=document.getElementById('ipb-attach-table-'+attach_id);var _width=parseInt(img_obj.width)?parseInt(img_obj.width):parseInt(img_obj.style.width);var _height=parseInt(img_obj.height)?parseInt(img_obj.height):parseInt(img_obj.style.height);var _padding=5;var _percent=0;if(is_ie){_width=parseInt(img_obj.currentStyle['width']);_height=parseInt(img_obj.currentStyle['height']);}if(is_safari){tbl_obj.style.display='inline-block';}if(width&&height){_percent=Math.ceil(100-parseInt(_width/width*100));}img_obj.className='ipb';img_obj.title=ipb_global_lang['click_to_view'];img_obj.onmouseover=fix_attach_images_mouseover;img_obj.onclick=function(event){ipsclass.pop_up_window(url_obj.href,width+20,height+20);ipsclass.cancel_bubble(event);};div_obj.style.width=(_width>140?_width:140)+'px';div_obj.style.height=_height+(_padding*2)+28+'px';div_obj.className='resized-linked-image';div_obj.style.paddingTop=_padding+"px";div_obj.style.paddingBottom=_padding+"px";div_obj.style.paddingLeft=_padding+3+"px";div_obj.style.paddingRight=_padding+3+"px";div_obj.style.textAlign='center';div_obj.title=ipb_global_lang['click_to_view'];ct_obj.style.fontSize='9px';cb_obj.style.fontSize='9px';cb_obj.style.textAlign='center';if(_percent>0){ct_obj.innerHTML=_img+' '+ipsclass.lang_build_string(ipb_global_lang['image_attach_percent'],_percent);}else{ct_obj.innerHTML=_img+' '+ipb_global_lang['image_attach_no_percent'];}cb_obj.innerHTML="";if(width&&height){cb_obj.innerHTML=ipsclass.lang_build_string(ipb_global_lang['image_attach_dims'],width,height);}cb_obj.innerHTML+=ipsclass.lang_build_string(ipb_global_lang['image_attach_size'],file_size);}function fix_linked_image_sizes(){if(ipsclass.settings['do_linked_resize']!=1){return true;}var images=document.getElementsByTagName('IMG');var _padding=4;var _count=0;var _img='<img src="'+ipb_var_image_url+'/img-resized.png" style="vertical-align:middle" border="0" alt="" />';var _img2='<img src="'+ipb_var_image_url+'/folder_attach_images/attach_zoom_in.png" style="vertical-align:middle" border="0" alt="" />';var _sw=screen.width*(parseInt(ipsclass.settings['resize_percent'])/100);for(var i=0;i<images.length;i++){if(images[i].className=='linked-image'){_count++;if(images[i].width>_sw){var _width=images[i].width;var _height=images[i].height;var _percent=0;images[i].width=_sw;if(images[i].width<_width&&_width>0&&images[i].width>0){_percent=Math.ceil(parseInt(images[i].width/_width*100));}images[i].id='--ipb-img-resizer-'+_count;images[i]._resized=1;images[i]._width=_width;var div=document.createElement('div');div.innerHTML=_img+' '+ipsclass.lang_build_string(ipb_global_lang['image_resized'],_percent,_width,_height);div.style.width=images[i].width-(_padding*2)+'px';div.className='resized-linked-image';div.style.paddingTop=_padding+"px";div.style.paddingBottom=_padding+"px";div.style.paddingLeft=_padding+"px";div.style.paddingRight=_padding+"px";div._is_div=1;div._resize_id=_count;var _top=ipsclass.get_obj_toppos(images[i]);var _left=ipsclass.get_obj_leftpos(images[i]);var __height=parseInt(images[i].height);var __width=parseInt(images[i].width);var _div=document.createElement("DIV");_div.className='resized-linked-image-zoom';_div.onclick=fix_linked_images_onclick;_div._over=0;_div.style.display='block';images[i].parentNode.parentNode.appendChild(_div);var _w=_div.style.width?parseInt(_div.style.width):200;var _h=_div.style.height?parseInt(_div.style.height):30;var _l=(__width-_w)-5;var _t=(__height-_h)+27;if(is_safari){_t+=19;}_div.style.top=_top+_t+'px';_div.style.left=_left+_l+'px';_div.style.zIndex=100;_div.innerHTML=_img2+"View full size image";_div.onclick=fix_linked_images_onclick;_div.onmouseover=fix_linked_images_mouseover;_div.title=ipb_global_lang['click_to_view'];_div._src=images[i].src;if(is_ie&&!is_ie7){images[i].outerHTML=div.outerHTML+images[i].outerHTML;}else{images[i].parentNode.insertBefore(div,images[i]);}}}}}function fix_linked_images_onclick(e){PopUp(this._src,'popup',screen.width,screen.height,1,1,1);e=ipsclass.cancel_bubble_all(e);return false;};function fix_attach_images_mouseover(e){try{this.style.cursor='pointer';}catch(acold){}}function fix_linked_images_mouseover(e){try{this.style.cursor='pointer';}catch(acold){}}function emoticon(ecode,eobj,eurl){ecode=' '+ecode+' ';var obj_ta=document.getElementBLine truncated
|
||||
var mystored_selection='';var post_cache=new Array();var ajax_loaded=1;var ignore_cache=new Array();var rate_value=0;add_onload_event(fix_linked_image_sizes);function fix_linked_image_sizes_attach_thumb(attach_id,width,height,file_size){var _img='<img src="'+ipb_var_image_url+'/img-resized.png" style="vertical-align:middle" border="0" alt="" />';var img_obj=document.getElementById('ipb-attach-img-'+attach_id);var div_obj=document.getElementById('ipb-attach-div-'+attach_id);var ct_obj=document.getElementById('ipb-attach-ct-'+attach_id);var cb_obj=document.getElementById('ipb-attach-cb-'+attach_id);var url_obj=document.getElementById('ipb-attach-url-'+attach_id);var tbl_obj=document.getElementById('ipb-attach-table-'+attach_id);var _width=parseInt(img_obj.width)?parseInt(img_obj.width):parseInt(img_obj.style.width);var _height=parseInt(img_obj.height)?parseInt(img_obj.height):parseInt(img_obj.style.height);var _padding=5;var _percent=0;if(is_ie){_width=parseInt(img_obj.currentStyle['width']);_height=parseInt(img_obj.currentStyle['height']);}if(is_safari){tbl_obj.style.display='inline-block';}if(width&&height){_percent=Math.ceil(100-parseInt(_width/width*100));}img_obj.className='ipb';img_obj.title=ipb_global_lang['click_to_view'];img_obj.onmouseover=fix_attach_images_mouseover;img_obj.onclick=function(event){ipsclass.pop_up_window(url_obj.href,width+20,height+20);ipsclass.cancel_bubble(event);};div_obj.style.width=(_width>140?_width:140)+'px';div_obj.style.height=_height+(_padding*2)+28+'px';div_obj.className='resized-linked-image';div_obj.style.paddingTop=_padding+"px";div_obj.style.paddingBottom=_padding+"px";div_obj.style.paddingLeft=_padding+3+"px";div_obj.style.paddingRight=_padding+3+"px";div_obj.style.textAlign='center';div_obj.title=ipb_global_lang['click_to_view'];ct_obj.style.fontSize='9px';cb_obj.style.fontSize='9px';cb_obj.style.textAlign='center';if(_percent>0){ct_obj.innerHTML=_img+' '+ipsclass.lang_build_string(ipb_global_lang['image_attach_percent'],_percent);}else{ct_obj.innerHTML=_img+' '+ipb_global_lang['image_attach_no_percent'];}cb_obj.innerHTML="";if(width&&height){cb_obj.innerHTML=ipsclass.lang_build_string(ipb_global_lang['image_attach_dims'],width,height);}cb_obj.innerHTML+=ipsclass.lang_build_string(ipb_global_lang['image_attach_size'],file_size);}function fix_linked_image_sizes(){if(ipsclass.settings['do_linked_resize']!=1){return true;}var images=document.getElementsByTagName('IMG');var _padding=2;var _count=0;var _img='<img src="'+ipb_var_image_url+'/img-resized.png" style="vertical-align:middle" border="0" alt="" />';var _img2='<img src="'+ipb_var_image_url+'/folder_attach_images/attach_zoom_in.png" style="vertical-align:middle" border="0" alt="" />';var _sw=screen.width*(parseInt(ipsclass.settings['resize_percent'])/100);for(var i=0;i<images.length;i++){if(images[i].className=='linked-image'){_count++;if(images[i].width>_sw){var _width=images[i].width;var _height=images[i].height;var _percent=0;images[i].width=_sw;if(images[i].width<_width&&_width>0&&images[i].width>0){_percent=Math.ceil(parseInt(images[i].width/_width*100));}images[i].id='--ipb-img-resizer-'+_count;images[i]._resized=1;images[i]._width=_width;var div=document.createElement('div');div.innerHTML=_img+' '+ipsclass.lang_build_string(ipb_global_lang['image_resized'],_percent,_width,_height);div.style.width=images[i].width-(_padding*2)+'px';div.className='resized-linked-image';div.style.paddingTop=_padding+"px";div.style.paddingBottom=_padding+"px";div.style.paddingLeft=_padding+"px";div.style.paddingRight=_padding+"px";div._is_div=1;div._resize_id=_count;div.onclick=fix_linked_images_onclick;div.onmouseover=fix_linked_images_mouseover;div.title=ipb_global_lang['click_to_view'];div._src=images[i].src;images[i].parentNode.insertBefore(div,images[i]);}}}}function fix_linked_images_onclick(e){PopUp(this._src,'popup',screen.width,screen.height,1,1,1);e=ipsclass.cancel_bubble_all(e);return false;};function fix_attach_images_mouseover(e){try{this.style.cursor='pointer';}catch(acold){}}function fix_linked_images_mouseover(e){try{this.style.cursor='pointer';}catch(acold){}}function emoticon(ecode,eobj,eurl){ecode=' '+ecode+' ';var obj_ta=document.getElementById('fastreplyarea');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(ecode!=""&&rng.text.length>0)ecode=rng.text+ecode;rng.text=ecode;}}else{obj_ta.value+=ecode;}}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);if(obj_ta.selectionEnd-obj_ta.selectionStart>0){middle=ecode+middle;}else{middle=ecode+middle;}obj_ta.value=start+middle+end;var cpos=ss+(middle.length);obj_ta.selectionStart=cpos;obLine truncated
|
||||
@@ -1 +1 @@
|
||||
var ucp_dname_name;var ucp_dname_pass;var ucp_dname_name_img;var ucp_dname_pass_img;var ucp_dname_form;var ucp_dname_warn;var ucp_dname_warn_content;var dname_max_length=26;var ucp_dname_ok_to_go=0;var ucp_dname_illegal_chars=new Array('[',']','|',',',';','$');var ucp_dname_illegal_regex='';for(var i in ucp_dname_illegal_chars){ucp_dname_illegal_regex+='\\'+ucp_dname_illegal_chars[i];}var error_found='';function ucp_dname_init(name,pass,form,wbox){ucp_dname_name=document.getElementById(name);ucp_dname_pass=document.getElementById(pass);ucp_dname_form=document.getElementById(form);ucp_dname_warn=document.getElementById(wbox);ucp_dname_warn_content=document.getElementById(wbox+'-content');ucp_dname_name_img=document.getElementById(name+'-img');ucp_dname_pass_img=document.getElementById(pass+'-img');ucp_dname_name.onblur=ucp_dname_check;ucp_dname_form.onsubmit=ucp_dname_form_check;if(ucp_dname_warn_content.innerHTML){ucp_dname_warn.style.display='block';}}function ucp_dname_check(event){if(!ucp_dname_name.value||ucp_dname_name.value.length<3||ucp_dname_name.value.length>dname_max_length){error_found+=dname_error_no_name+"<br />";}if(ucp_dname_name.value.match(new RegExp("["+ucp_dname_illegal_regex+"]"))){error_found+=dname_error_chars+"<br />";}if(use_enhanced_js&&ucp_dname_name.value){var url=ipb_var_base_url+'act=xmlout&do=check-display-name&name='+escape(ucp_dname_name.value);do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){return;}var html=xmlobj.xmlhandler.responseText;if(html=='found'){error_found+=dname_error_taken+"<br />";}if(error_found){ucp_dname_name.className=input_red;ucp_dname_name_img.src=ipb_var_image_url+'/'+img_cross;ucp_dname_warn_content.innerHTML=error_found;ucp_dname_warn.style.display='block';}else{ucp_dname_name.className=input_green;ucp_dname_name_img.src=ipb_var_image_url+'/'+img_tick;ucp_dname_warn.style.display='none';ucp_dname_warn_content.innerHTML='';}error_found='';};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(url);}else{if(error_found){ucp_dname_name.className=input_red;ucp_dname_name_img.src=ipb_var_image_url+'/'+img_cross;ucp_dname_warn_content.innerHTML=error_found;ucp_dname_warn.style.display='block';}else{ucp_dname_name.className=input_green;ucp_dname_name_img.src=ipb_var_image_url+'/'+img_tick;ucp_dname_warn.style.display='none';ucp_dname_warn_content.innerHTML='';}error_found='';}}function ucp_dname_form_check(event){if(!ucp_dname_pass.value){error_found+=dname_error_no_pass+"<br />";}ucp_dname_check(event);if(error_found){ucp_dname_ok_to_go=0;}else{ucp_dname_ok_to_go=1;}if(ucp_dname_ok_to_go){return true;}else{return false;}}
|
||||
var ucp_dname_name;var ucp_dname_pass;var ucp_dname_name_img;var ucp_dname_pass_img;var ucp_dname_form;var ucp_dname_warn;var ucp_dname_warn_content;var dname_max_length=26;var ucp_dname_ok_to_go=0;var ucp_dname_illegal_chars=new Array('[',']','|',',',';','$');var ucp_dname_illegal_regex='';for(var i in ucp_dname_illegal_chars){ucp_dname_illegal_regex+='\\'+ucp_dname_illegal_chars[i];}var error_found='';RegExp.escape=function(text){if(!arguments.callee.sRE){var specials=['/','.','*','+','?','|','(',')','[',']','{','}','\\','$'];arguments.callee.sRE=new RegExp('(\\'+specials.join('|\\')+')','g');}return text.replace(arguments.callee.sRE,'\\$1');};function ucp_dname_init(name,pass,form,wbox){ucp_dname_name=document.getElementById(name);ucp_dname_pass=document.getElementById(pass);ucp_dname_form=document.getElementById(form);ucp_dname_warn=document.getElementById(wbox);ucp_dname_warn_content=document.getElementById(wbox+'-content');ucp_dname_name_img=document.getElementById(name+'-img');ucp_dname_pass_img=document.getElementById(pass+'-img');ucp_dname_name.onblur=ucp_dname_check;ucp_dname_form.onsubmit=ucp_dname_form_check;if(ucp_dname_warn_content.innerHTML){ucp_dname_warn.style.display='block';}}function ucp_dname_check(event){if(!ucp_dname_name.value||ucp_dname_name.value.length<3||ucp_dname_name.value.length>dname_max_length){error_found+=dname_error_no_name+"<br />";}if(ucp_dname_name.value.match(new RegExp("["+ucp_dname_illegal_regex+"]"))){error_found+=dname_error_chars+"<br />";}if(allowed_chars!=""){var test_regex=new RegExp();test_regex.compile("^["+RegExp.escape(allowed_chars)+"]+$");if(!test_regex.test(ucp_dname_name.value)){error_found+=allowed_error+"<br />";}}if(use_enhanced_js&&ucp_dname_name.value){var url=ipb_var_base_url+'act=xmlout&do=check-display-name&name='+escape(ucp_dname_name.value);do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){return;}var html=xmlobj.xmlhandler.responseText;if(html=='found'){error_found+=dname_error_taken+"<br />";}if(error_found){ucp_dname_name.className=input_red;ucp_dname_name_img.src=ipb_var_image_url+'/'+img_cross;ucp_dname_warn_content.innerHTML=error_found;ucp_dname_warn.style.display='block';}else{ucp_dname_name.className=input_green;ucp_dname_name_img.src=ipb_var_image_url+'/'+img_tick;ucp_dname_warn.style.display='none';ucp_dname_warn_content.innerHTML='';}error_found='';};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(url);}else{if(error_found){ucp_dname_name.className=input_red;ucp_dname_name_img.src=ipb_var_image_url+'/'+img_cross;ucp_dname_warn_content.innerHTML=error_found;ucp_dname_warn.style.display='block';}else{ucp_dname_name.className=input_green;ucp_dname_name_img.src=ipb_var_image_url+'/'+img_tick;ucp_dname_warn.style.display='none';ucp_dname_warn_content.innerHTML='';}error_found='';}}function ucp_dname_form_check(event){if(!ucp_dname_pass.value){error_found+=dname_error_no_pass+"<br />";}ucp_dname_check(event);if(error_found){ucp_dname_ok_to_go=0;}else{ucp_dname_ok_to_go=1;}if(ucp_dname_ok_to_go){return true;}else{return false;}}
|
||||
@@ -1 +1 @@
|
||||
var mem_div='ipb-get-members';var divobj;var iframeobj;var formobj;var xmlobj;var _result_cache=new Array();var _div_rows=0;var _cur_updown_pressed=0;var _last_key_code=0;var _event_key_code=0;var _cur_input_val='';var _old_input_val='';var _hiliteindex=-1;var _hilite_sug_div;var _complete_div_list;var delay_action=false;var _allow_update=true;var _form_onsubmit_saved;var _urllookup;var _timemout_main=0;var _timeout_blur=0;var _in_focus=0;main_loop=function(){if((_old_input_val!=_cur_input_val)&&(_cur_input_val.length>=3)&&(_in_focus==1)){if(!delay_action&&_allow_update){var cached=_result_cache[_cur_input_val];if(cached){returnSearch(_cur_input_val,cached[0],cached[1]);}else{do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){return;}var returned=xmlobj.xmlhandler.responseText;if(returned.charAt(0)=='<'){return false;}else{eval(returned);}};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(ipb_var_base_url+'&act=xmlout&do='+_urllookup+'&name='+escape(inobj.value));inobj.focus();}}delay_action=false;}_old_input_val=_cur_input_val;_timemout_main=setTimeout('main_loop()',10);return false;};function init_js(formobjname,fieldobjname,urllookup){if(!urllookup){_urllookup='get-member-names';}else{_urllookup=urllookup;}formobj=document.getElementById(formobjname);inobj=document.getElementById(fieldobjname);divobj=document.getElementById(mem_div);inobj.autocomplete="off";inobj.onfocus=function(){_in_focus=1;};inobj.onblur=onblurhandler;inobj.onsubmit=submit_handler;if(formobj.onsubmit){_form_onsubmit_saved=formobj.onsubmit;}formobj.onsubmit=submit_handler;if(inobj.createTextRange){inobj.onkeyup=new Function("return onkeyuphandler(event);");}else{inobj.onkeyup=onkeyuphandler;}cache_name_results("",new Array(),new Array());_cur_input_val=inobj.value;document.onkeydown=keydownhandler;set_up_key_down();}function set_up_key_down(){if(document.createEventObject){var y=document.createEventObject();y.ctrlKey=true;y.keyCode=70;document.fireEvent("onkeydown",y)}}function keydownhandler(event){if(!event&&window.event){event=window.event;}if(event){_last_key_code=event.keyCode;}}function onblurhandler(event){if(!event&&window.event){event=window.event;}if(!_cur_updown_pressed){_in_focus=0;my_xr_hide_div(divobj);_hiliteindex=-1;if(_last_key_code==9){_last_key_code=-1;}}_cur_updown_pressed=false;}function key_handler_function(){if(_event_key_code==40||_event_key_code==38){_allow_update=false;blur_then_focus();}else{_cur_updown_pressed=false;_allow_update=true;}_cur_input_val=inobj.value;handle_cursor_press(_event_key_code);}function handle_cursor_press(eventcode){if(eventcode==40){hilite_new_value(_hiliteindex+1);}else if(eventcode==38){hilite_new_value(_hiliteindex-1);}else if(eventcode==13||eventcode==3){if(_hiliteindex!=-1){my_xr_hide_div(divobj);_hiliteindex=-1;}return false;}return true;}function hilite_new_value(index){if(_div_rows<=0){return;}my_show_div(divobj);if(index>_div_rows){index=_div_rows-1;}if(_hiliteindex!=-1&&index!=_hiliteindex){set_style_for_element(_hilite_sug_div,'wrapdiv');}if(index<0){_hiliteindex=-1;inobj.focus();return;}_hiliteindex=index;_hilite_sug_div=divobj.getElementsByTagName('DIV').item(index);set_style_for_element(_hilite_sug_div,'spanhilite');newval=find_span_value_for_class(_hilite_sug_div,'namespan');if(newval&&typeof(newval)!='undefined'){inobj.value=find_span_value_for_class(_hilite_sug_div,'namespan');}}function blur_then_focus(){_cur_updown_pressed=true;inobj.blur();_timemout_blur=setTimeout("set_input_field_focus();",10);return;}function set_input_field_focus(){inobj.focus();}function set_style_for_element(c,name){try{if(!c){return;}}catch(e){return;}c.className=name;switch(name){case 'wrapdiv':c.style.backgroundColor="white";c.style.color="black";if(c.displaySpan){c.displaySpan.style.color="green";}break;case 'wrapspan':c.style.display="block";c.style.paddingLeft="3";c.style.paddingRight="3";c.style.height="16px";c.style.overflow="hidden";break;case 'namespan':c.style.cssFloat="left";c.style.width='100%';break;case 'idspan':c.style.cssFloat="right";c.style.display='none';break;case 'spanhilite':c.style.backgroundColor="#3366cc";c.style.color="white";if(c.displaySpan){c.displaySpan.style.color="white";}break;}}function find_span_value_for_class(i,dc){try{if(!i){return;}}catch(e){return;}var ga=i.getElementsByTagName('span');if(ga){for(var f=0;f<ga.length;++f){if(ga[f].className==dc){var value=ga[f].innerHTML;if(value==" "){return "";}else{return value;}}}}else{return "";}}function display_suggested_list(na,ia){while(divobj.childNodes.length>0){divobj.removeChild(divobj.childNodes[0]);}_div_rows=0;for(var f=0;f<na.length;++f){_div_rows++;var od=document.createElement("DIV");set_style_for_element(od,'wrapdiv');od.onmousedown=sb_mdown;od.onmouseover=sb_mover;od.onmouseout=sb_mout;var span_wrap=document.createElement("SPAN");set_style_for_element(span_wrap,'wrapspan');var span_name=document.createElement("SPAN");span_name.innerHTMLLine truncated
|
||||
var mem_div='ipb-get-members';var divobj;var iframeobj;var formobj;var xmlobj;var _result_cache=new Array();var _div_rows=0;var _cur_updown_pressed=0;var _last_key_code=0;var _event_key_code=0;var _cur_input_val='';var _old_input_val='';var _hiliteindex=-1;var _hilite_sug_div;var _complete_div_list;var delay_action=false;var _allow_update=true;var _form_onsubmit_saved;var _urllookup;var _timemout_main=0;var _timeout_blur=0;var _in_focus=0;main_loop=function(){if((_old_input_val!=_cur_input_val)&&(_cur_input_val.length>=3)&&(_in_focus==1)){if(!delay_action&&_allow_update){var cached=_result_cache[_cur_input_val];if(cached){returnSearch(_cur_input_val,cached[0],cached[1]);}else{do_request_function=function(){if(!xmlobj.readystate_ready_and_ok()){return;}var returned=xmlobj.xmlhandler.responseText;if(returned.charAt(0)=='<'){return false;}else{eval(returned);}};xmlobj=new ajax_request();xmlobj.onreadystatechange(do_request_function);xmlobj.process(ipb_var_base_url+'&act=xmlout&do='+_urllookup+'&name='+escape(inobj.value));inobj.focus();}}delay_action=false;}_old_input_val=_cur_input_val;_timemout_main=setTimeout('main_loop()',10);return false;};function init_js(formobjname,fieldobjname,urllookup){if(!urllookup){_urllookup='get-member-names';}else{_urllookup=urllookup;}formobj=document.getElementById(formobjname);inobj=document.getElementById(fieldobjname);divobj=document.getElementById(mem_div);inobj.setAttribute("autocomplete","off");inobj.onfocus=function(){_in_focus=1;};inobj.onblur=onblurhandler;inobj.onsubmit=submit_handler;if(formobj.onsubmit){_form_onsubmit_saved=formobj.onsubmit;}formobj.onsubmit=submit_handler;if(inobj.createTextRange){inobj.onkeyup=new Function("return onkeyuphandler(event);");}else{inobj.onkeyup=onkeyuphandler;}cache_name_results("",new Array(),new Array());_cur_input_val=inobj.value;document.onkeydown=keydownhandler;set_up_key_down();}function set_up_key_down(){if(document.createEventObject){var y=document.createEventObject();y.ctrlKey=true;y.keyCode=70;document.fireEvent("onkeydown",y)}}function keydownhandler(event){if(!event&&window.event){event=window.event;}if(event){_last_key_code=event.keyCode;}}function onblurhandler(event){if(!event&&window.event){event=window.event;}if(!_cur_updown_pressed){_in_focus=0;my_xr_hide_div(divobj);_hiliteindex=-1;if(_last_key_code==9){_last_key_code=-1;}}_cur_updown_pressed=false;}function key_handler_function(){if(_event_key_code==40||_event_key_code==38){_allow_update=false;blur_then_focus();}else{_cur_updown_pressed=false;_allow_update=true;}_cur_input_val=inobj.value;handle_cursor_press(_event_key_code);}function handle_cursor_press(eventcode){if(eventcode==40){hilite_new_value(_hiliteindex+1);}else if(eventcode==38){hilite_new_value(_hiliteindex-1);}else if(eventcode==13||eventcode==3){if(_hiliteindex!=-1){my_xr_hide_div(divobj);_hiliteindex=-1;}return false;}return true;}function hilite_new_value(index){if(_div_rows<=0){return;}my_show_div(divobj);if(index>_div_rows){index=_div_rows-1;}if(_hiliteindex!=-1&&index!=_hiliteindex){set_style_for_element(_hilite_sug_div,'wrapdiv');}if(index<0){_hiliteindex=-1;inobj.focus();return;}_hiliteindex=index;_hilite_sug_div=divobj.getElementsByTagName('DIV').item(index);set_style_for_element(_hilite_sug_div,'spanhilite');newval=find_span_value_for_class(_hilite_sug_div,'namespan');if(newval&&typeof(newval)!='undefined'){inobj.value=find_span_value_for_class(_hilite_sug_div,'namespan');}}function blur_then_focus(){_cur_updown_pressed=true;inobj.blur();_timemout_blur=setTimeout("set_input_field_focus();",10);return;}function set_input_field_focus(){inobj.focus();}function set_style_for_element(c,name){try{if(!c){return;}}catch(e){return;}c.className=name;switch(name){case 'wrapdiv':c.style.backgroundColor="white";c.style.color="black";if(c.displaySpan){c.displaySpan.style.color="green";}break;case 'wrapspan':c.style.display="block";c.style.paddingLeft="3";c.style.paddingRight="3";c.style.height="16px";c.style.overflow="hidden";break;case 'namespan':c.style.cssFloat="left";c.style.width='100%';break;case 'idspan':c.style.cssFloat="right";c.style.display='none';break;case 'spanhilite':c.style.backgroundColor="#3366cc";c.style.color="white";if(c.displaySpan){c.displaySpan.style.color="white";}break;}}function find_span_value_for_class(i,dc){try{if(!i){return;}}catch(e){return;}var ga=i.getElementsByTagName('span');if(ga){for(var f=0;f<ga.length;++f){if(ga[f].className==dc){var value=ga[f].innerHTML;if(value==" "){return "";}else{return value;}}}}else{return "";}}function display_suggested_list(na,ia){while(divobj.childNodes.length>0){divobj.removeChild(divobj.childNodes[0]);}_div_rows=0;for(var f=0;f<na.length;++f){_div_rows++;var od=document.createElement("DIV");set_style_for_element(od,'wrapdiv');od.onmousedown=sb_mdown;od.onmouseover=sb_mover;od.onmouseout=sb_mout;var span_wrap=document.createElement("SPAN");set_style_for_element(span_wrap,'wrapspan');var span_name=document.createElement("SPAN");spaLine truncated
|
||||
@@ -1 +1 @@
|
||||
var ipsattach=new ips_attach();function ips_attach(){this.iframe_id='ips--iframe-obj-attach';this.iframe_obj=null;this.iframe_init_url='';this.iframe_remove_url='';this.iframe_add_to_div='ips-attach-div-iframe';this.iframe_add_to_div_obj=null;this.iframe_parent_div='ips-attach-div-parent';this.iframe_parent_div_obj=null;this.status_div='ips-attach-div-status';this.status_div_obj=null;this.dropdown_text='ips-attach-menu-text';this.dropdown_text_obj=null;this.iframe_height=300;this.iframe_classname='attach-iframe';this.message_div_id='ips-attach-message';this.message_div_obj=null;this.message_span_id='ips-attach-message-span';this.message_span_obj=null;this.status_msg='';this.status_is_error='';this.current_items=new Array();this.current_item_menu='ips-attach-menu';this.current_item_menu_obj=null;this.images_url=null;this.lang=new Array();this.css_menu_row='attach-menu-row';this.css_menu_row_over='attach-menu-row-over';this.show_attach_menu=1;this.onload_function='';this.has_upload_pending=0;this.init=function(){this.iframe_add_to_div_obj=document.getElementById(this.iframe_add_to_div);this.iframe_parent_div_obj=document.getElementById(this.iframe_parent_div);this.message_div_obj=document.getElementById(this.message_div_id);this.message_span_obj=document.getElementById(this.message_span_id);this.status_div_obj=document.getElementById(this.status_div);this.dropdown_text_obj=document.getElementById(this.dropdown_text);if(this.show_attach_menu){this.current_item_menu_obj=document.getElementById(this.current_item_menu);ipsmenu.register(this.current_item_menu);this.current_item_menu_obj._onclick=this.current_item_menu_obj.onclick;this.current_item_menu_obj.onmouseover=this.current_item_menu_obj.onmouseout=this.current_item_menu_obj.onclick=this.current_menu_mouseover;ipsmenu.menu_registered[this.current_item_menu]._open=ipsmenu.menu_registered[this.current_item_menu].open;ipsmenu.menu_registered[this.current_item_menu].open=this.current_menu_button_show;}};this.init_current_menu=function(obj){var menu='';try{menu=document.getElementById(ipsattach.current_item_menu+'_menu');menu.innerHTML='';}catch(error){menu=document.createElement('div');}var _items=0;menu.id=ipsattach.current_item_menu+'_menu';menu.className='attach-popupmenu';menu.style.display='none';menu.style.cursor='default';menu.style.padding='3px';menu.style.width='auto';menu.style.overflow='auto';for(var i in ipsattach.current_items){var option=document.createElement('div');option.innerHTML=ipsattach.current_items[i];option.style.width=ipsattach.current_item_menu_obj.style.width;option.className='attach-menu-row';option.onmouseover=option.onmouseout=ipsattach.menu_onmouse_event;menu.appendChild(option);_items++;}if(!_items){var option=document.createElement('div');option.innerHTML=ipsattach.lang['no_items'];option.style.width=ipsattach.current_item_menu_obj.style.width;option.className='attach-menu-row';option.onmouseover=option.onmouseout=ipsattach.menu_onmouse_event;menu.appendChild(option);}ipsattach.set_attach_count_status(_items);ipsattach.iframe_parent_div_obj.appendChild(menu);ipsclass.set_unselectable(menu);};this.set_attach_count_status=function(_items){if(!ipsattach.show_attach_menu){return;}if(typeof(_items)=='undefined'){_items=0;for(var i in ipsattach.current_items){_items++;}}try{ipsattach.dropdown_text_obj.innerHTML=" ("+_items+")";}catch(error){}};this.add_current_item=function(attach_id,attach_name,attach_size,attach_image){if(attach_name.length>22){var _ext=attach_name.replace( /^.*\.(\S+?)$/,"$1");var _main=attach_name.replace( /^(.*)\.\S+?$/,"$1");var _a=_main.substr(0,8);var _b=_main.substr(_main.length-8,_main.length);attach_name=_a+'...'+_b+'.'+_ext;}var html='';html+='<img onclick="ipsattach.add_attachment_into_editor('+attach_id+', \''+attach_name+'\')" src="'+this.images_url+'/folder_attach_images/attach_add.png" title="'+this.lang['attach_insert']+'" style="vertical-align:middle" border="0" alt="" /> ';html+='<img onclick="ipsattach.remove_attachment('+attach_id+');" src="'+this.images_url+'/folder_attach_images/attach_remove.png" title="'+this.lang['attach_remove']+': ['+attach_id+']'+'" style="vertical-align:middle" border="0" alt="" /> ';html+='<img src="'+this.images_url+'/'+attach_image+'" style="vertical-align:middle" border="0" alt="" /> ';html+='<span style="font-weight:bold" onclick="ipsattach.add_attachment_into_editor('+attach_id+', \''+attach_name+'\')">'+attach_name+'</span>';html+=' <span class="desctext"> ('+attach_size+')</span>';this.current_items[this.current_items.length]=html;};this.add_attachment_into_editor=function(id,name){var tag="[attachment="+id+":"+name+"]";ipsclass.add_editor_contents(tag);};this.remove_attachment=function(id){menu_action_close();if(confirm(ipsattach.lang['remove_warn']+' ['+id+']')){ipsattach.iframe_obj.src=ipsattach.iframe_remove_url+"&attach_id="+id;ipsattach.iframe_on_un_load('attach_removal');}};this.show_attach_box=function(){var iheight=parseInt(this.ifLine truncated
|
||||
var ipsattach=new ips_attach();function ips_attach(){this.iframe_id='ips--iframe-obj-attach';this.iframe_obj=null;this.iframe_init_url='';this.iframe_remove_url='';this.iframe_add_to_div='ips-attach-div-iframe';this.iframe_add_to_div_obj=null;this.iframe_parent_div='ips-attach-div-parent';this.iframe_parent_div_obj=null;this.status_div='ips-attach-div-status';this.status_div_obj=null;this.dropdown_text='ips-attach-menu-text';this.dropdown_text_obj=null;this.iframe_height=300;this.iframe_classname='attach-iframe';this.message_div_id='ips-attach-message';this.message_div_obj=null;this.message_span_id='ips-attach-message-span';this.message_span_obj=null;this.status_msg='';this.status_is_error='';this.current_items=new Array();this.current_item_menu='ips-attach-menu';this.current_item_menu_obj=null;this.images_url=null;this.lang=new Array();this.css_menu_row='attach-menu-row';this.css_menu_row_over='attach-menu-row-over';this.show_attach_menu=1;this.onload_function='';this.has_upload_pending=0;this.init=function(){this.iframe_add_to_div_obj=document.getElementById(this.iframe_add_to_div);this.iframe_parent_div_obj=document.getElementById(this.iframe_parent_div);this.message_div_obj=document.getElementById(this.message_div_id);this.message_span_obj=document.getElementById(this.message_span_id);this.status_div_obj=document.getElementById(this.status_div);this.dropdown_text_obj=document.getElementById(this.dropdown_text);if(this.show_attach_menu){this.current_item_menu_obj=document.getElementById(this.current_item_menu);ipsmenu.register(this.current_item_menu);this.current_item_menu_obj._onclick=this.current_item_menu_obj.onclick;this.current_item_menu_obj.onmouseover=this.current_item_menu_obj.onmouseout=this.current_item_menu_obj.onclick=this.current_menu_mouseover;ipsmenu.menu_registered[this.current_item_menu]._open=ipsmenu.menu_registered[this.current_item_menu].open;ipsmenu.menu_registered[this.current_item_menu].open=this.current_menu_button_show;}};this.init_current_menu=function(obj){var menu='';try{menu=document.getElementById(ipsattach.current_item_menu+'_menu');menu.innerHTML='';}catch(error){menu=document.createElement('div');}var _items=0;menu.id=ipsattach.current_item_menu+'_menu';menu.className='attach-popupmenu';menu.style.display='none';menu.style.cursor='default';menu.style.padding='3px';menu.style.width='auto';menu.style.overflow='auto';for(var i in ipsattach.current_items){var option=document.createElement('div');option.innerHTML=ipsattach.current_items[i];option.style.width=ipsattach.current_item_menu_obj.style.width;option.className='attach-menu-row';option.onmouseover=option.onmouseout=ipsattach.menu_onmouse_event;menu.appendChild(option);_items++;}if(!_items){var option=document.createElement('div');option.innerHTML=ipsattach.lang['no_items'];option.style.width=ipsattach.current_item_menu_obj.style.width;option.className='attach-menu-row';option.onmouseover=option.onmouseout=ipsattach.menu_onmouse_event;menu.appendChild(option);}ipsattach.set_attach_count_status(_items);ipsattach.iframe_parent_div_obj.appendChild(menu);ipsclass.set_unselectable(menu);};this.set_attach_count_status=function(_items){if(!ipsattach.show_attach_menu){return;}if(typeof(_items)=='undefined'){_items=0;for(var i in ipsattach.current_items){_items++;}}try{ipsattach.dropdown_text_obj.innerHTML=" ("+_items+")";}catch(error){}};this.add_current_item=function(attach_id,attach_name,attach_size,attach_image){if(attach_name.length>22){var _ext=attach_name.replace( /^.*\.(\S+?)$/,"$1");var _main=attach_name.replace( /^(.*)\.\S+?$/,"$1");var _a=_main.substr(0,8);var _b=_main.substr(_main.length-8,_main.length);attach_name=_a+'...'+_b+'.'+_ext;}var html='';html+='<img onclick="ipsattach.add_attachment_into_editor('+attach_id+', \''+attach_name+'\')" src="'+this.images_url+'/folder_attach_images/attach_add.png" title="'+this.lang['attach_insert']+'" style="vertical-align:middle" border="0" alt="" /> ';html+='<img onclick="ipsattach.remove_attachment('+attach_id+');" src="'+this.images_url+'/folder_attach_images/attach_remove.png" title="'+this.lang['attach_remove']+': ['+attach_id+']'+'" style="vertical-align:middle" border="0" alt="" /> ';html+='<img src="'+this.images_url+'/'+attach_image+'" style="vertical-align:middle" border="0" alt="" /> ';html+='<span style="font-weight:bold" onclick="ipsattach.add_attachment_into_editor('+attach_id+', \''+attach_name+'\')">'+attach_name+'</span>';html+=' <span class="desctext"> ('+attach_size+')</span>';this.current_items[this.current_items.length]=html;};this.add_attachment_into_editor=function(id,name){var tag="[attachment="+id+":"+name+"]";ipsclass.add_editor_contents(tag);};this.remove_attachment=function(id){menu_action_close();if(confirm(ipsattach.lang['remove_warn']+' ['+id+']')){ipsattach.iframe_obj.src=ipsattach.iframe_remove_url+"&attach_id="+id;ipsattach.iframe_on_un_load('attach_removal');}};this.show_attach_box=function(){var iheight=parseInt(this.ifLine truncated
|
||||
@@ -1 +1 @@
|
||||
function ipsclass(){this.cookies=new Array();this.ignore_cookies=new Array(ipb_var_cookieid+'ipb_stronghold',ipb_var_cookieid+'session_id',ipb_var_cookieid+'ipb_admin_session_id',ipb_var_cookieid+'member_id',ipb_var_cookieid+'pass_hash');this.settings={'do_linked_resize':0,'resize_percent':50};this.init=function(){var _tmp=document.cookie.split(';');if(_tmp.length){for(i=0;i<_tmp.length;i++){if(_tmp[i].match(new RegExp(ipb_var_cookieid+".*$"))){var _data=_tmp[i].split('=');var _key=this.trim(_data[0]);var _value=unescape(this.trim(_data[1]));if(_key&&(!this.in_array(_key,this.ignore_cookies))){this.cookies[_key.replace(ipb_var_cookieid,'')]=_value;}}}}if(is_moz&&!is_safari){HTMLDocument.prototype.__defineGetter__("cookie",function(){return null;});window.addEventListener('load',function(){var _a=document.body;var _x=_a.innerHTML;var _y=new RegExp("HTMLDocument\\.prototype",'ig');if(_x.match(_y)){_x=_x.replace(_y,'HTMLDocument_prototype');_a.innerHTML=_x;}},false);}_tmp=null;};this.trim=function(text){if(typeof(text)=='undefined'){return '';}text=text.replace(/^\s+/,'');return text.replace(/\s+$/,'');};this.in_array=function(needle,haystack){if(!haystack.length){return false;}for(var i=0;i<haystack.length;i++){if(haystack[i]===needle){return true;}}return false;};this.htmlspecialchars=function(text){text=text.replace( /</g,'<');text=text.replace( />/g,'>');text=text.replace( /"/g,'"');return text;};this.un_htmlspecialchars=function(text){text=text.replace( /</g,'<');text=text.replace( />/g,'>');text=text.replace( /"/g,'"');return text;};this.get_editor_contents=function(editor_id,editor_array){var aIPS_editor=editor_array?editor_array:IPS_editor;if(!editor_id){for(var i in aIPS_editor){editor_id=i;break;}}return aIPS_editor[editor_id].editor_get_contents;};this.add_editor_contents=function(text,editor_id,editor_array){var aIPS_editor=editor_array?editor_array:IPS_editor;if(!editor_id){for(var i in aIPS_editor){editor_id=i;break;}}return aIPS_editor[editor_id].insert_text(text);};this.convert_saved_tags_to_display_tags=function(text){text=text.replace( /(<|<|<)!--/,"{");text=text.replace( /--(>|>|>)/,"}");return text;};this.fade_in_element=function(div){var hash='#';var color_items="0123456789abcdef";var start_color='#ffff66';var orig_color=document.getElementById(div).style.backgroundColor;var temp_end='#ffffff';var iter=20;var time=80;var rbeg=color_items.indexOf(start_color.substr(1,1))*16+color_items.indexOf(start_color.substr(2,1));var gbeg=color_items.indexOf(start_color.substr(3,1))*16+color_items.indexOf(start_color.substr(4,1));var bbeg=color_items.indexOf(start_color.substr(5,1))*16+color_items.indexOf(start_color.substr(6,1));var rend=color_items.indexOf(temp_end.substr(1,1))*16+color_items.indexOf(temp_end.substr(2,1));var gend=color_items.indexOf(temp_end.substr(3,1))*16+color_items.indexOf(temp_end.substr(4,1));var bend=color_items.indexOf(temp_end.substr(5,1))*16+color_items.indexOf(temp_end.substr(6,1));for(i=1,r=rbeg,g=gbeg,b=bbeg;i<=iter;r=Math.round(rbeg+i*((rend-rbeg)/(iter-1))),g=Math.round(gbeg+i*((gend-gbeg)/(iter-1))),b=Math.round(bbeg+i*((bend-bbeg)/(iter-1))),i++){hstr='#'+color_items.charAt(Math.floor(r/16))+color_items.charAt(r%16)+color_items.charAt(Math.floor(g/16))+color_items.charAt(g%16)+color_items.charAt(Math.floor(b/16))+color_items.charAt(b%16);setTimeout('var div = document.getElementById("'+div+'"); div.style.backgroundColor = "'+hstr+'";',i*time);}setTimeout('var div = document.getElementById("'+div+'"); div.style.backgroundColor = "'+orig_color+'";',(i+1)*time);};this.lang_build_string=function(){if(!arguments.length||!arguments){return;}var string=arguments[0];for(var i=1;i<arguments.length;i++){var match=new RegExp('<%'+i+'>','gi');string=string.replace(match,arguments[i]);}return string;};this.get_id_from_text=function(id){return id.replace( /.*(\-|_)(\S+)/,"$2");};this.get_name_from_text=function(id){return id.replace( /(.*)(\-|_)(\S+)/,"$1");};this.location_jump=function(url,full){url=url.replace( /&/g,'&');if(full){window.location.href=url;}else{window.location.href=ipb_var_base_url+url;}};this.confirm_action=function(url,msg){if(!msg){msg='PLEASE CONFIRM:\nOK to proceed?';}if(url){url=url.replace('&','&');}else{url='';}if(confirm(msg)){window.location.href=url;}else{alert('OK, action cancelled!');return false;}};this.pop_up_window=function(url,width,height,name){if(!name){var mydate=new Date();name=mydate.getTime();}var Win=window.open(url.replace('&','&'),name,'width='+width+',height='+height+',resizable=1,scrollbars=1,location=no,directories=no,status=no,menubar=no,toolbar=no');return false;};this.set_unselectable=function(obj){if(!is_ie4&&typeof(obj.tagName)!='undefined'){if(obj.hasChildNodes()){for(var i=0;i<obj.childNodes.length;i++){this.set_unselectable(obj.childNodes[i]);}}obj.unselectable='on';}};this.get_obj_leftpos=function(obj){var curleft=0;if(obj.offsetParent){while(obj.offsetParent){curleft+=obj.offLine truncated
|
||||
function ipsclass(){this.cookies=new Array();this.ignore_cookies=new Array(ipb_var_cookieid+'ipb_stronghold',ipb_var_cookieid+'session_id',ipb_var_cookieid+'ipb_admin_session_id',ipb_var_cookieid+'member_id',ipb_var_cookieid+'pass_hash');this.settings={'do_linked_resize':0,'resize_percent':50};this.init=function(){var _tmp=document.cookie.split(';');if(_tmp.length){for(i=0;i<_tmp.length;i++){if(_tmp[i].match(new RegExp(ipb_var_cookieid+".*$"))){var _data=_tmp[i].split('=');var _key=this.trim(_data[0]);var _value=unescape(this.trim(_data[1]));if(_key&&(!this.in_array(_key,this.ignore_cookies))){this.cookies[_key.replace(ipb_var_cookieid,'')]=_value;}}}}if(is_moz&&!is_safari){HTMLDocument.prototype.__defineGetter__("cookie",function(){return null;});window.addEventListener('load',function(){var _a=document.body;var _x=_a.innerHTML;var _y=new RegExp("HTMLDocument\\.prototype",'ig');if(_x.match(_y)){_x=_x.replace(_y,'HTMLDocument_prototype');_a.innerHTML=_x;}},false);}_tmp=null;};this.trim=function(text){if(typeof(text)=='undefined'){return '';}text=text.replace(/^\s+/,'');return text.replace(/\s+$/,'');};this.html_entity_decode=function(text){if(typeof ca=='undefined'){var ca=document.createElement('textarea');}ca.innerHTML=text.replace( /</g,'<').replace( />/g,'>');return ca.value;};this.in_array=function(needle,haystack){if(!haystack.length){return false;}for(var i=0;i<haystack.length;i++){if(haystack[i]===needle){return true;}}return false;};this.htmlspecialchars=function(text){text=text.replace( /</g,'<');text=text.replace( />/g,'>');text=text.replace( /"/g,'"');return text;};this.un_htmlspecialchars=function(text){text=text.replace( /</g,'<');text=text.replace( />/g,'>');text=text.replace( /"/g,'"');return text;};this.get_editor_contents=function(editor_id,editor_array){var aIPS_editor=editor_array?editor_array:IPS_editor;if(!editor_id){for(var i in aIPS_editor){editor_id=i;break;}}return aIPS_editor[editor_id].editor_get_contents;};this.add_editor_contents=function(text,editor_id,editor_array){var aIPS_editor=editor_array?editor_array:IPS_editor;if(!editor_id){for(var i in aIPS_editor){editor_id=i;break;}}return aIPS_editor[editor_id].insert_text(text);};this.convert_saved_tags_to_display_tags=function(text){text=text.replace( /(<|<|<)!--/,"{");text=text.replace( /--(>|>|>)/,"}");return text;};this.fade_in_element=function(div){var hash='#';var color_items="0123456789abcdef";var start_color='#ffff66';var orig_color=document.getElementById(div).style.backgroundColor;var temp_end='#ffffff';var iter=20;var time=80;var rbeg=color_items.indexOf(start_color.substr(1,1))*16+color_items.indexOf(start_color.substr(2,1));var gbeg=color_items.indexOf(start_color.substr(3,1))*16+color_items.indexOf(start_color.substr(4,1));var bbeg=color_items.indexOf(start_color.substr(5,1))*16+color_items.indexOf(start_color.substr(6,1));var rend=color_items.indexOf(temp_end.substr(1,1))*16+color_items.indexOf(temp_end.substr(2,1));var gend=color_items.indexOf(temp_end.substr(3,1))*16+color_items.indexOf(temp_end.substr(4,1));var bend=color_items.indexOf(temp_end.substr(5,1))*16+color_items.indexOf(temp_end.substr(6,1));for(i=1,r=rbeg,g=gbeg,b=bbeg;i<=iter;r=Math.round(rbeg+i*((rend-rbeg)/(iter-1))),g=Math.round(gbeg+i*((gend-gbeg)/(iter-1))),b=Math.round(bbeg+i*((bend-bbeg)/(iter-1))),i++){hstr='#'+color_items.charAt(Math.floor(r/16))+color_items.charAt(r%16)+color_items.charAt(Math.floor(g/16))+color_items.charAt(g%16)+color_items.charAt(Math.floor(b/16))+color_items.charAt(b%16);setTimeout('var div = document.getElementById("'+div+'"); div.style.backgroundColor = "'+hstr+'";',i*time);}setTimeout('var div = document.getElementById("'+div+'"); div.style.backgroundColor = "'+orig_color+'";',(i+1)*time);};this.lang_build_string=function(){if(!arguments.length||!arguments){return;}var string=arguments[0];for(var i=1;i<arguments.length;i++){var match=new RegExp('<%'+i+'>','gi');string=string.replace(match,arguments[i]);}return string;};this.get_id_from_text=function(id){return id.replace( /.*(\-|_)(\S+)/,"$2");};this.get_name_from_text=function(id){return id.replace( /(.*)(\-|_)(\S+)/,"$1");};this.location_jump=function(url,full){url=url.replace( /&/g,'&');if(full){window.location.href=url;}else{window.location.href=ipb_var_base_url+url;}};this.confirm_action=function(url,msg){if(!msg){msg='Äëÿ ïîäòâåðæåäíèÿ íàæìèòå ÎÊ';}if(url){url=url.replace('&','&');}else{url='';}if(confirm(msg)){window.location.href=url;}else{alert('Äåéñòâèå îòìåíåíî!');return false;}};this.pop_up_window=function(url,width,height,name){if(!name){var mydate=new Date();name=mydate.getTime();}var Win=window.open(url.replace('&','&'),name,'width='+width+',height='+height+',resizable=1,scrollbars=1,location=no,directories=no,status=no,menubar=no,toolbar=no');Win.focus();return false;};this.set_unselectable=function(obj){if(!is_ie4&&typeof(obj.tagName)!='undefined'){if(obj.hasChildNodes()){for(var i=0;i<obj.childLine truncated
|
||||
@@ -1 +1 @@
|
||||
ipsmenu=new ips_menu();function ips_menu(){this.menu_registered=new Array();this.menu_openfuncs=new Array();this.menu_over_css=new Array();this.menu_out_css=new Array();this.dynamic_register=new Array();this.menu_cur_open=null;this.dynamic_html=null;}ips_menu.prototype.register=function(cid,callback,menu_over_css,menu_out_css){this.menu_registered[cid]=new ips_menu_class(cid);if(callback){this.menu_openfuncs[cid]=callback;}if(menu_over_css&&menu_out_css){this.menu_over_css[cid]=menu_over_css;this.menu_out_css[cid]=menu_out_css;}return this.menu_registered[cid];};ips_menu.prototype.close=function(){if(this.menu_cur_open){this.menu_registered[this.menu_cur_open].close();}};function ips_menu_class(cid){this.cid=cid;this.initialized=false;this.init_control_object();this.init_menu();};ips_menu_class.prototype.init_control_object=function(){this.cid_obj=document.getElementById(this.cid);try{this.cid_obj.style.cursor="pointer";}catch(e){this.cid_obj.style.cursor="hand";}this.cid_obj.unselectable=true;this.cid_obj.onclick=ips_menu_events.prototype.event_onclick;this.cid_obj.onmouseover=ips_menu_events.prototype.event_onmouseover;this.cid_obj.onmouseout=ips_menu_events.prototype.event_onmouseout;};ips_menu_class.prototype.init_menu=function(){this.cid_menu_obj=document.getElementById(this.cid+'_menu');if(this.cid_menu_obj){if(this.initialized){return;}this.cid_menu_obj.style.display="none";this.cid_menu_obj.style.position="absolute";this.cid_menu_obj.style.left="0px";this.cid_menu_obj.style.top="0px";this.cid_menu_obj.onclick=ipsclass.cancel_bubble_low;this.cid_menu_obj.zIndex=50;this.initialized=true;}};ips_menu_class.prototype.open=function(obj){if(!this.cid_menu_obj){this.initialized=false;this.init_menu();}if(ipsmenu.menu_cur_open!=null){ipsmenu.menu_registered[ipsmenu.menu_cur_open].close();}if(ipsmenu.menu_cur_open==obj.id){return false;}ipsmenu.menu_cur_open=obj.id;var left_px=ipsclass.get_obj_leftpos(obj);var top_px=ipsclass.get_obj_toppos(obj)+obj.offsetHeight;var ifid=obj.id;if(is_safari){top_px+=20;}this.cid_menu_obj.style.zIndex=-1;this.cid_menu_obj.style.display="";var width=parseInt(this.cid_menu_obj.style.width)?parseInt(this.cid_menu_obj.style.width):this.cid_menu_obj.offsetWidth;if((left_px+width)>=document.body.clientWidth){left_px=left_px+obj.offsetWidth-width;}if(is_moz){top_px-=1;}this.cid_menu_obj.style.left=left_px+"px";this.cid_menu_obj.style.top=top_px+"px";this.cid_menu_obj.style.zIndex=100;if(ipsmenu.menu_openfuncs[obj.id]){eval(ipsmenu.menu_openfuncs[obj.id]);}if(is_ie){try{if(!document.getElementById('if_'+obj.id)){var iframeobj=document.createElement('iframe');iframeobj.src='javascript:;';iframeobj.id='if_'+obj.id;document.getElementsByTagName('body').appendChild(iframeobj);}else{var iframeobj=document.getElementById('if_'+obj.id);}iframeobj.scrolling='no';iframeobj.frameborder='no';iframeobj.className='iframeshim';iframeobj.style.position='absolute';iframeobj.style.width=parseInt(this.cid_menu_obj.offsetWidth)+'px';iframeobj.style.height=parseInt(this.cid_menu_obj.offsetHeight)+'px';iframeobj.style.top=this.cid_menu_obj.style.top;iframeobj.style.left=this.cid_menu_obj.style.left;iframeobj.style.zIndex=99;iframeobj.style.display="block";}catch(error){}}if(is_safari){try{mlinks=this.cid_menu_obj.getElementsByTagName('a');for(var i=0;i<=mlinks.length;i++){if(mlinks[i]!=null&&mlinks[i].href!=null&&mlinks[i].href&&(mlinks[i].href.indexOf('#',0)!=(mlinks[i].href.length-1))){mlinks[i].onmousedown=ips_menu_events.prototype.event_safari_onclick_handler;mlinks[i].id='saf-link-'+this.cid+i;}}}catch(error){}}if(this.cid_obj.editor_id){this.cid_obj.state=true;IPS_editor[this.cid_obj.editor_id].set_menu_context(this.cid_obj,'mousedown');}return false;};ips_menu_class.prototype.close=function(){if(this.cid_menu_obj!=null){this.cid_menu_obj.style.display="none";}else if(ipsmenu.menu_cur_open!=null){ipsmenu.menu_registered[ipsmenu.menu_cur_open].cid_menu_obj.style.display='none';}ipsmenu.menu_cur_open=null;if(this.cid_obj){if(ipsmenu.menu_out_css[this.cid_obj.id]){this.cid_obj.className=ipsmenu.menu_out_css[this.cid_obj.id];}}if(is_ie){try{document.getElementById('if_'+this.cid).style.display="none";}catch(error){}}if(this.cid_obj.editor_id){this.cid_obj.state=false;IPS_editor[this.cid_obj.editor_id].set_menu_context(this.cid_obj,'mouseout');}};ips_menu_class.prototype.hover=function(e){if(ipsmenu.menu_cur_open!=null){if(ipsmenu.menu_registered[ipsmenu.menu_cur_open].cid!=this.id){this.open(e);}}};function ips_menu_events(){};ips_menu_events.prototype.event_safari_onclick_handler=function(){if(this.id){window.location=document.getElementById(this.id).href;}};ips_menu_events.prototype.event_onmouseover=function(e){e=ipsclass.cancel_bubble(e,true);ipsmenu.menu_registered[this.id].hover(this);if(ipsmenu.menu_over_css[this.id]){this.className=ipsmenu.menu_over_css[this.id];}};ips_menu_events.prototype.event_onmouseout=function(e){e=ipsclass.cancel_bubble(e,true);if(ipsmenu.menu_out_css[this.id]&&ipsmenu.mLine truncated
|
||||
ipsmenu=new ips_menu();function ips_menu(){this.menu_registered=new Array();this.menu_openfuncs=new Array();this.menu_over_css=new Array();this.menu_out_css=new Array();this.menu_open_event=new Array();this.dynamic_register=new Array();this.menu_cur_open=null;this.dynamic_html=null;}ips_menu.prototype.register=function(cid,callback,menu_over_css,menu_out_css,event_type){if(event_type){this.menu_open_event[cid]=(event_type=='onmouseover')?'onmouseover':'onclick';}this.menu_registered[cid]=new ips_menu_class(cid);if(callback){this.menu_openfuncs[cid]=callback;}if(menu_over_css&&menu_out_css){this.menu_over_css[cid]=menu_over_css;this.menu_out_css[cid]=menu_out_css;}return this.menu_registered[cid];};ips_menu.prototype.close=function(){if(this.menu_cur_open){this.menu_registered[this.menu_cur_open].close();}};function ips_menu_class(cid){this.cid=cid;this.initialized=false;this.init_control_object();this.init_menu();};ips_menu_class.prototype.init_control_object=function(){this.cid_obj=document.getElementById(this.cid);try{this.cid_obj.style.cursor="pointer";}catch(e){this.cid_obj.style.cursor="hand";}this.cid_obj.unselectable=true;if(ipsmenu.menu_open_event[this.cid]=='onmouseover'){this.cid_obj.onmouseover=ips_menu_events.prototype.event_onclick;}else{this.cid_obj.onclick=ips_menu_events.prototype.event_onclick;this.cid_obj.onmouseover=ips_menu_events.prototype.event_onmouseover;}this.cid_obj.onmouseout=ips_menu_events.prototype.event_onmouseout;};ips_menu_class.prototype.init_menu=function(){this.cid_menu_obj=document.getElementById(this.cid+'_menu');if(this.cid_menu_obj){if(this.initialized){return;}this.cid_menu_obj.style.display="none";this.cid_menu_obj.style.position="absolute";this.cid_menu_obj.style.left="0px";this.cid_menu_obj.style.top="0px";this.cid_menu_obj.onclick=ipsclass.cancel_bubble_low;this.cid_menu_obj.zIndex=50;this.initialized=true;}};ips_menu_class.prototype.open=function(obj){if(!this.cid_menu_obj){this.initialized=false;this.init_menu();}if(ipsmenu.menu_cur_open!=null){ipsmenu.menu_registered[ipsmenu.menu_cur_open].close();}if(ipsmenu.menu_cur_open==obj.id){return false;}ipsmenu.menu_cur_open=obj.id;var left_px=ipsclass.get_obj_leftpos(obj);var top_px=ipsclass.get_obj_toppos(obj)+obj.offsetHeight;var ifid=obj.id;try{if(is_safari&&!ipb_is_acp){top_px+=20;}}catch(error){if(is_safari){top_px+=20;}}this.cid_menu_obj.style.zIndex=-1;this.cid_menu_obj.style.display="";var width=parseInt(this.cid_menu_obj.style.width)?parseInt(this.cid_menu_obj.style.width):this.cid_menu_obj.offsetWidth;if((left_px+width)>=document.body.clientWidth){left_px=left_px+obj.offsetWidth-width;}if(is_moz){top_px-=1;}this.cid_menu_obj.style.left=left_px+"px";this.cid_menu_obj.style.top=top_px+"px";this.cid_menu_obj.style.zIndex=100;if(ipsmenu.menu_openfuncs[obj.id]){eval(ipsmenu.menu_openfuncs[obj.id]);}if(is_ie){try{if(!document.getElementById('if_'+obj.id)){var iframeobj=document.createElement('iframe');iframeobj.src='javascript:;';iframeobj.id='if_'+obj.id;document.getElementsByTagName('body').appendChild(iframeobj);}else{var iframeobj=document.getElementById('if_'+obj.id);}iframeobj.scrolling='no';iframeobj.frameborder='no';iframeobj.className='iframeshim';iframeobj.style.position='absolute';iframeobj.style.width=parseInt(this.cid_menu_obj.offsetWidth)+'px';iframeobj.style.height=parseInt(this.cid_menu_obj.offsetHeight)+'px';iframeobj.style.top=this.cid_menu_obj.style.top;iframeobj.style.left=this.cid_menu_obj.style.left;iframeobj.style.zIndex=99;iframeobj.style.display="block";}catch(error){}}if(is_safari){try{mlinks=this.cid_menu_obj.getElementsByTagName('a');for(var i=0;i<=mlinks.length;i++){if(mlinks[i]!=null&&mlinks[i].href!=null&&mlinks[i].href&&(mlinks[i].href.indexOf('#',0)!=(mlinks[i].href.length-1))){mlinks[i].onmousedown=ips_menu_events.prototype.event_safari_onclick_handler;mlinks[i].id='saf-link-'+this.cid+i;}}}catch(error){}}if(this.cid_obj.editor_id){this.cid_obj.state=true;IPS_editor[this.cid_obj.editor_id].set_menu_context(this.cid_obj,'mousedown');}return false;};ips_menu_class.prototype.close=function(){if(this.cid_menu_obj!=null){this.cid_menu_obj.style.display="none";}else if(ipsmenu.menu_cur_open!=null){ipsmenu.menu_registered[ipsmenu.menu_cur_open].cid_menu_obj.style.display='none';}ipsmenu.menu_cur_open=null;if(this.cid_obj){if(ipsmenu.menu_out_css[this.cid_obj.id]){this.cid_obj.className=ipsmenu.menu_out_css[this.cid_obj.id];}}if(is_ie){try{document.getElementById('if_'+this.cid).style.display="none";}catch(error){}}if(this.cid_obj.editor_id){this.cid_obj.state=false;IPS_editor[this.cid_obj.editor_id].set_menu_context(this.cid_obj,'mouseout');}};ips_menu_class.prototype.hover=function(e){if(ipsmenu.menu_cur_open!=null){if(ipsmenu.menu_registered[ipsmenu.menu_cur_open].cid!=this.id){this.open(e);}}};function ips_menu_events(){};ips_menu_events.prototype.event_safari_onclick_handler=function(){if(this.id){window.location=document.getElementById(this.id).href;}};ips_menu_events.prototype.evLine truncated
|
||||
@@ -1 +1 @@
|
||||
var ips_personal_portal=new ips_personal_portal();function ips_personal_portal(){this.div_rating_wrapper='pp-rating-wrapper';this.text_rating_image='pp-rating-img-';this.css_classes={'pp-tabon':'pp-tabon','pp-taboff':'pp-taboff','pp-tabshaded':'pp-tabshaded','pp-contentbox-back':'pp-contentbox-back','pp-contentbox-entry-noheight':'pp-contentbox-entry-noheight','pp-contentbox-entry-noheight-mod':'pp-contentbox-entry-noheight-mod','pp-contentbox-entry-noheight-sel':'pp-contentbox-entry-noheight-sel'};this.contact_types={'aim':'aim','msn':'msn','icq':'icq','yahoo':'yahoo'};this.content_tabs={};this.stored_tabs={};this.stored_div_classes={};this.iframe_tabs={'comments':ipb_var_base_url+'act=profile&CODE=personal_iframe_comments','settings':ipb_var_base_url+'act=profile&CODE=personal_iframe_settings','friends':ipb_var_base_url+'act=profile&CODE=personal_iframe_friends'};this.stored_tabs_css={};this.div_names={'pp-entry-gender-wrap':'pp-entry-gender-wrap','pp-entry-gender-text':'pp-entry-gender-text','pp-entry-gender-img':'pp-entry-gender-img','pp-entry-gender-imgwrap':'pp-entry-gender-imgwrap','pp-entry-location-wrap':'pp-entry-location-wrap','pp-entry-location-text':'pp-entry-location-text','pp-entry-born-wrap':'pp-entry-born-wrap','pp-entry-born-text':'pp-entry-born-text','pp-entry-age-wrap':'pp-entry-age-wrap','pp-entry-age-text':'pp-entry-age-text','pp-main-tab-content':'pp-main-tab-content','pp-content-tab':'pp-content-tab','pp-comment-textarea':'pp-comment-textarea','pp-comments-wrap':'pp-comments-wrap','pp-comment-entry':'pp-comment-entry','pp-comment-entry-main':'pp-comment-entry-main','pp-iframe-wrap':'pp-iframe-wrap','pp-entry-contact-wrap':'pp-entry-contact-wrap','pp-entry-contact-entry':'pp-entry-contact-entry','pp-main-photo':'pp-main-photo','pp-personal_statement':'pp-personal_statement','pp-checked':'pp-checked','pp-friend-img':'pp-friend-img','pp-friend-text':'pp-friend-text','pp-friend-wrap':'pp-friend-wrap'};this.settings={'allow_rating':0,'default_rating':3,'member_id':0,'viewer_id':0,'img_star_on':'star_filled.gif','img_star_selected':'star_selected.gif','img_star_off':'star_empty.gif','img_gender_male':'gender_male.png','img_gender_female':'gender_female.png','img_gender_mystery':'gender_mystery.png','img_base_url':'','img_menu_icon':'','default_tab':'','photo_def_width':'150','photo_def_height':'150','photo_def_src':ipb_var_image_url+'/folder_profile_portal/pp-blank-large.png','img_friend_remove':ipb_var_image_url+'/folder_profile_portal/friend_remove_small.png','img_friend_add':ipb_var_image_url+'/folder_profile_portal/friend_add_small.png'};this.languages={'rate_me':'Rate Me','img_alt_rate':'Rate this member, click on desired star to send rating','gender_male':'Male','gender_female':'Female','gender_mystery':'Gender Not Set','saving_comment':'Saving Comment...','loading_tab':'Loading Content...','deleting_comment':'Deleting Comment...','friend_add':'Add as Friend','friend_remove':'Remove Friend'};var loaded_tab=null;this.init=function(){var divs=document.getElementsByTagName('DIV');var divcount=0;for(var i=0;i<=divs.length;i++){try{if(!divs[i].id){continue;}}catch(error){continue;}var divid=divs[i].id;var divname=ipsclass.get_name_from_text(divs[i].id);var divnum=ipsclass.get_id_from_text(divs[i].id);if(divname==this.div_names['pp-content-tab']){var _highlight=0;this.stored_tabs[divnum]=divs[i];this.stored_tabs_css[divnum]=divs[i].className;divs[i].style.cursor='pointer';divs[i].onclick=this.tab_onclick;if(this.settings['default_tab']!=""){if(this.settings['default_tab']==divnum){_highlight=1;}}else if(divcount==0){_highlight=1;}if(_highlight==1){divs[i].className=this.css_classes['pp-tabon'];divs[i].style.display='block';}else{if(divs[i].className!=this.css_classes['pp-tabshaded']){divs[i].className=this.css_classes['pp-taboff'];}divs[i].style.display='block';}divcount++;}}this.init_rating_images();this.show_dropdown_boxes();};this.show_friend_add_or_remove=function(add_friend){try{var _div=document.getElementById(this.div_names['pp-friend-wrap']);var _html='';if(_div.id){if(add_friend){_html="<img src='"+this.settings['img_friend_add']+"' id='"+this.div_names['pp-friend-img']+"' alt='' border='0' /> ";_html+="<a href='#' onclick='friends_pop(\"&do=add&member_id="+this.settings['member_id']+"&md5check="+ipb_md5_check+"\"); ips_personal_portal.show_friend_add_or_remove(0); return false;' id='"+this.div_names['pp-friend-text']+"'>"+this.languages['friend_add']+"</a>";}else{_html="<img src='"+this.settings['img_friend_remove']+"' id='"+this.div_names['pp-friend-img']+"' alt='' border='0' /> ";_html+="<a href='#' onclick='friends_pop(\"&do=remove&member_id="+this.settings['member_id']+"&md5check="+ipb_md5_check+"\"); ips_personal_portal.show_friend_add_or_remove(1); return false;' id='"+this.div_names['pp-friend-text']+"'>"+this.languages['friend_remove']+"</a>";}_div.innerHTML=_html;}}catch(error){}};this.toggle_comment_box=function(comment_id,from_iframe){comment_iLine truncated
|
||||
var ips_personal_portal=new ips_personal_portal();function ips_personal_portal(){this.div_rating_wrapper='pp-rating-wrapper';this.text_rating_image='pp-rating-img-';this.css_classes={'pp-tabon':'pp-tabon','pp-taboff':'pp-taboff','pp-tabshaded':'pp-tabshaded','pp-contentbox-back':'pp-contentbox-back','pp-contentbox-entry-noheight':'pp-contentbox-entry-noheight','pp-contentbox-entry-noheight-mod':'pp-contentbox-entry-noheight-mod','pp-contentbox-entry-noheight-sel':'pp-contentbox-entry-noheight-sel'};this.contact_types={'aim':'aim','msn':'msn','icq':'icq','yahoo':'yahoo'};this.content_tabs={};this.stored_tabs={};this.stored_div_classes={};this.iframe_tabs={'comments':ipb_var_base_url+'act=profile&CODE=personal_iframe_comments','settings':ipb_var_base_url+'act=profile&CODE=personal_iframe_settings','friends':ipb_var_base_url+'act=profile&CODE=personal_iframe_friends'};this.stored_tabs_css={};this.div_names={'pp-entry-gender-wrap':'pp-entry-gender-wrap','pp-entry-gender-text':'pp-entry-gender-text','pp-entry-gender-img':'pp-entry-gender-img','pp-entry-gender-imgwrap':'pp-entry-gender-imgwrap','pp-entry-location-wrap':'pp-entry-location-wrap','pp-entry-location-text':'pp-entry-location-text','pp-entry-born-wrap':'pp-entry-born-wrap','pp-entry-born-text':'pp-entry-born-text','pp-entry-age-wrap':'pp-entry-age-wrap','pp-entry-age-text':'pp-entry-age-text','pp-entry-age-yearsold':'pp-entry-age-yearsold','pp-main-tab-content':'pp-main-tab-content','pp-content-tab':'pp-content-tab','pp-comment-textarea':'pp-comment-textarea','pp-comments-wrap':'pp-comments-wrap','pp-comment-entry':'pp-comment-entry','pp-comment-entry-main':'pp-comment-entry-main','pp-iframe-wrap':'pp-iframe-wrap','pp-entry-contact-wrap':'pp-entry-contact-wrap','pp-entry-contact-entry':'pp-entry-contact-entry','pp-main-photo':'pp-main-photo','pp-personal_statement':'pp-personal_statement','pp-checked':'pp-checked','pp-friend-img':'pp-friend-img','pp-friend-text':'pp-friend-text','pp-friend-wrap':'pp-friend-wrap'};this.settings={'allow_rating':0,'default_rating':3,'edit_allowed':0,'member_id':0,'viewer_id':0,'img_star_on':'star_filled.gif','img_star_selected':'star_selected.gif','img_star_off':'star_empty.gif','img_gender_male':'gender_male.png','img_gender_female':'gender_female.png','img_gender_mystery':'gender_mystery.png','img_base_url':'','img_menu_icon':'','default_tab':'','photo_def_width':'150','photo_def_height':'150','photo_def_src':ipb_var_image_url+'/folder_profile_portal/pp-blank-large.png','img_friend_remove':ipb_var_image_url+'/folder_profile_portal/friend_remove_small.png','img_friend_add':ipb_var_image_url+'/folder_profile_portal/friend_add_small.png'};this.languages={'rate_me':'Rate Me','img_alt_rate':'Rate this member, click on desired star to send rating','gender_male':'Male','gender_female':'Female','gender_mystery':'Gender Not Set','saving_comment':'Saving Comment...','loading_tab':ajax_load_msg,'deleting_comment':'Deleting Comment...','friend_add':'Add as Friend','friend_remove':'Remove Friend'};var loaded_tab=null;this.init=function(){var divs=document.getElementsByTagName('DIV');var divcount=0;for(var i=0;i<=divs.length;i++){try{if(!divs[i].id){continue;}}catch(error){continue;}var divid=divs[i].id;var divname=ipsclass.get_name_from_text(divs[i].id);var divnum=ipsclass.get_id_from_text(divs[i].id);if(divname==this.div_names['pp-content-tab']){var _highlight=0;this.stored_tabs[divnum]=divs[i];this.stored_tabs_css[divnum]=divs[i].className;divs[i].style.cursor='pointer';divs[i].onclick=this.tab_onclick;if(this.settings['default_tab']!=""){if(this.settings['default_tab']==divnum){_highlight=1;}}else if(divcount==0){_highlight=1;}if(_highlight==1){divs[i].className=this.css_classes['pp-tabon'];divs[i].style.display='block';}else{if(divs[i].className!=this.css_classes['pp-tabshaded']){divs[i].className=this.css_classes['pp-taboff'];}divs[i].style.display='block';}divcount++;}}this.init_rating_images();this.show_dropdown_boxes();};this.show_friend_add_or_remove=function(add_friend){try{var _div=document.getElementById(this.div_names['pp-friend-wrap']);var _html='';if(_div.id){if(add_friend){_html="<img src='"+this.settings['img_friend_add']+"' id='"+this.div_names['pp-friend-img']+"' alt='' border='0' /> ";_html+="<a href='#' onclick='friends_pop(\"&do=add&member_id="+this.settings['member_id']+"&md5check="+ipb_md5_check+"\"); ips_personal_portal.show_friend_add_or_remove(0); return false;' id='"+this.div_names['pp-friend-text']+"'>"+this.languages['friend_add']+"</a>";}else{_html="<img src='"+this.settings['img_friend_remove']+"' id='"+this.div_names['pp-friend-img']+"' alt='' border='0' /> ";_html+="<a href='#' onclick='friends_pop(\"&do=remove&member_id="+this.settings['member_id']+"&md5check="+ipb_md5_check+"\"); ips_personal_portal.show_friend_add_or_remove(1); return false;' id='"+this.div_names['pp-friend-text']+"'>"+this.languages['friend_remove']+"</a>";}_div.innerHTML=_html;}}catch(error){}};this.togLine truncated
|
||||
@@ -1,4 +1,4 @@
|
||||
var ie_ptags_to_newlines=true;var IPS_editor=new Array();var buttons_update=new Array("bold","italic","underline","justifyleft","justifycenter","justifyright","insertorderedlist","insertunorderedlist");var ips_primary_colors=new Array('#000000','#A0522D','#556B2F','#006400','#483D8B','#000080','#4B0082','#2F4F4F','#8B0000','#FF8C00','#808000','#008000','#008080','#0000FF','#708090','#696969','#FF0000','#F4A460','#9ACD32','#2E8B57','#48D1CC','#4169E1','#800080','#808080','#FF00FF','#FFA500','#FFFF00','#00FF00','#00FFFF','#00BFFF','#9932CC','#C0C0C0','#FFC0CB','#F5DEB3','#FFFACD','#98FB98','#AFEEEE','#ADD8E6','#DDA0DD','#FFFFFF');var ips_primary_fonts=new Array("Arial","Arial Black","Arial Narrow","Book Antiqua","Century Gothic","Comic Sans MS","Courier New","Franklin Gothic Medium","Garamond","Georgia","Impact","Lucida Console","Lucida Sans Unicode","Microsoft Sans Serif","Palatino Linotype","Tahoma","Times New Roman","Trebuchet MS","Verdana");var ips_primary_sizes=new Array(1,2,3,4,5,6,7);var ips_format_items={'cmd_subscript':'Sub-script','cmd_superscript':'Super-script','cmd_strikethrough':'Strikethrough'};var ips_format_item_images={'cmd_subscript':'rte-subscript.gif','cmd_superscript':'rte-superscript.gif','cmd_strikethrough':'rte-strike.gif'};ips_language_array={};function ips_text_editor(editor_id,mode,use_bbcode,file_path,initial_text){this.editor_id=editor_id;this.is_rte=mode;this.initialized=false;this.buttons=new Array();this.fonts=new Array();this.state=new Array();this.text_obj=document.getElementById(this.editor_id+'_textarea');this.control_obj=document.getElementById(this.editor_id+'_controls');this.font_obj=document.getElementById(this.editor_id+'_out_fontname');this.size_obj=document.getElementById(this.editor_id+'_out_fontsize');this.special_obj=document.getElementById(this.editor_id+'_out_special');this.format_obj=document.getElementById(this.editor_id+'_out_format');this.mainbar=document.getElementById(this.editor_id+'_main-bar');this.use_menus=(typeof(ipsmenu)=='undefined'?false:true);this.is_ie=is_ie;this.is_moz=is_moz;this.is_opera=is_opera;this.is_safari=is_safari;this.file_path=file_path?file_path:global_rte_includes_url;this.font_state=null;this.size_state=null;this.use_bbcode=use_bbcode;this.open_brace=this.use_bbcode?'[':'<';this.close_brace=this.use_bbcode?']':'>';this.allow_advanced=this.use_bbcode?0:1;this.ips_frame_html='';this.popups=new Array();this.char_set=global_rte_char_set?global_rte_char_set:'UTF-8';this.forum_fix_ie_newlines=0;this.emoticon_window_id='';this.is_loading=0;this.hidden_objects=new Array();this.history_pointer=-1;this.history_recordings=new Array();this._showing_html=0;this._ie_cache=null;this.current_bar_object=null;this.ips_special_items={};ips_format_items['cmd_subscript']=ips_language_array['js_rte_sub']?ips_language_array['js_rte_sub']:'Sub-script';ips_format_items['cmd_superscript']=ips_language_array['js_rte_sup']?ips_language_array['js_rte_sup']:'Super-script';ips_format_items['cmd_strikethrough']=ips_language_array['js_rte_strike']?ips_language_array['js_rte_strike']:'Strikethrough';this.init=function(){if(this.initialized){return;}this.control_obj.style.display='';try{document.getElementById(this.editor_id+'_wysiwyg_used').value=parseInt(this.is_rte);}catch(err){}this.ips_frame_html=this.get_frame_html();this.editor_set_content(initial_text);this.editor_set_functions();this.editor_set_controls();this.initialized=true;};this.get_frame_html=function(){var ips_frame_html="";ips_frame_html+="<html id=\""+this.editor_id+"_html\">\n";ips_frame_html+="<head>\n";ips_frame_html+="<meta http-equiv=\"content-type\" content=\"text/html; charset="+this.char_set+"\" />";ips_frame_html+="<style type='text/css' media='all'>\n";ips_frame_html+="body {\n";ips_frame_html+=" background: #FFFFFF;\n";ips_frame_html+=" margin: 0px;\n";ips_frame_html+=" padding: 4px;\n";ips_frame_html+=" font-family: Verdana, arial, sans-serif;\n";ips_frame_html+=" font-size: 10pt;\n";ips_frame_html+="}\n";ips_frame_html+="</style>\n";ips_frame_html+="</head>\n";ips_frame_html+="<body>\n";ips_frame_html+="{:content:}\n";ips_frame_html+="</body>\n";ips_frame_html+="</html>";return ips_frame_html;};this.editor_check_focus=function(){if(!this.editor_window.has_focus){if(this.is_opera){this.editor_window.focus();}this.editor_window.focus();}};this.editor_set_controls=function(){var controls=new Array();var _c=0;if(!this.control_obj){return;}var items=this.control_obj.getElementsByTagName("DIV");for(var i=0;i<items.length;i++){if((items[i].className=='rte-normal'||items[i].className=='rte-menu-button'||items[i].className=='rte-normal-menubutton')&&items[i].id){controls[controls.length]=items[i].id;}}for(var i=0;i<controls.length;i++){var control=document.getElementById(controls[i]);if(control.className=='rte-normal'){this.init_editor_button(control);}else if(control.className=='rte-menu-button'||control.className=='rte-normal-menubutton'){this.init_editor_popup_button(control);}}ipsclass.seLine truncated
|
||||
var ie_ptags_to_newlines=true;var IPS_editor=new Array();var buttons_update=new Array("bold","italic","underline","justifyleft","justifycenter","justifyright","insertorderedlist","insertunorderedlist");var ips_primary_colors=new Array('#000000','#A0522D','#556B2F','#006400','#483D8B','#000080','#4B0082','#2F4F4F','#8B0000','#FF8C00','#808000','#008000','#008080','#0000FF','#708090','#696969','#FF0000','#F4A460','#9ACD32','#2E8B57','#48D1CC','#4169E1','#800080','#808080','#FF00FF','#FFA500','#FFFF00','#00FF00','#00FFFF','#00BFFF','#9932CC','#C0C0C0','#FFC0CB','#F5DEB3','#FFFACD','#98FB98','#AFEEEE','#ADD8E6','#DDA0DD','#FFFFFF');var ips_primary_fonts=new Array("Arial","Arial Black","Arial Narrow","Book Antiqua","Century Gothic","Comic Sans MS","Courier New","Franklin Gothic Medium","Garamond","Georgia","Impact","Lucida Console","Lucida Sans Unicode","Microsoft Sans Serif","Palatino Linotype","Tahoma","Times New Roman","Trebuchet MS","Verdana");var ips_primary_sizes=new Array(1,2,3,4,5,6,7);var ips_format_items={'cmd_subscript':'Sub-script','cmd_superscript':'Super-script','cmd_strikethrough':'Strikethrough'};var ips_format_item_images={'cmd_subscript':'rte-subscript.gif','cmd_superscript':'rte-superscript.gif','cmd_strikethrough':'rte-strike.gif'};ips_language_array={};function ips_text_editor(editor_id,mode,use_bbcode,file_path,initial_text){this.editor_id=editor_id;this.is_rte=mode;this.initialized=false;this.buttons=new Array();this.fonts=new Array();this.state=new Array();this.text_obj=document.getElementById(this.editor_id+'_textarea');this.control_obj=document.getElementById(this.editor_id+'_controls');this.font_obj=document.getElementById(this.editor_id+'_out_fontname');this.size_obj=document.getElementById(this.editor_id+'_out_fontsize');this.special_obj=document.getElementById(this.editor_id+'_out_special');this.format_obj=document.getElementById(this.editor_id+'_out_format');this.mainbar=document.getElementById(this.editor_id+'_main-bar');this.use_menus=(typeof(ipsmenu)=='undefined'?false:true);this.is_ie=is_ie;this.is_moz=is_moz;this.is_opera=is_opera;this.is_safari=is_safari;this.file_path=file_path?file_path:global_rte_includes_url;this.font_state=null;this.size_state=null;this.use_bbcode=use_bbcode;this.open_brace=this.use_bbcode?'[':'<';this.close_brace=this.use_bbcode?']':'>';this.allow_advanced=this.use_bbcode?0:1;this.ips_frame_html='';this.popups=new Array();this.char_set=global_rte_char_set?global_rte_char_set:'UTF-8';this.forum_fix_ie_newlines=0;this.emoticon_window_id='';this.is_loading=0;this.hidden_objects=new Array();this.history_pointer=-1;this.history_recordings=new Array();this._showing_html=0;this._ie_cache=null;this.current_bar_object=null;this.ips_special_items={};ips_format_items['cmd_subscript']=ips_language_array['js_rte_sub']?ips_language_array['js_rte_sub']:'Sub-script';ips_format_items['cmd_superscript']=ips_language_array['js_rte_sup']?ips_language_array['js_rte_sup']:'Super-script';ips_format_items['cmd_strikethrough']=ips_language_array['js_rte_strike']?ips_language_array['js_rte_strike']:'Strikethrough';ips_language_array['emos_show_all']=ips_language_array['emos_show_all']?ips_language_array['emos_show_all']:'Show All';this.init=function(){if(this.initialized){return;}this.control_obj.style.display='';try{document.getElementById(this.editor_id+'_wysiwyg_used').value=parseInt(this.is_rte);}catch(err){}this.ips_frame_html=this.get_frame_html();this.editor_set_content(initial_text);this.editor_set_functions();this.editor_set_controls();this.initialized=true;};this.get_frame_html=function(){var ips_frame_html="";ips_frame_html+="<html id=\""+this.editor_id+"_html\">\n";ips_frame_html+="<head>\n";ips_frame_html+="<meta http-equiv=\"content-type\" content=\"text/html; charset="+this.char_set+"\" />";ips_frame_html+="<style type='text/css' media='all'>\n";ips_frame_html+="body {\n";ips_frame_html+=" background: #FFFFFF;\n";ips_frame_html+=" margin: 0px;\n";ips_frame_html+=" padding: 4px;\n";ips_frame_html+=" font-family: Verdana, arial, sans-serif;\n";ips_frame_html+=" font-size: 10pt;\n";ips_frame_html+="}\n";ips_frame_html+="</style>\n";ips_frame_html+="</head>\n";ips_frame_html+="<body>\n";ips_frame_html+="{:content:}\n";ips_frame_html+="</body>\n";ips_frame_html+="</html>";return ips_frame_html;};this.editor_check_focus=function(){if(!this.editor_window.has_focus){if(this.is_opera){this.editor_window.focus();}this.editor_window.focus();}};this.editor_set_controls=function(){var controls=new Array();var _c=0;if(!this.control_obj){return;}var items=this.control_obj.getElementsByTagName("DIV");for(var i=0;i<items.length;i++){if((items[i].className=='rte-normal'||items[i].className=='rte-menu-button'||items[i].className=='rte-normal-menubutton')&&items[i].id){controls[controls.length]=items[i].id;}}for(var i=0;i<controls.length;i++){var control=document.getElementById(controls[i]);if(control.className=='rte-normal'){this.init_editor_button(control);}else if(control.classNaLine truncated
|
||||
{
|
||||
this.editor_document.selectionStart = open;
|
||||
this.editor_document.selectionEnd = open + text.length;
|
||||
@@ -64,7 +64,7 @@ if ( text = this.get_selection() )
|
||||
text = open_tag + text.replace( regex, "\n" + item_open_tag + '$1' + item_close_tag ) + '\n' + close_tag;
|
||||
if ( this.use_bbcode )
|
||||
{
|
||||
text = text.replace( new RegExp( '\\[\\*\\][\r\n]', 'gi' ), item_open_tag );
|
||||
text = text.replace( new RegExp( '\\[\\*\\][\r\n]+', 'gi' ), item_open_tag );
|
||||
}
|
||||
this.insert_text( text );
|
||||
}
|
||||
@@ -100,4 +100,4 @@ if ( text !== false )
|
||||
if ( text.match( link_regex ) )
|
||||
{
|
||||
text = ( this.use_bbcode ) ? text.replace( /\[url=([^\]]+?)\]([^\[]+?)\[\/url\]/ig, "$2" )
|
||||
: text.replace( /<a href=['\"]([^\"']+?)['\"]([^>]+?)?>(.+?)<\/a>/ig,"$3");}this.insert_text(text);}};this.undo=function(){this.history_record_state(this.editor_get_contents());this.history_time_shift(-1);if((text=this.history_fetch_recording())!==false){this.editor_document.value=text;}};this.redo=function(){this.history_time_shift(1);if((text=this.history_fetch_recording())!==false){this.editor_document.value=text;}};this.update_for_form_submit=function(subjecttext,minchars){return true;};}this.___SAFARI_FUNCTIONS=function(){};if(this.is_safari){try{document.getElementById(this.editor_id+'_cmd_switcheditor').style.display='none';}catch(error){}}this.___IPB_FUNCTIONS=function(){};this.createlink=function(e){var _text=this.get_selection();_text=_text.replace( /\n|\r|<br \/>/g,'');if(_text.match( /(<a href|\[url)/ig)){this.format_text(e,"unlink",false);}else{var _url=prompt(ipb_global_lang['editor_enter_url'],'http://');if(!_url||_url==null||_url=='http://'){return false;}_text=_text?_text:prompt(ipb_global_lang['editor_enter_title']);if(!_text||_text==null){return false;}this.wrap_tags('url',_url,_text);}};this.insertemail=function(e){var _text=this.get_selection();_text=_text.replace( /\n|\r|<br \/>/g,'');if(_text.match( /(<a href|\[email)/ig)){this.format_text(e,"unlink",false);}else{var _url=prompt(ipb_global_lang['editor_enter_email'],'');if(!_url||_url==null){return false;}_text=_text?_text:prompt(ipb_global_lang['editor_enter_title']);if(!_text||_text==null){return false;}this.wrap_tags('email',_url,_text);}};this.insertimage=function(){var _text=this.get_selection();_text=_text.replace( /\n|\r|<br \/>/g,'');var _url=prompt(ipb_global_lang['editor_enter_image'],_text?_text:"http://");if(!_url||_url==null||_url=='http://'){return false;}if(!this.is_rte){this.wrap_tags('img',false,_url);}else{this.wrap_tags('img',_url,'');}};this.ipb_quote=function(){this.wrap_tags_lite('[quote]','[/quote]',0)};this.ipb_code=function(){this.wrap_tags_lite('[code]','[/code]',0)};this.init();}function ips_editor_events(){}ips_editor_events.prototype.button_onmouse_event=function(e){if(is_ie){e=ipsclass.cancel_bubble(e,true);}if(e.type=='click'){IPS_editor[this.editor_id].format_text(e,this.cmd,false,true);}IPS_editor[this.editor_id].set_button_context(this,e.type);};ips_editor_events.prototype.special_onmouse_event=function(e){e=ipsclass.cancel_bubble(e,true);if(e.type=='click'){if(!this.loader_key){IPS_editor[this.editor_id].format_text(e,this.cmd,false,true);ipsmenu.close();}else{IPS_editor[this.editor_id].module_load(this,e,this.loader_key);}}IPS_editor[this.editor_id].set_button_context(this,e.type,'menu');};ips_editor_events.prototype.editor_window_onfocus=function(e){this.has_focus=true;};ips_editor_events.prototype.editor_window_onblur=function(e){this.has_focus=false;};ips_editor_events.prototype.editor_document_onmouseup=function(e){try{if(typeof(this.editor_id=='undefined')&&is_moz){this.editor_id=e.view.editor_id;}}catch(me){}IPS_editor[this.editor_id].set_context();menu_action_close();};ips_editor_events.prototype.editor_document_onkeyup=function(e){IPS_editor[this.editor_id].set_context();};ips_editor_events.prototype.editor_document_onkeypress=function(e){if(e.ctrlKey){switch(String.fromCharCode(e.charCode).toLowerCase()){case 'b':cmd='bold';break;case 'i':cmd='italic';break;case 'u':cmd='underline';break;default:return;}e.preventDefault();IPS_editor[this.editor_id].apply_formatting(cmd,false,null);return false;}};ips_editor_events.prototype.popup_button_onmouseevent=function(e){e=ipsclass.cancel_bubble(e,true);if(e.type=='click'){this._onclick(e);IPS_editor[this.editor_id].set_menu_context(this,'mouseover');}else{IPS_editor[this.editor_id].set_menu_context(this,e.type);}};ips_editor_events.prototype.popup_button_show=function(obj){if(typeof IPS_editor[obj.editor_id].popups[obj.cmd]=='undefined'||IPS_editor[obj.editor_id].popups[obj.cmd]==null){IPS_editor[obj.editor_id].init_editor_menu(obj);}this._open(obj);};ips_editor_events.prototype.menu_option_onmouseevent=function(e){e=ipsclass.cancel_bubble(e,true);IPS_editor[this.editor_id].set_button_context(this,e.type,'menu');};ips_editor_events.prototype.font_format_option_onclick=function(e){IPS_editor[this.editor_id].format_text(e,this.cmd,this.firstChild.innerHTML);ipsmenu.close();};ips_editor_events.prototype.emoticon_onclick=function(e){e=ipsclass.cancel_bubble(e,true);IPS_editor[this.editor_id].insert_emoticon(this.emo_id,this.emo_image,this.emo_code,e);ipsmenu.close();};ips_editor_events.prototype.color_cell_onclick=function(e){IPS_editor[this.editor_id].format_text(e,this.cmd,this.colorname);ipsmenu.close();};ips_editor_events.prototype.editor_document_onkeydown=function(e){};
|
||||
: text.replace( /<a href=['\"]([^\"']+?)['\"]([^>]+?)?>(.+?)<\/a>/ig,"$3");}this.insert_text(text);}};this.undo=function(){this.history_record_state(this.editor_get_contents());this.history_time_shift(-1);if((text=this.history_fetch_recording())!==false){this.editor_document.value=text;}};this.redo=function(){this.history_time_shift(1);if((text=this.history_fetch_recording())!==false){this.editor_document.value=text;}};this.update_for_form_submit=function(subjecttext,minchars){return true;};}this.___SAFARI_FUNCTIONS=function(){};if(this.is_safari){try{document.getElementById(this.editor_id+'_cmd_switcheditor').style.display='none';}catch(error){}}this.___IPB_FUNCTIONS=function(){};this.createlink=function(e){var _text=this.get_selection();_text=_text.replace( /\n|\r|<br \/>/g,'');if(_text.match( /(<a href|\[url)/ig)){this.format_text(e,"unlink",false);}else{var _url=prompt(ipb_global_lang['editor_enter_url'],'http://');if(!_url||_url==null||_url=='http://'){return false;}_text=_text?_text:prompt(ipb_global_lang['editor_enter_title'],ipb_global_lang['visit_my_website']);if(!_text||_text==null){return false;}this.wrap_tags('url',_url,_text);}};this.insertemail=function(e){var _text=this.get_selection();_text=_text.replace( /\n|\r|<br \/>/g,'');if(_text.match( /(<a href|\[email)/ig)){this.format_text(e,"unlink",false);}else{var _url=prompt(ipb_global_lang['editor_enter_email'],'');if(!_url||_url==null){return false;}_text=_text?_text:prompt(ipb_global_lang['editor_enter_title']);if(!_text||_text==null){return false;}this.wrap_tags('email',_url,_text);}};this.insertimage=function(){var _text=this.get_selection();_text=_text.replace( /\n|\r|<br \/>/g,'');if(this.is_rte){if(_text.match( /<img(.+?)src=['"](.+?)["'](.*?)>/g)){_text=_text.replace( /<img(.+?)src=['"](.+?)["'](.*?)>/g,'$2');}}var _url=prompt(ipb_global_lang['editor_enter_image'],_text?_text:"http://");if(!_url||_url==null||_url=='http://'){return false;}if(!this.is_rte){this.wrap_tags('img',false,_url);}else{this.wrap_tags('img',_url,'');}};this.ipb_quote=function(){this.wrap_tags_lite('[quote]','[/quote]',0)};this.ipb_code=function(){this.wrap_tags_lite('[code]','[/code]',0)};this.init();}function ips_editor_events(){}ips_editor_events.prototype.button_onmouse_event=function(e){if(is_ie){e=ipsclass.cancel_bubble(e,true);}if(e.type=='click'){IPS_editor[this.editor_id].format_text(e,this.cmd,false,true);}IPS_editor[this.editor_id].set_button_context(this,e.type);};ips_editor_events.prototype.special_onmouse_event=function(e){e=ipsclass.cancel_bubble(e,true);if(e.type=='click'){if(!this.loader_key){IPS_editor[this.editor_id].format_text(e,this.cmd,false,true);ipsmenu.close();}else{IPS_editor[this.editor_id].module_load(this,e,this.loader_key);}}IPS_editor[this.editor_id].set_button_context(this,e.type,'menu');};ips_editor_events.prototype.editor_window_onfocus=function(e){this.has_focus=true;};ips_editor_events.prototype.editor_window_onblur=function(e){this.has_focus=false;};ips_editor_events.prototype.editor_document_onmouseup=function(e){try{if(typeof(this.editor_id=='undefined')&&is_moz){this.editor_id=e.view.editor_id;}}catch(me){}IPS_editor[this.editor_id].set_context();menu_action_close();};ips_editor_events.prototype.editor_document_onkeyup=function(e){IPS_editor[this.editor_id].set_context();};ips_editor_events.prototype.editor_document_onkeypress=function(e){if(e.ctrlKey){switch(String.fromCharCode(e.charCode).toLowerCase()){case 'b':cmd='bold';break;case 'i':cmd='italic';break;case 'u':cmd='underline';break;default:return;}e.preventDefault();IPS_editor[this.editor_id].apply_formatting(cmd,false,null);return false;}};ips_editor_events.prototype.popup_button_onmouseevent=function(e){e=ipsclass.cancel_bubble(e,true);if(e.type=='click'){this._onclick(e);IPS_editor[this.editor_id].set_menu_context(this,'mouseover');}else{IPS_editor[this.editor_id].set_menu_context(this,e.type);}};ips_editor_events.prototype.popup_button_show=function(obj){if(typeof IPS_editor[obj.editor_id].popups[obj.cmd]=='undefined'||IPS_editor[obj.editor_id].popups[obj.cmd]==null){IPS_editor[obj.editor_id].init_editor_menu(obj);}this._open(obj);};ips_editor_events.prototype.menu_option_onmouseevent=function(e){e=ipsclass.cancel_bubble(e,true);IPS_editor[this.editor_id].set_button_context(this,e.type,'menu');};ips_editor_events.prototype.font_format_option_onclick=function(e){IPS_editor[this.editor_id].format_text(e,this.cmd,this.firstChild.innerHTML);ipsmenu.close();};ips_editor_events.prototype.emoticon_onclick=function(e){e=ipsclass.cancel_bubble(e,true);IPS_editor[this.editor_id].insert_emoticon(this.emo_id,this.emo_image,this.emo_code,e);ipsmenu.close();};ips_editor_events.prototype.color_cell_onclick=function(e){IPS_editor[this.editor_id].format_text(e,this.cmd,this.colorname);ipsmenu.close();};ips_editor_events.prototype.editor_document_onkeydown=function(e){};
|
||||
@@ -1 +1 @@
|
||||
function check_side_panel(editor_id){if(global_rte_remove_side_panel){document.getElementById('rte-toggle-side-panel-button').style.display='none';return true;}var _open=global_rte_side_panel_open;var _cookie=ipsclass.my_getcookie('rte-sidepanel');if(_cookie=='open'||_cookie=='close'){_open=(_cookie=='open')?1:0;}if(_open){show_options_panel(editor_id,_open);}}function show_options_panel(editor_id,force,start_emo){if(global_rte_remove_side_panel){document.getElementById('rte-toggle-side-panel-button').style.display='none';return true;}if(typeof(start_emo)=='undefined'){start_emo=0;}var _editor=document.getElementById(editor_id+'_main-bar');var _options=document.getElementById(editor_id+'_options-bar');var _height=parseInt(_editor.offsetHeight);var _mode='open';var _more_less='';_options.innerHTML='';if(typeof(force)!='undefined'){_mode=(force==1)?'open':'close';}else{if(_options._panel_open){_mode='close';}}ipsclass.my_setcookie('rte-sidepanel',_mode,1);if(_mode=='open'){_editor.style.width='82%';_editor.parentNode.align='right';_options.style.width='17%';_options.style.height=_height?_height-2+'px':'auto';_options.style.display='block';_options._panel_open=1;var _main_div=document.createElement('div');_main_div.className='rte-option-emo-box';_main_div.style.width='90%';_main_div.innerHTML+='<div class="rte-menu-emo-header"><a href="#" style="text-decoration:none" onclick="return show_all_emoticons(\''+editor_id+'\')">'+ips_language_array['emos_show_all']+'</a></div>';var _div=document.createElement('div');_div.style.width='100%';_div.style.height='120px';_div.style.overflowY='auto';_div.style.overflowX='auto';var table=document.createElement('table');table.cellPadding=0;table.cellSpacing=0;table.border=0;table.width='99%';table.nowrap='nowrap';if(is_ie){table.style.paddingRight='15px';}var i=0;var perrow=3;var show_emos=12;var show_rows=show_emos/perrow;var max_emos=0;var _previous=0;var _next=0;for(var emo in ips_smilie_items){max_emos++;}for(var emo in ips_smilie_items){var _tmp=ips_smilie_items[emo].split(",");var _id=_tmp[0]-1;if(_id<start_emo||_id>=(show_emos+start_emo)){continue;}if(i%perrow==0){var tr=table.insertRow(-1);}i++;var div=document.createElement('div');var img='<img src="'+global_rte_emoticons_url+'/'+_tmp[1]+'" style="vertical-align:middle" border="0" id="smid_'+_tmp[0]+'" /> ';div.innerHTML=img;var td=tr.insertCell(-1);td.width='33%';td.align='center';td.className='rte-menu-emo-box';td.appendChild(div);td.cmd='emoticons';td.editor_id=editor_id;td.id=editor_id+'_emoticon_'+_tmp[0];td.emo_id=_tmp[0];td.emo_image=_tmp[1];td.emo_code=emo;td.onclick=ips_editor_events.prototype.emoticon_onclick;}_div.appendChild(table);_main_div.appendChild(_div);if(start_emo>0){if(start_emo+i<max_emos){_previous=start_emo-show_emos;}else{_previous=start_emo-show_emos;}_more_less='<div style="float:left"><a href="#" style="text-decoration:none" onclick="return show_options_panel(\''+editor_id+'\', '+'1'+','+_previous+')">'+ips_language_array['emos_show_prev']+'</a></div>';}if(show_emos+start_emo<max_emos){if(start_emo<1){_next=start_emo+show_emos;}else{_next=start_emo+show_emos;}_more_less+='<div style="float:right"><a href="#" style="text-decoration:none" onclick="return show_options_panel(\''+editor_id+'\', '+'1'+','+_next+');">'+ips_language_array['emos_show_next']+'</a></div>';}if(_more_less){var _div=document.createElement('div');_div.className="rte-menu-emo-header";_div.style.height='17px';_div.innerHTML=_more_less;_main_div.appendChild(_div);}_options.appendChild(_main_div);var table=document.createElement('table');table.cellPadding=0;table.cellSpacing=0;table.border=0;table.width='90%';table.className='rte-option-emo-box';var i=0;var perrow=3;var tr=table.insertRow(-1);var td=tr.insertCell(-1);td.colSpan=perrow;td.align='center';td.cellPadding=0;td.innerHTML='<div class="rte-menu-emo-header">Quick Access</div>';for(var i in IPS_editor[editor_id].ips_special_items){var tr=table.insertRow(-1);var option=tr.insertCell(-1);var img=(typeof IPS_editor[editor_id].ips_special_items[i][1]!='undefined')?'<img src="'+global_rte_images_url+IPS_editor[editor_id].ips_special_items[i][1]+'" style="vertical-align:middle" border="" /> ':'';option.innerHTML=img+IPS_editor[editor_id].ips_special_items[i][0];option.className='rte-menu-face';option.style.textAlign='left';option.style.paddingLeft='2px';option.cmd='module_load',option.loader_key=i.replace('cmd_loader_','');option.editor_id=editor_id;option.onmouseover=option.onclick=option.onmouseout=option.onmouseup=option.onmousedown=ips_editor_events.prototype.special_onmouse_event;}_options.appendChild(table);ipsclass.set_unselectable(_options);}else{_editor.style.width='100%';_editor.parentNode.align='center';_options.style.width='0%';_options.style.height=_height?_height-2+'px':'150px';_options.style.display='none';_options._panel_open=0;_options.innerHTML='';}return false;}function switch_editor_mode(editor_id){var url=ipb_var_base_url+'act=xmlout&do=post-editorswitLine truncated
|
||||
var _options_done=0;function check_side_panel(editor_id){if(global_rte_remove_side_panel){document.getElementById('rte-toggle-side-panel-button').style.display='none';return true;}var _open=global_rte_side_panel_open;var _cookie=ipsclass.my_getcookie('rte-sidepanel');if(_cookie=='open'||_cookie=='close'){_open=(_cookie=='open')?1:0;}if(_open){show_options_panel(editor_id,_open);}};function show_options_panel(editor_id,force,start_emo){if(global_rte_remove_side_panel){document.getElementById('rte-toggle-side-panel-button').style.display='none';return true;}if(typeof(start_emo)=='undefined'){start_emo=0;}var _editor=document.getElementById(editor_id+'_main-bar');var _options=document.getElementById(editor_id+'_options-bar');var _height=parseInt(_editor.offsetHeight);var _mode='open';var _more_less='';_options.innerHTML='';if(typeof(force)!='undefined'){_mode=(force==1)?'open':'close';}else{if(_options._panel_open){_mode='close';}}ipsclass.my_setcookie('rte-sidepanel',_mode,1);if(_mode=='open'&&_options_done==1){_editor.style.width='80%';_options.style.width='auto';_options.style.height='auto';_options.style.display='block';_options._panel_open=1;document.getElementById(editor_id+'_spacer-bar').style.width='4px';}if(_mode=='open'){_editor.style.width='80%';if(is_opera){_editor.style.width='100%';_editor.style.display='block';}_options.style.width='auto';_options.style.height='auto';_options.style.display='block';_options._panel_open=1;document.getElementById(editor_id+'_spacer-bar').style.width='4px';var _main_div=document.createElement('div');_main_div.className='rte-option-emo-box';_main_div.style.width='90%';_main_div.innerHTML+='<div class="rte-menu-emo-header"><a href="#" style="text-decoration:none" onclick="return show_all_emoticons(\''+editor_id+'\')">'+ips_language_array['emos_show_all']+'</a></div>';var _div=document.createElement('div');_div.style.width='100%';_div.style.height='120px';_div.style.overflow='auto';_div.style.overflowY='auto';_div.style.overflowX='auto';var table=document.createElement('table');table.cellPadding=0;table.cellSpacing=0;table.border=0;table.width='99%';var i=0;var perrow=3;var show_emos=12;var show_rows=show_emos/perrow;var max_emos=0;var _previous=0;var _next=0;for(var emo in ips_smilie_items){max_emos++;}for(var emo in ips_smilie_items){var _tmp=ips_smilie_items[emo].split(",");var _id=_tmp[0]-1;if(_id<start_emo||_id>=(show_emos+start_emo)){continue;}if(i%perrow==0){var tr=table.insertRow(-1);}i++;var div=document.createElement('div');var img='<img src="'+global_rte_emoticons_url+'/'+_tmp[1]+'" style="vertical-align:middle" border="0" id="smid_'+_tmp[0]+'" /> ';div.innerHTML=img;var td=tr.insertCell(-1);td.width='33%';td.align='center';td.className='rte-menu-emo-box';td.appendChild(div);td.cmd='emoticons';td.editor_id=editor_id;td.id=editor_id+'_emoticon_'+_tmp[0];td.emo_id=_tmp[0];td.emo_image=_tmp[1];td.emo_code=emo;td.onclick=ips_editor_events.prototype.emoticon_onclick;}_div.appendChild(table);_main_div.appendChild(_div);if(start_emo>0){if(start_emo+i<max_emos){_previous=start_emo-show_emos;}else{_previous=start_emo-show_emos;}_more_less='<div style="float:left"><a href="#" style="text-decoration:none" onclick="return show_options_panel(\''+editor_id+'\', '+'1'+','+_previous+')">'+ips_language_array['emos_show_prev']+'</a></div>';}if(show_emos+start_emo<max_emos){if(start_emo<1){_next=start_emo+show_emos;}else{_next=start_emo+show_emos;}_more_less+='<div style="float:right"><a href="#" style="text-decoration:none" onclick="return show_options_panel(\''+editor_id+'\', '+'1'+','+_next+');">'+ips_language_array['emos_show_next']+'</a></div>';}if(_more_less){var _div=document.createElement('div');_div.className="rte-menu-emo-header";_div.style.height='17px';_div.innerHTML=_more_less;_main_div.appendChild(_div);}_options.appendChild(_main_div);var table=document.createElement('table');table.cellPadding=0;table.cellSpacing=0;table.border=0;table.width='90%';table.className='rte-option-emo-box';var i=0;var perrow=3;var tr=table.insertRow(-1);var td=tr.insertCell(-1);td.colSpan=perrow;td.align='center';td.cellPadding=0;td.innerHTML='<div class="rte-menu-emo-header">'+ips_language_array['ed_quick_access']+'</div>';for(var i in IPS_editor[editor_id].ips_special_items){var tr=table.insertRow(-1);var option=tr.insertCell(-1);var img=(typeof IPS_editor[editor_id].ips_special_items[i][1]!='undefined')?'<img src="'+global_rte_images_url+IPS_editor[editor_id].ips_special_items[i][1]+'" style="vertical-align:middle" border="" /> ':'';option.innerHTML=img+IPS_editor[editor_id].ips_special_items[i][0];option.className='rte-menu-face';option.style.textAlign='left';option.style.paddingLeft='2px';option.cmd='module_load',option.loader_key=i.replace('cmd_loader_','');option.editor_id=editor_id;option.onmouseover=option.onclick=option.onmouseout=option.onmouseup=option.onmousedown=ips_editor_events.prototype.special_onmouse_event;}_options.appendChild(table);_options_done=1;ipsclass.set_uLine truncated
|
||||
@@ -1,102 +1,105 @@
|
||||
var IPS_Lite_Editor=new Array();function ips_text_editor_lite(editor_id){this.editor_id=editor_id;this.control_obj=document.getElementById(editor_id+'-controls');this.initialized=false;this.buttons=new Array();this.fonts=new Array();this.state=new Array();this.text_obj=document.getElementById(this.editor_id+'_textarea');this.open_brace='[';this.close_brace=']';this.editor_document=this.text_obj;this.editor_window=this.editor_document;this._ie_cache=null;this.is_ie=is_ie;this.is_moz=is_moz;this.is_opera=is_opera;this.has_focus=false;this.emoticon_window_id=null;this.init=function(){var controls=new Array();if(!this.control_obj){return;}var items=this.control_obj.getElementsByTagName("DIV");for(var i=0;i<items.length;i++){if((items[i].className=='rte-normal'||items[i].className=='rte-menu-button'||items[i].className=='rte-normal-menubutton')&&items[i].id){controls[controls.length]=items[i].id;}}for(var i=0;i<controls.length;i++){var control=document.getElementById(controls[i]);if(control.className=='rte-normal'){this.init_editor_button(control);}else if(control.className=='rte-menu-button'||control.className=='rte-normal-menubutton'){this.init_editor_popup_button(control);}}this.text_obj.onfocus=ips_editor_events.prototype.editor_window_onfocus;this.text_obj.onblur=ips_editor_events.prototype.editor_window_onblur;if(this.editor_document.addEventListener){this.editor_document.addEventListener('keypress',ips_editor_events.prototype.editor_document_onkeypress,false);}};this.editor_check_focus=function(){if(!this.text_obj.has_focus){if(this.is_opera){this.text_obj.focus();}try{this.text_obj.focus();}catch(err){}}};this.init_editor_button=function(obj){obj.cmd=obj.id.replace(new RegExp('^'+this.editor_id+'_cmd_(.+?)$'),'$1');obj.editor_id=this.editor_id;this.buttons[obj.cmd]=obj;obj.state=false;obj.mode='normal';obj.real_type='button';obj.onclick=ips_editor_events.prototype.button_onmouse_event;obj.onmousedown=ips_editor_events.prototype.button_onmouse_event;obj.onmouseover=ips_editor_events.prototype.button_onmouse_event;obj.onmouseout=ips_editor_events.prototype.button_onmouse_event;};this.set_button_context=function(obj,state,type){if(typeof type=='undefined'){type='button';}switch(obj.state){case true:{switch(state){case 'mouseout':{this.editor_set_ctl_style(obj,'button','selected');break;}case 'mouseover':case 'mousedown':case 'mouseup':{this.editor_set_ctl_style(obj,type,'down');break;}}break;}default:{switch(state){case 'mouseout':{this.editor_set_ctl_style(obj,type,'normal');break;}case 'mousedown':{this.editor_set_ctl_style(obj,type,'down');break;}case 'mouseover':case 'mouseup':{this.editor_set_ctl_style(obj,type,'hover');break;}}break;}}};this.editor_set_ctl_style=function(obj,type,mode){if(obj.mode!=mode){var extra='';if(type=='menu'){extra='-menu';}else if(type=='menubutton'){extra='-menubutton';}extra+=obj.colorname?'-color':'';extra+=obj.emo_id?'-emo':'';obj.mode=mode;try{switch(mode){case "normal":{obj.className='rte-normal'+extra;}break;case "hover":{obj.className='rte-hover'+extra;}break;case "selected":case "down":{obj.className='rte-selected'+extra;}break;}}catch(e){}}};this.format_text=function(e,command,arg){e=ipsclass.cancel_bubble(e,true);if(command.match( /resize_/)){this.resize_editorbox(command.replace( /.+?resize_(up|down)/,"$1"));}if(command.match( /emoticon/)){this.show_all_emoticons();}this.editor_check_focus();if(this[command]){var return_val=this[command](e);}else{try{var return_val=this.apply_formatting(command,false,(typeof arg=='undefined'?true:arg));}catch(e){var return_val=false;}}this.editor_check_focus();return return_val;};this.createlink=function(){var _url=prompt(ipb_global_lang['editor_enter_url'],'http://');if(!_url||_url==null||_url=='http://'){return false;}var _text=this.get_selection();_text=_text?_text:prompt(ipb_global_lang['editor_enter_title']);if(!_text||_text==null){return false;}this.wrap_tags('url',_url,_text);};this.insertimage=function(){var _text=this.get_selection();var _url=prompt(ipb_global_lang['editor_enter_image'],_text?_text:"http://");if(!_url||_url==null||_url=='http://'){return false;}this.wrap_tags('img',false,_url);};this.ipb_quote=function(){var _text=this.get_selection();this.wrap_tags('quote',false,_text);};this.ipb_code=function(){var _text=this.get_selection();this.wrap_tags('code',false,_text);};this.apply_formatting=function(cmd,dialog,argument){switch(cmd){case 'bold':case 'italic':case 'underline':{this.wrap_tags(cmd.substr(0,1),false);return;}case 'justifyleft':case 'justifycenter':case 'justifyright':{this.wrap_tags(cmd.substr(7),false);return;}case 'indent':{this.wrap_tags(cmd,false);return;}case 'createlink':{var sel=this.get_selection();if(sel){this.wrap_tags('url',argument);}else{this.wrap_tags('url',argument,argument);}return;}case 'fontname':{this.wrap_tags('font',argument);return;}case 'fontsize':{this.wrap_tags('size',argument);return;}case 'forecolor':{this.wrap_tags('color',argument);return;}case 'backcolor':{this.wrap_taLine truncated
|
||||
{
|
||||
this.editor_document.selectionStart = open;
|
||||
this.editor_document.selectionEnd = open + text.length;
|
||||
this.editor_document.scrollTop = st;
|
||||
}
|
||||
}
|
||||
else if ( ( document.selection && document.selection.createRange ) || this._ie_cache )
|
||||
{
|
||||
var sel = this._ie_cache ? this._ie_cache : document.selection.createRange();
|
||||
sel.text = text.replace(/\r?\n/g, '\r\n');
|
||||
sel.select();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.editor_document.value += text;
|
||||
}
|
||||
this._ie_cache = null;
|
||||
};
|
||||
this.show_all_emoticons = function()
|
||||
{
|
||||
if ( typeof( this.emoticon_window_id ) != null )
|
||||
{
|
||||
this.emoticon_window_id = window.open( ipb_var_base_url + "act=legends&CODE=emoticons&_lite=1&editor_id=" + editor_id,"Legends","width=250,height=500,resizable=yes,scrollbars=yes");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.emoticon_window_id.focus();
|
||||
}
|
||||
return false;
|
||||
};
|
||||
this.insert_emoticon = function( emo_id, emo_image, emo_code, event )
|
||||
{
|
||||
emo_code = ipsclass.un_htmlspecialchars( emo_code );
|
||||
this.wrap_tags_lite( " " + emo_code, " ");
|
||||
if ( this.is_ie )
|
||||
{
|
||||
if ( IPS_Lite_Editor[ this.editor_id ].emoticon_window_id != '' && typeof( IPS_Lite_Editor[ this.editor_id ].emoticon_window_id ) != 'undefined' )
|
||||
{
|
||||
IPS_Lite_Editor[ this.editor_id ].emoticon_window_id.focus();
|
||||
}
|
||||
}
|
||||
};
|
||||
this.resize_editorbox = function( direction )
|
||||
{
|
||||
var inc_value = 100;
|
||||
var current_height = parseInt( this.text_obj.style.height );
|
||||
var new_height = 0;
|
||||
current_height = current_height ? current_height : 200;
|
||||
if ( current_height >= 50 )
|
||||
{
|
||||
if ( direction == 'up' )
|
||||
{
|
||||
new_height = current_height - inc_value;
|
||||
}
|
||||
else
|
||||
{
|
||||
new_height = current_height + inc_value;
|
||||
}
|
||||
if ( new_height > 149 )
|
||||
{
|
||||
this.text_obj.style.height = new_height + 'px';
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
function ips_editor_events()
|
||||
{
|
||||
}
|
||||
ips_editor_events.prototype.button_onmouse_event = function(e)
|
||||
{
|
||||
e = ipsclass.cancel_bubble(e, true);
|
||||
if ( e.type == 'click' )
|
||||
{
|
||||
IPS_Lite_Editor[this.editor_id].format_text(e, this.cmd, false, true);
|
||||
}
|
||||
IPS_Lite_Editor[this.editor_id].set_button_context(this, e.type);
|
||||
};
|
||||
ips_editor_events.prototype.editor_window_onfocus = function(e)
|
||||
{
|
||||
this.has_focus = true;
|
||||
};
|
||||
ips_editor_events.prototype.editor_window_onblur = function(e)
|
||||
{
|
||||
this.has_focus = false;
|
||||
};
|
||||
ips_editor_events.prototype.editor_document_onkeypress = function(e)
|
||||
{
|
||||
if ( e.ctrlKey )
|
||||
{
|
||||
switch (String.fromCharCode(e.charCode).toLowerCase())
|
||||
{
|
||||
case 'b': cmd = 'bold'; break;
|
||||
case 'i': cmd = 'italic'; break;
|
||||
case 'u': cmd = 'underline'; break;
|
||||
default: return;
|
||||
}
|
||||
e.preventDefault();
|
||||
IPS_Lite_Editor[this.editor_id].apply_formatting(cmd, false, null);
|
||||
return false;
|
||||
}
|
||||
var IPS_Lite_Editor=new Array();function ips_text_editor_lite(editor_id){this.editor_id=editor_id;this.control_obj=document.getElementById(editor_id+'-controls');this.initialized=false;this.buttons=new Array();this.fonts=new Array();this.state=new Array();this.text_obj=document.getElementById(this.editor_id+'_textarea');this.open_brace='[';this.close_brace=']';this.editor_document=this.text_obj;this.editor_window=this.editor_document;this._ie_cache=null;this.is_ie=is_ie;this.is_moz=is_moz;this.is_opera=is_opera;this.has_focus=false;this.emoticon_window_id=null;this.init=function(){var controls=new Array();if(!this.control_obj){return;}var items=this.control_obj.getElementsByTagName("DIV");for(var i=0;i<items.length;i++){if((items[i].className=='rte-normal'||items[i].className=='rte-menu-button'||items[i].className=='rte-normal-menubutton')&&items[i].id){controls[controls.length]=items[i].id;}}for(var i=0;i<controls.length;i++){var control=document.getElementById(controls[i]);if(control.className=='rte-normal'){this.init_editor_button(control);}else if(control.className=='rte-menu-button'||control.className=='rte-normal-menubutton'){this.init_editor_popup_button(control);}}this.text_obj.onfocus=ips_editor_events.prototype.editor_window_onfocus;this.text_obj.onblur=ips_editor_events.prototype.editor_window_onblur;if(this.editor_document.addEventListener){this.editor_document.addEventListener('keypress',ips_editor_events.prototype.editor_document_onkeypress,false);}};this.editor_check_focus=function(){if(!this.text_obj.has_focus){if(this.is_opera){this.text_obj.focus();}try{this.text_obj.focus();}catch(err){}}};this.init_editor_button=function(obj){obj.cmd=obj.id.replace(new RegExp('^'+this.editor_id+'_cmd_(.+?)$'),'$1');obj.editor_id=this.editor_id;this.buttons[obj.cmd]=obj;obj.state=false;obj.mode='normal';obj.real_type='button';obj.onclick=ips_editor_events.prototype.button_onmouse_event;obj.onmousedown=ips_editor_events.prototype.button_onmouse_event;obj.onmouseover=ips_editor_events.prototype.button_onmouse_event;obj.onmouseout=ips_editor_events.prototype.button_onmouse_event;};this.set_button_context=function(obj,state,type){if(typeof type=='undefined'){type='button';}switch(obj.state){case true:{switch(state){case 'mouseout':{this.editor_set_ctl_style(obj,'button','selected');break;}case 'mouseover':case 'mousedown':case 'mouseup':{this.editor_set_ctl_style(obj,type,'down');break;}}break;}default:{switch(state){case 'mouseout':{this.editor_set_ctl_style(obj,type,'normal');break;}case 'mousedown':{this.editor_set_ctl_style(obj,type,'down');break;}case 'mouseover':case 'mouseup':{this.editor_set_ctl_style(obj,type,'hover');break;}}break;}}};this.editor_set_ctl_style=function(obj,type,mode){if(obj.mode!=mode){var extra='';if(type=='menu'){extra='-menu';}else if(type=='menubutton'){extra='-menubutton';}extra+=obj.colorname?'-color':'';extra+=obj.emo_id?'-emo':'';obj.mode=mode;try{switch(mode){case "normal":{obj.className='rte-normal'+extra;}break;case "hover":{obj.className='rte-hover'+extra;}break;case "selected":case "down":{obj.className='rte-selected'+extra;}break;}}catch(e){}}};this.format_text=function(e,command,arg){e=ipsclass.cancel_bubble(e,true);if(command.match( /resize_/)){this.resize_editorbox(command.replace( /.+?resize_(up|down)/,"$1"));}if(command.match( /emoticon/)){this.show_all_emoticons();}this.editor_check_focus();if(this[command]){var return_val=this[command](e);}else{try{var return_val=this.apply_formatting(command,false,(typeof arg=='undefined'?true:arg));}catch(e){var return_val=false;}}this.editor_check_focus();return return_val;};this.createlink=function(){var _url=prompt(ipb_global_lang['editor_enter_url'],'http://');if(!_url||_url==null||_url=='http://'){return false;}var _text=this.get_selection();_text=_text?_text:prompt(ipb_global_lang['editor_enter_title']);if(!_text||_text==null){return false;}this.wrap_tags('url',_url,_text);};this.insertimage=function(){var _text=this.get_selection();var _url=prompt(ipb_global_lang['editor_enter_image'],_text?_text:"http://");if(!_url||_url==null||_url=='http://'){return false;}this.wrap_tags('img',false,_url);};this.ipb_quote=function(){var _text=this.get_selection();this.wrap_tags('quote',false,_text);};this.ipb_code=function(){var _text=this.get_selection();this.wrap_tags('code',false,_text);};this.apply_formatting=function(cmd,dialog,argument){switch(cmd){case 'bold':case 'italic':case 'underline':{this.wrap_tags(cmd.substr(0,1),false);return;}case 'justifyleft':case 'justifycenter':case 'justifyright':{this.wrap_tags(cmd.substr(7),false);return;}case 'indent':{this.wrap_tags(cmd,false);return;}case 'createlink':{var sel=this.get_selection();if(sel){this.wrap_tags('url',argument);}else{this.wrap_tags('url',argument,argument);}return;}case 'fontname':{this.wrap_tags('font',argument);return;}case 'fontsize':{this.wrap_tags('size',argument);return;}case 'forecolor':{this.wrap_tags('color',argument);return;}case 'backcolor':{this.wrap_taLine truncated
|
||||
{
|
||||
this.editor_document.selectionStart = open;
|
||||
this.editor_document.selectionEnd = open + text.length;
|
||||
this.editor_document.scrollTop = st;
|
||||
}
|
||||
}
|
||||
else if ( ( document.selection && document.selection.createRange ) || this._ie_cache )
|
||||
{
|
||||
var sel = this._ie_cache ? this._ie_cache : document.selection.createRange();
|
||||
sel.text = text.replace(/\r?\n/g, '\r\n');
|
||||
sel.select();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.editor_document.value += text;
|
||||
}
|
||||
this._ie_cache = null;
|
||||
};
|
||||
this.show_all_emoticons = function()
|
||||
{
|
||||
if ( typeof( this.emoticon_window_id ) != null )
|
||||
{
|
||||
this.emoticon_window_id = window.open( ipb_var_base_url + "act=legends&CODE=emoticons&_lite=1&editor_id=" + editor_id,"Legends","width=250,height=500,resizable=yes,scrollbars=yes");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.emoticon_window_id.focus();
|
||||
}
|
||||
return false;
|
||||
};
|
||||
this.insert_emoticon = function( emo_id, emo_image, emo_code, event )
|
||||
{
|
||||
emo_code = ipsclass.un_htmlspecialchars( emo_code );
|
||||
this.wrap_tags_lite( " " + emo_code, " ");
|
||||
if ( this.is_ie )
|
||||
{
|
||||
if ( IPS_Lite_Editor[ this.editor_id ].emoticon_window_id != '' && typeof( IPS_Lite_Editor[ this.editor_id ].emoticon_window_id ) != 'undefined' )
|
||||
{
|
||||
IPS_Lite_Editor[ this.editor_id ].emoticon_window_id.focus();
|
||||
}
|
||||
}
|
||||
};
|
||||
this.resize_editorbox = function( direction )
|
||||
{
|
||||
var inc_value = 100;
|
||||
var current_height = parseInt( this.text_obj.style.height );
|
||||
var new_height = 0;
|
||||
current_height = current_height ? current_height : 200;
|
||||
if ( current_height >= 50 )
|
||||
{
|
||||
if ( direction == 'up' )
|
||||
{
|
||||
new_height = current_height - inc_value;
|
||||
}
|
||||
else
|
||||
{
|
||||
new_height = current_height + inc_value;
|
||||
}
|
||||
if ( new_height > 149 )
|
||||
{
|
||||
this.text_obj.style.height = new_height + 'px';
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
function ips_editor_events()
|
||||
{
|
||||
}
|
||||
ips_editor_events.prototype.button_onmouse_event = function(e)
|
||||
{
|
||||
if ( is_ie )
|
||||
{
|
||||
e = ipsclass.cancel_bubble(e, true);
|
||||
}
|
||||
if ( e.type == 'click' )
|
||||
{
|
||||
IPS_Lite_Editor[this.editor_id].format_text(e, this.cmd, false, true);
|
||||
}
|
||||
IPS_Lite_Editor[this.editor_id].set_button_context(this, e.type);
|
||||
};
|
||||
ips_editor_events.prototype.editor_window_onfocus = function(e)
|
||||
{
|
||||
this.has_focus = true;
|
||||
};
|
||||
ips_editor_events.prototype.editor_window_onblur = function(e)
|
||||
{
|
||||
this.has_focus = false;
|
||||
};
|
||||
ips_editor_events.prototype.editor_document_onkeypress = function(e)
|
||||
{
|
||||
if ( e.ctrlKey )
|
||||
{
|
||||
switch (String.fromCharCode(e.charCode).toLowerCase())
|
||||
{
|
||||
case 'b': cmd = 'bold'; break;
|
||||
case 'i': cmd = 'italic'; break;
|
||||
case 'u': cmd = 'underline'; break;
|
||||
default: return;
|
||||
}
|
||||
e.preventDefault();
|
||||
IPS_Lite_Editor[this.editor_id].apply_formatting(cmd, false, null);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user