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

dougiefresh

@GrayGal: Since you failed to answer what mods you are running, I'm forced to make a guess as to what you're problem is....  I'm guessing you're running Pretty URLs, right?  Furthermore, I'm guessing is that .htaccess file doesn't have what Pretty URLs needs in order to function properly....  Cause I visited the secondary forum and that looks right....

Greygal

#301
woops sorry, forgot to post the mods!  Sorry!

Yes, running Pretty URLs.  Will check the .htaccess file right now.

1.   SBTM: Search Bar To Menu   1.0.1
2.   BK Modding TopMenu   1.0
3.   Split Forum Mod   1.18
4.   Alias Boards   1.2   
5.   SimplePortal   2.3.6   
6.   MultiForum Mod   1.1   
7.   Anti-Spam Links   1.0.1   
8.   Admin Toolbox   1.0   
9.   Quick Spoiler   0.9.5   
10.   Like Posts   2.0.2   
11.   Simple Audio Video Embedder   3.0.3   
12.   Member Awards   3.0
13.   DB Common Collation & Engine   1.1   
14.   SMF Quiz   1.1.1 beta1   
15.   Member NotePad   2.0.3   
16.   To-Do List   2.0   
17.   WysiBB for SMF   0.6.0.1   
18.   Event Reminder Mod for SMF2   2.31
19.   SMF 1.1.20 / 2.0.9 Update   1.0   
20.   SMF 2.0.8 Update   1.0   
21.   Christmas Smileys   1.2   
22.   Pretty URLs   1.1.2   
23.   IMDb BBC   1.0   
24.   PM Settings   1.0.1   
25.   Fanfics System   1.3   
26.   Tapatalk SMF 2.0 Plugin   4.0.1   
27.   Profile Statuses   3.1   
28.   Custom Form Mod   1.7   
29.   Voter Visibility   2.0   
30.   EFTMod   0.2.0   
31.   RSS Feed Poster   4.1
32.   New Layout for Last Post Info   1.5.1   
33.   Separate the sticky topics   1.0.0   
34.   Event Registration Mod for SMF2   2.26
35.   AdditionalMembergroups   1.01   
36.   Gamer IDs   1.4   
37.   Additional Instant Messengers   1.0.1   
38.   open mod reports   1.0   
39.   Country Flags   2.1   
40.   FantasticSmileys   1.0   
41.   Characters remaining of post   1.0.4   
42.   Drafts   2.0.5   
43.   Footer Menu   1.1.2   
44.   Post Notifier   1.0   
45.   Best Answer Intergration   1.4   
46.   Eve Events Importer   0.4   
47.   Temars EVE API   1.3.1 r5   

Greygal

This is the .htaccess in the primary forum (the affirmative forum), which best I can tell appears to be good:

# PRETTYURLS MOD BEGINS
# Pretty URLs mod
# http://code.google.com/p/prettyurls/
# .htaccess file generated automatically on: November 28, 2014, 20:54

RewriteEngine on
RewriteBase /forum

# Rules for: actions
RewriteRule ^(activate|admin|announce|attachapprove|buddy|calendar|clock|collapse)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(coppa|credits|deletemsg|display|dlattach|editpoll|editpoll2|mediapro)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(emailuser|findmember|forum|portal|gamercard|groups|help|helpadmin)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(im|jseditor|jsmodify|jsoption|lock|lockvoting|login|login2)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(logout|markasread|mergetopics|mlist|moderate|modifycat|modifykarma|movetopic)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(movetopic2|notify|notifyboard|openidreturn|pm|post|post2|printpage)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(profile|quotefast|quickmod|quickmod2|recent|register|register2|reminder)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(removepoll|removetopic2|reporttm|requestmembers|restoretopic|search|search2|sendtopic)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(smstats|suggest|spellcheck|splittopics|SMFQuiz|SMFQuizAnswers|SMFQuizStart|SMFQuizEnd)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(SMFQuizQuestions|SMFQuizDispute|SMFQuizAjax|SMFQuizExport|stats|sticky|feedsadmin|theme)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(todo|trackip|about:mozilla|about:unknown|unread|unreadglobal|unreadreplies|verificationcode)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(viewprofile|vote|votelog|viewquery|viewsmfile|who|calreminder|\.xml)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(registerEvent|xmlhttp|form|bestanswer)/?$ ./index.php?pretty;action=$1 [L,QSA]

# Rules for: boards
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([0-9]*)/?$ ./index.php?pretty;board=$1.$2 [L,QSA]

# Rules for: topics
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1;topic=$2.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*|msg[0-9]*|new)/?$ ./index.php?pretty;board=$1;topic=$2.$3 [L,QSA]

# PRETTYURLS MOD ENDS




This is the .htaccess in the secondary forum (the redemption forum):

Options +FollowSymlinks
RewriteEngine on
RewriteRule (.*)/(.*) ../../../affirmativealliance.com/forum$1/$2

dougiefresh

Thank you for confirming this.  I will make the appropriate adjustments in the code to make it work properly with Pretty URLs....

Greygal


dougiefresh

#305
Uploaded v1.19 - November 29th, 2014
o Modifications made by Greygal made it compatible with Event Registration for SMF2 mod.
o Fixed subforum management code to include Pretty URLs htaccess modifications.  Thanks, Greygal!
o upgrade_1.19.xml attempts to execute failed operation regarding Alias Boards mod.
o Fixed upgrade_1.18.xml to skip SimplePortal template operations if file doesn't exist.

@Greygal: This update should solve the .htaccess issues that have given you grief.  You will need to into your primary forum, go to the Manage Subforums area, then click Modify for each subforum, then save the subforum settings.  You don't need to make any changes to the subforum settings.  The code will update the .htaccess for you so that Pretty URL works correctly....




@Everybody: After much thought given to v2.0, I've decided that I am going to release it as a paid mod.  It'll get released after my redesigned website goes live.....

Greygal

#306
Dougie, you are a wonder, I cannot think of the last time I've seen a mod author be so responsive!

The upgrade installed perfectly :)

I went into subforums, clicked modify and save on the test subforum, and the issue with PrettyURLs is fixed.  When I click on any links on the subforum, it stays on that subforum appropriately.

I then created a new subforum, and got the 404 error problem again when I attempted to click any links on the new subforum!  However, just going into the subforum > modify > save fixed the 404 issue.  In other words, after creating a new subforum, you have to save it after creating it for the proper .htaccess file to be created (at least that's the way I'm reading it!)

The only problem right now is after the subforum is created, the front page shows the theme properly, but any link you click on does not show the theme.  I am digging around right now to see if this is an issue on my side.  Example:  http://www.redemption-road.com/newforum/forum2/public-chat-120/what-type-of-system-are-you-running-eve-on-or-what-would-be/msg12368/?topicseen#msg12368

Edit: On the new testing subforum I created, when I click the "Register" link, it does show with the theme, but there is no text in the "User Agreement" area. Looking into this...

Edit2: Ya, seems like it's not actually pulling the "content" part of any page it creates... digging...

New test subforum base URL is http://www.redemption-road.com/newforum/forum2/

Thanks again, Dougie!!

GG

Edit: Including .htaccess
Primary forum .htaccess
# PRETTYURLS MOD BEGINS
# Pretty URLs mod
# http://code.google.com/p/prettyurls/
# .htaccess file generated automatically on: November 29, 2014, 21:26

RewriteEngine on
RewriteBase /forum

# Rules for: actions
RewriteRule ^(activate|admin|announce|attachapprove|buddy|calendar|clock|collapse)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(coppa|credits|deletemsg|display|dlattach|editpoll|editpoll2|mediapro)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(emailuser|findmember|forum|portal|gamercard|groups|help|helpadmin)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(im|jseditor|jsmodify|jsoption|lock|lockvoting|login|login2)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(logout|markasread|mergetopics|mlist|moderate|modifycat|modifykarma|movetopic)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(movetopic2|notify|notifyboard|openidreturn|pm|post|post2|printpage)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(profile|quotefast|quickmod|quickmod2|recent|register|register2|reminder)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(removepoll|removetopic2|reporttm|requestmembers|restoretopic|search|search2|sendtopic)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(smstats|suggest|spellcheck|splittopics|SMFQuiz|SMFQuizAnswers|SMFQuizStart|SMFQuizEnd)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(SMFQuizQuestions|SMFQuizDispute|SMFQuizAjax|SMFQuizExport|stats|sticky|feedsadmin|theme)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(todo|trackip|about:mozilla|about:unknown|unread|unreadglobal|unreadreplies|verificationcode)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(viewprofile|vote|votelog|viewquery|viewsmfile|who|calreminder|\.xml)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(registerEvent|xmlhttp|form|bestanswer)/?$ ./index.php?pretty;action=$1 [L,QSA]

# Rules for: boards
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([0-9]*)/?$ ./index.php?pretty;board=$1.$2 [L,QSA]

# Rules for: topics
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1;topic=$2.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*|msg[0-9]*|new)/?$ ./index.php?pretty;board=$1;topic=$2.$3 [L,QSA]

# PRETTYURLS MOD ENDS


Subforum .htaccess
# PRETTYURLS MOD BEGINS
# Pretty URLs mod
# http://code.google.com/p/prettyurls/
# .htaccess file generated automatically on: November 29, 2014, 21:26

RewriteEngine on
RewriteBase /forum

# Rules for: actions
RewriteRule ^(activate|admin|announce|attachapprove|buddy|calendar|clock|collapse)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(coppa|credits|deletemsg|display|dlattach|editpoll|editpoll2|mediapro)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(emailuser|findmember|forum|portal|gamercard|groups|help|helpadmin)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(im|jseditor|jsmodify|jsoption|lock|lockvoting|login|login2)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(logout|markasread|mergetopics|mlist|moderate|modifycat|modifykarma|movetopic)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(movetopic2|notify|notifyboard|openidreturn|pm|post|post2|printpage)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(profile|quotefast|quickmod|quickmod2|recent|register|register2|reminder)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(removepoll|removetopic2|reporttm|requestmembers|restoretopic|search|search2|sendtopic)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(smstats|suggest|spellcheck|splittopics|SMFQuiz|SMFQuizAnswers|SMFQuizStart|SMFQuizEnd)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(SMFQuizQuestions|SMFQuizDispute|SMFQuizAjax|SMFQuizExport|stats|sticky|feedsadmin|theme)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(todo|trackip|about:mozilla|about:unknown|unread|unreadglobal|unreadreplies|verificationcode)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(viewprofile|vote|votelog|viewquery|viewsmfile|who|calreminder|\.xml)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(registerEvent|xmlhttp|form|bestanswer)/?$ ./index.php?pretty;action=$1 [L,QSA]

# Rules for: boards
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([0-9]*)/?$ ./index.php?pretty;board=$1.$2 [L,QSA]

# Rules for: topics
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1;topic=$2.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*|msg[0-9]*|new)/?$ ./index.php?pretty;board=$1;topic=$2.$3 [L,QSA]

# PRETTYURLS MOD ENDS

# SUBFORUM MOD BEGINS
RewriteEngine on
Options +FollowSymlinks
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*)/(.*) ../../../affirmativealliance.com/forum$1/$2
# SUBFORUM MOD ENDS


EDIT:  I don't think it's a prettyURLs problem, at least not sure ... it seems to be writing the URLs correctly.  Primary forum URL is first, subforum URL is second, 2nd subforum (new testing subforum) is 3rd, for the same post:

http://www.affirmativealliance.com/forum/public-chat-120/what-type-of-system-are-you-running-eve-on-or-what-would-be/msg12368/?topicseen#msg12368
http://www.redemption-road.com/newforum/forum1/public-chat-120/what-type-of-system-are-you-running-eve-on-or-what-would-be/msg12368/?topicseen#msg12368
http://www.redemption-road.com/newforum/forum2/public-chat-120/what-type-of-system-are-you-running-eve-on-or-what-would-be/msg12368/?topicseen#msg12368

* Greygal thinks she should give up on prettyURLs... but so many of my forum users want prettified URLs... sigh....

dougiefresh

Wow.... Looks like I've got some investigation to do on the mod.  I can personally verify that the subforum's registration agreement doesn't come up when attempting to register....  That ain't supposed to happen!!  :P

Greygal

#308
My "gut" is telling me its related to the pretty-fied URLs, but it makes no sense, and I can't see where its going wrong.  No error messages on the forum's logs.  The server log shows this error message (I renamed my folder name before posting it here though):

[Sat Nov 29 17:53:55 2014] [error] [client 50.45.167.76] File does not exist: /home3/myname/public_html/redemption-road.com/400.shtml, referer: http://www.redemption-road.com/newforum/forum2/public-chat-120/what-type-of-system-are-you-running-eve-on-or-what-would-be/msg12368/?topicseen

That's when attempting to open a post.  When attempting to register, this is the error message on the server log.  The script it is looking for has nothing to do with the body text of the user agreement though - but I'm going to temporarily deactivate that mod anyways (it's just a special bbc mod for posting eve online fits) to see if that helps.

[Sat Nov 29 18:05:49 2014] [error] [client 50.45.167.76] File does not exist: /home3/myname/public_html/affirmativealliance.com/forum/Themes/Default Redemption/scripts/fitting.js, referer: http://www.redemption-road.com/newforum/forum2/?action=register
[Sat Nov 29 18:05:49 2014] [error] [client 50.45.167.76] File does not exist: /home3/myname/public_html/affirmativealliance.com/forum/Themes/Default Redemption/css/fitting.css, referer: http://www.redemption-road.com/newforum/forum2/?action=register

Edit: So I uninstalled the "eft" mod, and broke my forum lol ... fixing now ... if it turns out it's this mod causing the issue, I'm going to cry... :)

Notice: Undefined index: user in /home3/myname/public_html/affirmativealliance.com/forum/Themes/default/languages/Modifications.english.php on line 291
Fatal error: Call to undefined function call_integration_hook() in /home3/myname/public_html/affirmativealliance.com/forum/Sources/Load.php on line 354

Edit: So when I uninstalled the "EFT" mod, it broke my forum, took me a bit to figure out what went wrong, and I'm not entirely sure how this happened, but my Subs.php file ended up empty, like it wiped it out completely.  Very bizarre and not related to this ... just bizarre!  Anyways, it doesn't appear that the "EFT" mod is causing the issue with the body content of posts and the registration agreement not being pulled, or the theme not displaying on pages after the index page.

I'm pretty certain it has something to do with PrettyURLs, and tomorrow I'll uninstall that and see if it works without it.


dougiefresh

#309
I think I figured out why the registration agreement wasn't being pulled up....  The forum was looking for agreement.forum1..txt instead of agreement.forum1.txt (note the 2 periods before txt)....

In Sources/Register.php, find this:
Code (Find) Select
$agree = 'agreement' . ($forumid == 0 ? '' : '.forum' . $forumid . '.');
and replace it with this:
Code (Replace) Select
$agree = 'agreement' . ($forumid == 0 ? '' : '.forum' . $forumid);
Does this solve your problem?  Is there anything else I need to fix?  Thanks!

EDIT: I'm also noticing that logging in from the subforums redirects to the primary board for some reason when Pretty URLs is installed.  I've got the code responsible narrowed down to the .htaccess creation code in Subs-PrettyURLs.php, however, I'm too tired to attempt to fix this tonight....  I'll write something up to rewrite the .htaccess files upon installation of the mod, as well.  It'll be automatic....

Greygal

Thanks Dougie, you're amazing!

I'll try that out soon as work is over and will let you know!

GG

Greygal

That fixed the Register text issue!

So far regarding the theme and content issue (not loading the theme - or content - on pages beyond the front page or the register page), best I can figure somewhere is it's not reading the loadTemplate('Display'); code in the .Sources/Display.php file when on a subforum.  Not entirely sure why, but digging.  Will let you know if I figure it out :)

Thanks again!

GG

SauloA

Quote from: dougiefresh on November 27, 2014, 07:23:12 PM
Quote from: SauloA on November 25, 2014, 08:25:59 PM
I'm getting the following error when I click on the "Boards" link in the admin area:

Template Parse Error!
There was a problem loading the /Themes/default/ManageBoards.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)


It won't allow me to make adjustments to my boards.

Other than that everything is working well with the mod.
Let me research this issue.  I think I solved that particular error in v1.18, but I'll test it again....  What version of the mod are you running?  v1.17 ?

I upgraded to v1.19 and I still got the same error message.  I went to /Themes/default/ManageBoards.template.php to see if I could find anything.  I was able to get rid of the error by:

Code (Find) Select
$txt['pretty_urls']
Code (Replace) Select
$txt['mboards_modify']

In:
Code (ManageBoards.template.php) Select
// List through every board in the category, printing its name and link to modify the board.
foreach ($category['boards'] as $board)
{
$alternate = !$alternate;

echo '
<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>';

if (!empty($board['move_links']))
{
$alternate = !$alternate;

echo '
<li class="windowbg', $alternate ? '' : '2', '" style="padding-', $context['right_to_left'] ? 'right' : 'left', ': ', 5 + 30 * $board['move_links'][0]['child_level'], 'px;">';

foreach ($board['move_links'] as $link)
echo '
<a href="', $link['href'], '" class="move_links" title="', $link['label'], '"><img src="', $settings['images_url'], '/board_select_spot', $link['child_level'] > 0 ? '_child' : '', '.gif" alt="', $link['label'], '" style="padding: 0px; margin: 0px;" /></a>';

echo '
</li>';
}
}


I'm not using the Pretty URLs mod so I figured that was the problem, I guess it was.  The only thing is that I don't know if I'm using the correct variable in that line of code.

Quote from: dougiefresh on November 27, 2014, 07:23:12 PM
Quote from: SauloA on November 25, 2014, 08:25:59 PM
Also, you can get the mod to pass the session information to a subdomain and that works fine, but how do I get the session to another the main domain.  For example, the mod allows me to make a subdomain URL for a separate forum (forum.secondmywebsite.com), but how do I tie that session in the subdomain to the main domain (mysecondwebsite.com)?
That is a REALLY good question.  I'll have to do some research to figure out the answer to this one.....

EDIT: The session ID is stored in a cookie, and each cookie is associated with a domain name.  PHP code can't read the cookies from another domain, the BROWSER won't let it.  So we would have to write up an entirely new way to allow the forum to get that information....

I did what Arantor suggested by going to "Admin > Configuration > Server Settings > Cookies and Sessions" and now my session is being carried over to the main domain.

Quote from: Arantor on November 27, 2014, 07:56:06 PM
You can cross *subdomains* with cookies by way of the 'use subdomain independent cookies' option in Admin > Configuration > Server Settings > Cookies and Sessions.

This allows a cookie for my.domain.com [nofollow] to be access from domain.com [nofollow] and also from example.domain.com [nofollow] - it binds it to the entire domain rather than a subset of it. But cross-domain cookies are voodoo.

This mod just keeps getting better and better.

Greygal

So, I gave up on PrettyURLs, because it's just causing WAY too many problems with WAY too many bits and pieces and such... just sick of trying to tweak everything to get it to work with everything.  In particular it's breaking the authorization system I use that is tied in with the EveOnline API that these forums I'm merging together are about.  And that auth code is beyond spagettified as it is...

EDIT:  Note that removing PrettyURLs removed the theme issues and redirect issues, no surprise.  The subforum I created is working pretty much perfectly now.

However, I kept it installed on a copy of my forum for testing, so that I can help you out further if and as needed with getting SplitForums to work with PrettyURLs.

Meanwhile... a question that I think may have already been answered but I'm so brain-dead right now can't seem to find answer... is there any way for one catagory to show on both forums?  Meaning, is it possible to have my "Welcome" section show on both the primary forum and subforum 1?

I have alias boards installed, and I did install it prior to installing SplitForum, but if I'm reading that right, it can only alias boards within the same subforum, not across subforums...?

Thanks again for all that you do, Dougie!

GG

dougiefresh

Quote from: Greygal on December 02, 2014, 10:34:11 PM
So, I gave up on PrettyURLs, because it's just causing WAY too many problems with WAY too many bits and pieces and such... just sick of trying to tweak everything to get it to work with everything.  In particular it's breaking the authorization system I use that is tied in with the EveOnline API that these forums I'm merging together are about.  And that auth code is beyond spagettified as it is...

EDIT:  Note that removing PrettyURLs removed the theme issues and redirect issues, no surprise.  The subforum I created is working pretty much perfectly now.

However, I kept it installed on a copy of my forum for testing, so that I can help you out further if and as needed with getting SplitForums to work with PrettyURLs.
I haven't had any time to look at the code lately.  Yesterday, I worked a 12-hour shift.  Today was 10 1/2 hours....

Quote from: Greygal on December 02, 2014, 10:34:11 PM
Meanwhile... a question that I think may have already been answered but I'm so brain-dead right now can't seem to find answer... is there any way for one catagory to show on both forums?  Meaning, is it possible to have my "Welcome" section show on both the primary forum and subforum 1?
Not with the version 1.x mod series.  I am working on a 2.0 version of the mod that will allow people to do so, but it will be a paid mod ONLY.

Quote from: Greygal on December 02, 2014, 10:34:11 PM
I have alias boards installed, and I did install it prior to installing SplitForum, but if I'm reading that right, it can only alias boards within the same subforum, not across subforums...?
Correct.  Attempting to pull the board information from an aliased category ends up displaying that category in the board index, which is just wrong.  I haven't figured out a way to fix this, or work around it yet....

Greygal

Assuming the price is right, you can count me in as a customer for 2.0 :)

I've got it up and running properly now, just not with PrettyURLs.  Which I'm fine with not using, as it's a major PITA.

Thanks for all that you do!

GG

jjsmith

Hi Dougiefresh,

I have SMF 2.0.9, and am trying to install ver 1.19 of this mod.

I'm getting errors when installing this mod.  Can you help with resolving them?

(Sorry for the long post.  It's really not too bad - I just posted in a lot of code so you could easily see the what's going on.)

All errors are "Test failed" when I click "Install Mod", and all are with the "Replace" modification.  It looks like all of them are because the "Find" source code isn't being found. 

Thanks for your help!
Josh




In - ./Sources/ManageBoards.php - two errors

1 - Code to find:

// Start with one - "In first place".
$context['category_order'] = array(
array(
'id' => 0,
'name' => $txt['mboards_order_first'],
'selected' => !empty($_REQUEST['cat']) ? $cat_tree[$_REQUEST['cat']]['is_first'] : false,
'true_name' => ''
)
);


That's not found, but I do have the following.  Note the additional 'color' and 'icon' array elements.

// Start with one - "In first place".
$context['category_order'] = array(
array(
'id' => 0,
'color' => '',
'icon' => '',
'name' => $txt['mboards_order_first'],
'selected' => !empty($_REQUEST['cat']) ? $cat_tree[$_REQUEST['cat']]['is_first'] : false,
'true_name' => ''
)
);



2 - Code to find. 

$boardOptions['alias_cat'] = isset($_POST['alias_cat']) ? implode(',', $_POST['alias_cat']) : '';
$boardOptions['alias_child'] = isset($_POST['alias_child']) ? implode(',', $_POST['alias_child']) : '';


That's not found.  In this program, I did a find on "alias_cat" and "alias_child" and neither are present.

Also - This error says "Test failed (Ignore errors)".  Does this really mean I can ignore this error and do the install?





In - ./Themes/default/ManageBoards.template.php - three errors

1 - Code to find:

<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>', '


That's not found, but I do have the following:

<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'], '"', !empty($board['color']) ? ' style="color: ' . $board['color'] . ';">' : '>' , $board['name'], '</a>' , !empty($board['icon']) ? ' <img src="' . $board['icon'] . '" style="width:18px;height:18px;" alt="" /> ' : ''



2 - Code to find:

</dt>
<dd>
<select name="alias_cat[]" multiple="multiple">
<option value="">', $txt['no_cat_selected'], '</option>';
foreach ($cat_tree as $category)
echo '
<option', !isset($context['board']['is_new']) && in_array($category['node']['id'], $context['board']['alias_cat']) ? ' selected="selected"' : '', ' value="', $category['node']['id'], '">', $category['node']['name'], '</option>';
echo '
</select>
</dd>



That's not found.  Also did a search on "alias_cat" and that wasn't found.
This error also says "Test failed (Ignore errors)"


3 - Code to find:

</dt>
<dd>
<select name="alias_child[]" multiple="multiple">
<option value="">', $txt['no_boards_selected'], '</option>';
foreach ($boards as $board)
echo '
<option', !isset($context['board']['is_new']) && in_array($board['id'], $context['board']['alias_child']) ? ' selected="selected"' : '', ' value="', $board['id'], '">', $board['name'], '</option>';
echo '
</select>
</dd>


That's not found.  Also did a search on "alias_child" and that wasn't found.
This error also says "Test failed (Ignore errors)".


Kindred

Сл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

Quote from: jjsmith on December 11, 2014, 03:13:07 PM
All errors are "Test failed" when I click "Install Mod", and all are with the "Replace" modification.  It looks like all of them are because the "Find" source code isn't being found. 
You are correct.

Quote from: jjsmith on December 11, 2014, 03:13:07 PM
In - ./Sources/ManageBoards.php - two errors
2 - Code to find. 

$boardOptions['alias_cat'] = isset($_POST['alias_cat']) ? implode(',', $_POST['alias_cat']) : '';
$boardOptions['alias_child'] = isset($_POST['alias_child']) ? implode(',', $_POST['alias_child']) : '';


That's not found.  In this program, I did a find on "alias_cat" and "alias_child" and neither are present.

Also - This error says "Test failed (Ignore errors)".  Does this really mean I can ignore this error and do the install?
Quote from: jjsmith on December 11, 2014, 03:13:07 PM
In - ./Themes/default/ManageBoards.template.php - three errors
2 - Code to find:

</dt>
<dd>
<select name="alias_cat[]" multiple="multiple">
<option value="">', $txt['no_cat_selected'], '</option>';
foreach ($cat_tree as $category)
echo '
<option', !isset($context['board']['is_new']) && in_array($category['node']['id'], $context['board']['alias_cat']) ? ' selected="selected"' : '', ' value="', $category['node']['id'], '">', $category['node']['name'], '</option>';
echo '
</select>
</dd>



That's not found.  Also did a search on "alias_cat" and that wasn't found.
This error also says "Test failed (Ignore errors)"


3 - Code to find:

</dt>
<dd>
<select name="alias_child[]" multiple="multiple">
<option value="">', $txt['no_boards_selected'], '</option>';
foreach ($boards as $board)
echo '
<option', !isset($context['board']['is_new']) && in_array($board['id'], $context['board']['alias_child']) ? ' selected="selected"' : '', ' value="', $board['id'], '">', $board['name'], '</option>';
echo '
</select>
</dd>


That's not found.  Also did a search on "alias_child" and that wasn't found.
This error also says "Test failed (Ignore errors)".
Yes, these operations relate to the Alias Board mod.  If you don't have Alias Boards mod installed, you can ignore these errors.  If you do have Alias Boards installed, you should upgrade to the latest version.

Regarding the rest of your problems, I will have to figure out what is going on tomorrow.....  Offhand, I know that ManageBoards.php relates to the management of categories and boards for the forum.  The code is modified to allow the UI to list categories in all subforums, and boards in all categories....  I'm too tired to research this issue tonight...

Hj Ahmad Rasyid Hj Ismail

Take it slowly dougiefresh. Take a break if you need it. All I can see is you are doing good so far. Keep it up. This is kind of mod is one of my main interest in SMF.

Advertisement: