Kód:
##############################################################
## MOD Title: Hide Post Buttons
## MOD Author: OXPUS < webmaster@oxpus.de > (Karsten Ude) http://www.oxpus.de
## MOD Description: If a user haves no auth to post a new topic or reply to a post this
## mod will hide the buttons to do this.
## A more friendly version before displaying the auth message.
## MOD Version: 1.1.1
##
## Installation Level: Intermediate
## Installation Time: 5-8 Minutes
## Files To Edit: 4
## viewforum.php
## viewtopic.php
## templates/subSilver/viewforum_body.tpl
## templates/subSilver/viewtopic_body.tpl
##
## Included Files: n/a
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ 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/
##############################################################
## Author Notes:
##
##############################################################
## MOD History:
##
## 2005-01-21 - Version 1.1.1
## - FIX little typo to enable the buttons for users
##
## 2004-12-09 - Version 1.1.0
## - ADD hide quote button on posts, too.
##
## 2004-10-30 - Version 1.0.0
## - First release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
viewforum.php
#
#-----[ FIND ]------------------------------------------
#
//
// Post URL generation for templating vars
//
#
#-----[ AFTER, ADD ]------------------------------------------
#
if ($is_auth['auth_post'] || $is_auth['auth_mod'])
{
$temp_url = append_sid("posting.$phpEx?mode=newtopic&" . POST_FORUM_URL . "=$forum_id");
$u_post_new_topic = '<a href="'.$temp_url.'">';
$temp_image = ( $forum_row['forum_status'] == FORUM_LOCKED ) ? $images['post_locked'] : $images['post_new'];
$u_post_new_topic_image = '<img src="'.$temp_image.'" border="0" />';
$u_post_new_topic .= $u_post_new_topic_image . '</a>';
}
else
{
$u_post_new_topic = ( $forum_row['forum_status'] == FORUM_LOCKED ) ? '<img src="'.$images['post_locked'].'" border="0" />' : '';
}
#
#-----[ FIND ]------------------------------------------
#
'U_POST_NEW_TOPIC' => append_sid("posting.$phpEx?mode=newtopic&" . POST_FORUM_URL . "=$forum_id"),
#
#-----[ REPLACE WITH ]------------------------------------------
#
'U_POST_NEW_TOPIC' => $u_post_new_topic,
#
#-----[ FIND ]------------------------------------------
#
'POST_IMG' => ( $forum_row['forum_status'] == FORUM_LOCKED ) ? $images['post_locked'] : $images['post_new'],
#
#-----[ REPLACE WITH ]------------------------------------------
#
// 'POST_IMG' => ( $forum_row['forum_status'] == FORUM_LOCKED ) ? $images['post_locked'] : $images['post_new'],
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
$new_topic_url = append_sid("posting.$phpEx?mode=newtopic&" . POST_FORUM_URL . "=$forum_id");
#
#-----[ IN-LINE FIND ]------------------------------------------
#
append_sid(
#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
($is_auth['auth_post']) ? '<a href="'.
#
#-----[ IN_LINE FIND ]------------------------------------------
#
")
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
.'">' : ''
#
#-----[ FIND ]------------------------------------------
#
$reply_topic_url = append_sid("posting.$phpEx?mode=reply&" . POST_TOPIC_URL . "=$topic_id");
#
#-----[ IN-LINE FIND ]------------------------------------------
#
append_sid(
#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
($is_auth['auth_reply']) ? '<a href="'.
#
#-----[ IN_LINE FIND ]------------------------------------------
#
")
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
.'">' : ''
#
#-----[ FIND ]------------------------------------------
#
$reply_img = ( $forum_topic_data['forum_status'] == FORUM_LOCKED || $forum_topic_data['topic_status'] == TOPIC_LOCKED ) ? $images['reply_locked'] : $images['reply_new'];
$reply_alt = ( $forum_topic_data['forum_status'] == FORUM_LOCKED || $forum_topic_data['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['Reply_to_topic'];
$post_img = ( $forum_topic_data['forum_status'] == FORUM_LOCKED ) ? $images['post_locked'] : $images['post_new'];
$post_alt = ( $forum_topic_data['forum_status'] == FORUM_LOCKED ) ? $lang['Forum_locked'] : $lang['Post_new_topic'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$new_topic_url .= ($is_auth['auth_post']) ? '<img src="'.$post_img.'" alt="'.$post_alt.'" border="0" /></a>' : '';
$reply_topic_url .= ($is_auth['auth_reply']) ? '<img src="'.$reply_img.'" alt="'.$reply_alt.'" border="0" /></a>' : '';
#
#-----[ FIND ]------------------------------------------
#
'POST_IMG' => $post_img,
#
#-----[ REPLACE WITH ]------------------------------------------
#
// 'POST_IMG' => $post_img,
#
#-----[ FIND ]------------------------------------------
#
'REPLY_IMG' => $reply_img,
#
#-----[ REPLACE WITH ]------------------------------------------
#
// 'REPLY_IMG' => $reply_img,
#
#-----[ FIND ]------------------------------------------
#
$temp_url = append_sid("posting.$phpEx?mode=quote&lpid=$last_post_id&" . POST_POST_URL . "=" . $postrow[$i]['post_id']);
$quote_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_quote'] . '" border="0" /></a>';
$quote = '<a href="' . $temp_url . '">' . $lang['Reply_with_quote'] . '</a>';
#
#-----[ REPLACE WITH ]------------------------------------------
#
if ($is_auth['auth_reply'])
{
$temp_url = append_sid("posting.$phpEx?mode=quote&lpid=$last_post_id&" . POST_POST_URL . "=" . $postrow[$i]['post_id']);
$quote_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_quote'] . '" border="0" /></a>';
$quote = '<a href="' . $temp_url . '">' . $lang['Reply_with_quote'] . '</a>';
}
else
{
$quote_img = '';
$quote = '';
}
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewforum_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" /></a>
#
#-----[ REPLACE WITH ]------------------------------------------
#
{U_POST_NEW_TOPIC}
#
#-----[ FIND ]------------------------------------------
#
<a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" /></a>
#
#-----[ REPLACE WITH ]------------------------------------------
#
{U_POST_NEW_TOPIC}
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" align="middle" /></a>
#
#-----[ REPLACE WITH ]------------------------------------------
#
{U_POST_NEW_TOPIC}
#
#-----[ FIND ]------------------------------------------
#
<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" align="middle" /></a>
#
#-----[ REPLACE WITH ]------------------------------------------
#
{U_POST_REPLY_TOPIC}
#
#-----[ FIND ]------------------------------------------
#
<a href="{U_POST_NEW_TOPIC}"><img src="{POST_IMG}" border="0" align="middle" /></a>
#
#-----[ REPLACE WITH ]------------------------------------------
#
{U_POST_NEW_TOPIC}
#
#-----[ FIND ]------------------------------------------
#
<a href="{U_POST_REPLY_TOPIC}"><img src="{REPLY_IMG}" border="0" align="middle" /></a>
#
#-----[ REPLACE WITH ]------------------------------------------
#
{U_POST_REPLY_TOPIC}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM