Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Member Bots 1.01 - Bots are treated as registered members Details »»
Member Bots 1.01 - Bots are treated as registered members
Version: 1.00, by trilljester trilljester is offline
Developer Last Online: Aug 2011 Show Printable Version Email this Page

Version: 3.0.13 Rating:
Released: 02-21-2006 Last Update: 02-24-2006 Installs: 5
Code Changes  
No support by the author.

--------- Member Bots 1.01 ---------
Written by Trilljester - http://www.trilliummud.com

This is a port of my 3.5.x hack, Member Bots 1.0 as seen here:

https://vborg.vbsupport.ru/showthread.php?t=108070

It has been tested on my test 3.0.x VBulletin install, and it worked exactly like the 3.5.x version.

This mod allows visiting search engines spiders or "bots" be treated as members instead of guests. You have full control over which usergroup the bots are placed in. This allows you to have content that can only be seen by registered users be indexed by search engines.

Important Note: A lot of debate has risen over this mod and so called
"cloaking" from search engines like Google. It is entirely up to you to utilize this mod, and I cannot take any responsibility if search engines remove you from their listings! I highly doubt that would happen, but I can't promise it won't.

I can say this though. VBulletin's biggest competitor, Invision Power Board, has the same functionality as this mod as a built-in feature, and lots of IPB installations use it WITHOUT any sort of banning or exclusion from major search engines like Google and Yahoo. I personally don't believe that this mod fits the exact definition of "cloaking", as you are not using the mod to improve
search engine ranking, just allowing content that you don't want public to be indexed.

If you charge members to access certain content, I would not allow search engine robots to index that content, as that could be viewed as cloaking. Just food for thought there. If you have any concerns or questions, feel free to PM me at my site.

Please don't fill this topic with baseless claims that if you install it, you'll be banned from search engines. On the flipside, don't fill this topic with debates on why it's not cloaking either. If you're absolutely paranoid about all of it, don't install this mod. Simple as that.

With that out of the way, let's get installing!

INSTALLATION:

1. Before you can do anything, you'll need to get a file from the 3.5.x VBulletin release, as 3.0.x provides no XML parsing, and 3.5 includes a great one that makes this hack work. I cannot provide the file in my distribution (well, I think I can't, to be safe I didn't.)

Download VBulletin 3.5, and upload the file includes/class_xml.php to your includes/ directory for your 3.0.x forum. You don't need to edit it at all, it'll work fine with 3.0.x.

2. Upload the rest of the files in the upload directory to your includes directory. (i.e. <forumroot>/includes/)

3. Load up includes/sessions.php into a text editor. Download it from your VB forum if necessary.

In sessions.php, find this:

Code:
if ($session['userid'] == 0)
{
ADD BELOW:

Code:
require_once('./includes/function_querybot.php');
$uagent = $session['useragent'];
$bot = query_bot($uagent);

if ($bot == 1) {
    $usrgroup = 2;          // Change to whatever usergroup you want! 2 = Members
} else {
    $usrgroup = 1;
}
A few lines below this, you'll see an array called $bbuserinfo.

On the line that reads:

Code:
'usergroupid' => 1,
Replace that with:

Code:
'usergroupid' => $usrgroup,
And that's it!
The spiders_vbulletin.xml file comes from http://www.ragnarokonline.de/spiderlist/ and was written by Christian Stadler. You can visit his site to obtain the latest copy of the XML file. Keep it updated to keep up with new search engine bots.

Feel free to PM me at my site, http://www.trilliummud.com if you use this hack. Stop in and say Howdy, it makes me smile. :-)

// trilljester

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 02-22-2006, 06:48 PM
trilljester's Avatar
trilljester trilljester is offline
 
Join Date: Jul 2005
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reserving first post for future use.
Reply With Quote
  #3  
Old 02-22-2006, 11:25 PM
gigaenvy gigaenvy is offline
 
Join Date: Jul 2004
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and I get this error. Did everything as instructed. Download 3.5.4 and uploaded the class_xml.php file. Line 247 is:

$uagent = $session['useragent'];

Any help would be appreciated.

Quote:
function query_bot($usragent = '') { require_once('./includes/class_xml.php'); $xmlobj = new XMLparser(false, './includes/spiders_vbulletin.xml'); $spiderdata = $xmlobj->parse(); $spiders = array(); if (is_array($spiderdata['spider'])) { foreach ($spiderdata['spider'] AS $spiderling) { $addresses = array(); $identlower = strtolower($spiderling['ident']); $spiders['agents']["$identlower"]['name'] = $spiderling['name']; $spiders['agents']["$identlower"]['type'] = $spiderling['type']; if (is_array($spiderling['addresses']['address']) AND !empty($spiderling['addresses']['address'])) { if (empty($spiderling['addresses']['address'][0])) { $addresses[0] = $spiderling['addresses']['address']; } else { $addresses = $spiderling['addresses']['address']; } foreach ($addresses AS $key => $address) { if (in_array($address['type'], array('range', 'single', 'CIDR'))) { $address['type'] = strtolower($address['type']); switch($address['type']) { case 'single': $ip2long = ip2long($address['value']); if ($ip2long != -1 AND $ip2long !== false) { $spiders['agents']["$identlower"]['lookup'][] = array( 'startip' => $ip2long, ); } break; case 'range': $ips = explode('-', $address['value']); $startip = ip2long(trim($ips[0])); $endip = ip2long(trim($ips[1])); if ($startip != -1 AND $startip !== false AND $endip != -1 AND $endip !== false AND $startip <= $endip) { $spiders['agents']["$identlower"]['lookup'][] = array( 'startip' => $startip, 'endip' => $endip, ); } break; case 'cidr': $ipsplit = explode('/', $address['value']); $startip = ip2long($ipsplit[0]); $mask = $ipsplit[1]; if ($startip != -1 AND $startip !== false AND $mask <= 31 AND $mask >= 0) { $hostbits = 32 - $mask; $hosts = pow(2, $hostbits) - 1; // Number of specified IPs $endip = $startip + $hosts; $spiders['agents']["$identlower"]['lookup'][] = array( 'startip' => $startip, 'endip' => $endip, ); } break; } } } } $spiders['spiderstring'] .= ($spiders['spiderstring'] ? '|' : '') . preg_quote($spiderling['ident'], '#'); } } if (preg_match('#(' . $spiders['spiderstring'] . ')#si', $usragent, $agent)) { return 1; } else { return 0; } }
Fatal error: Call to undefined function: query_bot() in /home/mmotri2/public_html/forums/includes/sessions.php on line 247
Reply With Quote
  #4  
Old 02-23-2006, 01:24 AM
trilljester's Avatar
trilljester trilljester is offline
 
Join Date: Jul 2005
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The file function_querybot.php is in your includes/ directory and is readable, correct?

In your includes directory you should have these 3 files:

spiders_vbulletin.xml
class_xml.php (from 3.5.4)
function_querybot.php

Verify those are there and that this line is in includes/sessions.php:

require_once('./includes/function_querybot.php');
Reply With Quote
  #5  
Old 02-23-2006, 10:09 AM
gigaenvy gigaenvy is offline
 
Join Date: Jul 2004
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by trilljester
The file function_querybot.php is in your includes/ directory and is readable, correct?

In your includes directory you should have these 3 files:

spiders_vbulletin.xml
class_xml.php (from 3.5.4)
function_querybot.php

Verify those are there and that this line is in includes/sessions.php:

require_once('./includes/function_querybot.php');
Trill,

Yes. All files are in /includes and were transferred in binary mode and are readable. I also tried the install again, first deleting and then reuploading and the problem still occurs.

The require_once has also been verified. Looks pretty straightforward - minimal changes and no-brainer. FYI - The error above comes up very very fast.
Reply With Quote
  #6  
Old 02-23-2006, 01:53 PM
trilljester's Avatar
trilljester trilljester is offline
 
Join Date: Jul 2005
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gigaenvy
Trill,

Yes. All files are in /includes and were transferred in binary mode and are readable. I also tried the install again, first deleting and then reuploading and the problem still occurs.

The require_once has also been verified. Looks pretty straightforward - minimal changes and no-brainer. FYI - The error above comes up very very fast.
OK, for the require_once, try using the full path to the includes directory. It shouldn't be required, but if you're using a mod that does a chroot, like vba_cmps, then it could cause problems, I suppose. Basically, for whatever reason, your setup isn't seeing the function_querybot.php file and the function inside of it.

In your case, change the require_once from ./includes/function_querybot.php to:

require_once('/home/mmotri2/public_html/forums/includes/function_querybot.php');

Try it and let me know.
Reply With Quote
  #7  
Old 02-25-2006, 11:07 AM
gigaenvy gigaenvy is offline
 
Join Date: Jul 2004
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by trilljester
OK, for the require_once, try using the full path to the includes directory. It shouldn't be required, but if you're using a mod that does a chroot, like vba_cmps, then it could cause problems, I suppose. Basically, for whatever reason, your setup isn't seeing the function_querybot.php file and the function inside of it.

In your case, change the require_once from ./includes/function_querybot.php to:

require_once('/home/mmotri2/public_html/forums/includes/function_querybot.php');

Try it and let me know.
Trill,

Not sure what happened to my recent post. It would have explained why the error is not popping up anymore. Here it goes...

In your function_querybot.php file you start the code with...

Code:
function query_bot($usragent = '')
{
.
.
.
This causes the above echo and error as decribed recently.

However, when I modify the function_querybot.php file begin with and with:

Code:
<?php
.
.
?>
The error goes away and the site works.

Is this correct? Site works fine and now all I have to do is test it with the Firefox plugin.

Let me know.

Thanks.
Reply With Quote
  #8  
Old 02-25-2006, 05:47 PM
trilljester's Avatar
trilljester trilljester is offline
 
Join Date: Jul 2005
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, that should work. You know, I had added those <?php statements on my test server, but I copied and pasted them to my normal machine to make the zip file, and probably forgot to put them in. OOPS! Big goof on my part! Glad to see it's working for you. I'll update the zip file so nobody else gets caught by this.
Reply With Quote
  #9  
Old 04-10-2007, 09:46 AM
M@tthew M@tthew is offline
 
Join Date: Apr 2007
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi there,

May I ask if this will work for 3.6.5 as it stands now?

Thanks!
Reply With Quote
  #10  
Old 11-09-2008, 12:23 AM
vividbreeze vividbreeze is offline
 
Join Date: Sep 2007
Posts: 265
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this mod still work?
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 01:58 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.04659 seconds
  • Memory Usage 2,309KB
  • Queries Executed 25 (?)
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
  • (6)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete