[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!
Ideas Centre
Drakkim
Registered User
Posts: 176
Joined: Thu Feb 05, 2004 5:48 am
Contact:

Re: [BETA] Account Links

Post by Drakkim »

It sounds like the form's action field isn't getting set. I'm not sure why that would be, so long as you're including the template, just like the header edits do. Try moving the include line... I know there are variable issues with includes inside a block, such as were the poster information is listed...
AbbeyG
Registered User
Posts: 88
Joined: Fri Feb 08, 2013 7:14 pm

Re: [BETA] Account Links

Post by AbbeyG »

I also have this problem with the mod. After installing this mod, it so happens that guests are unable to post. Here is the error I get

Fatal error: Cannot redeclare user_get_id_name() (previously declared in E:\theriddlediary\xampp\htdocs\phpBB3\includes\functions_user.php:27) in E:\theriddlediary\xampp\htdocs\phpBB3\includes\functions_user.php on line 82
kawohni
Registered User
Posts: 1
Joined: Tue Mar 19, 2013 11:49 pm

Re: [BETA] Account Links

Post by kawohni »

I've been using this mod for about a year now with no problems, however within the past couple days something has been weird. I have not changed anything about the mod or my board.

I'll try my best to explain.

It's a RP board, so users will often have the current game open in one tab, and the account link in another tab, so they can simply change characters and refresh the game tab.

However, recently, we've been able to change accounts in the account link tab and will be logged in to that account only in that tab and other tabs open from it. But refreshing the game tab has us logged into the previous account. It's like there are two instances or something and they're not connecting with each other.

Any help? :(
User avatar
Frug
Registered User
Posts: 144
Joined: Sun Jun 05, 2005 3:48 am
Contact:

Re: [BETA] Account Links

Post by Frug »

Drakkim wrote: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...
I see. I guess I just didn't understand that since this mod is for convenience of users. Nothing will stop people from manually switching accounts.

For the first case it would be more flexible to be able to assign certain user groups, rather than strictly mods/admins.

The ability to keep track, though, sure that would be nice. I was thinking about modding my forum to list what accounts people have linked in their user profile. From there, I think putting it inside a conditional "if user is moderator" block (so that only mods see the list when viewing profiles) would be trivial.

edit: oh also, phpbb 3.1 is almost in alpha testing. I think it will be another month or two at most.
- - - - - - - - - - - Do not use dotted lines - - - - - - - - - -
- - - - - - - - - - - or automatic signatures - - - - - - - - - -
Thar Shaddin - online freeform roleplaying for writers
Scherbenreiter
Registered User
Posts: 14
Joined: Wed Aug 21, 2013 9:44 pm
Location: Germany
Name: Saskia

Re: [BETA] Account Links

Post by Scherbenreiter »

Hello there!

First of all, I want to thank you for your awesome addon. We are building a forum with phpbb 3.0.11 and tested your addon, which works just perfectly fine.

Implementing the switcher on index works perfectly fine and now we had an idea, we would need your help with....
Is there a way to put the dropdown design aside and have the names of each linked account, so that we change to the account by clicking on the link?
E.g: Present account: AAAAAAAAA
Linked Accounts, shown as links beneath the header: BBBBBBBB, CCCCCCCCC
Click CCCCCCCCC --> Account change to CCCCCCCCC

Kisses, greetings and many thanks from the team of "damned and devine"
by Scherbenreiter
User avatar
Lonewolf147
Registered User
Posts: 82
Joined: Fri Jul 12, 2013 3:13 pm
Location: Milwaukee, WI
Name: Scott

Re: [BETA] Account Links

Post by Lonewolf147 »

Just wanted to say this is an awesome mod! I've been looking for something like this for my board. Thanks!!
new777
Registered User
Posts: 94
Joined: Thu Oct 03, 2013 6:51 am

Re: [BETA] Account Links - phpBB 3.0.12

Post by new777 »

I just installed this on 3.0.12 and seems to work perfectly. Excellent Mod.

I do have one question:

I have ONLY installed the MCP part. So just for moderators and admin.

Is it possible to assign this ONLY to certain moderators?
I am thinking about an IF Statement involving user ID's who can see it in the MCP
or create a new group and only give that group permission.
Not all Moderators need it or need to know about it. I plan to use it only for very trusted Moderators, who have severals tasks/usernames and maybe prefer to post normally under an standard reg. username.
Drakkim
Registered User
Posts: 176
Joined: Thu Feb 05, 2004 5:48 am
Contact:

Re: [BETA] Account Links

Post by Drakkim »

The easiest way is to use the "Moderate Linked Accounts" module. That one gives people with user admin privileges the ability to link _anyone's_ account. Using that module, you can link whoever you want.

If you want to give them "normal" access, what you want is to edit mcp/info/mcp_account_link.php

Choose a permission that only these trusted moderators will have and add it to the auth for the manage module. Then, you'll need to remove the module and re-add it for the updated permissions to work. This will hide the mod from the MCP panel, except for the people with that permission.

You want to edit line 25, where it says

Code: Select all

'auth' => ''
The next line shows how to limit the module to only users with administrate users permissions. (acl_a_user)

The main template edits already hide the account switch options unless accounts are linked, so no problem there.

I'm honestly a bit rusty on this stuff, so if it doesn't work as expected, let me know and I'll dig in and try to fix it.
Drakkim
Registered User
Posts: 176
Joined: Thu Feb 05, 2004 5:48 am
Contact:

Re: [BETA] Account Links

Post by Drakkim »

Scherbenreiter wrote:Is there a way to put the dropdown design aside and have the names of each linked account, so that we change to the account by clicking on the link?
E.g: Present account: AAAAAAAAA
Linked Accounts, shown as links beneath the header: BBBBBBBB, CCCCCCCCC
Click CCCCCCCCC --> Account change to CCCCCCCCC
Sorry, didn't see this post. If I'm understanding you correctly, you want a list of usernames to just click? Here's some template code to get that goal, but I'd certainly recommend against using it in the header!

Code: Select all

	<!-- BEGIN accounts -->
		<!-- IF not accounts.S_FIRST_ROW -->
		<a href="{U_ACCOUNT_LINK_SWITCH}{accounts.USER_ID}&redirect={U_THIS_URL}"><li>&nbsp;{accounts.USERNAME}</li></a><br />
		<!-- ENDIF -->
	<!-- END accounts -->
	<a href="{U_LOGIN_LOGOUT}"><li>&nbsp;{L_LOGOUT}</li></a>
If you want it to be on a single line, replace the

Code: Select all

<br />
with

Code: Select all

, 
new777
Registered User
Posts: 94
Joined: Thu Oct 03, 2013 6:51 am

Re: [BETA] Account Links

Post by new777 »

Drakkim wrote:The easiest way is to use the "Moderate Linked Accounts" module. That one gives people with user admin privileges the ability to link _anyone's_ account. Using that module, you can link whoever you want.

If you want to give them "normal" access, what you want is to edit mcp/info/mcp_account_link.php

Choose a permission that only these trusted moderators will have and add it to the auth for the manage module. Then, you'll need to remove the module and re-add it for the updated permissions to work. This will hide the mod from the MCP panel, except for the people with that permission.

You want to edit line 25, where it says

Code: Select all

'auth' => ''
The next line shows how to limit the module to only users with administrate users permissions. (acl_a_user)

The main template edits already hide the account switch options unless accounts are linked, so no problem there.

I'm honestly a bit rusty on this stuff, so if it doesn't work as expected, let me know and I'll dig in and try to fix it.
Hi have not looked in the above, because I ran in to a snag.
I have not changed anything yet, in any file.

It seems that for some reason the UCP-Module MUST be Enabled. If I disable or delete it, the Switch Accounts gives an error.

Code: Select all

General Error
Module not accessible

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/includes/functions_module.php
LINE: 439
CALL: trigger_error()

FILE: [ROOT]/ucp.php
LINE: 334
CALL: p_master->load_active()
As soon as I enable the UCP again, it works as it should.
I tried to delete all linked accounts and delete both UCP and MCP, to get a fresh start.

I can link accounts together when ONLY enabled the MCP, they just won't switch. Always the above error.
Then I enable the UCP-Module and all works perfect
Drakkim
Registered User
Posts: 176
Joined: Thu Feb 05, 2004 5:48 am
Contact:

Re: [BETA] Account Links

Post by Drakkim »

For now, you'll need to edit ucp/info/ucp_account_link.php

Choose a permission that only these trusted moderators will have and add it to the auth for the manage module. Then, you'll need to remove the module and re-add it for the updated permissions to work. This will hide the mod from the MCP panel, except for the people with that permission.

You want to edit line 25, where it says

Code: Select all

'auth' => ''
For example, change it to

Code: Select all

'auth' => 'acl_a_user'
to limit the module to only users with administrate users permissions.

The main template edits already hide the account switch options unless accounts are linked, so no problem there.

Yes, these are almost identical to the previous instructions ;-).

If I can find time in the next bit, I'll look into making a hidden version, or at moving the actual switching mechanism out of the UCP.
new777
Registered User
Posts: 94
Joined: Thu Oct 03, 2013 6:51 am

Re: [BETA] Account Links

Post by new777 »

Don't know what happened, I ONLY changed the auth as mentioned above, did not edit any other file.
Now I get these errors in the ACP, when going to System > Module Management > UCP
the ACP and MCP link works fine. Of course I removed any edits and such, but the error remains, so I can not get in the System > Module Management > UCP area anymore.
Parse error: syntax error, unexpected ')' in /home/xxxxx.com/includes/functions_module.php(364) : eval()'d code on line 1
[phpBB Debug] PHP Warning: in file [ROOT]/adm/index.php on line 154: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions_module.php(364) : eval()'d code:1)
[phpBB Debug] PHP Warning: in file [ROOT]/adm/index.php on line 156: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions_module.php(364) : eval()'d code:1)
[phpBB Debug] PHP Warning: in file [ROOT]/adm/index.php on line 157: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions_module.php(364) : eval()'d code:1)
[phpBB Debug] PHP Warning: in file [ROOT]/adm/index.php on line 158: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions_module.php(364) : eval()'d code:1)
I tried to removed the edits in he includes/functions.php , which effectively should un-install it.
I deleted ALL cookies related to the domain, manually FTP purged the cache, clear all browser history

but nothing helps, the error remains.
Drakkim
Registered User
Posts: 176
Joined: Thu Feb 05, 2004 5:48 am
Contact:

Re: [BETA] Account Links

Post by Drakkim »

Parse error: syntax error, unexpected ')' in /home/xxxxx.com/includes/functions_module.php(364) : eval()'d code on line 1
Only the first error is relevant (the others are all complaining that the first error caused a message). From this, I would guess that a file in includes/ucp/info/ has an extra ')' Check that file and make sure there is one ')' for each '('
new777
Registered User
Posts: 94
Joined: Thu Oct 03, 2013 6:51 am

Re: [BETA] Account Links

Post by new777 »

Well, I solved the error, but the ONLY way was to drop the whole database and import the backup.
Now all is functioning again, thank god I am a back-up-freak.

Back to the previous issue.

I tried the 'auth' and that works 50%
I can switch when logged in as admin, but with the other account, get error "Module not accesable"

So what if I create a new Group and any users allowed I put in this group.
Lets say the Group is called Switchers Group and has group_id 9
How would I set this for the 'auth' ?
I think that should work, same as putting the users in the admin group, but that is not wise (unless I change their username permissions), but just a seperate group seems more logic and easier.
Drakkim
Registered User
Posts: 176
Joined: Thu Feb 05, 2004 5:48 am
Contact:

Re: [BETA] Account Links

Post by Drakkim »

Hmm... it must be cacheing the code somewhere. There's probably a less drastic solution... but it's solved now, right? ;-)

They don't need to be in the admin group... they just need (if you used the exact stuff I mentioned) permission to administrate users. You can choose a less powerful permission, such as "m_ban" (allowed to ban a user from the MCP) or m_chgposter (allowed to change poster name from MCP). Both of those are abilities that I tend to be a bit careful with, so they may be good enough for your use.

Again, I'll look at moving the switching logic outside of the UCP at some point... but right now work and school are keeping me very busy.
Locked

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