Advertisement:

Author Topic: Subaccounts  (Read 187238 times)

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,759
  • Gender: Male
Re: Subaccounts
« Reply #540 on: November 12, 2015, 08:10:55 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.

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
Code: [Select]
'sticky' => array('LockTopic.php', 'Sticky'),Which exists in every SMF installation for sure. Yet your file has:
Code: [Select]
'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.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,265
  • Gender: Male
    • Kindred-999 on GitHub
Re: Subaccounts
« Reply #541 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
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Offline chuman

  • Semi-Newbie
  • *
  • Posts: 13
Re: Subaccounts
« Reply #542 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.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,265
  • Gender: Male
    • Kindred-999 on GitHub
Re: Subaccounts
« Reply #543 on: November 13, 2015, 08:11:30 AM »
you ONLY have to "manually" do the bit(s) that failed...
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Offline chuman

  • Semi-Newbie
  • *
  • Posts: 13
Re: Subaccounts
« Reply #544 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.

Offline Eliana Tamerin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,612
  • Gender: Female
Re: Subaccounts
« Reply #545 on: November 16, 2015, 10:18:48 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.
Do NOT PM me for support.

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

Offline chuman

  • Semi-Newbie
  • *
  • Posts: 13
Re: Subaccounts
« Reply #546 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?

Offline Eliana Tamerin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,612
  • Gender: Female
Re: Subaccounts
« Reply #547 on: November 16, 2015, 12:26:59 PM »
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.
Do NOT PM me for support.

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

Offline chuman

  • Semi-Newbie
  • *
  • Posts: 13
Re: Subaccounts
« Reply #548 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

Code: [Select]
global $context, $settings, $options, $scripturl, $txt, $user_info, $modSettings;

This is what it wanted it to be:
Code: [Select]
global $context, $settings, $options, $txt, $user_info, $scripturl;
I'm not sure if "modsettings" was a problem

Found this part
Code: [Select]
/* 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:
Code: [Select]
$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
Code: [Select]
<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


Offline Eliana Tamerin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,612
  • Gender: Female
Re: Subaccounts
« Reply #549 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:
Code: [Select]
function template_init()
{
global $context, $settings, $options, $txt;

Replace with this:
Code: [Select]
function template_init()
{
global $context, $settings, $options, $txt, $user_info, $scripturl;
Do NOT PM me for support.

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

Offline chuman

  • Semi-Newbie
  • *
  • Posts: 13
Re: Subaccounts
« Reply #550 on: November 17, 2015, 03:57:02 AM »
Thank you so much that fixed it!! My members are so excited!

Offline chuman

  • Semi-Newbie
  • *
  • Posts: 13
Re: Subaccounts
« Reply #551 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.

Offline zushiba

  • Jr. Member
  • **
  • Posts: 118
Re: Subaccounts
« Reply #552 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.
« Last Edit: March 05, 2016, 05:12:48 AM by Irisado »

Offline zushiba

  • Jr. Member
  • **
  • Posts: 118
Re: Subaccounts
« Reply #553 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.

Offline Irisado

  • Una Luz Brillante en la Oscuridad
  • Doc Coordinator
  • SMF Super Hero
  • *
  • Posts: 10,915
  • Soñando debajo del arco iris
Re: Subaccounts
« Reply #554 on: March 05, 2016, 05:14:03 AM »
Attachment removed as requested :).
Soñando con una playa donde brilla el sol, un arco iris ilumina el cielo, y el mar espejea iridescentemente

Offline dolliebaby77

  • Semi-Newbie
  • *
  • Posts: 13
Re: Subaccounts
« Reply #555 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.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,265
  • Gender: Male
    • Kindred-999 on GitHub
Re: Subaccounts
« Reply #556 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
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Offline wqrts

  • Newbie
  • *
  • Posts: 1
Re: Subaccounts
« Reply #557 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.
« Last Edit: December 11, 2016, 02:20:03 PM by Kindred »

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,265
  • Gender: Male
    • Kindred-999 on GitHub
Re: Subaccounts
« Reply #558 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.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Offline chuman

  • Semi-Newbie
  • *
  • Posts: 13
Re: Subaccounts
« Reply #559 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.