PDA

View Full Version : "Forum Title Search" Hack


netspark
04-13-2001, 04:11 PM
Hi All,
I was able to write a hack that performs a search of Forum Titles. This is useful for anyone with a large number of forums that need to be searched. It is demonstrated on my board at http://www.InvestorsRow.com -- just type MSFT into the search box on the left and it will take you to the forum with MSFT in the forum title.
If anyone needs this hack, just let me know.
Mike

chrispadfield
04-14-2001, 09:34 PM
could be useful, if not to much trouble send it might way...

chris@freeontheweb.com

netspark
04-15-2001, 01:56 AM
Chris,

In case you ever need the ability to search a forum title, here's what I did:

On my site to search for stock symbols in the forum titles, I made a copy of "forumdisplay.php" and named it "stockdisplay.php" and added this just below "require('./global.php');"

$iforums=$DB_site->query("SELECT forumid FROM forum WHERE title like '".$Symbol."'");
$iforum=$DB_site->fetch_array($iforums);
$forumid = $iforum["forumid"];
unset($iforum);
$DB_site->free_result($iforums);

Symbol is what is passed from the search form.

Hope it helps you if you ever need it!