The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
Lets see, the files we would have to edit would be, newreply.php and newpost.php
First, I guess we would have to add another column to our 'post' table.. we would execute this mysql query: Code:
ALTER TABLE post ADD proxyip VARCHAR(16) not null AFTER ipaddress Code:
if ($logip==1 or $logip==2) { $ipaddress=iif(getenv("REMOTE_ADDR")!="",getenv("REMOTE_ADDR"),$HTTP_HOST); } else { $ipaddress=""; } Code:
if ($logip==1 or $logip==2) { $ipaddress=iif(getenv("REMOTE_ADDR")!="",getenv("REMOTE_ADDR"),$HTTP_HOST); if (getenv("HTTP_X_FORWARDED_FOR")!="") { $proxyip=getenv("HTTP_X_FORWARDED_FOR"); } } } else { $ipaddress=""; $proxyip=""; } Code:
if (getenv("HTTP_X_FORWARDED_FOR")!="") { $proxyip=getenv("HTTP_X_FORWARDED_FOR"); } Code:
$proxyip=iif(getenv("HTTP_X_FORWARDED_FOR")!="",getenv("HTTP_X_FORWARDED_FOR")); Now we have to add it to the sql table... |
#12
|
|||
|
|||
<? echo $HTTP_X_FORWARDED_FOR; ?>
would this work for a normal page to display the real address? |
#13
|
||||
|
||||
Yes, if they were using a proxy that gave out that variable. Most proxys do, some dont.
use this btw: Code:
<?=$HTTP_X_FORWARDED_FOR;?> |
#14
|
||||
|
||||
have you tested this out yet?
|
#15
|
||||
|
||||
No, hehe. Its not done. I'm just, starting it out hoping someone else will jump in and help some. Here is the next part I supose
in newthread.php still, find: Code:
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$iconid','1')"); Code:
$DB_site->query("INSERT INTO post (postid,threadid,title,username,userid,dateline,attachmentid,pagetext,allowsmilie,showsignature,ipaddress,proxyip,iconid,visible) VALUES (NULL,'$threadid','".addslashes(htmlspecialchars($subject))."','".addslashes($postusername)."','$bbuserinfo[userid]','".time()."','$attachmentid','".addslashes($message)."','$allowsmilie','$signature','$ipaddress','$proxyip','$iconid','1')"); Now I'll take a look at newreply.php, as there will be stuff to edit in there. Also I'm unsure about how it will effect other sql queries, since there is now another column in there. I'll look at, edit post, and a fiew more things to see if the post template is modified anywhere else. |
#16
|
||||
|
||||
the only thing is when users try to find the query, they might not find it if they've added hacks that add there.
I'm not much help php-wise, I'm learning myself also, I think if we're going the way of adding some kind of proxy icon in the postbit, don't you have to define it in functions.php? |
#17
|
||||
|
||||
umm, I dunno T_T
Thats why I need more help. lol I'm going to put what I think all of it is into a text file, then let someone look at it. Maybe they could help |
#18
|
||||
|
||||
Okie, I've taken a look at everything. And the only modifications for getting the proxy IP is done. Aswell it wont interfer with other sql queries. But if you have another hack installed you have to adjust the one line thats listed in there.
Now, what I want is to make it so that you have to edit the postbit template, and under the posts add something like '$proxydetector' if there is something in the the sql column proxyip, then it will print out something determined via a template, if not it wont return anything. Problem is is that I dont know anything about templates. Can someone help me from here. I attached what I managed sofar. |
#19
|
||||
|
||||
Ah well, no one helped (except heretic) so I ended up learning more about templates etc. I figured it all out and will be releasing a version tommorow.
Thanks ppl ^_^ :bunny: I managed to get it together alredy: https://vborg.vbsupport.ru/showthrea...threadid=38358 |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|