Log in

View Full Version : Quick Account Switch v1.2


Ianomed
10-24-2004, 10:00 PM
Quick Account Switch v1.2.
by Ianomed

Uses of this hack:
This account will let you string together several accounts owned by the same person. Of course it will also let you string together accounts owned by different people, but that's a dangerous thing to do. :)

What then is the use of stringing accounts together? Well, this hack will let you switch from one to the other account without having to log out, then log in again. Those interested in the technical aspect I refer to the addition made to login.php, it's all quite simple. You'll see now why it's dangerous to string together your account with someone else's, they'd be able to switch to your account.

I wrote this for two play-by-board RPGs that I frequent, at each of which I have several accounts, an account for each character. This lets me assume another account in moments.

It's also used by admins to switch between test accounts quickly.

Maybe you'll find other uses, eh?

Changes required:

Adding of 1 field to user table (installer will try to do this)
Adding of 18 phrases (installer does this)
An addition to admincp/user.php
An addition to global.php
An addition to login.php
A modification to the navbar template (for each style)

Time needed: 20-30 minutes
Difficulty rating: moderate


Known issues with v1.2:
Changing the username of an account that's either a slave or master, it does not update these cached usernames. This will be taken care of in v1.3.
Work-around: If you rename a user, unlink it first, and relink after the renaming.
Since I don't see this happening very often on any board I'm releasing v1.2 with this caveat.

Item of note:
For some obscure reason vBportal does NOT play nice with this hack. It'll introduce cookie/header errors. Either do not install this hack if vBportal is installed, or vice versa. Since I don't plan on spending $20 to buy software I'll never use, there's no intention on my part to work out that problem. You're good to go with vbadvanced CPMS, however, this has been tested.

Warranties:
None, in the instructions you'll notice I tell you to backup before applying the hack. I've tested it on 4 boards, each of which have additional hacks installed, and it runs on many more. If it doesn't for you then, well... roll back the changes you've just made and blame yourself.

Tested (and works) on:

vB 3.0.3. - vanilla
vB 3.0.1. - vanilla
vB 3.0.3. - With vbAdvanced Homepage / CPMS (out of the box)
vB 3.0.1. - With vbAdvanced Homepage / CPMS (out of the box)
vB 3.0.3. - With vBindex v3.0.0 RC5 (Instructions by bondjetta (https://vborg.vbsupport.ru/member.php?userid=65392))
vB 3.0.3. - Nexialys - ACP cookie (http://acmsoft.com/vb/showthread.php?t=14) hack. <- Recommended combination
vB 3.0.1. - Nexialys - ACP cookie hack. <- Recommended combination
vB 3.0.3. - Assorted mods


Future plans:

v 1.3 - Optionally displaying the linked accounts on the public profile. (i.e. 'I am also ....')
v 1.3 - Fix user rename issue (see known issues, above).
v 1.3 - Under Users in the ACP add a Manage Linked Accounts option, listing all linked accounts and their slaves.
v x.x - Very maybe: allow sharing of a secondary account between two users. This is the trickiest of all, since when on that account, who should you allow switching back to in a way that can't be circumvented. ;)

Future non-plans (I will probably never implement these):

A 'let users link accounts themselves' mode.


Thanks to Oblivion Knight (https://vborg.vbsupport.ru/member.php?userid=13309) for the updated dropdown look.

Enjoy :)

--- History ---
v1.2 - 17th November 2004

Removed username colouring, it's not really necessary and only adds extra queries.
No longer uses a custom profile field, instead an extra field in the usertable is made
Fully phrased, installer written to add phrases
The usernames for the linked accounts are cached, this means that running the hack now takes no extra queries at all for those logged on as master, or who have no linked accounts. Being logged on as a slave account adds only 1 query per page view, this used to be more too.

v1.1.1 - 27th October
Fixes session expiration problem occuring after switch. Users are encouraged to upgrade. To upgrade follow the instructions in switch_11_to_111.txt. For new installs the corrected code is in switch_111.txt, the installation instructions.

v1.1 - 26th October
Fixes a flaw where on some MySQL versions IDs were matched improperly, also the new session is now permanent. Users are encouraged to upgrade.
To upgrade roll back and redo the changes to global.php and login.php, no changes were made to the template or custom field.

v1.0 - 25th October 2004
initial release

Polo
10-25-2004, 03:29 PM
Interesting :)

Azhrialilu
10-25-2004, 03:30 PM
I can confirm the working of this :D

Ianomed
10-25-2004, 03:33 PM
Ah yes, my first beta tester. Hi Azh. :D

Hopefully it'll be useful to you as well, Polo.

Red Blaze
10-25-2004, 03:52 PM
Nice, I could use this for easy switching testing different usergroups. Thanks alot. :)

Ianomed
10-25-2004, 03:57 PM
My pleasure Sonikku, please remember to click Install if you end up using it. That way if I release an update you'll be notified of this as well.

At one of the RPG boards this is now in use allowing 6 people to switch between their various accounts with success. It's a hit there. :)

Lionel
10-25-2004, 04:11 PM
How long have you been testing or using this?

Ianomed
10-25-2004, 04:28 PM
Hi Lionel,

It's a dead simple hack that I wrote it in a manner of hours. A friend and I have tested it on 4 different boards for a couple of hours as well, on which it's officially live as of today to the members' joy.

If you're worried about security, there's nothing in the hack that makes the board more insecure/secure than it was before. The user's current session is checked against on switching.

If you're logged on as a master account you can switch to your slave accounts, and if you're currently logged on to a slave account you can switch to your master account (or possible additional slave account).

Simply trying someone else's userID in the URL parameter will fail to achieve anything :)

Feel free to take it apart on a test installation if you care to examine this for yourself. As a matter of speaking this is a good thing to do for any hack whatsoever by anyone. Tinkering with productions boards should be approached with caution, as always.

nexialys
10-25-2004, 04:45 PM
simple hack ?!.. wrote in hours ?!... damn, welcome home, join the coders club... this is a quite good piece of work !!

it's even better than what i've played with lately (different cookie for admincp) ... and it's acting exactly like the "Fast User Switching" on my OS-X !!! http://images.apple.com/macosx/features/fastuserswitching/images/fastusermenu10082003.jpg

Ianomed
10-25-2004, 05:03 PM
I'm glad you like it so much, Nexialys :D

It's my first publicly released hack for vB. Before this I did a couple of custom ones, mainly also RPG related in some way or another: a Warp Speed calculator, Stardate Calendar.

Then there's another small hack which will make the referrer a mandatory field on registration, and will send the sponsor a PM from the administrator, to confirm they did indeed refer the person.

It's quite fun to write hacks for vB :)

Lionel
10-25-2004, 05:08 PM
that does not work for me with 3.01 and vbadvanced. In advanced page (I harcoded the link to login in global.php) it displays the toggle, but when I select a username, it takes me to a blank page.

On forumhome, the toggle does not display at all.

And yes, I have a valid licence :-)

nexialys
10-25-2004, 05:11 PM
And yes, I have a valid licence :-)

fiou... i hope for you... with 590 posts already done, no license would be futile.. lol..

btw, do you have anyother hack related to login or identification install on your board ?!...

Lionel
10-25-2004, 05:14 PM
Haha... I do not remember. The board has so many hacks. But I do have a problem for four weeks now with who's online.

Ianomed
10-25-2004, 05:22 PM
Lionel, within the forum itself does it switch proper?

Secondly: do you have the forum in /forum, and the site in /, or something similar? or are the forum and portal both in the same directory?

Thirdly (and lastly): vbadvanced or vbadvanced CPMS, and which version?

My beta tester, AzhriaLilu, ran this hack succesfully on a modded 3.0.3. with vbadvanced CPMS, perhaps it's a 3.0.1. specific issue, or doesn't work with the standard portal out of the box. I'll have a look either way.

It's been tested solely on 3.0.3. (with various previous modifications on 3 of the boards), which is why I listed it as a requirement in the instructions.

I'll get back to you on this, with some changes perhaps it can be made tick for 3.0.1. and vbA as well. *goes and finds the 3.01 installer* :)

Lionel
10-25-2004, 05:23 PM
I think I am going to do a beyond compare to see what is messed up with my who's online. Maybe that will solve the problem. I went to every single function line by line, every relevant php, except login.php

Lionel
10-25-2004, 05:33 PM
Ianomed, the condition does not applies at all in the forum. I does not display at all. I logged off, log back on, nothing, nada.

I have vbadvanced regular installed at root and forum on a directory under.

That hack was like God sent for me. It's a shame what is happening to me.

The board has been behaving erratically. I installed the mod management hack last week, no template will display. I placed an echo "hello"; at the top, it started displaying. The next day, it gave me an error message about header, then I removed the echo, and by accident I clicked on the link, and voila, like by magic, it worked.

Who's online? Sometimes I see no one, but I know they are online. Some other times, I see 2 of myself. :speechless:

Ianomed
10-25-2004, 05:45 PM
Hmmm, it sure does sound something else was messed up good before you installed this hack. I'll still install vbadvanced regular on 3.0.1. here to see what it does, but I can't guarantee anything.

If there's something specific to vbA and 3.0.1. in accordance with this hack I'll find it, if not then it appears your board's prior state is likely the culprit somehow. :(

Sadly you have a looooooottt of hacks installed, as you say, or I would suggest upgrading to vB 3.0.3. and reapply vbA and this hack. With a board that start working like magic, who knows what can happen? ;)

Speaking of which, we know it works on CPMS, since this we tested. The 'diet' version as yet goes untested, so this I'll take along with it on my todo list.

Ianomed
10-25-2004, 07:39 PM
I've just tested this hack on a vanilla (clean) install of vB 3.0.1., and it works perfectly.

Now to test with vBAdvanced homepage as well... *rolls drums*

HiDeo
10-25-2004, 07:59 PM
Really interesting hack !

Thanks

Oblivion Knight
10-25-2004, 08:12 PM
it's even better than what i've played with lately (different cookie for admincp)Does this hack work ok in conjunction with your hack then? That is currently the only concern I have before installing this, sounds like a great idea and would enable me to quickly switch between my test account..

Ianomed
10-25-2004, 08:16 PM
Lionel,

vBadvanced homepage on 3.0.1. works as well in conjunction with this hack. No problems. It lets you switch from within the portal and forums.

Sadly, for you that is, this brings me to the conclusion your previous hacks are incompatible. Your saying the board sometimes work, sometimes didn't strengthens that belief.

The good news is that I can now ratify this hack for 3.0.1. as well.

bondjetta
10-25-2004, 08:30 PM
i have this problem daily on my forums (going between my admin account and my personal account) :( so thank you for this hack! :D I'll try it out tonight :)

Ianomed
10-25-2004, 08:39 PM
Does this hack work ok in conjunction with your hack then? That is currently the only concern I have before installing this, sounds like a great idea and would enable me to quickly switch between my test account..

I have no reason to believe it won't, but have downloaded the hack in question to make sure. I'll report my findings at both nexialys's forum and this thread. :)

Ianomed
10-25-2004, 08:56 PM
Verdict: not only does it work, it rocks!
It's probably the best thing since sliced bread, the combination of these two hacks, lol.

Now it allows you to be logged on as an admin in the ACP while simultaneously you change between all measure of different test accounts to see your changes. :D

Nexialys' hack giving the ACP a seperate session means you won't be logged out of the ACP while you switch around in the forum.

Oblivion Knight
10-25-2004, 10:26 PM
Excellent, thanks for testing that for me Ianomed.! :D

Ianomed
10-25-2004, 10:36 PM
My pleasure, Oblivion Knight, I'm glad I did test it. :)
I've linked to Nexialys's hack now in the this thread's first post, because the combo just works so well.

Lionel
10-26-2004, 12:26 AM
Ianomed thank you. I am going to troubleshoot, cause I am determined to have it work. It's like butter near my mouth and I can't grab it.

bondjetta
10-26-2004, 12:42 AM
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

Lionel
10-26-2004, 12:51 AM
Good news. I put up a clean login.php, and it works on homepage. I still have to troubleshoot the forums.

Lionel
10-26-2004, 03:08 AM
I am on the verge of committing vbsuicide.

I found the typo in login.php that was causing the blank page and it works now perfect on vbadvanced homepage. Still not in forums. I tried a clean copy of global.php, of online.php, of functions_online.php. I tried removing the condition, the image shows but the click is empty.

I do not know where to look anymore. What could cause the main forum to be blocked? Which major script in there that vbadvanced do not use? It's like the forums do not know it's me.

:tired:

Lionel
10-26-2004, 03:37 AM
:banana: I found my problem.
Somehow, someday I woke up to find out that navbar for vbadvanced and forum got all messed up with the headers. Since that day, I have been carrying 2 navbars one for vbadvanced and one for vbulletin, both placed in their respective $header, that's for the loggedin bits. And used the normal navbar just for the links.

I just removed the condition in forum header (where the loggedin things are) and placed it anywhere in real navbar. That worked! :banana:

That is going to be some job to restore that navbar

Forgot to say thank you, for the hack, for the help, and maybe for that discovery that could finally fix my online problem

Lionel
10-26-2004, 05:03 AM
All Fixed!

I dumped both $header and $index_header in the navbar. While doing so, I found out that there was a miscontructed conditional. Navbar template would not accept it, but both index did. It had to do with the hivenail hack. The conditional if bbuserinfo[userid] was not properly closed. I am leeping my fingers closed, maybe this is why the board was not recognizing me. Hehehe!

bendigo-tech
10-26-2004, 06:01 AM
That could come in very handy. Thanks a lot! :)

kaotic
10-26-2004, 08:17 AM
Genious! I've already thought of a creative method of use for this hack. Many thanks! :)

Oblivion Knight
10-26-2004, 09:08 AM
Hmm.. When trying to switch to another account, I get the error:
An error occurred while attempting to log you out. Click here to log out.
The only thing I've changed from your original hack is the navbar code because I didn't like the layout..

Lionel
10-26-2004, 09:48 AM
Hmm.. When trying to switch to another account, I get the error:

The only thing I've changed from your original hack is the navbar code because I didn't like the layout..

I get the same too. My observation is that this happens when you sstay inactive for a long time. And it will not log you out too sometimes.

Ianomed
10-26-2004, 09:54 AM
Hmm.. When trying to switch to another account, I get the error:

The only thing I've changed from your original hack is the navbar code because I didn't like the layout..

This can happen if you put spaces in the IDs linked, Oblivion.
Example, account 1 has secondary accounts 10 and 45, you would enter

10,45

and not:

10, 45

I'm just about to release v1.1, fixing something else. For now please be observant of the IDs as above. In a future version I'll provide an easier way to select the slave accounts.

Ianomed
10-26-2004, 09:55 AM
I get the same too. My observation is that this happens when you sstay inactive for a long time. And it will not log you out too sometimes.

The new session cookie was set to expire, instead of to last. This has been fixed in v1.1, which I',m about to release. So it could've been either of two things :)

Oblivion Knight
10-26-2004, 10:01 AM
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.. :)

Ianomed
10-26-2004, 10:08 AM
All Fixed!

I dumped both $header and $index_header in the navbar. While doing so, I found out that there was a miscontructed conditional. Navbar template would not accept it, but both index did. It had to do with the hivenail hack. The conditional if bbuserinfo[userid] was not properly closed. I am leeping my fingers closed, maybe this is why the board was not recognizing me. Hehehe!

Good to hear that, Lionel.

By the by, I've just released an important update (v1.1). It only requires to redo the additions to global.php and login.php, so no worries about the tempalte ;)

Ianomed
10-26-2004, 10:11 AM
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
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
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
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
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:

<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
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
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
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
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
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/attachment.php?attachmentid=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
As attached to the first post.
https://vborg.vbsupport.ru/attachment.php?attachmentid=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
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
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

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
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
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
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
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
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
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
***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
*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:


// 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
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:

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

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


/*================================================= =====================*\
|| ################################################## ################## ||
|| # 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
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:


/*================================================= =====================*\
|| ################################################## ################## ||
|| # 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
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
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 ;)

Oblivion Knight
11-17-2004, 03:29 PM
In the navbar template, this:
<!-- Quick Account Switch v1.2 -->
<div class="vbmenu_popup" id="switchacc_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">$vbphrase[qas_switch]</td></tr>
<tr><td class="vbmenu_option">$account_master</td></tr>
</table>
</div>
<!-- / Quick Account Switch v1.2 -->Should be this:

<!-- Quick Account Switch v1.2 -->
<div class="vbmenu_popup" id="switchacc_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">$vbphrase[qas_switch]</td></tr>
$account_master
</table>
</div>
<!-- / Quick Account Switch v1.2 -->

Otherwise, a great update to a great mod.. Thanks :)

Ianomed
11-17-2004, 03:33 PM
You're absolutely right, I missed that!
Thanks Oblivion, I'll update the instructions and zip straight away. :)

edit: done.

Lionel
11-17-2004, 03:46 PM
my copy is working great; I solved out all my issues. What advantages are there to upgrade?

Ianomed
11-17-2004, 03:52 PM
Hiya Lionel, I'm very glad to hear your board is working fine now. :D

it takes less queries per page... v1.1.1. adds at least 1 query even if you're not logged on as someone who actually has a linked account, and more for slave/master accounts still.

v1.2 introduces only 1 extra query for those logged on with a slave/secondary account, and zero extra queries for those logged on as master/primary or without a linked account... so for big boards it's a must upgrade.

Otherwise, check the screenies at the top post... administrating linked accounts is now easier, letting you search for the username (by partial match), or entering the id if you want like before.

On an account that's linked as either master or slave it'll display Master to: <other account name> (Profile) (Unlink)

So on the whole it's easier to maintain as well :)

Caiman
11-22-2004, 11:43 AM
Hiya Lionel, I'm very glad to hear your board is working fine now. :D

it takes less queries per page... v1.1.1. adds at least 1 query even if you're not logged on as someone who actually has a linked account, and more for slave/master accounts still.

v1.2 introduces only 1 extra query for those logged on with a slave/secondary account, and zero extra queries for those logged on as master/primary or without a linked account... so for big boards it's a must upgrade.

Otherwise, check the screenies at the top post... administrating linked accounts is now easier, letting you search for the username (by partial match), or entering the id if you want like before.

On an account that's linked as either master or slave it'll display Master to: <other account name> (Profile) (Unlink)

So on the whole it's easier to maintain as well :)
This is a great and easy hack to use, comes in very handy. Just adding my two cents... ;)

Killsparer
01-10-2005, 07:41 AM
This sounds like a great hack!
Any news about 1.3 ?

Ianomed
01-10-2005, 08:18 AM
Hi Killsparer,

I would say it is a pretty great hack, at that, but I wrote it :P

News on v1.3, not much as of yet, I've been rather busy. Today for instance there's 5 boards to upgrade to vB 3.0.5, preserving hacks. I mean for QAS 1.3 to be released at the end of this month, or beginning of February.

Lionel
03-05-2005, 09:31 PM
on 3.07 it is not displaying in vbadvanced cmps, otherwise, great as usual

never mind, I had to put "account_master " in vbadvanced cmps settings as global variable.

Ianomed
03-05-2005, 09:46 PM
Hiya Lionel,

I was just about to ask if you had applied Botanist's hack for vBadv, but I see you've rediscovered it ;)

QAS 1.3 is slated for 'one of these days', offering some more improvements. I had meant to release it last month, instead life happened :)

Lionel
03-05-2005, 09:49 PM
what's Botanist's hack? That global function is builtin vbadvanced cmps.

Ianomed
03-05-2005, 09:55 PM
I meant the vBindex addition of $account_master, as bondjetta (a.k.a. botanist) posted up when this had had just been published.

Good to see you've got QAS to work with vBa again.

Lionel
03-05-2005, 10:19 PM
Hey, you are doing great hacks. I just installed the embedded poll. I've always been annoyed to display it at top. Sometimes you don't even see it since it goes straight to the post.

Alasse
04-03-2005, 07:47 PM
Wonderful Hack just one little thing wrong with it. If a user has an " ' " in their name (i.e Leo O'Connor, Hannah O'Brien etc.) that name won't be able to be linked to another users name.

That sounds a little confusing doesn't it? :nervous: so I'll give an tiny example.
Master: Jane
Slave: Mike O'Brien <~ won't work and brings up this error:


Database error in vBulletin 3.0.7:

Invalid SQL:
SELECT userid, username, qas
FROM user
WHERE username LIKE 'Mike O'Brien%'

mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'Brien%'' at line 3

mysql error number: 1064


The hack works for all my other users that don't have an " ' " in their name so I know I installed everything right and it's working perfect except for that one thing. I was hoping someone could tell me how to fix this? Thanks in advance.

Azhrialilu
04-03-2005, 08:12 PM
All you need to do is use the user id number instead of the name... at least that works for me ;)

Alasse
04-04-2005, 12:41 AM
All you need to do is use the user id number instead of the name... at least that works for me ;)

Ah, I'll try that. Thanks :)

EDIT: Works like a Charm, Thanks again ^_^

lasto
04-04-2005, 01:40 AM
is this fine for me to use on v 3.0.7 and set up a test account for each usergroup that only i know the password for (for test purposes).

Marco van Herwaarden
04-04-2005, 08:27 AM
Wonderful Hack just one little thing wrong with it. If a user has an " ' " in their name (i.e Leo O'Connor, Hannah O'Brien etc.) that name won't be able to be linked to another users name.

That sounds a little confusing doesn't it? :nervous: so I'll give an tiny example.
Master: Jane
Slave: Mike O'Brien <~ won't work and brings up this error:


Database error in vBulletin 3.0.7:

Invalid SQL:
SELECT userid, username, qas
FROM user
WHERE username LIKE 'Mike O'Brien%'

mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'Brien%'' at line 3

mysql error number: 1064


The hack works for all my other users that don't have an " ' " in their name so I know I installed everything right and it's working perfect except for that one thing. I was hoping someone could tell me how to fix this? Thanks in advance.This means there is a potential SQL insertion vulnerability in this hack. To avoid problems everybody should edit their qas.php file and change the line:
$condition = "username LIKE '$u2%'"; // search for usernames starting with
into:
$condition = "username LIKE '" . addslashes($u2) . "%'"; // search for usernames starting with
PS Don't have this installed, so above modification is not tested.

Alasse
04-30-2005, 12:31 AM
Find:

<if condition="$bbuserinfo['userid']">


Near this, find:

<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong>


After this (yes, before the <br />), add:

<!-- Quick Account Switch v1.2 -->
<if condition="$account_master">
<span id="switchacc"><a href="#switchacc"><strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong></a> <script type="text/javascript"> vbmenu_register("switchacc"); </script></span><br />
<else />
<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
</if>
<!-- Quick Account Switch v1.2 -->



That should say:


Find:

<if condition="$bbuserinfo['userid']">


Near this, find:

<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong>


Replace With:

<!-- Quick Account Switch v1.2 -->
<if condition="$account_master">
<span id="switchacc"><a href="#switchacc"><strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong></a> <script type="text/javascript"> vbmenu_register("switchacc"); </script></span><br />
<else />
<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
</if>
<!-- Quick Account Switch v1.2 -->



The way it is now it'll show "Welcome User" twice one as a link one not as a link, just thought you should know ^^

Reeve of shinra
04-30-2005, 12:57 AM
wow I always thought of something like this since we allow aliases on our board.

Is anyone allowing thier regular member base to use this and how are you doing that?

dsboyce8624
06-10-2005, 08:07 PM
Just so it's clear, because I didn't see actually stated, you need to add the account_master global variable to your vBa CMPS Default Settings page.

dsboyce8624
06-10-2005, 08:10 PM
This means there is a potential SQL insertion vulnerability in this hack. To avoid problems everybody should edit their qas.php file and change the line:
$condition = "username LIKE '$u2%'"; // search for usernames starting with
into:
$condition = "username LIKE '" . addslashes($u2) . "%'"; // search for usernames starting with
PS Don't have this installed, so above modification is not tested.

This seems to be working fine, in case nobody else reported back.

3.0.7 vBa CMPS 1

vexiphne
11-02-2005, 01:11 PM
globalize() has been removed from 3.5.1 to my knowledge, so this hack is busted.. any chance to get it fixed? :(

tnguy3n
11-03-2005, 02:48 AM
globalize() was replaced by $vbulletin->input->clean_array_gpc()

akanevsky
11-09-2005, 01:19 AM
May I have your permission to port this hack? Thx.

TCM
11-09-2005, 03:26 AM
May I have your permission to port this hack? Thx. Last Activity: 05. Mar 2005I doubt you'll get a reply.

EDIT: If you'd like to email him, his address is in his profile on his boards (http://www.startrek-online.net/community/member.php?userid=2), where he appears to be active. :p
EDIT: I sent him a link to your post.

Cedric_FP
11-12-2005, 12:43 PM
Hopefully we can get permission to port this. It'd be nice.

akanevsky
11-12-2005, 02:44 PM
I doubt you'll get a reply.
Grrr.... You're right.

Azhrialilu
11-12-2005, 04:11 PM
I've got someone rewriting this hack to work for 3.5 and I'm sure he'll release it here when it's complete :)

akanevsky
11-12-2005, 04:15 PM
You are not the hack's author, so you cannot be releasing it here without permission.

Mythotical
11-12-2005, 04:45 PM
Dark Visor,

I am the one porting this hack, everything is ported, just need to get one thing figured out which is why the information is not inserting into the database when its entered. Everything else works.

I have emailed the author for permission to release the hack. If you wish to give me assistance on figuring out this last little piece, please do PM me. I will be releasing the hack once I have gotten permission to do so.

Cheers
Myth

Cedric_FP
11-13-2005, 10:32 PM
Any updates on the port?

Ianomed
12-14-2005, 10:37 AM
I've given permission to Psionic Vision (https://vborg.vbsupport.ru/member.php?userid=80739) to port this hack to vB 3.5.x on 22 November. Since that I've not heard back from him on it, so I'm unaware of the status in regards to that.

I'm too busy at this time to do it myself, what with porting two custom CMS's from 3.0 to 3.5.

akanevsky
12-14-2005, 08:40 PM
I am too busy too, haven't had the time to look into this yet. I might someday though.

Mythotical
12-16-2005, 12:52 AM
My port is near complete, once I have Ianomed's assistance on this little problem it will be ready for beta release, yes beta as I have a feeling it will have a bug or two which is normal for a hack this big.

I expect the release to be ready within the week so everyone keep an eye on it popping up in the plugins area.

Cheers
Myth

Arissa
02-09-2006, 11:55 PM
Can't wait for the release to work on 3.5 I'll be watching.

Killsparer
04-12-2006, 11:17 AM
Any news about the port?

akanevsky
05-07-2006, 02:42 PM
Hack Ported: https://vborg.vbsupport.ru/showthread.php?t=114994

elenora
05-29-2006, 11:43 AM
I got a question, can't it be possibly modified so that only admins can see the little box in the admincp user editing page? I mean, won't an if conditional work or something? Cause some mods need access to user editing options, but I don't want them messing with that.

Not to mention, can't it be done so, that when you are inside a slave account, it asks for a password if you try to switch to a master account? Cause that way it is safer to have multiple masters, otherwise any mod might just log on with an admin account, if they are connected. I mean, that would be just a load of trouble. And yeah, I know I could just disable the switch to master account and log out, but clicking that log out button is so tiring - why else do people want, need and like this hack? :D