Two boards, one set of files

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
User avatar
eeji
Jr. Style Validator
Posts: 1362
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

Two boards, one set of files

Post by eeji »

Is it possible to run two seperate boards, each with their own database but using one set of files? Both boards on the same domain and would run inside an iframe.
My phpBB styles: phpbbstyles.oo.gd
My board: iansvivarium.com
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52300
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Two boards, one set of files

Post by Brf »

This topic has been discussed before.
If you are using the "same files", then both boards would be using the same config.php, which points to the database.
You would need some way to separate the two boards' database definitions.
User avatar
david63
Registered User
Posts: 19053
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: Two boards, one set of files

Post by david63 »

All things are possible but not always feasible or practical.

If you think about it then the first problem to overcome is that of config.php - how would you distinguish between two of them. Then you have the likes of the files, store, images folders. It could all probably be done but I suspect that it would require quite a lot of core code changes to achieve it.
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
warmweer
Jr. Extension Validator
Posts: 6537
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: Two boards, one set of files

Post by warmweer »

eeji wrote:
Mon Aug 19, 2019 6:41 pm
Is it possible to run two seperate boards, each with their own database but using one set of files? Both boards on the same domain and would run inside an iframe.
I doubt it.
You need 2 config.php files for sure, probably 2 /cache, and certainly 2 /store (when updating), what about where you upload images/files?
Not even worth trying it out , I think.

Just use a different base directories for the boards (e.g. /forum1 and /forum2)

added: Jeez I'm a slow typer compared to Brf and david63
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.
User avatar
eeji
Jr. Style Validator
Posts: 1362
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

Re: Two boards, one set of files

Post by eeji »

One board is set to read only so no worries about uploads (its a simple style demo, link in my sig below) and I don't need the store directory for updates (always use file replacement method). After a bit of thinking, I might have a way of it working, I shall report back after a bit of testing.
My phpBB styles: phpbbstyles.oo.gd
My board: iansvivarium.com
User avatar
Lumpy Burgertushie
Registered User
Posts: 68556
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Two boards, one set of files

Post by Lumpy Burgertushie »

why not just do it with two different installs . I have that setup. one board that is standard and the other board is installed just for the style demo.

you don't need members or a bunch of posts etc. for a style demo.

create a couple of categories, a couple of forums each and a couple of posts each and then install your style demo script on it and you are done.


like this:
https://phpbbusers.com
and https://phpbbusers.com/demo


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
Exabot
Translator
Posts: 211
Joined: Sun Jan 18, 2015 8:21 pm
Location: Estonia

Re: Two boards, one set of files

Post by Exabot »

warmweer wrote:
Mon Aug 19, 2019 6:55 pm
Just use a different base directories for the boards (e.g. /forum1 and /forum2)
Then the user database will be different..
User avatar
warmweer
Jr. Extension Validator
Posts: 6537
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: Two boards, one set of files

Post by warmweer »

Exabot wrote:
Tue Aug 20, 2019 5:32 am
warmweer wrote:
Mon Aug 19, 2019 6:55 pm
Just use a different base directories for the boards (e.g. /forum1 and /forum2)
Then the user database will be different..
And?
eeji wrote:
Mon Aug 19, 2019 6:41 pm
Is it possible to run two seperate boards, each with their own database but using one set of files?
Conceptually what the OP want is impossible without changes to the config.php and changes in the pphBBcode (regarding which information should be used from which part of the new config.php.

As Lumpy emphasised, the second board is a style demo so basically it's not even "related" to the main (user) board and once it's set up, all that is needed is to keep it updated (version and styles) with the other board.
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.
User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Two boards, one set of files

Post by canonknipser »

I guess it is possible with small changes in config.php.
Just what came in my mind:
Different boards have different url
Check url if url is the second one (in rhis case from read-only board) after setting up the regular parameter,

Code: Select all

if ($server[request_uri] == 'my.test.domain') {
 ... set database connect to second domain 
 }
 
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
User avatar
david63
Registered User
Posts: 19053
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Contact:

Re: Two boards, one set of files

Post by david63 »

canonknipser wrote:
Tue Aug 20, 2019 12:12 pm
I guess it is possible with small changes in config.php.
Just what came in my mind:
Different boards have different url
Check url if url is the second one (in rhis case from read-only board) after setting up the regular parameter,

Code: Select all

if ($server[request_uri] == 'my.test.domain') {
 ... set database connect to second domain 
 }
 
You would still need to handle the other "common" folders - cache, images etc.
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
Brf
Support Team Member
Support Team Member
Posts: 52300
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Two boards, one set of files

Post by Brf »

Exabot wrote:
Tue Aug 20, 2019 5:32 am
Then the user database will be different..
That is the whole point. The op is asking for one set of files and two databases.
Exabot
Translator
Posts: 211
Joined: Sun Jan 18, 2015 8:21 pm
Location: Estonia

Re: Two boards, one set of files

Post by Exabot »

Then I ask directly my idea on this topic.
I`ve got two phpbb3 forums (forum.site.com and forum2.site.com) installed and task is to synchronize users between them. So user can register at one forum and use his login data in the second forum. Is it possible?
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52300
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Two boards, one set of files

Post by Brf »

Start your own topic. This one is completely different from yours.
User avatar
eeji
Jr. Style Validator
Posts: 1362
Joined: Fri Dec 12, 2008 9:08 pm
Location: Manchester, UK
Contact:

Re: Two boards, one set of files

Post by eeji »

The only ways I've found so far involve using the users session or passing an additional parameter in the URL to direct to the relevant config.php file. This isn't really feasible for me without substantial changes for what is just a demo site with a support board that I'm not realistically expecting a lot of traffic on.

tldr: too much hassle for a small board, going to use 2 installs
My phpBB styles: phpbbstyles.oo.gd
My board: iansvivarium.com
User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Two boards, one set of files

Post by canonknipser »

david63 wrote:
Tue Aug 20, 2019 12:18 pm
You would still need to handle the other "common" folders - cache, images etc.
You can change the path for uploads (avatars, attachments) in the acp, so you can separate the files for the boards. The cache is in a subfolder of the cache folder, the name of the subfolder is given by config.php parameter PHPBB_ENVIRONMENT
The only really hardcoded path remaining is store, and as long you don't have any same extensions active on both boards, which make use of the store, there are "only" database backups written into the store. Those file contain at least a timestamp in the file name and should not be critical.
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
Post Reply

Return to “phpBB Custom Coding”