Message from discussion simple search for users
Received: by 10.214.44.14 with SMTP id r14mr26247qar.20.1231950148063;
Wed, 14 Jan 2009 08:22:28 -0800 (PST)
Received: from qw-out-2122.google.com (qw-out-2122.google.com [220.127.116.11])
by mx.google.com with ESMTP id 7si15933690yxg.2.2009.01.14.08.22.27;
Wed, 14 Jan 2009 08:22:27 -0800 (PST)
Received-SPF: pass (google.com: domain of agda...@gmail.com designates 18.104.22.168 as permitted sender) client-ip=22.214.171.124;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of agda...@gmail.com designates 126.96.36.199 as permitted sender) smtp.mail=agda...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by qw-out-2122.google.com with SMTP id 9so134011qwb.13
for <email@example.com>; Wed, 14 Jan 2009 08:22:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
DomainKey-Signature: a=rsa-sha1; c=nofws;
Content-Type: text/plain; charset=ISO-8859-1
Received: by 10.214.215.3 with SMTP id n3mr399670qag.243.1231950146675; Wed,
14 Jan 2009 08:22:26 -0800 (PST)
Date: Wed, 14 Jan 2009 11:22:26 -0500
Subject: Re: [SubjectsPlus] Re: simple search for users
From: Andrew Darby <agda...@gmail.com>
I was just tidying up that search.php page I linked to yesterday.
I've put the file in the Files section of the google groups,
search.php. This file would go in the root of the subjects folder.
You should be able to put a search box anywhere on the site, so long
as your form action points to search.php and your search term field
has a name of "searchterm". You can also use a get parameter, i.e.,
Note that the search right now is in the form wilcard - searchterm -
wildcard, so searching "auto" would turn up the word auto as well as
automobile and zauto (if zauto were a word). A stricter match is
commented out above the query (variable $q); you could swap this in if
that works better for you.
Finally, I've got the descriptions hidden, and then revealed by a bit
of jquery magic. If you want the descriptions always showing, find
<span style=\"display: none;\" class=\"toggle\">
and change the style to "display: block;"
and then if you don't want the jquery, you can delete all the stuff at
the bottom of the file. I hope this works for you. Let me know if
anything's unclear or if anything doesn't work properly. I'm going to
include this search.php in the upcoming version 0.8 of subsplus.
Oh. This page also has a little red star for a bullet--I've uploaded
that, too. bullet2.png. It would go in subjects/images/
On Wed, Jan 14, 2009 at 10:50 AM, Reed, Jr., Dennis
> Hi Andrew,
> Thanks for the response, and thanks for developing this great "product"!
> I want to plop this title+text search onto display.php, so a user may do
> either from the same page. I tried to just add the admin search code to the
> display.php page (updating relative URLs of course), but I am really not
> swift enough with the PHP to carry it off properly (got undefined function:
> dbCall error, and the native search stopped working!).
> Should it be easier to take the search code from databases.php and add it to
> On 1/13/09 2:53 PM, "Andrew Darby" <agda...@gmail.com> wrote:
>> Hi Dennis,
>> Something similar is being done with the databases.php page. I've
>> mocked something up quickly here:
>> It searches the title and description fields of the title table.
>> Is this what you had in mind? (It might be good to also have, say in
>> the sidebar, a list of related subject guides.) I still need to tidy
>> this up (all the icons aren't working correctly, and ditto the print
>> links). Any other ideas?
>> I can share the code once it's tidied up, and I guess I'll include a
>> search page in the upcoming version 0.8.
>> By the way, I like your splash page, it's nicely organized.