Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Aiheen aloitti: KrakenGaming - joulukuu 31, 2008, 01:21:49 IP

Otsikko: Child Boards Drop Down List?
Kirjoitti: KrakenGaming - joulukuu 31, 2008, 01:21:49 IP
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: http://krakengaming.com/consoles/ (http://krakengaming.com/consoles/)

Problem Example #2: http://krakengaming.com/games-398/ (http://krakengaming.com/games-398/)

If anything, a sort option or a way to automatically alphabetize would be awesome to.
Otsikko: Re: Child Boards Drop Down List?
Kirjoitti: KrakenGaming - joulukuu 31, 2008, 01:50:02 IP
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...
Otsikko: Re: Child Boards Drop Down List?
Kirjoitti: Rumbaar - tammikuu 19, 2009, 05:45:30 IP
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'];
}
Otsikko: Re: Child Boards Drop Down List?
Kirjoitti: dbm - helmikuu 03, 2009, 08:18:02 IP
Well i dont know php very well, so how should that looks like?:) Thanks
Otsikko: Re: Child Boards Drop Down List?
Kirjoitti: greyknight17 - helmikuu 27, 2009, 11:31:56 AP
KrakenGaming, is this issue resolved now? If not, we can move this over to the Mod Request board for you.
Otsikko: Re: Child Boards Drop Down List?
Kirjoitti: Rumbaar - helmikuu 27, 2009, 07:02:08 IP
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.
Otsikko: Re: Child Boards Drop Down List?
Kirjoitti: Rumbaar - maaliskuu 08, 2009, 08:37:59 IP
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 (http://custom.simplemachines.org/mods/index.php?mod=1691)