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

Greygal

@JJSmith:  Are you using some sort of mod that colors your board names, instead of (or in addition to) showing an icon?  Or are you using a nonstandard theme?

On the manageBoards.php errors you are receiving, it's because your code is different starting at
Code (code to search for) Select

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


Code (your code) Select

<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="" /> ' : ''


Note how your code, starting right at $board['id'] is different. The original code is ending the a href link, your code is adding some color styling to the link.  The original code has a image for "recycled.gif" where your code uses a board icon with 18px height/width.

Same thing with the first ManageBoards.php error - you have two additional array items for color and and icon that are not in the original code. 

So that means that since both of these errors are relating to something that changes how your categories are displayed (specifically changes their color and/or icon), that means the error is caused by the same issue - a mod you have installed or some sort of nonstandard theme that has altered this file.

Try and figure out what mod it is, uninstall that mod, install SplitForum, then reinstall that mod.

The solution to this is to either manually edit these lines after you've installed the mod (see the link already posted about that to you), or to remove the mod that caused these changes to your ManageBoards.php file.  Or manually make the relevant edits after installing.

It would be helpful if you listed what mods you had installed ;)

GG

SilverKnight

I noticed a weird bug when trying to move forums around, although they were moved around in the subforum, the actual appearance would not display the correct sequence layout when actually displayed, i found, to fix this, i found if you move a forum over to another sub-forum or the main forum and moved it back it resolved this. Maybe some weird cache\config issue.

Love all the fixes Doug, keep up the good work.

In terms of prettyurls the only issue i am currently seeing with it's integration the navigation tree links are not functioning correctly. ]

E.G.

Cipherspace: Starbound Roleplay » Server Information » Server news and Information » Stub topic

( From top to bottom in that order)
http://www.na.net/index.php // Not correct (main forum instead of sub)
http://www.na.net/index.php#c41 // Main forum instead of sub)
http://www.na.net/index.php?board=540.0 // Correct - Same as : http://www.na.net/cipherspace/server-news-and-information/

http://www.na.net/cipherspace/server-news-and-information/stub-topic/ // Correct

It also seems on the main navigation, when on the sub-forum index, it displays everything correctly, go into a board inside the sub-forum and the navigation has issues including the subforum in it's url and displays the mainforums navigation instead. I use a custom menu but not sure why pretty is getting that. Such a pain, i guess i will have to turn it off again.

TonyG

@DougieFresh: I posted this thread here about creating a multi-site, single-signon instance of SMF, and I was appropriately referred here. If you have any interest I'd be happy to show you my site and Skype with you. Perhaps you can comment on whether this would be a good fit for the Split Forum Mod, and if so I'd be happy to have it serve as a reference site for you. If you're interested, please PM. If it turns out that my site is Not a good fit then I think we'll both benefit from looking into it.

Thanks!

Falcomfr

Hello :)

Bonjour,

I get this errors about your mod (i think) and i don't know why can you help me ?

Thank you



Errors:

Quotehttp://www."monsite".com/index.php?action=admin;area=manageboards;sa=board;boardid=67
8: Undefined index: sub
Fichier: /home/astreagadq/www/Themes/default/ManageBoards.template.php
Ligne: 411

Quote
http://www."monsite".com/index.php?action=admin;area=manageboards;sa=board;boardid=67
8: Undefined index: sub
Fichier: /home/astreagadq/www/Themes/default/ManageBoards.template.php
Ligne: 391

Quotehttp://www."monsite".com/index.php?action=admin;area=manageboards;sa=board;boardid=83
8: Undefined index: sub
Fichier: /home/astreagadq/www/Themes/default/ManageBoards.template.php
Ligne: 398

ManageBoards.template.php:
// Option for choosing the subforum the board lives in.
if (count($subforum_tree) > 1)
{
echo '
<dt>
<strong>', $txt['forumid_title'], ':</strong>

</dt>
<dd>
<select name="new_forum" onchange="hideCategories(this.options[this.selectedIndex].value);">';
foreach ($subforum_tree as $subforum)
echo '
[b]391[/b] <option value="', $subforum['forumid'], '" ', $subforum['forumid'] == $_REQUEST['sub'] ? ' selected="selected"' : '', '>', $subforum['boardname'], '</option>';
echo '
</select>
</dd>';
}
else
echo '
[b]398[/b] <input type="hidden" name="new_forum" value="', $_REQUEST['sub'], '" />';

// Option for choosing the category the board lives in.
echo '

<dt>
<strong>', $txt['mboards_category'], ':</strong>

</dt>
<dd>';
foreach ($subforum_tree as $subforum)
{
echo '
[b]411[/b] <select name="new_cat', $subforum['forumid'], '" id="new_cat', $subforum['forumid'], '" onchange="hideBoards(this.options[this.selectedIndex].value);"', ($subforum['forumid'] <> $_REQUEST['sub'] ? ' style="display: none;"' : ''), ((isset($context['board']['is_new']) && count($context['categories'][$subforum['forumid']]) > 0) || count($context['categories'][$subforum['forumid']]) > 1 ? '' : ' disabled="disabled"'), '>';
foreach ($context['categories'][$subforum['forumid']] as $category)
echo '
<option', $category['selected'] ? ' selected="selected"' : '', ' value="', $category['id'], '">', $category['name'], '</option>';
echo '
</select>';
}
echo '
</dd>';

________________et____________________

Quotehttp://www."monsite".com/index.php?action=admin;area=subforums;e0d22d89fac=aef4def61b7dac8779b59f701c17e475
8: Undefined index: label
Fichier: /home/astreagadq/www/Themes/default/GenericMenu.template.php
Ligne: 327

Quote
http://www."monsite".com/index.php?action=admin;area=permissions;sa=index;a08f8a66845c=0d0ae03a04e5a947c27764f25d001ac1
8: Undefined index: label
Fichier: /home/astreagadq/www/Themes/default/GenericMenu.template.php
Ligne: 180

GenericMenu.template.php:
// Is there any subsections?
$additional_items_sub = 0;
if (!empty($area['subsections']))
{
echo '
<ul>';

foreach ($area['subsections'] as $sa => $sub)
{
if (!empty($sub['disabled']))
continue;

$url = isset($sub['url']) ? $sub['url'] : (isset($area['url']) ? $area['url'] : $menu_context['base_url'] . ';area=' . $i) . ';sa=' . $sa;

echo '
<li', (++$additional_items_sub > 6) ? ' class="additional_items"' : '' ,'>
[b]180 [/b] <a ', !empty($sub['selected']) ? 'class="active" ' : '', 'href="', $url, $menu_context['extra_parameters'], '"><span>', $sub['label'], '</span></a>
</li>';
}

echo '
</ul>';
}

echo '
</li>';
}
echo '
</ul>
</li>';
}

echo '
</ul>
</div>';



// Print out all the items in this tab.
foreach ($tab_context['tabs'] as $sa => $tab)
{
if (!empty($tab['disabled']))
continue;

if (!empty($tab['is_selected']))
{
echo '
<li>
<a class="active firstlevel" href="', isset($tab['url']) ? $tab['url'] : $menu_context['base_url'] . ';area=' . $menu_context['current_area'] . ';sa=' . $sa, $menu_context['extra_parameters'], isset($tab['add_params']) ? $tab['add_params'] : '', '"><span class="firstlevel">', $tab['label'], '</span></a>
</li>';
}
else
echo '
<li>
[b]327[/b] <a class="firstlevel" href="', isset($tab['url']) ? $tab['url'] : $menu_context['base_url'] . ';area=' . $menu_context['current_area'] . ';sa=' . $sa, $menu_context['extra_parameters'], isset($tab['add_params']) ? $tab['add_params'] : '', '"><span class="firstlevel">', $tab['label'], '</span></a>
</li>';
}

dougiefresh

Uploaded v1.20 - January 19th, 2015
o License change to Simplified BSD.
o Fixed issue with the registration agreement not being pulled up for subforums....
o Modified Edit Subforum code so that .htaccess is properly updated by Pretty URLs.

tranhiep_116

thanks, i can using this

dougiefresh

@Falcomfr: I will look into these undeclared variable issues.

@SilverKnight:  I will look into your bug report.  It's been almost a month (or so) since I worked on this mod, so hopefully, I'll be able to nail down some bugs...


SHome

Great mod but i'm having an issue creating new subboards.  When I fill the "Create New SubForum" form and click on Save, I am redirected to the subforums list without any errors displayed but the sub forum is never created.

Looking at the SMF error log, I see the following errors:


8: Undefined index: sp_portal
File: Sources/ManageSplitForums.php
Line: 155

8: Undefined index: path
File: Sources/ManageSplitForums.php
Line: 231

8: Undefined index: path
File: Sources/ManageSplitForums.php
Line: 232

8: Undefined variable: boardurl
File: Sources/ManageSplitForums.php
Line: 294

FWIW, I'm using both SimplePortal 2.3.6 and PrettyURL.  Tried disabling PrettyURL but the same issue still occurs.

SHome

Sorry, please disregard my last post.  The issue was caused by the mod not installing properly due to a server path mismatch.

dougiefresh

#329
@SatelliteHome: I've made some code alterations to fix the errors you reported.  The undefined indexes should no longer cause errors to pop up in your error logs anymore with v1.21....

@Falcomfr: I've gotten the bugs worked out of ManageBoards.template.php, and I'm looking into the GenericMenu.php, trying to figure out exactly where that one's originating from....

dougiefresh

Quote from: dougiefresh on February 02, 2015, 12:49:52 PM
@Falcomfr: I've gotten the bugs worked out of ManageBoards.template.php, and I'm looking into the GenericMenu.php, trying to figure out exactly where that one's originating from....
Lemme correct myself.  I've gotten the undefined index errors worked out of the ManageBoards.template.php file.

On to the GenericMenu.template.php file, that is where the error is reported from, but it is not the source of the error.  The source of the error is not defining the "label" element of the tabbed menu.  Unfortunately, I can't find the source within my mod.  So I don't believe that I will be able to resolve this without more information.....

Falcomfr

Quote from: dougiefresh on February 02, 2015, 03:28:57 PM
So I don't believe that I will be able to resolve this without more information.....

Thank you,

So this error does not come from slipt forum mod ?

What informations you need?

dougiefresh

Quote from: Falcomfr on February 03, 2015, 02:43:23 PM
So this error does not come from slipt forum mod ?
Well, I installed this mod on a clean SMF 2.0.9 install and went through the areas affected by the subforum mod.  I didn't see anything in the error logs  resulting from the mod being used/installed, so I'm pretty sure that it isn't this mod making those errors.....

Quote from: Falcomfr on February 03, 2015, 02:43:23 PM
What informations you need?
I MIGHT be able to narrow it down with a list of mods, as well as information on what other modifications that have been made to the forum.....  However, considering ANY incorrectly altered/coded code (including incorrectly altered/coded mods) could be causing that error, it would be a huge task to search for it.  And it's something that I frankly don't have enough time at present to figure out what might be causing that particular error in a sea of code....

EDIT: I can narrow it down based on my copy of GenericMenu.template.php....  It's somewhere in the Admin menu building code....  Try looking at Sources/Admin.php, as well as the hooks for the Admin menu....

dougiefresh

Uploaded v1.21 - February 18th, 2015
o POLICY CHANGE: Mod upgrade capability limited to previous version of the mod.
o Resolved several undefined index errors within ManageBoards.template.php
o Resolved several undefined index errors within ManageSplitForums.php




@Everybody: I've made a few changes to this mod over the last 2 months, and while I don't remember everything that I've done, I think the changelog covers it all.  This update does NOT address compatibility and/or usage issues with Pretty URLs. 

"Previous version of the mod" is hereby defined as the version prior to this one.  In other words, you may upgrade from v1.20 to v1.21 using the v1.21 version for mod, but not from v1.19.  There are server compatibility issues with trying to upgrade the same file with multiple XML instructions, and this policy change makes these issues less likely to happen.

Additionally, I am unable to edit the first post of this thread.  However, I've been told there are changes in the works to address the "first topic" issue...

SaltedWeb

Fresh install only SP installed as Mod multiple errors in Admin Logs,
Including those listed by Falcomfr .
Removed Split Forum and errors went away.
Installed fine but looks like its not stable for me.

Thanks for the try.
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

Empire KickAss

Is there an video on this?
If I helped you out in anyway can u please click this up button arrow .Thank You!!!

Empire KickAss

I have an problem, It's working alright and it's showing on my secound domain but when I go to the new subforum, I see it, but whenever I try to click on the board I created or login, I get a 404 error. 

This is the main forum http://www.baysidegamers.com and I'm trying to create a subforum off of it to http://www.baysideves.com/forum/

List of M Mods.

1.   Split Forum Mod   
2.   404 on Missing Topics/Boards
3.   Custom Form Mod   
4.   Downloads System Pro   
5.   Simple Audio Video Embedder   
6.   Login Security   
8.   Enhanced PM System   
9.   Ad Seller Pro   
10.   SimplePortal   
12.   Add Favicon.ico Support   
13.   Remove Help From Menu   
14.   Alias Boards   
15.   Pretty URLs   
16.   'Read the Rules' Link Above Post Button   
17.   Newsletter Pro   
18.   BBPh Smilies   
19.   Registered Links   
20.   SMF Gallery Pro   
21.   Tapatalk SMF 2.0 Plugin   
22.   Unknown Actions      
23.   Notifications on Register   
24.   Arantor CAPTCHA   
25.   Badge Awards   
26.   The Rules

Please help thanks
If I helped you out in anyway can u please click this up button arrow .Thank You!!!

Empire KickAss

From the post above, this is the code.

.htaccess # PRETTYURLS MOD BEGINS
# Pretty URLs mod
# http://code.google.com/p/prettyurls/
# .htaccess file generated automatically on: February 28, 2015, 17:50

RewriteEngine on
RewriteBase /

# 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|emailuser)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(findmember|forum|portal|groups|help|helpadmin|im|jseditor)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(jsmodify|jsoption|lock|lockvoting|login|login2|logout|markasread)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(mergetopics|mlist|moderate|modifycat|modifykarma|movetopic|movetopic2|notify)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(notifyboard|openidreturn|pm|post|post2|printpage|profile|quotefast)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(quickmod|quickmod2|recent|register|register2|reminder|removepoll|removetopic2)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(reporttm|requestmembers|restoretopic|search|search2|sendtopic|smstats|suggest)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(spellcheck|splittopics|stats|sticky|theme|trackip|about:mozilla|about:unknown)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(unread|unreadreplies|verificationcode|viewprofile|vote|viewquery|viewsmfile|who)/?$ ./index.php?pretty;action=$1 [L,QSA]
RewriteRule ^(\.xml|xmlhttp)/?$ ./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 (.*)/(.*) ../../$1/$2
# SUBFORUM MOD ENDS

index.php
<?php
require_once('/home3/empire/public_html/index.php');
?>
If I helped you out in anyway can u please click this up button arrow .Thank You!!!

dougiefresh

@Empire KickAss: Even though efforts to make this mod compatible with Pretty URLs have been made, it still does not work properly with Pretty URLs.  I haven't looked at the mod in a few months to make any corrections, but maybe I will be able to in the upcoming week or so.  That's the best I can promise at the moment.

@SaltedW:  It would be helpful if you can give more information about what failed, what errors, etc....  I can't fix it without a lot more information from you.

SaltedWeb

Quote from: dougiefresh on March 05, 2015, 11:39:30 AM

@SaltedW:  It would be helpful if you can give more information about what failed, what errors, etc....  I can't fix it without a lot more information from you.

I thank you,, for me it was many errors I see other reports. I tried it on a clean site same issue.
So just went a different route, and used two domains on my server. This would have been easier and way faster your way.
But today finished the move and changes after a weeks work or well its how it goes. Couldn't tell you the errors, but as I previously put was duplicates of what others had here. 

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

Advertisement: