HTML nur für Admins
Verfasst: 09.06.2006 18:06
Ich suche ein Mod, das bewirkt, dass nur der Admin HTML benutzen kann!
Code: Alles auswählen
##############################################################
## MOD Title: phpbbAdminHTML
## MOD Version: 1.00
## Author: Nathan_Anderson
## Description: Turns on HTML support for Admin's
##
## Installation Level: easy
## Installation Time: 2 Minutes
## Files To Edit: 1 File
## Included Files: session.php
##############################################################
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above
##############################################################
## For Security Purposes, Please Check: <http://www.phpbb.com/mods/downloads/> for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: <http://www.phpbb.com/mods/downloads/>
##############################################################
## Authors Notes:
## Probably the smalled mod ever. :) But I've seen several requests for this.
## Please note there are three places where the return $userdata is used
## Only one of them has the three close brackets "}" after it.
##
## Installation:
## Edit the session.php file
##
## History
## Release - 1.00
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ open ]------------------------------------------
#
includes/sessions.php
#
#-----[ find ]------------------------------------------
#
return $userdata;
}
}
}
#
#-----[ before, add ]------------------------------------------
#
// Override Board setting if we are an Administrator.
if ($userdata['user_level'] == ADMIN) $board_config['allow_html'] = "1";
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Code: Alles auswählen
########################################################
## Mod Title: admins allowed html
## Mod Version: 1.0.0
## Author: Adam Ismay (mitsubishi) <admin@boardz.tk> www.boardz.tk
## Description: Makes admins able to post HTML no matter what the option
## for other users is set to.
##
## Installation Level: easy
## Installation Time: 1-2 Minutes
## Files To Edit: posting.php
## viewtopic.php
## includes/topic_review.php
##############################################################
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
##############################################################
## Authors Notes: You still need to set the allowed HTML tags.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
# ------ [ OPEN ] ----
#
viewtopic.php
#
# ------- [ FIND ] ------
#
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
#
# ----- [ REPLACE WITH] ----
# The important bit is 'u.user_level,'
$sql = "SELECT u.username, u.user_level, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
#
# ------ [ FIND ] ----
#
// If the board has HTML off but the post has HTML
// on then we process it, else leave it alone
//
if ( !$board_config['allow_html'] )
#
# ------ [ REPLACE WITH] ----
#
// If the board has HTML off but the post has HTML
// on then we process it, else leave it alone
//
if ( !$board_config['allow_html'] && $postrow[$i]['user_level'] != ADMIN )
#
# ------ [ OPEN ] ----
#
posting.php
#
# ------ [ FIND ] ----
#
//
// End session management
//
#
# ------ [ AFTER, ADD ] ----
#
if ($userdata['user_level'] == ADMIN)
{
$board_config['allow_html'] = 1;
}
#
# ------ [ OPEN ] ----
#
includes/topic_review.php
#
# ------ [ FIND] ----
#
$sql = "SELECT u.username, u.user_id, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
#
# ------ [ REPLACE WITH ] ----
# again 'u.user_level' is the important bit
$sql = "SELECT u.username, u.user_id, u.user_level, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
#
# ------ [ FIND ] ----
#
// If the board has HTML off but the post has HTML
// on then we process it, else leave it alone
//
if ( !$board_config['allow_html'] && $row['enable_html'] )
#
# ------ [ REPLACE WITH ] ----
#
// If the board has HTML off but the post has HTML
// on then we process it, else leave it alone
//
if ( !$board_config['allow_html'] && $row['enable_html'] && $row['user_level'] != ADMIN )
#
#-----[ SAVE ALL FILES ]------------------------------------------
#
# EoM