Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: SlammedDime on November 12, 2009, 09:59:09 AM

Title: Subaccounts
Post by: SlammedDime on November 12, 2009, 09:59:09 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2264)

SubAccounts v1.0.0 Readme
Welcome to the SubAccounts Mod.  In a nutshell, this mod will allow you and your users to create, delete, merge, or split subaccounts on your forum.

Help support my mods...
(https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3751784)

Features of this mod:

Post Install:
Once the mod is installed, you will be redirected to the 'Core Features' page of your admin panel where you can enable the mod.  Once enabled, you will see 'Manage SubAccounts' under the 'Members' menu in the Admin panel where you can configure the options for the mod.  After you have the options configured, you can visit your profile and start creating or linking together accounts.
Title: Re: Subaccounts
Post by: Arantor on November 12, 2009, 10:18:56 AM
Congratulations on what I can clearly see took many hours to write :)
Title: Re: Subaccounts
Post by: ormuz on November 12, 2009, 12:02:31 PM
Congrats, gigantic mod!
Title: Re: Subaccounts
Post by: Spoogs on November 12, 2009, 12:28:41 PM
great job and thanks... i was honestly going to request such a mod. I have a clan site and many users have multiple game accounts but we only allow each user to have 1 forum account but many dont want to ask questions from their high level accounts in the low level section... based on the description i'm sure this will do the trick.
Title: Re: Subaccounts
Post by: jibo on November 12, 2009, 01:57:11 PM
Thank you i needed this very bad!
Title: Re: Subaccounts
Post by: chrishicks on November 12, 2009, 02:24:11 PM
Mods like this really make me want to do the 2.0 upgrade even though it will be a complete nightmare. Maybe one day...
Title: Re: Subaccounts
Post by: zushiba on November 12, 2009, 02:40:21 PM
Oooh a replacement for the alias mod that only works on beta 3? <3
Title: Re: Subaccounts
Post by: Eliana Tamerin on November 12, 2009, 02:49:06 PM
It is finished! Finally!

Congrats, congrats to you, SlammedDime! This took a huge amount of time and effort, and I applaud you for it.

Now, while we're at it, shouldn't you brag that it's among the only true subaccounts mods for forum systems? I mean, I don't think even phpBB or vB have subaccounts, just account switchers like the old Personas mod is. :P
Title: Re: Subaccounts
Post by: zushiba on November 12, 2009, 04:11:22 PM
Quote from: Eliana Tamerin on November 12, 2009, 02:49:06 PM
It is finished! Finally!

Congrats, congrats to you, SlammedDime! This took a huge amount of time and effort, and I applaud you for it.

Now, while we're at it, shouldn't you brag that it's among the only true subaccounts mods for forum systems? I mean, I don't think even phpBB or vB have subaccounts, just account switchers like the old Personas mod is. :P
They don't. There was a dirty one for phpbb2 something back in the day but it was only ever updated once. This is outstanding. Absolutely perfect for my girlfriends roleplaying board.
Title: Re: Subaccounts
Post by: erlend_sh on November 12, 2009, 04:12:08 PM
WOW. Took it for a quick ride and so far so friggin' good! Your mods are of pristine quality and as a token of my appreciation I have sent $20 your way. I will not be able to use this mod on my forum just yet, but I am already making major plans for it!
Title: Re: Subaccounts
Post by: SlammedDime on November 12, 2009, 05:01:50 PM
Thank you erlend_sh, much appreciated.

Eliana - Yes, this is the only true subaccounts mod that I am aware of :D

All, please feel free to report any bugs you may find... While Eliana did a great job of helping track them down, I'm sure there are more to be found.
Title: Re: Subaccounts
Post by: ishy on November 12, 2009, 05:45:37 PM
This mod works BEAUTIFULLY!  And the drop-down to switch is so efficient!  I remember the old phpbb mod, and I always wanted one for SMF, and this is so much nicer!

Thank you!
Title: Re: Subaccounts
Post by: Minare on November 12, 2009, 06:53:50 PM
Great mod, congrats SD, I will use it after somebody translates it into Turkish :D
Title: Re: Subaccounts
Post by: ishy on November 12, 2009, 08:11:04 PM
Question: how do you edit the profiles of the subaccounts if you are just an ordinary user (and not an admin/have ability to edit profiles)?
Title: Re: Subaccounts
Post by: SlammedDime on November 12, 2009, 08:14:43 PM
Switch to the subaccount then you edit it as that user.

Each subaccount *is* another member on your board, so by switching, you are essentially logging out of one account, and logging into another, so you edit the profile the same way.
Title: Re: Subaccounts
Post by: ishy on November 12, 2009, 09:02:35 PM
Switch how, though? By logging in?  It is saying the accounts are not found. One member switches by making the account the parent account, is that what you mean?
Title: Re: Subaccounts
Post by: Eliana Tamerin on November 12, 2009, 09:41:23 PM
Use the account switcher.

Title: Re: Subaccounts
Post by: makaluch on November 12, 2009, 10:25:10 PM
Test installation flagged these errors:

in ./Sources/Profile-Modify.php (0777) Execute modification failed > replace failed, add before successful

Files are configured (via SMF admin panel) to replace files with trailing tildas like 'filename.php~'

Any advice or info?


Title: Re: Subaccounts
Post by: ishy on November 12, 2009, 10:27:42 PM
Quote from: Eliana Tamerin on November 12, 2009, 09:41:23 PM
Use the account switcher.



Ah, didn't realize I needed to code that into the custom template. Thanks!
Title: Re: Subaccounts
Post by: HughJackman on November 13, 2009, 03:31:43 AM
Quote from: chrishicks on November 12, 2009, 02:24:11 PM
Mods like this really make me want to do the 2.0 upgrade even though it will be a complete nightmare. Maybe one day...

I think I will switch to 2.0 just because of your MOD, SlammedDime.
For my RPG forum it`s like a dream come true.
A big "thank you!"
Title: Re: Subaccounts
Post by: jibo on November 13, 2009, 03:53:18 AM
Hello thank you for this amazing mod.
I have a question, is it possible to only enable the use of sub-accounts on some of the boards instead of all of them? I have a seperate part for roleplaying and i dont want that they can use the subaccounts on the whole forum.
Title: Re: Subaccounts
Post by: Arantor on November 13, 2009, 03:54:27 AM
Subaccounts are regular accounts for the most part.

The one solution to it is to put the subaccounts in different usergroups and not allow those other usergroups to access those boards.
Title: Re: Subaccounts
Post by: jibo on November 13, 2009, 03:56:31 AM
Ok, but it would be easy if i can force that setting,
when creating a subaccount always usergroup - " X " for example, is that possible yet?
Title: Re: Subaccounts
Post by: Arantor on November 13, 2009, 03:57:06 AM
I don't believe it is, though I haven't explored the depths of the mod yet.
Title: Re: Subaccounts
Post by: jibo on November 13, 2009, 03:59:38 AM
Thank you! It's an amazing mod and we ware waiting for it! But for now that's the only reason i can't inplement it (yet)

How can i make a request to such feature?
Title: Re: Subaccounts
Post by: Arantor on November 13, 2009, 04:00:32 AM
You already have - this thread is the place for it. When SlammedDime reads this thread I have no doubt he'll comment on things, he may even have an alternative solution for you.
Title: Re: Subaccounts
Post by: jibo on November 13, 2009, 05:20:20 AM
Ok this might be slightly offtopic but:
<offtopic>
@SlammedDime, i had to bring you the following message from my forum administrators:

WE LOVE YOU FOR BRINGING THIS AMAZING MOD!
</offtopic>
Title: Re: Subaccounts
Post by: SlammedDime on November 13, 2009, 05:55:24 AM
jibo, unfortunately there's really no easy way to do what you want to do, limit subaccounts to certain boards.  I can think of a few ways to try and implement it, but it may become messy and I can't think of an easy way to do it at the moment.

Quote from: makaluch on November 12, 2009, 10:25:10 PM
Test installation flagged these errors:

in ./Sources/Profile-Modify.php (0777) Execute modification failed > replace failed, add before successful

Files are configured (via SMF admin panel) to replace files with trailing tildas like 'filename.php~'

Any advice or info?
You have some other mod that is interfering with the function that this mod replaces.  If you can post the 'account' function from Profile-Modify.php, or attach your Profile-Modify.php to your next post, I can see what's wrong and possibly provide a fix for you.
Title: Re: Subaccounts
Post by: jibo on November 13, 2009, 10:24:08 AM
Since I installed the Subaccounts mod, i receive the administrator mails twice. I know that because i turned on the "New subaccounts inherit parent membergroup" feature, and i made an test account with the same administrator rights.

I know the answer is: "This is not a bug it's a feature."
But does anyone has some best practice advice for me?

I also want to apologize for my English, it is not my native language
Title: Re: Subaccounts
Post by: makaluch on November 13, 2009, 10:40:55 AM
It seems that mod:Login Security may be the culprit.

Account function:

function account($memID)
{
global $context, $txt;

loadThemeOptions($memID);
if (allowedTo(array('profile_identity_own', 'profile_identity_any')))

loadCustomFields($memID, 'account');



// Login Security
$allowedips = '';
global $modSettings;
if ($modSettings['ls_allow_ip_security'])
{
global $smcFunc;
$dbresult = $smcFunc['db_query']('',"
SELECT
allowedips
FROM {db_prefix}login_security
WHERE ID_MEMBER = " . $memID);
$numRows = $smcFunc['db_num_rows']($dbresult);
// We are not going to do anything since they don't have any settings defined
if ($numRows != 0)
{

$ipRow = $smcFunc['db_fetch_assoc']($dbresult);
$allowedips = $ipRow['allowedips'];
}
$smcFunc['db_free_result']($dbresult);

$context['allowedips'] = $allowedips;

}


// End Login Security



$context['sub_template'] = 'edit_options';
$context['page_desc'] = $txt['account_info'];

setupProfileContext(
array(
'member_name', 'real_name', 'date_registered', 'posts', 'lngfile', 'hr',
'id_group', 'hr',
'email_address', 'hide_email', 'show_online', 'hr',
'passwrd1', 'passwrd2', 'hr',
'secret_question', 'secret_answer',
)
);
}
Title: Re: Subaccounts
Post by: Eliana Tamerin on November 13, 2009, 10:58:34 AM
Quote from: SlammedDime on November 13, 2009, 05:55:24 AM
jibo, unfortunately there's really no easy way to do what you want to do, limit subaccounts to certain boards.  I can think of a few ways to try and implement it, but it may become messy and I can't think of an easy way to do it at the moment.

Quote from: jibo on November 13, 2009, 03:56:31 AM
Ok, but it would be easy if i can force that setting,
when creating a subaccount always usergroup - " X " for example, is that possible yet?

That would probably be the easiest way. Change the "New subaccounts inherit parent membergroup" option to an option to select which membergroup(s) new subaccounts get assigned, and add an option to inherit from the parent on top.

The more difficult, but more comprehensive, way would be to add that option down where each group can be limited to X subaccounts. There the admin could select for each group how their subaccounts were assigned groups, whether inherited or automatically assigned X membergroup(s). A bit more work and more code, but it would be the lofty ideal feature. The other, simpler one, would work as well for most I'd imagine.
Title: Re: Subaccounts
Post by: Caltan on November 13, 2009, 12:22:28 PM
Thanks so much for this release, SD!

The upgrade from B3 has been kind of a bear, but only in that resetting passwords by hand for relinking under the new mod is kind of tedious.  Otherwise, it works fantastically, and I love the display on the profile screen.

I'd like to request an option to display subaccounts like regular members on this member list.  I've fixed this myself, but it would be more elegant to have a little ifelse checkbox like the option to display them at all.
Title: Re: Subaccounts
Post by: erlend_sh on November 13, 2009, 06:44:16 PM
There is one huge feature that would mean the world to me, but probably it would be better off as a completely separate mod all together, just compatible.

Changing/sharing ownership of threads. Similarly to the way the sub-accounts work, this mod would allow you to re-assign a thread to someone else, if they accept/provide their password. Example use would be if I share an account with others that we use for announcements, but by accident I make an announcement with my personal account. All we'd have to do would be to change ownership.

Just throwing it out there ;)
Title: Re: Subaccounts
Post by: SlammedDime on November 13, 2009, 08:25:14 PM
erlend - with your example, that is possible with this mod.  If you have a shared account with 5 other admins, and you make the post with your ID, you can edit the first post and save it as the shared account.
Title: Re: Subaccounts
Post by: erlend_sh on November 14, 2009, 02:49:15 AM
Oh.., my.., god! :D Never noticed that drop-down in posts as well. Had no idea it could be this easy. You've done a terrific job with this mod man, truly outstanding.

My only quirk with it is that you have to go through 'Core Features' to find the config for it, as opposed to the more obvious 'Modification Settings'. It works in the sense that it is such a major feature, but couldn't you maybe just put it there for an additional place to enable it, while the main settings would be accessed through the mod settings just like the rest?
Title: Re: Subaccounts
Post by: JBlaze on November 14, 2009, 03:19:07 AM
Congrats on this SlammedDime!

This has been in the works for a year now (from what I can tell...) and definately alot of work went into this.

Congrats again!
Title: Re: Subaccounts
Post by: erlend_sh on November 14, 2009, 03:37:25 AM
Quote from: Eliana Tamerin on November 13, 2009, 10:58:34 AM(...) Change the "New subaccounts inherit parent membergroup" option to an option to select which membergroup(s) new subaccounts get assigned, and add an option to inherit from the parent on top.
I also require this feature, and the simple one would suffice. The comprehensive method would surely be nice but not necessary for my part.
Title: Re: Subaccounts
Post by: gm112 on November 14, 2009, 09:51:34 AM
Oh, wow, thank you for this mod! I run a message board which a lot of people seem to like role-playing, and they like using multiple accounts. While I do not mind it, this would make lives easier for everyone! Thank you so much O_o..
Title: Re: Subaccounts
Post by: PalmBeachPreps on November 14, 2009, 11:08:45 AM
This is a great mod!  However, I'm getting an error on installation: 2.  Replace  ./Themes/default/Display.template.php  Test failed.

I went to correct that part manually, and found out that the problem is that the code which is supposed to be replaced is not entirely the same.  Should I just add the edits after it which actually change everything?

Display template is attached.
Title: Re: Subaccounts
Post by: ishy on November 14, 2009, 04:32:26 PM
We're having trouble getting the Switch Account drop-down box to show up on anything except Curve (even the two Curve variants) after the template edits. I wonder if that's related to the above poster's problem, too?
Title: Re: Subaccounts
Post by: SlammedDime on November 14, 2009, 06:22:59 PM
unlikely ishy... i'll need to see the index.template.php that you've tried to modify to see what is missing.
Title: Re: Subaccounts
Post by: SlammedDime on November 14, 2009, 06:26:29 PM
Quote from: PalmBeachPreps on November 14, 2009, 11:08:45 AM
This is a great mod!  However, I'm getting an error on installation: 2.  Replace  ./Themes/default/Display.template.php  Test failed.

I went to correct that part manually, and found out that the problem is that the code which is supposed to be replaced is not entirely the same.  Should I just add the edits after it which actually change everything?

Display template is attached.
It's because of the WYSIWYG editor you installed.  Use this edit instead...
Code (Find) Select
<div id="qr_buttons">

Code (Replace) Select
<div id="qr_buttons">';
if (!empty($user_info['subaccounts']))
{
echo '
<strong>', $txt['use_subaccount'], ':</strong> <select name="subaccount">
<option value="', $user_info['id'], '" selected="selected">', $user_info['name'], '</option>';
foreach($user_info['subaccounts'] as $account)
echo '
<option value="', $account['id'], '">', $account['name'], '</option>';
echo '
</select>';
}

echo '
Title: Re: Subaccounts
Post by: PalmBeachPreps on November 14, 2009, 07:31:40 PM
Thanks SlammedDime!

EDIT: One last issue (I hope  ;)) : when I switch to my sub-account, there is no drop-down for me to switch back. 
Title: Re: Subaccounts
Post by: makaluch on November 14, 2009, 08:25:46 PM
Quote from: makaluch on November 13, 2009, 10:40:55 AM
Test installation flagged these errors:

in ./Sources/Profile-Modify.php (0777) Execute modification failed > replace failed, add before successful

Files are configured (via SMF admin panel) to replace files with trailing tildas like 'filename.php~'

Any advice or info?
-------------------------------------------------------------------
...
Account function:

function account($memID)
{
global $context, $txt;

loadThemeOptions($memID);
if (allowedTo(array('profile_identity_own', 'profile_identity_any')))

loadCustomFields($memID, 'account');



// Login Security
$allowedips = '';
global $modSettings;
if ($modSettings['ls_allow_ip_security'])
{
global $smcFunc;
$dbresult = $smcFunc['db_query']('',"
SELECT
allowedips
FROM {db_prefix}login_security
WHERE ID_MEMBER = " . $memID);
$numRows = $smcFunc['db_num_rows']($dbresult);
// We are not going to do anything since they don't have any settings defined
if ($numRows != 0)
{

$ipRow = $smcFunc['db_fetch_assoc']($dbresult);
$allowedips = $ipRow['allowedips'];
}
$smcFunc['db_free_result']($dbresult);

$context['allowedips'] = $allowedips;

}


// End Login Security



$context['sub_template'] = 'edit_options';
$context['page_desc'] = $txt['account_info'];

setupProfileContext(
array(
'member_name', 'real_name', 'date_registered', 'posts', 'lngfile', 'hr',
'id_group', 'hr',
'email_address', 'hide_email', 'show_online', 'hr',
'passwrd1', 'passwrd2', 'hr',
'secret_question', 'secret_answer',
)
);
}


Do you guys need more info to point me in the right direction? I'd really love to manage my forums with this amazing tool.

PeninsulaRC.com
Title: Re: Subaccounts
Post by: ishy on November 14, 2009, 10:15:29 PM
Here it is...thanks!
Title: Re: Subaccounts
Post by: SlammedDime on November 15, 2009, 12:37:54 AM
ishy - you forgot to add $user_info and $scripturl to the global declaration on your template_init function.  See the very first edit for index.template.php

makaluch - try this function:

function account($memID)
{
   global $context, $txt, $cur_profile;

   loadThemeOptions($memID);
   if (allowedTo(array('profile_identity_own', 'profile_identity_any')))
     
      loadCustomFields($memID, 'account');
     
     
     
      // Login Security
      $allowedips = '';
      global $modSettings;
      if ($modSettings['ls_allow_ip_security'])
      {
         global $smcFunc;
         $dbresult = $smcFunc['db_query']('',"
         SELECT
            allowedips
         FROM {db_prefix}login_security
         WHERE ID_MEMBER = " . $memID);
         $numRows = $smcFunc['db_num_rows']($dbresult);
         // We are not going to do anything since they don't have any settings defined
         if ($numRows != 0)
         {
           
            $ipRow = $smcFunc['db_fetch_assoc']($dbresult);
            $allowedips = $ipRow['allowedips'];
         }
         $smcFunc['db_free_result']($dbresult);
         
         $context['allowedips'] = $allowedips;
         
      }
     
     
      // End Login Security
     
     

   $context['sub_template'] = 'edit_options';
   $context['page_desc'] = $txt['account_info'];

$profileContext = array('member_name', 'real_name', 'date_registered', 'posts', 'lngfile', 'hr', 'id_group', 'hr',);
$profileContext = array_merge($profileContext, empty($cur_profile['id_parent']) ?
array(
'email_address', 'hide_email', 'show_online', 'hr',
'passwrd1', 'passwrd2', 'hr',
'secret_question', 'secret_answer') :
array('hide_email', 'show_online', 'hr',
'passwrd1', 'passwrd2', 'hr',));

setupProfileContext($profileContext);
}
Title: Re: Subaccounts
Post by: Altair on November 15, 2009, 12:58:54 AM
Hey Slammed. Would it be possible for you to help me Mod a Theme Aaron Made. I use it as my Default Skin. It's a bit... different.

Link: http://custom.simplemachines.org/themes/index.php?lemma=336

What do you think the best way to modify this theme would be?

Also, thank you SO much for making this Mod. I will be sure to Donate when I can find the funds.
Title: Re: Subaccounts
Post by: jibo on November 15, 2009, 06:22:56 AM
Is it possible to show in the postinformation the name of the master account?

Subbaccount 1
posted by: "name of master account"
Am i clear?
Title: Re: Subaccounts
Post by: ishy on November 15, 2009, 10:00:19 AM
Quote from: SlammedDime on November 15, 2009, 12:37:54 AM
ishy - you forgot to add $user_info and $scripturl to the global declaration on your template_init function.  See the very first edit for index.template.php

I was sure I had done that, but maybe I did it for the other themes, and missed that one somehow. Thanks!
Title: Re: Subaccounts
Post by: kingkingston on November 15, 2009, 01:12:33 PM
A person might turn in to jekyll and hyde with this mod :P
Title: Re: Subaccounts
Post by: Liam. on November 15, 2009, 03:27:07 PM
This mod will be brilliant for a schizophrenic forum! Hehe
Title: Re: Subaccounts
Post by: Caltan on November 16, 2009, 11:00:41 AM
With beta3.1 and Aliases, any alias could modify a post made by any other alias under the same parent account.  With Subaccounts, this is not the case: only the original author account can edit the post.  This isn't a deal-breaker by any means, but it is annoying; if you've fat-fingered an edit and accidentally switched post attribution to a different account, you have to switch to that account to modify.  Is there a security reason why it's missing, or was it just not deemed necessary?
Title: Re: Subaccounts
Post by: edi67 on November 16, 2009, 12:00:20 PM
intersting
Title: Re: Subaccounts
Post by: Eliana Tamerin on November 16, 2009, 01:33:02 PM
Quote from: Caltan on November 16, 2009, 11:00:41 AM
With beta3.1 and Aliases, any alias could modify a post made by any other alias under the same parent account.  With Subaccounts, this is not the case: only the original author account can edit the post.  This isn't a deal-breaker by any means, but it is annoying; if you've fat-fingered an edit and accidentally switched post attribution to a different account, you have to switch to that account to modify.  Is there a security reason why it's missing, or was it just not deemed necessary?

As I remember it, it was the amount of edits necessary and the overhead load that it took to do this. I think it's a nice idea, but if the account switcher is present on every page, it takes just two clicks to modify the post. IMO, not a big deal.
Title: Re: Subaccounts
Post by: SlammedDime on November 16, 2009, 04:09:33 PM
As Eliana said, the number of edits to make all of that possible was enormous... and could have possibly made the mod that much more difficult to support.  With the ease of switching accounts and remaining on the same page after the switch, it makes it fairly easy to switch accounts then edit the post.
Title: Re: Subaccounts
Post by: Caltan on November 16, 2009, 05:34:46 PM
Like I said: not a deal-breaker, just annoying; we'll get used to it, it's cool.  I completely understand too much overhead!  I just wanted to make sure there wasn't an option I was missing somewhere.

Title: Re: Subaccounts
Post by: Altair on November 17, 2009, 01:30:11 AM
Just wanted to make a bit of a note.

Sharing a SubAccount is a bit of a risk, it seems. Apparently, the other user can change the password and/or delete the account itself. Is there some measure against this, or is it like this intentionally?

And to make sure my other post doesn't get lost, a quoted post:



Quote from: Altair on November 15, 2009, 12:58:54 AM
Hey Slammed. Would it be possible for you to help me Mod a Theme Aaron Made. I use it as my Default Skin. It's a bit... different.

Link: http://custom.simplemachines.org/themes/index.php?lemma=336 (http://custom.simplemachines.org/themes/index.php?lemma=336)

What do you think the best way to modify this theme would be?

Also, thank you SO much for making this Mod. I will be sure to Donate when I can find the funds.
Title: Re: Subaccounts
Post by: Caltan on November 17, 2009, 08:29:33 AM
Bug: when an admin or mod with subaccounts edits another user's post, the post is given the admin's attribution.  Subsequent edits have the admin's subaccount dropdown.
Title: Re: Subaccounts
Post by: Eliana Tamerin on November 17, 2009, 08:43:29 AM
Quote from: Caltan on November 17, 2009, 08:29:33 AM
Bug: when an admin or mod with subaccounts edits another user's post, the post is given the admin's attribution.  Subsequent edits have the admin's subaccount dropdown.

Using Quick Edit or Modify?
Title: Re: Subaccounts
Post by: SlammedDime on November 17, 2009, 04:46:06 PM
Altair - as for the theme, it may be quite a bit of work, when I have some free time I'll see if I can work on it.  As for the shared account thing, I could have sworn that I made it so that only the original owner could delete the subaccount.  I'll have to take a look at that.

Caltan - I specifically made a unit test for that situation and it passed... I actually did 16 different situations and the code logic passed all of them... can you answer eliana's question on the Quick Edit or normal Modify?
Title: Re: Subaccounts
Post by: Caltan on November 17, 2009, 05:08:34 PM
Further testing: using  normal modify on an unregistered user's post attributes to the moderator after saving.  Quick edit on the same post (after original reattribution) worked successfully without attribution, as do both normal modify and quick edit on a registered user's post.  The reattributed guest post still maintains the moderator's subaccount dropdown until the post's record is edited in the smf_messages table.
Title: Re: Subaccounts
Post by: Altair on November 17, 2009, 05:26:13 PM
@Slammed: Thanks! I would appreciate it. Also, I haven't confirmed the deleting part of my post. I DO know that the second user can change the password though.
Title: Re: Subaccounts
Post by: SlammedDime on November 17, 2009, 05:28:50 PM
Quote from: Caltan on November 17, 2009, 05:08:34 PM
Further testing: using  normal modify on an unregistered user's post attributes to the moderator after saving.  Quick edit on the same post (after original reattribution) worked successfully without attribution, as do both normal modify and quick edit on a registered user's post.  The reattributed guest post still maintains the moderator's subaccount dropdown until the post's record is edited in the smf_messages table.
ok, so it only seems to happen on guest posts then?
Title: Re: Subaccounts
Post by: poolhall on November 17, 2009, 07:59:05 PM
Great mod, SlammedDime, congratulations!

I have a minor problem with the mod: when I switch to or from a subaccount on the forum index page, I am being redirected to /Themes/default/images/blank.gif. This doesn't happen if I switch from other locations.
Title: Re: Subaccounts
Post by: Caltan on November 18, 2009, 10:04:07 AM
Quote from: SlammedDime on November 17, 2009, 05:28:50 PMok, so it only seems to happen on guest posts then?

Yep.  So, not a big deal at all -- I just need to remember to hit quick-edit instead of modify.  :)
Title: Re: Subaccounts
Post by: SlammedDime on November 18, 2009, 03:47:19 PM
poolhall, odd, I'll have to see if I can replicate.

Caltan - that's quite strange... I can replicate, I'll have to see whats up.
Title: Re: Subaccounts
Post by: Afro on November 18, 2009, 09:51:30 PM
ok, i got this erro when i want to create a subaccount.

it installed ok.


The database value you're trying to insert does not exist: warning

edit

figured it out.

wonderful mod here.
Title: Re: Subaccounts
Post by: PalmBeachPreps on November 19, 2009, 03:27:19 AM
Quote from: SlammedDime on November 16, 2009, 04:09:33 PM
As Eliana said, the number of edits to make all of that possible was enormous... and could have possibly made the mod that much more difficult to support.  With the ease of switching accounts and remaining on the same page after the switch, it makes it fairly easy to switch accounts then edit the post.
I've stated this before, but here goes again:  When I switch accounts, there is no drop-down for me to switch back.  Instead, I have to log out of my subaccount and then log back into my admin account.

Also, although I have the checkbox ticked to "show subaccounts in memberlist", none of them appear.  Maybe its the Dynamic Memberlist mod?
Title: Re: Subaccounts
Post by: SlammedDime on November 19, 2009, 03:31:52 AM
PalmBeach - I'll need a link to your site and a test account to use please.  I'm thinking this might be cookie related, but I'd have to see first hand to find out for sure.
Title: Re: Subaccounts
Post by: PalmBeachPreps on November 19, 2009, 04:23:56 AM
Quote from: SlammedDime on November 19, 2009, 03:31:52 AM
PalmBeach - I'll need a link to your site and a test account to use please.  I'm thinking this might be cookie related, but I'd have to see first hand to find out for sure.
www.palmbeachpreps.com (http://www.palmbeachpreps.com)
User: Test
PW: testtest1
P.S. I've set it up with a subaccount also.
Title: Re: Subaccounts
Post by: SlammedDime on November 19, 2009, 06:00:30 AM
I didn't have any issues PalmBeach - I changed to the subaccount, and the dropdown showed up just like it should have.  I'd suggest clearing all of your cookies and retrying.
Title: Re: Subaccounts
Post by: Afro on November 19, 2009, 07:35:06 AM
Quote from: poolhall on November 17, 2009, 07:59:05 PM
Great mod, SlammedDime, congratulations!

I have a minor problem with the mod: when I switch to or from a subaccount on the forum index page, I am being redirected to /Themes/default/images/blank.gif. This doesn't happen if I switch from other locations.

i get the same error if i want to role back to the parent/admin account
Title: Re: Subaccounts
Post by: PalmBeachPreps on November 19, 2009, 01:31:06 PM
Quote from: SlammedDime on November 19, 2009, 06:00:30 AM
I didn't have any issues PalmBeach - I changed to the subaccount, and the dropdown showed up just like it should have.  I'd suggest clearing all of your cookies and retrying.
I apologize for any inconvenience!  The problem was that the header was contracted.  I just overlooked the obvious!   :-[

Thanks for your help (and the GREAT MOD), and again I apologize!
Title: Re: Subaccounts
Post by: SlammedDime on November 19, 2009, 04:37:06 PM
Afro and pool hall, I'll need a link to your board and test accounts to try out.
Title: Re: Subaccounts
Post by: Afro on November 19, 2009, 05:48:33 PM
mine seems to be ok for now. if it persists , i will contact you SD..Thanks
Title: Re: Subaccounts
Post by: poolhall on November 20, 2009, 01:44:11 PM
Quote from: SlammedDime on November 19, 2009, 04:37:06 PM
Afro and pool hall, I'll need a link to your board and test accounts to try out.
I PM-d you.
Title: Re: Subaccounts
Post by: SlammedDime on November 24, 2009, 03:42:43 AM
Sorry guys, my baby has been taking up most of my free time.  I haven't forgotten about you, I'm simply not able to be here to help right now.  I hope to have some time later this week and the week following when I am off of work for the week.
Title: Re: Subaccounts
Post by: kingkingston on November 24, 2009, 06:58:52 AM
Quote from: SlammedDime on November 24, 2009, 03:42:43 AM
Sorry guys, my baby has been taking up most of my free time.  I haven't forgotten about you, I'm simply not able to be here to help right now.  I hope to have some time later this week and the week following when I am off of work for the week.
Where's your priorities :P :D
Title: Re: Subaccounts
Post by: Afro on November 24, 2009, 11:07:06 AM
Ok, if a member clicks on my profile, he or she sees the subaccounts too,
Can you turn it off so that nobody will see your subaccounts ?
Except admin ..
Title: Re: Subaccounts
Post by: SlammedDime on November 24, 2009, 03:51:28 PM
There's an option in the admin panel: "SubAccounts show in user's profiles"... just disable it.  Admins can still view subaccounts on the 'view subaccounts' admin menu.
Title: Re: Subaccounts
Post by: Afro on November 24, 2009, 05:03:57 PM
Quote from: SlammedDime on November 24, 2009, 03:51:28 PM
There's an option in the admin panel: "SubAccounts show in user's profiles"... just disable it.  Admins can still view subaccounts on the 'view subaccounts' admin menu.
ok, thanks
Title: Re: Subaccounts
Post by: PalmBeachPreps on November 24, 2009, 06:49:16 PM
When someone views my profile (admin), it shows this: "All Posts:(Including SubAccounts)".

How do I get rid of that?
Title: Re: Subaccounts
Post by: SlammedDime on November 25, 2009, 05:53:24 AM
You'd have to edit Profile.template.php and remove that section of code.  I didn't add an option for that.
Title: Re: Subaccounts
Post by: Altair on November 25, 2009, 04:54:06 PM
Hey Slammed. Have you had the chance to look at my theme issue? If Not, I understand and will continue to wait. I'm sure there has to be some way to incorporate the mod into it, even if I have to put the code in manually.

Thanks for considering.
Title: Re: Subaccounts
Post by: jkrlvgn on November 25, 2009, 10:35:00 PM
Quote from: Afro on November 19, 2009, 07:35:06 AM
Quote from: poolhall on November 17, 2009, 07:59:05 PM
Great mod, SlammedDime, congratulations!

I have a minor problem with the mod: when I switch to or from a subaccount on the forum index page, I am being redirected to /Themes/default/images/blank.gif. This doesn't happen if I switch from other locations.

i get the same error if i want to role back to the parent/admin account

Just to mention, it seems as if this issue occurs for me when installed with the "Member Color Link" mod installed.  Something doesn't jive well...still investigating, but...narrowed it down to that.
Title: Re: Subaccounts
Post by: PalmBeachPreps on November 26, 2009, 02:11:38 PM
Quote from: SlammedDime on November 25, 2009, 05:53:24 AM
You'd have to edit Profile.template.php and remove that section of code.  I didn't add an option for that.
Can you tell me exactly which section to remove?  Thanks.
Title: Re: Subaccounts
Post by: Altair on November 26, 2009, 03:13:36 PM
@PalmBeachPreps:

In Profile.template.php

Find:


        {
                echo '
                                <dt>', $txt['profile_posts'], ': </dt>
                                <dd>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>';
                           
                if (isset($context['member']['subaccounts_posts']))
                        echo ' <dt>', $txt['subaccount_posts'], '</dt>
                        <dd>', $context['member']['subaccounts_posts'], ' (', $context['member']['subaccounts_posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>';
        }


Replace with:


                echo '
                                <dt>', $txt['profile_posts'], ': </dt>
                                <dd>',$context['member']['posts'], ' (', $context['member']['posts_per_day'],' ', $txt['posts_per_day'], ')</dd>';


That should take care of it.
Title: Re: Subaccounts
Post by: SlammedDime on November 26, 2009, 05:21:10 PM
Thx Altair, that is indeed the code to edit.  I haven't had a chance to look into your theme yet... I'd like to really take the time to go over it but I only get spurts to actually come online and play due to the baby.  I'm on vacation next week and will see what I can do.
Title: Re: Subaccounts
Post by: mirahalo on November 26, 2009, 05:42:09 PM
@PalmBeachPreps: you may also, wanna delete this part:


   // This is nasty, but hey, it works...
if (!empty($context['member']['subaccounts']) && !empty($modSettings['subaccountsShowInProfile']))
echo '
<dt>', $txt['subaccounts'], ':</dt>
<dd><a href="', $scripturl, '?action=profile;u=', implode('</a>, <a href="' . $scripturl . '?action=profile;u=', array_map(create_function('$id,$account', 'return $id . \'">\' . $account[\'name\'];'), array_keys($context['member']['subaccounts']), $context['member']['subaccounts'])), '</a></dd>';



btw, great mod,  specially good for admins of new forums, create Subaccounts and start "talking to yoursefl" maybe cheating, but is a good way to have more users to register at you new forum ;)


Title: Re: Subaccounts
Post by: Eliana Tamerin on November 26, 2009, 06:35:36 PM
Quote from: 130860 on November 26, 2009, 05:42:09 PM
@PalmBeachPreps: you may also, wanna delete this part:


   // This is nasty, but hey, it works...
if (!empty($context['member']['subaccounts']) && !empty($modSettings['subaccountsShowInProfile']))
echo '
<dt>', $txt['subaccounts'], ':</dt>
<dd><a href="', $scripturl, '?action=profile;u=', implode('</a>, <a href="' . $scripturl . '?action=profile;u=', array_map(create_function('$id,$account', 'return $id . \'">\' . $account[\'name\'];'), array_keys($context['member']['subaccounts']), $context['member']['subaccounts'])), '</a></dd>';



btw, great mod,  specially good for admins of new forums, create Subaccounts and start "talking to yoursefl" maybe cheating, but is a good way to have more users to register at you new forum ;)

Yeah....that's really abusive, IMO. Can we stick to more legitimate uses?
Title: Re: Subaccounts
Post by: Arantor on November 26, 2009, 06:38:51 PM
I'm still trying to decide whether I use this or something different for my MMORPG, not sure yet whether I want to do multiple toons on the game side only or have multiple accounts attached in the forum too.

Hmm... still an awesome mod though :D
Title: Re: Subaccounts
Post by: Altair on November 26, 2009, 07:25:21 PM
That's completely understandable, Slammed. The fact that you put the time aside to work on something like this at all, is more than enough for me. Please, take your time. I am in no rush. I don't plan to move my current community to 2.0 until it's out of RC completely.

;)
Title: Re: Subaccounts
Post by: Eliana Tamerin on November 26, 2009, 07:42:20 PM
Quote from: Altair on November 26, 2009, 07:25:21 PM
That's completely understandable, Slammed. The fact that you put the time aside to work on something like this at all, is more than enough for me. Please, take your time. I am in no rush. I don't plan to move my current community to 2.0 until it's out of RC completely.

;)

December 22, 2012. :P
Just kidding!
Title: Re: Subaccounts
Post by: SlammedDime on November 26, 2009, 09:01:48 PM
Quote from: 130860 on November 26, 2009, 05:42:09 PM
@PalmBeachPreps: you may also, wanna delete this part:


   // This is nasty, but hey, it works...
if (!empty($context['member']['subaccounts']) && !empty($modSettings['subaccountsShowInProfile']))
echo '
<dt>', $txt['subaccounts'], ':</dt>
<dd><a href="', $scripturl, '?action=profile;u=', implode('</a>, <a href="' . $scripturl . '?action=profile;u=', array_map(create_function('$id,$account', 'return $id . \'">\' . $account[\'name\'];'), array_keys($context['member']['subaccounts']), $context['member']['subaccounts'])), '</a></dd>';



btw, great mod,  specially good for admins of new forums, create Subaccounts and start "talking to yoursefl" maybe cheating, but is a good way to have more users to register at you new forum ;)
It's not necessary to delete that part and I don't recommend it.  That part is controlled by the option in the admin panel.
Title: Re: Subaccounts
Post by: Altair on November 26, 2009, 09:04:48 PM
Quote from: Eliana Tamerin on November 26, 2009, 07:42:20 PM
Quote from: Altair on November 26, 2009, 07:25:21 PM
That's completely understandable, Slammed. The fact that you put the time aside to work on something like this at all, is more than enough for me. Please, take your time. I am in no rush. I don't plan to move my current community to 2.0 until it's out of RC completely.

;)

December 22, 2012. :P
Just kidding!

If that's how long it takes, so be it. Better safe, then sorry. :P
Title: Re: Subaccounts
Post by: mirahalo on November 27, 2009, 10:39:00 AM
ok, I'm sorry, I just thought the user wants to use the mod that way, I guest I was wrong,   I apologize.
Title: Re: Subaccounts
Post by: DarkSylver on November 27, 2009, 10:12:23 PM
Would be no way to change the MOD to be compatible with 1.1.8?
Title: Re: Subaccounts
Post by: Arantor on November 27, 2009, 10:24:31 PM
Not without a strong rewrite. As also advised elsewhere, please upgrade to 1.1.10.
Title: Re: Subaccounts
Post by: FireDitto on November 28, 2009, 11:14:03 PM
Okay,  I *might* have missed something, but when I've sub-accounted a user, it no longer shows on the Memberlist, unless I've got the "subAccounts show on memberlist" option ticked.

My issue is, that I do not want the sub accounts to be listed under their parents on the member list, I want EVERY account on the forum to be listed as it would be BEFORE it became a sub... Or at least the option to have this so.

Aka, I have

Member 1
Member 2
Member 3

Member 3 was subbed to Members 1 and 2, so now instead of the above list on the Member's listing, I just have

Member 1
Member 2

AND the member list states "Viewing Members 1 to 2 (of 2 total members)" when obviously, there are 3 members total.

I am also unable to do a Search for selected members that have been set as a sub.




Did I miss something? Is there an option on to have this or not?


Sorry if this sounds weird/bad/or angry or something. It's not meaning to. But I've a way with words sometimes.  :-\
Title: Re: Subaccounts
Post by: SlammedDime on November 28, 2009, 11:15:43 PM
You haven't missed anything, I purposefully coded it how it is.  It is something to look into making an option for, however.
Title: Re: Subaccounts
Post by: jkrlvgn on November 29, 2009, 07:43:26 PM
Just to ask, because I didn't see much of a response to it...any idea on what's causing the "blank.gif" issue?
Title: Re: Subaccounts
Post by: SlammedDime on November 29, 2009, 08:13:02 PM
I can possibly think of a way this happens, but I'd need a test account to try it on your board to see what happens exactly.
Title: Re: Subaccounts
Post by: ishy on November 30, 2009, 09:47:24 PM
We love this mod so much that we decided to start a fan club for it! LOL
Title: Re: Subaccounts
Post by: zushiba on December 03, 2009, 07:23:37 PM
The select account dropdown isn't showing up on a curve variant theme I've got. I edited the index.template.php to include the , $context['subaccount_dropdown'], '</li> part and $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>';
}

parts, in fact it's nearly identical to the default themes index.template.php but the dropdown is still not showing. Any ideas?

EDIT:
Quoteishy - you forgot to add $user_info and $scripturl to the global declaration on your template_init function.  See the very first edit for index.template.php

This was my problem as well >< I searched the thread but this didn't turn up.
Title: Re: Subaccounts
Post by: » мιsтєя мιsғιт « on December 03, 2009, 10:09:42 PM
This is one of the best and most useful mods I have ever used, installed perfectly on SMF 2.0 RC2 and no bugs. Well done!
Title: Re: Subaccounts
Post by: Ifaina on December 04, 2009, 05:25:30 AM
This mod is probably the only reason I bothered upgrading. Thank you so much!
Title: Re: Subaccounts
Post by: KensonPlays on December 04, 2009, 05:15:10 PM
I get the box with a red "X" in the corner, and I am using SMF 2.0RC2. I am using Curve Solution, a variant of the default theme, and it won't work!
Title: Re: Subaccounts
Post by: SlammedDime on December 04, 2009, 07:33:33 PM
Can you explain a little bit more about this box with a red x?  I also need a link and test account to see what is happening.
Title: Re: Subaccounts
Post by: Ifaina on December 06, 2009, 05:15:57 AM
Quote from: SlammedDime on November 15, 2009, 12:37:54 AM
ishy - you forgot to add $user_info and $scripturl to the global declaration on your template_init function.  See the very first edit for index.template.php

What does this mean? I'm having the same problem

Title: Re: Subaccounts
Post by: SlammedDime on December 06, 2009, 02:23:59 PM
Just like I said... see the very first edit for index.template.php
Title: Re: Subaccounts
Post by: Altair on December 06, 2009, 05:31:36 PM
-Gives slammed a cookie- ^^
Title: Re: Subaccounts
Post by: ishy on December 08, 2009, 07:36:17 AM
Put this on a second site, but the index.template.php is a little bit odd.

Instead of this:
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>

There is this:
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '', $txt['hello_member'], ' <b>', $context['user']['name'], '</b><br />';


EDIT:
Yay, I figured it out (html I can read, but php gives me a headache with all those commas). In case anyone else needs it:
    // If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '', $txt['hello_member'], ' <b>', $context['user']['name'], $context['subaccount_dropdown'], '</b><br />';
Title: Re: Subaccounts
Post by: Ncen on December 12, 2009, 02:04:15 PM
Quote from: FireDitto on November 28, 2009, 11:14:03 PM
Okay,  I *might* have missed something, but when I've sub-accounted a user, it no longer shows on the Memberlist, unless I've got the "subAccounts show on memberlist" option ticked.

My issue is, that I do not want the sub accounts to be listed under their parents on the member list, I want EVERY account on the forum to be listed as it would be BEFORE it became a sub... Or at least the option to have this so.

Aka, I have

Member 1
Member 2
Member 3

Member 3 was subbed to Members 1 and 2, so now instead of the above list on the Member's listing, I just have

Member 1
Member 2

AND the member list states "Viewing Members 1 to 2 (of 2 total members)" when obviously, there are 3 members total.

I am also unable to do a Search for selected members that have been set as a sub...

Please look into this when you have time Slammed, i would also want this feature :)

Ps. Great work by the way! :) This i such a cool mod.

The ability for the user to choose usergroup (out of a few admin-selected groups with no admin-permissions) for their new SubAcc perhaps? ^^
Title: Re: Subaccounts
Post by: FireDitto on December 13, 2009, 11:06:30 PM
Quote from: SlammedDime on November 28, 2009, 11:15:43 PM
You haven't missed anything, I purposefully coded it how it is.  It is something to look into making an option for, however.

Ahkay, thank you. I'd love to have it as an option =)
Title: Re: Subaccounts
Post by: Atomic Blaze on December 14, 2009, 11:02:07 PM
When a linked account is shared between two accounts making the shared account unsharable removes all the linked accounts from the other person(s)
Title: Re: Subaccounts
Post by: SlammedDime on December 15, 2009, 03:36:10 AM
Correct. as it should.
Title: Re: Subaccounts
Post by: Eliana Tamerin on December 15, 2009, 08:31:19 AM
Quote from: Atomic Blaze on December 14, 2009, 11:02:07 PM
When a linked account is shared between two accounts making the shared account unsharable removes all the linked accounts from the other person(s)

I think he means that if Person A has 3 subaccounts, one shareable, and Person B has 4 subaccounts, including the one shared with Person A, making the shareable account unshareable will strip Person B of all 4 subaccounts.

I think that's what he means. That's how I read it, anyway.
Title: Re: Subaccounts
Post by: Atomic Blaze on December 15, 2009, 05:14:28 PM
Quote from: Eliana Tamerin on December 15, 2009, 08:31:19 AM
I think he means that if Person A has 3 subaccounts, one shareable, and Person B has 4 subaccounts, including the one shared with Person A, making the shareable account unshareable will strip Person B of all 4 subaccounts.

I think that's what he means. That's how I read it, anyway.

right, it removes all of the subaccounts from user B.

I've also noticed that going from ?action=profile;area=managesubaccounts;u=## to ?action=profile;area=managesubaccounts;sa=link;u=## links all sharable accounts to the account you're adding accounts to
Title: Re: Subaccounts
Post by: mabley on December 16, 2009, 02:24:44 AM
I'm a big fan of this mod - thank you for your expertise and hard work! The role-playing community will be canonizing you as a saint.

We are using "Thing" by Nolt as a theme.  Now we are unable to see the Subaccount Drop Down.  Someone recommended going to the mod's parse page and making the appropriate changes to our theme's index.template.php.  When I did this (and double-checking a billion times for accuracy) it created an error that required me to replace the original index.template.php in order to see the forum again.

What more information can I provide to help you see what the trouble is?
Title: Re: Subaccounts
Post by: Eliana Tamerin on December 16, 2009, 09:19:24 AM
@mabley: Upload your index.template.php from that theme.
Title: Re: Subaccounts
Post by: mabley on December 16, 2009, 12:06:54 PM
Here is the index.template.php from that theme.  Thanks.  8)

Quote from: mabley on December 16, 2009, 02:24:44 AM
I'm a big fan of this mod - thank you for your expertise and hard work! The role-playing community will be canonizing you as a saint.

We are using "Thing" by Nolt as a theme.  Now we are unable to see the Subaccount Drop Down.  Someone recommended going to the mod's parse page and making the appropriate changes to our theme's index.template.php.  When I did this (and double-checking a billion times for accuracy) it created an error that required me to replace the original index.template.php in order to see the forum again.

What more information can I provide to help you see what the trouble is?
Title: Re: Subaccounts
Post by: akbora on December 18, 2009, 07:29:47 PM
Very big and excellent mod.
I ask a question I havent't upgraded to RC2 yet, is this mod only for admin or for everyone? Thanks
Title: Re: Subaccounts
Post by: mirahalo on December 18, 2009, 07:51:53 PM
@akbora   this mod uses the smf permission system, that is, you can select what membergroup   can   
            Create SubAccounts   
   Delete SubAccounts   
   Merge SubAccounts   
   Unlink SubAccounts

also you can specified how many sub accounts a specific member group can have,  0 being unlimited
Title: Re: Subaccounts
Post by: akbora on December 18, 2009, 07:53:17 PM
Very thanks.

Is this mod similar log in as user?

Title: Re: Subaccounts
Post by: mirahalo on December 18, 2009, 07:58:07 PM
Im afraid I dont understand you,  this mod adds the hability to create  a sub account, you could use this sub account   without  the need to log out, login again   if thats what you mean.

you just go to the top of your forum, where you avatar is  and next to your name theres a drop down list with all the sub accounts you created, select one and thats all, you can start posting with it
Title: Re: Subaccounts
Post by: Arantor on December 18, 2009, 07:59:21 PM
It lets you quickly change users, so yes, you can log in as other users that you've set up as subaccounts of your own.

For example, you could have your main admin account and a non-admin account for testing, and have the non-admin account set as a subaccount. You could then switch accounts between the two with a few clicks.
Title: Re: Subaccounts
Post by: akbora on December 18, 2009, 08:21:09 PM
I tried it. This is very very good mod.

I see only this problem. When switch another nick, this nick appears online list, this is very good, but when I go back main nick immediately disappears another nick form online list..

I mean that when another nick or nickes activate remain online list till forum setting. Thanks.

(sorry my english)
Title: Re: Subaccounts
Post by: Eliana Tamerin on December 18, 2009, 08:22:52 PM
That wouldn't be accurate, since, according to SMF, you are logging out of your main account and logging into your subaccount. SMF doesn't keep accounts listed in Who's Online once they log out.
Title: Re: Subaccounts
Post by: akbora on December 18, 2009, 08:38:47 PM
Another trouble (maybe my mistake) When I swithc sub account (existing member) this is ok. But if I go to parent account I am logging out.
Title: Re: Subaccounts
Post by: LLlover on December 18, 2009, 09:35:54 PM
I think someone already mentioned something about this.  Does anyone know what causes it to redirect to blank.gif when trying to change back and forth between the parent and subaccounts?  This is the only problem I'm having with this great mod and it's been getting on my nerves a little.
Title: Re: Subaccounts
Post by: Ncen on December 19, 2009, 12:03:58 PM
If i'm logged in on one account i Safari, and then opens Opera and logs in on my account, and change to SubAcc, and then refresh the page in Safari. then the SubAcc is marked offline even though i haven't logged out in Opera. I refresh in opera, and the MainAccount (which i have open in Safari) is marked offline. And i want both of them marked Online. Since i'm using both. MainAcc in Safari, SubAcc in Opera. :)
Title: Re: Subaccounts
Post by: mabley on December 22, 2009, 06:11:56 PM
I have been unable to resolve the issue I brought up earlier in this thread.  Can someone have a look? (http://www.simplemachines.org/community/index.php?topic=347710.msg2407985#msg2407985) 

I've been asking around and poking and experimenting, but haven't been able to make any headway on my own.  Please advise, if you can.  Thank you!
Title: Re: Subaccounts
Post by: Caltan on December 22, 2009, 06:52:59 PM
You need to add $scripturl and $user_info to the global string of your template_init function.   It's mentioned on page 4 of this thread, I believe.

ETA: I lied, page 3.  :)  Here (http://www.simplemachines.org/community/index.php?topic=347710.msg2358834#msg2358834) is the specific post.
Title: Re: Subaccounts
Post by: mabley on December 22, 2009, 08:20:59 PM
Thanks everyone. This fixes it!
Title: Re: Subaccounts
Post by: ~DS~ on December 24, 2009, 01:21:41 AM
Actually I am having problem with this mod the second time I installed.  :-\
Last time I installed it with no problem. Uninstalled it because it crashed the server when I switch my master account to a guess account. No problem when switching with the same membergroup.
Title: Re: Subaccounts
Post by: Atomic Blaze on December 28, 2009, 04:09:42 PM
Are there any plans to include a dropdown in the lo-fi reply page?
Title: Re: Subaccounts
Post by: Eliana Tamerin on December 28, 2009, 08:06:15 PM
Lo-Fi? Do you mean WAP2/imode? Or Dragooon's new Curve Mobile?
Title: Re: Subaccounts
Post by: KensonPlays on December 28, 2009, 11:13:50 PM
@SlammedDime: i already do: USER: test PASS: test (this user cannot post on my site, as it is a account for just this reason)

ATTACHED IMAGE: Looks something like that

EDIT:
I am using another theme...
Title: Re: Subaccounts
Post by: Atomic Blaze on January 02, 2010, 12:44:41 AM
wap2
Title: Re: Subaccounts
Post by: shoepixie on January 02, 2010, 08:12:58 AM
Hey, thanks for this awesome mod!  Sadly, I haven't been able to get it to install: I get errors every time.  I've just upgraded to RC2 (mostly just for this mod :P) and have only installed the mods I had before...none of them seem like they would muck this one, but what do I know?  Does anyone know of any mods that conflict with this?  What could I do to get it to install correctly?
Title: Re: Subaccounts
Post by: Atomic Blaze on January 03, 2010, 02:32:31 AM
@shoepixie: what errors are you getting? The package manager should tell you what the errors are.
Title: Re: Subaccounts
Post by: Evolutionist on January 03, 2010, 10:51:26 AM
I did some Arabic translation for your mod and post it at the Arabic support board ....  so sorry I didn't see this topic until now ....

any way ... this is the translation ...
http://www.simplemachines.org/community/index.php?topic=356979.msg2429741#msg2429741
Title: Re: Subaccounts
Post by: shoepixie on January 03, 2010, 06:08:17 PM
Quote from: Atomic Blaze on January 03, 2010, 02:32:31 AM
@shoepixie: what errors are you getting? The package manager should tell you what the errors are.

HI, thanks so much for replying! It says this:
"Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF."

I looked below, and it said:
*     2.     Execute Modification     ./index.php     Test failed
      1.    Add After    ./index.php    Test failed

All the other tests passed.  Does this help at all?  I promised my players this, I wish I knew how to fix it!
Title: Re: Subaccounts
Post by: bellrosk on January 24, 2010, 03:01:50 PM
Ah so as a roleplayer, I'm so glad this mod has been created.

However, I've found one very minor but ultimately crippling problem.

- I've found that in a few of my layouts the 'Account switcher' drop-down menu doesn't work. This may be because they're not 2.0 RCR layouts? However I'm pretty certain it doesn't work in some rc2 templates too.

It's a shame, because I'm planning to really work on http://custom.simplemachines.org/themes/index.php?lemma=1236 (http://custom.simplemachines.org/themes/index.php?lemma=1236) << that theme.

Does anybody know if there is a different way to switch accounts? Or perhaps could somebody tell me what to add to that theme to add the account changer? I'd be eternally gratefull.
Title: Re: Subaccounts
Post by: Garou on January 24, 2010, 09:28:47 PM
That theme is not RC2 compatible I'd be surprised if its not causing you other errors on your forum as well. If you are really set on using that theme your best bet would be to use the support thread for it and ask popularfx if he is willing to update the theme. If not you can always take a crack at it yourself. Personally I find creating themes for RC2 much easier then any other version of SMF.
Title: Re: Subaccounts
Post by: bellrosk on January 25, 2010, 05:32:57 AM
Yeah I mean, the theme has the simplicity that no other themes really have. I'm not really looking for a super complex, high graphic theme.

And so far, that's the only problem that's arisen.

And I'm not hugely technically literate, I'll make a post. What modifications would I need to make to upgrade it to RC2 would you suggest?
Title: Re: Subaccounts
Post by: Caltan on January 25, 2010, 12:07:31 PM
If the dropdown is not appearing in your custom theme, check the manual installation instructions for $themedir/index.template.php and make those changes by hand.  This post (http://www.simplemachines.org/community/index.php?topic=347710.msg2358834#msg2358834) discusses the easiest-to-miss changes, adding $user_info and $scripturl to template_init().
Title: Re: Subaccounts
Post by: SlammedDime on January 25, 2010, 01:41:09 PM
bellrosk - Caltan pretty much nailed what the issue likely is.
Title: Re: Subaccounts
Post by: bellrosk on January 25, 2010, 04:40:20 PM
Ah ok, well I had a go and to be honest, mucked up majorly. I'm new to SMF software and so this stuff will confuse me.

If I attatch the file, can you possibly push me in the right direction?
Title: Re: Subaccounts
Post by: Caltan on January 25, 2010, 09:07:43 PM
None of the subaccount strings are in there -- probably because it's a beta4 theme (not RC2 or even RC1), which is why it's not working.  Is it working on your RC2 Curve/Core?  You can try using the "Manual Instructions" on the mod page (http://custom.simplemachines.org/mods/index.php?mod=2264) and making the changes noted in the ./Themes/default/index.template.php section -- I tried that with your attached file, but I don't have a beta4 install to test it on, so that's a definite caveat.  Your better bet is to rebuild your theme so it's based on RC2, then you shouldn't have any trouble with the mod.
Title: Re: Subaccounts
Post by: bellrosk on January 26, 2010, 06:06:04 AM
Ah that worked beautifully. Thankyou very much!
Title: Re: Subaccounts
Post by: Virginia on February 02, 2010, 12:29:26 PM
Perhaps it's just me missing something, seeing as I'm pretty new to coding, but I can't figure out how to make this mod work with other themes than the default  :-\

I'm using the BlackDay theme --> http://custom.simplemachines.org/themes/index.php?lemma=23

EDIT: Nevermind, I think I got it  ;D
Title: Re: Subaccounts
Post by: kherezae on February 08, 2010, 11:37:00 PM
Hey,

I installed the mod through Package Manager with no problems (at least not in areas that should matter), but subaccounts aren't showing up in member profiles.  I've checked through all relevant files to make sure the code's all there and correct, and I can't seem to find anything wrong.  Any idea what could cause this?  It's not just in my custom themes; it doesn't show up in default either.

http://synthetic-truth.net (http://synthetic-truth.net)
Title: Re: Subaccounts
Post by: Caltan on February 09, 2010, 04:00:14 PM
If you have turned on the option to allow subaccount display in profiles (admin -> manage subaccounts -> subaccounts show on user profiles), then you may have a conflict with your Ultimate Profiles mod.  I'd check that template and make sure the line is there.

The caveat is that the subaccounts only display on the parent account's profile, which is something that makes me personally insane and I would really really really really really like to change for a later version.  :)
Title: Re: Subaccounts
Post by: kherezae on February 17, 2010, 01:44:15 PM
Thanks Caltan!  I think that is the problem.  Unfortunately, I was only able to correct part of it by myself.  I've posted in the Ultimate Profile thread for help as well, but if anyone here has any idea what the problem might be, I'd really appreciate the help!

QuoteHi,

I have this mod and the Ultimate Profile (http://custom.simplemachines.org/mods/index.php?mod=1675) mod both installed, and they both seem to work flawlessly but have a bit of interference with one another.  I've fixed part of it, but I'm having trouble fixing the other part.

I can't get the subaccounts to show up in a user's profile if they're using Ultimate Profile.  Their total posts including those made on subaccounts show up, but not a list of their subaccounts.  I copied and pasted both lines of code from the profile template, so theoretically it should work; I'm not sure what's missing.

The site is: synthetic-truth.net

The working bit of code (and the surrounding code for reference):
if (!isset($context['disabled_fields']['posts']))
echo '
<dt><strong>', $txt['profile_posts'], ': </strong></dt>
<dd>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>';
if (isset($context['member']['subaccounts_posts']))
echo '
<dt><strong>', $txt['subaccount_posts'], '</strong></dt>
<dd>', $context['member']['subaccounts_posts'], ' (', $context['member']['subaccounts_posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>';

echo '
<dt><strong>', $txt['position'], ': </strong></dt>
<dd>', (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</dd>


The bit that isn't working (and surrounding code for reference):
if (!empty($context['member']['blurb']))
echo '
<dt><strong>', $txt['personal_text'], ': </strong></dt>
<dd>', $context['member']['blurb'], '</dd>';

if (!empty($context['member']['subaccounts']) && !empty($modSettings['subaccountsShowInProfile']))
echo '
<dt><strong>', $txt['subaccounts'], ': </strong></dt>
<dd><a href="', $scripturl, '?action=profile;u=', implode('</a>, <a href="' . $scripturl . '?action=profile;u=', array_map(create_function('$id,$account', 'return $id . \'">\' . $account[\'name\'];'), array_keys($context['member']['subaccounts']), $context['member']['subaccounts'])), '</a></dd>';

if (!isset($context['disabled_fields']['posts']))
echo '
<dt><strong>', $txt['profile_posts'], ': </strong></dt>
<dd>', $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</dd>';


And my installed mods:

QuoteSubAccounts Mod   1.0.0
2.   Internal_Links_Use_Same_Window   1.2
3.   Justify BBCode   2.3
4.   Spoiler BBCode   1.1.1
5.   YouTube BBCode   2.6
6.   Remove Reply Prefix   1.0
7.   Default_Membergroup   1.0.0.3
8.   SimplePortal   2.3.1
9.   Bakers Dozen Pages   1.2
10.   Ultimate Profile


Any idea what's wrong?  I appreciate any help you can give!
Title: Re: Subaccounts
Post by: ianus on February 28, 2010, 02:11:29 PM
Greetings!

This is ,,only" a Thank you very much post.

This mod is really a great feature and a fantastic work also.
Installation was flawless and so is the usability.

(Note for myself: Need a PayPal acc to donate..soon)
Title: Re: Subaccounts
Post by: Greymalkin on March 07, 2010, 06:24:22 PM
This looks like a fantastic mod and perfect for my game, but I'm having trouble doing the edits on my theme (EOTSDZINE HALF LIFE).  Everything was going swimmingly until I got to:



index.template.php
/* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
$settings['require_theme_strings'] = false;


All I have is
/* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
$settings['require_theme_strings'] = true;


And I don't seem to have <li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
at all.



memberlist.template.php
I have no
<td class="windowbg2">



Can you please tell me what edits I need to do for my particular theme?
Title: Re: Subaccounts
Post by: ianus on March 09, 2010, 01:24:27 AM
For the index template...

1:
You can add it as mentioned in the parser

/* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
$settings['require_theme_strings'] = true;

$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>';
}
}

// The main sub template above the content.


2:
Since your theme do not have a "Hello username" at the top, there is no need to add the Subaccount drop down.

You can leave it as it is.
Title: Re: Subaccounts
Post by: Caltan on March 09, 2010, 08:30:17 AM
Will this be compatible with RC3?

Meaning, will we have to uninstall it first, rendering all the linked accounts unusable until their passwords are reset by hand? 

If yes, is there a better way to do this?
Title: Re: Subaccounts
Post by: Greymalkin on March 10, 2010, 11:59:59 AM
On the index.template, I inserted the provided code after
/* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
   $settings['require_theme_strings'] = true;


But I got the following syntax error:
Template Parse Error!
There was a problem loading the /Themes/EOTS_DZINE_RC2_Half_Life/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
syntax error, unexpected '}'

EDIT:  modified index.template attached

EDIT #2: deleted some repeated portions at beginning and end of section, error now gone.
Title: Re: Subaccounts
Post by: Altair on March 10, 2010, 04:15:29 PM
Hello SlammedDime,

   I understand that you are working hard on other projects right now, but I was just letting you know I'll still need help with my theme. If you get the time to contact me and look into it, that would be great.

Altair.
Title: Re: Subaccounts
Post by: SlammedDime on March 10, 2010, 07:28:45 PM
Caltan, when upgrading to RC3, the mod will have to be uninstalled by the overwrite, but all data will remain intact in the database.  Just install the new version I'll release and you should be good to go.

The few bugs mentioned will also be fixed... this is my last important mod to update for RC3, but I want to make sure I have the bugs fixed, so it'll be a day or two at least.

Altair - if you can zip/tar up your custom theme directory and email it to me at slammeddime [at] simplemachines [dot] org, I'll take a look at it and see if I can spin it out for you.
Title: Re: Subaccounts
Post by: Altair on March 12, 2010, 06:31:19 PM
Quote from: SlammedDime on March 10, 2010, 07:28:45 PM
Altair - if you can zip/tar up your custom theme directory and email it to me at slammeddime [at] simplemachines [dot] org, I'll take a look at it and see if I can spin it out for you.

Sent your way. Should be from Animalthewolf [at] gmail [dot] com.
Title: Re: Subaccounts
Post by: Jared Thaler on March 16, 2010, 03:06:37 AM
looking forward to see the RC3 release.  I upgraded to RC3 before I realized that the mod wasn't ready for RC3 yet :(
Title: Re: Subaccounts
Post by: aussieherps on March 18, 2010, 07:50:40 AM
Hi guys I am running on RC2 and when I installed all went ok but when I try to create I get this:

The following error(s) occured:
Please enter a valid email address, natasha..
Manage SubAccounts Please enter the name you wish to use as the subaccount. If you want to turn an existing account into a subaccount, please enter that account's password. You can click the small 'warning' icon next to the text field to validate the name if you are creating a new subaccount.

Choose Account:
Used to identify you on the forum.
   
Password:
If the subaccount is already a user or shared subaccount, supply that account's password.
   
Verify password:   

Am I reading correctly or am I supposed to use my username and password or join as new member and the link it to my account or what. I am a bit of a dope sometimes but just don't understand as there is no Email question there.

Any help is appreciated.
Title: Re: Subaccounts
Post by: Caltan on March 18, 2010, 11:08:57 AM
Enter the name of the account you wish to create and your current password.  Not sure why you're turning up the email error, though.
Title: Re: Subaccounts
Post by: aussieherps on March 18, 2010, 10:17:44 PM
Still coming up with the same error message.

Have admin as default setting od 0 which should allow unlimited number od sub profiles/accounts.
Title: Re: Subaccounts
Post by: SlammedDime on March 19, 2010, 02:20:44 AM
Hrm... all I can think of is that your current profile doesn't have an email address in it, or a valid one at that.  The subaccount, when created, will have the email address of the parent account.  If the parent account doesn't have a valid one, then that error may be thrown.
Title: Re: Subaccounts
Post by: ~DS~ on March 19, 2010, 06:44:56 PM
SlammedDime, are you going to update for RC3 along with the conflit fix on AeMe?
Title: Re: Subaccounts
Post by: aussieherps on March 20, 2010, 06:56:58 AM
Yes my admin account has valid email address as I receive newsletters when they are sent etc.
New members accounts also send a message to that account.
Title: Re: Subaccounts
Post by: cosoa on March 22, 2010, 02:27:18 PM
I really really hope this gets updated for RC3! It's perfect for what I need and there doesn't seem to be another like it anywhere :)
Title: Re: Subaccounts
Post by: Jared Thaler on March 25, 2010, 11:43:06 PM
has anyone tested the existing Mod with RC3? at least as an interim measure?
Title: Re: Subaccounts
Post by: Caltan on March 26, 2010, 08:51:10 AM
Yes, I've tested it.  Other than some errors in Display.template.php, it will install through the package manager under RC2 emulation, but it none of the functionality is retained.  Maybe if you went through and installed it manually with RC3 parsing it would be okay, but the mod is so huge that spending the time wasn't an option for me.
Title: Re: Subaccounts
Post by: MrDroopy on April 02, 2010, 10:27:04 AM
Hi SlammedDime, I really hope you find the time to upgrade this wonderfull mod to RC3. We use it quite a lot on our forum.
Title: Re: Subaccounts
Post by: FireDitto on April 12, 2010, 11:00:29 PM
Quote from: SlammedDime on March 10, 2010, 07:28:45 PM
The few bugs mentioned will also be fixed... this is my last important mod to update for RC3, but I want to make sure I have the bugs fixed, so it'll be a day or two at least.

It's on it's way, from what I can gather.

I shall join the waiting queue, though I do have a question: Will this work with the Multiple Forum (http://custom.simplemachines.org/mods/index.php?mod=2137) modification? I've not had any issues with additional mods yet, but I ask anyway =)
Title: Re: Subaccounts
Post by: MrDroopy on April 13, 2010, 11:54:55 AM
Hi SlammedDime, do you already have an ETA on the RC3 release?
Title: Re: Subaccounts
Post by: FireDitto on April 25, 2010, 03:11:57 AM
Not meaning to be impatient, but I am anxious for the RC3 version of this Mod =)
Title: Re: Subaccounts
Post by: WhiteFire Sondergaard on April 25, 2010, 05:05:50 AM
Rather curious myself since I have problems with RC2 on my setup.
Title: Re: Subaccounts
Post by: Aiko on May 01, 2010, 03:00:52 PM
Has anyone tried this on RC3?
Title: Re: Subaccounts
Post by: WhiteFire Sondergaard on May 01, 2010, 03:14:32 PM
Yeah, there were only a few install problems, but despite my efforts to fix them, I could not make it work. I think it may be related to a schema change.
Title: Re: Subaccounts
Post by: Arantor on May 01, 2010, 03:31:45 PM
There were no major schema changes between RC2 and RC3, however there were numerous major code changes, which is the reason it fails to work.
Title: Re: Subaccounts
Post by: Aiko on May 01, 2010, 06:54:11 PM
Ahhh, okay. Thanks for answering WhiteFire and Arantor. This is sad, I am  ready to up grade to RC3 but I have this mod installed right now. MY Rpg won't be the same without it. :(
Title: Re: Subaccounts
Post by: WhiteFire Sondergaard on May 01, 2010, 07:29:43 PM
Thankfully my project is so deep in development that it does not yet matter for me. And thanks for the correction, details about the problems I had are kinda fuzzy now. Too much JavaScript melts my brain.
Title: Re: Subaccounts
Post by: ishy on May 10, 2010, 10:31:24 AM
I am eagerly awaiting the update for this as well. Next time I might not upgrade again until it's ready to use.
Title: Re: Subaccounts
Post by: skeletonkiss on May 10, 2010, 05:03:55 PM
Is there -any- ideas on when this will be updated? I have an rpg forum that is definitely itching to use it!
Title: Re: Subaccounts
Post by: Arantor on May 10, 2010, 05:06:17 PM
Quote from: skeletonkiss on May 10, 2010, 05:03:55 PM
Is there -any- ideas on when this will be updated? I have an rpg forum that is definitely itching to use it!

When the author has time, unfortunately.
Title: Re: Subaccounts
Post by: Robin1989 on May 15, 2010, 02:10:44 PM
im looking forward to this been updated soon hopefully as i plan on upgrading to rc3 in a couple of weeks
Title: Re: Subaccounts
Post by: C4G-TK on May 17, 2010, 02:57:32 PM
I only had two tests fail when I emulated with RC2 to try to install on my RC3 forum.

The first was the fifth edit in ManagePermissions.php file and the second was the 2nd edit in the Display.template.php file

Try searching for the partial code of:
'modify_replies',

and then completing the edit by adding after:
'subaccounts_create',
'subaccounts_delete',
'subaccounts_merge',
'subaccounts_split',


Then, in DisplayTemplate.php file try searching for:
<textarea cols="75" rows="7" style="', $context['browser']['is_ie8'] ? 'max-width: 100%; min-width: 100%' : 'width: 100%', '; height: 100px;" name="message" tabindex="', $context['tabindex']++, '"></textarea>

and then completing the edit by replacing with:
<textarea cols="75" rows="7" style="', $context['browser']['is_ie8'] ? 'max-width: 100%; min-width: 100%' : 'width: 100%', '; height: 100px;" name="message" tabindex="', $context['tabindex']++, '"></textarea><br />';
if (!empty($user_info['subaccounts']))
{
echo '
<strong>', $txt['use_subaccount'], ':</strong> <select name="subaccount">
<option value="', $user_info['id'], '" selected="selected">', $user_info['name'], '</option>';
foreach($user_info['subaccounts'] as $account)
echo '
<option value="', $account['id'], '">', $account['name'], '</option>';
echo '
</select>';
}

echo '


I will let you know how it goes, if this doesn't work.

Update:
Well, it actually created a new member!  The only slight problem are the three textboxes under the Manage SubAccounts portion under PROFILE.  After selecting a new name, the box goes blank when you hit tab to go to the next box, so you can't see what you typed and you aren't aware that you are on the next block.  But, you are where you select the password.  But, once you hit tab for a second time, it does it again, so you don't realize you went to the third box.  After typing in the password a 2nd time, you tab and hit CREATE LINK and it worked as shown.  It just might be a little confusing to most people since you aren't aware where you are in the process.

Pic attached of newly created account under profile, but it did not show in Member List despite having the setting set to do so.  But, it is mostly functional on RC3 and no errors are pulling.

Title: Re: Subaccounts
Post by: Aiko on May 22, 2010, 07:00:00 PM
For those of us who have RP's this mod is so essential. Is there no one who can take it over maybe? :(
Title: Re: Subaccounts
Post by: Gen200 on May 23, 2010, 02:48:58 AM
Quote from: C4G-TK on May 17, 2010, 02:57:32 PM
I only had two tests fail when I emulated with RC2 to try to install on my RC3 forum.

The first was the fifth edit in ManagePermissions.php file and the second was the 2nd edit in the Display.template.php file

Try searching for the partial code of:
'modify_replies',

and then completing the edit by adding after:
'subaccounts_create',
'subaccounts_delete',
'subaccounts_merge',
'subaccounts_split',


Then, in DisplayTemplate.php file try searching for:
<textarea cols="75" rows="7" style="', $context['browser']['is_ie8'] ? 'max-width: 100%; min-width: 100%' : 'width: 100%', '; height: 100px;" name="message" tabindex="', $context['tabindex']++, '"></textarea>

and then completing the edit by replacing with:
<textarea cols="75" rows="7" style="', $context['browser']['is_ie8'] ? 'max-width: 100%; min-width: 100%' : 'width: 100%', '; height: 100px;" name="message" tabindex="', $context['tabindex']++, '"></textarea><br />';
if (!empty($user_info['subaccounts']))
{
echo '
<strong>', $txt['use_subaccount'], ':</strong> <select name="subaccount">
<option value="', $user_info['id'], '" selected="selected">', $user_info['name'], '</option>';
foreach($user_info['subaccounts'] as $account)
echo '
<option value="', $account['id'], '">', $account['name'], '</option>';
echo '
</select>';
}

echo '


I will let you know how it goes, if this doesn't work.

Update:
Well, it actually created a new member!  The only slight problem are the three textboxes under the Manage SubAccounts portion under PROFILE.  After selecting a new name, the box goes blank when you hit tab to go to the next box, so you can't see what you typed and you aren't aware that you are on the next block.  But, you are where you select the password.  But, once you hit tab for a second time, it does it again, so you don't realize you went to the third box.  After typing in the password a 2nd time, you tab and hit CREATE LINK and it worked as shown.  It just might be a little confusing to most people since you aren't aware where you are in the process.

Pic attached of newly created account under profile, but it did not show in Member List despite having the setting set to do so.  But, it is mostly functional on RC3 and no errors are pulling.

Actually, I got Subaccounts fully functional in RC3 with just that second replacement. No errors or anything like you describe, it works pretty perfectly. I just emulated RC2, installed the mod, and did the replacement edit in "display.template.php", which was the only failed test, and it worked wonderfully. They don't show up on the Dynamic Memberlist, though they do show up on the default memberlist.
Title: Re: Subaccounts
Post by: ishy on May 23, 2010, 06:20:23 AM
Quote from: Gen200 on May 23, 2010, 02:48:58 AMActually, I got Subaccounts fully functional in RC3 with just that second replacement. No errors or anything like you describe, it works pretty perfectly. I just emulated RC2, installed the mod, and did the replacement edit in "display.template.php", which was the only failed test, and it worked wonderfully. They don't show up on the Dynamic Memberlist, though they do show up on the default memberlist.

Yes, me too. It's working quite happily now.
Title: Re: Subaccounts
Post by: Sabre™ on May 23, 2010, 11:28:06 AM
Very nice mod.
I made a few alterations to suit myself and of course the few edits needed to function on RC3, and I am very happy with the result.

Good job SlammedDime, and thanks mate :)
Title: Re: Subaccounts
Post by: C4G-TK on May 24, 2010, 05:39:17 PM
I did emulate RC2 in my install, but I see why my edit in ManagePermissions.php isn't needed now.  I went in and placed it earlier in the code where "'modify_replies'," was located and not later on in the code when it was located again. 

Ultimate Profile adds a line between the...
'move_own',
'modify_replies',

and I never checked, so I just placed it where I first came across "'modify_replies',".




QuoteUpdate:
The only slight problem are the three textboxes under the Manage SubAccounts portion under PROFILE.  After selecting a new name, the box goes blank when you hit tab to go to the next box, so you can't see what you typed and you aren't aware that you are on the next block.  But, you are where you select the password.  But, once you hit tab for a second time, it does it again, so you don't realize you went to the third box.  After typing in the password a 2nd time, you tab and hit CREATE LINK and it worked as shown.  It just might be a little confusing to most people since you aren't aware where you are in the process.

What I mean is that you can't tell that your cursor has moved into the next block when creating a new account name.   So, someone may get confused where they are along in the process.  If your cursor shows up in the textbox, let me know.





Title: Re: Subaccounts
Post by: Ifaina on May 29, 2010, 05:16:27 AM
How does one Emulate RC2? I've been poking around for an idea of how to do so. Help please?
Title: Re: Subaccounts
Post by: C4G-TK on May 29, 2010, 12:36:52 PM
Quote from: Ifaina on May 29, 2010, 05:16:27 AM
How does one Emulate RC2? I've been poking around for an idea of how to do so. Help please?

Go into ADMIN > PACKAGES

at the bottom of the BROWSE PACKAGES page, you will see a tab called ADVANCED
click on ADVANCED and a larger menu on that page will open

Where it says Emulate, change the RC3 to RC2 and apply or save.

Upload the package as normal and install.

After you are finished, go back and change it back to RC3 and apply/save
Title: Re: Subaccounts
Post by: Ifaina on May 29, 2010, 04:48:47 PM
Bah! For the life of me I can't find the original edits I was supposed to make. I made the change to make it compatible with rc3 but I can't find the other edits I KNOW I was supposed to make.
Title: Re: Subaccounts
Post by: ishy on June 03, 2010, 09:56:59 PM
It was working alright on RC3 for awhile, but now no one can using the top dropdown box to switch.  It's like it partially switches, but doesn't completely. The name shows up in the Who's Online, but you are still on the main account.
Title: Re: Subaccounts
Post by: skeletonkiss on June 04, 2010, 06:13:28 PM
I'm running 2.0 RC3, and just lastnight installed the sub accounts mod (using the fix someone posted.)

Now, when a new member joins or creates a sub account, I receive two emails saying the new member has joined. I'm assuming something got duplicated somewhere, but I have no idea what file to look in.

Can someone help me?
Title: Re: Subaccounts
Post by: Aiko on June 09, 2010, 01:58:46 PM
Since this mod already exists for previous versions, will it still be okay if I offered to pay for an official RC3 upgrade?
Title: Re: Subaccounts
Post by: mirahalo on June 09, 2010, 02:07:29 PM
Quote from: Aiko on June 09, 2010, 01:58:46 PM
Since this mod already exists for previous versions, will it still be okay if I offered to pay for an official RC3 upgrade?

the mod can be installed on a RC3 forum, I already did on my,  try to emulete version Rc2 on the package manager, I cant remember clearly but its just two or so minimum changes and you can do that by hand.
Title: Re: Subaccounts
Post by: Aiko on June 09, 2010, 02:22:21 PM
This was done, but the error log was receiving so many errors due to it regardless. Also the functioning was not as smooth as with RC2.
Title: Re: Subaccounts
Post by: ishy on June 09, 2010, 03:47:43 PM
You don't need to do all the edits with RC3.  Emulate to RC2 when installing, then just do the display template edit and the theme edits. It works just fine, without errors. See Gen's post (http://www.simplemachines.org/community/index.php?topic=347710.msg2639789#msg2639789).
Title: Re: Subaccounts
Post by: Aiko on June 09, 2010, 09:46:05 PM
Okay, thanks ishy, I will give the installation with the edits another try.

Does anyone know what will happen to the accounts made via this mod, once another SMF upgrade is released. Will they be lost?
Title: Re: Subaccounts
Post by: mirahalo on June 10, 2010, 09:59:12 AM
no, the accounts made with this mod are valid accounts in smf, meaning there are in table smf_members  and  no data in tables is lost when they release an upgrade.  besides you always can backup your data before any changes ;)
Title: Re: Subaccounts
Post by: L.G.S on June 15, 2010, 03:08:57 PM
Can other members see if a user has sub accounts?
Title: Re: Subaccounts
Post by: cosoa on June 15, 2010, 04:38:24 PM
Two questions:

Firstly, I am building a theme based on DzinerStudio's DS_Natural for my RPG, and the Subaccounts switching menu isn't included on the main template. I want to put it here:



Can someone give me a hint as to how to do this?

Secondly,  is it possible to get a player's subaccounts listed in the sidebar (under their avatar) when they're posting under their main account? In the same vein, is it possible to list a player's main account under their avatar when they're posting under a subaccount? This would be really helpful to me!
Title: Re: Subaccounts
Post by: FireDitto on June 16, 2010, 05:08:00 AM
I run EzPortal, but I've a similar question to that of Cosoa above;

How would I go about having the account drop down appear as indicated in the image below?

Thanks =)
Title: Re: Subaccounts
Post by: C4G-TK on June 16, 2010, 11:18:44 AM
Most of the time, I've found it's pretty easy to move things around to your liking by parsing the mod with the mod parser and then looking at the edits that are done to the template files.  Then, taking the edit that corresponds to that specific thing you want changed and moving it to where you want.

But, as far as the portal items, I'm not sure.
Title: Re: Subaccounts
Post by: cosoa on June 16, 2010, 11:56:04 AM
FireDitto's solution would work for me too, if it's any easier to achieve.

I think I might have begun to find a way, but it's not working. In the default theme, this goes in index.template.php around the $settings bits:

$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>';
}


And this calls up the dropdown box:

$context['subaccount_dropdown'],

But when I tried it, nothing showed up, so I must be missing something. I'll try to parse the mod and see if there's any other edits to make.
Title: Re: Subaccounts
Post by: cosoa on June 16, 2010, 12:06:22 PM
I got it working! Thank you for the advice to parse the mod, worked like a charm.

Find this in index.template.php:

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


replace with:

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


It shows up :)

If you find some way to install it somewhere in the portal block, though, I'd be happy to learn how to do that.
Title: Re: Subaccounts
Post by: C4G-TK on June 17, 2010, 03:24:43 PM
Glad you figured it out.  It's summer, so have been spending my extra time (night/day) at the beach!
Title: Re: Subaccounts
Post by: Caltan on June 17, 2010, 04:00:53 PM
I know with SimplePortal, you can add the account switcher to the portal block by editing the sp_userInfo function in Sources/PortalBlocks.php to add the dropdown code.  I assume other portals would work the same way, by having a function to parse out the relevant user stuff somewhere in their Sources files.
Title: Re: Subaccounts
Post by: cosoa on June 17, 2010, 07:09:30 PM
Well, now I'm having trouble with Simpleportal and subaccounts...when signed into my subaccount, I can't see the portal. No idea why this is happening.
Title: Re: Subaccounts
Post by: FireDitto on June 18, 2010, 12:04:30 AM
Quote from: cosoa on June 17, 2010, 07:09:30 PM
Well, now I'm having trouble with Simpleportal and subaccounts...when signed into my subaccount, I can't see the portal. No idea why this is happening.

Is your Sub a different user group? If so, it probably hasn't had the permission added to be able to see the Portal.
Title: Re: Subaccounts
Post by: FireDitto on June 19, 2010, 10:08:13 PM
Hi, I was wondering if you could help me out with an issue I'm having.

I've used this (http://www.simplemachines.org/community/index.php?topic=16190.msg2523327#msg2523327) method to connect 2 forums. I've then installed the Subaccounts mod, and used the same method to link the two mods [forum A's & forum B's subaccount mod] together.

Unfortunately, when I log in, I get this error message:

Unknown column 'mem.is_shareable' in 'field list'

Do you know what might be the cause of this, and/or how I should go about resolving it?

Title: Re: Subaccounts
Post by: NanoSector on July 11, 2010, 03:38:17 PM
Is this still updated for 2.0 RC3?
Title: Re: Subaccounts
Post by: mirahalo on July 11, 2010, 10:12:43 PM
Quote from: 130860 on June 09, 2010, 02:07:29 PM
Quote from: Aiko on June 09, 2010, 01:58:46 PM
Since this mod already exists for previous versions, will it still be okay if I offered to pay for an official RC3 upgrade?

the mod can be installed on a RC3 forum, I already did on my,  try to emulete version Rc2 on the package manager, I cant remember clearly but its just two or so minimum changes and you can do that by hand.
Title: Re: Subaccounts
Post by: NanoSector on July 12, 2010, 03:32:13 AM
Quote from: 130860 on July 11, 2010, 10:12:43 PM
Quote from: 130860 on June 09, 2010, 02:07:29 PM
Quote from: Aiko on June 09, 2010, 01:58:46 PM
Since this mod already exists for previous versions, will it still be okay if I offered to pay for an official RC3 upgrade?

the mod can be installed on a RC3 forum, I already did on my,  try to emulete version Rc2 on the package manager, I cant remember clearly but its just two or so minimum changes and you can do that by hand.
Hm.

I have no idea on how to emulate but I give it a try xD
Title: Re: Subaccounts
Post by: mirahalo on July 12, 2010, 10:21:16 AM
on the packages list, where is located a list of all the installed mods on your forum, below that theres a link:  Advanced   click on that and will appear a field where you could write the smf version you want it to emulate, in this case:  2.0 RC2   click an apply and you will be able to install this mod, when you're done with the installation, click again in Advance and then in Revert  to go back to RC3
Title: Re: Subaccounts
Post by: NanoSector on July 12, 2010, 10:42:39 AM
Quote from: 130860 on July 12, 2010, 10:21:16 AM
on the packages list, where is located a list of all the installed mods on your forum, below that theres a link:  Advanced   click on that and will appear a field where you could write the smf version you want it to emulate, in this case:  2.0 RC2   click an apply and you will be able to install this mod, when you're done with the installation, click again in Advance and then in Revert  to go back to RC3
Thanks.
Title: Re: Subaccounts
Post by: NanoSector on July 12, 2010, 10:44:51 AM
Hm?

When emulating it shows the Stop Spam mod instead of the Subaccounts mod readme....
Title: Re: Subaccounts
Post by: FireDitto on July 25, 2010, 08:32:13 AM
Quote from: jkrlvgn on November 25, 2009, 10:35:00 PM
Quote from: Afro on November 19, 2009, 07:35:06 AM
Quote from: poolhall on November 17, 2009, 07:59:05 PM
Great mod, SlammedDime, congratulations!

I have a minor problem with the mod: when I switch to or from a subaccount on the forum index page, I am being redirected to /Themes/default/images/blank.gif. This doesn't happen if I switch from other locations.

i get the same error if i want to role back to the parent/admin account

Just to mention, it seems as if this issue occurs for me when installed with the "Member Color Link" mod installed.  Something doesn't jive well...still investigating, but...narrowed it down to that.


Could we please get some help with this? I'd really love to fix it up, as it's driving me insane ><;; and I've thus far been unable to find out what needs fixing.
Title: Re: Subaccounts
Post by: zushiba on July 26, 2010, 12:37:11 PM
I've packed the RC3 fix into an installable mod. I obviously take no responsibility if for this thing and if it lights your server on fire and kills god then your kind of SOL. It worked for me in 2 tests, and as always the dropdown refuses to work in any custom themes so you'll have to do that yourself.


Got tired of waiting for someone else to do this and modding it myself every install :P
Title: Re: Subaccounts
Post by: FireDitto on July 28, 2010, 08:29:47 AM
Quote from: zushiba on July 26, 2010, 12:37:11 PM
I've packed the RC3 fix into an installable mod. I obviously take no responsibility if for this thing and if it lights your server on fire and kills god then your kind of SOL. It worked for me in 2 tests, and as always the dropdown refuses to work in any custom themes so you'll have to do that yourself.


Got tired of waiting for someone else to do this and modding it myself every install :P


Awesome... But does it avoid the blank.gif issue? :P :P
Title: Re: Subaccounts
Post by: zushiba on July 28, 2010, 09:11:56 AM
Considering I haven't been following the thread other than to find the fix for RC3 so I don't know what that is. I'm going to say no, it doesn't. All it does is act like a valid RC3 mod and install to the point of being functional.
Title: Re: Subaccounts
Post by: FireDitto on July 29, 2010, 12:40:21 AM
*laughs* I was just teasing you.

I do appreciate the update though, it'll make things that little bit easier.
Title: Re: Subaccounts
Post by: C4G-TK on August 09, 2010, 02:10:47 PM
I've been trying to work out this one little kink with the mod, but can't get it to work.
The mod itself is working, but because of the color of the textarea, it just makes it difficult to use.

1) When creating a new account, the Account Name is correct until you tab.  Then, it changes the box to white with a white font making the input not seen.

2) The password and confirm password boxes are white with a white font from the beginning which once again makes the info you type unable to be seen.  Then, it stays white once you tab.

I've solved this problem with a different mod, but can't seem to work it out with this one.  I would really appreciate some help if someone has the time.

Thanks.

Title: Re: Subaccounts
Post by: Enforcer83 on August 18, 2010, 12:51:03 PM
Here is an interesting problem.  Why is the table for the Subaccount doing what it is doing in the attached screenshot?  Is there something I need to modify to correct it?

Board Version: 2.0 RC3
Theme: default Curve

Title: Re: Subaccounts
Post by: zushiba on August 18, 2010, 01:43:35 PM
Usually that's a problem with custom themes, the CSS not being installed correctly. Without access to the actual page I can't really say much more.
Title: Re: Subaccounts
Post by: NanoSector on August 18, 2010, 03:11:25 PM
Quote from: zushiba on August 18, 2010, 01:43:35 PM
Usually that's a problem with custom themes, the CSS not being installed correctly. Without access to the actual page I can't really say much more.
It also happened to me.
It is the default theme: Curve.
Title: Re: Subaccounts
Post by: Enforcer83 on August 19, 2010, 06:33:20 AM
My site is: community.starfleetintel.eu

I have created a basic level account for use by those wanting to help me troubleshoot (PM me for details) or I can post any files that may be needed to this thread.
Title: Re: Subaccounts
Post by: FireDitto on September 10, 2010, 05:39:18 AM
I believe this [below] is the code where I should be putting some code from the Subaccounts mod, in order to have the drop down menu appear in it... however, none of the combinations and attempts I've made have been even slightly successful...

Any help would be deeply appreciated.

<span class="smalltext">
<a href="', $scripturl, '?action=reminder">',$txt['ezp_loginbox_forgot'],'</a>
</span>
';
}
else
{
// Show basic member information

// Avatar
if (!empty($context['user']['avatar']))
echo $context['user']['avatar']['image'], '<br />';

/// Member Name
echo $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b><br />';


// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<b>', $txt['ezp_maintain_mode'], '</b><br />';


echo $txt['ezp_userbox_pm'] . ' <a href="', $scripturl, '?action=pm">' . $context['user']['messages'] . '</a> ' .  ($context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . ' ' . $txt['ezp_userbox_pm_new'] .  '</strong>]' : '') . '<br />';


if (!empty($context['unapproved_members']))
echo '
', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=admin;area=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '<br />';

echo '
<a href="', $scripturl, '?action=unread">', $txt['ezp_userbox_unread_posts'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['ezp_userbox_unread_replies'] , '</a><br />';

if (isset($modSettings['gallery_max_filesize']))
{
// My Images Link
echo '<a href="', $scripturl, '?action=gallery;sa=myimages;u=' . $user_info['id'] . '">', $txt['ezp_userbox_myimages'], '</a><br />';
}
if (isset($modSettings['down_set_files_per_page']))
{
// My Files Link
echo '<a href="', $scripturl, '?action=downloads;sa=myfiles;u=' . $user_info['id'] . '">', $txt['ezp_userbox_myfiles'] , '</a><br />';
}

if (isset($modSettings['class_set_listings_per_page']))
{
// My Listings Link
echo '<a href="', $scripturl, '?action=classifieds;sa=mylistings;u=' . $user_info['id'] . '">', $txt['ezp_userbox_mylistings'] , '</a><br />';
}

echo '<br />';

// Show logout link
if ($userbox  == false)
echo '<a href="', $scripturl, '?action=logout;sesc=', $sc, '">', $txt['ezp_built_logout'], '</a>';

}

echo  $endHtml;

}
Title: Re: Subaccounts
Post by: zushiba on September 10, 2010, 09:59:02 AM
You've got to add  $user_info to your global variables at the top of your index.template.php

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

To be more precise.... I make the following changes.

In function template_init()
global $context, $settings, $options, $txt;
changed to
global $context, $settings, $options, $txt, $user_info;

At the bottom of function template_init() before the closing bracket add.

$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>';
}



Somewhere in function template_body_above()
In the line welcomes your user by name. Looks something like
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
Change to
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span>', $context['subaccount_dropdown'], '</li>

I hope that is helpful.
Title: Re: Subaccounts
Post by: ishy on September 14, 2010, 06:54:07 AM
.
Quote from: jkrlvgn on November 25, 2009, 10:35:00 PM
Quote from: Afro on November 19, 2009, 07:35:06 AM
Quote from: poolhall on November 17, 2009, 07:59:05 PMI have a minor problem with the mod: when I switch to or from a subaccount on the forum index page, I am being redirected to /Themes/default/images/blank.gif. This doesn't happen if I switch from other locations.
i get the same error if i want to role back to the parent/admin account
Just to mention, it seems as if this issue occurs for me when installed with the "Member Color Link" mod installed.  Something doesn't jive well...still investigating, but...narrowed it down to that.
I figured out this problem.  For me, it actually looks like the shop mod is conflicting. The problem is in the Sources/Load.php file.

Here are the two edits:

Find: [Select]
CASE WHEN mem.id_group = 0 OR mg.stars = {string:blank_string} THEN pg.stars ELSE mg.stars END AS stars, mem.password_salt, mem.pm_prefs'Replace With: [Select]         
CASE WHEN mem.id_group = 0 OR mg.stars = {string:blank_string} THEN pg.stars ELSE mg.stars END AS stars, mem.password_salt, mem.passwd, mem.pm_prefs';

My original page had a "mem.money," extra code in there, and it never did the second edit and added "mem.passwd,".
         
Title: Re: Subaccounts
Post by: FireDitto on September 19, 2010, 07:01:10 PM
Okay; I have an HTML block, a PHP block and a Script block in which I can put coding;

What I'd like to know, is exactly how much/what code do I put in it, to cause the drop-down option to appear in the box?

So far I mostly either end up with the coding being visible, or just a plain empty box.

Any help would be magnificent; I've been trying to figure this out for several hours now ><;
Title: Re: Subaccounts
Post by: zushiba on September 19, 2010, 09:02:47 PM
Can you attach your index.template.php? I can show you directly.
Title: Re: Subaccounts
Post by: FireDitto on September 20, 2010, 12:25:52 AM
I don't want it in the Index template. I have it there already, but it's redundant, since I've hidden the upper information center in favour of a PortaMx User Box.

Above the User Box, I can have any of the three I listed: HTML, PHP or Script, in which I want to know what coding i need to put, to have the Drop Down appear in that box.


I tried putting the Drop Down under the User Box [see attached; line 205 start] but all I've gotten is the Drop Down menu available, but it won't change the account. So I'd either like it to work, or for someone to help me find what kind of coding has to be put in a HTML/PHP/Script box.


The Screen Shot shows the Script Box and the code I have within it, and what it looks like in the upper corner, above the User Box.

The Drop down that can be seen above the LOG OUT option, is what the coding in the user_login.php has created, but it won't allow for changing. It doesn't activate the change when the "Switch Account" is changed...
Title: Re: Subaccounts
Post by: zushiba on September 20, 2010, 12:50:37 AM
Well offhand I don't see you passing $user_info into your globals for pmxc_ShowContent and I'm not really sure what you're doing with the elseafter the code to build $user_info['subaccounts']. Is that actually echoing out the dropdown at all? Cause it doesn't look like it.
Title: Re: Subaccounts
Post by: FireDitto on September 20, 2010, 12:58:28 AM
... that all went totally over my head.


I don't know how to code. I just copy other portions of code, and adjust it until it works for what I want; hence, all I've done is copy the layout of previous coding in that php document, and the SubAccount coding -- Getting it to show up is as far as I've manged to go, which would be awesome, if all it had to do was sit there and look pretty.
Title: Re: Subaccounts
Post by: zushiba on September 20, 2010, 01:15:07 AM
I've never used PortaMx so I can't be 100% positive about any of this but the first thing I'd try is changing
global $context, $scripturl, $boardurl, $modSettings, $txt;
to
global $context, $scripturl, $boardurl, $modSettings, $txt, $user_info;

Then your "echo $context['subaccount_dropdown']; " should work assuming you place it somewhere correctly.

Since I don't really know what all is going on in this script I don't think
{
echo $context['subaccount_dropdown'];
}

This is actually doing anything for you.
Title: Re: Subaccounts
Post by: FireDitto on September 20, 2010, 01:36:35 AM
Still have the same issue happening; it's there to change the account, but not activating the change.
Title: Re: Subaccounts
Post by: FireDitto on September 20, 2010, 02:01:45 AM
I have the code below in a PHP block, and it causes the drop down to appear... with the same issue as previous; it's just not changing the account when selected as it should be.


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'];
Title: Re: Subaccounts
Post by: FireDitto on September 25, 2010, 07:14:24 PM
I got it to work! Finally :D

I had to remove the code from the Theme/default/display.template.php because it was clashing with the code I put in the PHP block. Removing it, cleared it all up, and it works perfectly =D


>_> I hate it when its something really small and "obvious" :P
Title: Re: Subaccounts
Post by: demagpie on September 27, 2010, 03:03:19 PM
I experienced a fail in the same area as this fix (quote below for reference):

Quote from: SlammedDime on November 14, 2009, 06:26:29 PM
Quote from: PalmBeachPreps on November 14, 2009, 11:08:45 AM
This is a great mod!  However, I'm getting an error on installation: 2.  Replace  ./Themes/default/Display.template.php  Test failed.

I went to correct that part manually, and found out that the problem is that the code which is supposed to be replaced is not entirely the same.  Should I just add the edits after it which actually change everything?

Display template is attached.
It's because of the WYSIWYG editor you installed.  Use this edit instead...
Code (Find) Select
<div id="qr_buttons">

Code (Replace) Select
<div id="qr_buttons">';
if (!empty($user_info['subaccounts']))
{
echo '
<strong>', $txt['use_subaccount'], ':</strong> <select name="subaccount">
<option value="', $user_info['id'], '" selected="selected">', $user_info['name'], '</option>';
foreach($user_info['subaccounts'] as $account)
echo '
<option value="', $account['id'], '">', $account['name'], '</option>';
echo '
</select>';
}

echo '


Same problem, different code?  Below is what I'm seeing (in the same area):

Quote20.      Execute Modification      ./Themes/default/Display.template.php      Test failed
        1.     Replace     ./Themes/default/Display.template.php     Test successful
        2.     Replace     ./Themes/default/Display.template.php     Test failed

And below is the code that failed:

Find[Select]
<textarea cols="75" rows="7" style="', $context['browser']['is_ie8'] ? 'max-width: 95%; min-width: 95%' : 'width: 95%', '; height: 100px;" name="message" tabindex="1"></textarea><br />
Replace[Select]
<textarea cols="75" rows="7" style="', $context['browser']['is_ie8'] ? 'max-width: 95%; min-width: 95%' : 'width: 95%', '; height: 100px;" name="message" tabindex="1"></textarea><br />'; if (!empty($user_info['subaccounts'])) { echo ' <strong>', $txt['use_subaccount'], ':</strong> <select name="subaccount"> <option value="', $user_info['id'], '" selected="selected">', $user_info['name'], '</option>'; foreach($user_info['subaccounts'] as $account) echo ' <option value="', $account['id'], '">', $account['name'], '</option>'; echo ' </select>'; } echo '


I attempted to install this mod on 2.0 RC3 but used the option to emulate version 2.0 RC2.  It seemed to work, other than that one fail but I chickened out when the Admin panel warned me I could crash... I haven't actually installed any packages or mods except a theme template ("angel fall first") so I can't think that it would be an incompatibility issue unless there's something else I should have installed first.

If you know what I need to do to overcome this obstacle, I need more than just the proper code: I need to know which file or path (or else what Admin area) to go to, to edit.  Is it the template section of the mod?  Or is it my template that needs fixing?  I searched through the package files.  I have no idea which one failed (even though it's written clearly above haha).

Thanks!
Title: Re: Subaccounts
Post by: FireDitto on September 28, 2010, 08:33:14 PM
Did you set your forum to emulate RC2 before installation?

Technically, the Sub Account mod isn't workable for a clean-install of RC3; you need to emulate it to an RC2. If it isn't emulated, you'll get errors.

If you used the RC3 fix that can be found somewhere on the last couple of pages... then I honestly have no idea... Sorry.
Title: Re: Subaccounts
Post by: Draetheus on October 04, 2010, 08:54:13 PM
Is there any way to set permissions so that only the owner of a subaccount can modify the subaccount profile?
Title: Re: Subaccounts
Post by: FireDitto on October 07, 2010, 06:42:08 AM
Is there any possible way to have it, so, if the Parent Account purchases a subscription, that the subscription-member-group passes down to all the Child Accounts associated with that Parent??

At the moment, it's requiring manual changing, and I predict that getting very tiresome.

Thank you, =)
Title: Re: Subaccounts
Post by: Ncen on October 09, 2010, 09:50:07 AM
About this blankimage-error mentioned some pages back, i thought i should tell you guys a theory i have.

Blank-issue is related to scripts.
I can change back and forth between accounts with no problem, but if i try to hide/open the topmenu and does not update the page i get the blank.gif, if i click back and try to switch again, same error, but if i go click on a link and click the link back to the same page, i can switch again.
Isn't the blank.gif image somehow related to the java(?)scripts used to open/hide topmenus and portalblocks?
If you look at the address-bar you can see that the "action=switchaccount" (or something) loads for a second and then gets replaced by "jsoption;var=collapse_header" (or something). At least that's whats happening on my testforum.

Anyway, it's just a theory i had, and someone might have voiced it already, but considering it's an issue worth investigating at some point, my observations might have some tiny value? If not, at least its another post in this thread ;)
Title: Re: Subaccounts
Post by: SlammedDime on October 16, 2010, 04:05:20 PM
Sorry guys, I've been so overwhelmed with other things that I had to push this to the back burner... I have however updated it against the current Trunk of SMF so that when RC4 is released, all I have to do is upload the new zip file to the mod site and it'll be all set.
Title: Re: Subaccounts
Post by: SlammedDime on October 16, 2010, 04:39:25 PM
Just notes for myself...

Quote from: Caltan on November 17, 2009, 05:08:34 PM
Further testing: using  normal modify on an unregistered user's post attributes to the moderator after saving.  Quick edit on the same post (after original reattribution) worked successfully without attribution, as do both normal modify and quick edit on a registered user's post.  The reattributed guest post still maintains the moderator's subaccount dropdown until the post's record is edited in the smf_messages table.
Fixed in next version...
Title: Re: Subaccounts
Post by: SlammedDime on October 16, 2010, 04:42:31 PM
Quote from: Atomic Blaze on December 14, 2009, 11:02:07 PM
When a linked account is shared between two accounts making the shared account unsharable removes all the linked accounts from the other person(s)
This has been fixed...
Title: Re: Subaccounts
Post by: Ncen on October 16, 2010, 04:44:20 PM
Great news :) What about the blank-issues?
Title: Re: Subaccounts
Post by: SlammedDime on October 16, 2010, 04:45:34 PM
I've never been able to replicate the issue on my site, and every time someone has given me a test site with a test account, it has always worked.  I'm afraid without being able to replicate or see an issue in action, I can't help much with it...
Title: Re: Subaccounts
Post by: Ncen on October 16, 2010, 04:48:41 PM
Quote from: Ncen on October 09, 2010, 09:50:07 AM
About this blankimage-error mentioned some pages back, i thought i should tell you guys a theory i have.

Blank-issue is related to scripts.
I can change back and forth between accounts with no problem, but if i try to hide/open the topmenu and does not update the page i get the blank.gif, if i click back and try to switch again, same error, but if i go click on a link and click the link back to the same page, i can switch again.
Isn't the blank.gif image somehow related to the java(?)scripts used to open/hide topmenus and portalblocks?
If you look at the address-bar you can see that the "action=switchaccount" (or something) loads for a second and then gets replaced by "jsoption;var=collapse_header" (or something). At least that's whats happening on my testforum.

Anyway, it's just a theory i had, and someone might have voiced it already, but considering it's an issue worth investigating at some point, my observations might have some tiny value? If not, at least its another post in this thread ;)

If you try clicking open and close on the portal-blocks, and also on the top bar on regular SMF, and then try changing the user, i think you should be able to replicate it. I tried with SimplePortal and regular SMF top bar :)

Edit: On regular i mean the little arrow-thingie that shows the avatar and "Show unread posts since last visit. Show new replies to your posts."
Title: Re: Subaccounts
Post by: SlammedDime on October 16, 2010, 04:51:13 PM
ah yes, it's related to the 'old_url' in the session variable... the mod knows the last page you visited by the session[old_url] variable, which is changed when that function call is made... last time Eliana and I talked about it, I don't recall an easy way to fix it, but I'll look into it again...

Edit: Fixed it, altered the code to check for a HTTP_REFERER header first, and if that doesn't exist, then use old_url.
Title: Re: Subaccounts
Post by: Ncen on October 16, 2010, 05:07:45 PM
Really? :o

Thats great! :D I knew you could do it! *insert happy dance here*
Title: Re: Subaccounts
Post by: FireDitto on October 16, 2010, 06:22:41 PM
Whoo! *dances with Ncen*

That's great, SlammedDime =D
Title: Re: Subaccounts
Post by: FireDitto on November 01, 2010, 04:06:39 AM
Quote from: FireDitto on October 07, 2010, 06:42:08 AM
Is there any possible way to have it, so, if the Parent Account purchases a subscription, that the subscription-member-group passes down to all the Child Accounts associated with that Parent??

At the moment, it's requiring manual changing, and I predict that getting very tiresome.

Thank you, =)

Sorry, I was still wondering if there were a way around this?
Title: Re: Subaccounts
Post by: SlammedDime on November 01, 2010, 07:50:06 PM
It's possible to do, but I don't quite have time at the moment to look at the subscriptions code to modify it.

Mod updated for 2.0 RC4
Title: Re: Subaccounts
Post by: NanoSector on November 06, 2010, 04:00:21 AM
****** yeah!

This is gonna be fun,,,
Title: Re: Subaccounts
Post by: Goss on November 08, 2010, 02:34:03 PM
I installed the mod on my SMF 2.0 RC4 forum and while Administrators can create subaccounts, members do not have access to that options window in their profile.  I've checked the permissions and they do have permissions to create and unlink subaccounts.

Any ideas?

Edit: Okay, it's actually a particular member who is having problems.  She's getting the access denied message on all of her accounts that she has checked so far.  No other members have reported an issue yet.  The permissions are all properly set and other players in the same group can access the panel. 
Title: Re: Subaccounts
Post by: Goss on November 08, 2010, 03:35:36 PM
Oh, and a second issue now.  If a player tries to switch between subaccounts on the board index, it comes up with a white page with the following error:

QuoteNot Found

The requested URL /forum/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.

Switching works on the portal (I'm using Simpleportal) and in boards and seemingly anywhere else on the forum.  Just on the index does it give this error.
Title: Re: Subaccounts
Post by: SlammedDime on November 08, 2010, 04:06:24 PM
I'm still looking into the issue with SimplePortal (I assume you're using my SimpleSEF mod too?)... I'm having to reinstall all of my test SMF installs on my PC due to a rogue script that accidentally deleted them all.  As for the one user having issues... I can't imagine it's an issue with the mod itself (it won't selectively choose a user and just deny them)... have you specifically denied the permission of subaccounts to any group?  If so, is this user a member of any of those groups? (this would include post count groups if you have enabled permissions for them too)
Title: Re: Subaccounts
Post by: Goss on November 08, 2010, 09:51:59 PM
I'm actually not using your SimpleSEF mod.  And from what my members are saying, the error seems to come and go? 

And as for the permissions, I messed around with them a bit and managed to fix some other permission problems.  I'm going to have to wait for this member to come online again though to see if they've been fixed for her too.  But I don't have denied permissions or post count group permissions enabled.
Title: Re: Subaccounts
Post by: Goss on November 10, 2010, 05:48:23 PM
Probably a silly question, but where is the Dual post counts on parent profile option?  I could have sworn I had seen it somewhere before (though I was using the previous version then), but I can't seem to find it now.  I'm using the latest version of the mod.
Title: Re: Subaccounts
Post by: Bugo on November 11, 2010, 02:56:44 PM
Small visual bug in block titles — see screenshot.
Title: Re: Subaccounts
Post by: » мιsтєя мιsғιт « on November 12, 2010, 10:16:50 PM
Can I hjave the install for RC3 please? I'm not upgrading to RC4 .. my forum to heavily modified.
Title: Re: Subaccounts
Post by: SlammedDime on November 12, 2010, 10:18:20 PM
I never had a version for RC3, so I don't have one to give you.  I'd strongly recommend upgrading, regardless of how modded your board is.  There are security issues that were fixed for RC4 that are very important.
Title: Re: Subaccounts
Post by: » мιsтєя мιsғιт « on November 12, 2010, 11:11:55 PM
Oh, dang. Yeah I guess but that would mean uninstalling all my mods and losing all the settings and not to mention all the custom hacks... :| I hate upgrading, lol.
Title: Re: Subaccounts
Post by: Goss on December 11, 2010, 04:05:07 PM
I'm using SMF 2.0 RC4.  We recently went and cleaned out a bunch of inactive accounts on my forum.  This is something we due somewhat regularly for our game.  Basically, we deleted them through the member list in the Admin Panel.  Subaccounts and some parent accounts were deleted.  A few days later I went and looked at our listing of subaccounts and it looked like this (http://i56.tinypic.com/260vo5x.jpg).  As you can see, there seems to be a bunch of blank entries.  Sometimes there is also a subaccount that does not have a parent account listed.  Do you think this is going to make bad things happen to my database?  o.o
Title: Re: Subaccounts
Post by: Mari-chi on December 21, 2010, 08:25:47 PM
When I try to log in with one of the subaccounts, I get the message, "You cannot login with a subaccount. Only the parent account may be used to login."

How can I change the setting so that it allows me to log in with a subaccount? I can't switch between users, because the theme that I have installed won't enable me to edit, or add missing files (ex. boardindex.template.php).

My board's link is http://audeamusrpg.com/forums

If anyone can tell me how I can do either of those (login with a subaccount, or add the dropdown menu on my header which will allow me to switch between my parent account and subaccounts), I would be really greatful.

Thanks :)
Title: Re: Subaccounts
Post by: SlammedDime on December 21, 2010, 10:04:13 PM
Quote from: Goss on December 11, 2010, 04:05:07 PM
I'm using SMF 2.0 RC4.  We recently went and cleaned out a bunch of inactive accounts on my forum.  This is something we due somewhat regularly for our game.  Basically, we deleted them through the member list in the Admin Panel.  Subaccounts and some parent accounts were deleted.  A few days later I went and looked at our listing of subaccounts and it looked like this (http://i56.tinypic.com/260vo5x.jpg).  As you can see, there seems to be a bunch of blank entries.  Sometimes there is also a subaccount that does not have a parent account listed.  Do you think this is going to make bad things happen to my database?  o.o
Looks like I forgot to add some code to remove the links from the subaccounts table... it shouldn't be an issue... the subaccounts likely don't exist any more, but the links to them still exist in a separate table.  It's not detrimental.

Quote from: marijang on December 21, 2010, 08:25:47 PM
When I try to log in with one of the subaccounts, I get the message, "You cannot login with a subaccount. Only the parent account may be used to login."

How can I change the setting so that it allows me to log in with a subaccount? I can't switch between users, because the theme that I have installed won't enable me to edit, or add missing files (ex. boardindex.template.php).

My board's link is http://audeamusrpg.com/forums

If anyone can tell me how I can do either of those (login with a subaccount, or add the dropdown menu on my header which will allow me to switch between my parent account and subaccounts), I would be really greatful.

Thanks :)
This is by-design.  I don't recall the issue off hand, but there was something going screwy when someone tried to log in with a Subaccount rather than the parent so I disabled this ability.

As for adding the drop down to your custom theme, everything is possible, so if it's not working right, you should ask the Theme author why you can't edit or add files to the theme.
Title: Re: Subaccounts
Post by: Mari-chi on December 22, 2010, 09:49:19 AM
Ohh, I see; okay, the part about not allowing people to log in with their subaccounts makes sense. I'm still having difficulty getting in contact with dzine studio. :( I posted two messages on their forum, but no one seems to be responding...

This is a screenshot of the files that came with that particular theme: h t t p : / / i1127.photobucket.com/albums/l635/irinaqueer/misc/f0a50ecb.png (without the spaces in "http://"). As you can see, there are some files missing (ex. "admin.template.php"). Is there anything that can be done for this?

I'd like for regular members to be able to change their own avatars, update info, etc., on their subaccounts. I can, as an admin, but that would be a lot of work. :S



Fixed, after a lot of trial and error + trying to learn the basics of PHP. I think it was mostly the former, though. :P
Title: Re: Subaccounts
Post by: AnOracle on December 23, 2010, 06:48:40 PM
I love this mod, and this weirdness is hardly a deal-breaker, but I though I'd mention it.

I purged some inactive accounts the other day, and noticed this in the "Manage SubAccounts."

The number of blank lines is the same as the number of subaccounts that were purged. I tried today to purge a subaccount before the main account, but it still left a blank line.

http://www.istaisland.com/misc/personal/bug.png
Title: Re: Subaccounts
Post by: SlammedDime on December 24, 2010, 12:28:41 AM
That's the same issue that Goss reported above... it isn't detrimental to the board, its just left over data in a table (and a query that was constructed with a left join instead of a inner join)... i'll get it fixed with the next release of the mod that will be released after the next version of SMF is released (And I'll include some code to fix up those that have the issue)
Title: Re: Subaccounts
Post by: Grimedth on December 30, 2010, 08:32:44 AM


Great mod! :)
A question: is there a way to add the subaccount list to the mini-profile (next to posts)?
Title: Re: Subaccounts
Post by: Kanianlak on January 04, 2011, 06:11:04 PM
Hey there! Great mod, really huge! :)

I have a few questions. I wanted to have not just in parent profiles, to list their subbaccounts, but in subaccount profiles to list their parents. As well as in "post's profiles" (ya know on the left) to list one account's parent. But I can't handle it, some modifications were made, but they did not worked.

I would be very grateful and happy if you could provide me some code for smf 2.0 rc4 to me to get this working :) Thanks! :)
Title: Re: Subaccounts
Post by: impreza on January 05, 2011, 06:22:22 AM
Thanks for a fun twist on it
Title: Re: Subaccounts
Post by: wynnyelle on January 09, 2011, 05:44:33 PM
I have a few questions about this mod before I install it...

We also have the store installed. Would points also go to the main account? They would need to for the way we run things.

Is it obvious from looking at the mini profile, of a sub account, to tell easily who the main account {actual member} is?

Can people still post from their main account alone or do they need to use subs once they make any?

Does a member's postcount tally up on the main account, the sub accounts, or, ideally, both?

Thanks!
Title: Re: Subaccounts
Post by: SlammedDime on January 10, 2011, 12:20:53 PM
Quote from: Groovystar on January 09, 2011, 05:44:33 PM
We also have the store installed. Would points also go to the main account? They would need to for the way we run things.
I can say with almost 99% certainty that they will not.  Every sub account is it's own forum account in it's own right, this mod just changes up some internals of SMF so that the subaccounts don't act like a traditional account.  (ie: if you were to uninstall this mod after creating several subaccounts, those subaccounts would simply be normal forum accounts).

Quote from: Groovystar on January 09, 2011, 05:44:33 PM
Is it obvious from looking at the mini profile, of a sub account, to tell easily who the main account {actual member} is?
If you mean the side of a post as the 'mini profile', then no, it is not listed on the side of a post who the parent account is.

Quote from: Groovystar on January 09, 2011, 05:44:33 PM
Can people still post from their main account alone or do they need to use subs once they make any?
Someone can make a post of any account they own, including the parent or any subaccount.  When editing a post, they can also change the author of that post to one of their other accounts.

Quote from: Groovystar on January 09, 2011, 05:44:33 PM
Does a member's postcount tally up on the main account, the sub accounts, or, ideally, both?
The main account shows two postcounts, one with just that accounts posts, and one with all posts (including subaccounts).  Each subaccount only displays posts for that account.

I'd recommend creating a test board and installing this mod on it to see how it works.  Setting up a WAMP server on your home PC is extremely easy these days.
Title: Re: Subaccounts
Post by: Rotten Apple on January 11, 2011, 09:45:02 PM
First of all, this is definitely an amazing mod (and definitely has made the life of an admin easier XD) and I'm definitely glad to see several security issues fixed on the SMF 2.0 RC4 release!

I'm not sure if this has already been answered before, and if it has my apologies. I'm currently working on creating a custom skin based off of Curve and I'd like to move the main subaccount dropdown to appear above (or below) the linktree. Is this possible? I have a logo that's pretty much covered the area where the subaccount dropdown would appear in, so it'd be more convenient for me (and future users) to see this in a different location. The only actual files I have for this skin is the Curve index.template.php, index.php, and theme_info.xml file, whilst all other files are images, css, and other skin necessities.

Suggestions on what to do?
Title: Re: Subaccounts
Post by: SlammedDime on January 11, 2011, 10:40:43 PM
Just take a look at the edits made to index.template.php to produce the dropdown and replicate that wherever you wish to have it displayed.
Title: Re: Subaccounts
Post by: wynnyelle on January 12, 2011, 01:48:57 AM
Thank you very, very much for getting back to me on this info. Is there a way to mod this account so that store points do tally to the main account as well, and, also, the parent account's name would show up on the sub account's mini profile as "Played by {parent account}" under the subaccount's name or under the avatar or something? This is for an RPG. Or should this request go under the paid requests thingy? Would these mods on this mod be hard to do?

Thanks again for addressing my questions.
Title: Re: Subaccounts
Post by: Rotten Apple on January 12, 2011, 07:40:53 AM
I installed the index.template.php portion of the code on the custom theme (considering this is purely a 'based on' theme), but when I try to insert the last line to where I'd like it to be, I receive a syntax error.

QuoteThe file you tried to save generated the following error:
Parse error: syntax error, unexpected ',' in index.template.php on line 303

I pretty much did something like this along with trying other methods:


   // Show the navigation tree.
   theme_linktree();

' <span>', $context['user']['name'], '</span>', $context['subaccount_dropdown'], '


Now, this is me assuming that the hello greeting before that is what'd appear by default on the original method of installing this mod. I simply want the dropdown to show. Am I doing this correctly? o_o; Also, thanks for answering my questions. It's definitely appreciated.
Title: Re: Subaccounts
Post by: Ncen on January 12, 2011, 09:51:51 AM
I'm not an expert, but perhaps you could try using this instead while waiting for SlammedDime to answer:

   // Show the navigation tree.
   theme_linktree();

echo ' <span>', $context['subaccount_dropdown'], '</span>'

or this, depending on what's on your next line:
   // Show the navigation tree.
   theme_linktree();

echo ' <span>', $context['subaccount_dropdown'], '</span>'';


Although, it might be easier to see if you showed him line 300 to 305. :)
Title: Re: Subaccounts
Post by: NanoSector on January 12, 2011, 10:52:43 AM
Quote from: Ncen on January 12, 2011, 09:51:51 AM
I'm not an expert, but perhaps you could try using this instead while waiting for SlammedDime to answer:

   // Show the navigation tree.
   theme_linktree();

echo ' <span>', $context['subaccount_dropdown'], '</span>'

or this, depending on what's on your next line:
   // Show the navigation tree.
   theme_linktree();

echo ' <span>', $context['subaccount_dropdown'], '</span>'';


Although, it might be easier to see if you showed him line 300 to 305. :)
Neither pieces of code are correct. (I am not the PHP expert here but even I see that lol)
    // Show the navigation tree.
   theme_linktree();

echo ' <span>', $context['subaccount_dropdown'], '</span>';


One ' too much :P
Title: Re: Subaccounts
Post by: Ncen on January 12, 2011, 11:01:14 AM
Quote from: Simple Series team on January 12, 2011, 10:52:43 AM
Neither pieces of code are correct. (I am not the PHP expert here but even I see that lol)
    // Show the navigation tree.
   theme_linktree();

echo ' <span>', $context['subaccount_dropdown'], '</span>';


One ' too much :P

Gosh, sorry about that. *embarrassed* I meant to include just one ' there. Simple Series team is absolutely correct. I should definitely proofread before I post. ^^  Hope that one works!
Title: Re: Subaccounts
Post by: Rotten Apple on January 12, 2011, 11:02:27 AM
Thanks for the help both of you. Simple Series teams correction worked. =D
Title: Re: Subaccounts
Post by: NanoSector on January 12, 2011, 11:11:51 AM
I made worse mistakes in the past ;)

copy($boarddir . '/FTSM.php', '$boarddir . '/backups/FTSM_backup-'. getdate() . '.php')

Notice the '$boarddir. I was like "huh WTF" when I saw the upcoming error lol, commented out the code, opened SMF, made a post with the [php] tag and saw that. Never ever gonna make that mistake again :-[

Anyhow, glad I could help :)
Title: Re: Subaccounts
Post by: MarkLeevE on January 12, 2011, 12:55:06 PM
is this account swithcer? wow this is pretty cool.. i'll try this
Title: Re: Subaccounts
Post by: Mari-chi on January 13, 2011, 07:23:43 AM
Hi!

I downloaded this mod, and it's been working great! I noticed a little problem today, however, and would like to know if that can be fixed. :D

When I choose another account from the dropdown box in the Quick Reply area, it keeps posting as the one I'm logged on. For example:

* Logged in as Test123
* Tries to choose a subaccount called Admin123 from dropdown in Quick Reply
* Clicks 'post' after typing something
* Post shows up as Test123's post, and not Admin123's


I hope I've made sense. :)
Title: Re: Subaccounts
Post by: SlammedDime on January 13, 2011, 06:46:53 PM
Hrm... that is definitely not supposed to happen... anyone else having this issue?
Title: Re: Subaccounts
Post by: Mari-chi on January 15, 2011, 04:00:11 PM
:( Maybe it's just me...? The only other mod I have installed in relation to the quick reply is the AJAX Instant Reply mod.
Title: Re: Subaccounts
Post by: SlammedDime on January 15, 2011, 10:33:25 PM
That would be why... AJAX quick reply doesn't take it into account.  The javascript would have to modified to handle it.  I don't know when I'll have time to look at the code (it's a one line addition to xml_topic.js, but I have to take the time look through the code to see what the contents of that line needs to be).  I'm currently moving and have very little time to hop on here.
Title: Re: Subaccounts
Post by: Kanianlak on January 16, 2011, 04:34:57 AM
Hey there! Great mod, really huge!

I have a few questions. I wanted to have not just in parent profiles, to list their subbaccounts, but in subaccount profiles to list their parents. As well as in "post's profiles" (ya know on the left) to list one account's parent. But I can't handle it, some modifications were made, but they did not worked.

I would be very grateful and happy if you could provide me some code for smf 2.0 rc4 to me to get this working  Thanks!  :)
Title: Re: Subaccounts
Post by: origamikitsune on January 16, 2011, 05:32:45 AM
I just wanted to chime in with a "Nice Mod" comment. :) This is an absolutely beautiful mod. I put on my beta forum and played around with it, and I can't wait until I get it live once I finish my new theme. Much with the kudos!
Title: Re: Subaccounts
Post by: Mari-chi on January 16, 2011, 08:48:07 AM
I uninstalled the AJAX instant reply, and the subaccounts is working as it's supposed to. :D It'd be awesome if we could use it together. :)
Title: Re: Subaccounts
Post by: Mari-chi on January 20, 2011, 03:57:26 PM
Hi again. :)

I deleted an account that had one subaccount, but the subaccount is still being listed as a member.

For example:

Parent Account: Astrid Sonja Johanssen
Subaccount: Mireillo Renard

^ I deleted Astrid's account, and while 'Mireillo Renard' is not showing up on the Member list page, she is being recognised as a member... If I type in 'Mir' in the 'recipient' box when sending a new PM, it will show 'Mireillo Renard' in the dropdown box. I also cannot register a new member named "Mireillo Renard", because the forum thinks it's still an existing member.

How can I fix this? :S
Title: Re: Subaccounts
Post by: SlammedDime on January 20, 2011, 06:22:21 PM
Go to the Mireillo profile and delete the account... (might also have to go into the database and remove the entry in the subaccounts table that links the two accounts).
Title: Re: Subaccounts
Post by: Mari-chi on January 20, 2011, 06:57:54 PM
:3 Used the Pretty URL to figure out the URL of Mireillo's profile. :D

Thanks, SD. :)
Title: Re: Subaccounts
Post by: Rotten Apple on January 24, 2011, 09:47:59 AM
Hello again! =D I noticed while posting about with the mod, that if I'd accidentally post with an account and change the author using a mod, that it would raise the post count of the new author even if the permissions of the forum are set to disable post count increments. The post count increase would only occur with the new author, and I'm uncertain if this is a bug or not? If it's not, can this solution be fixed? If not, that's fine - it's not a big issue on my end.

Also, I'm using 2.0 RC4.
Title: Re: Subaccounts
Post by: SlammedDime on January 24, 2011, 05:41:56 PM
Quoteif I'd accidentally post with an account and change the author using a mod
With 'a' mod?  Do you mean this mod? or another?
Title: Re: Subaccounts
Post by: Rotten Apple on January 25, 2011, 01:10:31 AM
This mod, using the little dropdown that appears while posting in threads.
Title: Re: Subaccounts
Post by: SlammedDime on January 25, 2011, 01:58:45 AM
Sounds like a bug, i recall adjusting post counts when authors change, i might have forgotten to account for this.
Title: Re: Subaccounts
Post by: Mari-chi on January 25, 2011, 11:22:56 AM
Quick question: How do I get the subaccounts to show up as though they were regular members in the Members listing? I happened to come across another site whose layout was shown like this:

http://i1127.photobucket.com/albums/l635/irinaqueer/misc/subaccount_memberlist.png

I only saw an option to display subaccounts in the Members listing in the admin panel, but nothing about the way it's displayed. :S
Title: Re: Subaccounts
Post by: Rotten Apple on January 26, 2011, 08:23:10 AM
Alright, thanks! I figured that it could have been that. It's not much of a big issue though on my end. I'll just have to be more careful what account I'm posting on. XD.
Title: Re: Subaccounts
Post by: Mari-chi on January 27, 2011, 09:25:25 AM
Oh, and one more thing!: New subaccounts seem to inherit the value of their parent accounts' custom profile fields. one of my custom profile fields is called "RPP", and if the parent account has 12 RPP, then any subaccount created by that parent account will also inherit the value "12" for their RPP. Can this be changed? :S
Title: Re: Subaccounts
Post by: Caltan on January 27, 2011, 02:51:42 PM
Quote from: Mari-chi on January 25, 2011, 11:22:56 AM
Quick question: How do I get the subaccounts to show up as though they were regular members in the Members listing? I happened to come across another site whose layout was shown like this:

http://i1127.photobucket.com/albums/l635/irinaqueer/misc/subaccount_memberlist.png

I only saw an option to display subaccounts in the Members listing in the admin panel, but nothing about the way it's displayed. :S

Lol, that's my site.  Small world. :)

To display subaccounts as regular members, revert the edits the mod makes to Themes/default/Memberlist.template.php and Sources/Memberlist.php.  If you haven't installed any other mods since this one that make changes to those files, you can just copy the backup Memberlist.template.php~ and Memberlist.php~ back over. 

QuoteNew subaccounts seem to inherit the value of their parent accounts' custom profile fields. one of my custom profile fields is called "RPP", and if the parent account has 12 RPP, then any subaccount created by that parent account will also inherit the value "12" for their RPP. Can this be changed? :S

I've always observed the behavior that subaccounts inherited the parent account's profile fields; we just replace the text with whatever it should be for the new account, it's never seemed like a big deal.  I assume this is because the mod clones the entire account in order to allow more than one account to use the same email address.
Title: Re: Subaccounts
Post by: Mari-chi on January 27, 2011, 04:29:15 PM
Thank-you so much!! :D
Title: Re: Subaccounts
Post by: SlammedDime on January 27, 2011, 04:48:51 PM
Cloning of profile fields shouldn't be happening (that I remember anyway...) I'll have to take a look.
Title: Re: Subaccounts
Post by: Mari-chi on January 27, 2011, 05:09:49 PM
Hooray! :3
Title: Re: Subaccounts
Post by: Robin1989 on February 17, 2011, 08:09:34 AM
will this see a rc5 update?
Title: Re: Subaccounts
Post by: sodmanccc on February 21, 2011, 06:37:45 PM
any chance we can get a update for rc5
Title: Re: Subaccounts
Post by: Mari-chi on February 21, 2011, 11:34:44 PM
It works for RC5. I believe it takes one or two manual edits, if I remember correctly.
Title: Re: Subaccounts
Post by: sodmanccc on February 22, 2011, 03:07:50 PM
Quote from: Mari-chi on February 21, 2011, 11:34:44 PM
It works for RC5. I believe it takes one or two manual edits, if I remember correctly.

when we use it on smf 2.xrc5 we get high sever load veryy fast it seams to be over loading sever might have to do with it thinking we on rc3.

but yea we turn it on and use it and our sever load jumps over 100-400%
Title: Re: Subaccounts
Post by: SlammedDime on February 22, 2011, 03:57:16 PM
I don't really see how it could be increasing your server load... it doesn't do anything to increase load that I know of.
Title: Re: Subaccounts
Post by: Robin1989 on February 26, 2011, 10:27:34 PM
on the default theme it shows a dropdown to switch accounts next to the members avatar - what php code would i need to create a custom block for simpleportal to display that dropdown as the members avatar etc is hidden on my custom theme so i want to create a block to switch accounts as at the minute the only way to do that on the custom theme is to go into your profile and swap global account.  thankyou for any help
Title: Re: Subaccounts
Post by: Robin1989 on March 02, 2011, 08:34:24 PM
bump anyone have any idea?
Title: Re: Subaccounts
Post by: Spoogs on March 02, 2011, 08:50:07 PM
Check page 13 (not sure if that code will help you but you can take a look)
Title: Re: Subaccounts
Post by: Robin1989 on March 03, 2011, 10:30:41 AM
its ok i got it sorted - plus there isnt a page 13.


however i think i have found a bug - im not sure if its just my forum or a bug in the mod with rc5. when using the drop down on the main forum page and changing acounts there is a 404 but then if you go back to the forum you have changed.

what happens is if your url is just domain.com/forum/ then it works fine but if it is domain.com/forum/index.php it 404's and if its domain.com/forum/index.php? it works fine as well.  it looks like when you choose the dropdown it is removing the index.php from the url and just leaving the action as the 404 link is at domain.com/forum/action=forum


i have simpleportal installed if that makes a difference
Title: Re: Subaccounts
Post by: Arantor on March 03, 2011, 10:33:24 AM
Quote from: Robin1989 on March 03, 2011, 10:30:41 AM
its ok i got it sorted - plus there isnt a page 13.

If you have the default settings for the number of posts per page, this is on page 16, so there is a page 13 ;)

Quote
what happens is if your url is just domain.com/forum/ then it works fine but if it is domain.com/forum/index.php it 404's and if its domain.com/forum/index.php? it works fine as well.  it looks like when you choose the dropdown it is removing the index.php from the url and just leaving the action as the 404 link is at domain.com/forum/action=forum

How did you remove the index.php part?
Title: Re: Subaccounts
Post by: Robin1989 on March 03, 2011, 10:36:47 AM
i didnt remove it it disapears from the url when i change sub accounts - when im browsing the forum normally it shows up. the way i found that the subaccount change didnt cause a 404 when there isnt index.php in the url was i just didnt type index.php when going to the url.
Title: Re: Subaccounts
Post by: Arantor on March 03, 2011, 10:42:38 AM
So, do you have any mods that modify index.php or the URLs in any way?
Title: Re: Subaccounts
Post by: Robin1989 on March 03, 2011, 10:48:19 AM
the only mod i can think of is simple portal as simple portal is now the main index.php and the forum is index.php?action=forum
Title: Re: Subaccounts
Post by: Arantor on March 03, 2011, 10:50:57 AM
OK, what other mods have you got?
Title: Re: Subaccounts
Post by: SlammedDime on March 03, 2011, 11:17:58 AM
Are you using a Shoutbox with SimplePortal?

And as Arantor said, what mods do you have installed?
Title: Re: Subaccounts
Post by: Robin1989 on March 03, 2011, 11:33:10 AM
yes i am using a shoutbox with the portal.

here are the mods installed

1.   Stop Spammer   2.3.9
2.   Uncensored Boards   1.5
3.   Password Strength Meter   1.1
4.   Signature Image Rotator   1.9
5.   ENotify   2.0
6.   Spoiler Tag   0.7.2
7.   SubAccounts Mod   1.0.1
8.   SA FBConnect   1.0 RC4 Rev285
9.   SimplePortal   2.3.3
Title: Re: Subaccounts
Post by: SlammedDime on March 03, 2011, 12:06:13 PM
It might be the shoutbox, but I thought I fixed that, unless it cropped up again.
Title: Re: Subaccounts
Post by: Robin1989 on March 03, 2011, 12:45:31 PM
can you think of a fix in the sub accounts code or a place i could take a look to see if theres any obvious changes to make
Title: Re: Subaccounts
Post by: Spoogs on March 03, 2011, 12:59:20 PM
@SD
Could you please add an option to switch accounts from within the profile area (action=profile) for those of us with custom themes (http://www.blocweb.net/demos/smf20rc4/index.php?theme=11)?
If/when you get the chance/feel like it that is ;) or if you can tell me how to do it thats fine too
Title: Re: Subaccounts
Post by: Goss on March 06, 2011, 10:29:52 AM
Quote from: Goss on November 08, 2010, 03:35:36 PM
If a player tries to switch between subaccounts on the board index, it comes up with a white page with the following error:

QuoteNot Found

The requested URL /forum/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.

Switching works on the portal (I'm using Simpleportal) and in boards and seemingly anywhere else on the forum.  Just on the index does it give this error.

Has there been any updates on this bug?
Title: Re: Subaccounts
Post by: Caltan on March 07, 2011, 10:48:07 AM
Quote from: Spoogs on March 03, 2011, 12:59:20 PM
@SD
Could you please add an option to switch accounts from within the profile area (action=profile) for those of us with custom themes (http://www.blocweb.net/demos/smf20rc4/index.php?theme=11)?
If/when you get the chance/feel like it that is ;) or if you can tell me how to do it thats fine too
Why would you not just add the subaccount dropdown to the custom theme index?
Title: Re: Subaccounts
Post by: AnOracle on March 08, 2011, 12:56:31 PM
Quote from: Groovystar on January 12, 2011, 01:48:57 AM
Is there a way to mod this account so that store points do tally to the main account as well, and, also, the parent account's name would show up on the sub account's mini profile as "Played by {parent account}" under the subaccount's name or under the avatar or something?

It would be awesome if anyone knows how to do this, particularly the "Played by: {parent account}."
Title: Re: Subaccounts
Post by: KensonPlays on March 21, 2011, 11:30:20 AM
BUMP: Could you update this for RC5? Seems some RC4 code that was removed it cannot find in test install! I would love to use this again! Thanks!!
Title: Re: Subaccounts
Post by: KensonPlays on April 01, 2011, 08:43:49 PM
If you add SMF 2.0 RC5 support and allow a different email for subaccounts I will be happy!

/me has a subaccount for his web design business and wants to use a google apps email address, a different one for that subaccount. He even registered normally and linked it and it changed the email to his main account's email address...
Title: Re: Subaccounts
Post by: Nuks on April 26, 2011, 12:58:56 PM
I would love an update RC5 on this one too. Actually i'm not updating to RC5 because of this. SubAccounts is a main feature of my board and i just can't leave it without.
Title: Re: Subaccounts
Post by: NanoSector on April 27, 2011, 12:39:59 PM
Friendly support bump :)

And I thought the author said he waited for SMF 2.0 Gold?
Title: Re: Subaccounts
Post by: Nuks on April 27, 2011, 12:41:32 PM
Quote from: Yoshi2889 on April 27, 2011, 12:39:59 PM
Friendly support bump :)

And I thought the author said he waited for SMF 2.0 Gold?

I didn't see that he waited for SMF 2.0 Gold, my bad. I'll just wait. :)

Thanks !
Title: Re: Subaccounts
Post by: SlammedDime on April 27, 2011, 12:51:21 PM
Sorry guys, I don't think an RC5 update will come... I really want to convert this mod to use SMF's hooks as much as possible and don't have the time right now to look at it.  I'll try to get an update out for 2.0 Final though, even if it doesn't use the hooks system.
Title: Re: Subaccounts
Post by: NanoSector on April 27, 2011, 02:30:21 PM
Quote from: SlammedDime on April 27, 2011, 12:51:21 PM
Sorry guys, I don't think an RC5 update will come... I really want to convert this mod to use SMF's hooks as much as possible and don't have the time right now to look at it.  I'll try to get an update out for 2.0 Final though, even if it doesn't use the hooks system.
I doubt it doesn't, it has been a big success :)

Quote from: Nuks on April 27, 2011, 12:41:32 PM
Quote from: Yoshi2889 on April 27, 2011, 12:39:59 PM
Friendly support bump :)

And I thought the author said he waited for SMF 2.0 Gold?

I didn't see that he waited for SMF 2.0 Gold, my bad. I'll just wait. :)

Thanks !
I'm not sure either, actually :P
Title: Re: Subaccounts
Post by: Nuks on April 28, 2011, 06:48:39 PM
Now we are :) Thanks SlammedDim!
Title: Re: Subaccounts
Post by: darksage on May 04, 2011, 07:04:04 PM
hi

I had tried install this mod on RC5 by using the parse info to RC4 . but when i've tried get on site appears a error saying that the table "subaccounts" dont exist and i created one. but now i dont know what is the table struture and if it need another things.
Title: Re: Subaccounts
Post by: SlammedDime on May 04, 2011, 07:06:43 PM
You'll need to put the add_settings.php file in your root SMF directory and run it so that it will create the table and structure for you.
Title: Re: Subaccounts
Post by: darksage on May 05, 2011, 04:57:51 AM
Hi
when i try run the file add_settings.php i get this error :

"Notice: Undefined index: is_guest in /home/site/public_html/forum/Sources/Load.php on line 567
table "tes_subaccounts" doesn't exist.

at line 567 i have this :


if (!$user_info['is_guest'] && !empty($modSettings['enableSubAccounts']))


Edit:Now its working ;)

But i cant adapt to Mytouch theme :/
Title: Re: Subaccounts
Post by: Goss on May 06, 2011, 07:56:49 AM
I have a question about the (un)shareable functionality.  I've had a few members that have accidentally clicked and made their accounts shareable, so the parent account is no longer indicated for the subaccount.  However, when they try to make their account unshareable again, they are told they don't have permission to create accounts.  On my admin account I have permission to make my own subaccounts shareable and unshareable, but I do not have permission to make anybody else's subaccounts unshareable. 

At the moment, it looks like the only way to fix these player's accounts is to unlink and relink them and then tell them not to click that button anymore.  XD

Is there a way to give admins permission to make somebody else's account unshareable?  Or to allow the parent account to set their own subaccounts to unshareable?
Title: Re: Subaccounts
Post by: SlammedDime on May 06, 2011, 10:49:25 AM
Hrm... I'll have to try and replicate what you're describing, because it doesn't sound like it's working properly.
Title: Re: Subaccounts
Post by: Goss on May 07, 2011, 08:41:01 PM
Oh, I'm using SMF 2.0 RC4 with the security patch if that helps any.
Title: Re: Subaccounts
Post by: Mari-chi on June 06, 2011, 05:28:09 PM
Hi thar. :)

Just wondering how I could get the SubAccount mod to display its display name and not its username?


Thanks<3

ETA: P.S. Is there a way to remove the '(un)share' option from the subaccounts page altogether? I'm still not quite sure what that does, but seeing Goss' problem, I'm kind of afraid a member might click on it out of curiosity, and I won't know how to fix it. XD
Title: Re: Subaccounts
Post by: Eliana Tamerin on June 16, 2011, 06:02:11 PM
Hey, SD, got this working with the Gold release yet?
Title: Re: Subaccounts
Post by: Mikirin on June 21, 2011, 12:10:06 AM
Quote from: Eliana Tamerin on November 12, 2009, 09:41:23 PM
Use the account switcher.


Umm question, I have a paid for theme, and it doesn't show the account switcher. Is there any way to edit this?
Here's what it looks like:
Title: Re: Subaccounts
Post by: Eliana Tamerin on June 21, 2011, 09:52:24 AM
Yes, just look here (http://custom.simplemachines.org/mods/index.php?action=parse;mod=2264;attach=160463;smf_version=2.0_RC4) and perform the edits it specifies for ./Themes/default/index.template.php.

If you have trouble with it, since you paid for the theme, you can also ask on Dziner's support boards.
Title: Re: Subaccounts
Post by: Saintcrow on June 23, 2011, 06:20:15 AM
Does this mod also works for SMF 2.0 ?
Title: Re: Subaccounts
Post by: Nuks on June 23, 2011, 10:20:31 AM
I'm just waiting THIS particular mod for 2.0 to upgrade. Can't wait.
Title: Re: Subaccounts
Post by: Saintcrow on June 23, 2011, 12:13:35 PM
figure it out... where you Install your packages go to advanced options and write 'SMF 2.0 RC4' then it will work ! You just need to do one edit by your self =)
Title: Re: Subaccounts
Post by: Ncen on July 14, 2011, 08:57:07 AM
*nevermind this*
Title: Re: Subaccounts
Post by: wynnyelle on July 23, 2011, 06:04:49 PM
I am looking for someone willing to do a custom form of this mod for my forum. Yes I am willing to pay a lot.

PM me please or answer on here if you are interested. The alterations include, mainly, putting a "Played by {main account}" under all the sub accounts for that main account, sending store points to the main account rather than the sub accounts {but postcount done under sub accounts stays for the sub accounts} and not including sub accounts under logged-in-recently stats. {Only main accounts would be included.} This one is less important than the other two.

There are a few more details, this is the main gist of it.
Title: Re: Subaccounts
Post by: wynnyelle on July 25, 2011, 04:19:59 AM
Yeah so anybody at all who would like to do this custom work please let me know, please and thank you!
Title: Re: Subaccounts
Post by: PC-CAR on July 25, 2011, 03:50:33 PM
Hi,

It's possible to merge the posts of a Subaccount if we merge this account to a normal account?

Thanks
Title: Re: Subaccounts
Post by: MacTrom on July 30, 2011, 04:13:33 PM
Is there plans to upgrade this to 2.0 release?

I'm running an RPG site as well, and one of my members offered this as a potential improvement.
Title: Re: Subaccounts
Post by: Mari-chi on July 31, 2011, 02:14:09 PM
It's compatible with 2.0, MacTrom. Just emulate whatever version you need in the package manager area.
Title: Re: Subaccounts
Post by: MacTrom on August 01, 2011, 09:29:43 PM
Quote from: Mari-chi on July 31, 2011, 02:14:09 PM
It's compatible with 2.0, MacTrom. Just emulate whatever version you need in the package manager area.

I reverted to 2.0RC4 and it allowed me to test the install but then I get a ton of failures so I'm not installing until this is rated for 2.0 release.
Title: Re: Subaccounts
Post by: Caltan on August 02, 2011, 09:51:32 AM
It installed just fine for me on 2.0 emulating RC4; the only errors I got were the same ones I always get, relating to adding the account dropdown to my custom index.template.php (which is easy to install by hand).

Sounds like you have other mods that are conflicting with the install, which means that an updated package won't really help you.  I'd suggest clicking the popup links next to each error to see why it's failing -- it could be really easy stuff that you can just paste around by hand.
Title: Re: Subaccounts
Post by: studiowi33 on August 16, 2011, 02:57:15 AM
Hi all-
I installed this pretty easily but now I get a boatload of errors in my error log. It is being generated by:


http://***************.cz.cc/index.php?topic=1246.0
8: Undefined index: is_shareable
File: /home/theozcc1/public_html/Sources/Load.php
Line: 1368


and here is the code:

1362: 'group_stars' => str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($profile['stars'][1]) ? $settings['images_url'] . '/' . $profile['stars'][1] : '') . '" alt="*" />', empty($profile['stars'][0]) || empty($profile['stars'][1]) ? 0 : $profile['stars'][0]),
1363: 'warning' => $profile['warning'],
1364: 'warning_status' => !empty($modSettings['warning_mute']) && $modSettings['warning_mute'] <= $profile['warning'] ? 'mute' : (!empty($modSettings['warning_moderate'])   && $modSettings['warning_moderate'] <= $profile['warning'] ? 'moderate' : (!empty($modSettings['warning_watch']) && $modSettings['warning_watch'] <= $profile['warning'] ? 'watch' : (''))),
1365: 'local_time' => timeformat(time() + ($profile['time_offset'] - $user_info['time_offset']) * 3600, false),
1366: 'subaccounts' => $profile['subaccounts'],
1367: 'is_subaccount' => !empty($profile['id_parent']),
==>1368: 'is_shareable' => $profile['is_shareable'],


Anyone know what I need to do with that pesky line 1368 to make these errors go away?

I'd appreciate any help.

Thanks for looking.

-s.w
Title: Re: Subaccounts
Post by: ATLANTIS29 on August 22, 2011, 10:29:03 AM
think im gonna wait for 2.0 compatibility cos with 8 forums to do will take ages for me
Title: Re: Subaccounts
Post by: rebekahc on August 26, 2011, 12:42:50 AM
I'm using SMF 2.0 and I emulated 2.0 RC4 to install this mod and it works well.  The only issue I'm having is with the buttons and icons for merge, unlink, delete, etc.  None of the images work and the only clickable choices I get in each sub-account management box are the delete and merge functions - they're clickable and work but still no images.  I think the issue is with the theme I'm using because when I switch my profile to the SMF Curve default everything is fine.  I'm using a color variation of the Curve theme.  Can you please tell me what I might need to change so that I can get the buttons to work?
Title: Re: Subaccounts
Post by: zushiba on August 26, 2011, 02:19:55 AM
Quote from: rebekahc on August 26, 2011, 12:42:50 AM
I'm using SMF 2.0 and I emulated 2.0 RC4 to install this mod and it works well.  The only issue I'm having is with the buttons and icons for merge, unlink, delete, etc.  None of the images work and the only clickable choices I get in each sub-account management box are the delete and merge functions - they're clickable and work but still no images.  I think the issue is with the theme I'm using because when I switch my profile to the SMF Curve default everything is fine.  I'm using a color variation of the Curve theme.  Can you please tell me what I might need to change so that I can get the buttons to work?

The CSS for the images and the icons were not uploaded properly upon installation. You have to add the following css to your index.css in your current active theme.
#subaccount_list .subaccount
{
width: 200px;
margin: .3em;
padding: .5em;
float: left;
}

#subaccount_list ul li
{
line-height: 1em;
height: 1em;
margin: 2px 0;
overflow: hidden;
padding: 5px;
text-align: center;
border: 1px solid #ccc;
}

#subaccount_list  .name
{
font-size: 1.3em;
}

#subaccount_list .profile_buttons li, #subaccount_list .action_buttons li, .subaccount_icons li
{
border: none;
float: left;
margin: 0 .3em;
padding: 0;
height: 20px;
}

.subaccount_icons img
{
vertical-align: middle;
}

#subaccount_list .action_buttons
{
height: 1.5em;
}


And then upload subaccount_delete.gif, subaccount_merge.gif, subaccount_parent.gif, subaccount_share.gif, subaccount_split.gif and subaccount_unshare.gif to your themes image directory.
You can find those images either in your default theme image folder where they should have been placed already by the installer or in the subaccount addon zip file, just extract it and upload those images to the right folder.
Title: Re: Subaccounts
Post by: rebekahc on August 26, 2011, 10:10:33 AM
Thank you so much!
Title: Re: Subaccounts
Post by: Mari-chi on August 26, 2011, 10:51:25 AM
Hmmm. Just a quick question. Has anyone figured out where this feature is?:

Quote
  • Post and edit as parent or any subaccount

I'm assuming that means that whichever account you're logged in as (parent or subaccount), you can edit any posts of your parent/subaccounts. Am I being coherent? *Cough*
Title: Re: Subaccounts
Post by: Eliana Tamerin on August 26, 2011, 05:48:34 PM
Yes, there is. Unless your theme has it's own Display.template.php or Post.template.php file (in which case, you'll need to make the mod's edits on there), there is a dropdown menu on both Quick Reply and the full Post screen to let you choose which account to post with. On Quick Reply, it's right next to the Post/Preview(/Spell Check) buttons, and on the Post page it's above the Subject line.

Hope that helps. Remember, if neither of these show up for you, the mod may not be enabled or you may need to manually edit the files in question to make the mod work properly on your theme.

However, you cannot edit the posts made by your subaccounts unless you have permission to edit ANY post. You will need to switch to the particular account that made the post in order to edit it.
Title: Re: Subaccounts
Post by: Mari-chi on August 26, 2011, 06:33:09 PM
QuoteHowever, you cannot edit the posts made by your subaccounts unless you have permission to edit ANY post. You will need to switch to the particular account that made the post in order to edit it.

Yeah I was wondering about this one. My theme doesn't have its own display.template.php or post.template.php, so there were no worries on that front when first installing.

The wording confused me is all. :) Would be a cool thing to have though! Thanks for the reply.
Title: Re: Subaccounts
Post by: ariescapes on September 23, 2011, 04:29:37 PM
Started a re-install after the new update forced me to re-install everything. And even after editing all the failed tests (Yes, I set it to RC4), I received this issue.

QuoteFatal error: Cannot redeclare template_callback_subaccount_group_settings() (previously declared in /home6/sapphir3/public_html/walkingwiddershins/Forum/Sources/Load.php(2151) : eval()'d code:2134) in /home6/sapphir3/public_html/walkingwiddershins/Forum/Sources/Load.php(2151) : eval()'d code on line 2154

This has basically kept me from doing 'anything' in the Admin panel. I have tried uploading a stock Load.php file, even the subaccount files... I have no idea how to fix this error.

Help?
Title: Re: Subaccounts
Post by: Goss on September 24, 2011, 01:26:28 AM
I'm using SMF 2.0

Has anybody managed to get the list of subaccounts and subaccount posts to display on Ultimate Profile?  I recently installed it on my test forum and have been messing with the code to try and get the subaccounts to show on the profile, but I haven't had any luck yet. 

I added the following to UltimateProfile.template.php (with surrounding code for reference):

// Any custom fields for standard placement?
if (!empty($context['custom_fields']))
{
$shown = false;
foreach ($context['custom_fields'] as $field)
{
if ($field['placement'] != 0 || empty($field['output_html']))
continue;

if (empty($shown))
{
echo '
<dl>';
$shown = true;
}

echo '
<dt><strong>', $field['name'], ':</strong></dt>
<dd>', $field['output_html'], '</dd>';
}

if (!empty($shown))
echo '
</dl>';
}

// This is nasty, but hey, it works...

if (!empty($context['member']['subaccounts']) && !empty($modSettings['subaccountsShowInProfile']))
echo '<dt>', $txt['subaccounts'], ':</dt>
<dd><a href="', $scripturl, '?action=profile;u=', implode('</a>, <a href="' . $scripturl . '?action=profile;u=', array_map(create_function('$id,$account', 'return $id . \'">\' . $account[\'name\'];'), array_keys($context['member']['subaccounts']), $context['member']['subaccounts'])), '</a></dd>';

echo '
</div>
<span class="botslice"><span></span></span>
</div>
</div>';

return true;
}


But it doesn't display anything.  When Ultimate Profile is turned on, it seems to switch from Profile.template.php to UltimateProfile.template.php.  Is there maybe some kind of connection I'm missing to make the above work in a different template?

Thanks for any help!
Title: Re: Subaccounts
Post by: Eliana Tamerin on September 24, 2011, 09:50:51 AM
Ensure that all your globals are declared. Both context and modSettings need to be.
Title: Re: Subaccounts
Post by: ariescapes on September 30, 2011, 12:20:47 PM
I fixed the first error - did a complete re-install. But I re-installed the old database to keep posts and account information.

Problem is, the Subaccounts aren't linked with the adult accounts outside the listed 'subaccounts' in the admin panel. And when making new ones it basically just registers a new account instead of connecting it to the adult account.

How can I reconnect the accounts? Is it a database issue?
Title: Re: Subaccounts
Post by: Eliana Tamerin on September 30, 2011, 12:53:27 PM
As an admin, you should be able to go to someone's profile and go into the Manage Subaccounts screen (as you would their Account Settings or Forum Profile settings, etc), and reconnect accounts from there.
Title: Re: Subaccounts
Post by: ariescapes on September 30, 2011, 12:58:57 PM
Problem with that is I get this error:
"The following error(s) occured:
The selected username/display name has already been taken."
Title: Re: Subaccounts
Post by: Shay5422 on October 24, 2011, 08:26:17 PM
Hello,

I have been trying to install this on a custom theme for a 2.0 RC4 forum.  It has installed fine except for the index.template file with the new theme.  I have figured out what the problems are, but since I know nothing about this type of coding, I cannot figure out how to make the manual edits work.  I tried to do so on a test forum under the hosting server I have and I managed to cause major problems with my attempts.   I would very much like to not blow up my own site.  :P 

The two issues are below.  Any help would be greatly appreciated.  The rest of the mod is installed fine.  I can create subaccounts, I just can't get the drop down box to load.

Quote
   /* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
   $settings['require_theme_strings'] = false;

The mod can't install the code that goes after this because in my theme, this setting is set to 'true'.  I tried to add it in manually and I keep getting a parse error that there is a space or a ' that is wrong. 

The second spot is:

Quote

         <li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>

again, my theme coding is different.  It doesn't have that code, but this instead:

Quote
  {
                echo '
                                                        ', $txt['hello_member'], ' <b>', $context['user']['name'], '</b>';

Again, I have tried to edit in the new coding and I cannot make it work. 

Does anyone have any ideas?  I've attached the whole index.template file in case that helps. 
Title: Re: Subaccounts
Post by: Songtress on November 01, 2011, 10:15:25 AM
I have a board that is 2.0.1, nothing been heavily done to it (Yet), what's the process/procedure for making the Mod function, since when looking for it I don't see a version that's compatible.

Is there a way to make the mod function with the update board?
Title: Re: Subaccounts
Post by: Mikirin on November 06, 2011, 11:23:31 PM
I'm using the Glacier Theme (http://www.simplemachines.org/community/index.php?topic=456273.0).
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?
Title: Re: Subaccounts
Post by: Goss on November 08, 2011, 12:45:36 PM
I'm using SMF 2.0.1 and whenever I visit the memberlist, I've been getting a number of this error in my error log:

QuoteType of error: Undefined
http://markedrp.com/forum/index.php?action=mlist8:
Undefined index: 1097
File: .../markedrp.com/forum/Themes/default/Memberlist.template.php (main sub template - eval?)
Line: 135

Just the undefined index number keeps changing. 

This is the section of code around line 135:
if (!empty($member['subaccounts']) && !empty($context['subaccounts_online']))
{
$subaccountString = '';
foreach($member['subaccounts'] as $account)
line 135 ------------> $subaccountString .= ', <img style="margin-bottom: -2px;" src="' . $context['subaccounts_online'][$account['id']] . '" />&nbsp;<a href="' . $scripturl . '?action=profile;u=' . $account['id'] . '">' . $account['name'] . '</a>';
$subaccountString = substr($subaccountString,2);
echo '
<tr>
<td align="left" class="windowbg2" colspan="', $context['colspan'], '"><div class="smalltext align_left">', $txt['subaccounts'], ': ', $subaccountString, '</div></td>
</tr>';
}


Any ideas?
Title: Re: Subaccounts
Post by: 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?
Title: Re: Subaccounts
Post by: Goss on December 03, 2011, 07:02:15 AM
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?
Title: Re: Subaccounts
Post by: Goss on December 13, 2011, 03:49:18 PM
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.
Title: Re: Subaccounts
Post by: Telechamus on December 20, 2011, 10:26:21 AM
Hi, my forum version is 2.0.1, I'm wondering how to make this mod work on my version? Thanks
Title: Re: Subaccounts
Post by: 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*
Title: Re: Subaccounts
Post by: NanoSector on January 09, 2012, 03:11:17 PM
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.
Title: Re: Subaccounts
Post by: Robert. on January 09, 2012, 03:12:09 PM
I agree with Yoshi. Did you try version emulation?
Title: Re: Subaccounts
Post by: Sheda on January 09, 2012, 04:10:45 PM
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. :(
Title: Re: Subaccounts
Post by: Sheda on January 10, 2012, 05:26:37 PM
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.
Title: Re: Subaccounts
Post by: Sheda on January 12, 2012, 11:36:04 AM
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. ^^
Title: Re: Subaccounts
Post by: Nuks on January 24, 2012, 12:43:00 AM
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. :)
Title: Re: Subaccounts
Post by: Llyssa on January 28, 2012, 02:11:13 PM
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. :)
Title: Re: Subaccounts
Post by: Sheda on January 29, 2012, 01:28:55 PM
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.
Title: Re: Subaccounts
Post by: 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.

Any help you can offer would be greatly appreciated.
Title: Re: Subaccounts
Post by: Sheda on February 07, 2012, 08:44:52 AM
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?
Title: Re: Subaccounts
Post by: ashkir on February 14, 2012, 03:03:27 PM
had to manually install it for 2.0.2 works beautifully. Thanks!
Title: Re: Subaccounts
Post by: FireDitto on February 18, 2012, 05:17:34 AM
Quote from: Mikirin on November 06, 2011, 11:23:31 PM
I'm using the Glacier Theme (http://www.simplemachines.org/community/index.php?topic=456273.0).
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.
Title: Re: Subaccounts
Post by: Llyssa on February 21, 2012, 08:14:41 PM
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
Title: Re: Subaccounts
Post by: Sheda on February 22, 2012, 12:46:30 PM
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! :)
Title: Re: Subaccounts
Post by: Mikirin on March 10, 2012, 06:12:25 PM
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/
Title: Re: Subaccounts
Post by: sildenafil on March 11, 2012, 12:12:07 AM
I'm running 2.0 RC3, and just lastnight installed the sub accounts mod (using the fix someone posted.)

Now, when a new member joins or creates a sub account, I receive two emails saying the new member has joined. I'm assuming something got duplicated somewhere, but I have no idea what file to look in.

Can someone help me?
Title: Re: Subaccounts
Post by: Caltan on March 19, 2012, 01:33:02 PM
Quote from: Mikirin on March 10, 2012, 06:12:25 PM
I've performed all of the edits and still the account switcher doesn't appear. It's also missing from quick reply.
Help?

Did you enable Subaccounts under Core Features?
Title: Re: Subaccounts
Post by: Mikirin on March 23, 2012, 08:01:14 AM
Quote from: Caltan on March 19, 2012, 01:33:02 PM
Quote from: Mikirin on March 10, 2012, 06:12:25 PM
I've performed all of the edits and still the account switcher doesn't appear. It's also missing from quick reply.
Help?

Did you enable Subaccounts under Core Features?
Yes. I have a subaccount.
I installed a clean version of SMF and it seems to work now, odd.
Title: Re: Subaccounts
Post by: NanoSector on March 23, 2012, 10:03:00 AM
What theme are you using? If not default, did you install the edit in that theme?
Title: Re: Subaccounts
Post by: Maiden1 on March 31, 2012, 11:08:23 PM
This mod is just what we've been looking for, but we were wondering if it was possible for PM's sent to the subaccounts to be seen on the parent account? Or forwarded to them? Or to disable PMing to subaccounts? Most of our users won't log into their subaccounts properly, just use them to post from.

Thanks for this great mod and any help you can give us.
Title: Re: Subaccounts- Please Help
Post by: -Milady on May 20, 2012, 05:43:52 AM
I'm not sure why these won't show up as links so that I can use them:

Quote
This is where you can manage your subaccounts. Depending on what your administrator has allowed, you can create and delete subaccounts, and also merge subaccounts together, turn regular accounts into subaccounts (if you can supply the correct password) and unlink subaccounts to make regular accounts.

Deleting a subaccount will transfer all of its posts, polls, topics, moderation actions, bans, and errors to the parent user.
Merging subaccounts will transfer everything from the mergee('s) to the merger

    DeleteDelete
    MergeMerge
    UnlinkUnlink
    Set as parentSet as parent
    Make (un)shareableMake (un)shareable

I'm not sure where/how to fix that. Everything else seems to be working for the most part.
Title: Re: Subaccounts
Post by: Caltan on May 21, 2012, 02:27:06 PM
Those links use images as their anchors (subaccount_X.gif) that your custom theme seems to be missing; copy them from Themes/default/images to Themes/YourTheme/images and you should be good.
Title: Re: Subaccounts
Post by: -Milady on May 22, 2012, 09:13:10 AM
That was exactly the problem! Thank you so much :D
Title: Re: Subaccounts
Post by: babsbatgirlfan on May 29, 2012, 04:53:38 PM
I downloaded this and it doesnt work with SMF 2.0.2 is there a newer version??
Title: Re: Subaccounts
Post by: FireDitto on June 06, 2012, 04:55:42 AM
Babs; you need to emulate it to the correct version so that it accepts the modification. As far as I'm aware, there is not a recent edition of it.
Title: Re: Subaccounts
Post by: Goss on September 02, 2012, 10:21:06 AM
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.

$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
);


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: LEFT JOIN {db_prefix}subaccounts AS sub ON (sub.id_member = mem.id_member)

To  this:

LEFT JOIN {db_prefix}subaccounts AS sub ON (sub.id_member = mem.id_member AND mem.id_group != 22)

I had hoped that would remove the display of inactive subaccounts, but it didn't work.

Any ideas?
Title: Re: Subaccounts
Post by: FireDitto on September 09, 2012, 08:46:53 AM
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 ><
Title: Re: Subaccounts
Post by: Yudd on September 13, 2012, 04:38:54 PM
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?
Title: Re: Subaccounts
Post by: NanoSector on September 16, 2012, 04:36:21 AM
It's missing the index.php? Part, stuff a ? Right before action=
Title: Re: Subaccounts
Post by: Yudd on September 16, 2012, 11:12:33 AM
Quote from: Yoshi2889 on September 16, 2012, 04:36:21 AM
It's missing the index.php? Part, stuff a ? Right before action=

Okay, how can I do that? And would I do it like: http://sitelink.net/index.php?action=forum? Would that solve the issue of trying to switch sub-accounts on the index page?

Title: Re: Subaccounts
Post by: NanoSector on September 16, 2012, 12:28:37 PM
http://sitelink.net/index.php?action=forum will do.

It won't solve your problem though, someone forgot to put the ? in the code...somewhere. I have no idea where, sorry.
Title: Re: Subaccounts
Post by: Yudd on September 16, 2012, 04:25:13 PM
Thanks.

Can anyone else help me with this? I'm not really good with codes.
Title: Re: Subaccounts
Post by: CaviarDreams on September 23, 2012, 08:02:38 PM
I have SMF 2.02, but I REALLY want this mod. What should I do? Any suggestions? Is there a way to rollback? What's the latest compatible version? Thanks. :)


EDIT:

After five hours straight of trying to manually install 2.0 RC 5, I get this error: "The package you are trying to download or install is either corrupt or not compatible with this version of SMF." Except, of course, it IS compatible. All I did was download the zip file, and upload it.



EDIT EDIT:

I got the message:

"An Error Has Occured! Although the package was downloaded to the server it appears to be empty. Please check the Packages directory, and the "temp" sub-directory are both writable. If you continue to experience this problem you should try extracting the package on your PC and uploading the extracted files into a subdirectory in your Packages directory and try again. For example, if the package was called shout.tar.gz you should:
1) Download the package to your local PC and extract it into files.
2) Using an FTP client create a new directory in your "Packages" folder, in this example you may call it "shout".
3) Upload all the files from the extracted package to this directory.
4) Go back to the package manager browse page and the package will be automatically found by SMF."

I followed the instructions, and now the mod is viewable under "browse packages", but I still don't know how to install it.
Title: Re: Subaccounts
Post by: Shambles on September 24, 2012, 04:22:54 AM
Quote from: CaviarDreams on September 23, 2012, 08:02:38 PM
I followed the instructions, and now the mod is viewable under "browse packages", but I still don't know how to install it.

Solution supplied in your other topic on this matter ;)
Title: Re: Subaccounts
Post by: CaviarDreams on September 29, 2012, 08:57:13 AM
I have installed the mod, but I can't see it, use it, or anything. I have enabled the mod in Core Features, but I still have no settings or anything. It's as if it isn't installed. :/

I have a support topic here: http://www.simplemachines.org/community/index.php?topic=487067
Title: Re: Subaccounts
Post by: Caltan on October 18, 2012, 09:35:32 AM
You need to both enable it in Core Features and set the permissions for user groups to use and access subaccounts.  If you have no subaccounts, the dropdown won't display; you'll need to create a new subaccount from the profiles page to test.
Title: Re: Subaccounts
Post by: Mikirin on October 20, 2012, 09:12:44 PM
I installed the mod as I normally would (and it has worked on my past forums) and now I can't find it in the admin panel. It's shown as installed properly but there's still no option to enable it in the features nor is there any permission settings as there normally would be.
Here's how I normally install it:
Emulate to rc4.
Install.
Enable.
Fix permissions up and all that good stuff.

Well, up until "Install" things were going well. I encountered an error at first but that was on the ftp- permissions side. I set the packages folder and contents to writable and made the temp folder within it as well.
What's going wrong?

I figured it out, it's corrupting part of SMF.
It installs, but it doesn't correctly save its state that it IS installed, so uninstallation is impossible.. so if it gets stuck in limbo, can't be uninstalled to reattempt the install.
Possibly the mod gets partially installed, but then cannot move forward for one reason or another, then fails, acts like the mod is fully installed, and it seems this particular mod doesn't have an "uninstall" button so everything craps out.

And fixed
Title: Re: Subaccounts
Post by: fallen stars on November 04, 2012, 05:01:05 PM
So I got the sub-accounts installed nicely on to my forum, but I'm trying to work it in to one of my other themes. I fixed up the php (copy and pasted it, really) aand now it's telling me that there's "an unexpected "<" on line 236". I fail at php, I don't even know any of it, so I have no idea how to fix this. This is the portion of the code being referred to (the middle line there, in fact.):

<li class="greeting"><b>', $txt['hello_member_ndt'], ' ', $context['user']['name'],'</b>', $context['subaccount_dropdown'], '</li>';
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>'
Title: Re: Subaccounts
Post by: Shambles on November 04, 2012, 05:06:37 PM
You copied & pasted incorrectly.


The end of your first line
Code (this) Select
'</li>';

followed on the next line by
Code (this) Select
<li>

.. just ain't gonna work as the "echo" that's producing the first of those is already terminated by the time the next code line arrives (hence the "<" is being complained about).

Probably best if you dump the whole of that file into your next post, and someone can have a ganders, unless you want to have another go at editing it yourself?



A quick fix would be to:

Code (find) Select
<li class="greeting"><b>', $txt['hello_member_ndt'], ' ', $context['user']['name'],'</b>', $context['subaccount_dropdown'], '</li>';
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>'


Code (replace) Select
<li class="greeting"><b>', $txt['hello_member_ndt'], ' ', $context['user']['name'],'</b>', $context['subaccount_dropdown'], '</li>';
echo '<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>'
Title: Re: Subaccounts
Post by: fallen stars on November 04, 2012, 05:22:26 PM
I tried, and then it came up with another error x.x

"Parse error: syntax error, unexpected T_IF, expecting ',' or ';' in .../Themes/The_Killing_SMF2/index.template.php on line 240"

Bleh. I attached the file to this post if anyone would be wonderful enough to hep me figure out what's wrong xD
Title: Re: Subaccounts
Post by: Shambles on November 05, 2012, 05:13:30 AM
Quote from: fallen stars on November 04, 2012, 05:22:26 PM
I tried, and then it came up with another error x.x

You have quite a few errors in there - all fixed for you (see attached)

Title: Re: Subaccounts
Post by: fallen stars on November 05, 2012, 04:22:12 PM
Thank you for that~ I tried it and it worked (:
Title: Re: Subaccounts
Post by: FireDitto on November 10, 2012, 09:55:13 PM
IF you remove the code from the 'display.template.php' and the 'index.template.php' and put the following code in a Portal block (eg, Simple Portal, Tiny Portal, EzPortal, PortaMX) you don't have to worry about adding the code to new themes every time you install one.

Code (Block Code) Select
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'];


However -- if there is any switcher code left on the main index, this WILL NOT WORK, the scripts will cancel one another out. Post changing dropdowns will be fine.
Title: Re: Subaccounts
Post by: Captain_Morrigan on January 05, 2013, 01:50:34 PM
Just wanted to let you lot know this mod will auto install on 2.0.3, the only thing I see is missing is the drop down up top but everything else installs if all you do is change the install pack version.

Just for you lot I edited it for you and it should test successfully for the default theme:


Attachment removed by Colin due to copyright violation
Title: Re: Subaccounts
Post by: Shambles on January 05, 2013, 02:17:22 PM
Quote from: Captain_Morrigan on January 05, 2013, 01:50:34 PM
Just for you lot I edited it for you and it should test successfully for the default theme:

Are you allowed to edit then redistribute someone else's mod?
Title: Re: Subaccounts
Post by: Arantor on January 05, 2013, 02:19:05 PM
Given that the mod's page says it's under a No Derivatives licence, the answer to that question would probably be a resounding NO.
Title: Re: Subaccounts
Post by: Captain_Morrigan on January 05, 2013, 09:34:35 PM
I edited a line so people don't have to fight with it to install it, first of all. I didn't edit it the mod itself and I'm not redistributing it. I posted it in this thread, nothing has been changed except 2 lines, and all original authors copyrights are in tact.

If you lot have a problem with that then perhaps this thread should be shut down since the author has apparently abandoned this mod and everything within this thread is modifying it to work with newer versions of SMF. I was just giving everyone a time saver.

I'm sorry for being nice enough to share a simple fix for a popular mod.

That notwithstanding other people have edited parts of this mod and posted it so I don't know why I'm getting flack for getting a single file with one file edited to get it to work and posting the whole thing so that a single file doesn't have to be replaced, it can simply be uploaded like any other SMF mod.

This hasn't been posted anywhere else. I'm literally handing it to the content author and I'm getting flack.

I guess I don't have to remember why I left SMF.... this is why. Thank god for IPB.
Title: Re: Subaccounts
Post by: Arantor on January 05, 2013, 09:42:35 PM
QuoteI edited a line so people don't have to fight with it to install it, first of all. I didn't edit it the mod itself and I'm not redistributing it.

It wasn't called out for redistribution. It was more called out for the fact the mod's own page says that derivative packages - including your minor modification - can't be made. That's the deal the mod author gave, you can use the mod, for free, subject to those terms. Don't like it? Take it up with him, he's the author, and other than the licence he's granted, nothing in any law says you have any right to use the mod.

It sucks, no question, but unfortunately the licence is the only thing granting you any right whatsoever, since the law of the land doesn't.
Title: Re: Subaccounts
Post by: Arantor on January 05, 2013, 10:25:59 PM
I should add, the person above has taken to Twitter to call SMF retards and jerks, without apparently realising that I'm not part of the team.

Here's the deal, and I'll be sure to use small words so there's no confusion, unlike what you've been shouting on Twitter.

Without a licence, you have zero right whatsoever to use the mod. That's copyright law. Can't argue on that score.

With a licence, you have rights granted by that licence. Using it is one of them. But you're not given the right to make a modified version, not even one line changed only. Even with the very best intentions in the world, it doesn't matter, you can't do it.

As I said to you, it sucks, but that's what it is. Don't get all huffy with anyone, because your good deed is undone - it was avoidable by reading the mod's page and seeing the little 'no-derivs' wording there. No good deed goes unpunished anyway.

I'm not disputing that it sucks, either. But the only person who can fix it is the mod author, by changing his licence or updating the mod, in the meantime the rest of us have to use version emulation.
Title: Re: Subaccounts
Post by: Colin on January 05, 2013, 10:54:13 PM
I am afraid I had to remove the attachment as it is a direct violation of the mod authors license. As it may seem silly since you graciously made a small improvement we are forced to abide international copyright law. I encourage you to contact the mod author directly to apply for a waiver or a change of the current license. Thanks for your understanding.
Title: Re: Subaccounts
Post by: babsbatgirlfan on January 06, 2013, 03:14:26 PM
Quote from: FireDitto on June 06, 2012, 04:55:42 AM
Babs; you need to emulate it to the correct version so that it accepts the modification. As far as I'm aware, there is not a recent edition of it.

How do I emulate it to the correct version?? I have it working on my previous site but I had downloaded it before 2.0 hit. So it still works but it doesnt on either of my other sites. Could anyone help me??


Title: Re: Subaccounts
Post by: Arantor on January 06, 2013, 03:29:33 PM
Emulation is described on How can I install a mod that doesn't work in my SMF version? (http://wiki.simplemachines.org/smf/How_can_install_a_mod_that_doesn%27t_work_in_my_SMF_version) - the first entry.
Title: Re: Subaccounts
Post by: jenny loo who?! on January 06, 2013, 04:22:42 PM
Greetings!

I am doing this on behalf of a friend, but I can't seem to get the subaccounts mod show a dropdown, in anyway, shape or form. It't really aggravating.

I have installed it correctly, modified the templates, but still, nothing.

Can someone help? I'm willing to give the index.template.php file as well as the index.css file.
Title: Re: Subaccounts
Post by: Caltan on January 14, 2013, 10:07:48 AM
A dropdown won't show unless you actually have subaccounts created.  Make sure the mod is turned on in core features and all the user permissions are set as they should and then try actually creating an account through the Manage Subaccounts profile area.  If that works, then you know it's just something with the dropdown code itself, which is easy to fix.
Title: Re: Subaccounts
Post by: sarahwhite42 on March 07, 2013, 08:52:04 AM
okay, i've got almost everything working on the sub account mod thanks to you wonderful people.  I have just one small problem...

on our chosen theme (bad company 3 edited to fit our needs) the sub accounts don't show on the profile summary.  They do show on the other themes, just not on this one.  Can anyone help me out please

edit: I finally figure this out
Title: Re: Subaccounts
Post by: RustyBarnacle on April 20, 2013, 09:37:04 PM
I've looked and looked and can't find something obvious.  How do I share a subaccount?  I have made an account, I want to share it with one other person, but can't for the life of me figure it out.

Everything else works except for the drop down switcher but I've read the whole thread so I see the fix and I'll get around to putting it in eventually.
Title: Re: Subaccounts
Post by: Arantor on April 20, 2013, 09:41:04 PM
I don't believe it works that way.
Title: Re: Subaccounts
Post by: RustyBarnacle on April 20, 2013, 10:04:54 PM
Oh, I thought it did.  I thought that was what the whole (un)sharable thing was for.
Title: Re: Subaccounts
Post by: Arantor on April 20, 2013, 10:15:33 PM
Don't think so. This mod works by creating actual new accounts and tying them to a parent. I think, though it's been a while, that it's to do with who can see that it's a subaccount. (Though I could be wrong.)

Certainly the description doesn't mention it.
Title: Re: Subaccounts
Post by: RustyBarnacle on April 21, 2013, 02:29:34 AM
Cool, thanks, I guess I misread.
Title: Re: Subaccounts
Post by: AnOracle on April 23, 2013, 10:47:53 AM
Actually, this is do-able.  From the manage subaccounts section, as the person that currently "owns" the subaccount, choose "Make (un)shareable."

As the person that's then adding the subaccount, click "Create / Link."  Enter the name and password of the account you want to link.  If it's set shareable and the password is correct, you and its current owner will be able to access it, the same as if it was your own normal subaccount.
Title: Re: Subaccounts
Post by: RustyBarnacle on April 23, 2013, 11:50:35 AM
DOH!  Of course.  I had the buttons backwards but that makes a lot more sense.  Thanks!
Title: Re: Subaccounts
Post by: FireDitto on May 12, 2013, 06:38:55 AM
Quote from: AnOracle on April 23, 2013, 10:47:53 AM
Actually, this is do-able.  From the manage subaccounts section, as the person that currently "owns" the subaccount, choose "Make (un)shareable."

As the person that's then adding the subaccount, click "Create / Link."  Enter the name and password of the account you want to link.  If it's set shareable and the password is correct, you and its current owner will be able to access it, the same as if it was your own normal subaccount.

Indeed! And you can share an account between several people, not just one other. We have a "group Admin" account for "site" postings, which is joined to all the team members (currently 3, was 4). It is very useful!
Title: Re: Subaccounts
Post by: babsbatgirlfan on June 08, 2013, 09:57:57 PM
ok I tried to emulate the earlier version but I cannot get my subaccount mod to work also I cannot get my Users Online Today mod to work. can anyone join my site and ill admin you and look see what I have done wrong??

http://vampirethemasquraderpg.com/index.php

thank you,

Wendy
Title: Re: Subaccounts
Post by: Caltan on June 10, 2013, 01:17:36 PM
What specifically isn't working?  Is it not installing, are you not seeing account selection dropdown, can you not add a sub account, what?
Title: Re: Subaccounts
Post by: Wallaby_65 on June 12, 2013, 03:31:51 AM
I am working on the same site as Babs.  This is what we've tried;

Went to Browse Packages, selected Advanced, emulate SMF 1.0.1
Downloaded Sub Account Mod
Attempted to install (from the page that comes up after download.
Error message received, stating that the package was not compatible with version of SMF


Other things we've tried:
Download Sub Account Mod
Emulate version 1.0.1
Went to Browse Packages - Package is there with no option to install or uninstall
Deleted Mod

Revert
Download Sub Account Mod
Emulate version 1.0.1
Went to Browse Packages - Package is there with no option to install or uninstall
Deleted Mod

I am thinking we are emulating the wrong version, but I haven't found which mod we are supposed to emulate.

Thank you in advance for your interest in our problem

~ Wallaby
Title: Re: Subaccounts
Post by: FireDitto on June 12, 2013, 05:30:34 AM
You are correct; you're emulating the wrong version. You want to emulate 2.0 RC2 or, if you use the Update Here (http://www.simplemachines.org/community/index.php?topic=347710.msg2718490#msg2718490) you need to emulate to 2.0 RC3 in order to get the mod to work.
Title: Re: Subaccounts
Post by: Wallaby_65 on June 12, 2013, 05:39:23 PM
Quote from: FireDitto on June 12, 2013, 05:30:34 AM
You are correct; you're emulating the wrong version. You want to emulate 2.0 RC2 or, if you use the Update Here (http://www.simplemachines.org/community/index.php?topic=347710.msg2718490#msg2718490) you need to emulate to 2.0 RC3 in order to get the mod to work.

Thank you very much! 
Title: Re: Subaccounts
Post by: babsbatgirlfan on June 17, 2013, 04:29:39 PM
And thank you very much, It's ALIVE :D heh.

Now to find other nifty mods for my VTM RPG Site :)
Title: Re: Subaccounts
Post by: babsbatgirlfan on June 17, 2013, 05:21:17 PM
Another new problem, I got the sub account mod to work, it had the drop down menu and everything, but I added the ambassador theme to my site, and lost the main drop down menu, it is only available when you go to post, is there a fix for this that's easy?? Help!!!

http://www.vampirethemasquraderpg.com
Title: Re: Subaccounts
Post by: Burke ♞ Knight on June 17, 2013, 05:22:55 PM
Have to manually install the mod into the index.template.php of the theme.
Title: Re: Subaccounts
Post by: babsbatgirlfan on June 17, 2013, 05:51:32 PM
Okay I need to manually install the sub-account mod into the template?? That sounds to hard lol. think I will deal with it how it is lol. its a minor issue that bugs me, if I try anything manually I think itll end up bad haha.
Title: Re: Subaccounts
Post by: Burke ♞ Knight on June 17, 2013, 05:58:03 PM
Manual Installation of Mods (http://wiki.simplemachines.org/smf/Manual_installation_of_mods)
Title: Re: Subaccounts
Post by: babsbatgirlfan on June 17, 2013, 11:43:36 PM
ok I looked at the tutorial, and then tried to find the area on my site, is there anyone here that would be willing to help me with it??

http://www.vampirethemasquraderpg.com

:-*

:D

Wendy
Title: Re: Subaccounts
Post by: FireDitto on June 18, 2013, 04:59:35 AM
Babs -- Stick this in a Portal PHP Block. It will NOT work on the default theme (due to the code already being installed on the theme itself), but it will work on any other theme, and means you don't have to do any edits. It creates a dropdown option within the block.

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'];
Title: Re: Subaccounts
Post by: babsbatgirlfan on June 18, 2013, 10:31:07 AM
ok cool will try, just need to find the portal php, so new at this lol. here goes everything heh.
Title: Re: Subaccounts
Post by: babsbatgirlfan on June 18, 2013, 12:32:54 PM
Okay I think I found the section to place it into: PortalAdminBlocks.template.php

But which section does it get placed into??

Beginning on line 1
Beginning on line 3
Beginning on line 59
Beginning on line 469

Quote from: FireDitto on June 18, 2013, 04:59:35 AM
Babs -- Stick this in a Portal PHP Block. It will NOT work on the default theme (due to the code already being installed on the theme itself), but it will work on any other theme, and means you don't have to do any edits. It creates a dropdown option within the block.

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'];
echo show_alerts();

Title: Re: Subaccounts
Post by: Burke ♞ Knight on June 18, 2013, 12:37:03 PM
Do this by going into Admin, then blocks under Simple Portal, then add block, custom php.
Title: Re: Subaccounts
Post by: babsbatgirlfan on June 18, 2013, 01:34:14 PM
ok I did the custom php option added in the code and I created the block and got this error message:


An Error Has Occurred!
Database error in block code. Please check the code.
Title: Re: Subaccounts
Post by: babsbatgirlfan on June 18, 2013, 01:58:20 PM
Okay got it to work somehow :) Thanks :)
Title: Re: Subaccounts
Post by: FireDitto on June 20, 2013, 04:58:04 AM
You don't need to edit any files.

The idea is to create a block with your Portal system - as you did wtih the other portals - and to choose "Custom PHP" then enter that code into the new block.

That is all you have to do. No file edits.
Title: Re: Subaccounts
Post by: elf_fu on August 04, 2013, 02:37:42 PM
EDIT: I created a test forum with all the current mods and tweaks I have on my live forum and basically applied all of the edits to any errors by hand.

Nothing exploded, success!


This installs fantastically on Argentum2 Enhanced theme.
In Back n' Black, the drop down menu doesn't show correctly because I am a dunce.



echo '
<li id="name">' $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span>', $context['subaccount_dropdown'], '</li>';
else
echo '
<li id="name">', $txt['hello_guest'], ' <em>', $txt['guest'], '</em></li>';



Would anyone be able to point out how I might be able to have this work in the Back n' Black theme by Crip?

Thanks again. I really hope the mod author can come back to this, for an RP or RPG site this is invaluable and really great!
Title: Re: Subaccounts
Post by: elf_fu on August 08, 2013, 04:59:43 AM
Also! I hate to be a pest but I am hoping anyone can help me with this:Whenever someone creates a new subaccount, the profile of their main account ends up being copied into their new subaccount profile.

For instance, if Jack1 put, "I like pickles," in his original profile, and made a subaccount of Jack2, "I like pickles," shows up in his profile for Jack2.

Is there a way to fix this so new subaccounts have blank profiles?

Thank you for any help!
Title: Re: Subaccounts
Post by: wingedorange on August 11, 2013, 10:00:05 PM
Hello!

We're having an issue with our forum that I've tried - quite unsuccessfully - to fix on my own. I know this group is a wealth of knowledge and I'm really very much a coding/SMF beginning, so I'm hoping someone with more knowledge than I have can help.

For about two years, we've had SMF 2.0 + subaccounts installed on our site, and everything's worked beautifully. We've also had a subscription program that allows members to increase the number of subaccounts they can create, which means that each membergroup has a subaccount limit - this is not new; it's worked wonderfully for as long as we've had it.

Recently, we've begun having issues whereby members who have reached their subaccount limits can no longer access the Manage Subaccounts page from their profiles. We get a very nondescript error on the site, and the following error in the error log:

Quote8: Undefined index: cannot_subaccounts_browse_own
Apply Filter: Only show the errors from this file
File: /home/hogwarts/public_html/sortinghat/Sources/Errors.php
Line: 203

It also seems paired with this error:
Quote8: Undefined index: enable_website_url
Apply Filter: Only show the errors from this file
File: /home/hogwarts/public_html/sortinghat/Sources/Profile-Modify.php
Line: 768

Line 768 looks like this:

Quote766: '),
767:    'link_with' => 'website',
==>768:    'enabled' => $context['enable_website_url'],

It looks okay to me, but as I said - I'm very new to this. If anyone has any thoughts about why this might be occurring, I'd really appreciate any feedback. Thanks!
Title: Re: Subaccounts
Post by: elf_fu on September 03, 2013, 05:15:51 PM
Hello!


I just wanted to update that a friend of mine who knows what they are doing was able to help with the copying of profiles. Profiles from Parent accounts no longer copy to childs. Great!


But.


My members of my RP board are kind of private folk. They like to keep their subaccounts/characters who they play private. Unfortunately, if you visit the profile of a subaccount, it CLEARLY says at the top of the page, for example, like so:
Is there a way we can REMOVE the mention that it is a subaccount please, so that it just reads: Summary>>Princepants?

For another example (as I don't mind sharing my own subaccounts) if you look at my subaccount profile here:http://gr.2phatgeeks.com/index.php?action=profile;u=92 (http://gr.2phatgeeks.com/index.php?action=profile;u=92)it clearly shows that it is a subaccount of GreaterRealms. I would like it to show as if it were just another normal account.

Please and thank you, any help would me most kind I will hug you and squeeze you and even call you George!

Fixed by a co-admin, I will ask if he wants to share how he did it :3
Title: Re: Subaccounts
Post by: margarett on September 03, 2013, 05:27:23 PM
I don't know the MOD but somewhere in Profile.php, the linktree should be updated with that info. It should be possible to remove the "excess" of information you require.
Try to search in that file for "linktree".
Title: Re: Subaccounts
Post by: Burke ♞ Knight on September 03, 2013, 06:03:39 PM
In this mod, it shows the sub-accounts in the member list in the primary member's info.

There is no way to do this, as it is coded, and the original author has not been around in a long time.

If do not want others knowing about the sub-accounts, then unlink them, and have the members log in/out on each alt account.
Title: Re: Subaccounts
Post by: elf_fu on September 04, 2013, 04:22:58 PM
Quote from: BurkeKnight on September 03, 2013, 06:03:39 PM
In this mod, it shows the sub-accounts in the member list in the primary member's info.

There is no way to do this, as it is coded, and the original author has not been around in a long time.

If do not want others knowing about the sub-accounts, then unlink them, and have the members log in/out on each alt account.

One of our admins, who fixed the parent account copying profiles to subaccounts, has actually fixed the issue. So this can be done actually--I simply do not know how he did it/how to do it myself.
Title: Re: Subaccounts
Post by: margarett on September 04, 2013, 04:41:50 PM
Quote from: margarett on September 03, 2013, 05:27:23 PM
...somewhere in Profile.php, the linktree should be updated with that info. It should be possible to remove the "excess" of information you require.
Try to search in that file for "linktree".

Of course it is possible. It's just a matter of changing code where needed ;)

Note: still haven't look at the code, but I'm quite sure this is how it's made. So it is with other actions ;)
Title: Re: Subaccounts
Post by: Burke ♞ Knight on September 04, 2013, 04:44:36 PM
There are 4 main settings for this mod. Go to Admin.
Under the Members section, there should be: Manage SubAccounts...
That Should have Settings and View SubAccounts.

Under Settings there are 2 settings that may help:

SubAccounts show on memberlist
SubAccounts show in user's profiles

The other problem you had faced, that was fixed, is the second setting on the page:

New subaccounts inherit parent membergroup
Title: Re: Subaccounts
Post by: elf_fu on September 05, 2013, 07:19:21 AM
Quote from: BurkeKnight on September 04, 2013, 04:44:36 PM
There are 4 main settings for this mod. Go to Admin.
Under the Members section, there should be: Manage SubAccounts...
That Should have Settings and View SubAccounts.

Under Settings there are 2 settings that may help:

SubAccounts show on memberlist
SubAccounts show in user's profiles

The other problem you had faced, that was fixed, is the second setting on the page:

New subaccounts inherit parent membergroup

New subaccounts inherit parent membergroup = That was not the issue I was having :) I had that unchecked. It wasn't copying the parentgroup, it was copying the entire member profile. But, my super duper awesome co-admin who is more familiar with code was able to fix parent account profile information copying over.

Thank you, got it figured out. I am so sorry for bugging all of you and appreciate your responses! Yay for help!
Title: Re: Subaccounts
Post by: Ahadawan on September 12, 2013, 01:32:54 PM
Elf_fu, do you know how it was done? Could you ask your co-admin?
Have been trying to figure that one out myself.
Title: Re: Subaccounts Copying Main Account profile fix
Post by: elf_fu on September 14, 2013, 08:22:34 AM
Quote from: Ahadawan on September 12, 2013, 01:32:54 PM
Elf_fu, do you know how it was done? Could you ask your co-admin?
Have been trying to figure that one out myself.

Hi there! My co-admin said he did this:


File:  Sources/SubAccount.php
There's a loop in there that grabs all the "options" fields from the master character and copies them over.

Line 331

foreach ($cur_profile['options'] as $var => $value)
      $regOptions['theme_vars'][$var] = $value;


Added a clause to exclude anything that starts with "cust", which would be most (if not all) custom profile fields

foreach ($cur_profile['options'] as $var => $value)
  if(!preg_match("/^cust/",$var)){
    $regOptions['theme_vars'][$var] = $value;
}                       }   
Title: Re: Subaccounts
Post by: Ahadawan on September 15, 2013, 07:44:13 AM
Quote from: elf_fu on September 14, 2013, 08:22:34 AM
Hi there! My co-admin said he did this:

File:  Sources/SubAccount.php
There's a loop in there that grabs all the "options" fields from the master character and copies them over.

Line 331

foreach ($cur_profile['options'] as $var => $value)
      $regOptions['theme_vars'][$var] = $value;


Added a clause to exclude anything that starts with "cust", which would be most (if not all) custom profile fields

foreach ($cur_profile['options'] as $var => $value)
  if(!preg_match("/^cust/",$var)){
    $regOptions['theme_vars'][$var] = $value;
}                       }   


Thank you!
(And also, please thank your co-admin from me)

I found those lines before I read your reply and just removed it for the time being, not knowing if that was needed for other options, but of course that clause your co-admin added is way better so i'll be using that instead.

It seems there is a "}" too many in the code, I excluded the last and got that working.
Title: Re: Subaccounts
Post by: littlenicki on September 15, 2013, 10:43:14 AM
Hello, this looks like a very interesting mod. Could you please port it back to SMF 1.1.18? Thank you
Title: Re: Subaccounts
Post by: elf_fu on September 15, 2013, 05:50:11 PM
Quote from: littlenicki on September 15, 2013, 10:43:14 AM
Hello, this looks like a very interesting mod. Could you please port it back to SMF 1.1.18? Thank you

I don't think the original mod author has been working on this for--years. I am not sure, but unless they pick it up again or give permission to let someone else take over it, I don't think it'll happen.
Title: Re: Subaccounts
Post by: Ahadawan on September 23, 2013, 10:18:56 AM
Has anyone been able to assign the permissions for regular members so that you (the regular member) can create a Subaccount through your main account but just like (one of the options for registration of) regular members, the Administrator has to accept/activate the account in the Administrator panel before the user can fully use the Subaccount?

Edit:

I'm also curious about mod-related bugs and what not, does anyone use this mod on a larger site and what type of problems could arise due to the mod? I would of course test it out on a test site before I use it live, but a test-site has its limits. What about deleting a member which has a subaccount linked to it? Is that safe? Some information from someone with experience of running the mod on a large site would be nice. It is a rather larger mod after all.
Title: Re: Subaccounts
Post by: elf_fu on September 30, 2013, 12:12:32 PM
Quote from: Ahadawan on September 23, 2013, 10:18:56 AM
Has anyone been able to assign the permissions for regular members so that you (the regular member) can create a Subaccount through your main account but just like (one of the options for registration of) regular members, the Administrator has to accept/activate the account in the Administrator panel before the user can fully use the Subaccount?

Edit:

I'm also curious about mod-related bugs and what not, does anyone use this mod on a larger site and what type of problems could arise due to the mod? I would of course test it out on a test site before I use it live, but a test-site has its limits. What about deleting a member which has a subaccount linked to it? Is that safe? Some information from someone with experience of running the mod on a large site would be nice. It is a rather larger mod after all.

I am currently using this mod on my site. We have roughly 200+ accounts.

Positives:

Cons:
I have not yet deleted a parent account yet. I would assume, however, the best case scenario for this mod would be to find the subaccounts, delete them first, and then remove the parent account.

I am sorry I couldn't answer all of your questions, and hope that somewhat helped!
Title: Re: Subaccounts
Post by: FireDitto on October 13, 2013, 05:39:50 AM
If you delete a parent account, the Sub-Accounts end up floating around in the wilds. They are there, and you can click on them -- if you stumble across them. But you can't reassign them and you can't access them properly. The only way I could come across fixing it was to delete the subaccount that had its parent deleted.

I don't advise deleting a parents with subs still assigned, unless you plan on deleting them too.
Title: Re: Subaccounts
Post by: Ahadawan on October 22, 2013, 07:01:59 AM
Thank you both for the replies, especially elf_fu for the pros and cons list.  :)

I'm also wondering about when you post a topic from one account and then later go into the post and edit it to belong to another user, it seems it doesn't get transferred over as the topic-starter when you look in the "action=profile;area=showposts;sa=topics;" but it seems to work for the "action=profile;area=showposts;sa=message". Since the new member is the owner of the first post now, it should be listed in both and be removed from the first but as i mention that seems not to be the case? I minor flaw i guess? Makes me wonder what happens when you Start a topic from another user, does it then add both to the account chosen in the list, or does it split them up like when you edit the first post in an existing thread.

Have you guys seen any problem with this?
Title: Re: Subaccounts
Post by: elf_fu on October 24, 2013, 05:18:26 PM
Quote from: Ahadawan on October 22, 2013, 07:01:59 AM
Thank you both for the replies, especially elf_fu for the pros and cons list.  :)

I'm also wondering about when you post a topic from one account and then later go into the post and edit it to belong to another user, it seems it doesn't get transferred over as the topic-starter when you look in the "action=profile;area=showposts;sa=topics;" but it seems to work for the "action=profile;area=showposts;sa=message". Since the new member is the owner of the first post now, it should be listed in both and be removed from the first but as i mention that seems not to be the case? I minor flaw i guess? Makes me wonder what happens when you Start a topic from another user, does it then add both to the account chosen in the list, or does it split them up like when you edit the first post in an existing thread.

Have you guys seen any problem with this?

I haven't accidentally posted with the wrong account/had a member post with the wrong account and ask for it to be corrected yet (if I understand what you mean), so I haven't run into this problem yet.  I will keep and eye out. FireDitto, I believe, has a much larger board and has been running subaccounts on theirs longer than I--they might be able to answer this one better than I!
Title: Re: Subaccounts
Post by: Caltan on October 30, 2013, 11:44:30 AM
You can reassign an orphaned subaccount by editing the parent_id field in the members table.  Kind of a pain, but at least it doesn't leave the thing in limbo.

Quote from: Ahadawan on October 22, 2013, 07:01:59 AMMakes me wonder what happens when you Start a topic from another user, does it then add both to the account chosen in the list, or does it split them up like when you edit the first post in an existing thread.

I don't think this is a serious problem, but then my RPs have all characters/subaccounts public, so misattribution doesn't really bother me so I haven't looked into it much.
Title: Re: Subaccounts
Post by: FireDitto on October 31, 2013, 01:54:26 AM
Have you tried going into;

Maintenance -> Forum Maintenance -> Run the various options.

I haven't tested, but I would assume that would put the topics back under the correct member's name.
Title: Re: Subaccounts
Post by: Teh Lizzeh on November 05, 2013, 04:54:26 PM
I'm not sure if anyone can help with this but my subaccounts keep moving? It's just me and one other member for now that I know of we both have multiple sub accounts but our most recent keep moving on the profile of the parent account. So say there's five subaccounts, Bob, Mary, John, Anne, George, and they were made in that order they should be staying in that order. But instead sometimes it shows up as Bob, George, Mary, John, Anne. If that makes any sense?
Title: Re: Subaccounts
Post by: Ahadawan on November 17, 2013, 07:07:16 AM
I'll have to try the method with maintenance next time I see it. The user ended up posting it from the correct user instead and we deleted the first.


What do you guys think about 2.1 and forward?
For every new update (2.0.5 to 2.0.6 etc) we get one step further from the version Subaccounts was last supported. One of my sites still run 1.1.19 and has a lot of modifications. Now we're creating a new site and have been modding the site quite a bit the last month and added subaccounts as well as custom fields etc to the new site. Now we're considering what's gonna happen in the future. A couple of years (?) from now I assume 2.0.x is gonna be in the state 1.1.19 is now, with 2.1.x as the stable version and perhaps a second version on the way.
Title: Re: Subaccounts
Post by: Caltan on November 18, 2013, 09:06:04 AM
I did a test install of subaccounts on the 2.1 github alpha, and it works just fine even though it mostly needed to be installed by hand (there are a lot of indent changes and other stuff that barfs up the package manager). 

Honestly, as long as it continues to work, I'll continue testing and patching; it would be NICE if I could just click and be done but I certainly have no trouble doing edits on my own, especially since the subaccounts are so important to how I run my RPs.
Title: Re: Subaccounts
Post by: Asusrev on November 18, 2013, 09:07:35 AM
I tested in 2.0.6, run perfectly. Other topics are also good, with some restructuring.
Title: Re: Subaccounts
Post by: arogers073 on November 30, 2013, 04:26:19 PM
I have it running on 2.0.6 without any problems until lately. Recently it has been giving me 'session verification failed' errors when I try to switch accounts. It usually works on the second time and it's not all the time however these errors don't show up in my error log. Is there anything I can do to fix this?
Title: Re: Subaccounts
Post by: ariescapes on February 26, 2014, 03:14:22 PM
Has anyone managed to be able to put the Subaccount Avatar on the Manage Subaccount pageview?

I have
<li class="name windowbg2"><a href="', $account['href'], '">', $account['name'], '</a><br>
                  ', $context['account']['avatar']['image'], '</li>';

Which shows nothing. It isn't broken code, it just isn't calling anything.

and
<li class="name windowbg2"><a href="', $account['href'], '">', $account['name'], '</a><br>
                  ', $context['member']['avatar']['image'], '</li>';


This calls the member avatar, not the subaccount avatar. It doesn't seem to like $account or $subaccounts either.

Title: Re: Subaccounts
Post by: Caltan on February 28, 2014, 12:49:46 PM
You have to add it to the array in order to pull it into the template.

First, open Sources/SubAccount.php and find this:

                // Setup the array
                foreach ($loaded_ids as $id)
                {
                        if (loadMemberContext($id))
                        {
                                $context['subaccounts'][] = array(


After that, add:
                                        'avatar' => $memberContext[$id]['avatar']['image'],

Then go into Themes/default/SubAccount.template.php and you can do this:
<li class="name windowbg2"><a href="', $account['href'], '">', $account['name'], '</a><br>
                  ', $account['avatar'], '</li>';


You'll need to tweak the .subaccount li css so it doesn't clip in the hidden overflow, but I don't know how big your avs are.  Or you can put in css for .subaccount li.name img to resize it.
Title: Re: Subaccounts
Post by: ariescapes on February 28, 2014, 01:46:03 PM
You are my new best friend. <3 thank you!! :)
Title: Re: Subaccounts
Post by: Ahadawan on May 26, 2014, 11:49:51 AM
I removed a SubAccount (just deleted it) without splitting it from the user, now I can see it in ?action=admin;area=subaccounts but other than that it's just gone. I wanted to remove it completely, how can I fix the remaining links and avoid this in the future?

I can see it in the smf_Subaccounts table in phpMyAdmin, only the parent value and the value of the user I removed, can I safely remove that line? Are there any other edits I should do?
Title: Re: Subaccounts
Post by: Janden on June 04, 2014, 02:40:50 AM
How would I get the subaccounts to show in the memberslist as their own entry, rather than as a child of the parent entry?
Title: Re: Subaccounts
Post by: MoreAWhyMan on June 07, 2014, 07:31:08 PM
I don't suppose anyone could let me know how I could get this mod to work with 2.0.7? I'm pretty darn new at all this so any help would be appreciated.
Title: Re: Subaccounts
Post by: Caltan on June 13, 2014, 04:15:45 PM
Janden: restore the original versions of themes/default/Memberlist.template.php and Sources/Memberlist.php and make sure you have "show on member list" checked on the SubAccount settings page.

MoreAWhyMan: you need to click "advanced" on the Package Manager screen and emulate 2.0RC3.  Then it will mostly install on its own, but you'll probably need to add the dropdown to the index.template.php for whatever theme you're using.
Title: Re: Subaccounts
Post by: Ahadawan on June 14, 2014, 12:11:21 PM
Quote from: Ahadawan on May 26, 2014, 11:49:51 AM
I removed a SubAccount (just deleted it) without splitting it from the user, now I can see it in ?action=admin;area=subaccounts but other than that it's just gone. I wanted to remove it completely, how can I fix the remaining links and avoid this in the future?

I can see it in the smf_Subaccounts table in phpMyAdmin, only the parent value and the value of the user I removed, can I safely remove that line? Are there any other edits I should do?

Has someone else had this problem? Do you guys still have half-empty rows in the smf_Subaccount with only parent id and the user id removed?
Title: Re: Subaccounts
Post by: Caltan on June 16, 2014, 10:21:23 PM
You can safely remove that line from the smf_subaccounts table.
Title: Re: Subaccounts
Post by: Ahadawan on June 17, 2014, 05:58:34 AM
Quote from: Caltan on June 16, 2014, 10:21:23 PM
You can safely remove that line from the smf_subaccounts table.

Thank you :D
Title: Re: Subaccounts
Post by: Sigyn on July 07, 2014, 06:32:55 AM
I am running 2.0.8 and the SubAccounts are working just fine... my only problem is that the images for the buttons (i.e Merge/Split/Delete etc) are not working and show the broken image symbol. I am interested in fixing these images and making them work for ease of use - but I cannot seem to fathom how to go about doing so. Could anyone point me in the right direction to change/edit/add these images so the ugly broken image link is gone?

Appreciate any insights!
Title: Re: Subaccounts
Post by: margarett on July 07, 2014, 07:04:06 AM
Use Firefox + Firebug. It will tell you the link to the missing image. Then you can check the files/folders for the missing files and add them as needed ;)
Title: Re: Subaccounts
Post by: Sigyn on July 07, 2014, 07:11:55 AM
margarett... I think I love you! Thank you so freaking much you lifesaver you!  ;D
Title: Re: Subaccounts
Post by: Ilúvatar on December 01, 2014, 09:20:15 AM
I'm new to SMF and implementing subaccounts would seriously streamline things for my members, given that I am setting up a roleplaying forum.

Could anyone advise me on where to start with getting this mod to run on 2.0.9?  Any help would be much appreciated! ~
Title: Re: Subaccounts
Post by: Caltan on December 03, 2014, 12:06:47 PM
Well, start with this thread, really.  Your first step is to emulate 2.0RC3 in your package manager; the mod should install without a hitch everywhere but your custom theme index, and you can find those directions either in here or by parsing the mod package and following the code additions for index.template.php.
Title: Re: Subaccounts
Post by: bethkozlowski on January 27, 2015, 08:55:00 PM
Just wondering if this is up to date for 2.0.9? I'd really like to install this, but the version listed above for downloading isn't compatible :( This would be really useful for my rp forum
Title: Re: Subaccounts
Post by: live627 on January 28, 2015, 02:44:43 AM
I think it'll work when emulating 2.0 RC4.
Title: Re: Subaccounts
Post by: bethkozlowski on January 28, 2015, 04:30:23 PM
And how would I do that? Sorry, i'm very new to this open source thing. I do appreciate all the help :)
Title: Re: Subaccounts
Post by: Kindred on January 28, 2015, 04:46:47 PM
http://wiki.simplemachines.org/smf/How_can_I_install_a_mod_that_doesn%27t_work_in_my_SMF_version
Title: Re: Subaccounts
Post by: bethkozlowski on January 29, 2015, 01:36:05 PM
I got it to install partially correct using RC 4 Security Patch but it's not working correctly. I tried RC4 without and the same thing happened. Any other suggestions?
Title: Re: Subaccounts
Post by: Kindred on January 29, 2015, 01:48:35 PM
wait...   WHAT?????   You used WHAT security patch?


The instructions for installing a mod do not include any security patches...
Title: Re: Subaccounts
Post by: margarett on January 29, 2015, 01:50:59 PM
You need to emulate "2.0 RC4" (without quotes).
And when you say "not working correctly", what exactly do you mean? You should always give us the exact error you get ;)
Title: Re: Subaccounts
Post by: Arantor on January 29, 2015, 01:57:28 PM
Quote from: Kindred on January 29, 2015, 01:48:35 PM
wait...   WHAT?????   You used WHAT security patch?


The instructions for installing a mod do not include any security patches...

Check the mod site... ;)
Title: Re: Subaccounts
Post by: bethkozlowski on January 29, 2015, 01:59:07 PM
LOL I used SMF 2.0 RC4 I saw it had a security patch and tried to emulate it. It didn't work either way LOL.

Margarett, it tells me Test Failed in big, bold letters when it was installing it on my board (over 30 test fails) when I tried it the other way. I'll try it the way you suggested :)

So, I deleted the file, then tried to use SMF 2.0 RC4 WITHOUT the patch and had the same (if not more) errors) and the patch did not install correctly.

Are there any other RC versions or versions of SMF in general that this mod might work with? or is there anyone you can highly recommend that might be willing to make me a mod similar to this one for 2.0.9? I have some additions that I'd like implemented to it, but I am at a lost at the moment. This would be the perfect mod for my board if I could get it to work correctly :(

Title: Re: Subaccounts
Post by: Arantor on January 29, 2015, 02:02:32 PM
Given the number of security vulnerabilities in the versions between 2.0 RC4 and 2.0.9 (bear in mind there's 11 versions difference)... anything below 2.0.9 is not recommended.
Title: Re: Subaccounts
Post by: bethkozlowski on January 29, 2015, 02:07:39 PM
Aranator,

I get that, I really do, unfortunately this mod has not been made for 2.0.9 :( At least not to my knowledge. I tried using the method that Margaret suggested, and got  significantly fewer errors. I think I saw someone had tried it on RC3. I'll give that one a go as well. Has anyone tried it on RC5? or is that the current version? Sorry, I'm way new to this open source thing, and I apologize for all of the questions.
Title: Re: Subaccounts
Post by: Arantor on January 29, 2015, 02:11:50 PM
No... in order of release there was 2.0 RC4, 2.0 RC5, 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9.

Any version less than 2.0.9 is a bad idea and if the mod doesn't install cleanly... it's not a good idea to use it just because using any version other than 2.0.9 is insecure.
Title: Re: Subaccounts
Post by: margarett on January 29, 2015, 02:13:10 PM
In my 2.0.9 test forum it returns no "test failed" error when trying to install with emulation.
That means that you have probably other MOD conflicting with the standard code and PackMan can't really do the modifications on its own...
Title: Re: Subaccounts
Post by: bethkozlowski on January 29, 2015, 02:15:34 PM
Hmm...I'll try emulating 2.0.9 Margarett. But you might be right, there could be a mod that is interfearing, because it worked on my test site, but isn't working right on my main one.
Title: Re: Subaccounts
Post by: margarett on January 29, 2015, 02:18:12 PM
No, that's not it.
I am using 2.0.9 *AND* I emulate 2.0 RC4.

but in any case, if you have "test failed" that's because you passed the emulation part already. You need to analyze the failed operations and check for a manual fix...
Title: Re: Subaccounts
Post by: bethkozlowski on January 29, 2015, 02:33:56 PM
OK, so I can get it to work for the admin on my test board, but not the members. Any suggestions? I'm running 2.0 RC4 on it
Title: Re: Subaccounts
Post by: Kindred on January 29, 2015, 02:45:47 PM
OK... you keep saying that you are running 2.0RC4 ---    do you mean that you have 2.0.9 installed and that you used the "emulate version" option at the bottom of the package manager screen?

or do you mean that you actually installed a copy of 2.0RC4 on your test site?
Title: Re: Subaccounts
Post by: bethkozlowski on January 29, 2015, 02:49:58 PM
Oh, what I mean is that I have the 2.0.9 version of SMF installed, and am emulating version 2.0 RC4.
Title: Re: Subaccounts
Post by: Kindred on January 29, 2015, 02:58:16 PM
whew...   that's good... because that is NOT what your phrasing indicated.

If you are encountering errors during the installation, then -- very clearly -- you have conflicting mods.
Because, as margarett stated, this actually installs cleanly on a clean copy of 2.0.9, using emulation.
Title: Re: Subaccounts
Post by: bethkozlowski on January 29, 2015, 03:04:32 PM
*sighs*

That may very well be. I just hope it's not the theme I have. I am running a custom theme called Prince of Darkness which is beautiful and exactly what I was looking for in terms of a theme.

Would either of you be willing to look in my account and see what mod or mods might be conflicting? or if its the theme?
Title: Re: Subaccounts
Post by: bethkozlowski on January 29, 2015, 03:09:55 PM
Actually, Margarett, what theme are you using? that will help loads
Title: Re: Subaccounts
Post by: margarett on January 29, 2015, 03:10:53 PM
Test forum --> default theme :P
Title: Re: Subaccounts
Post by: Kindred on January 29, 2015, 03:12:53 PM
well, is it conflicting in the custom theme template or in the default template files?

the tests are processed on each theme template file individually...
Title: Re: Subaccounts
Post by: Caltan on February 03, 2015, 07:42:28 PM
There are two places you need to turn on the mod: first the global access in the Core Features section, and then add permission for regular users to have subaccounts in the admin permissions panel.

This does work in 2.0.9 (and 2.1, though it has to be installed by hand), it just needs a little love. :)
Title: Re: Subaccounts
Post by: Suriya-DsR on May 12, 2015, 02:23:50 PM
Cheers, is there a way to hide certain SubAccounts from the Member's page? For example, is there a way to hide those accounts that are for Admin only or in a certain Membergroup?
Title: Re: Subaccounts
Post by: combatchimp0 on May 13, 2015, 12:43:23 AM
Hey guys, I've tried various stuff in this thread to try and get SubAccounts to run on my board (SMF 2.0.10), and my biggest success so far has been in excising my installation of it when I realized I'd screwed up too far. I know my way around a server, but dissecting an addon is completely undiscovered country for me. But I'm starting a new roleplaying forum, and when I saw the features SubAccounts offered, I started salivating.

So, here's my thing: I am, no joke, willing to pay a modest fee (I'm thinking $30 USD: $10 up front and $20 when it's finished) to anyone who can personally handle installing the mod on my forum for me. I just want to grant that person FTP access and admin privileges, pay the money, and have it working. I'm tired of looking at the configuration files, and if anyone can do a more successful job than I did, that's worth the price to me.

Get in touch if you're interested in taking me up on that - <email removed>

Thanks in advance.
Title: Re: Subaccounts
Post by: combatchimp0 on May 14, 2015, 02:34:24 PM
Huh, I guess I can't edit or delete my own posts. Well, I found someone for the above request. Thanks.
Title: Re: Subaccounts
Post by: Ilúvatar on July 12, 2015, 08:14:02 PM
I'm in much the same boat as combatchimp0 - I'm setting up a roleplay forum (on SMF 2.0.9) and I'm struggling to get the subaccounts mod to function.  I'm willing to pay for someone more capable than I to take care of this for me.  If interested, please drop me a PM, including your required fee.  Thanks!
Title: Re: Subaccounts
Post by: chuman on November 12, 2015, 03:49:30 AM
I am emulating SMF 2.0 RC4 to instlal the subaccounts mod

I am getting the following errors when I install, I have an album of images of it, but I cannot post external links so heres it copy and pasted:

   Execute Modification   ./index.php   Test failed
   1.   Add After   ./index.php   Test failed
4.   Execute Modification   ./Sources/Load.php   Test failed
   10.   Replace   ./Sources/Load.php   Test failed
*   7.   Execute Modification   ./Sources/ManagePermissions.php   Test failed
5.   Add After   ./Sources/ManagePermissions.php   Test failed
   11.   Execute Modification   ./Sources/Profile-Modify.php   Test failed
   1.   Replace   ./Sources/Profile-Modify.php   Test failed
18.   Execute Modification   ./Sources/Subs.php   Test failed
2.   Replace   ./Sources/Subs.php   Test failed
   Execute Modification   ./Themes/core/Display.template.php   Test failed
   2.   Add Before   ./Themes/core/Display.template.php   Test failed
   Execute Modification   ./Themes/core/index.template.php   Test failed
   3.   Replace   ./Themes/core/index.template.php   Test failed
   Execute Modification   ./Themes/core/Memberlist.template.php   Test failed
   1.   Replace   ./Themes/core/Memberlist.template.php   Test failed
   Execute Modification   ./Themes/SMFMobileThemeBrandFree/Display.template.php   Test failed
      2.   Add Before   ./Themes/SMFMobileThemeBrandFree/Display.template.php   Test failed
   Execute Modification   ./Themes/SMFMobileThemeBrandFree/index.template.php   Test failed
   3.   Replace   ./Themes/SMFMobileThemeBrandFree/index.template.php   Test failed
   Execute Modification   ./Themes/SMFMobileThemeBrandFree/Memberlist.template.php   Test failed
   1.   Replace   ./Themes/SMFMobileThemeBrandFree/Memberlist.template.php   Test failed
   2.   Add Before   ./Themes/SMFMobileThemeBrandFree/Memberlist.template.php   Test failed

   Execute Modification   ./Themes/SMFMobileThemeBrandFree/Search.template.php   Test failed
   1.   Replace   ./Themes/SMFMobileThemeBrandFree/Search.template.php   Test failed
   Execute Modification   ./Themes/SMFMobileThemeBrandFree/css/index.css   Test failed
   1.   Add After   ./Themes/SMFMobileThemeBrandFree/css/index.css   Test failed
      Execute Modification   ./Themes/blu/index.template.php   Test failed
   2.   Add After   ./Themes/blu/index.template.php   Test failed
   Execute Modification   ./Themes/OmegaPurpleRC4/css/index.css   Test failed
   1.   Add After   ./Themes/OmegaPurpleRC4/css/index.css   Test failed

Should I try to manually install it? I was not sure if it would work if I am emulating a version.
Title: Re: Subaccounts
Post by: margarett on November 12, 2015, 05:04:30 AM
There has to be something quite wrong with your forum's code. Every single operation fails? :o
The first edit (to index.php) is impossible to fail :o Can you please attach that file here?

http://www.simplemachines.org/community/index.php?topic=541095.0
It is supposed to work fine in 2.0.11
Title: Re: Subaccounts
Post by: chuman on November 12, 2015, 05:51:43 AM
Not every single one, I only copied the ones that failed. If you need a list of everything on that page i am happy to copy it for you.


Title: Re: Subaccounts
Post by: Kindred on November 12, 2015, 07:02:53 AM
well... first of all -- MOST of those failures are on custom themes...  mods are only required to work on the default (curve) theme... and any custom themes may reuire (as in this case) custom tweaks in order to make a mod work with them.

second...   looks like you have installed other mods which ay have already targeted some of the same code areas.

third... http://wiki.simplemachines.org/smf/Error_in_mod_installation
Title: Re: Subaccounts
Post by: margarett on November 12, 2015, 08:10:55 AM
Quote from: chuman on November 12, 2015, 05:51:43 AM
Not every single one, I only copied the ones that failed. If you need a list of everything on that page i am happy to copy it for you.
Oh, my bad, sorry.

Quote from: Kindred on November 12, 2015, 07:02:53 AM
second...   looks like you have installed other mods which ay have already targeted some of the same code areas.
Yeah, it's this. Eg, for index.php, the MOD looks for
'sticky' => array('LockTopic.php', 'Sticky'),
Which exists in every SMF installation for sure. Yet your file has:
'sticky' => array('LockTopic.php', 'Sticky'), 'staff' => array('Staff2.php', 'Staff'),
So another MOD made a messy edit (it should be in its own line) so this MOD can't install itself cleanly.
Title: Re: Subaccounts
Post by: Kindred on November 12, 2015, 08:26:30 AM
yeah....   unfortunately a number of the SMF Hacks mods do that -- they seem to be missing cr/nl
Title: Re: Subaccounts
Post by: chuman on November 13, 2015, 02:18:10 AM
This is really helpful, we were wondering why multiple mods were having issues.

Would I simply have to go in and manually install? I've had to do that with other mods before, however I was concerned that it wouldn't work because I was emulating an older version of SMF, and did not know if it would allow me to manually install it.

Or would I have to fix the code to what the subaccounts mod isl ooking for for it to install? So like put that index.php example on separate lines etc.
Title: Re: Subaccounts
Post by: Kindred on November 13, 2015, 08:11:30 AM
you ONLY have to "manually" do the bit(s) that failed...
Title: Re: Subaccounts
Post by: chuman on November 16, 2015, 09:19:38 AM
Thank you all so much for your help, subaccounts are now in and functional.

The only thing, which isn't the mod itselfs fault is that the drop-down menu to switch between subaccounts is not showing up, I assume this is an issue to do with my theme and I'm not sure where to edit/fix to get it to show up for members.
Title: Re: Subaccounts
Post by: Eliana Tamerin on November 16, 2015, 10:18:48 AM
Quote from: chuman on November 16, 2015, 09:19:38 AM
Thank you all so much for your help, subaccounts are now in and functional.

The only thing, which isn't the mod itselfs fault is that the drop-down menu to switch between subaccounts is not showing up, I assume this is an issue to do with my theme and I'm not sure where to edit/fix to get it to show up for members.

You'll basically want to do all the edits that the mod would do to the default index.template.php in the theme folder. The $context['subaccount_dropdown'] part can be put just about anywhere you want the dropdown to show up, but the other edits have to be made in the right paces.
Title: Re: Subaccounts
Post by: chuman on November 16, 2015, 10:52:33 AM
I just checked the default index.template.php file and it has all the edits from the mod in there and I could not find any errors, I assume my theme may be blocking it?
Title: Re: Subaccounts
Post by: Eliana Tamerin on November 16, 2015, 12:26:59 PM
Quote from: chuman on November 16, 2015, 10:52:33 AM
I just checked the default index.template.php file and it has all the edits from the mod in there and I could not find any errors, I assume my theme may be blocking it?

Basically, yes. Every theme has an index.template.php and you need to apply the same edits to each one.
Title: Re: Subaccounts
Post by: chuman on November 17, 2015, 02:41:45 AM
So the subaccounts work perfectly from my default curve theme, which was to be epxected and I made all the edits to the Omegapurple CSS and Index.template.php file but it still does not show up, I am going to do another check to make sure I did get everything in.


in index.template.php i edited this part

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


This is what it wanted it to be:
global $context, $settings, $options, $txt, $user_info, $scripturl;

I'm not sure if "modsettings" was a problem

Found this part
/* Set the following variable to true if this theme requires the optional theme strings file to be loaded. */
$settings['require_theme_strings'] = false;


I added this after:
$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>';
}
}


Then this part
<li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span>', $context['subaccount_dropdown'], '</li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';


I cannot find an issue with the code unless its the first part and the $Modsettings is messing it up, but I don't know much about code to know anything for sure.

Attaching a copy of the index.template.php incase that is needed

Title: Re: Subaccounts
Post by: Eliana Tamerin on November 17, 2015, 03:44:02 AM
$modSettings is another variable that shouldn't affect anything.

You're missing $user_info and $scripturl in the template_init() function.

Find this:
function template_init()
{
global $context, $settings, $options, $txt;


Replace with this:
function template_init()
{
global $context, $settings, $options, $txt, $user_info, $scripturl;
Title: Re: Subaccounts
Post by: chuman on November 17, 2015, 03:57:02 AM
Thank you so much that fixed it!! My members are so excited!
Title: Re: Subaccounts
Post by: chuman on December 09, 2015, 02:23:54 PM
Hello, I installed this mod a few weeks back and it was working fine up until yesterday night.

Now when players try to go to their subaccounts, the page simply refreshes without changing which account they're on. Some players are stuck on subaccounts as well.

The only thing I think might relate to this is we've had a sudden onslaught of spambot failed login attempts the past few days.
Title: Re: Subaccounts
Post by: zushiba on March 05, 2016, 03:00:57 AM
Hey Guys, it's me again. After eh, like a hundred years.

I have once again updated this mod to install on the latest version of SMF (Which at the time of this posting is SMF 2.0.11)
This very likely will not work on most custom themes that aren't based on the default curve theme (and in some cases even those, who knows?)

This will install on a stock, new version of SMF 2.0.11.

Once again I do not guarantee anything, if this makes your forum explode or melt or causes a death in your family I am not responsible.
Title: Re: Subaccounts
Post by: zushiba on March 05, 2016, 04:36:53 AM
^Don't download that there's an error in the display template, I would take it down but I can't friggin edit my own posts on this forum anymore for some stupid reason.
Title: Re: Subaccounts
Post by: Irisado on March 05, 2016, 05:14:03 AM
Attachment removed as requested :).
Title: Re: Subaccounts
Post by: dolliebaby77 on August 28, 2016, 10:36:07 PM
Does anyone have a version of this mod that will work with SMF 2.0.7

Thank you.
Title: Re: Subaccounts
Post by: Kindred on August 29, 2016, 09:42:52 AM
1- you need to upgrade ASAP. You are 4 versions behind in SMF, including some security and functional patches.
2- This works pretty much find with 2.0.x --- http://wiki.simplemachines.org/smf/How_can_I_install_a_mod_that_doesn%27t_work_in_my_SMF_version
Title: Re: Subaccounts
Post by: wqrts on December 11, 2016, 10:08:13 AM
Ported as-is to 2.1 Beta 2. It installs successfully and allows subaccounts creation and changes.
Title: Re: Subaccounts
Post by: Kindred on December 11, 2016, 02:19:35 PM
I don't think that is allowed, per the license...  link removed

NoDerivatives — If you remix, transform, or build upon the material, you may not distribute the modified material.
Title: Re: Subaccounts
Post by: chuman on January 15, 2017, 01:48:06 PM
I co-own a small roleplaying forum and we've had the sub-accounts mod installed for about a year now. We don't generally have any problems with it but in the last few months the pings caused by the sub-accounts is getting so intense that we're 503-ing and errors, especially when our site is busy.

When people change over to a different account, it crashes our site. Is there any precident for this, and if so is there any quick fix for it? We can't simply remove the subaccounts, they're an integral part of our roleplaying community, but the errors are getting to the point where the site is barely functional at times.
Title: Re: Subaccounts
Post by: eskie on April 18, 2017, 09:12:09 PM
everything seems to be working except for the fact that the dropdown selection to quickly switch from account to a subaccount isn't doing anything when selected.

could i get some help with fixing this issue?
Title: Re: Subaccounts
Post by: Dzonny on April 19, 2017, 07:56:11 AM
Quote from: eskie on April 18, 2017, 09:12:09 PM
everything seems to be working except for the fact that the dropdown selection to quickly switch from account to a subaccount isn't doing anything when selected.

could i get some help with fixing this issue?
Have you edited files that shows errors on installation manually?
If so, can you please write which files you edited?
Also please attach your index.template.php file from Themes/your_theme/ folder.
Title: Re: Subaccounts
Post by: eskie on April 19, 2017, 07:58:03 PM
i did, on the one file i could via the default smf curve minimal theme (which was the index.template.php)
but, the other errors were flagged on the following files: ./index.php, ./sources.load.php, and ./sources/managepermissions.php
all of these don't seem to even exist in the default smf curve minimal theme. although, when i downloaded the default minimal curve 2.0 theme onto the site as well to compare the two, the one that came with the site as the smf default's files seemed to be different (not just how i changed coding- but different files as well)

(i'm new to smf; sorry if this is a bit confusing!! i can provide screenshots if needed.)
Title: Re: Subaccounts
Post by: Kindred on April 19, 2017, 09:44:35 PM
that's why its not working....   you need to make the code changes to ALL files that had failures.

please note that only TEMPLATE files exist in the themes...  other files are in the root (index.php) and Sources directory. Additionally, any template files which showed errors aso need to be updated in the Default theme directory
Title: Re: Subaccounts
Post by: eskie on April 19, 2017, 09:52:07 PM
ah, that makes much more sense. where exactly do i go to access and edit these other files then?
Title: Re: Subaccounts
Post by: Kindred on April 19, 2017, 10:05:26 PM
as I said above...   root, Sources folder and default theme folder
Title: Re: Subaccounts
Post by: eskie on April 21, 2017, 08:45:17 PM
sorry- i blanked! subaccounts are working perfectly now, thank you!
Title: Re: Subaccounts
Post by: E.J. on April 26, 2017, 05:06:32 PM
Yeah, this mod package doesn't work, or at least the steps aren't as easy as simply modifying what errors out.

I followed these instructions to the letter, and edited only the files that said failed and my forum began throwing up a Template Parse error. What did I do wrong?
Title: Re: Subaccounts
Post by: Kindred on April 26, 2017, 10:42:11 PM
You made the edits in the wrong place(s)
Title: Re: Subaccounts
Post by: ariescapes on August 29, 2017, 01:55:14 AM
So I have an unusual issue.
1. All my permissions are in, and the install seems to have worked fine.
2. None - including the Admin Usergroup - can do anything with the subaccounts outside of "Create" and "Delete". No sharing, linking, nothing. (Aka, when I look at the listed subaccounts I only see the [X] to delete the subaccount. Which is normal for any other usergroup... but it's affecting the Admin Usergroup.
3. I have no log errors, so it looks like it installed just fine.

I'm baffled as to where to look to fix this.
Title: Re: Subaccounts
Post by: StarredSkies on October 16, 2018, 09:08:08 PM
Hi! Is there anyway I can add a confirmation box to my code so users can confirm their account deletion / merge? If so, where in the code? I haven't seen where to add it in. Thanks <3

I only ask because SMFShop is not merging items / currency over and I would like to tell my users to send that stuff to their main account before doing so.
Title: Re: Subaccounts
Post by: StarredSkies on February 18, 2019, 05:26:31 PM
Any hopes of updating this for SMF 2.1 RC1? My forum really relies on this modification and without it, we'd be in a rut.
Title: Re: Subaccounts
Post by: vbgamer45 on February 18, 2019, 06:43:06 PM
Not likely author has been around in years.
Title: Re: Subaccounts
Post by: Arantor on February 18, 2019, 06:56:39 PM
And the licence does not permit anyone to modify it.
Title: Re: Subaccounts
Post by: StarredSkies on February 18, 2019, 06:59:38 PM
Damn, that's an absolute shame... Hopefully there's alternatives out there? If you do know of any, let me know.
Title: Re: Subaccounts
Post by: Arantor on February 18, 2019, 07:00:59 PM
If I ever get my lazy ass back to work, I'll have an alternative for you but right now it's not in a shape suitable for you - https://github.com/StoryBB/StoryBB
Title: Re: Subaccounts
Post by: StarredSkies on February 18, 2019, 08:15:10 PM
I'd definitely appreciate that!

Wow. What you have there is absolutely fantastic. Badges and linked accounts? Heck yeah, man!
I'm reading through the information and it's absolutely fantastic. Keep up the hard work! I'll definitely keep an eye on things and if you'd like to possibly keep me updated, feel free to message me.
Title: Re: Subaccounts
Post by: liuet on September 17, 2019, 04:58:24 PM
I've installed this mod on a number of versions over the years, and it's a different issue every time...

I'm having the same issue as someone else some 10 replies up: it's fully installed, the dropdown shows up where it's supposed to, but it doesn't switch accounts when an account is selected.
SMF version 2.0.15
All files have been correctly edited, including default and current themes.

I've double-triple-checked that all the files have the appropriate edits in the right places, I just don't know what's left to check.
Title: Re: Subaccounts
Post by: StarredSkies on December 21, 2019, 08:26:06 PM
Any possible way to alphabetize the subaccount list? Seems like it would be useful.

If I find out how, I'll post here... For now I'll be looking up how to do so!
Title: Re: Subaccounts
Post by: njtweb on November 05, 2020, 08:09:15 AM
Is this permission-based? I wouldn't want my members who do post to have the option to choose different posting aliases. I would only want this to be used by admin only to generate discussion with a few posts back and forth between aliases before others take off with it. At which point the admins can let the discourse run from there.
Title: Re: Subaccounts
Post by: Diego Andrés on November 05, 2020, 10:32:04 AM
The description mention permissions and there is a picture showing an option to enable the creation of sub-accounts.
Title: Re: Subaccounts
Post by: truce. on March 04, 2021, 08:42:24 AM
Hey! So, I'm sorry if this isn't the right place to post this and I bet this is likely a silly question, but my site has been using this mod for a while now and now that the site has been handed over to me, I've been wanting to try sort out how to change those image icons because I'm sure they're not supposed to look like that! But, after having a good look around my site, I am stumped on how to do so? Any advice or help? I was contemplating reinstalling the mod all together but I'm scared that I will only make things worse.



Title: Re: Subaccounts
Post by: Kindred on March 04, 2021, 09:38:56 AM
well, without looking at your site code, I can only guess --   but the result certainly looks as if the icon images are either missing or mis-pointed to the wrong location.
Title: Re: Subaccounts
Post by: StarredSkies on December 13, 2023, 10:11:19 PM
Hello! Just want to double check. I assume with the lack of updates, this mod is essentially not going to be touched any further, correct?
Title: Re: Subaccounts
Post by: Doug Heffernan on December 14, 2023, 05:23:06 AM
Quote from: StarredSkies on December 13, 2023, 10:11:19 PMHello! Just want to double check. I assume with the lack of updates, this mod is essentially not going to be touched any further, correct?

I think that would be a correct assumption.
Title: Re: Subaccounts
Post by: StarredSkies on December 14, 2023, 07:20:47 AM
Welp. That's a shame. :,)