Смайлы в комментариях

VOC++ BSE Смайлы в комментариях 0.3

Нет прав для скачивания
Так как автором мода является CyberDream (иными словами студия Lemira ART), логичнее было бы разместить его в категории Lemira ART.
Но, учитsвая то, что этот мод уже очень давно гуляет просторами интернета, я размещаю его здесь. Надеюсь Влад будет не против )))

Итак, данный мод позволяет оставлять коментарии пользователям чата, используя смайлы и форматирование текста. Очень интересный мод и полезный. Пользователям понравится)))
1-jpg.1473


2-jpg.1474
Установка:
1. Папку hostlite из архива залить в корень чата.
2. В файле profile_content.php в каталоге дизайна чата заменить:
PHP:
$message = fixup_contributions($message);
$message = htmlspecialchars($message);
$message = str_replace("\n","<br>",$message);
$message = str_replace("\r","",$message);
$message = str_replace("\t"," ",$message);
$message = str_replace(" "," &nbsp;",$message);
на
PHP:
//$message = fixup_contributions($message);
$message = str_replace("\n","<br>",$message);
$message = str_replace("\r","",$message);
$message = str_replace("\t"," ",$message);
$message = str_replace(" "," &nbsp;",$message);

$message = str_replace("[b]","<b>",$message);
$message = str_replace("[/b]","</b>",$message);
$message = str_replace("[i]","<i>",$message);
$message = str_replace("[/i]","</i>",$message);
$message = str_replace("[u]","<u>",$message);
$message = str_replace("[/u]","</u>",$message);
$message = str_replace("[s]","<s>",$message);
$message = str_replace("[/s]","</s>",$message);
$message = str_replace("[left]","<div align=\"left\">",$message);
$message = str_replace("[/left]","</div>",$message);
$message = str_replace("[center]","<div align=\"center\">",$message);
$message = str_replace("[/center]","</div>",$message);
$message = str_replace("[right]","<div align=\"right\">",$message);
$message = str_replace("[/right]","</div>",$message);
$message = str_replace("[*","<font",$message);
$message = str_replace("*]",">",$message);
$message = str_replace("[/color]","</font>",$message);
$message = str_replace(":)","<img src=\"".$hostlite_url."/comment_smiles/ab.gif\" />",$message);
$message = str_replace(":(","<img src=\"".$hostlite_url."/comment_smiles/ac.gif\" />",$message);
$message = str_replace("::angel::","<img src=\"".$hostlite_url."/comment_smiles/aa.gif\" />",$message);
$message = str_replace(";-)","<img src=\"".$hostlite_url."/comment_smiles/ad.gif\" />",$message);
$message = str_replace(":P","<img src=\"".$hostlite_url."/comment_smiles/ae.gif\" />",$message);
$message = str_replace("::boss::","<img src=\"".$hostlite_url."/comment_smiles/af.gif\" />",$message);
$message = str_replace(":D","<img src=\"".$hostlite_url."/comment_smiles/ag.gif\" />",$message);
$message = str_replace(":[","<img src=\"".$hostlite_url."/comment_smiles/ah.gif\" />",$message);
$message = str_replace("O.o","<img src=\"".$hostlite_url."/comment_smiles/ai.gif\" />",$message);
$message = str_replace("::kiss::","<img src=\"".$hostlite_url."/comment_smiles/aj.gif\" />",$message);
$message = str_replace("::cry::","<img src=\"".$hostlite_url."/comment_smiles/ak.gif\" />",$message);
$message = str_replace("::secret::","<img src=\"".$hostlite_url."/comment_smiles/al.gif\" />",$message);
$message = str_replace("::gop::","<img src=\"".$hostlite_url."/comment_smiles/am.gif\" />",$message);
$message = str_replace("::i_hate_you::","<img src=\"".$hostlite_url."/comment_smiles/ao.gif\" />",$message);
$message = str_replace("::jokingly::","<img src=\"".$hostlite_url."/comment_smiles/ap.gif\" />",$message);
$message = str_replace("::devil::","<img src=\"".$hostlite_url."/comment_smiles/aq.gif\" />",$message);
$message = str_replace("::headset::","<img src=\"".$hostlite_url."/comment_smiles/ar.gif\" />",$message);
$message = str_replace("::kissed::","<img src=\"".$hostlite_url."/comment_smiles/as.gif\" />",$message);
$message = str_replace("::sick::","<img src=\"".$hostlite_url."/comment_smiles/at.gif\" />",$message);
$message = str_replace("::ustal::","<img src=\"".$hostlite_url."/comment_smiles/au.gif\" />",$message);
$message = str_replace("::stop:","<img src=\"".$hostlite_url."/comment_smiles/av.gif\" />",$message);
$message = str_replace("::little_kiss::","<img src=\"".$hostlite_url."/comment_smiles/aw.gif\" />",$message);
$message = str_replace("::rose::","<img src=\"".$hostlite_url."/comment_smiles/ax.gif\" />",$message);
$message = str_replace("::super::","<img src=\"".$hostlite_url."/comment_smiles/ay.gif\" />",$message);
$message = str_replace("::beer::","<img src=\"".$hostlite_url."/comment_smiles/az.gif\" />",$message);
$message = str_replace("::hearth::","<img src=\"".$hostlite_url."/comment_smiles/ba.gif\" />",$message);
$message = str_replace("::bomb::","<img src=\"".$hostlite_url."/comment_smiles/bb.gif\" />",$message);
$message = str_replace("::sos::","<img src=\"".$hostlite_url."/comment_smiles/bc.gif\" />",$message);
$message = str_replace("::ya_krut::","<img src=\"".$hostlite_url."/comment_smiles/bd.gif\" />",$message);
$message = str_replace("::wink::","<img src=\"".$hostlite_url."/comment_smiles/be.gif\" />",$message);
$message = str_replace("::ok::","<img src=\"".$hostlite_url."/comment_smiles/bf.gif\" />",$message);
$message = str_replace("::magamba::","<img src=\"".$hostlite_url."/comment_smiles/bg.gif\" />",$message);
$message = str_replace("::sorry::","<img src=\"".$hostlite_url."/comment_smiles/bh.gif\" />",$message);
$message = str_replace("::claps::","<img src=\"".$hostlite_url."/comment_smiles/bi.gif\" />",$message);
$message = str_replace("::rofl::","<img src=\"".$hostlite_url."/comment_smiles/bj.gif\" />",$message);
$message = str_replace("::pardon::","<img src=\"".$hostlite_url."/comment_smiles/bk.gif\" />",$message);
$message = str_replace("::no::","<img src=\"".$hostlite_url."/comment_smiles/bl.gif\" />",$message);
$message = str_replace("::crazy::","<img src=\"".$hostlite_url."/comment_smiles/bm.gif\" />",$message);
$message = str_replace("::dont_know::","<img src=\"".$hostlite_url."/comment_smiles/bn.gif\" />",$message);
$message = str_replace("::dance::","<img src=\"".$hostlite_url."/comment_smiles/bo.gif\" />",$message);
$message = str_replace("::yuppy::","<img src=\"".$hostlite_url."/comment_smiles/bp.gif\" />",$message);
$message = str_replace("::hi::","<img src=\"".$hostlite_url."/comment_smiles/bq.gif\" />",$message);
$message = str_replace("::bye::","<img src=\"".$hostlite_url."/comment_smiles/br.gif\" />",$message);
$message = str_replace("::yes::","<img src=\"".$hostlite_url."/comment_smiles/bs.gif\" />",$message);
$message = str_replace(";D","<img src=\"".$hostlite_url."/comment_smiles/bt.gif\" />",$message);
$message = str_replace("::wall::","<img src=\"".$hostlite_url."/comment_smiles/bu.gif\" />",$message);
$message = str_replace("::write::","<img src=\"".$hostlite_url."/comment_smiles/bv.gif\" />",$message);
$message = str_replace("::hz::","<img src=\"".$hostlite_url."/comment_smiles/bw.gif\" />",$message); 
3. В этом же файле ниже ПОСЛЕ :
PHP:
<?php
if($exists and $session and $is_regist) {
?>
ВСТАВИТЬ
PHP:
<script language="javascript" type="text/javascript">
var ie=document.all?1:0;
var ns=document.getElementById&&!document.all?1:0;
function InsertSmile(SmileId)
{ if(ie) { document.all.message.focus(); document.all.message.value+=" "+SmileId+" "; } else if(ns) { document.forms['dle-comments-form'].elements['message'].focus(); document.forms['dle-comments-form'].elements['message'].value+=" "+SmileId+" "; } else alert("Ваш браузер не поддерживается!");
}
</script>
4. В этом же файле ниже заменить:
PHP:
<form method="post" action="profile_content.php">
<input type="hidden" name="session" value="<?php echo $session;?>">
<input type="hidden" name="act" value="add_post">
<input type="hidden" name="user_id" value="<?php echo $user_id;?>">
<input type="hidden" name="page" value="<?php echo $page;?>">
<input type="hidden" name="send_to_id" value = "<?php echo $is_regist; ?>">
<?php echo $w_subject;?>: <input type="text" name="subject" size="20" maxlength="50" value="<?php echo $tmp_subject;?>" class="input"><br>
<?php echo $w_message_text;?>:<br>
<textarea cols="60" rows="10" name="message" class="input">
<?php echo $tmp_body;?>
</textarea>
на
PHP:
<form method="post" id="dle-comments-form" action="profile_content.php">
<input type="hidden" name="session" value="<?php echo $session;?>">
<input type="hidden" name="act" value="add_post">
<input type="hidden" name="user_id" value="<?php echo $user_id;?>">
<input type="hidden" name="page" value="<?php echo $page;?>">
<input type="hidden" name="send_to_id" value = "<?php echo $is_regist; ?>">
<a href=<? echo $chat_url;?>powmod/graffiti/graffiti.php?session=<? echo $session;?>&user_id=<? echo $user_id;?>><img src=<? echo $chat_url;?>powmod/graffiti/include/graffiti.png border=0 alt="Нарисовать граффити" title="Нарисовать граффити"></a><br>
<script language="javascript" type="text/javascript">
<!--
var text_enter_url = "Введите полный URL ссылки";
var text_enter_url_name = "Введите название сайта";
var text_code = "Использование: [CODE] Здесь Ваш код.. [/CODE]";
var text_quote = "Использование: [QUOTE] Здесь Ваша Цитата.. [/QUOTE]";
var selField = "comments";
var fombj = document.getElementById( 'dle-comments-form' );
-->
</script>
<script type="text/javascript" src="<?=$chat_url;?>hostlite/comment_smiles/function/bbcodes.js"></script> <tr> <td class="news" valign="top"><font face="Comic Sans MS">Тема сообщения:</font><br /><input type="text" name="subject" size="60" maxlength="50" value="<?php echo $tmp_subject;?>" style="font-family:comic sans ms; font-size:11px; border:1px solid #E0E0E0"></td> </tr> <tr> <td class="news" valign="top"><font face="Comic Sans MS"><br />Текст сообщения:</font>
<div style="width: 465px; border: 1px solid rgb(187, 187, 187);" class="editor">
<div style="width: 100%; height: 25px; border-bottom: 1px solid rgb(187, 187, 187); background-image: url(&quot;/hostlite/comment_smiles/button_image/images/bg.gif&quot;);">
<div id="b_b" class="editor_button" onclick="simpletag('b')"><img title="Полужирный" src="/hostlite/comment_smiles/button_image/images/b.gif" alt="" border="0" height="25" width="23"></div>
<div id="b_i" class="editor_button" onclick="simpletag('i')"><img title="Наклонный текст" src="/hostlite/comment_smiles/button_image/images/i.gif" alt="" border="0" height="25" width="23"></div>
<div id="b_u" class="editor_button" onclick="simpletag('u')"><img title="Подчеркнутый текст" src="/hostlite/comment_smiles/button_image/images/u.gif" alt="" border="0" height="25" width="23"></div>
<div id="b_s" class="editor_button" onclick="simpletag('s')"><img title="Зачеркнутый текст" src="/hostlite/comment_smiles/button_image/images/s.gif" alt="" border="0" height="25" width="23"></div>
<div class="editor_button"><img src="/hostlite/comment_smiles/button_image/images/brkspace.gif" alt="" border="0" height="25" width="5"></div>
<div id="b_left" class="editor_button" onclick="simpletag('left')"><img title="Выравнивание по левому краю" src="/hostlite/comment_smiles/button_image/images/l.gif" alt="" border="0" height="25" width="23"></div>
<div id="b_center" class="editor_button" onclick="simpletag('center')"><img title="По центру" src="/hostlite/comment_smiles/button_image/images/c.gif" alt="" border="0" height="25" width="23"></div>
<div id="b_right" class="editor_button" onclick="simpletag('right')"><img title="Выравнивание по правому краю" src="/hostlite/comment_smiles/button_image/images/r.gif" alt="" border="0" height="25" width="23"></div>
<div class="editor_button"><img src="/hostlite/comment_smiles/button_image/images/brkspace.gif" alt="" border="0" height="25" width="5"></div>
<div id="b_color" class="editor_button" onclick="ins_color();"><img src="/hostlite/comment_smiles/button_image/images/color.gif" title="Выбор цвета текста" border="0" height="25" width="23"></div>
<div class="editor_button"><img src="/hostlite/comment_smiles/button_image/images/brkspace.gif" alt="" border="0" height="25" width="5"></div>
</div>
<iframe width="154" height="104" id="cp" src="/hostlite/comment_smiles/button_image/color.html" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="visibility:hidden; display: none; position: absolute;"></iframe>
<textarea name="message" id="comments" style="width:463px;height:156px;border:0px;" onclick="setNewField(this.name, document.getElementById( 'dle-comments-form' ))"></textarea>
</div></td>
<??> <td class="news" style="padding-top: 2px;"> <table>
<tr> <td style="cursor: pointer;" onclick='InsertSmile(":)")'><img src='/hostlite/comment_smiles/ab.gif' title='улыбаюсь' / ></td> <td style="cursor: pointer;" onclick='InsertSmile(":(")'><img src='/hostlite/comment_smiles/ac.gif' title='грущу' /></td> <td style="cursor: pointer;" onclick='InsertSmile("::wall::")'><img src='/hostlite/comment_smiles/bu.gif' title='Убей себя ап стену :)' /></td> <td style="cursor: pointer;" onclick='InsertSmile("::angel::")'><img src='/hostlite/comment_smiles/aa.gif' title='Йа ангел' / ></td> <td style="cursor: pointer;" onclick='InsertSmile(";-)")'><img src='/hostlite/comment_smiles/ad.gif' title='Эй бэйби )' / ></td> <td style="cursor: pointer;" onclick='InsertSmile(":P")'><img src='/hostlite/comment_smiles/ae.gif' title='Кунилингус )' / ></td> <td style="cursor: pointer;" onclick='InsertSmile("::boss::")'><img src='/hostlite/comment_smiles/af.gif' title='люди в черном' / ></td> <td style="cursor: pointer;" onclick='InsertSmile(":D")'><img src='/hostlite/comment_smiles/ag.gif' title='ржач' / ></td> <td style="cursor: pointer;" onclick='InsertSmile(":[")'><img src='/hostlite/comment_smiles/ah.gif' title='стефняюсь я' / ></td> <td style="cursor: pointer;" onclick='InsertSmile("O.o")'><img src='/hostlite/comment_smiles/ai.gif' title='О.о епта' / ></td>
</tr>
<tr> <td style="cursor: pointer;" onclick='InsertSmile("::kiss::")'><img src='/hostlite/comment_smiles/aj.gif' title='цем' / ></td> <td style="cursor: pointer;" onclick='InsertSmile("::cry::")'><img src='/hostlite/comment_smiles/ak.gif' title='плакаю'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::secret::")'><img src='/hostlite/comment_smiles/al.gif' title='тока тсс...никому'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::gop::")'><img src='/hostlite/comment_smiles/am.gif' title='ну че братва..'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::i_hate_you::")'><img src='/hostlite/comment_smiles/ao.gif' title='бяка'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::jokingly::")'><img src='/hostlite/comment_smiles/ap.gif' title='розсмешил'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::devil::")'><img src='/hostlite/comment_smiles/aq.gif' title='дьявол'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::headset::")'><img src='/hostlite/comment_smiles/ar.gif' title='музон'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::kissed::")'><img src='/hostlite/comment_smiles/as.gif' title='воздушный поцелуй'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::sick::")'><img src='/hostlite/comment_smiles/at.gif' title='бодун'/ ></td>
</tr>
<tr> <td style="cursor: pointer;" onclick='InsertSmile("::ustal::")'><img src='/hostlite/comment_smiles/au.gif' title='уставший'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::stop::")'><img src='/hostlite/comment_smiles/av.gif' title='э..ты чо..'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::little_kiss::")'><img src='/hostlite/comment_smiles/aw.gif' title='цём в щечку'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::rose::")'><img src='/hostlite/comment_smiles/ax.gif' title='розочко вот вам..'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::super::")'><img src='/hostlite/comment_smiles/ay.gif' title='суперр'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::beer::")'><img src='/hostlite/comment_smiles/az.gif' title='забухаем?'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::hearth::")'><img src='/hostlite/comment_smiles/ba.gif' title='сердце'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::bomb::")'><img src='/hostlite/comment_smiles/bb.gif' title='бабах'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::sos::")'><img src='/hostlite/comment_smiles/bc.gif' title='помогите!'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::ya_krut::")'><img src='/hostlite/comment_smiles/bd.gif' title='е бэбэ'/ ></td>
</tr>
<tr> <td style="cursor: pointer;" onclick='InsertSmile("::wink::")'><img src='/hostlite/comment_smiles/be.gif' title='бзззз'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::ok::")'><img src='/hostlite/comment_smiles/bf.gif' title='не вопрос'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::magamba::")'><img src='/hostlite/comment_smiles/bg.gif' title='магамба'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::sorry::")'><img src='/hostlite/comment_smiles/bh.gif' title='прости'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::claps::")'><img src='/hostlite/comment_smiles/bi.gif' title='браааво'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::rofl::")'><img src='/hostlite/comment_smiles/bj.gif' title='ой не могуу'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::pardon::")'><img src='/hostlite/comment_smiles/bk.gif' title='пардон'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::no::")'><img src='/hostlite/comment_smiles/bl.gif' title='неа'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::crazy::")'><img src='/hostlite/comment_smiles/bm.gif' title='абдыщь абдыщь...я крэйзи'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::dont_know::")'><img src='/hostlite/comment_smiles/bn.gif' title='та хз..'/ ></td>
</tr>
<tr> <td style="cursor: pointer;" onclick='InsertSmile("::dance::")'><img src='/hostlite/comment_smiles/bo.gif' title='оп опа опапа'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::yuppy::")'><img src='/hostlite/comment_smiles/bp.gif' title='урааа'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::hi::")'><img src='/hostlite/comment_smiles/bq.gif' title='хай'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::bye::")'><img src='/hostlite/comment_smiles/br.gif' title='бай бай'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::yes::")'><img src='/hostlite/comment_smiles/bs.gif' title='ога'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile(";D")'><img src='/hostlite/comment_smiles/bt.gif' title='ну-ну'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::write::")'><img src='/hostlite/comment_smiles/bv.gif' title='пишу'/ ></td> <td style="cursor: pointer;" onclick='InsertSmile("::hz::")'><img src='/hostlite/comment_smiles/bw.gif' title='эээм..'/ ></td>
</tr>
</table>
</td>
5. В файле style.css в каталоге дизайна чата вставить в любое место (d самый конец):
PHP:
 .bbcodes { background-color: #ffffff; border: 1px solid #1434B0; color: #ffffff; font-size: 11px;  font-family: tahoma;  background-image: url(../images/dlet_bttn_bbcodes.gif); background-repeat: repeat-x;
 height: 20px; font-weight: bold;
}
.editor textarea { color: #555555;  font-size: 11px;  font-family: tahoma;  background-image: url(../images/dlet_field_o.gif); background-repeat: repeat-x; background-color: #ffffff;
}
.editor_button { float: left; cursor: pointer; padding-left: 2px; padding-right: 2px;
}
.editor_buttoncl { float: left; cursor: pointer; padding-left: 1px; padding-right: 1px; border-left: 1px solid #bbbbbb; border-right: 1px solid #bbbbbb;
}
.editbclose { float: right; cursor: pointer;
}
.editor_button select { font-family: tahoma; font-size: 11px;
}
.editor_button img {margin: 0; padding: 0;}
.editbclose img {margin: 0; padding: 0;}
.editor_button_brk img {margin: 0; padding: 0;}
.bbcodes_poll { background-color: #ffffff; border: 1px solid #1434B0; color: #ffffff; font-size: 11px;  font-family: tahoma;  background-image: url(../images/dlet_bttn_bbcodes.gif); background-repeat: repeat-x; width: 100px; height: 20px; font-weight: bold;
}
6.В файле inc_common.php который находится в корневой директории чата после:
PHP:
function my_sem_get_res($sem_id) { global $semaphor_acquired, $semaphor_acquired_ids; if(($b_id = array_search($sem_id, $semaphor_acquired)) === FALSE) return; else { return $semaphor_acquired_ids[$b_id]; } return false;
}
вставить
PHP:
#Modules_string, added by CyberDream
$hostlite_url = $chat_url."hostlite";
P.S. Если в чате не установлен мод "Графити", то строку
PHP:
<a href=<? echo $chat_url;?>powmod/graffiti/graffiti.php?session=<? echo $session;?>&user_id=<? echo $user_id;?>><img src=<? echo $chat_url;?>powmod/graffiti/include/graffiti.png border=0 alt="Нарисовать граффити" title="Нарисовать граффити"></a><br>
нужно удалить
Автор
Майор
Скачивания
9
Первый выпуск
Обновление
Оценка
0,00 звёзд 0 оценок

Другие ресурсы пользователя Майор

Поделиться ресурсом

Последние обновления

  1. Исправление ошибок

    Исправлены пути в моде. Теперь не нужно грузить файлы мода в корень чата и дизайн, достаточно...