TinyPortal

Development => Support => Topic started by: Zugluk on May 17, 2008, 03:33:29 AM

Title: disable avatar on front page?
Post by: Zugluk on May 17, 2008, 03:33:29 AM
is there a way to hide the avatar on the front page without it being disable in other places?
Title: Re: disable avatar on front page?
Post by: Zugluk on May 17, 2008, 03:35:00 AM
and yes I searched first  :up:  :2funny:
Title: Re: disable avatar on front page?
Post by: Zugluk on May 17, 2008, 03:56:17 AM
http://www.tinyportal.net/index.php?topic=15339.msg127296#msg127296

found this but .. no solution
Title: Re: disable avatar on front page?
Post by: G6Cad on May 17, 2008, 09:11:35 AM
Hm, seems like major bumping, please eather edit your post if noone have given any reply to your post or please wait atleast 24 hours before you bump the topic.
The avatar is not a TP function, it's more of a theme function.
You havent provided us with the info we need, so it's hard to give you any answer.

Please read and apply the info we need according to our posting guide we have in the support board sticky topic.
Title: Re: disable avatar on front page?
Post by: raid on May 17, 2008, 11:25:15 AM
I opened a topic like that somewhere for TP 1.0.5 beta1

I removed the avatars, let me remember how.  :D

EDIT: So I had the problem that for forum post is not possible to disable the avatar, I didnt found it (for normal Articles IT IS POSSIBLE TO DISABLE IT).
for me I added this condition on TPortal.template.php
Code (search for) Select
// show authors avatar?
if(isset($story['options']['avatar']) && !empty($story['avatar']['image']))
echo '
<div class="tp_avatar' , ($context['TPortal']['mycat']!='' || !empty($context['TPortal']['is_front'])) ? '_category' : '' , '"><a href="' , $story['poster']['href'] , '" title="' , $story['poster']['name'] , '">' , $story['avatar']['image'] , '</a></div>';


Code (replace with) Select
// show authors avatar?
if(isset($story['options']['avatar']) && !empty($story['avatar']['image']) && !($context['TPortal']['front_type']=='forum_only') && !($context['TPortal']['front_type']=='forum_articles'))
echo '
<div class="tp_avatar' , ($context['TPortal']['mycat']!='' || !empty($context['TPortal']['is_front'])) ? '_category' : '' , '"><a href="' , $story['poster']['href'] , '" title="' , $story['poster']['name'] , '">' , $story['avatar']['image'] , '</a></div>';


I added the conditions that when there are forum post avatar are disabled, but the line is only for one layout, mine, look here to understand: http://i29.tinypic.com/2sb4cr9.jpg

for other layout cases, look insiede TPortal.template.php for:
// show authors avatar? read the code and you will understand
Title: Re: disable avatar on front page?
Post by: Zugluk on May 17, 2008, 02:49:48 PM
thank you.. and sorry if that seemed like "major bumping" because I wasn't trying to be.
Title: Re: disable avatar on front page?
Post by: G6Cad on May 17, 2008, 03:20:52 PM
Dit the answer help you and solve what you needed ?
Title: Re: disable avatar on front page?
Post by: Zugluk on May 18, 2008, 03:30:08 AM
yes this fixed my issue thanks raid and sorry again G6 I promise i'm not a mad bumping nazi scum :P
Title: Re: disable avatar on front page?
Post by: G6Cad on May 18, 2008, 08:24:37 AM
It's OK  ;D