• skeen

    (@skeen)


    Hello!
    This is my second hack! It displays the text: “You searched for [search string]” when someone searches your blog. Its another extremely simple hack, by skeen! ??
    you searched for…
    Put this code where you want the text to be displayed:
    <? if($s) { print "<i>You searched for \"$s\"...</i>"; } ?>
    ARGHHH! Why wont the code display properly on this forum?

Viewing 5 replies - 1 through 5 (of 5 total)
  • codergurl

    (@codergurl)

    <?php if ($s) { echo 'You searched for '.$s; } ?>

    jackiefg

    (@jackiefg)

    That worked great – and simply. I just put the code at the top of my index.php page and then when I search it adds that message to the top.
    Thanks very much. I love adding these little ‘tweaks’.

    Thread Starter skeen

    (@skeen)

    Glad you liked it.
    Thanks codegurl!
    One other suggestion is to also put the code in the title tags.

    What would be really good is that if the result of the search returned no results instead of the blank boring page with no content a message saying _____ could not be found. And then the search feild again so you can research.
    MWP
    Coming Jan 2004

    Thread Starter skeen

    (@skeen)

    marzar00… I believe the CVS version has a message saying, “Sorry, no posts matched your search criteria” — so this is yet to be released.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘You searched for…’ is closed to new replies.