Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Icon size in the topic view
Avatar
Alex T
Member
sp_UserOfflineSmall Offline
Dec 14, 2015 - 10:32 am

How can I change the icon (I have the user's avatars there instead) to be the full size of the spacing the column?

For instance:

I want this to look like this:

I want that icon to be the full size of that available box.  

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Dec 14, 2015 - 10:40 am

Hey Alex,

I'm not sure this is ever going to be 100% achievable.. The reason I say that is the entire forum row height is dependant on the content - for example multiple lines of text and multiple status icons could push the forum row height taller than that of your avatar.

Either way there's two things you can do. Number one is to remove the padding from the first column, something like:

#spMainContainer .spForumTopicSection .spIconColumnSection {
    margin: 0;
}

That alone should do what you want it to. I'm fairly sure you have a child theme in place from memory - just add the above to the end of your child theme stylesheet.

The other thing you could do to try and make sure the avatar always reaches the edge of the column top and bottom would be to increase the size of the avatar itself, although I understand that is probably not a desirable fix.

Give the CSS fix a try and see how it works for you.

Avatar
Alex T
Member
sp_UserOfflineSmall Offline
Dec 14, 2015 - 10:43 am

Ike said
Hey Alex,

I'm not sure this is ever going to be 100% achievable.. The reason I say that is the entire forum row height is dependant on the content - for example multiple lines of text and multiple status icons could push the forum row height taller than that of your avatar.

Either way there's two things you can do. Number one is to remove the padding from the first column, something like:

<br />

#spMainContainer .spForumTopicSection .spIconColumnSection {
    margin: 0;
}

<br />

That alone should do what you want it to. I'm fairly sure you have a child theme in place from memory - just add the above to the end of your child theme stylesheet.

The other thing you could do to try and make sure the avatar always reaches the edge of the column top and bottom would be to increase the size of the avatar itself, although I understand that is probably not a desirable fix.

Give the CSS fix a try and see how it works for you.

Yea, I know that this sizing changes due to the what's included.  I was hoping that there is way to automatically change that icon to fit in somehow...  

I'm going to try and add this now.  

Avatar
Alex T
Member
sp_UserOfflineSmall Offline
Dec 14, 2015 - 11:08 am

It works but looks a little off due to sizing.  If I wanted to change the icon size there to compensate, let's say 70px, what would I add?  Here's what the code looks like in the forumviewdesktop template.

# Column 1 of the topic row
# ----------------------------------------------------------------------
sp_ColumnStart('tagId=spColForum1&tagClass=spIconColumnSection spLeft&width=0&height=0px');
/*sp_TopicIndexIcon('tagClass=spRowIcon spLeft');*/
sp_UserAvatar('tagClass=spRowIcon spLeft&context=user', $spThisTopic->first_user_id);
sp_ColumnEnd();
sp_InsertBreak('tagClass=groupBreak');

# Column 2 of the topic row

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Dec 14, 2015 - 11:19 am

Try adding:

#spMainContainer .spForumTopicSection .spIconColumnSection .spRowIcon {
    width: 70px;
}

The biggest problem here is that the columns are all sized by percentages. If you were to automatically change the height of an icon to fit whatever column height is availalbe, maintaining aspect ratio the width would also change, which would in turn change every column after that making that row appear out of line with all the others.

Avatar
Alex T
Member
sp_UserOfflineSmall Offline
Dec 14, 2015 - 11:30 am

How can I force all the avatars there to scale to 75px even if they are 50px?  75px seems to be the best size to fill that area.

I have the images changes in topicview per this thread: https://simple-press.com/suppo.....opic-view/

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 14, 2015 - 11:40 am

It might depend on the source of the avatars.

In the forum admin > profiles > avatars you can set the maximum size but that probably only applies to gravatars and the like. Uploaded avatars will almost certainly show smaller if they are, indeed, smaller.

But give that a try first. You may need to change the template call for avatars to really force it. You will need a child theme for that.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Alex T
Member
sp_UserOfflineSmall Offline
Dec 14, 2015 - 11:41 am

I changed this in the template:

sp_ColumnStart('tagId=spColForum1&tagClass=spIconColumnSection spLeft&width=0&height=0px');
/*sp_TopicIndexIcon('tagClass=spRowIcon spLeft');*/
sp_UserAvatar('tagClass=spRowIcon spLeft&context=user&size=75px', $spThisTopic->first_user_id);
sp_ColumnEnd();
sp_InsertBreak('tagClass=groupBreak');

# Column 2 of the topic row

I added the user&size=75px, but this will only change the avatars there to the larger size only if they are already larger than the 50px.  I can't figure out how to make the rest to scale to 75px.  

Avatar
Alex T
Member
sp_UserOfflineSmall Offline
Dec 14, 2015 - 11:52 am

I tried adding this css rule after I added the rule up above in the template, but it didn't work.  I guess I don't have the rule correctly specified.  

#spMainContainer .spForumTopicSection .spPostUserAvatar img { 
 width: 75px; 
}
Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Dec 14, 2015 - 2:58 pm

Did you try adding the CSS I posted up there in Post #5?

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626