News:

Wondering if this will always be free?  See why free is better.

Main Menu

Split Forum Mod

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

Previous topic - Next topic

SaltedWeb

Hi Dougie, hope you didn't think I was pushing about, was just curious. I know that there is allot of work that is gone into making a mod.
And I know you all have day jobs too  ;D
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

dougiefresh

#541
Uploaded v2.0 Beta 1 - February 10th, 2018
o Thanks to KSRandom, control over user membergroups per subforum has been added!
o Complete rewrite of the mod, now includes original line numbers and function names in proper order!
o Modified registration agreement code to provide additional fallback situations.
o Support for SMF 2.1 Beta 3 has been suspended for now.

KNOWN ISSUES:  Any mod that accesses the membergroups table may not get the correct primary membergroup (field id_group) that the user belongs to, due to moving the membergroup per subforum information to a different table.  If you see this issue come up, let me know what mod you are having issues with so that I can fix the issue!  I am NOT going to search and download every mod to find them, as I have a life and a day job!  Thanks!




@KSRandom:  Thank you for your hard work!  It's only been a year in the making!  Hopefully, I haven't missed anything concerning the mod documentation!  If I have, let me know so it can be updated!

@Everybody:  Please note the following:
o Support for SMF 2.1 Beta 3 has been suspended as of this time.  It will be reintroduced at a later time.
o Yes, the file sizes are similar, but the size of changes to SMF 2.0.x's source files increased by 2.5x
o Yes, this is a HUGE update!
o Yes, version 1.40 is being kept on the mod page for now.  If will be removed later....

SaltedWeb

Hello,
On my test forum installing it comes up:

An Error Has Occurred!
Hacking attempt...

1.   FancyBox 4 SMF   0.5.1.1     
2.   Ultimate Menu   1.0     
3.   Watermark   1.6.4     
4.   SimplePortal   2.3.7     
5.   Tidy Child Boards   2.0

Then shows error  'u*******.smfpm_primary_membergroups' doesn't exist. on a white screen.

It actually disabled the forum can not access anything just comes up.
It was on  test forum luckily.
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

SaltedWeb

Add-on I installed this into a site with no mods and got the same read out on installation.  It was a fresh install .
I seem to always have a problem with this one mod it doesn't play nice with any of my domains. I would think it was a server setting
on my end but I have no problems adding editing removing anything just this one, unless some security setting I am unaware of.
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

dougiefresh

I've reproduced the bug reports from 2 posts back.  Working to resolve them now.....

dougiefresh

Uploaded v2.0 Beta 2 - February 11th, 2018
o Made several changes to the database installer to avoid "Hacking attempt" messages.
o Made changes to permissions, membergroups and news code to get them functioning right.
o Removed changes to database support functions, in favor to turning off query checks temporarily.




@Everybody:  I apologize for Beta 1.  The queries I used work fine with MySQL, but I had to modify them so that they work with SMF.....  And yeah, I get the reason for query checks....  But damn, they irritating  O:)

-Rock Lee-

I was just looking at the translations into Spanish and I finally added new lines so I translated it for this new version and also improve some lines :-[


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

dougiefresh

@Rock Lee:  Thank you for the translations!  They will be included in the next release.

dougiefresh

Well, I'm guessing nobody has found anything, so I guess I'm gonna start making a few more modifications.... soon....

SaltedWeb

Hi Dougie, apologies not getting back to you sooner,
1# Thank you for this update
2#  I have not found any errors or anything been trying different mods on the test site nothing that I can see seem to be working good.

I'll keep poking around have not put it in production yet I have a could sites id like it on but waiting to test a bit more.

Thanks again

SW
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

vanbreuk

#550
Hello,

before anything, thanks for all the hard work in a very useful mod.

I'm finding a bug (?)  in Admin > Forum > Boards > Modify Boards > any "Modify" page, apparently related to Sources/ManageBoards.php. First of all, the Modify Boards body section appears to have most of the form fields and text squeezed into the right limit of the frame and barely readable, but a colleague with some CSS knowledge was able to patch this (in core theme CSS, dl.settings was changed to clear: left; and the layout appeared then correctly). However, there's another non-CSS problem: the second drop down menu for the boards list, besides the "Order:" field, only shows eight blank entries under the (Unchanged) default value. Web page source shows <select name="new_cat1" id="new_cat1" onchange="hideBoards(this.options[this.selectedIndex].value);" style="display: none;">

This happens right after installing the Split Forum Mod 2.0 Beta 2 in either default/curve or core theme layouts. Tried in two different SMF 2.0.15 forums, with the following mods installed previously: Alias boards, Pretty URLs, Bookmarks and Enhancements to Recent Posts.

I had tested Split Forum Mod v1.39 a few months ago and there were no problems. Now I got the green light to move on with a complex forum migration and a tight deadline, went with the latest mod version and the migration process is unexpectedly stuck since I cannot reorganize the board structure with this problem...

Any suggestions would be most appreciated, even if you recommend going back to the latest 1.x mod.

Edit: Just to be clear, there is an existing board structure in the database, but the problem happens even before actually adding a secondary forum once the mod is installed successfully.

Crashingmail

Quote from: dougiefresh on February 17, 2018, 12:25:35 PM
Well, I'm guessing nobody has found anything, so I guess I'm gonna start making a few more modifications.... soon....

Honestly i think i've found something :-(

I installed a fresh 2.0.15 and only the Split Forum Mod 2.0 Beta 2.
Unfortunately the list of child boards may be empty if I want to add one to an existing board and I get the following error messages in the log.
Hope this helps to find the error.

On opening Admin -> Boards
Quote<deleted>?action=admin;area=manageboards;<deleted>
8: Undefined variable: last_forumid
File: <deleted>/forum/Themes/default/ManageBoards.template.php
Line: 67
and
Quote<deleted>?action=admin;area=manageboards;<deleted>
8: Undefined variable: last_forumid
File: <deleted>/forum/Themes/default/ManageBoards.template.php
Line: 69

And as soon i add a new board i receive several times following messages:
Quote<deleted>?action=admin;area=manageboards;sa=newboard;cat=1;sub=0
8: Undefined index: selected
File: <deleted>/forum/Themes/default/ManageBoards.template.php
Line: 457
Quote<deleted>?action=admin;area=manageboards;sa=newboard;cat=1;sub=0
8: Undefined index: id
File: <deleted>/forum/Themes/default/ManageBoards.template.php
Line: 457
Quote<deleted>?action=admin;area=manageboards;sa=newboard;cat=1;sub=0
8: Undefined index: name
File: <deleted>/forum/Themes/default/ManageBoards.template.php
Line: 457

Klajdi

#552
I'm not sure whether it is only me, but I am having "ERR_TOO_MANY_REDIRECTS" when redirecting instead of showing an error. I believe this is due to Flexible SSL with cloudflare
https://support.cloudflare.com/hc/en-us/articles/115000219871-Why-does-Flexible-SSL-cause-a-redirect-loop-
Now, im not sure whether this is a cloudflare issue or not, but it started occurring as soon as I activated cloudflare.
I am using the 1.38 version on SMF 2.0.13 and it appears to happen only when "Redirect board to correct SubForum instead of error message" is checked.
Edit: Yep,
Sources/Load.php:

$url = (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off' ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

to
$url = (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off' ? 'https://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

Basically ignoring the condition seems to make it work.

And actually, another thing is that when moving hosts, the settings_repair.php file doesnt fix the subforum settings, you have to edit them manually. Im sorry if these are fixed on the newer versions, but i cant seem to find these in changelog.

dougiefresh

Uploaded v2.0 Beta 3 - August 17th, 2018
o Updated Spanish Latin translation for v2.0 series, courtsey of Rock Lee!
o Added code to visually group boards in different sub-forums in ManageBoards.template.php.
o Fixed code that displays the board list in ManageBoards.template.php, based on Crashingmail[/ur] and [url=https://www.simplemachines.org/community/index.php?action=profile;u=437068]vanbreuk's bug report.
o Fixed URL building code in Sources/Load.php, based on Kladji's bug report.




@Rock Lee:  Apologizes for the length of time between you making your translation available for inclusion and the release of this update!  It's been included for this version!  Thank you!

@vanbreuk and Crashingmail:  I believe that both bug reports describe the same issue from different viewpoints.  I've made some changes to ManageBoards.template.php, which should take care of both issues.  Thank you for reporting them!




@Kladji:  I think I've taken care of the first bug you posted about.  However, I'm going to write up a different solution that should/will definitely take care of this issue, once it's in place.  Thank you for that bug report!

The second issue (regarding settings_repair.php) I can't duplicate because I don't have a copy of settings_repair.php available to me to look at....  It's not included in your standard install, so patching it will be problematic unless it is present during installation...

Kindred

I think that he means repair_settings.php -- the basic tool from our download section to repair the server and database settings in the forum's settings.php file

Of course that file does not take into account this mod, since that file is for the core product. :)
Сл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."

Klajdi

#555
Quote from: Kindred on August 17, 2018, 11:02:02 AM
I think that he means repair_settings.php -- the basic tool from our download section to repair the server and database settings in the forum's settings.php file

Of course that file does not take into account this mod, since that file is for the core product. :)
Well, yeah, and tbh using the default repair_settings directories (which are saved in database) isnt a good idea either. However maybe joining:
Path to SubForum folder with what is in dir/forum1/index.php
require_once('/XXXXXX/public_html/community/index.php');



EDIT: Just realised the 2nd one requires the default index.php file, so getting the directory from $boarddir wouldn't be that bad. and would be less of a hassle when moving hosts.

And also the fix didnt seem to work (maybe you did sth else, but i just copy pasted the condition to load.php). Also, cloudflare doesnt seem to use port 443. Probably you could make use of HTTP_X_FORWARDED_PROTO header. It returns either https or http (not sure if the ssl is not set to "Flexible")

Maybe im unnecessarily going into this, but here are all the headers
And the request was made over HTTPS


array(50) {
  ["REDIRECT_UNIQUE_ID"]=>
  string(24) "W3cfhkKv7w4AACiWC5gAAAAJ"
  ["REDIRECT_SCRIPT_URL"]=>
  string(27) "/community/Sources/test.php"
  ["REDIRECT_SCRIPT_URI"]=>
  string(58) "http://www.example.com/community/Sources/test.php"
  ["REDIRECT_DOCUMENT_ROOT"]=>
  string(50) "/kunden/XXX/XXX/XXXXXXXX/htdocs/public_html"
  ["REDIRECT_HANDLER"]=>
  string(13) "x-mapp-php5.5"
  ["REDIRECT_STATUS"]=>
  string(3) "200"
  ["UNIQUE_ID"]=>
  string(24) "W3cfhkKv7w4AACiWC5gAAAAJ"
  ["SCRIPT_URL"]=>
  string(27) "/community/Sources/test.php"
  ["SCRIPT_URI"]=>
  string(58) "http://www.example.com/community/Sources/test.php"
  ["HTTP_HOST"]=>
  string(24) "www.example.com"
  ["HTTP_ACCEPT_ENCODING"]=>
  string(4) "gzip"
  ["HTTP_CF_IPCOUNTRY"]=>
  string(2) "NL"
  ["HTTP_CF_RAY"]=>
  string(20) "44be7ca51c06bf70-AMS"
  ["HTTP_X_FORWARDED_PROTO"]=>
  string(5) "https"
  ["HTTP_CF_VISITOR"]=>
  string(18) "{"scheme":"https"}"
  ["HTTP_USER_AGENT"]=>
  string(114) "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
  ["HTTP_ACCEPT_LANGUAGE"]=>
  string(14) "en-US,en;q=0.9"
  ["HTTP_ACCEPT"]=>
  string(85) "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"
  ["HTTP_X_NEWRELIC_ID"]=>
  string(20) "UQcAV1NaGwAJUVVUAAYB"
  ["HTTP_X_NEWRELIC_TRANSACTION"]=>
  string(76) "PxRTAwRSAQEFBgJbU1NWUVdTFB8EBw8RVU4aBlpaBQsBUFsCCAVRA1MFVUNKQV0GUQZZAAYJFTs="
  ["HTTP_CF_CONNECTING_IP"]=>
  string(11) "85.17.24.66"
  ["PATH"]=>
  string(13) "/bin:/usr/bin"
  ["SERVER_SIGNATURE"]=>
  string(0) ""
  ["SERVER_SOFTWARE"]=>
  string(6) "Apache"
  ["SERVER_NAME"]=>
  string(20) "example.com"
  ["SERVER_ADDR"]=>
  string(13) "XXX.XXX.XXX.XXX"
  ["SERVER_PORT"]=>
  string(2) "80"
  ["REMOTE_ADDR"]=>
  string(11) "85.17.24.66"
  ["DOCUMENT_ROOT"]=>
  string(50) "/kunden/XXX/XXX/XXXXXXXX/htdocs/public_html"
  ["REQUEST_SCHEME"]=>
  string(4) "http"
  ["CONTEXT_PREFIX"]=>
  string(12) "/system-bin/"
  ["CONTEXT_DOCUMENT_ROOT"]=>
  string(24) "/kunden/usr/lib/cgi-bin/"
  ["SERVER_ADMIN"]=>
  string(30) "[email protected]"
  ["SCRIPT_FILENAME"]=>
  string(77) "/kunden/XXX/XXX/XXXXXXXX/htdocs/public_html/community/Sources/test.php"
  ["REMOTE_PORT"]=>
  string(5) "38012"
  ["REDIRECT_URL"]=>
  string(27) "/community/Sources/test.php"
  ["GATEWAY_INTERFACE"]=>
  string(7) "CGI/1.1"
  ["SERVER_PROTOCOL"]=>
  string(8) "HTTP/1.1"
  ["REQUEST_METHOD"]=>
  string(3) "GET"
  ["QUERY_STRING"]=>
  string(0) ""
  ["REQUEST_URI"]=>
  string(27) "/community/Sources/test.php"
  ["SCRIPT_NAME"]=>
  string(27) "/community/Sources/test.php"
  ["STATUS"]=>
  string(3) "200"
  ["ORIG_PATH_INFO"]=>
  string(27) "/community/Sources/test.php"
  ["ORIG_PATH_TRANSLATED"]=>
  string(77) "/kunden/XXX/XXX/XXXXXXXX/htdocs/public_html/community/Sources/test.php"
  ["PHP_SELF"]=>
  string(27) "/community/Sources/test.php"
  ["REQUEST_TIME_FLOAT"]=>
  float(1534533510.1651)
  ["REQUEST_TIME"]=>
  int(1534533510)
  ["argv"]=>
  array(0) {
  }
  ["argc"]=>
  int(0)
}


EDIT2: I kinda see what u did there, however on flexible ssl the origin server doesnt have ssl thus requests are made on port 80 so SERVER_PORT is 80

Klajdi

Quote from: Klajdi on August 17, 2018, 03:12:45 PM
EDIT: Just realised the 2nd one requires the default index.php file, so getting the directory from $boarddir wouldn't be that bad. and would be less of a hassle when moving hosts.
Im sorry for the double post, but I realised that the first edit of mine is wrong, but what you can do is to actually check the upper folder for the index.php file (since by default the subforum index.php is under the main directory)
Basically check if the ../index.php file exists, if it doesnt then throw an error, if it does then check for $boarddir to verify whether it is the main forums index file.

chaos40

Hello.

Awesome mod. I'm using it at my forum.

One hiccup though. When attempting to follow a link to a topic started in the subforum from the recent topics menu on the main forum I'm getting an about the topic being located in another forum.

Any way around this?

thanks

dougiefresh

Uploaded v2.0 Beta 3.1 - November 3rd, 2018
o No functionality change.
o Updated documentation to point to new website.

chaos40

Hello,

Just wonder if perhaps I'm asking the wrong question, or if it's been answered somewhere in the 28 pages of replies or if I'm asking something outside of what the mod was intended to do but every time I view a new topic in the most recent posts section of the board which was started on a sub-forum I get the following error

"the board you specified is located on a different forum"

thanks

Advertisement: