PDA

View Full Version : Show IP's directly for those who may view them


Stadler
09 Nov 2002, 17:34
I've seen this in some other forums and I think it's quite useful.

With it mods and admins will be able to view IP's directly and even users will be able to view their own IP. Others will only see "IP: logged" as usual or whatever you specify in your templates.

If a mod or admin views a post, it's a link, where he could check the host. If a user views it, it's no link at all.

Screenshots:
Updated Option in Admin-CP (http://www.vbulletin.org/forum/attachment.php?postid=320484)
Guest viewing a thread or user viewing posts of other users (http://www.vbulletin.org/forum/attachment.php?postid=320485)
User views it's own posts (http://www.vbulletin.org/forum/attachment.php?postid=320486)
Mod or admin viewing a thread (http://www.vbulletin.org/forum/attachment.php?postid=320487)

Stadler
09 Nov 2002, 17:38
Updated Option in Admin-CP

Stadler
09 Nov 2002, 17:39
Guest viewing a thread or user viewing posts of other users.

Stadler
09 Nov 2002, 17:40
User views it's own posts

Stadler
09 Nov 2002, 17:41
Mod or admin viewing a thread.

filburt1
09 Nov 2002, 17:57
Nice mod :)

(now if only I was still hacking...:D)

Goldknight
09 Nov 2002, 18:19
Perfect hack, I need it and it is useful =D thanks

Edit: before I install this hack, I d like to know will it add more queries?

Stadler
09 Nov 2002, 18:20
Well, I've just changed the query so there won't be any conflicts between the settingids of other settings. Now it depends on varname.

Version is 1.0.1 now.

LangTuDaTinh
09 Nov 2002, 18:24
great hack...***installed**** thanks

assassingod
09 Nov 2002, 18:48
Very nice work! Will install - many thanks!

Stadler
09 Nov 2002, 19:29
Well, I just got rid of another bug, which caused, that IP's weren't logged anymore, after activating the hack through the new setting in the admin-cp.

Just apply the following and it works again###################################################
#-------------==={OPEN THE FILES}===--------------#
###################################################

forum/newthread.php
forum/newreply.php

###################################################
#---------------==={FIND IN BOTH}===--------------#
###################################################

if ($logip==1 or $logip==2) {

###################################################
#---------==={REPLACE IT IN BOTH WITH}===---------#
###################################################

if ($logip>0) {It should work then.

Stadler
12 Nov 2002, 16:43
Originally posted by Goldknight
Edit: before I install this hack, I d like to know will it add more queries? Well, actually yes: One extra query per Post, but I've managed to solve it now.

Now it's only 1 additional query.

Could someone test Version 1.0.4, plz? It works on our forums, as it should do, but I want to make sure, that it didn't miss something in the hack-file.

shaith
13 Nov 2002, 04:53
Originally posted by Stadler
Well, actually yes: One extra query per Post, but I've managed to solve it now.

Now it's only 1 additional query.

Could someone test Version 1.0.4, plz? It works on our forums, as it should do, but I want to make sure, that it didn't miss something in the hack-file.

seems to work just fine.

AngelPride
28 Nov 2002, 14:27
Modifying the database update script as follows cleans up the display in Admin CP so that the radio buttons are aligned down the left:

UPDATE setting SET optioncode='<input type=\\"radio\\" name=\\"setting[$setting[settingid]]\\" ".iif($setting[value]==0,"checked","")." value=\\"0\\"> Do not log IP<br><input type=\\"radio\\" name=\\"setting[$setting[settingid]]\\" ".iif($setting[value]==1,"checked","")." value=\\"1\\"> Display but require administrator or moderator<br><input type=\\"radio\\" name=\\"setting[$setting[settingid]]\\" ".iif($setting[value]==2,"checked","")." value=\\"2\\"> Display publicly<br><input type=\\"radio\\" name=\\"setting[$setting[settingid]]\\" ".iif($setting[value]==3,"checked","")." value=\\"3\\"> Display directly for administrator or moderator or original poster' WHERE varname='logip';

Stadler
28 Nov 2002, 14:41
THX. :)

Updated the attachment

Chris M
01 Dec 2002, 18:13
Nice:)

Satan

#01
04 Dec 2002, 08:30
Ummm... really dumb question... but... I am running VB Version 2.2.7... How do I do the Query thing?

I have done everything that is stated in the installation of this hack... but I am confused when it comes to "DO THE FOLLOWING QUERY". I do this through phpmyadmin right?

#01
04 Dec 2002, 08:50
ok I'm sorry I got that working. But now I have another prob. When I activate the "Display directly for administrator or moderator or original poster" I am not able to view anybodys IP addresses at all. :(

Stadler
04 Dec 2002, 13:40
Maybe you just forgot to add the new template?###################################################
#--------==={ADD A NEW TEMPLATE CALLED}===--------#
###################################################

postbit_ip_link

###################################################
#----------==={PUT IN THE FOLLOWING}===-----------#
###################################################

IP: <a href="postings.php?s=$session[sessionhash]&action=getip&postid=$post[postid]">$post[ip]</a>

#01
06 Dec 2002, 11:30
Nope. I did add that template. But it still won't work. :( It's just blank.

Stadler
06 Dec 2002, 13:43
Well, go to your vBulletin-Options in your Admin-CP. Are your IP-logging-options looking and set like this (http://www.vbulletin.org/forum/attachment.php?postid=320484)?

If yes, then click on Save changes, even if you didn't change any of the settings there.

Try creating a post with a test account (normal registered user). And look at his post, being logged in as your test account.

Try reverting the templates postbit_ip_show and postbit_ip_hidden in your Postbit Templates.

Revert all changes files and try to reapply all the changes. Maybe you just forgot something or you've made a mistake?

LOD-squa
17 Dec 2002, 01:54
I have done this but nothing...

Stadler
17 Dec 2002, 03:26
Sorry, but I need a little more Info: What do you mean with nothing and what have you done?

LOD-squa
17 Dec 2002, 03:42
When I look on postbit it only shows IP: and nothing and I did everything...

Stadler
17 Dec 2002, 03:49
mmh ... try checking the HTML-Source and maybe some other/older posts. And check, if you've updated the setting in your Admin-CP.

LOD-squa
17 Dec 2002, 03:50
The thing is that when I try to view the source the freaking notepad window doesn't open, And I did update em.

Courage
19 Feb 2003, 12:26
I there a way so only the poster , admins and super admin can see the IP ?
I do not want the moderators to see any IP :(

Stadler
19 Feb 2003, 19:02
Well, you could simply turn off 'Can View IPs' for every moderator in your Admin-CP

hukgwai
02 Mar 2004, 17:02
i've got this all working, but how do i make it so that the IP "seems" public only to Mods/Admins.. i checked the correct radio button.

is there a way to show the IPs of others to mods/admins WITHOUT clicking on the link to resolve the IP?

Stadler
02 Mar 2004, 19:01
The hack is designed to work only, if you check the last option.

If you want to hide the IP from your users, just remove } elseif ($bbuserinfo[userid]>0 and $bbuserinfo[userid]==$post[userid]) {
eval("\$post[iplogged] .= \"".gettemplate("postbit_ip_show")."\";");
from the hack.

hukgwai
02 Mar 2004, 19:19
no, that's not what i was saying.

is it possible to show the IP of everyone ONLY to mods/admins WITHOUT clicking on Logged: ?

Stadler
02 Mar 2004, 19:49
As I said: You have to check the last option in the vBulletin Options to enable the hack. (Display directly for administrator or moderator or original poster)

And if you remove the code as I said above, Users won't be able to see their own IPs but only admins/mods.

hukgwai
02 Mar 2004, 20:13
i didn't think i had a problem with my english. :)

i'll ask one more time:

is it possible for the IP address itself (not Logged:/ not a link to resolve the IP) to show up in postbit template for ONLY mods/admins


right now.. i did what you said.. i have the last option enabled (mods,admins, poster) and removed those 2 lines of code from /admin/functions.php

when I (admin) am logged in.. i can see my own IP in postbit, but i still have to click on Logged: to see others' IPs.. can i make it so that I DON'T have to click on the link to find out the IP address.

this helps in finding double accounts, double user, trolls.. things of that nature