News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Split Forum Mod

Started by dougiefresh, May 27, 2014, 07:55:49 AM

Previous topic - Next topic

dougiefresh

Link to Mod



SPLIT FORUM MOD v2.0 BETA 3
By Dougiefresh -> Link to Mod



Introduction
This modification allows you to divide your categories into subforums, a pseudo-forum located on a different directory, subdomain, or domain than the "primary forum".  The primary forum is any forum that has this modification installed.

What It Does
Quote from: Terry at Moke on June 26, 2014, 09:43:55 PM
It is a mod for the User side of things, but obviously it needs to be managed in the Admin pages to create the subforums, and this mod allows you to create Categories and Boards that appear to the end user as a separate Forum, either via the URL or even the domain name, and these separate Forums can have their own Themes as well. However it all shares the same database as your original forum so usernames, passwords, profiles etc are all the same so there is less for you and the end users to manage.

Without this mod if you wanted to limit access to particular Boards based you could set up a membergroup and just give them access to the Board(s) required and then they would see the extra Board(s) as part of the main Forum page, however they would still see the rest of the Forum as it is with the same theme etc. Yes you can change the theme for a Board but that would be a bit abrupt in most cases.

With this mod you are essentially doing the same thing with the Membergroup and Board(s) regarding settng up the access but they get to see the Boards as a separate Forum, without all the other boards they might have access too and with a completely different theme if you wish. In the subForum they see the same stats, who is online, News, menu options etc. relative to the membergroup access they have, but with just the Boards you have chosen for them to see.

Admin Alterations
There is a new area at Admin -> Forum -> SubForums, which allows you to manage your subforums here.  Clicking on the board title on the left side will take you to the subforum itself.  Clicking on the Boards link on the right side will take you to the Admin -> Forum -> Boards area, restricted to that subforum.

On the primary subforum, creating a subforum is as easy as clicking on the Create New SubForum tab (and/or button) and filling out the information in order to create your new subforum.  This mod can create the folder and generate an "index.php" if required.  Subforum user registration agreements are mantained by the mod.

Clicking on Modify opens a page where you can change settings for that subforum, such as:
o Changing the title of the subforum
o Changing the server URL and/or path of the subforum
o Adding a favorites icon to the subforum
o Changing the default theme of the subforum
o Changing the default language of the subforum
o Changing the subforum ID on secondary subforums
o Changing the primary membergroup of new users registered to the subforum

Clicking on the Delete button will prompt what to do with categories within the board and will delete once the decision has been made by the user.

On the Admin -> Forum -> Boards page using the primary subforum, the categories and boards are seperated by which subforum they belong to.  On secondary subforums, only those categories and boards that belong to that subforum show up.

"Package Manager" and "Server Settings" settings are not available to Subforums, as these screens contain sensitive information that affects all subforums.

All recent posts, xml-based feeds, and other forum-related functionality works for each of the individual subforums.

New Hook Added
o integrate_subforum_subdomain - Hook for creating/deleting subdomains and/or domains

Special Credits
o Greygal made the mod compatible with Event Registration for SMF2 in 3 posts starting here!  Thanks, greygal!!
o KSRandom added control over user membergroups per subforum!

Compatibility Notes
This mod was tested on SMF 2.0.15, but should work on SMF 2.1 Beta 3, as well as SMF 2.0 and up.  SMF 2.1 Beta 1 and 2, as well as SMF 1.x, is not and will not be supported.

These optional mods should be installed (if desired) prior to this mod's installation:
o Alias Boards v1.2+
o Pretty URLs
o SimplePortal v2.3.6
o ezPortal
o Like Posts
o Event Registration for SMF2

Changelog
The changelog has been removed and can be seen at XPtsp.com.

License
QuoteCopyright (c) 2013 - 2018, Douglas Orend, Kirk Sykora
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

DenDen60

Thanks for sharing this.

I will try it out.

Denis

Streamlife

#2
Hello there  Dougiefresh
am trying to Install you Mod and i get this error

( more simple i Put the First post i made about this here )

http://www.simplemachines.org/community/index.php?topic=523521

You can read all there, One person there named "margarett" told me i must ask for help here
"thanks again margarett ;) 

And i hope can Give me a hand with this, i really need this mod!
Thanks advance
Best regards.

dougiefresh

Quote from: streamdark on June 06, 2014, 12:46:01 PM
Hello there  Dougiefresh
am trying to Install you Mod and i get this error

( more simple i Put the First post i made about this here )

http://www.simplemachines.org/community/index.php?topic=523521

You can read all there, One person there named "margarett" told me i must ask for help here
"thanks again margarett ;) 

And i hope can Give me a hand with this, i really need this mod!
Thanks advance
Best regards.
Sorry about the late response to your post....

I read the topic in question and located the error you sent....  I am showing the image provided by you in the other post below:


It might help if you could copy and paste the text that starts "Note: Parece" into a reply....
Quote from: streamdark on June 06, 2014, 11:42:07 AMOn English
Note: It appears that your database may require an upgrade. The version of your files are in the SMF forum version 2.0.7, while your database is at version SMF 2.0.4. This error will probably go away if you run the latest version of upgrade.php.

I'm gonna need to investigate why this might be occurring.... 

dougiefresh

#4
REMOVED: I've modified the edit_db.php file so that more fields have defaults and the insert performed by the mod has fields removed that have a default.  Please try the attached file....

Terry at Moke

Hi,

I installed Split Forum mod to have a play with it and see what it could do and everything was pretty straightforward however when I look at the Subforum I see all the rest of the page but the SubForum Board that I created in the Admin panels. I can see the Board I created  in the list of boards in the Primary Forum hompage but nothing in my Soubforum Homepage.

I started again using just the defaults provided and making as few modifications as possible to them and still the Board doesn't appear when I tried to view the subfroum, but everythng else on the page is there. I thought it might be a permision issue so I have single membergroup with just my userid in it looking at just that board and still no go. I did have issues earlier on because I move my forum from a localhost environment, where I initially install Split Forum, onto its normal domain account and had to change the path names, which is one reason why I uninstalled/re-installed Split Forum to make sure only the right paths were being used.

Any suggestions as to why my Sub Forum boards may not be displaying properly?

One other issue that might be relevant, or could be just the way things are coded and needs to be looked at, is when selecting the 'Board' link from the Manage SubForum page I get taken to the Boards page and I don't see any boards at all and get a message "No categories or Board configured'. I then have to select the either 'Modify Boards' icon or 'Boards' menu item to redisplay the page with all the Categories and Boards now showing.

To explain that more, when I go to this page, http://www.mydomain/Forum/index.php?action=admin;area=manageboards;sub=1, from the Board link for my SubForum on the Manage Subforum page I get no boards or Cats displayed and I have to reload the page from another option. The difference seems to be that the following is dropped from the URL when coming via the Manage SubForums Link, 'ca810dd9c9=e5bfd1933b60b7cdf6a138831402344b'.

Terry

dougiefresh

I wrote the subforum mod so that when you clicked the boards link on the Manage Subforum page, you got to look at JUST that subforum's boards and categories.  I kinda thought it would be self-explanatory; however, it appears not  :-[

So I'll rewrite the Modify Boards template so that the subforums show up as tabs on the screen, and each subforum's boards and categories show up in the tabs.....  Clicking the "Manage Boards" link would take you to the primary subforum's boards and each tab would take you to that subforum's boards....  Instead of the current confusing mess....

dougiefresh

#7
Uploaded v1.1 - June 23, 2014
o Added English UTF8 language strings
o Changed the method that subforum boards and categories are listed to a tabbed system
o edit_db.php modification to attempt to eliminate some weird error...

The attached image is what the "new" boards and categories screen looks like with, being a tabbed interface....  Since non-primary subforums can't manage boards and categories in other subforums, you won't see the tabbed interface in subforums....  Note the admin panel sidebar in the picture was changed using Real Tabs for Admin & Moderator Menus, hence their changed appearance...  This mod also shares the realtabs.css found in the other mod, too...

Terry at Moke

Quote from: dougiefresh on June 23, 2014, 10:52:40 AM
I wrote the subforum mod so that when you clicked the boards link on the Manage Subforum page, you got to look at JUST that subforum's boards and categories.  I kinda thought it would be self-explanatory; however, it appears not  :-[

Hi,

That is how I expected it would work, just the boards defined for the Subforum selected, so for some reason I am not getting to see the one board I have defined until I display all board. Because it is not displaying here I thought it might be in some way connected to the real issue for me and that is not being able to see the Board when viewing the Subforum.

I will download your updated version and see if I fare any better.

Thanks,
Terry

dougiefresh

Updated v1.2 - June 25, 2014
o Fixed REALLY bad problem in version 1.1 resulting in errors in admin screen!

OMG  :o  If you've experienced this issue, here's how to fix this issue for Version 1.1.  Open up Sources\Admin.php and REMOVE THIS CODE:


// BEGIN MOD Real Tabs for Admin/Moderator
require_once($sourcedir . '/Subs-RealTabs.php');
RT_Reorganize($admin_areas);

This code should NEVER have appeared in this mod, and I apologize for my oversight on this issue....

Terry at Moke

Hi,

Thanks for fixing that.

I did hit that problem and so I commented the lines out but had some other conflict in /sources/admin.php that I need to resolve before I can play with it again. 

Terry


dougiefresh

You're welcome!!  Do you have the Real Tabs for Admin and Moderator Areas mod installed?  If so, that mod also makes the change:
Code (Find) Select
loadTemplate('Admin', 'admin');
Code (Replace) Select
loadTemplate('Admin', array('admin', 'realtabs'));
You can just ignore this error during install.  Just be aware that uninstalling this mod will also undo that line for the Real Tabs mod, as well....

JOSHSKORN

I'm having trouble understanding what this mod does.  Is this really for an Admin, only?  Just wondering, since there are only screen shots of the Admin CP and not the Forum. Just wondering how this affects the users.

dougiefresh

Quote from: JOSHSKORN on June 26, 2014, 06:09:10 AM
I'm having trouble understanding what this mod does.  Is this really for an Admin, only?  Just wondering, since there are only screen shots of the Admin CP and not the Forum. Just wondering how this affects the users.
Most of the VISIBLE modifications are to the admin area.  Users won't really notice that the mod is installed unless you uninstall the mod, then all defined categories and boards will be visible on the primary forum.

Primarily, what this mod does is allows the administrator(s) to create multiple subforums using one forum software.  So, in order words, you can have the following paths:
httx://www.mywebsite.com/forum/index.php and
httx://www.mywebsite.com/admin/index.php
or even:
httx://www.myfirstwebsite.com/ and
httx://www.mysecondwebsite.com/
Each address appears to be a completely seperate forum from the other(s), but you're only running one copy of the forum software.  Note that you can create more than just 2 subforums, and you can host multiple domains using the same forum software or multiple forums on the same domain.

For the primary forum, admins can create and remove subforums, create categories and boards for each subforum, and manage other small details of each subforum.  Subforums are restricted to management of their own categories and boards.

Terry at Moke

Hi,

I had the Split Forum Mod working now, not sure why it wasn't working before but I just un-installed everything and started again with  clean SMF and no packages and then installed and created the Sub Forum and it is doing what it is supposed to be doing. Thank you.

Now I can play with it. :)

Quote from: JOSHSKORN on June 26, 2014, 06:09:10 AM
I'm having trouble understanding what this mod does.  Is this really for an Admin, only?  Just wondering, since there are only screen shots of the Admin CP and not the Forum. Just wondering how this affects the users.

It is a mod for the User side of things, but obviously it needs to be managed in the Admin pages to create the subforums, and this mod allows you to create Categories and Boards that appear to the end user as a separate Forum, either via the URL or even the domain name, and these separate Forums can have their own Themes as well. However it all shares the same database as your original forum so usernames, passwords, profiles etc are all the same so there is less for you and the end users to manage.

Without this mod if you wanted to limit access to particular Boards based you could set up a membergroup and just give them access to the Board(s) required and then they would see the extra Board(s) as part of the main Forum page, however they would still see the rest of the Forum as it is with the same theme etc. Yes you can change the theme for a Board but that would be a bit abrupt in most cases.

With this mod you are essentially doing the same thing with the Membergroup and Board(s) regarding settng up the access but they get to see the Boards as a separate Forum, without all the other boards they might have access too and with a completely different theme if you wish. In the subForum they see the same stats, who is online, News, menu options etc. relative to the membergroup access they have, but with just the Boards you have chosen for them to see.

What I am trying to acheive with this mod is to offer 'Personal' Forums, at a cost, to members of one of a larger Forums where they can choose who they wish to share with and what 'their' forum is going to look like etc,  and the advantage to me and them is there is not another complete forum, database and user environment to manage. It is then hoped that these people who were once active, but now just spectators, will be more active in their involvement and less intimidated by the larger audience and the more over bearing souls the general forum has attracted. If they are back an postsing in a more intimate environment they may feel encouraged to post more in the public forum or at least we haven't lost them to other forums or groups.

If you think of it in terms of Facebook(cough cough) they offer public and private groups and to compete with and attract people back from the FB and other private groups I think this mod offers a way to do that for our Forum.

Terry

dougiefresh

Quote from: Terry at Moke on June 26, 2014, 09:43:55 PM
It is a mod for the User side of things, but obviously it needs to be managed in the Admin pages to create the subforums, and this mod allows you to create Categories and Boards that appear to the end user as a separate Forum, either via the URL or even the domain name, and these separate Forums can have their own Themes as well. However it all shares the same database as your original forum so usernames, passwords, profiles etc are all the same so there is less for you and the end users to manage.

Without this mod if you wanted to limit access to particular Boards based you could set up a membergroup and just give them access to the Board(s) required and then they would see the extra Board(s) as part of the main Forum page, however they would still see the rest of the Forum as it is with the same theme etc. Yes you can change the theme for a Board but that would be a bit abrupt in most cases.

With this mod you are essentially doing the same thing with the Membergroup and Board(s) regarding settng up the access but they get to see the Boards as a separate Forum, without all the other boards they might have access too and with a completely different theme if you wish. In the subForum they see the same stats, who is online, News, menu options etc. relative to the membergroup access they have, but with just the Boards you have chosen for them to see.
Excellent description!  Can I use it for the mod's description?

Terry at Moke

Hi,

If you like it that much, sure you can use it. :)

Terry

dougiefresh

It's now included in the first post of this thread and will be included in future versions of the mod.  Thanks, Terry!




UPDATE: I received a PM asking why I named some of the database fields the way I did.  I want to answer this question publicly, even though I answered the question via PM as well, primarily because I wanna explain the logic behind this...

I named the database fields those names because they are names of the variables that replace the settings found in Settings.php.  Just trying to keep things straight in my poor brain, if ya know what I mean  ;D   :P  That being said, that table may be disappearing sometime soon, as those settings migrate into a php file that gets read at runtime, saving a call to the database and time....  Also the ManageSplitForums scripts will have to be rewritten to accommodate these changes....

dougiefresh

#18
Uploaded v1.3 - July 4th, 2014
o Changed name of new subforums to "SubForum # [n]" (where [n] is the new subforum ID)
o Total rewrite of edit_db.php, now renamed to db_install.php....
o Added support for listing undefined subforum IDs present in the system.
o Changed Database calls upon loading and subforum management to use arrays.
o Seperated English and English-UTF8 language strings into their own file.
o Added code to prevent global subforum administration from subforums.

All subforum settings that were moved from the database are in the Settings.php file in the forum root folder.

nuberry

Hi , please excuse my ignorance , but will this allow me to create sub forums like angling clubs with say their own moderators , admin and enable them to allow them to approve there own members . In other word they will be able to select if its an open forum or member or a combo of both . the essential thing for us is that they can select there own approvals . basically run there own mini forum

many thanks :)

Advertisement: