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 |
#12
|
|||
|
|||
![]() Quote:
http://www.aikiweb.com/forums/engine.php Running on FreeBSD 4.0-stable, Apache 1.3.12, mySQL 3.22.32, and PHP 4.0. |
#13
|
|||
|
|||
![]()
TB2: Yes.. just change your sql statement in the search.php3 you created to read:
SELECT threadid,title FROM thread WHERE visible=1 and forumid != BADFORUMID1 and forumid != BADFORUMID2 ORDER BY lastpost DESC Replace BADFORUMID1 and BADFORUMID2, etc. with the forum id's that you do not want to be indexed. |
#14
|
|||
|
|||
![]()
Stallion: I was just looking through the global.php file and it's not necessary for you to issue the mysql_pconnect() or mysql_select_db() calls at the top of search.php3. A database connection is already created inside of global.php.
Also, just to clarify for everyone.. search.php3 can be any filename you wish. I named it to search_hack.php myself since we already had a search.php file we were using. And lastly.. it's a drain on the server to use .htaccess files... those apache directives could just as easily be put inside of a set of Directory tags in the main httpd.conf file. Apache will be all the faster for it. i.e. Code:
<Directory /www/sitename/forums/> ? <Files search> DirectoryIndex search ForceType application/x-httpd-php </Files> </Directory> Stallion: great hack.. thanks. |
#15
|
|||
|
|||
![]()
Including the "<base href="forums/URL"> in the $sccinclude messes up the forums for Netscape users. For example, when they went to my board, they would see the link for a forum as "http://forumdisplay.php?yadda-yadda". I've taken it out and it works fine now, but unfortunatly the search page doesn't work anymore. What should I do to remedy this?
|
#16
|
|||
|
|||
![]()
cool, i would like to have this setup and would need some guidance...
i am new to linux, new to dedicated server use and new to vbulletin... should i be messing around with it right now ? |
#17
|
|||
|
|||
![]() Quote:
My board: http://www.aikiweb.com/forums/ The hack: http://www.aikiweb.com/forums/engine.php |
#18
|
|||
|
|||
![]()
This is cool is there any simple way to create more of a structure. IE
Main Page: Forum 1 |_ New Page With Posts XX Per Page Forum 2 |_ New Page With Posts XX Per Page Forum 3 |_ New Page With Posts XX Per Page Just an idea... |
#19
|
|||
|
|||
![]() Quote:
|
#20
|
|||
|
|||
![]()
1) Listen to danbeck...he speaks the truth
![]() 2) JimF, it should be the full URL, nothing relative 3) eva2000, as long as you don't overwrite any existing files, no harm can be done ![]() 4) Brian: not sure what you mean... |
#21
|
|||
|
|||
![]()
What I meant was for the main page to have links to the fourms, and then the page that shows the links for that forum have it make a new page for every 50 or so topics.
For example say the main page would have a link to each forum and then the page with the posts for each forum would show xxx topics per page then link to the next page that way if you have a big forum you dont have thousands of links all on one page |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|