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

Reply
 
Thread Tools
Details »»

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

Version: Unknown Rating:
Released: 04-05-2001 Last Update: Never Installs: 0
 
No support by the author.

Hi Everyone,

I'm hoping someone here can help me with a hack that I am struggling with. I have a search form in the upper left of my site at http://www.InvestorsRow.com where I would like a person to be able to enter a stock symbol and have it take them to the Forum that contains that stock symbol in the title. Currently the search feature has the ability to search thread titles, but in my situation I would like to create a hack that searches the forum titles instead of the thread titles.

I got some good advice from another thread saying that I should write my own script with the following query:

SELECT * FROM forum WHERE title LIKE '%symbol searched for%'

So I tried creating a form that calls a script to search for the forumid of the forum title that contains the stock symbol entered in the form... this is the mess that I came up with... LOL

<HTML>
<HEAD>
<TITLE>Forum Search</TITLE>
<?php
require("global.php");
$forumid=$DB_site->query("SELECT forumid,title FROM forum WHERE title LIKE '%StockSymbol%'");
?>
<SCRIPT TYPE="text/javascript">
function ForumSearch() {
window.location="http://www.InvestorsRow.com/board/forumdisplay.php?$forumid;
}
</SCRIPT>
</HEAD>
<BODY>
<FORM Name="ForumSearch">
<INPUT TYPE="text" SIZE="6" NAME="StockSymbol" VALUE="">
<INPUT TYPE="Button" VALUE="Go" NAME="Go" onClick="ForumSearch()">
</FORM>
</BODY>
</HTML>

And it doesn't even come close to working because I'm a little confused about which page to put the script, where to direct the form, and what variables to pass... I'm assuming I need a script on the same page as my form that will search and find the forum id of the forum title that contains the query string entered, and then pass that forum id to the forumdisplay.php page?

If anyone could give me some advice, I would GREATLY appreciate it!

thanks!
Mike

Show Your Support

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


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 09:04 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.04550 seconds
  • Memory Usage 2,188KB
  • Queries Executed 16 (?)
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
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete