TinyPortal

Development => Support => Topic started by: peterjc on December 24, 2007, 03:51:42 AM

Title: Remove the "by username"
Post by: peterjc on December 24, 2007, 03:51:42 AM
I want to use the categorybox to add the game category.  So, usually, the list that display at the categorybox will have the example "by peterjc".  So, how to remove it so it just show the link and does not show who create the list?

Thank you
Title: Re: Remove the
Post by: lebisol on December 24, 2007, 03:55:18 AM
is it that you are using an article in the block?
...what is that you consider "categorybox" ? can u link...
Title: Re: Remove the "by username"
Post by: peterjc on December 24, 2007, 05:15:37 AM
The URL is http://www.compufo.totalh.com.

Look at the right panel lable "play the game".

I want to remove the "by peterjc".  Do you know how?
Title: Re: Remove the "by username"
Post by: lebisol on December 24, 2007, 05:57:09 AM
so they look like articles from the same category in the block named "play the game"....to easily customize this look for Dragoons snip "recent articles". you can not change this in default.
All the best!
Title: Re: Remove the "by username"
Post by: peterjc on December 24, 2007, 07:01:04 AM
Quoteto easily customize this look for Dragoons snip "recent articles".

sorry, what do you mean by dragoons snip???

thank.
Title: Re: Remove the "by username"
Post by: Dragooon on December 24, 2007, 08:06:37 AM
http://www.tinyportal.net/index.php?topic=20261.0 <== Is what he/she meant.

If thats not comfortable with you,
In /Themes/default/TPortalBlocks.template.php Find:
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>';
}
}

And replace it with
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>';
}
echo '</div>';
}
}

Backup before editing though.
Untested but should work.
Title: Re: Remove the "by username"
Post by: lebisol on December 24, 2007, 08:36:36 AM
Quote from: peterjc on December 24, 2007, 07:01:04 AM
sorry, what do you mean by dragoons snip???

thank.
He is this weird guy that makes cool snips for free...
Sorry Dragoon could not resist. :)
Title: Re: Remove the "by username"
Post by: Dragooon on December 24, 2007, 08:52:06 AM
Quote from: lebisol on December 24, 2007, 08:36:36 AM
He is this weird guy that makes cool snips for free...
Yes I make snippets for free(Don't know if they are cool). But...Hey How am I weird....:P
Title: Re: Remove the "by username"
Post by: Skhilled on December 24, 2007, 11:35:19 AM
Admit it! You like being weird! LOL