Hey Joseph,
I've ran through the Extension Development book and have run into an issue with Joomla! 1.5. When creating components, I can not seem to get the publish/unpublish icon to function as intended and was wondering if you had a solution or any tips. Here is my display function:
function showKinesisAvailable($option, &$rows)
{
echo '<form action="index.php" method="post" name="adminForm">';
echo '<table class="adminlist">';
echo '<thead>';
echo '<tr>';
echo '<th width="20">';
echo '<input type="checkbox" name="toggle" value="" onclick="checkAll('.count($rows).'

;" />';
echo '</th>';
echo '<th class="title">Name</th>';
echo '<th width="20%" nowrap="nowrap">Page title</th>';
echo '<th width="5%" nowrap="nowrap">Published</th>';
echo '</tr>';
echo '</thead>';
jimport('joomla.filter.output'

;
$k = 0;
$i = 0;
$n=count($rows);
while($i < $n)
{
$row = $rows[$i];
$checked = JHTML::_('grid.id',$i,$row->id);
$published = JHTML::_('grid.published',$row,$i);
$link = JFilterOutput::ampReplace('index.php?option='.$option.'&task=edit&cid[]='.$row->id);
echo '<tr class="row"'.$k.'">';
echo '<td>';
echo $checked;
echo '</td>';
echo '<td>';
echo '<a href="'.$link.'">';
echo $row->name;
echo '</a>';
echo '</td>';
echo '<td>';
echo $row->title;
echo '</td>';
echo '<td align="center">';
echo $published;
echo '</td>';
echo '</tr>';
$k = 1 - $k;
$i++;
}
echo '</table>';
echo '<input type="hidden" name="option" value="'.$option.'" />';
echo '<input type="hidden" name="task" value="" />';
echo '<input type="hidden" name="boxchecked" value="0" />';
echo '</form>';
}
I had to change JOutputFilter to JFilt;
$checked = JHTML::_('grid.id',$i,$row->id);
$published = JHTML::_('grid.published',$row,$i);
$link = JFilterOutput::ampReplace('index.php?option='.$option.'&task=edit&cid[]='.$row->id);
echo '<tr class="row"'.$k.'">';
echo '<td>';
echo $checked;
echo '</td>';
echo '<td>';
echo '<a href="'.$link.'">';
echo $row->name;
echo '</a>';
echo '</td>';
echo '<td>';
echo $row->title;
echo '</td>';
echo '<td align="center">';
echo $published;
echo '</td>';
echo '</tr>';
$k = 1 - $k;
$i++;
}
echo '</table>';
echo '<input type="hidden" name="option" value="'.$option.'" />';
echo '<input type="hidden" name="task" value="" />';
echo '<input type="hidden" name="boxchecked" value="0" />';
echo '</form>';
}
I had to change JOutputFilter to JFilterOutput in order to find the class. Other than that, I couldn't really find any thing glaring in the differences between the code and book. Any help/tips would be appreciated. Thanks!