Version 3.3.4

This commit is contained in:
Neo committed 2025-12-19 00:35:52 -08:00
1 parent 78706903a2
commit fb6b5baabc
2206 files changed
+409828 -382984

No files matched your search

@@ -253,17 +253,17 @@ function IPB3TemplateDiffResults()
{
if ( json['data_type'] == 'css' )
{
content = '<div class="acp-box"><h3>' + _text + ': ' + json['data_title'] + '.css</h3><div style="padding:4px;line-height:125%;overflow:auto"><pre>' + json['data_content'] + '</pre></div></div>';
content = '<div class="acp-box"><h3>' + _text + ': ' + json['data_title'] + '.css</h3><div style="padding:4px;line-height:125%;overflow:auto;max-height: 575px;"><pre>' + json['data_content'] + '</pre></div></div>';
}
else
{
content = '<div class="acp-box"><h3>' + _text + ': ' + json['data_group'] + ' &gt; ' + json['data_title'] + '</h3><div style="padding:4px;line-height:125%;overflow:auto"><pre>' + json['data_content'] + '</pre></div></div>';
content = '<div class="acp-box"><h3>' + _text + ': ' + json['data_group'] + ' &gt; ' + json['data_title'] + '</h3><div style="padding:4px;line-height:125%;overflow:auto;max-height: 575px;"><pre>' + json['data_content'] + '</pre></div></div>';
}
max = document.viewport.getHeight();
max = ( max < 600 ) ? max : 600;
popup = new ipb.Popup('VPopUp', { type: 'pane', modal: false, hideAtStart: true, w: '600px', h: max + 'px', initial: content } );
popup = new ipb.Popup('VPopUp', { type: 'pane', modal: false, hideAtStart: true, w: '600px', h: max, initial: content } );
popup.show();
}
},
@@ -335,17 +335,17 @@ function IPB3TemplateDiffResults()
if ( json['change_data_type'] == 'css' )
{
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_title'] + '.css</h3><div style="padding:4px;line-height:125%;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_title'] + '.css</h3><div style="padding:4px;line-height:125%;overflow: auto;max-height: 575px;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
}
else
{
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_group'] + ' &gt; ' + json['change_data_title'] + '</h3><div style="padding:4px;line-height:125%;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_group'] + ' &gt; ' + json['change_data_title'] + '</h3><div style="padding:4px;line-height:125%;overflow: auto;max-height: 575px;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
}
max = document.viewport.getHeight();
max = ( max < 600 ) ? max : 600;
IPB3TemplateDiffResults.popUps['preview-' + changeId ] = new ipb.Popup('diffPopUp', { type: 'pane', modal: false, hideAtStart: true, w: '800px', h: max + 'px', initial: content } );
IPB3TemplateDiffResults.popUps['preview-' + changeId ] = new ipb.Popup('diffPopUp', { type: 'pane', modal: false, hideAtStart: true, w: '800px', h: max, initial: content } );
IPB3TemplateDiffResults.popUps['preview-' + changeId ].show();
/* Observe */
@@ -402,16 +402,16 @@ function IPB3TemplateDiffResults()
/* otherwise... */
if ( json['change_merge_content'] )
{
/* Ok, for some reason Safari (and possibly others) doesn't show the pop-up when viewing a
template bit. I presume it's because prototype/javascript will not insert invalid HTML into a node even
though it's encoded properly. After a few days working on merge, this is a quick hack to get it done
Force a 750px div in to position pop-up correctly on the screen, then once the pop-up has been created
shove the content in.
<3 javascript */
var _tmp = Math.floor( Math.random() * 1001 );
/* Ok, for some reason Safari (and possibly others) doesn't show the pop-up when viewing a
template bit. I presume it's because prototype/javascript will not insert invalid HTML into a node even
though it's encoded properly. After a few days working on merge, this is a quick hack to get it done
Force a 750px div in to position pop-up correctly on the screen, then once the pop-up has been created
shove the content in.
<3 javascript */
var _tmp = Math.floor( Math.random() * 1001 );
_qb = "<div style='float:left; margin-top:6px'><input type='button' id='mergeResolveCustom_" + _tmp + "' class='button __rc" + changeId + "' value='" + ipb.lang['resolveall_button'] + "' />&nbsp;<input type='button' id='mergeResolveNew_" + _tmp + "' class='button __rn" + changeId + "' value='" + ipb.lang['resolveall_newwin'] + "' /></div>";
_tb = '<textarea name="content" id="mergeContent" style="width:100%; height:700px; line-height:150%">' + json['change_merge_content'] + '</textarea>' + _qb + '<div style="text-align:right" class="acp-actionbar"><input type="button" id="mergeSubmit" value="' + ipb.lang['save_button'] + '" class="button primary __i' + changeId + '" /></div>';
_tb = '<textarea name="content" id="mergeContent" style="width:100%; height:500px; line-height:150%">' + json['change_merge_content'] + '</textarea>' + _qb + '<div style="text-align:right" class="acp-actionbar"><input type="button" id="mergeSubmit" value="' + ipb.lang['save_button'] + '" class="button primary __i' + changeId + '" /></div>';
if ( json['change_data_type'] == 'css' )
{
@@ -422,7 +422,7 @@ function IPB3TemplateDiffResults()
content = '<div class="acp-box"><h3>' + json['change_data_group'] + ' &gt; ' + json['change_data_title'] + '</h3><div style="padding:4px;">' + _tb + '</div></div>';
}
IPB3TemplateDiffResults.popUps['edit-' + changeId ] = new ipb.Popup('diffEditPopUp_' + _tmp, { type: 'pane', modal: false, hideAtStart: true, w: '800px', h: '600px', initial: '<div style="height:750px">&nbsp;</div>' } );
IPB3TemplateDiffResults.popUps['edit-' + changeId ] = new ipb.Popup('diffEditPopUp_' + _tmp, { type: 'pane', modal: false, hideAtStart: true, w: '800px', h: 650, initial: '<div style="height:590px">&nbsp;</div>' } );
IPB3TemplateDiffResults.popUps['edit-' + changeId ].show();
$('diffEditPopUp_' + _tmp + '_inner').update( content );
@@ -611,10 +611,10 @@ function IPB3TemplateDiffResults()
alert( ipb.lang['oops'] + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
}
};
}
@@ -1,31 +1,31 @@
/************************************************/
/* IPB3 Javascript */
/* -------------------------------------------- */
/* acp.homepage.js - Homepage javascript */
/* (c) IPS, Inc 2008 */
/* -------------------------------------------- */
/* Author: Brandon Farber */
/************************************************/
ACPHomepage = {
/*------------------------------*/
/* Constructor */
init: function()
{
Debug.write("Initializing acp.homepage.js");
},
editMember: function()
{
if ( $('members_display_name').value == "" )
{
alert("Нужно ввести имя пользователя!");
return false;
}
return true;
}
};
/************************************************/
/* IPB3 Javascript */
/* -------------------------------------------- */
/* acp.homepage.js - Homepage javascript */
/* (c) IPS, Inc 2008 */
/* -------------------------------------------- */
/* Author: Brandon Farber */
/************************************************/
ACPHomepage = {
/*------------------------------*/
/* Constructor */
init: function()
{
Debug.write("Initializing acp.homepage.js");
},
editMember: function()
{
if ( $('members_display_name').value == "" )
{
alert("You must enter a username!");
return false;
}
return true;
}
};
ACPHomepage.init();
@@ -0,0 +1,55 @@
/************************************************/
/* IPB3 Javascript */
/* -------------------------------------------- */
/* acp.hooksList.js - Hooks listing */
/* (c) IPS, Inc 2011 */
/* -------------------------------------------- */
/* Author: Terabyte */
/************************************************/
var _hooksList = window.IPBACP;
_hooksList.prototype.hooksList = {
popups: [],
/*
* Init function
*/
init: function()
{
Debug.write("Initializing acp.hooksList.js");
document.observe("dom:loaded", function(){
acp.hooksList.initPage();
});
},
initPage: function()
{
$('install_new_hook').observe('click', acp.hooksList.addFolder);
},
addFolder: function( e, elem )
{
Event.stop(e);
if ( ! Object.isUndefined(acp.hooksList.popups['install']) )
{
acp.hooksList.popups['install'].show();
}
else
{
// Make a new popup
acp.hooksList.popups['install'] = new ipb.Popup( 'install', {
type: 'modal',
initial: ipb.templates['install_new_hook'].evaluate(),
w: '550px',
stem: false,
hideAtStart: false
});
}
}
};
acp.hooksList.init();
@@ -0,0 +1,55 @@
/************************************************/
/* IPB3 Javascript */
/* -------------------------------------------- */
/* acp.mmobileimages.js */
/* (c) IPS, Inc 2011 */
/* -------------------------------------------- */
/* Author: Matt Mecham */
/************************************************/
var _mobileImages = window.IPBACP;
_mobileImages.prototype.mobileImages = {
popups: [],
/*
* Init function
*/
init: function()
{
Debug.write("Initializing acp.mobileImages.js");
document.observe("dom:loaded", function(){
acp.mobileImages.initPage();
});
},
initPage: function()
{
$('importXml').observe('click', acp.mobileImages.importPop);
},
importPop: function( e, elem )
{
Event.stop(e);
if ( ! Object.isUndefined(acp.mobileImages.popups['install']) )
{
acp.mobileImages.popups['install'].show();
}
else
{
// Make a new popup
acp.mobileImages.popups['install'] = new ipb.Popup( 'install', {
type: 'modal',
initial: ipb.templates['import_xml'].evaluate(),
w: '550px',
stem: false,
hideAtStart: false
});
}
}
};
acp.mobileImages.init();
+9 -9
View File
@@ -1,10 +1,10 @@
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; Forbidden</h1>
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; Forbidden</h1>
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
+17 -17
View File
@@ -85,11 +85,11 @@ function IPBCSS()
}
else
{
alert( "Похоже у нас проблемы: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -133,21 +133,21 @@ function IPBCSS()
if ( json['errors'] )
{
/* Something inline would be very nice here.. rather than this ugly alert */
alert("Ошибка: " + json['errors'] );
alert("Message: " + json['errors'] );
}
else
{
alert("Сохранено!");
alert("Error:: Saved!");
}
}
}
else
{
alert( "Похоже у нас проблемы: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -159,14 +159,14 @@ function IPBCSS()
/* Make sure we're mean it... */
if ( $('tplate_cssRow_' + css_id ).hasClassName( 'tplateRow_new') )
{
if ( ! confirm( "Удалить CSS файл ?\nФайл будет удален из ВСЕХ стилей!" ) )
if ( ! confirm( "REMOVE CSS file?\n This will remove this template bit in ALL skins!" ) )
{
return false;
}
}
else
{
if ( ! confirm( "Отменить изменения в CSS файле ?\nВсе изменения будут утеряны!" ) )
if ( ! confirm( "Revert CSS file?\n All changes WILL be lost!" ) )
{
return false;
}
@@ -196,17 +196,17 @@ function IPBCSS()
if ( json['errors'] )
{
/* Something inline would be very nice here.. rather than this ugly alert */
alert("Ошибка: " + json['errors'] );
alert("Error:: " + json['errors'] );
}
}
}
else
{
alert( "Похоже у нас проблемы: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -239,11 +239,11 @@ function IPBCSS()
}
else
{
alert( "Похоже у нас проблемы: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
+418 -389
View File
@@ -1,390 +1,419 @@
function addAnotherRequirement()
{
requireIndex = parseInt(requireIndex) + 1;
// Show the data location dropdown now
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getApplications&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + requireIndex + "&name=requireApp";
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function ( t )
{
var newApp = ipb.templates['new_app_require'].evaluate({ index: requireIndex, dropdown: t.responseText });
if ( $('RequirementsContainer').down('tbody') )
{
$('RequirementsContainer').down('tbody').insert( newApp );
}
else
{
$('RequirementsContainer').insert( newApp );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
function removeRequirement( idToRemove )
{
idToRemove = parseInt(idToRemove);
if( $('requirementTitleRow_' + idToRemove ) != null )
{
$('requirementTitleRow_' + idToRemove ).remove();
}
if( $('requirementRow_' + idToRemove ) != null )
{
$('requirementRow_' + idToRemove ).remove();
}
}
function addAnotherFile()
{
elementIndex = parseInt(elementIndex) + 1;
var newFile = ipb.templates['new_hook_file'].evaluate({ index: elementIndex });
if ( $('fileTableContainer').down('tbody') )
{
$('fileTableContainer').down('tbody').insert( newFile );
}
else
{
$('fileTableContainer').insert( newFile );
}
}
function removeFile( elementIndex )
{
elementIndex = parseInt(elementIndex);
if( $('fileRow_' + elementIndex ) != null )
{
$('fileRow_' + elementIndex ).remove();
}
}
function selectHookType( elementIndex )
{
var type = $F('hook_type[' + elementIndex + ']');
if( $('tr_classToOverload[' + elementIndex + ']') != null )
{
$('tr_classToOverload[' + elementIndex + ']').remove();
}
if( $('tr_skinGroup[' + elementIndex + ']') != null )
{
$('tr_skinGroup[' + elementIndex + ']').remove();
}
if( $('tr_skinFunction[' + elementIndex + ']') != null )
{
$('tr_skinFunction[' + elementIndex + ']').remove();
}
if( $('tr_type[' + elementIndex + ']') != null )
{
$('tr_type[' + elementIndex + ']').remove();
}
if( $('tr_id[' + elementIndex + ']') != null )
{
$('tr_id[' + elementIndex + ']').remove();
}
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
if( $('tr_dataLocation[' + elementIndex + ']') != null )
{
$('tr_dataLocation[' + elementIndex + ']').remove();
}
if( $('tr_libApplication[' + elementIndex + ']') != null )
{
$('tr_libApplication[' + elementIndex + ']').remove();
}
if( type == 'templateHooks' )
{
// Show the skin dropdown now
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getGroupsForAdd&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var newRow = ipb.templates['hook_skinGroup'].evaluate({ index: elementIndex, dropdown: t.responseText });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
else if( type == 'dataHooks' )
{
// Show the data location dropdown now
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getDataLocationsForAdd&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var newRow = ipb.templates['hook_dataLocation'].evaluate({ index: elementIndex, dropdown: t.responseText });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
else if( type == 'libraryHooks' )
{
// Show the data location dropdown now
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getApplications&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var replace = { index: elementIndex, dropdown: t.responseText };
var newRow = ipb.templates['hook_classToOverload'].evaluate(replace) + ipb.templates['hook_libApplication'].evaluate(replace);
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
else if( type != '0' )
{
// Show the classToOverload field
var newRow = ipb.templates['hook_classToOverload'].evaluate({ index: elementIndex });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
}
}
function getTemplatesForAdd( elementIndex )
{
var type = $F('skinGroup[' + elementIndex + ']');
if( $('tr_skinFunction[' + elementIndex + ']') != null )
{
$('tr_skinFunction[' + elementIndex + ']').remove();
}
if( $('tr_type[' + elementIndex + ']') != null )
{
$('tr_type[' + elementIndex + ']').remove();
}
if( $('tr_id[' + elementIndex + ']') != null )
{
$('tr_id[' + elementIndex + ']').remove();
}
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
/* Got a type? */
if( type != '0' )
{
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getTemplatesForAdd&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex + "&group=" + type;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var newRow = ipb.templates['hook_skinFunction'].evaluate({ index: elementIndex, dropdown: t.responseText });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
}
function getTypeOfHook( elementIndex )
{
var template = $F('skinFunction[' + elementIndex + ']');
if( $('tr_type[' + elementIndex + ']') != null )
{
$('tr_type[' + elementIndex + ']').remove();
}
if( $('tr_id[' + elementIndex + ']') != null )
{
$('tr_id[' + elementIndex + ']').remove();
}
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
/* Insert the new hook type row */
if ( template != '0' )
{
var newRow = ipb.templates['hook_pointTypes'].evaluate({ index: elementIndex });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
}
}
function getHookIds( elementIndex )
{
var template = $F('skinFunction[' + elementIndex + ']');
var type = $F('type[' + elementIndex + ']');
if( $('tr_id[' + elementIndex + ']') != null )
{
$('tr_id[' + elementIndex + ']').remove();
}
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
/* Got a type? */
if( type != '0' )
{
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getHookIds&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex + "&type=" + type + "&template=" + template;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var newRow = ipb.templates['hook_pointIds'].evaluate({ index: elementIndex, dropdown: t.responseText });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
}
function getHookEntryPoints( elementIndex )
{
var type = $F('type[' + elementIndex + ']');
Debug.write( type );
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
var options = '';
if( type == 'foreach' )
{
options += "<option value='outer.pre'>(outer.pre) " + ipb.lang['a_outerpre'] + "</option>";
options += "<option value='inner.pre'>(inner.pre) " + ipb.lang['a_innerpre'] + "</option>";
options += "<option value='inner.post'>(inner.post) " + ipb.lang['a_innerpost']+ "</option>";
options += "<option value='outer.post'>(outer.post) " + ipb.lang['a_outerpost']+ "</option>";
}
else
{
options += "<option value='pre.startif'>(pre.startif) " + ipb.lang['a_prestartif'] + "</option>";
options += "<option value='post.startif'>(post.startif) " + ipb.lang['a_poststartif'] + "</option>";
options += "<option value='pre.else'>(pre.else) " + ipb.lang['a_preelse'] + "</option>";
options += "<option value='post.else'>(post.else) " + ipb.lang['a_postelse'] + "</option>";
options += "<option value='pre.endif'>(pre.endif) " + ipb.lang['a_preendif'] + "</option>";
options += "<option value='post.endif'>(post.endif) " + ipb.lang['a_postendif'] + "</option>";
}
/* Insert the new hook type row */
//if ( type != '0' )
//{
var newRow = ipb.templates['hook_pointLocation'].evaluate({ index: elementIndex, hookPoints: options });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
//}
function addAnotherRequirement()
{
requireIndex = parseInt(requireIndex) + 1;
// Show the data location dropdown now
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getApplications&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + requireIndex + "&name=requireApp";
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function ( t )
{
var newApp = ipb.templates['new_app_require'].evaluate({ index: requireIndex, dropdown: t.responseText });
if ( $('RequirementsContainer').down('tbody') )
{
$('RequirementsContainer').down('tbody').insert( newApp );
}
else
{
$('RequirementsContainer').insert( newApp );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
function getAppVersions( getIndex )
{
getIndex = parseInt(getIndex);
indexValue = $F('requireApp[' + getIndex + ']');
// Show the versions dropdowns now
if ( indexValue == 0 )
{
$('requirementRow_' + getIndex + '_versions').update('');
}
else
{
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getAppVersions&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + getIndex + "&chosenApp=" + indexValue;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function ( t )
{
$('requirementRow_' + getIndex + '_versions').update( t.responseText );
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
}
function removeRequirement( idToRemove )
{
idToRemove = parseInt(idToRemove);
if( $('requirementTitleRow_' + idToRemove ) != null )
{
$('requirementTitleRow_' + idToRemove ).remove();
}
if( $('requirementRow_' + idToRemove ) != null )
{
$('requirementRow_' + idToRemove ).remove();
}
}
function addAnotherFile()
{
elementIndex = parseInt(elementIndex) + 1;
var newFile = ipb.templates['new_hook_file'].evaluate({ index: elementIndex });
if ( $('fileTableContainer').down('tbody') )
{
$('fileTableContainer').down('tbody').insert( newFile );
}
else
{
$('fileTableContainer').insert( newFile );
}
}
function removeFile( elementIndex )
{
elementIndex = parseInt(elementIndex);
if( $('fileRow_' + elementIndex ) != null )
{
$('fileRow_' + elementIndex ).remove();
}
}
function selectHookType( elementIndex )
{
var type = $F('hook_type[' + elementIndex + ']');
if( $('tr_classToOverload[' + elementIndex + ']') != null )
{
$('tr_classToOverload[' + elementIndex + ']').remove();
}
if( $('tr_skinGroup[' + elementIndex + ']') != null )
{
$('tr_skinGroup[' + elementIndex + ']').remove();
}
if( $('tr_skinFunction[' + elementIndex + ']') != null )
{
$('tr_skinFunction[' + elementIndex + ']').remove();
}
if( $('tr_type[' + elementIndex + ']') != null )
{
$('tr_type[' + elementIndex + ']').remove();
}
if( $('tr_id[' + elementIndex + ']') != null )
{
$('tr_id[' + elementIndex + ']').remove();
}
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
if( $('tr_dataLocation[' + elementIndex + ']') != null )
{
$('tr_dataLocation[' + elementIndex + ']').remove();
}
if( $('tr_libApplication[' + elementIndex + ']') != null )
{
$('tr_libApplication[' + elementIndex + ']').remove();
}
if( type == 'templateHooks' )
{
// Show the skin dropdown now
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getGroupsForAdd&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var newRow = ipb.templates['hook_skinGroup'].evaluate({ index: elementIndex, dropdown: t.responseText });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
else if( type == 'dataHooks' )
{
// Show the data location dropdown now
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getDataLocationsForAdd&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var newRow = ipb.templates['hook_dataLocation'].evaluate({ index: elementIndex, dropdown: t.responseText });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
else if( type == 'libraryHooks' )
{
// Show the data location dropdown now
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getApplications&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var replace = { index: elementIndex, dropdown: t.responseText };
var newRow = ipb.templates['hook_classToOverload'].evaluate(replace) + ipb.templates['hook_libApplication'].evaluate(replace);
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
else if( type != '0' )
{
// Show the classToOverload field
var newRow = ipb.templates['hook_classToOverload'].evaluate({ index: elementIndex });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
}
}
function getTemplatesForAdd( elementIndex )
{
var type = $F('skinGroup[' + elementIndex + ']');
if( $('tr_skinFunction[' + elementIndex + ']') != null )
{
$('tr_skinFunction[' + elementIndex + ']').remove();
}
if( $('tr_type[' + elementIndex + ']') != null )
{
$('tr_type[' + elementIndex + ']').remove();
}
if( $('tr_id[' + elementIndex + ']') != null )
{
$('tr_id[' + elementIndex + ']').remove();
}
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
/* Got a type? */
if( type != '0' )
{
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getTemplatesForAdd&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex + "&group=" + type;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var newRow = ipb.templates['hook_skinFunction'].evaluate({ index: elementIndex, dropdown: t.responseText });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
}
function getTypeOfHook( elementIndex )
{
var template = $F('skinFunction[' + elementIndex + ']');
if( $('tr_type[' + elementIndex + ']') != null )
{
$('tr_type[' + elementIndex + ']').remove();
}
if( $('tr_id[' + elementIndex + ']') != null )
{
$('tr_id[' + elementIndex + ']').remove();
}
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
/* Insert the new hook type row */
if ( template != '0' )
{
var newRow = ipb.templates['hook_pointTypes'].evaluate({ index: elementIndex });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
}
}
function getHookIds( elementIndex )
{
var template = $F('skinFunction[' + elementIndex + ']');
var type = $F('type[' + elementIndex + ']');
var group = $F('skinGroup[' + elementIndex + ']');
if( $('tr_id[' + elementIndex + ']') != null )
{
$('tr_id[' + elementIndex + ']').remove();
}
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
/* Got a type? */
if( type != '0' )
{
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getHookIds&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex + "&type=" + type + "&template=" + template + "&group=" + group;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var newRow = ipb.templates['hook_pointIds'].evaluate({ index: elementIndex, dropdown: t.responseText });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
}
function getHookEntryPoints( elementIndex )
{
var type = $F('type[' + elementIndex + ']');
Debug.write( type );
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
var options = '';
if( type == 'foreach' )
{
options += "<option value='outer.pre'>(outer.pre) " + ipb.lang['a_outerpre'] + "</option>";
options += "<option value='inner.pre'>(inner.pre) " + ipb.lang['a_innerpre'] + "</option>";
options += "<option value='inner.post'>(inner.post) " + ipb.lang['a_innerpost']+ "</option>";
options += "<option value='outer.post'>(outer.post) " + ipb.lang['a_outerpost']+ "</option>";
}
else
{
options += "<option value='pre.startif'>(pre.startif) " + ipb.lang['a_prestartif'] + "</option>";
options += "<option value='post.startif'>(post.startif) " + ipb.lang['a_poststartif'] + "</option>";
options += "<option value='pre.else'>(pre.else) " + ipb.lang['a_preelse'] + "</option>";
options += "<option value='post.else'>(post.else) " + ipb.lang['a_postelse'] + "</option>";
options += "<option value='pre.endif'>(pre.endif) " + ipb.lang['a_preendif'] + "</option>";
options += "<option value='post.endif'>(post.endif) " + ipb.lang['a_postendif'] + "</option>";
}
/* Insert the new hook type row */
//if ( type != '0' )
//{
var newRow = ipb.templates['hook_pointLocation'].evaluate({ index: elementIndex, hookPoints: options });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
//}
}
@@ -217,14 +217,14 @@ function IPBTemplateDiff()
*/
this.timeOutAjax = function( t )
{
if ( confirm( "Нет ответа от сервера.\nХотите подождать?" ) )
if ( confirm( "No response from the webserver.\nDo you wish to continue waiting?" ) )
{
return true;
}
else
{
t.transport.abort();
alert( "Запрос отменен" );
alert( "Request Cancelled" );
}
};
@@ -233,7 +233,7 @@ function IPBTemplateDiff()
*/
this.failureAjax = function( t )
{
alert( "Ошибка: " + t.responseText );
alert( "Failure: " + t.responseText );
};
/**
@@ -241,7 +241,7 @@ function IPBTemplateDiff()
*/
this.exceptionAjax = function( t )
{
alert( "Исключение: " + t.responseText );
alert( "Exception: " + t.responseText );
};
/**
@@ -255,7 +255,7 @@ function IPBTemplateDiff()
/* Not a JSON response? */
if ( ! t.responseText.match( /^(\s+?)?\{/ ) )
{
alert( "Ошибка:\n" + t.responseText );
alert( "Error:\n" + t.responseText );
Debug.write( t );
return;
}
@@ -265,7 +265,7 @@ function IPBTemplateDiff()
if ( json['error'] )
{
alert( "Ошибка: " . json['error'] );
alert( "An error occurred: " . json['error'] );
return false;
}
@@ -102,11 +102,11 @@ function IPBTemplateSandR()
}
else
{
alert( "Галектеко ОПАСНОСТЕ! ПЫЩПЫЩ!11: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -161,22 +161,22 @@ function IPBTemplateSandR()
if ( json['errors'] )
{
/* Something inline would be very nice here.. rather than this ugly alert */
alert("Ошибка: " + json['errors'] );
alert("Message: " + json['errors'] );
}
else
{
$('replaceButton').disabled = false;
$('replaceButton').value = "Заменить выбранные";
$('replaceButton').value = "Replace Selected";
}
}
}
else
{
alert( "Галектеко ОПАСНОСТЕ! ПЫЩПЫЩ!11: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -218,7 +218,7 @@ function IPBTemplateSandR()
if ( json['errors'] )
{
/* Something inline would be very nice here.. rather than this ugly alert */
alert("Ошибка: " + json['errors'] );
alert("Message: " + json['errors'] );
}
else
{
@@ -228,11 +228,11 @@ function IPBTemplateSandR()
}
else
{
alert( "Галектеко ОПАСНОСТЕ! ПЫЩПЫЩ!11: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
//onException: function( f,e ){ alert( "Исключение: " + e ) },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
//onException: function( f,e ){ alert( "Exception: " + e ) },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -303,7 +303,7 @@ function IPBTemplateSandR()
for( i = 0 ; i < json['templates'].length; i++ )
{
_output += _tplate.evaluate( json['templates'][i] );
};
}
/* Clear out any current listing */
$$( '#groupRowTemplates_' + groupName + " table.ipsTable" ).each( function(elem) {
@@ -328,7 +328,7 @@ function IPBTemplateSandR()
/* Checked, please? */
IPB3TemplatesSandR.toggleGroupBox( json['templates'][i]['template_group'] );
}
};
}
};
/**
@@ -103,11 +103,11 @@ function IPBTemplates()
}
else
{
alert( "Ошибка: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -169,11 +169,11 @@ function IPBTemplates()
}
else
{
alert( "Ошибка: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -222,21 +222,21 @@ function IPBTemplates()
if ( json['errors'] )
{
/* Something inline would be very nice here.. rather than this ugly alert */
alert("Ошибка: " + json['errors'] );
alert("Error:: " + json['errors'] );
}
else
{
alert("Сохранено!");
alert("Error:: Saved!");
}
}
}
else
{
alert( "Ошибка: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -248,14 +248,14 @@ function IPBTemplates()
/* Make sure we're mean it... */
if ( $('tplate_templaterow_' + template_id ).hasClassName( 'tplateRow_new') )
{
if ( ! confirm( "Удалить шаблон?\n Произойдет удаление шаблона из ВСЕХ стилей!" ) )
if ( ! confirm( "REMOVE template bit?\n This will remove this template bit in ALL skins!" ) )
{
return false;
}
}
else
{
if ( ! confirm( "Откатить изменения?\n Все изменения БУДУТ УТРАЧЕНЫ!" ) )
if ( ! confirm( "Revert template bit?\n All changes WILL be lost!" ) )
{
return false;
}
@@ -295,17 +295,17 @@ function IPBTemplates()
if ( json['errors'] )
{
/* Something inline would be very nice here.. rather than this ugly alert */
alert("Ошибка: " + json['errors'] );
alert("Error:: " + json['errors'] );
}
}
}
else
{
alert( "Ошибка: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -338,11 +338,11 @@ function IPBTemplates()
}
else
{
alert( "Ошибка: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -499,7 +499,7 @@ function IPBTemplates()
}
_output += _tplate.evaluate( json['templates'][i] );
};
}
/* Write it out */
$('tplate_bitList').update( _output );
@@ -124,11 +124,11 @@ function IPBUAgents()
if ( json['errors'] )
{
/* Something inline would be very nice here.. rather than this ugly alert */
alert("Ошибка: " + json['errors'] );
alert("Error:: " + json['errors'] );
}
else
{
alert("Сохранено!");
alert("Error:: Saved!");
}
}
}
@@ -179,7 +179,7 @@ function IPBUAgents()
if ( json['errors'] )
{
/* Something inline would be very nice here.. rather than this ugly alert */
alert("Ошибка: " + json['errors'] );
alert("Error:: " + json['errors'] );
}
}
}
@@ -249,7 +249,7 @@ function IPBUAgents()
{
_box.selectedIndex = i;
}
};
}
ipb.positionCenter( 'tplate_editor_' + uagent_id );
};