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)

bondjetta 10-27-2004 02:58 PM

right now i'm trying some different things.

1) logging in as one name and not switching at all...so far so good
2) logging in as one name then switching and staying that name (soon)
3) logging in as one name (in 1 tab) and logging into admincp (in another tab)
4) logging in as one name then switching (in 1 tab) and logging into admincp and letting it sit there

i've got a bunch of these, hopefully one will yield a result :)

Ianomed 10-27-2004 03:14 PM

I've not been able to make it log me out yet after several switches and letting it sit. Revisiting 3 sites after several hours still had me logged on as the user I last switched to, with session length at 900 seconds (15 minutes). And I'm a prolific user of tabbed browsing myself. *scratches head*

Thanks for running these tests, people :)

I'm interested to see what results this will yield. Between us we should be able to make this work for (almost) all boards.

bondjetta 10-27-2004 03:19 PM

Quote:

Originally Posted by Ianomed
I've not been able to make it log me out yet after several switches and letting it sit. Revisiting 3 sites after several hours still had me logged on as the user I last switched to, with session length at 900 seconds (15 minutes). And I'm a prolific user of tabbed browsing myself. *scratches head*

Thanks for running these tests, people :)

I'm interested to see what results this will yield. Between us we should be able to make this work for (almost) all boards.

you know Nex's admincp dual cookie hack? do you know much about it? because that isn't keeping me logged in and I bet that might be interacting somehow...

bondjetta 10-27-2004 03:28 PM

done :)

Here's what I did, this took place over a 10 minute period:

1) I was logged in as Botanist (ianomed this'll make sense to u)
2) I switched to bondjetta (browsed the forums)
3) Opened new Tab, logged into admincp (not cookied though my browser hasn't closed, which is why i asked about the Admincp cookie hack)
4) went back over to front end (as bondjetta) clicked a link or so
5) waited ~10mins (I was on a conference call ;))
6) Opened new tab to ETC.com (so count 3 tabs now) and BOOM i was no longer logged in.

hope it helps, if you have questions let me know, i can try duplicating the results as well.

Ianomed 10-27-2004 03:37 PM

Quote:

Originally Posted by bondjetta
you know Nex's admincp dual cookie hack? do you know much about it? because that isn't keeping me logged in and I bet that might be interacting somehow...

It gives the ACP its own cookie. And indeed, the adminCP will log you out after a while.

Possibly it could log you out if you switch to your admin account, then do something in the adminCP again. Or something along those lines. It's a bit hard to explain my reasoning for it, but if you're one account in the forum and another in the ACP then it should keep you logged on.

Any possible scenarios where this hack breaks, with or without Nex's hack will be good to study. I'll introduce any special programming for those circumstances in v1.2. Like I said in the last post, I've not been able to make it break yet on 1.1.1, and it's hard to debug something you can't replicate :)

bondjetta 10-27-2004 03:42 PM

Quote:

Originally Posted by Ianomed
It gives the ACP its own cookie. And indeed, the adminCP will log you out after a while.

Possibly it could log you out if you switch to your admin account, then do something in the adminCP again. Or something along those lines. It's a bit hard to explain my reasoning for it, but if you're one account in the forum and another in the ACP then it should keep you logged on.

Any possible scenarios where this hack breaks, with or without Nex's hack will be good to study. I'll introduce any special programming for those circumstances in v1.2. Like I said in the last post, I've not been able to make it break yet on 1.1.1, and it's hard to debug something you can't replicate :)

i just gave you the steps to replicate it ;) log into a slave account, then switch to master, open a new tab for admincp (maybe even click something in there), then wait a few minutes and make a new tab back to your forum's homepage....that's what i did :)

Ianomed 10-27-2004 04:02 PM

Bondjetta, check PM@ETC for some instructions specific to you to narrow things down some more... I think we're getting at something :)

bondjetta 10-27-2004 04:36 PM

Quote:

Originally Posted by Ianomed
Bondjetta, check PM@ETC for some instructions specific to you to narrow things down some more... I think we're getting at something :)

will do :)

FYI i just got timed out over lunch on ETC, but VB.org kept me in...~45mins

Holidazed 10-27-2004 04:44 PM

How do we make it so the users can set up their own "Quick Switch". I run a site that allows users to have multiple accounts. This would be great for them. How does your have validate that they have the right to use that additional account?

bondjetta 10-27-2004 04:47 PM

Quote:

Originally Posted by bitg
How do we make it so the users can set up their own "Quick Switch". I run a site that allows users to have multiple accounts. This would be great for them. How does your have validate that they have the right to use that additional account?

that's a future plan for v1.2 :) right now that would be an admin-only mod.

Ianomed 10-27-2004 05:00 PM

Not exactly, bondjetta. ;)

Bitg, this is run on the two RPG forums I initially cobbled it together for. And as such lets a dozen or so people switch between their various accounts.

With the hack as it is at the moment the admin will have to define the slave accounts on the main user's profile (from the ACP). In v1.2 this selection will be easier still, not requiring to enter the UserID number.

As for allowing users to string together their various accounts themselves: this I listed as 'future non-options (things I'm likely not to implement)'.

So while it works for several accounts to have slave accounts perfectly, the admin will have to set these up.

And I know I can create a user-mode, with a validation procedure a user can go through to prove the 2ndary account is theirs as well. I have so far chosen not to implement this, is all.

Being involved in RPG forums I know it's not much of a trouble for an admin to string accounts together like this, plus it'll let you keep tabs on users as well.

If it's ever going to be implemented this will be v1.3 or after. First I mean to have less of a performance overhead, the new admin interface, and the option to show the 2ndary accounts on one's profile. :)

bondjetta 10-27-2004 05:12 PM

Quote:

Originally Posted by ianomed
As for allowing users to string together their various accounts themselves: this I listed as 'future non-options (things I'm likely not to implement)'.

ah, an option likely NOT to have ;) that's important :D

bondjetta 10-27-2004 05:13 PM

***pssst***

13mins inactivity = logged out. no admincp, still logged in as botanist.

Ianomed 10-27-2004 05:26 PM

I think it's important to list as a coder releasing a hack, so I did from the first day :)

It's possible I'll let myself be persuaded to implement it in v1.3+, if lots of people ask for it. This as long as it doesn't interfere at all with the working of the slim-line part of it, of course.

Letting users string accounts together I know some admins will not want to allow for. I'm one of them, I rather link accounts for members so I'm aware of their aliases without checking an overview page.

As it stands I don't think making the option available in v1.3+ would be much of a problem, but I remain reserved on this. :)

The way I would implement it, if it comes to that will be something along these lines:

1) User A in his UserCP selects the option (if given permission based on usergroup) to link accounts.

2) User A tells the hack he'd like to see User B and C become a slave account, where being logged in on either will show the other accounts.

3) Users B & C both get a PM from the hack with a link to verify this. An acknowledge and deny link.

3.1) The acknowledge link would string the two accounts together, optionally sending a PM to the admin.

3.2) The deny link would strike User A (like the login strike system). On a 2nd try it would revoke the right to string accounts together, as well as PM the admin.

(saying they accidentally clicked Deny while they were in fact User B as well, this would allow them to try again, once.)

Meanwhile the admin, from the ACP section of the hack could bring up a report on linked accounts. Showing all master accounts with slaves indented (like subfora).

Ianomed 10-27-2004 05:31 PM

Quote:

Originally Posted by bondjetta
***pssst***

13mins inactivity = logged out. no admincp, still logged in as botanist.

*pssssttt*, weird question perhaps... but are you sure you performed the Lxxxxxxx replacement step in the upgrade? :)

If the username/password are missing or invalid in the cookie, then after the session has expired it wouldn't automatically log you back transparently either.

Just trying to rule out everything here <g>

I'll put together test cases tomorrow mimicking the ones you tried today, bondjetta. If there's anything in this hack or the combination with Nex's, I'm determined to find it. :D

Especially since it works without logging out after 10 minutes on the majority of boards... t'is a bit of a mystery, currently. I like mysteries, but I'd rather still it work for everyone.

bondjetta 10-27-2004 06:02 PM

Quote:

Originally Posted by Ianomed
*pssssttt*, weird question perhaps... but are you sure you performed the Lxxxxxxx replacement step in the upgrade? :)

If the username/password are missing or invalid in the cookie, then after the session has expired it wouldn't automatically log you back transparently either.

Just trying to rule out everything here <g>

I'll put together test cases tomorrow mimicking the ones you tried today, bondjetta. If there's anything in this hack or the combination with Nex's, I'm determined to find it. :D

Especially since it works without logging out after 10 minutes on the majority of boards... t'is a bit of a mystery, currently. I like mysteries, but I'd rather still it work for everyone.

Here's the thing. the code says replace Lxxxxxxx w/ the value listed at the top (which I did) but i also had to replace the license # at the top because my old license was expired and i bought an Owned license so i got a new license number :)

but it also said (sort of cryptically) "and in the do=login section". well i found do=login but nowhere to add the license number :( if i could SCP from work i'd copy the code in here (minus the # obviously) to show you what I see...keep in mind i'm VERY new to PHP :) but still understand 90% of coding syntax well :)

Ianomed 10-27-2004 06:06 PM

Sorry, I should perhaps rephrase those instructions there.

What that one sentence meant to read as is: Find the license number, which you can find at the top or in the do=login section, then put that where it says Lxxxxxxx in my programming. :)

So no need to do anything to the do=login section at all, I'd even advise against it.

In the install/upgrade file:

Quote:

// pay attention here, replace Lxxxxxxx with your own license number as found at the top of the file, and in the do=login section
Now since there's no Lxxxxxxx in the do=login part of the file, as well as that comment appearing near a line of programming that contains Lxxxxxxx, I believed this would sufficiently point out what I just rephrased above :D

Have you a suggestion how to disambiguate that step?

bondjetta 10-27-2004 06:14 PM

Quote:

Originally Posted by Ianomed
Sorry, I should perhaps rephrase those instructions there.

What that one sentence meant to read as is: Find the license number, which you can find at the top or in the do=login section, then put that where it says Lxxxxxxx in my programming. :)

So no need to do anything to the do=login section at all, I'd even advise against it.

In the install/upgrade file:



Now since there's no Lxxxxxxx in the do=login part of the file, as well as that comment appearing near a line of programming that contains Lxxxxxxx, I believed this would sufficiently point out what I just rephrased above :D

Have you a suggestion how to disambiguate that step?

you know, for someone using ESL (english as a second language) you know bigger words than most of my friends here in the US! ;)

anywho...do you truely need the part about: ", and in the do=login section" or can we drop that altogether? because my license number doesn't appear in that part (unless i missed it entirely, it was late, but i'm pretty sure).

but at least i know i did that right :D

EDIT: wait...the License @ the top of the page is commented out...which means there must be a listing of that Lxxxxxxxx number in the do=login section unless the md5 comparison can pull that value out of a commented line?? which i dont think it can (though again, php illiterate). :ermm:

thoughts?

Ianomed 10-27-2004 06:24 PM

Don't need to as such, no :)

I just put that in there as a second reference to locate the license #, to use in the cookie code. Obviously trying to clear something up should do just that, so I'll drop that bit from the instructions. :D

And yes, it was in the do=login code, lol... in the admincp and modcp specifics:
PHP Code:

if (!$_REQUEST['cookieuser'] AND empty($_COOKIE[COOKIE_PREFIX 'userid']))
            {
                
vbsetcookie('userid'$bbuserinfo['userid'], 0);
                
vbsetcookie('password'md5($bbuserinfo['password'] . 'Lxxxxxxx'), 0);
            } 

The license code replaced with x's in this quote, naturally. Since the code is similar (for a good reason), I thought when I wrote the instructions that it may help locate the number (seeing the same thing appear twice would strenghten the belief it was the correct bit).

bondjetta 10-27-2004 06:36 PM

Quote:

Originally Posted by Ianomed
Don't need to as such, no :)

I just put that in there as a second reference to locate the license #, to use in the cookie code. Obviously trying to clear something up should do just that, so I'll drop that bit from the instructions. :D

And yes, it was in the do=login code, lol... in the admincp and modcp specifics:
PHP Code:

if (!$_REQUEST['cookieuser'] AND empty($_COOKIE[COOKIE_PREFIX 'userid']))
            {
                
vbsetcookie('userid'$bbuserinfo['userid'], 0);
                
vbsetcookie('password'md5($bbuserinfo['password'] . 'Lxxxxxxx'), 0);
            } 

The license code replaced with x's in this quote, naturally. Since the code is similar (for a good reason), I thought when I wrote the instructions that it may help locate the number (seeing the same thing appear twice would strenghten the belief it was the correct bit).

i think there's a good chance I was lookin in the wrong place then, because i promise my code doesn't look like that (where I was looking) so when i get home tonight (and after Smallville) i'll see what i can find, i think that's part of my problem :)

Ianomed 10-27-2004 06:37 PM

Could be owned versus leased codes ;)
I dunno, always worked with Leased boards.

bondjetta 10-27-2004 06:47 PM

Quote:

Originally Posted by Ianomed
Could be owned versus leased codes ;)
I dunno, always worked with Leased boards.

doubt it :) but i'll check again...you have PM btw :)

Ianomed 10-27-2004 06:50 PM

that part in the php I just quoted (with the license replaced)... it should give you the same number as the header of the file:

Code:

/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.0.3 - Licence Number Lxxxxxxx
|| # ---------------------------------------------------------------- # ||
|| # Copyright ?2000–2004 Jelsoft Enterprises Ltd. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/

Now I do acknowledge that what you may find in both places may not start with an L, as I said I've only worked with leased boards <g>.

But that number, which appears several times in login.php (including the preceding letter), is what we're after to put in the cookie code for the switch section. It needs after all create a compatible cookie to work :)

bondjetta 10-27-2004 06:58 PM

Quote:

Originally Posted by Ianomed
that part in the php I just quoted (with the license replaced)... it should give you the same number as the header of the file:

Code:

/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.0.3 - Licence Number Lxxxxxxx
|| # ---------------------------------------------------------------- # ||
|| # Copyright ?2000–2004 Jelsoft Enterprises Ltd. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/

Now I do acknowledge that what you may find in both places may not start with an L, as I said I've only worked with leased boards <g>.

But that number, which appears several times in login.php (including the preceding letter), is what we're after to put in the cookie code for the switch section. It needs after all create a compatible cookie to work :)

*sigh*

ok...i know where that location of Lxxxxxxx is (and FWIW my license number also starts w/ L and it's an owned license :))...i'm just going to have to do a find and replace of the old lic.# vs. new lic.# :)

Ianomed 10-27-2004 07:00 PM

See PM@ETC about that, there's things to consider :)

bondjetta 10-27-2004 07:54 PM

Quote:

Originally Posted by Ianomed
See PM@ETC about that, there's things to consider :)

ok, i got the login.php file updated...my code did look slightly different but I found the old Lxxxxxx value and replaced it w/ my new one :) that's good news. we'll see if the problem repeats itself (shouldn't) :D

and fyi i have to update every .php file w/ my new license number :) yay

Ianomed 10-28-2004 12:32 AM

That's good news, indeed. :)
It paid to ask. *nods*

So now if login.php is all good, you'll likely not be logged out anymore. Wooha!

bondjetta 10-28-2004 12:55 PM

Quote:

Originally Posted by Ianomed
That's good news, indeed. :)
It paid to ask. *nods*

So now if login.php is all good, you'll likely not be logged out anymore. Wooha!

so far so good! :) all night on my work computer and no logout issues :) Thanks Ianomed :D

Ianomed 10-28-2004 01:13 PM

You're most welcome, Mr. bond... jetta bond. ;)

zurih 11-13-2004 03:42 PM

great hack! thanks!!

Ianomed 11-13-2004 03:50 PM

My pleasure, zurih.

v1.2 will be available before long, if you click install it'll keep you updated. :)
It'll sport lesser overhead and a proper admin interface, doing away with the custom profile field.

n.b. on that template thing in the other thread, you can combine the <if>'s, I just posted a revision doing just that.

Ianomed 11-15-2004 09:53 PM

v1.2 is ready and tested. :)

Installation and update instructions, revised screenshots, change log and so on will be up within the next 24h. I'll send out an update.

zurih 11-16-2004 03:48 PM

:) waiting for that update Ianomed..

Ianomed 11-16-2004 04:00 PM

it's not been 24h yet ;)

won't be long now, it's a bit more complicated and involved to install than the previous versions, so I'm wanting to make sure the installation instructions are up to par. :)

v1.3 and onwards I'll try to have an install/update script included.

zurih 11-16-2004 05:43 PM

lol :) I didnt say its been 24h already...
take u'r time. no rash..

Ianomed 11-17-2004 06:54 AM

v1.2 released, including an installscript to add the phrases introduced in this version, and to add the new field to the user table (if the vB DB user account has sufficient permissions).

See changelog in top post for more information :)

zurih 11-17-2004 08:56 AM

:):)
thanks for this Ianomed. u'r a good man... ;)

Ianomed 11-17-2004 08:58 AM

my pleasure, let me know if you run into any snags with this version? :)

btw... Location: T-A = Tel Aviv?
I though for a moment you said you lived in Villa Straylight/Freeside, T-A being an abbreviation of Tessier-Ashpool (Sprawl Trilogy, William Gibson). :P

bondjetta 11-17-2004 11:37 AM

cool i'll have to do this tonight :) Thanks Ianomed!

Ianomed 11-17-2004 12:21 PM

my pleasure, mr. bond ;)


All times are GMT. The time now is 03:08 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.01641 seconds
  • Memory Usage 1,863KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (15)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