小弟欲安裝子分區的外掛,但是在安裝前先行檢查代碼,
按照修改的說明中遇到了幾個地方與說明中些許的不同,
我想應該是跟我曾經安裝過的幾個外掛修改有關,搜索了相關子分區的文章,找不到類似的狀況,
所以目前還不敢冒然動她,因為我的程度還在摸索學習中不知該怎麼辦,懇請大家相助......謝謝
我已安裝過的外掛,按照安裝順序列表在我的簽名檔中.
以下是我所遇到的狀況內容,紅色是我與說明中不同處,節約版面我先貼出一部份,如果不夠請告訴我,我再貼出需要的部份.
謝謝
viewtopic.php 不相同的段落\r
代碼: 選擇全部
#
#-----[ FIND ]------------------------------------------------
#
$is_auth = auth(AUTH_ALL, $forum_id, $userdata, $forum_topic_data);
if( !$is_auth['auth_view'] || !$is_auth['auth_read'] )
{
if ( !$userdata['session_logged_in'] )
{
$redirect = ( isset($post_id) ) ? POST_POST_URL . "=$post_id" : POST_TOPIC_URL . "=$topic_id";
$redirect .= ( isset($start) ) ? "&start=$start" : '';
redirect(append_sid("login.$phpEx?redirect=viewtopic.$phpEx&$redirect", true));
}
$message = ( !$is_auth['auth_view'] ) ? $lang['Topic_post_not_exist'] : sprintf($lang['Sorry_auth_read'], $is_auth['auth_read_type']);
message_die(GENERAL_MESSAGE, $message);
}
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : categories hierarchy ------------------------------------------------
//-- delete
/*
#
#-----[ AFTER, ADD ]------------------------------------------
#
*/
//-- add
// add forums data to the forum_topic_data row
if ( !isset($forums->data[$forum_id]) )
{
message_return('Topic_post_not_exist');
}
$forum_topic_data = array_merge($forum_topic_data, $forums->data[$forum_id]);
// get auths
$user->get_cache(array(POST_FORUM_URL, POST_FORUM_URL . 'jbox'));
$is_auth = auth(AUTH_ALL, $forum_id, $user->data, $forum_topic_data);
if ( !$user->auth(POST_FORUM_URL, 'auth_read', $forum_id) )
{
if ( !$user->data['session_logged_in'] )
{
$redirect = empty($post_id) || !empty($start) ? array(POST_TOPIC_URL => $topic_id) : array(POST_POST_URL => $post_id);
redirect($config->url('viewtopic', $redirect + array('start' => intval($start)), true));
}
message_return($user->auth(POST_FORUM_URL, 'auth_view', $forum_id) ? sprintf($user->lang('Sorry_auth_read'), $user->lang('Auth_Users_granted_access')) : 'Topic_post_not_exist');
}
//-- fin mod : categories hierarchy --------------------------------------------includes/auth.php 不相同的段落\r$is_auth = auth(AUTH_ALL, $forum_id, $userdata, $forum_topic_data);
if( !$is_auth['auth_view'] || !$is_auth['auth_read'] )
{
if ( !$userdata['session_logged_in'] )
{
$redirect = ( !empty($post_id) ) ? POST_POST_URL . "=$post_id" : POST_TOPIC_URL . "=$topic_id";
$redirect .= ( isset($start) ) ? "&start=$start" : '';
redirect(append_sid("login.$phpEx?redirect=viewtopic.$phpEx&$redirect", true));
}
$message = ( !$is_auth['auth_view'] ) ? $lang['Topic_post_not_exist'] : sprintf($lang['Sorry_auth_read'], $is_auth['auth_read_type']);
message_die(GENERAL_MESSAGE, $message);
}
代碼: 選擇全部
#
#-----[ FIND ]------------------------------------------------
#
# this is a partial search : the full lines are longest
#
function auth($type, $forum_id, $userdata
{
global $db, $lang;
switch( $type )
{
case AUTH_ALL:
$a_sql = 'a.auth_view, a.auth_read,
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : categories hierarchy ------------------------------------------------
//-- delete
/*
#
#-----[ AFTER, ADD ]------------------------------------------
#
*/
//-- add
// this one will be only called by hitting the ACP/Auths center/Definition/"Forums" auths type/Regen button
function get_forums_auths_def()
{
// get current auths fields
//-- fin mod : categories hierarchy --------------------------------------------templates/subSilver/posting_body.tpl不相同的段落\r*/
function auth($type, $forum_id, $userdata, $f_access = '')
{
global $db, $lang;
switch( $type )
{
case AUTH_ALL:
//-- mod : announces -------------------------------------------------------------------------------
// here we added
// , a.auth_global_announce
// and
// , 'auth_global_announce
//-- modify
$a_sql = 'a.auth_view, a.auth_read, a.auth_post, a.auth_reply, a.auth_edit, a.auth_delete, a.auth_sticky, a.auth_announce, a.auth_global_announce, a.auth_vote, a.auth_pollcreate';
$auth_fields = array('auth_view', 'auth_read', 'auth_post', 'auth_reply', 'auth_edit', 'auth_delete', 'auth_sticky', 'auth_announce', 'auth_global_announce', 'auth_vote', 'auth_pollcreate');
//-- fin mod : announces ---------------------------------------------------------------------------
代碼: 選擇全部
#
#-----[ FIND ]------------------------------------------------
#
# this is a partial search : the full lines are longer
#
<tr>
{L_SUBJECT}
<td
name="subject"
</td>
</tr>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
<!-- BEGIN switch_subject -->
#
#-----[ IN-LINE FIND ]----------------------------------------
#
maxlength="60"
#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
maxlength="{SUBJECT_LENGTH}"
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- END switch_subject -->
<!-- BEGIN switch_sub_title -->
<tr>
<td class="row1"><span class="gen"><b>{L_SUB_TITLE}</b></span></td>
<td class="row2"><span class="gen">
<input type="text" name="sub_title" size="45" maxlength="{SUB_TITLE_LENGTH}" style="width:450px" tabindex="2" class="post" value="{SUB_TITLE}" />
</span></td>
</tr>
<!-- END switch_sub_title -->
<!-- BEGIN switch_explain -->
<tr>
<td class="row3" colspan="2"><span class="gensmall">{L_EXPLAIN}</span></td>
</tr>
<!-- END switch_explain -->
{ICON_BOX}
templates/subSilver/privmsgs_body.tpl 不同的段落\r<!-- BEGIN switch_subject -->
<tr>
<td class="row1" width="22%"><span class="gen"><b>{L_SUBJECT}</b></span></td>
<td class="row2" width="78%"> <span class="gen"><select onchange="document.post.subject.focus(); document.post.subject.value = this.options[this.selectedIndex].value + document.post.subject.value;">
<option selected value="">主題類型</option>
<option value="[公告]">[公告]</option>
<option value="[問題]">[問題]</option>
<option value="[討論]">[討論]</option>
<option value="[教學]">[教學]</option>
<option value="[投票]">[投票]</option>
<option value="[測試]">[測試]</option>
<option value="[分享]">[分享]</option>
<option value="[閒聊]">[閒聊]</option>
<option value="[笑話]">[笑話]</option>
<option value="[新聞]">[新聞]</option>
<option value="[影片]">[影片]</option>
<option value="[音樂]">[音樂]</option>
<option value="[其它]">[其它]</option>
</select>
<input type="text" name="subject" size="45" maxlength="60" style="width:450px" tabindex="2" class="post" value="{SUBJECT}" />
</span> </td>
</tr>
<!-- END switch_subject -->
代碼: 選擇全部
#
#-----[ FIND ]------------------------------------------------
#
\n# this is a partial search : the full lines are longer
#
<td align="left" valign="middle">{POST_PM_IMG}</td>
{U_INDEX}
#
#-----[ REPLACE WITH ]----------------------------------------
#
<td align="left" valign="middle">{POST_PM_IMG}</td>
#<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left" valign="middle">{POST_PM_IMG}</td>
<!-- Start add - Custom mass PM MOD -->
<td align="left" valign="middle">{MASS_PM_IMG}</td>
<!-- End add - Custom mass PM MOD -->
<td align="left" width="100%"> <span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
<td align="right" nowrap="nowrap"><span class="gensmall">{L_DISPLAY_MESSAGES}:
<select name="msgdays">{S_SELECT_MSG_DAYS}
</select>
<input type="submit" value="{L_GO}" name="submit_msgdays" class="liteoption" />
</span></td>
</tr>
</table>
<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
<tr>
<th width="5%" height="25" class="thCornerL" nowrap="nowrap"> {L_FLAG} </th>
<th width="55%" class="thTop" nowrap="nowrap"> {L_SUBJECT} </th>
<th width="20%" class="thTop" nowrap="nowrap"> {L_FROM_OR_TO} </th>
<th width="15%" class="thTop" nowrap="nowrap"> {L_DATE} </th>
<th width="5%" class="thCornerR" nowrap="nowrap"> {L_MARK} </th>
</tr>
<!-- BEGIN listrow -->
<tr>
<td class="{listrow.ROW_CLASS}" width="5%" align="center" valign="middle"><img src="{listrow.PRIVMSG_FOLDER_IMG}" width="19" height="18" alt="{listrow.L_PRIVMSG_FOLDER_ALT}" title="{listrow.L_PRIVMSG_FOLDER_ALT}" /></td>
<td width="55%" valign="middle" class="{listrow.ROW_CLASS}">{listrow.PRIVMSG_ATTACHMENTS_IMG}<span class="topictitle"> <a href="{listrow.U_READ}" class="topictitle">{listrow.SUBJECT}</a></span></td>
<td width="20%" valign="middle" align="center" class="{listrow.ROW_CLASS}"><span class="name"> <a href="{listrow.U_FROM_USER_PROFILE}" class="name">{listrow.FROM}</a></span></td>
<td width="15%" align="center" valign="middle" class="{listrow.ROW_CLASS}"><span class="postdetails">{listrow.DATE}</span></td>
<td width="5%" align="center" valign="middle" class="{listrow.ROW_CLASS}"><span class="postdetails">
<input type="checkbox" name="mark[]2" value="{listrow.S_MARK_ID}" />
</span></td>
</tr>
<!-- END listrow -->
