Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19b38c7c74 | ||
|
|
a3bb603c96 | ||
|
|
22f1b963ee | ||
|
|
f73f8bff6d | ||
|
|
0eecc172d9 |
No files matched your search
@@ -0,0 +1,240 @@
|
||||
/**************************************************
|
||||
* dom-drag.js
|
||||
* 09.25.2001
|
||||
* www.youngpup.net
|
||||
**************************************************
|
||||
* 10.28.2001 - fixed minor bug where events
|
||||
* sometimes fired off the handle, not the root.
|
||||
**************************************************
|
||||
* IPS CHANGES
|
||||
* 06.01.2005 - Added "cursorchange" to change
|
||||
* 07.18.2005 - Added cookie to store values
|
||||
* 07.18.2005 - Made it impossible to drag < 0 height (keeponscreen)
|
||||
* mouse cursor when over drag handle
|
||||
* 07.29.2005 - Added "AddEvent" handler to prevent
|
||||
* event clashes / overwrites
|
||||
**************************************************/
|
||||
|
||||
|
||||
var Drag = {
|
||||
|
||||
obj : null,
|
||||
fx : null,
|
||||
fy : null,
|
||||
cookiename : null,
|
||||
keeponscreen: true,
|
||||
|
||||
init : function(o, oRoot, minX, maxX, minY, maxY, bSwapHorzRef, bSwapVertRef, fXMapper, fYMapper)
|
||||
{
|
||||
o.onmousedown = Drag.start;
|
||||
o.onmouseover = Drag.cursorchange;
|
||||
|
||||
o.hmode = bSwapHorzRef ? false : true ;
|
||||
o.vmode = bSwapVertRef ? false : true ;
|
||||
|
||||
o.root = oRoot && oRoot != null ? oRoot : o ;
|
||||
|
||||
if (o.hmode && isNaN(parseInt(o.root.style.left ))) o.root.style.left = "0px";
|
||||
if (o.vmode && isNaN(parseInt(o.root.style.top ))) o.root.style.top = "0px";
|
||||
if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right = "0px";
|
||||
if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px";
|
||||
|
||||
o.minX = typeof minX != 'undefined' ? minX : null;
|
||||
o.minY = typeof minY != 'undefined' ? minY : null;
|
||||
o.maxX = typeof maxX != 'undefined' ? maxX : null;
|
||||
o.maxY = typeof maxY != 'undefined' ? maxY : null;
|
||||
|
||||
o.xMapper = fXMapper ? fXMapper : null;
|
||||
o.yMapper = fYMapper ? fYMapper : null;
|
||||
|
||||
//----------------------------------
|
||||
// Figure width and height
|
||||
//----------------------------------
|
||||
|
||||
if ( Drag.keeponscreen )
|
||||
{
|
||||
Drag.my_width = 0;
|
||||
Drag.my_height = 0;
|
||||
|
||||
if ( typeof( window.innerWidth ) == 'number' )
|
||||
{
|
||||
//----------------------------------
|
||||
// Non IE
|
||||
//----------------------------------
|
||||
|
||||
Drag.my_width = window.innerWidth;
|
||||
Drag.my_height = window.innerHeight;
|
||||
}
|
||||
else if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
|
||||
{
|
||||
//----------------------------------
|
||||
// IE 6+
|
||||
//----------------------------------
|
||||
|
||||
Drag.my_width = document.documentElement.clientWidth;
|
||||
Drag.my_height = document.documentElement.clientHeight;
|
||||
}
|
||||
else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
|
||||
{
|
||||
//----------------------------------
|
||||
// Old IE
|
||||
//----------------------------------
|
||||
|
||||
Drag.my_width = document.body.clientWidth;
|
||||
Drag.my_height = document.body.clientHeight;
|
||||
}
|
||||
}
|
||||
|
||||
o.root.onDragStart = new Function();
|
||||
o.root.onDragEnd = new Function();
|
||||
o.root.onDrag = new Function();
|
||||
},
|
||||
|
||||
cursorchange : function(e)
|
||||
{
|
||||
var o = Drag.obj = this;
|
||||
o.style.cursor = 'move';
|
||||
},
|
||||
|
||||
start : function(e)
|
||||
{
|
||||
var o = Drag.obj = this;
|
||||
e = Drag.fixE(e);
|
||||
var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom);
|
||||
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
|
||||
o.root.onDragStart(x, y);
|
||||
|
||||
o.lastMouseX = e.clientX;
|
||||
o.lastMouseY = e.clientY;
|
||||
|
||||
if (o.hmode) {
|
||||
if (o.minX != null) o.minMouseX = e.clientX - x + o.minX;
|
||||
if (o.maxX != null) o.maxMouseX = o.minMouseX + o.maxX - o.minX;
|
||||
} else {
|
||||
if (o.minX != null) o.maxMouseX = -o.minX + e.clientX + x;
|
||||
if (o.maxX != null) o.minMouseX = -o.maxX + e.clientX + x;
|
||||
}
|
||||
|
||||
if (o.vmode) {
|
||||
if (o.minY != null) o.minMouseY = e.clientY - y + o.minY;
|
||||
if (o.maxY != null) o.maxMouseY = o.minMouseY + o.maxY - o.minY;
|
||||
} else {
|
||||
if (o.minY != null) o.maxMouseY = -o.minY + e.clientY + y;
|
||||
if (o.maxY != null) o.minMouseY = -o.maxY + e.clientY + y;
|
||||
}
|
||||
|
||||
//Drag.addEvent( document, 'mousemove', Drag.drag , false );
|
||||
//Drag.addEvent( document, 'mouseup' , Drag.end , false );
|
||||
|
||||
document.onmousemove = Drag.drag;
|
||||
document.onmouseup = Drag.end;
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
drag : function(e)
|
||||
{
|
||||
e = Drag.fixE(e);
|
||||
var o = Drag.obj;
|
||||
|
||||
var ey = e.clientY;
|
||||
var ex = e.clientX;
|
||||
var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom);
|
||||
var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right );
|
||||
var nx, ny;
|
||||
|
||||
if (o.minX != null) ex = o.hmode ? Math.max(ex, o.minMouseX) : Math.min(ex, o.maxMouseX);
|
||||
if (o.maxX != null) ex = o.hmode ? Math.min(ex, o.maxMouseX) : Math.max(ex, o.minMouseX);
|
||||
if (o.minY != null) ey = o.vmode ? Math.max(ey, o.minMouseY) : Math.min(ey, o.maxMouseY);
|
||||
if (o.maxY != null) ey = o.vmode ? Math.min(ey, o.maxMouseY) : Math.max(ey, o.minMouseY);
|
||||
|
||||
nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1));
|
||||
ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1));
|
||||
|
||||
if (o.xMapper) nx = o.xMapper(y);
|
||||
else if (o.yMapper) ny = o.yMapper(x);
|
||||
|
||||
//----------------------------------
|
||||
// Keep on screen?
|
||||
//----------------------------------
|
||||
|
||||
if ( Drag.keeponscreen )
|
||||
{
|
||||
ny = ny < 0 ? 0 : ny;
|
||||
nx = nx < 0 ? 0 : nx;
|
||||
|
||||
if ( Drag.my_width )
|
||||
{
|
||||
nx = nx > Drag.my_width - parseInt(o.root.style.width) ? Drag.my_width - parseInt(o.root.style.width) : nx;
|
||||
}
|
||||
}
|
||||
|
||||
Drag.obj.root.style[o.hmode ? "left" : "right"] = nx + "px";
|
||||
Drag.obj.root.style[o.vmode ? "top" : "bottom"] = ny + "px";
|
||||
Drag.obj.lastMouseX = ex;
|
||||
Drag.obj.lastMouseY = ey;
|
||||
|
||||
Drag.obj.root.onDrag(nx, ny);
|
||||
return false;
|
||||
},
|
||||
|
||||
end : function()
|
||||
{
|
||||
document.onmousemove = null;
|
||||
document.onmouseup = null;
|
||||
Drag.obj.root.onDragEnd( parseInt(Drag.obj.root.style[Drag.obj.hmode ? "left" : "right"]),
|
||||
parseInt(Drag.obj.root.style[Drag.obj.vmode ? "top" : "bottom"]));
|
||||
|
||||
var o = Drag.obj;
|
||||
|
||||
fy = parseInt( o.root.style.top );
|
||||
fx = parseInt( o.root.style.left );
|
||||
|
||||
//----------------------------------
|
||||
// Store in a cookie?
|
||||
//----------------------------------
|
||||
|
||||
if ( Drag.cookiename )
|
||||
{
|
||||
try
|
||||
{
|
||||
ipsclass.my_setcookie( Drag.cookiename, fx+','+fy, 1 );
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
Drag.obj = null;
|
||||
|
||||
},
|
||||
|
||||
addEvent: function(elm, evType, fn, useCapture)
|
||||
{
|
||||
// Cross-browser event handling for IE5+, NS6 and Mozilla
|
||||
// By Scott Andrew
|
||||
|
||||
if ( elm.addEventListener )
|
||||
{
|
||||
elm.addEventListener(evType, fn, useCapture);
|
||||
return true;
|
||||
}
|
||||
else if ( elm.attachEvent )
|
||||
{
|
||||
var r = elm.attachEvent('on' + evType, fn);
|
||||
return r;
|
||||
}
|
||||
else
|
||||
{
|
||||
elm['on' + evType] = fn;
|
||||
}
|
||||
},
|
||||
|
||||
fixE : function(e)
|
||||
{
|
||||
if (typeof e == 'undefined') e = window.event;
|
||||
if (typeof e.layerX == 'undefined') e.layerX = e.offsetX;
|
||||
if (typeof e.layerY == 'undefined') e.layerY = e.offsetY;
|
||||
return e;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +1 @@
|
||||
<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><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://anonym.to/http://www.invisionboard.com/">Invision Power Board</a>
</body>
</html>
|
||||
@@ -0,0 +1,246 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Insert Custom BBCode</title>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
//-----------------------------------------
|
||||
// Attempt to get editor ID
|
||||
//-----------------------------------------
|
||||
|
||||
var editor_id = <?php print '"'.trim( htmlspecialchars( substr( $_REQUEST['editorid'], 0, 30 ) ) ).'";'; ?>
|
||||
var bbcode_id = <?php print '"'.trim( htmlspecialchars( substr( $_REQUEST['id'], 0, 30 ) ) ).'";'; ?>
|
||||
var this_module = 'bbcodeloader';
|
||||
var this_height = 400;
|
||||
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;
|
||||
var current_selection = parent.ipsclass.un_htmlspecialchars( parent.IPS_editor[ editor_id ].get_selection() );
|
||||
|
||||
//-----------------------------------------
|
||||
// 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("_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"
|
||||
};
|
||||
|
||||
for (var i in required)
|
||||
{
|
||||
var el = document.getElementById(i);
|
||||
|
||||
if ( i == 'f_option_text' )
|
||||
{
|
||||
if ( parseInt( bbcode['use_option'] ) != 1 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! el.value )
|
||||
{
|
||||
alert( required[i] );
|
||||
el.focus();
|
||||
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 )
|
||||
{
|
||||
_html = '[' + bbcode['tag'] + '="' + _content + '"]' + _option + '[/' + bbcode['tag'] + ']';
|
||||
}
|
||||
else
|
||||
{
|
||||
_html = '[' + bbcode['tag'] + '="' + _option + '"]' + _content + '[/' + bbcode['tag'] + ']';
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<style type='text/css' media="all">
|
||||
@import url(rte_popup.css);
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body onload="Init()">
|
||||
|
||||
<div class="title" id="_title">Insert</div>
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend><strong>Example</strong></legend>
|
||||
<div id="_example" style='font-family:"Courier New", Monaco, Courier;font-size:12px'></div>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
<form action="" method="get">
|
||||
|
||||
<div id='use-option' style='display:none'>
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend><strong>Option Text</strong></legend>
|
||||
<div id='_option' style='padding:2px;color:#555;'></div>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><textarea name="text" id="f_option_text" style='width:100%;height:70px' cols='23' rows='4'></textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend><strong>Content Text</strong></legend>
|
||||
<div id='_content' style='padding:2px;color:#555;'></div>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><textarea name="href" id="f_content_text" style='width:100%;height:60px' cols='23' onfocus='this.select()' rows='4'></textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,264 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Insert Div/Span</title>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
//-----------------------------------------
|
||||
// Attempt to get editor ID
|
||||
//-----------------------------------------
|
||||
|
||||
var editor_id = <?php print '"'.trim( htmlspecialchars( substr( $_REQUEST['editorid'], 0, 30 ) ) ).'";'; ?>
|
||||
var this_module = 'div';
|
||||
var this_height = 400;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function Init()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// 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_type").focus();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// 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_type" , "f_fontfamily" , "f_fontsize", "f_color" , "f_backgroundimage", "f_backgroundrepeat",
|
||||
"f_backgroundcolor", "f_border" , "f_padding", "f_margin" , "f_other" ];
|
||||
|
||||
var param = new Object();
|
||||
|
||||
//-----------------------------------------
|
||||
// Compile data
|
||||
//-----------------------------------------
|
||||
|
||||
for ( var i in fields )
|
||||
{
|
||||
param[ fields[i] ] = document.getElementById( fields[i] ).value;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Now prep the table
|
||||
//-----------------------------------------
|
||||
|
||||
var doc = parent.IPS_editor[ editor_id ].editor_document;
|
||||
|
||||
//-------------------------------
|
||||
// Build remap array
|
||||
//-------------------------------
|
||||
|
||||
var remap_elements = {
|
||||
"f_fontfamily" : "font-family" ,
|
||||
"f_fontsize" : "font-size" ,
|
||||
"f_color" : "color" ,
|
||||
"f_backgroundimage" : "background-image" ,
|
||||
"f_backgroundrepeat" : "background-repeat",
|
||||
"f_backgroundcolor" : "background-color" ,
|
||||
"f_border" : "border" ,
|
||||
"f_padding" : "padding" ,
|
||||
"f_margin" : "margin"
|
||||
};
|
||||
|
||||
//-------------------------------
|
||||
// Get tag type
|
||||
//-------------------------------
|
||||
|
||||
var tagtype = param["f_type"];
|
||||
var style = "";
|
||||
|
||||
//-------------------------------
|
||||
// Start building style
|
||||
//-------------------------------
|
||||
|
||||
style += "style='";
|
||||
|
||||
for (var field in param)
|
||||
{
|
||||
var value = param[field];
|
||||
|
||||
if ( ! value || value == 'undefined' || field == 'undefined' || ! remap_elements[ field ] )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( remap_elements[ field ] && value )
|
||||
{
|
||||
style += remap_elements[ field ] + ":" + value + ";";
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Finish style
|
||||
//-------------------------------
|
||||
|
||||
style += param["f_other"]+"'";
|
||||
|
||||
//-----------------------------------------
|
||||
// Return..
|
||||
//-----------------------------------------
|
||||
|
||||
parent.IPS_editor[ editor_id].editor_check_focus();
|
||||
|
||||
if ( style )
|
||||
{
|
||||
parent.IPS_editor[ editor_id ].wrap_tags_lite( '<' + tagtype + ' ' + style + '>', '</' + tagtype + '>' );
|
||||
}
|
||||
else
|
||||
{
|
||||
parent.IPS_editor[ editor_id ].wrap_tags_lite( '<' + tagtype + '>', '</' + tagtype + '>' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill Window
|
||||
//-----------------------------------------
|
||||
|
||||
do_cancel();
|
||||
|
||||
return false;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<style type='text/css' media="all">
|
||||
@import url(rte_popup.css);
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body onload="Init()">
|
||||
|
||||
<div class="title">Insert DIV/SPAN</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>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Font</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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Size:</td>
|
||||
<td><input type="text" name="fontsize" id="f_fontsize" size="7" value="10px" title="Enter size and unit" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Color:</td>
|
||||
<td><input type="text" name="color" id="f_color" size="7" value="#000" title="Enter color" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Background</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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Repeat:</td>
|
||||
<td><input type="text" name="backgroundrepeat" id="f_backgroundrepeat" size="15" value="" title="Leave blank for no repeat" /></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>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Box Model</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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Padding:</td>
|
||||
<td><input type="text" name="padding" id="f_padding" size="20" value="4px" title="Enter size and unit" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Margin:</td>
|
||||
<td><input type="text" name="margin" id="f_margin" size="20" value="" title="Enter size and unit" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Custom Elements</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><textarea name="other" id="f_other" style='width:100%;height:70px' cols='23' rows='4'></textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,208 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Insert Div/Span</title>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
//-----------------------------------------
|
||||
// Attempt to get editor ID
|
||||
//-----------------------------------------
|
||||
|
||||
var editor_id = <?php print '"'.trim( htmlspecialchars( substr( $_REQUEST['editorid'], 0, 30 ) ) ).'";'; ?>
|
||||
var this_module = 'email';
|
||||
var this_height = 300;
|
||||
var allow_advanced = null;
|
||||
var current_selection = null;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function Init()
|
||||
{
|
||||
var allow_advanced = parent.IPS_editor[ editor_id ].allow_advanced;
|
||||
var current_selection = parent.IPS_editor[ editor_id ].get_selection();
|
||||
|
||||
//-----------------------------------------
|
||||
// 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_email").focus();
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up initial text value
|
||||
//-----------------------------------------
|
||||
|
||||
var link_regex = '';
|
||||
var link_text = '';
|
||||
var link_href = '';
|
||||
|
||||
if ( parent.IPS_editor[ editor_id ].use_bbcode && ! parent.IPS_editor[ editor_id ].is_rte )
|
||||
{
|
||||
link_regex = new RegExp( "\[email=([^\]]+?)\]([^\[]+?)\[/email\]", "i" );
|
||||
}
|
||||
else
|
||||
{
|
||||
link_regex = new RegExp( "<a href=['\"]mailto\:([^\"']+?)['\"]([^>]+?)?>(.+?)</a>", "i" );
|
||||
}
|
||||
|
||||
if ( current_selection.match( link_regex ) )
|
||||
{
|
||||
link_href = current_selection.replace( link_regex, "$1" );
|
||||
link_text = current_selection.replace( link_regex, "$3" );
|
||||
}
|
||||
|
||||
if ( link_text )
|
||||
{
|
||||
current_selection = link_text;
|
||||
}
|
||||
|
||||
if ( link_href )
|
||||
{
|
||||
document.getElementById("f_email").value = link_href;
|
||||
}
|
||||
|
||||
document.getElementById("f_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_email", "f_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_email": "You must enter an email address",
|
||||
"f_text": "You must enter some text for the email body"
|
||||
};
|
||||
|
||||
for (var i in required)
|
||||
{
|
||||
var el = document.getElementById(i);
|
||||
|
||||
if ( ! el.value )
|
||||
{
|
||||
alert(required[i]);
|
||||
el.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var link_html = '';
|
||||
|
||||
if ( parent.IPS_editor[ editor_id ].use_bbcode && ! parent.IPS_editor[ editor_id ].is_rte )
|
||||
{
|
||||
link_html = '[email=' + param['f_email'] + ']' + param['f_text'] + '[/email]';
|
||||
}
|
||||
else
|
||||
{
|
||||
link_html = '<a href="mailto:' + param['f_email'] + '">' + param['f_text'] + '</a>';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Return..
|
||||
//-----------------------------------------
|
||||
|
||||
parent.IPS_editor[ editor_id].editor_check_focus();
|
||||
|
||||
parent.IPS_editor[ editor_id ].insert_text( link_html );
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill Window
|
||||
//-----------------------------------------
|
||||
|
||||
do_cancel();
|
||||
|
||||
return false;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<style type='text/css' media="all">
|
||||
@import url(rte_popup.css);
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body onload="Init()">
|
||||
|
||||
<div class="title">Insert Email</div>
|
||||
|
||||
<form action="" method="get">
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Email Address</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>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Email Text</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><textarea name="text" id="f_text" style='width:100%;height:70px' cols='23' rows='4'></textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,231 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Insert Div/Span</title>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
//-----------------------------------------
|
||||
// Attempt to get editor ID
|
||||
//-----------------------------------------
|
||||
|
||||
var editor_id = <?php print '"'.trim( htmlspecialchars( substr( $_REQUEST['editorid'], 0, 30 ) ) ).'";'; ?>
|
||||
var this_module = 'image';
|
||||
var this_height = 400;
|
||||
var allow_advanced = null;
|
||||
var current_selection = null;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function Init()
|
||||
{
|
||||
var allow_advanced = parent.IPS_editor[ editor_id ].allow_advanced;
|
||||
var current_selection = parent.IPS_editor[ editor_id ].get_selection();
|
||||
|
||||
//-----------------------------------------
|
||||
// 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_src").focus();
|
||||
|
||||
//-----------------------------------------
|
||||
// Show advanced options?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( allow_advanced )
|
||||
{
|
||||
document.getElementById("advanced-options").style.display = '';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up initial text value
|
||||
//-----------------------------------------
|
||||
|
||||
var link_regex = '';
|
||||
var link_src = '';
|
||||
|
||||
if ( parent.IPS_editor[ editor_id ].use_bbcode && ! parent.IPS_editor[ editor_id ].is_rte )
|
||||
{
|
||||
link_regex = new RegExp( "\[img\]([^\[]+?)\[/img\]", "i" );
|
||||
}
|
||||
else
|
||||
{
|
||||
link_regex = new RegExp( "<img src=['\"]([^\"']+?)['\"]([^>]+?)?/>", "i" );
|
||||
}
|
||||
|
||||
if ( current_selection.match( link_regex ) )
|
||||
{
|
||||
link_src = current_selection.replace( link_regex, "$1" );
|
||||
}
|
||||
|
||||
if ( link_src )
|
||||
{
|
||||
current_selection = link_src;
|
||||
}
|
||||
|
||||
document.getElementById("f_src").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_src", "f_ad_title", "f_ad_alt" ];
|
||||
|
||||
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_src": "You must enter an image location"
|
||||
};
|
||||
|
||||
for (var i in required)
|
||||
{
|
||||
var el = document.getElementById(i);
|
||||
|
||||
if ( ! el.value )
|
||||
{
|
||||
alert(required[i]);
|
||||
el.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Now prep the table
|
||||
//-----------------------------------------
|
||||
|
||||
var link_title = allow_advanced && param['f_ad_title'] != '' ? ' title="' + param['f_ad_title'] + '"' : '';
|
||||
var link_alt = allow_advanced && param['f_ad_alt'] != '' ? ' alt="' + param['f_ad_alt'] + '"' : '';
|
||||
var link_border = allow_advanced && param['f_ad_border'] != '' ? ' border="' + param['f_ad_border'] + '"' : '';
|
||||
var link_html = '';
|
||||
|
||||
if ( parent.IPS_editor[ editor_id ].use_bbcode && ! parent.IPS_editor[ editor_id ].is_rte )
|
||||
{
|
||||
link_html = '[img]' + param['f_src'] + '[/img]';
|
||||
}
|
||||
else
|
||||
{
|
||||
link_html = '<img src="' + param['f_src'] + '"' + link_title + link_alt + link_border + ' />';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Return..
|
||||
//-----------------------------------------
|
||||
|
||||
parent.IPS_editor[ editor_id].editor_check_focus();
|
||||
|
||||
parent.IPS_editor[ editor_id ].insert_text( link_html );
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill Window
|
||||
//-----------------------------------------
|
||||
|
||||
do_cancel();
|
||||
|
||||
return false;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<style type='text/css' media="all">
|
||||
@import url(rte_popup.css);
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body onload="Init()">
|
||||
|
||||
<div class="title">Insert Image</div>
|
||||
|
||||
<form action="" method="get">
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Image Location</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><textarea name="src" id="f_src" style='width:100%;height:60px' cols='23' onfocus='this.select()' rows='4'>http://</textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<div id='advanced-options' style='display:none'>
|
||||
<br />
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Advanced Options</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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Title:</td>
|
||||
<td><input type="text" name="title" id="f_ad_title" size="20" value="" title="Image 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>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,260 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Insert Div/Span</title>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
//-----------------------------------------
|
||||
// Attempt to get editor ID
|
||||
//-----------------------------------------
|
||||
|
||||
var editor_id = <?php print '"'.trim( htmlspecialchars( substr( $_REQUEST['editorid'], 0, 30 ) ) ).'";'; ?>
|
||||
var this_module = 'link';
|
||||
var this_height = 400;
|
||||
var allow_advanced = null;
|
||||
var current_selection = null;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function Init()
|
||||
{
|
||||
var allow_advanced = parent.IPS_editor[ editor_id ].allow_advanced;
|
||||
var current_selection = parent.ipsclass.un_htmlspecialchars( parent.IPS_editor[ editor_id ].get_selection() );
|
||||
|
||||
//-----------------------------------------
|
||||
// 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_href").focus();
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up initial text value
|
||||
//-----------------------------------------
|
||||
|
||||
document.getElementById("f_text").value = current_selection;
|
||||
|
||||
//-----------------------------------------
|
||||
// Show advanced options?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( allow_advanced )
|
||||
{
|
||||
document.getElementById("advanced-options").style.display = '';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up initial text value
|
||||
//-----------------------------------------
|
||||
|
||||
var link_regex = '';
|
||||
var link_text = '';
|
||||
var link_href = '';
|
||||
|
||||
if ( parent.IPS_editor[ editor_id ].use_bbcode && ! parent.IPS_editor[ editor_id ].is_rte )
|
||||
{
|
||||
link_regex = /\[url=([^\]]+?)\]([^\[]+?)\[\/url\]/ig;
|
||||
|
||||
if ( current_selection.match( link_regex ) )
|
||||
{
|
||||
link_href = current_selection.replace( link_regex, "$1" );
|
||||
link_text = current_selection.replace( link_regex, "$2" );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
link_regex = /<a href=['"]([^"']+?)['"]([^>]+?)?>(.+?)<\/a>/ig;
|
||||
|
||||
if ( current_selection.match( link_regex ) )
|
||||
{
|
||||
link_href = current_selection.replace( link_regex, "$1" );
|
||||
link_text = current_selection.replace( link_regex, "$3" );
|
||||
}
|
||||
}
|
||||
|
||||
if ( link_text )
|
||||
{
|
||||
current_selection = link_text;
|
||||
}
|
||||
|
||||
if ( link_href )
|
||||
{
|
||||
document.getElementById("f_href").value = link_href;
|
||||
}
|
||||
|
||||
current_selection = current_selection.replace( /<br \/>|<br>|\n|\r/g, "");
|
||||
|
||||
document.getElementById("f_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_href", "f_text", "f_ad_title", "f_ad_target" ];
|
||||
|
||||
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_href": "You must enter a link location",
|
||||
"f_text": "You must enter some text for the link body"
|
||||
};
|
||||
|
||||
for (var i in required)
|
||||
{
|
||||
var el = document.getElementById(i);
|
||||
|
||||
if ( ! el.value )
|
||||
{
|
||||
alert(required[i]);
|
||||
el.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Now prep the table
|
||||
//-----------------------------------------
|
||||
|
||||
var link_title = allow_advanced && param['f_ad_title'] ? ' title="' + param['f_ad_title'] + '" ' : '';
|
||||
var link_target = allow_advanced && param['f_ad_target'] ? ' target="' + param['f_ad_target'] + '"' : '';
|
||||
var link_html = '';
|
||||
|
||||
if ( parent.IPS_editor[ editor_id ].use_bbcode && ! parent.IPS_editor[ editor_id ].is_rte )
|
||||
{
|
||||
link_html = '[url=' + param['f_href'] + ']' + param['f_text'] + '[/url]';
|
||||
}
|
||||
else
|
||||
{
|
||||
link_html = '<a href="' + param['f_href'] + '"' + link_title + link_target + '>' + param['f_text'] + '</a>';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Return..
|
||||
//-----------------------------------------
|
||||
|
||||
parent.IPS_editor[ editor_id].editor_check_focus();
|
||||
|
||||
parent.IPS_editor[ editor_id ].insert_text( link_html );
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill Window
|
||||
//-----------------------------------------
|
||||
|
||||
do_cancel();
|
||||
|
||||
return false;
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<style type='text/css' media="all">
|
||||
@import url(rte_popup.css);
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body onload="Init()">
|
||||
|
||||
<div class="title">Insert Link</div>
|
||||
|
||||
<form action="" method="get">
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Link Location</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><textarea name="href" id="f_href" style='width:100%;height:60px' cols='23' onfocus='this.select()' rows='4'>http://</textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Link Text</legend>
|
||||
<table border="0" width='100%' style="padding: 0px; margin: 0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><textarea name="text" id="f_text" style='width:100%;height:70px' cols='23' rows='4'></textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<div id='advanced-options' style='display:none'>
|
||||
<br />
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Advanced Options</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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Target:</td>
|
||||
<td><input type="text" name="fontsize" id="f_ad_target" size="20" value="" title="Link Target" /></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,299 @@
|
||||
<html>
|
||||
<head>
|
||||
<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>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
//-----------------------------------------
|
||||
// Attempt to get editor ID
|
||||
//-----------------------------------------
|
||||
|
||||
var editor_id = <?php print '"'.trim( htmlspecialchars( substr( $_REQUEST['editorid'], 0, 30 ) ) ).'";'; ?>
|
||||
var this_module = 'table';
|
||||
var this_height = 350;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function Init()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// 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_rows").focus();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Do cancel
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function do_cancel()
|
||||
{
|
||||
parent.IPS_editor[ editor_id ].module_remove_control_bar();
|
||||
return false;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Do submit (low tech)
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function do_submit()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Fail safe
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! editor_id )
|
||||
{
|
||||
alert("Could not locate the editor ID");
|
||||
return false;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up required fields
|
||||
//-----------------------------------------
|
||||
|
||||
var required = {
|
||||
"f_rows": "You must enter a number of rows",
|
||||
"f_cols": "You must enter a number of columns"
|
||||
};
|
||||
|
||||
for (var i in required)
|
||||
{
|
||||
var el = document.getElementById(i);
|
||||
|
||||
if ( ! el.value )
|
||||
{
|
||||
alert(required[i]);
|
||||
el.focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var fields = ["f_rows" , "f_cols" , "f_width" , "f_unit",
|
||||
"f_align", "f_border", "f_spacing", "f_padding"];
|
||||
|
||||
var param = new Object();
|
||||
|
||||
//-----------------------------------------
|
||||
// Compile data
|
||||
//-----------------------------------------
|
||||
|
||||
for ( var i in fields )
|
||||
{
|
||||
param[ fields[i] ] = document.getElementById( fields[i] ).value;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Now prep the table
|
||||
//-----------------------------------------
|
||||
|
||||
var doc = parent.IPS_editor[ editor_id ].editor_document;
|
||||
|
||||
//-----------------------------------------
|
||||
// create the table element inside a wrapper
|
||||
// div that we can use innerHTML on
|
||||
//-----------------------------------------
|
||||
|
||||
var wrap_div = document.createElement("DIV");
|
||||
var table = document.createElement("table");
|
||||
|
||||
wrap_div.appendChild( table );
|
||||
|
||||
//-----------------------------------------
|
||||
// assign the given arguments
|
||||
//-----------------------------------------
|
||||
|
||||
for (var field in param)
|
||||
{
|
||||
var value = param[field];
|
||||
|
||||
if ( ! value )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (field)
|
||||
{
|
||||
case "f_width" : table.style.width = value + param["f_unit"]; break;
|
||||
case "f_align" : table.align = value; break;
|
||||
case "f_border" : table.border = parseInt(value); break;
|
||||
case "f_spacing" : table.cellspacing = parseInt(value); break;
|
||||
case "f_padding" : table.cellpadding = parseInt(value); break;
|
||||
}
|
||||
}
|
||||
|
||||
var tbody = document.createElement("tbody");
|
||||
|
||||
table.appendChild(tbody);
|
||||
|
||||
for (var i = 0; i < param["f_rows"]; ++i)
|
||||
{
|
||||
var tr = document.createElement("tr");
|
||||
|
||||
tbody.appendChild(tr);
|
||||
|
||||
for (var j = 0; j < param["f_cols"]; ++j)
|
||||
{
|
||||
var td = document.createElement("td");
|
||||
|
||||
tr.appendChild(td);
|
||||
|
||||
//-------------------------------
|
||||
// Mozilla likes to see something
|
||||
// inside the cell.
|
||||
//-------------------------------
|
||||
|
||||
( ! parent.IPS_editor[ editor_id ].is_ie )
|
||||
{
|
||||
td.appendChild( document.createElement("br") );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Clean up
|
||||
//-----------------------------------------
|
||||
|
||||
wrap_div.innerHTML = parent.IPS_editor[ editor_id ].clean_html( wrap_div.innerHTML );
|
||||
|
||||
//-----------------------------------------
|
||||
// Return..
|
||||
//-----------------------------------------
|
||||
|
||||
parent.IPS_editor[ editor_id].editor_check_focus();
|
||||
|
||||
parent.IPS_editor[ editor_id ].insert_text( wrap_div.innerHTML );
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill node
|
||||
//-----------------------------------------
|
||||
|
||||
//doc.removeChild( wrap_div );
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill Window
|
||||
//-----------------------------------------
|
||||
|
||||
do_cancel();
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
<style type='text/css' media="all">
|
||||
@import url(rte_popup.css);
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body onload="Init()">
|
||||
|
||||
<div class="title">Insert Table</div>
|
||||
|
||||
<form action="" method="get">
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Basics</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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cols:</td>
|
||||
<td><input type="text" name="cols" id="f_cols" size="5" title="Number of columns" 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>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Layout</legend>
|
||||
<table border="0" width='100%' >
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Alignment:</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>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
<fieldset style="margin-left: 5px;">
|
||||
<legend>Spacing</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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cell Padding:</td>
|
||||
<td><input type="text" name="cols" id="f_padding" size="5" title="Cell Padding" 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>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<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>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,143 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// IPS Cross-Browser Global Text Editor HTML
|
||||
//------------------------------------------------------------------------------
|
||||
// Supports all "v5" browsers (inc. Opera, Safari, etc)
|
||||
// Used for non RTE applications.
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
// http://www.invisionpower.com
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
/**
|
||||
* Rich Text Editor HTML Functions
|
||||
*/
|
||||
function rte_html_functions()
|
||||
{
|
||||
/**
|
||||
* Main control bar object
|
||||
* @var object Main control bar object
|
||||
*/
|
||||
this.control_obj = false;
|
||||
/**
|
||||
* Editor ID
|
||||
*/
|
||||
this.editor_id = false;
|
||||
/**
|
||||
* Current open bar object
|
||||
*/
|
||||
this.current_bar_object = null;
|
||||
|
||||
/**
|
||||
* Main init function
|
||||
* Nothing much to do
|
||||
*/
|
||||
this.init = function()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Show new control bar
|
||||
*
|
||||
* @param type Type of control bar (must be same as function key)
|
||||
*/
|
||||
this.show_control_bar = function( type )
|
||||
{
|
||||
if ( ! this.control_obj )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Already open? Kill it
|
||||
//-----------------------------------------
|
||||
|
||||
if ( this.current_bar_object )
|
||||
{
|
||||
this.remove_control_bar();
|
||||
}
|
||||
|
||||
var mainbar = document.getElementById( 'rte-main-bar');
|
||||
var addtobar = document.getElementById( 'rte-hidden-items' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Spawn new DIV object
|
||||
//-----------------------------------------
|
||||
|
||||
var newdiv = document.createElement('div');
|
||||
|
||||
newdiv.id = this.editor_id + '_htmlblock_' + type + '_menu';
|
||||
newdiv.style.display = '';
|
||||
newdiv.className = 'rte-buttonbar';
|
||||
newdiv.style.zIndex = parseInt( this.control_obj.style.zIndex ) + 1;
|
||||
newdiv.style.position = 'absolute';
|
||||
newdiv.style.width = '220px';
|
||||
newdiv.style.height = '400px';
|
||||
newdiv.style.top = ipsclass.get_obj_toppos( mainbar ) + 'px';
|
||||
newdiv.style.left = ipsclass.get_obj_leftpos( mainbar ) - ( parseInt(newdiv.style.width) + 10 ) + 'px';
|
||||
|
||||
var tmpheight = parseInt(newdiv.style.height) - 15;
|
||||
newdiv.innerHTML = this.wrap_html_panel( "<iframe id='"+ this.editor_id + '_iframeblock_' + type + '_menu' + "' src='"+global_rte_includes_url + "insert_" + type + ".php?editorid="+this.editor_id+"' style='background-color:transparent;border:0px;overflow:auto;width:99%;height:" + tmpheight + "px'></iframe>" );
|
||||
|
||||
//-----------------------------------------
|
||||
// Add and show
|
||||
//-----------------------------------------
|
||||
|
||||
addtobar.appendChild(newdiv);
|
||||
|
||||
ipsclass.set_unselectable( newdiv );
|
||||
|
||||
//-----------------------------------------
|
||||
// INIT Drag
|
||||
//-----------------------------------------
|
||||
|
||||
var phdl = document.getElementById('rte-pallete-handle');
|
||||
|
||||
Drag.init( phdl, newdiv );
|
||||
|
||||
this.current_bar_object = newdiv;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove control bar
|
||||
* Removes the control bar.
|
||||
*/
|
||||
this.remove_control_bar = function()
|
||||
{
|
||||
if ( ! this.current_bar_object )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var addtobar = document.getElementById( 'rte-hidden-items' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill old bar
|
||||
//-----------------------------------------
|
||||
|
||||
addtobar.removeChild( this.current_bar_object );
|
||||
|
||||
//-----------------------------------------
|
||||
// Reset bar object
|
||||
//-----------------------------------------
|
||||
|
||||
this.current_bar_object = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap HTML block with basic control panel stuff
|
||||
*/
|
||||
this.wrap_html_panel = function( html )
|
||||
{
|
||||
var newhtml = "";
|
||||
newhtml += " <div id='rte-pallete-wrap'>";
|
||||
newhtml += " <div id='rte-pallete-main'>";
|
||||
newhtml += " <div class='rte-cb-bg' id='rte-pallete-handle'>";
|
||||
newhtml += " <div align='left'><img id='rte-cb-close-window' src='"+global_rte_images_url+"rte-cb-close.gif' alt='' class='ipd' border='0' /></div>";
|
||||
newhtml += " </div>";
|
||||
newhtml += " <div>" + html + "</div>";
|
||||
newhtml += " </div>";
|
||||
newhtml += " </div>";
|
||||
|
||||
return newhtml;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
html, body
|
||||
{
|
||||
color: #000;
|
||||
font: 10px Verdana,sans-serif;
|
||||
background-color: transparent;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
body
|
||||
{
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
table
|
||||
{
|
||||
font: 10px Verdana,sans-serif;
|
||||
}
|
||||
|
||||
.tblbutton
|
||||
{
|
||||
border:1px solid #999;
|
||||
background-color: #CCC;
|
||||
font-family:Verdana, Arial;
|
||||
font-size:10px;
|
||||
font-weight:bold;
|
||||
padding:2px;
|
||||
}
|
||||
|
||||
form p
|
||||
{
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.fl
|
||||
{
|
||||
width: 9em; float: left; padding: 2px 5px; text-align: right;
|
||||
}
|
||||
|
||||
.fr
|
||||
{
|
||||
width: 7em; float: left; padding: 2px 5px; text-align: right;
|
||||
}
|
||||
|
||||
.frlarge
|
||||
{
|
||||
width: 10em; float: left; padding: 2px 5px; text-align: right;
|
||||
}
|
||||
|
||||
fieldset
|
||||
{
|
||||
padding: 0px 10px 5px 5px;
|
||||
}
|
||||
|
||||
select, input, button
|
||||
{
|
||||
font: 10px Verdana,sans-serif;
|
||||
}
|
||||
|
||||
button
|
||||
{
|
||||
width: 70px;
|
||||
}
|
||||
.space
|
||||
{
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.title
|
||||
{
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
font-size: 120%;
|
||||
padding: 3px 10px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px solid black;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
form
|
||||
{
|
||||
padding: 0px; margin: 0px;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<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://anonym.to/http://www.invisionboard.com/">Invision Power Board</a>␍</body>␍</html>␍
|
||||
@@ -0,0 +1,15 @@
|
||||
//------------------------------------------
|
||||
// Invision Power Board v2.1
|
||||
// Boards JS File
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
//
|
||||
// http://www.invisionboard.com
|
||||
//------------------------------------------
|
||||
|
||||
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Send request to update marker
|
||||
// NO LONGER USED
|
||||
/*--------------------------------------------*/
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
//------------------------------------------
|
||||
// Invision Power Board v2.0
|
||||
// Find User JS File
|
||||
// (c) 2004 Invision Power Services, Inc.
|
||||
//
|
||||
// http://www.invisionboard.com
|
||||
//------------------------------------------
|
||||
|
||||
|
||||
|
||||
function add_to_form()
|
||||
{
|
||||
var name = document.finduser.username.options[document.finduser.username.selectedIndex].value;
|
||||
|
||||
if (separator == 'line')
|
||||
{
|
||||
separator = '\n';
|
||||
}
|
||||
|
||||
if (separator == 'none')
|
||||
{
|
||||
separator = '';
|
||||
}
|
||||
|
||||
if (entry == 'textarea')
|
||||
{
|
||||
// Where shall we put the separator?
|
||||
|
||||
var tbox = eval('opener.document.REPLIER.'+in_name+'.value');
|
||||
var tboxSize = eval('opener.document.REPLIER.'+in_name+'.value.length');
|
||||
|
||||
// Remove leading spaces...
|
||||
|
||||
while ( tbox.slice(0,1) == " " )
|
||||
{
|
||||
tbox = tbox.substr(1, tboxSize - 1);
|
||||
tboxSize = tboxSize;
|
||||
}
|
||||
|
||||
// Remove trailing spaces...
|
||||
|
||||
while ( tbox.slice(tboxSize - 1, tboxSize) == " " )
|
||||
{
|
||||
tbox = tbox.substr(0, tboxSize - 1);
|
||||
tboxSize = tboxSize;
|
||||
}
|
||||
|
||||
// Do we have a leading comma?
|
||||
|
||||
while ( tbox.slice(0,1) == "\n" )
|
||||
{
|
||||
tbox = tbox.substr(1, tboxSize - 1);
|
||||
tboxSize = tboxSize;
|
||||
}
|
||||
|
||||
// Do we have a trailing comma?...
|
||||
|
||||
while ( tbox.slice(tboxSize - 1, tboxSize) == "\n" )
|
||||
{
|
||||
tbox = tbox.substr(0, tboxSize - 1);
|
||||
tboxSize = tboxSize;
|
||||
}
|
||||
|
||||
// First in box?
|
||||
|
||||
if ( tboxSize == 0)
|
||||
{
|
||||
eval('opener.document.REPLIER.'+in_name+'.value += name');
|
||||
}
|
||||
else
|
||||
{
|
||||
eval('opener.document.REPLIER.'+in_name+'.value += separator + name');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,965 @@
|
||||
//------------------------------------------
|
||||
// Invision Power Board v2.1
|
||||
// Forums JS File
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
//
|
||||
// http://www.invisionboard.com
|
||||
//------------------------------------------
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// INIT
|
||||
/*--------------------------------------------*/
|
||||
|
||||
var topic_dates = {};
|
||||
var topic_flags = {};
|
||||
var topic_state = {};
|
||||
var forum_mark_time;
|
||||
var newer_topics = new Array;
|
||||
var newer_count = 0;
|
||||
var flags_count = 0;
|
||||
var forum_id;
|
||||
var url_extra = '';
|
||||
var start_int = 0;
|
||||
var forum_mark_sent = 0;
|
||||
var span_html = new Array;
|
||||
var desc_html = new Array;
|
||||
var text_html = new Array;
|
||||
var folders = new Array;
|
||||
var _desc_clicked = 0;
|
||||
var topic_links_init = 0;
|
||||
|
||||
var _this_select_all = 0;
|
||||
|
||||
var tid_date = new Array();
|
||||
|
||||
var click_delay = 1200; //microseconds (1.2 seconds)
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Pop up mod options
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function forum_mod_pop( fid )
|
||||
{
|
||||
try
|
||||
{
|
||||
menu_action_close();
|
||||
}
|
||||
catch(e) { }
|
||||
|
||||
PopUp( ipb_var_base_url + 'act=mod&CODE=prune_start&f='+fid+'&auth_key='+ipb_md5_check, 'PRUNE', 600,500);
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// INIT topic links...
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function forum_init_topic_links()
|
||||
{
|
||||
//----------------------------------
|
||||
// Get page links...
|
||||
// Gah.. another safari bug
|
||||
//----------------------------------
|
||||
|
||||
var pagelinks = document.getElementsByTagName('a');
|
||||
|
||||
//----------------------------------
|
||||
// Sort through and grab topic links
|
||||
//----------------------------------
|
||||
|
||||
for ( var i = 0 ; i <= pagelinks.length ; i++ )
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( ! pagelinks[i].id )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var linkid = pagelinks[i].id;
|
||||
var linkname = linkid.replace( /^(.*)-(\d+)$/, "$1" );
|
||||
|
||||
if ( linkname == 'tid-link' )
|
||||
{
|
||||
pagelinks[i].onmousedown = topic_link_event_mousedown;
|
||||
pagelinks[i].onmouseup = topic_link_event_mouseup;
|
||||
//pagelinks[i].style.cursor = 'text';
|
||||
|
||||
if ( ! topic_links_init )
|
||||
{
|
||||
pagelinks[i].title = pagelinks[i].title + '. ' + lang_clickhold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
topic_links_init = 1;
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Mousedown, start timer
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function topic_link_event_mousedown( event )
|
||||
{
|
||||
//----------------------------------
|
||||
// Prevent link loading
|
||||
//----------------------------------
|
||||
|
||||
event = global_cancel_bubble( event, true );
|
||||
|
||||
//----------------------------------
|
||||
// Get TID
|
||||
//----------------------------------
|
||||
|
||||
var tid = _get_tid_from_id( this.id );
|
||||
|
||||
//----------------------------------
|
||||
// Start...
|
||||
//----------------------------------
|
||||
|
||||
tid_date[ tid ] = _get_time_now();
|
||||
|
||||
//----------------------------------
|
||||
// Start loop
|
||||
//----------------------------------
|
||||
|
||||
setTimeout( "topic_link_event_timer("+tid+")", 5 );
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Event, loop
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function topic_link_event_timer( tid )
|
||||
{
|
||||
//----------------------------------
|
||||
// Get time now
|
||||
//----------------------------------
|
||||
|
||||
var timenow = _get_time_now();
|
||||
|
||||
//----------------------------------
|
||||
// Click held for 1.5 s+?
|
||||
//----------------------------------
|
||||
|
||||
if ( timenow > 0 && tid_date[tid] > 0 && ( (timenow - tid_date[tid] ) > click_delay ) )
|
||||
{
|
||||
//----------------------------------
|
||||
// Yeah.. wipe tid time and convert
|
||||
//----------------------------------
|
||||
|
||||
tid_date[tid] = 0;
|
||||
span_to_input( tid );
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Not wiped? loop on!
|
||||
//----------------------------------
|
||||
|
||||
if ( tid_date[tid] > 0 )
|
||||
{
|
||||
setTimeout( "topic_link_event_timer("+tid+")", 5 );
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Mouseup? Cancel timer to kill the loop
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function topic_link_event_mouseup( event )
|
||||
{
|
||||
//----------------------------------
|
||||
// Prevent link loading
|
||||
//----------------------------------
|
||||
|
||||
event = global_cancel_bubble( event, true );
|
||||
|
||||
//----------------------------------
|
||||
// Get TID
|
||||
//----------------------------------
|
||||
|
||||
var tid = _get_tid_from_id( this.id );
|
||||
|
||||
//----------------------------------
|
||||
// Reset timer
|
||||
//----------------------------------
|
||||
|
||||
tid_date[tid] = 0;
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Get time now
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function _get_time_now()
|
||||
{
|
||||
var mydate = new Date();
|
||||
return mydate.getTime();
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Get TID from ID
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function _get_tid_from_id( id )
|
||||
{
|
||||
return id.replace( /.*\-(\d+)/, "$1" );
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Turn topic title into text input
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function topic_toggle_folder( tid, state )
|
||||
{
|
||||
//----------------------------------
|
||||
// Using fancy js?
|
||||
//----------------------------------
|
||||
|
||||
if ( ! use_enhanced_js )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Can edit?
|
||||
//----------------------------------
|
||||
|
||||
if ( ! perm_can_open && ! perm_can_close )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var td_content = document.getElementById( 'tid-folder-' + tid ).innerHTML;
|
||||
|
||||
if ( topic_state[ tid ] )
|
||||
{
|
||||
state = topic_state[ tid ];
|
||||
}
|
||||
|
||||
if ( state == 'closed' )
|
||||
{
|
||||
//----------------------------------
|
||||
// Can?
|
||||
//----------------------------------
|
||||
|
||||
if ( ! perm_can_open )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Topic is locked
|
||||
//----------------------------------
|
||||
|
||||
if ( folders[ tid ] )
|
||||
{
|
||||
td_content = folders[ tid ];
|
||||
}
|
||||
|
||||
state = 'open';
|
||||
}
|
||||
else
|
||||
{
|
||||
//----------------------------------
|
||||
// Can?
|
||||
//----------------------------------
|
||||
|
||||
if ( ! perm_can_close )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Topic isn't locked
|
||||
//----------------------------------
|
||||
|
||||
folders[ tid ] = td_content;
|
||||
state = 'closed';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Store state
|
||||
//-----------------------------------------
|
||||
|
||||
topic_state[ tid ] = state;
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// 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 returned = xmlobj.xmlhandler.responseText;
|
||||
|
||||
td_content = returned;
|
||||
document.getElementById( 'tid-folder-' + tid ).innerHTML = td_content;
|
||||
};
|
||||
|
||||
//----------------------------------
|
||||
// LOAD XML
|
||||
//----------------------------------
|
||||
|
||||
xmlobj = new ajax_request();
|
||||
xmlobj.onreadystatechange( do_request_function );
|
||||
|
||||
xmlobj.process( ipb_var_base_url + 'act=xmlout&do=save-topic&type=openclose&name='+state+'&md5check='+ipb_md5_check+'&tid='+tid );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Turn topic title into text input
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function span_to_input( tid )
|
||||
{
|
||||
//----------------------------------
|
||||
// Using fancy js?
|
||||
//----------------------------------
|
||||
|
||||
if ( ! use_enhanced_js )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Can?
|
||||
//----------------------------------
|
||||
|
||||
if ( ! perm_can_edit )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Prevent double click when desc open
|
||||
//----------------------------------
|
||||
|
||||
if ( _desc_clicked )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
span_html[ tid ] = document.getElementById( 'tid-span-' + tid ).innerHTML;
|
||||
text_html[ tid ] = document.getElementById( 'tid-link-' + tid ).innerHTML;
|
||||
|
||||
//----------------------------------
|
||||
// Topic title
|
||||
//----------------------------------
|
||||
|
||||
perm_max_length = perm_max_length ? perm_max_length : 50;
|
||||
|
||||
document.getElementById( 'tid-span-' + tid ).innerHTML = '<input id="edit-'+tid+'" class="dny-edit-title" maxlength="'+perm_max_length+'" type="text" size="40" value="'+text_html[ tid ].replace( /"/g, '"') +'" />'; //"'
|
||||
document.getElementById( 'edit-' + tid ).onkeyup = function( event ) { tid_keypress(event, tid) }
|
||||
document.getElementById( 'edit-' + tid ).onblur = function( event ) { tid_blur(tid) }
|
||||
document.getElementById( 'edit-' + tid ).focus();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Turn topic DESC into text input
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function span_desc_to_input( tid )
|
||||
{
|
||||
//----------------------------------
|
||||
// Using fancy js?
|
||||
//----------------------------------
|
||||
|
||||
if ( ! use_enhanced_js )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Can?
|
||||
//----------------------------------
|
||||
|
||||
if ( ! perm_can_edit )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Prevent double click when desc open
|
||||
//----------------------------------
|
||||
|
||||
if ( _desc_clicked )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
_desc_clicked = 1;
|
||||
|
||||
desc_html[ tid ] = document.getElementById( 'tid-desc-' + tid ).innerHTML;
|
||||
|
||||
//----------------------------------
|
||||
// Topic desc
|
||||
//----------------------------------
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// BLUR HANDLER
|
||||
/*--------------------------------------------*/
|
||||
|
||||
tid_blur = function( tid, type )
|
||||
{
|
||||
new_text = document.getElementById( 'edit-' + tid ).value;
|
||||
|
||||
if( type == 'desc' )
|
||||
{
|
||||
tid_save( tid, new_text, type );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( new_text != "" )
|
||||
{
|
||||
tid_save( tid, new_text, type );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// KEY PRESS HANDLER
|
||||
/*--------------------------------------------*/
|
||||
|
||||
tid_keypress = function( evt, tid, type )
|
||||
{
|
||||
if ( is_safari )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
evt = evt ? evt : window.event;
|
||||
|
||||
new_text = document.getElementById( 'edit-' + tid ).value;
|
||||
|
||||
if ( ( evt.keyCode == 13 || evt.keyCode == 3 ) && new_text != "" )
|
||||
{
|
||||
tid_save( tid, new_text, type );
|
||||
}
|
||||
else if( evt.keyCode == 27 )
|
||||
{
|
||||
if( type == 'desc' )
|
||||
{
|
||||
document.getElementById( 'tid-desc-' + tid ).innerHTML = desc_html[ tid ];
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById( 'tid-span-' + tid ).innerHTML = span_html[ tid ];
|
||||
document.getElementById( 'tid-link-' + tid ).innerHTML = text_html[ tid ];
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// UDPATE DB
|
||||
/*--------------------------------------------*/
|
||||
|
||||
tid_save = function( tid, new_text, type )
|
||||
{
|
||||
var donotedit = 0;
|
||||
|
||||
if ( type == 'desc' )
|
||||
{
|
||||
if ( new_text == desc_html[ tid ] )
|
||||
{
|
||||
donotedit = 1;
|
||||
}
|
||||
|
||||
_desc_clicked = 0;
|
||||
|
||||
document.getElementById( 'tid-desc-' + tid ).innerHTML = new_text;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( new_text == text_html[ tid ] )
|
||||
{
|
||||
donotedit = 1;
|
||||
}
|
||||
|
||||
type = 'title';
|
||||
document.getElementById( 'tid-span-' + tid ).innerHTML = span_html[ tid ];
|
||||
document.getElementById( 'tid-link-' + tid ).innerHTML = new_text;
|
||||
|
||||
//----------------------------------
|
||||
// Re-check topic links
|
||||
//----------------------------------
|
||||
|
||||
forum_init_topic_links();
|
||||
}
|
||||
|
||||
if ( donotedit )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var url = ipb_var_base_url + 'act=xmlout&do=save-topic&type='+type+'&md5check='+ipb_md5_check+'&tid='+tid;
|
||||
var fields = new Array();
|
||||
|
||||
//----------------------------------
|
||||
// Populate fields
|
||||
//----------------------------------
|
||||
|
||||
fields['md5check'] = ipb_md5_check;
|
||||
fields['tid'] = tid;
|
||||
fields['act'] = 'xmlout';
|
||||
fields['do'] = 'save-topic';
|
||||
fields['type'] = type;
|
||||
fields['name'] = new_text;
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// 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 returned = xmlobj.xmlhandler.responseText;
|
||||
|
||||
if ( type != 'desc' && ! returned.match( /<null>s<\/null>/ ) )
|
||||
{
|
||||
document.getElementById( 'tid-link-' + tid ).innerHTML = returned;
|
||||
}
|
||||
};
|
||||
|
||||
//----------------------------------
|
||||
// LOAD XML
|
||||
//----------------------------------
|
||||
|
||||
xmlobj = new ajax_request();
|
||||
xmlobj.onreadystatechange( do_request_function );
|
||||
xmlobj.process( url, 'POST', xmlobj.format_for_post(fields) );
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Who posted
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function who_posted(tid)
|
||||
{
|
||||
window.open( ipb_var_base_url+ "act=Stats&CODE=who&t="+tid, "WhoPosted", "toolbar=no,scrollbars=yes,resizable=yes,width=230,height=300");
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Check delete
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function checkdelete()
|
||||
{
|
||||
if ( ! document.modform.selectedtids.value )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
isDelete = document.modform.tact.options[document.modform.tact.selectedIndex].value;
|
||||
|
||||
if (isDelete == 'delete')
|
||||
{
|
||||
formCheck = confirm( lang_suredelete );
|
||||
|
||||
if (formCheck == true)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Toggle selection
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function forum_select_all()
|
||||
{
|
||||
clean = new Array();
|
||||
saved = new Array();
|
||||
var topics_this_page = new Array();
|
||||
|
||||
tmp = document.modform.selectedtids.value;
|
||||
|
||||
if ( tmp != "" )
|
||||
{
|
||||
saved = tmp.split(",");
|
||||
}
|
||||
|
||||
if( _this_select_all == 0 )
|
||||
{
|
||||
var the_topics = document.getElementsByTagName('input');
|
||||
|
||||
for ( var i = 0 ; i <= the_topics.length ; i++ )
|
||||
{
|
||||
var e = the_topics[i];
|
||||
|
||||
if ( e && (e.type == 'hidden') && (! e.disabled) )
|
||||
{
|
||||
var s = e.id;
|
||||
var a = s.replace( /^tid_(.+?)$/, "$1" );
|
||||
|
||||
if ( a )
|
||||
{
|
||||
try
|
||||
{
|
||||
document.getElementById( 'ipb-topic-' + a ).src = selectedbutton;
|
||||
clean[clean.length] = a;
|
||||
topics_this_page[ a ] = 1;
|
||||
}
|
||||
catch(err)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById( 'ipb-topics-all' ).src = selectedbutton;
|
||||
|
||||
_this_select_all = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
var the_topics = document.getElementsByTagName('input');
|
||||
|
||||
for ( var i = 0 ; i <= the_topics.length ; i++ )
|
||||
{
|
||||
var e = the_topics[i];
|
||||
|
||||
if ( e && (e.type == 'hidden') && (! e.disabled) )
|
||||
{
|
||||
var s = e.id;
|
||||
var a = s.replace( /^tid_(.+?)$/, "$1" );
|
||||
|
||||
if ( a )
|
||||
{
|
||||
try
|
||||
{
|
||||
document.getElementById( 'ipb-topic-' + a ).src = unselectedbutton;
|
||||
topics_this_page[ a ] = 1;
|
||||
}
|
||||
catch(err)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById( 'ipb-topics-all' ).src = unselectedbutton;
|
||||
|
||||
_this_select_all = 0;
|
||||
}
|
||||
|
||||
for( i = 0 ; i < saved.length; i++ )
|
||||
{
|
||||
if ( saved[i] != "" && topics_this_page[ saved[i] ] != 1 )
|
||||
{
|
||||
clean[clean.length] = saved[i];
|
||||
}
|
||||
}
|
||||
|
||||
newvalue = clean.join(',');
|
||||
|
||||
var oldvalue = 0;
|
||||
|
||||
for( var k = 0; k < clean.length; k++ )
|
||||
{
|
||||
if( topics_this_page[ clean[ k ] ] != 1 )
|
||||
{
|
||||
oldvalue++;
|
||||
}
|
||||
}
|
||||
|
||||
my_setcookie( 'modtids', newvalue, 0 );
|
||||
|
||||
document.modform.selectedtids.value = newvalue;
|
||||
|
||||
newcount = stacksize(clean);
|
||||
|
||||
if( oldvalue > 0 )
|
||||
{
|
||||
document.modform.gobutton.value = ipsclass.html_entity_decode( lang_gobutton ) + ' (' + newcount + ') (' + oldvalue + ' ' + ipsclass.html_entity_decode( lang_otherpage ) +' )';
|
||||
}
|
||||
else
|
||||
{
|
||||
document.modform.gobutton.value = ipsclass.html_entity_decode( lang_gobutton ) + ' (' + newcount + ')';
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function forum_toggle_tid( tid )
|
||||
{
|
||||
var saved = new Array();
|
||||
var clean = new Array();
|
||||
var add = 1;
|
||||
var _img = document.getElementById( 'ipb-topic-' + tid );
|
||||
|
||||
//-----------------------------------
|
||||
// Get form info
|
||||
//-----------------------------------
|
||||
|
||||
tmp = document.modform.selectedtids.value;
|
||||
|
||||
if( tmp != "" )
|
||||
{
|
||||
saved = tmp.split(",");
|
||||
}
|
||||
|
||||
//-----------------------------------
|
||||
// Remove bit if exists
|
||||
//-----------------------------------
|
||||
|
||||
for( i = 0 ; i < saved.length; i++ )
|
||||
{
|
||||
if ( saved[i] != "" )
|
||||
{
|
||||
if ( saved[i] == tid )
|
||||
{
|
||||
add = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
clean[clean.length] = saved[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------
|
||||
// Add?
|
||||
//-----------------------------------
|
||||
|
||||
if ( add )
|
||||
{
|
||||
clean[ clean.length ] = tid;
|
||||
_img.src = selectedbutton;
|
||||
}
|
||||
else
|
||||
{
|
||||
_img.src = unselectedbutton;
|
||||
}
|
||||
|
||||
newvalue = clean.join(',');
|
||||
var topics_this_page = new Array();
|
||||
var oldvalue = 0;
|
||||
var the_topics = document.getElementsByTagName('input');
|
||||
|
||||
for ( var i = 0 ; i <= the_topics.length ; i++ )
|
||||
{
|
||||
var e = the_topics[i];
|
||||
|
||||
if ( e && (e.type == 'hidden') && (! e.disabled) )
|
||||
{
|
||||
var s = e.id;
|
||||
var a = s.replace( /^tid_(.+?)$/, "$1" );
|
||||
|
||||
if ( a )
|
||||
{
|
||||
topics_this_page[ a ] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for( var k = 0; k < clean.length; k++ )
|
||||
{
|
||||
if ( topics_this_page[ clean[ k ] ] != 1 )
|
||||
{
|
||||
oldvalue++;
|
||||
}
|
||||
}
|
||||
|
||||
my_setcookie( 'modtids', newvalue, 0 );
|
||||
|
||||
document.modform.selectedtids.value = newvalue;
|
||||
|
||||
newcount = stacksize(clean);
|
||||
|
||||
if ( oldvalue > 0 )
|
||||
{
|
||||
document.modform.gobutton.value = ipsclass.html_entity_decode( lang_gobutton ) + ' (' + newcount + ') (' + oldvalue + ' ' + ipsclass.html_entity_decode( lang_otherpage ) +' )';
|
||||
}
|
||||
else
|
||||
{
|
||||
document.modform.gobutton.value = ipsclass.html_entity_decode( lang_gobutton ) + ' (' + newcount + ')';
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Do multi page jump
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function multi_page_jump( url_bit, total_posts, per_page )
|
||||
{
|
||||
pages = 1;
|
||||
cur_st = ipb_var_st;
|
||||
cur_page = 1;
|
||||
|
||||
if ( total_posts % per_page == 0 )
|
||||
{
|
||||
pages = total_posts / per_page;
|
||||
}
|
||||
else
|
||||
{
|
||||
pages = Math.ceil( total_posts / per_page );
|
||||
}
|
||||
|
||||
msg = ipb_lang_tpl_q1 + " " + pages;
|
||||
|
||||
if ( cur_st > 0 )
|
||||
{
|
||||
cur_page = cur_st / per_page; cur_page = cur_page -1;
|
||||
}
|
||||
|
||||
show_page = 1;
|
||||
|
||||
if ( cur_page < pages )
|
||||
{
|
||||
show_page = cur_page + 1;
|
||||
}
|
||||
|
||||
if ( cur_page >= pages )
|
||||
{
|
||||
show_page = cur_page - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
show_page = cur_page + 1;
|
||||
}
|
||||
|
||||
userPage = prompt( msg, show_page );
|
||||
|
||||
if ( userPage > 0 )
|
||||
{
|
||||
if ( userPage < 1 ) { userPage = 1; }
|
||||
if ( userPage > pages ) { userPage = pages; }
|
||||
if ( userPage == 1 ) { start = 0; }
|
||||
else { start = (userPage - 1) * per_page; }
|
||||
|
||||
window.location = url_bit + "&st=" + start + "&start=" + start;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function boards_send_marker_update( fid, is_subforum )
|
||||
{
|
||||
//----------------------------------
|
||||
// Get current image...
|
||||
//----------------------------------
|
||||
|
||||
try
|
||||
{
|
||||
var imgsrc = document.getElementById( 'f-'+fid ).innerHTML;
|
||||
|
||||
if ( imgsrc )
|
||||
{
|
||||
//----------------------------------
|
||||
// Find out what img its using...
|
||||
//----------------------------------
|
||||
|
||||
var regex = new RegExp( "src=['\"](.*/)("+regex_markers+")['\"]" );
|
||||
|
||||
var results = imgsrc.match( regex );
|
||||
|
||||
//----------------------------------
|
||||
// Got a replacement?
|
||||
//----------------------------------
|
||||
|
||||
if ( img_markers[ results[2] ] )
|
||||
{
|
||||
imgsrc = imgsrc.replace( regex, "src='$1"+img_markers[ results[2] ]+"'" );
|
||||
|
||||
document.getElementById( 'f-'+fid ).innerHTML = imgsrc;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(e){}
|
||||
|
||||
var text_return = 0;
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// 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;
|
||||
};
|
||||
|
||||
//----------------------------------
|
||||
// Do nothing
|
||||
//----------------------------------
|
||||
|
||||
text_return = xmlobj.xmlhandler.responseText;
|
||||
};
|
||||
|
||||
xmlobj = new ajax_request();
|
||||
xmlobj.onreadystatechange( do_request_function );
|
||||
|
||||
xmlobj.process( ipb_var_base_url + 'act=xmlout&do=mark-forum&fid='+fid+'&sf='+is_subforum );
|
||||
|
||||
if ( text_return == 1 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,463 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// IPS XML HTTP REQUEST:: GET NEW POSTS
|
||||
//------------------------------------------------------------------------------
|
||||
// Supports Safari, Mozilla 1.3+ (Firefox, etc) and IE 5.5+
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
// http://www.invisionpower.com
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// INIT VARS
|
||||
/*--------------------------------------------*/
|
||||
|
||||
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;
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Get NEXT posts link
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function xml_show_new_posts( st )
|
||||
{
|
||||
posts_st = st;
|
||||
xml_myassistant_init( 'posts' );
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Load MyASSISTANT!
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function xml_myassistant_init( tab )
|
||||
{
|
||||
myass_main = document.getElementById( 'get-myassistant' );
|
||||
myass_drag = document.getElementById( 'myass-drag' );
|
||||
myass_content = document.getElementById( 'myass-content' );
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Main function to do on request
|
||||
// Must be defined first!!
|
||||
/*--------------------------------------------*/
|
||||
|
||||
do_request_function = function()
|
||||
{
|
||||
//----------------------------------
|
||||
// Ignore unless we're ready to go
|
||||
//----------------------------------
|
||||
|
||||
if ( ! xmlobj_myass.readystate_ready_and_ok() )
|
||||
{
|
||||
// Could do a little loading graphic here?
|
||||
return;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// INIT
|
||||
//----------------------------------
|
||||
|
||||
var html = xmlobj_myass.xmlhandler.responseText;
|
||||
|
||||
//----------------------------------
|
||||
// Stop IE showing select boxes over
|
||||
// floating div [ 1 ]
|
||||
//----------------------------------
|
||||
|
||||
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;
|
||||
|
||||
//----------------------------------
|
||||
// Stop IE showing select boxes over
|
||||
// floating div [ 1 ]
|
||||
//----------------------------------
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Stop IE showing select boxes over
|
||||
// floating div [ 2 ]
|
||||
//----------------------------------
|
||||
|
||||
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 );
|
||||
|
||||
//----------------------------------
|
||||
// LOAD XML
|
||||
//----------------------------------
|
||||
|
||||
if ( ! tab )
|
||||
{
|
||||
xmlobj_myass.process( ipb_var_base_url + 'act=buddy&xml=1' );
|
||||
}
|
||||
else if ( tab == 'newpms' )
|
||||
{
|
||||
//----------------------------------
|
||||
// Figure out where we are..
|
||||
//----------------------------------
|
||||
|
||||
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;
|
||||
|
||||
//----------------------------------
|
||||
// Not loaded? INIT
|
||||
//----------------------------------
|
||||
|
||||
if ( ! myass_loaded )
|
||||
{
|
||||
//----------------------------------
|
||||
// Figure width and height
|
||||
//----------------------------------
|
||||
|
||||
var my_width = 0;
|
||||
var my_height = 0;
|
||||
|
||||
if ( typeof( window.innerWidth ) == 'number' )
|
||||
{
|
||||
//----------------------------------
|
||||
// Non IE
|
||||
//----------------------------------
|
||||
|
||||
my_width = window.innerWidth;
|
||||
my_height = window.innerHeight;
|
||||
}
|
||||
else if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
|
||||
{
|
||||
//----------------------------------
|
||||
// IE 6+
|
||||
//----------------------------------
|
||||
|
||||
my_width = document.documentElement.clientWidth;
|
||||
my_height = document.documentElement.clientHeight;
|
||||
}
|
||||
else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
|
||||
{
|
||||
//----------------------------------
|
||||
// Old IE
|
||||
//----------------------------------
|
||||
|
||||
my_width = document.body.clientWidth;
|
||||
my_height = document.body.clientHeight;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Get div height && width
|
||||
//----------------------------------
|
||||
|
||||
var divheight = parseInt( myass_main.style.Height );
|
||||
var divwidth = parseInt( myass_main.style.Width );
|
||||
|
||||
divheight = divheight ? divheight : 400;
|
||||
divwidth = divwidth ? divwidth : 400;
|
||||
|
||||
//----------------------------------
|
||||
// Got it stored in a cookie?
|
||||
//----------------------------------
|
||||
|
||||
var divxy = my_getcookie( 'ipb-myass-div' );
|
||||
var co_ords;
|
||||
|
||||
if ( divxy && divxy != null )
|
||||
{
|
||||
co_ords = divxy.split( ',' );
|
||||
|
||||
//----------------------------------
|
||||
// Got co-ords?
|
||||
//----------------------------------
|
||||
|
||||
if ( co_ords.length )
|
||||
{
|
||||
var final_width = co_ords[0];
|
||||
var final_height = co_ords[1];
|
||||
|
||||
if ( co_ords[0] > my_width )
|
||||
{
|
||||
//----------------------------------
|
||||
// Keep it on screen
|
||||
//----------------------------------
|
||||
|
||||
final_width = my_width - divwidth;
|
||||
}
|
||||
|
||||
if ( co_ords[1] > my_height )
|
||||
{
|
||||
//----------------------------------
|
||||
// Keep it on screen
|
||||
//----------------------------------
|
||||
|
||||
final_height = my_height - divheight;
|
||||
}
|
||||
|
||||
myass_main.style.left = final_width + 'px';
|
||||
myass_main.style.top = final_height + 'px';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//----------------------------------
|
||||
// Reposition DIV roughly centered
|
||||
//----------------------------------
|
||||
|
||||
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;
|
||||
}
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Alter DST Retrieve XML document
|
||||
/*--------------------------------------------*/
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Already cached?
|
||||
//----------------------------------
|
||||
|
||||
if ( search_cache[ keywords ] )
|
||||
{
|
||||
msg_field.innerHTML = search_cache[ keywords ];
|
||||
return;
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// 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() )
|
||||
{
|
||||
xmlobj.show_loading();
|
||||
return;
|
||||
}
|
||||
|
||||
xmlobj.hide_loading();
|
||||
|
||||
//----------------------------------
|
||||
// INIT
|
||||
//----------------------------------
|
||||
|
||||
var html = xmlobj.xmlhandler.responseText;
|
||||
|
||||
msg_field.innerHTML = html;
|
||||
search_cache[ keywords ] = html;
|
||||
};
|
||||
|
||||
//----------------------------------
|
||||
// LOAD XML
|
||||
//----------------------------------
|
||||
|
||||
xmlobj = new ajax_request();
|
||||
xmlobj.onreadystatechange( do_request_function );
|
||||
|
||||
xmlobj.process( url );
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Alter DST Retrieve XML document
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function xml_dst_set( url )
|
||||
{
|
||||
/*--------------------------------------------*/
|
||||
// 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 == 'error' )
|
||||
{
|
||||
window.location = url.replace( '&xml=1', '&xml=0');
|
||||
}
|
||||
};
|
||||
|
||||
//----------------------------------
|
||||
// LOAD XML
|
||||
//----------------------------------
|
||||
|
||||
xmlobj = new ajax_request();
|
||||
xmlobj.onreadystatechange( do_request_function );
|
||||
|
||||
xmlobj.process( url );
|
||||
};
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT Post GD Image
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function init_gd_image()
|
||||
{
|
||||
var reg_img = document.getElementById('gd-antispam');
|
||||
|
||||
try
|
||||
{
|
||||
reg_img.style.cursor = 'pointer';
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
reg_img.style.cursor = 'hand';
|
||||
};
|
||||
|
||||
reg_img._ready = 1;
|
||||
|
||||
reg_img.onclick = do_change_img;
|
||||
};
|
||||
|
||||
function do_change_img()
|
||||
{
|
||||
var rc = '';
|
||||
var act = 'Reg';
|
||||
var code = 'image';
|
||||
var reg_img = document.getElementById('gd-antispam');
|
||||
|
||||
if ( ! reg_img._ready )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var url = ipb_var_base_url+'act=xmlout&do=change-gd-img&img='+rc;
|
||||
|
||||
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;
|
||||
|
||||
reg_img.src = ipb_var_base_url+'act=captcha&showImage®id='+html;
|
||||
|
||||
var reg_field = document.getElementById('regid');
|
||||
reg_field.value = html;
|
||||
|
||||
reg_img._ready = 1;
|
||||
};
|
||||
|
||||
//----------------------------------
|
||||
// LOAD XML
|
||||
//----------------------------------
|
||||
|
||||
reg_img._ready = 0;
|
||||
|
||||
xmlobj = new ajax_request();
|
||||
xmlobj.onreadystatechange( do_request_function );
|
||||
xmlobj.process( url );
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
//------------------------------------------
|
||||
// Invision Power Board v2.1
|
||||
// PM JS File
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
//
|
||||
// http://www.invisionboard.com
|
||||
//------------------------------------------
|
||||
|
||||
//==========================================
|
||||
// Check All boxes
|
||||
//==========================================
|
||||
|
||||
function CheckAll(fmobj)
|
||||
{
|
||||
for (var i=0;i<fmobj.elements.length;i++)
|
||||
{
|
||||
var e = fmobj.elements[i];
|
||||
if ((e.name != 'allbox') && (e.type=='checkbox') && (!e.disabled))
|
||||
{
|
||||
e.checked = fmobj.allbox.checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================
|
||||
// Check all or uncheck all?
|
||||
//==========================================
|
||||
|
||||
function CheckCheckAll(fmobj)
|
||||
{
|
||||
var TotalBoxes = 0;
|
||||
var TotalOn = 0;
|
||||
for (var i=0;i<fmobj.elements.length;i++)
|
||||
{
|
||||
var e = fmobj.elements[i];
|
||||
if ((e.name != 'allbox') && (e.type=='checkbox'))
|
||||
{
|
||||
TotalBoxes++;
|
||||
if (e.checked)
|
||||
{
|
||||
TotalOn++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (TotalBoxes==TotalOn)
|
||||
{
|
||||
fmobj.allbox.checked=true;
|
||||
}
|
||||
else
|
||||
{
|
||||
fmobj.allbox.checked=false;
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================
|
||||
// INBOX FUNCTIONS
|
||||
//==========================================
|
||||
|
||||
var ie = document.all ? 1 : 0;
|
||||
//var ns4 = document.layers ? 1 : 0;
|
||||
|
||||
//==========================================
|
||||
// highlite
|
||||
//==========================================
|
||||
|
||||
function hl(cb)
|
||||
{
|
||||
if (ie)
|
||||
{
|
||||
while (cb.tagName != "TR")
|
||||
{
|
||||
cb = cb.parentElement;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (cb.tagName != "TD")
|
||||
{
|
||||
cb = cb.parentNode;
|
||||
}
|
||||
}
|
||||
|
||||
cb.className = 'row1';
|
||||
|
||||
}
|
||||
|
||||
//==========================================
|
||||
// down-lite
|
||||
//==========================================
|
||||
|
||||
function dl(cb)
|
||||
{
|
||||
if (ie)
|
||||
{
|
||||
while (cb.tagName != "TR")
|
||||
{
|
||||
cb = cb.parentElement;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (cb.tagName != "TD")
|
||||
{
|
||||
cb = cb.parentNode;
|
||||
}
|
||||
}
|
||||
|
||||
cb.className = 'row2';
|
||||
}
|
||||
|
||||
//==========================================
|
||||
// Boxes checked?
|
||||
//==========================================
|
||||
|
||||
function cca(cb)
|
||||
{
|
||||
if (cb.checked)
|
||||
{
|
||||
hl(cb);
|
||||
}
|
||||
else
|
||||
{
|
||||
dl(cb);
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================
|
||||
// Inbox check all
|
||||
//==========================================
|
||||
|
||||
function InboxCheckAll(cb)
|
||||
{
|
||||
var fmobj = document.mutliact;
|
||||
for (var i=0;i<fmobj.elements.length;i++)
|
||||
{
|
||||
var e = fmobj.elements[i];
|
||||
if ((e.name != 'allbox') && (e.type=='checkbox') && (!e.disabled))
|
||||
{
|
||||
e.checked = fmobj.allbox.checked;
|
||||
if (fmobj.allbox.checked)
|
||||
{
|
||||
hl(e);
|
||||
}
|
||||
else
|
||||
{
|
||||
dl(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function select_read()
|
||||
{
|
||||
var fmobj = document.mutliact;
|
||||
for (var i=0;i<fmobj.elements.length;i++)
|
||||
{
|
||||
var e = fmobj.elements[i];
|
||||
if ((e.type=='hidden') && (e.value == 1) && (! isNaN(e.name) ))
|
||||
{
|
||||
eval("fmobj.msgid_" + e.name + ".checked=true;");
|
||||
hl(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function unselect_all()
|
||||
{
|
||||
var fmobj = document.mutliact;
|
||||
for (var i=0;i<fmobj.elements.length;i++)
|
||||
{
|
||||
var e = fmobj.elements[i];
|
||||
if ((e.name != 'allbox') && (e.type=='checkbox') && (!e.disabled))
|
||||
{
|
||||
e.checked=false;
|
||||
dl(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,440 @@
|
||||
//------------------------------------------
|
||||
// Invision Power Board v2.1
|
||||
// POLL JS File
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
//
|
||||
// http://www.invisionboard.com
|
||||
// ASSUMES 'ipb_global.php' as been loaded
|
||||
//------------------------------------------
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// INIT
|
||||
/*--------------------------------------------*/
|
||||
|
||||
//-------------------------------
|
||||
// DIV & FORM id names
|
||||
//-------------------------------
|
||||
|
||||
var open_div = 'poll-box-open';
|
||||
var closed_div = 'poll-box-closed';
|
||||
var stat_div = 'poll-box-stat';
|
||||
var main_div = 'poll-box-main';
|
||||
var form_id = 'postingform';
|
||||
|
||||
//-------------------------------
|
||||
// DIV AND FORM objects
|
||||
//-------------------------------
|
||||
|
||||
var openobj;
|
||||
var closedobj;
|
||||
var formobj;
|
||||
var statobj;
|
||||
var mainobj;
|
||||
|
||||
//-------------------------------
|
||||
// Counters
|
||||
//-------------------------------
|
||||
|
||||
var used_questions = 0;
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// INIT STATE
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function poll_init_state()
|
||||
{
|
||||
//-------------------------------
|
||||
// Get objects
|
||||
//-------------------------------
|
||||
|
||||
openobj = document.getElementById( open_div );
|
||||
closedobj = document.getElementById( closed_div );
|
||||
formobj = document.getElementById( form_id );
|
||||
statobj = document.getElementById( stat_div );
|
||||
mainobj = document.getElementById( main_div );
|
||||
|
||||
//-------------------------------
|
||||
// Open and close divs
|
||||
//-------------------------------
|
||||
|
||||
if ( showfullonload )
|
||||
{
|
||||
my_show_div( openobj );
|
||||
my_hide_div( closedobj );
|
||||
}
|
||||
else
|
||||
{
|
||||
my_show_div( closedobj );
|
||||
my_hide_div( openobj );
|
||||
}
|
||||
|
||||
poll_draw_main_box();
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// DRAW MAIN BOX
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function poll_draw_main_box()
|
||||
{
|
||||
var html = '';
|
||||
used_questions = 0;
|
||||
|
||||
//-------------------------------
|
||||
// Draw all current questions
|
||||
//-------------------------------
|
||||
|
||||
for( var i in poll_questions )
|
||||
{
|
||||
var qhtml = '';
|
||||
used_questions++;
|
||||
|
||||
//-------------------------------
|
||||
// Show question box
|
||||
//-------------------------------
|
||||
|
||||
var question = poll_questions[i];
|
||||
|
||||
var this_poll_multi = '';
|
||||
|
||||
for ( var x in poll_multi )
|
||||
{
|
||||
if( x == i )
|
||||
{
|
||||
if( poll_multi[x] == 1 )
|
||||
{
|
||||
this_poll_multi = "checked='checked'";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var inputhtml = lang_build_string( html_question_box, i, _poll_make_form_safe( question ), this_poll_multi );
|
||||
|
||||
qhtml += "\n" + inputhtml + "\n";
|
||||
|
||||
//-------------------------------
|
||||
// Now, to add the poll choices..
|
||||
//-------------------------------
|
||||
|
||||
var choices = '';
|
||||
var choices_count = 0;
|
||||
|
||||
for ( var c in poll_choices )
|
||||
{
|
||||
var votes_box;
|
||||
|
||||
//-------------------------------
|
||||
// Is this a choice for this q?
|
||||
//-------------------------------
|
||||
|
||||
var id = c.replace( new RegExp( "^" + i + "_(\\d+)$" ), "$1" );
|
||||
|
||||
if ( ! isNaN( id ) )
|
||||
{
|
||||
if ( is_mod )
|
||||
{
|
||||
votes_box = lang_build_string( html_votes_box, i, id, poll_votes[c]);
|
||||
}
|
||||
else
|
||||
{
|
||||
votes_box = '';
|
||||
}
|
||||
|
||||
choices_count++;
|
||||
|
||||
choices += "\n" + lang_build_string( html_choice_box, i, id, _poll_make_form_safe( poll_choices[c] ), votes_box );
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Not used max questions?
|
||||
//-------------------------------
|
||||
|
||||
if ( choices_count < max_poll_choices )
|
||||
{
|
||||
choices += lang_build_string( html_add_choice, i );
|
||||
}
|
||||
|
||||
if ( choices != '' )
|
||||
{
|
||||
qhtml += "\n" + lang_build_string( html_choice_wrap, choices ) + "\n";
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Add wrapped question w/choice
|
||||
//-------------------------------
|
||||
|
||||
html += lang_build_string(html_question_wrap, qhtml );
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Add a question link?
|
||||
//-------------------------------
|
||||
|
||||
if ( used_questions < max_poll_questions )
|
||||
{
|
||||
html += lang_build_string( html_question_wrap, html_add_question );
|
||||
}
|
||||
|
||||
mainobj.innerHTML = html;
|
||||
|
||||
poll_update_state();
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// WRITE FORM TO ARRAY
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function poll_write_form_to_array()
|
||||
{
|
||||
//-------------------------------
|
||||
// Update question array with form
|
||||
//-------------------------------
|
||||
|
||||
var tmp_poll_questions = {};
|
||||
var tmp_poll_choices = {};
|
||||
var tmp_poll_multi = {};
|
||||
|
||||
for ( var i in poll_questions )
|
||||
{
|
||||
//-------------------------------
|
||||
// Get form value...
|
||||
//-------------------------------
|
||||
|
||||
try
|
||||
{
|
||||
tmp_poll_questions[ i ] = document.getElementById( 'question_' + i ).value;
|
||||
}
|
||||
catch(e) { }
|
||||
}
|
||||
|
||||
for ( var x in poll_multi )
|
||||
{
|
||||
//-------------------------------
|
||||
// Get form value...
|
||||
//-------------------------------
|
||||
|
||||
try
|
||||
{
|
||||
tmp_poll_multi[ x ] = document.getElementById( 'multi_' + x ).checked ? 1 : 0;
|
||||
}
|
||||
catch(e) { }
|
||||
}
|
||||
|
||||
for ( var c in poll_choices )
|
||||
{
|
||||
//-------------------------------
|
||||
// Get form value...
|
||||
//-------------------------------
|
||||
|
||||
try
|
||||
{
|
||||
tmp_poll_choices[ c ] = document.getElementById( 'choice_' + c ).value;
|
||||
}
|
||||
catch(e) { }
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Update
|
||||
//-------------------------------
|
||||
|
||||
poll_questions = tmp_poll_questions;
|
||||
poll_choices = tmp_poll_choices;
|
||||
poll_multi = tmp_poll_multi;
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// ADD POLL QUESTION
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function poll_add_question()
|
||||
{
|
||||
var maxid = 0;
|
||||
|
||||
//-------------------------------
|
||||
// Get max choice ID
|
||||
//-------------------------------
|
||||
|
||||
for ( var i in poll_questions )
|
||||
{
|
||||
if ( i > maxid )
|
||||
{
|
||||
maxid = parseInt(i);
|
||||
}
|
||||
}
|
||||
|
||||
maxid = maxid + 1;
|
||||
|
||||
poll_write_form_to_array();
|
||||
|
||||
poll_questions[ maxid ] = '';
|
||||
poll_multi[ maxid ] = '';
|
||||
|
||||
poll_draw_main_box();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// ADD POLL CHOICE
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function poll_add_choice( qid )
|
||||
{
|
||||
var maxid = 0;
|
||||
|
||||
//-------------------------------
|
||||
// Get max choice ID
|
||||
//-------------------------------
|
||||
|
||||
for ( var c in poll_choices )
|
||||
{
|
||||
//-------------------------------
|
||||
// Is this a choice for this q?
|
||||
//-------------------------------
|
||||
|
||||
var id = c.replace( new RegExp( "^" + qid + "_(\\d+)$" ), "$1" );
|
||||
|
||||
if ( ! isNaN( id ) )
|
||||
{
|
||||
if ( id > maxid )
|
||||
{
|
||||
maxid = parseInt(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
maxid = maxid + 1;
|
||||
|
||||
poll_write_form_to_array();
|
||||
|
||||
poll_choices[ qid +'_'+maxid ] = '';
|
||||
|
||||
if ( is_mod )
|
||||
{
|
||||
poll_votes[ qid +'_'+maxid ] = 0;
|
||||
}
|
||||
|
||||
poll_draw_main_box();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// REMOVE POLL CHOICE
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function poll_remove_choice( mainid )
|
||||
{
|
||||
if ( confirm( js_lang_confirm ) )
|
||||
{
|
||||
delete( poll_choices[ mainid ] );
|
||||
|
||||
if ( is_mod )
|
||||
{
|
||||
delete( poll_votes[ mainid ] );
|
||||
}
|
||||
|
||||
poll_write_form_to_array();
|
||||
poll_draw_main_box();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// REMOVE POLL QUESTION
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function poll_remove_question( mainid )
|
||||
{
|
||||
if ( confirm( js_lang_confirm ) )
|
||||
{
|
||||
//-------------------------------
|
||||
// Delete question
|
||||
//-------------------------------
|
||||
|
||||
delete( poll_questions[ mainid ] );
|
||||
|
||||
//-------------------------------
|
||||
// Delete choices
|
||||
//-------------------------------
|
||||
|
||||
for ( var c in poll_choices )
|
||||
{
|
||||
//-------------------------------
|
||||
// Is this a choice for this q?
|
||||
//-------------------------------
|
||||
|
||||
var id = c.replace( new RegExp( "^" + mainid + "_(\\d+)$" ), "$1" );
|
||||
|
||||
if ( ! isNaN( id ) )
|
||||
{
|
||||
delete( poll_choices[ c ] );
|
||||
|
||||
if ( is_mod )
|
||||
{
|
||||
delete( poll_votes[ c ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
poll_write_form_to_array();
|
||||
poll_draw_main_box();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// UPDATE POLL STATE
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function poll_update_state()
|
||||
{
|
||||
used = max_poll_questions - used_questions;
|
||||
|
||||
var tmp_lang = lang_build_string( poll_stat_lang, used, max_poll_choices );
|
||||
statobj.innerHTML = lang_build_string( html_stat_wrap, tmp_lang );
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// SHOW POLL FORM
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function show_poll_form()
|
||||
{
|
||||
my_show_div( openobj );
|
||||
my_hide_div( closedobj );
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// CLOSE POLL FORM
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function close_poll_form()
|
||||
{
|
||||
my_show_div( closedobj );
|
||||
my_hide_div( openobj );
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// FORM MAKE SAFE
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function _poll_make_form_safe( t )
|
||||
{
|
||||
t = t.replace( /'/g, ''' );
|
||||
t = t.replace( /"/g, '"' );
|
||||
|
||||
return t;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
//------------------------------------------
|
||||
// Invision Power Board v2.1
|
||||
// Profile JS File
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
//
|
||||
// http://www.invisionboard.com
|
||||
//------------------------------------------
|
||||
|
||||
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Profile: Open pop-up window
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function profile_dname_history( mid )
|
||||
{
|
||||
//----------------------------------
|
||||
// Attempt to close the menu
|
||||
//----------------------------------
|
||||
|
||||
try
|
||||
{
|
||||
menu_action_close();
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Launch Pop Up
|
||||
//----------------------------------
|
||||
|
||||
PopUp( ipb_var_base_url + 'act=profile&CODE=show-display-names&id=' + mid, 'DNAMETITLE', 400, 300 );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -0,0 +1,959 @@
|
||||
//------------------------------------------
|
||||
// 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;
|
||||
|
||||
if ( ! reg_email_ok )
|
||||
{
|
||||
//------------------------------------------
|
||||
// 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 )
|
||||
{
|
||||
if( !event )
|
||||
{
|
||||
event = window.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='+encodeURIComponent( 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 )
|
||||
{
|
||||
if( !event )
|
||||
{
|
||||
event = window.event;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// INIT
|
||||
//----------------------------------
|
||||
|
||||
var error_found = '';
|
||||
|
||||
//----------------------------------
|
||||
// Check
|
||||
//----------------------------------
|
||||
|
||||
if ( ! reg_field_ids['emailaddress'].value.match( /[@\.]/ ) )
|
||||
{
|
||||
error_found += reg_error_email_missing + "<br />";
|
||||
}
|
||||
|
||||
if ( ! error_found && ( ! reg_field_ids['emailaddress'].value || ! reg_field_ids['emailaddress-two'].value ) )
|
||||
{
|
||||
error_found += reg_error_email_missing + "<br />";
|
||||
}
|
||||
|
||||
if ( reg_field_ids['emailaddress'].value.toLowerCase() != reg_field_ids['emailaddress-two'].value.toLowerCase() )
|
||||
{
|
||||
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 && event.type != 'submit' )
|
||||
{
|
||||
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 )
|
||||
{
|
||||
if( !event )
|
||||
{
|
||||
event = window.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 )
|
||||
{
|
||||
if( !event )
|
||||
{
|
||||
event = window.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 && event.type != 'submit' )
|
||||
{
|
||||
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 )
|
||||
{
|
||||
if( !event )
|
||||
{
|
||||
event = window.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 && event.type != 'submit' )
|
||||
{
|
||||
// + 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 )
|
||||
{
|
||||
if( !event )
|
||||
{
|
||||
event = window.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 )
|
||||
{
|
||||
if( !event )
|
||||
{
|
||||
event = window.event;
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// Simply run the functions
|
||||
//------------------------------------------
|
||||
|
||||
reg_oktogo = 1;
|
||||
|
||||
check_email_addresses( event );
|
||||
|
||||
check_passwords( event );
|
||||
|
||||
if( register_method == 'username' )
|
||||
{
|
||||
check_user_name( event );
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// Got error messages
|
||||
//------------------------------------------
|
||||
|
||||
if( register_method == 'username' )
|
||||
{
|
||||
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 );
|
||||
my_setcookie( 'coppabday', bday_m + '-' + bday_d + '-' + bday_y, 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 );
|
||||
|
||||
var bdays = my_getcookie( 'coppabday' );
|
||||
var dates = bdays.split( '-' );
|
||||
|
||||
locationjump( 'act=reg&CODE=coppa_two&m=' + dates[0] + '&d=' + dates[1] + '&y=' + dates[2] );
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// 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');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,238 @@
|
||||
//------------------------------------------
|
||||
// Invision Power Board v2.1
|
||||
// User CP JS File
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
//
|
||||
// http://www.invisionboard.com
|
||||
//------------------------------------------
|
||||
|
||||
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');
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT Display name change stuff
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
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';
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// EVENT: Check display name
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function ucp_dname_check( event )
|
||||
{
|
||||
//----------------------------------
|
||||
// INIT
|
||||
//----------------------------------
|
||||
|
||||
//----------------------------------
|
||||
// Make sure we have sommat
|
||||
//----------------------------------
|
||||
|
||||
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 />";
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Check for illegal chars
|
||||
//----------------------------------
|
||||
|
||||
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 />";
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Ajax: check for existing member name
|
||||
//----------------------------------
|
||||
|
||||
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 );
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// 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 += dname_error_taken + "<br />";
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Show errors
|
||||
//----------------------------------
|
||||
|
||||
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 = '';
|
||||
};
|
||||
|
||||
//----------------------------------
|
||||
// LOAD XML
|
||||
//----------------------------------
|
||||
|
||||
xmlobj = new ajax_request();
|
||||
xmlobj.onreadystatechange( do_request_function );
|
||||
xmlobj.process( url );
|
||||
}
|
||||
else
|
||||
{
|
||||
//----------------------------------
|
||||
// Show errors
|
||||
//----------------------------------
|
||||
|
||||
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 = '';
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// EVENT: Check display name
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function ucp_dname_form_check( event )
|
||||
{
|
||||
//----------------------------------
|
||||
// DO pass fields
|
||||
//----------------------------------
|
||||
|
||||
if ( ! ucp_dname_pass.value )
|
||||
{
|
||||
error_found += dname_error_no_pass + "<br />";
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Check name
|
||||
//----------------------------------
|
||||
|
||||
ucp_dname_check( event );
|
||||
|
||||
if ( error_found )
|
||||
{
|
||||
ucp_dname_ok_to_go = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ucp_dname_ok_to_go = 1;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Return
|
||||
//----------------------------------
|
||||
|
||||
if ( ucp_dname_ok_to_go )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,720 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// IPS XML HTTP REQUEST:: GET NEW POSTS
|
||||
//------------------------------------------------------------------------------
|
||||
// Supports Safari, Mozilla 1.3+ (Firefox, etc) and IE 5.5+
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
// http://www.invisionpower.com
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// INIT VARS
|
||||
/*--------------------------------------------*/
|
||||
|
||||
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;
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// SHOW POSSIBLE MEMBER NAME MATCHES
|
||||
/*--------------------------------------------*/
|
||||
|
||||
main_loop = function()
|
||||
{
|
||||
if ( ( _old_input_val != _cur_input_val ) && ( _cur_input_val.length >= 3 ) && ( _in_focus == 1 ) )
|
||||
{
|
||||
if ( ! delay_action && _allow_update )
|
||||
{
|
||||
//----------------------------------
|
||||
// Try cache
|
||||
//----------------------------------
|
||||
|
||||
var cached = _result_cache[ _cur_input_val ];
|
||||
|
||||
if ( cached )
|
||||
{
|
||||
returnSearch( _cur_input_val, cached[0], cached[1] );
|
||||
}
|
||||
else
|
||||
{
|
||||
/*--------------------------------------------*/
|
||||
// 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 returned = xmlobj.xmlhandler.responseText;
|
||||
|
||||
//----------------------------------
|
||||
// Did we get something?
|
||||
//----------------------------------
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Initalize...
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function init_js( formobjname, fieldobjname, urllookup )
|
||||
{
|
||||
//----------------------------------
|
||||
// Set up
|
||||
//----------------------------------
|
||||
|
||||
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;
|
||||
|
||||
//----------------------------------
|
||||
// Already got a 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();
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// 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 )
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Key down handler
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function keydownhandler( event )
|
||||
{
|
||||
if( ! event && window.event )
|
||||
{
|
||||
event = window.event;
|
||||
}
|
||||
if ( event )
|
||||
{
|
||||
_last_key_code = event.keyCode;
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// On blur handler
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function onblurhandler( event )
|
||||
{
|
||||
if ( ! event && window.event )
|
||||
{
|
||||
event = window.event;
|
||||
}
|
||||
|
||||
if ( ! _cur_updown_pressed )
|
||||
{
|
||||
_in_focus = 0;
|
||||
|
||||
my_xr_hide_div( divobj );
|
||||
_hiliteindex = -1;
|
||||
|
||||
// Tab?
|
||||
|
||||
if ( _last_key_code == 9 )
|
||||
{
|
||||
_last_key_code = -1;
|
||||
}
|
||||
}
|
||||
|
||||
_cur_updown_pressed = false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// On key up handler
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function key_handler_function()
|
||||
{
|
||||
//----------------------------------
|
||||
// trap up/down cursor
|
||||
//----------------------------------
|
||||
|
||||
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 );
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Handle cursor press
|
||||
/*--------------------------------------------*/
|
||||
|
||||
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 )
|
||||
{
|
||||
//----------------------------------
|
||||
// Are we looking through the divs?
|
||||
//----------------------------------
|
||||
|
||||
if ( _hiliteindex != -1 )
|
||||
{
|
||||
my_xr_hide_div( divobj );
|
||||
_hiliteindex = -1;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Highlight new value (cursor keys pressed)
|
||||
/*--------------------------------------------*/
|
||||
|
||||
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' );
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Blur then focus
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function blur_then_focus()
|
||||
{
|
||||
_cur_updown_pressed = true;
|
||||
|
||||
inobj.blur();
|
||||
|
||||
_timemout_blur = setTimeout( "set_input_field_focus();", 10 );
|
||||
return;
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Set input field focus
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function set_input_field_focus()
|
||||
{
|
||||
inobj.focus();
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Styles element
|
||||
/*--------------------------------------------*/
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Get value of named span
|
||||
/*--------------------------------------------*/
|
||||
|
||||
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 "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Displays the actual list
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function display_suggested_list( na, ia )
|
||||
{
|
||||
//----------------------------------
|
||||
// Clear div
|
||||
//----------------------------------
|
||||
|
||||
while( divobj.childNodes.length > 0 )
|
||||
{
|
||||
divobj.removeChild( divobj.childNodes[0] );
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Write Div
|
||||
//----------------------------------
|
||||
|
||||
_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.innerHTML = na[f];
|
||||
|
||||
var span_id = document.createElement("SPAN");
|
||||
|
||||
set_style_for_element( span_name, 'namespan' );
|
||||
set_style_for_element( span_id, 'idspan' );
|
||||
|
||||
od.displaySpan = span_id;
|
||||
|
||||
span_id.innerHTML = ia[f];
|
||||
|
||||
span_wrap.appendChild( span_name );
|
||||
span_wrap.appendChild( span_id );
|
||||
od.appendChild( span_wrap );
|
||||
divobj.appendChild( od );
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Calc pos.
|
||||
//----------------------------------
|
||||
|
||||
var mid = inobj;
|
||||
var left_px = _get_obj_leftpos(mid);
|
||||
var top_px = _get_obj_toppos(mid) + mid.offsetHeight;
|
||||
var width = parseInt( divobj.style.width );
|
||||
var height = parseInt( divobj.style.height );
|
||||
|
||||
//----------------------------------
|
||||
// Show menu DIV
|
||||
//----------------------------------
|
||||
|
||||
divobj.style.position = "absolute";
|
||||
|
||||
//----------------------------------
|
||||
// Try and keep it on screen
|
||||
//----------------------------------
|
||||
|
||||
if ( (left_px + width) >= document.body.clientWidth )
|
||||
{
|
||||
left_px = left_px + mid.offsetWidth - width;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Try and keep it on screen
|
||||
//----------------------------------
|
||||
|
||||
if ( (top_px + height) >= document.body.clientHeight )
|
||||
{
|
||||
top_px = top_px - height;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Finalize menu position
|
||||
//----------------------------------
|
||||
|
||||
divobj.style.left = left_px + "px";
|
||||
divobj.style.top = top_px + "px";
|
||||
divobj.style.display = "block";
|
||||
|
||||
_hiliteindex= -1;
|
||||
|
||||
//----------------------------------
|
||||
// Workaround for IE bug which shows
|
||||
// select boxes and other windows GUI
|
||||
// over divs. SHOW IFRAME
|
||||
//----------------------------------
|
||||
|
||||
if ( is_ie )
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( ! document.getElementById( 'if_xhr_' + mem_div ) )
|
||||
{
|
||||
iframeobj = document.createElement('iframe');
|
||||
|
||||
iframeobj.src = 'javascript:;';
|
||||
iframeobj.id = 'if_xhr_' + mem_div;
|
||||
|
||||
document.getElementsByTagName('body')[0].appendChild( iframeobj );
|
||||
}
|
||||
else
|
||||
{
|
||||
iframeobj = document.getElementById( 'if_xhr_' + mem_div );
|
||||
}
|
||||
|
||||
iframeobj.scrolling = 'no';
|
||||
iframeobj.frameborder = 'no';
|
||||
iframeobj.className = 'iframeshim';
|
||||
iframeobj.style.position = 'absolute';
|
||||
|
||||
iframeobj.style.width = parseInt(divobj.offsetWidth) + 'px';
|
||||
iframeobj.style.height = parseInt(divobj.offsetHeight) + 'px';
|
||||
iframeobj.style.top = divobj.style.top;
|
||||
iframeobj.style.left = divobj.style.left;
|
||||
iframeobj.style.zIndex = divobj.style.zIndex - 1;
|
||||
iframeobj.style.display = "block";
|
||||
|
||||
}
|
||||
catch(error)
|
||||
{
|
||||
//alert(error); // Oh dear, someones stolen the iframe
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Caches the results
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function cache_name_results( mstring, na, ia )
|
||||
{
|
||||
_result_cache[mstring] = new Array( na, ia );
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// This is the function the response XML text gives
|
||||
/*--------------------------------------------*/
|
||||
|
||||
returnSearch = function( mstring, namearray, idarray )
|
||||
{
|
||||
//----------------------------------
|
||||
// Cache..
|
||||
//----------------------------------
|
||||
|
||||
cache_name_results( mstring, namearray, idarray );
|
||||
|
||||
if ( _in_focus != 1 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Display
|
||||
//----------------------------------
|
||||
|
||||
display_suggested_list( namearray, idarray );
|
||||
|
||||
//----------------------------------
|
||||
// Resize or hide?
|
||||
//----------------------------------
|
||||
|
||||
if ( _div_rows > 0 )
|
||||
{
|
||||
divobj.style.height = 16 * _div_rows + 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
my_xr_hide_div( divobj );
|
||||
_hiliteindex = -1;
|
||||
}
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Submit handler
|
||||
/*--------------------------------------------*/
|
||||
|
||||
submit_handler = function ( event )
|
||||
{
|
||||
delay_action = true;
|
||||
var retval = true;
|
||||
|
||||
if ( _hiliteindex != -1 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( _form_onsubmit_saved )
|
||||
{
|
||||
eval( 'tmpsubmit = ' + _form_onsubmit_saved );
|
||||
retval = tmpsubmit();
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// On key up handler
|
||||
/*--------------------------------------------*/
|
||||
|
||||
onkeyuphandler = function( event )
|
||||
{
|
||||
_event_key_code = event.keyCode;
|
||||
key_handler_function();
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Div mouse events
|
||||
/*--------------------------------------------*/
|
||||
|
||||
sb_mdown = function()
|
||||
{
|
||||
delay_action = true;
|
||||
inobj.value = find_span_value_for_class( this, 'namespan' );
|
||||
};
|
||||
|
||||
sb_mover = function()
|
||||
{
|
||||
set_style_for_element( this, 'spanhilite' );
|
||||
};
|
||||
|
||||
sb_mout = function()
|
||||
{
|
||||
set_style_for_element( this, 'wrapdiv' );
|
||||
};
|
||||
|
||||
function my_xr_hide_div ( dobj )
|
||||
{
|
||||
dobj.style.display = "none";
|
||||
|
||||
if ( is_ie )
|
||||
{
|
||||
try
|
||||
{
|
||||
document.getElementById( 'if_xhr_' + mem_div ).style.display = "none";
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
//alert(e);// Oh dear, someones stolen the iframe
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,666 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// IPS JS: Attach Functions
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
// http://www.invisionpower.com
|
||||
// Matt Mecham (16/12/05)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
var ipsattach = new ips_attach();
|
||||
|
||||
function ips_attach()
|
||||
{
|
||||
/**
|
||||
* iFrame id
|
||||
*/
|
||||
this.iframe_id = 'ips--iframe-obj-attach';
|
||||
/**
|
||||
* iFrame Object
|
||||
*/
|
||||
this.iframe_obj = null;
|
||||
/**
|
||||
* Init URL
|
||||
* URL to load to display current attachments, etc
|
||||
*/
|
||||
this.iframe_init_url = '';
|
||||
/**
|
||||
* URL for removing attachment
|
||||
*/
|
||||
this.iframe_remove_url = '';
|
||||
/**
|
||||
* The name of the DIV that this iframe is attached to
|
||||
*/
|
||||
this.iframe_add_to_div = 'ips-attach-div-iframe';
|
||||
this.iframe_add_to_div_obj = null;
|
||||
/**
|
||||
* The name of the DIV that this iframe is attached to
|
||||
*/
|
||||
this.iframe_parent_div = 'ips-attach-div-parent';
|
||||
this.iframe_parent_div_obj = null;
|
||||
/**
|
||||
* The name of the DIV that the status bar is in
|
||||
*/
|
||||
this.status_div = 'ips-attach-div-status';
|
||||
this.status_div_obj = null;
|
||||
/**
|
||||
* The name of the DIV that the dropdown menu text is in
|
||||
*/
|
||||
this.dropdown_text = 'ips-attach-menu-text';
|
||||
this.dropdown_text_obj = null;
|
||||
/**
|
||||
* Default iframe height
|
||||
*/
|
||||
this.iframe_height = 300;
|
||||
/**
|
||||
* css class names
|
||||
*/
|
||||
this.iframe_classname = 'attach-iframe';
|
||||
/**
|
||||
* Message cover
|
||||
*/
|
||||
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;
|
||||
/**
|
||||
* Default Status message
|
||||
*/
|
||||
this.status_msg = '';
|
||||
this.status_is_error = '';
|
||||
/**
|
||||
* Current items array
|
||||
*/
|
||||
this.current_items = new Array();
|
||||
/**
|
||||
* Current items' menu
|
||||
*/
|
||||
this.current_item_menu = 'ips-attach-menu';
|
||||
this.current_item_menu_obj = null;
|
||||
/**
|
||||
* Images URL
|
||||
*/
|
||||
this.images_url = null;
|
||||
/**
|
||||
* Language array
|
||||
*/
|
||||
this.lang = new Array();
|
||||
/**
|
||||
* CSS classes
|
||||
*/
|
||||
this.css_menu_row = 'attach-menu-row';
|
||||
this.css_menu_row_over = 'attach-menu-row-over';
|
||||
/**
|
||||
* Show attachments menu
|
||||
*/
|
||||
this.show_attach_menu = 1;
|
||||
/**
|
||||
* Onload command
|
||||
*/
|
||||
this.onload_function = '';
|
||||
|
||||
/**
|
||||
* Has an upload...
|
||||
*/
|
||||
this.has_upload_pending = 0;
|
||||
|
||||
/**
|
||||
* INIT
|
||||
*/
|
||||
this.init = function()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT objects
|
||||
//-----------------------------------------
|
||||
|
||||
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 );
|
||||
|
||||
//-----------------------------------------
|
||||
// INIT Current button
|
||||
//-----------------------------------------
|
||||
|
||||
if ( this.show_attach_menu )
|
||||
{
|
||||
// INIT div
|
||||
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;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Dynamically builds the HTML for the IPS Menu system
|
||||
*
|
||||
* @var object Javascript object clicked
|
||||
*/
|
||||
this.init_current_menu = function( obj )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Old menu?
|
||||
//-----------------------------------------
|
||||
|
||||
var menu = '';
|
||||
|
||||
try
|
||||
{
|
||||
menu = document.getElementById( ipsattach.current_item_menu + '_menu' );
|
||||
menu.innerHTML = '';
|
||||
}
|
||||
catch(error)
|
||||
{
|
||||
menu = document.createElement('div');
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Create menu wrapper
|
||||
//-----------------------------------------
|
||||
|
||||
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';
|
||||
|
||||
//-----------------------------------------
|
||||
// What are we doing?
|
||||
//-----------------------------------------
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
// Set status counter correct
|
||||
ipsattach.set_attach_count_status( _items );
|
||||
|
||||
ipsattach.iframe_parent_div_obj.appendChild(menu);
|
||||
|
||||
ipsclass.set_unselectable( menu );
|
||||
};
|
||||
|
||||
/**
|
||||
* Recounts number of current attachments and sets counter
|
||||
*
|
||||
* @param integer Cached count
|
||||
*/
|
||||
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)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Add item into current_attachments menu
|
||||
*/
|
||||
this.add_current_item = function( attach_id, attach_name, attach_size, attach_image )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Fix up attach_name
|
||||
//-----------------------------------------
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds the IPD attach tag into the current editor
|
||||
*
|
||||
* @param integer Attachment ID
|
||||
* @param string Attachment name
|
||||
*/
|
||||
this.add_attachment_into_editor = function( id, name )
|
||||
{
|
||||
// Form tag
|
||||
var tag = "[attachment=" + id + ":" + name + "]";
|
||||
|
||||
// Add
|
||||
ipsclass.add_editor_contents( tag );
|
||||
};
|
||||
|
||||
/**
|
||||
* Removes an attachment
|
||||
*
|
||||
* @param integer Attachment ID
|
||||
*/
|
||||
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' );
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Show upload field and attachments
|
||||
* Draws the iFrame and sets the source
|
||||
*/
|
||||
this.show_attach_box = function()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
var iheight = parseInt( this.iframe_add_to_div_obj.style.height );
|
||||
var iwidth = this.iframe_add_to_div_obj.style.width;
|
||||
|
||||
//-----------------------------------------
|
||||
// Generate iFrame box
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! this.iframe_obj )
|
||||
{
|
||||
this.iframe_obj = document.createElement( 'IFRAME' );
|
||||
|
||||
this.iframe_obj.src = this.iframe_init_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.display = '';
|
||||
|
||||
// Add environmentals..
|
||||
this.iframe_obj.msg_open = 1;
|
||||
this.iframe_obj.iframe_loaded = 0;
|
||||
this.iframe_obj.iframe_init = 0;
|
||||
|
||||
// Attach iFrame inside our DIV
|
||||
this.iframe_add_to_div_obj.appendChild( this.iframe_obj );
|
||||
|
||||
// Add handler
|
||||
if ( is_ie )
|
||||
{
|
||||
this.iframe_obj.style.backgroundColor = 'transparent';
|
||||
this.iframe_obj.allowTransparency = true;
|
||||
this.iframe_obj.onreadystatechange = this.iframe_on_load_ie;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.iframe_obj.onload = this.iframe_onload;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Safari bug: Onload events don't fire
|
||||
// when the parent DIV is hidden.
|
||||
//-----------------------------------------
|
||||
|
||||
if ( is_safari )
|
||||
{
|
||||
this.iframe_parent_div_obj.style.display = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
this.iframe_parent_div_obj.style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// INIT cover div
|
||||
//-----------------------------------------
|
||||
|
||||
if ( typeof this.message_div_obj != 'undefined' )
|
||||
{
|
||||
this.message_div_obj.style.width = typeof this.iframe_parent_div_obj.style.width != 'undefined' ? this.iframe_parent_div_obj.style.width : '100%';
|
||||
this.message_div_obj.style.height = this.iframe_parent_div_obj.offsetHeight ? this.iframe_parent_div_obj.offsetHeight : '120px';
|
||||
this.message_div_obj.style.position = 'relative';
|
||||
this.message_div_obj.style.display = 'none';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Show cover div during INIT
|
||||
//-----------------------------------------
|
||||
|
||||
this.show_message( this.lang['init_progress'] );
|
||||
};
|
||||
|
||||
/**
|
||||
* Draws status bar
|
||||
* Using "ipsattach" as is called in an event function
|
||||
*/
|
||||
this.init_status_bar = function()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
var _html = '';
|
||||
|
||||
if ( typeof ipsattach.status_div_obj != 'undefined' )
|
||||
{
|
||||
try
|
||||
{
|
||||
ipsattach.status_msg = ipsattach.lang[ ipsattach.status_msg ];
|
||||
}
|
||||
catch(error) { }
|
||||
|
||||
if ( ipsattach.status_msg )
|
||||
{
|
||||
if ( ipsattach.status_is_error )
|
||||
{
|
||||
_html += "<img src='" + this.images_url + "/folder_attach_images/attach_error.png' border='0' style='vertical-align:middle' alt='" + ipb_global_lang['general_error'] + "' /> " + ipsattach.status_msg;
|
||||
}
|
||||
else
|
||||
{
|
||||
_html += "<img src='" + this.images_url + "/folder_attach_images/attach_ok.png' border='0' style='vertical-align:middle' alt='" + ipb_global_lang['general_OK'] + "' /> " + ipsattach.status_msg;
|
||||
}
|
||||
}
|
||||
|
||||
ipsattach.status_div_obj.innerHTML = _html;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Reset pending...
|
||||
//-----------------------------------------
|
||||
|
||||
ipsattach.has_upload_pending = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* Manually show the iframe message
|
||||
*/
|
||||
this.iframe_on_un_load = function( msg )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Message...
|
||||
//-----------------------------------------
|
||||
|
||||
msg = typeof(msg) != 'undefined' ? ipsattach.lang[ msg ] : ipsattach.lang['uploading_file'];
|
||||
|
||||
//-----------------------------------------
|
||||
// Show...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( this.iframe_obj.iframe_loaded )
|
||||
{
|
||||
this.iframe_obj.iframe_loaded = 0;
|
||||
this.iframe_obj.msg_open = 1;
|
||||
|
||||
ipsattach.show_message( msg );
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Each time the window is loaded, close
|
||||
* any open messages
|
||||
*/
|
||||
this.iframe_onload = function( e )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// First load?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! this.iframe_init )
|
||||
{
|
||||
this.iframe_init = 1;
|
||||
this.iframe_loaded = 1;
|
||||
|
||||
if ( this.msg_open )
|
||||
{
|
||||
this.msg_open = 0;
|
||||
|
||||
ipsattach.hide_message();
|
||||
}
|
||||
|
||||
window.frames[ this.id ].document.onmousedown = menu_action_close;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.iframe_loaded = 1;
|
||||
window.frames[ this.id ].document.onmousedown = menu_action_close;
|
||||
|
||||
if ( this.msg_open )
|
||||
{
|
||||
this.msg_open = 0;
|
||||
|
||||
ipsattach.hide_message();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Run command?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ipsattach.onload_function )
|
||||
{
|
||||
ipsattach.onload_function();
|
||||
}
|
||||
}
|
||||
|
||||
// INIT stuff
|
||||
ipsattach.init_status_bar();
|
||||
// Set status counter correct
|
||||
ipsattach.set_attach_count_status();
|
||||
};
|
||||
|
||||
/**
|
||||
* IE only calls onload once... So subsequent loads
|
||||
* don't do anything.. hence the readystate change
|
||||
*/
|
||||
this.iframe_on_load_ie = function( e )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// First load?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( this.readyState == 'complete' )
|
||||
{
|
||||
if ( ! this.iframe_init )
|
||||
{
|
||||
this.iframe_init = 1;
|
||||
this.iframe_loaded = 1;
|
||||
window.frames[ this.id ].document.onmousedown = menu_action_close;
|
||||
|
||||
if ( this.msg_open )
|
||||
{
|
||||
this.msg_open = 0;
|
||||
|
||||
ipsattach.hide_message();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
this.iframe_loaded = 1;
|
||||
window.frames[ this.id ].document.onmousedown = menu_action_close;
|
||||
|
||||
if ( this.msg_open )
|
||||
{
|
||||
this.msg_open = 0;
|
||||
ipsattach.hide_message();
|
||||
}
|
||||
}
|
||||
|
||||
//window.frames[ this.id ].document.getElementsByTagName('html')[0].allowTransparency = true;
|
||||
window.frames[ this.id ].document.getElementsByTagName('html')[0].style.background = 'transparent';
|
||||
|
||||
//alert( window.frames[ this.id ].document.getElementsByTagName('html')[0].outerHTML );
|
||||
|
||||
//-----------------------------------------
|
||||
// Run command?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ipsattach.onload_function )
|
||||
{
|
||||
ipsattach.onload_function();
|
||||
}
|
||||
|
||||
// INIT stuff
|
||||
ipsattach.init_status_bar();
|
||||
// Set status counter correct
|
||||
ipsattach.set_attach_count_status();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Show message DIV
|
||||
*/
|
||||
this.show_message = function( msg )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Safari bug: Onload events don't fire
|
||||
// when the parent DIV is hidden.
|
||||
//-----------------------------------------
|
||||
|
||||
if ( is_safari )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( typeof ipsattach.message_div_obj != 'undefined' )
|
||||
{
|
||||
ipsattach.message_div_obj.style.display = '';
|
||||
ipsattach.message_span_obj.innerHTML = msg;
|
||||
|
||||
// Hide other div
|
||||
ipsattach.iframe_parent_div_obj.style.display = 'none';
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Hide message DIV
|
||||
*/
|
||||
this.hide_message = function()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Safari bug: Onload events don't fire
|
||||
// when the parent DIV is hidden.
|
||||
//-----------------------------------------
|
||||
|
||||
if ( is_safari )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( typeof ipsattach.message_div_obj != 'undefined' )
|
||||
{
|
||||
ipsattach.message_div_obj.style.display = 'none';
|
||||
ipsattach.message_span_obj.innerHTML = '';
|
||||
|
||||
// Show other div
|
||||
ipsattach.iframe_parent_div_obj.style.display = '';
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Mouseover events
|
||||
*
|
||||
* @param Event Object
|
||||
*/
|
||||
this.current_menu_mouseover = function(e)
|
||||
{
|
||||
e = ipsclass.cancel_bubble(e, true);
|
||||
|
||||
if ( e.type == 'click' )
|
||||
{
|
||||
this._onclick(e);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Shows the pop-up menu
|
||||
* First, dynamically writes menu - then passes to ipsmenu class to show
|
||||
*
|
||||
* @param Object Object
|
||||
*/
|
||||
this.current_menu_button_show = function(obj)
|
||||
{
|
||||
ipsattach.init_current_menu(obj);
|
||||
this._open(obj);
|
||||
};
|
||||
|
||||
/**
|
||||
* Roll over effect for the menu
|
||||
* ^^
|
||||
*
|
||||
* @param Event Object
|
||||
*/
|
||||
this.menu_onmouse_event = function( e )
|
||||
{
|
||||
e = ipsclass.cancel_bubble(e, true);
|
||||
|
||||
if ( e.type == 'mouseover' )
|
||||
{
|
||||
this.className = ipsattach.css_menu_row_over;
|
||||
}
|
||||
else if ( e.type == 'mouseout' )
|
||||
{
|
||||
this.className = ipsattach.css_menu_row;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,597 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// IPS Global JS functions
|
||||
//------------------------------------------------------------------------------
|
||||
// Matt Mecham Woz Here
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
// http://www.invisionpower.com
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Sort out cookies
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_tmp = null;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// PHP EMULATION
|
||||
//=============================================================================
|
||||
|
||||
/**
|
||||
* Emulate PHPs trim function
|
||||
*/
|
||||
this.trim = function( text )
|
||||
{
|
||||
if( typeof(text) == 'undefined' )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
text = text.replace(/^\s+/, '');
|
||||
return text.replace(/\s+$/, '');
|
||||
};
|
||||
|
||||
/**
|
||||
* Emulate PHPs html_entity_decode function
|
||||
*/
|
||||
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;
|
||||
};
|
||||
|
||||
/**
|
||||
* Emulate PHPs in_array function
|
||||
*/
|
||||
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;
|
||||
};
|
||||
|
||||
/**
|
||||
* Emulate PHPs htmlspecial chars function
|
||||
*/
|
||||
this.htmlspecialchars = function( text )
|
||||
{
|
||||
text = text.replace( /</g, '<' );
|
||||
text = text.replace( />/g, '>' );
|
||||
text = text.replace( /"/g, '"' );
|
||||
|
||||
return text;
|
||||
};
|
||||
|
||||
/**
|
||||
* Emulate PHPs un htmlspecial chars function
|
||||
*/
|
||||
this.un_htmlspecialchars = function( text )
|
||||
{
|
||||
text = text.replace( /</g , '<' );
|
||||
text = text.replace( />/g , '>' );
|
||||
text = text.replace( /"/g, '"' );
|
||||
|
||||
return text;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// EDITOR FUNCTIONS
|
||||
//=============================================================================
|
||||
|
||||
/**
|
||||
* Get contents from an open editor
|
||||
*/
|
||||
this.get_editor_contents = function( editor_id, editor_array )
|
||||
{
|
||||
var aIPS_editor = editor_array ? editor_array : IPS_editor;
|
||||
|
||||
if ( ! editor_id )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Assume we don't care, and get first box
|
||||
//-----------------------------------------
|
||||
|
||||
for( var i in aIPS_editor )
|
||||
{
|
||||
if( typeof( aIPS_editor[i] ) != 'object' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
editor_id = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return aIPS_editor[ editor_id ].editor_get_contents;
|
||||
};
|
||||
|
||||
/**
|
||||
* Add contents to an open editor
|
||||
*/
|
||||
this.add_editor_contents = function( text, editor_id, editor_array )
|
||||
{
|
||||
var aIPS_editor = editor_array ? editor_array : IPS_editor;
|
||||
|
||||
if ( ! editor_id )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Assume we don't care, and get first box
|
||||
//-----------------------------------------
|
||||
|
||||
for( var i in aIPS_editor )
|
||||
{
|
||||
if( typeof( aIPS_editor[i] ) != 'object' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
editor_id = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return aIPS_editor[ editor_id ].insert_text( text );
|
||||
};
|
||||
|
||||
/**
|
||||
* Convert saved tags to display tags
|
||||
*/
|
||||
this.convert_saved_tags_to_display_tags = function( text )
|
||||
{
|
||||
text = text.replace( /(<|<|<)!--/, "{" );
|
||||
text = text.replace( /--(>|>|>)/ , "}" );
|
||||
|
||||
return text;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// MISC FUNCTIONS
|
||||
//=============================================================================
|
||||
|
||||
/**
|
||||
* Include a script...
|
||||
*/
|
||||
this.include_javascript = function( _file, div_id )
|
||||
{
|
||||
/* INIT */
|
||||
var _doc = ( div_id ) ? document.getElementById( div_id ) : document.getElementsByTagName( 'head' ).item(0);
|
||||
var _js = document.createElement('script' );
|
||||
|
||||
/* Create attribute */
|
||||
_js.setAttribute( 'language', 'javascript' );
|
||||
_js.setAttribute( 'type', 'text/javascript' );
|
||||
_js.setAttribute( 'src', _file );
|
||||
_doc.appendChild( _js );
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Fade in colour...
|
||||
*/
|
||||
this.fade_in_element = function( div )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
/**
|
||||
* Accepts a string followed by a list of replacements
|
||||
*/
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return the ID from an ID title string
|
||||
*
|
||||
* @param string ID title
|
||||
* @return integar ID
|
||||
*/
|
||||
this.get_id_from_text = function( id )
|
||||
{
|
||||
return id.replace( /.*(\-|_)(\S+)/, "$2" );
|
||||
};
|
||||
|
||||
/**
|
||||
* Return the name from an ID string
|
||||
*
|
||||
* @param string ID title
|
||||
* @return integar ID
|
||||
*/
|
||||
this.get_name_from_text = function( id )
|
||||
{
|
||||
return id.replace( /(.*)(\-|_)(\S+)/, "$1" );
|
||||
};
|
||||
|
||||
/**
|
||||
* Location jump
|
||||
* @param string URL to redirect to
|
||||
* @param boolean Do not prepend normal URL
|
||||
*/
|
||||
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;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Confirm an action
|
||||
*/
|
||||
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 ( ipb_global_lang['action_cancelled'] );
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Create pop-up window
|
||||
*/
|
||||
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;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set stuff unselectable
|
||||
*/
|
||||
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';
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* GET LEFT OBJECT POSITION
|
||||
* Safari friendly version...
|
||||
*/
|
||||
this.get_obj_leftpos = function(obj)
|
||||
{
|
||||
var curleft = 0;
|
||||
|
||||
if (obj.offsetParent)
|
||||
{
|
||||
while (obj.offsetParent)
|
||||
{
|
||||
curleft += obj.offsetLeft;
|
||||
obj = obj.offsetParent;
|
||||
}
|
||||
}
|
||||
else if (obj.x)
|
||||
{
|
||||
curleft += obj.x;
|
||||
}
|
||||
|
||||
return curleft;
|
||||
};
|
||||
|
||||
/**
|
||||
* GET TOP OBJECT POSITION
|
||||
* Safari friendly version...
|
||||
*/
|
||||
this.get_obj_toppos = function(obj)
|
||||
{
|
||||
var curtop = 0;
|
||||
|
||||
if (obj.offsetParent)
|
||||
{
|
||||
while (obj.offsetParent)
|
||||
{
|
||||
curtop += obj.offsetTop;
|
||||
obj = obj.offsetParent;
|
||||
}
|
||||
}
|
||||
else if (obj.y)
|
||||
{
|
||||
curtop += obj.y;
|
||||
}
|
||||
|
||||
return curtop;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// CANCEL BUBBLE FUNCTIONS
|
||||
//=============================================================================
|
||||
|
||||
/**
|
||||
* Stop the browser bubbling events
|
||||
*/
|
||||
this.cancel_bubble = function(obj, extra)
|
||||
{
|
||||
if ( extra !== false )
|
||||
{
|
||||
extra = true;
|
||||
}
|
||||
|
||||
if ( ! obj || is_ie)
|
||||
{
|
||||
if ( extra )
|
||||
{
|
||||
window.event.returnValue = false;
|
||||
}
|
||||
|
||||
window.event.cancelBubble = true;
|
||||
|
||||
return window.event;
|
||||
}
|
||||
else
|
||||
{
|
||||
obj.stopPropagation();
|
||||
|
||||
if ( extra )
|
||||
{
|
||||
obj.preventDefault();
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
};
|
||||
|
||||
this.cancel_bubble_all = function( obj )
|
||||
{
|
||||
return ipsclass.cancel_bubble( obj, true );
|
||||
};
|
||||
|
||||
this.cancel_bubble_low = function( obj )
|
||||
{
|
||||
return ipsclass.cancel_bubble( obj, false );
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// COOKIE FUNCTIONS
|
||||
//=============================================================================
|
||||
|
||||
/**
|
||||
* Cookie: Get Cookie
|
||||
*/
|
||||
this.my_getcookie = function( name )
|
||||
{
|
||||
return this.cookies[ name ];
|
||||
/*cname = ipb_var_cookieid + name + '=';
|
||||
cpos = document.cookie.indexOf( cname );
|
||||
|
||||
if ( cpos != -1 )
|
||||
{
|
||||
cstart = cpos + cname.length;
|
||||
cend = document.cookie.indexOf(";", cstart);
|
||||
|
||||
if (cend == -1)
|
||||
{
|
||||
cend = document.cookie.length;
|
||||
}
|
||||
|
||||
return unescape( document.cookie.substring(cstart, cend) );
|
||||
}
|
||||
|
||||
return null;*/
|
||||
};
|
||||
|
||||
/**
|
||||
* Cookie: Set Cookie
|
||||
*/
|
||||
this.my_setcookie = function( name, value, sticky )
|
||||
{
|
||||
expire = "";
|
||||
domain = "";
|
||||
path = "/";
|
||||
|
||||
if ( sticky )
|
||||
{
|
||||
expire = "; expires=Wed, 1 Jan 2020 00:00:00 GMT";
|
||||
}
|
||||
|
||||
if ( ipb_var_cookie_domain != "" )
|
||||
{
|
||||
domain = '; domain=' + ipb_var_cookie_domain;
|
||||
}
|
||||
|
||||
if ( ipb_var_cookie_path != "" )
|
||||
{
|
||||
path = ipb_var_cookie_path;
|
||||
}
|
||||
|
||||
document.cookie = ipb_var_cookieid + name + "=" + value + "; path=" + path + expire + domain + ';';
|
||||
|
||||
//-----------------------------------------
|
||||
// Update internal array
|
||||
//-----------------------------------------
|
||||
|
||||
this.cookies[ name ] = value;
|
||||
};
|
||||
|
||||
//=============================================================================
|
||||
// ARRAY FUNCTIONS
|
||||
//=============================================================================
|
||||
|
||||
/**
|
||||
* Array: Get stacksize
|
||||
* @param array Array
|
||||
* @return int Array length
|
||||
*/
|
||||
this.array_stacksize = function( thearray )
|
||||
{
|
||||
for (i = 0 ; i < thearray.length; i++ )
|
||||
{
|
||||
if ( (thearray[i] == "") || (thearray[i] == null) || (thearray == 'undefined') )
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return thearray.length;
|
||||
};
|
||||
|
||||
/**
|
||||
* Array: Add element to the stack
|
||||
* @param array Array
|
||||
* @param mixed New value
|
||||
*/
|
||||
this.array_pushstack = function ( thearray, newval )
|
||||
{
|
||||
var arraysize = this.array_stacksize(thearray);
|
||||
thearray[arraysize] = newval;
|
||||
};
|
||||
|
||||
/**
|
||||
* Array: Remove last array element
|
||||
* @param array Array
|
||||
* @return int Array length
|
||||
*/
|
||||
this.array_popstack = function( thearray )
|
||||
{
|
||||
var arraysize = this.array_stacksize( thearray );
|
||||
var theval = thearray[arraysize - 1];
|
||||
|
||||
delete thearray[arraysize - 1];
|
||||
return theval;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,559 @@
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// IPS BASIC MENU CLASS
|
||||
// (c) 2005 Invision Power Services, Inc
|
||||
// ASSUMES "ips_global.js" has been loaded
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
ipsmenu = new ips_menu();
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT Handler class
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Register menu control ID (add to array)
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
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 ];
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Register menu control ID (add to array)
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
ips_menu.prototype.close = function ()
|
||||
{
|
||||
if ( this.menu_cur_open )
|
||||
{
|
||||
this.menu_registered[ this.menu_cur_open ].close();
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// ips_menu_class: Object for each menu
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function ips_menu_class( cid )
|
||||
{
|
||||
this.cid = cid;
|
||||
this.initialized = false;
|
||||
|
||||
this.init_control_object();
|
||||
this.init_menu();
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// ips_menu_class: Initiate a single menu
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
ips_menu_class.prototype.init_control_object = function()
|
||||
{
|
||||
this.cid_obj = document.getElementById( this.cid );
|
||||
|
||||
//----------------------------------
|
||||
// Change cursor to show link
|
||||
//----------------------------------
|
||||
|
||||
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: Initiate a single menu
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
ips_menu_class.prototype.init_menu = function()
|
||||
{
|
||||
this.cid_menu_obj = document.getElementById( this.cid + '_menu' );
|
||||
|
||||
if ( this.cid_menu_obj )
|
||||
{
|
||||
//----------------------------------
|
||||
// Save CPU - already init?
|
||||
//----------------------------------
|
||||
|
||||
if ( this.initialized )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Pop-up menu obj (hidden div)
|
||||
//----------------------------------
|
||||
|
||||
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: Open menu
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
ips_menu_class.prototype.open = function( obj )
|
||||
{
|
||||
//----------------------------------
|
||||
// Not init?
|
||||
//----------------------------------
|
||||
|
||||
if ( ! this.cid_menu_obj )
|
||||
{
|
||||
this.initialized = false;
|
||||
this.init_menu();
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Close current menu(s)
|
||||
//----------------------------------
|
||||
|
||||
if ( ipsmenu.menu_cur_open != null )
|
||||
{
|
||||
ipsmenu.menu_registered[ ipsmenu.menu_cur_open ].close();
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Save CPU - cur open clicked?
|
||||
//----------------------------------
|
||||
|
||||
if ( ipsmenu.menu_cur_open == obj.id )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Set current open menu
|
||||
//----------------------------------
|
||||
|
||||
ipsmenu.menu_cur_open = obj.id;
|
||||
|
||||
//----------------------------------
|
||||
// Get ID of menu DIV to show
|
||||
//----------------------------------
|
||||
|
||||
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;
|
||||
// }
|
||||
//}
|
||||
|
||||
//----------------------------------
|
||||
// Show menu DIV.. but keep it underneath
|
||||
//----------------------------------
|
||||
|
||||
this.cid_menu_obj.style.zIndex = -1;
|
||||
this.cid_menu_obj.style.display = "";
|
||||
|
||||
//----------------------------------
|
||||
// Try and keep it on screen
|
||||
//----------------------------------
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Firefox bump
|
||||
//-----------------------------------------
|
||||
|
||||
if ( is_moz )
|
||||
{
|
||||
top_px -= 1;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Finalize menu position
|
||||
//----------------------------------
|
||||
|
||||
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;
|
||||
|
||||
//----------------------------------
|
||||
// Run a custom function?
|
||||
//----------------------------------
|
||||
|
||||
if ( ipsmenu.menu_openfuncs[ obj.id ] )
|
||||
{
|
||||
eval( ipsmenu.menu_openfuncs[ obj.id ] );
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Workaround for IE bug which shows
|
||||
// select boxes and other windows GUI
|
||||
// over divs. SHOW IFRAME
|
||||
//----------------------------------
|
||||
|
||||
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)
|
||||
{
|
||||
//alert(error); // Oh dear, someones stolen the iframe
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Work around for safari which doesnt
|
||||
// allow a hrefs top be clickable in
|
||||
// a pop up div
|
||||
//----------------------------------
|
||||
|
||||
if ( is_safari )
|
||||
{
|
||||
try
|
||||
{
|
||||
mlinks = this.cid_menu_obj.getElementsByTagName('a');
|
||||
|
||||
for ( var i = 0 ; i <= mlinks.length ; i++ )
|
||||
{
|
||||
//----------------------------------
|
||||
// Ignore non links and links that end with #
|
||||
// As safari likes to do that with href='#' links
|
||||
//----------------------------------
|
||||
|
||||
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 )
|
||||
{
|
||||
//alert( 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: Close a menu
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
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 ];
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Workaround for IE bug which shows
|
||||
// select boxes and other windows GUI
|
||||
// over divs. Hide IFRAME
|
||||
//----------------------------------
|
||||
|
||||
if ( is_ie )
|
||||
{
|
||||
try
|
||||
{
|
||||
document.getElementById( 'if_' + this.cid ).style.display = "none";
|
||||
}
|
||||
catch(error)
|
||||
{
|
||||
//alert(e);// Oh dear, someones stolen the iframe
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// IPS Editor stuff
|
||||
//-----------------------------------------
|
||||
|
||||
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' );
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// ACTION: If menu open and hover over another cid, close cur open new
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT: ips menu events
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function ips_menu_events()
|
||||
{
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Safari: bug fix
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
ips_menu_events.prototype.event_safari_onclick_handler = function()
|
||||
{
|
||||
if ( this.id )
|
||||
{
|
||||
window.location = document.getElementById( this.id ).href;
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Event: On mouseover
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
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 ];
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Event: On mouseout
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
ips_menu_events.prototype.event_onmouseout = function(e)
|
||||
{
|
||||
e = ipsclass.cancel_bubble(e, true);
|
||||
|
||||
if ( ipsmenu.menu_out_css[ this.id ] && ipsmenu.menu_cur_open != this.id )
|
||||
{
|
||||
this.className = ipsmenu.menu_out_css[ this.id ];
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Event: On click
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
ips_menu_events.prototype.event_onclick = function(e)
|
||||
{
|
||||
e = ipsclass.cancel_bubble(e, true);
|
||||
|
||||
if ( ipsmenu.menu_cur_open == null )
|
||||
{
|
||||
if ( ipsmenu.menu_over_css[ this.id ] )
|
||||
{
|
||||
this.className = ipsmenu.menu_over_css[ this.id ];
|
||||
}
|
||||
|
||||
ipsmenu.menu_registered[ this.id ].open(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
// For the RTE, if we click from font to size, for example
|
||||
// we want the menu to open...
|
||||
|
||||
//ipsmenu.menu_registered[ this.id ].close();
|
||||
|
||||
if ( ipsmenu.menu_cur_open == this.id )
|
||||
{
|
||||
ipsmenu.menu_registered[ this.id ].close();
|
||||
|
||||
if ( ipsmenu.menu_out_css[ this.id ] )
|
||||
{
|
||||
this.className = ipsmenu.menu_out_css[ this.id ];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ipsmenu.menu_over_css[ this.id ] )
|
||||
{
|
||||
this.className = ipsmenu.menu_over_css[ this.id ];
|
||||
}
|
||||
|
||||
ipsmenu.menu_registered[ this.id ].open(this);
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Global INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function menu_do_global_init()
|
||||
{
|
||||
//----------------------------------
|
||||
// Close all menus on click
|
||||
//----------------------------------
|
||||
|
||||
document.onclick = menu_action_close;
|
||||
|
||||
//----------------------------------
|
||||
// Write HTML
|
||||
//----------------------------------
|
||||
|
||||
if ( ipsmenu.dynamic_html != null && ipsmenu.dynamic_html != '' )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Register
|
||||
//----------------------------------
|
||||
|
||||
if ( ipsmenu.dynamic_register.length )
|
||||
{
|
||||
for( var i=0; i < ipsmenu.dynamic_register.length; i++ )
|
||||
{
|
||||
if ( ipsmenu.dynamic_register[i] )
|
||||
{
|
||||
ipsmenu.register( ipsmenu.dynamic_register[i] );
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Global: Close menus from any app
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function menu_action_close(e)
|
||||
{
|
||||
try {
|
||||
if( e.button == 2 || e.button == 3 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch( acold ) {};
|
||||
|
||||
ipsmenu.close(e);
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,569 @@
|
||||
//------------------------------------------
|
||||
// Invision Power Board v2
|
||||
// Text Editor Global Functions
|
||||
// (c) 2006 Invision Power Services, Inc.
|
||||
//
|
||||
// http://www.invisionboard.com
|
||||
//------------------------------------------
|
||||
|
||||
var _options_done = 0;
|
||||
|
||||
/**
|
||||
* Check side panel
|
||||
*
|
||||
* @param string Editor ID
|
||||
*/
|
||||
function check_side_panel( editor_id )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Remove side panel?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( global_rte_remove_side_panel )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Turn off button.
|
||||
//-----------------------------------------
|
||||
|
||||
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 );
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Show more options panel
|
||||
*
|
||||
* @param string Editor ID
|
||||
*/
|
||||
function show_options_panel( editor_id, force, start_emo )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Remove side panel?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( global_rte_remove_side_panel )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Turn off button.
|
||||
//-----------------------------------------
|
||||
|
||||
document.getElementById( 'rte-toggle-side-panel-button' ).style.display = 'none';
|
||||
return true;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Set start..
|
||||
//-----------------------------------------
|
||||
|
||||
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 = '';
|
||||
|
||||
//-----------------------------------------
|
||||
// Clear out content
|
||||
//-----------------------------------------
|
||||
|
||||
_options.innerHTML = '';
|
||||
|
||||
//-----------------------------------------
|
||||
// Opening or closing?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( typeof( force ) != 'undefined' )
|
||||
{
|
||||
_mode = ( force == 1 ) ? 'open' : 'close';
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( _options._panel_open )
|
||||
{
|
||||
_mode = 'close';
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Set cookie
|
||||
//-----------------------------------------
|
||||
|
||||
ipsclass.my_setcookie( 'rte-sidepanel', _mode, 1 );
|
||||
|
||||
//-----------------------------------------
|
||||
// OPEN: Adjust editor to make room
|
||||
//-----------------------------------------
|
||||
|
||||
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';
|
||||
|
||||
//-----------------------------------------
|
||||
// Build emoticons...
|
||||
//-----------------------------------------
|
||||
|
||||
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;
|
||||
|
||||
//-----------------------------------------
|
||||
// Get max. emos
|
||||
//-----------------------------------------
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// More?
|
||||
//-----------------------------------------
|
||||
|
||||
_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 );
|
||||
|
||||
//-----------------------------------------
|
||||
// Special Items
|
||||
//-----------------------------------------
|
||||
|
||||
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">'+ips_language_array['ed_quick_access']+'</div>';
|
||||
|
||||
var _div = document.createElement( 'div' );
|
||||
_div.style.width = '100%';
|
||||
|
||||
|
||||
var table = document.createElement('table');
|
||||
table.cellPadding = 0;
|
||||
table.cellSpacing = 0;
|
||||
table.border = 0;
|
||||
table.width = '99%';
|
||||
|
||||
var i = 0;
|
||||
var perrow = 3;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
_div.appendChild( table );
|
||||
_main_div.appendChild( _div );
|
||||
_options.appendChild( _main_div );
|
||||
|
||||
_options_done = 1;
|
||||
|
||||
ipsclass.set_unselectable( _options );
|
||||
}
|
||||
else
|
||||
{
|
||||
_editor.style.width = '100%';
|
||||
|
||||
document.getElementById( editor_id + '_spacer-bar' ).style.width = '0px';
|
||||
|
||||
_options.style.width = '0px';
|
||||
_options.style.display = 'none';
|
||||
_options._panel_open = 0;
|
||||
//_options.innerHTML = '';
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Switch between STD and RTE editors on the fly
|
||||
*
|
||||
* @param string Editor ID
|
||||
*/
|
||||
function switch_editor_mode( editor_id )
|
||||
{
|
||||
//----------------------------------
|
||||
// INIT
|
||||
//----------------------------------
|
||||
|
||||
var url = ipb_var_base_url+'act=xmlout&do=post-editorswitch';
|
||||
var fields = new Array();
|
||||
|
||||
if ( use_enhanced_js )
|
||||
{
|
||||
var new_mode = IPS_editor[ editor_id ].is_rte ? 0 : 1;
|
||||
|
||||
if ( IPS_editor[ editor_id ].is_loading )
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
IPS_editor[ editor_id ].is_loading = 1;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Close menus
|
||||
//-----------------------------------------
|
||||
|
||||
if ( typeof( ipsmenu ) != 'undefined' )
|
||||
{
|
||||
ipsmenu.close();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Collect Info
|
||||
//-----------------------------------------
|
||||
|
||||
var _file_path = IPS_editor[ editor_id ].file_path;
|
||||
var _is_ie = IPS_editor[ editor_id ].is_ie;
|
||||
var _is_moz = IPS_editor[ editor_id ].is_moz;
|
||||
|
||||
//----------------------------------
|
||||
// Populate fields
|
||||
//----------------------------------
|
||||
|
||||
fields['md5check'] = ipb_md5_check;
|
||||
fields['act'] = 'xmlout';
|
||||
fields['do'] = 'post-editorswitch';
|
||||
fields['to_rte'] = new_mode;
|
||||
fields['Post'] = IPS_editor[ editor_id ].editor_get_contents();
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// 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() )
|
||||
{
|
||||
xmlobj.show_loading();
|
||||
return;
|
||||
}
|
||||
|
||||
xmlobj.hide_loading();
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill editor
|
||||
//-----------------------------------------
|
||||
|
||||
IPS_editor[ editor_id ].destruct();
|
||||
|
||||
//----------------------------------
|
||||
// INIT
|
||||
//----------------------------------
|
||||
|
||||
var text = xmlobj.xmlhandler.responseText;
|
||||
|
||||
var matches = text.match( /&#([0-9]+);/g );
|
||||
|
||||
if ( matches )
|
||||
{
|
||||
for ( var i = 0; typeof( matches[i] ) != 'undefined'; i++ )
|
||||
{
|
||||
if ( sm = matches[i].match( /^&#([0-9]+);$/ ) )
|
||||
{
|
||||
text = text.replace( sm[0], String.fromCharCode(sm[1]) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
text = text.replace( /&(lt|gt|quot);/ig, "&$1;" );
|
||||
text = text.replace( /"/g, '"' );
|
||||
|
||||
// Fix emoticons for ACP
|
||||
text = text.replace( /([^\/])style_emoticons\/$1([a-zA-Z0-9]+)/ig, global_rte_emoticons_url );
|
||||
|
||||
//-----------------------------------------
|
||||
// BBCode specific fixes
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! new_mode )
|
||||
{
|
||||
// Move closing tags on a new line up one
|
||||
text = text.replace( /(?:\n|\r){1,}(\[\/\w{1,}\])/g, "$1" );
|
||||
|
||||
// Make sure list bullets are on a new line
|
||||
text = text.replace( /(\S{1})\[\*\]/g, "$1\n[*]" );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get rid of old thing
|
||||
//-----------------------------------------
|
||||
|
||||
IPS_editor[ editor_id ] = null;
|
||||
|
||||
//-----------------------------------------
|
||||
// INIT New
|
||||
//-----------------------------------------
|
||||
|
||||
IPS_editor[ editor_id ] = new ips_text_editor( editor_id, new_mode, new_mode == 1 ? 0 : 1, _file_path, text );
|
||||
|
||||
//-----------------------------------------
|
||||
// Other set up
|
||||
//-----------------------------------------
|
||||
|
||||
// Set up defaults
|
||||
IPS_editor[ editor_id ].allow_advanced = 0;
|
||||
IPS_editor[ editor_id ].forum_fix_ie_newlines = 1;
|
||||
|
||||
// Add bbcode items
|
||||
for( var i in ips_bbcode_items )
|
||||
{
|
||||
IPS_editor[ editor_id ].module_add_item( 'bbcodeloader{id=' + i + '}', ips_language_array['insert_prefix'] + ": " + ips_bbcode_items[ i ]['title'] , 'rte-ipd-tag.png' );
|
||||
}
|
||||
|
||||
IPS_editor[ editor_id ].editor_check_focus();
|
||||
|
||||
//-----------------------------------------
|
||||
// Fix up forms
|
||||
//-----------------------------------------
|
||||
|
||||
document.getElementById( editor_id + '_wysiwyg_used' ).value = new_mode;
|
||||
};
|
||||
|
||||
//----------------------------------
|
||||
// LOAD XML
|
||||
//----------------------------------
|
||||
|
||||
xmlobj = new ajax_request();
|
||||
xmlobj.onreadystatechange( do_request_function );
|
||||
var xmlreturn = xmlobj.process( url, 'POST', xmlobj.format_for_post(fields) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show all emoticons
|
||||
*
|
||||
* @param string Editor ID
|
||||
*/
|
||||
function show_all_emoticons( editor_id )
|
||||
{
|
||||
IPS_editor[ editor_id ].emoticon_window_id = window.open( ipb_var_base_url + "act=legends&CODE=emoticons&editor_id=" + editor_id,"Legends","width=250,height=500,resizable=yes,scrollbars=yes");
|
||||
|
||||
menu_action_close();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show BBCode pop-up
|
||||
*
|
||||
*/
|
||||
function bbc_pop()
|
||||
{
|
||||
window.open( ipb_var_base_url + "act=legends&CODE=bbcode","Legends","width=700,height=500,resizable=yes,scrollbars=yes");
|
||||
}
|
||||
|
||||
/**
|
||||
* Legacy code validate form
|
||||
*
|
||||
*/
|
||||
function ValidateForm()
|
||||
{
|
||||
return validate_form();
|
||||
}
|
||||
|
||||
/**
|
||||
* IPB specific.
|
||||
*
|
||||
*/
|
||||
function validate_form()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Check for uploads...
|
||||
//-----------------------------------------
|
||||
|
||||
try
|
||||
{
|
||||
if ( ipsattach.has_upload_pending )
|
||||
{
|
||||
if ( confirm( ipb_global_lang['post_upload_not_empty'] ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
}
|
||||
|
||||
for ( var i in IPS_editor )
|
||||
{
|
||||
if( typeof( IPS_editor[i] ) != 'object' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var return_var = IPS_editor[ i ].update_for_form_submit();
|
||||
|
||||
if ( return_var == false )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,819 @@
|
||||
//------------------------------------------
|
||||
// Invision Power Board v2
|
||||
// Text Editor Lite
|
||||
// (c) 2006 Invision Power Services, Inc.
|
||||
//
|
||||
// http://www.invisionboard.com
|
||||
//------------------------------------------
|
||||
|
||||
var IPS_Lite_Editor = new Array();
|
||||
|
||||
/**
|
||||
* Text editor lite!
|
||||
*
|
||||
* @param string Editor ID
|
||||
*/
|
||||
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;
|
||||
|
||||
//-----------------------------------------
|
||||
// Do some set up
|
||||
//-----------------------------------------
|
||||
|
||||
this.init = function()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
var controls = new Array();
|
||||
|
||||
if ( ! this.control_obj )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Grab all buttons
|
||||
// 2 step 'cos moz goes into infinite loop otherwise
|
||||
//-----------------------------------------
|
||||
|
||||
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.set_unselectable( this.control_obj );
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up focus
|
||||
//-----------------------------------------
|
||||
|
||||
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);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Refocus editor check
|
||||
*/
|
||||
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)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* INIT Editor Button
|
||||
* Initialize an editor button (bold, italic, etc)
|
||||
*
|
||||
* @param object Button DIV object
|
||||
*/
|
||||
this.init_editor_button = function( obj )
|
||||
{
|
||||
obj.cmd = obj.id.replace( new RegExp( '^' + this.editor_id + '_cmd_(.+?)$' ), '$1' );
|
||||
obj.editor_id = this.editor_id;
|
||||
|
||||
//-----------------------------------------
|
||||
// Add to buttons array
|
||||
//-----------------------------------------
|
||||
|
||||
this.buttons[ obj.cmd ] = obj;
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up defaults
|
||||
//-----------------------------------------
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
/**
|
||||
* Toggle button context
|
||||
* Toggles the menu's class for mouseover, select, etc
|
||||
*
|
||||
* @param object menu object
|
||||
* @param object state
|
||||
* @param object type
|
||||
*/
|
||||
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;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the editor button control style
|
||||
*
|
||||
* @var object Button Object
|
||||
* @var string Control Type
|
||||
* @var string Control Mode
|
||||
*/
|
||||
this.editor_set_ctl_style = function( obj, type, mode )
|
||||
{
|
||||
if ( obj.mode != mode )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Add in -menu class
|
||||
//-----------------------------------------
|
||||
|
||||
var extra = '';
|
||||
|
||||
if ( type == 'menu' )
|
||||
{
|
||||
extra = '-menu';
|
||||
}
|
||||
else if ( type == 'menubutton' )
|
||||
{
|
||||
extra = '-menubutton';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Add in -color if it's a color box
|
||||
//-----------------------------------------
|
||||
|
||||
extra += obj.colorname ? '-color' : '';
|
||||
|
||||
//-----------------------------------------
|
||||
// Add in -emo if it's an emo
|
||||
//-----------------------------------------
|
||||
|
||||
extra += obj.emo_id ? '-emo' : '';
|
||||
|
||||
//-----------------------------------------
|
||||
// Set mote...
|
||||
//-----------------------------------------
|
||||
|
||||
obj.mode = mode;
|
||||
|
||||
try
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case "normal":
|
||||
{
|
||||
// Normal
|
||||
obj.className = 'rte-normal' + extra;
|
||||
}
|
||||
break;
|
||||
|
||||
case "hover":
|
||||
{
|
||||
// Hover
|
||||
obj.className = 'rte-hover' + extra;
|
||||
}
|
||||
break;
|
||||
|
||||
case "selected":
|
||||
case "down":
|
||||
{
|
||||
// On
|
||||
obj.className = 'rte-selected' + extra;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Format Text
|
||||
*
|
||||
* @var event Event Object
|
||||
* @var string Formatted command
|
||||
* @var string Formatting command extra
|
||||
*/
|
||||
this.format_text = function(e, command, arg)
|
||||
{
|
||||
e = ipsclass.cancel_bubble( e, true );
|
||||
|
||||
//-----------------------------------------
|
||||
// Special considerations...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( command.match( /resize_/ ) )
|
||||
{
|
||||
this.resize_editorbox( command.replace( /.+?resize_(up|down)/, "$1" ) );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Special considerations...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( command.match( /emoticon/ ) )
|
||||
{
|
||||
this.show_all_emoticons();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Continue...
|
||||
//-----------------------------------------
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Check focus
|
||||
//-----------------------------------------
|
||||
|
||||
this.editor_check_focus();
|
||||
|
||||
return return_val;
|
||||
};
|
||||
|
||||
/**
|
||||
* STD:
|
||||
* Create link override
|
||||
*/
|
||||
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);
|
||||
};
|
||||
|
||||
/**
|
||||
* STD:
|
||||
* Insert image override
|
||||
*/
|
||||
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 );
|
||||
};
|
||||
|
||||
/**
|
||||
* STD:
|
||||
* IPB Quote override
|
||||
*/
|
||||
this.ipb_quote = function()
|
||||
{
|
||||
var _text = this.get_selection();
|
||||
this.wrap_tags( 'quote', false, _text );
|
||||
};
|
||||
|
||||
/**
|
||||
* STD:
|
||||
* IPB code override
|
||||
*/
|
||||
this.ipb_code = function()
|
||||
{
|
||||
var _text = this.get_selection();
|
||||
this.wrap_tags( 'code', false, _text );
|
||||
};
|
||||
|
||||
/**
|
||||
* STD:
|
||||
* Apply formatting
|
||||
*/
|
||||
this.apply_formatting = function(cmd, dialog, argument)
|
||||
{
|
||||
// undo & redo array pops
|
||||
|
||||
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_tags('background', argument);
|
||||
return;
|
||||
}
|
||||
|
||||
case 'insertimage':
|
||||
{
|
||||
this.wrap_tags('img', false, argument);
|
||||
return;
|
||||
}
|
||||
|
||||
case 'strikethrough':
|
||||
{
|
||||
this.wrap_tags('strike', false);
|
||||
return;
|
||||
}
|
||||
|
||||
case 'superscript':
|
||||
{
|
||||
this.wrap_tags('sup', false);
|
||||
return;
|
||||
}
|
||||
|
||||
case 'subscript':
|
||||
{
|
||||
this.wrap_tags('sub', false);
|
||||
return;
|
||||
}
|
||||
|
||||
case 'removeformat':
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Wrap Tags
|
||||
*
|
||||
* @param string Tag to wrap
|
||||
* @param boolean Has optional params
|
||||
* @param string Selected Text
|
||||
*/
|
||||
this.wrap_tags = function(tag_name, has_option, selected_text)
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Fix up for HTML use
|
||||
//-----------------------------------------
|
||||
|
||||
var tag_close = tag_name;
|
||||
|
||||
//-----------------------------------------
|
||||
// Got selected text?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( typeof selected_text == 'undefined' )
|
||||
{
|
||||
selected_text = this.get_selection();
|
||||
|
||||
selected_text = (selected_text === false) ? '' : new String(selected_text);
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Using option?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( has_option === true )
|
||||
{
|
||||
var option = prompt( ips_language_array['js_rte_optionals'] ? ips_language_array['js_rte_optionals'] : "Enter the optional arguments for this tag", '');
|
||||
|
||||
if ( option )
|
||||
{
|
||||
var opentag = this.open_brace + tag_name + '="' + option + '"' + this.close_brace;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ( has_option !== false )
|
||||
{
|
||||
var opentag = this.open_brace + tag_name + '="' + has_option + '"' + this.close_brace;
|
||||
}
|
||||
else
|
||||
{
|
||||
var opentag = this.open_brace + tag_name + this.close_brace;
|
||||
}
|
||||
|
||||
var closetag = this.open_brace + '/' + tag_close + this.close_brace;
|
||||
|
||||
var text = opentag + selected_text + closetag;
|
||||
|
||||
this.insert_text( text );
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Wrap tag: Lite
|
||||
* Quick method of below
|
||||
*
|
||||
* @param string Start text
|
||||
* @param string Close text
|
||||
*/
|
||||
this.wrap_tags_lite = function( start_text, close_text )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Got selected text?
|
||||
//-----------------------------------------
|
||||
|
||||
selected_text = this.get_selection();
|
||||
selected_text = (selected_text === false) ? '' : new String(selected_text);
|
||||
|
||||
this.insert_text( start_text + selected_text + close_text );
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* STD:
|
||||
* Get Editor Contents
|
||||
*/
|
||||
this.editor_get_contents = function()
|
||||
{
|
||||
return this.editor_document.value;
|
||||
};
|
||||
|
||||
/**
|
||||
* STD:
|
||||
* Get Selected Text
|
||||
*/
|
||||
this.get_selection = function()
|
||||
{
|
||||
if ( typeof(this.editor_document.selectionStart) != 'undefined' )
|
||||
{
|
||||
return this.editor_document.value.substr(this.editor_document.selectionStart, this.editor_document.selectionEnd - this.editor_document.selectionStart);
|
||||
}
|
||||
else if ( ( document.selection && document.selection.createRange ) || this._ie_cache )
|
||||
{
|
||||
return this._ie_cache ? this._ie_cache.text : document.selection.createRange().text;
|
||||
}
|
||||
else if ( window.getSelection )
|
||||
{
|
||||
return window.getSelection() + '';
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* STD:
|
||||
* Insert HTML
|
||||
*/
|
||||
this.insert_text = function(text)
|
||||
{
|
||||
if( this.editor_check_focus() == false )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof(this.editor_document.selectionStart) != 'undefined')
|
||||
{
|
||||
var open = this.editor_document.selectionStart + 0;
|
||||
var st = this.editor_document.scrollTop;
|
||||
|
||||
this.editor_document.value = this.editor_document.value.substr(0, this.editor_document.selectionStart) + text + this.editor_document.value.substr(this.editor_document.selectionEnd);
|
||||
|
||||
// Don't adjust selection if we're simply adding <b></b>, etc
|
||||
if ( ! text.match( new RegExp( "\\" + this.open_brace + "(\\S+?)" + "\\" + this.close_brace + "\\" + this.open_brace + "/(\\S+?)" + "\\" + this.close_brace ) ) )
|
||||
{
|
||||
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;
|
||||
};
|
||||
|
||||
/**
|
||||
* Show all emoticons
|
||||
*
|
||||
* @param string Editor ID
|
||||
*/
|
||||
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;
|
||||
};
|
||||
|
||||
/**
|
||||
* STD:
|
||||
* Insert an emoticon
|
||||
*/
|
||||
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();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Resize editor
|
||||
*
|
||||
* @param string Up (smaller) Down (Larger)
|
||||
*/
|
||||
|
||||
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 we're not going smaller than 300...
|
||||
//-----------------------------------------
|
||||
|
||||
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';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
// =============================================================================
|
||||
// Text editor event functions
|
||||
// =============================================================================
|
||||
|
||||
/**
|
||||
* Class initialization
|
||||
*/
|
||||
function ips_editor_events()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles mouse events for buttons
|
||||
*
|
||||
* @param event Event Object
|
||||
*/
|
||||
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);
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the focus for the editor window
|
||||
*
|
||||
* @param event Event Object
|
||||
*/
|
||||
ips_editor_events.prototype.editor_window_onfocus = function(e)
|
||||
{
|
||||
this.has_focus = true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets unfocus for the editor window
|
||||
*
|
||||
* @param event Event Object
|
||||
*/
|
||||
|
||||
ips_editor_events.prototype.editor_window_onblur = function(e)
|
||||
{
|
||||
this.has_focus = false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Handles editor document key-press event
|
||||
*
|
||||
* @param event Event Object
|
||||
*/
|
||||
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;
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,397 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// IPS XML HTTP REQUEST
|
||||
//------------------------------------------------------------------------------
|
||||
// Supports Safari, Mozilla 1.3+ (Firefox, etc) and IE 5.5+
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
// http://www.invisionpower.com
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// New object
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function ajax_request()
|
||||
{
|
||||
this.isIE = false;
|
||||
this.allow_use = use_enhanced_js ? true : false;
|
||||
this.xmlhandler = null;
|
||||
this.error_string = '';
|
||||
this.nocache = true;
|
||||
this.do_request_functon = function() {};
|
||||
this.loading_fired = 0;
|
||||
this.centerdiv = null;
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Initiate
|
||||
/*--------------------------------------------*/
|
||||
|
||||
ajax_request.prototype.xml_init = function()
|
||||
{
|
||||
try
|
||||
{
|
||||
//------------------------------------------------
|
||||
// Moz, Safari, Opera
|
||||
//------------------------------------------------
|
||||
|
||||
this.xmlhandler = new XMLHttpRequest();
|
||||
this.ie = false;
|
||||
this.allow_use = true;
|
||||
return true;
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
try
|
||||
{
|
||||
//------------------------------------------------
|
||||
// IE
|
||||
//------------------------------------------------
|
||||
|
||||
this.xmlhandler = new ActiveXObject('Microsoft.XMLHTTP');
|
||||
this.ie = true;
|
||||
this.allow_use = true;
|
||||
return true;
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
this.ie = true;
|
||||
this.allow_use = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Actually send data
|
||||
/*--------------------------------------------*/
|
||||
|
||||
ajax_request.prototype.process = function( url, type, post )
|
||||
{
|
||||
//------------------------------------------------
|
||||
// The 'post' variable needs to be in the following format:
|
||||
//
|
||||
// var=content&var2=content&var3=content
|
||||
//
|
||||
// All values need to be escaped with encodeURIComponent();
|
||||
//------------------------------------------------
|
||||
|
||||
type = type == "POST" ? "POST" : "GET";
|
||||
|
||||
//------------------------------------------------
|
||||
// Use nocache where possible...
|
||||
//------------------------------------------------
|
||||
|
||||
if ( this.nocache == true && type == 'GET' )
|
||||
{
|
||||
url = this.nocache_url( url );
|
||||
}
|
||||
|
||||
//------------------------------------------------
|
||||
// Make sure we're initialized
|
||||
//------------------------------------------------
|
||||
|
||||
if ( ! this.xmlhandler )
|
||||
{
|
||||
this.xml_init();
|
||||
}
|
||||
|
||||
//------------------------------------------------
|
||||
// Only go when ready
|
||||
//------------------------------------------------
|
||||
|
||||
if ( ! this.readystate_not_ready() )
|
||||
{
|
||||
this.xmlhandler.open(type, url, true);
|
||||
|
||||
if ( type == "GET" )
|
||||
{
|
||||
this.xmlhandler.send(null);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( typeof( this.xmlhandler.setRequestHeader ) != "undefined" )
|
||||
{
|
||||
this.xmlhandler.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||
}
|
||||
|
||||
this.xmlhandler.send( post );
|
||||
}
|
||||
|
||||
if ( this.xmlhandler.readyState == 4 && this.xmlhandler.status == 200 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// retrieve text of an XML document element, including
|
||||
// elements using namespaces
|
||||
/*--------------------------------------------*/
|
||||
|
||||
ajax_request.prototype.get_element_text_ns = function(prefix, local, parentElem, index)
|
||||
{
|
||||
var result = "";
|
||||
|
||||
if ( prefix && this.isIE )
|
||||
{
|
||||
//-------------------------------
|
||||
// IE
|
||||
//-------------------------------
|
||||
|
||||
result = parentElem.getElementsByTagName(prefix + ":" + local)[index];
|
||||
}
|
||||
else
|
||||
{
|
||||
//-------------------------------
|
||||
// Safari, Gecko
|
||||
//-------------------------------
|
||||
|
||||
result = parentElem.getElementsByTagName(local)[index];
|
||||
}
|
||||
|
||||
if ( result )
|
||||
{
|
||||
if (result.childNodes.length > 1)
|
||||
{
|
||||
return result.childNodes[1].nodeValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
return result.firstChild.nodeValue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return "n/a";
|
||||
}
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Make sure URL is not cached
|
||||
/*--------------------------------------------*/
|
||||
|
||||
ajax_request.prototype.nocache_url = function (url)
|
||||
{
|
||||
var sep = ( -1 < url.indexOf("?") ) ? "&" : "?";
|
||||
var mydate = new Date();
|
||||
var newurl = url + sep + "__=" + mydate.getTime();
|
||||
return newurl;
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Takes an array of:
|
||||
// array[ field ] = value
|
||||
// and returns a nice encoded POST string
|
||||
/*--------------------------------------------*/
|
||||
|
||||
ajax_request.prototype.format_for_post = function( arrayfields )
|
||||
{
|
||||
var str = '';
|
||||
|
||||
try
|
||||
{
|
||||
for( var i in arrayfields )
|
||||
{
|
||||
str += i + '=' + this.encodeurl(arrayfields[i]) + '&';
|
||||
}
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
}
|
||||
|
||||
return str;
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Hand roll encode URL to UTF-8
|
||||
/*--------------------------------------------*/
|
||||
|
||||
ajax_request.prototype.encodeurl = function( url )
|
||||
{
|
||||
//-------------------------------
|
||||
// Ensure we have a string
|
||||
//-------------------------------
|
||||
|
||||
url = url.toString();
|
||||
|
||||
var regcheck = url.match(/[\x90-\xFF]/g);
|
||||
|
||||
if ( regcheck )
|
||||
{
|
||||
for (var i = 0; i < i.length; i++)
|
||||
{
|
||||
url = url.replace(regcheck[i], '%u00' + (regcheck[i].charCodeAt(0) & 0xFF).toString(16).toUpperCase());
|
||||
}
|
||||
}
|
||||
|
||||
return escape(url).replace(/\+/g, "%2B");
|
||||
};
|
||||
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Check to ensure ready state-ness
|
||||
/*--------------------------------------------*/
|
||||
|
||||
ajax_request.prototype.readystate_not_ready = function()
|
||||
{
|
||||
return ( this.xmlhandler.readyState && ( this.xmlhandler.readyState < 4 ) );
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Check to ensure ready state-ness
|
||||
/*--------------------------------------------*/
|
||||
|
||||
ajax_request.prototype.readystate_ready_and_ok = function()
|
||||
{
|
||||
return ( this.xmlhandler.readyState == 4 && this.xmlhandler.status == 200 ) ? true : false;
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Onready state change event handler
|
||||
/*--------------------------------------------*/
|
||||
|
||||
ajax_request.prototype.onreadystatechange = function( event )
|
||||
{
|
||||
//------------------------------------------------
|
||||
// Make sure we're initialized
|
||||
//------------------------------------------------
|
||||
|
||||
if ( ! this.xmlhandler )
|
||||
{
|
||||
this.xml_init();
|
||||
}
|
||||
|
||||
//------------------------------------------------
|
||||
// Make sure its a function event
|
||||
//------------------------------------------------
|
||||
|
||||
if ( typeof(event) == 'function' )
|
||||
{
|
||||
this.xmlhandler.onreadystatechange = event;
|
||||
}
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Show loading layer
|
||||
/*--------------------------------------------*/
|
||||
|
||||
ajax_request.prototype.show_loading = function( message )
|
||||
{
|
||||
if ( ! this.loading_fired )
|
||||
{
|
||||
this.loading_fired = 1;
|
||||
|
||||
//------------------------------------------------
|
||||
// Change text?
|
||||
//------------------------------------------------
|
||||
|
||||
if ( message )
|
||||
{
|
||||
document.getElementById( 'loading-layer-text' ).innerHTML = message;
|
||||
}
|
||||
|
||||
this.centerdiv = new center_div();
|
||||
this.centerdiv.divname = 'loading-layer';
|
||||
this.centerdiv.move_div();
|
||||
|
||||
//------------------------------------------------
|
||||
// Add the shadow
|
||||
//------------------------------------------------
|
||||
|
||||
add_shadow('loading-layer-shadow', 'loading-layer-inner');
|
||||
}
|
||||
|
||||
return;
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Hide loading layer
|
||||
/*--------------------------------------------*/
|
||||
|
||||
ajax_request.prototype.hide_loading = function()
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( this.centerdiv && this.centerdiv.divobj )
|
||||
{
|
||||
this.centerdiv.hide_div();
|
||||
}
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
}
|
||||
|
||||
this.loading_fired = 0;
|
||||
|
||||
return;
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Execute javascript returned from the HTML
|
||||
/*--------------------------------------------*/
|
||||
|
||||
ajax_request.prototype.execute_javascript = function( source_code )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
var text_blocks = new Array();
|
||||
var max_iteration = 50;
|
||||
var i = 0;
|
||||
|
||||
//-----------------------------------------
|
||||
// Got javascript?
|
||||
// We force [^`] to make it match any character
|
||||
// except a black-tick as JS doesn't have
|
||||
// single line pattern matching.
|
||||
//-----------------------------------------
|
||||
|
||||
while ( _match = source_code.match( new RegExp( "<script\\s+?type=['\"]text/javascript['\"]>([^`]+?)</script>", "i" ) ) )
|
||||
{
|
||||
i++;
|
||||
|
||||
if ( i >= max_iteration )
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
text_blocks[ text_blocks.length ] = _match[1];
|
||||
source_code = source_code.replace( _match[0], '' );
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if ( text_blocks.length )
|
||||
{
|
||||
for ( i = 0 ; i < text_blocks.length ; i++ )
|
||||
{
|
||||
eval( text_blocks[ i ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(error)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// IPB thinks we can use fancy JS, lets see...
|
||||
/*--------------------------------------------*/
|
||||
|
||||
try
|
||||
{
|
||||
if ( use_enhanced_js )
|
||||
{
|
||||
use_enhanced_js = ajax_request.prototype.xml_init() ? 1 : 0;
|
||||
}
|
||||
}
|
||||
catch(error)
|
||||
{
|
||||
var use_enhanced_js = 0;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
<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><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://anonym.to/http://www.invisionboard.com/">Invision Power Board</a>
</body>
</html>
|
||||
@@ -0,0 +1,311 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// IPS JS: Cell select
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
// http://www.invisionpower.com
|
||||
// Matt Mecham (29/11/05)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
var _cell_select;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Initiate object
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function cell_select()
|
||||
{
|
||||
/**
|
||||
* CSS: Table cell row OFF
|
||||
*
|
||||
* @var INT
|
||||
*/
|
||||
this.css_row_off = 'tablerow1';
|
||||
|
||||
/**
|
||||
* CSS: Table cell row ON
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.css_row_on = 'tablerow2selected';
|
||||
|
||||
/**
|
||||
* String: TR row ID part
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.row_tr_id = 'arow';
|
||||
|
||||
/**
|
||||
* String: Checkbox ID part
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.row_checkbox_id = 'acid';
|
||||
|
||||
/**
|
||||
* String: ID name of toggle all box
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.toggle_all_name = 'cellselect-cball';
|
||||
|
||||
/**
|
||||
* String: ID of toggle all box
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
this.toggle_all_id = '';
|
||||
|
||||
/**
|
||||
* String: Flag to see if we have a toggle all box
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
this.toggle_all_flag = 0;
|
||||
|
||||
/**
|
||||
* Array: Selected IDs array
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
this.selected_ids = new Array();
|
||||
|
||||
/**
|
||||
* Array: Total possible cbs
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
this.total_ids = 0;
|
||||
|
||||
/**
|
||||
* Store CSS rows for the original row
|
||||
*/
|
||||
this.store_css_row = new Array();
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Initiate object
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
cell_select.prototype.init = function()
|
||||
{
|
||||
//----------------------------------
|
||||
// Check for toggle all box
|
||||
//----------------------------------
|
||||
|
||||
try
|
||||
{
|
||||
this.toggle_all_id = document.getElementById( this.toggle_all_name );
|
||||
this.toggle_all_flag = 1;
|
||||
this.toggle_all_id.checked = false;
|
||||
}
|
||||
catch(error)
|
||||
{
|
||||
this.toggle_all_flag = 0;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Check checked boxes
|
||||
//----------------------------------
|
||||
|
||||
var checkboxes = document.getElementsByTagName('INPUT');
|
||||
|
||||
_cell_select = this;
|
||||
|
||||
//----------------------------------
|
||||
// Sort through and grab links
|
||||
//----------------------------------
|
||||
|
||||
for ( var i = 0 ; i < checkboxes.length ; i++ )
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( ! checkboxes[i].id )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( checkboxes[i].getAttribute('type') != 'checkbox' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
catch(error)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var cbid = checkboxes[i].id;
|
||||
var cbname = cbid.replace( /^(.*)-(\d+)$/, "$1" );
|
||||
var cbnum = this.get_id_from_text( checkboxes[i].id );
|
||||
|
||||
//----------------------------------
|
||||
// Work with it?
|
||||
//----------------------------------
|
||||
|
||||
if ( cbname == this.row_checkbox_id )
|
||||
{
|
||||
if ( checkboxes[i].getAttribute('checked') || checkboxes[i].checked )
|
||||
{
|
||||
this.row_change_color( cbnum );
|
||||
this.selected_ids[ cbnum ] = 1;
|
||||
this.total_ids++;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.selected_ids[ cbnum ] = 0;
|
||||
this.total_ids++;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Toggle all row has been clicked
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
cell_select.prototype.row_toggle_all = function()
|
||||
{
|
||||
//----------------------------------
|
||||
// Using a toggle all?
|
||||
//----------------------------------
|
||||
|
||||
if ( ! this.toggle_all_flag )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Grab initial state
|
||||
//----------------------------------
|
||||
|
||||
var checkstate = this.toggle_all_id.checked;
|
||||
|
||||
//----------------------------------
|
||||
// Spread the love
|
||||
//----------------------------------
|
||||
|
||||
var checkboxes = document.getElementsByTagName('INPUT');
|
||||
|
||||
//----------------------------------
|
||||
// Sort through and grab links
|
||||
//----------------------------------
|
||||
|
||||
for ( var i = 0 ; i < checkboxes.length ; i++ )
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( ! checkboxes[i].id )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( checkboxes[i].getAttribute('type') != 'checkbox' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
catch(error)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var cbid = checkboxes[i].id;
|
||||
var cbname = cbid.replace( /^(.*)-(\d+)$/, "$1" );
|
||||
var cbnum = this.get_id_from_text( checkboxes[i].id );
|
||||
|
||||
//----------------------------------
|
||||
// Work with it?
|
||||
//----------------------------------
|
||||
|
||||
if ( cbname == this.row_checkbox_id )
|
||||
{
|
||||
checkboxes[i].checked = checkstate;
|
||||
this.selected_ids[ cbnum ] = checkstate ? 0 : 1;
|
||||
this.row_change_color( cbnum );
|
||||
this.selected_ids[ cbnum ] = checkstate ? 1 : 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// A row has been clicked
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
cell_select.prototype.row_clicked = function( row_id )
|
||||
{
|
||||
//----------------------------------
|
||||
// Change color
|
||||
//----------------------------------
|
||||
|
||||
this.row_change_color( row_id );
|
||||
|
||||
//----------------------------------
|
||||
// Reset flag
|
||||
//----------------------------------
|
||||
|
||||
this.selected_ids[ row_id ] = ( this.selected_ids[ row_id ] ) ? 0 : 1;
|
||||
|
||||
//----------------------------------
|
||||
// Test toggle all box
|
||||
//----------------------------------
|
||||
|
||||
if ( this.toggle_all_flag )
|
||||
{
|
||||
var c = 0;
|
||||
|
||||
for( var i in this.selected_ids )
|
||||
{
|
||||
if ( this.selected_ids[i] )
|
||||
{
|
||||
c++;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Number of 'on' not equal to total?
|
||||
//----------------------------------
|
||||
|
||||
if ( c != this.total_ids )
|
||||
{
|
||||
this.toggle_all_id.checked = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.toggle_all_id.checked = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Change color
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
cell_select.prototype.row_change_color = function( row_id )
|
||||
{
|
||||
//----------------------------------
|
||||
// Get Row TDs...
|
||||
//----------------------------------
|
||||
|
||||
var tds = document.getElementById( this.row_tr_id + '-' + row_id ).getElementsByTagName('TD');
|
||||
|
||||
//----------------------------------
|
||||
// Sort through and grab links
|
||||
//----------------------------------
|
||||
|
||||
var _cell = ( this.store_css_row[ row_id ] ) ? this.store_css_row[ row_id ] : this.css_row_off;
|
||||
|
||||
for ( var i = 0 ; i < tds.length ; i++ )
|
||||
{
|
||||
tds[i].className = ( this.selected_ids[ row_id ] ) ? _cell : this.css_row_on;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Grab ID from string
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
cell_select.prototype.get_id_from_text = function( id )
|
||||
{
|
||||
return id.replace( /.*(?:\-|_)(\d+)/, "$1" );
|
||||
};
|
||||
@@ -0,0 +1,910 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// IPS JS: Drag Move
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
// http://www.invisionpower.com
|
||||
// Matt Mecham (27/07/05)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
var drag_move = new dragmove();
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Initiate object
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function dragmove()
|
||||
{
|
||||
/*
|
||||
* Portion of ID name without "-{id}" for
|
||||
* drag handles (object which initiates drag)
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.var_drag_handle_id_text = null;
|
||||
|
||||
/*
|
||||
* URL to redirect to after change
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.var_bounce_url = null;
|
||||
|
||||
/*
|
||||
* Portion of ID name without "-{id}" for
|
||||
* hidden drag elements. These are HTML
|
||||
* blobs which actually get made visible
|
||||
* and are dragged.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.var_drag_draggable_id_text = null;
|
||||
|
||||
/*
|
||||
* Portion of ID name without "-{id}" for
|
||||
* drag objects (the actual drag container)
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.var_drag_object_id_text = null;
|
||||
|
||||
/*
|
||||
* Portion of ID name for the
|
||||
* row which is altered when the drag is
|
||||
* started AND a TARGET copy is created
|
||||
* over it when dragging started
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.var_original_row_text = null;
|
||||
|
||||
/*
|
||||
* Current dragged ID
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
this.current_id = null;
|
||||
|
||||
/*
|
||||
* Drag in progress
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
this._drag_in_progress = null;
|
||||
|
||||
/**
|
||||
* Target IDs (Populated in DHTML)
|
||||
* Must be in the format as follows:
|
||||
* <element id="{this.var_drag_target_id_text}-{id}"></element>
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
this.var_target_ids = new Array();
|
||||
|
||||
/**
|
||||
* Parent IDs (Populated in DHTML)
|
||||
* Must be in the format as follows:
|
||||
* <element id="{this.var_drag_target_id_text}-{id}"></element>
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
this.var_parent_ids = new Array();
|
||||
|
||||
/**
|
||||
* Process parent IDs?
|
||||
* Turn off to not restrict actions
|
||||
* based on parents
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
this.var_parent_process = 1;
|
||||
|
||||
/*
|
||||
* CSS classname of layer that is
|
||||
* drawn above the row when a move
|
||||
* is started
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.var_hide_row_classname = 'dragmove-hide';
|
||||
|
||||
/*
|
||||
* CSS classname of target mouseover
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.var_target_over_classname = 'tablerow3';
|
||||
|
||||
/*
|
||||
* CSS classname of target mouseout
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.var_target_out_classname = 'tablerow2';
|
||||
|
||||
/*
|
||||
* ID of target over
|
||||
* set by mouseover. cleared by mouseout
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.var_target_over_id = null;
|
||||
|
||||
/*
|
||||
* URL of Ajax request
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.var_ajax_url = null;
|
||||
|
||||
/*
|
||||
* Array of FAKE TARGETS
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
this._TARGETS = new Array();
|
||||
|
||||
/*
|
||||
* Array of FAKE TARGETS DImensions
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
this.dims = new Array();
|
||||
|
||||
/*
|
||||
* Array of unmoveable objects
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
this.UNMOVEABLES = new Array();
|
||||
|
||||
/*
|
||||
* ID of "Unmoveable" alert object
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
this.UNMOVEABLES_id = 'dragmove-unmoveable';
|
||||
|
||||
/*
|
||||
* Array of ALL parent ids for a certain ID
|
||||
* Traversing up the parent tree
|
||||
*
|
||||
* var @array
|
||||
*/
|
||||
this.parent_id_tree = new Array();
|
||||
|
||||
/*
|
||||
* Array of ALL children ids for a certain ID
|
||||
* Traversing up the parent tree
|
||||
*
|
||||
* var @array
|
||||
*/
|
||||
this.child_id_tree = new Array();
|
||||
|
||||
/*
|
||||
* Array of ALL children ids / parent
|
||||
* structure
|
||||
*
|
||||
* var @array
|
||||
*/
|
||||
this.child_id_array = new Array();
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Initiate draggable objects
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
dragmove.prototype.drag_init = function()
|
||||
{
|
||||
//----------------------------------
|
||||
// Get page links...
|
||||
// Gah.. another safari bug
|
||||
//----------------------------------
|
||||
|
||||
var draghandles = document.getElementsByTagName('*');
|
||||
|
||||
//----------------------------------
|
||||
// Sort through and grab topic links
|
||||
//----------------------------------
|
||||
|
||||
for ( var i = 0 ; i <= draghandles.length ; i++ )
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( ! draghandles[i].id )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var linkid = draghandles[i].id;
|
||||
var linkname = linkid.replace( /^(.*)-(\d+)$/, "$1" );
|
||||
var thisid = this.get_id_from_text( draghandles[i].id );
|
||||
|
||||
//----------------------------------
|
||||
// SET UP DRAG HANDLES
|
||||
//----------------------------------
|
||||
|
||||
if ( linkname == this.var_drag_handle_id_text )
|
||||
{
|
||||
var drag_main_obj = document.getElementById( this.var_drag_draggable_id_text + '-' + thisid );
|
||||
var drag_handle_obj = document.getElementById( this.var_drag_handle_id_text + '-' + thisid );
|
||||
|
||||
draghandles[i].style.cursor = "move";
|
||||
|
||||
Drag.init( drag_handle_obj, drag_main_obj );
|
||||
|
||||
drag_main_obj.onDrag = function(x, y, e) { dragmove_events.prototype.event_drag_ging( x, y, e ); };
|
||||
drag_main_obj.onDragStart = function(x, y, e) { dragmove_events.prototype.event_drag_start( x, y, e ); };
|
||||
drag_main_obj.onDragEnd = function(x, y, e) { dragmove_events.prototype.event_drag_end( x, y, e ); };
|
||||
|
||||
//----------------------------------
|
||||
// This has to be after Drag.init
|
||||
// to replace mouseover handler
|
||||
//----------------------------------
|
||||
|
||||
drag_handle_obj.onmouseover = dragmove_events.prototype.event_mouseover;
|
||||
drag_handle_obj.onmouseout = dragmove_events.prototype.event_mouseout;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Create child / parent structure
|
||||
//----------------------------------
|
||||
|
||||
if ( this.var_parent_ids.length )
|
||||
{
|
||||
for( var i in this.var_parent_ids )
|
||||
{
|
||||
if ( ! this.child_id_array[ this.var_parent_ids[i] ] )
|
||||
{
|
||||
this.child_id_array[ this.var_parent_ids[i] ] = new Array();
|
||||
}
|
||||
|
||||
this.child_id_array[ this.var_parent_ids[i] ][ this.child_id_array[ this.var_parent_ids[i] ].length ] = i;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Add ID to UNMOVEABLES array
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
dragmove.prototype.get_parents_array = function( root_tid )
|
||||
{
|
||||
if ( this.var_parent_ids[ root_tid ] )
|
||||
{
|
||||
this.parent_id_tree[ this.parent_id_tree.length ] = this.var_parent_ids[ root_tid ];
|
||||
|
||||
this.get_parents_array( this.var_parent_ids[ root_tid ] );
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Add ID to UNMOVEABLES array
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
dragmove.prototype.get_children_array = function( root_tid )
|
||||
{
|
||||
if ( this.child_id_array[ root_tid ] )
|
||||
{
|
||||
for( var i in this.child_id_array[ root_tid ] )
|
||||
{
|
||||
this.child_id_tree[ this.child_id_tree.length ] = this.child_id_array[ root_tid ][i];
|
||||
|
||||
this.get_children_array( this.child_id_array[ root_tid ][i] );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Add ID to UNMOVEABLES array
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
dragmove.prototype.add_id_to_unmoveables = function( tid )
|
||||
{
|
||||
this.UNMOVEABLES[ tid ] = tid;
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Add ID to target array
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
dragmove.prototype.add_id_to_targets = function( tid )
|
||||
{
|
||||
this.var_target_ids[ tid ] = 1;
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Add ID to target array
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
dragmove.prototype.add_id_to_parents = function( tid, parent_id )
|
||||
{
|
||||
this.var_parent_ids[ tid ] = parent_id == 'root' ? 0 : parseInt(parent_id);
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Get TID from ID
|
||||
/*--------------------------------------------*/
|
||||
|
||||
dragmove.prototype.get_id_from_text = function( id )
|
||||
{
|
||||
return id.replace( /.*\-(\d+)/, "$1" );
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Initiate events object
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function dragmove_events()
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// TARGET EVENT: Mouseover
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
dragmove_events.prototype.event_TARGET_mouseover = function(e)
|
||||
{
|
||||
//-------------------------------
|
||||
// Already over a target
|
||||
//-------------------------------
|
||||
|
||||
if ( drag_move.var_target_over_id )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Not dragging?
|
||||
//-------------------------------
|
||||
|
||||
if ( ! drag_move._drag_in_progress )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// No? Get one then
|
||||
//-------------------------------
|
||||
|
||||
drag_move.var_target_over_id = drag_move.get_id_from_text( this.id );
|
||||
|
||||
//-------------------------------
|
||||
// Can we actually mouse over this?
|
||||
// Check parents to make sure we're not
|
||||
// trying to move a child into its existing
|
||||
// parent. Also don't allow to drop over
|
||||
// oneself
|
||||
//-------------------------------
|
||||
|
||||
if ( drag_move.var_parent_process && drag_move.current_id )
|
||||
{
|
||||
//-------------------------------
|
||||
// Move into self
|
||||
//-------------------------------
|
||||
|
||||
if ( drag_move.var_target_over_id == drag_move.current_id )
|
||||
{
|
||||
//-------------------------------
|
||||
// Yeah.. so don't do anything
|
||||
//-------------------------------
|
||||
|
||||
drag_move.var_target_over_id = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Move into current parent
|
||||
//-------------------------------
|
||||
|
||||
if ( drag_move.var_target_over_id == drag_move.var_parent_ids[ drag_move.current_id ] )
|
||||
{
|
||||
//-------------------------------
|
||||
// Yeah.. so don't do anything
|
||||
//-------------------------------
|
||||
|
||||
drag_move.var_target_over_id = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Make sure we're not moving into
|
||||
// own parents
|
||||
//-------------------------------
|
||||
|
||||
drag_move.child_id_tree = new Array();
|
||||
|
||||
drag_move.get_children_array( drag_move.current_id );
|
||||
|
||||
// Add in current ID
|
||||
drag_move.child_id_tree[ drag_move.child_id_tree.length ] = drag_move.current_id;
|
||||
|
||||
for( var i in drag_move.child_id_tree )
|
||||
{
|
||||
if ( drag_move.var_target_over_id == drag_move.child_id_tree[i] )
|
||||
{
|
||||
//-------------------------------
|
||||
// Yeah.. so don't do anything
|
||||
//-------------------------------
|
||||
|
||||
drag_move.var_target_over_id = null;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var target_obj = document.getElementById( drag_move.var_original_row_text + '-' + drag_move.var_target_over_id );
|
||||
|
||||
//-------------------------------
|
||||
// Store old classname...
|
||||
//-------------------------------
|
||||
|
||||
drag_move.var_target_out_classname = target_obj.className;
|
||||
|
||||
//-------------------------------
|
||||
// Change classname...
|
||||
//-------------------------------
|
||||
|
||||
target_obj.className = drag_move.var_target_over_classname;
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// TARGET EVENT: Mouseout
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
dragmove_events.prototype.event_TARGET_mouseout = function(e)
|
||||
{
|
||||
//-------------------------------
|
||||
// Not touched a target?
|
||||
//-------------------------------
|
||||
|
||||
if ( ! drag_move.var_target_over_id )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Not dragging?
|
||||
//-------------------------------
|
||||
|
||||
if ( ! drag_move._drag_in_progress )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Get obj
|
||||
//-------------------------------
|
||||
|
||||
var target_obj = document.getElementById( drag_move.var_original_row_text + '-' + drag_move.var_target_over_id );
|
||||
|
||||
//-------------------------------
|
||||
// Store old classname...
|
||||
//-------------------------------
|
||||
|
||||
target_obj.className = drag_move.var_target_out_classname;
|
||||
|
||||
//-------------------------------
|
||||
// Clear target ID
|
||||
//-------------------------------
|
||||
|
||||
drag_move.var_target_over_id = null;
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// MAIN EVENT: Mouseover
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
dragmove_events.prototype.event_mouseover = function(e)
|
||||
{
|
||||
//-------------------------------
|
||||
// Already dragging?
|
||||
//-------------------------------
|
||||
|
||||
if ( drag_move.current_id )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Unmoveable?
|
||||
//-------------------------------
|
||||
|
||||
var check_for_id = drag_move.UNMOVEABLES[ drag_move.get_id_from_text( this.id ) ];
|
||||
|
||||
if ( check_for_id )
|
||||
{
|
||||
var alert_object = null;
|
||||
|
||||
//-------------------------------
|
||||
// Attempt to get DIV
|
||||
//-------------------------------
|
||||
|
||||
try
|
||||
{
|
||||
alert_object = document.getElementById( drag_move.UNMOVEABLES_id );
|
||||
}
|
||||
catch(error)
|
||||
{
|
||||
drag_move.UNMOVEABLES_id = null;
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Yeah, so draw alert and return
|
||||
//-------------------------------
|
||||
|
||||
if ( alert_object )
|
||||
{
|
||||
var drag_root_obj = document.getElementById( drag_move.var_drag_handle_id_text + '-' + check_for_id );
|
||||
|
||||
alert_object.style.top = ipsclass.get_obj_toppos( drag_root_obj ) - 4 + 'px';
|
||||
alert_object.style.left = ipsclass.get_obj_leftpos( drag_root_obj ) + 22 + 'px';
|
||||
alert_object.style.position = 'absolute';
|
||||
alert_object.style.display = '';
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// No? Get one then
|
||||
//-------------------------------
|
||||
|
||||
drag_move.current_id = drag_move.get_id_from_text( this.id );
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// MAIN EVENT: Mouseout
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
dragmove_events.prototype.event_mouseout = function(e)
|
||||
{
|
||||
//-------------------------------
|
||||
// Unmoveable?
|
||||
//-------------------------------
|
||||
|
||||
var check_for_id = drag_move.UNMOVEABLES[ drag_move.get_id_from_text( this.id ) ];
|
||||
|
||||
if ( check_for_id )
|
||||
{
|
||||
var alert_object = null;
|
||||
|
||||
//-------------------------------
|
||||
// Attempt to get DIV
|
||||
//-------------------------------
|
||||
|
||||
try
|
||||
{
|
||||
alert_object = document.getElementById( drag_move.UNMOVEABLES_id );
|
||||
}
|
||||
catch(error)
|
||||
{
|
||||
drag_move.UNMOVEABLES_id = null;
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Yeah, so draw alert and return
|
||||
//-------------------------------
|
||||
|
||||
if ( alert_object )
|
||||
{
|
||||
alert_object.style.display = 'none';
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Release current drag ID
|
||||
// only if a drag is not in
|
||||
// progress
|
||||
//-------------------------------
|
||||
|
||||
if ( ! drag_move._drag_in_progress )
|
||||
{
|
||||
drag_move.current_id = null;
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// DRAG EVENT: DRAG IN PROGRESS (No, not men in dresses)
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
dragmove_events.prototype.event_drag_ging = function( x, y )
|
||||
{
|
||||
if ( is_ie )
|
||||
{
|
||||
var bingo = 0;
|
||||
|
||||
if ( drag_move.var_target_ids.length )
|
||||
{
|
||||
for ( var i in drag_move.var_target_ids )
|
||||
{
|
||||
if ( x >= drag_move.dims[ i ]['x1']
|
||||
&& x <= drag_move.dims[ i ]['x2']
|
||||
&& y >= drag_move.dims[ i ]['y1']
|
||||
&& y <= drag_move.dims[ i ]['y2']
|
||||
)
|
||||
{
|
||||
bingo = 1;
|
||||
this.id = i;
|
||||
dragmove_events.prototype.event_TARGET_mouseover();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! bingo )
|
||||
{
|
||||
dragmove_events.prototype.event_TARGET_mouseout();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// DRAG START: Gentlemen, start your dresses!
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
dragmove_events.prototype.event_drag_start = function( x, y )
|
||||
{
|
||||
//-------------------------------
|
||||
// Time for hidden div to make
|
||||
// a showing...
|
||||
//-------------------------------
|
||||
|
||||
if ( drag_move.current_id )
|
||||
{
|
||||
var drag_main_obj = document.getElementById( drag_move.var_drag_draggable_id_text + '-' + drag_move.current_id );
|
||||
var drag_root_obj = document.getElementById( drag_move.var_drag_object_id_text + '-' + drag_move.current_id );
|
||||
var drag_orig_obj = document.getElementById( drag_move.var_original_row_text + '-' + drag_move.current_id );
|
||||
|
||||
//-------------------------------
|
||||
// For some reason, Safari wants
|
||||
// to be relative..
|
||||
//-------------------------------
|
||||
|
||||
if ( is_safari )
|
||||
{
|
||||
drag_root_obj.style.position = 'relative';
|
||||
}
|
||||
|
||||
drag_main_obj.style.top = ipsclass.get_obj_toppos( drag_root_obj ) + 'px';
|
||||
drag_main_obj.style.left = ipsclass.get_obj_leftpos( drag_root_obj ) + 'px';
|
||||
drag_main_obj.style.position = 'absolute';
|
||||
drag_main_obj.style.display = 'block';
|
||||
drag_main_obj.style.zIndex = 1000;
|
||||
|
||||
//-------------------------------
|
||||
// Set up TARGETS
|
||||
//-------------------------------
|
||||
|
||||
if ( drag_move.var_target_ids.length )
|
||||
{
|
||||
for ( var i in drag_move.var_target_ids )
|
||||
{
|
||||
var main_obj = document.getElementById( drag_move.var_original_row_text + '-' + i );
|
||||
|
||||
//-------------------------------
|
||||
// For some reason, Safari wants
|
||||
// to be relative..
|
||||
//-------------------------------
|
||||
|
||||
if ( is_safari )
|
||||
{
|
||||
main_obj.style.position = 'relative';
|
||||
}
|
||||
|
||||
if ( is_ie )
|
||||
{
|
||||
//-------------------------------
|
||||
// IE has problems with onmouseover
|
||||
// and zIndex.. couldn't resolve it
|
||||
// so cheated. slower, hence IE only
|
||||
// Gen co-ord maps of targets
|
||||
//-------------------------------
|
||||
|
||||
drag_move.dims[ i ] = new Array();
|
||||
|
||||
drag_move.dims[ i ]['x1'] = ipsclass.get_obj_leftpos(main_obj);
|
||||
drag_move.dims[ i ]['x2'] = drag_move.dims[i]['x1'] + main_obj.offsetWidth;
|
||||
drag_move.dims[ i ]['y1'] = ipsclass.get_obj_toppos(main_obj) - 20;
|
||||
|
||||
// We need to leave a gutter at the bottom / top of each target area to allow
|
||||
// the mouse out event to fire otherwise two targets together will show as one
|
||||
// big target
|
||||
drag_move.dims[ i ]['y2'] = drag_move.dims[i]['y1'] + main_obj.offsetHeight - 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
var targetobj = document.createElement('div');
|
||||
targetobj.id = drag_move.var_original_row_text + '-TARGET-' + i;
|
||||
targetobj.style.background = 'transparent';
|
||||
targetobj.style.position = 'absolute';
|
||||
targetobj.style.left = ipsclass.get_obj_leftpos(main_obj) + 'px';
|
||||
targetobj.style.top = ipsclass.get_obj_toppos(main_obj) + 'px';
|
||||
targetobj.style.width = main_obj.offsetWidth + 'px';
|
||||
targetobj.style.height = main_obj.offsetHeight + 'px';
|
||||
targetobj.style.zIndex = 1000;
|
||||
|
||||
document.body.appendChild(targetobj);
|
||||
|
||||
drag_move._TARGETS[ drag_move._TARGETS.length ] = targetobj;
|
||||
|
||||
targetobj.onmouseover = dragmove_events.prototype.event_TARGET_mouseover;
|
||||
targetobj.onmouseout = dragmove_events.prototype.event_TARGET_mouseout;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Alter original row
|
||||
//-------------------------------
|
||||
|
||||
if ( ! document.getElementById( drag_move.var_original_row_text + '-HIDDEN-' + drag_move.current_id ) )
|
||||
{
|
||||
var newdiv = document.createElement('DIV');
|
||||
newdiv.id = drag_move.var_original_row_text + '-HIDDEN-' + drag_move.current_id;
|
||||
newdiv.className = (is_ie ) ? drag_move.var_hide_row_classname+'-ie' : drag_move.var_hide_row_classname+'-moz';
|
||||
newdiv.style.position = 'absolute';
|
||||
newdiv.style.top = ipsclass.get_obj_toppos( drag_root_obj ) + 'px';
|
||||
newdiv.style.left = ipsclass.get_obj_leftpos( drag_root_obj ) + 'px';
|
||||
newdiv.style.width = drag_orig_obj.offsetWidth + 'px';
|
||||
newdiv.style.height = drag_orig_obj.offsetHeight + 'px';
|
||||
|
||||
document.body.appendChild(newdiv);
|
||||
}
|
||||
else
|
||||
{
|
||||
var newdiv = document.getElementById( drag_move.var_original_row_text + '-HIDDEN-' + drag_move.current_id );
|
||||
newdiv.style.display = '';
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Set drag flag
|
||||
//-------------------------------
|
||||
|
||||
drag_move._drag_in_progress = 1;
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// DRAG START: Time to remove the makeup
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
dragmove_events.prototype.event_drag_end = function( x, y )
|
||||
{
|
||||
//-------------------------------
|
||||
// Hide DIV
|
||||
//-------------------------------
|
||||
|
||||
if ( drag_move.current_id )
|
||||
{
|
||||
var drag_main_obj = document.getElementById( drag_move.var_drag_draggable_id_text + '-' + drag_move.current_id );
|
||||
var drag_root_obj = document.getElementById( drag_move.var_drag_object_id_text + '-' + drag_move.current_id );
|
||||
var drag_orig_obj = document.getElementById( drag_move.var_original_row_text + '-' + drag_move.current_id );
|
||||
|
||||
//-------------------------------
|
||||
// Hide draggable thing
|
||||
//-------------------------------
|
||||
|
||||
drag_main_obj.style.display = 'none';
|
||||
|
||||
//-------------------------------
|
||||
// Hide row cover
|
||||
//-------------------------------
|
||||
|
||||
if ( document.getElementById( drag_move.var_original_row_text + '-HIDDEN-' + drag_move.current_id ) )
|
||||
{
|
||||
document.getElementById( drag_move.var_original_row_text + '-HIDDEN-' + drag_move.current_id ).style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// CLEAR TARGETS
|
||||
//-------------------------------
|
||||
|
||||
if ( drag_move._TARGETS )
|
||||
{
|
||||
for ( var i in drag_move._TARGETS )
|
||||
{
|
||||
document.body.removeChild( drag_move._TARGETS[i] );
|
||||
}
|
||||
|
||||
drag_move._TARGETS = new Array();
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Did we drop on a target?
|
||||
//-------------------------------
|
||||
|
||||
if ( drag_move.var_target_over_id )
|
||||
{
|
||||
var new_parent_id = drag_move.var_target_over_id;
|
||||
var page_id = drag_move.current_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() )
|
||||
{
|
||||
xmlobj.show_loading( "Move in progress..." );
|
||||
return;
|
||||
}
|
||||
|
||||
xmlobj.hide_loading();
|
||||
|
||||
//----------------------------------
|
||||
// INIT
|
||||
//----------------------------------
|
||||
|
||||
var returned = xmlobj.xmlhandler.responseText;
|
||||
|
||||
if ( returned.match( /<null>(0|-|\=)<\/null>/ ) )
|
||||
{
|
||||
alert( "Error occured, move not completed " + returned );
|
||||
}
|
||||
else
|
||||
{
|
||||
window.location = drag_move.var_bounce_url;
|
||||
}
|
||||
};
|
||||
|
||||
//----------------------------------
|
||||
// LOAD XML
|
||||
//----------------------------------
|
||||
|
||||
xmlobj = new ajax_request();
|
||||
xmlobj.onreadystatechange( do_request_function );
|
||||
xmlobj.process( drag_move.var_ajax_url +'&pid='+page_id+'&new_parent_id='+new_parent_id );
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Release current drag ID
|
||||
//-------------------------------
|
||||
|
||||
drag_move.current_id = null;
|
||||
|
||||
//-------------------------------
|
||||
// Set drag flag
|
||||
//-------------------------------
|
||||
|
||||
drag_move._drag_in_progress = null;
|
||||
|
||||
//-------------------------------
|
||||
// Change colour back...
|
||||
//-------------------------------
|
||||
|
||||
if ( drag_move.var_target_over_id )
|
||||
{
|
||||
//-------------------------------
|
||||
// Get obj
|
||||
//-------------------------------
|
||||
|
||||
var target_obj = document.getElementById( drag_move.var_original_row_text + '-' + drag_move.var_target_over_id );
|
||||
|
||||
//-------------------------------
|
||||
// Store old classname...
|
||||
//-------------------------------
|
||||
|
||||
target_obj.className = drag_move.var_target_out_classname;
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Clear target ID
|
||||
//-------------------------------
|
||||
|
||||
drag_move.var_target_over_id = null;
|
||||
};
|
||||
@@ -0,0 +1,402 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// IPS JS: Form Functions
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
// http://www.invisionpower.com
|
||||
// Matt Mecham (17/10/05)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
var _form_functions = null;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Initiate object
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function form_functions()
|
||||
{
|
||||
/**
|
||||
* Name: Form
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.name_form = 'mainform';
|
||||
|
||||
/**
|
||||
* ID: Form
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.obj_form = null;
|
||||
|
||||
/**
|
||||
* ID: Form Edited
|
||||
*
|
||||
* @var INT
|
||||
*/
|
||||
this.form_edited = 1;
|
||||
|
||||
/**
|
||||
* NAME: Edit hold
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.name_edit_hold = 'page-edit-hold';
|
||||
|
||||
/**
|
||||
* ID: Edit hold
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.id_edit_hold = null;
|
||||
|
||||
/**
|
||||
* Saved onsubmit handlers
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.form_onsubmit_saved = null;
|
||||
|
||||
/**
|
||||
* Array of form BUTTON div id names
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
this.form_button_divs = new Array();
|
||||
|
||||
/**
|
||||
* Array of form LINK div id names
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
this.form_link_divs = new Array();
|
||||
|
||||
/**
|
||||
* Array of form EVAL div id names
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
this.form_eval_divs = new Array();
|
||||
|
||||
/**
|
||||
* CSS styles: Button off
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.css_formbutton_off = 'formbutton-off';
|
||||
|
||||
/**
|
||||
* CSS styles: Button on
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.css_formbutton_on = 'formbutton-on';
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Initiate object
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
form_functions.prototype.init = function()
|
||||
{
|
||||
//----------------------------------
|
||||
// Get form object
|
||||
//----------------------------------
|
||||
|
||||
this.obj_form = document.getElementById( this.name_form );
|
||||
|
||||
//----------------------------------
|
||||
// Already got a submit handler?
|
||||
//----------------------------------
|
||||
|
||||
if ( this.obj_form.onsubmit )
|
||||
{
|
||||
this.form_onsubmit_saved = this.obj_form.onsubmit;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Got the hold box?
|
||||
//----------------------------------
|
||||
|
||||
try
|
||||
{
|
||||
this.id_edit_hold = document.getElementById( this.name_edit_hold );
|
||||
}
|
||||
catch(error)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Get page links...
|
||||
// Gah.. another safari bug
|
||||
//----------------------------------
|
||||
|
||||
var inputs = this.obj_form.getElementsByTagName('INPUT');
|
||||
|
||||
_form_functions = this;
|
||||
|
||||
//----------------------------------
|
||||
// Sort through and grab links
|
||||
//----------------------------------
|
||||
|
||||
for ( var i = 0 ; i <= inputs.length ; i++ )
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( inputs[i].type == 'hidden' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
catch(error)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
inputs[i].onchange = this.form_event_edited;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Form check...
|
||||
//----------------------------------
|
||||
|
||||
this.obj_form.onsubmit = this.form_submit;
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Initiate object
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
form_functions.prototype.add_submit_event = function( div_id, field_name, init_value, onsubmit_value )
|
||||
{
|
||||
var div_obj = null;
|
||||
|
||||
//----------------------------------
|
||||
// Make sure we got one...
|
||||
//----------------------------------
|
||||
|
||||
try
|
||||
{
|
||||
div_obj = document.getElementById( div_id );
|
||||
}
|
||||
catch( error )
|
||||
{
|
||||
alert( "Could not initialize field: " + div_id );
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Add hidden field to form...
|
||||
//----------------------------------
|
||||
|
||||
if ( field_name )
|
||||
{
|
||||
var field = document.createElement('input');
|
||||
|
||||
field.type = 'hidden';
|
||||
field.value = init_value;
|
||||
field.name = field_name;
|
||||
field.id = 'field--x--' + div_id;
|
||||
|
||||
this.obj_form.appendChild( field );
|
||||
|
||||
this.form_button_divs[ div_id ] = onsubmit_value;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Add event handlers...
|
||||
//----------------------------------
|
||||
|
||||
div_obj.onmouseover = this.form_button_mouseover;
|
||||
div_obj.onmouseout = this.form_button_mouseout;
|
||||
div_obj.onclick = this.form_button_submit;
|
||||
|
||||
div_obj.className = this.css_formbutton_off;
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Add EVAL event
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
form_functions.prototype.add_eval_event = function( div_id, eval_code )
|
||||
{
|
||||
var div_obj = null;
|
||||
|
||||
//----------------------------------
|
||||
// Make sure we got one...
|
||||
//----------------------------------
|
||||
|
||||
try
|
||||
{
|
||||
div_obj = document.getElementById( div_id );
|
||||
}
|
||||
catch( error )
|
||||
{
|
||||
alert( "Could not initialize event: " + div_id );
|
||||
return false;
|
||||
}
|
||||
|
||||
this.form_eval_divs[ div_id ] = eval_code;
|
||||
|
||||
//----------------------------------
|
||||
// Add event handlers...
|
||||
//----------------------------------
|
||||
|
||||
div_obj.onmouseover = this.form_button_mouseover;
|
||||
div_obj.onmouseout = this.form_button_mouseout;
|
||||
div_obj.onclick = this.form_button_eval_click;
|
||||
|
||||
div_obj.className = this.css_formbutton_off;
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Add LINK event
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
form_functions.prototype.add_link_event = function( div_id, link_url )
|
||||
{
|
||||
var div_obj = null;
|
||||
|
||||
//----------------------------------
|
||||
// Make sure we got one...
|
||||
//----------------------------------
|
||||
|
||||
try
|
||||
{
|
||||
div_obj = document.getElementById( div_id );
|
||||
}
|
||||
catch( error )
|
||||
{
|
||||
alert( "Could not initialize event: " + div_id );
|
||||
return false;
|
||||
}
|
||||
|
||||
this.form_link_divs[ div_id ] = link_url;
|
||||
|
||||
//----------------------------------
|
||||
// Add event handlers...
|
||||
//----------------------------------
|
||||
|
||||
div_obj.onmouseover = this.form_button_mouseover;
|
||||
div_obj.onmouseout = this.form_button_mouseout;
|
||||
div_obj.onclick = this.form_button_link_click;
|
||||
|
||||
div_obj.className = this.css_formbutton_off;
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Div EVAL has been clicked...
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
form_functions.prototype.form_button_eval_click = function()
|
||||
{
|
||||
try
|
||||
{
|
||||
eval( _form_functions.form_eval_divs[ this.id ] );
|
||||
}
|
||||
catch( error )
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Div Link has been clicked...
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
form_functions.prototype.form_button_link_click = function()
|
||||
{
|
||||
try
|
||||
{
|
||||
window.location = _form_functions.form_link_divs[ this.id ];
|
||||
}
|
||||
catch( error )
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// The form has changed...
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
form_functions.prototype.form_button_submit = function()
|
||||
{
|
||||
try
|
||||
{
|
||||
var field_obj = document.getElementById( 'field--x--' + this.id );
|
||||
field_obj.value = _form_functions.form_button_divs[ this.id ];
|
||||
}
|
||||
catch( error )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Submit..
|
||||
//----------------------------------
|
||||
|
||||
_form_functions.form_submit();
|
||||
_form_functions.obj_form.submit();
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// The form has changed...
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
form_functions.prototype.form_button_mouseover = function()
|
||||
{
|
||||
this.className = _form_functions.css_formbutton_on;
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// The form has changed...
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
form_functions.prototype.form_button_mouseout = function()
|
||||
{
|
||||
this.className = _form_functions.css_formbutton_off;
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// The form has changed...
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
form_functions.prototype.form_event_edited = function()
|
||||
{
|
||||
_form_functions.form_edited = 1;
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// The form has changed...
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
form_functions.prototype.form_submit = function()
|
||||
{
|
||||
var retval = true;
|
||||
|
||||
if ( _form_functions.form_edited )
|
||||
{
|
||||
//alert ("Form edited" );
|
||||
}
|
||||
|
||||
if ( _form_functions.form_onsubmit_saved )
|
||||
{
|
||||
eval( 'tmpsubmit = ' + _form_functions.form_onsubmit_saved );
|
||||
retval = tmpsubmit();
|
||||
}
|
||||
|
||||
return retval;
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// The form has changed...
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
form_functions.prototype.document_onblur = function()
|
||||
{
|
||||
if ( _form_functions.form_edited )
|
||||
{
|
||||
//alert ("Form edited" );
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,184 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// IPS JS: Tabby Cat.
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
// http://www.invisionpower.com
|
||||
// Matt Mecham (02/11/05)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
var _tab_factory;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Initiate object
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function tab_factory()
|
||||
{
|
||||
/**
|
||||
* ID: CSS: Tab off class
|
||||
*
|
||||
* @var INT
|
||||
*/
|
||||
this.css_tab_off = 'taboff';
|
||||
|
||||
/**
|
||||
* ID: Form
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.css_tab_on = 'tabon';
|
||||
|
||||
/**
|
||||
* String: Part tab set up
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.string_tab_id = 'tabtab';
|
||||
|
||||
/**
|
||||
* String: Part tab pane
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
this.string_tab_pane = 'tabpane';
|
||||
|
||||
/**
|
||||
* String: Tab array
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
this.stored_tabs = new Array();
|
||||
|
||||
/**
|
||||
* String: Panes array
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
this.stored_panes = new Array();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Initiate object
|
||||
function tab_factory_init_tabs() { }
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
tab_factory.prototype.init_tabs = function()
|
||||
{
|
||||
//----------------------------------
|
||||
// Get page divs...
|
||||
//----------------------------------
|
||||
|
||||
var divs = document.getElementsByTagName('DIV');
|
||||
var divcount = 0;
|
||||
|
||||
_tab_factory = this;
|
||||
|
||||
//----------------------------------
|
||||
// Sort through and grab links
|
||||
//----------------------------------
|
||||
|
||||
for ( var i = 0 ; i <= divs.length ; i++ )
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( ! divs[i].id )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
catch(error)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var divid = divs[i].id;
|
||||
var divname = divid.replace( /^(.*)-(\d+)$/, "$1" );
|
||||
var divnum = this.get_id_from_text( divs[i].id );
|
||||
|
||||
//----------------------------------
|
||||
// Work with it?
|
||||
//----------------------------------
|
||||
|
||||
if ( divname == this.string_tab_id )
|
||||
{
|
||||
this.stored_tabs[ divnum ] = divs[i];
|
||||
|
||||
divs[i].style.cursor = 'pointer';
|
||||
|
||||
divs[i].onclick = this.toggle_tabs;
|
||||
|
||||
//----------------------------------
|
||||
// Set correct classes / display
|
||||
//----------------------------------
|
||||
|
||||
this.stored_panes[ divnum ] = document.getElementById( this.string_tab_pane + '-' + divnum );
|
||||
|
||||
if ( divcount == 0 )
|
||||
{
|
||||
// First tab...
|
||||
divs[i].className = this.css_tab_on;
|
||||
divs[i].style.display = 'block';
|
||||
|
||||
this.stored_panes[ divnum ].style.display = 'block';
|
||||
}
|
||||
else
|
||||
{
|
||||
// Second tab
|
||||
divs[i].className = this.css_tab_off;
|
||||
divs[i].style.display = 'block';
|
||||
|
||||
this.stored_panes[ divnum ].style.display = 'none';
|
||||
}
|
||||
|
||||
divcount++;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// The form has changed...
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
tab_factory.prototype.toggle_tabs = function(event)
|
||||
{
|
||||
//-------------------------------
|
||||
// No? Get one then
|
||||
//-------------------------------
|
||||
|
||||
var tabid = _tab_factory.get_id_from_text( this.id );
|
||||
|
||||
//-------------------------------
|
||||
// Got it?
|
||||
//-------------------------------
|
||||
|
||||
for ( var i in _tab_factory.stored_tabs )
|
||||
{
|
||||
if ( i == tabid )
|
||||
{
|
||||
_tab_factory.stored_tabs[ i ].style.display = 'block';
|
||||
_tab_factory.stored_tabs[ i ].className = _tab_factory.css_tab_on;
|
||||
_tab_factory.stored_panes[ i ].style.display = 'block';
|
||||
}
|
||||
else
|
||||
{
|
||||
_tab_factory.stored_tabs[ i ].style.display = 'block';
|
||||
_tab_factory.stored_tabs[ i ].className = _tab_factory.css_tab_off;
|
||||
_tab_factory.stored_panes[ i ].style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
// Stop scrolling to top of the page...
|
||||
ipsclass.cancel_bubble( event );
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Grab ID from string
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
tab_factory.prototype.get_id_from_text = function( id )
|
||||
{
|
||||
return id.replace( /.*\-(\d+)/, "$1" );
|
||||
};
|
||||
@@ -0,0 +1,559 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// IPS JS: Content Pages Functions
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
// http://www.invisionpower.com
|
||||
// Matt Mecham (27/07/05)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
var _this;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Initiate object
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function titleedit()
|
||||
{
|
||||
this.var_ajax_url = null;
|
||||
|
||||
// Click delay
|
||||
this.var_click_delay = 1200;
|
||||
|
||||
this.var_link_id_text = 'pages-link';
|
||||
this.var_span_id_text = 'pages-page';
|
||||
this.var_div_main = 'pages-main';
|
||||
|
||||
// Language
|
||||
this.lang_click_and_hold = null;
|
||||
|
||||
// Internal stuff
|
||||
this._tid_timeout = null;
|
||||
this._new_text = null;
|
||||
this._tid_links_init = 0;
|
||||
this._tid_date = new Array();
|
||||
this._span_contents = new Array();
|
||||
this._link_contents = new Array();
|
||||
|
||||
/**
|
||||
* Array of uneditable IDs
|
||||
*
|
||||
*/
|
||||
this.UNEDITABLES = new Array();
|
||||
|
||||
/**
|
||||
* ID part of uneditable alert box
|
||||
*
|
||||
*/
|
||||
|
||||
this.uneditable_id_text = 'titleedit-uneditable';
|
||||
|
||||
// Set up divs
|
||||
this.div_main_wrap = document.getElementById( this.var_div_main );
|
||||
|
||||
/**
|
||||
* Type of edit box required
|
||||
* Allowed: text, textarea
|
||||
*/
|
||||
this.edit_box = 'text';
|
||||
this.edit_box_ta_rows = 5;
|
||||
this.edit_box_ta_cols = 45;
|
||||
|
||||
/**
|
||||
* Allows the use of a secret DIV
|
||||
* to keep the content updated
|
||||
* Leave blank to not use
|
||||
*/
|
||||
this.var_real_id_text = '';
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Initiate object
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
titleedit.prototype.init = function()
|
||||
{
|
||||
//----------------------------------
|
||||
// Get page links...
|
||||
// Gah.. another safari bug
|
||||
//----------------------------------
|
||||
|
||||
var pagelinks = document.getElementsByTagName('*');
|
||||
|
||||
_this = this;
|
||||
|
||||
//----------------------------------
|
||||
// Sort through and grab topic links
|
||||
//----------------------------------
|
||||
|
||||
for ( var i = 0 ; i <= pagelinks.length ; i++ )
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( ! pagelinks[i].id )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var linkid = pagelinks[i].id;
|
||||
var linkname = linkid.replace( /^(.*)-(\d+)$/, "$1" );
|
||||
var linknum = linkid.replace( /^(.*)-(\d+)$/, "$2" );
|
||||
|
||||
if ( linkname == this.var_link_id_text )
|
||||
{
|
||||
if ( this.UNEDITABLES[ linknum ] )
|
||||
{
|
||||
pagelinks[i].onmouseover = this.title_mouseover;
|
||||
pagelinks[i].onmouseout = this.title_mouseout;
|
||||
}
|
||||
else
|
||||
{
|
||||
pagelinks[i].onmousedown = this.title_mousedown;
|
||||
pagelinks[i].onmouseup = this.title_mouseup;
|
||||
|
||||
if ( ! this._tid_links_init )
|
||||
{
|
||||
pagelinks[i].title = pagelinks[i].title ? pagelinks[i].title + ". " + this.lang_click_and_hold : this.lang_click_and_hold;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this._tid_links_init = 1;
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Mouseover: Show alert
|
||||
/*--------------------------------------------*/
|
||||
|
||||
|
||||
titleedit.prototype.title_mouseover = function( event )
|
||||
{
|
||||
//----------------------------------
|
||||
// Prevent link loading
|
||||
//----------------------------------
|
||||
|
||||
event = ipsclass.cancel_bubble( event, true );
|
||||
|
||||
//----------------------------------
|
||||
// Get TID
|
||||
//----------------------------------
|
||||
|
||||
var tid = _this.get_tid_from_id( this.id );
|
||||
|
||||
//-------------------------------
|
||||
// Unmoveable?
|
||||
//-------------------------------
|
||||
|
||||
var check_for_id = _this.UNEDITABLES[ tid ];
|
||||
|
||||
if ( check_for_id )
|
||||
{
|
||||
var alert_object = null;
|
||||
|
||||
//-------------------------------
|
||||
// Attempt to get DIV
|
||||
//-------------------------------
|
||||
|
||||
try
|
||||
{
|
||||
alert_object = document.getElementById( _this.uneditable_id_text );
|
||||
}
|
||||
catch(error)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Yeah, so draw alert and return
|
||||
//-------------------------------
|
||||
|
||||
if ( alert_object )
|
||||
{
|
||||
var root_obj = document.getElementById( _this.var_link_id_text + '-' + check_for_id );
|
||||
|
||||
//-------------------------------
|
||||
// For some reason, Safari wants
|
||||
// to be relative..
|
||||
//-------------------------------
|
||||
|
||||
if ( is_safari )
|
||||
{
|
||||
root_obj.style.position = 'relative';
|
||||
}
|
||||
|
||||
alert_object.style.top = ipsclass.get_obj_toppos( root_obj ) - 4 + 'px';
|
||||
alert_object.style.left = ipsclass.get_obj_leftpos( root_obj ) + 5 + root_obj.offsetWidth + 'px';
|
||||
alert_object.style.position = 'absolute';
|
||||
alert_object.style.display = '';
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Mouseout: Hide alert
|
||||
/*--------------------------------------------*/
|
||||
|
||||
|
||||
titleedit.prototype.title_mouseout = function( event )
|
||||
{
|
||||
//----------------------------------
|
||||
// Prevent link loading
|
||||
//----------------------------------
|
||||
|
||||
event = ipsclass.cancel_bubble( event, true );
|
||||
|
||||
//----------------------------------
|
||||
// Get TID
|
||||
//----------------------------------
|
||||
|
||||
var tid = _this.get_tid_from_id( this.id );
|
||||
|
||||
//-------------------------------
|
||||
// Unmoveable?
|
||||
//-------------------------------
|
||||
|
||||
var check_for_id = _this.UNEDITABLES[ tid ];
|
||||
|
||||
if ( check_for_id )
|
||||
{
|
||||
var alert_object = null;
|
||||
|
||||
//-------------------------------
|
||||
// Attempt to get DIV
|
||||
//-------------------------------
|
||||
|
||||
try
|
||||
{
|
||||
alert_object = document.getElementById( _this.uneditable_id_text );
|
||||
}
|
||||
catch(error)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Yeah, so draw alert and return
|
||||
//-------------------------------
|
||||
|
||||
if ( alert_object )
|
||||
{
|
||||
alert_object.style.display = 'none';
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Mousedown, start timer
|
||||
/*--------------------------------------------*/
|
||||
|
||||
|
||||
titleedit.prototype.title_mousedown = function( event )
|
||||
{
|
||||
//----------------------------------
|
||||
// Prevent link loading
|
||||
//----------------------------------
|
||||
|
||||
event = ipsclass.cancel_bubble( event, true );
|
||||
|
||||
//----------------------------------
|
||||
// Get TID
|
||||
//----------------------------------
|
||||
|
||||
var tid = _this.get_tid_from_id( this.id );
|
||||
|
||||
//----------------------------------
|
||||
// Start...
|
||||
//----------------------------------
|
||||
|
||||
_this._tid_date[ tid ] = _this.get_time_now();
|
||||
|
||||
//----------------------------------
|
||||
// Start loop
|
||||
//----------------------------------
|
||||
|
||||
_this._tid_timeout = setTimeout( "_this.link_event_timer("+tid+")", 5 );
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Event, loop
|
||||
/*--------------------------------------------*/
|
||||
|
||||
|
||||
titleedit.prototype.link_event_timer = function( tid )
|
||||
{
|
||||
//----------------------------------
|
||||
// Get time now
|
||||
//----------------------------------
|
||||
|
||||
var timenow = this.get_time_now();
|
||||
|
||||
//----------------------------------
|
||||
// Click held for 1.5 s+?
|
||||
//----------------------------------
|
||||
|
||||
if ( timenow > 0 && this._tid_date[tid] > 0 && ( (timenow - this._tid_date[tid] ) > this.var_click_delay ) )
|
||||
{
|
||||
//----------------------------------
|
||||
// Yeah.. wipe tid time and convert
|
||||
//----------------------------------
|
||||
|
||||
this._tid_date[tid] = 0;
|
||||
this.span_to_input( tid );
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Not wiped? loop on!
|
||||
//----------------------------------
|
||||
|
||||
if ( this._tid_date[tid] > 0 )
|
||||
{
|
||||
this._tid_timeout = setTimeout( "_this.link_event_timer("+tid+")", 5 );
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Turn topic title into text input
|
||||
/*--------------------------------------------*/
|
||||
|
||||
|
||||
titleedit.prototype.span_to_input = function( tid )
|
||||
{
|
||||
//----------------------------------
|
||||
// Using fancy js?
|
||||
//----------------------------------
|
||||
|
||||
if ( ! use_enhanced_js )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
this._span_contents[ tid ] = document.getElementById( this.var_span_id_text + '-' + tid ).innerHTML;
|
||||
this._link_contents[ tid ] = document.getElementById( this.var_link_id_text + '-' + tid ).innerHTML;
|
||||
|
||||
var value = '';
|
||||
|
||||
//----------------------------------
|
||||
// Using hidden div or not?
|
||||
//----------------------------------
|
||||
|
||||
if ( this.var_real_id_text )
|
||||
{
|
||||
value = document.getElementById( this.var_real_id_text + '-' + tid ).innerHTML;
|
||||
}
|
||||
else
|
||||
{
|
||||
value = this._link_contents[ tid ];
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Show edit box
|
||||
//----------------------------------
|
||||
|
||||
if ( this.edit_box == 'text' )
|
||||
{
|
||||
value = value.replace( /"/g, '"');
|
||||
document.getElementById(this.var_span_id_text + '-' + tid ).innerHTML = '<input id="edit-'+tid+'" class="dny-edit-title" type="text" size="30" onblur="_this.edit_blur(\''+tid+'\')" onkeypress="_this.edit_keypress(event, \''+tid+'\')" value="'+value+'" />';
|
||||
}
|
||||
else
|
||||
{
|
||||
value = value.replace( /<\/textarea>/g, '</textarea>');
|
||||
document.getElementById(this.var_span_id_text + '-' + tid ).innerHTML = '<textarea id="edit-'+tid+'" class="dny-edit-title" cols="'+this.edit_box_ta_cols+'" rows="'+this.edit_box_ta_rows+'" onblur="_this.edit_blur(\''+tid+'\')" onkeypress="_this.edit_keypress(event, \''+tid+'\')">'+value+'</textarea>';
|
||||
}
|
||||
|
||||
document.getElementById( 'edit-' + tid ).focus();
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Mouseup? Cancel timer to kill the loop
|
||||
/*--------------------------------------------*/
|
||||
|
||||
titleedit.prototype.title_mouseup = function( event )
|
||||
{
|
||||
//----------------------------------
|
||||
// Prevent link loading
|
||||
//----------------------------------
|
||||
|
||||
event = ipsclass.cancel_bubble( event, true );
|
||||
|
||||
//----------------------------------
|
||||
// Get TID
|
||||
//----------------------------------
|
||||
|
||||
var tid = _this.get_tid_from_id( this.id );
|
||||
|
||||
//----------------------------------
|
||||
// Reset timer
|
||||
//----------------------------------
|
||||
|
||||
_this._tid_date[tid] = 0;
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// BLUR HANDLER
|
||||
/*--------------------------------------------*/
|
||||
|
||||
|
||||
titleedit.prototype.edit_blur = function( tid, type )
|
||||
{
|
||||
_this._new_text = document.getElementById( 'edit-' + tid ).value;
|
||||
|
||||
if ( _this._new_text != "" )
|
||||
{
|
||||
_this.title_save( tid, _this._new_text, type );
|
||||
}
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// KEY PRESS HANDLER
|
||||
/*--------------------------------------------*/
|
||||
|
||||
|
||||
titleedit.prototype.edit_keypress = function( evt, tid, type )
|
||||
{
|
||||
evt = (evt) ? evt : window.event;
|
||||
_this._new_text = document.getElementById( 'edit-' + tid ).value;
|
||||
|
||||
// Make sure we're not using a text area
|
||||
if ( _this.edit_box == 'text' )
|
||||
{
|
||||
if ( ( evt.keyCode == 13 || evt.keyCode == 3 ) && _this._new_text != "" )
|
||||
{
|
||||
_this.title_save( tid, _this._new_text, type );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// UDPATE DB
|
||||
/*--------------------------------------------*/
|
||||
|
||||
|
||||
titleedit.prototype.title_save = function( tid, new_text, type )
|
||||
{
|
||||
var donotedit = 0;
|
||||
|
||||
if ( new_text == _this._span_contents[ tid ] )
|
||||
{
|
||||
donotedit = 1;
|
||||
}
|
||||
|
||||
document.getElementById( _this.var_span_id_text + '-' + tid ).innerHTML = _this._span_contents[ tid ];
|
||||
document.getElementById( _this.var_link_id_text + '-' + tid ).innerHTML = new_text;
|
||||
|
||||
//----------------------------------
|
||||
// Using hidden div or not?
|
||||
//----------------------------------
|
||||
|
||||
if ( _this.var_real_id_text )
|
||||
{
|
||||
document.getElementById( _this.var_real_id_text + '-' + tid ).innerHTML = new_text;
|
||||
}
|
||||
|
||||
//----------------------------------
|
||||
// Re-check topic links
|
||||
//----------------------------------
|
||||
|
||||
_this.init();
|
||||
|
||||
if ( donotedit )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var fields = new Array();
|
||||
|
||||
//----------------------------------
|
||||
// Populate fields
|
||||
//----------------------------------
|
||||
|
||||
fields['tid'] = tid;
|
||||
fields['name'] = new_text;
|
||||
fields['md5check'] = ipb_md5_check;
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// 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() )
|
||||
{
|
||||
xmlobj.show_loading("Saving...");
|
||||
return;
|
||||
}
|
||||
|
||||
xmlobj.hide_loading();
|
||||
|
||||
//----------------------------------
|
||||
// INIT
|
||||
//----------------------------------
|
||||
|
||||
var returned = xmlobj.xmlhandler.responseText;
|
||||
|
||||
if ( returned.match( /<null>(0|-|\=)<\/null>/ ) )
|
||||
{
|
||||
alert( "Error occured, not saved" );
|
||||
}
|
||||
};
|
||||
|
||||
//----------------------------------
|
||||
// LOAD XML
|
||||
//----------------------------------
|
||||
|
||||
xmlobj = new ajax_request();
|
||||
xmlobj.onreadystatechange( do_request_function );
|
||||
xmlobj.process( _this.var_ajax_url, 'POST', xmlobj.format_for_post(fields) );
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Get time now
|
||||
/*--------------------------------------------*/
|
||||
|
||||
|
||||
titleedit.prototype.get_time_now = function()
|
||||
{
|
||||
var mydate = new Date();
|
||||
return mydate.getTime();
|
||||
};
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Get TID from ID
|
||||
/*--------------------------------------------*/
|
||||
|
||||
|
||||
titleedit.prototype.get_tid_from_id = function( id )
|
||||
{
|
||||
return id.replace( /.*\-(\d+)/, "$1" );
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Add ID to UNMOVEABLES array
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
titleedit.prototype.add_id_to_uneditables = function( tid )
|
||||
{
|
||||
this.UNEDITABLES[ tid ] = tid;
|
||||
};
|
||||
@@ -0,0 +1,299 @@
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Title: Tigra Calendar
|
||||
// URL: http://www.softcomplex.com/products/tigra_calendar/
|
||||
// Version: 3.2 (American date format)
|
||||
// Date: 10/14/2002 (mm/dd/yyyy)
|
||||
// Note: Permission given to use this script in ANY kind of applications if
|
||||
// header lines are left unchanged.
|
||||
// Note: Script consists of two files: calendar?.js and calendar.html
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// if two digit year input dates after this year
|
||||
// considered 20 century.
|
||||
/*--------------------------------------------*/
|
||||
|
||||
var NUM_CENTYEAR = 30;
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// is time input control required by default
|
||||
/*--------------------------------------------*/
|
||||
|
||||
var BUL_TIMECOMPONENT = false;
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// are year scrolling buttons required by default
|
||||
/*--------------------------------------------*/
|
||||
|
||||
var BUL_YEARSCROLL = true;
|
||||
|
||||
var calendars = [];
|
||||
var RE_NUM = /^\-?\d+$/;
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Create object
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function calendar_us(obj_target)
|
||||
{
|
||||
//-------------------------------
|
||||
// assigning methods
|
||||
//-------------------------------
|
||||
|
||||
this.gen_date = cal_gen_date2;
|
||||
this.gen_time = cal_gen_time2;
|
||||
this.gen_tsmp = cal_gen_tsmp2;
|
||||
this.prs_date = cal_prs_date2;
|
||||
this.prs_time = cal_prs_time2;
|
||||
this.prs_tsmp = cal_prs_tsmp2;
|
||||
this.popup = cal_popup2;
|
||||
|
||||
//-------------------------------
|
||||
// validate input parameters
|
||||
//-------------------------------
|
||||
|
||||
if (!obj_target)
|
||||
{
|
||||
return cal_error("Error calling the calendar: no target control specified");
|
||||
}
|
||||
|
||||
if (obj_target.value == null)
|
||||
{
|
||||
return cal_error("Error calling the calendar: parameter specified is not valid target control");
|
||||
}
|
||||
|
||||
this.target = obj_target;
|
||||
this.time_comp = BUL_TIMECOMPONENT;
|
||||
this.year_scroll = BUL_YEARSCROLL;
|
||||
|
||||
//-------------------------------
|
||||
// register in global collections
|
||||
//-------------------------------
|
||||
|
||||
this.id = calendars.length;
|
||||
calendars[this.id] = this;
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// POP-UP Calendar
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function cal_popup2 (str_datetime, already_opened)
|
||||
{
|
||||
this.dt_current = this.prs_tsmp(str_datetime ? str_datetime : this.target.value);
|
||||
|
||||
if (!this.dt_current)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// If already open, don't load path...
|
||||
//-------------------------------
|
||||
|
||||
if ( already_opened )
|
||||
{
|
||||
calendar_url = 'calendar.html';
|
||||
}
|
||||
else
|
||||
{
|
||||
calendar_url = ipb_skin_url + '/calendar.html';
|
||||
}
|
||||
|
||||
var obj_calwindow = window.open(
|
||||
calendar_url + '?datetime=' + this.dt_current.valueOf()+ '&id=' + this.id,
|
||||
'Calendar', 'width=200,height='+(this.time_comp ? 215 : 190)+
|
||||
',status=no,resizable=no,top=200,left=200,dependent=yes,alwaysRaised=yes'
|
||||
);
|
||||
|
||||
obj_calwindow.opener = window;
|
||||
obj_calwindow.focus();
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// timestamp generating function
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function cal_gen_tsmp2 (dt_datetime)
|
||||
{
|
||||
return(this.gen_date(dt_datetime) + ' ' + this.gen_time(dt_datetime));
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// date generating function
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function cal_gen_date2 (dt_datetime)
|
||||
{
|
||||
return (
|
||||
(dt_datetime.getMonth() < 9 ? '0' : '') + (dt_datetime.getMonth() + 1) + "/"
|
||||
+ (dt_datetime.getDate() < 10 ? '0' : '') + dt_datetime.getDate() + "/"
|
||||
+ dt_datetime.getFullYear()
|
||||
);
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// time generating function
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function cal_gen_time2 (dt_datetime)
|
||||
{
|
||||
return (
|
||||
(dt_datetime.getHours() < 10 ? '0' : '') + dt_datetime.getHours() + ":"
|
||||
+ (dt_datetime.getMinutes() < 10 ? '0' : '') + (dt_datetime.getMinutes()) + ":"
|
||||
+ (dt_datetime.getSeconds() < 10 ? '0' : '') + (dt_datetime.getSeconds())
|
||||
);
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// timestamp parsing function
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function cal_prs_tsmp2 (str_datetime)
|
||||
{
|
||||
//-------------------------------
|
||||
// if no parameter specified return current timestamp
|
||||
//-------------------------------
|
||||
|
||||
if (!str_datetime)
|
||||
{
|
||||
return (new Date());
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// if positive integer treat as milliseconds from epoch
|
||||
//-------------------------------
|
||||
|
||||
if (RE_NUM.exec(str_datetime))
|
||||
{
|
||||
return new Date(str_datetime);
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// else treat as date in string format
|
||||
//-------------------------------
|
||||
|
||||
var arr_datetime = str_datetime.split(' ');
|
||||
|
||||
return this.prs_time(arr_datetime[1], this.prs_date(arr_datetime[0]));
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// date parsing function
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function cal_prs_date2 (str_date)
|
||||
{
|
||||
var arr_date = str_date.split('/');
|
||||
|
||||
if (arr_date.length != 3) return alert ("Invalid date format: '" + str_date + "'.\nFormat accepted is dd-mm-yyyy.");
|
||||
if (!arr_date[1]) return alert ("Invalid date format: '" + str_date + "'.\nNo day of month value can be found.");
|
||||
if (!RE_NUM.exec(arr_date[1])) return alert ("Invalid day of month value: '" + arr_date[1] + "'.\nAllowed values are unsigned integers.");
|
||||
if (!arr_date[0]) return alert ("Invalid date format: '" + str_date + "'.\nNo month value can be found.");
|
||||
if (!RE_NUM.exec(arr_date[0])) return alert ("Invalid month value: '" + arr_date[0] + "'.\nAllowed values are unsigned integers.");
|
||||
if (!arr_date[2]) return alert ("Invalid date format: '" + str_date + "'.\nNo year value can be found.");
|
||||
if (!RE_NUM.exec(arr_date[2])) return alert ("Invalid year value: '" + arr_date[2] + "'.\nAllowed values are unsigned integers.");
|
||||
|
||||
var dt_date = new Date();
|
||||
dt_date.setDate(1);
|
||||
|
||||
if (arr_date[0] < 1 || arr_date[0] > 12) return alert ("Invalid month value: '" + arr_date[0] + "'.\nAllowed range is 01-12.");
|
||||
dt_date.setMonth(arr_date[0]-1);
|
||||
|
||||
if (arr_date[2] < 100) arr_date[2] = Number(arr_date[2]) + (arr_date[2] < NUM_CENTYEAR ? 2000 : 1900);
|
||||
dt_date.setFullYear(arr_date[2]);
|
||||
|
||||
var dt_numdays = new Date(arr_date[2], arr_date[0], 0);
|
||||
dt_date.setDate(arr_date[1]);
|
||||
if (dt_date.getMonth() != (arr_date[0]-1)) return alert ("Invalid day of month value: '" + arr_date[1] + "'.\nAllowed range is 01-"+dt_numdays.getDate()+".");
|
||||
|
||||
return (dt_date)
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// time parsing function
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function cal_prs_time2 (str_time, dt_date)
|
||||
{
|
||||
if (!dt_date)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var arr_time = String(str_time ? str_time : '').split(':');
|
||||
|
||||
if (!arr_time[0])
|
||||
{
|
||||
dt_date.setHours(0);
|
||||
}
|
||||
else if (RE_NUM.exec(arr_time[0]))
|
||||
{
|
||||
if (arr_time[0] < 24)
|
||||
{
|
||||
dt_date.setHours(arr_time[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
return cal_error ("Invalid hours value: '" + arr_time[0] + "'.\nAllowed range is 00-23.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return cal_error ("Invalid hours value: '" + arr_time[0] + "'.\nAllowed values are unsigned integers.");
|
||||
}
|
||||
|
||||
if (!arr_time[1])
|
||||
{
|
||||
dt_date.setMinutes(0);
|
||||
}
|
||||
else if (RE_NUM.exec(arr_time[1]))
|
||||
{
|
||||
if (arr_time[1] < 60)
|
||||
{
|
||||
dt_date.setMinutes(arr_time[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
return cal_error ("Invalid minutes value: '" + arr_time[1] + "'.\nAllowed range is 00-59.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return cal_error ("Invalid minutes value: '" + arr_time[1] + "'.\nAllowed values are unsigned integers.");
|
||||
}
|
||||
|
||||
if (!arr_time[2])
|
||||
{
|
||||
dt_date.setSeconds(0);
|
||||
}
|
||||
|
||||
else if (RE_NUM.exec(arr_time[2]))
|
||||
{
|
||||
if (arr_time[2] < 60)
|
||||
{
|
||||
dt_date.setSeconds(arr_time[2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
return cal_error ("Invalid seconds value: '" + arr_time[2] + "'.\nAllowed range is 00-59.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return cal_error ("Invalid seconds value: '" + arr_time[2] + "'.\nAllowed values are unsigned integers.");
|
||||
}
|
||||
|
||||
dt_date.setMilliseconds(0);
|
||||
return dt_date;
|
||||
}
|
||||
|
||||
/*--------------------------------------------*/
|
||||
// Error
|
||||
/*--------------------------------------------*/
|
||||
|
||||
function cal_error (str_message)
|
||||
{
|
||||
alert (str_message);
|
||||
return null;
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// IPS JS: HIERARCHICAL DISPLAY FUNCTIONS
|
||||
// (c) 2005 Invision Power Services, Inc.
|
||||
// http://www.invisionpower.com
|
||||
// Matt Mecham (13/12/05)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
function hierarchical()
|
||||
{
|
||||
/**
|
||||
* Class variables.
|
||||
*
|
||||
* @var string Cookie name
|
||||
* @var string Refresh display URL
|
||||
* @var string First part of the image ID title string
|
||||
*/
|
||||
|
||||
this.cookie_name = '';
|
||||
this.location_url = '';
|
||||
this.toggle_image_id_name = 'hier-toggle';
|
||||
|
||||
/**
|
||||
* INIT: Grabs IDs from the HTML and
|
||||
* sets up the various functions
|
||||
*/
|
||||
|
||||
this.init = function()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Do DIVs
|
||||
//-----------------------------------------
|
||||
|
||||
var divs = document.getElementsByTagName('IMG');
|
||||
|
||||
//----------------------------------
|
||||
// Sort through and grab links
|
||||
//----------------------------------
|
||||
|
||||
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( divid );
|
||||
var divnum = ipsclass.get_id_from_text( divid );
|
||||
|
||||
//----------------------------------
|
||||
// Work with it?
|
||||
//----------------------------------
|
||||
|
||||
if ( divname == this.toggle_image_id_name )
|
||||
{
|
||||
divs[i].style.cursor = 'pointer';
|
||||
divs[i].toggle_image_id_name = this.toggle_image_id_name;
|
||||
divs[i].location_url = this.location_url;
|
||||
divs[i].cookie_name = this.cookie_name;
|
||||
divs[i].toggle_id = divnum;
|
||||
divs[i].onclick = hierarchical_events.prototype.toggle_folder;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper function
|
||||
*/
|
||||
function hierarchical_events()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle Folder Action
|
||||
* @param object Event Object
|
||||
*/
|
||||
hierarchical_events.prototype.toggle_folder = function( e )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Check..
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! this.cookie_name )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Cancel event bubbling
|
||||
//-----------------------------------------
|
||||
|
||||
e = ipsclass.cancel_bubble(e, true);
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up
|
||||
//-----------------------------------------
|
||||
|
||||
var saved = new Array();
|
||||
var clean = new Array();
|
||||
var found_id = 0;
|
||||
|
||||
//-----------------------------------
|
||||
// Get any saved info
|
||||
//-----------------------------------
|
||||
|
||||
if ( tmp = ipsclass.my_getcookie( this.cookie_name ) )
|
||||
{
|
||||
saved = tmp.split(",");
|
||||
}
|
||||
|
||||
//-----------------------------------
|
||||
// Remove bit if exists
|
||||
//-----------------------------------
|
||||
|
||||
for( i = 0 ; i < saved.length; i++ )
|
||||
{
|
||||
if ( saved[i] != this.toggle_id && saved[i] != "" )
|
||||
{
|
||||
clean[clean.length] = saved[i];
|
||||
}
|
||||
else if ( saved[i] == this.toggle_id )
|
||||
{
|
||||
found_id = 1;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------
|
||||
// Not found the ID, so add it
|
||||
//-----------------------------------
|
||||
|
||||
if ( ! found_id )
|
||||
{
|
||||
clean[ clean.length ] = this.toggle_id;
|
||||
}
|
||||
|
||||
ipsclass.my_setcookie( this.cookie_name, clean.join(','), 1 );
|
||||
ipsclass.location_jump( this.location_url, true );
|
||||
};
|
||||
@@ -1,671 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
|
||||
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
||||
|
||||
<title>Invision Install Guide: Installing</title>
|
||||
|
||||
<style>
|
||||
|
||||
BODY, TABLE { font-family: verdana, arial; font-size:12px; line-height:150% }
|
||||
|
||||
.title { background-image: url(tile_back.gif); font-family:arial; font-size:18px; color:white; font-weight:bold; height:40px }
|
||||
|
||||
.table1 { border:1px solid #999999 }
|
||||
|
||||
.table2 { border:1px dotted #999999 }
|
||||
|
||||
.menustrip { font-color:black; background-color:#EEEEEE; font-size:12px; height:24px }
|
||||
|
||||
a:link, a:visited, a:active { color:#000055 }
|
||||
|
||||
a:hover { color:#333377;text-decoration:underline }
|
||||
|
||||
.header { border-bottom:1px dashed #999999; font-family:Verdana, Arial; font-weight:bold; color:#4C77B6; font-size:20px; background-color:#FEFEFE; letter-spacing:-1px }
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" topmargin='5' leftmargin='0'>
|
||||
|
||||
|
||||
|
||||
<!-- Start content -->
|
||||
|
||||
|
||||
|
||||
<a name='top'></a>
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class='header' align='left'>Installing: Step 1 - Uploading</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='left'>
|
||||
|
||||
<br>At this point, you should have the zip archive "unzipped" and the contents similar to those shown in the <a href='install.html#structure' target='bottom'>structure and CHMOD guide</a>. If you
|
||||
|
||||
do not have a similar structure, check to make sure you have your zip program preferences set to allow creation of directories and to preserve case and long filenames.
|
||||
|
||||
<br><br>
|
||||
|
||||
If you haven't done so already, create a new directory on your server named appropriately (if you wanted to access the forums via 'http://www.domain.com/forums/', create a directory called 'forums' in the
|
||||
|
||||
'public_html' or 'www' directory on your webserver.
|
||||
|
||||
<br><br>
|
||||
|
||||
Using your FTP client, move into the directory you wish to upload to (if you followed the above advice, move into the newly created 'forums' directory.)
|
||||
|
||||
<br><br>
|
||||
|
||||
Using your FTP client, create the following directories "archive_in", "archive_out", "cache", "fonts", "html", "lang", "modules", "Skin", "sources", "ssi_templates", "style_images",
|
||||
|
||||
and "uploads" <span style='color:blue'>(TIP: If your FTP client supports "Drag n' Drop" which most modern clients do, you can save yourself some time and effort by
|
||||
|
||||
simply selecting all the files from the "unzipped" zip archive and drag them into your FTP client window, this will then copy all the files, creating the directories as it goes. If you choose
|
||||
|
||||
to do this, you can safely ignore most of the following instruction, just remember to CHMOD as outlined in the stucture and CHMOD guide).</span>
|
||||
|
||||
<br><br>
|
||||
|
||||
Once the directories have been created, CHMOD "archive_in", "archive_out" and "uploads" to 0755 (if you get permissions errors later on, you can CHMOD these to
|
||||
|
||||
"0777"). Now, upload the contents of the files in your local folders (from the zip file) into the corresponding directories you've just created on your server. Some folders will contain other
|
||||
|
||||
files and folders, upload them all - preserving the structure you have in your zip file (for example, upload the entire contents of the "html" folder on your computer to the "html" directory on the server).
|
||||
|
||||
<br><br>
|
||||
|
||||
Once you have finished uploading into the directories, upload the rest of the files "admin.php", "conf_global.php", "conf_mime_types.php", "css.php", "index.php",
|
||||
|
||||
"install_templates.txt", "sm_install.php", "ssi.php" to the same place as you created the directories earlier (into "forums" for our example).
|
||||
|
||||
<br>
|
||||
|
||||
CHMOD "conf_global.php" to 0666 (if you get permission denied errors later on, you can CHMOD this to 0777).
|
||||
|
||||
<br><br>
|
||||
|
||||
That's it, the hard work is now done! You can proceed to the next step.
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class='header' align='left'>Installing: Step 2 - Using the Installer</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='left'>
|
||||
|
||||
An installer is provided to assist you in entering the information Invision Power Board needs to connect to your mySQL database and to create your new
|
||||
|
||||
administrators account.
|
||||
|
||||
<br><br>
|
||||
|
||||
Run the "sm_install.php" file through your web browser by entering the URL to it into your browser address bar (if you have followed our example, type in
|
||||
|
||||
<b>http://www.domain.com/forums/sm_install.php</b>, naturally subsituting 'domain.com' for your web address.)
|
||||
|
||||
<br><br>
|
||||
|
||||
You will be presented with a short information screen, if you receive an error telling you that "conf_global.php" does not have suitable permissions, CHMOD "conf_global.php" to
|
||||
|
||||
0777 via your FTP client.
|
||||
|
||||
<br><br>
|
||||
|
||||
Clicking on proceed will present you with a simple information form. You will need to know your mySQL username and password at this point. If you do not know it, please ask your web host - in most
|
||||
|
||||
cases it is different from the FTP log in information.
|
||||
|
||||
<br><br>The form is very straightfoward, with only the following points needing closer examination. If you do not know what your mySQL "host" is, try "localhost" (without the quotes). if the mySQL server
|
||||
|
||||
is on the same server as your website (and in most cases it is) this will suffice.
|
||||
|
||||
<br>
|
||||
|
||||
If you have created a new database for Invision Power Board, or wish to use an existing database, enter the name of the database in the appropriate field.<br><br>Unless you intend to install multiple copies of
|
||||
|
||||
Invision Power Board into the same database, you can leave the "table prefix" blank. If you do not have a mySQL password (if you are installing Invision Power Board on your local server) this can be left blank.
|
||||
|
||||
<br>
|
||||
|
||||
After submitting the form, you will be informed of any errors - if you do get an error similar to "permission denied for user@localhost using password YES" - the chances are you have either your mySQL username, mySQL password
|
||||
|
||||
or mySQL database name wrong. Consult with your webhost for the correct information and resubmit the form.
|
||||
|
||||
<br><br>
|
||||
|
||||
If the installation was successful, you will receive notification to that effect.
|
||||
|
||||
<br>
|
||||
|
||||
Follow the link to finish off the installation and to log into your newly installed board. When the log in page loads, enter in the information you chose for your administrator account.
|
||||
|
||||
<br>
|
||||
|
||||
Once you are logged into the board, click on the "Admin CP" link found in the navigation bar to access the Administration Control Panel.
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class='header' align='left'>Installing: Step 3 - Admin CP First Steps</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='left'>
|
||||
|
||||
The Invision Power Board administration control panel is a very sophisticated tool. This is where you can create new categories and forums for your board, as well
|
||||
|
||||
as set bad word filters, edit emoticons, change the board colours and so on. We recommend you browse the documentation at <a href='http://www.invisionboard.com/documentation.cgi'>Invision Power Board</a> before getting attempting some of the more complex operations.
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>Lets get stuck in!</b>
|
||||
|
||||
<br>
|
||||
|
||||
The first thing you will need to do is remove the "sm_install.php" file from your server; although Invision Power Board locks the installer after a successful install, it's always a good idea to remove the installer as re-running it
|
||||
|
||||
<b>will delete your database tables</b>.
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>Before anyone can post, we need some forums!</b>
|
||||
|
||||
<br>
|
||||
|
||||
If you wish to get stuck in straight away, now would be a good time to create some forums for your members to post in.
|
||||
|
||||
<br>
|
||||
|
||||
In the Administrators CP, click on the "Forum Control" expanding menu in the left menu frame. When it loads, click on "New Category".
|
||||
|
||||
<br>If your website was about computers, you could enter "PC Software" as the category name. Submit the form by clicking the button at the bottom of the page.
|
||||
|
||||
<br>Now we have a category to "group" the forums, lets create a forum or two.
|
||||
|
||||
<br><br>Click on "New Forum" found in the same expandable menu. Choose "Normal Forum" from the drop down box and proceed.
|
||||
|
||||
<br>There are many options here, which are outside the scope of this guide, for more information see the documentation at <a href='http://www.invisionboard.com/documentation.cgi'>Invision Power Board</a>. We can
|
||||
|
||||
create a new forum without knowing what all the options do. Using our example, you might want a forum dedicated to "Games" - if so, enter "Games" as the forum title, and a suitable description for the new forum. When you have done this
|
||||
|
||||
scroll down and submit the form by clicking the button at the bottom of the page.
|
||||
|
||||
<br><br>
|
||||
|
||||
If you now go back to your board, and refresh the page, you will see the new category and forum. Try a little test post to make sure the system is running perfectly.
|
||||
|
||||
<br><br>
|
||||
|
||||
Congratulations! You have installed and set up your new Invision Power Board. If you ran into trouble, please click on the "Help!" link in the top menu bar for the FAQ and how to get support.
|
||||
|
||||
<br><br>
|
||||
|
||||
<i>Thank you for supporting Invision Power Board</i>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
<br>
|
||||
|
||||
<br>
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<a name='structure'></a>
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class='header' align='left'>File Structure and CHMOD values</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='left'>Below is a table showing the file structure and recommended CHMOD values for the file (and in the case of directories, the CHMOD
|
||||
|
||||
values for the contents of the directories).<br>The CHMOD values are not needed for Windows based servers and can be safely ignored. The CHMOD
|
||||
|
||||
values may vary from system to system, if in doubt, CHMOD everything to 0777.<br>Most systems will not need to CHMOD everything to install successfully,
|
||||
|
||||
use the table below to determine what needs CHMOD'ding for installation, and what can be left until later.
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center'>
|
||||
|
||||
<table width='100%' align='center' cellpadding='0' cellspacing='0' bgcolor='#BCBCBC'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<table width='100%' align='center' cellpadding='4' cellspacing='1'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td width='5%' bgcolor='#EEEEEE' style='font-size:10px'> </td>
|
||||
|
||||
<td width='25%' bgcolor='#EEEEEE' style='font-size:10px'><b>File/Folder Name</b></td>
|
||||
|
||||
<td width='20%' bgcolor='#EEEEEE' style='font-size:10px' align='center'><b>Item CHMOD Value</b></td>
|
||||
|
||||
<td width='30%' bgcolor='#EEEEEE' style='font-size:10px' align='center'><b>Contents CHMOD Value</b></td>
|
||||
|
||||
<td width='15%' bgcolor='#EEEEEE' style='font-size:10px' align='center'><b>CHMOD for install</b></td>
|
||||
|
||||
<td width='15%' bgcolor='#EEEEEE' style='font-size:10px' align='center'><b>Can CHMOD later</b></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='file.gif' border='0' alt='PHP file'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'>admin.php</td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='folder.gif' border='0' alt='folder'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>archive_in</span></td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>0755</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><span style='color:red'><b>X</b></span></a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='folder.gif' border='0' alt='folder'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>archive_out</span></td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>0755</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><span style='color:red'><b>X</b></span></a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='folder.gif' border='0' alt='folder'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>cache</span></td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>0755</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><span style='color:red'><b>X</b></span></a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='file.gif' border='0' alt='PHP file'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'>conf_global.php</td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>0666</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><span style='color:red'><b>X</b></span></a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='file.gif' border='0' alt='PHP file'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'>conf_mime_types.php</td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='file.gif' border='0' alt='PHP file'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'>css.php</td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='folder.gif' border='0' alt='folder'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>fonts</span></td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='folder.gif' border='0' alt='folder'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>html</span></td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='file.gif' border='0' alt='PHP file'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'>index.php</td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='file.gif' border='0' alt='PHP file'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'>install_templates.txt</td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='folder.gif' border='0' alt='folder'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>lang</span></td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>0755</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>0755</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><span style='color:red'><b>X</b></span></a>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='folder.gif' border='0' alt='folder'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>modules</span></td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='folder.gif' border='0' alt='folder'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>Skin</span></td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>0755</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>0755</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><span style='color:red'><b>X</b></span></a>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='file.gif' border='0' alt='PHP file'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'>sm_install.php</td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='folder.gif' border='0' alt='folder'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>sources</span></td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='file.gif' border='0' alt='PHP file'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'>ssi.php</td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='folder.gif' border='0' alt='folder'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>ssi_templates</span></td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='folder.gif' border='0' alt='folder'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>style_images</span></td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>0755</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>0755</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><span style='color:red'><b>X</b></span></a>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='folder.gif' border='0' alt='folder'></td>
|
||||
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>uploads</span></td>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>0777</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><span style='color:red'><b>X</b></span></a>
|
||||
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<!-- End content -->
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,62 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
|
||||
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
||||
|
||||
|
||||
|
||||
<title>Invision Board Menu Bar</title>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
BODY, TABLE { font-family: arial, verdana; font-size:11px }
|
||||
|
||||
.title { background-image: url(tile_back.gif); font-family:arial; font-size:18px; color:white; font-weight:bold; height:40px }
|
||||
|
||||
.table1 { border:1px solid #999999 }
|
||||
|
||||
.menustrip { font-color:black; background-color:#EEEEEE; font-size:12px; height:24px; letter-spacing:1px }
|
||||
|
||||
a:link, a:visited, a:active { color:#000055 }
|
||||
|
||||
a:hover { color:#333377;text-decoration:underline }
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" topmargin='5' leftmargin='0'>
|
||||
|
||||
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0' class='table1'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class='title' align='left'>Invision Board Installation and Help Guide</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class='menustrip' align='center'>[ <b><a href='welcome.html#welcome' target='bottom'>Welcome</a></b> ] :: [ <b><a href='welcome.html#require' target='bottom'>Requirements</a></b> ] :: [ <b><a href='install.html#top' target='bottom'>Installing</a></b> ] :: [ <b><a href='install.html#structure' target='bottom'>Structure & CHMOD</a></b> ] :: [ <b><a href='help.html#top' target='bottom'>Help & FAQ</a></b> ]</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
Before Width: | Height: | Size: 157 B |
@@ -1,92 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
||||
<title>Invision Power Board Install Guide: Welcome</title>
|
||||
<style>
|
||||
BODY, TABLE { font-family: verdana, arial; font-size:12px; line-height:150% }
|
||||
.title { background-image: url(tile_back.gif); font-family:arial; font-size:18px; color:white; font-weight:bold; height:40px }
|
||||
.table1 { border:1px solid #999999 }
|
||||
.table2 { border:1px dotted #999999 }
|
||||
.menustrip { font-color:black; background-color:#EEEEEE; font-size:12px; height:24px }
|
||||
a:link, a:visited, a:active { color:#000055 }
|
||||
a:hover { color:#333377;text-decoration:underline }
|
||||
.copyright { font-size:10px }
|
||||
.header { border-bottom:1px dashed #999999; font-family:Verdana, Arial; font-weight:bold; color:#4C77B6; font-size:20px; background-color:#FEFEFE; letter-spacing:-1px }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" topmargin='5' leftmargin='0'>
|
||||
|
||||
<!-- Start content -->
|
||||
|
||||
<a name='welcome'></a>
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
<tr>
|
||||
<td class='header' align='left'>Welcome to Invision Power Board!</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align='left'>
|
||||
<br>Welcome to Invision Power Board, a fast, efficient, scalable community solution written in PHP and using MySQL for database storage.
|
||||
<br><br>
|
||||
This guide will help you through the installation process and get you on your way to setting up your own Invision Power Board.
|
||||
<br>
|
||||
Installation is very straight forward, only taking about 15 minutes from uploading the files to logging into your administration center.
|
||||
<br>
|
||||
<br>
|
||||
You will need an FTP (File Transfer Protocol) client, if you do not have one you can download <a href='http://www.smartftp.com' target='_blank'>Smart FTP for Windows</a> or
|
||||
<a href='http://www.interarchy.com' target='_blank'>InterArchy for Macintosh</a>. At the time of writing both websites have freeware or free trial versions available for download.
|
||||
<br>You do not need an indepth knowledge of PHP programming to install Invision Power Board, but a working knowledge of FTP functions is a plus.
|
||||
<br>
|
||||
<br>This guide assumes that you have successfully downloaded the latest release from <a href='http://www.invisionboard.com' target='_blank'>Invision Power Board</a> and have the Zip file "unzipped" and ready to go.
|
||||
<br>The instructions will term the zip file you downloaded as "the zip archive", the directories created by the unzipping process as "the local folders" and the directories on your website as
|
||||
"website directories" - this is to prevent confusion.
|
||||
<br><br>
|
||||
<b>If you don't know your FTP from your PHP and your CHMOD from your CHOWN, then you might wish to consider our Installation Service. For a low cost, once only fee
|
||||
- one of our installation professionals will install and set up your board for you. For more information, please visit our <a href='http://www.invisionboard.com/support.cgi' target='_blank'>advanced services</a> page.</b>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<a name='require'></a>
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
<tr>
|
||||
<td class='header' align='left'>Requirements</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align='left'>The exact requirements will depend on many factors, your estimated board traffic being one.
|
||||
<br><br><b>Server Requirements</b>
|
||||
<br>
|
||||
You must have a webserver that has PHP 4.0.3 (or better) and mySQL 3.22 (or better) installed. If you are unsure whether your server has these
|
||||
programs installed, please check with your web host now. If you are capable, you can always <a href='http://www.php.net' target='_blank'>download PHP</a>
|
||||
and <a href='http://www.mysql.com' target='blank'>download mySQL</a> and install it yourself. If your web host does not support PHP or mySQL, consider hosting your entire web site or forums with <a href='http://www.ipshosting.com' target='blank'>IPS Hosting</a> services.
|
||||
<br>Invision Power Board works best on an Apache server, and is Apache 1 and Apache 2 savvy.
|
||||
<br><br>
|
||||
<b>General Requirements</b>
|
||||
<br>
|
||||
You <b>do not</b> need a new mySQL database as Invision Power Board supports table prefixes to prevent tables being overwritten.
|
||||
<br>You will also need the mySQL username and mySQL password for a mySQL user that has permission to "CREATE", "DROP" and "ALTER" tables.
|
||||
<br>You will need about 2mb of free web space and roughly 3mb of mySQL database space to allow installation and a moderately sized community.
|
||||
<br>If you are unsure on any of these points, please ask your webhost before proceeding.
|
||||
<br><br>
|
||||
<b>>> <a href='install.html' target='bottom'>Enough chit chat, lets get installing!</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br><br>
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
<tr>
|
||||
<td align='center' class='copyright'>
|
||||
Invision Power Board, Invision Power Board Installation Guide © 2002 <a href='http://www.invisionpower' target='_blank'>Invision Power Services</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- End content -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,32 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
|
||||
|
||||
"http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
||||
|
||||
<title>Invision Board Installation</title>
|
||||
|
||||
</head>
|
||||
|
||||
<frameset rows='90, *' frameborder='no' border='0' framespacing='0'>
|
||||
|
||||
<frame src="data/menu.html" name="topmenu" longdesc="Top%20Menu%20Bar" scrolling="no" noresize>
|
||||
|
||||
<frame src="data/welcome.html" name="bottom" longdesc="Bottom%20Bar" scrolling="auto" noresize>
|
||||
|
||||
</frameset>
|
||||
|
||||
<noframes>
|
||||
|
||||
Sorry, you need a frames enabled browser to view this page- and why are you still living in the dark ages,
|
||||
|
||||
Internet Explorer 2 isn't cool anymore!
|
||||
|
||||
</noframes>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,232 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
||||
<title>Invision Power Board Install Guide: Welcome</title>
|
||||
<style type='text/css' media='all'>
|
||||
@import url('docs.css');
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h2>File Structure and CHMOD values</h2>
|
||||
<br />
|
||||
<div class='content-text'>
|
||||
Below is a table showing the file structure and recommended CHMOD values for the file (and in the case of directories, the CHMOD
|
||||
values for the contents of the directories).<br>The CHMOD values are not needed for Windows based servers and can be safely ignored. The CHMOD
|
||||
values may vary from system to system, if in doubt, CHMOD everything to 0777.<br>Most systems will not need to CHMOD everything to install successfully,
|
||||
use the table below to determine what needs CHMOD'ding for installation, and what can be left until later.
|
||||
</div>
|
||||
|
||||
<table width='100%' align='center' cellpadding='4' cellspacing='0'>
|
||||
<tr>
|
||||
<td align='center'>
|
||||
<table width='100%' align='center' cellpadding='0' cellspacing='0' bgcolor='#BCBCBC'>
|
||||
<tr>
|
||||
<td>
|
||||
<table width='100%' align='center' cellpadding='4' cellspacing='1'>
|
||||
<tr>
|
||||
<td width='5%' bgcolor='#EEEEEE' style='font-size:10px'> </td>
|
||||
<td width='25%' bgcolor='#EEEEEE' style='font-size:10px'><b>File/Folder Name</b></td>
|
||||
<td width='20%' bgcolor='#EEEEEE' style='font-size:10px' align='center'><b>Item CHMOD Value</b></td>
|
||||
<td width='30%' bgcolor='#EEEEEE' style='font-size:10px' align='center'><b>Contents CHMOD Value</b></td>
|
||||
<td width='15%' bgcolor='#EEEEEE' style='font-size:10px' align='center'><b>CHMOD for install</b></td>
|
||||
<td width='15%' bgcolor='#EEEEEE' style='font-size:10px' align='center'><b>Can CHMOD later</b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/folder.gif' border='0' alt='PHP file'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'>admin</td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><span style='color:red'><b>YES</b></span></a>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/folder.gif' border='0' alt='folder'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>cache</span></td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>0755</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><span style='color:red'><b>YES</b></span></a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/folder.gif' border='0' alt='folder'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>cache/skin_cache</span></td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>0755</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><span style='color:red'><b>YES</b></span></a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/folder.gif' border='0' alt='folder'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>cache/lang_cache</span></td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>0755</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/file.gif' border='0' alt='PHP file'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'>conf_global.php.dist</td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>0666</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><span style='color:red'><b>YES</b></span></a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/file.gif' border='0' alt='PHP file'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'>index.php</td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/folder.gif' border='0' alt='folder'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>install</span></td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/folder.gif' border='0' alt='folder'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>ips_kernel</span></td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/folder.gif' border='0' alt='folder'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>jscripts</span></td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/folder.gif' border='0' alt='folder'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>lofiversion</span></td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/folder.gif' border='0' alt='folder'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>modules</span></td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/folder.gif' border='0' alt='folder'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>resources</span></td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/folder.gif' border='0' alt='folder'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>retail</span></td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/folder.gif' border='0' alt='folder'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>skin_acp</span></td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/folder.gif' border='0' alt='folder'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>sources</span></td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/folder.gif' border='0' alt='folder'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>style_avatars</span></td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/folder.gif' border='0' alt='folder'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>style_captcha</span></td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/folder.gif' border='0' alt='folder'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>style_emoticons</span></td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>0755</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><span style='color:red'><b>YES</b></span></a>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/folder.gif' border='0' alt='folder'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>style_images</span></td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>0755</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/folder.gif' border='0' alt='folder'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>upgrade</span></td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><img src='images/folder.gif' border='0' alt='folder'></td>
|
||||
<td align='left' valign='middle' bgcolor='#FFFFFF'><span style='color:blue'>uploads</span></td>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>0777</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'><span style='color:red'><b>YES</b></span></a>
|
||||
<td align='center' valign='middle' bgcolor='#FFFFFF'>-</a>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,228 @@
|
||||
BODY
|
||||
{
|
||||
background-color: #ffffff;
|
||||
font-family: Verdana, Tahoma, "Lucida Sans", "Lucida Sans Unicode", Arial, Sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#ipswrapper {
|
||||
width: 100%;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.main_shell {
|
||||
background-color: #6999DA;
|
||||
border: 1px solid #24426A;
|
||||
width: 706px;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
|
||||
H1 {
|
||||
margin: 0px;
|
||||
background-image: url('images/title_bar.gif');
|
||||
padding: 7px 5px 6px 5px;
|
||||
font-size: 13px;
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
H2 {
|
||||
margin: 0px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
H3 {
|
||||
font-size: 11px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
TABLE {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.content-text
|
||||
{
|
||||
font-size: 12px;
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
.content-next
|
||||
{
|
||||
margin-top: 10px;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
background-color: #EEE;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.content_shell {
|
||||
|
||||
margin: 0px 3px 3px 3px;
|
||||
border: 1px solid #24426A;
|
||||
border-top: 3px solid #24426A;
|
||||
background-image: url('images/main_bg.gif');
|
||||
background-repeat: repeat-x;
|
||||
background-color: #EFF2F7;
|
||||
}
|
||||
|
||||
.package {
|
||||
height: 517px;
|
||||
background-image: url('images/package_bg.gif');
|
||||
background-repeat: no-repeat;
|
||||
background-position: top-left;
|
||||
}
|
||||
|
||||
.content_wrap {
|
||||
width: 70%;
|
||||
height: 450px;
|
||||
float: right;
|
||||
margin: 6px 6px 4px 0px;
|
||||
padding: 10px;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #000000;
|
||||
line-height: 150%;
|
||||
overflow-y:auto;
|
||||
overflow-x:hidden;
|
||||
-moz-border-radius: 10px;
|
||||
}
|
||||
|
||||
.install_info {
|
||||
float: left;
|
||||
margin: 10px 0px 0px 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.install_info H3 {
|
||||
font-size: 15px;
|
||||
color: #6D87A9;
|
||||
}
|
||||
|
||||
.install_info UL {
|
||||
margin: 0px;
|
||||
margin-top: 15px;
|
||||
padding-left: 25px;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#progress .step_done {
|
||||
list-style-image: url('images/bullet_done.gif');
|
||||
color: #44638E;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
#progress .step_doing {
|
||||
list-style-image: url('images/bullet_doing.gif');
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#progress .step_notdone {
|
||||
list-style-image: url('images/bullet_notdone.gif');
|
||||
}
|
||||
|
||||
.warning {
|
||||
background-color: #EDF1AB;
|
||||
border: 1px solid #6E704B;
|
||||
padding: 5px;
|
||||
font-weight: bold;
|
||||
-moz-border-radius: 5px;
|
||||
|
||||
}
|
||||
|
||||
.hr {
|
||||
margin: 4px 6px 0px 6px;
|
||||
border-bottom: 1px solid #627686;
|
||||
}
|
||||
|
||||
.nav_button {
|
||||
background-color: #B3C9E6;
|
||||
border: 1px solid #24426A;
|
||||
font-size: 12px;
|
||||
padding: 3px 6px 3px 6px;
|
||||
-moz-border-radius: 5px;
|
||||
}
|
||||
|
||||
.copyright {
|
||||
width: 98%;
|
||||
text-align: right;
|
||||
font-size: 9px;
|
||||
color: #9EA7B3;
|
||||
padding-top: 3px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.eula {
|
||||
height: 210px;
|
||||
border: 1px solid #76774C;
|
||||
background-color: #FDFDD3;
|
||||
padding: 5px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#auto_progress LI {
|
||||
list-style: none;
|
||||
color: #029901;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.done_text {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#links {
|
||||
margin: 0px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#links LI {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.float_img {
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.info {
|
||||
background-color: #DCE6F3;
|
||||
border: 1px solid #5876A0;
|
||||
padding: 4px;
|
||||
line-height: 120%;
|
||||
-moz-border-radius: 7px;
|
||||
color: #1D3A60;
|
||||
}
|
||||
|
||||
.sql_form {
|
||||
width: 100%;
|
||||
font-size: 11px;
|
||||
border-top: 1px solid #6A6A6A;
|
||||
border-left: 1px solid #6A6A6A;
|
||||
border-right: 1px solid #A8A8A8;
|
||||
border-bottom: 1px solid #A8A8A8;
|
||||
}
|
||||
|
||||
FIELDSET {
|
||||
border: 1px solid #2D4461;
|
||||
background-color: #E6EBF1;
|
||||
margin-top: 5px;
|
||||
padding: 7px;
|
||||
-moz-border-radius: 7px;
|
||||
color: #2D4461;
|
||||
}
|
||||
|
||||
FIELDSET LEGEND {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
TABLE .title {
|
||||
color: #2D4461;
|
||||
font-weight: bold;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
|
||||
TABLE .content {
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
@@ -1,319 +1,293 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
|
||||
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
||||
|
||||
<title>Invision Install Guide: Help & FAQ</title>
|
||||
|
||||
<style>
|
||||
|
||||
BODY, TABLE { font-family: verdana, arial; font-size:12px; line-height:150% }
|
||||
|
||||
.title { background-image: url(tile_back.gif); font-family:arial; font-size:18px; color:white; font-weight:bold; height:40px }
|
||||
|
||||
.table1 { border:1px solid #999999 }
|
||||
|
||||
.table2 { border:1px dotted #999999 }
|
||||
|
||||
.menustrip { font-color:black; background-color:#EEEEEE; font-size:12px; height:24px }
|
||||
|
||||
a:link, a:visited, a:active { color:#000055 }
|
||||
|
||||
a:hover { color:#333377;text-decoration:underline }
|
||||
|
||||
.header { border-bottom:1px dashed #999999; font-family:Verdana, Arial; font-weight:bold; color:#4C77B6; font-size:20px; background-color:#FEFEFE; letter-spacing:-1px }
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" topmargin='5' leftmargin='0'>
|
||||
|
||||
|
||||
|
||||
<!-- Start content -->
|
||||
|
||||
|
||||
|
||||
<a name='top'></a>
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center'>
|
||||
|
||||
<b>Sections:</b> <a href='help.html#install' target='bottom'>Installation Problems</a> | <a href='help.html#admin' target='bottom'>Admin CP Problems</a> | <a href='help.html#main' target='bottom'>Board Problems</a> | <a href='help.html#help' target='bottom'>Getting Further Help</a>
|
||||
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<a name='install'></a>
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class='header' align='left'>Installation Problems</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='left'>
|
||||
|
||||
<b>When I run the installer, I get a page of code.</b>
|
||||
|
||||
<br>
|
||||
|
||||
If when accessing the installer via your web browser you receive a page of code and not the installation start screen, this means that either PHP has
|
||||
|
||||
not been installed or has not been configured properly. Please consult with your web host to see if this is the case.
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>I get an error like this 'access denied for user@localhost using password YES' when I submit the main form.</b>
|
||||
|
||||
<br>
|
||||
|
||||
If you receive this error from mySQL it means that either the mySQL database name, mySQL username, mySQL password or mySQL host information is wrong. Please double check the information you
|
||||
|
||||
entered making sure that passwords are typed correctly. In some cases, this information is case sensitive. If this error persists, please consult with your web host to check that the information
|
||||
|
||||
you have is correct.
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>After installing, I get this error 'Warning: fopen("/.install.lock", "w") - Permission denied ...'</b>
|
||||
|
||||
<br>
|
||||
|
||||
After installing, Invision Power Board attempts to create a "lock" file which disables the installation script. If you receive this error, the installer
|
||||
|
||||
has not been able to create this file. After you have logged into the Admin Center for the first time, you should remove the "sm_install.php" script
|
||||
|
||||
from your server and only re-upload it if you wish to make a fresh install. You can then safely ignore this warning.
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>When installing I get an error like this: 'WARNING! Could not locate 'conf_global.php'</b>
|
||||
|
||||
<br>
|
||||
|
||||
This error means that the installer could not "guess" the location of the file 'conf_global.php'. Make sure you have uploaded this file into the same directory that you
|
||||
|
||||
uploaded 'sm_install.php' into. If you have this file already uploaded and the CHMOD value has been set, then you can tell the installer where to look for this file by simply
|
||||
|
||||
opening 'sm_install.php' in your favourite text editor. Look near the top for "$root = "./";". Edit this to reflect your "real" path. Note, this is a path - not a URL, entering "http://www.domain.com" or similar will
|
||||
|
||||
result in an error. A path is literally the file path from the server root to the current directory (such as '/home/site/public_html/forums/'). More information is provided in the script near the top. When you have completed
|
||||
|
||||
the edit, simply save the file and re-upload to your server and re-run through your web browser.
|
||||
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<a name='admin'></a>
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class='header' align='left'>Admin CP Problems</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='left'>
|
||||
|
||||
<b>No matter what I do, I can't stay logged into the Admin CP.</b>
|
||||
|
||||
<br>
|
||||
|
||||
For extra security, the Admin CP checks your IP address as part of the admin session validation. In some cases your IP address will change with each page request (especially if you are using a dial up ISP). You can
|
||||
|
||||
stop the Admin CP checking your IP address which will solve the problem.
|
||||
|
||||
<br>To do this, open up "admin.php" in your text editor. Near the top of the script change <span style='color:red'>$check_ip = 1;</span> to <span style='color:red'>$check_ip = 0;</span>. Save the file and re-upload to your
|
||||
|
||||
server.
|
||||
|
||||
<br>Although there is no immediate security risk to doing this, you should not disclose your admin session ID to anyone or post the link you are using for that admin CP session to anyone.
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>When I try to access the Admin CP, the page is completely blank</b>
|
||||
|
||||
<br>
|
||||
|
||||
This problem could be the result of a few things.<br>
|
||||
|
||||
Firstly, open up "admin.php" in a text editor and near the top change: <span style='color:red'>$use_gzip = 1;</span> to <span style='color:red'>$use_gzip = 0;</span>. Save the file and re-upload to your
|
||||
|
||||
server.
|
||||
|
||||
<br>
|
||||
|
||||
If that doesn't solve the problem, check the CHMOD values on the directories you created during the installation process. If in doubt, CHMOD them to 0777 and any directories contained within.
|
||||
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<a name='main'></a>
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class='header' align='left'>General Board Problems</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='left'>
|
||||
|
||||
<b>Every time I try to access a page on the forums it loads a blank page.</b>
|
||||
|
||||
<br>
|
||||
|
||||
Can you log into the Admin CP? If you do not know the url, enter the following into your web browser address bar <b>http://www.your-domain-here.com/forums/admin.php</b> (obviously using the correct URL to your board!).
|
||||
|
||||
<br>If the Admin CP loads first time, try the following:
|
||||
|
||||
<br>Click on "Board Settings" to expand the sub-menu. Click on "Basic Config". When the page has loaded, turn off the following: <b>Print HTTP headers?</b> and <b>DISABLE GZIP encoding?</b>. When complete, submit the form
|
||||
|
||||
and try to access your board again.
|
||||
|
||||
<br>
|
||||
|
||||
If it still loads a blank page, check the CHMOD values on the directories you created during the installation including any directories contained within. If in doubt, CHMOD to 0777.
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>I am on a Windows server and I get an Internal Server Error when trying to access my board</b>
|
||||
|
||||
<br>
|
||||
|
||||
There is an option to disable the headers that Invision Power Board prints by default.
|
||||
|
||||
<br>Log into your Admin Control Panel, click on "Board Settings" to expand the sub-menu. Click on "Basic Config". When the page has loaded, turn off <b>Print HTTP headers?</b> and submit the form
|
||||
|
||||
and try to access your board again.
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>I am on a Windows server and when I make a post I am taken to a blank page</b>
|
||||
|
||||
<br>
|
||||
|
||||
Some Windows based servers require a different HTTP protocol when redirecting HTTP requests, there is an option in the Admin Control Panel to overcome this.
|
||||
|
||||
<br>
|
||||
|
||||
Log into your Admin Control Panel, click on "Board Settings" to expand the sub-menu. Click on "Basic Config". Choose "Refresh (Windows Savvy) from the "Type of auto-redirect?" option. Submit the form.
|
||||
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<a name='help'></a>
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class='header' align='left'>Getting further help</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='left'>
|
||||
|
||||
If you have a problem outside the ones solved in this guide, then don't panic!<br>
|
||||
|
||||
We have a large team of trained support professionals that <b>will</b> be able to provide a solution to your problems.<br>
|
||||
|
||||
Your first stop would be to post a problem on our "Support and Community Forums". We have a large active community who have experience in maintaining their Invision Power Board who may be able to give you a prompt reply - our support professionals also moderate these forums and
|
||||
|
||||
will read your posts. We do recommend that you make use of the search facility on the board to avoid posting problems that have already been posted - there is also a good chance that it's already been reported, discussed and solved.
|
||||
|
||||
<br>
|
||||
|
||||
<br>You may wish to consider <b>the <a href='http://www.invisionboard.com/?whyregister'>registration</a></b> option. A yearly fee will cover you for all support requests for a period of one year (12 months).
|
||||
|
||||
<br>Registration entitles you to the following benefits:
|
||||
|
||||
<ul>
|
||||
|
||||
<li> You will have lifetime access to the Invision Power Services Customer Service Center.
|
||||
|
||||
<li> Service Ticket access will allow you to submit technical tickets for our highly experienced staff to work with you. This means you will get private, one-on-one help without having to post on our support forums.
|
||||
|
||||
<li> Phone support inside the US and UK (toll-free in the US).
|
||||
|
||||
<li> Installation of Invision Power Board is included if you need this service (usually $35).
|
||||
|
||||
<li> Half-price upgrade installations upon request when new releases of Invision Power Board are available
|
||||
|
||||
<li> Discounts on Invision Power Board feature plug-ins</ul>
|
||||
|
||||
<br>
|
||||
|
||||
For more information on our registration service, please visit our <a href='http://www.invisionboard.com/support.cgi' target='_blank'>advanced services</a> page.
|
||||
|
||||
<br><br>
|
||||
|
||||
If you wish to contact us for non-technical issues, please visit our <a href='http://www.invisionpower.com/?contact' target='_blank'>Contact Page</a> which includes a handy email form, mailing address and telephone number.
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<!-- End content -->
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
|
||||
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
||||
|
||||
<title>Invision Install Guide: Help & FAQ</title>
|
||||
|
||||
<style>
|
||||
|
||||
BODY, TABLE { font-family: verdana, arial; font-size:12px; line-height:150% }
|
||||
|
||||
.title { background-image: url(tile_back.gif); font-family:arial; font-size:18px; color:white; font-weight:bold; height:40px }
|
||||
|
||||
.table1 { border:1px solid #999999 }
|
||||
|
||||
.table2 { border:1px dotted #999999 }
|
||||
|
||||
.menustrip { font-color:black; background-color:#EEEEEE; font-size:12px; height:24px }
|
||||
|
||||
a:link, a:visited, a:active { color:#000055 }
|
||||
|
||||
a:hover { color:#333377;text-decoration:underline }
|
||||
|
||||
.header { border-bottom:1px dashed #999999; font-family:Verdana, Arial; font-weight:bold; color:#4C77B6; font-size:20px; background-color:#FEFEFE; letter-spacing:-1px }
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" topmargin='5' leftmargin='0'>
|
||||
|
||||
|
||||
|
||||
<!-- Start content -->
|
||||
|
||||
|
||||
|
||||
<a name='top'></a>
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center'>
|
||||
|
||||
<b>Sections:</b> <a href='help.html#install' target='bottom'>Installation Problems</a> | <a href='help.html#admin' target='bottom'>Admin CP Problems</a> | <a href='help.html#main' target='bottom'>Board Problems</a> | <a href='help.html#help' target='bottom'>Getting Further Help</a>
|
||||
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<a name='install'></a>
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class='header' align='left'>Installation Problems</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='left'>
|
||||
|
||||
<b>When I run the installer, I get a page of code.</b>
|
||||
|
||||
<br>
|
||||
|
||||
If when accessing the installer via your web browser you receive a page of code and not the installation start screen, this means that either PHP has
|
||||
|
||||
not been installed or has not been configured properly. Please consult with your web host to see if this is the case.
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>I get an error like this 'access denied for user@localhost using password YES' when I submit the main form.</b>
|
||||
|
||||
<br>
|
||||
|
||||
If you receive this error from mySQL it means that either the mySQL database name, mySQL username, mySQL password or mySQL host information is wrong. Please double check the information you
|
||||
|
||||
entered making sure that passwords are typed correctly. In some cases, this information is case sensitive. If this error persists, please consult with your web host to check that the information
|
||||
|
||||
you have is correct.
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>After installing, I get this error 'Warning: fopen("/.install.lock", "w") - Permission denied ...'</b>
|
||||
|
||||
<br>
|
||||
|
||||
After installing, Invision Power Board attempts to create a "lock" file which disables the installation script. If you receive this error, the installer
|
||||
|
||||
has not been able to create this file. After you have logged into the Admin Center for the first time, you should remove the "install/index.php" script
|
||||
|
||||
from your server and only re-upload it if you wish to make a fresh install. You can then safely ignore this warning.
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>When installing I get an error like this: 'WARNING! Could not locate 'conf_global.php'</b>
|
||||
|
||||
<br>
|
||||
|
||||
This error means that the installer could not "guess" the location of the file 'conf_global.php'. Make sure you have uploaded this file into the same directory that you
|
||||
|
||||
uploaded 'sm_install.php' into. If you have this file already uploaded and the CHMOD value has been set, then you can tell the installer where to look for this file by simply
|
||||
|
||||
opening 'sm_install.php' in your favourite text editor. Look near the top for "$root = "./";". Edit this to reflect your "real" path. Note, this is a path - not a URL, entering "http://www.domain.com" or similar will
|
||||
|
||||
result in an error. A path is literally the file path from the server root to the current directory (such as '/home/site/public_html/forums/'). More information is provided in the script near the top. When you have completed
|
||||
|
||||
the edit, simply save the file and re-upload to your server and re-run through your web browser.
|
||||
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<a name='admin'></a>
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class='header' align='left'>Admin CP Problems</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='left'>
|
||||
|
||||
<b>No matter what I do, I can't stay logged into the Admin CP.</b>
|
||||
|
||||
<br>
|
||||
|
||||
For extra security, the Admin CP checks your IP address as part of the admin session validation. In some cases your IP address will change with each page request (especially if you are using a dial up ISP). You can
|
||||
|
||||
stop the Admin CP checking your IP address which will solve the problem.
|
||||
|
||||
<br>To do this, open up "admin.php" in your text editor. Near the top of the script change <span style='color:red'>$check_ip = 1;</span> to <span style='color:red'>$check_ip = 0;</span>. Save the file and re-upload to your
|
||||
|
||||
server.
|
||||
|
||||
<br>Although there is no immediate security risk to doing this, you should not disclose your admin session ID to anyone or post the link you are using for that admin CP session to anyone.
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>When I try to access the Admin CP, the page is completely blank</b>
|
||||
|
||||
<br>
|
||||
|
||||
This problem could be the result of a few things.<br>
|
||||
|
||||
Firstly, open up "admin.php" in a text editor and near the top change: <span style='color:red'>$use_gzip = 1;</span> to <span style='color:red'>$use_gzip = 0;</span>. Save the file and re-upload to your
|
||||
|
||||
server.
|
||||
|
||||
<br>
|
||||
|
||||
If that doesn't solve the problem, check the CHMOD values on the directories you created during the installation process. If in doubt, CHMOD them to 0777 and any directories contained within.
|
||||
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<a name='main'></a>
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class='header' align='left'>General Board Problems</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='left'>
|
||||
|
||||
<b>Every time I try to access a page on the forums it loads a blank page.</b>
|
||||
|
||||
<br>
|
||||
|
||||
Can you log into the Admin CP? If you do not know the url, enter the following into your web browser address bar <b>http://www.your-domain-here.com/forums/admin.php</b> (obviously using the correct URL to your board!).
|
||||
|
||||
<br>If the Admin CP loads first time, try the following:
|
||||
|
||||
<br>Click on "Board Settings" to expand the sub-menu. Click on "Basic Config". When the page has loaded, turn off the following: <b>Print HTTP headers?</b> and <b>DISABLE GZIP encoding?</b>. When complete, submit the form
|
||||
|
||||
and try to access your board again.
|
||||
|
||||
<br>
|
||||
|
||||
If it still loads a blank page, check the CHMOD values on the directories you created during the installation including any directories contained within. If in doubt, CHMOD to 0777.
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>I am on a Windows server and I get an Internal Server Error when trying to access my board</b>
|
||||
|
||||
<br>
|
||||
|
||||
There is an option to disable the headers that Invision Power Board prints by default.
|
||||
|
||||
<br>Log into your Admin Control Panel, click on "Board Settings" to expand the sub-menu. Click on "Basic Config". When the page has loaded, turn off <b>Print HTTP headers?</b> and submit the form
|
||||
|
||||
and try to access your board again.
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>I am on a Windows server and when I make a post I am taken to a blank page</b>
|
||||
|
||||
<br>
|
||||
|
||||
Some Windows based servers require a different HTTP protocol when redirecting HTTP requests, there is an option in the Admin Control Panel to overcome this.
|
||||
|
||||
<br>
|
||||
|
||||
Log into your Admin Control Panel, click on "Board Settings" to expand the sub-menu. Click on "Basic Config". Choose "Refresh (Windows Savvy) from the "Type of auto-redirect?" option. Submit the form.
|
||||
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<a name='help'></a>
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class='header' align='left'>Getting further help</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='left'>
|
||||
|
||||
If you have a problem outside the ones solved in this guide, then don't panic!<br>
|
||||
|
||||
We have a large team of trained support professionals that <b>will</b> be able to provide a solution to your problems.<br>
|
||||
|
||||
Simply log into your client center and submit a ticket.
|
||||
|
||||
<br><br>
|
||||
|
||||
If you wish to contact us for non-technical issues, please visit our <a href='http://anonym.to/http://www.invisionpower.com/?contact' target='_blank'>Contact Page</a> which includes a handy email form, mailing address and telephone number.
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<!-- End content -->
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1008 B |
|
After Width: | Height: | Size: 1009 B |
|
After Width: | Height: | Size: 1010 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,11 @@
|
||||
<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://anonym.to/http://www.invisionboard.com/">Invision Power Board</a>
|
||||
</body>
|
||||
</html>␍
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 43 B |
|
After Width: | Height: | Size: 295 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,42 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
||||
<title>Invision Power Board Install Guide: Welcome</title>
|
||||
<style type='text/css' media='all'>
|
||||
@import url('docs.css');
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<h2>Installing: Step 1 - Uploading</h2>
|
||||
<br />
|
||||
<div class='content-text'>
|
||||
At this point, you should have the zip archive "unzipped" and the contents similar to those shown in the <a href='chmod.html' target='bottom'>structure and CHMOD guide</a>. If you
|
||||
do not have a similar structure, check to make sure you have your zip program preferences set to allow creation of directories and to preserve case and long filenames.
|
||||
<br><br>
|
||||
If you haven't done so already, create a new directory on your server named appropriately (if you wanted to access the forums via 'http://www.domain.com/forums/', create a directory called 'forums' in the
|
||||
'public_html' or 'www' directory on your webserver.
|
||||
<br><br>
|
||||
Using your FTP client, move into the directory you wish to upload to (if you followed the above advice, move into the newly created 'forums' directory.)
|
||||
<br><br>
|
||||
Using your FTP client, create the following directories "admin", "cache", "install", "ips_kernel", "jscripts", "lofiversion", "modules", "retail", "resources", "skin_acp", "sources", "style_avatars", "style_captcha", "style_emoticons", "style_images", "upgrade" and "uploads" <span style='color:blue'>(TIP: If your FTP client supports "Drag n' Drop" which most modern clients do, you can save yourself some time and effort by
|
||||
simply selecting all the files from the "unzipped" zip archive and drag them into your FTP client window, this will then copy all the files, creating the directories as it goes. If you choose
|
||||
to do this, you can safely ignore most of the following instruction, just remember to CHMOD as outlined in the stucture and CHMOD guide).</span>
|
||||
<br><br>
|
||||
Once the directories have been created, CHMOD "skin_cache" and "uploads" to 0755 (if you get permissions errors later on, you can CHMOD these to
|
||||
"0777"). Now, upload the contents of the files in your local folders (from the zip file) into the corresponding directories you've just created on your server. Some folders will contain other
|
||||
files and folders, upload them all - preserving the structure you have in your zip file (for example, upload the entire contents of the "html" folder on your computer to the "html" directory on the server).
|
||||
<br><br>
|
||||
Once you have finished uploading into the directories, upload the rest of the files "conf_global.php.dist" and "index.php" to the same place as you created the directories earlier (into "forums" for our example).
|
||||
<br><br>
|
||||
That's it, the hard work is now done! You can proceed to the next step.
|
||||
</div>
|
||||
|
||||
<div class='content-next'>
|
||||
<img src='images/bullet_doing.gif' alt='' style='vertical-align:middle' border='0' /> <a href='install2.html'>Next: Installation Step Two</a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
||||
<title>Invision Power Board Install Guide: Welcome</title>
|
||||
<style type='text/css' media='all'>
|
||||
@import url('docs.css');
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<h2>Installing: Step 2 - Using the Installer</h2>
|
||||
<br />
|
||||
<div class='content-text'>
|
||||
An installer is provided to assist you in entering the information Invision Power Board needs to connect to your MySQL database and to create your new
|
||||
administrators account.
|
||||
<br><br>
|
||||
Run the installer file through your web browser by entering the URL to it into your browser address bar (if you have followed our example, type in
|
||||
<b>http://www.domain.com/forums/install/index.php</b>, naturally subsituting 'domain.com' for your web address.)
|
||||
<br><br>
|
||||
Clicking on proceed will present you with a simple information form. You will need to know your SQL username and password at this point. If you do not know it, please ask your web host - in most
|
||||
cases it is different from the FTP log in information.
|
||||
<br><br>The form is very straightfoward, with only the following points needing closer examination. If you do not know what your MySQL "host" is, try "localhost" (without the quotes). if the SQL server
|
||||
is on the same server as your website (and in most cases it is) this will suffice.
|
||||
<br>
|
||||
If you have created a new database for Invision Power Board, or wish to use an existing database, enter the name of the database in the appropriate field.<br><br>Unless you intend to install multiple copies of
|
||||
Invision Power Board into the same database, you can leave the "table prefix" blank. If you do not have a MySQL password (if you are installing Invision Power Board on your local server) this can be left blank.
|
||||
<br>
|
||||
After submitting the form, you will be informed of any errors - if you do get an error similar to "permission denied for user@localhost using password YES" - the chances are you have either your MySQL username, MySQL password
|
||||
or MySQL database name wrong. Consult with your webhost for the correct information and resubmit the form.
|
||||
<br><br>
|
||||
If the information is correct an IP.Board can connect to your database, you will be asked for your administrator login information. This is the information you will use to login to the board, and the admin control panel area.
|
||||
<br><br>
|
||||
If the installation was successful, you will receive notification to that effect.
|
||||
<br>
|
||||
Follow the link to finish off the installation and to log into your newly installed board. When the log in page loads, enter in the information you chose for your administrator account.
|
||||
<br>
|
||||
Once you are logged into the board, click on the "Admin CP" link found in the navigation bar to access the Administration Control Panel.
|
||||
</div>
|
||||
|
||||
<div class='content-next'>
|
||||
<img src='images/bullet_doing.gif' alt='' style='vertical-align:middle' border='0' /> <a href='install3.html'>Next: Installation Step Three</a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
||||
<title>Invision Power Board Install Guide: Welcome</title>
|
||||
<style type='text/css' media='all'>
|
||||
@import url('docs.css');
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<h2>Installing: Step 3 - Post Installation</h2>
|
||||
<br />
|
||||
<div class='content-text'>
|
||||
The Invision Power Board administration control panel is a very sophisticated tool. This is where you can create new categories and forums for your board, as well
|
||||
as set bad word filters, edit emoticons, change the board colours and so on. We recommend you browse the documentation at <a href='http://www.invisionboard.com/'>Invision Power Board</a> before getting attempting some of the more complex operations.
|
||||
<br><br>
|
||||
<b>Lets get stuck in!</b>
|
||||
<br>
|
||||
The first thing you will need to do is remove the "install/index.php" file from your server; although Invision Power Board locks the installer after a successful install, it's always a good idea to remove the installer as re-running it
|
||||
<b>will delete your database tables</b>.
|
||||
<br><br>
|
||||
Congratulations! You have installed and set up your new Invision Power Board. If you ran into trouble, please click on the "Help!" link in the top menu bar for the FAQ and how to get support.
|
||||
</div>
|
||||
|
||||
<div class='content-next'>
|
||||
<img src='images/bullet_doing.gif' alt='' style='vertical-align:middle' border='0' /> <a href='chmod.html'>Next: CHMOD Guide</a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
||||
<title>Invision Power Board Install Guide: Welcome</title>
|
||||
<style type='text/css' media='all'>
|
||||
@import url('docs.css');
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<h2>Requirements</h2>
|
||||
<br />
|
||||
<div class='content-text'>
|
||||
<em>The exact requirements will depend on many factors, your estimated board traffic being one.</em>
|
||||
<br />
|
||||
<br />
|
||||
You must have a webserver that has PHP 4.3.0 (or better) and MySQL 3.23 (or better) installed. If you are unsure whether your server has these
|
||||
programs installed, please check with your web host now. If you are capable, you can always <a href='http://www.php.net' target='_blank'>download PHP</a>
|
||||
and <a href='http://www.mysql.com' target='blank'>download mySQL</a> and install it yourself. If your web host does not support PHP or mySQL, consider hosting your entire web site or forums with <a href='http://www.ipshosting.com' target='blank'>IPS Hosting</a> services.
|
||||
<br>Invision Power Board works best on an Apache server, and is Apache 1 and Apache 2 savvy.
|
||||
<br><br>
|
||||
<b>General Requirements</b>
|
||||
<br>
|
||||
You <b>do not</b> need a new mySQL database as Invision Power Board supports table prefixes to prevent tables being overwritten.
|
||||
<br>You will also need the mySQL username and mySQL password for a mySQL user that has permission to "CREATE", "DROP" and "ALTER" tables.
|
||||
<br>You will need about 5mb of free web space and roughly 5mb of mySQL database space to allow installation and a moderately sized community.
|
||||
<br>If you are unsure on any of these points, please ask your webhost before proceeding.
|
||||
</div>
|
||||
|
||||
<div class='content-next'>
|
||||
<img src='images/bullet_doing.gif' alt='' style='vertical-align:middle' border='0' /> <a href='install1.html'>Next: Installation Step One</a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
||||
<title>Invision Power Board Install Guide: Welcome</title>
|
||||
<style type='text/css' media='all'>
|
||||
@import url('docs.css');
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h2>Welcome to Invision Power Board!</h2>
|
||||
<br />
|
||||
<div class='content-text'>
|
||||
Welcome to Invision Power Board, a fast, efficient, scalable community solution written in PHP and using MySQL for database storage.
|
||||
<br><br>
|
||||
Invision Power Board also supports MSSQL and Oracle for database storage. It is very important to note that if you are using an alternate database storage method that you MUST download the driver files for the database engine you are using, and upload those files with the rest of the Invision Power Board files. The additional files you need can be downloaded from your client area. If you need assistance
|
||||
with this step, please do not hesitate to submit a ticket for official support.
|
||||
<br><br>
|
||||
This guide will help you through the installation process and get you on your way to setting up your own Invision Power Board.
|
||||
<br>
|
||||
Installation is very straight forward, only taking about 15 minutes from uploading the files to logging into your administration center.
|
||||
<br>
|
||||
<br>
|
||||
You will need an FTP (File Transfer Protocol) client, if you do not have one you can download <a href='http://www.smartftp.com' target='_blank'>Smart FTP for Windows</a> or
|
||||
<a href='http://www.interarchy.com' target='_blank'>InterArchy for Macintosh</a>. At the time of writing both websites have freeware or free trial versions available for download.
|
||||
<br>You do not need an indepth knowledge of PHP programming to install Invision Power Board, but a working knowledge of FTP functions is a plus.
|
||||
<br>
|
||||
<br>This guide assumes that you have successfully downloaded the latest release from <a href='http://www.invisionboard.com' target='_blank'>Invision Power Board</a> and have the Zip file "unzipped" and ready to go.
|
||||
<br>The instructions will term the zip file you downloaded as "the zip archive", the directories created by the unzipping process as "the local folders" and the directories on your website as
|
||||
"website directories" - this is to prevent confusion.
|
||||
<br><br>
|
||||
</div>
|
||||
|
||||
<div class='content-next'>
|
||||
<img src='images/bullet_doing.gif' alt='' style='vertical-align:middle' border='0' /> <a href='requirements.html'>Next: Requirements</a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>IPS Installer</title>
|
||||
<style type='text/css' media='all'>
|
||||
@import url('data/docs.css');
|
||||
</style>
|
||||
<script type='text/javascript'>
|
||||
//<![CDATA[
|
||||
if (top.location != self.location) { top.location = self.location }
|
||||
var use_enhanced_js = 1;
|
||||
//]]>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<div id='ipswrapper'>
|
||||
<div class='main_shell'>
|
||||
<h1><img src='data/images/package_icon.gif' align='absmiddle' /> Welcome to the Invision Power Board</h1>
|
||||
<div class='content_shell'>
|
||||
<div class='package'>
|
||||
<div>
|
||||
<div class='install_info'>
|
||||
<h3>Menu</h3>
|
||||
|
||||
<ul id='progress'>
|
||||
<li class='step_notdone'><a style='text-decoration:none' href='data/welcome.html' target='myframe'>Welcome</a></li>
|
||||
<li class='step_notdone'><a style='text-decoration:none' href='data/requirements.html' target='myframe'>Requirements</a></li>
|
||||
<li class='step_notdone'><a style='text-decoration:none' href='data/install1.html' target='myframe'>Install: Step One</a></li>
|
||||
<li class='step_notdone'><a style='text-decoration:none' href='data/install2.html' target='myframe'>Install: Step Two</a></li>
|
||||
<li class='step_notdone'><a style='text-decoration:none' href='data/install3.html' target='myframe'>Install: Step Three</a></li>
|
||||
<li class='step_notdone'><a style='text-decoration:none' href='data/chmod.html' target='myframe'>CHMOD Guide</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class='content_wrap'>
|
||||
<iframe name='myframe' src='data/welcome.html' style='width:100%;height:425px' border='0' style='border:0px; padding:0px' frameborder='0'></iframe>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br clear='all' />
|
||||
<div style='clear: both;'></div>
|
||||
<div class='copyright'>
|
||||
© 2007 Invision Power Services, Inc.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>IPS Installer</title>
|
||||
<style type='text/css' media='all'>
|
||||
@import url('data/docs.css');
|
||||
</style>
|
||||
<script type='text/javascript'>
|
||||
//<![CDATA[
|
||||
if (top.location != self.location) { top.location = self.location }
|
||||
var use_enhanced_js = 1;
|
||||
//]]>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<div id='ipswrapper'>
|
||||
<div class='main_shell'>
|
||||
<h1><img src='data/images/package_icon.gif' align='absmiddle' /> Welcome to the Invision Power Board</h1>
|
||||
<div class='content_shell'>
|
||||
<div class='package' style='text-align:middle;height:280px'>
|
||||
<div>
|
||||
|
||||
|
||||
<div class='content_wrap' style='width:650px; margin:6px 12px 6px 6px;height:220px'>
|
||||
|
||||
|
||||
<h2>Updating your IPB</h2>
|
||||
<br/ >
|
||||
If you're updating your IPB, then please do the following:
|
||||
<ul>
|
||||
<li><b>Important note:</b> If you are using a database driver OTHER than MySQL please be sure to download the files for your
|
||||
driver from your client area and upload those files along with the files in the next step. If you fail to do this, you
|
||||
will not receive the SQL updates you need</li>
|
||||
<li>Upload all the files contained in the "upload" folder of the download distribution. Don't forget
|
||||
to update files in the "resources" and "upgrades" folder.</li>
|
||||
<li>Run the upgrade system by accessing "upgrade/index.php" on your system (for example: www.domain.com/forum/upgrade/index.php)
|
||||
this will determine which upgrade modules need to be run and will rebuild your templates for you.</li>
|
||||
<li><strong>Your upgrade is now complete!</strong></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<br clear='all' />
|
||||
<div style='clear: both;'></div>
|
||||
<div class='copyright'>
|
||||
© 2007 Invision Power Services, Inc.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,61 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>IPS Installer</title>
|
||||
<style type='text/css' media='all'>
|
||||
@import url('InstallationGuide/data/docs.css');
|
||||
</style>
|
||||
<script type='text/javascript'>
|
||||
//<![CDATA[
|
||||
if (top.location != self.location) { top.location = self.location }
|
||||
var use_enhanced_js = 1;
|
||||
//]]>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
<div id='ipswrapper'>
|
||||
<div class='main_shell'>
|
||||
<h1><img src='InstallationGuide/data/images/package_icon.gif' align='absmiddle' /> Welcome to the Invision Power Board</h1>
|
||||
<div class='content_shell' style='height:250px'>
|
||||
<div class='package' style='text-align:middle; height:250px'>
|
||||
<div>
|
||||
|
||||
|
||||
<div class='content_wrap' style='width:650px; margin:6px 12px 6px 6px; height:210px'>
|
||||
|
||||
<br />
|
||||
|
||||
<div class='info' style='padding:10px; text-align: center'>
|
||||
<div style='font-size:20px; font-weight:bold'>I AM UPGRADING</div>
|
||||
<br />
|
||||
Click <a href='InstallationGuide/upgrading.html'>HERE</a> if you are upgrading your Invision Power Board from a previous version.
|
||||
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div class='warning' style='padding:10px; text-align: center'>
|
||||
<div style='font-size:20px; font-weight:bold'>I AM INSTALLING</div>
|
||||
<br />
|
||||
<div style='font-weight:normal'>Click <a href='InstallationGuide/install_guide.html'>HERE</a> if you are installing a new Invision Power Board.</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br clear='all' />
|
||||
<div style='clear: both;'></div>
|
||||
<div class='copyright'>
|
||||
© 2007 Invision Power Services, Inc.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,361 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
|
||||
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
||||
|
||||
<title>Invision Power Board Upgrade Guide</title>
|
||||
|
||||
<style>
|
||||
|
||||
BODY, TABLE { font-family: verdana, arial; font-size:12px; line-height:150% }
|
||||
|
||||
.title { background-image: url(tile_back.gif); font-family:arial; font-size:18px; color:white; font-weight:bold; height:40px }
|
||||
|
||||
.table1 { border:1px solid #999999 }
|
||||
|
||||
.table2 { border:1px dotted #999999 }
|
||||
|
||||
.menustrip { font-color:black; background-color:#EEEEEE; font-size:12px; height:24px }
|
||||
|
||||
a:link, a:visited, a:active { color:#000055 }
|
||||
|
||||
a:hover { color:#333377;text-decoration:underline }
|
||||
|
||||
.header { border-bottom:1px dashed #999999; font-family:Verdana, Arial; font-weight:bold; color:#4C77B6; font-size:20px; background-color:#FEFEFE; letter-spacing:-1px }
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" topmargin='5' leftmargin='0'>
|
||||
|
||||
|
||||
|
||||
<!-- Start content -->
|
||||
|
||||
|
||||
|
||||
<a name='top'></a>
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='center'>
|
||||
|
||||
<b>Sections:</b> <a href='upgrade_v11x.html#intro'>Introduction</a> | <a href='upgrade_v11x.html#upgrade'>Upgrading</a> | <a href='upgrade_v11x.html#main'><b>HELP!!</b></a> | <a href='upgrade_v11x.html#help'>Getting Further Help</a>
|
||||
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<a name='intro'></a>
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class='header' align='left'>Welcome!</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='left'>
|
||||
|
||||
<b>Synopsis: Upgrading from v1.1.x to v1.2</b>
|
||||
|
||||
<br>
|
||||
|
||||
To upgrade your existing board from Invision Board v1.1.x to Invision Board v1.2, you'll need to update all the program files and
|
||||
|
||||
run an upgrade script that is included in this distribution. You may want to create a database back up and download via FTP any
|
||||
|
||||
existing language packs and skin files as these may be over-written during the upgrade.
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>Important: Skins and full text searching</b>
|
||||
|
||||
<br>
|
||||
|
||||
All v1.1.x skins are not compatible with v1.2. IPB v1.2 has an XHTML compliant skin which has been totally rewritten. The upgrade
|
||||
|
||||
process will 'sunset' all your current skins by marking them as hidden so that you may manually update them if desired.
|
||||
|
||||
<br /><br />
|
||||
|
||||
IPB v1.2 also supports full text searching. It is recommended that after the upgrade you log into your Admin CP, expand the "Board Options" sub menu and
|
||||
|
||||
set up full text search. Note, you will not be able to use the "quick" search until full text searching has been enabled.
|
||||
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<a name='upgrade'></a>
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class='header' align='left'>Upgrading</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='left'>
|
||||
|
||||
<b>Saving Old Data</b>
|
||||
|
||||
<br>
|
||||
|
||||
If you wish to save the information in the old default skin, please do the following:
|
||||
|
||||
<br>
|
||||
|
||||
<span style='color:blue'>Via FTP download the directories "Skin/s1/" and "style_images/1/"</span>. The upgrade will need the
|
||||
|
||||
v1.1 files to reside in those directories and any previous data will be lost. You will also need to export the default macro set if
|
||||
|
||||
you wish to retain the information. This <em>should</em> just be the original v1.1 macro set and overwriting it will be harmless.
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>Uploading the Files</b>
|
||||
|
||||
<br>
|
||||
|
||||
From the unzipped package, upload the following files to the same directory that your existing board is in:
|
||||
|
||||
<br><span style='color:blue'>admin.php
|
||||
|
||||
<br>css.php
|
||||
|
||||
<br>index.php
|
||||
|
||||
<br>install_templates.txt
|
||||
|
||||
<br>show.php
|
||||
|
||||
<br>upgrade5.php</span>
|
||||
|
||||
<br><br>Upload the directories (and any contents / sub directories):
|
||||
|
||||
<br>
|
||||
|
||||
<span style='color:red'>
|
||||
|
||||
cache
|
||||
|
||||
<br>
|
||||
|
||||
fonts
|
||||
|
||||
<br>
|
||||
|
||||
html (All files and sub forums, etc)
|
||||
|
||||
<br>
|
||||
|
||||
lang/en/*.php (All PHP files. Create the directory if it's not there and upload into it)
|
||||
|
||||
<br>
|
||||
|
||||
Skin/s1/*.php (All PHP files. Create the directory if it's not there and upload into it)
|
||||
|
||||
<br>
|
||||
|
||||
sources/*.* (All PHP files and sub folders)
|
||||
|
||||
<br>
|
||||
|
||||
style_images/1/ (All files. Create the directory "1" if it's not there and upload into it)</span>
|
||||
|
||||
<br><br>
|
||||
|
||||
In short: Upload everything as if it were a new install!
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>Please check the following before you proceed</b>
|
||||
|
||||
<br>You MUST ensure that the new skin PHP files are in a directory called "Skin/s1/" - if you have previously removed "s1" from the "Skins" directory, please re-create it via FTP and upload the skin PHP files into it.
|
||||
|
||||
<br><br>You MUST ensure that the new images are in a directory called "style_images/1/" - if you have previously
|
||||
|
||||
removed "1" from the "style_images" directory, please re-create it via FTP and upload the images into it.
|
||||
|
||||
<br><br>You MUST make sure the file 'install_templates.txt' is uploaded into the same directory as 'index.php'
|
||||
|
||||
<br><br>You MUST make sure the script 'upgrade5.php' is uploaded into the same directory as 'index.php'
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>Running the upgrade script</b>
|
||||
|
||||
<br>
|
||||
|
||||
Open up a new browser window and enter the URL to the upgrade5.php script (example: www.board.com/forums/upgrade5.php)
|
||||
|
||||
Follow the onscreen instructions to update your database.
|
||||
|
||||
<br><br>
|
||||
|
||||
If you get an error during the upgrade, try hitting back in your browser and try again.
|
||||
|
||||
<br>
|
||||
|
||||
This script will upgrade your database, install new templates and perform a clean up.
|
||||
|
||||
<br><br>
|
||||
|
||||
<span style='color:red'><b>IMPORTANT: PLEASE REMOVE THE SCRIPT WHEN THE UPGRADE IS COMPLETED!</b></span>
|
||||
|
||||
<br><br>
|
||||
|
||||
That's it, you should be done!
|
||||
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<a name='main'></a>
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class='header' align='left'>HELP!!: Common Problems</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='left'>
|
||||
|
||||
<b>The upgrade worked fine, but I get a blank screen now!!</b>
|
||||
|
||||
<br>
|
||||
|
||||
The upgrade takes it's best guess when it creates the new skin set, it's not impossible that it might not match everything up.
|
||||
|
||||
If you get a blank screen, it's usually because the board wrapper it's chosen is broken / doesn't exist. Try the following:
|
||||
|
||||
<br>Log into your Admin CP. Go to "Skins & Templates". Click on "Manage Skin Sets" and edit "IPB Default Set (1.2)" and make
|
||||
|
||||
sure it's got a valid template set and wrapper.
|
||||
|
||||
<br><br>
|
||||
|
||||
<b>I can't do anything, I get loads of errors!!</b>
|
||||
|
||||
<br>
|
||||
|
||||
This is <b>always</b> caused by a failure to update the files in "Skin/s1/" on your server. Simply put, they MUST be updated from
|
||||
|
||||
the ones included in this zip file (upload/Skins/s1). Upload the skins and refresh your browser.
|
||||
|
||||
|
||||
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<a name='help'></a>
|
||||
|
||||
<table width='95%' align='center' cellpadding='4' cellspacing='0'>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class='header' align='left'>Getting further help</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td align='left'>
|
||||
|
||||
If you have a problem outside the ones solved in this guide, then don't panic!<br>
|
||||
|
||||
We have a large team of trained support professionals that <b>will</b> be able to provide a solution to your problems.<br>
|
||||
|
||||
Your first stop would be our "Support and Community Forums". We have a large active community who have experience in maintaining their Invision Power Board who may be able to give you a prompt reply - our support professionals also moderate these forums and
|
||||
|
||||
will read your posts. We do recommend that you make use of the search facility on the board to avoid posting problems that have already been posted - there is also a good chance that it's already been reported, discussed and solved.
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
<br>You may wish to consider <b><a href='http://www.invisionboard.com/?whyregister' target='_blank'>registering your board</a></b>. A once only fee will cover you for all support requests for a period of one year (12 months).
|
||||
|
||||
<br>Priority support entitles you to the following benefits:
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Your support tickets will be marked priority and only Invision Power Board administrators will have access to those tickets.
|
||||
|
||||
<li>You will be given access to a private support forum on our Community Forums.
|
||||
|
||||
<li>If you are in the United States you will receive telephone support if desired.
|
||||
|
||||
<li>In most cases we will login to your account and address problems for you.
|
||||
|
||||
<li>We can install and upgrade the software for you if desired.</ul>
|
||||
|
||||
<br>
|
||||
|
||||
For more information on our priority support service, please visit our <a href='http://www.invisionboard.com/?services' target='_blank'>advanced services</a> page.
|
||||
|
||||
<br><br>
|
||||
|
||||
If you wish to contact us for non-technical issues, please visit our <a href='http://www.invisionpower.com/?contact' target='_blank'>Contact Page</a> which includes a handy email form, mailing address and telephone number.
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<!-- End content -->
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,266 @@
|
||||
<?
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2004 Invision Power Services, Inc
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisionpower.com
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > IP Chat => IPB Bridge Script
|
||||
| > Script written by Matt Mecham
|
||||
| > Date started: 17th February 2003 (Updated: 1 July 2004)
|
||||
| > Updated for 2.1.x: Thu 6th October 2005
|
||||
|
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* SIGMACHAT auth file.
|
||||
*
|
||||
* Set-up and load module to run
|
||||
*
|
||||
* @package InvisionPowerBoard
|
||||
* @author Matt Mecham
|
||||
* @version 2.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* Script type
|
||||
*
|
||||
*/
|
||||
define( 'IPB_THIS_SCRIPT', 'public' );
|
||||
define( 'IPB_LOAD_SQL' , 'queries' );
|
||||
|
||||
require_once( './init.php' );
|
||||
|
||||
//===========================================================================
|
||||
// MAIN PROGRAM
|
||||
//===========================================================================
|
||||
|
||||
$INFO = array();
|
||||
|
||||
//--------------------------------
|
||||
// Load our classes
|
||||
//--------------------------------
|
||||
|
||||
require_once ROOT_PATH . "sources/ipsclass.php";
|
||||
require_once KERNEL_PATH . "class_converge.php";
|
||||
require_once ROOT_PATH . "conf_global.php";
|
||||
|
||||
# Initiate super-class
|
||||
$ipsclass = new ipsclass();
|
||||
$ipsclass->vars = $INFO;
|
||||
|
||||
//--------------------------------
|
||||
// The clocks a' tickin'
|
||||
//--------------------------------
|
||||
|
||||
$Debug = new Debug;
|
||||
$Debug->startTimer();
|
||||
|
||||
//--------------------------------
|
||||
// Load the DB driver and such
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->init_db_connection();
|
||||
|
||||
//--------------------------------
|
||||
// Set up our vars
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->parse_incoming();
|
||||
|
||||
//--------------------------------
|
||||
// Set converge
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->converge = new class_converge( $ipsclass->DB );
|
||||
|
||||
//--------------------------------
|
||||
// Start off the cache array
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->cache_array = array('rss_calendar', 'rss_export','components','banfilters', 'settings', 'group_cache', 'systemvars', 'skin_id_cache', 'forum_cache', 'moderators', 'stats', 'languages');
|
||||
|
||||
|
||||
//===========================================================================
|
||||
// Get cache...
|
||||
//===========================================================================
|
||||
|
||||
$ipsclass->init_load_cache( $ipsclass->cache_array );
|
||||
|
||||
//--------------------------------
|
||||
// Initialize the FUNC
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->initiate_ipsclass();
|
||||
|
||||
//===========================================================================
|
||||
// AUTHORIZE...
|
||||
//===========================================================================
|
||||
|
||||
define( 'DENIED', 0 );
|
||||
define( 'ACCESS', 1 );
|
||||
define( 'ADMIN' , 2 );
|
||||
|
||||
$allowed_groups = $ipsclass->vars['chat_admin_groups'];
|
||||
$access_groups = $ipsclass->vars['chat_access_groups'];
|
||||
$autologin = 0;
|
||||
$allow_guest_access = $ipsclass->vars['chat_allow_guest'] == 1 ? ACCESS : DENIED;
|
||||
|
||||
// Stupid PHP changing it's mind on HTTP args
|
||||
|
||||
$username = $_GET['username'] != "" ? $_GET['username'] : $HTTP_GET_VARS['username'];
|
||||
$password = $_GET['password'] != "" ? $_GET['password'] : $HTTP_GET_VARS['password'];
|
||||
$ip = $_GET['ip'] != "" ? $_GET['ip'] : $HTTP_GET_VARS['ip'];
|
||||
|
||||
//----------------------------------------------
|
||||
// Test for autologin.
|
||||
//----------------------------------------------
|
||||
|
||||
if ( preg_match( "/^(?:[0-9a-z]){32}$/", $password ) )
|
||||
{
|
||||
$autologin = 1;
|
||||
}
|
||||
|
||||
//----------------------------------------------
|
||||
// Remove URL encoding (%20, etc)
|
||||
//----------------------------------------------
|
||||
|
||||
$username = $ipsclass->parse_clean_value(urldecode(trim($username)));
|
||||
$password = $ipsclass->parse_clean_value(urldecode(trim($password)));
|
||||
$ip = $ipsclass->parse_clean_value(urldecode(trim($ip)));
|
||||
|
||||
//----------------------------------------------
|
||||
// Main code
|
||||
//----------------------------------------------
|
||||
|
||||
// Start off with the lowest accessibility
|
||||
|
||||
$output_int = $allow_guest_access;
|
||||
$output_name = "";
|
||||
|
||||
//------------------------------
|
||||
// Attempt to find the user
|
||||
//------------------------------
|
||||
|
||||
$ipsclass->DB->build_query( array( 'select' => 'm.mgroup, m.name, m.members_display_name, m.id, c.*',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => "m.members_l_display_name='".$ipsclass->DB->add_slashes(strtolower($username))."'",
|
||||
'limit' => array( 0, 1 ),
|
||||
'add_join' => array( 1 => array( 'type' => 'left',
|
||||
'from' => array( 'members_converge' => 'c' ),
|
||||
'where' => 'c.converge_email=m.email',
|
||||
) )
|
||||
) );
|
||||
$ipsclass->DB->exec_query();
|
||||
|
||||
|
||||
if ( ! $member = $ipsclass->DB->fetch_row() )
|
||||
{
|
||||
die_nice();
|
||||
|
||||
//-- script exits --//
|
||||
}
|
||||
|
||||
|
||||
if ( ! $member['id'] )
|
||||
{
|
||||
// No member found - allow guest access?
|
||||
|
||||
die_nice($allow_guest_access);
|
||||
|
||||
//-- script exits --//
|
||||
}
|
||||
|
||||
//------------------------------
|
||||
// Update passy
|
||||
//------------------------------
|
||||
|
||||
if ( ! $autologin )
|
||||
{
|
||||
$md5_password = md5( md5( $member['converge_pass_salt'] ) . md5($password) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$md5_password = $password;
|
||||
}
|
||||
|
||||
//------------------------------
|
||||
// Check password - member exists
|
||||
//------------------------------
|
||||
|
||||
if ( $password != "" )
|
||||
{
|
||||
// Password was entered..
|
||||
|
||||
if ( $md5_password != $member['converge_pass_hash'] )
|
||||
{
|
||||
// Password incorrect..
|
||||
|
||||
die_nice();
|
||||
|
||||
//-- script exits --//
|
||||
}
|
||||
else
|
||||
{
|
||||
$output_int = ACCESS;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// No password entered - die!
|
||||
// Do not allow guest access on reg. name
|
||||
|
||||
die_nice();
|
||||
|
||||
//-- script exits --//
|
||||
}
|
||||
|
||||
|
||||
//------------------------------
|
||||
// Do we have any access?
|
||||
//------------------------------
|
||||
|
||||
|
||||
if ( ! preg_match( "/(^|,)".$member['mgroup']."(,|$)/", $access_groups ) )
|
||||
{
|
||||
die_nice();
|
||||
}
|
||||
|
||||
//------------------------------
|
||||
// Do we have admin access?
|
||||
//------------------------------
|
||||
|
||||
if ( preg_match( "/(^|,)".$member['mgroup']."(,|$)/", $allowed_groups ) )
|
||||
{
|
||||
$output_int = ADMIN;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------
|
||||
// Spill the beans
|
||||
//------------------------------
|
||||
|
||||
print "SCRAS^1.1\nAUTH^".$output_int."\nUID^".intval($member['id'])."\n";
|
||||
|
||||
exit();
|
||||
|
||||
|
||||
function die_nice( $access=0 )
|
||||
{
|
||||
global $ipsclass;
|
||||
|
||||
// Simply error out silently, showing guest access only for the user
|
||||
$ipsclass->DB->close_db();
|
||||
print $access;
|
||||
exit();
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,18 @@
|
||||
-----------------------------------------------------
|
||||
IP.Board 2.3.0+ Rebuild Post Tool
|
||||
(c) Invision Power Services, Inc. 2007
|
||||
@author: Matt - June 2007
|
||||
-----------------------------------------------------
|
||||
OVERVIEW:
|
||||
This tool is run via command line to prevent the usual PHP timeout errors. It is also
|
||||
significantly quicker to run as it's capable of parsing up to 10,000 posts a minute.
|
||||
|
||||
USAGE:
|
||||
Simply upload the file 'rebuildposts.php' into your root IP.Board folder. This is the folder
|
||||
that contains your 'index.php' and 'init.php' files.
|
||||
|
||||
Log into your server via SSH, then Change Directory to your root IP.Board folder. Run the tool
|
||||
by typing: "php rebuildposts.php" (without the quotes).
|
||||
|
||||
Follow the onscreen prompts to select which type of post you wish to rebuild along with the
|
||||
starting ID you wish to use and how many posts you wish to rebuild.
|
||||
@@ -0,0 +1,654 @@
|
||||
#!/usr/local/bin/php
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Email: matt@invisionpower.com
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
|
||||
| http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2007-05-11 22:54:34 +0100 (Fri, 11 May 2007) $
|
||||
| > $Revision: 994 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > SHELL SCRIPT: Rebuild Posts
|
||||
|
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* Script type
|
||||
*
|
||||
*/
|
||||
define( 'IPB_THIS_SCRIPT', 'public' );
|
||||
define( 'IPB_LOAD_SQL' , 'queries' );
|
||||
|
||||
if ( ! file_exists( './init.php' ) )
|
||||
{
|
||||
myprint( "ERROR: This script MUST be placed in your forum's root directory.\n" );
|
||||
exit(0);
|
||||
}
|
||||
|
||||
require_once( './init.php' );
|
||||
|
||||
//===========================================================================
|
||||
// MAIN PROGRAM
|
||||
//===========================================================================
|
||||
|
||||
$INFO = array();
|
||||
|
||||
//--------------------------------
|
||||
// Load our classes
|
||||
//--------------------------------
|
||||
|
||||
require_once ROOT_PATH . "sources/ipsclass.php";
|
||||
require_once ROOT_PATH . "sources/classes/class_display.php";
|
||||
require_once ROOT_PATH . "sources/classes/class_session.php";
|
||||
require_once ROOT_PATH . "sources/classes/class_forums.php";
|
||||
require_once KERNEL_PATH . "class_converge.php";
|
||||
|
||||
if ( file_exists( ROOT_PATH . "conf_global.php" ) )
|
||||
{
|
||||
require_once ROOT_PATH . "conf_global.php";
|
||||
}
|
||||
|
||||
# Initiate super-class
|
||||
$ipsclass = new ipsclass();
|
||||
$ipsclass->vars = $INFO;
|
||||
|
||||
//--------------------------------
|
||||
// The clocks a' tickin'
|
||||
//--------------------------------
|
||||
|
||||
$Debug = new Debug;
|
||||
$Debug->startTimer();
|
||||
|
||||
//--------------------------------
|
||||
// Load the DB driver and such
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->init_db_connection();
|
||||
|
||||
//--------------------------------
|
||||
// Set debug mode
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->DB->set_debug_mode( 0 );
|
||||
|
||||
$ipsclass->forums = new forum_functions();
|
||||
$ipsclass->forums->ipsclass =& $ipsclass;
|
||||
|
||||
//--------------------------------
|
||||
// Set up our vars
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->parse_incoming();
|
||||
|
||||
//--------------------------------
|
||||
// Set converge
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->converge = new class_converge( $ipsclass->DB );
|
||||
|
||||
//--------------------------------
|
||||
// Start off the cache array
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->cache_array = array_merge( array('badwords','emoticons','attachtypes','bbcode', 'multimod','ranks','profilefields','skin_remap', 'rss_calendar', 'rss_export', 'components', 'banfilters', 'settings', 'group_cache', 'systemvars', 'skin_id_cache', 'forum_cache', 'moderators', 'stats', 'languages') );
|
||||
|
||||
//===========================================================================
|
||||
// Get cache...
|
||||
//===========================================================================
|
||||
|
||||
$ipsclass->init_cache_setup();
|
||||
$ipsclass->init_load_cache( $ipsclass->cache_array );
|
||||
|
||||
//--------------------------------
|
||||
// Initialize the FUNC
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->initiate_ipsclass();
|
||||
|
||||
//--------------------------------
|
||||
// Initialize the forums
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->forums->strip_invisible = 1;
|
||||
$ipsclass->forums->forums_init();
|
||||
|
||||
//--------------------------------
|
||||
// Load the skin
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->load_skin();
|
||||
|
||||
$ppu = 0;
|
||||
$tpu = 0;
|
||||
|
||||
if( isset($ipsclass->member['view_prefs']) )
|
||||
{
|
||||
list($ppu,$tpu) = explode( "&", $ipsclass->member['view_prefs'] );
|
||||
}
|
||||
|
||||
$ipsclass->vars['display_max_topics'] = ($tpu > 0) ? $tpu : $ipsclass->vars['display_max_topics'];
|
||||
$ipsclass->vars['display_max_posts'] = ($ppu > 0) ? $ppu : $ipsclass->vars['display_max_posts'];
|
||||
|
||||
//===========================================================================
|
||||
// Set up the session ID stuff
|
||||
//===========================================================================
|
||||
|
||||
if ( $ipsclass->session_type == 'cookie' )
|
||||
{
|
||||
$ipsclass->session_id = "";
|
||||
$ipsclass->base_url = $ipsclass->vars['board_url'].'/index.'.$ipsclass->vars['php_ext'].'?';
|
||||
}
|
||||
else
|
||||
{
|
||||
$ipsclass->base_url = $ipsclass->vars['board_url'].'/index.'.$ipsclass->vars['php_ext'].'?s='.$ipsclass->session_id.'&';
|
||||
}
|
||||
|
||||
$ipsclass->js_base_url = $ipsclass->vars['board_url'].'/index.'.$ipsclass->vars['php_ext'].'?s='.$ipsclass->session_id.'&';
|
||||
|
||||
//--------------------------------
|
||||
// Set up the forum_read cookie
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->hdl_forum_read_cookie();
|
||||
|
||||
//===========================================================================
|
||||
// Set up defaults
|
||||
//===========================================================================
|
||||
|
||||
$ipsclass->skin_id = $ipsclass->skin['_setid'];
|
||||
|
||||
$ipsclass->vars['img_url'] = $ipsclass->vars['ipb_img_url'] ? $ipsclass->vars['ipb_img_url'] . 'style_images/' . $ipsclass->skin['_imagedir'] : 'style_images/' . $ipsclass->skin['_imagedir'];
|
||||
$ipsclass->vars['AVATARS_URL'] = $ipsclass->vars['ipb_img_url'] ? $ipsclass->vars['ipb_img_url'] . 'style_avatars' : 'style_avatars';
|
||||
$ipsclass->vars['EMOTICONS_URL'] = $ipsclass->vars['ipb_img_url'] ? $ipsclass->vars['ipb_img_url'] . 'style_emoticons/<#EMO_DIR#>' : 'style_emoticons/<#EMO_DIR#>';
|
||||
$ipsclass->vars['mime_img'] = $ipsclass->vars['ipb_img_url'] ? $ipsclass->vars['ipb_img_url'] . 'style_images/<#IMG_DIR#>' : 'style_images/<#IMG_DIR#>';
|
||||
|
||||
//--------------------------------
|
||||
// Set up our language choice
|
||||
//--------------------------------
|
||||
|
||||
if ( !isset($ipsclass->vars['default_language']) OR $ipsclass->vars['default_language'] == "")
|
||||
{
|
||||
$ipsclass->vars['default_language'] = 'en';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load language
|
||||
//-----------------------------------------
|
||||
|
||||
$ipsclass->load_language('lang_global');
|
||||
|
||||
//-----------------------------------------
|
||||
// Continue
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" );
|
||||
$parser = new parse_bbcode();
|
||||
$parser->ipsclass =& $ipsclass;
|
||||
$parser->allow_update_caches = 0;
|
||||
|
||||
//-----------------------------------------
|
||||
// Get input stream
|
||||
//-----------------------------------------
|
||||
|
||||
$stdin = fopen('php://stdin', 'r');
|
||||
|
||||
//-----------------------------------------
|
||||
// Ask what we're doing...
|
||||
//-----------------------------------------
|
||||
|
||||
myprint( "--------------------------------------------\nWelcome to the IP.Board Shell Post Rebuilder\n--------------------------------------------\nWhat do you wish to rebuild? [p=Posts, c=Calendar Events, m=Personal Messages, a=Announcements, s=Signatures]\nEnter: " );
|
||||
|
||||
$option = getoption();
|
||||
|
||||
//-----------------------------------------
|
||||
// What did we choose?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $option != 'p' AND $option != 'c' AND $option != 'm' AND $option != 'a' AND $option != 's' )
|
||||
{
|
||||
myprint( "Incorrect option chosen\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$type = '';
|
||||
|
||||
switch( $option )
|
||||
{
|
||||
case 'p':
|
||||
$type = 'posts';
|
||||
$human = 'Posts';
|
||||
break;
|
||||
case 'c':
|
||||
$type = 'cal';
|
||||
$human = 'Calendar Events';
|
||||
break;
|
||||
case 'm':
|
||||
$type = 'pms';
|
||||
$human = 'Personal Messages';
|
||||
break;
|
||||
case 's':
|
||||
$type = 'sigs';
|
||||
$human = 'Signatures';
|
||||
break;
|
||||
case 'a':
|
||||
$type = 'announce';
|
||||
$human = 'Announcements';
|
||||
break;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// CHOICE: Days or ID
|
||||
//-----------------------------------------
|
||||
|
||||
myprint( "You have selected to rebuild: " . $human . "\n--------------------------------------------\nDo you want to rebuild from the last X days items or start from a specific ID? [0=Rebuild from the beginning, d=Rebuild from last X days, n=Rebuild from an ID]\nEnter: " );
|
||||
|
||||
$option = getoption();
|
||||
|
||||
if ( $option == 'd' )
|
||||
{
|
||||
# DAYS
|
||||
myprint( "Enter the number of days to rebuild from [Entering 30 will rebuild all items from the past 30 days]:\nEnter: " );
|
||||
|
||||
$option = intval( getoption() );
|
||||
$date = 86400 * $option;
|
||||
$time = time() - $date;
|
||||
|
||||
# Find starting ID
|
||||
switch( $type )
|
||||
{
|
||||
case 'cal':
|
||||
$tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'event_id', 'from' => 'cal_events', 'where' => 'event_unixstamp >= ' . $time, 'limit' => array(1) ) );
|
||||
$max = intval( $tmp['event_id'] );
|
||||
break;
|
||||
|
||||
case 'announce':
|
||||
$tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'announce_id', 'from' => 'announcements', 'where' => 'announce_start >= ' . $time, 'limit' => array(1) ) );
|
||||
$max = intval( $tmp['announce_id'] );
|
||||
break;
|
||||
|
||||
case 'pms':
|
||||
$tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'msg_id', 'from' => 'message_text', 'where' => 'msg_date >= ' . $time, 'limit' => array(1) ) );
|
||||
$max = intval( $tmp['msg_id'] );
|
||||
break;
|
||||
|
||||
case 'sigs':
|
||||
$tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'id', 'from' => 'member_extra', 'where' => "signature != '' AND joined >= " . $time, 'limit' => array(1) ) );
|
||||
$max = intval( $tmp['id'] );
|
||||
break;
|
||||
|
||||
case 'posts':
|
||||
default:
|
||||
$tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'pid', 'from' => 'posts', 'where' => 'post_date >= ' . $time, 'limit' => array(1) ) );
|
||||
$max = intval( $tmp['pid'] );
|
||||
break;
|
||||
}
|
||||
|
||||
$start = $max;
|
||||
}
|
||||
else if ( $option == 'n' )
|
||||
{
|
||||
# Number
|
||||
myprint( "Enter the ID to start from:\nEnter: " );
|
||||
|
||||
$option = getoption();
|
||||
$start = intval( $option );
|
||||
}
|
||||
else
|
||||
{
|
||||
# All
|
||||
$start = 0;
|
||||
}
|
||||
|
||||
myprint( "Rebuilding {$human}, starting at ID " . $start . "\nRebuild how many? [Enter how many you'd like to rebuild. Hit enter to rebuild all]:\nEnter: " );
|
||||
|
||||
$option = getoption();
|
||||
|
||||
$end = ( $end > 0 ) ? intval( $end ) : 0;
|
||||
$done = 0;
|
||||
$_BATCH = 500;
|
||||
$_LAST_ID = intval( $start );
|
||||
$time_start = time();
|
||||
$COMPLETE = 0;
|
||||
|
||||
//-----------------------------------------
|
||||
// Start the loop...
|
||||
//-----------------------------------------
|
||||
|
||||
while( $COMPLETE == 0 )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Got any more?
|
||||
//-----------------------------------------
|
||||
|
||||
switch( $type )
|
||||
{
|
||||
case 'cal':
|
||||
$tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'MAX(event_id) as max', 'from' => 'cal_events', 'where' => 'event_id > ' . $_LAST_ID ) );
|
||||
$max = intval( $tmp['max'] );
|
||||
break;
|
||||
|
||||
case 'announce':
|
||||
$tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'MAX(announce_id) as max', 'from' => 'announcements', 'where' => 'announce_id > ' . $_LAST_ID ) );
|
||||
$max = intval( $tmp['max'] );
|
||||
break;
|
||||
|
||||
case 'pms':
|
||||
$tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'MAX(msg_id) as max', 'from' => 'message_text', 'where' => 'msg_id > ' . $_LAST_ID ) );
|
||||
$max = intval( $tmp['max'] );
|
||||
break;
|
||||
|
||||
case 'sigs':
|
||||
$tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'MAX(id) as max', 'from' => 'member_extra', 'where' => "signature != '' AND id > " . $_LAST_ID ) );
|
||||
$max = intval( $tmp['max'] );
|
||||
break;
|
||||
|
||||
case 'posts':
|
||||
default:
|
||||
$tmp = $ipsclass->DB->simple_exec_query( array( 'select' => 'MAX(pid) as max', 'from' => 'posts', 'where' => 'pid > ' . $_LAST_ID ) );
|
||||
$max = intval( $tmp['max'] );
|
||||
break;
|
||||
}
|
||||
|
||||
if ( ! $max OR $_LAST_ID > $max )
|
||||
{
|
||||
$COMPLETE = 1;
|
||||
}
|
||||
|
||||
myprint( "\nStarting batch: Last ID=" . $_LAST_ID . " Max ID=" . $max );
|
||||
|
||||
//-----------------------------------------
|
||||
// Avoid limit...
|
||||
//-----------------------------------------
|
||||
|
||||
switch( $type )
|
||||
{
|
||||
case 'cal':
|
||||
$ipsclass->DB->build_query( array( 'select' => 'e.*',
|
||||
'from' => array( 'cal_events' => 'e' ),
|
||||
'order' => 'e.event_id ASC',
|
||||
'where' => 'e.event_id > ' . $_LAST_ID,
|
||||
'limit' => array( $_BATCH ),
|
||||
'add_join' => array( 1 => array( 'type' => 'left',
|
||||
'select' => 'm.mgroup',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => "m.id=e.event_member_id"
|
||||
) )
|
||||
) );
|
||||
break;
|
||||
|
||||
case 'announce':
|
||||
$ipsclass->DB->build_query( array( 'select' => 'a.*',
|
||||
'from' => array( 'announcements' => 'a' ),
|
||||
'order' => 'a.announce_id ASC',
|
||||
'where' => 'a.announce_id > ' . $_LAST_ID,
|
||||
'limit' => array( $_BATCH ),
|
||||
'add_join' => array( 1 => array( 'type' => 'left',
|
||||
'select' => 'm.mgroup',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => "m.id=a.announce_member_id"
|
||||
) )
|
||||
) );
|
||||
break;
|
||||
|
||||
case 'pms':
|
||||
$ipsclass->DB->build_query( array( 'select' => 'p.*',
|
||||
'from' => array( 'message_text' => 'p' ),
|
||||
'order' => 'p.msg_id ASC',
|
||||
'where' => 'p.msg_id > ' . $_LAST_ID,
|
||||
'limit' => array( $_BATCH ),
|
||||
'add_join' => array( 1 => array( 'type' => 'left',
|
||||
'select' => 'm.mgroup',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => "m.id=p.msg_author_id"
|
||||
) )
|
||||
) );
|
||||
break;
|
||||
|
||||
case 'sigs':
|
||||
$ipsclass->DB->build_query( array( 'select' => 'me.signature, me.id',
|
||||
'from' => array( 'member_extra' => 'me' ),
|
||||
'order' => 'me.id ASC',
|
||||
'where' => "me.signature != '' AND me.id > " . $_LAST_ID,
|
||||
'limit' => array( $_BATCH ),
|
||||
'add_join' => array( 1 => array( 'type' => 'left',
|
||||
'select' => 'm.mgroup',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => "m.id=me.id"
|
||||
) )
|
||||
) );
|
||||
break;
|
||||
|
||||
case 'posts':
|
||||
default:
|
||||
$ipsclass->DB->build_query( array( 'select' => 'p.*',
|
||||
'from' => array( 'posts' => 'p' ),
|
||||
'where' => 'p.pid > ' . $_LAST_ID,
|
||||
'limit' => array( $_BATCH ),
|
||||
'add_join' => array( 1 => array( 'type' => 'left',
|
||||
'select' => 't.forum_id',
|
||||
'from' => array( 'topics' => 't' ),
|
||||
'where' => "t.tid=p.topic_id"
|
||||
),
|
||||
2 => array( 'type' => 'left',
|
||||
'select' => 'm.mgroup',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => "m.id=p.author_id"
|
||||
) )
|
||||
) );
|
||||
break;
|
||||
}
|
||||
|
||||
$outer = $ipsclass->DB->exec_query();
|
||||
|
||||
//-----------------------------------------
|
||||
// Process...
|
||||
//-----------------------------------------
|
||||
|
||||
while( $r = $ipsclass->DB->fetch_row( $outer ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Reset time limit
|
||||
//-----------------------------------------
|
||||
|
||||
@set_time_limit( 0 );
|
||||
|
||||
$parser->quote_open = 0;
|
||||
$parser->quote_closed = 0;
|
||||
$parser->quote_error = 0;
|
||||
$parser->error = '';
|
||||
$parser->image_count = 0;
|
||||
|
||||
$ipsclass->member['g_bypass_badwords'] = $ipsclass->cache['group_cache'][ $r['mgroup'] ]['g_bypass_badwords'];
|
||||
|
||||
switch( $type )
|
||||
{
|
||||
case 'cal':
|
||||
$parser->parse_smilies = $r['event_smilies'];
|
||||
$parser->parse_html = 0;
|
||||
$parser->parse_bbcode = 1;
|
||||
|
||||
$rawpost = $parser->pre_edit_parse( $r['event_content'] );
|
||||
break;
|
||||
|
||||
case 'announce':
|
||||
$parser->parse_smilies = 1;
|
||||
$parser->parse_html = $r['announce_html_enabled'];
|
||||
$parser->parse_nl2br = 1;
|
||||
$parser->parse_bbcode = 1;
|
||||
|
||||
$rawpost = $parser->pre_edit_parse( $r['announce_post'] );
|
||||
break;
|
||||
|
||||
case 'pms':
|
||||
$parser->parse_smilies = 1;
|
||||
$parser->parse_nl2br = 1;
|
||||
$parser->parse_html = $ipsclass->vars['msg_allow_html'];
|
||||
$parser->parse_bbcode = $ipsclass->vars['msg_allow_code'];
|
||||
|
||||
$rawpost = $parser->pre_edit_parse( $r['msg_post'] );
|
||||
break;
|
||||
|
||||
case 'sigs':
|
||||
$parser->parse_smilies = 0;
|
||||
$parser->parsing_signature = 1;
|
||||
$parser->parse_html = $ipsclass->vars['sig_allow_html'];
|
||||
$parser->parse_bbcode = $ipsclass->vars['sig_allow_ibc'];
|
||||
|
||||
$rawpost = $parser->pre_edit_parse( $r['signature'] );
|
||||
break;
|
||||
|
||||
case 'posts':
|
||||
default:
|
||||
$parser->parse_smilies = $r['use_emo'];
|
||||
$parser->parse_html = ( $ipsclass->cache['forum_cache'][ $r['forum_id'] ]['use_html'] AND
|
||||
$ipsclass->cache['group_cache'][ $r['mgroup'] ]['g_dohtml'] ) ? 1 : 0;
|
||||
$parser->parse_bbcode = $ipsclass->cache['forum_cache'][ $r['forum_id'] ]['use_ibc'];
|
||||
|
||||
$rawpost = $parser->pre_edit_parse( $r['post'] );
|
||||
break;
|
||||
}
|
||||
|
||||
$newpost = $parser->pre_db_parse( $rawpost );
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove old \' escaping
|
||||
//-----------------------------------------
|
||||
|
||||
$newpost = str_replace( "\\'", "'", $newpost );
|
||||
|
||||
//-----------------------------------------
|
||||
// Convert old dohtml?
|
||||
//-----------------------------------------
|
||||
|
||||
$htmlstate = 0;
|
||||
|
||||
if ( strstr( strtolower($newpost), '[dohtml]' ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Can we use HTML?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $type == 'posts' AND $ipsclass->cache['forum_cache'][ $r['forum_id'] ]['use_html'] )
|
||||
{
|
||||
$htmlstate = 2;
|
||||
}
|
||||
|
||||
$newpost = preg_replace( "#\[dohtml\]#i" , "", $newpost );
|
||||
$newpost = preg_replace( "#\[/dohtml\]#i", "", $newpost );
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmlstate = intval( $r['post_htmlstate'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Convert old attachment tags
|
||||
//-----------------------------------------
|
||||
|
||||
$newpost = preg_replace( "#\[attachmentid=(\d+?)\]#is", "[attachment=\\1:attachment]", $newpost );
|
||||
|
||||
$newpost = $parser->pre_display_parse( $newpost );
|
||||
|
||||
if ( $newpost OR $type == 'sigs' )
|
||||
{
|
||||
switch( $type )
|
||||
{
|
||||
case 'posts':
|
||||
$ipsclass->DB->do_update( 'posts', array( 'post' => $newpost, 'post_htmlstate' => $htmlstate ), 'pid='.$r['pid'] );
|
||||
$string = substr( $r['post'], 0, 30 ) . '...';
|
||||
$last = $r['pid'];
|
||||
break;
|
||||
|
||||
case 'pms':
|
||||
$ipsclass->DB->do_update( 'message_text', array( 'msg_post' => $newpost ), 'msg_id='.$r['msg_id'] );
|
||||
$string = substr( $r['msg_post'], 0, 30 ) . '...';
|
||||
$last = $r['msg_id'];
|
||||
break;
|
||||
|
||||
case 'sigs':
|
||||
$ipsclass->DB->do_update( 'member_extra', array( 'signature' => $newpost ), 'id='.$r['id'] );
|
||||
$string = $r['members_display_name'];
|
||||
$last = $r['id'];
|
||||
break;
|
||||
|
||||
case 'cal':
|
||||
$ipsclass->DB->do_update( 'cal_events', array( 'event_content' => $newpost ), 'event_id='.$r['event_id'] );
|
||||
$string = substr( $r['event_content'], 0, 30 ) . '...';
|
||||
$last = $r['event_id'];
|
||||
break;
|
||||
|
||||
case 'announce':
|
||||
$ipsclass->DB->do_update( 'announcements', array( 'announce_post' => $newpost ), 'announce_id='.$r['announce_id'] );
|
||||
$string = substr( $r['announce_post'], 0, 30 ) . '...';
|
||||
$last = $r['announce_id'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Clear out DB cached queries
|
||||
//-----------------------------------------
|
||||
|
||||
$ipsclass->DB->obj['cached_queries'] = array();
|
||||
|
||||
$done++;
|
||||
$_LAST_ID = $last;
|
||||
|
||||
myprint( "[ID:" . $last . '] ' . $string );
|
||||
|
||||
if ( $end > 0 AND $done > $end )
|
||||
{
|
||||
$COMPLETE = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$time_end = time();
|
||||
|
||||
$time_taken = ( $time_end - $time_start) / 60;
|
||||
|
||||
myprint( "\nALL DONE! ($done rebuilt)" );
|
||||
myprint( "Time Taken: $time_taken minutes" );
|
||||
|
||||
@fclose( $stdin );
|
||||
exit(0);
|
||||
|
||||
//-----------------------------------------
|
||||
// My get
|
||||
//-----------------------------------------
|
||||
|
||||
function getoption()
|
||||
{
|
||||
global $stdin;
|
||||
//$stdin = fopen('php://stdin', 'r');
|
||||
$option = trim( fgets( $stdin ) );
|
||||
//fclose( $stdin );
|
||||
|
||||
return $option;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// FUNC: Write out
|
||||
//-----------------------------------------
|
||||
|
||||
function myprint( $message, $newline="\n" )
|
||||
{
|
||||
$stdout = fopen('php://stdout', 'w');
|
||||
fwrite( $stdout, $message . $newline );
|
||||
fclose( $stdout );
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,782 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2004 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Email: matt@invisionpower.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > SSI script
|
||||
| > Script written by Matt Mecham
|
||||
| > Date started: 29th April 2002
|
||||
| > UPDATED for 2.0: 1st July 2004
|
||||
| > UPDATED for 2.1: 13th Sept 2005
|
||||
|
|
||||
+--------------------------------------------------------------------------
|
||||
|
||||
+--------------------------------------------------------------------------
|
||||
| USAGE:
|
||||
+--------------------------------------------------------------------------
|
||||
|
||||
Simply call this script via PHP includes, or SSI .shtml tags to generate content
|
||||
on the fly, streamed into your own webpage.
|
||||
|
||||
+--------------------------------------------------------------------------
|
||||
| To show the last 10 topics and posts in the news forums...
|
||||
+--------------------------------------------------------------------------
|
||||
|
||||
include("http://domain.com/forums/ssi.php?a=news&show=10");
|
||||
|
||||
You can adjust the "show" attribute to display a different amount of topics.
|
||||
|
||||
+--------------------------------------------------------------------------
|
||||
| To show the board statistics
|
||||
+--------------------------------------------------------------------------
|
||||
|
||||
include("http://domain.com/forums/ssi.php?a=stats");
|
||||
|
||||
+--------------------------------------------------------------------------
|
||||
| To show the active users stats (x Members, X Guests, etc)
|
||||
+--------------------------------------------------------------------------
|
||||
|
||||
include("http://domain.com/forums/ssi.php?a=active");
|
||||
|
||||
+--------------------------------------------------------------------------
|
||||
| RSS / XML Syndication..
|
||||
+--------------------------------------------------------------------------
|
||||
|
||||
RSS: http://domain.com/forums/ssi.php?a=out&f=1,2,3,4,5&show=10&type=rss
|
||||
XML: http://domain.com/forums/ssi.php?a=out&f=1,2,3,4,5&show=10&type=xml
|
||||
|
||||
Will show last 10 topics in reverse chronological last post date order from
|
||||
all the forums in the comma separated list
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Main executable wrapper.
|
||||
*
|
||||
* Set-up and load module to run
|
||||
*
|
||||
* @package InvisionPowerBoard
|
||||
* @author Matt Mecham
|
||||
* @version 2.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* Script type
|
||||
*
|
||||
*/
|
||||
define( 'IPB_THIS_SCRIPT', 'public' );
|
||||
define( 'IPB_LOAD_SQL' , 'queries' );
|
||||
|
||||
require_once( './init.php' );
|
||||
|
||||
//--------------------------------
|
||||
// Other set up
|
||||
//--------------------------------
|
||||
|
||||
/**
|
||||
* Path to SSI templates directory
|
||||
*
|
||||
*/
|
||||
define( 'SSI_TEMPLATES_DIR', ROOT_PATH."ssi_templates" );
|
||||
/**
|
||||
* Maximum number of topics to show
|
||||
*
|
||||
*/
|
||||
define( 'SSI_MAX_SHOW' , 100 );
|
||||
|
||||
/**
|
||||
* Allow SSI export. Enter "0" to turn off.
|
||||
*
|
||||
*/
|
||||
define( 'SSI_ALLOW_SYND' , 1 );
|
||||
|
||||
//===========================================================================
|
||||
// MAIN PROGRAM
|
||||
//===========================================================================
|
||||
|
||||
$INFO = array();
|
||||
|
||||
//--------------------------------
|
||||
// Load our classes
|
||||
//--------------------------------
|
||||
|
||||
require_once ROOT_PATH . "sources/ipsclass.php";
|
||||
require_once ROOT_PATH . "sources/classes/class_forums.php";
|
||||
require_once ROOT_PATH . "sources/classes/class_session.php";
|
||||
require_once KERNEL_PATH . "class_converge.php";
|
||||
require_once ROOT_PATH . "conf_global.php";
|
||||
|
||||
# Initiate super-class
|
||||
$ipsclass = new ipsclass();
|
||||
$ipsclass->vars = $INFO;
|
||||
|
||||
//--------------------------------
|
||||
// The clocks a' tickin'
|
||||
//--------------------------------
|
||||
|
||||
$Debug = new Debug;
|
||||
$Debug->startTimer();
|
||||
|
||||
//--------------------------------
|
||||
// Load the DB driver and such
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->init_db_connection();
|
||||
|
||||
//--------------------------------
|
||||
// INIT other classes
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->sess = new session();
|
||||
$ipsclass->sess->ipsclass =& $ipsclass;
|
||||
|
||||
$ipsclass->forums = new forum_functions();
|
||||
$ipsclass->forums->ipsclass =& $ipsclass;
|
||||
|
||||
//--------------------------------
|
||||
// Set up our vars
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->parse_incoming();
|
||||
|
||||
//--------------------------------
|
||||
// Set converge
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->converge = new class_converge( $ipsclass->DB );
|
||||
|
||||
//--------------------------------
|
||||
// Start off the cache array
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->cache_array = array_merge( array('attachtypes','bbcode', 'multimod','ranks','profilefields'), array('rss_calendar', 'rss_export','components','banfilters', 'settings', 'group_cache', 'systemvars', 'skin_id_cache', 'forum_cache', 'moderators', 'stats', 'languages') );
|
||||
|
||||
//===========================================================================
|
||||
// Get cache...
|
||||
//===========================================================================
|
||||
|
||||
$ipsclass->init_cache_setup();
|
||||
$ipsclass->init_load_cache( $ipsclass->cache_array );
|
||||
|
||||
//--------------------------------
|
||||
// Set debug mode
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->DB->set_debug_mode( $ipsclass->vars['sql_debug'] == 1 ? intval($_GET['debug']) : 0 );
|
||||
|
||||
//--------------------------------
|
||||
// Initialize the FUNC
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->initiate_ipsclass();
|
||||
|
||||
//--------------------------------
|
||||
// Initialize the member info
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->member = $ipsclass->sess->authorise();
|
||||
|
||||
//-----------------------------------------
|
||||
// Cache md5 check
|
||||
//-----------------------------------------
|
||||
|
||||
$ipsclass->md5_check = $ipsclass->return_md5_check();
|
||||
|
||||
//--------------------------------
|
||||
// Initialize the forums
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->forums->strip_invisible = 1;
|
||||
$ipsclass->forums->forums_init();
|
||||
|
||||
//--------------------------------
|
||||
// Load the skin
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->load_skin();
|
||||
|
||||
//--------------------------------
|
||||
// Set the base URL
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->base_url = $ipsclass->vars['board_url'].'/index.'.$ipsclass->vars['php_ext'];
|
||||
|
||||
//--------------------------------
|
||||
// INIT class and pass...
|
||||
//--------------------------------
|
||||
|
||||
$runme = new ssi_autorun();
|
||||
$runme->ipsclass =& $ipsclass;
|
||||
$runme->auto_run();
|
||||
|
||||
|
||||
/**
|
||||
* Auto run class
|
||||
*/
|
||||
class ssi_autorun
|
||||
{
|
||||
/**
|
||||
* Auto run function
|
||||
*/
|
||||
function auto_run()
|
||||
{
|
||||
//--------------------------------
|
||||
// What to do?
|
||||
//--------------------------------
|
||||
|
||||
switch ($this->ipsclass->input['a'])
|
||||
{
|
||||
case 'news':
|
||||
$this->do_news();
|
||||
break;
|
||||
|
||||
case 'active':
|
||||
$this->do_active();
|
||||
break;
|
||||
|
||||
case 'stats':
|
||||
$this->do_stats();
|
||||
break;
|
||||
|
||||
case 'out':
|
||||
if ( SSI_ALLOW_SYND == 1 )
|
||||
{
|
||||
$this->do_syndication();
|
||||
}
|
||||
else
|
||||
{
|
||||
exit();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
echo("An error occured whilst processing this directive");
|
||||
exit();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Do Syndication
|
||||
*
|
||||
* Export topics / titles from selected forums
|
||||
*/
|
||||
function do_syndication()
|
||||
{
|
||||
//----------------------------------------
|
||||
// Sort out the forum ids
|
||||
//----------------------------------------
|
||||
|
||||
$tmp_forums = array();
|
||||
$forums = array();
|
||||
|
||||
if ( $this->ipsclass->input['f'] )
|
||||
{
|
||||
$tmp_forums = explode( ",", $this->ipsclass->input['f'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
fatal_error("Fatal error: no forum id specified");
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
// Intval the IDs
|
||||
//----------------------------------------
|
||||
|
||||
foreach ($tmp_forums as $f )
|
||||
{
|
||||
$f = intval($f);
|
||||
|
||||
if ( $f )
|
||||
{
|
||||
$forums[] = $f;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
// Check...
|
||||
//----------------------------------------
|
||||
|
||||
if ( count($forums) < 1 )
|
||||
{
|
||||
fatal_error("Fatal error: no forum id specified");
|
||||
}
|
||||
|
||||
$sql_fields = implode( ",", $forums );
|
||||
|
||||
//----------------------------------------
|
||||
// Number of topics to return?
|
||||
//----------------------------------------
|
||||
|
||||
$perpage = intval($this->ipsclass->input['show']) ? intval($this->ipsclass->input['show']) : 10;
|
||||
|
||||
$perpage = ( $perpage > SSI_MAX_SHOW ) ? SSI_MAX_SHOW : $perpage;
|
||||
|
||||
//----------------------------------------
|
||||
// Load the template...
|
||||
//----------------------------------------
|
||||
|
||||
if ( $this->ipsclass->input['type'] == 'xml' )
|
||||
{
|
||||
$template = $this->load_template("syndicate_xml.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
$template = $this->load_template("syndicate_rss.html");
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
// parse..
|
||||
//----------------------------------------
|
||||
|
||||
$to_echo = "";
|
||||
$top = "";
|
||||
$row = "";
|
||||
$bottom = "";
|
||||
|
||||
preg_match( "#\[TOP\](.+?)\[/TOP\]#is", $template, $match );
|
||||
|
||||
$top = trim($match[1]);
|
||||
|
||||
preg_match( "#\[ROW\](.+?)\[/ROW\]#is", $template, $match );
|
||||
|
||||
$row = trim($match[1]);
|
||||
|
||||
preg_match( "#\[BOTTOM\](.+?)\[/BOTTOM\]#is", $template, $match );
|
||||
|
||||
$bottom = trim($match[1]);
|
||||
|
||||
//----------------------------------------
|
||||
// Header parse...
|
||||
//----------------------------------------
|
||||
|
||||
@header("Content-Type: text/xml;charset={$this->ipsclass->vars['gb_char_set']}");
|
||||
@header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
@header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||
@header('Pragma: public');
|
||||
|
||||
$to_echo .= $this->parse_template( $top, array (
|
||||
'board_url' => $this->ipsclass->base_url ,
|
||||
'board_name' => $this->ipsclass->vars['board_name'],
|
||||
) );
|
||||
|
||||
//----------------------------------------
|
||||
// Fix up
|
||||
//----------------------------------------
|
||||
|
||||
$group = $this->ipsclass->cache['group_cache'][ $this->ipsclass->vars['guest_group'] ];
|
||||
|
||||
$this->ipsclass->perm_id_array = explode( ",", $group['g_perm_id'] );
|
||||
|
||||
//----------------------------------------
|
||||
// Get the topics, member info and other stuff
|
||||
//----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
|
||||
'from' => 'topics',
|
||||
'where' => "forum_id IN ($sql_fields) AND approved=1",
|
||||
'order' => 'last_post DESC',
|
||||
'limit' => array( 0, $perpage ) ) );
|
||||
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
if ( ! $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
fatal_error("Could not get the information from the database");
|
||||
}
|
||||
|
||||
while ( $i = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$forum = $this->ipsclass->forums->forum_by_id[ $i['forum_id'] ];
|
||||
|
||||
if ( $this->ipsclass->check_perms( $forum['read_perms'] ) != TRUE )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($forum['password'] != "" )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$to_echo .= $this->parse_template( $row, array (
|
||||
'topic_title' => str_replace( '&#', '&#', $i['title'] ),
|
||||
'topic_id' => $i['tid'],
|
||||
'topic_link' => $this->ipsclass->base_url."?showtopic=".$i['tid'],
|
||||
'forum_title' => htmlspecialchars($forum['name']),
|
||||
'forum_id' => $i['forum_id'],
|
||||
'last_poster_id' => $i['last_poster_id'],
|
||||
'last_post_name' => $i['last_poster_name'],
|
||||
'last_post_time' => $this->ipsclass->get_date( $i['last_post'] , 'LONG', 1 ),
|
||||
'timestamp' => $i['last_post'],
|
||||
'starter_id' => $i['starter_id'],
|
||||
'starter_name' => $i['starter_name'],
|
||||
'board_url' => $this->ipsclass->base_url ,
|
||||
'board_name' => $this->ipsclass->vars['board_name'],
|
||||
'rfc_date' => date( 'r', $i['last_post'] ),
|
||||
) ) . "\r\n";
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
// Print bottom...
|
||||
//----------------------------------------
|
||||
|
||||
echo $to_echo."\r\n".$bottom;
|
||||
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Do Stats
|
||||
*
|
||||
* Show totals
|
||||
*/
|
||||
function do_stats()
|
||||
{
|
||||
//----------------------------------------
|
||||
// Load the template...
|
||||
//----------------------------------------
|
||||
|
||||
$template = $this->load_template("stats.html");
|
||||
|
||||
//----------------------------------------
|
||||
// INIT
|
||||
//----------------------------------------
|
||||
|
||||
$to_echo = "";
|
||||
$time = time() - 900;
|
||||
|
||||
//----------------------------------------
|
||||
// Make sure we've got something
|
||||
//----------------------------------------
|
||||
|
||||
if ( ! is_array( $this->ipsclass->cache['stats'] ) )
|
||||
{
|
||||
$this->ipsclass->cache['stats'] = array();
|
||||
|
||||
$this->ipsclass->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 1 ) );
|
||||
}
|
||||
|
||||
$stats = $this->ipsclass->cache['stats'];
|
||||
$total_posts = $stats['total_replies']+$stats['total_topics'];
|
||||
$to_echo = $this->parse_template( $template,
|
||||
array (
|
||||
'total_posts' => $total_posts,
|
||||
'topics' => $stats['total_topics'],
|
||||
'replies' => $stats['total_replies'],
|
||||
'members' => $stats['mem_count']
|
||||
)
|
||||
);
|
||||
echo $to_echo;
|
||||
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Do News
|
||||
*
|
||||
* Show news text
|
||||
*/
|
||||
function do_news()
|
||||
{
|
||||
//----------------------------------------
|
||||
// Check
|
||||
//----------------------------------------
|
||||
|
||||
if ( (! $this->ipsclass->vars['news_forum_id']) or ($this->ipsclass->vars['news_forum_id'] == "" ) )
|
||||
{
|
||||
fatal_error("No news forum assigned");
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
// INIT
|
||||
//----------------------------------------
|
||||
|
||||
$perpage = intval($this->ipsclass->input['show']) > 0 ? intval($this->ipsclass->input['show']) : 10;
|
||||
$perpage = ( $perpage > SSI_MAX_SHOW ) ? SSI_MAX_SHOW : $perpage;
|
||||
$to_echo = "";
|
||||
|
||||
//-----------------------------------------
|
||||
// Load the template...
|
||||
//-----------------------------------------
|
||||
|
||||
$template = $this->load_template("news.html");
|
||||
|
||||
//-----------------------------------------
|
||||
// Get the topics, member info and other stuff
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => 't.*',
|
||||
'from' => array( 'topics' => 't' ),
|
||||
'where' => "t.forum_id={$this->ipsclass->vars['news_forum_id']} AND t.approved=1",
|
||||
'order' => 't.tid DESC',
|
||||
'limit' => array( 0, $perpage ),
|
||||
'add_join' => array( 0 => array( 'select' => 'm.members_display_name as member_name, m.mgroup, m.id as member_id,m.title as member_title',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => "m.id=t.starter_id",
|
||||
'type' => 'left' ),
|
||||
1 => array( 'select' => 'p.*',
|
||||
'from' => array( 'posts' => 'p' ),
|
||||
'where' => "t.topic_firstpost=p.pid",
|
||||
'type' => 'left' ) )
|
||||
) );
|
||||
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
while ( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$row['member_name'] = $row['member_name'] ? $row['member_name'] : $row['author_name'];
|
||||
|
||||
$to_echo .= $this->parse_template( $template,
|
||||
array (
|
||||
'profile_link' => $this->ipsclass->base_url."?showuser=".intval($row['member_id']),
|
||||
'member_name' => $row['member_name'],
|
||||
'post_date' => $this->ipsclass->get_date( $row['post_date'], 'LONG', 1 ),
|
||||
'topic_title' => $row['title'],
|
||||
'post' => $row['post'],
|
||||
'comments' => $row['posts'],
|
||||
'view_all_link' => $this->ipsclass->base_url."?showtopic={$row['tid']}"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get the macros and replace them
|
||||
//-----------------------------------------
|
||||
|
||||
if ( is_array( $this->ipsclass->skin['_macros'] ) )
|
||||
{
|
||||
foreach( $this->ipsclass->skin['_macros'] as $row )
|
||||
{
|
||||
if ( $row['macro_value'] != "" )
|
||||
{
|
||||
$to_echo = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $to_echo );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$to_echo = preg_replace( "#([^/])style_images/(<\#IMG_DIR\#>|".preg_quote($this->ipsclass->skin['_imagedir'], '/').")#is", "\\1".$this->ipsclass->vars['board_url']."/style_images/\\2", $to_echo );
|
||||
$to_echo = preg_replace( "#([^/])style_emoticons#is", "\\1".$this->ipsclass->vars['board_url']."/style_emoticons", $to_echo );
|
||||
$to_echo = preg_replace( "#([^/])style_avatars#is" , "\\1".$this->ipsclass->vars['board_url']."/style_avatars", $to_echo );
|
||||
$to_echo = preg_replace( "#([^/])jscripts#is" , "\\1".$this->ipsclass->vars['board_url']."/jscripts", $to_echo );
|
||||
|
||||
$to_echo = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $to_echo );
|
||||
$to_echo = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir'] , $to_echo );
|
||||
|
||||
echo $to_echo;
|
||||
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Do Active
|
||||
*
|
||||
* Show active users
|
||||
*/
|
||||
function do_active()
|
||||
{
|
||||
//--------------------------------
|
||||
// Load the template...
|
||||
//--------------------------------
|
||||
|
||||
$template = $this->load_template("active.html");
|
||||
|
||||
//--------------------------------
|
||||
// INIT
|
||||
//--------------------------------
|
||||
|
||||
$to_echo = "";
|
||||
|
||||
//--------------------------------
|
||||
// Make sure we have a cut off...
|
||||
//--------------------------------
|
||||
|
||||
if ($this->ipsclass->vars['au_cutoff'] == "")
|
||||
{
|
||||
$this->ipsclass->vars['au_cutoff'] = 15;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get the users from the DB
|
||||
//-----------------------------------------
|
||||
|
||||
$cut_off = $this->ipsclass->vars['au_cutoff'] * 60;
|
||||
$time = time() - $cut_off;
|
||||
$rows = array();
|
||||
$ar_time = time();
|
||||
|
||||
if ( $this->ipsclass->member['id'] )
|
||||
{
|
||||
$rows = array( $ar_time => array( 'login_type' => substr($this->ipsclass->member['login_anonymous'],0, 1),
|
||||
'running_time' => $ar_time,
|
||||
'member_id' => $this->ipsclass->member['id'],
|
||||
'member_name' => $this->ipsclass->member['members_display_name'],
|
||||
'member_group' => $this->ipsclass->member['mgroup'] ) );
|
||||
}
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'id, member_id, member_name, login_type, running_time, member_group',
|
||||
'from' => 'sessions',
|
||||
'where' => "running_time > $time",
|
||||
//'order' => "running_time DESC" // Sort in PHP to avoid filesort in SQL
|
||||
) );
|
||||
|
||||
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
//-----------------------------------------
|
||||
// FETCH...
|
||||
//-----------------------------------------
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$rows[ $r['running_time'].'.'.$r['id'] ] = $r;
|
||||
}
|
||||
|
||||
krsort( $rows );
|
||||
|
||||
//--------------------------------
|
||||
// cache all printed members so we
|
||||
// don't double print them
|
||||
//--------------------------------
|
||||
|
||||
$cached = array();
|
||||
$active = array();
|
||||
|
||||
foreach( $rows as $result )
|
||||
{
|
||||
$last_date = $this->ipsclass->get_time( $result['running_time'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Bot?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( strstr( $result['id'], '_session' ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Seen bot of this type yet?
|
||||
//-----------------------------------------
|
||||
|
||||
$botname = preg_replace( '/^(.+?)=/', "\\1", $result['id'] );
|
||||
|
||||
if ( ! $cached[ $result['member_name'] ] )
|
||||
{
|
||||
$cached[ $result['member_name'] ] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Yup, count others as guest
|
||||
//-----------------------------------------
|
||||
|
||||
$active['GUESTS']++;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Guest?
|
||||
//-----------------------------------------
|
||||
|
||||
else if ( ! $result['member_id'] )
|
||||
{
|
||||
$active['GUESTS']++;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Member?
|
||||
//-----------------------------------------
|
||||
|
||||
else
|
||||
{
|
||||
if ( empty( $cached[ $result['member_id'] ] ) )
|
||||
{
|
||||
$cached[ $result['member_id'] ] = 1;
|
||||
|
||||
if ($result['login_type'])
|
||||
{
|
||||
$active['ANON']++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$active['MEMBERS']++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$active['TOTAL'] = $active['MEMBERS'] + $active['GUESTS'] + $active['ANON'];
|
||||
|
||||
|
||||
$to_echo = $this->parse_template( $template,
|
||||
array (
|
||||
'total' => $active['TOTAL'] ? $active['TOTAL'] : 0 ,
|
||||
'members' => $active['MEMBERS'] ? $active['MEMBERS'] : 0,
|
||||
'guests' => $active['GUESTS'] ? $active['GUESTS'] : 0,
|
||||
'anon' => $active['ANON'] ? $active['ANON'] : 0,
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
echo $to_echo;
|
||||
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Parse template
|
||||
*
|
||||
* Parses the template. Duh.
|
||||
*/
|
||||
function parse_template( $template, $assigned=array() )
|
||||
{
|
||||
foreach( $assigned as $word => $replace)
|
||||
{
|
||||
$template = preg_replace( "/\{$word\}/i", "$replace", $template );
|
||||
}
|
||||
|
||||
return $template;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load template
|
||||
*
|
||||
* Loads the template
|
||||
*/
|
||||
function load_template($template="")
|
||||
{
|
||||
$filename = SSI_TEMPLATES_DIR."/".$template;
|
||||
|
||||
if ( file_exists($filename) )
|
||||
{
|
||||
if ( $FH = fopen($filename, 'r') )
|
||||
{
|
||||
$template = fread( $FH, filesize($filename) );
|
||||
fclose($FH);
|
||||
}
|
||||
else
|
||||
{
|
||||
fatal_error("Couldn't open the template file");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fatal_error("Template file does not exist");
|
||||
}
|
||||
|
||||
return $template;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1 @@
|
||||
<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://anonym.to/http://www.invisionboard.com/">Invision Power Board</a>␍</body>␍</html>␍
|
||||
@@ -0,0 +1 @@
|
||||
<table cellpadding='4' cellspacing='1' border='0' width='100%' bgcolor='#000000' style='font-family:Verdana;font-size:11px'>␍<tr>␍ <td align='left' bgcolor='#CCCCCC'>Posted By: <a href='{profile_link}'>{member_name}</a><br>Posted On: {post_date}</td>␍</tr>␍<tr>␍ <td align='left' bgcolor='#FEFEFE'>␍ <b>Title: {topic_title}</b>␍ <br><br>␍ <table style='border:1px dotted gray;width:100%;font-family:Verdana;font-size:10px'><tr><td>{post}</td></tr></table><br>Comments: {comments} :: <a href='{view_all_link}'>View Comments</a>␍ </td>␍</tr>␍</table>␍<br>
|
||||
@@ -16,7 +16,7 @@
|
||||
<link>{topic_link}</link>
|
||||
<comments>{topic_link}</comments>
|
||||
<category>{forum_title}</category>
|
||||
<description><![CDATA[Forum: <a href="{board_url}?showforum={forum_id}" target="_blank">{forum_title}</a><br />Last Poster: <a href="{board_url}?showuser={last_poster_id}" target="_blank">{last_post_name}</a><br />Last Post: {last_post_time}]]></description>
|
||||
<description><![CDATA[Forum: <a href="{board_url}?showforum={forum_id}">{forum_title}</a><br />Last Poster: <a href="{board_url}?showuser={last_poster_id}" target="_blank">{last_post_name}</a><br />Last Post: {last_post_time}]]></description>
|
||||
<pubDate>{rfc_date}</pubDate>
|
||||
</item>
|
||||
[/ROW]
|
||||
@@ -1,262 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
+--------------------------------------------------------------------------
|
||||
|
||||
| INVISION POWER BOARD PATCH SCRIPT
|
||||
|
||||
| ========================================
|
||||
|
||||
| by Matthew Mecham
|
||||
|
||||
| (c) 2001 - 2003 Invision Power Services
|
||||
|
||||
| http://www.invisionpower.com
|
||||
|
||||
| ========================================
|
||||
|
||||
| Web: http://www.invisionboard.com
|
||||
|
||||
| Email: matt@invisionpower.com
|
||||
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
|
||||
+---------------------------------------------------------------------------
|
||||
|
||||
|
|
||||
|
||||
| > Patch script
|
||||
|
||||
| > Script written by Matt Mecham
|
||||
|
||||
| > Date started: 17th June 2003
|
||||
|
||||
|
|
||||
|
||||
+--------------------------------------------------------------------------
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------
|
||||
|
||||
// USER CONFIGURABLE ELEMENTS
|
||||
|
||||
//-----------------------------------------------
|
||||
|
||||
|
||||
|
||||
// Root path
|
||||
|
||||
|
||||
|
||||
$root_path = "./";
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------
|
||||
|
||||
// NO USER EDITABLE SECTIONS BELOW
|
||||
|
||||
//-----------------------------------------------
|
||||
|
||||
|
||||
|
||||
error_reporting (E_ERROR | E_WARNING | E_PARSE);
|
||||
|
||||
set_magic_quotes_runtime(0);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//--------------------------------
|
||||
|
||||
// Import $INFO, now!
|
||||
|
||||
//--------------------------------
|
||||
|
||||
|
||||
|
||||
require $root_path."conf_global.php";
|
||||
|
||||
|
||||
|
||||
//--------------------------------
|
||||
|
||||
// Load the DB driver and such
|
||||
|
||||
//--------------------------------
|
||||
|
||||
|
||||
|
||||
$INFO['sql_driver'] = !$INFO['sql_driver'] ? 'mySQL' : $INFO['sql_driver'];
|
||||
|
||||
|
||||
|
||||
$to_require = $root_path."sources/Drivers/".$INFO['sql_driver'].".php";
|
||||
|
||||
require ($to_require);
|
||||
|
||||
|
||||
|
||||
$DB = new db_driver;
|
||||
|
||||
|
||||
|
||||
$DB->obj['sql_database'] = $INFO['sql_database'];
|
||||
|
||||
$DB->obj['sql_user'] = $INFO['sql_user'];
|
||||
|
||||
$DB->obj['sql_pass'] = $INFO['sql_pass'];
|
||||
|
||||
$DB->obj['sql_host'] = $INFO['sql_host'];
|
||||
|
||||
$DB->obj['sql_tbl_prefix'] = $INFO['sql_tbl_prefix'];
|
||||
|
||||
|
||||
|
||||
// Get a DB connection
|
||||
|
||||
|
||||
|
||||
$DB->connect();
|
||||
|
||||
|
||||
|
||||
$members = array();
|
||||
|
||||
|
||||
|
||||
$DB->query("SELECT * FROM ibf_members WHERE mgroup=".$INFO['auth_group']);
|
||||
|
||||
|
||||
|
||||
while ( $r = $DB->fetch_row() )
|
||||
|
||||
{
|
||||
|
||||
$members[ $r['id'] ] = $r;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$tmp = $members;
|
||||
|
||||
|
||||
|
||||
$DB->query("SELECT * FROM ibf_validating");
|
||||
|
||||
|
||||
|
||||
while ( $v = $DB->fetch_row() )
|
||||
|
||||
{
|
||||
|
||||
if ( is_array( $members[ $v['member_id'] ] ) )
|
||||
|
||||
{
|
||||
|
||||
unset($members[ $v['member_id'] ]);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*header("Content-type: text/plain");
|
||||
|
||||
print_r($tmp);
|
||||
|
||||
print_r($members);
|
||||
|
||||
exit();*/
|
||||
|
||||
|
||||
|
||||
$count = intval( count($members) );
|
||||
|
||||
|
||||
|
||||
if ( $count > 0 )
|
||||
|
||||
{
|
||||
|
||||
foreach( $members as $mid => $mdata )
|
||||
|
||||
{
|
||||
|
||||
$dbs = array(
|
||||
|
||||
'vid' => md5( time() . $mid ),
|
||||
|
||||
'member_id' => $mdata['id'],
|
||||
|
||||
'real_group' => $INFO['member_group'],
|
||||
|
||||
'temp_group' => $INFO['auth_group'],
|
||||
|
||||
'entry_date' => time(),
|
||||
|
||||
'coppa_user' => 0,
|
||||
|
||||
'new_reg' => 1,
|
||||
|
||||
'ip_address' => '127.0.0.1',
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
$dbstring = $DB->compile_db_insert_string($dbs);
|
||||
|
||||
|
||||
|
||||
$DB->query("INSERT INTO ibf_validating ({$dbstring['FIELD_NAMES']}) VALUES({$dbstring['FIELD_VALUES']})");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo("<html><body><b>$count members found...</b><br /><br />Update complete, you may now remove this file</body></html>");
|
||||
|
||||
|
||||
|
||||
exit();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//+-------------------------------------------------
|
||||
|
||||
// GLOBAL ROUTINES
|
||||
|
||||
//+-------------------------------------------------
|
||||
|
||||
|
||||
|
||||
function fatal_error($message="", $help="") {
|
||||
|
||||
echo("$message<br><br>$help");
|
||||
|
||||
exit;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (1, 'A_LOCKED_B', '<img src=\'style_images/<#IMG_DIR#>/t_closed.gif\' border=\'0\' alt=\'Closed Topic\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (2, 'A_MOVED_B', '<img src=\'style_images/<#IMG_DIR#>/t_moved.gif\' border=\'0\' alt=\'Moved Topic\'>', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (3, 'A_POLLONLY_B', '<img src=\'style_images/<#IMG_DIR#>/t_closed.gif\' border=\'0\' alt=\'Poll Only\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (4, 'A_POST', '<img src=\'style_images/<#IMG_DIR#>/t_new.gif\' border=\'0\' alt=\'Start new topic\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (5, 'A_REPLY', '<img src=\'style_images/<#IMG_DIR#>/t_reply.gif\' border=\'0\' alt=\'Reply to this topic\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (6, 'A_POLL', '<img src=\'style_images/<#IMG_DIR#>/t_poll.gif\' border=\'0\' alt=\'Start Poll\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (7, 'A_STAR', '<img src=\'style_images/<#IMG_DIR#>/pip.gif\' border=\'0\' alt=\'*\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (8, 'B_HOT', '<img src=\'style_images/<#IMG_DIR#>/f_hot.gif\' border=\'0\' alt=\'Hot topic\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (9, 'B_HOT_NN', '<img src=\'style_images/<#IMG_DIR#>/f_hot_no.gif\' border=\'0\' alt=\'No new\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (10, 'B_LOCKED', '<img src=\'style_images/<#IMG_DIR#>/f_closed.gif\' border=\'0\' alt=\'Closed\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (11, 'B_MOVED', '<img src=\'style_images/<#IMG_DIR#>/f_moved.gif\' border=\'0\' alt=\'Moved\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (12, 'B_NEW', '<img src=\'style_images/<#IMG_DIR#>/f_norm.gif\' border=\'0\' alt=\'New Posts\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (13, 'B_NORM', '<img src=\'style_images/<#IMG_DIR#>/f_norm_no.gif\' border=\'0\' alt=\'No New Posts\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (14, 'B_PIN', '<img src=\'style_images/<#IMG_DIR#>/f_pinned.gif\' border=\'0\' alt=\'Pinned\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (15, 'B_POLL', '<img src=\'style_images/<#IMG_DIR#>/f_poll.gif\' border=\'0\' alt=\'Poll\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (16, 'B_POLL_NN', '<img src=\'style_images/<#IMG_DIR#>/f_poll_no.gif\' border=\'0\' alt=\'No new votes\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (17, 'B_HOT_DOT', '<img src=\'style_images/<#IMG_DIR#>/f_hot_dot.gif\' border=\'0\' alt=\'New Posts\'>', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (18, 'B_NEW_DOT', '<img src=\'style_images/<#IMG_DIR#>/f_norm_dot.gif\' border=\'0\' alt=\'No New Posts\'>', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (19, 'B_HOT_NN_DOT', '<img src=\'style_images/<#IMG_DIR#>/f_hot_no_dot.gif\' border=\'0\' alt=\'No New Posts*\'>', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (20, 'B_NORM_DOT', '<img src=\'style_images/<#IMG_DIR#>/f_norm_no_dot.gif\' border=\'0\' alt=\'No New Posts*\'>', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (21, 'B_POLL_DOT', '<img src=\'style_images/<#IMG_DIR#>/f_poll_dot.gif\' border=\'0\' alt=\'Poll*\'>', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (22, 'B_POLL_NN_DOT', '<img src=\'style_images/<#IMG_DIR#>/f_poll_no_dot.gif\' border=\'0\' alt=\'No New Votes*\'>', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (23, 'C_LOCKED', '<img src=\'style_images/<#IMG_DIR#>/bf_readonly.gif\' border=\'0\' alt=\'Read Only Forum\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (24, 'C_OFF', '<img src=\'style_images/<#IMG_DIR#>/bf_nonew.gif\' border=\'0\' alt=\'No New Posts\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (25, 'C_OFF_CAT', '<img src=\'style_images/<#IMG_DIR#>/bc_nonew.gif\' border=\'0\' alt=\'No New Posts\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (26, 'C_OFF_RES', '<img src=\'style_images/<#IMG_DIR#>/br_nonew.gif\' border=\'0\' alt=\'No New Posts\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (27, 'C_ON', '<img src=\'style_images/<#IMG_DIR#>/bf_new.gif\' border=\'0\' alt=\'New Posts\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (28, 'C_ON_CAT', '<img src=\'style_images/<#IMG_DIR#>/bc_new.gif\' border=\'0\' alt=\'New Posts\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (29, 'C_ON_RES', '<img src=\'style_images/<#IMG_DIR#>/br_new.gif\' border=\'0\' alt=\'New Posts\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (30, 'F_ACTIVE', '<img src=\'style_images/<#IMG_DIR#>/user.gif\' border=\'0\' alt=\'Active Users\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (31, 'F_NAV_SEP', ' -> ', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (32, 'F_NAV', '<img src=\'style_images/<#IMG_DIR#>/nav.gif\' border=\'0\' alt=\'>\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (33, 'F_STATS', '<img src=\'style_images/<#IMG_DIR#>/stats.gif\' border=\'0\' alt=\'Board Stats\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (34, 'NO_PHOTO', '<img src=\'style_images/<#IMG_DIR#>/nophoto.gif\' border=\'0\' alt=\'No Photo\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (35, 'CAMERA', '<img src=\'style_images/<#IMG_DIR#>/camera.gif\' border=\'0\' alt=\'Photo\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (36, 'M_READ', '<img src=\'style_images/<#IMG_DIR#>/f_norm_no.gif\' border=\'0\' alt=\'Read Msg\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (37, 'M_UNREAD', '<img src=\'style_images/<#IMG_DIR#>/f_norm.gif\' border=\'0\' alt=\'Unread Msg\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (38, 'P_AOL', '<img src=\'style_images/<#IMG_DIR#>/p_aim.gif\' border=\'0\' alt=\'AOL\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (39, 'P_DELETE', '<img src=\'style_images/<#IMG_DIR#>/p_delete.gif\' border=\'0\' alt=\'Delete Post\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (40, 'P_EDIT', '<img src=\'style_images/<#IMG_DIR#>/p_edit.gif\' border=\'0\' alt=\'Edit Post\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (41, 'P_EMAIL', '<img src=\'style_images/<#IMG_DIR#>/p_email.gif\' border=\'0\' alt=\'Email Poster\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (42, 'P_ICQ', '<img src=\'style_images/<#IMG_DIR#>/p_icq.gif\' border=\'0\' alt=\'ICQ\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (43, 'P_MSG', '<img src=\'style_images/<#IMG_DIR#>/p_pm.gif\' border=\'0\' alt=\'PM\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (44, 'P_QUOTE', '<img src=\'style_images/<#IMG_DIR#>/p_quote.gif\' border=\'0\' alt=\'Quote Post\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (45, 'P_WEBSITE', '<img src=\'style_images/<#IMG_DIR#>/p_www.gif\' border=\'0\' alt=\'Users Website\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (46, 'P_YIM', '<img src=\'style_images/<#IMG_DIR#>/p_yim.gif\' border=\'0\' alt=\'Yahoo\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (47, 'P_REPORT', '<img src=\'style_images/<#IMG_DIR#>/p_report.gif\' border=\'0\' alt=\'Report Post\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (48, 'P_MSN', '<img src=\'style_images/<#IMG_DIR#>/p_msn.gif\' border=\'0\' alt=\'MSN\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (49, 'CAT_IMG', '<img src=\'style_images/<#IMG_DIR#>/nav_m.gif\' border=\'0\' alt=\'>\' width=\'8\' height=\'8\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (50, 'NEW_POST', '<img src=\'style_images/<#IMG_DIR#>/newpost.gif\' border=\'0\' alt=\'Goto last unread\' title=\'Goto last unread\' hspace=2>', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (51, 'LAST_POST', '<img src=\'style_images/<#IMG_DIR#>/lastpost.gif\' border=\'0\' alt=\'Last Post\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (52, 'BR_REDIRECT', '<img src=\'style_images/<#IMG_DIR#>/br_redirect.gif\' border=\'0\' alt=\'Redirect\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (53, 'INTEGRITY_MSGR', '<img src=\'style_images/<#IMG_DIR#>/p_im.gif\' border=\'0\' alt=\'Integrity Messenger IM\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (54, 'ADDRESS_CARD', '<img src=\'style_images/<#IMG_DIR#>/addresscard.gif\' border=\'0\' alt=\'Mini Profile\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (55, 'T_QREPLY', '<img src=\'style_images/<#IMG_DIR#>/t_qr.gif\' border=\'0\' alt=\'Quick Reply\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (56, 'T_OPTS', '<img src=\'style_images/<#IMG_DIR#>/t_options.gif\' border=\'0\' alt=\'Topic Options\' />', 1, 1);";
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (57, 'CAL_NEWEVENT', '<img src=\'style_images/<#IMG_DIR#>/cal_newevent.gif\' border=\'0\' alt=\'Add New Event\' />', 0, 1);
|
||||
$SQL[] = "INSERT INTO ibf_macro VALUES (58, 'F_RULES', '<img src=\'style_images/<#IMG_DIR#>/forum_rules.gif\' border=\'0\' alt=\'Forum Rules\' />', 0, 1);
|
||||
@@ -1,123 +0,0 @@
|
||||
INSERT INTO ibf_categories (id, position, state, name, description, image, url) VALUES (-1, NULL, NULL, '-', NULL, NULL, NULL);
|
||||
INSERT INTO ibf_categories (id, position, state, name, description, image, url) VALUES (1, 1, '1', 'A Test Category', '', '', '');
|
||||
|
||||
INSERT INTO ibf_css (cssid, css_name, css_text, css_comments) VALUES (1, 'Invision Style Sheet', 'form { display:inline }\r\nTABLE, TR, TD { font-family: Verdana, Tahoma, Arial; font-size: 8.5pt; color: #000000 }\r\na:link, a:visited, a:active { text-decoration: underline; color: #000000 }\r\na:hover { color: #465584 }\r\n.hlight { background-color: #DFE6EF }\r\n.dlight { background-color: #EEF2F7 }\r\n.mainbg { background-color: #FFFFFF }\r\n.mainfoot { background-color: #BCD0ED }\r\n.forum1 { background-color: #DFE6EF }\r\n.forum2 { background-color: #E4EAF2 }\r\n.post1 { background-color: #F5F9FD }\r\n.post2 { background-color: #EEF2F7 }\r\n.posthead { background-color: #E4EAF2 }\r\n\r\n.postbak { background-color: #D2D2D0 }\r\n.title { background-color: #C4DCF7 }\r\n.row1 { background-color: #EEF2F7 }\r\n.row2 { background-color: #F5F9FD }\r\n.postsep { background-color: #C7D2E0; height: 1px }\r\n\r\n.signature { font-size: 7.5pt; color: #333399 }\r\n.postdetails { font-size: 7.5pt }\r\n.postcolor, #postcolor { font-size: 9pt; line-height: 160% }\r\n.membertitle { font-size: 10px; line-height: 150%; color: #000000 }\r\n.normalname { font-size: 12px; font-weight: bold; color: #000033; padding-bottom: 2px }\r\n.normalname a:link, .normalname a:visited, .normalname a:active { text-decoration: underline; color: #000033; padding-bottom: 2px }\r\n.unreg { font-size: 11px; font-weight: bold; color: #990000 }\r\n.highlight { color: #FF0000 }\r\n.highlight a:link, .highlight a:visited, .highlight a:active { text-decoration: underline; color: #FF0000 }\r\n.highlight a:hover { text-decoration: underline }\r\n.desc { font-size: 8.0pt; color: #434951 }\r\n.copyright { font-family: Verdana, Tahoma, Arial; font-size: 7.5pt; line-height: 12px }\r\n.category { font-weight: bold; line-height: 150%; color: #4C77B6; background-color: #C2CFDF }\r\n.category a:link, #category a:visited, #category a:active { text-decoration: none; color: #4C77B6 }\r\n.postfoot {\r\n\r\n font-weight:bold;\r\n\r\n color:#3A4F6C;\r\n\r\n height: 24px;\r\n\r\n background-color: #D1DCEB;\r\n\r\n}\r\n.titlefoot { font-weight: bold; color: #3A4F6C; height: 24px; background-color: #BCD0ED }\r\n.titlemedium {\r\n\r\n font-weight:bold;\r\n color:#3A4F6C;\r\n\r\n height: 30px;\r\n\r\n background-color: #9FBCE3;\r\n \r\n background-image: url(style_images/<#IMG_DIR#>/tile_sub.gif);\r\n\r\n}\r\n.titlemedium a:link, .titlefoot a:link, .titlemedium a:visited, .titlefoot a:visited, .titlemedium a:active, .titlefoot a:active { text-decoration: underline; color: #3A4F6C }\r\n.titlemedium a:hover, .subtitle a:hover, .titlefoot a:hover { text-decoration: underline; color: #000000 }\r\n.maintitle {\r\n\r\n color:#FFFFFF;\r\n\r\n font-size: 9.5pt;\r\n \r\n height: 26px;\r\n \r\n background-image: url(style_images/<#IMG_DIR#>/tile_back.gif);\r\n\r\n}\r\n.edit { font-size: 9px }\r\n.fancyborder { border: 1px dashed #999999 }\r\n.solidborder { border: 1px solid #999999 }\r\n.maintitle a:link, .maintitle a:visited, .maintitle a:active { text-decoration: none; color: #FFFFFF }\r\n.maintitle a:hover { text-decoration: underline }\r\n.nav { font-weight: bold; color: #000000; font-size: 8.5pt }\r\n.pagetitle { color: #4C77B6; font-size: 18px; font-weight: bold; letter-spacing: -1px; line-height: 120% }\r\n.useroptions { background-color: #598CC3; height: 25px; font-weight: bold; color: #FFFFFF }\r\n.useroptions a:link, .useroptions a:visited,.useroptions a:active { text-decoration: none; color: #FFFFFF }\r\n.bottomborder { border-bottom: 1px dashed #D2D2D0 }\r\n.linkthru { color: #000000; font-size:8.5pt }\r\n.linkthru a:link, .linkthru a:active { text-decoration: underline; color: #000000 }\r\n.linkthru a:visited { text-decoration: underline; color: #000000 }\r\n.linkthru a:hover { text-decoration: underline; color: #465584 }\r\n#QUOTE { font-family: Verdana, Arial; font-size: 8pt; color: #333333; background-color: #FAFCFE; border: 1px solid Black; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px }\r\n#CODE { font-family: Verdana, Arial; font-size: 8pt; color: #333333; background-color: #FAFCFE; border: 1px solid Black; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px }\r\n.codebuttons { font-size: 8.5pt; font-family: verdana, helvetica, sans-serif; vertical-align: middle }\r\n.forminput { font-size: 9pt; font-family: verdana, helvetica, sans-serif; vertical-align: middle }\r\n.textinput { font-size: 9pt; font-family: verdana, helvetica, sans-serif; vertical-align: middle }\r\n.input { font-size: 9pt; font-family: verdana, helvetica, sans-serif; vertical-align: middle }\r\n', NULL);
|
||||
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (1, ':mellow:', 'mellow.gif', 0);
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (2, ':huh:', 'huh.gif', 1);
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (3, '^_^', 'happy.gif', 0);
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (4, ':o', 'ohmy.gif', 1);
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (5, ';)', 'wink.gif', 1);
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (6, ':P', 'tongue.gif', 1);
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (7, ':D', 'biggrin.gif', 1);
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (8, ':lol:', 'laugh.gif', 1);
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (9, 'B)', 'cool.gif', 1);
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (10, ':rolleyes:', 'rolleyes.gif', 1);
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (11, '-_-', 'sleep.gif', 0);
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (12, '<_<', 'dry.gif', 1);
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (13, ':)', 'smile.gif', 1);
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (14, ':wub:', 'wub.gif', 0);
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (15, ':angry:', 'mad.gif', 1);
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (16, ':(', 'sad.gif', 1);
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (17, ':unsure:', 'unsure.gif', 1);
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (18, ':wacko:', 'wacko.gif', 0);
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (19, ':blink:', 'blink.gif', 1);
|
||||
INSERT INTO ibf_emoticons (id, typed, image, clickable) VALUES (20, ':ph34r:', 'ph34r.gif', 1);
|
||||
|
||||
INSERT INTO ibf_faq (id, title, text, description) VALUES (1, 'Registration benefits', 'To be able to use all the features on this board, the administrator will probably require that you register for a member account. Registration is free and only takes a moment to complete.\r<br>\r<br>During registration, the adminstrator requires that you supply a valid email address. This is important as the administrator may require that you validate your registration via an email. If this is the case, you will be notified when registering.\r<br>In some cases, the administrator will need to approve your regsitration before you can use your member account fully. If this is the case you will be notified during registration.\r<br>\r<br>Once you have registered and logged in, you will have access to your private messenger and your control panel.\r<br>\r<br>For more information on these items, please see the relevant sections in this documentation.', 'How to register and the added benefits of being a registered member.');
|
||||
INSERT INTO ibf_faq (id, title, text, description) VALUES (2, 'Cookies and cookie usage', 'Using cookies is optional, but strongly recommended. Cookies are used to track topics, showing you which topics have new replies since your last visit and to automatically log you in when you return.\r<br>\r<br>This board will also allow you to remove the long session id\'s found in the URL\'s. You can do this by entering your control panel (click the link at the top of the board) and entering the \'Board Settings\' section. It is recommended that you enable this feature because you may experience problems if your internet connection shares a proxy and you share a link with another user. If in doubt, choose to hide the session id.\r<br>\r<br><b>Clearing Cookies</b>\r<br>\r<br>You can clear the cookies at any time by clicking on the link found at the bottom of the main board page (the first page you see when returning to the board). If this does not work for you, you may need to remove the cookies manually.\r<br>\r<br><u>Removing Cookies in Internet Explorer for Windows</u>\r<br>\r<br><ul>\r<br><li> Close all open Internet Explorer Windows\r<br><li> Click on the \'start\' button\r<br><li> Move up to \'Find\' and click on \'Files and Folders\'\r<br><li> When the new window appears, type in the domain name of the board you are using into the \'containing text\' field. (If the boards address was \'http://www.invisionboard.com/forums/index.php\' you would enter \'invisionboard.com\' without the quotes)\r<br><li> In the \'look in\' box, type in <b>C:\Windows\Cookies</b> and press \'Find Now\'\r<br><li> After it has finished searching, highlight all files (click on a file then press CTRL+A) and delete them.\r<br></ul>\r<br>\r<br><u>Removing Cookies in Internet Explorer for Macintosh</u>\r<br>\r<br><ul>\r<br><li> With Internet Explorer active, choose \'Edit\' and then \'Preferences\' from the Macintosh menu bar at the top of the screen\r<br><li> When the preferences panel opens, choose \'Cookies\' found in the \'Receiving Files\' section.\r<br><li> When the cookie pane loads, look for the domain name of the board (If the boards address was \'http://www.invisionboard.com/forums/index.php\' look for \'invisionboard.com\' or \'www.invisionboard.com\'\r<br><li> For each cookie, click on the entry and press the delete button.\r<br></ul>\r<br>\r<br>Your cookies should now be removed. In some cases you may need to restart your computer for the changes to take effect.', 'The benefits of using cookies and how to remove cookies set by this board.');
|
||||
INSERT INTO ibf_faq (id, title, text, description) VALUES (3, 'Recovering lost or forgotten passwords', 'Security is a big feature on this board, and to that end, all passwords are encrypted when you register.\r<br>This means that we cannot email your password to you as we hold no record of your \'uncrypted\' password. You can however, apply to have your password reset.\r<br>\r<br>To do this, click on the <a href=\'index.php?act=Reg&CODE=10\'>Lost Password link</a> found on the log in page.\r<br>\r<br>Further instruction is available from there.', 'How to reset your password if you\'ve forgotton it.');
|
||||
INSERT INTO ibf_faq (id, title, text, description) VALUES (4, 'Your Control Panel', 'Your control panel is your own private board console. You can change how the board looks and feels as well as your own information from here.\r<br>\r<br><b>Edit Profile Info</b>\r<br>\r<br>This section allows you to add or edit your contact information and enter some personal information if you choose. All of this information is optional and can be omitted.\r<br>\r<br><b>Edit Signature</b>\r<br>\r<br>A board \'signature\' is very similar to an email signature. This signature is attached to the foot of every message you post unless you choose to check the box that allows you to ommit the signature in the message you are posting. You may use BB Code if available and in some cases, pure HTML (if the board administrator allows it).\r<br>\r<br><b>Edit Avatar Settings</b>\r<br>\r<br>An avatar is a little image that appears under your username when you view a topic or post you authored. If the administrator allows, you may either choose from the board gallery, enter a URL to an avatar stored on your server or upload an avatar to use. You may also set the width of the avatar to ensure that it\'s sized in proportion.\r<br>\r<br><b>Email Settings</b>\r<br>\r<br><u>Hide my email address</u> allows you to deny the ability for other users to send you an email from the board.\r<br><u>Send me updates sent by the board administrator</u> will allow the administrator to include your email address in any mailings they send out - this is used mostly for important updates and community information.\r<br><u>Include a copy of the post when emailing me from a subscribed topic</u>, this allows you to have the new post included in any reply to topic notifications.\r<br>\r<br><b>Board Settings</b>\r<br>\r<br>From this section, you can set your timezone, choose to not see users signatures, avatars and posted images.\r<br>You can choose to get a pop up window informing you when you have a new message and hide the long session ID in links (see the \'Cookies\' help file for more infomation on this).\r<br>\r<br><b>Skins and Languages</b>\r<br>\r<br>If available, you can choose a skin style and language choice. This affects how the board is displayed so you may wish to preview the skin before submitting the form.\r<br>\r<br><b>Change Email Address</b>\r<br>\r<br>At any time, you can change the email address that is registered to your account. In some cases, you will need to revalidate your account after changing your email address. If this is the case, you will be notified before your email address change is processed.\r<br>\r<br><b>Change Password</b>\r<br>\r<br>You may change your password from this section. Please note that you will need to know your current password before you can change your password.\r<br>\r<br><b>View Subsciptions</b>\r<br>\r<br>This is where you manage your topic subscriptions. Please see the help file \'Email Notification of new messages\' for more information on how to subscribe to topics.', 'Editing contact information, personal information, avatars, signatures, board settings, languages and style choices.');
|
||||
INSERT INTO ibf_faq (id, title, text, description) VALUES (5, 'Email Notification of new messages', 'This board can notify you when a new reply is added to a topic. Many users find this useful to keep up to date on topics without the need to view the board to check for new messages.\r<br>\r<br>To do this, simply click on the \'Track This Topic\' link found at the top and bottom of any topic. When you click this link, the topic will be added to your subscriptions that are managed from your control panel.\r<br>\r<br>Please note that to avoid multiple emails being sent to your email address, you will only get notified once per day of new replies.', 'How to get emailed when a new reply is added to a topic.');
|
||||
INSERT INTO ibf_faq (id, title, text, description) VALUES (6, 'Your Personal Messenger', 'Your personal messenger acts much like an email account in that you can send and receive messages and store messages in folders.\r<br>\r<br><b>Send a new PM</b>\r<br>\r<br>This will allow you to send a message to another member. If you have names in your contact list, you can choose a name from it - or you may choose to enter a name in the relevant form field. This will be automatically filled in if you clicked a \'PM\' button on the board (from the memberlist or a post).\r<br>If the administrator allows, you may use BB Code and HTML in your private message. If you choose to check the \'Add a copy of this message to you sent items folder\' box, a copy of the message will be saved for you for later reference. If you check the \'Get notified when this message is read\' box, you will receive a PM informing you when the message was read for your records.\r<br>\r<br><b>Contact List</b>\r<br>\r<br>You may add in users names in this section, or edit any saved entries. You can also use this as a ban list, denying the named member the ability to message you.\r<br>Names entered in this section will appear in the drop down list when sending a new PM, allowing you to quickly choose the members name when sending a message.\r<br>\r<br><b>Edit Folders</b>\r<br>\r<br>You may rename, add or remove folders to store messages is, allowing you to organise your messages to your preference. You cannot remove \'Sent Items\' or \'Inbox\'.\r<br>\r<br><b>Go to Inbox</b>\r<br>\r<br>Your inbox is where all new messages are sent to. Clicking on the message title will show you the message in a similar format to the board topic view. You can also delete or move messages from your inbox.\r<br>\r<br><b>Archive Messages</b>\r<br>\r<br>If your messenger folders are full and you are unable to receive new messages, you can archive them off. This compiles the messages into a single HTML page or Microsoft © Excel Format. This page is then emailed to your registered email address for your convenience.\r<br>\r<br>', 'How to send personal messages, edit your messenger folders and archive stored messages.');
|
||||
INSERT INTO ibf_faq (id, title, text, description) VALUES (7, 'Contacting the moderating team', 'If you need to contact a moderator or simply wish to view the complete administration team, you can click the link \'The moderating team\' found at the top of the main board page (the first page you see when visiting the board).\r<br>\r<br>This list will show you administrators (those who have administration control panel access), global moderators (those who can moderate in all forums) and the moderators of the individual forums.\r<br>\r<br>If you wish to contact someone about your member account, then contact an administrator - if you wish to contact someone about a post or topic, contact either a global moderator or the forum moderator.', 'Where to find a list of the board moderators and administrators.');
|
||||
INSERT INTO ibf_faq (id, title, text, description) VALUES (8, 'Viewing members profile information', 'You can view a members profile at any time by clicking on their name when it is underlined (as a link) or by clicking on their name in a post within a topic.\r<br>\r<br>This will show you their profile page which contains their contact information (if they have entered some) and their \'active stats\'.', 'How to view members contact information.');
|
||||
INSERT INTO ibf_faq (id, title, text, description) VALUES (9, 'Viewing todays active topics', 'You can view which new topics have new replies today by clicking on the \'Todays Active Topics\' link found on the main board page (the first page you see when visiting the board).\r<br>\r<br>You can set your own date critera, choosing to view all topics with new replies during several date choices.', 'How to view all the topics which have a new reply today');
|
||||
INSERT INTO ibf_faq (id, title, text, description) VALUES (10, 'Searching Topics and Posts', 'The search feature is designed to allow you to quickly find topics and posts that contain the keywords you enter.\r<br>\r<br>The \'Simple Search\' option from the drop down box allows you to enter a single keyword or phrase to search by - the advanced option allows you to join keywords with \'AND\', \'OR\' to fine tune the search. Using this option will make the search slightly slower.\r<br>\r<br>The bottom section of the form allows you to further fine tune the search. You can choose a category to search in, or a forum - or choose all forums to search in.\r<br>\r<br>If you enter a name into the \'Search by member name\' section, all posts started or replied in by this member are returned.', 'How to use the search feature.');
|
||||
INSERT INTO ibf_faq (id, title, text, description) VALUES (11, 'Logging in and out', 'If you have chosen not to remember your log in details in cookies, or you are accessing the board on another computer, you will need to log into the board to access your member profile and post with your registered name.\r<br>\r<br>When you log in, you have the choice to save cookies that will log you in automatically when you return. Do not use this option on a shared computer for security.\r<br>\r<br>You can also choose to hide - this will keep your name from appearing in the active users list.\r<br>\r<br>Logging out is simply a matter of clicking on the \'Log Out\' link that is displayed when you are logged in. If you find that you are not logged out, you may need to manually remove your cookies. See the \'Cookies\' help file for more information.', 'How to log in and out from the board and how to remain anonymous and not be shown on the active users list.');
|
||||
|
||||
INSERT INTO ibf_forums (id, topics, posts, last_post, last_poster_id, last_poster_name, name, description, position, use_ibc, use_html, status, start_perms, reply_perms, read_perms, password, category, last_title, last_id, sort_key, sort_order, prune, show_rules, upload_perms, preview_posts, allow_poll, allow_pollbump, inc_postcount, skin_id, parent_id, subwrap, sub_can_post) VALUES (1, 1, 1, 0, 1, 'Invision Board Team', 'A Test Forum', 'A test forum that may be removed at any time', 1, 1, 0, '1', '*', '*', '*', '', 1, 'Welcome', 1, 'last_post', 'Z-A', 30, 0, '', 0, 0, 0, 1, NULL, -1, 0, 1);
|
||||
|
||||
INSERT INTO ibf_groups (g_id, g_view_board, g_mem_info, g_other_topics, g_use_search, g_email_friend, g_invite_friend, g_edit_profile, g_post_new_topics, g_reply_own_topics, g_reply_other_topics, g_edit_posts, g_delete_own_posts, g_open_close_posts, g_delete_own_topics, g_post_polls, g_vote_polls, g_use_pm, g_is_supmod, g_access_cp, g_title, g_can_remove, g_append_edit, g_access_offline, g_avoid_q, g_avoid_flood, g_icon, g_attach_max, g_avatar_upload, g_calendar_post, prefix, suffix, g_max_messages, g_max_mass_pm, g_search_flood, g_edit_cutoff, g_promotion, g_hide_from_list) VALUES (4, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 'Admin', 0, 1, 1, 1, 1, '', 50000, 1, 1, '', '', 50, 6, 0, 5, '-1&-1', 0);
|
||||
INSERT INTO ibf_groups (g_id, g_view_board, g_mem_info, g_other_topics, g_use_search, g_email_friend, g_invite_friend, g_edit_profile, g_post_new_topics, g_reply_own_topics, g_reply_other_topics, g_edit_posts, g_delete_own_posts, g_open_close_posts, g_delete_own_topics, g_post_polls, g_vote_polls, g_use_pm, g_is_supmod, g_access_cp, g_title, g_can_remove, g_append_edit, g_access_offline, g_avoid_q, g_avoid_flood, g_icon, g_attach_max, g_avatar_upload, g_calendar_post, prefix, suffix, g_max_messages, g_max_mass_pm, g_search_flood, g_edit_cutoff, g_promotion, g_hide_from_list) VALUES (2, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, 'Guests', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, 50, 0, 20, 0, '-1&-1', 0);
|
||||
INSERT INTO ibf_groups (g_id, g_view_board, g_mem_info, g_other_topics, g_use_search, g_email_friend, g_invite_friend, g_edit_profile, g_post_new_topics, g_reply_own_topics, g_reply_other_topics, g_edit_posts, g_delete_own_posts, g_open_close_posts, g_delete_own_topics, g_post_polls, g_vote_polls, g_use_pm, g_is_supmod, g_access_cp, g_title, g_can_remove, g_append_edit, g_access_offline, g_avoid_q, g_avoid_flood, g_icon, g_attach_max, g_avatar_upload, g_calendar_post, prefix, suffix, g_max_messages, g_max_mass_pm, g_search_flood, g_edit_cutoff, g_promotion, g_hide_from_list) VALUES (3, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 'Members', 0, 1, 0, 0, 0, '', 0, 1, 0, '', '', 50, 0, 20, 0, '-1&-1', 0);
|
||||
INSERT INTO ibf_groups (g_id, g_view_board, g_mem_info, g_other_topics, g_use_search, g_email_friend, g_invite_friend, g_edit_profile, g_post_new_topics, g_reply_own_topics, g_reply_other_topics, g_edit_posts, g_delete_own_posts, g_open_close_posts, g_delete_own_topics, g_post_polls, g_vote_polls, g_use_pm, g_is_supmod, g_access_cp, g_title, g_can_remove, g_append_edit, g_access_offline, g_avoid_q, g_avoid_flood, g_icon, g_attach_max, g_avatar_upload, g_calendar_post, prefix, suffix, g_max_messages, g_max_mass_pm, g_search_flood, g_edit_cutoff, g_promotion, g_hide_from_list) VALUES (1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Validating', 0, 1, 0, 0, 0, NULL, 0, 0, 0, NULL, NULL, 50, 0, 20, 0, '-1&-1', 0);
|
||||
INSERT INTO ibf_groups (g_id, g_view_board, g_mem_info, g_other_topics, g_use_search, g_email_friend, g_invite_friend, g_edit_profile, g_post_new_topics, g_reply_own_topics, g_reply_other_topics, g_edit_posts, g_delete_own_posts, g_open_close_posts, g_delete_own_topics, g_post_polls, g_vote_polls, g_use_pm, g_is_supmod, g_access_cp, g_title, g_can_remove, g_append_edit, g_access_offline, g_avoid_q, g_avoid_flood, g_icon, g_attach_max, g_avatar_upload, g_calendar_post, prefix, suffix, g_max_messages, g_max_mass_pm, g_search_flood, g_edit_cutoff, g_promotion, g_hide_from_list) VALUES (5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Banned', 0, 0, 0, 0, 0, NULL, NULL, 0, 0, NULL, NULL, 50, 0, 20, 0, '-1&-1', 1);
|
||||
|
||||
INSERT INTO ibf_languages (lid, ldir, lname, lauthor, lemail) VALUES (1, 'en', 'English', 'Invision Board', 'languages@invisionboard.com');
|
||||
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (1, 'A_LOCKED_B', '<img src=\'style_images/<#IMG_DIR#>/t_closed.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (2, 'A_MOVED_B', '<img src=\'style_images/<#IMG_DIR#>/t_moved.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (4, 'A_POLLONLY_B', '<img src=\'style_images/<#IMG_DIR#>/t_closed.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (5, 'A_POST', '<img src=\'style_images/<#IMG_DIR#>/t_new.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (6, 'A_REPLY', '<img src=\'style_images/<#IMG_DIR#>/t_reply.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (7, 'A_STAR', '<img src=\'style_images/<#IMG_DIR#>/pip.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (8, 'B_HOT', '<img src=\'style_images/<#IMG_DIR#>/f_hot.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (9, 'B_HOT_NN', '<img src=\'style_images/<#IMG_DIR#>/f_hot_no.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (10, 'B_LOCKED', '<img src=\'style_images/<#IMG_DIR#>/f_closed.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (11, 'B_MOVED', '<img src=\'style_images/<#IMG_DIR#>/f_moved.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (12, 'B_NEW', '<img src=\'style_images/<#IMG_DIR#>/f_norm.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (13, 'B_NORM', '<img src=\'style_images/<#IMG_DIR#>/f_norm_no.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (14, 'B_PIN', '<img src=\'style_images/<#IMG_DIR#>/f_pinned.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (15, 'B_POLL', '<img src=\'style_images/<#IMG_DIR#>/f_poll.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (16, 'B_POLL_NN', '<img src=\'style_images/<#IMG_DIR#>/f_poll_no.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (17, 'C_LOCKED', '<img src=\'style_images/<#IMG_DIR#>/bf_readonly.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (18, 'C_OFF', '<img src=\'style_images/<#IMG_DIR#>/bf_nonew.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (19, 'C_OFF_CAT', '<img src=\'style_images/<#IMG_DIR#>/bc_nonew.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (20, 'C_OFF_RES', '<img src=\'style_images/<#IMG_DIR#>/br_nonew.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (21, 'C_ON', '<img src=\'style_images/<#IMG_DIR#>/bf_new.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (22, 'C_ON_CAT', '<img src=\'style_images/<#IMG_DIR#>/bc_new.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (23, 'C_ON_RES', '<img src=\'style_images/<#IMG_DIR#>/br_new.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (24, 'F_ACTIVE', '<img src=\'style_images/<#IMG_DIR#>/user.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (25, 'F_NAV_SEP', ' ->', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (26, 'F_NAV', '<img src=\'style_images/<#IMG_DIR#>/nav.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (27, 'F_STATS', '<img src=\'style_images/<#IMG_DIR#>/stats.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (28, 'GO_LAST_ON', '', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (29, 'GO_LAST_OFF', '', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (30, 'M_ADDMEM', '<img src=\'style_images/<#IMG_DIR#>/msg_l_addmem.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (31, 'M_DELETE', '<img src=\'style_images/<#IMG_DIR#>/msg_l_delete.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (32, 'M_READ', '<img src=\'style_images/<#IMG_DIR#>/f_norm_no.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (33, 'M_REPLY', '<img src=\'style_images/<#IMG_DIR#>/msg_l_reply.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (34, 'M_UNREAD', '<img src=\'style_images/<#IMG_DIR#>/f_norm.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (35, 'P_AOL', '<img src=\'style_images/<#IMG_DIR#>/p_aim.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (36, 'P_DELETE', '<img src=\'style_images/<#IMG_DIR#>/p_delete.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (37, 'P_EDIT', '<img src=\'style_images/<#IMG_DIR#>/p_edit.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (38, 'P_EMAIL', '<img src=\'style_images/<#IMG_DIR#>/p_email.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (39, 'P_ICQ', '<img src=\'style_images/<#IMG_DIR#>/p_icq.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (40, 'P_MSG', '<img src=\'style_images/<#IMG_DIR#>/p_pm.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (41, 'P_PROFILE', '[ Profile ]', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (42, 'P_QUOTE', '<img src=\'style_images/<#IMG_DIR#>/p_quote.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (43, 'P_WEBSITE', '<img src=\'style_images/<#IMG_DIR#>/p_www.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (44, 'CAT_IMG', '<img src=\'style_images/<#IMG_DIR#>/nav_m.gif\' border=\'0\' alt=\'\' width=\'8\' height=\'8\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (45, 'B_HOT_DOT', '<img src=\'style_images/<#IMG_DIR#>/f_hot_dot.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (46, 'B_NEW_DOT', '<img src=\'style_images/<#IMG_DIR#>/f_norm_dot.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (47, 'B_HOT_NN_DOT', '<img src=\'style_images/<#IMG_DIR#>/f_hot_no_dot.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (48, 'B_NORM_DOT', '<img src=\'style_images/<#IMG_DIR#>/f_norm_no_dot.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (49, 'B_POLL_DOT', '<img src=\'style_images/<#IMG_DIR#>/f_poll_dot.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (50, 'B_POLL_NN_DOT', '<img src=\'style_images/<#IMG_DIR#>/f_poll_no_dot.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (51, 'NEW_POST', '<img src=\'style_images/<#IMG_DIR#>/newpost.gif\' border=\'0\' alt=\'Goto last unread\' title=\'Goto last unread\' hspace=2>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (52, 'tbl_width', '95%', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (53, 'tbl_border', '#345487', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (55, 'P_YIM', '<img src=\'style_images/<#IMG_DIR#>/p_yim.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
INSERT INTO ibf_macro (macro_id, macro_value, macro_replace, can_remove, macro_set) VALUES (56, 'P_MSN', '<img src=\'style_images/<#IMG_DIR#>/p_msn.gif\' border=\'0\' alt=\'\'>', 0, 1);
|
||||
|
||||
INSERT INTO ibf_macro_name (set_id, set_name) VALUES (1, 'IBF Default Macro Set');
|
||||
|
||||
INSERT INTO ibf_members (id, name, mgroup, password, email, joined, ip_address, avatar, avatar_size, posts, aim_name, icq_number, location, signature, website, yahoo, title, allow_admin_mails, time_offset, interests, hide_email, email_pm, email_full, skin, warn_level, language, msnname, last_post, allow_post, view_sigs, view_img, view_avs, view_pop, bday_day, bday_month, bday_year, new_msg, msg_from_id, msg_msg_id, msg_total, vdirs, show_popup, validate_key, prev_group, new_pass, misc, last_visit, last_activity, dst_in_use, view_prefs, coppa_user, mod_posts, auto_track) VALUES (0, 'Guest', 2, '', 'guest@ibforums.com', 0, '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 1, 1, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, '0', 0, 0, 0, '-1&-1', 0, 0, 0);
|
||||
|
||||
INSERT INTO ibf_posts (append_edit, edit_time, pid, author_id, author_name, use_sig, use_emo, ip_address, post_date, icon_id, post, queued, topic_id, forum_id, attach_id, attach_hits, attach_type, attach_file, post_title, new_topic, edit_name) VALUES (0, NULL, 1, 1, 'Invision Board Team', '1', '1', '127.0.0.1', 0, 0, 'Welcome to your new Invision Board!<br>This is simply a test message confirming that the installation was successful.<br>You can remove this message, topic, forum or even category at any time.', 0, 1, 1, '', 0, '', '', NULL, 1, NULL);
|
||||
|
||||
|
||||
INSERT INTO ibf_skins (uid, sname, sid, set_id, tmpl_id, macro_id, css_id, img_dir, tbl_width, tbl_border, hidden, default_set) VALUES (1, 'Invision Board', 0, 1, 1, 1, 1, '1', '95%', '#999999', 0, 1);
|
||||
|
||||
INSERT INTO ibf_stats (TOTAL_REPLIES, TOTAL_TOPICS, LAST_MEM_NAME, LAST_MEM_ID, MOST_DATE, MOST_COUNT, MEM_COUNT) VALUES (0, 1, '', '1', 0, 1, 1);
|
||||
|
||||
INSERT INTO ibf_templates (tmid, template, name) VALUES (1, '<html> <head> <title> <% TITLE %> </title> <% GENERATOR %> <% CSS %> <% JAVASCRIPT %> </head><body bgcolor=\'#FFFFFF\' leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" alink=\'#000000\' vlink=\'#000000\'><% BOARD HEADER %><% NAVIGATION %><% BOARD %><% STATS %><% COPYRIGHT %></body></html>', 'Invision Board Standard');
|
||||
|
||||
INSERT INTO ibf_titles (id, posts, title, pips) VALUES (1, 0, 'Newbie', '1');
|
||||
INSERT INTO ibf_titles (id, posts, title, pips) VALUES (2, 10, 'Member', '2');
|
||||
INSERT INTO ibf_titles (id, posts, title, pips) VALUES (4, 30, 'Advanced Member', '3');
|
||||
|
||||
INSERT INTO ibf_tmpl_names (skid, skname, author, email, url) VALUES (1, 'Invision Board Template Set', 'Invision Board', 'skins@invisionboard.com', 'http://www.invisionboard.com');
|
||||
|
||||
INSERT INTO ibf_topics (tid, title, description, state, posts, starter_id, start_date, last_poster_id, last_post, icon_id, starter_name, last_poster_name, poll_state, last_vote, views, forum_id, approved, author_mode, pinned, moved_to, rating, total_votes) VALUES (1, 'Welcome', '', 'open', 0, '0', 0, '0', 0, 0, 'Invision Board Team', 'Invision Board Team', '0', 0, 0, 1, 1, 0, 0, NULL, NULL, 0);
|
||||
@@ -1,760 +0,0 @@
|
||||
CREATE TABLE ibf_admin_logs (
|
||||
id bigint(20) NOT NULL auto_increment,
|
||||
act varchar(255) default NULL,
|
||||
code varchar(255) default NULL,
|
||||
member_id int(10) default NULL,
|
||||
ctime int(10) default NULL,
|
||||
note text,
|
||||
ip_address varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_admin_sessions (
|
||||
ID varchar(32) NOT NULL default '',
|
||||
IP_ADDRESS varchar(32) NOT NULL default '',
|
||||
MEMBER_NAME varchar(32) NOT NULL default '',
|
||||
MEMBER_ID varchar(32) NOT NULL default '',
|
||||
SESSION_KEY varchar(32) NOT NULL default '',
|
||||
LOCATION varchar(64) default 'index',
|
||||
LOG_IN_TIME int(10) NOT NULL default '0',
|
||||
RUNNING_TIME int(10) NOT NULL default '0',
|
||||
PRIMARY KEY (ID)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_badwords (
|
||||
wid int(3) NOT NULL auto_increment,
|
||||
type varchar(250) NOT NULL default '',
|
||||
swop varchar(250) default NULL,
|
||||
m_exact tinyint(1) default '0',
|
||||
PRIMARY KEY (wid)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_cache_store (
|
||||
cs_key varchar(255) NOT NULL default '',
|
||||
cs_value text NOT NULL,
|
||||
cs_extra varchar(255) NOT NULL default '',
|
||||
PRIMARY KEY (cs_key)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_calendar_events (
|
||||
eventid mediumint(8) NOT NULL auto_increment,
|
||||
userid mediumint(8) NOT NULL default '0',
|
||||
year int(4) NOT NULL default '2002',
|
||||
month int(2) NOT NULL default '1',
|
||||
mday int(2) NOT NULL default '1',
|
||||
title varchar(254) NOT NULL default 'no title',
|
||||
event_text text NOT NULL,
|
||||
read_perms varchar(254) NOT NULL default '*',
|
||||
unix_stamp int(10) NOT NULL default '0',
|
||||
priv_event tinyint(1) NOT NULL default '0',
|
||||
show_emoticons tinyint(1) NOT NULL default '1',
|
||||
rating smallint(2) NOT NULL default '1',
|
||||
event_ranged tinyint(1) NOT NULL default '0',
|
||||
event_repeat tinyint(1) NOT NULL default '0',
|
||||
repeat_unit char(2) NOT NULL default '',
|
||||
end_day int(2) default NULL,
|
||||
end_month int(2) default NULL,
|
||||
end_year int(4) default NULL,
|
||||
end_unix_stamp int(10) default NULL,
|
||||
event_bgcolor varchar(32) NOT NULL default '',
|
||||
event_color varchar(32) NOT NULL default '',
|
||||
PRIMARY KEY (eventid),
|
||||
KEY unix_stamp (unix_stamp)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_categories (
|
||||
id smallint(5) NOT NULL default '0',
|
||||
position tinyint(3) default NULL,
|
||||
state varchar(10) default NULL,
|
||||
name varchar(128) NOT NULL default '',
|
||||
description text,
|
||||
image varchar(128) default NULL,
|
||||
url varchar(128) default NULL,
|
||||
PRIMARY KEY (id),
|
||||
KEY id (id)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_contacts (
|
||||
id mediumint(8) NOT NULL auto_increment,
|
||||
contact_id mediumint(8) NOT NULL default '0',
|
||||
member_id mediumint(8) NOT NULL default '0',
|
||||
contact_name varchar(32) NOT NULL default '',
|
||||
allow_msg tinyint(1) default NULL,
|
||||
contact_desc varchar(50) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_css (
|
||||
cssid int(10) NOT NULL auto_increment,
|
||||
css_name varchar(128) NOT NULL default '',
|
||||
css_text text,
|
||||
css_comments text,
|
||||
updated int(10) default '0',
|
||||
PRIMARY KEY (cssid)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_email_logs (
|
||||
email_id int(10) NOT NULL auto_increment,
|
||||
email_subject varchar(255) NOT NULL default '',
|
||||
email_content text NOT NULL,
|
||||
email_date int(10) NOT NULL default '0',
|
||||
from_member_id mediumint(8) NOT NULL default '0',
|
||||
from_email_address varchar(250) NOT NULL default '',
|
||||
from_ip_address varchar(16) NOT NULL default '127.0.0.1',
|
||||
to_member_id mediumint(8) NOT NULL default '0',
|
||||
to_email_address varchar(250) NOT NULL default '',
|
||||
topic_id int(10) NOT NULL default '0',
|
||||
PRIMARY KEY (email_id),
|
||||
KEY from_member_id (from_member_id),
|
||||
KEY email_date (email_date)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_emoticons (
|
||||
id smallint(3) NOT NULL auto_increment,
|
||||
typed varchar(32) NOT NULL default '',
|
||||
image varchar(128) NOT NULL default '',
|
||||
clickable smallint(2) NOT NULL default '1',
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_faq (
|
||||
id mediumint(8) NOT NULL auto_increment,
|
||||
title varchar(128) NOT NULL default '',
|
||||
text text,
|
||||
description text NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_forum_perms (
|
||||
perm_id int(10) NOT NULL auto_increment,
|
||||
perm_name varchar(250) NOT NULL default '',
|
||||
PRIMARY KEY (perm_id)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_forum_tracker (
|
||||
frid mediumint(8) NOT NULL auto_increment,
|
||||
member_id varchar(32) NOT NULL default '',
|
||||
forum_id smallint(5) NOT NULL default '0',
|
||||
start_date int(10) default NULL,
|
||||
last_sent int(10) NOT NULL default '0',
|
||||
PRIMARY KEY (frid)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_forums (
|
||||
id smallint(5) NOT NULL default '0',
|
||||
topics mediumint(6) default NULL,
|
||||
posts mediumint(6) default NULL,
|
||||
last_post int(10) default NULL,
|
||||
last_poster_id mediumint(8) NOT NULL default '0',
|
||||
last_poster_name varchar(32) default NULL,
|
||||
name varchar(128) NOT NULL default '',
|
||||
description text,
|
||||
position tinyint(2) default NULL,
|
||||
use_ibc tinyint(1) default NULL,
|
||||
use_html tinyint(1) default NULL,
|
||||
status varchar(10) default NULL,
|
||||
start_perms varchar(255) NOT NULL default '',
|
||||
reply_perms varchar(255) NOT NULL default '',
|
||||
read_perms varchar(255) NOT NULL default '',
|
||||
password varchar(32) default NULL,
|
||||
category tinyint(2) NOT NULL default '0',
|
||||
last_title varchar(128) default NULL,
|
||||
last_id int(10) default NULL,
|
||||
sort_key varchar(32) default NULL,
|
||||
sort_order varchar(32) default NULL,
|
||||
prune tinyint(3) default NULL,
|
||||
show_rules tinyint(1) default NULL,
|
||||
upload_perms varchar(255) default NULL,
|
||||
preview_posts tinyint(1) default NULL,
|
||||
allow_poll tinyint(1) NOT NULL default '1',
|
||||
allow_pollbump tinyint(1) NOT NULL default '0',
|
||||
inc_postcount tinyint(1) NOT NULL default '1',
|
||||
skin_id int(10) default NULL,
|
||||
parent_id mediumint(5) default '-1',
|
||||
subwrap tinyint(1) default '0',
|
||||
sub_can_post tinyint(1) default '1',
|
||||
quick_reply tinyint(1) default '0',
|
||||
redirect_url varchar(250) default '',
|
||||
redirect_on tinyint(1) NOT NULL default '0',
|
||||
redirect_hits int(10) NOT NULL default '0',
|
||||
redirect_loc varchar(250) default '',
|
||||
rules_title varchar(255) NOT NULL default '',
|
||||
rules_text text NOT NULL,
|
||||
has_mod_posts tinyint(1) NOT NULL default '0',
|
||||
topic_mm_id varchar(250) NOT NULL default '',
|
||||
notify_modq_emails text default '',
|
||||
PRIMARY KEY (id),
|
||||
KEY category (category),
|
||||
KEY id (id)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_groups (
|
||||
g_id int(3) unsigned NOT NULL auto_increment,
|
||||
g_view_board tinyint(1) default NULL,
|
||||
g_mem_info tinyint(1) default NULL,
|
||||
g_other_topics tinyint(1) default NULL,
|
||||
g_use_search tinyint(1) default NULL,
|
||||
g_email_friend tinyint(1) default NULL,
|
||||
g_invite_friend tinyint(1) default NULL,
|
||||
g_edit_profile tinyint(1) default NULL,
|
||||
g_post_new_topics tinyint(1) default NULL,
|
||||
g_reply_own_topics tinyint(1) default NULL,
|
||||
g_reply_other_topics tinyint(1) default NULL,
|
||||
g_edit_posts tinyint(1) default NULL,
|
||||
g_delete_own_posts tinyint(1) default NULL,
|
||||
g_open_close_posts tinyint(1) default NULL,
|
||||
g_delete_own_topics tinyint(1) default NULL,
|
||||
g_post_polls tinyint(1) default NULL,
|
||||
g_vote_polls tinyint(1) default NULL,
|
||||
g_use_pm tinyint(1) default NULL,
|
||||
g_is_supmod tinyint(1) default NULL,
|
||||
g_access_cp tinyint(1) default NULL,
|
||||
g_title varchar(32) NOT NULL default '',
|
||||
g_can_remove tinyint(1) default NULL,
|
||||
g_append_edit tinyint(1) default NULL,
|
||||
g_access_offline tinyint(1) default NULL,
|
||||
g_avoid_q tinyint(1) default NULL,
|
||||
g_avoid_flood tinyint(1) default NULL,
|
||||
g_icon varchar(64) default NULL,
|
||||
g_attach_max bigint(20) default NULL,
|
||||
g_avatar_upload tinyint(1) default '0',
|
||||
g_calendar_post tinyint(1) default '0',
|
||||
prefix varchar(250) default NULL,
|
||||
suffix varchar(250) default NULL,
|
||||
g_max_messages int(5) default '50',
|
||||
g_max_mass_pm int(5) default '0',
|
||||
g_search_flood mediumint(6) default '20',
|
||||
g_edit_cutoff int(10) default '0',
|
||||
g_promotion varchar(10) default '-1&-1',
|
||||
g_hide_from_list tinyint(1) default '0',
|
||||
g_post_closed tinyint(1) default '0',
|
||||
g_perm_id varchar(255) NOT NULL default '',
|
||||
g_photo_max_vars varchar(200) default '',
|
||||
g_dohtml tinyint(1) NOT NULL default '0',
|
||||
g_edit_topic tinyint(1) NOT NULL default '0',
|
||||
g_email_limit varchar(15) NOT NULL default '10:15',
|
||||
PRIMARY KEY (g_id)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_languages (
|
||||
lid mediumint(8) NOT NULL auto_increment,
|
||||
ldir varchar(64) NOT NULL default '',
|
||||
lname varchar(250) NOT NULL default '',
|
||||
lauthor varchar(250) default NULL,
|
||||
lemail varchar(250) default NULL,
|
||||
PRIMARY KEY (lid)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_macro (
|
||||
macro_id smallint(3) NOT NULL auto_increment,
|
||||
macro_value varchar(200) default NULL,
|
||||
macro_replace text,
|
||||
can_remove tinyint(1) default '0',
|
||||
macro_set smallint(3) default NULL,
|
||||
PRIMARY KEY (macro_id),
|
||||
KEY macro_set (macro_set)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_macro_name (
|
||||
set_id smallint(3) NOT NULL default '0',
|
||||
set_name varchar(200) default NULL,
|
||||
PRIMARY KEY (set_id)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_member_extra (
|
||||
id mediumint(8) NOT NULL default '0',
|
||||
notes text,
|
||||
links text,
|
||||
bio text,
|
||||
ta_size char(3) default NULL,
|
||||
photo_type varchar(10) default '',
|
||||
photo_location varchar(255) default '',
|
||||
photo_dimensions varchar(200) default '',
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_members (
|
||||
id mediumint(8) NOT NULL default '0',
|
||||
name varchar(255) NOT NULL default '',
|
||||
mgroup smallint(3) NOT NULL default '0',
|
||||
password varchar(32) NOT NULL default '',
|
||||
email varchar(60) NOT NULL default '',
|
||||
joined int(10) NOT NULL default '0',
|
||||
ip_address varchar(16) NOT NULL default '',
|
||||
avatar varchar(128) default NULL,
|
||||
avatar_size varchar(9) default NULL,
|
||||
posts mediumint(7) default '0',
|
||||
aim_name varchar(40) default NULL,
|
||||
icq_number varchar(40) default NULL,
|
||||
location varchar(128) default NULL,
|
||||
signature text,
|
||||
website varchar(70) default NULL,
|
||||
yahoo varchar(32) default NULL,
|
||||
title varchar(64) default NULL,
|
||||
allow_admin_mails tinyint(1) default NULL,
|
||||
time_offset varchar(10) default NULL,
|
||||
interests text,
|
||||
hide_email varchar(8) default NULL,
|
||||
email_pm tinyint(1) default NULL,
|
||||
email_full tinyint(1) default NULL,
|
||||
skin smallint(5) default NULL,
|
||||
warn_level int(10) default NULL,
|
||||
warn_lastwarn int(10) NOT NULL default '0',
|
||||
language varchar(32) default NULL,
|
||||
msnname varchar(64) default NULL,
|
||||
last_post int(10) default NULL,
|
||||
restrict_post varchar(100) NOT NULL default '0',
|
||||
view_sigs tinyint(1) default '1',
|
||||
view_img tinyint(1) default '1',
|
||||
view_avs tinyint(1) default '1',
|
||||
view_pop tinyint(1) default '1',
|
||||
bday_day int(2) default NULL,
|
||||
bday_month int(2) default NULL,
|
||||
bday_year int(4) default NULL,
|
||||
new_msg tinyint(2) default NULL,
|
||||
msg_from_id mediumint(8) default NULL,
|
||||
msg_msg_id int(10) default NULL,
|
||||
msg_total smallint(5) default NULL,
|
||||
vdirs text,
|
||||
show_popup tinyint(1) default NULL,
|
||||
misc varchar(128) default NULL,
|
||||
last_visit int(10) default '0',
|
||||
last_activity int(10) default '0',
|
||||
dst_in_use tinyint(1) default '0',
|
||||
view_prefs varchar(64) default '-1&-1',
|
||||
coppa_user tinyint(1) default '0',
|
||||
mod_posts varchar(100) NOT NULL default '0',
|
||||
auto_track tinyint(1) default '0',
|
||||
org_perm_id varchar(255) default '',
|
||||
org_supmod tinyint(1) default '0',
|
||||
integ_msg varchar(250) default '',
|
||||
temp_ban varchar(100) default NULL,
|
||||
sub_end int(10) NOT NULL default '0',
|
||||
PRIMARY KEY (id),
|
||||
KEY name (name),
|
||||
KEY mgroup (mgroup),
|
||||
KEY bday_day (bday_day),
|
||||
KEY bday_month (bday_month)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_messages (
|
||||
msg_id int(10) NOT NULL auto_increment,
|
||||
msg_date int(10) default NULL,
|
||||
read_state tinyint(1) default NULL,
|
||||
title varchar(128) default NULL,
|
||||
message text,
|
||||
from_id mediumint(8) NOT NULL default '0',
|
||||
vid varchar(32) default NULL,
|
||||
member_id mediumint(8) NOT NULL default '0',
|
||||
recipient_id mediumint(8) NOT NULL default '0',
|
||||
attach_type tinyint(128) default NULL,
|
||||
attach_file tinyint(128) default NULL,
|
||||
cc_users text,
|
||||
tracking tinyint(1) default '0',
|
||||
read_date int(10) default NULL,
|
||||
PRIMARY KEY (msg_id),
|
||||
KEY member_id (member_id),
|
||||
KEY vid (vid)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_moderator_logs (
|
||||
id int(10) NOT NULL auto_increment,
|
||||
forum_id int(5) default '0',
|
||||
topic_id int(10) NOT NULL default '0',
|
||||
post_id int(10) default NULL,
|
||||
member_id mediumint(8) NOT NULL default '0',
|
||||
member_name varchar(32) NOT NULL default '',
|
||||
ip_address varchar(16) NOT NULL default '0',
|
||||
http_referer varchar(255) default NULL,
|
||||
ctime int(10) default NULL,
|
||||
topic_title varchar(128) default NULL,
|
||||
action varchar(128) default NULL,
|
||||
query_string varchar(128) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_moderators (
|
||||
mid mediumint(8) NOT NULL auto_increment,
|
||||
forum_id int(5) NOT NULL default '0',
|
||||
member_name varchar(32) NOT NULL default '',
|
||||
member_id mediumint(8) NOT NULL default '0',
|
||||
edit_post tinyint(1) default NULL,
|
||||
edit_topic tinyint(1) default NULL,
|
||||
delete_post tinyint(1) default NULL,
|
||||
delete_topic tinyint(1) default NULL,
|
||||
view_ip tinyint(1) default NULL,
|
||||
open_topic tinyint(1) default NULL,
|
||||
close_topic tinyint(1) default NULL,
|
||||
mass_move tinyint(1) default NULL,
|
||||
mass_prune tinyint(1) default NULL,
|
||||
move_topic tinyint(1) default NULL,
|
||||
pin_topic tinyint(1) default NULL,
|
||||
unpin_topic tinyint(1) default NULL,
|
||||
post_q tinyint(1) default NULL,
|
||||
topic_q tinyint(1) default NULL,
|
||||
allow_warn tinyint(1) default NULL,
|
||||
edit_user tinyint(1) NOT NULL default '0',
|
||||
is_group tinyint(1) default '0',
|
||||
group_id smallint(3) default NULL,
|
||||
group_name varchar(200) default NULL,
|
||||
split_merge tinyint(1) default '0',
|
||||
can_mm tinyint(1) NOT NULL default '0',
|
||||
PRIMARY KEY (mid),
|
||||
KEY forum_id (forum_id),
|
||||
KEY group_id (group_id),
|
||||
KEY member_id (member_id)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_pfields_content (
|
||||
member_id mediumint(8) NOT NULL default '0',
|
||||
updated int(10) default '0',
|
||||
PRIMARY KEY (member_id)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_pfields_data (
|
||||
fid smallint(5) NOT NULL auto_increment,
|
||||
ftitle varchar(200) NOT NULL default '',
|
||||
fdesc varchar(250) default '',
|
||||
fcontent text,
|
||||
ftype varchar(250) default 'text',
|
||||
freq tinyint(1) default '0',
|
||||
fhide tinyint(1) default '0',
|
||||
fmaxinput smallint(6) default '250',
|
||||
fedit tinyint(1) default '1',
|
||||
forder smallint(6) default '1',
|
||||
fshowreg tinyint(1) default '0',
|
||||
PRIMARY KEY (fid)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_polls (
|
||||
pid mediumint(8) NOT NULL auto_increment,
|
||||
tid int(10) NOT NULL default '0',
|
||||
start_date int(10) default NULL,
|
||||
choices text,
|
||||
starter_id mediumint(8) NOT NULL default '0',
|
||||
votes smallint(5) NOT NULL default '0',
|
||||
forum_id smallint(5) NOT NULL default '0',
|
||||
poll_question varchar(255) default NULL,
|
||||
PRIMARY KEY (pid)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE ibf_posts (
|
||||
pid int(10) NOT NULL auto_increment,
|
||||
append_edit tinyint(1) default '0',
|
||||
edit_time int(10) default NULL,
|
||||
author_id mediumint(8) NOT NULL default '0',
|
||||
author_name varchar(32) default NULL,
|
||||
use_sig tinyint(1) NOT NULL default '0',
|
||||
use_emo tinyint(1) NOT NULL default '0',
|
||||
ip_address varchar(16) NOT NULL default '',
|
||||
post_date int(10) default NULL,
|
||||
icon_id smallint(3) default NULL,
|
||||
post text,
|
||||
queued tinyint(1) default NULL,
|
||||
topic_id int(10) NOT NULL default '0',
|
||||
forum_id smallint(5) NOT NULL default '0',
|
||||
attach_id varchar(64) default NULL,
|
||||
attach_hits int(10) default NULL,
|
||||
attach_type varchar(128) default NULL,
|
||||
attach_file varchar(255) default NULL,
|
||||
post_title varchar(255) default NULL,
|
||||
new_topic tinyint(1) default '0',
|
||||
edit_name varchar(255) default NULL,
|
||||
PRIMARY KEY (pid),
|
||||
KEY topic_id (topic_id,author_id),
|
||||
KEY author_id (author_id),
|
||||
KEY forum_id (forum_id,post_date),
|
||||
FULLTEXT KEY post (post)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE ibf_reg_antispam (
|
||||
regid varchar(32) NOT NULL default '',
|
||||
regcode varchar(8) NOT NULL default '',
|
||||
ip_address varchar(32) default NULL,
|
||||
ctime int(10) default NULL,
|
||||
PRIMARY KEY (regid)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_search_results (
|
||||
id varchar(32) NOT NULL default '',
|
||||
topic_id text NOT NULL,
|
||||
search_date int(12) NOT NULL default '0',
|
||||
topic_max int(3) NOT NULL default '0',
|
||||
sort_key varchar(32) NOT NULL default 'last_post',
|
||||
sort_order varchar(4) NOT NULL default 'desc',
|
||||
member_id mediumint(10) default '0',
|
||||
ip_address varchar(64) default NULL,
|
||||
post_id text,
|
||||
post_max int(10) NOT NULL default '0',
|
||||
query_cache text
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_sessions (
|
||||
id varchar(32) NOT NULL default '0',
|
||||
member_name varchar(64) default NULL,
|
||||
member_id mediumint(8) NOT NULL default '0',
|
||||
ip_address varchar(16) default NULL,
|
||||
browser varchar(64) default NULL,
|
||||
running_time int(10) default NULL,
|
||||
login_type tinyint(1) default NULL,
|
||||
location varchar(40) default NULL,
|
||||
member_group smallint(3) default NULL,
|
||||
in_forum smallint(5) NOT NULL default '0',
|
||||
in_topic int(10) default NULL,
|
||||
PRIMARY KEY (id),
|
||||
KEY in_topic (in_topic),
|
||||
KEY in_forum (in_forum)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_skin_templates (
|
||||
suid int(10) NOT NULL auto_increment,
|
||||
set_id int(10) NOT NULL default '0',
|
||||
group_name varchar(255) NOT NULL default '',
|
||||
section_content mediumtext,
|
||||
func_name varchar(255) default NULL,
|
||||
func_data text,
|
||||
updated int(10) default NULL,
|
||||
can_remove tinyint(4) default '0',
|
||||
PRIMARY KEY (suid)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_skins (
|
||||
uid int(10) NOT NULL auto_increment,
|
||||
sname varchar(100) NOT NULL default '',
|
||||
sid int(10) NOT NULL default '0',
|
||||
set_id int(5) NOT NULL default '0',
|
||||
tmpl_id int(10) NOT NULL default '0',
|
||||
macro_id int(10) NOT NULL default '1',
|
||||
css_id int(10) NOT NULL default '1',
|
||||
img_dir varchar(200) default '1',
|
||||
tbl_width varchar(250) default NULL,
|
||||
tbl_border varchar(250) default NULL,
|
||||
hidden tinyint(1) NOT NULL default '0',
|
||||
default_set tinyint(1) NOT NULL default '0',
|
||||
css_method varchar(100) default 'inline',
|
||||
PRIMARY KEY (uid),
|
||||
KEY tmpl_id (tmpl_id),
|
||||
KEY css_id (css_id)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_spider_logs (
|
||||
sid int(10) NOT NULL auto_increment,
|
||||
bot varchar(255) NOT NULL default '',
|
||||
query_string text NOT NULL,
|
||||
entry_date int(10) NOT NULL default '0',
|
||||
ip_address varchar(16) NOT NULL default '',
|
||||
PRIMARY KEY (sid)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_stats (
|
||||
TOTAL_REPLIES int(10) NOT NULL default '0',
|
||||
TOTAL_TOPICS int(10) NOT NULL default '0',
|
||||
LAST_MEM_NAME varchar(32) default NULL,
|
||||
LAST_MEM_ID mediumint(8) NOT NULL default '0',
|
||||
MOST_DATE int(10) default NULL,
|
||||
MOST_COUNT int(10) default '0',
|
||||
MEM_COUNT mediumint(8) NOT NULL default '0'
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_subscriptions (
|
||||
sub_id smallint(5) NOT NULL auto_increment,
|
||||
sub_title varchar(250) NOT NULL default '',
|
||||
sub_desc text,
|
||||
sub_new_group mediumint(8) NOT NULL default 0,
|
||||
sub_length smallint(5) NOT NULL default '1',
|
||||
sub_unit varchar(2) NOT NULL default 'm',
|
||||
sub_cost decimal(10,2) NOT NULL default '0.00',
|
||||
sub_run_module varchar(250) NOT NULL default '',
|
||||
PRIMARY KEY (sub_id)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
CREATE TABLE ibf_subscription_extra (
|
||||
subextra_id smallint(5) NOT NULL auto_increment,
|
||||
subextra_sub_id smallint(5) NOT NULL default '0',
|
||||
subextra_method_id smallint(5) NOT NULL default '0',
|
||||
subextra_product_id varchar(250) NOT NULL default '0',
|
||||
subextra_can_upgrade tinyint(1) NOT NULL default '0',
|
||||
subextra_recurring tinyint(1) NOT NULL default '0',
|
||||
subextra_custom_1 text,
|
||||
subextra_custom_2 text,
|
||||
subextra_custom_3 text,
|
||||
subextra_custom_4 text,
|
||||
subextra_custom_5 text,
|
||||
PRIMARY KEY(subextra_id)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
|
||||
CREATE TABLE ibf_subscription_trans (
|
||||
subtrans_id int(10) NOT NULL auto_increment,
|
||||
subtrans_sub_id smallint(5) NOT NULL default '0',
|
||||
subtrans_member_id mediumint(8) NOT NULL default '0',
|
||||
subtrans_old_group smallint(5) NOT NULL default '0',
|
||||
subtrans_paid decimal(10,2) NOT NULL default '0.00',
|
||||
subtrans_cumulative decimal(10,2) NOT NULL default '0.00',
|
||||
subtrans_method varchar(20) NOT NULL default '',
|
||||
subtrans_start_date int(11) NOT NULL default '0',
|
||||
subtrans_end_date int(11) NOT NULL default '0',
|
||||
subtrans_state varchar(200) NOT NULL default '',
|
||||
subtrans_trxid varchar(200) NOT NULL default '',
|
||||
subtrans_subscrid varchar(200) NOT NULL default '',
|
||||
subtrans_currency varchar(10) NOT NULL default 'USD',
|
||||
PRIMARY KEY (subtrans_id)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
CREATE TABLE ibf_subscription_logs (
|
||||
sublog_id int(10) NOT NULL auto_increment,
|
||||
sublog_date int(10) NOT NULL default '',
|
||||
sublog_member_id mediumint(8) NOT NULL default '0',
|
||||
sublog_transid int(10) NOT NULL default '',
|
||||
sublog_ipaddress varchar(16) NOT NULL default '',
|
||||
sublog_data text,
|
||||
sublog_postdata text,
|
||||
PRIMARY KEY (sublog_id)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
CREATE TABLE ibf_subscription_methods (
|
||||
submethod_id smallint(5) NOT NULL auto_increment,
|
||||
submethod_title varchar(250) NOT NULL default '',
|
||||
submethod_name varchar(20) NOT NULL default '',
|
||||
submethod_email varchar(250) NOT NULL default '',
|
||||
submethod_sid text,
|
||||
submethod_custom_1 text,
|
||||
submethod_custom_2 text,
|
||||
submethod_custom_3 text,
|
||||
subemthod_custom_4 text,
|
||||
submethod_custom_5 text,
|
||||
submethod_is_cc tinyint(1) NOT NULL default '0',
|
||||
submethod_is_auto tinyint(1) NOT NULL default '0',
|
||||
submethod_desc text,
|
||||
submethod_logo text,
|
||||
submethod_active tinyint(1) NOT NULL default '',
|
||||
submethod_use_currency varchar(10) NOT NULL default 'USD',
|
||||
PRIMARY KEY (submethod_id)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
CREATE TABLE ibf_subscription_currency (
|
||||
subcurrency_code varchar(10) NOT NULL,
|
||||
subcurrency_desc varchar(250) NOT NULL default '',
|
||||
subcurrency_exchange decimal(10, 8) NOT NULL,
|
||||
subcurrency_default tinyint(1) NOT NULL default '0',
|
||||
PRIMARY KEY(subcurrency_code)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
|
||||
|
||||
CREATE TABLE ibf_templates (
|
||||
tmid int(10) NOT NULL auto_increment,
|
||||
template mediumtext,
|
||||
name varchar(128) default NULL,
|
||||
PRIMARY KEY (tmid)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_titles (
|
||||
id smallint(5) NOT NULL auto_increment,
|
||||
posts int(10) default NULL,
|
||||
title varchar(128) default NULL,
|
||||
pips varchar(128) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_tmpl_names (
|
||||
skid int(10) NOT NULL auto_increment,
|
||||
skname varchar(60) NOT NULL default 'Invision Board',
|
||||
author varchar(250) default '',
|
||||
email varchar(250) default '',
|
||||
url varchar(250) default '',
|
||||
PRIMARY KEY (skid)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_topic_mmod (
|
||||
mm_id smallint(5) NOT NULL auto_increment,
|
||||
mm_title varchar(250) NOT NULL default '',
|
||||
mm_enabled tinyint(1) NOT NULL default '0',
|
||||
topic_state varchar(10) NOT NULL default 'leave',
|
||||
topic_pin varchar(10) NOT NULL default 'leave',
|
||||
topic_move smallint(5) NOT NULL default '0',
|
||||
topic_move_link tinyint(1) NOT NULL default '0',
|
||||
topic_title_st varchar(250) NOT NULL default '',
|
||||
topic_title_end varchar(250) NOT NULL default '',
|
||||
topic_reply tinyint(1) NOT NULL default '0',
|
||||
topic_reply_content text NOT NULL,
|
||||
topic_reply_postcount tinyint(1) NOT NULL default '0',
|
||||
PRIMARY KEY (mm_id)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_topics (
|
||||
tid int(10) NOT NULL auto_increment,
|
||||
title varchar(250) NOT NULL default '',
|
||||
description varchar(70) default NULL,
|
||||
state varchar(8) default NULL,
|
||||
posts int(10) default NULL,
|
||||
starter_id mediumint(8) NOT NULL default '0',
|
||||
start_date int(10) default NULL,
|
||||
last_poster_id mediumint(8) NOT NULL default '0',
|
||||
last_post int(10) default NULL,
|
||||
icon_id tinyint(2) default NULL,
|
||||
starter_name varchar(32) default NULL,
|
||||
last_poster_name varchar(32) default NULL,
|
||||
poll_state varchar(8) default NULL,
|
||||
last_vote int(10) default NULL,
|
||||
views int(10) default NULL,
|
||||
forum_id smallint(5) NOT NULL default '0',
|
||||
approved tinyint(1) default NULL,
|
||||
author_mode tinyint(1) default NULL,
|
||||
pinned tinyint(1) default NULL,
|
||||
moved_to varchar(64) default NULL,
|
||||
rating text,
|
||||
total_votes int(5) NOT NULL default '0',
|
||||
PRIMARY KEY (tid),
|
||||
KEY last_post (last_post),
|
||||
KEY forum_id (forum_id,approved,pinned),
|
||||
FULLTEXT KEY title (title)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_tracker (
|
||||
trid mediumint(8) NOT NULL auto_increment,
|
||||
member_id mediumint(8) NOT NULL default '0',
|
||||
topic_id bigint(20) NOT NULL default '0',
|
||||
start_date int(10) default NULL,
|
||||
last_sent int(10) NOT NULL default '0',
|
||||
PRIMARY KEY (trid)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_validating (
|
||||
vid varchar(32) NOT NULL default '',
|
||||
member_id mediumint(8) NOT NULL default '0',
|
||||
real_group smallint(3) NOT NULL default '0',
|
||||
temp_group smallint(3) NOT NULL default '0',
|
||||
entry_date int(10) NOT NULL default '0',
|
||||
coppa_user tinyint(1) NOT NULL default '0',
|
||||
lost_pass tinyint(1) NOT NULL default '0',
|
||||
new_reg tinyint(1) NOT NULL default '0',
|
||||
email_chg tinyint(1) NOT NULL default '0',
|
||||
ip_address varchar(16) NOT NULL default '0',
|
||||
PRIMARY KEY (vid),
|
||||
KEY new_reg (new_reg)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_voters (
|
||||
vid int(10) NOT NULL auto_increment,
|
||||
ip_address varchar(16) NOT NULL default '',
|
||||
vote_date int(10) NOT NULL default '0',
|
||||
tid int(10) NOT NULL default '0',
|
||||
member_id varchar(32) default NULL,
|
||||
forum_id smallint(5) NOT NULL default '0',
|
||||
PRIMARY KEY (vid)
|
||||
);
|
||||
|
||||
CREATE TABLE ibf_warn_logs (
|
||||
wlog_id int(10) NOT NULL auto_increment,
|
||||
wlog_mid mediumint(8) NOT NULL default '0',
|
||||
wlog_notes text NOT NULL,
|
||||
wlog_contact varchar(250) NOT NULL default 'none',
|
||||
wlog_contact_content text NOT NULL,
|
||||
wlog_date int(10) NOT NULL default '0',
|
||||
wlog_type varchar(6) NOT NULL default 'pos',
|
||||
wlog_addedby mediumint(8) NOT NULL default '0',
|
||||
PRIMARY KEY (wlog_id)
|
||||
);
|
||||
@@ -1,112 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title>Hivemail -> IPB Set Up</title>
|
||||
|
||||
<style type='text/css'>
|
||||
body
|
||||
{
|
||||
background-color:#FFF;
|
||||
background-image: url(http://www.invisionboard.com/tutorial/hivemail/img/bg.jpg);
|
||||
background-repeat: repeat-y;
|
||||
padding: 0px;
|
||||
margin: 10px;
|
||||
font-family: verdana;
|
||||
font-size:12px;
|
||||
text-align:center;
|
||||
}
|
||||
table
|
||||
{
|
||||
font-family: verdana;
|
||||
font-size:11px;
|
||||
}
|
||||
img { border:0px }
|
||||
.headline { font-family:"Trebuchet MS", verdana, arial, sans-serif; font-size:40px;font-weight:bold }
|
||||
.subline { font-family:"Trebuchet MS", verdana, arial, sans-serif; font-size:18px;color:#009 }
|
||||
#wrapper { text-align:left; margin-left:auto;margin-right:auto;width:90% }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<span class="headline">Integrating HiveMail with IPB 1.2</span>
|
||||
<br />
|
||||
An Invision Power Board Guide detailing how to set up your HiveMail installation with IPB.
|
||||
<br />
|
||||
<br />
|
||||
<span class="subline">Required Components</span>
|
||||
<br /><br />
|
||||
You should have already installed HiveMail (1.2+) into a directory called "mail" on your server, in the same root folder as the one
|
||||
that contains your IPB forums folder.
|
||||
<br /><br />
|
||||
<b>An example structure</b>
|
||||
<br />
|
||||
/home/domain/public_html/mail/
|
||||
<br />/home/domain/public_html/forums/
|
||||
|
||||
<br /><br />
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td align="left" width="95%" style="padding-right:6px" valign="top">
|
||||
<span class="subline">Configuring the files</span>
|
||||
<br /><br />
|
||||
Before you go any further, you may need to edit one of the included IPB files.
|
||||
<br /><br />If you are using HiveMail 1.2.1, they you <b>do not</b> need to edit any files.
|
||||
<br /><br />If you are using any version previous to 1.2.1, then you'll need to open "invision_plugin.php" and change the arrowed line in the picture to: <kbd>define( 'HIVE_TBL', '' )</kbd> or you will receive errors!
|
||||
</td>
|
||||
<td align="center" width="5%" valign="top"><a href="http://www.invisionboard.com/tutorial/hivemail/img/hive_code.jpg" target="_blank"><img src="http://www.invisionboard.com/tutorial/hivemail/img/hive_code_thumb.jpg" alt="IMG" /></a><br />Click picture to enlarge</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br /><br />
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td align="left" width="95%" style="padding-right:6px" valign="top">
|
||||
<span class="subline">Uploading the files</span>
|
||||
<br /><br />
|
||||
<b>Upload the following files</b>
|
||||
<br /><br />Where "forums" is shown, this is your IPB installation, it does not have to be forums.
|
||||
<br /><br />
|
||||
<kbd>/forums/modules/ipb_member_sync.php
|
||||
<br /><br />/forums/modules/mod_hivemail.php
|
||||
<br /><br />/forums/register.php
|
||||
<br /><br />/mail/includes/invision_plugin.php</kdb>
|
||||
</td>
|
||||
<td align="center" width="5%" valign="top"><a href="http://www.invisionboard.com/tutorial/hivemail/img/hive_dir.jpg" target="_blank"><img src="http://www.invisionboard.com/tutorial/hivemail/img/hive_dir_thumb.jpg" alt="IMG" /></a><br />Click picture to enlarge</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br /><br />
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td align="left" width="95%" style="padding-right:6px" valign="top">
|
||||
<span class="subline">Configuring HiveMail</span>
|
||||
<br /><br />
|
||||
<b>Log into the HiveMail admin center</b>
|
||||
<br />
|
||||
<ul>
|
||||
<li>Under "HiveMail" click on "Options" in the menu.
|
||||
<li>When the options menu has loaded, click option 13 "vBulletin Integration"
|
||||
<li>Complete the form in a similar way show by the screenshot, mentally substituting "vBulletin" for "IPB"
|
||||
</ul>
|
||||
<br />
|
||||
If you enabled "Allow regular registration", your members can register for HiveMail outside of the board, if not enabled, clicking on the "Sign Up" button on the HiveMail index page
|
||||
will take your visitor to the IPB registration page (with the option of HiveMail email). If you visitor is already registered and logged into IPB, they will be taken to a dedicated HiveMail signup page.
|
||||
<br /><br />
|
||||
<a href="http://www.invisionboard.com/tutorial/hivemail/img/hive_ipb_reg.jpg" target="_blank">Show IPB Reg Form Screen Shot</a> · <a href="http://www.invisionboard.com/tutorial/hivemail/img/hive_ipb_cp.jpg" target="_blank">Show IPB HiveMail Sign Up Page</a>
|
||||
</td>
|
||||
<td align="center" width="5%" valign="top"><a href="http://www.invisionboard.com/tutorial/hivemail/img/hive_options.jpg" target="_blank"><img src="http://www.invisionboard.com/tutorial/hivemail/img/hive_options_thumb.jpg" alt="IMG" /></a><br />Click picture to enlarge</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br /><br />
|
||||
<span class="subline">That's it! You're all done!</span>
|
||||
<br /><br />
|
||||
<br />
|
||||
~Matt for IPS, Inc. Aug 03
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,355 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board v1.2 Module File
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2003 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Email: matt@invisionpower.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Member Sync Module File
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 7th July 2003
|
||||
|
|
||||
+--------------------------------------------------------------------------
|
||||
|
|
||||
| USAGE:
|
||||
| ------
|
||||
|
|
||||
| This module is designed to hold any module modifications to with registration
|
||||
| It doesn't do much in itself, but custom code can be added to handle
|
||||
| synchronization, etc.
|
||||
|
|
||||
| - on_create_account: Is called upon successful account creation
|
||||
| - on_register_form: Is called when the form is displayed
|
||||
| - on_login: Is called when logged in succcessfully
|
||||
| - on_delete: Is called when member deleted (single, multiple)
|
||||
| - on_email_change: When email address change is confirmed
|
||||
| - on_profile_update: When profile is updated (msn, sig, etc)
|
||||
| - on_pass_change: When password is updated
|
||||
| - on_group_change: When the member's membergroup has changed
|
||||
| - on_name_change: When the member's name has been changed
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class ipb_member_sync
|
||||
{
|
||||
var $class = "";
|
||||
var $hiveid = 0;
|
||||
var $html = "";
|
||||
var $hive = "";
|
||||
|
||||
function ipb_member_sync()
|
||||
{
|
||||
global $DB, $ibforums;
|
||||
|
||||
if ( $ibforums->member['id'] )
|
||||
{
|
||||
$DB->query("SELECT id, hiveuserid FROM ibf_member_extra WHERE id={$ibforums->member['id']}");
|
||||
|
||||
$r = $DB->fetch_row();
|
||||
|
||||
$this->hiveid = intval($r['hiveuserid']);
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
// register_class($class)
|
||||
//
|
||||
// Register a $this-> with this class
|
||||
//
|
||||
//-----------------------------------------------
|
||||
|
||||
function register_class($class)
|
||||
{
|
||||
$this->class = &$class;
|
||||
$this->error = "";
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
// on_create_account($member)
|
||||
//
|
||||
// $member = array( 'id', 'name', 'email',
|
||||
// 'password', 'mgroup'...etc)
|
||||
//
|
||||
//-----------------------------------------------
|
||||
|
||||
function on_create_account($member)
|
||||
{
|
||||
global $DB, $std, $ibforums;
|
||||
|
||||
//---- START
|
||||
|
||||
//-------------------------------------------
|
||||
// Add hivemail account?
|
||||
//-------------------------------------------
|
||||
|
||||
$ibforums->input['hive_username'] = trim($ibforums->input['hive_username']);
|
||||
|
||||
if ( $ibforums->input['hive_username'] != "" )
|
||||
{
|
||||
|
||||
define('IPB_PLUGIN', true);
|
||||
require_once('../mail/includes/invision_plugin.php');
|
||||
|
||||
$this->hive = new invision_plugin();
|
||||
|
||||
$this->hive->hivemail_register_user($member, true);
|
||||
|
||||
if ( $this->hive->hive_error != "" )
|
||||
{
|
||||
$ibforums->lang['thing_name_taken'] = sprintf( $ibforums->lang['thing_name_taken'] , 'Board Email Address' );
|
||||
$ibforums->lang['incorrect_thing_name'] = sprintf( $ibforums->lang['incorrect_thing_name'], 'Board Email Address' );
|
||||
|
||||
$this->class->show_reg_form($this->hive->hive_error);
|
||||
$this->error = 1;
|
||||
$this->hive->destructor();
|
||||
return;
|
||||
}
|
||||
|
||||
$this->hive->destructor();
|
||||
}
|
||||
|
||||
//---- END
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
// on_register_form()
|
||||
//
|
||||
//
|
||||
//-----------------------------------------------
|
||||
|
||||
function on_register_form()
|
||||
{
|
||||
global $DB, $std, $ibforums;
|
||||
|
||||
//---- START
|
||||
|
||||
//-------------------------------------------
|
||||
// HiveMail integration
|
||||
// As register_form is defualt action, we can
|
||||
// either show the hivemail entry in the reg
|
||||
// form if they are not a member, or we can
|
||||
// show the hive mail only sign up form
|
||||
//-------------------------------------------
|
||||
|
||||
if ( $this->hive == "" )
|
||||
{
|
||||
define('IPB_PLUGIN', true);
|
||||
require_once('../mail/includes/invision_plugin.php');
|
||||
|
||||
$this->hive = new invision_plugin();
|
||||
}
|
||||
|
||||
if ( $ibforums->member['id'] )
|
||||
{
|
||||
//-------------------------------------------
|
||||
// They are a member, are they a hivemail member?
|
||||
//-------------------------------------------
|
||||
|
||||
if ( $this->hiveid AND $hiveuser = $this->hive->DB_Hive->query_first("SELECT userid FROM ".HIVE_TBL."user WHERE userid = {$this->hiveid}"))
|
||||
{
|
||||
//-------------------------------------------
|
||||
// yeah, chuck 'em to ucp then
|
||||
//-------------------------------------------
|
||||
|
||||
if ( $ibforums->input['mailsignup'] )
|
||||
{
|
||||
$this->hive->destructor();
|
||||
$std->boink_it( $ibforums->base_url.'act=UserCP' );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//-------------------------------------------
|
||||
// Forward them to the IPB module to show
|
||||
// mail only sign-up
|
||||
//-------------------------------------------
|
||||
|
||||
if ( $ibforums->input['mailsignup'] )
|
||||
{
|
||||
$this->hive->destructor();
|
||||
$std->boink_it( $ibforums->base_url.'act=module&module=hivemail&show=forumform' );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//-------------------------------------------
|
||||
// Normal reg form! chop in hivemail option
|
||||
//-------------------------------------------
|
||||
|
||||
$extra = $this->class->html->field_entry(
|
||||
'Enter a username for your own board email account',
|
||||
'This is optional, please leave blank if you do not wish to get an email account.<br />Only letters and numbers please.',
|
||||
$this->class->html->field_textinput('hive_username', $ibforums->input['hive_username'])." <select name='hive_userdomain' class='forminput'>".$this->hive->hive_domainname_options."</select>"
|
||||
);
|
||||
|
||||
$this->class->output = str_replace( "<!--IBF.MODULES.EXTRA-->", $extra, $this->class->output );
|
||||
|
||||
}
|
||||
|
||||
$this->hive->destructor();
|
||||
|
||||
//---- END
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
// on_login()
|
||||
//
|
||||
// $member = array( 'id', 'name', 'email', 'pass')
|
||||
// ...etc
|
||||
//-----------------------------------------------
|
||||
|
||||
function on_login($member=array())
|
||||
{
|
||||
global $DB, $std, $ibforums;
|
||||
|
||||
//---- START
|
||||
|
||||
|
||||
|
||||
//---- END
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
// on_delete($ids)
|
||||
//
|
||||
// $ids = array | integer
|
||||
// If array, will contain list of ids
|
||||
//-----------------------------------------------
|
||||
|
||||
function on_delete($ids=array())
|
||||
{
|
||||
global $DB, $std, $ibforums;
|
||||
|
||||
$type = "";
|
||||
|
||||
//---- START
|
||||
|
||||
if ( is_array($ids) and count($ids) > 0 )
|
||||
{
|
||||
$type = arr;
|
||||
}
|
||||
else
|
||||
{
|
||||
$type = int;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//---- END
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
// on_email_change($id, $new_email)
|
||||
//
|
||||
// $id = int member_id
|
||||
// $new_email = string new email address
|
||||
//-----------------------------------------------
|
||||
|
||||
function on_email_change($id, $new_email)
|
||||
{
|
||||
global $DB, $std, $ibforums;
|
||||
|
||||
//---- START
|
||||
|
||||
|
||||
//---- END
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
// on_pass_change($id, $new_raw)
|
||||
//
|
||||
// $id = int member_id
|
||||
// $new_raw = string new plain text password
|
||||
//-----------------------------------------------
|
||||
|
||||
function on_pass_change($id, $new_raw)
|
||||
{
|
||||
global $DB, $std, $ibforums;
|
||||
|
||||
//---- START
|
||||
|
||||
//-------------------------------------------
|
||||
// HiveMail integration
|
||||
// Update hivemail passy
|
||||
//-------------------------------------------
|
||||
|
||||
if ( $this->hive == "" )
|
||||
{
|
||||
define('IPB_PLUGIN', true);
|
||||
require_once('../mail/includes/invision_plugin.php');
|
||||
|
||||
$this->hive = new invision_plugin();
|
||||
}
|
||||
|
||||
$this->hive->hivemail_update_password(md5($new_raw), $id);
|
||||
|
||||
$this->hive->destructor();
|
||||
|
||||
//---- END
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
// on_profile_update($member)
|
||||
//
|
||||
// 'website','icq_number','aim_name','yahoo','msnname','integ_msg'
|
||||
// 'location','interests', 'title'
|
||||
// 'id'
|
||||
//-----------------------------------------------
|
||||
|
||||
function on_profile_update( $member=array(), $custom_fields=array() )
|
||||
{
|
||||
global $DB, $std, $ibforums;
|
||||
|
||||
//---- START
|
||||
|
||||
|
||||
//---- END
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
// on_group_change()
|
||||
//
|
||||
// $id = int member_id
|
||||
// $new_group = new int() group id
|
||||
//-----------------------------------------------
|
||||
|
||||
function on_group_change( $id, $new_group )
|
||||
{
|
||||
global $DB, $std, $ibforums;
|
||||
|
||||
//---- START
|
||||
|
||||
|
||||
//---- END
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
// on_name_change()
|
||||
//
|
||||
// $id = int member_id
|
||||
// $new_group = new name
|
||||
//-----------------------------------------------
|
||||
|
||||
function on_name_change( $id, $new_name )
|
||||
{
|
||||
global $DB, $std, $ibforums;
|
||||
|
||||
//---- START
|
||||
|
||||
|
||||
//---- END
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,176 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board v1.2 Module File
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2003 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Email: matt@invisionpower.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
| > Hive Mail Module
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 8th July 2003
|
||||
|
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
//=====================================
|
||||
// Define class, this must be the same
|
||||
// in all modules
|
||||
//=====================================
|
||||
|
||||
class module extends module_loader
|
||||
{
|
||||
|
||||
var $class = "";
|
||||
var $module = "";
|
||||
var $html = "";
|
||||
|
||||
var $result = "";
|
||||
var $hive = "";
|
||||
var $hiveid = "";
|
||||
|
||||
function module()
|
||||
{
|
||||
global $ibforums, $DB, $std, $print;
|
||||
|
||||
//-------------------------------------------
|
||||
// Load skin / lang stuff
|
||||
//-------------------------------------------
|
||||
|
||||
$ibforums->lang = $std->load_words($ibforums->lang, 'lang_register', $ibforums->lang_id);
|
||||
$this->html = $std->load_template('skin_register');
|
||||
|
||||
//-------------------------------------------
|
||||
// Are we a hivemail member?
|
||||
//-------------------------------------------
|
||||
|
||||
$DB->query("SELECT id, hiveuserid FROM ibf_member_extra WHERE id={$ibforums->member['id']}");
|
||||
|
||||
$r = $DB->fetch_row();
|
||||
|
||||
$this->hiveid = intval($r['hiveuserid']);
|
||||
|
||||
//-------------------------------------------
|
||||
// Load Hivemail plug in
|
||||
//-------------------------------------------
|
||||
|
||||
define('IPB_PLUGIN', true);
|
||||
require_once('../mail/includes/invision_plugin.php');
|
||||
|
||||
$this->hive = new invision_plugin();
|
||||
|
||||
//-------------------------------------------
|
||||
// If we're not a member...
|
||||
//-------------------------------------------
|
||||
|
||||
if ( ! $ibforums->member['id'] )
|
||||
{
|
||||
$std->boink_it( $ibforums->base_url );
|
||||
}
|
||||
|
||||
//-------------------------------------------
|
||||
// Do we already have a hivemail membership?
|
||||
//-------------------------------------------
|
||||
|
||||
if ( $this->hiveid AND $hiveuser = $this->hive->DB_Hive->query_first("SELECT userid FROM ".HIVE_TBL."user WHERE userid = {$this->hiveid}"))
|
||||
{
|
||||
$this->hive->destructor();
|
||||
$std->boink_it( $ibforums->base_url );
|
||||
}
|
||||
|
||||
//-------------------------------------------
|
||||
// Whatcha doin'? Yes - you?
|
||||
//-------------------------------------------
|
||||
|
||||
switch( $ibforums->input['show'] )
|
||||
{
|
||||
case 'forumform':
|
||||
$this->show_forumform();
|
||||
break;
|
||||
case 'addmail':
|
||||
$this->add_mail();
|
||||
|
||||
default:
|
||||
$this->show_forumform();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function add_mail()
|
||||
{
|
||||
global $ibforums, $DB, $std, $print;
|
||||
|
||||
$hive_username = trim($ibforums->input['hive_username']);
|
||||
|
||||
//------------------------------------------
|
||||
// Check for errors
|
||||
//------------------------------------------
|
||||
|
||||
if ( $hive_username == "" )
|
||||
{
|
||||
$this->show_forumform('js_blanks');
|
||||
}
|
||||
|
||||
$this->hive->hivemail_register_user($ibforums->member, false);
|
||||
|
||||
if ( $this->hive->hive_error != "" )
|
||||
{
|
||||
$ibforums->lang['thing_name_taken'] = sprintf( $ibforums->lang['thing_name_taken'] , 'Board Email Address' );
|
||||
$ibforums->lang['incorrect_thing_name'] = sprintf( $ibforums->lang['incorrect_thing_name'], 'Board Email Address' );
|
||||
|
||||
$this->show_forumform($this->hive->hive_error);
|
||||
$this->error = 1;
|
||||
$this->hive->destructor();
|
||||
return;
|
||||
}
|
||||
|
||||
$this->hive->destructor();
|
||||
|
||||
$print->redirect_screen("your email account has been created, forwarding you to the email log-in page", "/mail/index.php", 1);
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// Show Forum Form
|
||||
//
|
||||
// Show the already reg'd member's mail form
|
||||
//
|
||||
//------------------------------------------
|
||||
|
||||
function show_forumform($errors="")
|
||||
{
|
||||
global $ibforums, $DB, $std, $print;
|
||||
|
||||
$this->page_title = "Sign up for your email account";
|
||||
|
||||
$hidden = "";
|
||||
$action = $ibforums->base_url.'act=module&module=hivemail&show=addmail';
|
||||
|
||||
$content = $this->html->field_entry('Account Name:',
|
||||
'The password for your email account will be the same as your forum account.<br />Letters and numbers only please.',
|
||||
$this->html->field_textinput('hive_username', $ibforums->input['hive_username'])." <select name='hive_userdomain' class='forminput'>".$this->hive->hive_domainname_options."</select>"
|
||||
);
|
||||
|
||||
if ($errors != "")
|
||||
{
|
||||
$this->output .= $this->html->errors( $ibforums->lang[$errors] );
|
||||
}
|
||||
|
||||
$this->output .= $this->html->tmpl_form($action, $hidden, $this->page_title, $content );
|
||||
|
||||
$print->add_output("$this->output");
|
||||
$print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,284 +0,0 @@
|
||||
<?php
|
||||
//
|
||||
// +-------------------------------------------------------------+
|
||||
// | HiveMail version 1.2 (English)
|
||||
// | Copyright ©2002-2003 Chen Avinadav <chen@hivemail.com>
|
||||
// +-------------------------------------------------------------+
|
||||
// | HIVEMAIL IS NOT FREE SOFTWARE
|
||||
// | If you have downloaded this software from a website other
|
||||
// | than www.hivemail.com or if you have otherwise received
|
||||
// | this software from someone who is not a representative of
|
||||
// | this organization you are involved in an illegal activity.
|
||||
// | License agreement: http://www.hivemail.com/license.html
|
||||
// +-------------------------------------------------------------+
|
||||
// |
|
||||
// | INVISION POWER BOARD v1.2 (RC2+) INTEGRATION
|
||||
// |
|
||||
// +-------------------------------------------------------------+
|
||||
|
||||
error_reporting(E_ALL & ~E_NOTICE);
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Stop people from calling this file directly
|
||||
//-------------------------------------------------------
|
||||
|
||||
if ( ! defined('IPB_PLUGIN') )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
class invision_plugin
|
||||
{
|
||||
var $hive_error = "";
|
||||
var $hive_options = array();
|
||||
var $this_folder = "";
|
||||
var $DB_Hive = "";
|
||||
|
||||
|
||||
function invision_plugin()
|
||||
{
|
||||
|
||||
//=========================================
|
||||
// EDIT THIS IF NEEDED
|
||||
//=========================================
|
||||
|
||||
define( 'HIVE_TBL', 'hive_' );
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Change to right directory
|
||||
//-------------------------------------------------------
|
||||
|
||||
$this->this_folder = getcwd();
|
||||
|
||||
chdir(dirname(__FILE__));
|
||||
|
||||
//-------------------------------------------------------
|
||||
// We are outside the admin CP
|
||||
//-------------------------------------------------------
|
||||
|
||||
define('INADMIN', false);
|
||||
|
||||
define('VB_PLUGIN', 1 );
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Start database connection
|
||||
//-------------------------------------------------------
|
||||
|
||||
require('../includes/config.php');
|
||||
require('../includes/db_mysql.php');
|
||||
|
||||
if ( ! function_exists('version_compare') or version_compare(phpversion(), '4.2.0') < 0 )
|
||||
{
|
||||
$config['server'] .= ':3306';
|
||||
}
|
||||
|
||||
$this->DB_Hive = new DB_MySQL($config, true, true);
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Get all common functions
|
||||
//-------------------------------------------------------
|
||||
|
||||
require('../includes/init.php');
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Get options
|
||||
//-------------------------------------------------------
|
||||
|
||||
while ( $setting = $this->DB_Hive->fetch_array($settings, 'SELECT * FROM '.HIVE_TBL.'setting') )
|
||||
{
|
||||
$this->hive_options["$setting[variable]"] = $setting['value'];
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// The domain names array
|
||||
//-------------------------------------------------------
|
||||
|
||||
$this->hive_options['domainnames'] = preg_split("#\r?\n#", $this->hive_options['domainname']);
|
||||
$this->hive_options['domainname'] = $this->hive_options['domainnames'][0];
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Create the option list of domain names
|
||||
//-------------------------------------------------------
|
||||
|
||||
$this->hive_domainname_options = '';
|
||||
|
||||
if ( is_array($this->hive_options['domainnames']) and count($this->hive_options['domainnames']) > 0 )
|
||||
{
|
||||
foreach ( $this->hive_options['domainnames'] as $curdomainname )
|
||||
{
|
||||
$this->hive_domainname_options .= "<option value=\"$curdomainname\"".iif($userdomain == $curdomainname, ' selected="selected"', '').">$curdomainname</option>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Creates a user
|
||||
//-------------------------------------------------------
|
||||
|
||||
function hivemail_register_user($member, $onreg = true)
|
||||
{
|
||||
global $ibforums, $DB, $std;
|
||||
|
||||
if ( ! $this->hive_options['regopen'] )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$hive_username = trim($ibforums->input['hive_username']);
|
||||
$hive_userdomain = trim($ibforums->input['hive_userdomain']);
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Domain name
|
||||
//-------------------------------------------------------
|
||||
|
||||
if ( ! in_array( $hive_userdomain, $this->hive_options['domainnames'] ) )
|
||||
{
|
||||
$hive_userdomain = $hive_options['domainname'];
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Some error checking
|
||||
//-------------------------------------------------------
|
||||
|
||||
if ($this->DB_Hive->query_first("SELECT username FROM ".HIVE_TBL."user WHERE username = '$hive_username'"))
|
||||
{
|
||||
if ($onreg)
|
||||
{
|
||||
$this->delete_reg_user($member['id']);
|
||||
}
|
||||
|
||||
$this->hive_error = 'thing_name_taken';
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
elseif ( preg_match('#[^a-z0-9_.]#i', $hive_username) or preg_match('#^[^a-z]#i', $hive_username) or strlen($hive_username) < 2 )
|
||||
{
|
||||
if ($onreg)
|
||||
{
|
||||
$this->delete_reg_user($member['id']);
|
||||
}
|
||||
|
||||
$this->hive_error = 'incorrect_thing_name';
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Create user
|
||||
//-------------------------------------------------------
|
||||
|
||||
$this->DB_Hive->query("
|
||||
INSERT INTO ".HIVE_TBL."user
|
||||
(userid, username, password, usergroupid, skinid, realname, regdate, lastvisit, cols, birthday, options, replyto, font, timezone, soundid, domain, vbuserid, altemail)
|
||||
VALUES
|
||||
(NULL, '".addslashes($hive_username)."', '".addslashes($member['password'])."', ".iif($this->hive_options['moderate'], 3, 2).", ".$this->hive_options['defaultskin'].", '".addslashes($member['name'])."', ".TIMENOW.", ".TIMENOW.", '".addslashes(USER_DEFAULTCOLS)."', '".addslashes('0')."', ".USER_DEFAULTBITS.", '".addslashes($hive_username.$hive_userdomain)."', 'Verdana|10|Regular|Black|None', '".addslashes('0')."', ".intval($this->DB_Hive->get_field('SELECT soundid FROM '.HIVE_TBL.'sound WHERE userid <= 0 ORDER BY userid LIMIT 1')).", '".addslashes($ibforums->input['hive_userdomain'])."', {$member['id']}, '".addslashes($member['email'])."')
|
||||
");
|
||||
|
||||
$hive_userid = $this->DB_Hive->insert_id();
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Log user in
|
||||
//-------------------------------------------------------
|
||||
|
||||
if ($onreg)
|
||||
{
|
||||
$userid = $member['id'];
|
||||
ini_set('session.name', 'hivesession');
|
||||
session_start();
|
||||
$std->my_setcookie(session_name(), session_id(), TIMENOW + (60 * 60 * 24 * 365));
|
||||
$_SESSION['userid'] = $hive_userid;
|
||||
$_SESSION['password'] = md5(md5($member['password']));
|
||||
$_SESSION['ipaddress'] = md5(IPADDRESS);
|
||||
$_SESSION['staylogged'] = 365;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Update Invision's database
|
||||
//-------------------------------------------------------
|
||||
|
||||
if ( ! $DB->field_exists( 'hiveuserid', 'ibf_member_extra' ) )
|
||||
{
|
||||
$DB->query("ALTER TABLE ibf_member_extra ADD hiveuserid mediumint(8) NOT NULL DEFAULT ''");
|
||||
}
|
||||
|
||||
$DB->query("SELECT id, hiveuserid FROM ibf_member_extra WHERE id={$member['id']}");
|
||||
|
||||
if ( $r = $DB->fetch_row() )
|
||||
{
|
||||
// User _extra exists, update...
|
||||
|
||||
$DB->query("UPDATE ibf_member_extra SET hiveuserid=$hive_userid WHERE id={$member['id']}");
|
||||
}
|
||||
else
|
||||
{
|
||||
// User _extra doesn't exist...
|
||||
|
||||
$DB->query("INSERT INTO ibf_member_extra SET hiveuserid=$hive_userid, id={$member['id']}");
|
||||
}
|
||||
|
||||
return $hive_userid;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Delete new reg. user if error during registration
|
||||
//-------------------------------------------------------
|
||||
|
||||
function delete_reg_user($userid)
|
||||
{
|
||||
global $DB;
|
||||
|
||||
$DB->query("DELETE FROM ibf_members WHERE id=$userid");
|
||||
$DB->query("DELETE FROM ibf_member_extra WHERE id=$userid");
|
||||
$DB->query("DELETE FROM ibf_pfields_content WHERE member_id=$userid");
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Updates the user's hivemail password
|
||||
//-------------------------------------------------------
|
||||
|
||||
function hivemail_update_password($password, $userid)
|
||||
{
|
||||
$this->DB_Hive->query("
|
||||
UPDATE ".HIVE_TBL."user
|
||||
SET password = '".addslashes($password)."'
|
||||
WHERE vbuserid = $userid
|
||||
");
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
// Desctructor
|
||||
//-------------------------------------------------------
|
||||
|
||||
function destructor()
|
||||
{
|
||||
chdir($this->this_folder);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function stripslashesarray($array) {
|
||||
if (is_array($array)) {
|
||||
foreach($array as $key => $val) {
|
||||
if (is_array($val)) {
|
||||
$array["$key"] = stripslashesarray($val);
|
||||
} elseif (is_string($val)) {
|
||||
if (get_cfg_var('magic_quotes_sybase')) {
|
||||
$array["$key"] = str_replace("''", "'", $val);
|
||||
} else {
|
||||
$array["$key"] = stripslashes($val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
function iif($eval, $true, $false = '') {
|
||||
return (($eval == true) ? ($true) : ($false));
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,236 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board IPB Click Site
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2003 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Email: matt@invisionpower.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > IPB Portal Script
|
||||
| > Written By Matthew Mecham
|
||||
| > Date started: 1st July 2003
|
||||
|
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
//-----------------------------------------------
|
||||
// USER CONFIGURABLE ELEMENTS
|
||||
//-----------------------------------------------
|
||||
|
||||
// Define the path to where the forums directory is
|
||||
// located. This might be "./forums/" for example.
|
||||
// Don't forget the trailing slash!
|
||||
|
||||
define( 'ROOT_PATH', "./forums/" );
|
||||
|
||||
// Define the URL to this script. If you're happy to
|
||||
// use relative URLs - you can leave this blank.
|
||||
// You can also rename the script here.
|
||||
|
||||
$this_script = 'index.php';
|
||||
|
||||
//-----------------------------------------------
|
||||
// NO USER EDITABLE SECTIONS BELOW
|
||||
//-----------------------------------------------
|
||||
|
||||
error_reporting (E_ERROR | E_WARNING | E_PARSE);
|
||||
set_magic_quotes_runtime(0);
|
||||
|
||||
class Debug {
|
||||
function startTimer() {
|
||||
global $starttime;
|
||||
$mtime = microtime ();
|
||||
$mtime = explode (' ', $mtime);
|
||||
$mtime = $mtime[1] + $mtime[0];
|
||||
$starttime = $mtime;
|
||||
}
|
||||
function endTimer() {
|
||||
global $starttime;
|
||||
$mtime = microtime ();
|
||||
$mtime = explode (' ', $mtime);
|
||||
$mtime = $mtime[1] + $mtime[0];
|
||||
$endtime = $mtime;
|
||||
$totaltime = round (($endtime - $starttime), 5);
|
||||
return $totaltime;
|
||||
}
|
||||
}
|
||||
|
||||
class info {
|
||||
|
||||
var $member = array();
|
||||
var $input = array();
|
||||
var $session_id = "";
|
||||
var $base_url = "";
|
||||
var $vars = "";
|
||||
var $skin_id = "0"; // Skin Dir name
|
||||
var $skin_rid = ""; // Real skin id (numerical only)
|
||||
var $lang_id = "en";
|
||||
var $skin = "";
|
||||
var $lang = "";
|
||||
var $server_load = 0;
|
||||
var $version = "v1.0";
|
||||
var $lastclick = "";
|
||||
var $location = "";
|
||||
var $debug_html = "";
|
||||
var $perm_id = "";
|
||||
var $forum_read = array();
|
||||
var $topic_cache = "";
|
||||
var $session_type = "";
|
||||
|
||||
function info() {
|
||||
global $sess, $std, $DB, $INFO, $this_script;
|
||||
|
||||
$this->vars = &$INFO;
|
||||
|
||||
$this->vars['TEAM_ICON_URL'] = $INFO['html_url'] . '/team_icons';
|
||||
$this->vars['AVATARS_URL'] = $INFO['html_url'] . '/avatars';
|
||||
$this->vars['EMOTICONS_URL'] = $INFO['html_url'] . '/emoticons';
|
||||
$this->vars['mime_img'] = $INFO['html_url'] . '/mime_types';
|
||||
$this->vars['dynamiclite'] = $this_script.'?';
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------
|
||||
// Import $INFO, now!
|
||||
//--------------------------------
|
||||
|
||||
require ROOT_PATH."conf_global.php";
|
||||
|
||||
//--------------------------------
|
||||
// The clocks a' tickin'
|
||||
//--------------------------------
|
||||
|
||||
$Debug = new Debug;
|
||||
$Debug->startTimer();
|
||||
|
||||
//--------------------------------
|
||||
// Require our global functions
|
||||
//--------------------------------
|
||||
|
||||
require ROOT_PATH."sources/functions.php";
|
||||
|
||||
$std = new FUNC;
|
||||
$print = new display();
|
||||
$sess = new session();
|
||||
|
||||
//--------------------------------
|
||||
// Load the DB driver and such
|
||||
//--------------------------------
|
||||
|
||||
$INFO['sql_driver'] = !$INFO['sql_driver'] ? 'mySQL' : $INFO['sql_driver'];
|
||||
|
||||
$to_require = ROOT_PATH."sources/Drivers/".$INFO['sql_driver'].".php";
|
||||
require ($to_require);
|
||||
|
||||
$DB = new db_driver;
|
||||
|
||||
$DB->obj['sql_database'] = $INFO['sql_database'];
|
||||
$DB->obj['sql_user'] = $INFO['sql_user'];
|
||||
$DB->obj['sql_pass'] = $INFO['sql_pass'];
|
||||
$DB->obj['sql_host'] = $INFO['sql_host'];
|
||||
$DB->obj['sql_tbl_prefix'] = $INFO['sql_tbl_prefix'];
|
||||
|
||||
$DB->obj['debug'] = ($INFO['sql_debug'] == 1) ? $_GET['debug'] : 0;
|
||||
|
||||
// Get a DB connection
|
||||
|
||||
$DB->connect();
|
||||
|
||||
//--------------------------------
|
||||
// Wrap it all up in a nice easy to
|
||||
// transport super class
|
||||
//--------------------------------
|
||||
|
||||
$ibforums = new info();
|
||||
|
||||
//--------------------------------
|
||||
// Set up our vars
|
||||
//--------------------------------
|
||||
|
||||
$ibforums->input = $std->parse_incoming();
|
||||
|
||||
//--------------------------------
|
||||
// The rest :D
|
||||
//--------------------------------
|
||||
|
||||
$ibforums->member = $sess->authorise();
|
||||
$ibforums->skin = $std->load_skin();
|
||||
$ibforums->lastclick = $sess->last_click;
|
||||
$ibforums->location = $sess->location;
|
||||
$ibforums->session_id = $sess->session_id;
|
||||
|
||||
//--------------------------------
|
||||
// Set up the session ID stuff
|
||||
//--------------------------------
|
||||
|
||||
if ( $ibforums->session_type == 'cookie' )
|
||||
{
|
||||
$ibforums->session_id = "";
|
||||
$ibforums->base_url = $ibforums->vars['board_url'].'/index.'.$ibforums->vars['php_ext'].'?';
|
||||
}
|
||||
else
|
||||
{
|
||||
$ibforums->base_url = $ibforums->vars['board_url'].'/index.'.$ibforums->vars['php_ext'].'?s='.$ibforums->session_id.'&';
|
||||
}
|
||||
|
||||
$ibforums->js_base_url = $ibforums->vars['board_url'].'/index.'.$ibforums->vars['php_ext'].'?s='.$ibforums->session_id.'&';
|
||||
|
||||
//--------------------------------
|
||||
// Set up the forum_read cookie
|
||||
//--------------------------------
|
||||
|
||||
$std->hdl_forum_read_cookie();
|
||||
|
||||
//--------------------------------
|
||||
// Set up the skin stuff
|
||||
//--------------------------------
|
||||
|
||||
$ibforums->skin_rid = $ibforums->skin['set_id'];
|
||||
$ibforums->skin_id = 's'.$ibforums->skin['set_id'];
|
||||
|
||||
$ibforums->vars['img_url'] = $ibforums->vars['board_url'].'/style_images/' . $ibforums->skin['img_dir'];
|
||||
|
||||
//--------------------------------
|
||||
// Set up our language choice
|
||||
//--------------------------------
|
||||
|
||||
if ($ibforums->vars['default_language'] == "")
|
||||
{
|
||||
$ibforums->vars['default_language'] = 'en';
|
||||
}
|
||||
|
||||
$ibforums->lang_id = $ibforums->member['language'] ? $ibforums->member['language'] : $ibforums->vars['default_language'];
|
||||
|
||||
if ( ($ibforums->lang_id != $ibforums->vars['default_language']) and (! is_dir( ROOT_PATH."lang/".$ibforums->lang_id ) ) )
|
||||
{
|
||||
$ibforums->lang_id = $ibforums->vars['default_language'];
|
||||
}
|
||||
|
||||
$ibforums->lang = $std->load_words($ibforums->lang, 'lang_global', $ibforums->lang_id);
|
||||
|
||||
//--------------------------------
|
||||
// Require and run
|
||||
//--------------------------------
|
||||
|
||||
require ROOT_PATH."sources/dynamiclite/csite.php";
|
||||
|
||||
$run = new click_site();
|
||||
|
||||
|
||||
//+-------------------------------------------------
|
||||
// GLOBAL ROUTINES
|
||||
//+-------------------------------------------------
|
||||
|
||||
function fatal_error($message="", $help="") {
|
||||
echo("$message<br><br>$help");
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,47 +0,0 @@
|
||||
Invision Power Dynamic Lite
|
||||
---------------------------
|
||||
|
||||
Installation Snyopsis
|
||||
.....................
|
||||
|
||||
Open up index.php, edit the variables at the top save and upload to your root public_html / www folder.
|
||||
|
||||
|
||||
INSTALLATION
|
||||
------------
|
||||
|
||||
This guide assumes that you have installed IPB in /forums/ and wish for the portal to be the first page your visitors see.
|
||||
|
||||
Open up index.php and edit the path to where the forums directory is:
|
||||
|
||||
define( 'ROOT_PATH', "./forums" );
|
||||
|
||||
This is set to "forums" by default. If you had your IPB installed at http://www.domain.com/chat/ you'd need to make sure you have:
|
||||
|
||||
define( 'ROOT_PATH', "./chat" );
|
||||
|
||||
Save the file and upload it to your root web directory folder, often called "public_html" or "www".
|
||||
|
||||
UPLOADING IPB COMPONENTS
|
||||
------------------------
|
||||
|
||||
If you've already got a version previous to RC2 set up, you should make sure you upload the following files found in the "upload" folder
|
||||
of this zip file.
|
||||
|
||||
/skin/s1/skin_csite.php
|
||||
/lang/en/lang_csite.php
|
||||
/sources/ipdynamiclite/*.*
|
||||
|
||||
SETTING UP
|
||||
----------
|
||||
|
||||
Before you can use Dynamic lite, you'll need to make sure you've switched it on from the ACP. If you don't do this, you may
|
||||
receive PHP errors from index.php.
|
||||
|
||||
Simply log into your forums ACP and expand the "System Settings" sub-menu and click on "IPDynamic Lite Set-up".
|
||||
|
||||
That's it, you're all done!
|
||||
|
||||
|
||||
|
||||
|
||||