Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    search result display page modification

    HI, I am new to this php coding forum. i have a bit of code that i want help with.

    I am attaching the searchtemplate.php file here. I have to do change so that when the search results are displayed, if the user has not found what he was searching for, he must be greeted with a message in html. Suppose i was searching for "mango" if i dont get mango, i will be told at search results display page to redefine search(as usually it is). What i want is to display a message too when user searches through a search box ( the code of which I am writng here). I have been asked to modify results function in searchtemplate.php . I have not figured it out yet.

    I am complete novice in php. NAy guidance or help is appreciated. If anybody can just help me out where should i make a modification.

    TIA

    code of the search box that user searches through
    echo '<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
    <div class="sp_center">
    <input type="text" name="search" value="" class="sp_search" /><br /><br />
    <input type="submit" name="submit" value="Search" />
    <input type="hidden" name="advanced" value="0" />
    <input type="hidden" name="brd[2]" value="2" />';


    for the code..

    it is a php block of code that i use to display a search box to the users to search through a particular board. brd[2] and the value="2" are for the respective board. (board is just same as sub forum in your forum)

    i have attached the searchtemplate too.

    It is in .txt format
    Attached Files Attached Files


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •