BBCodeBox3 http://4seven.bplaced.net/forum/2/ |
|
[Snippet] Prevent Topic Renaming by User (en) http://4seven.bplaced.net/forum/2/viewtopic.php?f=20&t=502 |
Page 1 of 1 |
Author: | 4seven [ Wed 19. May 2010, 22:27 ] |
Post subject: | [Snippet] Prevent Topic Renaming by User (en) |
Prevent Topic Renaming by User With 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: Bash Request Thread: http://www.phpbb.com/community/viewtopi ... &t=2091604 Instruction open posting.php find Code: 'TOPIC_TITLE' => censor_text($post_data['topic_title']), after add Code: // Prevent Topic Renaming by User / 4seven / 2010 'S_TOPIC_TITLE_EXIST' => (empty($post_data['topic_title'])) ? true : false, // Prevent Topic Renaming by User / 4seven / 2010 open styles/prosilver/template/posting_editor.html find Code: <!-- 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 with Code: <!-- 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 --> open styles/subsilver2/template/posting_body.html find Code: <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 with Code: <!-- 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 |
Page 1 of 1 | All times are UTC + 1 hour [ DST ] |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |