TinyPortal
Development => Feedback => Bugs/Errors => Topic started by: gcivili on March 11, 2009, 08:43:57 PM
Hi All
In admin, when in parent category are not present articles do not show the child categories
I edit TPortalAdmin.template.php
// any articles then?
if(!empty($context['TPortal']['editarticles']))
{
echo '
<tr class="catbg"><td colspan="6">'.$context['TPortal']['currentcategory'].'</td></tr>';
// any childcategories?
if(!empty($context['TPortal']['childcategories']))
{
foreach($context['TPortal']['childcategories'] as $cat => $link)
echo '
<tr class="titlebg2">
<td colspan="6">' , $txt['tp-childcategories'] , '</td>
</tr>
<tr class="windowbg">
<td colspan="6">' , $link , '</td>
</tr>';
}
echo '
<tr class="catbg3">
<td>'.$txt['tp-pos'].' / '.$txt['tp-name'].'</td>
<td width="5%"> '.$txt['tp-author'].'</td>
<td width="20%"> '.$txt['tp-date'].'</td>
<td width="10%"> '.$txt['tp-display'].'</td>
<td width="1%"> '.$txt['tp-featured'].'</td>
<td width="1%"> '.$txt['tp-delete'].'</td>
</tr>';
if( !empty($context['TPortal']['pageindex']))
echo '
<tr class="titlebg2"><td colspan="6">'.$context['TPortal']['pageindex'].'</td></tr>';
foreach($context['TPortal']['editarticles'] as $alink)
I changed in this way
if(!empty($context['TPortal']['editarticles']) || !empty($context['TPortal']['childcategories'])) {
echo '
<tr class="catbg"><td colspan="6">'.$context['TPortal']['currentcategory'].'</td></tr>';
}
// any childcategories?
if(!empty($context['TPortal']['childcategories']))
{
foreach($context['TPortal']['childcategories'] as $cat => $link)
echo '
<tr class="titlebg2">
<td colspan="6">' , $txt['tp-childcategories'] , '</td>
</tr>
<tr class="windowbg">
<td colspan="6">' , $link , '</td>
</tr>';
echo '
<tr class="catbg3">
<td>'.$txt['tp-pos'].' / '.$txt['tp-name'].'</td>
<td width="5%"> '.$txt['tp-author'].'</td>
<td width="20%"> '.$txt['tp-date'].'</td>
<td width="10%"> '.$txt['tp-display'].'</td>
<td width="1%"> '.$txt['tp-featured'].'</td>
<td width="1%"> '.$txt['tp-delete'].'</td>
</tr>';
if( !empty($context['TPortal']['pageindex']))
echo '
<tr class="titlebg2"><td colspan="6">'.$context['TPortal']['pageindex'].'</td></tr>';
}
// any articles then?
if(!empty($context['TPortal']['editarticles']))
{
foreach($context['TPortal']['editarticles'] as $alink)
.............
now work ...
- Child categories were hidden if parent category was empty of articles. TP Admin. Fixed for TP 1.0 beta4
Thanks for the bugfix. :)