The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hello,
I was wondering if there was a way to allow UserGroup X to see the little computer icon in postbit that allows the Admin to see that user's IP address? I am thinking it would be some type of IF statement placed in the postbit template, but my Coding-Fu is weak. ![]() Thanks for any help you can give. Keith |
#2
|
|||
|
|||
![]()
Unfortunately the code doesn't generate the ip stuff if it's not allowed for the user, so there's no way to just put an "if" in a template. However, you can add a plugin to the postbit_display_complete hook with this code:
Code:
global $vbulletin, $show, $vbphrase, $stylevar; if ($this->post['ip'] != '') { if ($this->registry->options['logip'] != 0 AND is_member_of($vbulletin->userinfo, X)) { $show['ip'] = false; eval('$this->post[\'iplogged\'] = "' . fetch_template('postbit_ip') . '";'); } } BTW, the "$show['ip'] = false" part might seem wrong, but if it's set to "true" it will display the ip address using text instead of showing the computer icon. |
#3
|
|||
|
|||
![]()
kh99, thanks for the code man! I'm not sure how to go about making a plugin to use that hook though. I'll dig around on the site and see if I can find something to get me started.
Thanks again! |
#4
|
|||
|
|||
![]()
You just need to go to the admin control panel and choose "Add New Plugin" under "Plugins and Products". Choose the hook location from the drop-down, make up a title (so that you'll remember what it is later), paste in the code and choose the "Yes" radio button to activate it. Don't worry about the other fields.
You can also look in the vbulletin manual if you want to know more about plugins and products. |
#5
|
|||
|
|||
![]()
Thanks, that worked. With the option set to false to display the icon, the users got a permissions error on the page it tried to open for them. They could see the IP address just by mousing over the icon though. I change the option to true and they could see the IP right on the postbit... which served my purposes just fine.
Thanks again for all the help! |
#6
|
|||
|
|||
![]()
Oops - I tried it and got the icon to appear, but didn't actually click on it. Anyway, I'm glad it worked out.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|