TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 17, 2024, 05:45:23 AM

Login with username, password and session length
Members
  • Total Members: 3,886
  • Latest: Grendor
Stats
  • Total Posts: 195,189
  • Total Topics: 21,220
  • Online today: 59
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 49
  • Total: 50
  • @rjen

Remove author from catBox

Started by Balrost, December 24, 2006, 04:43:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Balrost

I am using Catagory boxes to link to articles in side blocks.  What I would like to do is remove the reference to the author from the link in the catBox. 

I am sure it is simply removing the author varible from the echo, I may be wrong tho, but I am not sure where the catBox is getting its code. 

Can someone point me to the right file to edit out the author var.

Thanks.

Ianedres

I also wanted this- because all of the articles on my site are from me, which loads the screen up with my name...

What I ended up doing is making a link in the menubox for the article's URL. This avoided future problems in modifying the code; however, you do have to add/remove as needed to adjust the menu's options.

This would make a good feature request, though.  :coolsmiley:

JPDeni

Copy TPortalBlocks.template.php from the default theme directory to your theme directory. Find


// category listing blocktype
function TPortal_categorybox()
{
    global $context, $settings, $options, $txt, $scripturl;

if(isset($context['TPortal']['blockarticle_titles'][$context['TPortal']['blocklisting']])){
echo '<div class="smalltext" ', (sizeof($context['TPortal']['blockarticle_titles'][$context['TPortal']['blocklisting']])>$context['TPortal']['blocklisting_height'] && $context['TPortal']['blocklisting_height']!='0') ? ' style="overflow: auto; width: 100%; height: '.$context['TPortal']['blocklisting_height'].'em;"' : '' ,'>';
foreach($context['TPortal']['blockarticle_titles'][$context['TPortal']['blocklisting']] as $listing){
if($listing['category']==$context['TPortal']['blocklisting'])
echo '<b><a href="'.$scripturl.'?page='.$listing['id'].'">'.$listing['subject'].'</a></b> '.$txt[525].' '.$listing['poster'].'<br />';
}
echo '</div>';
}
}


Delete

'.$txt[525].' '.$listing['poster'].'


Balrost

Thank you so much. Was exactly what I was needing. 

Code starts at line 866 fyi.