News:

Join the Facebook Fan Page.

Main Menu

Subaccounts

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

Previous topic - Next topic

Atomic Blaze

@shoepixie: what errors are you getting? The package manager should tell you what the errors are.
Trick number one, looketh over there. Doth endeth the trick.

Follow me on Twitter!

Party Llama || GitHub

Evolutionist

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

shoepixie

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!

bellrosk

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 << 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.

Garou

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.

bellrosk

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?

Caltan

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 discusses the easiest-to-miss changes, adding $user_info and $scripturl to template_init().

SlammedDime

bellrosk - Caltan pretty much nailed what the issue likely is.
SlammedDime
Former Lead Customizer
BitBucket Projects
GeekStorage.com Hosting
                      My Mods
SimpleSEF
Ajax Quick Reply
Sitemap
more...
                     

bellrosk

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?

Caltan

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 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.

bellrosk

Ah that worked beautifully. Thankyou very much!

Virginia

#151
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

kherezae

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 [nofollow]

Caltan

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.  :)

kherezae

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 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 [nofollow]

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!

ianus

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)

Greymalkin

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?

ianus

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.

Caltan

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?

Greymalkin

#159
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.

Advertisement: