Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re^2: Super Search discouraged?

by naikonta (Curate)
on May 20, 2007 at 11:42 UTC ( #616427=note: print w/replies, xml ) Need Help??

in reply to Re: Super Search discouraged?
in thread Super Search discouraged?

This got me thinking if in some way the Super Search can be implemented as nodelet so one is opt to put it permanently on the side bar via Nodelet Settings.

Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Replies are listed 'Best First'.
Re^3: Super Search discouraged?
by jdporter (Canon) on May 21, 2007 at 14:39 UTC

    That's not such a good idea. The content of Super Search (the page) is pretty huge. If we put it in a nodelet, it would be by far the largest nodelet around. Nodelets are supposed to be small. Besides, Super Search is never more than a single mouse click away.

    Looking at it from another angle, there's nothing in the content of Super Search (the page) that requires special handling on the server side; it's just a generic form. That means you could easily make your own "mini-SuperSearch" form in your Free Nodelet, with just the fields you want. See below for an example.

    A word spoken in Mind will reach its own level, in the objective world, by its own weight

      In response to a suggestion that there should be a Super Search nodelet, I offer the following: a customizable mini-SuperSearch form for your Free Nodelet.

      This is just an example. You can (and should) decide for yourself which fields you want to hard-code (using inputs of type hidden), and which fields you want to let yourself enter values for. (The remainder will get their defaults as defined by Super Search.)

      <form method="post" action="?" enctype="application/x-www-form-urlencoded"> <input type="hidden" name="node" value="3989" /> Author:<input type="text" name="a" size=20 value="`author_title`"/><!- +-"--> <br/> Title:<input type="text" name="HIT" size=20 value="`title`"/><!--"--> Sep:<input type="text" name="HIS" size=2 value=" " /> <br/> Search only in/under `root_type_title`: <input name="`root_ss_type`" value="1" type="checkbox"> <br/> Replies: <input name="re" value="A" type="radio" /> All <input name="re" value="S" type="radio" checked="checked" /> Section <input name="re" value="N" type="radio" /> None <br/> <input type="submit" name="go" value="Search" /> </form>

      This is pretty cool, because it uses Free Nodelet macros to determine the type of the current thread's root node (replies are simply type 'note', regardless of section) . The mini Super Search form is pre-loaded with that and other relevant values from the current node: the author and the title. You can delete/edit these values as you like before clicking the submit button. If you decide you need more flexibility than this (or than you can hack in your Free Nodelet), then... you know where to find it. :-)

      For extra coolness, use the Fake a Nodelet technique to make your Mini Super Search look like a genuine nodelet!

      A word spoken in Mind will reach its own level, in the objective world, by its own weight

        Scenario: You want to make your own nodelet which behaves exactly like a real nodelet, to contain certain custom content. (We'll call this content B, for Body.)

        Solution: Edit your Free Nodelet and duplicate the same form of "separator" html which occurs between actual nodelets.

        Implementation: View the html source and see what stuff goes between each nodelet. (We'll call this stuff H, for Header.) Put B at the bottom of your Free Nodelet, and put H just above it. Be sure to customize the content of H for titles, IDs, etc.

        For example, if you wanted to make a "real" nodelet out of your Mini Super Search form, you could put the following H above the form code:

        </td> </tr> </tbody> <!-- Nodelet Break --> <tbody class="nodelet" id="Mini_Super_Search"> <tr class="nodelet_head_row" id="nodelet_head_row_Mini_Super_Sea +rch"> <th class="nodehead"> Mini Super Search </th> </tr> <tr class="nodelet_body_row" id="nodelet_body_row_Mini_Super_Sea +rch"> <td class="nodebody">

        PS — If you set "display nodelets as div" in your Display Settings, you will have to adjust the above to reflect the use of div rather than table/tr/td.

        A word spoken in Mind will reach its own level, in the objective world, by its own weight
        Creating personal SS does make sense of course. I think I can expand this. Thanks jdporter, for providing some kind of a work base.

        Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://616427]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2018-06-21 18:33 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (118 votes). Check out past polls.