News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Childboards as Dropdown Moduyla İlgili

Started by senyor35, April 11, 2014, 05:32:30 PM

Previous topic - Next topic

senyor35

Kullanacağım tema için paket kurulumda boardindex ve messageindex.template dosyalarında değişiklik başarısız oldu. Manuel kurmak istedim fakat bul denilen kodlar dosyaların içerisinde yok. Bu değişiklikleri nasıl yapabilirim? Kendi temamın dosyaları ektedir.

Themes/default/BoardIndex.template.php Bul;


echo '
<tr id="board_', $board['id'], '_children">
<td colspan="3" class="children windowbg">
<strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '
</td>
</tr>';


Değiştir;


//-- Labradoodle-360; Childboards as Dropdown
global $modSettings;
if (!empty($modSettings['lab360_childboard_dropdown']) && (isset($modSettings['lab360_childboard_limit']) && ($modSettings['lab360_childboard_limit'] == 0 || count(array_keys($board['children'])) > $modSettings['lab360_childboard_limit']) || !isset($modSettings['lab360_childboard_limit'])))
{
unset($children);
echo '
<tr id="board_', $board['id'], '_children">
<td colspan="3" class="children windowbg">
<form action="', $scripturl, '?" method="get">
<strong>', $txt['parent_boards'], ':</strong>&nbsp;
<select name="board" id="board" onchange="javascript:jsRedirect(this);">
<option value="">', $txt['lab360_cad']['select_child'], '</option>
<optgroup label="', $txt['lab360_cad']['board_children'], ':">';
foreach ($board['children'] as $key => $value)
{
echo '<option value="', $key, '">', $value['name'], $value['new'] ? '&#42;' : '', '</option>';
}
echo '</optgroup>
</select>
<noscript>
<input type="submit" value="', $txt['lab360_cad']['go'], '" class="button_submit" />
</noscript>
</form>
</td>
</tr>
';
}
else
{
echo '
<tr id="board_', $board['id'], '_children">
<td colspan="3" class="children windowbg">
<strong>', $txt['parent_boards'], ':</strong> ', implode(', ', $children), '
</td>
</tr>
';
}
// End Labradoodle-360; Childboards as Dropdown --//


Themes/default/MessageIndex.template.php bul;


echo '
<tr id="board_', $board['id'], '_children"><td colspan="3" class="children windowbg"><strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '</td></tr>';


Değiştir;


//-- Labradoodle-360; Childboards as Dropdown
global $modSettings;
if (!empty($modSettings['lab360_childboard_dropdown']) && (isset($modSettings['lab360_childboard_limit']) && ($modSettings['lab360_childboard_limit'] == 0 || count(array_keys($board['children'])) > $modSettings['lab360_childboard_limit']) || !isset($modSettings['lab360_childboard_limit'])))
{
unset($children);
echo '
<tr id="board_', $board['id'], '_children">
<td colspan="3" class="children windowbg">
<form action="', $scripturl, '?" method="get">
<strong>', $txt['parent_boards'], ':</strong>&nbsp;
<select name="board" id="board" onchange="javascript:jsRedirect(this);">
<option value="">', $txt['lab360_cad']['select_child'], '</option>
<optgroup label="', $txt['lab360_cad']['board_children'], ':">';
foreach ($board['children'] as $key => $value)
{
echo '<option value="', $key, '">', $value['name'], $value['new'] ? '&#42;' : '', '</option>';
}
echo '</optgroup>
</select>
<noscript>
<input type="submit" value="', $txt['lab360_cad']['go'], '" class="button_submit" />
</noscript>
</form>
</td>
</tr>
';
}
else
{
echo '
<tr id="board_', $board['id'], '_children">
<td colspan="3" class="children windowbg">
<strong>', $txt['parent_boards'], ':</strong> ', implode(', ', $children), '
</td>
</tr>
';
}
// End Labradoodle-360; Childboards as Dropdown --//

xSabotaJx

smf'nin hangi sürümünü kullanıyorsun?

BoardIndex'te aradığın kod bloğu yerinde sende şu var:

                    echo '<div class="smalltext" style="padding-top: 7px;">', $txt['parent_boards'], ': ', implode(', ', $children), '</div>';
                }
                   
                    echo '</td>
                    <td class="stats">
                        <p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' /
                        ', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
                        </p>
                    </td>
                    <td class="lastpost" align="right">';

                /* The board's and children's 'last_post's have:
                time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
                link, href, subject, start (where they should go for the first unread post.),
                and member. (which has id, name, link, href, username in it.) */
                if (!empty($board['last_post']['id']))
                    echo '
                        <p><strong>', $txt['last_post'], '</strong>  ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
                        ', $txt['in'], ' ', $board['last_post']['link'], '<br />
                        ', $txt['on'], ' ', $board['last_post']['time'],'
                        </p>';
                echo '
                    </td>                   
                </tr>';


MessageIndex'te ise 116/117 numaralı satırlarda aradığın kodlar birebir var..
Clio Türkiye (SMF) | Burak Sarı (Wordpress)

"Eğitimli insanlar topluma borçludurlar.
Bir işin nasıl yapılabileceğini biliyorken bir başkasının yapamadığını görüp susmaları kendilerini yetiştiren o topluma ihanettir."

senyor35

2.0.7 kullaniyorum. Bir sorun olurmu acaba?

xSabotaJx

sorun olmaz da, dosyada önceden yapılan değişiklikler var. yukarıda verdiğim kodlar sizin değiştirmek için aradığınız kodların yerinde bulunan kodlar..
Clio Türkiye (SMF) | Burak Sarı (Wordpress)

"Eğitimli insanlar topluma borçludurlar.
Bir işin nasıl yapılabileceğini biliyorken bir başkasının yapamadığını görüp susmaları kendilerini yetiştiren o topluma ihanettir."

senyor35

#4
EDIT: Teşekkür ederim. Tema destek sayfasından çözüme ulaştım.

Advertisement: