This board has no forums

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
John Robi
Registered User
Posts: 75
Joined: Fri Feb 22, 2019 2:15 am

This board has no forums

Post by John Robi » Thu Mar 14, 2019 5:10 pm

Hello,

My goal is to eliminate the notice, This board has no forums. Though, I fear it may not be easy.

I have read through many of the documents related to this issue.

On the board I'm working with only members, once logged in, may view the categories and forums. A Guest may not. Therefore, the group Guest and the user Anonymous have no permissions set. And, this is what is causing the notice. Also, I read that the Guest group cannot be deleted, it may only be renamed.

And there lies the challenge. Any thoughts of how to reach my goal?

I was thinking, the notice is probably generated due a test returning a False response. The test is probably looking at both the group Guest and the user Anonymous to identify if the default permission, No Access or No Role, has been changed. If not, then a false response is generated and the notice is echoed or written to the screen. Perhaps the string to be written could be changed to an empty string. This way a user will not see the notice. Is this plausible ?

User avatar
</Solidjeuh>
Registered User
Posts: 1325
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: This board has no forums

Post by </Solidjeuh> » Thu Mar 14, 2019 5:16 pm

Try this:

Open: /language/en/common.php

Find:

Code: Select all

	'NO_FORUMS'					=> 'This board has no forums.',
Replace with:

Code: Select all

	//'NO_FORUMS'					=> 'This board has no forums.',
We offer fun HTML5 games for young and old.
Register a free account & enjoy all functions!
Save your score, challenge other members or play along with our tournaments.


~~~ https://www.solidjeuh.be ~~~

Image

User avatar
david63
Jr. Extension Validator
Posts: 15588
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: This board has no forums

Post by david63 » Thu Mar 14, 2019 5:19 pm

If you have your permissions set correctly you would normally expect to see a message saying that you need to be logged in to see these forums.

You could consider creating one forum that says this is a private forum that the Guest group can read
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

John Robi
Registered User
Posts: 75
Joined: Fri Feb 22, 2019 2:15 am

Re: This board has no forums

Post by John Robi » Thu Mar 14, 2019 6:26 pm

Hello,

I must say both responses I received above are great!

I went with Solidjeuh's idea. Though, I modified it.

Solidjeuh, I deprecated line 506 as you indicated. To me this did not quite seem correct because of the php code calling it. //'NO_FORUMS' => 'This board has no forums.', .........See below image for the result.

I elected to use an empty string: 506 'NO_FORUMS' => '', // 'This board has no forums'. was removed so it will not display. ..........See far below image for the result.

Image

Image


So, I'm good to go. Thank you both for your help!

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3627
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: This board has no forums

Post by HiFiKabin » Thu Mar 14, 2019 6:31 pm

Or

Open: /language/en/common.php

Find:

Code: Select all

	'NO_FORUMS'					=> 'This board has no forums.',
Replace with:

Code: Select all

	'NO_FORUMS'					=> 'Please log on to view the forums.',
(this is my usual course for a private board)

User avatar
</Solidjeuh>
Registered User
Posts: 1325
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: This board has no forums

Post by </Solidjeuh> » Thu Mar 14, 2019 6:31 pm

You can also delete this from: /styles/prosilver/template/forumlist_body.html

Code: Select all

<!-- BEGINELSE -->
	<div class="panel">
		<div class="inner">
		<strong>{L_NO_FORUMS}</strong>
		</div>
	</div>
That will complety remove that function and the grey "panel" class

Image

Dot NOT remove <!-- END forumrow --> at the bottom!
We offer fun HTML5 games for young and old.
Register a free account & enjoy all functions!
Save your score, challenge other members or play along with our tournaments.


~~~ https://www.solidjeuh.be ~~~

Image

John Robi
Registered User
Posts: 75
Joined: Fri Feb 22, 2019 2:15 am

Re: This board has no forums

Post by John Robi » Thu Mar 14, 2019 7:15 pm

Hello,

It sure is nice to communicate with someone familiar with php, HTML code AND knows where to find the important bits.

I depreciated the lines of code and wallah no gray panel. Looks even better now.

Continued thanks and I bow to your greatness. Okay, a little over the top there though give credit to where credit is due I say!

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51585
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: This board has no forums

Post by Brf » Thu Mar 14, 2019 7:49 pm

This is the correct way to do it. You could also just use an empty replacement string, but you should leave the 'NO_FORUMS' part in there.
HiFiKabin wrote:
Thu Mar 14, 2019 6:31 pm
Open: /language/en/common.php

Find:

Code: Select all

	'NO_FORUMS'					=> 'This board has no forums.',
Replace with:

Code: Select all

	'NO_FORUMS'					=> 'Please log on to view the forums.',
We do not recommend editing the forumlist_body.html like that.

User avatar
</Solidjeuh>
Registered User
Posts: 1325
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: This board has no forums

Post by </Solidjeuh> » Thu Mar 14, 2019 7:56 pm

Brf wrote:
Thu Mar 14, 2019 7:49 pm
This is the correct way to do it. You could also just use an empty replacement string, but you should leave the 'NO_FORUMS' part in there.
HiFiKabin wrote:
Thu Mar 14, 2019 6:31 pm
Open: /language/en/common.php

Find:

Code: Select all

	'NO_FORUMS'					=> 'This board has no forums.',
Replace with:

Code: Select all

	'NO_FORUMS'					=> 'Please log on to view the forums.',
We do not recommend editing the forumlist_body.html like that.
But that will leave the grey "panel class"
Image

I know editing the core files is not good. The best way is to copy the prosilver style, rename it and edit files in that "new style".
We offer fun HTML5 games for young and old.
Register a free account & enjoy all functions!
Save your score, challenge other members or play along with our tournaments.


~~~ https://www.solidjeuh.be ~~~

Image

User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 3627
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: This board has no forums

Post by HiFiKabin » Thu Mar 14, 2019 8:00 pm

This is an example of what you get
screenshot_68.png

John Robi
Registered User
Posts: 75
Joined: Fri Feb 22, 2019 2:15 am

Re: This board has no forums

Post by John Robi » Thu Mar 14, 2019 8:52 pm

Hello All,

I so love this! Wonderful input all the way around.

Yes, I do understand staying away from editing the core is best. For future needs, support help such as found here will not know the core has been changed. Could skew trouble shooting and/or future administrators of the board.

That said, I prefer no text and no gray panel. So, that is why I made a duplicate of Prosilver, renamed it, modified it, annotated it and ReadMe.txt it. The original is still there unchanged.

Such talent out there and a wonderful willingness to help. Thanks to all!

**************** UPDATE *************************** UPDATE **************

Just a note, I named the modified Prosliver as custom-prosliver and I modified the style.cfg accordingly.

User avatar
david63
Jr. Extension Validator
Posts: 15588
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: This board has no forums

Post by david63 » Thu Mar 14, 2019 10:44 pm

And remember that whenever there is an update/upgrade you may need to reapply those changes
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
</Solidjeuh>
Registered User
Posts: 1325
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: This board has no forums

Post by </Solidjeuh> » Thu Mar 14, 2019 10:47 pm

You can update your styles manually here: https://area51.phpbb.com/code-changes/3.2.4/
We offer fun HTML5 games for young and old.
Register a free account & enjoy all functions!
Save your score, challenge other members or play along with our tournaments.


~~~ https://www.solidjeuh.be ~~~

Image

John Robi
Registered User
Posts: 75
Joined: Fri Feb 22, 2019 2:15 am

Re: This board has no forums

Post by John Robi » Thu Mar 14, 2019 10:58 pm

Hello,

Thank you, yes I had already annotated that in the ReadMe.txt file.


******************* UPDATE ******************

Thank you for the URL for manual update to style.

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 2985
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: This board has no forums

Post by thecoalman » Fri Mar 15, 2019 6:06 pm

</Solidjeuh> wrote:
Thu Mar 14, 2019 6:31 pm
You can also delete this from: /styles/prosilver/template/forumlist_body.html

Code: Select all

<!-- BEGINELSE -->
	<div class="panel">
		<div class="inner">
		<strong>{L_NO_FORUMS}</strong>
		</div>
	</div>
That will complety remove that function and the grey "panel" class
Instead or removing it comment it out:

Code: Select all

<!-- IF 0 -->Removed this for whatever reason
<!-- BEGINELSE -->
	<div class="panel">
		<div class="inner">
		<strong>{L_NO_FORUMS}</strong>
		</div>
	</div>
<!-- ENDIF -->
	
Typically when you are customizing templates or php files you'll want to merge those changes into updated files. Keep a list of edited files. When an update comes out download the changed files update you only need to compare your list to the new files to find out which ones need merging. Use file comparison tool like winmerge, this is wher the comment comes in.... Where you are doing the comparison you know what you edited and why.

Post Reply

Return to “phpBB Custom Coding”

Who is online

Users browsing this forum: No registered users and 3 guests