How to stop users from changing "Subject" of the post/topic

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
phpbuser19
Registered User
Posts: 28
Joined: Mon Aug 16, 2021 9:36 pm

How to stop users from changing "Subject" of the post/topic

Post by phpbuser19 »

Some of my users (not the topic startes) are changing Subject of the topic, which changes "Last post" in index.php view.

If I'm looking at "Quck Links / Active Topics" I do see Subects that were assigned by topic starters.

So, when user hits "Post Reply" or "Reply with quote" button - they are presented with "Subject" field and they can edit it to whatever they want.

This functionality doesn't really make sense to me, as the Subject should be assigned and be editable by topic starters only.

How can I prevent users from changing Subject of the topic when thy simply reply to the topic?
rxu
Extensions Development Team
Posts: 3711
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Contact:

Re: How to stop users from changing "Subject" of the post/topic

Post by rxu »

Probably with some extension like that https://www.phpbb.com/customise/db/exte ... m_replies/
User avatar
Forex Station
Registered User
Posts: 177
Joined: Thu Apr 06, 2017 2:26 pm
Location: Australia
Contact:

Re: How to stop users from changing "Subject" of the post/topic

Post by Forex Station »

phpbuser19 wrote: Mon Sep 06, 2021 2:58 am Some of my users (not the topic startes) are changing Subject of the topic, which changes "Last post" in index.php view.

If I'm looking at "Quck Links / Active Topics" I do see Subects that were assigned by topic starters.

So, when user hits "Post Reply" or "Reply with quote" button - they are presented with "Subject" field and they can edit it to whatever they want.

This functionality doesn't really make sense to me, as the Subject should be assigned and be editable by topic starters only.

How can I prevent users from changing Subject of the topic when thy simply reply to the topic?
You can't without an extension.
Highly-customized PhpBB board voted as one of the most influential trading sites in the world: forex-station.com 💬
phpbuser19
Registered User
Posts: 28
Joined: Mon Aug 16, 2021 9:36 pm

Re: How to stop users from changing "Subject" of the post/topic

Post by phpbuser19 »

rxu wrote: Mon Sep 06, 2021 6:31 am Probably with some extension like that https://www.phpbb.com/customise/db/exte ... m_replies/
That particular one seems to slow down the forum quite a bit :(
phpbuser19
Registered User
Posts: 28
Joined: Mon Aug 16, 2021 9:36 pm

Here is an example: I can change the Subject in this post. Why??

Post by phpbuser19 »

Here is an example of changing Subject
User avatar
warmweer
Jr. Extension Validator
Posts: 11234
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Here is an example: I can change the Subject in this post. Why??

Post by warmweer »

phpbuser19 wrote: Mon Sep 06, 2021 6:42 pm Here is an example of changing Subject
We all know how to change the subject (of the post).
The answer to Why?? is: because it can be useful.
In fact I had a board where a topic should be started with An alias @ an institution (a location)
No Re: were allowed.
An alias, an institution, a location could change over time and in that case, the post title of new posts needed to reflect the new situation AND, the topic title was edited to reflect the new situation. (actually the first post was an overview of the changes made, and always reflected the latest situation)
The Why question is really irrelevant.

If you don't want your users to edit the post_subject. Making that a rule should really be sufficient (with some kind of explanation why).
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 5871
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: How to stop users from changing "Subject" of the post/topic

Post by thecoalman »

Untested but you can open /styles/prosilver/template/posting_editor.html


Find:

Code: Select all

			<input type="text" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->120<!-- ELSE -->124<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" />

Replace with:

Code: Select all

			<!-- IF not S_NEW_MESSAGE -->{SUBJECT}{DRAFT_SUBJECT}<!-- ENDIF -->
			<input type="<!-- IF S_NEW_MESSAGE -->text<!-- ELSE -->hidden<!-- ENDIF -->" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->120<!-- ELSE -->124<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" />
Purge the cache after uploading edited file. Note that this just hides the input field and someone with HTML knowledge could get around it.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
phpbuser19
Registered User
Posts: 28
Joined: Mon Aug 16, 2021 9:36 pm

Re: How to stop users from changing "Subject" of the post/topic

Post by phpbuser19 »

If anyone still looking for solution

Disable "Display subject of last added post on forum list" option in ACP / Board Features

Users can still edit "Subject", but new/edited subjects won't show up in list of forums if this option is set to "No"
User avatar
ssl
Registered User
Posts: 1606
Joined: Sat Feb 08, 2020 2:15 pm
Location: Le Lude, Pays de la Loire - France
Name: Fred Rimbert
Contact:

Re: How to stop users from changing "Subject" of the post/topic

Post by ssl »

thecoalman wrote: Mon Sep 06, 2021 11:41 pm Untested but you can open /styles/prosilver/template/posting_editor.html


Find:

Code: Select all

			<input type="text" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->120<!-- ELSE -->124<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" />

Replace with:

Code: Select all

			<!-- IF not S_NEW_MESSAGE -->{SUBJECT}{DRAFT_SUBJECT}<!-- ENDIF -->
			<input type="<!-- IF S_NEW_MESSAGE -->text<!-- ELSE -->hidden<!-- ENDIF -->" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->120<!-- ELSE -->124<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" />
Purge the cache after uploading edited file. Note that this just hides the input field and someone with HTML knowledge could get around it.
Hi
This template modification does not work using the quick response
Sorry for my English ... I do my best!

phpBB: 3.3.11 | PHP: 8.2.16
[Kill spam on phpBB] - [Some French translation of extensions]
"Mistress, Mistress someone is bothering me in pm"
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 5871
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: How to stop users from changing "Subject" of the post/topic

Post by thecoalman »

Open /styles/prosilver/template/quickreply_editor.html and find:

Code: Select all

						<dd><input type="text" name="subject" id="subject" size="45" maxlength="124" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" /></dd>
Replace with:

Code: Select all

						<dd>{SUBJECT}<input type="hidden" name="subject" id="subject" size="45" maxlength="124" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" /></dd>

To reiterate this only hides the input and someone with HTML knowledge would be able to manipulate it.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
phpbuser19
Registered User
Posts: 28
Joined: Mon Aug 16, 2021 9:36 pm

Re: How to stop users from changing "Subject" of the post/topic

Post by phpbuser19 »

thecoalman wrote: Thu Sep 16, 2021 12:23 am Open /styles/prosilver/template/quickreply_editor.html and find:

Code: Select all

						<dd><input type="text" name="subject" id="subject" size="45" maxlength="124" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" /></dd>
Replace with:

Code: Select all

						<dd>{SUBJECT}<input type="hidden" name="subject" id="subject" size="45" maxlength="124" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" /></dd>

To reiterate this only hides the input and someone with HTML knowledge would be able to manipulate it.
Yes, I thought about that but can be easily circumvented with Right Click / Inspect :)
User avatar
Talk19Zehn
Registered User
Posts: 846
Joined: Tue Aug 09, 2011 1:10 pm
Contact:

Re: How to stop users from changing "Subject" of the post/topic

Post by Talk19Zehn »

Hello, maybe test this extension: If I understood you correctly ...

Name Extension: Subject readonly
Extension-Author: Kirk
Description of the extension:

Prevents the change of the subject when answering a contribution.
Depending on what is set in the ACP with "subsequent processing time", the subject can be changed in the starting post by the author, which is not the following contributions from the same author.
Admins or moderators can always change the subject.

Source / Download: https://reyno41.bplaced.net/phpbb/viewt ... f=41&t=494
Regards
Best regards
phpBB3 Designs - My own works: Stylearea Ongray-Designs, Adventinducement-Calendar for phpBB
User avatar
AmigoJack
Registered User
Posts: 6108
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: How to ❌ 👤 from ⌨ "Subject" of the ✉

Post by AmigoJack »

What you ignore is: topics can be merged, so posts of 2 topics will live on in 1 topic. Then you most likely have different subjects, too. Strictly seen even one single post of a topic can have different subject from the topic title (create new topic, add reply with different subject, delete first topic post).
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
User avatar
halil16
Registered User
Posts: 1266
Joined: Fri Jul 24, 2020 11:30 pm
Location: Turkiye
Name: Halil
Contact:

Re: How to stop users from changing "Subject" of the post/topic

Post by halil16 »

or this can also be done:

find

Code: Select all

<dl style="clear: left;">
replace with

Code: Select all

<dl style="clear: left; display: none;">
If the main issue is that the subject name does not view when typing a message in the quick reply box, it is enough to do this.
* Hire me at fiverr for your phpBB board.
"The day we will need ideas more than possessions, we will find the secret to true wealth." - Peyami Safa
I'm learning English...
Contributions: #Hashtag, Elegance, Latte
Post Reply

Return to “[3.3.x] Support Forum”