Child Boards Drop Down List?

Started by KrakenGaming, December 31, 2008, 01:21:49 PM

Previous topic - Next topic

KrakenGaming

Hey Everyone,

Does SMF 2.0 Beta have a way to have drop down lists for child boards? My boards are starting to have a high amount of child boards and I'd like to clean it up with a drop down list or another alternative.

Problem Example #1: hxxp:krakengaming.com/consoles/ [nonactive]

Problem Example #2: hxxp:krakengaming.com/games-398/ [nonactive]

If anything, a sort option or a way to automatically alphabetize would be awesome to.

KrakenGaming

Looking at it, I just might have to split up the child boards into separated categories, a - f, g - m, so on and so on...

Rumbaar

The BoardIndex.template.php uses and array to generate the child board listings.  I can't see how the data from that array couldn't be used to populate a drop-down menu instead of displaying all boards.

Now getting it done, if you can't do it yourself, will be the hard part.  This would be the part you'd need to play with:
// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
if (!empty($board['children']))
{
// Sort the links into an array with new boards bold so it can be imploded.
$children = array();
/* Each child in each board's children has:
id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
foreach ($board['children'] as $child)
{
$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
$children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['link'];
}
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

dbm

Well i dont know php very well, so how should that looks like?:) Thanks
Devbin [nofollow]  - Serbian Development (If this is not allowed, please delete it)

greyknight17

KrakenGaming, is this issue resolved now? If not, we can move this over to the Mod Request board for you.

Rumbaar

I had a look at this, but the issue I ran into was how to deal with the " posts awaiting approval" indicator that a child board might have in 2.0.  In a drop-down menu I can't see how to accommodate both a link to the child board and/or the possible link to the moderate section to approve awaiting posts.

If using a drop-down menu, one option might be to just have an indicator without the link.  But a select drop-down box will no function to allow for navigation without additional javascript as well.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Rumbaar

Okay I worked on this a little more and wrote a mod, it's probably still in approval stage.  Now it's only written for 1.1.x & 2.0 RC1, and I'm not sure how it will be affected by any SEO mod.
Child boards as dropdown menu
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Advertisement: