News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Additional Avatar Permissions

Started by Oldiesmann, May 13, 2005, 05:52:48 PM

Previous topic - Next topic

Oldiesmann

Link to Mod

This mod adds two more avatar-related permissions to SMF:

profile_avatar_allow ("Can use avatars") - controls whether users in that group can use avatars at all.

profile_avatar_upload ("Can upload their own avatar") - controls whether or not the "upload avatar" feature is available to that group.

This allows you to do the following:
Disable avatars on a group-by-group basis
Specify which avatar options are available to which groups.

Note: These permissions work alongside the existing settings in the "Avatars" section of the "Edit Features and Options" area. If you don't have a particular avatar option enabled, it won't be available to anyone, regardless of what the permissions say. See the included readme for more information.
Michael Eshom
Christian Metal Fans

Miraenda

Sounds like a great mod Oldiesmann

diva_uno

Oldiesmann

You are super-dee-duper!!!
Thank you soo much for hearing my plea!
:D

diva_uno

Added this to my board...
I have the permissions on disallow for the groups I'm disallowing. And allow for the others.
However if I click on "Forum Profile Information" under the profile section and I'm not logged in as the Admin... I recieve this error at the bottom of the page.

An Error Has Occurred!
implode(): Bad arguments.


But upload does not show up for the groups that are disallowed...so that works. However...I will have to ask some of my members to check that out...because I only have 2 accounts I can test that out on. A newbie account...and a Sr. Member account that is the second admin which I turned off to test.

Oldiesmann

That's really weird. The implode() there is the thing that loads all the server-stored avatars. The only thing I did there was replaced a line to tell it whether or not to show that. If they don't have permission to use avatars, they shouldn't see anything there. I'm not sure why you'd be getting that.
Michael Eshom
Christian Metal Fans

diva_uno

Oh...
Yeah...
The avatars that are saved on the server don't show up to chose one of those...

Oldiesmann

Admin -> Edit Permissions

Check the box next to each membergroup, and select "Choose an avatar ()" next to "Add permission..." (either one of those options should set it), and click "Set Permissions!". I am not sure why "Choose an avatar" is showing up twice or why there is missing text there. I will look more into this later and release an update as soon as I fix the problem (the update will also ensure that the permission is enabled by default).
Michael Eshom
Christian Metal Fans

Oldiesmann

Ok. I looked over the mod and located the source of the bug. Turns out I mis-read something and thought that one section was setting default permissions, when it was actually specifying whether each permission was a single one or an "any/own" permission, so I accidentally set that one to an "any/own" instead of a single one. I am working on an upgrade and will upload it shortly.
Michael Eshom
Christian Metal Fans

Oldiesmann

Update released. Just download it again and it will upgrade for you. This will also set the "Can choose avatar" permission to "Allow" for all non-post-based groups (including "ungrouped members"). You will still have to set the permission to upload avatars for each group.
Michael Eshom
Christian Metal Fans

robone

I should have come back to this forum. I have been having the same problem. The only person who could upload avatars was me (admin). I will update tonight and see. Does the update automatically update or must I uninstall the previous version?

robone

Well I did what you suggested and there was an error (failure) on one of the mdifications when installing the Mod 1.01 but I continued anyway, however it still did not work and the same problems are still happening as were happening with the previous version.

I then tried to uninstall it so I could install it cleanly and I get the following:

Type     Action     Description
1.    Execute Modification    ./Sources/ManagePermissions.php    Failure
2.    Execute Modification    ./Sources/Profile.php    Failure
3.    Execute Modification    ./Themes/default/Profile.template.php    Success
4.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Failure

So I never continued with the unistall

Help!!!!

Oldiesmann

Hmmm... Not sure why the upgrade wasn't working, but I fixed the problem. I also noticed that I forgot to include the new step to automatically enable the "can use avatars" permission (you will still have to set the "Can upload their own avatar?" permission yourself), and added that to the upgrade. Try it now.
Michael Eshom
Christian Metal Fans

robone

At the moment I have to leave the forum alone, because I am going away tomorrow for 2 weeks.

As administrator I can upload pics for the groups I have given permissions to, so if they want they will have to email me the avatar they want and I wil have to upload. But no one else can access the SMF avatars.

Also I actually don't quite understand what you are asking me to do so I will rather leave it alone for the moment and while I am away, maybe someone else can resolve this

robone

#13
These are the errors shown in the error log when I go "edit features and options" and only have a look. Not trying to change anything

log 1

8: Undefined index: permissionname_profile_use_avatar_own
File: ..........................................................................forum/Sources/ManagePermissions.php
Line: 1098

log 2

8: Undefined index: permissionname_profile_use_avatar_any
File: ............................................................................forum/Sources/ManagePermissions.php
Line: 1102

Thanks

diva_uno

I got it to work! You just need to edit the permissions to allow for "choose an avatar" and "choose a remotely stored avatar". And then disallow for "Can upload their own avatar?". The upload option appears when they go to their profile and choose Forum Profile Information to choose an avatar. But it they try to upload something it just doesn't upload.

I know I might recieve some messages something is wrong because they can't upload an avatar so this is something I'm going to have to announce.

Thanks again Oldiesmann

robone

Sorry, but I only want them to upload there own avatar, so I need to get this to work

Oldiesmann

Set "Can use a remote avatar" to "disallow" and the other two to "allow". They will still be able to use a server-stored avatar unless you completely disable that for everyone (I don't see any point in having a permission to not allow that). And it shouldn't even show an upload box if they can't upload their own avatar, unless I'm completely missing something.
Michael Eshom
Christian Metal Fans

robone

#17
Okay I have done that but I am still getting errors such as:

8: Undefined index: permissionname_profile_use_avatar_own
File: ..............................................................forum/Sources/ManagePermissions.php
Line: 1098

and the errors logged when a member wants to change their avatar is:

8: Undefined index: avatar_list
File: ................................................................forum/Themes/default/Profile.template.php (eval?)
Line: 1018

Now...what I think I have to do is uninstall and re install again, but then I look at my errors produced when I try and uninstall ...see post of 18th....do you think I can just continue and unistall.

Oldiesmann

Just re-upload Sources/ManagePermissions.php, Sources/Profile.php and Themes/default/Modifications.english.php, delete the list of installed mods (Admin -> Package Manager -> View and Delete Installed Packages -> Delete Mod List). Of course, this is assuming that the Additional Avatar Permissions mod is the only mod you have installed.
Michael Eshom
Christian Metal Fans

robone

#19
Thanks, but unfortunately it is not, so That I cannot do. Maybe you could tell me what I have to do to manually correct those errors that are occuring at the various lines.

I think when I installed this mod, it probably does not take into account the fact that I did have other mods installed and that is why I have errors at lthose lines occuring.

I am not complaining, not much anyway :) , but I would like to resolve this and use this mod. I have 3 other mods installed and I never had any problems with them.

Just for interest they are:

ultimate shout mod
online users today mod
integrated chat mod

Thanks


Advertisement: