|
Save 10% off all website scripts! - Enter code
SNOWBALL at checkout!
|
vBulletin Similar Threads in PHPPosted 2009-04-18 in Scripts
This is a completely portable PHP script that fetches similar threads from a vBulletin forum. It does not require global.php or any other vBulletin scripts to run. The script uses full score matching, and supports search engine friendly URLs made by vBSEO and other custom formats. A little background first. I could have used the built-in vBulletin functions, specifically fetch_similar_threads(), but that means invoking the vBulletin codebase with global.php from my scripts. The overhead of this just doesn’t seem necessary to grab a few threads, but I did not want to settle for a simple wildcard search and preferred score matching with the vBulletin fetch_similar_threads() function. In order to support custom search engine friendly URLs from vBSEO you need to include additional code to use the vbseo_any_url() function. Not to mention, including vBulletin’s global.php isn’t as simple as it sounds. Errors are numerous under certain circumstances, and it simply doesn’t work under others. And if you want to fetch from a different server altogether… well you’re out of luck. Since I plan on invoking this script on every page load from a separate domain, I needed a better solution. Something portable and easy to customize. With this in mind, I created a function vb_get_similar_threads(). This adapts the fetch_similar_threads() function in vBulletin and vbseo_any_url() function from vBSEO to an independent function that can be put in any PHP script with no extra include()’s or overhead. Basically, you pass vb_get_similar_threads() a keyphrase string and the function connects to the vBulletin database and performs a full score matching search, returning all the matching threads as an array with formatted URLs. Full instructions and usage examples are provided in the source code below. Feel free to use this for any purposes, but leave the copyright notice intact if you release any changes. There is no warranty on the code whatsoever. Save the source below to functions_vb_similarthreads.php on your server and modify it as needed. functions_vb_similarthreads.php:
|
SearchPopular Articles
SubscribeSubscribe via RSS Stay current with Scriptalicious news and subscribe in your favorite RSS reader. Subscribe via EmailGet the latest Scriptalicious news delivered to your inbox. Tag Cloudseo guides seo scripts scriptalicious seo tools forums PageRank SEO services content development apache htaccess mod_rewrite scripts webmaster google yahoo JavaScript XMLHttpRequest php contest software website list facebook ebook pagerank bing backlink rankings tool turnkey checker alexa themes marketing tinymce wysiwyg browser rank tools legal trademark infringement mysql social web social networking advertising google plus plus one |
77 powerful SEO scripts for under $100. |
Real-time Backlink Rank Checker script. |