PDA

Zobacz pełną wersję : AdsManager - trzecia kolumna (edycja kodu)



marciniszyn
26-10-2011, 12:09
Witam, jak dodać trzecią kolumnę wyświetlania kategorii? wydaje mi się, że ten fragment kodu za to odpowiada ale próbuję go edytować i nie ma efektu.
4564

function recurseCategories( $id, $level, &$children,$itemid) {

if (@$children[$id]) {
$i=0;$first=true;
foreach ($children[$id] as $row) {
$link = JRoute::_("index.php?option=com_adsmanager&view=list&catid=".$row->id."&Itemid=".$itemid);
if ($level == 0)
{
if ($i==0)
{
echo '<tr align="center">';
}
?>
<td width="50%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td rowspan="2" width="80"><div align="center">
<?php
if (file_exists(JPATH_BASE."/images/com_adsmanager/categories/".$row->id."cat.jpg"))
echo '<a href="'.$link.'"><img class="imgcat"

src="'.$this->get('baseurl').'/images/com_adsmanager/categories/'.$row->id.'cat.jpg" alt="'.$row->name.'" /></a>';
else
echo '<a href="'.$link.'"><img class="imgcat"

src="'.$this->get('baseurl').'/components/com_adsmanager/images/default.gif" alt="'.$row->name.'" /></a>';
?>
</div></td>
<td>
<h2 class="adsmanager_main_cat"><a href="<?php echo $link; ?>" ><?php echo $row->name."

(".$row->num_ads.")"; ?></a></h2>
</td>
</tr>
<tr>
<td>
<h3 class="adsmanager_sub_cat">
<?php
}
else
{
if ($first == false)
echo ' - ';
echo '<a href="'.$link.'">'.$row->name." (".$row->num_ads.")".'</a>';
$first = false;
}
if ($level == 0)
{
$this->recurseCategories( $row->id, $level+1, $children,$itemid);
}
if ($level == 0)
{
?>
</h3>
</td>
</tr>
</table>