Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-11-2013, 06:01 AM
cyclical cyclical is offline
 
Join Date: Jun 2003
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 05-11-2013, 10:39 AM
nerbert nerbert is offline
 
Join Date: May 2008
Posts: 784
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 05-11-2013, 01:29 PM
cyclical cyclical is offline
 
Join Date: Jun 2003
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nerbert View Post
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.
Reply With Quote
  #4  
Old 05-13-2013, 01:47 PM
nhawk nhawk is offline
 
Join Date: Jan 2011
Posts: 1,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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]';

Reply With Quote
  #5  
Old 05-14-2013, 12:17 AM
cyclical cyclical is offline
 
Join Date: Jun 2003
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nhawk View Post
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.
Reply With Quote
  #6  
Old 05-14-2013, 12:31 AM
cyclical cyclical is offline
 
Join Date: Jun 2003
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nhawk View Post
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.
Attached Images
File Type: jpg bvb.jpg (31.0 KB, 0 views)
Reply With Quote
  #7  
Old 05-14-2013, 10:19 AM
nhawk nhawk is offline
 
Join Date: Jan 2011
Posts: 1,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
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 06:41 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.09790 seconds
  • Memory Usage 2,268KB
  • Queries Executed 14 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (7)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (1)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)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_postinfo_query
  • fetch_postinfo
  • 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
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete