[MOD]Block Guest HTML/BBCode and Smilies (游客禁用 BBcode/笑脸)

PHPBB2.0.X资源收集专用版,提问和建议请发到主版面
Locked
newerby
论坛管理员
论坛管理员
Posts: 1293
Joined: 2006-11-10 2:20

[MOD]Block Guest HTML/BBCode and Smilies (游客禁用 BBcode/笑脸)

Post by newerby » 2007-06-28 22:47

为方便游客留言或者参与论坛的讨论,您的论坛某些板块可能需要开放游客发言的功能,但如果被发帖机器人盯上,发色情类的图片信息(往往会带有点击链接),那么这个 MOD 就有缓冲的作用,避免直接看到很露的图片,让人误点击,给您的论坛造成些不必要的麻烦。当然最终还是要由管理员和版主及时的处理这类帖子。

MOD Name: [2.0.21] Block Guest HTML/BBCode and Smilies
Author: defender-uk
MOD Description: This mod will block all Guests from submitting BBCode/HTML and Smilies.
官方论坛链接:http://www.phpbb.com/community/viewtopic.php?t=397198

Code: Select all

############################################################## 
## MOD Title: Guest No HTML/BBCode or Smilies
## MOD Author: defender-uk < defenders_realm@yahoo.com > (Andy Smith) http://www.phpbb-arcade.com
## MOD Description: Guest can not post HTML/BBCode or use Smilies
## MOD Version: 1.0.0 
##
## Installation Level: (Easy) 
## Installation Time: 2 Minutes 
## Files To Edit: 
##			posting.php
##
## Included Files: (N/A)
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 
##
############################################################## 
##
## For security purposes, please check: http://www.phpbb.com/mods/ 
## for the latest version of this MOD. Although MODs are checked 
## before being allowed in the MODs Database there is no guarantee 
## that there are no security problems within the MOD. No support 
## will be given for MODs not found within the MODs Database which 
## can be found at http://www.phpbb.com/mods/ 
##
############################################################## 
##
## Author Notes: 
## 
## This mod was made due to people using my phpBB forum as a link for google to index thiers.
##
## v1.0.0 No matter what settings you have in the ACP, guests can NOT post HTML etc.
##
## In v1.1.0 I hope to strip out ALL bbcode.
##
############################################################## 
## MOD History: 
## 
##   2006-06-06 - Version 1.0.0 
##      - Guest HTML/BBCode and Smilies blocker 
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

#
#-----[ OPEN ]------------------------------------------ 
# 
posting.php

#
#-----[ FIND ]------------------------------------------ 
# 
//
// Set toggles for various options
//
if ( !$board_config['allow_html'] )

#
#-----[ REPLACE WITH ]------------------------------------------ 
# 
//
// Set toggles for various options
//
if ( !$board_config['allow_html'] || $userdata['user_id'] == ANONYMOUS)

#
#-----[ FIND ]------------------------------------------ 
# 
if ( !$board_config['allow_bbcode'] )

#
#-----[ REPLACE WITH ]------------------------------------------ 
# 
if ( !$board_config['allow_bbcode'] || $userdata['user_id'] == ANONYMOUS)

#
#-----[ FIND ]------------------------------------------ 
# 
if ( !$board_config['allow_smilies'] )

#
#-----[ REPLACE WITH ]------------------------------------------ 
# 
if ( !$board_config['allow_smilies'] || $userdata['user_id'] == ANONYMOUS)

#
#-----[ FIND ]------------------------------------------ 
# 
//
// HTML toggle selection
//
if ( $board_config['allow_html'] )

#
#-----[ REPLACE WITH ]------------------------------------------ 
# 
//
// HTML toggle selection
//
if ( $board_config['allow_html'] && $userdata['user_id'] != ANONYMOUS )

#
#-----[ FIND ]------------------------------------------ 
# 
if ( $board_config['allow_bbcode'] )

#
#-----[ REPLACE WITH ]------------------------------------------ 
# 
if ( $board_config['allow_bbcode'] && $userdata['user_id'] != ANONYMOUS )

#
#-----[ FIND ]------------------------------------------ 
# 
if ( $board_config['allow_smilies'] )

#
#-----[ REPLACE WITH ]------------------------------------------ 
# 
if ( $board_config['allow_smilies'] && $userdata['user_id'] != ANONYMOUS )

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 

# EoM 

Locked