inherit
266291
0
Feb 24, 2023 20:46:51 GMT -8
Syko
42
April 2022
syko85
|
Post by Syko on May 9, 2022 7:49:48 GMT -8
In the bottom right of Proboards forums, there is a little icon that shows 2 people (Switch Accounts), is there a way to make it so i can make that button on my navigation bar?
|
|
Kami
Forum Cat
Posts: 40,199
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,199
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on May 9, 2022 13:03:13 GMT -8
In the bottom right of Proboards forums, there is a little icon that shows 2 people (Switch Accounts), is there a way to make it so i can make that button on my navigation bar?
The switch account button is literally just the login button (it just takes you back to the select account page). If you log out of your forum, right click the login link and select "copy link", then log back in, you can drop that link into your navigation bar. The only downside is that it would show for logged out users too.
A cleaner way to do this would be through the layout templates, if you're comfortable making edits to HTML.
|
|
inherit
266291
0
Feb 24, 2023 20:46:51 GMT -8
Syko
42
April 2022
syko85
|
Post by Syko on May 10, 2022 19:22:08 GMT -8
In the bottom right of Proboards forums, there is a little icon that shows 2 people (Switch Accounts), is there a way to make it so i can make that button on my navigation bar?
The switch account button is literally just the login button (it just takes you back to the select account page). If you log out of your forum, right click the login link and select "copy link", then log back in, you can drop that link into your navigation bar. The only downside is that it would show for logged out users too.
A cleaner way to do this would be through the layout templates, if you're comfortable making edits to HTML. yeah i'm not good with HTML coding
|
|
Kami
Forum Cat
Posts: 40,199
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,199
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on May 10, 2022 19:50:58 GMT -8
The switch account button is literally just the login button (it just takes you back to the select account page). If you log out of your forum, right click the login link and select "copy link", then log back in, you can drop that link into your navigation bar. The only downside is that it would show for logged out users too.
A cleaner way to do this would be through the layout templates, if you're comfortable making edits to HTML. yeah i'm not good with HTML coding
If you had someone to guide you would you feel comfortable following directions and editing? It's OK if not, but I would be happy to help if so.
|
|
inherit
266291
0
Feb 24, 2023 20:46:51 GMT -8
Syko
42
April 2022
syko85
|
Post by Syko on May 10, 2022 19:52:01 GMT -8
yeah i'm not good with HTML coding
If you had someone to guide you would you feel comfortable following directions and editing? It's OK if not, but I would be happy to help if so. sure i am always down to learn
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on May 10, 2022 22:03:54 GMT -8
TL;DR- Right-click the switch account icon and copy the address.
- Enter your forum's admin panel and go to settings then select the navigation tab
- click the Add Custom button to add a custom menu and give it a name (example: Switch) then paste the URL you copied in step 1 into URL box
- Click the Edit button to edit the permissions for this new menu and select an option (suggestion: staff & members)
- **OPTIONAL** If you want this menu to land the account that was just switched to on the same page the old account was on then add the following code to your global Header (including the <script> and </script> tags)
<script>$('#navigation-menu a[href*="/select/login/"]').on("click", function(e) { e.preventDefault(); e = $(this).attr("href"); $('<form method="post"><input type="hidden" name="origin" /></form>').appendTo(document.body).attr("action", e).find('input[name="origin"]').val(window.location).end().submit() }) </script>
There is a slight difference in the verb of the switch account icon since it takes you to the select account screen directly with the option to return you to the origin you were previously on at click time (this is useful if on a page where you needed to switch to an alter ego before creating a post). This origin is added dynamically via JavaScript so would not be present on a navigation link unless a similar JavaScript was created to perform that function The switch account icon is just a link so you can right-click it directly and copy the address Login Link
Switch Account Link
you also have the opportunity to limit access to any of the custom navigation menus you may add so you could for example limit it to staff & members (guests won't see it) Original script (in use for the switch account icon)$("#pbn-bar #switch-account").on("click", function(e) { e.preventDefault(); e = $(this).attr("href"); $('<form method="post"><input type="hidden" name="origin" /></form>').appendTo(document.body).attr("action", e).find('input[name="origin"]').val(window.location).end().submit() }) Modified script (for navigation menu)$('#navigation-menu a[href*="/select/login/"]').on("click", function(e) { e.preventDefault(); e = $(this).attr("href"); $('<form method="post"><input type="hidden" name="origin" /></form>').appendTo(document.body).attr("action", e).find('input[name="origin"]').val(window.location).end().submit() })
|
|
Kami
Forum Cat
Posts: 40,199
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,199
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on May 12, 2022 8:38:45 GMT -8
You can also just use the login link variable in the templates & use a conditional to have it display in the menu bar :V no javascript required.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on May 12, 2022 10:07:15 GMT -8
You can also just use the login link variable in the templates & use a conditional to have it display in the menu bar :V no javascript required. The javascript is " **OPTIONAL**" and addresses the following issue: Hi. Is there a setting somewhere that changes where users end up after switching accounts on the same forum? When I change accounts I'd still like to be looking at the same thread, not be redirected to the home screen. Thank you, CC I would like to second this request. Everyone at our forum dislikes this new feature, because we also use it as character-accounts. Loved the old way though <3
Thanks, Brian , it's appreciated. Like S-Freak , my members who used the feature have all been quite annoyed by its sudden disappearance - myself included, as it makes things a lot more irritating now. Oh. That's not really a new feature but an existing feature (the one that take you back to the page you were just on) just not working at the moment. Reference: Switching accounts brings user back to home page?
|
|
Kami
Forum Cat
Posts: 40,199
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,199
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on May 12, 2022 10:20:31 GMT -8
Chris ah i glossed over that, mb!
|
|