Stop members to change the "Prefixe & Subject" of their thread by edit the 1st post

Spartak

Well-known member
Member
Joined
9 yrs. 9 mth. 5 days
Messages
587
Reaction score
8,878
Wallet
0$
Stop members to change the "Prefixe & Subject" of their thread by edit the 1st post

<span style="font-weight: bold;" class="mycode_b">Hello ,</span><br />
<br />
In this tutorial i will show you how can you stop the register members to edit themselves their thread Prefixe &amp; Subject .<br />
<br />
Requirement :- <a href="
Please, Log in or Register to view URLs content!
" target="_blank" rel="noopener" class="mycode_url">Template conditionals</a><br />
<br />
<span style="font-weight: bold;" class="mycode_b">Step 1</span>:<br />
<br />
Install template conditionals<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Step 2:</span><br />
<br />
Log into your acp and head over to your templates.<br />
<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Step 3</span>: Go to the <span style="font-style: italic;" class="mycode_i">editpost  </span>template and click edit .<br />
<br />
1. if you want to stop them edit from only Prefixe then remove all the codes from box and paste it.<br />
<pre data-deferred="true" class="block-code line-numbers language-none"><code class="language-php">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;{$mybb-&gt;settings['bbname']} - {$lang-&gt;edit_post}&lt;/title&gt;
{$headerinclude}
{$post_javascript}
&lt;/head&gt;
&lt;body&gt;
{$header}
{$preview}
{$post_errors}
{$attacherror}
{$moderation_notice}
{$deletebox}
&lt;form id=&quot;editpost&quot; action=&quot;editpost.php?pid={$pid}&amp;amp;processed=1&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot; name=&quot;input&quot;&gt;
&lt;input type=&quot;hidden&quot; name=&quot;my_post_key&quot; value=&quot;{$mybb-&gt;post_code}&quot; /&gt;
&lt;if $GLOBALS['mybb']-&gt;user['usergroup'] == 2 then&gt;
&lt;table border=&quot;0&quot; cellspacing=&quot;{$theme['borderwidth']}&quot; cellpadding=&quot;{$theme['tablespace']}&quot; class=&quot;tborder&quot;&gt;
&lt;tr&gt;
&lt;td class=&quot;thead&quot; colspan=&quot;2&quot;&gt;&lt;strong&gt;{$lang-&gt;edit_post}&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
{$loginbox}
&lt;tr&gt;
&lt;td class=&quot;trow2&quot;&gt;&lt;strong&gt;{$lang-&gt;subject}&lt;/strong&gt;&lt;/td&gt;
&lt;td class=&quot;trow2&quot;&gt;&lt;strong&gt;Report To Change Prefixe&lt;/strong&gt;&lt;input type=&quot;text&quot; class=&quot;textbox&quot; name=&quot;subject&quot; size=&quot;40&quot; maxlength=&quot;85&quot; value=&quot;{$subject}&quot; tabindex=&quot;2&quot; /&gt;&lt;/td&gt;
&lt;/tr&gt;
{$posticons}
&lt;tr&gt;
&lt;td class=&quot;trow2&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;{$lang-&gt;your_message}&lt;/strong&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;{$smilieinserter}&lt;/div&gt;&lt;/td&gt;
&lt;td class=&quot;trow2&quot;&gt;
&lt;textarea name=&quot;message&quot; id=&quot;message&quot; rows=&quot;20&quot; cols=&quot;70&quot; tabindex=&quot;3&quot;&gt;{$message}&lt;/textarea&gt;
{$codebuttons}
&lt;/td&gt;
&lt;/tr&gt;
{$editreason}
{$postoptions}
{$subscriptionmethod}
{$pollbox}
&lt;/table&gt;
{$attachbox}
&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;&lt;input type=&quot;submit&quot; class=&quot;button&quot; name=&quot;submitbutton&quot; value=&quot;{$lang-&gt;update_post}&quot; tabindex=&quot;3&quot; accesskey=&quot;s&quot; /&gt; &lt;input type=&quot;submit&quot; class=&quot;button&quot; name=&quot;previewpost&quot; value=&quot;{$lang-&gt;preview_post}&quot; tabindex=&quot;4&quot; /&gt;&lt;/div&gt;
&lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;do_editpost&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;attachmentaid&quot; value=&quot;&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;attachmentact&quot; value=&quot;&quot; /&gt;
&lt;/form&gt;
{$footer}
&lt;br /&gt;
&lt;else&gt;
&lt;table border=&quot;0&quot; cellspacing=&quot;{$theme['borderwidth']}&quot; cellpadding=&quot;{$theme['tablespace']}&quot; class=&quot;tborder&quot;&gt;
&lt;tr&gt;
&lt;td class=&quot;thead&quot; colspan=&quot;2&quot;&gt;&lt;strong&gt;{$lang-&gt;edit_post}&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
{$loginbox}
&lt;tr&gt;
&lt;td class=&quot;trow2&quot;&gt;&lt;strong&gt;{$lang-&gt;subject}&lt;/strong&gt;&lt;/td&gt;
&lt;td class=&quot;trow2&quot;&gt;{$prefixselect}&lt;input type=&quot;text&quot; class=&quot;textbox&quot; name=&quot;subject&quot; size=&quot;40&quot; maxlength=&quot;85&quot; value=&quot;{$subject}&quot; tabindex=&quot;1&quot; /&gt;&lt;/td&gt;
&lt;/tr&gt;
{$posticons}
&lt;tr&gt;
&lt;td class=&quot;trow2&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;{$lang-&gt;your_message}&lt;/strong&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;{$smilieinserter}&lt;/div&gt;&lt;/td&gt;
&lt;td class=&quot;trow2&quot;&gt;
&lt;textarea name=&quot;message&quot; id=&quot;message&quot; rows=&quot;20&quot; cols=&quot;70&quot; tabindex=&quot;3&quot;&gt;{$message}&lt;/textarea&gt;
{$codebuttons}
&lt;/td&gt;
&lt;/tr&gt;
{$editreason}
{$postoptions}
{$subscriptionmethod}
{$pollbox}
&lt;/table&gt;
{$attachbox}
&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;&lt;input type=&quot;submit&quot; class=&quot;button&quot; name=&quot;submitbutton&quot; value=&quot;{$lang-&gt;update_post}&quot; tabindex=&quot;3&quot; accesskey=&quot;s&quot; /&gt; &lt;input type=&quot;submit&quot; class=&quot;button&quot; name=&quot;previewpost&quot; value=&quot;{$lang-&gt;preview_post}&quot; tabindex=&quot;4&quot; /&gt;&lt;/div&gt;
&lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;do_editpost&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;attachmentaid&quot; value=&quot;&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;attachmentact&quot; value=&quot;&quot; /&gt;
&lt;/form&gt;
{$footer}
&lt;/if&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre><br />
2. if you want to stop them edit from both subject and Prefixe then remove all the codes and paste it there.<br />
<pre data-deferred="true" class="block-code line-numbers language-none"><code class="language-php">&lt;html&gt;
&lt;head&gt;
&lt;title&gt;{$mybb-&gt;settings['bbname']} - {$lang-&gt;edit_post}&lt;/title&gt;
{$headerinclude}
{$post_javascript}
&lt;/head&gt;
&lt;body&gt;
{$header}
{$preview}
{$post_errors}
{$attacherror}
{$moderation_notice}
{$deletebox}
&lt;form id=&quot;editpost&quot; action=&quot;editpost.php?pid={$pid}&amp;amp;processed=1&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot; name=&quot;input&quot;&gt;
&lt;input type=&quot;hidden&quot; name=&quot;my_post_key&quot; value=&quot;{$mybb-&gt;post_code}&quot; /&gt;
&lt;if $GLOBALS['mybb']-&gt;user['usergroup'] == 2 then&gt;
&lt;table border=&quot;0&quot; cellspacing=&quot;{$theme['borderwidth']}&quot; cellpadding=&quot;{$theme['tablespace']}&quot; class=&quot;tborder&quot;&gt;
&lt;tr&gt;
&lt;td class=&quot;thead&quot; colspan=&quot;2&quot;&gt;&lt;strong&gt;{$lang-&gt;edit_post}&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
{$loginbox}
&lt;tr&gt;
&lt;td class=&quot;trow2&quot;&gt;&lt;strong&gt;{$lang-&gt;subject}&lt;/strong&gt;&lt;/td&gt;
&lt;td class=&quot;trow2&quot;&gt;&lt;strong&gt;Report To Change Thread Prefixe &amp; Title&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
{$posticons}
&lt;tr&gt;
&lt;td class=&quot;trow2&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;{$lang-&gt;your_message}&lt;/strong&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;{$smilieinserter}&lt;/div&gt;&lt;/td&gt;
&lt;td class=&quot;trow2&quot;&gt;
&lt;textarea name=&quot;message&quot; id=&quot;message&quot; rows=&quot;20&quot; cols=&quot;70&quot; tabindex=&quot;3&quot;&gt;{$message}&lt;/textarea&gt;
{$codebuttons}
&lt;/td&gt;
&lt;/tr&gt;
{$editreason}
{$postoptions}
{$subscriptionmethod}
{$pollbox}
&lt;/table&gt;
{$attachbox}
&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;&lt;input type=&quot;submit&quot; class=&quot;button&quot; name=&quot;submitbutton&quot; value=&quot;{$lang-&gt;update_post}&quot; tabindex=&quot;3&quot; accesskey=&quot;s&quot; /&gt; &lt;input type=&quot;submit&quot; class=&quot;button&quot; name=&quot;previewpost&quot; value=&quot;{$lang-&gt;preview_post}&quot; tabindex=&quot;4&quot; /&gt;&lt;/div&gt;
&lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;do_editpost&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;attachmentaid&quot; value=&quot;&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;attachmentact&quot; value=&quot;&quot; /&gt;
&lt;/form&gt;
{$footer}
&lt;br /&gt;
&lt;else&gt;
&lt;table border=&quot;0&quot; cellspacing=&quot;{$theme['borderwidth']}&quot; cellpadding=&quot;{$theme['tablespace']}&quot; class=&quot;tborder&quot;&gt;
&lt;tr&gt;
&lt;td class=&quot;thead&quot; colspan=&quot;2&quot;&gt;&lt;strong&gt;{$lang-&gt;edit_post}&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
{$loginbox}
&lt;tr&gt;
&lt;td class=&quot;trow2&quot;&gt;&lt;strong&gt;{$lang-&gt;subject}&lt;/strong&gt;&lt;/td&gt;
&lt;td class=&quot;trow2&quot;&gt;{$prefixselect}&lt;input type=&quot;text&quot; class=&quot;textbox&quot; name=&quot;subject&quot; size=&quot;40&quot; maxlength=&quot;85&quot; value=&quot;{$subject}&quot; tabindex=&quot;1&quot; /&gt;&lt;/td&gt;
&lt;/tr&gt;
{$posticons}
&lt;tr&gt;
&lt;td class=&quot;trow2&quot; valign=&quot;top&quot;&gt;&lt;strong&gt;{$lang-&gt;your_message}&lt;/strong&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;{$smilieinserter}&lt;/div&gt;&lt;/td&gt;
&lt;td class=&quot;trow2&quot;&gt;
&lt;textarea name=&quot;message&quot; id=&quot;message&quot; rows=&quot;20&quot; cols=&quot;70&quot; tabindex=&quot;3&quot;&gt;{$message}&lt;/textarea&gt;
{$codebuttons}
&lt;/td&gt;
&lt;/tr&gt;
{$editreason}
{$postoptions}
{$subscriptionmethod}
{$pollbox}
&lt;/table&gt;
{$attachbox}
&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;&lt;input type=&quot;submit&quot; class=&quot;button&quot; name=&quot;submitbutton&quot; value=&quot;{$lang-&gt;update_post}&quot; tabindex=&quot;3&quot; accesskey=&quot;s&quot; /&gt; &lt;input type=&quot;submit&quot; class=&quot;button&quot; name=&quot;previewpost&quot; value=&quot;{$lang-&gt;preview_post}&quot; tabindex=&quot;4&quot; /&gt;&lt;/div&gt;
&lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;do_editpost&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;attachmentaid&quot; value=&quot;&quot; /&gt;
&lt;input type=&quot;hidden&quot; name=&quot;attachmentact&quot; value=&quot;&quot; /&gt;
&lt;/form&gt;
{$footer}
&lt;/if&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre><br />
<br />
Make sure the register member group id is " 2" .<br />
<br />
You are done.


Please, Log in or Register to view URLs content!
 
Top Bottom