Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 06-13-2000 Last Update: Never Installs: 0
 
No support by the author.

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

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

Comments
  #2  
Old 06-13-2000, 04:35 PM
Guest
 
Posts: n/a
Default

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";
And replace with:
Code:
$newpostlink="showthread.php?threadid=$threadid#newpost";
That should do it...
Reply With Quote
  #3  
Old 06-17-2000, 04:14 PM
Guest
 
Posts: n/a
Default

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]
Reply With Quote
  #4  
Old 06-23-2000, 05:29 PM
Guest
 
Posts: n/a
Default

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
Reply With Quote
  #5  
Old 06-24-2000, 12:30 PM
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #6  
Old 06-24-2000, 12:55 PM
Guest
 
Posts: n/a
Default

Anyway to get this working on my virtual server, not linux, but SunOS?
Reply With Quote
  #7  
Old 06-24-2000, 01:04 PM
Guest
 
Posts: n/a
Default

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
Reply With Quote
  #8  
Old 06-24-2000, 02:54 PM
Guest
 
Posts: n/a
Default

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?
Reply With Quote
  #9  
Old 06-26-2000, 08:02 PM
Guest
 
Posts: n/a
Default

Is there any way to exclude private forums?
Reply With Quote
  #10  
Old 06-26-2000, 08:20 PM
Guest
 
Posts: n/a
Default

Will this work for FreeBSD?
Reply With Quote
 


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 04:13 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.03984 seconds
  • Memory Usage 2,266KB
  • 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
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (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_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_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
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete