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

Yup.... Which is why I'm not liking the idea....  There has to be a better way to minimize the impact....

On the other hand, including a single category in multiple subforums shouldn't be that hard....  The only problem right now is the number of changes between the current version and the planned version....  On the other hand, maybe I can just say f#$# it and kill the upgrade files for v1.x and not include some to go from v1.x to v2.0....

margarett

As long as you keep the database schema (so that the changes are only code-wise), that's probably your best bet ;)
Users can uninstall it without removing associated data, so it's just an extra step that users need to perform. Even if you have database changes, you just need to perform the modifications in the installer.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

dougiefresh

UPDATE: Here's what's happened today:
o 46 operations were required to make the source files capable of a single category in multiple subforums.... 
o Upgrade file from v1.14 to v2.0 has been built for source files....
o Split Forum Mod v2.0 upgrades SimplePortal compatibility from v2.3.5 to v2.3.6...
o UI changes have not been started on yet... 
o Minor database changes required for "single category in multiple subforums" change

Hoodie

Quote from: dougiefresh on October 20, 2014, 05:05:02 PM
UPDATE: Here's what's happened today:
o 46 operations were required to make the source files capable of a single category in multiple subforums.... 

Great to hear.  Glad you figured it out and got it working.  I think sharing a category will work just fine vice a single board.

DenDen60

Hi dougiefresh, I will install the mod later on to see how it behaves. I imagine that the shared category is optional?

dougiefresh

Right now, shared categories are only available in v2.0 of this mod, which hasn't been released.  No, you don't HAVE to use a single category amongst multiple subforums....

The 46 operations were JUST database queries that needed to be changed....  I'm sure there's a few other things, including the UI, that needs changed.  After posting, I found another 2 operations in Sources/Load.php regarding subforum handling....  This morning, I found another two operations that needed to be changed, but they were a fix for the primary membergroup per subforum feature...  There are a few security issues that need to be fixed, as well....

DenDen60

Ok. I thought you had created version two.

I will wait until you released them.

dougiefresh

It's going to take a while to get v2.0 published.  There are more than a few issues involved with implementing code that allows a multiple subforums to share a single category, some of which will take some time and testing....

One such area is the board management code, where the admin is allowed to select where in the subforum the category is displayed....  With a single category only able to reside in a single subforum, the issues of how to sort the boards is non-existant, because all that was required to modify was how the query sorts the entries...  However, in a situation where a single category can reside in multiple subforums, the subforum column just doesn't sort correctly (aka: 1,0 comes after 0)....

I also have to figure out how to store the new board order, since a single column isn't enough (for pretty much the same reasons as the forumid column doesn't sort properly).  Since the board order probably going to be different with each subforum, a method to correctly sort the subforums within a single table is necessary....

Once I figure those two problems, there's the entire category & board management UI that needs altered to deal with the single category in multiple subforums issue....

I've got solutions to these problems, but I'm sure that there are plenty more issues I have to deal with....  Please be patient, as this won't be a "slap-a-quikie-patch" situation that takes a few minutes to fix....  Thanks.

BTW, if there is a necessary reason to issue a v1.15, then I will.....  But the focus right now will be on getting v2.0 totally up and running...




@Denis Pageau: Do either (1) I need to allow or (2) you want to allow calendar events to span multiple subforums?

DenDen60

Thanks for all your work dougiefresh.

Would it be a good idea to have two separate mods? One could be called the Split Forum Mod, which would be what we have now, and the second could be the Split Forum Enhancement Mod, or the Shared Category Mod for Split Forum Mod.


As for the Calendar, I do not really see how a shared calendar would be useful for my Citizens and Societies communities of practice for citizens.



dougiefresh

I'd rather not split them like that....  It's gonna be hard enough writing one mod.  I don't feel like maintaining two different projects that do almost the exact same thing...   Although, come to think of it, that's not a bad idea....

Regarding the calendar: Okay.

DenDen60

I think there are a few advantages of having two different mods. The first seems to be easier to do and will be more stable. The second is less stable and seems harder to do and maintain.

Everyone will want the first one, but not all will want the second one. So if there is more support to do to the second one, it will happen less often since less person will have installed the second one.

dougiefresh

Quote from: Denis Pageau on October 22, 2014, 10:09:10 PM
The first seems to be easier to do and will be more stable. The second is less stable and seems harder to do and maintain.
First, I want to say that it won't be issue of stability....  Once the code modifications are finished, then it will work as advertised.  PERIOD.

Second, I'm trying to say that I need TIME to make the necessary code changes so that the mod works as advertised....  and don't ask when it'll be done.  Version 2.0 is feature-incomplete right now, and I need to do changes to make it feature complete AGAIN... (sigh)

Quote from: Denis Pageau on October 22, 2014, 10:09:10 PM
So if there is more support to do to the second one, it will happen less often since less person will have installed the second one.
How do you figure it'll happen less often just because fewer people have installed it?  Frankly, if there is a bug in the software, I want to fix it ASAP so that the bug is squashed....  The faster I can find the bug(s), the sooner a new version gets released....

Arantor

And this is why writing software for people for free kind of sucks :(

You'll get there, I have faith.

dougiefresh


DenDen60

Quote from: Arantor on October 23, 2014, 03:54:40 PM
And this is why writing software for people for free kind of sucks :(

Is this suppose to mean something Arantor

DenDen60

Dougiefresh. My comment was not negative. I was just giving you my perception as an "outsider".

Now maybe I did not write this properly, but basically from what you wrote, the first part seem to be easier to developed with less complications, while the second was more complicated and harder to developed.

Hence the question I asked:
QuoteWould it be a good idea to have two separate mods?

To which you answered:
QuoteAlthough, come to think of it, that's not a bad idea....

My comment was just to let you know where I saw you would have a "return on investment."

This being said, you are better placed to evaluate if there is a "return on investment."  ;)

dougiefresh

I admit, it is an interesting idea to seperate the v2.0 changes into it's own mod, but I perceive no value or ROI in doing so.  To do so creates additional complexity that I would have to keep track of, and heaven forbid I forget something that affects the other.  And I'll freely admit that I don't like seeing bug reports, because it means the bug reporter found something wrong that I have to fix  :P  But it comes with the territory, I guess....

I was simply stating that it will take time, not a day or so.....  I admit that I underestimated the number of changes needed to be made when I started on the conversion to a "single category in multiple subforums"-style mod.  I've made some progress in the conversion, such as adding fields to the boards table and populating them, and modifying the board resort and board index functions....  Mind you, I haven't tested the board resort function yet, but it looks like it should work....  :(

Anyways, the post was trying to get the idea across that v2.0 won't be coming out anytime soon, as there are major changes in the way the forum deals with subforums.  It just won't be as easy as v1.x had it....

As for Arantor's comment, I think he meant that mod authors have to field all sorts of questions, stupid or not, about their mod and how it interacts with everything else.  Some mod authors don't care about other mods and won't change their stuff to play nice with another mod.  I'm not like that.  I've personally had to field some questions via PM (which resulted in the signature I have).  It happens, and it comes with the territory.  That's not saying anything about your questions or Arantor's statement, but it is what it is.....  Take it with a grain of salt.

I hope this helps....  I'm going to bed now.  Good night.

Arantor

For the record it was more of a reaction to the needing of time. People seem to forget how much time and energy goes into writing mods, let alone one as complex as this. And there is, very much in general, a lack of gratitude from those asking for mods, and a complete lack of understanding of what's involved and how this is done from peoples' own free time, when they could be spending that time with family or friends or having fun, and instead here they are making things for other people.

I'm also incredibly mindful that I wrote dozens and dozens of mods, and got so much flak for it from ungrateful people *expecting* me to build things for them for free on *my* time as though my time is theirs to spend. I do not want to see you go down this road.

DenDen60

I have not experience this, as I am not a programmer. :D I did take some programming courses but I am not good at it.  :(

However, I do appreciate the work that people invest in the development of software like SMF and the different MODs that complete them. This is why I support them financially, even if it is more a symbolic support. 

SilverKnight

There appears to still be a minor incompatibiltiy with pretty urls still in:

ManageBoards.template.php

Original code of smf with prettyurls installed:

<li', !empty($modSettings['recycle_board']) && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] == $board['id'] ? ' id="recycle_board"' : ' ', ' class="windowbg', $alternate ? '' : '2', '" style="padding-' . ($context['right_to_left'] ? 'right' : 'left') . ': ', 5 + 30 * $board['child_level'], 'px;', $board['move'] ? 'color: red;' : '', '"><span class="floatleft"><a href="', $scripturl, '?board=', $board['id'], '">', $board['name'], '</a>', !empty($modSettings['recycle_board']) && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] == $board['id'] ? '<a href="' . $scripturl . '?action=admin;area=manageboards;sa=settings"> <img src="' . $settings['images_url'] . '/post/recycled.gif" alt="' . $txt['recycle_board'] . '" /></a></span>' : '</span>', '
<span class="floatright">', $context['can_manage_permissions'] ? '<span class="modify_boards"><a href="' . $scripturl . '?action=admin;area=permissions;sa=index;pid=' . $board['permission_profile'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '">' . $txt['mboards_permissions'] . '</a></span>' : '', '
<span class="modify_boards"><a href="', $scripturl, '?action=admin;area=manageboards;move=', $board['id'], '">', $txt['mboards_move'], '</a></span>
<span class="modify_boards"><a href="', $scripturl, '?action=admin;area=manageboards;sa=board;boardid=', $board['id'], '">', $txt['mboards_modify'], '</a></span>
', allowedTo('admin_forum') ? '<span class="modify_boards"><a href="' . $scripturl . '?action=admin;area=manageboards;sa=pretty;boardid=' . $board['id'] . '">' . $txt['pretty_urls'] . '</a></span>' : '', '</span><br style="clear: right;" />
</li>';


Original code if parsed into prettyurls:

Quote<li', !empty($modSettings['recycle_board']) && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] == $board['id'] ? ' id="recycle_board"' : ' ', ' class="windowbg', $alternate ? '' : '2', '" style="padding-' . ($context['right_to_left'] ? 'right' : 'left') . ': ', 5 + 30 * $board['child_level'], 'px;', $board['move'] ? 'color: red;' : '', '"><span class="floatleft"><a href="', $subforum_tree[$category['forumid']]['boardurl'], '/index.php?board=', $board['id'], '">', $board['name'], '</a>', !empty($modSettings['recycle_board']) && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] == $board['id'] ? '<a href="' . $subforum_tree[$category['forumid']]['boardurl'] . '?action=admin;area=manageboards;sa=settings"> <img src="' . $settings['images_url'] . '/post/recycled.gif" alt="' . $txt['recycle_board'] . '" /></a></span>' : '</span>', '
                     <span class="floatright">', $context['can_manage_permissions'] ? '<span class="modify_boards"><a href="' . $scripturl . '?action=admin;area=permissions;sa=index;pid=' . $board['permission_profile'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '">' . $txt['mboards_permissions'] . '</a></span>' : '', '
                     <span class="modify_boards"><a href="', $scripturl, '?action=admin;area=manageboards;move=', $board['id'], ($forumid == 0 ? ';sub=' . $category['forumid'] : ''), '">', $txt['mboards_move'], '</a></span>
                     <span class="modify_boards"><a href="', $scripturl, '?action=admin;area=manageboards;sa=board;boardid=', $board['id'], ($forumid == 0 ? ';sub=' . $category['forumid'] : ''), '">', $txt['mboards_modify'], '</a></span></span><br style="clear: right;" />
                     ', allowedTo('admin_forum') ? '<span class="modify_boards"><a href="' . $scripturl . '?action=admin;area=manageboards;sa=pretty;boardid=' . $board['id'] . '">' . $txt['pretty_urls'] . '</a></span>' : '', '</span><br style="clear: right;" />
                  </li>';

Issue marked in red. I appreciate the effort your putting in, keep up the good work Doug.

Advertisement: