vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Quick Account Switch v1.2 (https://vborg.vbsupport.ru/showthread.php?t=70971)

Ianomed 10-26-2004 10:11 AM

Quote:

Originally Posted by Oblivion Knight
Hmm.. The ids were only separated by a commar and not a space.

It appears that the session has to be active before it can be switched. I successfully switched from my account to "Test Account", when trying to switch back I got the error occured while logging out again. I tested this again, this time clicking on a forum and returning to the forum home with Test Account, and switching back worked fine.

It appears that a bit more work is required with the queries or something, hopefully this issue is fixed with 1.1.. :)

The sessions are now permanent ones in 1.1.

Other than that, what you describe is a design feature: you cannot switch to a slave/master account if you're not logged on as one of those accounts. The sessions timing out rather quickly in 1.0 then caused what you experienced ;)

So with 1.1 as now sessions switched to are there to stay until you log out specifically (I think a year it is, by default), this shouldn't happen after the upgrade and logging in once.

Ianomed 10-26-2004 10:12 AM

Quote:

Originally Posted by kaotic
Genious! I've already thought of a creative method of use for this hack. Many thanks! :)

Care to share, Kaotic?
I'd like to expand the possible uses of the hack in the first post :D

Ianomed 10-26-2004 10:32 AM

Quote:

Originally Posted by bondjetta
Ok, it's running well for me :) but no integration to VBindex. :(

vBulletin Version 3.0.3 & vBindex Version 3.0.0 RC5

oh wait, i don't care :D this is fantastic :D Thank you

My pleasure :)

Not having worked with vBindex myself... if it makes use of vB's global.php, then it stands to reason you can intro the $master_account variable in the vBindex template as well, to have the dropdown appear ;)

If you can confirm that works or not, then if it doesn't I'll work on the integration when I have the time.

bondjetta 10-26-2004 11:06 AM

Quote:

Originally Posted by Ianomed
My pleasure :)

Not having worked with vBindex myself... if it makes use of vB's global.php, then it stands to reason you can intro the $master_account variable in the vBindex template as well, to have the dropdown appear ;)

If you can confirm that works or not, then if it doesn't I'll work on the integration when I have the time.

i'll give it a shot :) then let you know

Lionel 10-26-2004 12:26 PM

I nominate this for the hack of the month.

Ianomed 10-26-2004 12:32 PM

Why thankee kind Sir Lionel *bows*
Much obliged :)

Next month's HotM hopefully, if it comes to pass, this month drawing to a close fast.

The way things currently look here I'll have v1.2 ready end of next week, or sometime the week thereafter, with the improvements I outlined in the first post (for that version).


(Edit: might've been unclear I thanks Lionel, since it showed up on a pagebreak ;))

bondjetta 10-26-2004 12:53 PM

Quote:

Originally Posted by Ianomed
Why thankee kind Sir *bows*
Much obliged :)

Next month's HotM hopefully, if it comes to pass, this month drawing to a close fast.

The way things currently look here I'll have v1.2 ready end of next week, or sometime the week thereafter, with the improvements I outlined in the first post (for that version).

Ok, all I did was take the template addition from the Navbar template (as listed in the normal install instructions) and pasted it in after:

HTML Code:

<if condition="$showmemberwelcome">
        $vbphrase[welcome_back] $bbuserinfo[musername]!

in the VBINDEX template :) and it works fantastically! :)

versions: vBulletin Version 3.0.3 & vBindex Version 3.0.0 RC5

Ianomed 10-26-2004 12:57 PM

I had a feeling it just might do that, excellent :D

vBindex v3.0.0. RC5 will go up on the compatible hacks list shortly. Cheers for testing that combo, bondjetta.

D'you reckon the "Become:" should be phrased in the next version?

Edit: vBi is now listed as compatible in the first post.

bondjetta 10-26-2004 01:09 PM

Quote:

Originally Posted by Ianomed
I had a feeling it just might do that, excellent :D

vBindex v3.0.0. RC5 will go up on the compatible hacks list shortly. Cheers for testing that combo, bondjetta.

D'you reckon the "Become:" should be phrased in the next version?

Edit: vBi is now listed as compatible in the first post.

NO problem, glad to help :)

I don't mind the Become, it seems fitting (at least for my purposes)...and FYI i combined it with Nex's admincp cookie hack and it's working fine w/ vbindex & admin-cookie (i know you tested it, just a further test ;))...and helps me TREMENDOUSLY considering I normally have 3-4 tabs going at once w/ different user id's :D

Caiman 10-26-2004 01:12 PM

Great idea, my friend ;) I can see how this is going to be uberly useful for many people. Now get it installed for me :p (Im in uni, doing it myself is not an option from here)

Thanks Ianomedic :p

Ianomed 10-26-2004 01:17 PM

Quote:

Originally Posted by bondjetta
NO problem, glad to help :)

I don't mind the Become, it seems fitting (at least for my purposes)...and FYI i combined it with Nex's admincp cookie hack and it's working fine w/ vbindex & admin-cookie (i know you tested it, just a further test ;))...and helps me TREMENDOUSLY considering I normally have 3-4 tabs going at once w/ different user id's :D

Wo0t! same here. Three different browsers normally, two of which are tabbed. With switching this quick and thanks to Nex's hack a seperate ACP session this is in the past now :)

Edit: make that two browsers + IE :devious:

bondjetta 10-26-2004 01:38 PM

Quote:

Originally Posted by Ianomed
Wo0t! same here. Three different browsers normally, two of which are tabbed. With switching this quick and thanks to Nex's hack a seperate ACP session this is in the past now :)

Edit: make that two browsers + IE :devious:

yeah, i should start testing IE too :rolleyes: i'd rather stick to FF and Opera :D

Oblivion Knight 10-26-2004 02:38 PM

Updated to v1.1, but I still get the error logging out message doing the method I explained.

I switch from "Oblivion Knight" to "Test Account", I then try to instantly switch back from "Test Account" to "Oblivion Knight" and the userid when logging out is parsed as 0 which gives the error logging out message. Is that something that can be fixed, or a design flaw in the way that vB handles user sessions?

Ianomed 10-26-2004 03:36 PM

Do you have any unusual cookie/session settings in vB? That being shorter than usual timeout, things like that.

For some reason the session has expired when you switch back to Oblivion Knight. I'll look into this for 1.1.1 or 1.2 *nods*

If it can be fixed, which I believe it can, then it's likely not going to be a drastic change to the code I introduced in login.php. :)

Oblivion Knight 10-26-2004 04:05 PM

Nope.. My cookie settings are all default I believe.!

Time-Out for Cookie: 900
Path to Save Cookies: /
Cookie Domain:
GZIP HTML Output: Yes
GZIP Compression Level: 1
Add Standard HTTP Headers: No
Add No-Cache HTTP Headers: Yes
Remove Redirection Message Pages: Yes

Could it have anything to do with this setting:
Simultaneous Sessions Limit

This is currently on 0 (disable)..

Ianomed 10-26-2004 07:01 PM

If a limit is disabled... then probably not. As it is I'm fairly certain I'll have this problem worked out tomorrow, in which case I'll up the version to 1.1.1. for maintenance release. The other improvements as charted in the first post will still be for v1.2.

Lionel 10-26-2004 09:01 PM

I have same problem too. Logs me out (timeout) or prevents me from login out. I noticed it does so when I go in admincp and spend sometime in there

Ianomed 10-26-2004 09:10 PM

@Lionel: Should be fixed in 1.1.1., released tomorrow/today (midnight here now) sometime if it goes according to plan. I'm going to more closely model the switch code creating the cookie to vB's own login code.

Lionel 10-26-2004 09:25 PM

regardless of inconveniences, I'll never uninstall that hack...

Ianomed 10-26-2004 10:39 PM

Alrighty then :D

The session expiration problem has been solved, maintenance version 1.1.1. released.

For those who have v1.1. already installed there is an attachment with the upgrade instructions, switch_11_to_111.txt.

Anyone installing from the new installation instructions (switch_111.txt) will end up with v1.1.1., which has the same fix applied.

Both of these files can be found in this thread's first post.

No updates to this hack are expected to take place until v1.2., introducing new features (and less overhead).

bondjetta 10-27-2004 12:22 AM

Quote:

Originally Posted by Ianomed
Alrighty then :D

The session expiration problem has been solved, maintenance version 1.1.1. released.

For those who have v1.1. already installed there is an attachment with the upgrade instructions, switch_11_to_111.txt.

Anyone installing from the new installation instructions (switch_111.txt) will end up with v1.1.1., which has the same fix applied.

Both of these files can be found in this thread's first post.

No updates to this hack are expected to take place until v1.2., introducing new features (and less overhead).

what about people who had 1.0 ;) i did the 1.1.1 upgrade and it works (so far) if i notice anything strange i'll let you know :)

Ianomed 10-27-2004 12:43 AM

Hiya Bondjetta,

I addressed that in the upgrade notifcation, sent when I hit that button at the top of the thread (well for coders anyway) ;)

"Anyone on v1.0 is asked download the installation instructions, switch_111.txt, and perform the steps concerning login.php and global.php (after removing v1.0's addition to these)."

But you're right... it's good to address it here as well.

The only changes from v1.0 to v1.1 are to global.php and login.php.

From v1.1 to v1.1.1 is login.php only. So from what I understand is your global.php is on version v1.0 of the hack still. Please download the new install instructions and swap out global's part of the hack.

I'll add a 10_to_111.txt in the morning, it's 3:36am here at the moment. Logic dictates I really should try that thing called sleep sometime soon. :p


v1.2 is due probably around the 12th of next month, but ultimately when ready. The installation/upgrade instructions for that one will be a tad tougher, but i'll try to keep them as easy as possible.

bondjetta 10-27-2004 12:47 AM

Quote:

Originally Posted by Ianomed
Hiya Bondjetta,

I addressed that in the upgrade notifcation, sent when I hit that button at the top of the thread (well for coders anyway) ;)

"Anyone on v1.0 is asked download the installation instructions, switch_111.txt, and perform the steps concerning login.php and global.php (after removing v1.0's addition to these)."

But you're right... it's good to address it here as well.

The only changes from v1.0 to v1.1 are to global.php and login.php.

From v1.1 to v1.1.1 is login.php only. So from what I understand is your global.php is on version v1.0 of the hack still. Please download the new install instructions and swap out global's part of the hack.

I'll add a 10_to_111.txt in the morning, it's 3:36am here at the moment. Logic dictates I really should try that thing called sleep sometime soon. :p


v1.2 is due probably around the 12th of next month, but ultimately when ready. The installation/upgrade instructions for that one will be a tad tougher, but i'll try to keep them as easy as possible.

gotcha, it told me to download that file, but i couldn't find it :( but i'll go look again ;) mostly 'cause i'm retarded and looked for the wrong file name :rolleyes:

updated global and login :D thanks!

Ianomed 10-27-2004 12:53 AM

As attached to the first post.
https://vborg.vbsupport.ru/attachmen...chmentid=21405

Now I'm really going off to bed, lol. Having checked out your forums, I'll register there tomorrow. Buddhism is exactly my cup of coffee. :D

bondjetta 10-27-2004 01:01 AM

Quote:

Originally Posted by Ianomed
As attached to the first post.
https://vborg.vbsupport.ru/attachmen...chmentid=21405

Now I'm really going off to bed, lol. Having checked out your forums, I'll register there tomorrow. Buddhism is exactly my cup of coffee. :D

fantastic :D sleep well :)

Lionel 10-27-2004 01:54 AM

Very sorry to say that cookie is not holding. Same thing is still happening. After a time, it will not switch and won't allow you to log out unless you go back to home page.

Lionel 10-27-2004 01:58 AM

My observation: that happens when I log in as admin, stay in there for a while... Maybe that has to do with conflicting permissions?

Ianomed 10-27-2004 02:26 AM

Lionel, is this with v1.1 of the hack, or v1.1.1?

With the latest version I've switched about a good deal to regular accounts, then waited a couple of hours on the admin account and the session is still alive. This is even after closing the browser and navigating back later.

As such, does this still happen to anyone else using v1.1.1?
This version does exactly what it's supposed to do for me, which considering the changes I introduced today I would expect it to. Programmatically it does almost exactly the same thing when switching as vB would do if you logged out, then logged in straight thereafter (taking out the redirect inbetween, basically).

bondjetta 10-27-2004 02:58 AM

Quote:

Originally Posted by Ianomed
Lionel, is this with v1.1 of the hack, or v1.1.1?

With the latest version I've switched about a good deal to regular accounts, then waited a couple of hours on the admin account and the session is still alive. This is even after closing the browser and navigating back later.

As such, does this still happen to anyone else using v1.1.1?
This version does exactly what it's supposed to do for me, which considering the changes I introduced today I would expect it to. Programmatically it does almost exactly the same thing when switching as vB would do if you logged out, then logged in straight thereafter (taking out the redirect inbetween, basically).

there might be some type of browser dependency, i'm finding some w/ Firefox now w/ a different issue.

so far it's sticking for me...it did log me out once, but i decided to clear all my forum cookies and try it over just in case something was "off".

Oblivion Knight 10-27-2004 07:48 AM

The upgrade went smooth, and v1.1.1 appears to be working great for me.!

Thanks for your hard work and support Ianomed.. :)

Ianomed 10-27-2004 09:29 AM

Excellent, good to hear that, bondjetta and knight. :D

Oblivion Knight 10-27-2004 10:18 AM

Just to note that this adds 2 queries to every page, for every user listed in that particular users account master field. So currently it's not advisable to use this feature for many users..

Will this be optimised in v1.2?

Ianomed 10-27-2004 10:51 AM

v1.1 already added the two queries, to make sure no wrong ID was matched.

Indeed, it will be optimised.

In v1.2 it will use all of zero extra queries per page for those online users who don't have extra accounts.

For those online with a linked account (either as the slave account or master account) it'll use a query for each of the additional accounts to resolve the name, and another for the usergroup formatting/colouring.

Possibly I'll be able to optimise that in itself as well. The username can only be changed in two places, I think, ACP and the userCP (if allowed)... so tapping in there to update a cached username for the slave accounts would remove one of those two queries per alternate account.

And a setting for the mod to disable the usergroup colouring in the menu would skip that extra query. It would of course also stop colouring the username ;)

Possibly this too I could cache *thinks* There is the matter of usergroup promotions which would have to be tapped in ontop of the regular usergroup changes, so for the time being I'll more likely make this group formatting a thing you can switch off in v1.2 onwards.

In other words v1.2 will intro two fields to the user table, one for determining if you're the master account to any slaves, if that's empty it'll check if the 'is_slave_of' field is empty as well. If this is the case the script will do nothing more. These fields will be pulled out of the usertable during the init stage, it shouldn't take an extra query :)

As for caching the username in this setup... that data can be serialised into the 'is_master_of' and 'is_slave_of' fields as appropriate, so it will store the userid you can switch to as well as it's name.

To then further speed it up that colouring can be switched off, people know what account name does what (I should hope). I've added it to the hack for consistency to start with, really.

Lionel 10-27-2004 12:39 PM

this is happening to me with the latest 1.11. But don't go by me as I had my who's online issue in the past.

Ianomed 10-27-2004 12:54 PM

Lionel, I can you try this with a different browser than you normally use? Preferably one you haven't used on your forum yet. Mozilla if you use IE, or vice-versa would do. If this then works, we know it's some cookie debris, and cleaning out the cookies you have for your forum should fix it for you.

If you don't want to go as far as clearing the cookies for your site, you can start with logging out manually via the regular way once, then logging into the master account on your normal browser. If this then doesn't work you're left with only the removal of cookies.

This all of course if you do at all allow a cookie to be set? Dumb question probably, but better to rule out.

So far of all boards who reported back to me one way or the other on 1.1.1, there's 7 on which the timeout problem is gone, to your 1 board where it's not... This really does lead me to believe it's either a residue of your former hacks somehow, or a browser issue.

Since you stated you're happy to run the mod with this 'hitch' you experience I'll try in return to help debug the problem for you best I can. If you know of anything in your setup that would cause this incompatibility I will see if there's something I can do about it, without causing inconvenience to those it works for.

Lionel 10-27-2004 01:09 PM

Thank you. I just installed fireworks. Let us see how it goes. I'll report later on

Ianomed 10-27-2004 01:19 PM

Watch out, you may like Mozilla so much you'll end up a convert as well ;)
It's happened to Caiman recently after he first tried it.

Disclaimer: This message is in no way sponsored by Mozilla.org, they just do that mojo that they do so well.

bondjetta 10-27-2004 01:44 PM

Quote:

Originally Posted by Ianomed
Watch out, you may like Mozilla so much you'll end up a convert as well ;)
It's happened to Caiman recently after he first tried it.

Disclaimer: This message is in no way sponsored by Mozilla.org, they just do that mojo that they do so well.

that's hilarious :D

and i have no problem advertising for firefox :D that program is fantastic! :D

bondjetta 10-27-2004 02:26 PM

Hey Ianomed: bad news....i'm getting logged out too. :( not sure what the trigger is, i cleared all etc.com cookies (i'm at work now, FF 0.1.1PR) and every...i'd say 10ish minutes i'm getting knocked out. Mind you I run 2-3 tabs minimum for ETC (2 backend, 1-2 front end) depending on what i'm doing. Might that have some adverse affects?

Lionel 10-27-2004 02:54 PM

me too. In both firefox and IE. This after I deleted all cookies


All times are GMT. The time now is 07:35 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01353 seconds
  • Memory Usage 1,850KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete