Prevent Topic Renaming by UserWith this Snippet u prevent the renaming of topics by User (except Admins and Moderators)
Once the first Post of a new Topic is submitted, there is no way back for a User.
Request by: BashRequest Thread: http://www.phpbb.com/community/viewtopi ... &t=2091604
Instructionopenposting.php
findCode:
'TOPIC_TITLE' => censor_text($post_data['topic_title']),
after addCode:
'S_TOPIC_TITLE_EXIST' => (empty($post_data['topic_title'])) ? true : false,
openstyles/prosilver/template/posting_editor.html
findCode:
<!-- IF S_POST_ACTION or S_PRIVMSGS or S_EDIT_DRAFT -->
<dl style="clear: left;">
<dt><label for="subject">{L_SUBJECT}:</label></dt>
<dd><input type="text" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" /> {ALLOW_FOR_GROUPS}</dd>
</dl>
<!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
<!-- DEFINE $CAPTCHA_TAB_INDEX = 3 -->
<!-- INCLUDE {CAPTCHA_TEMPLATE} -->
<!-- ENDIF -->
<!-- ENDIF -->
replace withCode:
<!-- IF S_POST_ACTION or S_PRIVMSGS or S_EDIT_DRAFT -->
<!-- IF S_TOPIC_TITLE_EXIST or (not S_TOPIC_TITLE_EXIST and (U_ACP or M_ACP)) -->
<dl style="clear: left;">
<dt><label for="subject">{L_SUBJECT}:</label></dt>
<dd><input type="text" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" /> {ALLOW_FOR_GROUPS}</dd>
</dl>
<!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
<!-- DEFINE $CAPTCHA_TAB_INDEX = 3 -->
<!-- INCLUDE {CAPTCHA_TEMPLATE} -->
<!-- ENDIF -->
<!-- ENDIF -->
<!-- ENDIF -->
openstyles/subsilver2/template/posting_body.html
findCode:
<tr>
<td class="row1" width="22%"><b class="genmed">{L_SUBJECT}:</b></td>
<td class="row2" width="78%"><input class="post" style="width:450px" type="text" name="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->" tabindex="2" value="{SUBJECT}" /></td>
</tr>
replace withCode:
<!-- IF S_TOPIC_TITLE_EXIST or (not S_TOPIC_TITLE_EXIST and (U_ACP or M_ACP)) -->
<tr>
<td class="row1" width="22%"><b class="genmed">{L_SUBJECT}:</b></td>
<td class="row2" width="78%"><input class="post" style="width:450px" type="text" name="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->" tabindex="2" value="{SUBJECT}" /></td>
</tr>
<!-- ENDIF -->
clear all board-, style and browser-caches