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
Avatars in topic view
Avatar
Alex T
Member
sp_UserOfflineSmall Offline
Oct 21, 2015 - 9:31 am

Ike said

So if you wanted to force 80 x 80px avatars in topic view, you would still need to add the CSS rule I posted before changing the width of .spPostUserAvatar img to 80px, you just don't need to add the max-width CSS rule to the stylesheet.

And yes this will only affect topic view, everything posted in this topic so far has been topic view specific so you will retain the size constraints elsewhere.

So like this:

#spMainContainer .spTopicPostSection .spPostUserAvatar img {     max-width:  !important;     width: 80px; }
Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Oct 21, 2015 - 10:27 am

No, you don't need the max-width rule at all since it's now defined by the template function 'size' argument.. All you'd need is -

#spMainContainer .spTopicPostSection .spPostUserAvatar img {     
    width: 80px; 
}
Avatar
Alex T
Member
sp_UserOfflineSmall Offline
Oct 21, 2015 - 11:38 am

So I changed in reboot.php this:

#spMainContainer .spTopicPostSection .spPostUserAvatar img { 
 width: 100px; 
}

and then in sptopicview this:

sp_UserAvatar('tagClass=spPostUserAvatar spCenter&context=user&size=100px', $spThisPostUser);

Yet it will not force the avatars to scale.  Only the ones which were already larger are scaling.  

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Oct 21, 2015 - 11:59 am

It definitely works as it's the way I did it locally to make sure before posting the fix.

I assume were talking about the website your email is associated with (from your profile popup here).

I had a quick look and I can see the 100px rule in-line.

Inspecting the avatar though, the only rule I see is the standard Reboot 'margin: auto;' rule which is the only CSS applied to the avatar as standard.

So, where exactly did you put your code? It looks like the only stylesheet loaded is reboot.php from the reboot folder, so if you are running a child theme I'm not seeing the code loaded at all.

Avatar
Alex T
Member
sp_UserOfflineSmall Offline
Oct 21, 2015 - 12:13 pm

Ike said
It definitely works as it's the way I did it locally to make sure before posting the fix.

I assume were talking about the website your email is associated with (from your profile popup here).

I had a quick look and I can see the 100px rule in-line.

Inspecting the avatar though, the only rule I see is the standard Reboot 'margin: auto;' rule which is the only CSS applied to the avatar as standard.

So, where exactly did you put your code? It looks like the only stylesheet loaded is reboot.php from the reboot folder, so if you are running a child theme I'm not seeing the code loaded at all.

The child theme is there.  I have used it for a while now, as you can see from the mods to reboot.  I changed it in reboot.php (child) and in sptopicview for desktop (child).  

Here are the screenshots:

child.pngImage Enlarger

 reboot-1.pngImage Enlarger

sptopicview.pngImage Enlarger

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Oct 21, 2015 - 12:20 pm

Yes that's all OK, but my point was if you are running a child theme I'm not seeing it loaded for that specific rule..

So where did you put the code:

#spMainContainer .spTopicPostSection .spPostUserAvatar img {  width: 100px; }

 I.e what file, where in the file, and could you post an excerpt of it or a screenshot?

Avatar
Alex T
Member
sp_UserOfflineSmall Offline
Oct 21, 2015 - 12:33 pm

Ike said
Yes that's all OK, but my point was if you are running a child theme I'm not seeing it loaded for that specific rule..

So where did you put the code:

 

#spMainContainer .spTopicPostSection .spPostUserAvatar img {  width: 100px; }

 

 I.e what file, where in the file, and could you post an excerpt of it or a screenshot?

That's in Reboot.php.  It's in the screenshot above. 

 

Here is what it looks like in the code:

#spMainContainer .spTopicPostSection .spPostUserRank img,
#spMainContainer .spTopicPostSection .spPostUserSpecialRank img {
margin: auto;
}

#spMainContainer .spTopicPostSection .spPostUserAvatar img {
width: 100px;
}

#spMainContainer .spTopicPostSection .spPostUserWebsite img,
#spMainContainer .spTopicPostSection .spPostUserTwitter img,

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Oct 21, 2015 - 2:41 pm

That is strange.. Just repeated the process and works fine locally.

Could you try adding it to the end of the parent themes stylesheet?

Avatar
Alex T
Member
sp_UserOfflineSmall Offline
Oct 21, 2015 - 3:35 pm

Ike said
That is strange.. Just repeated the process and works fine locally.

Could you try adding it to the end of the parent themes stylesheet?

I noticed that it won't scale when it is hosted locally (uploaded directly), but it does work if it is hosted somewhere else?  I used the same file and had it uploaded direct from the profile section=does not scale.  When I uploaded it to WP and entered it into the remote area, it scales it correctly.  

Avatar
Alex T
Member
sp_UserOfflineSmall Offline
Oct 21, 2015 - 3:50 pm

Nevermind what I just typed.  I forgot I had saved it as a 100 x 100 png, instead of the 50 x 50 one.  

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: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625