Помощь - Поиск - Пользователи - Календарь
Полная версия: Форма быстрого ответа и быстрого создания темы
Форум на все случаи жизни > Программирование, скрипты, графика, WEB-строительство > Форумы > Invision Power Board
Страницы: 1, 2, 3
IgorekM
Кто хочет такую же форму быстрого ответа и форму быстрого создания темы , а также дополнительные коды тэгов (как на нашем форуме), устанавливайте этот хак.

Откройте файл Skin/s1/skin_ucp.php и найдите:
Код
function signature($sig, $t_sig) {
global $ibforums;
return <<<EOF
<script language="javascript1.2">
<!--

var MessageMax = "{$ibforums->lang['the_max_length']}";
var Override = "{$ibforums->lang['override']}";

function CheckLength() {
MessageLength = document.REPLIER.Post.value.length;
message = "";

if (MessageMax > 0) {
message = "{$ibforums->lang['js_max_length']} " + MessageMax + " {$ibforums->lang['js_characters']}.";
} else {
message = "";
}
alert(message + "\n{$ibforums->lang['js_used']} " + MessageLength + " {$ibforums->lang['js_characters']}.");
}

function ValidateForm() {
MessageLength = document.REPLIER.Post.value.length;
errors = "";

if (MessageMax !=0) {
if (MessageLength > MessageMax) {
errors = "{$ibforums->lang['js_max_length']} " + MessageMax + " {$ibforums->lang['js_characters']}.\n{$ibforums->lang['js_current']}: " + MessageLength;
}
}
if (errors != "" && Override == "") {
alert(errors);
return false;
} else {
document.REPLIER.submit.disabled = true;
return true;
}
}



// IBC Code stuff
var text_enter_url = "{$ibforums->lang['jscode_text_enter_url']}";
var text_enter_url_name = "{$ibforums->lang['jscode_text_enter_url_name']}";
var text_enter_image = "{$ibforums->lang['jscode_text_enter_image']}";
var text_enter_email = "{$ibforums->lang['jscode_text_enter_email']}";
var text_enter_flash = "{$ibforums->lang['jscode_text_enter_flash']}";
var text_code = "{$ibforums->lang['jscode_text_code']}";
var text_quote = "{$ibforums->lang['jscode_text_quote']}";
var error_no_url = "{$ibforums->lang['jscode_error_no_url']}";
var error_no_title = "{$ibforums->lang['jscode_error_no_title']}";
var error_no_email = "{$ibforums->lang['jscode_error_no_email']}";
var error_no_width = "{$ibforums->lang['jscode_error_no_width']}";
var error_no_height = "{$ibforums->lang['jscode_error_no_height']}";
//-->
</script>
<script language='Javascript' src='html/ibfcode.js'></script>

<form action="{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}" method="POST" name='REPLIER'>
<input type='hidden' name='act' value='UserCP'>
<input type='hidden' name='CODE' value='23'>
<input type='hidden' name='s' value='{$ibforums->session_id}'>
<td id='title'><b>{$ibforums->lang['cp_current_sig']}</b></td>
</tr>
<tr>
<td id='row1' align='center'>
<table cellpadding='2' cellspacing='0' width='75%' align='center'>
<tr>
<td id='signature'>$sig</td>
</tr>
</table>
</td>
</tr>
<tr>
<td id='title'><b>{$ibforums->lang['cp_edit_sig']}</b></td>
</tr>
<tr>
<td id='row1' align='center'>
<table cellpadding='2' cellspacing='2' width='100%'>
<tr>
<td nowrap width='10%'>
<input type='button' accesskey='b' value=' B ' onClick='simpletag("B")' class='codebuttons' title="BOLD: [Control / Alt] + b" name='bold' style="font-weight:bold">
<input type='button' accesskey='i' value=' I ' onClick='simpletag("I")' class='codebuttons' title="ITALIC: [Control / Alt] + i" name='italic' style="font-style:italic">
<input type='button' accesskey='u' value=' U ' onClick='simpletag("U")' class='codebuttons' title="UNDERLINE: [Control / Alt] + u" name='under' style="text-decoration:underline">

<select name='ffont' class='codebuttons' onchange="alterfont(this.options[this.selectedIndex].value, 'FONT')">
<option value='0'>{$ibforums->lang['ct_font']}</option>
<option value='Arial' style='font-family:Arial'>{$ibforums->lang['ct_arial']}</option>
<option value='Times' style='font-family:Times'>{$ibforums->lang['ct_times']}</option>
<option value='Courier' style='font-family:Courier'>{$ibforums->lang['ct_courier']}</option>
<option value='Impact' style='font-family:Impact'>{$ibforums->lang['ct_impact']}</option>
<option value='Geneva' style='font-family:Geneva'>{$ibforums->lang['ct_geneva']}</option>
<option value='Optima' style='font-family:Optima'>Optima</option>
</select><select name='fsize' class='codebuttons' onchange="alterfont(this.options[this.selectedIndex].value, 'SIZE')">
<option value='0'>{$ibforums->lang['ct_size']}</option>
<option value='7'>{$ibforums->lang['ct_sml']}</option>
<option value='14'>{$ibforums->lang['ct_lrg']}</option>
<option value='18'>{$ibforums->lang['ct_lest']}</option>
</select><select name='fcolor' class='codebuttons' onchange="alterfont(this.options[this.selectedIndex].value, 'COLOR')">
<option value='0'>{$ibforums->lang['ct_color']}</option>
<option value='blue' style='color:blue'>{$ibforums->lang['ct_blue']}</option>
<option value='red' style='color:red'>{$ibforums->lang['ct_red']}</option>
<option value='purple' style='color:purple'>{$ibforums->lang['ct_purple']}</option>
<option value='orange' style='color:orange'>{$ibforums->lang['ct_orange']}</option>
<option value='yellow' style='color:yellow'>{$ibforums->lang['ct_yellow']}</option>
<option value='gray' style='color:orange'>{$ibforums->lang['ct_grey']}</option>
<option value='green' style='color:green'>{$ibforums->lang['ct_green']}</option>
</select>
</td>
<td align='left'nowrap width='10%'><input type='button' accesskey='c' value=' x ' onClick='closelast()' class='codebuttons' title="Close Current Tag: [Control / Alt] + c" name='bold' style="color:red"> Close Current Tag</td>
</tr>
<tr>
<td align='left'>
<input type='button' accesskey='h' value=' http:// ' onClick='tag_url()' class='codebuttons' title="HYPERLINK: [Control / Alt] + h" style="text-decoration:underline;color:blue">
<input type='button' accesskey='g' value=' IMG ' onClick='tag_image()' class='codebuttons' title="IMG: [Control / Alt] + g" >
<input type='button' accesskey='e' value=' @ ' onClick='tag_email()' class='codebuttons' title="EMAIL: [Control / Alt] + e" style="text-decoration:underline;color:blue">
<input type='button' accesskey='q' value=' Quote ' onClick='simpletag("QUOTE")' class='codebuttons' title="QUOTE: [Control / Alt] + q" name='quote'>
<input type='button' accesskey='p' value=' Code ' onClick='simpletag("CODE")' class='codebuttons' title="CODE: [Control / Alt] + p" name='code'>
<input type='button' accesskey='s' value=' SQL ' onClick='simpletag("SQL")' class='codebuttons' title="SQL: [Control / Alt] + s" name='code'>
<input type='button' accesskey='t' value=' HTML ' onClick='simpletag("HTML")' class='codebuttons' title="HTML: [Control / Alt] + t" name='code'>
</td>
<td align='left'>
<input type='button' accesskey='x' value=' X ' onClick='closeall()' class='codebuttons' title="Close Current Tag: [Control / Alt] + x" name='bold' style="color:red;font-weight:bold"> Close All Tags
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td id='row1' align='center'><textarea cols='60' rows='12' wrap='soft' name='Post' tabindex='3' class='textinput'>$t_sig</textarea><br>(<a href='javascript:CheckLength()'>{$ibforums->lang['check_length']}</a>)</td>
</tr>
<tr>
<td id='row1' align='center'><input type='submit' value='{$ibforums->lang['cp_submit_sig']}'></td>
</tr>
</form>
EOF;
}


Замените это всё на:
Код
function signature($sig, $t_sig) {
global $ibforums;
return <<<EOF
<script language="javascript1.2">
<!--

var MessageMax = "{$ibforums->lang['the_max_length']}";
var Override = "{$ibforums->lang['override']}";

function CheckLength() {
MessageLength = document.REPLIER.Post.value.length;
message = "";

if (MessageMax > 0) {
message = "{$ibforums->lang['js_max_length']} " + MessageMax + " {$ibforums->lang['js_characters']}.";
} else {
message = "";
}
alert(message + "\n{$ibforums->lang['js_used']} " + MessageLength + " {$ibforums->lang['js_characters']}.");
}

function ValidateForm() {
MessageLength = document.REPLIER.Post.value.length;
errors = "";

if (MessageMax !=0) {
if (MessageLength > MessageMax) {
errors = "{$ibforums->lang['js_max_length']} " + MessageMax + " {$ibforums->lang['js_characters']}.\n{$ibforums->lang['js_current']}: " + MessageLength;
}
}
if (errors != "" && Override == "") {
alert(errors);
return false;
} else {
document.REPLIER.submit.disabled = true;
return true;
}
}



// IBC Code stuff
var text_enter_url = "{$ibforums->lang['jscode_text_enter_url']}";
var text_enter_url_name = "{$ibforums->lang['jscode_text_enter_url_name']}";
var text_enter_image = "{$ibforums->lang['jscode_text_enter_image']}";
var text_enter_email = "{$ibforums->lang['jscode_text_enter_email']}";
var text_enter_flash = "{$ibforums->lang['jscode_text_enter_flash']}";
var text_code = "{$ibforums->lang['jscode_text_code']}";
var text_quote = "{$ibforums->lang['jscode_text_quote']}";
var error_no_url = "{$ibforums->lang['jscode_error_no_url']}";
var error_no_title = "{$ibforums->lang['jscode_error_no_title']}";
var error_no_email = "{$ibforums->lang['jscode_error_no_email']}";
var error_no_width = "{$ibforums->lang['jscode_error_no_width']}";
var error_no_height = "{$ibforums->lang['jscode_error_no_height']}";
//-->
</script>

<form action="{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}" method="POST" name='REPLIER'>
<input type='hidden' name='act' value='UserCP'>
<input type='hidden' name='CODE' value='23'>
<input type='hidden' name='s' value='{$ibforums->session_id}'>
<td id='title'><b>{$ibforums->lang['cp_current_sig']}</b></td>
</tr>
<tr>
<td id='row1' align='center'>
<table cellpadding='2' cellspacing='0' width='75%' align='center'>
<tr>
<td id='signature'>$sig</td>
</tr>
</table>
</td>
</tr>
<tr>
<td id='title'><b>{$ibforums->lang['cp_edit_sig']}</b></td>
</tr>
<tr>
<td id='row1' align='center'>
<table cellpadding='2' cellspacing='2' width='100%'>
<tr>
<td nowrap width='10%'>
<script language="javascript" type="text/javascript" src="html/UBBC/ubbc.js"></script>
<script language="javascript" type="text/javascript"><!--
var flash_w = '50';
var ubbc_dir = 'html/UBBC';
var emoticon_dir = 'html/emoticons';
var use_graphics = 1; // 1 = Graphical, 0 = Form based (buttons)
makeInterface(1,1,use_graphics);
//--></script>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td id='row1'><textarea cols="60" rows="12" wrap="soft" name="Post" tabindex="3" class="textinput" onClick="storeCaret(this);" onKeyup="storeCaret(this);" onChange="storeCaret(this);" onFocus="storeCaret(this);">$t_sig</textarea>
<script language="javascript"><!--
ubbcInit(1,1,use_graphics);
//--></script><br>(<a href='javascript:CheckLength()'>{$ibforums->lang['check_length']}</a>)</td>
</tr>
<tr>
<td id='row1'><input type='submit' value='{$ibforums->lang['cp_submit_sig']}'></td>
</tr>
</form>
EOF;
}


Сохраните и закройте файл.
Откройте Skin/s1/skin_post.php и найдите:
Код
function postbox_buttons($data) {
global $ibforums;
return <<<EOF
<script language="javascript1.2">
<!--

var MessageMax = "{$ibforums->lang['the_max_length']}";
var Override = "{$ibforums->lang['override']}";
function emo_pop()
{

window.open('index.{$ibforums->vars['php_ext']}?act=legends&CODE=emoticons&s={$ibforums->session_id}','Legends','width=250,height=500,resizable=yes,scrollbars=yes');

}
function CheckLength() {
MessageLength = document.REPLIER.Post.value.length;
message = "";

if (MessageMax !=0) {
message = "{$ibforums->lang['js_post']}:\n{$ibforums->lang['js_max_length']} " + MessageMax + " {$ibforums->lang['js_characters']}.";
} else {
message = "";
}
alert(message + "\n{$ibforums->lang['js_used']} " + MessageLength + " {$ibforums->lang['js_characters']}.");
}

function ValidateForm(isMsg) {
MessageLength = document.REPLIER.Post.value.length;
errors = "";

if (isMsg == 1)
{
if (document.REPLIER.msg_title.value.length < 2)
{
errors = "{$ibforums->lang['msg_no_title']}";
}
}

if (MessageLength < 2) {
errors = "{$ibforums->lang['js_no_message']}";
}
if (MessageMax !=0) {
if (MessageLength > MessageMax) {
errors = "{$ibforums->lang['js_max_length']} " + MessageMax + " {$ibforums->lang['js_characters']}. {$ibforums->lang['js_current']}: " + MessageLength;
}
}
if (errors != "" && Override == "") {
alert(errors);
return false;
} else {
document.REPLIER.submit.disabled = true;
return true;
}
}



// IBC Code stuff
var text_enter_url = "{$ibforums->lang['jscode_text_enter_url']}";
var text_enter_url_name = "{$ibforums->lang['jscode_text_enter_url_name']}";
var text_enter_image = "{$ibforums->lang['jscode_text_enter_image']}";
var text_enter_email = "{$ibforums->lang['jscode_text_enter_email']}";
var text_enter_flash = "{$ibforums->lang['jscode_text_enter_flash']}";
var text_code = "{$ibforums->lang['jscode_text_code']}";
var text_quote = "{$ibforums->lang['jscode_text_quote']}";
var error_no_url = "{$ibforums->lang['jscode_error_no_url']}";
var error_no_title = "{$ibforums->lang['jscode_error_no_title']}";
var error_no_email = "{$ibforums->lang['jscode_error_no_email']}";
var error_no_width = "{$ibforums->lang['jscode_error_no_width']}";
var error_no_height = "{$ibforums->lang['jscode_error_no_height']}";
//-->
</script>
<script language='Javascript' src='html/ibfcode.js'></script>

<tr>
<td id="subtitle" colspan="2">{$ibforums->lang['ib_code_buttons']}</td>
</tr>
<tr>
<td id='row1'>{$ibforums->lang['ibf_code_txt']}</td>
<td id='row1' width="100%" valign="top">
<table cellpadding='2' cellspacing='2' width='100%' align='center'>
<tr>
<td nowrap width='10%'>
<input type='button' accesskey='b' value=' B ' onClick='simpletag("B")' class='codebuttons' title="BOLD: [Control / Alt] + b" name='bold' style="font-weight:bold">
<input type='button' accesskey='i' value=' I ' onClick='simpletag("I")' class='codebuttons' title="ITALIC: [Control / Alt] + i" name='italic' style="font-style:italic">
<input type='button' accesskey='u' value=' U ' onClick='simpletag("U")' class='codebuttons' title="UNDERLINE: [Control / Alt] + u" name='under' style="text-decoration:underline">

<select name='ffont' class='codebuttons' onchange="alterfont(this.options[this.selectedIndex].value, 'FONT')">
<option value='0'>{$ibforums->lang['ct_font']}</option>
<option value='Arial' style='font-family:Arial'>{$ibforums->lang['ct_arial']}</option>
<option value='Times' style='font-family:Times'>{$ibforums->lang['ct_times']}</option>
<option value='Courier' style='font-family:Courier'>{$ibforums->lang['ct_courier']}</option>
<option value='Impact' style='font-family:Impact'>{$ibforums->lang['ct_impact']}</option>
<option value='Geneva' style='font-family:Geneva'>{$ibforums->lang['ct_geneva']}</option>
<option value='Optima' style='font-family:Optima'>Optima</option>
</select><select name='fsize' class='codebuttons' onchange="alterfont(this.options[this.selectedIndex].value, 'SIZE')">
<option value='0'>{$ibforums->lang['ct_size']}</option>
<option value='1'>{$ibforums->lang['ct_sml']}</option>
<option value='7'>{$ibforums->lang['ct_lrg']}</option>
<option value='14'>{$ibforums->lang['ct_lest']}</option>
</select><select name='fcolor' class='codebuttons' onchange="alterfont(this.options[this.selectedIndex].value, 'COLOR')">
<option value='0'>{$ibforums->lang['ct_color']}</option>
<option value='blue' style='color:blue'>{$ibforums->lang['ct_blue']}</option>
<option value='red' style='color:red'>{$ibforums->lang['ct_red']}</option>
<option value='purple' style='color:purple'>{$ibforums->lang['ct_purple']}</option>
<option value='orange' style='color:orange'>{$ibforums->lang['ct_orange']}</option>
<option value='yellow' style='color:yellow'>{$ibforums->lang['ct_yellow']}</option>
<option value='gray' style='color:gray'>{$ibforums->lang['ct_grey']}</option>
<option value='green' style='color:green'>{$ibforums->lang['ct_green']}</option>
</select>
</td>
<td align='left'nowrap width='10%'><input type='button' accesskey='c' value=' x ' onClick='closelast()' class='codebuttons' title="Close Current Tag: [Control / Alt] + c" name='bold' style="color:red"> Close Current Tag</td>
</tr>
<tr>
<td align='left'>
<input type='button' accesskey='h' value=' http:// ' onClick='tag_url()' class='codebuttons' title="HYPERLINK: [Control / Alt] + h" style="text-decoration:underline;color:blue">
<input type='button' accesskey='g' value=' IMG ' onClick='tag_image()' class='codebuttons' title="IMG: [Control / Alt] + g" >
<input type='button' accesskey='e' value=' @ ' onClick='tag_email()' class='codebuttons' title="EMAIL: [Control / Alt] + e" style="text-decoration:underline;color:blue">
<input type='button' accesskey='q' value=' Quote ' onClick='simpletag("QUOTE")' class='codebuttons' title="QUOTE: [Control / Alt] + q" name='quote'>
<input type='button' accesskey='p' value=' Code ' onClick='simpletag("CODE")' class='codebuttons' title="CODE: [Control / Alt] + p" name='code'>
<input type='button' accesskey='s' value=' SQL ' onClick='simpletag("SQL")' class='codebuttons' title="SQL: [Control / Alt] + s" name='code'>
<input type='button' accesskey='t' value=' HTML ' onClick='simpletag("HTML")' class='codebuttons' title="HTML: [Control / Alt] + t" name='code'>
</td>
<td align='left'>
<input type='button' accesskey='x' value=' X ' onClick='closeall()' class='codebuttons' title="Close Current Tag: [Control / Alt] + x" name='bold' style="color:red;font-weight:bold"> Close All Tags
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td id="subtitle" colspan="2">{$ibforums->lang['post']}</td>
</tr>
<tr>
<td id='row1'>(<a href='javascript:CheckLength()'>{$ibforums->lang['check_length']}</a>)<br><br><!--SMILIE TABLE--><img src="{$ibforums->vars['img_url']}/spacer.gif" alt="" width="180" height="1"></td>
<td id='row1' width="100%" valign="top"><textarea cols='80' rows='15' wrap='soft' name='Post' tabindex='3' class='textinput'>$data</textarea><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type='checkbox' name='enableemo' value='yes' checked></td>
<td width="100%">{$ibforums->lang['enable_emo']}</td>
</tr>
<tr>
<td><input type='checkbox' name='enablesig' value='yes' checked></td>
<td width="100%">{$ibforums->lang['enable_sig']}</td>
</tr>
</table></td>
</tr>
EOF;
}


Замените это на:
Код
function postbox_buttons($data) {
global $ibforums;
return <<<EOF
<script language="javascript1.2">
<!--

var MessageMax = "{$ibforums->lang['the_max_length']}";
var Override = "{$ibforums->lang['override']}";
function emo_pop()
{

window.open('index.{$ibforums->vars['php_ext']}?act=legends&CODE=emoticons&s={$ibforums->session_id}','Legends','width=250,height=500,resizable=yes,scrollbars=yes');

}
function CheckLength() {
MessageLength = document.REPLIER.Post.value.length;
message = "";

if (MessageMax !=0) {
message = "{$ibforums->lang['js_post']}:\n{$ibforums->lang['js_max_length']} " + MessageMax + " {$ibforums->lang['js_characters']}.";
} else {
message = "";
}
alert(message + "\n{$ibforums->lang['js_used']} " + MessageLength + " {$ibforums->lang['js_characters']}.");
}

function ValidateForm(isMsg) {
MessageLength = document.REPLIER.Post.value.length;
errors = "";

if (isMsg == 1)
{
if (document.REPLIER.msg_title.value.length < 2)
{
errors = "{$ibforums->lang['msg_no_title']}";
}
}

if (MessageLength < 2) {
errors = "{$ibforums->lang['js_no_message']}";
}
if (MessageMax !=0) {
if (MessageLength > MessageMax) {
errors = "{$ibforums->lang['js_max_length']} " + MessageMax + " {$ibforums->lang['js_characters']}. {$ibforums->lang['js_current']}: " + MessageLength;
}
}
if (errors != "" && Override == "") {
alert(errors);
return false;
} else {
document.REPLIER.submit.disabled = true;
return true;
}
}



// IBC Code stuff
var text_enter_url = "{$ibforums->lang['jscode_text_enter_url']}";
var text_enter_url_name = "{$ibforums->lang['jscode_text_enter_url_name']}";
var text_enter_image = "{$ibforums->lang['jscode_text_enter_image']}";
var text_enter_email = "{$ibforums->lang['jscode_text_enter_email']}";
var text_enter_flash = "{$ibforums->lang['jscode_text_enter_flash']}";
var text_code = "{$ibforums->lang['jscode_text_code']}";
var text_quote = "{$ibforums->lang['jscode_text_quote']}";
var error_no_url = "{$ibforums->lang['jscode_error_no_url']}";
var error_no_title = "{$ibforums->lang['jscode_error_no_title']}";
var error_no_email = "{$ibforums->lang['jscode_error_no_email']}";
var error_no_width = "{$ibforums->lang['jscode_error_no_width']}";
var error_no_height = "{$ibforums->lang['jscode_error_no_height']}";

function taLimit() {
var taObj=event.srcElement;
if (taObj.value.length==taObj.maxLength*1) return false;
}

function taCount(visCnt) {
var taObj=event.srcElement;
if (taObj.value.length>taObj.maxLength*1) taObj.value=taObj.value.substring(0,taObj.maxLength*1);
if (visCnt) visCnt.innerText=taObj.maxLength-taObj.value.length;
}


//-->
</script>

<tr>
<td id="subtitle" colspan="2">{$ibforums->lang['ib_code_buttons']}</td>
</tr>
<tr>
<td id='row1'>{$ibforums->lang['ibf_code_txt']}</td>
<td id='row1' width="100%" valign="top">


<script language="javascript" type="text/javascript" src="html/UBBC/ubbc.js"></script>
<script language="javascript" type="text/javascript"><!--
var flash_w = '200'; var flash_h = '400';
var ubbc_dir = 'html/UBBC';
var emoticon_dir = 'html/emoticons';
var use_graphics = 1; // 1 = Graphical, 0 = Form based (buttons)
makeInterface(1,1,use_graphics);
//--></script>
</td>
<tr>
<td id="subtitle" colspan="2">{$ibforums->lang['post']}</td>
</tr>
<tr>
<td id='row1'>(<a href='javascript:CheckLength()'>{$ibforums->lang['check_length']}</a>)<br><font class="textfont">Максимальное количество символов <font color="#FF0000">1024000</font>.<br>
<br><!--SMILIE TABLE--><img src="{$ibforums->vars['img_url']}/spacer.gif" alt="" width="180" height="1"></td>
<td id='row1' width="100%" valign="top"><textarea cols="60" rows="12" wrap="soft" name="Post" tabindex="3" class="textinput" onClick="storeCaret(this);" onKeyup="storeCaret(this);" onChange="storeCaret(this);" onFocus="storeCaret(this);">$data</textarea>
<script language="javascript"><!--
ubbcInit(1,1,use_graphics);
//--></script>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type='checkbox' name='enableemo' value='yes' checked></td>
<td width="100%">{$ibforums->lang['enable_emo']}</td>
</tr>
<tr>
<td><input type='checkbox' name='enablesig' value='yes' checked></td>
<td width="100%">{$ibforums->lang['enable_sig']}</td>
</tr>
</table></td>
</tr>
EOF;
}


Найдите в этом же файле:
Код
function EndForm($data) {
global $ibforums;
return <<<EOF
<tr>
<td id='mainfoot' align="center" colspan="2"><input type="submit" name="submit" value="$data" tabindex='4' class="ibcButton">&nbsp;
<input type="submit" name="preview" value="{$ibforums->lang['button_preview']}" tabindex='5' class="ibcButton"></td>
</tr>
</table>
</td>
</tr>
</form>
</table>


На следующую строку добавьте:
Код
<script language='Javascript' src='html/ibfcode.js'></script>


Сохраните и закройте файл

Откройте sources/lib/post_parser.php и найдите:
Код
// Start off with the easy stuff

$txt = preg_replace( "#[b](.+?)[/b]#is", "<b>\1</b>", $txt );
$txt = preg_replace( "#[i](.+?)[/i]#is", "<i>\1</i>", $txt );
$txt = preg_replace( "#[u](.+?)[/u]#is", "<u>\1</u>", $txt );
$txt = preg_replace( "#[s](.+?)[/s]#is", "<s>\1</s>", $txt );


Ниже добавьте:
Код
$txt = preg_replace( "#[shadow=(S+?)s*](.*?)[/shadow]#is", "<font style='width=80%; filter:shadow(color=\1)'>\2</font>", $txt );
$txt = preg_replace( "#[glow=(S+?)s*](.*?)[/glow]#is", "<font style='width=80%; filter:glow(color=\1)'>\2</font>", $txt );
$txt = preg_replace( "#[fliph](.+?)[/fliph]#is", "<font style='width=80%; filter:flipH'>\1</font>", $txt );
$txt = preg_replace( "#[flipv](.+?)[/flipv]#is", "<font style='width=80%; filter:flipV'>\1</font>", $txt );
$txt = preg_replace( "#[move](.+?)[/move]#is", "<marquee>\1</marquee>", $txt );
$txt = preg_replace( "#[blur](.*?)[/blur]#is", "<font style='width=80%; filter:blur'>\1</font>", $txt );
$txt = preg_replace( "#[aligns*=s*(S+?)s*](.*?)[/align]#is", "<div align="\1">\2</div>", $txt );
$txt = preg_replace( "#[dropshadow=(S+?)s*](.*?)[/dropshadow]#is", "<font style='width=80%; filter:dropshadow(color=\1)'>\2</font>", $txt );
$txt = preg_replace( "#([invert])(.+?)([/invert])#is", "<font style='width=80%; filter:invert'>\2</font>", $txt );
$txt = preg_replace( "#([xray])(.+?)([/xray])#is", "<font style='width=80%; filter:xray'>\2</font>", $txt );
$txt = preg_replace( "#[spoiler](.*)[/spoiler]#is", "<!-- spoilerKillit --><table border="0" cellpadding="0" cellspacing="0"><tr><td bgcolor="#000000" valign="middle" align="left"><font color="#000000" size="1"><b>Скрытый текст (Выделите для чтения):</b></font><br></td></tr><tr><td bgcolor="#ffffff" valign="middle" align="left"><font color="#ffffff" size="1"><!-- spoilerKillitEnd --><!--txtStart-->\1<!--txtEnd--><!-- spoilerKillit --></td></tr></table><!-- spoilerKillitEnd -->", $txt );


Найдите здесь же:
Код
/**************************************************/
// unconvert:
// Parses the HTML back into plain text
/**************************************************/

function unconvert($txt="", $code=1, $html=0) {

if ($code == 1)
{


Ниже добавьте:
Код
$txt = preg_replace( "#(<font style='width=80%; filter:invert'>)(.+?)(</font>)#is", "[invert]\2[/invert]", $txt );
$txt = preg_replace( "#(<font style='width=80%; filter:xray'>)(.+?)(</font>)#is", "[xray]\2[/xray]", $txt );
$txt = preg_replace( "#(<marquee>)(.+?)(</marquee>)#is", "[move]$2[/move]", $txt );
$txt = preg_replace( "#(<font style='width=80%; filter:glow(color=)(.+?)()'>)(.+?)(</font>)#is", "[glow=\2]\4[/glow]", $txt );
$txt = preg_replace( "#(<font style='width=80%; filter:shadow(color=)(.+?)()'>)(.+?)(</font>)#is", "[shadow=\2]\4[/shadow]", $txt );
$txt = preg_replace( "#(<font style='width=80%; filter:flipV'>)(.+?)(</font>)#is", "[flipv]\2[/flipv]", $txt );
$txt = preg_replace( "#(<font style='width=80%; filter:flipH'>)(.+?)(</font>)#is", "[fliph]\2[/fliph]", $txt );
$txt = preg_replace( '#(<div align=")(.+?)(">)(.+?)(</div>)#is', "[ALIGN=\2]\4[/ALIGN]", $txt );
$txt = preg_replace( "#(<font style='width=80%; filter:blur'>)(.+?)(</font>)#is", "[blur]\2[/blur]", $txt );
$txt = preg_replace( "#(<font style='width=80%; filter:dropshadow(color=)(.+?)()'>)(.+?)(</font>)#is", "[dropshadow=\2]\4[/dropshadow]", $txt );
$txt = preg_replace( "#(<!--txtStart-->)(.+?)(<!--txtEnd-->)#is", "[spoiler]\2[/spoiler]", $txt );
$txt = preg_replace( "#(<!-- spoilerKillit -->)(.+?)(<!-- spoilerKillitEnd -->)#is", "", $txt );


Сохраните и закройте файл
Откройте файл sources/Topic.php и найдите:
Код
//-------------------------------------
// Print all the output
//-------------------------------------


Ниже добавьте:
Код
if ($this->topic['poll_state'] == 'closed' and $ibforums->member['g_is_supadmin'] != 1)
 {    $allow = 0;    }
 
 if ($this->topic['starter_id'] == $ibforums->member['id'])
 {    $allow = 0;    }
 
 if ($this->topic['starter_id'] != $ibforums->member['id'])
 { if (! $ibforums->member['g_reply_own_topics']) { $allow = 0;    } }
 
 $this->m_group = $ibforums->member['mgroup'];
 
 if ($class->forum['reply_perms'] != '*') { if ( !preg_match( "/(^|,)$this->m_group(,|$)/", $this->forum['reply_perms'] ) ) { $allow = 1; }}
 
 if ($this->forum['reply_perms'] == '*')
 { $allow = 1;  }
 
 if ($this->topic['state'] != 'open')
 {  $allow = 0;    }

 if ($ibforums->member['id'] == "" AND $allow != 1)
 {    $allow = 0;}
 
 if($allow == 1)
 {    
     if (!$ibforums->member['id'])
     {    
     $data['guest_box'] = "<input type='text' size='40' maxlength='50' name='UserName' value='Enter your name' tabindex='1' class='forminput' onMouseOver='this.focus()'>";
     }
     
     $data['f'] = $this->forum['id'];
     $data['t'] = $this->topic['tid'];
     
     $this->output .= $this->html->quickreply($data);
 }


Сохраните изменения.

Откройте файл /Skin/S1/skin_topic.php и в самом начале файла увидите такую строку:
Код
class skin_topic {


Ниже добавьте:
Код
function quickreply($data) {
global $ibforums;
return <<<EOF
<script language="javascript1.2">
<!--
var MessageMax = "{$ibforums->lang['the_max_length']}";
var Override = "{$ibforums->lang['override']}";

function emo_pop()
{

window.open('index.{$ibforums->vars['php_ext']}?act=legends&CODE=emoticons&s={$ibforums->session_id}','Legends','width=250,height=500,resizable=yes,scrollbars=yes');

}
function CheckLength() {
MessageLength = document.REPLIER.Post.value.length;
message = "";

if (MessageMax !=0) {
message = "{$ibforums->lang['js_post']}:\n{$ibforums->lang['js_max_length']} " + MessageMax + " {$ibforums->lang['js_characters']}.";
} else {
message = "";
}
alert(message + "\n{$ibforums->lang['js_used']} " + MessageLength + " {$ibforums->lang['js_characters']}.");
}

function ValidateForm(isMsg) {
MessageLength = document.REPLIER.Post.value.length;
errors = "";

if (isMsg == 1)
{
if (document.REPLIER.msg_title.value.length < 2)
{
errors = "{$ibforums->lang['msg_no_title']}";
}
}

if (MessageLength < 2) {
errors = "{$ibforums->lang['js_no_message']}";
}
if (MessageMax !=0) {
if (MessageLength > MessageMax) {
errors = "{$ibforums->lang['js_max_length']} " + MessageMax + " {$ibforums->lang['js_characters']}. {$ibforums->lang['js_current']}: " + MessageLength;
}
}
if (errors != "" && Override == "") {
alert(errors);
return false;
} else {
document.REPLIER.submit.disabled = true;
return true;
}
}
var text_enter_url = "{$ibforums->lang['jscode_text_enter_url']}";
var text_enter_url_name = "{$ibforums->lang['jscode_text_enter_url_name']}";
var text_enter_image = "{$ibforums->lang['jscode_text_enter_image']}";
var text_enter_email = "{$ibforums->lang['jscode_text_enter_email']}";
var text_enter_flash = "{$ibforums->lang['jscode_text_enter_flash']}";
var text_code = "{$ibforums->lang['jscode_text_code']}";
var text_quote = "{$ibforums->lang['jscode_text_quote']}";
var error_no_url = "{$ibforums->lang['jscode_error_no_url']}";
var error_no_title = "{$ibforums->lang['jscode_error_no_title']}";
var error_no_email = "{$ibforums->lang['jscode_error_no_email']}";
var error_no_width = "{$ibforums->lang['jscode_error_no_width']}";
var error_no_height = "{$ibforums->lang['jscode_error_no_height']}";

function taLimit() {
var taObj=event.srcElement;
if (taObj.value.length==taObj.maxLength*1) return false;
}

function taCount(visCnt) {
var taObj=event.srcElement;
if (taObj.value.length>taObj.maxLength*1) taObj.value=taObj.value.substring(0,taObj.maxLength*1);
if (visCnt) visCnt.innerText=taObj.maxLength-taObj.value.length;
}

//-->
</script>
<form action='{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}' method='POST' name='REPLIER'>
<input type='hidden' name='st' value='0'>
<input type='hidden' name='act' value='Post'>
<input type='hidden' name='f' value='$data[f]'>
<input type='hidden' name='CODE' value='03'>
<input type='hidden' name='t' value='$data[t]'>
<input type='hidden' name='enableemo' value='yes'>
<input type='hidden' name='enablesig' value='yes'>
<table cellpadding='0' cellspacing='1' border='0' width='80%' bgcolor='{$ibforums->skin['tbl_border']}' align='center'>
<tr>
<td>
<table cellpadding='4' cellspacing='1' border='0' width='100%' id='row1'>
<tr>
<td align='center' colspan='3' id='titlemedium'>Быстрый ответ в тему</td>
</tr>
<tr>
<td id='category' align='left' colspan='3'>Введите ответ ниже:</td>
</tr>
<tr>

<td id='row1' align='center' colspan='2'>$data[guest_box]</td>
</tr>
<tr>
<td id="subtitle" colspan="2">Коды форума</td>
</tr>
<tr>
<td id='row1' width="20%">Наведите мышь на интересующую кнопку для получения дополнительной информации.</td>
<td id='row1' width="100%" valign="top">
<script language="javascript" type="text/javascript" src="html/UBBC/ubbc.js"></script>
<script language="javascript" type="text/javascript"><!--
var flash_w = '200'; var flash_h = '400';
var ubbc_dir = 'html/UBBC';
var emoticon_dir = 'html/emoticons';
var use_graphics = 1; // 1 = Graphical, 0 = Form based (buttons)
makeInterface(1,1,use_graphics);
//--></script>
</td>
</tr>


</td>
</tr>
<tr>
<td id="subtitle" colspan="2">Ваше сообщение</td>
</tr>
<tr>
<td id='row1'>
<table align="center" cellspacing='1' cellpadding='3' border='0' id='row2' style="border-width:1px; border-color:{$ibforums->skin['tbl_border']}; border-style:solid; width:95%" align='left'>
<tr>
<td colspan='{$ibforums->vars['emo_per_row']}' align='center'>{$ibforums->lang['click_smilie']}</td>
</tr>
<!--THE SMILIES-->
<tr>
<td colspan='{$ibforums->vars['emo_per_row']}' id='row1' align='center'><a href='javascript:emo_pop()'>{$ibforums->lang['all_emoticons']}</a></td>
</tr>
</table>
<img src="{$ibforums->vars['img_url']}/spacer.gif" alt="" width="180" height="1"></td>
<td id='row1' width="100%" valign="top"> <textarea cols="60" rows="12" wrap="soft" name="Post" tabindex="3" class="textinput" onClick="storeCaret(this);" onKeyup="storeCaret(this);" onChange="storeCaret(this);" onFocus="storeCaret(this);"></textarea>
<script language="javascript"><!--
ubbcInit(1,1,use_graphics);
//--></script></td>
</tr>
<tr>
<td id="subtitle" colspan="2" align='center'>
<input type="submit" name="submit" value="Отправить" tabindex='4' class="ibcButton">&nbsp;
<input type="submit" name="preview" value="Просмотр" tabindex='5' class="ibcButton">
</td>
</tr>
</table>
</form>
</table>

<br>

EOF;
}


Сохраните и закройте файл.
Загрузите все отредактированные файлы на свои места.
Скачайте этот зип архив . Создайте в папке html , новую папку с названием UBBC
Загрузите все файлы из этого архива в эту папку
Зайдите в админпанель Skins & Templates/ Manage Skin Templates и в Template Tools
выберите Rebuild editable templates from php skin files и жмите на кнопку Run Tool

Можете пользоваться :)
IgorekM
Теперь, кто хочет сделать форму быстрого создания новой темы.

Откройте sources/Forums.php и найдите:
Код
$this->output .= $this->html->TableEnd($this->forum);


Ниже добавьте:
Код
if (! $ibforums->member['g_post_new_topics'])
 { $allow = 0;}
   
 if ($this->forum['start_perms'] != '*')
 {
 if (preg_match( "/".$ibforums->member['mgroup']."/", $this->forum['start_perms'] ))
 { $allow = 1; } }
 
 if ($this->forum['start_perms'] == '*')
 { $allow = 1; }
 
 if($allow == 1)
 {
     $data['f'] = $this->forum['id'];
     if(!$ibforums->member['id'])
     {    $data['guest_box'] = "<input type='text' size='40' maxlength='50' name='UserName' value='Введите Ваше имя' tabindex='1' class='forminput' onMouseOver='this.focus()'>";    }    
 
 
 $this->output .= $this->html->quickpost($data);
 }


Сохраните изменения
Откройте файл /Skin/S1/skin_forum.php и в самом начале файла найдите:
Код
class skin_forum {


Ниже добавьте:
Код
function quickpost($data) {
global $ibforums;
return <<<EOF
<script language="javascript1.2">
<!--
var MessageMax = "{$ibforums->lang['the_max_length']}";
var Override = "{$ibforums->lang['override']}";

function emo_pop()
{

window.open('index.{$ibforums->vars['php_ext']}?act=legends&CODE=emoticons&s={$ibforums->session_id}','Legends','width=250,height=500,resizable=yes,scrollbars=yes');

}
function CheckLength() {
MessageLength = document.REPLIER.Post.value.length;
message = "";

if (MessageMax !=0) {
message = "{$ibforums->lang['js_post']}:\n{$ibforums->lang['js_max_length']} " + MessageMax + " {$ibforums->lang['js_characters']}.";
} else {
message = "";
}
alert(message + "\n{$ibforums->lang['js_used']} " + MessageLength + " {$ibforums->lang['js_characters']}.");
}

function ValidateForm(isMsg) {
MessageLength = document.REPLIER.Post.value.length;
errors = "";

if (isMsg == 1)
{
if (document.REPLIER.msg_title.value.length < 2)
{
errors = "{$ibforums->lang['msg_no_title']}";
}
}

if (MessageLength < 2) {
errors = "{$ibforums->lang['js_no_message']}";
}
if (MessageMax !=0) {
if (MessageLength > MessageMax) {
errors = "{$ibforums->lang['js_max_length']} " + MessageMax + " {$ibforums->lang['js_characters']}. {$ibforums->lang['js_current']}: " + MessageLength;
}
}
if (errors != "" && Override == "") {
alert(errors);
return false;
} else {
document.REPLIER.submit.disabled = true;
return true;
}
}
var text_enter_url = "{$ibforums->lang['jscode_text_enter_url']}";
var text_enter_url_name = "{$ibforums->lang['jscode_text_enter_url_name']}";
var text_enter_image = "{$ibforums->lang['jscode_text_enter_image']}";
var text_enter_email = "{$ibforums->lang['jscode_text_enter_email']}";
var text_enter_flash = "{$ibforums->lang['jscode_text_enter_flash']}";
var text_code = "{$ibforums->lang['jscode_text_code']}";
var text_quote = "{$ibforums->lang['jscode_text_quote']}";
var error_no_url = "{$ibforums->lang['jscode_error_no_url']}";
var error_no_title = "{$ibforums->lang['jscode_error_no_title']}";
var error_no_email = "{$ibforums->lang['jscode_error_no_email']}";
var error_no_width = "{$ibforums->lang['jscode_error_no_width']}";
var error_no_height = "{$ibforums->lang['jscode_error_no_height']}";

function taLimit() {
var taObj=event.srcElement;
if (taObj.value.length==taObj.maxLength*1) return false;
}

function taCount(visCnt) {
var taObj=event.srcElement;
if (taObj.value.length>taObj.maxLength*1) taObj.value=taObj.value.substring(0,taObj.maxLength*1);
if (visCnt) visCnt.innerText=taObj.maxLength-taObj.value.length;
}

//-->
</script>

<form action='{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}' method='POST' name='REPLIER'>
<input type='hidden' name='st' value='0'>
<input type='hidden' name='act' value='Post'>
<input type='hidden' name='s' value='{$ibforums->session_id}'>
<input type='hidden' name='f' value='{$data[f]}'>
<input type='hidden' name='CODE' value='01'>
<input type='hidden' name='enableemo' value='yes'>
<input type='hidden' name='enablesig' value='yes'>

<table cellspacing="2" cellpadding="2" border="0" align="center" width="60%">
<tr>
<td id="subtitle" colspan="2" align="center" >Быстрое создание новой темы</td>
</tr>
<tr>
<td id='row1' width="10%">Topic Title:</td>
<td id='row1'><input type="text" name="tut_title" size="45" class='forminput'></td>
</tr>
<tr>
<td id='row1'>Description:</td>
<td id='row1'><input type="text" name="tut_author" size="45" class='forminput'></td>
</tr>
<tr>
<td id="subtitle" colspan="2">Коды форума</td>
</tr>
<tr>
<td id='row1' width="20%">Наведите мышь на интересующую кнопку для получения дополнительной информации.</td>
<td id='row1' width="100%" valign="top">
<script language="javascript" type="text/javascript" src="html/UBBC/ubbc.js"></script>
<script language="javascript" type="text/javascript"><!--
var flash_w = '200'; var flash_h = '400';
var ubbc_dir = 'html/UBBC';
var emoticon_dir = 'html/emoticons';
var use_graphics = 1; // 1 = Graphical, 0 = Form based (buttons)
makeInterface(1,1,use_graphics);
//--></script>
</td>
</tr>
<tr>
<td id="subtitle" colspan="2">Ваше сообщение</td>
</tr>
<tr>
<td id='row1'>
<table align="center" cellspacing='1' cellpadding='3' border='0' id='row2' style="border-width:1px; border-color:{$ibforums->skin['tbl_border']}; border-style:solid; width:95%" align='left'>
<tr>
<td colspan='{$ibforums->vars['emo_per_row']}' align='center'>{$ibforums->lang['click_smilie']}</td>
</tr>
<!--THE SMILIES-->
<tr>
<td colspan='{$ibforums->vars['emo_per_row']}' id='row1' align='center'><a href='javascript:emo_pop()'>{$ibforums->lang['all_emoticons']}</a></td>
</tr>
</table>
<img src="{$ibforums->vars['img_url']}/spacer.gif" alt="" width="180" height="1"></td>
<td id='row1' width="100%" valign="top"><textarea cols="60" rows="12" wrap="soft" name="Post" tabindex="3" class="textinput" onClick="storeCaret(this);" onKeyup="storeCaret(this);" onChange="storeCaret(this);" onFocus="storeCaret(this);"></textarea>
<script language="javascript"><!--
ubbcInit(1,1,use_graphics);
//--></script></td>
</tr>
<tr>
<td id="subtitle" colspan="2" align='center'>
<input type="submit" name="submit" value="Отправить" tabindex='4' class="ibcButton">&nbsp;
<input type="submit" name="preview" value="Просмотр" tabindex='5' class="ibcButton">
</td>
</tr>
</table></form>
<br>
EOF;
}


Сохраните и закройте файл. Загрузите отредактированные файлы на свои места.
Зайдите в админпанель Skins & Templates/ Manage Skin Templates и в Template Tools
выберите Rebuild editable templates from php skin files и жмите на кнопку Run Tool
Готово!!! :)
Mr.X
Цитата
Скачайте этот зип архив . Создайте в папке html , новую папку с названием UBBC


а если мсоя папка называется не html ? и форум в еще не в ней а в директори forum ... как тут делать ?
IgorekM
KolDunchiK
Внимательно посмотри в директорию САМОГО форума . В самом форуме (как бы ты его папку не назвал) , по умолчанию есть папка html , в которой хранятся все смайлики , аватары и т.д.
Mr.X
сколько не пытался ставить ... не ставится , все время ошибки выдает ...

Parse error: parse error, unexpected T_LNUMBER in /vhosts/koldunchik.mthost.ru/htdocs/forum/sources/lib/post_parser.php on line 190

Fatal error: Cannot instantiate non-existent class: post_parser in /vhosts/koldunchik.mthost.ru/htdocs/forum/sources/Topics.php on line 68
IgorekM
KolDunchiK
Зипани свои файлы skin_topic.php , post_parser.php и Topics.php , выложи куда-нибудь . Я скачаю и гляну на них . Только просьба на сервак этого форума (обменник, тема) не выкладывать.
Mr.X
все , послал тебе В ПМ , буду рад если поможешь .. а то я не знаю что и делать ... :)
The Undertaker
напишите чтоль сюда решение проблемы, а то других обделяете.....
IgorekM
KolDunchiK
Вроде всё правильно. Ты сделал Rebuild editable templates from php skin files ?
Мне кажется ты сделал наоборот - Rebuild php skin files from editable templates
На всякий случай отредактировал твои файлы и выслыаю тебе на мыло.
drSAB
IgorekM
А все таки, в этих формах - нельзя ли сделать так, чтобы сохранялись настройки пользователя? я вначале грешил на кукисы, но проверил на куче компов - постоянно идет сброс настроек. Так в нашей форме, здесь на форуме, стоит по умолчанию опция - "искать не позже 30 дней" и если кто не заметит - пойдут новые темы...
IgorekM
drSAB
Я постараюсь . Но честно говоря ничего не могу обещать, так как с этим движком ещё не полностью разобрался и многое здесь для меня пока тёмно. Но всё запроы пользователей я учёл и буду по мере возможности исправлять это всё.
The Undertaker
IgorekM
я больше не могу!!! вот что мне выдаётся при нажатии Rebuild editable templates from php skin files

Код

Warning: fopen("./style_templates/1/ModCPView.html", "w") - Permission denied in /home/virtual/site25/fst/var/www/html/ forums/sources/Admin/ad_templates.php on line 739

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 740

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 741

Warning: fopen("./style_templates/1/ReportView.html", "w") - Permission denied in /home/virtual/site25/fst/var/www/html/forums/ sources/Admin/ad_templates.php on line 739

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 740

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 741

Warning: fopen("./style_templates/1/skin_boards.html", "w") - Permission denied in /home/virtual/site25/fst/var/www/html/forums/ sources/Admin/ad_templates.php on line 739

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 740

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 741

Warning: fopen("./style_templates/1/skin_emails.html", "w") - Permission denied in /home/virtual/site25/fst/var/www/html/forums/ sources/Admin/ad_templates.php on line 739

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 740

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 741

Warning: fopen("./style_templates/1/skin_forum.html", "w") - Permission denied in /home/virtual/site25/fst/var/www/html/forums/ sources/Admin/ad_templates.php on line 739

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 740

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 741

Warning: fopen("./style_templates/1/skin_global.html", "w") - Permission denied in /home/virtual/site25/fst/var/www/html/forums/ sources/Admin/ad_templates.php on line 739

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 740

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 741

Warning: fopen("./style_templates/1/skin_help.html", "w") - Permission denied in /home/virtual/site25/fst/var/www/html/forums/ sources/Admin/ad_templates.php on line 739

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 740

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 741

Warning: fopen("./style_templates/1/skin_legends.html", "w") - Permission denied in /home/virtual/site25/fst/var/www/html/forums/ sources/Admin/ad_templates.php on line 739

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 740

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 741

Warning: fopen("./style_templates/1/skin_login.html", "w") - Permission denied in /home/virtual/site25/fst/var/www/html/forums/ sources/Admin/ad_templates.php on line 739

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 740

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 741

Warning: fopen("./style_templates/1/skin_mlist.html", "w") - Permission denied in /home/virtual/site25/fst/var/www/html/forums/ sources/Admin/ad_templates.php on line 739

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 740

Warning: Supplied argument is not a valid File-Handle resource in /home/virtual/site25/fst/var/www/html/forums/sources/Admin/ ad_templates.php on line 741

Warning: fopen("./style_templates/1/skin_mod.html", "w") - Permission denied in /home/virtual/site25/fst/var/www/html/forums/ sources/Admin/ad_templates.php on line 739


и дальше всё подобное :( помоги ставил чмоды на папки по разному 777, везде пробывал, результат один...
The Undertaker
вроде уже всё работаёт! я поставил на все файлы в папке /style_templates/1/ чмод 666 :)
IgorekM
The Undertaker
Ну конечно же будет выдаваться такая фигня, когда ты установил неправильные атрибуты к папкам и файлам .
Директории sources, Admin, style_templates, Skin, sX и т.д.
Установи на них атрибуты CHMOD 777, а на файлы, находящиеся в них , надо установить атрибут на запись - 666
Mr.X
все равно ... пишет при нажатии на тему
Fatal error: Call to undefined function: quickreply() in /vhosts/koldunchik.mthost.ru/htdocs/forum/sources/Topics.php on line 648
Mr.X
ВСе .. наконец то установил ... я вот все не понимал почему нужно некоторые загрузить файлы в директорию s1 (b щас не понимаю ) у меня есть папки s1 s2 и s3 .. я взял да и загрузил во все :)

А теперь можете обьяснить что это за папки ?
IgorekM
KolDunchiK
s2 и s3 это папки твоих скинов . Это значит, что у тебя установлено 3 скина на форуме. И в каждомм скине ты должен по отдельности редактирвоать эти файлы. Иначе , у кого из пользователей сменен скин, они не смогут зайти в темы.
Warmonger
можь я че пропустил, но очень хочется получить ответ на следующий вопрос:

глупая прокрутка страницы на самый низ в форму быстрого ответа/создания тема так и останется?..
имхо ето минус форума..
IgorekM
Warmonger
Пока не получается, но будет исправлено . И здесь не место таким вопросам . В этом разделе вопросы только о скриптах и не более . О багах пиши в тему , которая уже давным давно создана!!!
The Undertaker
IgorekM
хм, а вот я щас скажу, и должно получится :)
Чтоб не кидало вниз в теме, попробуй вот что:
Открой файл /Skin/S1/skin_topic.php и найди

<textarea cols="60" rows="12" wrap="soft" name="Post" tabindex="3" class="textinput" onClick="storeCaret(this);" onKeyup="storeCaret(this);" onChange="storeCaret(this);" onFocus="storeCaret(this);"></textarea>

замени это на: <textarea cols="60" rows="12" wrap="soft" name="Post" tabindex="3" class="textinput"></textarea>

думаю что полсе этого кидать вниз не будет!
IgorekM
The Undertaker
А вот фиг ты угадал gigi.gif
И падение вниз продолжается :)
Я написал письмо автору этого хака и прикинь .Даже он не смог с этим разобраться. Пишет что я и сам не могу понять в чём дело . Я сначала не поверил и решил зайти к нему на форум. И каково было моё удивление, когда я увидел что им у него на форуме так же кидает вниз :)
The Undertaker
тут явно что-то с полем где пишешь, т.к. курсор сразу в нём мигает, значит идёт переход на поле...
IgorekM
Вот . Можешь и сам заглянуть к нему на форум :) http://www.jaddo.net/forums/index.php?act=...644d68eb9f369ef => http://www.jaddo.net/forums/index.php?act=ST&f=1&t=1
IgorekM
Написал автору этого хака сегодня повторное письмо и вот что он ответил :)
Цитата
I have checked and double checked again but I really don't know what is the problem. I have the same issue on my forums also. i checked there code also, and it is the same as mine.....
i am still trying to find out what is going on.

:)
Mr.X
А никто не подскажет .. как добавить свою кнопку ?
Допустим мне нужно чтоб вставлял тег [waver] и потом закрывал его .....
The Undertaker
IgorekM
как сделать чтобы после отправки ответа через форму ответа появлялось окно с редиректом где написано типа Спасибо, сообщение отправлено ...?
IgorekM
Sno(USA) из форума ibhakers , помог решить проблему с падением вниз при заходе в темы. Огромное ему спасибо.
Для решения этой проблемы, откройте с помощью блокнота или какого-нибудь другого текстового редактора файл ubbc.js и в нижней части файла найдите:
Код
/////////////////////////////
// Initilization
//
var form;
writeStyle();
var reSupport = 0;
function ubbcInit(images,flash,graphical) {
  form = document.forms["REPLIER"];
  returnFocus();

  if (images) { keys[keys.length] = 'p'; }
  if (flash) { keys[keys.length] = 'f'; }
  if (graphical) { document.onkeydown = checkKey; }


И удалите строку:
Код
returnFocus();


чтобы выглядело так:
Код
/////////////////////////////
// Initilization
//
var form;
writeStyle();
var reSupport = 0;
function ubbcInit(images,flash,graphical) {
  form = document.forms["REPLIER"];

  if (images) { keys[keys.length] = 'p'; }
  if (flash) { keys[keys.length] = 'f'; }
  if (graphical) { document.onkeydown = checkKey; }


И проблемка будет решена :)
Mr.X
IgorekM
все гениальное - просто ! Спосибо !

Но все же , знает кто нить как свою кнопку добаить ? Или скажите хотя бы в каких файлах редактировать ..а там уже сам как нибудь :)



P.S
То ли я не выспался .. то ли мне проказалось что ты менял форму быстрого ответа ?
Alex2002
IgorekM
А для версии 1.1 есть хак формы
Alex2002
Нащел такой хак, немного подправил для v1.1
Вроде работает нормально.
Немного бы его улучшить?


Автор: DuffMan (DuffMan713@yahoo.com)
Based on Quick Reply 2.0 by: James Lesh
Tested on IBF v1.0 Final

Откройте sources/Topic.php и найдите:

CODE
Цитата
//Print it


Ниже добавьте:

CODE
Цитата
$query = $DB->query("SELECT * FROM ibf_emoticons");
$face .= "<script language='javascript'>
function do_smilies() {

var smilies = new Array();";
while ($smiley = mysql_fetch_array($query)) {
$face .= "smilies[".$smiley['id']."] = new Array();
smilies[".$smiley['id']."]["code"] = "".$smiley['typed']."";
smilies[".$smiley['id']."]["img"] = "".$smiley['image']."";";
}

$face .= "var i = document.REPLIER.select_smiley.options.value;

Smiley = smilies[i]["img"];
Code = smilies[i]["code"];
var emote_url = "".$ibforums->vars['EMOTICONS_URL']."/";

if (Smiley == "-1") {
Smiley = "smile.gif";
}

document.images.selected_smiley.src=emote_url+Smiley;
if (Smiley != "-1") {
document.REPLIER.Post.value += ' ' + Code + ' ';
document.REPLIER.Post.focus();
} else {
return false;
}}</script>
<select name='select_smiley' onchange="do_smilies()" class='forminput'>
<option value='-1'>Выбрать смайлик</option>";
$DB->query("SELECT * FROM ibf_emoticons");
while ($ssmiley = $DB->fetch_row()) {
$face .= "<option value='".$ssmiley['id']."'>".$ssmiley['typed']."</option>";
}

$face .= "</select>
<br>
<img src='".$ibforums->vars['EMOTICONS_URL']."/smile.gif' name='selected_smiley' border='0'>";

if ($this->topic['poll_state'] == 'closed' and $ibforums->member['g_is_supadmin'] != 1)
{ $allow = 0; }

if ($this->topic['starter_id'] == $ibforums->member['id'])
{ $allow = 0; }

if ($this->topic['starter_id'] != $ibforums->member['id'])
{ if (! $ibforums->member['g_reply_own_topics']) { $allow = 0; } }

$this->m_group = $ibforums->member['mgroup'];

if ($class->forum['reply_perms'] != '*') { if ( !preg_match( "/(^|,)$this->m_group(,|$)/", $this->forum['reply_perms'] ) ) { $allow = 1; }}

if ($this->forum['reply_perms'] == '*')
{ $allow = 1;  }

if ($this->topic['state'] != 'open')
{  $allow = 0; }

if ($ibforums->member['id'] == "" AND $allow != 1)
{ $allow = 0;}

if($allow == 1)
{
if (!$ibforums->member['id'])
{
$data['guest_box'] = "<input type='text' size='40' maxlength='50' name='UserName' value='Enter your name' tabindex='1' class='forminput' onMouseOver='this.focus()'>";
}

$data['f'] = $this->forum['id'];
$data['t'] = $this->topic['tid'];

$this->output .= $this->html->quickreply($data, $face);
}



Откройте Skin/s*/skin_topic.php и найдите:

CODE
Цитата
class skin_topic {



Ниже добавьте:

CODE
Цитата
function quickreply($data, $face) {
global $ibforums;
return <<<EOF

<form action='{$ibforums->vars['board_url']}/index.{$ibforums->vars['php_ext']}' method='POST' name='REPLIER'>
<input type='hidden' name='st' value='0'>
<input type='hidden' name='act' value='Post'>
<input type='hidden' name='f' value='$data[f]'>
<input type='hidden' name='CODE' value='03'>
<input type='hidden' name='t' value='$data[t]'>
<input type='hidden' name='enableemo' value='yes'>
<input type='hidden' name='enablesig' value='yes'>

<table cellpadding='0' cellspacing='1' border='0' width='600' bgcolor='{$ibforums->skin['tbl_border']}' align='center'>
   <tr>
     <td>
       <table cellpadding='4' cellspacing='1' border='0' width='100%' id='row1'>
       <td align='center' colspan='3' id='titlemedium'><b>Быстрый ответ</b></td>
       <tr>
       <td id='category' align='center' colspan='3'>Наберите свое сообщение ниже:</td>
       </tr>
  <tr>

<td id='row1' align='center' colspan='2'>$data[guest_box]</td>
</tr>
 <tr><td id='row1' align='center' valign='top'>$face</td><td id='row1' align='center'><textarea cols='90' rows='6' wrap='soft' name='Post' tabindex='3' class='textinput'></textarea></td></tr>
<tr>
<td>
       <td id='row2' align='center' colspan='3'>
       <input type="submit" name="submit" value="Принять" tabindex='4' class='forminput'>&nbsp;
       <input type="submit" name="preview" value="Перейти к просмотру!" tabindex='5' class='forminput'>
       </td>
       </tr>
     </table>
     </td>
    </tr>
  </table>
</form>
<br>

EOF;
}



Все!
IgorekM
Alex2002
Цитата
А для версии 1.1 есть хак формы

Есть разные формы ответа. И есть такой же как здесь. Чуть позже залью его сюда.
The Undertaker
IgorekM
дай ссылку где взять хак формы как тут ща, для 1.1
IgorekM
The Undertaker
на ibresource.com , на странице с хаками для версии 1.1 , есть хак UBBC . Это хак для переделки всех кнопок на такие как здесь. Я переделал этот самый хак , добавив в него форму ответа, paste name и цитату с выделением. Ночью залью пределанный UBBC хак сюда.
IgorekM
Вот мой переделанный хак. Такой же как здесь сейчас
zaartix
Цитата
//-------------------------------------
// Print all the output
//-------------------------------------

я так пологаю этот хак ты дал не для 1.1, а более ранней версии, т.к. подобной строки нет в 1.1
?
IgorekM
zaartix
Покажи мне где ты в этом хаке нашёл эту строку angry.gif
Vigat
как это нет такой строки, в файле sources/Topics.php
Внимательнее надо быть
zorch
Есть скин Alien Invasion, можно ли под него заточить этот хак? А то я в этом полный ноль... :(
IgorekM
zorch
Дай ссылку на этот скин, я посмотрю его и скажу тебе можно или нельзя.
zorch
IgorekM
вот он => http://database.ibskins.com/get.php?id=64 это с database.ibskins.com
IgorekM
zorch
Не советую тебе ставить этот скин. Он для Ibf 1.1 beta 2 . А после этого много было обновлений в файлах скинов. Хак то этот поставить сможешь, но работать будет с глюками. Лучше зайди на этот сайт http://www.ibfskinned.co.uk/Site/ . Там во-первых выбор скинов побольше, во-вторых обновляются постоянно сами скины и в-третьих часто появляются новые скины и аддоны.
zorch
IgorekM
хотя я знаю про этот сайт, все-равно спасибо за совет.
andpeu
какие файлы отвечают за дизайн формы?..
IgorekM
andpeu
Прочти файл Readme с архива, посмотри какие файлы редактируются и узнаешь ;)
Ivan2003
А как сделать транслит в вашей форме?
Angor
cool TNX !!!
tnx a lot!

Добавлено:
sources/Topic.php plz HELP me
ja ne mogu najti fail :
sources/Topic.php

u mena toka sources/TopicS.php

i vem netu stroki :
//-------------------------------------
// Print all the output
//-------------------------------------

plz help
IgorekM
Angor
Ну ты правильный файл нашёл :)
Это я по ошибке написал название такое :)
Angor
v nem netu stroki :

//-------------------------------------
// Print all the output
//-------------------------------------
IgorekM
Angor
У тебя версия форума 1.1 , а хак ты ставишь для версии 1.0
Потому и не найдёшь ты никогда этой строки.
Полистай все страницы этой темы и поймёшь в чём твоя ошибка. Поймите же наконец люди, что стоит и средние страницы какой-то темы читать. Неужели вы думаете что самое основное находится только на первой странице и на последней - в самом последнем сообщении angry.gif
Angor
nu i prochel ja cho teper?
gde napisano kak stavit na 1.1??????
p.s. toka ne zlis plz :(
..
Это текстовая версия — только основной контент. Для просмотра полной версии этой страницы, пожалуйста, нажмите сюда.

Русская версия Invision Power Board © 2001-2024 Invision Power Services, Inc.

Warning: require_once(/var/www/bestfil1/public_html/setlinks_0d98c/slsimple.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/bestfil1/public_html/forums/lofiversion/index.php on line 355