BBCodeBox3

prosilver | subsilver2

Willkommen und Guten Abend, Guest  Beim nächsten Piep ist es zwischen 20:00 und 21:00 Uhr

It is currently Mon 17. Jun 2024, 20:12

All times are UTC + 1 hour [ DST ]




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
PostPosted: Wed 19. May 2010, 22:27 
Administrator
User avatar

Posts: 427

Last 3 Topics:
Tabmenu Test
[Snippet] Avatar Ev...
[DEV] Zero and X-P...

Joined:
Sun 13. Jan 2008, 23:44

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
POWERED_BY
[ Time : 0.087s | 20 Queries | GZIP : Off | Board-Version: 3.0.7 PL1 ]