News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Subaccounts

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

Previous topic - Next topic

MacTrom

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.

Caltan

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.

studiowi33

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
SMF 2.0.2

ATLANTIS29

think im gonna wait for 2.0 compatibility cos with 8 forums to do will take ages for me

rebekahc

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?

zushiba

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.

rebekahc


Mari-chi

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*

Eliana Tamerin

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.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Mari-chi

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.

ariescapes

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?

Goss

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!

Eliana Tamerin

Ensure that all your globals are declared. Both context and modSettings need to be.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

ariescapes

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?

Eliana Tamerin

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.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

ariescapes

Problem with that is I get this error:
"The following error(s) occured:
The selected username/display name has already been taken."

Shay5422

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. 

Songtress

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?

Mikirin

I'm using the Glacier Theme.
I had to manually edit the template, but there's a problem with the switch account dropdown.

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

Goss

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?

Advertisement: