[TH] Join User Group [Deleted]

Any chance this add-on will be ported to XF2?
Some new news about the porting to xf2?
his will be one of my required addons before migrating to XF2.
I already installed XF2, this is a must have and I hope it gets ported to XF2 soon.
Guys any chance that this addon will be available for XF2?
I would really love to have this addon for XenForo 2, is it in the works?
Hello can we help pay for it to go faster?
Would pay good money for a 2.0 version of this
lso looking forward to seeing this in 2.0
This is the one feature holding back my upgrade to XF2 as well.
I might look into porting this to 2.0

Just to keep everyone in the loop:

They told me the are porting this one to XF2

And this:

No official ETA on when this add-on will be completed or released, we will keep everyone updated.

@Dalton Prock any way you can give us an ETA on completion and release?
 
I can repriduce this error:
ErrorException: Missing argument 2 for ThemeHouse_JoinUserGroup_Model_JoinableUserGroup::approveModerationQueueEntry(), called in /.../forum/library/ThemeHouse/JoinUserGroup/Extend/XenForo/ControllerPublic/Account.php on line 107 and defined - library/ThemeHouse/JoinUserGroup/Model/JoinableUserGroup.php:282


  1. A new user has to join a group;
  2. Go to the list of users => the last username is now uncecked
  3. Check this checkbox, send => error

If i work with ready checked users, i can save the list.

Solution for me: Use moderation queue to approve new users;
then work with the list.

Something is different between an approved user and and new joined user, i guess.
It is not in the html.
 
There is a second problem, i have changed the template to see it with adding $i to the loop

I have something like

  1. Checked Name1
  2. Checked Name2
  3. Checked Name3
  4. Checked Name4
  5. Checked Name5

Now i uncheck Name3;
the next page shows me now

  1. Checked Name1
  2. Checked Name2
  3. Unchecked Name4
  4. Checked Name5

If i reload the page from the Link to groups, i get
  1. Checked Name1
  2. Checked Name2
  3. Checked Name4
  4. Checked Name5


If you delete more than one and dont watch the result, chose some more and send again you will delete a lot of users you dont want.
 
That is what i found out:

if ($joinableUserGroupModel->approveModerationQueueEntry($moderationQueue[$userId])) {

is called with one var?

// public function approveModerationQueueEntry($contentId, $customFields)
public function approveModerationQueueEntry($contentId)
{

Wants to have two vars? So i changed it. But then

if ($customFields) {
/* @var $writer XenForo_DataWriter_User */
$writer = XenForo_DataWriter::create('XenForo_DataWriter_User');
$writer->setExistingData($joinRequest['user_id']);
$writer->setCustomFields($customFields);
$writer->save();
}

will not happen.


Next idea:
When i define a group as joinable, i can add fields that are necessary to have.
When i join i see this fields (twitter for example); probably this is our custom field to save.
But if we dont have any input for a field, the error will happen.
 
I tried it with the need of a field twitter.
I set a join request and filled the field for twitter => i got a value for twitter in my profile.
But the error missing 2 argument, is still here.
 
I comment here
// public function approveModerationQueueEntry($contentId, $customFields)
public function approveModerationQueueEntry($contentId)
{

and also comment this
/*
if ($customFields) {
/* @var $writer XenForo_DataWriter_User */
$writer = XenForo_DataWriter::create('XenForo_DataWriter_User');
$writer->setExistingData($joinRequest['user_id']);
$writer->setCustomFields($customFields);
$writer->save();
}
*/

Any input from the join form for custom fields is still saved. So i dont understand why we need this here.
 
Another miracle.
In acp i have 27 users in a group "special", but the page account/join-user-groups shows only 20.
If i open a missing userid in acp and just save it without any changes, then this user will be on the list also.
 
I have compared two users, both have the same data,
both are reg. users and have group 11 as sec. group.
But only one is shown in the list for joined users.

If i save the the missing user in the acp, it will apear at the list of joined users.
 
Found the next thing:

A user can be member of group x, and will not be seen at the list of joined users from the addon, when there is no:

xf_user_group_change with ugJoin for that userid.


This means that we have different status for a user,
when it is promoted for example.

When saved in acp, the ugJoin seems to be saved.


Ok.
 
Ok, next thing

The users on the joined page come from here

public function getJoinedUserGroupsByUserId($userId)
{
$userGroupChanges = $this->_getUserModel()->getUserGroupChangesForUser($userId);
$joined = array();
if (isset($userGroupChanges['ugJoin'])) {
$joined = explode(",", $userGroupChanges['ugJoin']);
}
return $joined;
}


But i still cant find the place to sort the first part of the list by name; sorted by userid makes no sense with a big list.
The same problem is with many users and many groups, so every group needs an own page with pagination and the new ones at the first page at the top.
 
My solution so far:

1.
// public function approveModerationQueueEntry($contentId, $customFields)
public function approveModerationQueueEntry($contentId)

2. Approve only witht the Queue, never with the list!

3. If using the list to delete an user, klick "Groups" again! Dont reload, dont send it without knowing what you do.

4. With an $i in the foreach you can count the users; if these number is different than the number in a search with the acp, then try to open and save the users in the acp to produce an INSERT in the group_change_table.

The only important thing i miss now, is to sort the array of names before passing it to the template.

I have more ideas, but it takes too much time for me, while TH should need only an hour or two to improve this addon with many nice things like

sort by name
show one page for every group
have pagination on this pages
correct the errors
 
Top Bottom