XF 2.2 Avatar (well images really) Square not Round in only a Sub-Forum

alexm

Active member
Hi,

I have sub-forums containing Classifieds (for sale) posts and I’m using an Add-on that uses images they have attached rather than their avatar for those forums. The problem is it at the moment every avatar/image is round and I think it would be better square for Classifieds forums.

Is there any way you can change them to square images in Classfieds forums only?

thanks,

Alex
 
Solution
Untested but this added to the extra.less template should work.
Less:
[data-container-key="node-1"],
[data-container-key="node-2"],
[data-container-key="node-3"]
{
    .avatar
    {
        border-radius: 0;
    }
}

Change the 1, 2, 3, etc. to the actual node IDs.

If the add-on is not using the avatar class then you will need to identify what it is using.
F12 and the Console tab will do that.

Brogan

XenForo moderator
Staff member
Untested but this added to the extra.less template should work.
Less:
[data-container-key="node-1"],
[data-container-key="node-2"],
[data-container-key="node-3"]
{
    .avatar
    {
        border-radius: 0;
    }
}

Change the 1, 2, 3, etc. to the actual node IDs.

If the add-on is not using the avatar class then you will need to identify what it is using.
F12 and the Console tab will do that.
 
Solution

alexm

Active member
Hi Brogan,

I tested a Classifieds and a normal forum and I couldn’t get it to turn the avatar square on either?

Am I doing it right? In extra.less
Code:
[data-container-key="35"]
{
    .avatar
    {
        border-radius: 0;
    }
}

I’ll try the console tab when I get on a proper PC... I’m on my phone in bed at the moment and couldn’t sleep! 😑

Alex
 

Brogan

XenForo moderator
Staff member
Less:
[data-container-key="node-35"]
{
    .avatar
    {
        border-radius: 0;
    }
}
Again though, it will depend whether the add-on uses the avatar class.
 

alexm

Active member
To stop the avatars from being square when the thread was open I inserted [data-template="forum_view"]:

Code:
[data-template="forum_view"][data-container-key="node-66"]
{
    .avatar
    {
        border-radius: 5%;
    }
}

(y)
 
Top