Customizing SMF > Modifications and Packages
Subaccounts
Goss:
So, I have my memberlist modified so that it does not display members from one particular group. It is a group of inactive members. However, there are also subaccounts in this inactive group. The inactive subaccounts are still listed under each active primary account. I want to remove the display of all subaccounts in this 'inactive' group from the memberlist. Does anybody have an idea of how I can do this?
This is one of the queries I modified to remove the display of all members in the "inactive" group.
--- Code: ---$request = $smcFunc['db_query']('', '
SELECT mem.id_member
FROM {db_prefix}members AS mem' . ($_REQUEST['sort'] === 'is_online' ? '
LEFT JOIN {db_prefix}log_online AS lo ON (lo.id_member = mem.id_member)' : '') . ($_REQUEST['sort'] === 'id_group' ? '
LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = CASE WHEN mem.id_group = {int:regular_id_group} THEN mem.id_post_group ELSE mem.id_group END)' : '') . '
LEFT JOIN {db_prefix}subaccounts AS sub ON (sub.id_member = mem.id_member)
WHERE mem.is_activated = {int:is_activated}' . (empty($where) ? '' : '
AND ' . $where) . '
AND sub.id_member IS NULL
AND mem.id_group != 22
ORDER BY {raw:sort}
LIMIT ' . $limit . ', ' . $modSettings['defaultMaxMembers'],
$query_parameters
);
--- End code ---
I added "mem.id_group != 22" to the where statement to remove the display of all members who are in membergroup ID 22
I tried modifying all of these:
--- Code: ---LEFT JOIN {db_prefix}subaccounts AS sub ON (sub.id_member = mem.id_member)
--- End code ---
To this:
--- Code: ---LEFT JOIN {db_prefix}subaccounts AS sub ON (sub.id_member = mem.id_member AND mem.id_group != 22)
--- End code ---
I had hoped that would remove the display of inactive subaccounts, but it didn't work.
Any ideas?
FireDitto:
Ugh.
I deleted a Parent account without removing the Subaccount; I don't want to delete the Sub, they get reassigned to the NPC Account (RPG forum) but because it no longer has a parent, I am unable to turn it on to share in order to re-assign it.
How can I reassign it??
Thanks ><
Yudd:
Hi,
I'm using the sub-accounts mod for SMF 2.0.2 and it works fantastically. That is, until it reaches the portal page (home page). If I try to switch an account from there, a "Not Found" error appears and I press back or go to the forum itself, the account is switched. So the issue is just that when I switch accounts from the portal, it shows the error and I'm not that SMF-savvy (in fact, I'm probably the least now that I've forgotten how to do anything), so I don't know why that is.
Here's copy of the message itself:
"Not Found
The requested URL /action=forum was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."
What could be done to fix it?
Yoshi:
It's missing the index.php? Part, stuff a ? Right before action=
Yudd:
--- Quote from: Yoshi2889 on September 16, 2012, 04:36:21 AM ---It's missing the index.php? Part, stuff a ? Right before action=
--- End quote ---
Okay, how can I do that? And would I do it like: http://sitelink.net/index.php?action=forum? [nofollow] Would that solve the issue of trying to switch sub-accounts on the index page?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version