News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Subaccounts

Started by SlammedDime, November 12, 2009, 09:59:09 AM

Previous topic - Next topic

Goss

#380
Looks like the undefined index matches the member id# for subaccounts in one particular group.  I believe this is due to the fact that I modified the queries in memberlist.php to leave out this one particular membergroup (inactive members).  However, there are still inactive subaccounts in this same group, and I think that is somehow causing the error.

How can I omit the display of subaccounts from one particular group in the memberlist?

Goss

Quote from: Goss on November 18, 2011, 04:31:48 PM
Looks like the undefined index matches the member id# for subaccounts in one particular group.  I believe this is due to the fact that I modified the queries in memberlist.php to leave out this one particular membergroup (inactive members).  However, there are still inactive subaccounts in this same group, and I think that is somehow causing the error.

How can I omit the display of subaccounts from one particular group in the memberlist?

Any ideas?

Goss

Quote from: Goss on November 18, 2011, 04:31:48 PM
Looks like the undefined index matches the member id# for subaccounts in one particular group.  I believe this is due to the fact that I modified the queries in memberlist.php to leave out this one particular membergroup (inactive members).  However, there are still inactive subaccounts in this same group, and I think that is somehow causing the error.

How can I omit the display of subaccounts from one particular group in the memberlist?

I'm still wondering about this.

Telechamus

Hi, my forum version is 2.0.1, I'm wondering how to make this mod work on my version? Thanks

Sheda

Hey, seems like all i'm posting these days are all of the errors in my forum, but...

While this mod is installed, i can't visit the memberlist in the admin panel (the normal memberlist everyone can see is fine). I'm getting a blank page, but no errors in my error log. ???
Once i uninstall the mod, the problem is gone.
What could be causing it? The mod does 9 changes to memberlist.php and it could really be any of them where there is a problem. It didn't give me any installation errors and i can't remember changing anything in the code before i installed.
*very confused about this*

NanoSector

Quote from: Sheda on January 09, 2012, 03:03:28 PM
Hey, seems like all i'm posting these days are all of the errors in my forum, but...

While this mod is installed, i can't visit the memberlist in the admin panel (the normal memberlist everyone can see is fine). I'm getting a blank page, but no errors in my error log. ???
Once i uninstall the mod, the problem is gone.
What could be causing it? The mod does 9 changes to memberlist.php and it could really be any of them where there is a problem. It didn't give me any installation errors and i can't remember changing anything in the code before i installed.
*very confused about this*
This mod is made for SMF 2.0 RC4. It's no surprise it doesn't work on 2.0.2 right now.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Robert.

I agree with Yoshi. Did you try version emulation?

Sheda

Hm, no... i thought version emulation was only used to get the package manager to install it (like telling the packet: "Here, i am the version you're looking for!") and didn't have any effect on the actual code. o_o
But i'll try it, a second...

Still the same bug. :(

Sheda

Okay, by testing for a really long time, i now found out what is causing the bug. It's this part of the code:
function ManageSubAccounts($return_config = false)
{
global $context, $txt, $sourcedir;

$subActions = array(
'settings' => 'ModifySubAccountSettings',
'view' => 'ViewSubAccounts',
);

// Needed for the inline permission functions, and the settings template.
require_once($sourcedir .'/ManageSettings.php');

loadGeneralSettingParameters($subActions, 'settings');

// Load up all the tabs...
$context[$context['admin_menu_name']]['tab_data'] = array(
'title' => &$txt['managesubaccounts'],
'help' => '',
'description' => $txt['managesubaccounts_information'],
'tabs' => array(
'settings' => array(
),
'view' => array(
'label' => $txt['subaccount_view_all'],
),
),
);

// Call the right function for this sub-acton.
$subActions[$_REQUEST['sa']]();
}


The mod adds it to Manage.Members.php.
I'm not too good at coding, so i wonder if you can find any bugs in this code.

Sheda

Hm, i think i know what the problem is/was. There are two functions with the same name that do different things. After i renamed one of them, the page loaded again without problems. Weird, huh? You'd think everyone would get this bug, not just me. >__<

Anyway, i'm gonna test if the mod (as a whole) works now. ^^

Nuks

I need this mod to work on the latest SMF version as it's a main part of my forum. I managed to make it work on 2.0 then updated to 2.0.1 and 2.0.2 without any trouble. However i'll have to dig into it to adapt more things. I may, in the main time, make it working for 2.0.2 and will post it here if i'm allowed to. :)

Llyssa

I would love to see this updated for the most current version of SMF board. As it stands, I keep getting the "This mod is incompatible with your current version of SMF", which is too bad....we run an RPG board where multiple accounts are daily business, and are eagerly awaiting the update to this great modification. :)

Sheda

I don't think there's any need to update it... sure, i had to change some things, but in the end, it is now working fine on my forum. Making accounts works, account switching works, i have yet to find anything that doesn't work.
Sure, i had some trouble with this double-function (and i'm still wondering why i was the only one to get that), but after that was gone, no problems anymore. ^^
I'm running 2.0.2. Why don't you just try it as it is, instead of hoping that someone will update it someday?
Maybe we can help you, if you still have problems with it.

Esgaroth

I just this evening upgraded my forum from 1.1.6 to the 2.0.2 version and then downloaded the mod for subaccounts. Everything in the 2.0.2 upgrade works but I am not seeing the new mod for subaccounts. The "Manage Subaccounts" does not show up, even though the forum has told me that the upload of the mod was successful. I am not sure of what I need to check for next.

Any help you can offer would be greatly appreciated.

Sheda

Hm... i'll give it a shot ._."
Quote from: Esgaroth on February 07, 2012, 12:47:57 AM
I just this evening upgraded my forum from 1.1.6 to the 2.0.2 version and then downloaded the mod for subaccounts. Everything in the 2.0.2 upgrade works but I am not seeing the new mod for subaccounts. The "Manage Subaccounts" does not show up, even though the forum has told me that the upload of the mod was successful. I am not sure of what I need to check for next.
So you upgraded your forum and then uploaded this mod to your forum, but it doesn't work.
There were no errors when you installed it? (Like, it couldn't find the right data in a file or something.)
And now you don't get the "Manage Subaccounts"...where? In the Admin Menu? In the profiles? What about the "switch account"-button?

ashkir

had to manually install it for 2.0.2 works beautifully. Thanks!

FireDitto

Quote from: Mikirin on November 06, 2011, 11:23:31 PM
I'm using the Glacier Theme.
I had to manually edit the template, but there's a problem with the switch account dropdown.

How do I add in the "switch account" words in the dropdown?

I use this code;

global $context, $settings, $options, $txt, $user_info, $scripturl;


$context['subaccount_dropdown'] = '';
if (!empty($user_info['subaccounts']))
{
$context['subaccount_dropdown'] = '
<form style="display: inline; margin-left: 1em;" class="smalltext" action="' . $scripturl . '?action=switchsubaccount" method="post" name="subaccount_drop" id="subaccount_drop" enctype="multipart/form-data">
<select name="subaccount" size="1" onchange="document.subaccount_drop.submit()">
<option selected="selected">' . $txt['change_subaccount'] . '</option>';
foreach($user_info['subaccounts'] as $id => $subaccount)
$context['subaccount_dropdown'] .= '
<option value="' . $id . '">' . $subaccount['name'] . '</option>';
$context['subaccount_dropdown'] .= '
</select>
<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '" />
</form>';
}

echo $context['subaccount_dropdown'];


As a dropdown box from the TinyPortal. You need to remove the same portion of code from the default layout, otherwise it won't work at all. I can't remember where, exactly, it is found in the original code because I did it ages ago.
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Llyssa

Quotehad to manually install it for 2.0.2 works beautifully. Thanks!

Can anyone help me manually install this mod for my board? Never done a manual install for SMF before and I am afraid of screwing things up. Badly. LOL

Sheda

This mod is quite big, so... dunno, if you do not necessarily need to, i wouldn't install it manually.
For many old mods, it's enough to download the mod (before you upload it to your forum), open the package-info.xml and look for the line where it says what version it can install to. Like, in this case:
<install for="2.0 RC4">
Then change it to something like 2.0.2 or, so it will still install for future versions, something like 2.0.99 or 2.9.99.
Do the same for the <uninstall for ...> line.
Then try to install it and if there are any errors, stop and come back here. If it works... well, it works.
For me, there was still an error, but it may just have been me.
Good luck! :)

Mikirin

I've performed all of the edits and still the account switcher doesn't appear. It's also missing from quick reply.
Help?
Here is the board: http://tabookeys.net/melodies/

Advertisement: