View Full Version : post userid in hidden location?
cyclical
05-11-2013, 06:01 AM
There is a user registered on our forum that is using some form of bot that copies all the threads from our forum and post it to another website.
In order to see threads on our board one has to be registered/logged in, so whoever is doing this is using a registered account to copy all his.
Anyone want to throw in their .02 cents on a way to throw in some code that displays a user's id number after a username? I am thinking ill make a new temporary user, and if possible add code that displays the userid for whoever is viewing the forum after the username. Then when the user logs in and copies all the thread information it will copy the temporary username WITH the above code that will tell me who was the one viewing.
So everyone would see the if the username "Temporary"+"userid". And the culprit would give themselves away.
Can anyone give me some clues to the above?
nerbert
05-11-2013, 10:39 AM
You could put this code at the bottom of the footer template
<div style="display:none;">{vb:raw bbuserinfo.username} - {vb:raw bbuserinfo.userid}</div>
It won't show on the page but you can see it in the page source
cyclical
05-11-2013, 01:29 PM
You could put this code at the bottom of the footer template
<div style="display:none;">{vb:raw bbuserinfo.username} - {vb:raw bbuserinfo.userid}</div>
It won't show on the page but you can see it in the page source
I'll give that a shot, but I think whatever software the are using strips that kind of information. It appears to copy the viewable data. That's why I suggested something that displays a userid attached to a specific username. The program would just copy it and post it as it saw it.
nhawk
05-13-2013, 01:47 PM
Try this...
Create a plugin using the 'bbcode_parse_start' hook and use this for the code...
if(THIS_SCRIPT == 'showthread')
{
$parsedtext = "";
$text .= "\r\n\r\n" . '['color'] . ']BVB: ' . $vbulletin->userinfo['userid'] . '';
}
That will insert "BVB: <userid>" into every post's text (BVB = "Being Viewed By"). That text will be the same color as the post background and not viewable unless the text is highlighted using your mouse. I'm guessing the site is copying all text, no matter what color it is, so that would be copied too.
If you actually want the BVB to be visible on your site just use this code..
if(THIS_SCRIPT == 'showthread')
{
$parsedtext = "";
$text .= "\r\n\r\n" . 'BVB: ' . $vbulletin->userinfo['userid'] . '';
}
cyclical
05-14-2013, 12:17 AM
Try this...
Create a plugin using the 'bbcode_parse_start' hook and use this for the code...
if(THIS_SCRIPT == 'showthread')
{
$parsedtext = "";
$text .= "\r\n\r\n" . '['color'] . ']BVB: ' . $vbulletin->userinfo['userid'] . '';
}
That will insert "BVB: <userid>" into every post's text (BVB = "Being Viewed By"). That text will be the same color as the post background and not viewable unless the text is highlighted using your mouse. I'm guessing the site is copying all text, no matter what color it is, so that would be copied too.
If you actually want the BVB to be visible on your site just use this code..
if(THIS_SCRIPT == 'showthread')
{
$parsedtext = "";
$text .= "\r\n\r\n" . 'BVB: ' . $vbulletin->userinfo['userid'] . '';
}
Thanks so much!
I'll give this a shot.
cyclical
05-14-2013, 12:31 AM
Try this...
Create a plugin using the 'bbcode_parse_start' hook and use this for the code...
if(THIS_SCRIPT == 'showthread')
{
$parsedtext = "";
$text .= "\r\n\r\n" . '['color'] . ']BVB: ' . $vbulletin->userinfo['userid'] . '';
}
That will insert "BVB: <userid>" into every post's text (BVB = "Being Viewed By"). That text will be the same color as the post background and not viewable unless the text is highlighted using your mouse. I'm guessing the site is copying all text, no matter what color it is, so that would be copied too.
If you actually want the BVB to be visible on your site just use this code..
if(THIS_SCRIPT == 'showthread')
{
$parsedtext = "";
$text .= "\r\n\r\n" . 'BVB: ' . $vbulletin->userinfo['userid'] . '';
}
Ok tried the first one, not quite working. It is displaying a visible code on the screen but not showing the userid even after highlighting. Posted screen capture below.
nhawk
05-14-2013, 10:19 AM
OK, sorry. I didn't know you were running a vB version older than 4.2.
Add this at the very top of the code..
global $vbulletin;
so you have this..
global $vbulletin;
if(THIS_SCRIPT == 'showthread')
{
$parsedtext = "";
$text .= "\r\n\r\n" . '['color'] . ']BVB: ' . $vbulletin->userinfo['userid'] . '';
}
And it should work for you.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.