The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
![]() |
|||||||||||||||||||||||||
I've created an alternative hack to the existing one which generated lots of little files. This one's a lot less system intensive and it doesn't involve static files, which means that you save A LOT of web space.
However, this will only work on Linux systems. (contact me if you have access to your httpd.conf on another OS, and I'll make code alterations for it to work) Ed and I tested this (thanks a bunch, Ed!) and everything seems to be working great! Check out his archive at: http://www.magic-singles.com/cpa/forums/search.php3 Directly in the vB directory, create an .htaccess containing: <Files search> DirectoryIndex search ForceType application/x-httpd-php3 </Files> Then, create a file called "search" in the vB directory containing: <? $searcharray=explode("/",$REQUEST_URI); $searchcount=count($searcharray); $spec = $searchcount - 1; $threadid = $searcharray[$spec]; require("showthread.php"); ?> Finally, create a file in your existing vB directory called search.php3 containing: <? require("global.php"); mysql_pconnect($server,$user,$password); mysql_select_db($database); $threads=$DB_site->query("SELECT threadid,title FROM thread WHERE visible=1 ORDER BY lastpost DESC"); while ($threadarray = $DB_site->fetch_array($threads)) { $threadid = $threadarray["threadid"]; $title = $threadarray["title"]; print "<a href=\"search/$threadid\">$title</a><br>\n"; } ?> Finally, create a line in the cssinclude section of the CP which reads: <base href="http://yoursite.com/forums/"> and replace yoursite.com/forums/ with the domain + directory that vB is located in. All should work well! Show Your Support
|
Comments |
#2
|
|||
|
|||
![]()
Just found a little glitch with this: it breaks the "jump to new post" link (from within a thread). To fix this, in showthread.php, find:
Code:
$newpostlink="#newpost"; Code:
$newpostlink="showthread.php?threadid=$threadid#newpost"; |
#3
|
|||
|
|||
![]()
I'm new to vBulletin but am very happy with the software so far. I had posted a few problems before but I realized they were all simply solved... thanks for the great hack.
On a slightly similar note, what search engines index .php files? How have you guys(and gals) found this to work with search engines? [Edited by ExtremeFactor on 06-18-2000 at 01:21 AM] |
#4
|
|||
|
|||
![]()
Excellent job Stallion. Seeing as how this hack is designed to create an index that search engine spiders will crawl and index each individual thread, I have one simple question: Will they index this file? I mean without any text other than the links, I've heard that search engines wouldn't index these types of pages. I assume Ed has submitted his thread index thread, and I was wondering if any engines had indexed the individual threads?
I was also wondering how you would go about creating individual meta tags for the pages. Keyword and description meta tags arn't as important anymore, but it would still be nice to have them. Anyone know how to do this. (I'm thinking if a thread is called "How to make a million dollars" I'd like the meta description to say "How to make a million dollars, dicussed on the (Insert your forum name here)" Sorry for rambling, it's getting late. Cameron |
#5
|
|||
|
|||
![]()
Yes, search engines will index any file with any extenstion, its just that they don't store query strings in their databases. This would mean if they found a link to showthread.php?threadid=325 they would store it as showthread.php, which gives an error.
This hack creates an index of all threads, which is called with a query-string-less PHP file. The threads themselves will be linked from the search engines with the new URL's, but they remain seamlessly identical to the showthread.php versions. It works well ![]() As far as <meta> tags, that could be added via templates, for all thread pages. |
#6
|
|||
|
|||
![]()
Anyway to get this working on my virtual server, not linux, but SunOS?
|
#7
|
|||
|
|||
![]()
I don't think I clarified enough in my last post Stallion. I understand why you have to generate the page without the links containing ?'s. My question was if from experience, the search engines actually index every thread, or if they ignore the page because there are too many links and not enough text. I've heard that because link popularity is more and more important, many engines won't index pages with so many links without content.
Cameron |
#8
|
|||
|
|||
![]()
I have gone through all of the steps several times and I am getting a 404 error (file not found) everytime I click on a link from search.php3. I'm using an .htaccess and I know that my .htaccess if functional because I use it for many things in a variety of directories. Is there a reason that this specific command might not work in my .htaccess? I assume that must be where the problem is, because I have made and modified all of the files, as noted above.
Any thoughts? |
#9
|
|||
|
|||
![]()
Is there any way to exclude private forums?
|
#10
|
|||
|
|||
![]()
Will this work for FreeBSD?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|