BitTorrent Трекер RusTrek.ru http://5.45.70.241/ |
|
Extended Offtopic BBCode for_tp http://5.45.70.241/viewtopic.php?f=817&t=12036 |
Страница 1 из 1 |
Автор: | JleHuH213 [ 2011-03-26 12:25 ] |
Заголовок сообщения: | Extended Offtopic BBCode for_tp |
############################################################## ## MOD Title: Extended Offtopic BBCode ## MOD Author: R@ < meos@mail.ru > (Kirill) http://osdev.ru/ ## MOD Description: Adds [off][/off] BBCode tags for off-topic indication, this makes text marked with grey color and smaller size. ## MOD Version: 1.1.1 ## ## Installation Level: Easy ## Installation Time: 7 Minutes ## Files To Edit(9): ## posting.php ## privmsg.php ## includes/bbcode.php ## language/lang_russian/lang_main.php ## language/lang_english/lang_main.php ## templates/default/posting_editor.tpl ## templates/default/main.css ## templates/default/bbcode.tpl ## ## Included Files: none ############################################################## ## For Security Purposes, Please Check: http://www.phpbbguru.net/mods/ for the ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code ## to enter into your phpBB Forum. ############################################################## ## Author Notes: ## ## Original idea of MOD belongs to Naj_Geetsrev < najgeetsrev@zonnet.nl > < http://www.stichtingdoelloos.com > ## Some pieces of code from this Mod were used ## ## Thanks to http://phpbbguru.net and especially to Xpert for help with mod ## ############################################################## ## MOD History: ## ## 2004-05-24 - Version 1.1.1 ## - New replacement algorythm used, now Multiple BBCode MOD is not needed. ## ## 2004-03-29 - Version 1.1 ## - Initial Release ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## Код: # #-----[ OPEN ]------------------------------------------ # posting.php # #-----[ FIND ]------------------------------------------ # 'L_BBCODE_W_HELP' => $lang['bbcode_w_help'], # #-----[ AFTER, ADD ]------------------------------------------ # 'L_BBCODE_T_HELP' => $lang['bbcode_t_help'], # #-----[ OPEN ]------------------------------------------ # privmsg.php # #-----[ FIND ]------------------------------------------ # 'L_BBCODE_W_HELP' => $lang['bbcode_w_help'], # #-----[ AFTER, ADD ]------------------------------------------ # 'L_BBCODE_T_HELP' => $lang['bbcode_t_help'], # #-----[ OPEN ]------------------------------------------ # includes/bbcode.php # #-----[ FIND ]------------------------------------------ # // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix). $patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\](.*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['url4']; # #-----[ AFTER, ADD ]------------------------------------------ # // [off] and [/off] for posting offtopic. $text = str_replace("[off:$uid]", $bbcode_tpl['off_open'], $text); $text = str_replace("[/off:$uid]", $bbcode_tpl['off_close'], $text); # #-----[ FIND ]------------------------------------------ # // [img]image_url_here[/img] code.. $text = preg_replace("#\[img\]((ht|f)tp://)([^ \?&=\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text); # #-----[ AFTER, ADD ]------------------------------------------ # // [off] and [/off] for offtopic text. $text = preg_replace("#\[off\](.*?)\[/off\]#si", "[off:$uid]\\1[/off:$uid]", $text); # #-----[ OPEN ]------------------------------------------ # language/lang_russian/lang_main.php # #-----[ FIND ]------------------------------------------ # $lang['bbcode_w_help'] = 'Вставить ссылку: [url]http://url[/url] или [url=http://url]текст ссылки[/url] (alt+w)'; # #-----[ AFTER, ADD ]------------------------------------------ # $lang['bbcode_t_help'] = 'Offtopic: [off]текст[/off] (alt+t)'; # #-----[ OPEN ]------------------------------------------ # language/lang_english/lang_main.php # #-----[ FIND ]------------------------------------------ # $lang['bbcode_w_help'] = 'Insert URL: [url]http://url[/url] or [url=http://url]URL text[/url] (alt+w)'; # #-----[ AFTER, ADD ]------------------------------------------ # $lang['bbcode_t_help'] = 'Offtopic: [off]text[/off] (alt+t)'; # #-----[ OPEN ]------------------------------------------ # templates/default/bbcode.tpl # #-----[ FIND ]------------------------------------------ # <!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email --> # #-----[ AFTER, ADD ]------------------------------------------ # <!-- BEGIN off_open --><span class="off"> <!-- END off_open --> <!-- BEGIN off_close --> </span><!-- END off_close --> # #-----[ OPEN ]------------------------------------------ # templates/default/main.css # #-----[ FIND ]------------------------------------------ # .vTop { vertical-align: top !important; } # #-----[ AFTER, ADD ]------------------------------------------ # /* Offtopic text */ .off { font-size: 10px; color: #999999 } # #-----[ OPEN ]------------------------------------------ # templates/default/posting_editor.tpl # #-----[ FIND ]--------------------------------- # bbcode.addTag("bold", "b", null, "B", ctrl); # #-----[ AFTER, ADD ]------------------------------------------ # bbcode.addTag("t", "off", "/off", "", ctrl); # #-----[ FIND ]--------------------------------- # </table><!--/smilies--> </td> <td><!-- ENDIF --> <div class="buttons mrg_4"> <span> # #-----[ AFTER, ADD ]------------------------------------------ # <input type="button" value="off" topic" name="t" title="офф топик" style="width: 95px;" /> Всё... |
Страница 1 из 1 | Часовой пояс: UTC + 3 часа |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |