Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
IP Viewing in posts for particular Second Group Details »»
IP Viewing in posts for particular Second Group
Version: 1.00, by Makc666 Makc666 is offline
Developer Last Online: Sep 2019 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.6.5 Rating:
Released: 10-31-2006 Last Update: Never Installs: 7
Code Changes  
No support by the author.

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 ]---------------------------------
#
Code:
                $this->post['iplogged'] = '';
                if ($this->post['ip'] != '')
                {
#
#-----[ AFTER, ADD ]---------------------------------
#
Code:
                        $arr_membergroupids = array("14" => 0,"26" => 0);
#
#-----[ FIND ]---------------------------------
#
Code:
                        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 ]---------------------------------
#
Code:
                        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 and display IP on mouse hover in posts...

But when you click on icon you will get a warning message that access is denied.

Lets "fix" this one!

#
#-----[ OPEN ]------------------------------------------
#
postings.php
#
#-----[ FIND ]---------------------------------
#
Code:
        // check moderator permissions for getting ip
        if (!can_moderate($threadinfo['forumid'], 'canviewips'))
        {
                print_no_permission();
        }
#
#-----[ REPLACE WITH ]---------------------------------
#
Code:
        // 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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 11-01-2006, 03:19 PM
Makc666's Avatar
Makc666 Makc666 is offline
 
Join Date: Dec 2002
Location: MSK-RU
Posts: 392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reserved =)
Reply With Quote
  #3  
Old 11-01-2006, 09:51 PM
Hornstar Hornstar is offline
 
Join Date: Jun 2005
Location: Australia
Posts: 2,469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why doesnt vb have this in 3.6.2? This should be default by the sounds of it.
[
Well another option (not as good) is giving that usergroup permission to view the whos online and then give them permission "Can View IP Addresses" But I think you should let vb know this, as it should be a default option.

Thanks.
Reply With Quote
  #4  
Old 11-02-2006, 09:29 AM
Makc666's Avatar
Makc666 Makc666 is offline
 
Join Date: Dec 2002
Location: MSK-RU
Posts: 392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hornstar1337
Why doesnt vb have this in 3.6.2? This should be default by the sounds of it.
I fully agree with you!

Quote:
Originally Posted by hornstar1337
Well another option (not as good) is giving that usergroup permission to view the whos online and then give them permission "Can View IP Addresses" But I think you should let vb know this, as it should be a default option.
Thanks.
You want to unify/join my modification with "Can View IP Addresses" option?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:30 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04216 seconds
  • Memory Usage 2,241KB
  • Queries Executed 17 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete