PDA

View Full Version : Forum Java Script help needed?



EagleMark
03-24-2013, 09:21 AM
IF anyone is better at Java Script then me and you have time I need some help rearranging the Advanced Search page
http://www.gearhead-efi.com/Fuel-Injection/search.php?search_type=1

Only need Single Content Type. In Single Content Type need Posts only, other options in drop down box removed.

Also need a not next to "Keyword(s):" to use * in searches shorter then 3 letters, $42 needs to be $42*

jim_in_dorris
03-24-2013, 11:33 AM
Mark, for the first request, try this.

instead of

<option value="3" class="" >Forums</option><option value="1" class="" selected="selected">Posts</option><option value="7" class="" >Groups</option><option value="5" class="" >Group Messages</option><option value="11" class="" >Visitor Messages</option>

try this

<option value="1" class="" selected="selected">Posts</option>

That should remove everything except Posts

Are you saying that you want to remove the tab search multiple content types also?

EagleMark
03-26-2013, 07:48 AM
I put this off Jim trying to get 3 letter searches to work and it's a hold up at MySQL server that they won't fix, stuck with 4 letters.

But we found if I add 3 letter terms to an option in the forum they do show up if used with another 4 letter word. Has to be a 2 word search and it will include the 3 letter terms if listed in options.

So I am back at this...

Oh if the JS was as easy as you said above I would not need help. But it starts with search.php and uses 21 JS search scripts!

:yikes:

search.php seems to look for search_common in Templates and finds this
<ul id="searchtypeswitcher" class="floatcontainer">
<li class="selected"><a href="search.php?{vb:raw session.sessionurl}search_type=1">{vb:rawphrase search_single_type}</a></li>
<li><a href="search.php{vb:raw session.sessionurl_q}">{vb:rawphrase search_multiple_types}</a></li>
</ul>

We'll see if there's an easier way, I have a tech support in a vB.

Mark

jim_in_dorris
03-26-2013, 10:01 AM
I was just shutting off the dropdown list with that first change, not trying to fix the search command. I didn't have time to look at the search script so I was tackling the easy stuff first. The same thing with the only single type search, only show one option. I knew that the hard part was getting the search to return something with just 3 letters, I was going to look at that when I had a little time. The problem is that it appears that there is server side code in the search using php. I would venture to guess that the php actually generates the Javascript code that you see. Of course, I can only look at page source, so that is just a guess.

EagleMark
03-26-2013, 10:13 AM
You wouldn't believe how many files are needed to create that page source!!!

If you want to drive your students nuts? I can legally give you a copy of my vB since your working for me... :innocent2:

Tell them to fix it! :laugh: