vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Anti-Spam Options - DRC - User must verify their site (prevent spam links in postbit & profiles) (https://vborg.vbsupport.ru/showthread.php?t=328367)

Dr.CustUmz 11-24-2020 10:00 PM

DRC - User must verify their site (prevent spam links in postbit & profiles)
 
1 Attachment(s)
This is an exact post of my vb3 mod, I saw no difference in the file so there should be no difference in this modification. Although I have NOT tested this on vb4.

Tired of users posting random ass sites as their site and having all sorts of links to garbage sites on your board?

Here's an easy solution, lets make them verify they own the site they enter as theirs!

This modification does require a file edit, I will port to a mod when I find time.

open profile.php and find:
PHP Code:

$userdata->set('homepage'$vbulletin->GPC['homepage']); 

Replace it with:
PHP Code:

if($vbulletin->GPC['homepage'] == '') {
    
$userdata->set('homepage'$vbulletin->GPC['homepage']);
  } else {
    
$home_paga str_replace('http://','',$vbulletin->GPC['homepage']);
    
$home_paga str_replace('https://','',$home_paga);
    
$home_paga str_replace('www.','',$home_paga);
    
$home_paga str_replace('/','',$home_paga);
    if(@
fopen ('http://'.$home_paga.'/YourOwnAnagram_site_verification_'.$vbulletin->userinfo['userid'].'.txt''r')){
      
$userdata->set('homepage'$vbulletin->GPC['homepage']);
    }
  } 

Plain text breakdown of this code for people not code savey,
this will only take effect when users edit their details. When they submit their changes, the code does the following:

- if homepage url is blank
- set the field to blank
- if homepage url is not blank
- checks what's in the box and replaces bits of text to get the domain
- opens a connection to the site entered and looks for the file drc_site_verification_USERID.txt
- if that file exists, go ahead and change their domain

Edit YourOwnAnagram to be something unique that other sites wont be using also. example, I use drc

Then in phrases search for:
Quote:

let_other_visitors_know_url
You can replace this phrase with anything you like letting your members know. I use:
Quote:

This option will allow you to display a link to your site in all your forum posts.<br>
<br>
Before your site is displayed you must verify ownership, to do this you need to: <br>
Place an empty file with the name: drc_site_verification_<b>ID</b>.txt<br>
<br>
Where <u>ID</u> is your ID on our forum. <br>example: <i>http://domain.com/drc_site_verification_100.txt</i><br>
<br>
<i>If this file is not found, your homepage URL will not be updated!</i>
<br>

This is a method of spam prevention I have not seen on here before, so I hope you guys get some use from it =)

This will not effect any sites already entered by your users, if you need to clear all sites entered by users you can use the following query:
Code:

UPDATE user SET homepage = '';

yilmaz 11-25-2020 07:41 PM

It's a great idea. Good job.


All times are GMT. The time now is 04:41 AM.

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.02920 seconds
  • Memory Usage 1,724KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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