[問題]特定群組使用簽名檔

phpBB 2 MOD Support
無論是官方或非官方認證之外掛,安裝與使用問題討論。
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

主題已鎖定
DL
竹貓忠實會員
竹貓忠實會員
文章: 717
註冊時間: 2005-03-05 15:29

[問題]特定群組使用簽名檔

文章 DL »

問題外掛:特定群組使用簽名檔
使用版本:2.0.19
狀況描述:

如果我想不要讓所有人都使用簽名檔,而只限特定群組使用。
我參考blog mod改成了這樣:

代碼: 選擇全部

#

#-----[ SQL ]------------------------------------------

# Replace "phpbb_" with the prefix of your forums, or use the included db_update.php to run the SQL

ALTER TABLE phpbb_groups ADD group_allow_signature TINYINT(1) UNSIGNED NOT NULL DEFAULT '0';



#

#-----[ OPEN ]------------------------------------------

# REQUIRED - Adds the option to allow/disallow a group to be able to create a blog

admin/admin_groups.php



#

#-----[ FIND ]------------------------------------------

#

		$group_info = array (

			'group_name' => '',

			'group_description' => '',

			'group_moderator' => '',



#

#-----[ AFTER, ADD ]------------------------------------------

#

			'group_allow_signature' => 0,



#

#-----[ FIND ]------------------------------------------

#

		'U_SEARCH_USER' => append_sid("../search.$phpEx?mode=searchuser"), 



#

#-----[ AFTER, ADD ]------------------------------------------

#

		'L_WEBLOG_GROUP' => $lang['Group_allow_signature'],

		'L_NO' => $lang['No'],

		'S_GROUP_ALLOW_SIGN_YES' => ( $group_info['group_allow_signature'] ) ? ' checked="checked"' : '',

		'S_GROUP_ALLOW_SIGN_NO' => ( !$group_info['group_allow_signature'] ) ? ' checked="checked"' : '',



#

#-----[ FIND ]------------------------------------------

#

		$group_moderator = isset($HTTP_POST_VARS['username']) ? $HTTP_POST_VARS['username'] : '';



#

#-----[ AFTER, ADD ]------------------------------------------

#

		$group_allow_signature = ( isset($HTTP_POST_VARS['group_allow_signature']) ) ? intval($HTTP_POST_VARS['group_allow_signature']) 	: 0;



#

#-----[ FIND ]------------------------------------------

#

			$sql = "UPDATE " . GROUPS_TABLE . "

				SET group_type = $group_type, group_name = '" . str_replace("\'", "''", $group_name) . "', group_description = '" . str_replace("\'", "''", $group_description) . "', group_moderator = $group_moderator 



#

#-----[ IN-LINE FIND ]------------------------------------------

#

, group_moderator = $group_moderator



#

#-----[ IN-LINE AFTER, ADD ]------------------------------------------

#

, group_allow_signature = $group_allow_signature



#

#-----[ FIND ]------------------------------------------

#

			$sql = "INSERT INTO " . GROUPS_TABLE . " (group_type, group_name, group_description, group_moderator, group_single_user)



#

#-----[ IN-LINE FIND ]------------------------------------------

#

, group_single_user



#

#-----[ IN-LINE AFTER, ADD ]------------------------------------------

#

, group_allow_signature



#

#-----[ FIND ]------------------------------------------

#

				VALUES ($group_type, '" . str_replace("\'", "''", $group_name) . "', '" . str_replace("\'", "''", $group_description) . "', $group_moderator,	'0')";



#

#-----[ IN-LINE FIND ]------------------------------------------

#

$group_moderator,	'0'



#

#-----[ IN-LINE AFTER, ADD ]------------------------------------------

#

, $group_allow_signature



#

#-----[ OPEN ]------------------------------------------

# 

language/lang_chinese_traditional_taiwan/lang_admin.php



#

#-----[ FIND ]------------------------------------------

#

//

// That's all Folks!

// -------------------------------------------------



#

#-----[ BEFORE, ADD ]------------------------------------------

#

$lang['Group_allow_signature'] = '允許群組會員使用簽名檔';



#

#-----[ OPEN ]------------------------------------------

# REQUIRED - Adds the ability to allow/disallow groups the ability to have blogs

templates/subSilver/admin/group_edit_body.tpl



#

#-----[ FIND ]------------------------------------------

#

	<tr> 

	  <td class="row1" width="38%"><span class="gen">{L_GROUP_STATUS}:</span></td>

	  <td class="row2" width="62%"> 

		<input type="radio" name="group_type" value="{S_GROUP_OPEN_TYPE}" {S_GROUP_OPEN_CHECKED} /> {L_GROUP_OPEN} &nbsp;&nbsp;<input type="radio" name="group_type" value="{S_GROUP_CLOSED_TYPE}" {S_GROUP_CLOSED_CHECKED} />	{L_GROUP_CLOSED} &nbsp;&nbsp;<input type="radio" name="group_type" value="{S_GROUP_HIDDEN_TYPE}" {S_GROUP_HIDDEN_CHECKED} />	{L_GROUP_HIDDEN}</td> 

	</tr>



#

#-----[ AFTER, ADD ]------------------------------------------

#



	<tr> 

	  <td class="row1" width="38%"><span class="gen">{L_SIGN_GROUP}:</span></td>

	  <td class="row2" width="62%"> 

		<input type="radio" name="group_allow_signature" value="1" {S_GROUP_ALLOW_SIGN_YES} /> {L_YES} &nbsp;&nbsp;<input type="radio" name="group_allow_signature" value="0" {S_GROUP_ALLOW_SIGN_NO} /> {L_NO}</td> 

	</tr>
不知道還應該怎麼改…
主題已鎖定

回到「外掛問題討論」