Урл в автоцензоре

Проблемы с установкой или работой phpBB 2.0.x? Ищите ответы здесь!
DedPichto
phpBB 1.4.4
Сообщения: 104
Стаж: 20 лет 3 месяца

Урл в автоцензоре

Сообщение DedPichto »

При добавлении части урла или даже полного урла в автоцензор, например phpbbguru.net, в сообщении эта часть заменяется на то, на что ей указано заменяться. Но при наведении мышки все равно отображается полный урл.

Как исправить?

Добавлено спустя 5 часов 39 минут 46 секунд:

Somebody? :)
Аватара пользователя
Vladson
Former team member
Сообщения: 816
Стаж: 21 год
Откуда: Estonia, Tallinn

Сообщение Vladson »

Я тоже встречался с этой проблемой, но увы не нашёл решения
Серый цвет - светлый (светлее чёрного), но он и тёмный (темнее белого), он же промежуточный (между чёрным и белым). Теорию относительности никто не отменял. Истина в целом - понятие виртуально-ситуативное.
DedPichto
phpBB 1.4.4
Сообщения: 104
Стаж: 20 лет 3 месяца

Сообщение DedPichto »

Есть вот такое вот решение - может кому пригодится:

Код: Выделить всё

############################################### 
##   Hack Title:   URL Censor 
##   Hack Version:   1.0.0 
##   Author:      Antony Bailey 
##   Description:   Increases the word censors, so that they apply to URL's. 
##   Compatibility:  2.0.6 
## 
##   Installation Level: Easy 
##   Installation Time: 1 minutes 
##   Files To Edit: 1 
##      viewtopic.php 
## 
##   History: 
##      ??????:1.0.0:    Initial Release. 
## 
##   Author Notes: 
##   Strange, that the workd censors never applied to URL's imho they should :) 
## 
##   Support:      http://www.phpbbsupport.co.uk 
##   Copyright:      ©2003 URL Censor 1.0.0 - Antony Bailey 
## 
############################################### 
##   You downloaded this hack from phpBBSupport.co.uk, as such this is not a official phpBB hack. 
##   This means that support can not be found for this at phpBB.com, so please visit http://www.phpbbsupport.co.uk 
############################################### 
## 
############################################### 
##   This program is free software; you can redistribute it and/or 
##   modify it under the terms of the GNU General Public License 
##   as published by the Free Software Foundation; either version 2 
##   of the License, or (at your option) any later version. 
## 
##   This program is distributed in the hope that it will be useful, 
##   but WITHOUT ANY WARRANTY; without even the implied warranty of 
##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
##   GNU General Public License for more details. 
## 
##   http://www.gnu.org/copyleft/gpl.html 
############################################### 

# 
#-----[ OPEN ]------------------------------------------ 
# 
viewtopic.php 
# 
#-----[ FIND ]------------------------------------------    
# 
   // 
   // Replace naughty words 
   // 
   if (count($orig_word)) 
   { 
      $post_subject = preg_replace($orig_word, $replacement_word, $post_subject); 

      if ($user_sig != '') 
      { 
         $user_sig = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $user_sig . '<'), 1, -1)); 
      } 

      $message = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $message . '<'), 1, -1)); 
   } 
# 
#-----[ REPLACE, WITH ]------------------------------------------    
# 
// 
//  URL censor hack by Antony Bailey - Yeah I sold out and want my name in your files. :) 
// 
   if ( count($orig_word) ) 
   { 
      if ( $user_sig != '' ) 
      { 
         $user_sig = preg_replace($orig_word, $replacement_word, $user_sig); 
      } 

      $post_subject = preg_replace($orig_word, $replacement_word, $post_subject); 
      $message = preg_replace($orig_word, $replacement_word, $message); 
   } 
// 
// End of hack. 
// 
# 
#-----[ SAVE & CLOSE ALL FILES ]-------------------------- 
# 
#End of Hack
Аватара пользователя
VladEC
phpBB 1.2.0
Сообщения: 18
Стаж: 19 лет 5 месяцев
Откуда: Киев

Сообщение VladEC »

Классный код. Супер. Работает.
Спасибо.

Вернуться в «Поддержка phpBB 2.0.x»