Aleks Опубликовано 26 Мая 2005 Жалоба Поделиться Опубликовано 26 Мая 2005 Основано на модификации papagei, http://mods.invisionize.com/db/index.php/f/4080 , исправлена проблема с ресинхронизхацией скинов редактируемые файлы: sources/lib/usercp_functions.phpsources/usercp.php откройте: sources/lib/usercp_functions.php найдите: $ibforums->input['Post'] = $this->class->parser->convert( array( 'TEXT' => $ibforums->input['Post'], 'SMILIES' => 0, 'CODE' => $ibforums->vars['sig_allow_ibc'], 'HTML' => $ibforums->vars['sig_allow_html'], 'SIGNATURE' => 1 ) ); замените на:$ibforums->input['Post'] = $this->class->parser->convert( array( 'TEXT' => $ibforums->input['Post'], 'SMILIES' => 1, 'CODE' => $ibforums->vars['sig_allow_ibc'], 'HTML' => $ibforums->vars['sig_allow_html'], 'SIGNATURE' => 0 ) ); сохраните, закройте и загрузите файл на форум! откройте: sources/usercp.php найдите:$this->output .= $this->html->signature($ibforums->member['signature'], $t_sig, $std->return_md5_check()); добавьте ниже:$this->output = $this->html_add_smilie_box( $this->output ); найдите:} ?> добавьте выше:function html_add_smilie_box($in_html="") { global $ibforums, $DB; $show_table = 0; $count = 0; $smilies = "<tr align='center'>\n"; //----------------------------------------- // Get the smilies from the DB //----------------------------------------- if ( ! is_array( $ibforums->cache['emoticons'] ) ) { $ibforums->cache['emoticons'] = array(); $DB->simple_construct( array( 'select' => 'typed,image,clickable,emo_set', 'from' => 'emoticons' ) ); $DB->simple_exec(); while ( $r = $DB->fetch_row() ) { $ibforums->cache['emoticons'][] = $r; } } //**usort( $ibforums->cache['emoticons'] , array( 'post', 'smilie_alpha_sort' ) ); foreach( $ibforums->cache['emoticons'] as $a_id => $elmo ) { if ( $elmo['emo_set'] != $ibforums->skin['_emodir'] ) { continue; } if ( ! $elmo['clickable'] ) { continue; } $show_table++; $count++; //----------------------------------------- // Make single quotes as URL's with html entites in them // are parsed by the browser, so ' causes JS error :o //----------------------------------------- if (strstr( $elmo['typed'], "'" ) ) { $in_delim = '"'; $out_delim = "'"; } else { $in_delim = "'"; $out_delim = '"'; } $smilies .= "<td><a href={$out_delim}javascript:emoticon($in_delim".$elmo['typed']."$in_delim){$out_delim}><img src=\"".$ibforums->vars['EMOTICONS_URL']."/".$elmo['image']."\" alt='smilie' border='0' /></a> </td>\n"; if ($count == $ibforums->vars['emo_per_row']) { $smilies .= "</tr>\n\n<tr align='center'>"; $count = 0; } } if ($count != $ibforums->vars['emo_per_row']) { for ($i = $count; $i < $ibforums->vars['emo_per_row']; ++$i) { $smilies .= "<td> </td>\n"; } $smilies .= "</tr>"; } $table = $this->html->smilie_table(); if ($show_table != 0) { $table = preg_replace( "/<!--THE SMILIES-->/", $smilies, $table ); $in_html = preg_replace( "/<!--SMILIE TABLE-->/", $table, $in_html ); } return $in_html; } сохраните, закройте и загрузите файл на форум! Теперь зайдите в Админцентр->Skins & Templates->Skin Search & Replace. Выполните поиск по запросуvar Override = "{ipb.lang['override']}"; в найденном, добавьте ниже: function emo_pop(){ window.open("index.php?act=legends&CODE=emoticons&s=","Legends","width=250,height=500,resizable=yes,scrollbars=yes"); } там же найдите:<tr> <td class="pformleft" colspan="2" align="center"><textarea cols="60" rows="12" name="Post" tabindex="3" class="textinput">$t_sig</textarea><br />(<a href="javascript:CheckLength()">{ipb.lang['check_length']}</a>)</td> </tr> и замените на:<tr><td class="pformleft" align="center"><!--SMILIE TABLE--></td> <td class="pformright" align="left"><textarea cols="60" rows="12" name="Post" tabindex="3" class="textinput">$t_sig</textarea><br />(<a href="javascript:CheckLength()">{ipb.lang['check_length']}</a>)</td> </tr> сохраните. Затем заходите Skin Manager->IPB Default Skin->Edit Root Skin Template HTML->User Control Panel->Add Template Bit.В поле New Template Bit Name напишите smilie_tableВ большое поле введите <table cellspacing="0" style="width:auto" width="100%"> <tr> <td align="center" colspan="{$ibforums->vars['emo_per_row']}"><b>{$ibforums->lang['click_smilie']}</b></td> </tr> <!--THE SMILIES--> <tr> <td align="center" colspan="{$ibforums->vars['emo_per_row']}"><b><a href="javascript:emo_pop()">{$ibforums->lang['all_emoticons']}</a></b></td> </tr> </table> эти операции повторить для всех имеющихся у вас скинов. ВСЁ. Эта модификация будет работать даже если вы ресинхронизируете шаблоны. Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
agel Опубликовано 26 Мая 2005 Жалоба Поделиться Опубликовано 26 Мая 2005 всю жизнь использовал [.img][./img] Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
Рекомендуемые сообщения
Присоединиться к обсуждению
Вы можете ответить сейчас, а зарегистрироваться позже. Если у вас уже есть аккаунт, войдите, чтобы ответить от своего имени.