1 stevet Sep 11, 2006 13:08
3 stevet Sep 11, 2006 16:43
Topanga - that link is dead at the moment
I figured this out whilst driving home. Since i was getting almost what I wanted ie ?author= in teh URL I figured what was missing - I missed this out ->Author->ID
The following works
<br /><br />Written by <a href="<?php echo url_add_param( $Blog->get( 'blogurl', 'htmlattr' ), 'author='. $Item->Author->ID) ?>" title="<?php echo T_('Browse all posts by this author') ?>"><?php $Item->author( '<strong>', '</strong>' ) ?></a>
4 topanga Sep 11, 2006 17:43
<?php
$Item->get_creator_User();
if( $Item->assigned_user_ID )
{
$the_author = $UserCache->get_by_ID( $Item->assigned_user_ID );
}
else
{
$the_author = $Item->Author;
}
echo '<a href="'.url_add_param( $Blog->get( 'blogurl', 'htmlattr' ), 'author='.$the_author->ID).'" title="Browse all articles from '.$the_author->get_preferred_name().'"><img src="rsc/icon_16_author.gif" border="0"></a>';
?>
5 stevet Sep 11, 2006 19:16
well that works but why call up an icon?
echo '<a href="'.url_add_param( $Blog->get( 'blogurl', 'htmlattr' ), 'author='.$the_author->ID).'" title="Browse all articles from '.$the_author->get_preferred_name().'"><img src="rsc/icon_16_author.gif" border="0"></a>';
I'd rather display the authors name than an icon. I'm trying to do this now without much success, I'll keep trying but a nudge in the right direction would be welcome
6 topanga Sep 11, 2006 23:02
<?php $Item->get_creator_User();
if( $Item->assigned_user_ID )
{ $the_author = $UserCache->get_by_ID( $Item->assigned_user_ID ); }
else
{ $the_author = $Item->Author; }
echo 'Written by <a href="'.url_add_param( $Blog->get( 'blogurl', 'htmlattr' ), 'author='.$the_author->ID).'" title="Browse all articles from '.$the_author->get_preferred_name().'">'.$the_author->get_preferred_name().'</a>';
$the_author->msgform_link( $Blog->get('msgformurl'),' ',' ','#','Send an email to '.$the_author->get_preferred_name().', the author of this article','' );?>
7 stevet Sep 12, 2006 12:19
thanks that works. I've hacked it about a little to do what I want.
http://www.tvcm.co.uk/b2/dev/index.php/a
only thing bugging me now is - what's putting those icons on permalink and teh edit link. I can't see why they are there or what is causing it. I hesitate to start a new topic for this.
The link to teh manual works for me today. That's cool a wiki manaual. I've signed up for an account and I'll contribute what I can
8 topanga Sep 12, 2006 12:40
Look into the tech-docs
http://doc.b2evolution.net/v-1-8/evocore/Item.html#methodedit_link
http://doc.b2evolution.net/v-1-8/evocore/Item.html#methodpermanent_link
In a little time, you will get your 'aha-experience'
http://manual.b2evolution.net/Assigned_author
(and if that works, write 'she did it again - beat me to it' ;)