vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   post userid in hidden location? (https://vborg.vbsupport.ru/showthread.php?t=298041)

cyclical 05-11-2013 06:01 AM

post userid in hidden location?
 
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

Code:

<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

Quote:

Originally Posted by nerbert (Post 2421271)
You could put this code at the bottom of the footer template

Code:

<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...

PHP Code:

if(THIS_SCRIPT == 'showthread')
{
    
$parsedtext "";
    
$text .= "\r\n\r\n" '[SIZE=1][COLOR=' $vbulletin->stylevars['postbit_background']['color'] . ']BVB: ' $vbulletin->userinfo['userid'] . '[/COLOR][/SIZE]';


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..
PHP Code:

if(THIS_SCRIPT == 'showthread')
{
    
$parsedtext "";
    
$text .= "\r\n\r\n" '[SIZE=1]BVB: ' $vbulletin->userinfo['userid'] . '[/SIZE]';



cyclical 05-14-2013 12:17 AM

Quote:

Originally Posted by nhawk (Post 2421733)
Try this...

Create a plugin using the 'bbcode_parse_start' hook and use this for the code...

PHP Code:

if(THIS_SCRIPT == 'showthread')
{
    
$parsedtext "";
    
$text .= "\r\n\r\n" '[SIZE=1][COLOR=' $vbulletin->stylevars['postbit_background']['color'] . ']BVB: ' $vbulletin->userinfo['userid'] . '[/COLOR][/SIZE]';


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..
PHP Code:

if(THIS_SCRIPT == 'showthread')
{
    
$parsedtext "";
    
$text .= "\r\n\r\n" '[SIZE=1]BVB: ' $vbulletin->userinfo['userid'] . '[/SIZE]';



Thanks so much!

I'll give this a shot.

cyclical 05-14-2013 12:31 AM

1 Attachment(s)
Quote:

Originally Posted by nhawk (Post 2421733)
Try this...

Create a plugin using the 'bbcode_parse_start' hook and use this for the code...

PHP Code:

if(THIS_SCRIPT == 'showthread')
{
    
$parsedtext "";
    
$text .= "\r\n\r\n" '[SIZE=1][COLOR=' $vbulletin->stylevars['postbit_background']['color'] . ']BVB: ' $vbulletin->userinfo['userid'] . '[/COLOR][/SIZE]';


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..
PHP Code:

if(THIS_SCRIPT == 'showthread')
{
    
$parsedtext "";
    
$text .= "\r\n\r\n" '[SIZE=1]BVB: ' $vbulletin->userinfo['userid'] . '[/SIZE]';





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..
Code:

global $vbulletin;
so you have this..
PHP Code:

global $vbulletin;
if(
THIS_SCRIPT == 'showthread')
{
    
$parsedtext "";
    
$text .= "\r\n\r\n" '[size=1][COLOR=' $vbulletin->stylevars['postbit_background']['color'] . ']BVB: ' $vbulletin->userinfo['userid'] . '[/color][/size]';


And it should work for you.


All times are GMT. The time now is 03:52 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01024 seconds
  • Memory Usage 1,757KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (7)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete