News:

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

Main Menu

Subaccounts

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

Previous topic - Next topic

Aiko

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.
Using SMF RC4

ishy

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.

Aiko

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?
Using SMF RC4

mirahalo

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

L.G.S

Can other members see if a user has sub accounts?
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


cosoa

#205
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!

FireDitto

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 =)
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

C4G-TK

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.

-img removed-

cosoa

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.

cosoa

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.

C4G-TK

Glad you figured it out.  It's summer, so have been spending my extra time (night/day) at the beach!

-img removed-

Caltan

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.

cosoa

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.

FireDitto

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.
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

FireDitto

Hi, I was wondering if you could help me out with an issue I'm having.

I've used this 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?

Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

NanoSector

Is this still updated for 2.0 RC3?
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

mirahalo

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.

NanoSector

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
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

mirahalo

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

NanoSector

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.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Advertisement: