Skip to main content
Topic: Multi Tenancy - Multi Forums Via Various Domains In A Single Installation (Read 22690 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Multi Tenancy - Multi Forums Via Various Domains In A Single Installation

Reply #30

This addon doesn't work like split forum mod as it only supports domain and/or subdomain.

You can use it to create as many domains and/or subdomains as subforums, for instance as follows:
https://www.sch.my
http://elkarte.sch.my
http://x-mans.sch.my
http://sahabat.ahrasis.com
http://alfateh.pi3kum.com

You need to create several membergroups if you want to separate access from one (sub)forum to another.

It will definitely not work with subdirectory / folder as in split forum mod.



Last Edit: January 05, 2018, 09:18:49 pm by ahrasis

Re: Multi Tenancy - Multi Forums Via Various Domains In A Single Installation

Reply #31

Quote from: emanuele – If I got it right, the subforums are defined based on the categories?
A possible improvement (not sure if needed or not, just throwing around an idea that crossed my mind) would be to add a column to "boards" with the "sub-forum" id and filter the boards with that.
About this @emanuele, I think we covered this by membergroup not by subforum id. The idea is if all forums have all the same three categories, the boards inside any of them will still be subjected to membergroup and will only be shown to that membergroup only.

However, if we want to manage the board separately based on the subforum, that may be needed. This will be applied to multi subforum admin. Hurrmmm...

Currently, I am also thinking on how to limit a post by their subforum / membergroup / buddy. There was a mod in SMF that can do something like that.

Still not sure on how to rewrite the addon and all of the above yet.  ::)
Last Edit: February 12, 2017, 05:43:28 pm by ahrasis

Re: Multi Tenancy - Multi Forums Via Various Domains In A Single Installation

Reply #32

Though I have not updated this mod, (I forgot), there was version 1.0.0 Beta 3.0.3 for ElkArte 1.0.9. Now there is Beta 3.0.4. which should work on ElkArte 1.1 Beta 3. I attached both packages in here, so that those who wish to test them, may do so at their test site and at their own risks.

Re: Multi Tenancy - Multi Forums Via Various Domains In A Single Installation

Reply #33

This beta 304a is an update to beta 304 (304 actually failed to work properly in 1.1 Beta 3, but it is very much working for 1.0 branch). I have tested it on 1.0.9 with no major issues, so far.

Please do report of any error or misbehavior while using or testing this addon because I am considering an upgrade to RC1, if there is no major issues for 1.0 branch (though major issues for 1.1 branch are still a few).

The file is attached.

Re: Multi Tenancy - Multi Forums Via Various Domains In A Single Installation

Reply #34

There is an error in integrate buffer in php 7 which is fixed in beta 305 package attached below. Do report especially if you are facing uninstall error.

Re: Multi Tenancy - Multi Forums Via Various Domains In A Single Installation

Reply #35

Thank to @badmonkey and @emanuele in other posts, we found the issue in uninstalling the addon and managed to fix it. You may find package Beta 305a which is attached below.

I am not smart enough to convert this addon to a fully hook version thus if you can, do contribute.

Note: This mod is only for ElkArte 1.0 branch and is still not ready for 1.1 Beta 3.

Re: Multi Tenancy - Multi Forums Via Various Domains In A Single Installation

Reply #36

Glad to help, my friend. I only wish I could do more. 

Re: Multi Tenancy - Multi Forums Via Various Domains In A Single Installation

Reply #37

As stated in open post for support:
Quote from: ahrasis – I have been trying to upgrade the Multi Tenancy Addon (previously known as Multi ElkArte SubForums Addon) to make compatible with 1.1 RC 1 with no luck in converting the database part of the code. I commented out the code in Tenancy.mod11.xml for testing other code which so far are working. I need help in fixing that database part which has been discussed in other topic in here. If anybody can offer assistance, I'd be very grateful and will also consider a token for it. Do reply in this topic or pm me personally. Thanking you in advance.

Re: Multi Tenancy - Multi Forums Via Various Domains In A Single Installation

Reply #38

I am releasing MultiTenancy version B306 (I shouldn't be using RC1 since there are bugs, a lot of them in EA1.1) which should be compatible with ElkArte version 1.1. Do test and report any errors to help making this addon better. I will try rewrite the admin template for managing MultiTenancy in the future so it will be easier to maintain more sub forums. I will also try to separate master forum from sub forums so sub forum admins will only see its own boards and non others. Only in master forum will admins see boards across all sub forums.
Last Edit: December 28, 2017, 04:19:23 am by ahrasis

Re: Multi Tenancy - Multi Forums Via Various Domains In A Single Installation

Reply #39

Version B306a is now released with more bug fixes for EA version 1.1 above. Report for bugs are welcome.

Should all are functioning well, I will attempt to slowly rewrite this addon. Any help / assistance / thoughts are highly appreciated.

Re: Multi Tenancy - Multi Forums Via Various Domains In A Single Installation

Reply #40

B306b is now released with minor bug fixes for the RSS. I am thinking of totally disabling RSS in the future if this addon is used.

Re: Multi Tenancy - Multi Forums Via Various Domains In A Single Installation

Reply #41

This addon is upgraded to Release Candidate 1 especially for ElkArte version 1.1.3 and above. Features / changes in this release include:
- Database table for this addon is renamed to tenancy, thus, old database table with the name subforums won't work anymore. Manual transfer have to be done if you need the old database table.
- Tenancy Manager (settings page) have been rewritten together with its styling so it will be more responsive if the admin need to work from his tablet or smartphone.
- $boardurl is no longer rewritten compared to all previous version, instead, $scripturl is now defined to $tenancyurl/index.php, so each domain will be safely running their own forum while the $boardurl remain the same.
- With this, we separate the ability to add, edit or delete tenant(s) a.k.a subforum(s) from all other domains, so only the primary domain shall have control over it and no access can be made from other domains.
- Only category(ies) and board(s) that are assigned to a particular domain can be listed and modified from that domain, instead of all like in the old days, in preparation for separate admin ability for each secondary domain(s).
- Plan to separate between accessible categories (via forum front) and editable categories and boards (via admin end) as stated above is already being made though is not perfected due to lack of time and knowledge to do it.

This new version is currently in use at domains mentioned in the first / opening post.

That's all I guess. Do report if there are any bugs found. Thank you.

Re: Multi Tenancy - Multi Forums Via Various Domains In A Single Installation

Reply #42

Huh...!? It has been more than 10 months ago since I did any changes to this addon. Hoperfully, those who are using it really does not face any bugs though I found one i.e. when the multi tenancy addon is just installed but no tenancy has been created.

The said bugs are relating to user posts, messages or stats but once the tenancy has been created, the error will be gone. Meaning, it should check if the tenancy is not empty before finding posts, messages or stats based on this addon, otherwise, it should use default elkarte feature.

This relates to modifications in two files, which I should fix in RC2 or its rewritten version.

 

Re: Multi Tenancy - Multi Forums Via Various Domains In A Single Installation

Reply #43

I have been busy with other things and I haven't fix the above mentioned bug yet because I think those who do not wish to create any tenancy, should not install the addon as the first place or uninstall it thereafter. A customized error message is also good but I am not into it too.

What I intend to do for now, if I am still free to do it, are:
  • To test $_SERVER['HTTP_HOST'] as opposed to currently used $_SERVER['SERVER_NAME'] as the later will require me to create one vhost per each url added which is quite tedious after some times.
  • To add and test the use of sub folder or directory, similar name or different with the added url. I was thinking of having the main forum at something like https://test.sch.my/forum/main, and its tenancy at four other directories /teacher, /parent, /student and /alumni. These directories should only be symlinked folders to main and should be accessible via the same main url or other url, but with the same end directories structure.
  • To add a way to easily create multiple / bulk categories, boards, membergroups and tenancies.

The first task seems easy as I think I need only to change from the forme to the later but I am not sure whether it will work. Or may be leave this as an option to the admin whether he wants to use the former or the later.

The second task seems to require some check for the last directory, where if no symlinked folder exist, it should be created. This may not be so easy too.

The last task seems to require a real upgrade to this addon though I could currently achieve it with the manipulation of mysql database file. I hope I will find a way to do this more easily /  in a better way.

I am crossing my fingers now and will attempt to finish this in a week or two....

Re: Multi Tenancy - Multi Forums Via Various Domains In A Single Installation

Reply #44

I think I will be doing modification to Bootstrap.php for this addon, create a .tenancy folder[1]to set a settings file for each tenancy url[2]in order to allow each tenant to have their own sub forums either based on url or path/directory/folder or both.[3]

I already tested some of the code to ensure that page creation speed remain the same with the current version, if not better.

I do found some diffculty in liasing with nginx as the addon will need to add other url in the nginx vhost in order to allow access to the added tenancy url. This could be difficult if one do not have access to server terminal or advanced control panel, so for this part I am not sure on how to handle it yet, except by manually adding the permitted url in the nginx vhost file.
I think it should be ok to use a 644 permission for this.
If just url e.g. test.sch.my.php or if using folder e.g. test.sch.my.forum.main.php
The current one is based on url alone and cannot use folder.