Simple Machines Community Forum

SMF Development => Feature Requests => Applied or Declined Requests => Topic started by: sager on November 12, 2006, 11:18:33 AM

Title: Drop down box for child boards..
Post by: sager on November 12, 2006, 11:18:33 AM
I am new bie here so plz consider,

I want to integrate a drop down box for child boards please help......

2nd. An intergrated shout box just like vbulletin.... i am tired of integrating the existing shoutboxes tht are available... is there a shoutbox tht doesnt need hardcoding manually.... ?
Title: Re: Drop down box for child boards..
Post by: codenaught on November 12, 2006, 12:36:21 PM
There are three shoutboxe mods that I see:

http://mods.simplemachines.org/index.php?mod=22
http://mods.simplemachines.org/index.php?mod=412
http://mods.simplemachines.org/index.php?mod=294

It shouldn't be hard to install any of them, but if you need help you can ask in the mod's support topic.

As for the dropdown, can you be more specific? Do you want the list of child boards on the board index replaced with a dropdown of the child boards? It might help if you tell us what version of SMF you are using.
Title: Re: Drop down box for child boards..
Post by: sager on November 13, 2006, 02:19:33 AM
ok i will again try to implement sb....

yes i want the childboards to appear in drop down boxes in the main borad.. my version is rc3
Title: Re: Drop down box for child boards..
Post by: sager on November 15, 2006, 05:31:42 AM
nething on it ?
Title: Re: Drop down box for child boards..
Post by: codenaught on November 15, 2006, 06:28:28 PM
Okay, how's this?

Try the following.

Open Themes/theme_name/BoardIndex.template.php

Find:

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'];
}

echo '
<tr>
<td colspan="3" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">
<span class="smalltext"><b>', $txt['parent_boards'], '</b>: ', implode(', ', $children), '</span>
</td>
</tr>';
}


Change to:

if (!empty($board['children']))
{
echo '
<tr>
<td colspan="3" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">

<form action="', $scripturl, '"><span class="smalltext"><b>', $txt['parent_boards'], '</b>:

<select onchange="this.form.submit()" name="board">';
foreach($board['children'] as $child)
{
echo ' <option value="', $child['id'], '.0">', $child['name'], '</option>';
}

echo ' </select>
                               <input type="submit" value="Go" /></span></form>
</td>
</tr>';
}


Please let me know how I can adjust it to fit your needs, such as location of the dropdown. Also if you are not using the default theme it is quite possible you may not find the exact code posted above that you need to search for.
Title: Re: Drop down box for child boards..
Post by: sager on November 16, 2006, 05:43:23 AM
sexy wrk bro. :D :D :D :D.. love it... well i dnt care about the looks part.... but it has come out nice.. you can check it here.. managementjuice.com/forum


you can make it a mod....

2nd thing is there any mod where i can  have customized profile fields during registration.....
Title: Re: Drop down box for child boards..
Post by: codenaught on November 16, 2006, 03:19:15 PM
I'm glad you like it and got it working. :)

For custom profile fields during registration, if you use this mod (http://mods.simplemachines.org/index.php?mod=319), you can have them filled out during registration.