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
  #32  
Old 08-01-2000, 08:43 PM
Guest
 
Posts: n/a
Default

Have you used .htaccess fils on your server in the past?

If not, its most likely a server-config issue.
Reply With Quote
  #33  
Old 08-02-2000, 09:52 AM
Guest
 
Posts: n/a
Default

yes i am using a htaccess file in my root directory to parse .php files and have my server setup for 404 error redirects to the main page

what should i do ?
Reply With Quote
  #34  
Old 08-02-2000, 03:29 PM
Guest
 
Posts: n/a
Default

Not sure about this one.

Did anyone else get similar problems?

My guess is that its redirecting to the main page since it considers the URL's "not found", which I'm assuming is because your 404 error page is your main index file

The problem is the 500 error, I guess.

Anyone?
Reply With Quote
  #35  
Old 08-02-2000, 04:02 PM
Guest
 
Posts: n/a
Default

what if i shoved this

<Files search>
DirectoryIndex search
ForceType application/x-httpd-php3
</Files>

into my htaccess in my root directory ?
Reply With Quote
  #36  
Old 08-03-2000, 02:56 AM
Guest
 
Posts: n/a
Default

Don't think so, since that "search" location is a relative path.

Hmm, what server are you running on?
Reply With Quote
  #37  
Old 08-03-2000, 07:40 AM
Guest
 
Posts: n/a
Default

a dedicated red hat linux 6.2 server using a webmin control panel
Reply With Quote
  #38  
Old 08-09-2000, 06:26 AM
Guest
 
Posts: n/a
Default

The fix to keep this from showing a private forum would be as follows:

In search.php3 change:
Code:
$threads=$DB_site->query("SELECT threadid,title FROM thread WHERE visible=1 ORDER BY lastpost DESC");
to:
Code:
$threads=$DB_site->query("SELECT threadid,title FROM thread WHERE visible=1 AND forumid <> 34 ORDER BY lastpost DESC");
Make sure you change "34" to the forumid of your private forum. (The forum id of a forum can be found by going to your main page and holding your mouse over a link, in the status bar you will see something like: "http://www.extremeforums.com/forums/forumdisplay.php?forumid=2" whatever number is next to "forumid=" is the forum id of that forum)

Sorry to put this in the terms that I did but some people seriously do have problems with this

~Chris
P.S Job well done Stallion!
Reply With Quote
  #39  
Old 08-09-2000, 06:38 AM
Guest
 
Posts: n/a
Default

Does anyone see any advantages / disadvantages to this:

Code:
<? 
require("global.php"); 

mysql_pconnect($server,$user,$password); 
mysql_select_db($database); 

$threads=$DB_site->query("SELECT threadid,title,threadindex FROM thread WHERE visible=1 AND forumid <> 34 ORDER BY lastpost DESC"); 
while ($threadarray = $DB_site->fetch_array($threads)) { 
$threadid = $threadarray["threadid"]; 
$title = $threadarray["title"]; 
$threadindex = $threadarray["threadindex"];
print "<a href=\"search/$threadid\">$threadindex</a><br><br>\n"; 
} 
?>
Basically what your doing, is instead of making the title of the thread the link, your making the entire thread index (selected words from the thread) for the link.

I was thinking this would give the spider more text to chew on and in turn, would make your site turn up in more searches, but I could be wrong. Any search engine pros wanna comment?

~Chris
Reply With Quote
  #40  
Old 08-09-2000, 06:49 AM
Guest
 
Posts: n/a
Default

I have a backend script that reports back all 404, 500, 400 etc etc errors. Well what I did was I went ahead and submitted my page to the engines that spider and within minutes I was getting logs of 404 not found errors on every one of the links that they were spidering from that page.

I think this is a real good idea and I really wish it would work

Funny thing is though, if you go to the page you dont get the 404 errors.
http://www.extremeforums.com/forums/spider.php

here is the error....
ON YOUR SITE, Extreme Forums
ERROR CODE 404 NOT FOUND
OCCURRED ON Wed Aug 9 02:23:48 2000
WHEN THE URL /search/259 WAS REQUESTED
FROM THE PAGE
BY A USER AT 195.145.119.25
THE BROWSER WAS Infoseek Sidewinder/0.9
------------------------------------------------------------------------------


One thing I notice though is that the engines are looking for /search/*** why arent they looking for /forums/search/*** ??? After all thats what is listed on search.php3


Im sure someone knows more about this than I do, so could you please comment?

Thanks,
~Chris
Reply With Quote
  #41  
Old 08-15-2000, 03:57 AM
Guest
 
Posts: n/a
Default

well my problem still stands

http://animeboards.net/forums/search.php3

lists the threads but still doesn't work with the htaccess file in the forum directory...
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 07:48 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.04555 seconds
  • Memory Usage 2,275KB
  • 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
  • (3)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)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