[TH] Join User Group [Deleted]

PHP:
$waindigo = XenForo_DataWriter::create('Waindigo_JoinUserGroup_Model_JoinableUserGroup');
Although this line will work and shouldn't cause any issues, the correct thing to do would be to use the create function of XenForo_Model (not XenForo_DataWriter), as in my first reply.
 
I'm using the 'Join User Group' addon to allow my forum members to join a NSFW (not-safe-for-work) subforum. I like the option of a checkbox in the user's account section, which seems quite nice.

However, I'd like to make a standalone webpage where users can click a button, and be opted in. To clarify, I'm going to make a warning page that warns the user that they're entering the NSFW (18+) subforum, and will need to opt-in in order to see it. How can I make a button that will add them to the user group?

If you can share some snippets of code, that would really help :)
 
I'm using the 'Join User Group' addon to allow my forum members to join a NSFW (not-safe-for-work) subforum. I like the option of a checkbox in the user's account section, which seems quite nice.

However, I'd like to make a standalone webpage where users can click a button, and be opted in. To clarify, I'm going to make a warning page that warns the user that they're entering the NSFW (18+) subforum, and will need to opt-in in order to see it. How can I make a button that will add them to the user group?

If you can share some snippets of code, that would really help :)
You can make the button as follows (inside a template):
HTML:
<xen:require js="js/waindigo/joinusergroup/join_user_group.js" />
<form method="post" action="{xen:link account/join-user-groups-save}" class="AutoValidator JoinUserGroupForm">
<input type="hidden" name="joined[]" value="USER_GROUP_ID" />
<input type="submit" name="save" value="Join User Group" class="button primary" />
<input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
</form>
replacing USER_GROUP_ID with the ID of the User Group.

Similar to the add-on, there is minimal user feedback with the above code (i.e., the page doesn't refresh or anything like that). You could probably make some changes to the above JavaScript to get it to redirect instead.

I would suggest creating a new Javascript file (which you can then link to by changing the first line of the above code), copying and pasting the code from js/waindigo/joinusergroup/full/join_user_group.js and replacing the code inside the AutoValidationComplete: function(e) { ... } with something like:
Code:
AutoValidationComplete: function(e) {
    e.preventDefault();
    window.location.href = "http://waindigo.com";
}

I've not actually tested it and this was one of the first add-ons I made so the coding is not so great, but hopefully this will get it to do what you want to do.
 
Because the add-on allows for multiple user groups to be joined in one go, it would probably need a full re-design to do this properly.
Is there any way for a user to remove themselves from the usergroup? If not, are you planning to add this to a new version? It only seems to make sense for a user to be able to willingly leave, should they be able to willingly join.
 
Is there any way for a user to remove themselves from the usergroup? If not, are you planning to add this to a new version? It only seems to make sense for a user to be able to willingly leave, should they be able to willingly join.
This is already possible. The form is a list of checkboxes, so a user can just as easily uncheck a checked box to leave a usergroup.
 
Is there anyway to make the moderator only view the moderation request for the usergroup alone and not moderation for threads/posts/etc or reported posts.

The reason for this is I want to use it in the form of giving it to trusted members who are essentially "leaders" of the groups but not staff themselves.
 
Is there anyway to make the moderator only view the moderation request for the usergroup alone and not moderation for threads/posts/etc or reported posts.

The reason for this is I want to use it in the form of giving it to trusted members who are essentially "leaders" of the groups but not staff themselves.
Yes, you should be able to do this.
 
Yes, you should be able to do this.

I'm sorry but I can't seem to find any options to do this. I even tried it on a test install and the test account I made seems to have access to the aforementioned areas although it's just a simple registered member.
 
I'm sorry but I can't seem to find any options to do this. I even tried it on a test install and the test account I made seems to have access to the aforementioned areas although it's just a simple registered member.
Not sure why you are having trouble. You don't have to do anything special.

Take a normal user who is not a moderator and make them a 'Joinable User Group Moderator' by going to Admin CP -> Moderators -> Create New Moderator and selecting the appropriate options. As long as you don't tick any of the boxes on the next page, you won't give them any extra moderator permissions. The only thing they will be able to do extra is approve requests to join the user group that you set them as moderator of.
 
Not sure why you are having trouble. You don't have to do anything special.

Take a normal user who is not a moderator and make them a 'Joinable User Group Moderator' by going to Admin CP -> Moderators -> Create New Moderator and selecting the appropriate options. As long as you don't tick any of the boxes on the next page, you won't give them any extra moderator permissions. The only thing they will be able to do extra is approve requests to join the user group that you set them as moderator of.

Okay I just rechecked everything, made a few reports and realized that xenMedio videos are viewable in the moderation queue and you have access to the options. Reports are not viewable but the said member can see the option even though they're is nothing to see. I did not try other moderation items such as blogs and threads. I will check them and report back.

Also I correctly did add the user as per your instructions. If you want I can send you my test install details.
 
Okay I just rechecked everything, made a few reports and realized that xenMedio videos are viewable in the moderation queue and you have access to the options. Reports are not viewable but the said member can see the option even though they're is nothing to see. I did not try other moderation items such as blogs and threads. I will check them and report back.

Also I correctly did add the user as per your instructions. If you want I can send you my test install details.
Sure, feel free to PM me your test install details.

Sounds like it could be an incompatibility/bug with XenMedio though.
 
Are xenmedio moderation permissions assigned to the entire usergroup in the usergroup permissions?

I don't use xenmedio, but the way Jon is describing the permissions is the way it works for me. You can have users that have 'moderation' privileges over the membership of that particular group, while other people have moderation rights over posts/threads/etc
 
Can you be more specific?
The mod can join the usergroup that he is assigned to approve. The noob can apply for the usergroup that he applies for. After the mod approves the noob, the noob is in the usergroup and he is not added to the usergroup as a secondary usergroup, even though the mod was.
 
Getting an "An unexpected error occurred. Please try again later."

PHP:
An exception occurred: include(/home/heroes/public_html/kainengunited.net/library/XenForo/Route/PrefixAdmin/Moderators.php) [<a href='function.include'>function.include</a>]: failed to open stream: Permission denied in /home/heroes/public_html/kainengunited.net/library/XenForo/Autoloader.php on line 119
XenForo_Application::handlePhpError() in XenForo/Autoloader.php at line 119
XenForo_Autoloader::autoload() in XenForo/Autoloader.php at line 119
XenForo_Autoloader->autoload() in XenForo/Application.php at line 858
XenForo_Application::autoload() in XenForo/Route/Prefix.php at line 81
XenForo_Route_Prefix->_loadAndRunSubRule() in XenForo/Route/Prefix.php at line 66
XenForo_Route_Prefix->match() in XenForo/Router.php at line 61
XenForo_Router->match() in XenForo/Dependencies/Admin.php at line 68
XenForo_Dependencies_Admin->route() in XenForo/FrontController.php at line 261
XenForo_FrontController->route() in XenForo/FrontController.php at line 128
XenForo_FrontController->run() in /home/heroes/public_html/kainengunited.net/admin.php at line 13
 
Getting an "An unexpected error occurred. Please try again later."

PHP:
An exception occurred: include(/home/heroes/public_html/kainengunited.net/library/XenForo/Route/PrefixAdmin/Moderators.php) [<a href='function.include'>function.include</a>]: failed to open stream: Permission denied in /home/heroes/public_html/kainengunited.net/library/XenForo/Autoloader.php on line 119
XenForo_Application::handlePhpError() in XenForo/Autoloader.php at line 119
XenForo_Autoloader::autoload() in XenForo/Autoloader.php at line 119
XenForo_Autoloader->autoload() in XenForo/Application.php at line 858
XenForo_Application::autoload() in XenForo/Route/Prefix.php at line 81
XenForo_Route_Prefix->_loadAndRunSubRule() in XenForo/Route/Prefix.php at line 66
XenForo_Route_Prefix->match() in XenForo/Router.php at line 61
XenForo_Router->match() in XenForo/Dependencies/Admin.php at line 68
XenForo_Dependencies_Admin->route() in XenForo/FrontController.php at line 261
XenForo_FrontController->route() in XenForo/FrontController.php at line 128
XenForo_FrontController->run() in /home/heroes/public_html/kainengunited.net/admin.php at line 13
This looks like some sort of permission issue with your XenForo installation, nothing to do with this add-on. I suggest opening a ticket with XenForo support or posting in the general support forum.
 
Top Bottom