function plgContentCreateTOC( &$row, &$matches, &$page )
{
$heading = $row->title;
// TOC Header
$row->toc = '
<table cellpadding="0" cellspacing="0" class="contenttoc">
<tr>
<th>'
. JText::_( 'Article Index' ) .
'</th>
</tr>
';
// TOC First Page link
$row->toc .= '
<tr>
<td>
<a href="'. JRoute::_( '&showall=&limitstart=') .'" class="toclink">'
. $heading .
'</a>
</td>
</tr>
';
$i = 2;
foreach ( $matches as $bot )
{
$link = JRoute::_( '&showall=&limitstart='. ($i-1) );
if ( @$bot[0] )
{
$attrs2 = JUtility::parseAttributes($bot[0]);
if ( @$attrs2['alt'] )
{
$title = stripslashes( $attrs2['alt'] );
}
elseif ( @$attrs2['title'] )
{
$title = stripslashes( $attrs2['title'] );
}
else
{
$title = JText::sprintf( 'Page #', $i );
}
}
else
{
$title = JText::sprintf( 'Page #', $i );
}
$row->toc .= '
<tr>
<td>
<a href="'. $link .'" class="toclink">'
. $title .
'</a>
</td>
</tr>
';
$i++;
}
// Get Plugin info
$plugin =& JPluginHelper::getPlugin('content', 'pagebreak');
$params = new JParameter( $plugin->params );
if ($params->get('showall') )
{
$link = JRoute::_( '&showall=1&limitstart=');
$row->toc .= '
<tr>
<td>
<a href="'. $link .'" class="toclink">'
. JText::_( 'All Pages' ) .
'</a>
</td>
</tr>
';
}
$row->toc .= '</table>';
}
Questo č il codice infatti...
Marco