Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Integrating a Search in My Custom Page...
Hi all -
I am using Page Manager, and have a new custom page labeled "Vote". The page is currently blank, and I would like to add a Search or LiveSearch feature to query another table I have in the MySQL DB that I've already set up, and return a member's search result.
To be more specific, a user is going to enter a stock symbol. I am going to return the stock symbol with company name, and exchange that it's traded on, and also a 5 star-rating system, where they can vote on the stock. I can get a preliminary test search to work when I have it as a stand alone (http://www.papertrade.us/extensions/PageMng/livesearch.php), but once I get it into the "Vote" page under page manager, it won't return the result.
Would anyone already have something similar (a Search function on a custom page) that you wouldn't mind sharing code with me, or a suggestion? I would love to use the LiveSearch Extension, but it only searches Discussion, Categories, and Users, and I am unable (as my knowledge goes) to make it also do a query on my other table in the same DB. I do know SQL, but am a novice when it comes to PHP.
I am using Page Manager, and have a new custom page labeled "Vote". The page is currently blank, and I would like to add a Search or LiveSearch feature to query another table I have in the MySQL DB that I've already set up, and return a member's search result.
To be more specific, a user is going to enter a stock symbol. I am going to return the stock symbol with company name, and exchange that it's traded on, and also a 5 star-rating system, where they can vote on the stock. I can get a preliminary test search to work when I have it as a stand alone (http://www.papertrade.us/extensions/PageMng/livesearch.php), but once I get it into the "Vote" page under page manager, it won't return the result.
Would anyone already have something similar (a Search function on a custom page) that you wouldn't mind sharing code with me, or a suggestion? I would love to use the LiveSearch Extension, but it only searches Discussion, Categories, and Users, and I am unable (as my knowledge goes) to make it also do a query on my other table in the same DB. I do know SQL, but am a novice when it comes to PHP.
0
This discussion has been closed.
Comments
<?php include('somepage.php'); ?>
http://www.file.sc/643b5e/LiveSearch_Files.zip
If you'd like to test it out, here is the URL:
http://www.papertrade.us/searchtest/
Next, I'll be working to integrate into my Vanilla forum. Any suggestions based on the script (linked above) would be greatly appreciated.
Regards -
Scott
It does work!
I changed the path of the spinner.gif (ajaxLiveSearch.inc), shortened the /javascript URL to /js per your suggestion (ajax.inc), and changed the path in the index.html from just php/.. to livesearch/php... where I put all files and folders.
Thank you for your help with that - it took all of 5 minutes, where I thought I'd be spending days figuring it out! I need to buy you a few drinks Maybe I can request for Mark to put that add-in here on the forums.
Regards,
Scott