Makc666
10-31-2006, 10:00 PM
What this modification for?
As you now in VB 3.6.2 only these types of users can see users' IPs in posts:
1. Admins
2. Super Moderators
3. Moderator of particular Forum
But imagine that you have a Second Group of users called Workers
This Group has about 50 people.
And you want them to see IPs of other Registered Users.
What you can do?
- Add them to Admins? - Of course NO!
- Add them to Super Moderators? - Of course NO, as you don't want them all to delete any post they like.
- Add them all to Moderator one by one? - I think you will become nervious after 10 addition. Also it will not be cool to have 50 Moderator for some Forum.
And VB 3.6.2 doesn't have Usergroups as Moderators!
So here comes this modification!
* You just add two parts of code.
* Set during modification IDs of Second Groups you want to see IPs in posts
And you go :)
Original post here:
http://www.vbulletin.com/forum/showthread.php?t=207007
Here I post only modification for Second Groups!
My main idea is to allow to see IPs to Second Groups you set.
#
#-----[ OPEN ]------------------------------------------
#about line 836
includes/class_postbit.php
#
#-----[ FIND ]---------------------------------
#
$this->post['iplogged'] = '';
if ($this->post['ip'] != '')
{
#
#-----[ AFTER, ADD ]---------------------------------
#
$arr_membergroupids = array("14" => 0,"26" => 0);
#
#-----[ FIND ]---------------------------------
#
else if ($this->registry->options['logip'] == 1 AND can_moderate($this->thread['forumid'], 'canviewips'))
{
$show['ip'] = false;
eval('$this->post[\'iplogged\'] = "' . fetch_template('postbit_ip') . '";');
}
#
#-----[ AFTER, ADD ]---------------------------------
#
else if (($this->registry->options['logip'] == 1) AND (array_key_exists($this->registry->userinfo['membergroupids'], $arr_membergroupids)))
{
$show['ip'] = false;
eval('$this->post[\'iplogged\'] = "' . fetch_template('postbit_ip') . '";');
}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
This is for Secondary Group IDs #14 and #26
$arr_membergroupids = array("14" => 0,"26" => 0);
You have other? Change "14" and "26" to one you need!
So, this one will only show an icon https://vborg.vbsupport.ru/external/2011/05/14.gif and display IP on mouse hover in posts...
But when you click on icon https://vborg.vbsupport.ru/external/2011/05/14.gif you will get a warning message that access is denied.
Lets "fix" this one!
#
#-----[ OPEN ]------------------------------------------
#
postings.php
#
#-----[ FIND ]---------------------------------
#
// check moderator permissions for getting ip
if (!can_moderate($threadinfo['forumid'], 'canviewips'))
{
print_no_permission();
}
#
#-----[ REPLACE WITH ]---------------------------------
#
// check moderator permissions for getting ip
$arr_membergroupids = array("14" => 0,"26" => 0);
if ((!can_moderate($threadinfo['forumid'], 'canviewips')) AND (!array_key_exists($vbulletin->userinfo['membergroupids'], $arr_membergroupids)))
{
print_no_permission();
}
// check moderator permissions for getting ip
//if (!can_moderate($threadinfo['forumid'], 'canviewips'))
//{
// print_no_permission();
//}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
This is for Secondary Group IDs #14 and #26
$arr_membergroupids = array("14" => 0,"26" => 0);
You have other? Change "14" and "26" to one you need!
P.S. As you understand (I hope) "14" and "26" must watch the same as in first part of modification :)
As you now in VB 3.6.2 only these types of users can see users' IPs in posts:
1. Admins
2. Super Moderators
3. Moderator of particular Forum
But imagine that you have a Second Group of users called Workers
This Group has about 50 people.
And you want them to see IPs of other Registered Users.
What you can do?
- Add them to Admins? - Of course NO!
- Add them to Super Moderators? - Of course NO, as you don't want them all to delete any post they like.
- Add them all to Moderator one by one? - I think you will become nervious after 10 addition. Also it will not be cool to have 50 Moderator for some Forum.
And VB 3.6.2 doesn't have Usergroups as Moderators!
So here comes this modification!
* You just add two parts of code.
* Set during modification IDs of Second Groups you want to see IPs in posts
And you go :)
Original post here:
http://www.vbulletin.com/forum/showthread.php?t=207007
Here I post only modification for Second Groups!
My main idea is to allow to see IPs to Second Groups you set.
#
#-----[ OPEN ]------------------------------------------
#about line 836
includes/class_postbit.php
#
#-----[ FIND ]---------------------------------
#
$this->post['iplogged'] = '';
if ($this->post['ip'] != '')
{
#
#-----[ AFTER, ADD ]---------------------------------
#
$arr_membergroupids = array("14" => 0,"26" => 0);
#
#-----[ FIND ]---------------------------------
#
else if ($this->registry->options['logip'] == 1 AND can_moderate($this->thread['forumid'], 'canviewips'))
{
$show['ip'] = false;
eval('$this->post[\'iplogged\'] = "' . fetch_template('postbit_ip') . '";');
}
#
#-----[ AFTER, ADD ]---------------------------------
#
else if (($this->registry->options['logip'] == 1) AND (array_key_exists($this->registry->userinfo['membergroupids'], $arr_membergroupids)))
{
$show['ip'] = false;
eval('$this->post[\'iplogged\'] = "' . fetch_template('postbit_ip') . '";');
}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
This is for Secondary Group IDs #14 and #26
$arr_membergroupids = array("14" => 0,"26" => 0);
You have other? Change "14" and "26" to one you need!
So, this one will only show an icon https://vborg.vbsupport.ru/external/2011/05/14.gif and display IP on mouse hover in posts...
But when you click on icon https://vborg.vbsupport.ru/external/2011/05/14.gif you will get a warning message that access is denied.
Lets "fix" this one!
#
#-----[ OPEN ]------------------------------------------
#
postings.php
#
#-----[ FIND ]---------------------------------
#
// check moderator permissions for getting ip
if (!can_moderate($threadinfo['forumid'], 'canviewips'))
{
print_no_permission();
}
#
#-----[ REPLACE WITH ]---------------------------------
#
// check moderator permissions for getting ip
$arr_membergroupids = array("14" => 0,"26" => 0);
if ((!can_moderate($threadinfo['forumid'], 'canviewips')) AND (!array_key_exists($vbulletin->userinfo['membergroupids'], $arr_membergroupids)))
{
print_no_permission();
}
// check moderator permissions for getting ip
//if (!can_moderate($threadinfo['forumid'], 'canviewips'))
//{
// print_no_permission();
//}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
This is for Secondary Group IDs #14 and #26
$arr_membergroupids = array("14" => 0,"26" => 0);
You have other? Change "14" and "26" to one you need!
P.S. As you understand (I hope) "14" and "26" must watch the same as in first part of modification :)