Special Avatar for Banned Members

Special Avatar for Banned Members 1.3.10

No permission to download
I'm using the XF default style and that's the only style available on my forum. On that style I have configured the path to images to styles/mystyle

The good: in the front-end your add-on is reading avatar files from styles/mystyle/xenforo/avatars

The bad (?): on the sitemap files, your add-on is declaring that every banned member has an avatar located at styles/default/xenforo/avatars i.e. not honoring the image path declared for the default and only style available on my site.

I guess that it's working as expected because in case I had many styles to prevent confusion then in the sitemap files (not in the front-end) your add-on is always going to read the avatar files from the default style?

And as a side note, is it a good idea to declare on the sitemaps the avatar for banned people? Or maybe you should just not declare the avatar files for banned members?
 
Banned users shouldn't be in the sitemap at all on the basis that guests can't view banned user profiles. My add-on makes no changes to the sitemap system.
 
Hi there,

I uploaded the files and when trying to use the .XML to install it returns the following if you can help.

Callback BannedAvatar_Listener::init is invalid (Invalid Class).

Thanks
 
That usually suggests the files haven't been uploaded or they haven't been uploaded to the correct location.
 
That usually suggests the files haven't been uploaded or they haven't been uploaded to the correct location.

Hmm not sure what happened, the files were all correctly uploaded, I went through and checked and against the file sizes etc, deleted the folders and uploaded again and it worked, thanks anyway!
 
It works fine.

However, your avatar path is likely different from that of the default style so you would need to copy the files from the download that are in styles\default\xenforo\avatars to whatever the avatar path of your style is.
 
It shows in the ACP that the avatar is working. But on the profile it self it is broken. So I have no idea how to fix this.
 
Yeah, that sounds right.

The Admin CP is based on the default style, therefore the avatar path would be styles/default/xenforo/avatars. You will have uploaded the banned avatars to that path when you installed the add-on.

Your forum style has likely specified a custom path for avatars, something like styles/<custom style name>/xenforo/avatars.

You need to copy the banned avatars into that folder for it work properly.
 
BTW, Extra... I want to change the image, do I just replace the files with new images and keep same names? Here is the image, it is a gif, so would I have to edit anything? If so, where and what do I edit.
s_tbagjx8.gif
 
Is the Admin able to select 'which' usergroup is to be considered banned? I ask, because on vB I used this MOD to declare my bounced-email usergroup as 'banned' and then automatically applied a defunct email avatar to them. So wondering if such is possible in XF?

Screen Shot 2015-08-30 at 1.21.40 AM.webp
 
Last edited:
No. Banned users are not a user group. Banned users are signified by the is_banned flag in the xf_user table.

Email bounce users are also not added to a user group, but they are clearly notified about the bounce status and are blocked from using the forum until it is resolved properly. Email bounce users are signifies by the email_bounce user_state.

This add on could probably be modified to work on the user_state as well as the is_banned flag, but it's not something I've got the time to look at at the moment.

Most of the code that does the avatar in the add on is in the Core.php file (I think).
 
Hi, I recently upgraded to Xenfocus style and it seems like the PAGE_CONTAINER template is outdated. I tried to merge the changes but it said I need to do it manually. Because of this when I ban users it doesn't show the special avatar.

@Chris D Did I do something wrong?
 
My add on shouldn't be affected by that.

But you may need to copy the avatar files out of the default image path to the xenfocus image path.

If you look in the download package it is the files in styles/default which would need to be copied over to your new style.
 
I explained what to do. You need to copy these 3 files (the ones from the download package)

styles/default/xenforo/avatars/avatar_banned_l.png
styles/default/xenforo/avatars/avatar_banned_m.png
styles/default/xenforo/avatars/avatar_banned_s.png

To:

styles/infinite/xenforo/avatars
 
Top Bottom