News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Split Forum Mod

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

Previous topic - Next topic

SilverKnight

I would like to also note that prettyurls still has the issue of not understanding the subforum layout.

For example:

It should be:

Quotewww.mysite.com/subforum/scripting/

However the forum links for it's boards are being shortened to:

Quotewww.mysite.com/scripting/

Kindred

Yet another reason to avoid silly things like prettyurls
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

dougiefresh

#262
@SilverKnight: That's because Pretty URLs isn't compatible with this mod at this time.  Thank you for the report and template modification info...

dougiefresh

Uploaded v1.15 - November 1st, 2014
o Moved code responsible for primary membership setting after loading forum settings...
o Removed seperate cookie per subforum in favor of a more unified login process....
o A user logging into one subforum will log that user into all subforums automatically.
o Slight changes involved with changing SimplePortal compatibility from v2.3.5 to 2.3.6.
o Alias Boards v1.2+ (found here) now works within subforums.

NOTE: Aliased boards cannot be created when the board is in subforum # 1 and where you want it is in subforum # 2.....  This is a restriction of the database queries, because without further modifications, it just creates errors if such is allowed....  This may be fixed in future versions.

DenDen60

Thanks Dougiefresh. Can we just install this mod or do we need to uninstall the previous one?


dougiefresh

You definitely will be able to upgrade from v1.14 to v1.15.  But upgradability is included from version 1.3 (or 1.4) upwards...  If you can't upgrade, then you will have to uninstall your current version, then install the new version.

DenDen60


dougiefresh

Just remembered that I will have to make sure that the aliases don't generate errors galore when a category and/or board is changed to a different subforum.....  Will try to take care of this in the next version.  Will also attempt to make Pretty URLs work with this mod.

dougiefresh

For this mod's version 2.0, I'm going to add some permissions to make managing subforums easier.  Anyone want to give ideas about what should be permission-ed and/or changed, at least regarding permissions?

Planned:
o Manage Subforums
o Create Subforum
o Package Manager
o Server Settings (?)

Was also thinking about creating one page where admin areas and sections can be listed with checkboxes to select what cannot be entered while in a subforum....  Thoughts?

DenDen60

I will play with it this week end and come back with some ideas.

Thanks

dougiefresh

#270
UPDATE ON v2.0:
o Added a hook to add the option to turn on and off the Subforum mod within Configuration => Core Features.
o Modified things further so that when Subforum mod is off, the forum ID is not searched for used.

WHAT'S NOT DONE:
o Template modifications for Manage Boards and Manage Categories UI
o New Permissions (see here)

Tair

Hi!I'm using middle size forum with 100k+ posts and PrettyURL.
It's very complicated to remove prettyurl because of Google and other search engines indexation.
Is is possible to see soon version with full support of PrettyURL? I'd like to use your mod.

dougiefresh

#272
Version 1.16 will fully support Pretty URLs, as well as make sure any aliased boards don't cause a bunch of errors.....

In case anybody is interested, fixes to support Pretty URL were made almost entirely within Sources/Load.php....

@SilverKnight: I solved the template issue by dividing up that operation into like 4 operations.  Works....

dougiefresh

 >:(  :o This isn't good.... Been doing some testing to make sure things work, and I found that Alias Boards doesn't work as expected.  There are bugs in the Manage Boards UI, such as editing child boards within the Manage Boards UI kicks them out of the parent board, too...

Making modifications to the v2.0 mod broke it somehow....  I don't understand this one, either, because I did the same mods to the v1.15 version to make version 1.16 and had the same mod-breaking issues.  Had to start over with building v1.16 in order to solve the issue....  Probably will with v2.0 as well  :o

Hoodie

Hey dougie

I haven't had a chance to play around with the mod still but I appreciate all the work that you are doing with updating this mod and the requests that have been made.  Hopefully soon I will be able to use this modification for my project.

n00bmonkey

Hi! Great mod. Very useful in segregating content.

Is there a way to get recent posts in the subforum to only include posts made in the subforum? The recent posts that populate in the Info Center area, that is. I can't seem to figure it out by myself.

Thanks again!

SauloA

I keep getting the following error message even though everything seems to be working perfectly fine:

QuoteNotice: Undefined index: path in [server-path]/simplemachinesforum/Sources/Load.php on line 157

Line 157 on my Load.php file is:

$check = (($test1 == $host || $test2 == $host) && $url['path'] == $uri);

Which is in the the following code block:

// Determine which subforum we are in and load settings for it:
$host = strtolower($_SERVER['SERVER_NAME']);
$uri = str_replace('/index.php', '', substr($_SERVER['REQUEST_URI'], 0, strrpos($_SERVER['REQUEST_URI'], '/')));
foreach ($subforum_tree as $id => $row)
{
$url = parse_url($row['boardurl']);
$test1 = strtolower($url['host']);
$test2 = strtolower(str_replace('www.', '', $test1));
$check = (($test1 == $host || $test2 == $host) && $url['path'] == $uri); // <------- Line 157
if (!empty($row['sp_standalone']))
{
$url = parse_url($row['sp_standalone']);
$test1 = strtolower($url['host']);
$test2 = strtolower(str_replace('www.', '', $test1));
$check = $check || (($test1 == $host || $test2 == $host) && $url['path'] == $uri);
}
if ($check)
{
// Assign global variables with row gleaned from database:
$forumid = $row['forumid'];
$boardurl = $row['boardurl'];
$forumdir = $row['forumdir'];
$subtheme = $row['subtheme'];
$mbname = $row['boardname'];
$language = $row['language'];
$favicon = $row['favicon'];
break;
}
}
$forumid = (int) $forumid;

dougiefresh

#277
@SauloA: Thank you for the bug report!  I've fixed this issue for v1.16 by actually checking to see if that array element was defined.  The online documentation led me to assume that when the function parsed the URL, it defined all parts of the array and it did so during my testing....  I guess it doesn't.  I assume your forum is at the root of the domain, right?

SauloA

v1.16 sounds great.  Can't wait for it's release.  And, Yes, my forum is at the root of the domain.

dougiefresh

@n00bmonkey: Thank you for pointing out an omission that was made.  I will make the necessary edits for v1.16.

Advertisement: