The way I did it was by using keywords. Basically, if the Title contains the word "stefan" ( the name of my cat ) it is left behind. Similarly for the author, if the alias for the author is "stefan", the author field is left out.
Of course you can change the word "stefan" to anything you want :)
Hope it helps someone in the future.
It's all done inside the content.html.php file of Joomla! 1.0.13.
DISCLAIMER: Make a backup, and modify at your own risk. I'm no php expert and if anyone can make the code any better, please do so :)
Title: Line 617
Code: Select all
function Title( &$row, &$params, &$access ) {
if ( $params->get( 'item_title' ) ) {
$findme = 'stefan';
$mystring = $row->title;
$cutout = strpos($mystring, $findme);
if ($cutout !== false) {
?>
<?php
}
else {
if ( $params->get( 'link_titles' ) && $row->link_on != '' ) {
?>
<td class="contentheading<?php echo $params->get( 'pageclass_sfx' ); ?>" width="100%">
<a href="<?php echo $row->link_on;?>" class="contentpagetitle<?php echo $params->get( 'pageclass_sfx' ); ?>">
<?php echo $row->title;?></a>
<?php HTML_content::EditIcon( $row, $params, $access ); ?>
</td>
<?php
} else {
?>
<td class="contentheading<?php echo $params->get( 'pageclass_sfx' ); ?>" width="100%">
<?php echo $row->title;?>
<?php HTML_content::EditIcon( $row, $params, $access ); ?>
</td>
<?php
}
}
}
else {
?>
<td class="contentheading<?php echo $params->get( 'pageclass_sfx' ); ?>" width="100%">
<?php HTML_content::EditIcon( $row, $params, $access ); ?>
</td>
<?php
}
}
For the author. on line 816:
Code: Select all
function Author( &$row, &$params ) {
if ( ( $params->get( 'author' ) ) && ( $row->created_by_alias == 'stefan' ) ) {
?>
<?php
}
elseif ( ( $params->get( 'author' ) ) && ( $row->author != '' ) ) {
?>
<tr>
<td width="70%" align="left" valign="top" colspan="2">
<span class="small">
<?php echo _WRITTEN_BY . ' '.( $row->created_by_alias ? $row->created_by_alias : $row->author ); ?>
</span>
</td>
</tr>
<?php
}
}