Location in files where I can change messages

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
4mpb5
Registered User
Posts: 150
Joined: Wed Sep 08, 2021 9:34 pm

Location in files where I can change messages

Post by 4mpb5 »

I want to change the various messages shown on various pages in the forum

For example I want to change the following messages to something of my own

==================== ===========================
New Topic Button
"Search this forum" message inside the search box

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

=========== ============= ================= =====

Are these stored in the database or are they stored in some PHP files ?
I am by no means an expert in php but I should be able to change these things easily, as they are just strings

Any help would be appreciated
User avatar
janus_zonstraal
Registered User
Posts: 6427
Joined: Sat Aug 30, 2014 1:30 pm

Re: Location in files where I can change messages

Post by janus_zonstraal »

try /language/your language/posting.php
Sorry! My English is bat ;) !!!
4mpb5
Registered User
Posts: 150
Joined: Wed Sep 08, 2021 9:34 pm

Re: Location in files where I can change messages

Post by 4mpb5 »

janus_zonstraal wrote: Fri Oct 15, 2021 4:35 am try /language/your language/posting.php
Thanks but it did not seem to be the right file. Talks about some other happenings (conditions) and related resulting messages though there are similar messages but almost all of them talk about what user "cannot" do
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Location in files where I can change messages

Post by david63 »

The file that you want is /language/your language/common.php

Code: Select all

        'RULES_ATTACH_CAN'			=> 'You <strong>can</strong> post attachments in this forum',
	'RULES_ATTACH_CANNOT'		=> 'You <strong>cannot</strong> post attachments in this forum',
	'RULES_DELETE_CAN'			=> 'You <strong>can</strong> delete your posts in this forum',
	'RULES_DELETE_CANNOT'		=> 'You <strong>cannot</strong> delete your posts in this forum',
	'RULES_DOWNLOAD_CAN'		=> 'You <strong>can</strong> download attachments in this forum',
	'RULES_DOWNLOAD_CANNOT'		=> 'You <strong>cannot</strong> download attachments in this forum',
	'RULES_EDIT_CAN'			=> 'You <strong>can</strong> edit your posts in this forum',
	'RULES_EDIT_CANNOT'			=> 'You <strong>cannot</strong> edit your posts in this forum',
	'RULES_LOCK_CAN'			=> 'You <strong>can</strong> lock your topics in this forum',
	'RULES_LOCK_CANNOT'			=> 'You <strong>cannot</strong> lock your topics in this forum',
	'RULES_POST_CAN'			=> 'You <strong>can</strong> post new topics in this forum',
	'RULES_POST_CANNOT'			=> 'You <strong>cannot</strong> post new topics in this forum',
	'RULES_REPLY_CAN'			=> 'You <strong>can</strong> reply to topics in this forum',
	'RULES_REPLY_CANNOT'		=> 'You <strong>cannot</strong> reply to topics in this forum',
	'RULES_VOTE_CAN'			=> 'You <strong>can</strong> vote in polls in this forum',
	'RULES_VOTE_CANNOT'			=> 'You <strong>cannot</strong> vote in polls in this forum',
Bear in mind that you will need to change that file after every update/upgrade
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 5885
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Location in files where I can change messages

Post by thecoalman »

If you use an editor like Notepad++ you can search all files in a directory/subs by exact phrase...
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Location in files where I can change messages

Post by david63 »

thecoalman wrote: Fri Oct 15, 2021 11:26 am If you use an editor like Notepad++ you can search all files in a directory/subs by exact phrase...
The problem with those phrases is that they contain html tags so doing a search of the actual phrase does not work in this instance - as I found out!
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
4mpb5
Registered User
Posts: 150
Joined: Wed Sep 08, 2021 9:34 pm

Re: Location in files where I can change messages

Post by 4mpb5 »

david63 wrote: Fri Oct 15, 2021 7:21 am The file that you want is /language/your language/common.php

Code: Select all

        'RULES_ATTACH_CAN'			=> 'You <strong>can</strong> post attachments in this forum',
	'RULES_ATTACH_CANNOT'		=> 'You <strong>cannot</strong> post attachments in this forum',
	'RULES_DELETE_CAN'			=> 'You <strong>can</strong> delete your posts in this forum',
	'RULES_DELETE_CANNOT'		=> 'You <strong>cannot</strong> delete your posts in this forum',
	'RULES_DOWNLOAD_CAN'		=> 'You <strong>can</strong> download attachments in this forum',
	'RULES_DOWNLOAD_CANNOT'		=> 'You <strong>cannot</strong> download attachments in this forum',
	'RULES_EDIT_CAN'			=> 'You <strong>can</strong> edit your posts in this forum',
	'RULES_EDIT_CANNOT'			=> 'You <strong>cannot</strong> edit your posts in this forum',
	'RULES_LOCK_CAN'			=> 'You <strong>can</strong> lock your topics in this forum',
	'RULES_LOCK_CANNOT'			=> 'You <strong>cannot</strong> lock your topics in this forum',
	'RULES_POST_CAN'			=> 'You <strong>can</strong> post new topics in this forum',
	'RULES_POST_CANNOT'			=> 'You <strong>cannot</strong> post new topics in this forum',
	'RULES_REPLY_CAN'			=> 'You <strong>can</strong> reply to topics in this forum',
	'RULES_REPLY_CANNOT'		=> 'You <strong>cannot</strong> reply to topics in this forum',
	'RULES_VOTE_CAN'			=> 'You <strong>can</strong> vote in polls in this forum',
	'RULES_VOTE_CANNOT'			=> 'You <strong>cannot</strong> vote in polls in this forum',
Bear in mind that you will need to change that file after every update/upgrade
Thank you . That worked great
4mpb5
Registered User
Posts: 150
Joined: Wed Sep 08, 2021 9:34 pm

Re: Location in files where I can change messages

Post by 4mpb5 »

thecoalman wrote: Fri Oct 15, 2021 11:26 am If you use an editor like Notepad++ you can search all files in a directory/subs by exact phrase...
That is what I considered first. Yes if you are on your own local PC or server & have an IDE (or stuff like Notepad++), you can do that.
But my PHPBB is run from a webhost (not my local server) so I have not yet found a way to search for strings inside the files of a whole directory, though I am able to search for filenames (which does not help much)
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53412
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Location in files where I can change messages

Post by Brf »

Download the phpBB full install and unzip it on your computer. You can search that copy.
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 5885
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Location in files where I can change messages

Post by thecoalman »

david63 wrote: Fri Oct 15, 2021 11:43 am The problem with those phrases is that they contain html tags so doing a search of the actual phrase does not work in this instance - as I found out!
You don't have to search the whole phrase, the results for the line show in a bottom pane and you can click the line to open the document on that line. If you are getting too many results just look at HTML source and find phrase that doesn't have HTML.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Location in files where I can change messages

Post by david63 »

thecoalman wrote: Sat Oct 16, 2021 3:21 am You don't have to search the whole phrase, the results for the line show in a bottom pane and you can click the line to open the document on that line. If you are getting too many results just look at HTML source and find phrase that doesn't have HTML.
Thank you - but I am more than familiar about how to search core files - I have been doing it on an almost daily basis for the last 10 years.

I was just pointing out that it is not always as simple as searching for the text that is displayed.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
Post Reply

Return to “phpBB Custom Coding”