irontongue
New Member
Headed to the gym.
Posts: 82
inherit
257751
0
Apr 21, 2021 3:35:54 GMT -8
irontongue
Headed to the gym.
82
February 2019
irontongue
|
Post by irontongue on Feb 19, 2019 12:54:08 GMT -8
Forum URL: (private)
I have a custom navigation panel on the left side of my forum.
How can I make some links visible to board admins, some link visible to board members and some links visible to visitors?
If that is possible.
::fingers crossed::
|
|
Former Member
inherit
guest@proboards.com
256583
0
Nov 26, 2024 4:20:18 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Feb 19, 2019 14:42:27 GMT -8
irontongue, it's possible to make navigation links exclusive to certain groups but you'd have to create your custom navigation panel in the layout template from scratch. Our template variables do not work in plugins.
|
|
irontongue
New Member
Headed to the gym.
Posts: 82
inherit
257751
0
Apr 21, 2021 3:35:54 GMT -8
irontongue
Headed to the gym.
82
February 2019
irontongue
|
Post by irontongue on Feb 19, 2019 17:21:13 GMT -8
Well, that's a bummer.
|
|
irontongue
New Member
Headed to the gym.
Posts: 82
inherit
257751
0
Apr 21, 2021 3:35:54 GMT -8
irontongue
Headed to the gym.
82
February 2019
irontongue
|
Post by irontongue on Mar 26, 2019 7:21:49 GMT -8
irontongue , it's possible to make navigation links exclusive to certain groups but you'd have to create your custom navigation panel in the layout template from scratch. Our template variables do not work in plugins. How would I make navigation links exclusive to certain groups if I were to create my custom navigation panel in the layout template from scratch?
|
|
inherit
yllaciledehcysP citsatkranS
161169
0
Nov 28, 2013 18:47:45 GMT -8
moonbeam
I have NO IDEA what "psychedelic insultment" is, but I'm clearly a victim of it!
7,230
December 2010
lmccull
|
Post by moonbeam on Mar 26, 2019 7:36:35 GMT -8
Just out of curiosity, why not just make a board that is visible only to admins/other staff groups you designate? Seems simpler than trying to do the custom navigation thing.
|
|
irontongue
New Member
Headed to the gym.
Posts: 82
inherit
257751
0
Apr 21, 2021 3:35:54 GMT -8
irontongue
Headed to the gym.
82
February 2019
irontongue
|
Post by irontongue on Mar 26, 2019 7:46:48 GMT -8
Just out of curiosity, why not just make a board that is visible only to admins/other staff groups you designate? Seems simpler than trying to do the custom navigation thing. Actually, I'm trying to make something else visible to admins.
So, I'm hoping this will help me to understand how that is done.
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,849
January 2015
msg
|
Post by Lynx on Mar 26, 2019 7:47:32 GMT -8
irontongue , it's possible to make navigation links exclusive to certain groups but you'd have to create your custom navigation panel in the layout template from scratch. Our template variables do not work in plugins. How would I make navigation links exclusive to certain groups if I were to create my custom navigation panel in the layout template from scratch? One possible way to do this fairly easily is to go to Admin > Settings > Forum Settings > Navigation (tab) and uncheck all of the boxes EXCEPT the Admin link. Then, use the Navbar Links plugin to put all of your navbar links in. That plugin allows you to set which group(s) see the link it's set on. If you need help, please post in the support thread for it. NOTICE: If you get an error popup, that means you have started a new link but did not delete it if you changed your mind. Please see this post on how to correct that error. All past issues with people getting the error popup has shown it to be user error, not plugin error. If you get the error and can't figure it out, I encourage you to post in the support thread and I will help you. This is being brought to you only as an option. How you go about doing this (custom navbar) is completely up to you. EDIT: Bear in mind that, like all plugins, this will not work on mobile. Therefore, you may want to keep some of the other navbar links still checked in your admin panel.
|
|
irontongue
New Member
Headed to the gym.
Posts: 82
inherit
257751
0
Apr 21, 2021 3:35:54 GMT -8
irontongue
Headed to the gym.
82
February 2019
irontongue
|
Post by irontongue on Mar 26, 2019 13:11:55 GMT -8
I need to know how to do it in the layout templates. ty
|
|
irontongue
New Member
Headed to the gym.
Posts: 82
inherit
257751
0
Apr 21, 2021 3:35:54 GMT -8
irontongue
Headed to the gym.
82
February 2019
irontongue
|
Post by irontongue on Mar 26, 2019 16:38:08 GMT -8
What I want to do is display the forum user's IP in their mini profile and make it only viewable to site admins.
Then I want to make it clickable to look-up that IP on whatismyipaddress.com.
Can anyone help?
Thanks in advance.
-Iron Tongue
|
|
inherit
yllaciledehcysP citsatkranS
161169
0
Nov 28, 2013 18:47:45 GMT -8
moonbeam
I have NO IDEA what "psychedelic insultment" is, but I'm clearly a victim of it!
7,230
December 2010
lmccull
|
Post by moonbeam on Mar 26, 2019 17:26:41 GMT -8
There's a plugin that does something similar to that. It adds a button in the same row as the quote. If you're interested in that at all, here's the link. IP Lookup
|
|
irontongue
New Member
Headed to the gym.
Posts: 82
inherit
257751
0
Apr 21, 2021 3:35:54 GMT -8
irontongue
Headed to the gym.
82
February 2019
irontongue
|
Post by irontongue on Mar 26, 2019 17:52:59 GMT -8
There's a plugin that does something similar to that. It adds a button in the same row as the quote. If you're interested in that at all, here's the link. IP LookupThanks, but I tried that plug in. It's not what I'm looking for.
|
|
inherit
252032
0
Apr 26, 2024 23:51:41 GMT -8
Retread
Tribbial Pursuit.
5,017
January 2018
retread
|
Post by Retread on Mar 26, 2019 19:16:17 GMT -8
What I want to do is display the forum user's IP in their mini profile and make it only viewable to site admins.Then I want to make it clickable to look-up that IP on whatismyipaddress.com.Can anyone help? Thanks in advance. -Iron Tongue Hi irontongue In cases where there's a change in what's needed, it's often better to start a new thread. Anyway, depending on what you mean by 'site admins' this might do what you need. It's limited to just the root admin (user/1). But we can change the {if} statement to allow it to be visible to all staff or just members of a specific group. Add this to your mini-profile template. Just before the last </div> would be a good place. {if $[current_user.id] == 1 } <a href="https://whatismyipaddress.com/ip/$[user.ip]">$[user.ip]</a> {/if} Give that a try and let me know what you think.
|
|
irontongue
New Member
Headed to the gym.
Posts: 82
inherit
257751
0
Apr 21, 2021 3:35:54 GMT -8
irontongue
Headed to the gym.
82
February 2019
irontongue
|
Post by irontongue on Mar 27, 2019 4:33:46 GMT -8
What I want to do is display the forum user's IP in their mini profile and make it only viewable to site admins.Then I want to make it clickable to look-up that IP on whatismyipaddress.com.Can anyone help? Thanks in advance. -Iron Tongue Hi irontongue In cases where there's a change in what's needed, it's often better to start a new thread. Anyway, depending on what you mean by 'site admins' this might do what you need. It's limited to just the root admin (user/1). But we can change the {if} statement to allow it to be visible to all staff or just members of a specific group. Add this to your mini-profile template. Just before the last </div> would be a good place. {if $[current_user.id] == 1 } <a href="https://whatismyipaddress.com/ip/$[user.ip]">$[user.ip]</a> {/if} Give that a try and let me know what you think. I am fairly new to this and I really appreciate everyone putting up with me. So, In cases where there's a change in what's needed, start a new thread. Got it.The code you gave worked like a charm Exactly what I needed. Thank you very much!Could you please give me an example on how to make the IP visible to all staff or members of a specific group.
This is helping me to learn.
|
|
Kami
Forum Cat
Posts: 40,201
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,201
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Mar 27, 2019 9:39:44 GMT -8
Hi irontongue In cases where there's a change in what's needed, it's often better to start a new thread. Anyway, depending on what you mean by 'site admins' this might do what you need. It's limited to just the root admin (user/1). But we can change the {if} statement to allow it to be visible to all staff or just members of a specific group. Add this to your mini-profile template. Just before the last </div> would be a good place. {if $[current_user.id] == 1 } <a href="https://whatismyipaddress.com/ip/$[user.ip]">$[user.ip]</a> {/if} Give that a try and let me know what you think. I am fairly new to this and I really appreciate everyone putting up with me. So, In cases where there's a change in what's needed, start a new thread. Got it.The code you gave worked like a charm Exactly what I needed. Thank you very much!Could you please give me an example on how to make the IP visible to all staff or members of a specific group.
This is helping me to learn. It's roughly the same thing. Instead of making the IF statement go off of the current user's ID, you make it go off of whether or not the current user is in a particular group: {if $[current_user.group.name] == "Administrator"} <a href="https://whatismyipaddress.com/ip/$[user.ip]">$[user.ip]</a> {/if} Replace "Administrator" with the name of the group you want to have the ability to see this IP. Please note that whatever is between the quotation marks is case sensitive so for example, if the group name is Admin with a capital A and you use admin with a lower case A, it will not work correctly. Alternatively, if you just want to go off of whether or not the person's group is considered staff (as dictated by the "is staff" option being set to "yes" in the Member Groups admin panel section), use this: {if $[current_user.is_staff]} <a href="https://whatismyipaddress.com/ip/$[user.ip]">$[user.ip]</a> {/if}
|
|
inherit
252032
0
Apr 26, 2024 23:51:41 GMT -8
Retread
Tribbial Pursuit.
5,017
January 2018
retread
|
Post by Retread on Mar 27, 2019 12:27:32 GMT -8
I am fairly new to this and I really appreciate everyone putting up with me. So, In cases where there's a change in what's needed, start a new thread. Got it.The code you gave worked like a charm Exactly what I needed. Thank you very much!Could you please give me an example on how to make the IP visible to all staff or members of a specific group.
This is helping me to learn. Regarding the new thread thing, it's a judgment call you can make. This case falls right on the border. What you're asking for now fits with your thread title but it's significantly different than what you were asking for in the OP. So you can make a new thread in a case like that, if you think it will avoid confusion and clutter within the thread. Kami did a nice job of explaining changing the {if} to test for the contents of the variable $[current_user.group.name]. Alternately you could test for $[current_user.group.id] which will return a numeric value which corresponds to the specific group. (ProBoards stock groups IDs are: Administrator = 1, Global Moderator =2, Moderator = 3, then all other group IDs are numbered sequentially as they are made.) The variable $[current_user.is_staff] returns a numeric value of 1 if the current user (the user who is viewing) is a staff member, and a value of 0 if they are not a staff member. == means is equal to. != means is not equal to. IMPORTANT NOTE:The $[user.ip] variable we've been using is (for lack of a better word) a 'protected' variable. It returns nothing unless the current user is a member of a group which has the power View/Search by IP: enabled. Not all staff members will have that power. The ProBoards stock power for the Moderator group does not. Administrator and Global Moderator groups do have that power.
|
|