[BETA] Account Links

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Suggested Hosts
Drakkim
Registered User
Posts: 176
Joined: Thu Feb 05, 2004 5:48 am

Re: [BETA] Account Links

Post by Drakkim »

Finally updated this mod... details on the front page.
User avatar
Dansimati
Registered User
Posts: 5
Joined: Tue Sep 04, 2012 8:06 am

Re: [BETA] Account Links

Post by Dansimati »

Hi!
I've installed this MOD, and it works perfectly. It's only one little problem, I can't unlink the account directly on the forum so I had to go in phpmysql to do it... Is it a way to fix this problem?

Thanks a lot
Drakkim
Registered User
Posts: 176
Joined: Thu Feb 05, 2004 5:48 am

Re: [BETA] Account Links

Post by Drakkim »

I need a little more detail on how to reproduce the problem. I just tested it and have no problem on my site. You should be able to go into the UCP/Manage Linked Accounts or either MCP panel and use the bottom form... just click the username you want to remove and click "Unlink Users"

Some helpful bits include anything unusual about the usernames (special characters, etc) and any other mods you have installed.

If that doesn't work, PM me your site's address and I'll take a look.
User avatar
Dansimati
Registered User
Posts: 5
Joined: Tue Sep 04, 2012 8:06 am

Re: [BETA] Account Links

Post by Dansimati »

Hi!
When I click on the "unlink" button, the page refresh, but nothing changes, and the two accounts are still linked. Alike in the MCP.

I've installed only the MOD Parse_bbcode_in_costum_profil_filed. And there is no special character in the usernames.

Any Idea?
User avatar
Dansimati
Registered User
Posts: 5
Joined: Tue Sep 04, 2012 8:06 am

Re: [BETA] Account Links

Post by Dansimati »

Oh, and maybe a suggestion:

In the subaccount MOD of SMF, we can choose the account which we post, while we're posting. It's very conveniant.
If I had the skills, I would try to this myself, but... it's too difficult for me.

If you have the time...

And Thanks a lot for this MOD
Drakkim
Registered User
Posts: 176
Joined: Thu Feb 05, 2004 5:48 am

Re: [BETA] Account Links

Post by Drakkim »

That has actually been mentioned before and I've been trying to consider how to accomplish it here. I'll have to go through posting.php very thoroughly to make sure I don't break anything...
Drakkim
Registered User
Posts: 176
Joined: Thu Feb 05, 2004 5:48 am

Re: [BETA] Account Links

Post by Drakkim »

Dansimati wrote:When I click on the "unlink" button, the page refresh, but nothing changes, and the two accounts are still linked. Alike in the MCP.
This was a problem in the language file. future versions will be updated with the following warning:

Code: Select all

	// Note that it is very important that you use actual letters here. If you use HTML entities it will break the mod
	// For example: use é not é
The only lines that are affected are the buttons because the mod compares the button text to the language file to figure out what you want to do.
Simon Dechain
Registered User
Posts: 11
Joined: Fri Aug 17, 2012 10:53 am

Re: [BETA] Account Links

Post by Simon Dechain »

Hi,
I had considered, how to implement the feature to change the poster at posting time. There are two approaches to this problem, as I could deduct.

1) Change the session of the user to the posting account as soon as possible in the posting.php and let the code do it's work:
plus:
+ rights of posting account are applied
+/- At the end, user is logged in with new session
- hard to implement (at least for me :) ) and prone to errors (my gut feelings)

2) Change the owner of the post after it has been submitted. Basically, it's a call to the mcp function function change_poster(&$post_info, $userdata). This does the rest for you, even adding an mcp log entry (which could be removed with a bit of copy&paste):
+ cleanest way (I could see) of tackling the problem, low impact on code changes
+/- session stays the same
- no posting rights are changed, so a "user" could post in an restircted forum, where the master account has access rights (which I don't see as a real big problem)


Unfortunately I hadn't had the time to tackle this feature at our forum, so I can't really offer anything firm but my thoughts.
greetings
Simon
Drakkim
Registered User
Posts: 176
Joined: Thu Feb 05, 2004 5:48 am

Re: [BETA] Account Links v.0.7.9

Post by Drakkim »

Simon Dechain wrote:1) Change the session of the user to the posting account as soon as possible in the posting.php and let the code do it's work
IMO this has two disadvantages: you just changed user accounts (and may need to switch back) and it would probably involve copying large portions of code from the UCP module to posting.php, giving me a THIRD chance to miss updating code (I already have duplicate code for MCP and UCP)
Simon Dechain wrote:2) Change the owner of the post after it has been submitted. Basically, it's a call to the mcp function function change_poster(&$post_info, $userdata).
This is how some people manage it now on a board I help out on... all the GMs are also moderators, so it's works... but it's inconvenient. On that particular board, however, it causes problems because we use a RPG stats mod that grabs data from another table at posting time, based on the user posting. This, of course, does not update when the poster is changed. I imagine other RPG-style mods may have similar issues (Cash, stats, etc.)

What I plan to do is just temporarily change the contents of $user at the beginning of posting.php, then change it back.
  • I think that will enforce permissions on that account (good or bad... not sure)
  • mods relying on $user will work properly as if the poster were logged in
  • the user will not actually switch accounts.
This will probably be my next project, after I finish the PMs part that I'm working on now (which is mostly template stuff at this point.)
User avatar
Frug
Registered User
Posts: 144
Joined: Sun Jun 05, 2005 3:48 am

Re: [BETA] Account Links

Post by Frug »

On my forum the mods tend to use change_poster() from the mcp when posting under different characters (I do it myself all the time). My suggestion would have been to use this function, but changing $user (if you can do that) would be better for the reasons you mention. It would play more nicely with other mods.

As long as you check that the accounts are linked before changing the user, I don't see why permissions should matter unless people have unique requirements to stop themselves from posting in the wrong place with the wrong account.

Oh btw, with phpbb3.1 they will be bringing in hooks that may be useful to this. I have now basically stopped modding my forums in the hopes that my mods can be moved to use hooks. They don't give release dates here but I'm hoping in about a year it will be out. There's a hook called MOD_post that looks like it might be applicable to this. http://area51.phpbb.com/phpBB/viewtopic ... 84&t=32805
- - - - - - - - - - - Do not use dotted lines - - - - - - - - - -
- - - - - - - - - - - or automatic signatures - - - - - - - - - -
Thar Shaddin - online freeform roleplaying for writers
AbbeyG
Registered User
Posts: 88
Joined: Fri Feb 08, 2013 7:14 pm

Re: [BETA] Account Links

Post by AbbeyG »

I think I have a possible feature request:

Only Mods and Admins must be able to link accounts. Like for example, say Member 1 created two new accounts A and B. Instead of asking the Member 1 to link accounts A and B, an admin or mod should be able to do it for him/her.

With the present system, this is impossible because it asks for a master password. Any scope?
User avatar
Frug
Registered User
Posts: 144
Joined: Sun Jun 05, 2005 3:48 am

Re: [BETA] Account Links

Post by Frug »

Why would you want -only- mods/admins able to link accounts?
- - - - - - - - - - - Do not use dotted lines - - - - - - - - - -
- - - - - - - - - - - or automatic signatures - - - - - - - - - -
Thar Shaddin - online freeform roleplaying for writers
Drakkim
Registered User
Posts: 176
Joined: Thu Feb 05, 2004 5:48 am

Re: [BETA] Account Links

Post by Drakkim »

For one, perhaps only mods or admins are allowed to have multiple accounts... for another, if only mods have access to the create links panel, they can keep track of who is using what names...
AbbeyG
Registered User
Posts: 88
Joined: Fri Feb 08, 2013 7:14 pm

Re: [BETA] Account Links

Post by AbbeyG »

Neither :D

I think mods/admins must be allowed to link the accounts for other members. If I have A and B as my secondary account and C as my primary account, rather than me doing it myself, mods/admins must do it for me. It makes support easier.
Maugrim
Registered User
Posts: 30
Joined: Thu Nov 26, 2009 11:04 am

Re: [BETA] Account Links

Post by Maugrim »

Hi folks!

ive already installed your genius MOD! :)

but i have a "Problem"

i want to display the drag/drop switch in the template posting_editor.html to give users the option to switch their account, when posting a post.
But it doesnt work. When i coose a name from it refreshes, but with no effect. the current user stays logged in. Only when i choose a new account from the drag/drop switch which i placed in overall_header.html

is this possible??

thanks a lot for any help :)

Return to “[3.0.x] MODs in Development”