Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives

Reply
 
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
  #42  
Old 08-28-2000, 04:52 AM
Guest
 
Posts: n/a
Default

I don't know why it won't work for some people, so don't ask.

But I do have a bug fix.

Instead of replacing $newpostlink="#newpost"; with $newpostlink="showthread.php?threadid=$threadid#ne wpost";, replace it with this:
Code:
if ($pagenumber=="1") {
    $newpostlink="showthread.php?threadid=$threadid#newpost";
} else {
    $newpostlink="showthread.php?threadid=$threadid&pagenumber=$pagenumber#newpost";
}


[Edited by Ed Sullivan on 08-28-2000 at 01:55 AM]
Reply With Quote
  #43  
Old 08-28-2000, 07:27 AM
Guest
 
Posts: n/a
Default

thanks ed... i noticed that little bug on page spans...

still not working for the actual hack though
Reply With Quote
  #44  
Old 10-13-2000, 09:31 PM
Guest
 
Posts: n/a
Default

To implement Brian's "slow down the spider" suggestion of 7/13/00, I did this:

My "search" file was

Code:
<? 
$searcharray=explode("/",$REQUEST_URI); 
$searchcount=count($searcharray); 
$spec = $searchcount - 1; 
$threadid = $searcharray[$spec]; 
require("showthread.php"); 
?>
so I changed it to

Code:
<? 
$searcharray=explode("/",$REQUEST_URI); 
$searchcount=count($searcharray); 
$spec = $searchcount - 1; 
$threadid_with_dotphp_suffix = $searcharray[$spec]; 
$threadid = substr($threadid_with_dotphp_suffix, 0, -4);
require("showthread.php"); 
?>
and to add the ".php" to the end of the URL of each thread title in the search.php3 results listing I modified this line search.php3

Code:
print "<a href=\"search/$threadid\">$title</a><br>\n";
to become this

Code:
print "<a href=\"search/$threadid.php\">$title</a><br>\n";
Reply With Quote
Reply

Thread Tools

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 02:50 PM.


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.04155 seconds
  • Memory Usage 2,221KB
  • Queries Executed 18 (?)
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
  • (5)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
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)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