Version 2.2.0 RC-1
This commit is contained in:
1 parent
f73f8bff6d
commit
22f1b963ee
1034 files changed
+178610
-70897
No files matched your search
@@ -2,26 +2,17 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
|
||||
| > $Revision: 23 $
|
||||
| > $Date: 2006-10-05 17:04:08 +0100 (Thu, 05 Oct 2006) $
|
||||
| > $Revision: 609 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
@@ -37,7 +28,7 @@
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåâåðíûé âõîä</h1> Ó Âàñ íåò äîñòóïà ê äèðåêòèâå ýòîãî ôàéëà. Åñëè Âû ïðîâîäèëè îáíîâëåíèÿ, óáåäèòåñü, ÷òî íå çàáûëè îáíîâèòü 'admin.php'.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -63,17 +54,6 @@ class ad_skin_macros {
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Kill globals - globals bad, Homer good.
|
||||
//-----------------------------------------
|
||||
|
||||
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
|
||||
|
||||
foreach ( $tmp_in as $k => $v )
|
||||
{
|
||||
unset($$k);
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
@@ -104,7 +84,7 @@ class ad_skin_macros {
|
||||
break;
|
||||
|
||||
default:
|
||||
print "Äåéñòâèå íå âûáðàíî"; exit();
|
||||
print "No action"; exit();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -117,13 +97,13 @@ class ad_skin_macros {
|
||||
{
|
||||
if ($this->ipsclass->input['mid'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü ID ìàêðîñà, âåðíèòåñü íàçàä è ïîïðîáóéòå åùå ðàç");
|
||||
$this->ipsclass->admin->error("You must specify an existing macro ID, go back and try again");
|
||||
}
|
||||
|
||||
$id = intval($this->ipsclass->input['id']);
|
||||
$p = intval($this->ipsclass->input['p']);
|
||||
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_macro', 'where' => "macro_id='".$this->ipsclass->input['mid']."'" ) );
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_macro', 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Recache macros
|
||||
@@ -136,7 +116,7 @@ class ad_skin_macros {
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->input['id'] = $id;
|
||||
$this->ipsclass->main_msg = "Ìàêðîñ óäàëåí!";
|
||||
$this->ipsclass->main_msg = "Macro removed!";
|
||||
$this->show_macros();
|
||||
}
|
||||
|
||||
@@ -148,7 +128,7 @@ class ad_skin_macros {
|
||||
{
|
||||
if ($this->ipsclass->input['mid'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü ID ìàêðîñà, âåðíèòåñü íàçàä è ïîïðîáóéòå åùå ðàç");
|
||||
$this->ipsclass->admin->error("You must specify an existing image set ID, go back and try again");
|
||||
}
|
||||
|
||||
$id = intval($this->ipsclass->input['id']);
|
||||
@@ -161,12 +141,12 @@ class ad_skin_macros {
|
||||
// Get macro for examination..
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_macro', 'where' => "macro_id='".$this->ipsclass->input['mid']."'" ) );
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_macro', 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
if ( ! $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü çàïèñü èç áàçû äàííûõ");
|
||||
$this->ipsclass->admin->error("Could not retrieve the record from the DB");
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -179,7 +159,7 @@ class ad_skin_macros {
|
||||
// Okay, update...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'update' => 'skin_macro', 'set' => "macro_value='$key', macro_replace='$val'", 'where' => "macro_id=".$this->ipsclass->input['mid'] ) );
|
||||
$this->ipsclass->DB->simple_construct( array( 'update' => 'skin_macro', 'set' => "macro_value='$key', macro_replace='$val'", 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
}
|
||||
else
|
||||
@@ -222,7 +202,7 @@ class ad_skin_macros {
|
||||
{
|
||||
if ($this->ipsclass->input['mid'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü ID ìàêðîñà, âåðíèòåñü íàçàä è ïîïðîáóéòå åùå ðàç");
|
||||
$this->ipsclass->admin->error("You must specify an existing macro set ID, go back and try again");
|
||||
}
|
||||
|
||||
$id = intval($this->ipsclass->input['id']);
|
||||
@@ -262,7 +242,7 @@ class ad_skin_macros {
|
||||
|
||||
if ($this->ipsclass->input['id'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü ID ìàêðîñà, âåðíèòåñü íàçàä è ïîïðîáóéòå åùå ðàç");
|
||||
$this->ipsclass->admin->error("You must specify an existing macro set ID, go back and try again");
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -286,14 +266,14 @@ class ad_skin_macros {
|
||||
// Get img_dir this set is using...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id='".$this->ipsclass->input['id']."'" ) );
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id=".intval($this->ipsclass->input['id']) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
$skin = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Äëÿ èçìåíåíèÿ ìàêðîñà, íàæìèòå íà ññûëêó 'Èçìåíèòü' íàïðîòèâ âûáðàííîãî ìàêðîñà.";
|
||||
$this->ipsclass->admin->page_detail = "To edit a macro, simply click on the 'edit' link of the appropriate macro.";
|
||||
|
||||
$this->ipsclass->admin->page_title = "Óïðàâëåíèå çàìåíàìè ìàêðîñîâ øàáëîíà: {$skin['set_name']}";
|
||||
$this->ipsclass->admin->page_title = "Manage Replacement Macros in Set: {$skin['set_name']}";
|
||||
|
||||
//-----------------------------------------
|
||||
// Start output
|
||||
@@ -303,7 +283,7 @@ class ad_skin_macros {
|
||||
function editmacro(id, variable, replace)
|
||||
{
|
||||
document.macroform.code.value = 'doeditmacro';
|
||||
document.macroform.submitbutton.value = 'Èçìåíèòü ýòîò ìàêðîñ';
|
||||
document.macroform.submitbutton.value = 'Edit This Macro';
|
||||
document.macroform.mid.value = id;
|
||||
document.macroform.variable.value = variable;
|
||||
document.macroform.replacement.value = replace;
|
||||
@@ -314,7 +294,7 @@ class ad_skin_macros {
|
||||
function addmacro(id)
|
||||
{
|
||||
document.macroform.code.value = 'doaddmacro';
|
||||
document.macroform.submitbutton.value = 'Äîáàâèòü ýòîò ìàêðîñ';
|
||||
document.macroform.submitbutton.value = 'Add This Macro';
|
||||
document.macroform.mid.value = id;
|
||||
document.macroform.variable.value = '';
|
||||
document.macroform.replacement.value = '';
|
||||
@@ -328,15 +308,16 @@ class ad_skin_macros {
|
||||
}
|
||||
</script>
|
||||
<div class='tableborder'>
|
||||
<div class='maintitle'>
|
||||
<div class='tableheaderalt'>
|
||||
<table cellpadding='0' cellspacing='0' border='0' width='100%'>
|
||||
<tr>
|
||||
<td align='left' width='100%' style='font-weight:bold;font-size:11px;color:#FFF'>Óïðàâëåíèå çàìåíàìè ìàêðîñîâ</td>
|
||||
<td align='right' nowrap='nowrap' style='padding-right:2px'><input type='button' class='realdarkbutton' value='Äîáàâèòü ìàêðîñ' onclick=\"addmacro('{$this->ipsclass->input['id']}');\" /></td>
|
||||
<td align='left' width='100%' style='font-weight:bold;font-size:11px;color:#FFF'>Manage Replacement Macros</td>
|
||||
<td align='right' nowrap='nowrap' style='padding-right:2px'><input type='button' class='realdarkbutton' value='Add Macro' onclick=\"addmacro('{$this->ipsclass->input['id']}');\" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div align='center' style='position:absolute;display:none;text-align:center;' id='popbox'>
|
||||
<form name='macroform' action='{$this->ipsclass->base_url}' method='post'>
|
||||
<input type='hidden' name='_admin_auth_key' value='{$this->ipsclass->_admin_auth_key}' />
|
||||
<input type='hidden' name='act' value='image' />
|
||||
<input type='hidden' name='section' value='{$this->ipsclass->section_code}' />
|
||||
<input type='hidden' name='code' value='' />
|
||||
@@ -346,11 +327,11 @@ class ad_skin_macros {
|
||||
<table cellspacing='0' width='500' align='center' cellpadding='6' style='background:#EEE;border:2px outset #555;'>
|
||||
<tr>
|
||||
<td width='1%' nowrap='nowrap' valign='top'>
|
||||
<b>Ïåðåìåííàÿ</b><br><input class='textinput' name='variable' type='text' size='20' />
|
||||
<b>Variable</b><br><input class='textinput' name='variable' type='text' size='20' />
|
||||
<br /><br />
|
||||
<center><input type='submit' class='realbutton' value='Èçìåíèòü ìàêðîñ' name='submitbutton' /> <input type='button' class='realdarkbutton' value='Çàêðûòü' onclick=\"togglediv('popbox');\" /></center>
|
||||
<center><input type='submit' class='realbutton' value='Edit Macro' name='submitbutton' /> <input type='button' class='realdarkbutton' value='Close' onclick=\"togglediv('popbox');\" /></center>
|
||||
</td>
|
||||
<td width='99%'><b>Çàìåíà</b><br /><textarea class='textinput' name='replacement' style='width:99%;height:50px'></textarea></td>
|
||||
<td width='99%'><b>Replacement</b><br /><textarea class='textinput' name='replacement' style='width:99%;height:50px'></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
@@ -362,17 +343,18 @@ class ad_skin_macros {
|
||||
|
||||
$this->ipsclass->html .= "<div class='tableborder'>\n<div class='tablepad'>\n<table width='100%' cellspacing='0' cellpadding='0' border='0'>";
|
||||
|
||||
$this->unaltered = "<img src='{$this->ipsclass->skin_url}/images/skin_item_unaltered.gif' border='0' alt='-' title='Íå èçìåíåí îò íà÷àëüíîãî âàðèàíòà øàáëîíà' /> ";
|
||||
$this->altered = "<img src='{$this->ipsclass->skin_url}/images/skin_item_altered.gif' border='0' alt='+' title='Èçìåíåí îò íà÷àëüíîãî âàðèàíòà øàáëîíà' /> ";
|
||||
$this->inherited = "<img src='{$this->ipsclass->skin_url}/images/skin_item_inherited.gif' border='0' alt='|' title='Óíàñëåäîâàííûé îò íà÷àëüíîãî âàðèàíòà øàáëîíà' /> ";
|
||||
$this->unaltered = "<img src='{$this->ipsclass->skin_acp_url}/images/skin_item_unaltered.gif' border='0' alt='-' title='Unaltered from parent skin set' /> ";
|
||||
$this->altered = "<img src='{$this->ipsclass->skin_acp_url}/images/skin_item_altered.gif' border='0' alt='+' title='Altered from parent skin set' /> ";
|
||||
$this->inherited = "<img src='{$this->ipsclass->skin_acp_url}/images/skin_item_inherited.gif' border='0' alt='|' title='Inherited from parent skin set' /> ";
|
||||
|
||||
//-----------------------------------------
|
||||
// Loop and print
|
||||
//-----------------------------------------
|
||||
|
||||
foreach( $macros as $name => $row )
|
||||
foreach( $macros as $row )
|
||||
{
|
||||
$real = $this->ipsclass->txt_htmlspecialchars( $row['macro_replace'] );
|
||||
$real = str_replace("\n", '\n', str_replace( "\r", '\r', $real) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Altered?
|
||||
@@ -407,11 +389,21 @@ class ad_skin_macros {
|
||||
$in_quote = '"';
|
||||
}
|
||||
|
||||
if( $in_quote == '"' )
|
||||
{
|
||||
$real = str_replace( """, '\"', $real );
|
||||
}
|
||||
|
||||
if( $in_quote == "'" )
|
||||
{
|
||||
$real = str_replace( "'", "\\'", $real );
|
||||
}
|
||||
|
||||
$preview = str_replace( "<#IMG_DIR#>", $skin['set_image_dir'], $row['macro_replace'] );
|
||||
|
||||
if ( $row['macro_set'] > 1 and $row['macro_set'] == $this->ipsclass->input['id'] )
|
||||
{
|
||||
$remove_button = "<input type='button' class='realbutton' name='remove' value='Âåðíóòü íà÷àëüíîå çíà÷åíèå' onclick=\"removemacro('{$this->ipsclass->form_code_js}&code=macroremove&mid={$row['macro_id']}&id={$this->ipsclass->input['id']}&p={$this->ipsclass->input['p']}');\" />";
|
||||
$remove_button = "<input type='button' class='realbutton' name='remove' value='Revert' onclick=\"removemacro('{$this->ipsclass->form_code_js}&code=macroremove&mid={$row['macro_id']}&id={$this->ipsclass->input['id']}&p={$this->ipsclass->input['p']}');\" />";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -426,8 +418,12 @@ class ad_skin_macros {
|
||||
{
|
||||
$preview = substr( $real, 0, 200 );
|
||||
}
|
||||
else
|
||||
{
|
||||
$preview = preg_replace( "#style_images#", $this->ipsclass->vars['board_url'].'/style_images', $preview );
|
||||
}
|
||||
|
||||
$edit_button = "<input type='button' class='realbutton' value='Èçìåíèòü' onclick={$out_quote}editmacro( {$in_quote}{$row['macro_id']}{$in_quote}, {$in_quote}{$row['macro_value']}{$in_quote}, {$in_quote}$real{$in_quote});{$out_quote} />";
|
||||
$edit_button = "<input type='button' class='realbutton' value='Change' onclick={$out_quote}editmacro( {$in_quote}{$row['macro_id']}{$in_quote}, {$in_quote}{$row['macro_value']}{$in_quote}, {$in_quote}$real{$in_quote});{$out_quote} />";
|
||||
|
||||
//-----------------------------------------
|
||||
// Render row
|
||||
@@ -436,7 +432,7 @@ class ad_skin_macros {
|
||||
$style = "padding:4px;border-bottom:1px solid #DDD;background:{$css_info}";
|
||||
|
||||
$this->ipsclass->html .= "<tr>
|
||||
<!--<td style='$style' align='center' width='1%'><img src='{$this->ipsclass->skin_url}/images/skin_macro.gif' alt='Macro' title='ID: {$row['macro_id']}' style='vertical-align:middle' /></td>-->
|
||||
<!--<td style='$style' align='center' width='1%'><img src='{$this->ipsclass->skin_acp_url}/images/skin_macro.gif' alt='Macro' title='ID: {$row['macro_id']}' style='vertical-align:middle' /></td>-->
|
||||
<td style='$style' align='left' width='1%' nowrap='nowrap'>$altered_image
|
||||
<{<span style='font-size:11px;font-weight:bold' title='ID: {$row['macro_id']}. SET: {$row['macro_set']}' href='#' >{$row['macro_value']}</span>}>
|
||||
</td>
|
||||
@@ -450,8 +446,8 @@ class ad_skin_macros {
|
||||
|
||||
$this->ipsclass->html .= "</table>
|
||||
</div>
|
||||
<div class='pformstrip' align='center'>
|
||||
<input type='button' class='realdarkbutton' value='Äîáàâèòü ìàêðîñ' onclick=\"addmacro('{$this->ipsclass->input['id']}');\" />
|
||||
<div class='tablesubheader' align='center'>
|
||||
<input type='button' class='realdarkbutton' value='Add Macro' onclick=\"addmacro('{$this->ipsclass->input['id']}');\" />
|
||||
</div>
|
||||
</div>";
|
||||
|
||||
@@ -463,18 +459,18 @@ class ad_skin_macros {
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= "<br />
|
||||
<div><strong>Ïðèìåð ðàáîòû ìàêðîñà</strong><br />
|
||||
Åñëè âû äîáàâèëè ìàêðîñ 'green_font' è çàìåíó äëÿ íåãî â âèäå '<font color='green'>', êàæäûé ýëåìåíò òåêñòà <span style='color:red'><b><{green_font}></b></span> áóäåò îòîáðàæåí êàê <font color='green'>
|
||||
<br /><b><#IMG_DIR#></b> äîñòóïåí â ëþáîì ìàêðîñå. Âî âðåìÿ âûâîäà òåêñòà íà ýêðàí áóäåò ïðîèçâåäåíà çàìåíà äàííîãî òýãà íà ïóòü ïðîïèñàííûé â íàñòðîéêàõ ê ïàïêå ñ èçîáðàæåíèÿìè.
|
||||
<div><strong>Replace Macro Example</strong><br />
|
||||
If you added a key of 'green_font' and a replacement of '<font color='green'>', each instance of <span style='color:red'><b><{green_font}></b></span> would be converted to <font color='green'>
|
||||
<br /><b><#IMG_DIR#></b> is available to any macro, this is automatically replaced with the name of the image directory you choose when using this macro set in a skin
|
||||
</div><br />
|
||||
<div><strong>Îïèñàíèå îáîçíà÷åíèé:</strong><br />
|
||||
{$this->altered} Ýòîò ìàêðîñ áûë èçìåíåí.
|
||||
<br />{$this->unaltered} Ýòîò ìàêðîñ íå áûë èçìåíåí.
|
||||
<br />{$this->inherited} Ýòîò ìàêðîñ ïîñòðîåí íà áàçå ñóùåñòâóþùåãî ìàêðîñ.
|
||||
<div><strong>Replacement Macro Legend:</strong><br />
|
||||
{$this->altered} This item has been customized for this skin set.
|
||||
<br />{$this->unaltered} This item has not been customized from the master skin set.
|
||||
<br />{$this->inherited} This item has inherited customizations from the parent skin set.
|
||||
</div>";
|
||||
|
||||
$this->ipsclass->admin->nav[] = array( 'section='.$this->ipsclass->section_code.'&act=sets' ,'Óïðàâëåíèå ñòèëÿìè' );
|
||||
$this->ipsclass->admin->nav[] = array( '' ,'Óïðàâëåíèå çàìåíàìè ìàêðîñîâ '.$skin['set_name'] );
|
||||
$this->ipsclass->admin->nav[] = array( 'section='.$this->ipsclass->section_code.'&act=sets' ,'Skin Manager Home' );
|
||||
$this->ipsclass->admin->nav[] = array( '' ,'Editing Replacement Macros in Set '.$skin['set_name'] );
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
|
||||
Reference in new issue
Block a user