ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Which template does the forum use for the "no search results found" page?

January 04, 2012 4:33pm

Subscribe [2]
  • #1 / Jan 04, 2012 4:33pm

    glenndavisgroup

    436 posts

    I’ve tried all the template files in the “themes > forum_themes > default > forum_search” folder but I can’t seem to figure out which template is being used for the forum “no search results found” page. Any help is appreciated.

    Thank you,

    Mike

  • #2 / Jan 05, 2012 10:23am

    glenndavisgroup

    436 posts

    Ok, I ran some tests and not sure why the following code is being redirected to the error page rather than the forums no results page:

    <html>
    <body>
    <script>
    function searchForum()
    {
     var forums = document.createElement('form');
     var inputkeywords = document.createElement('input');
     var inputXID = document.createElement('input');
     var inputboardid = document.createElement('input');
     var inputsiteid = document.createElement('input');
     
     forums.setAttribute('action', '/forums/do_search/');
     forums.setAttribute('method', 'post');
     inputkeywords.setAttribute('type', 'text');
     inputkeywords.setAttribute('name', 'keywords');
     inputkeywords.setAttribute('value', '{segment_3}');
     inputXID.setAttribute('type', 'text');
     inputXID.setAttribute('name', 'XID');
     inputXID.setAttribute('value', '{XID_HASH}');
     inputboardid.setAttribute('type', 'text');
     inputboardid.setAttribute('name', 'board_id');
     inputboardid.setAttribute('value', '1');
     inputsiteid.setAttribute('type', 'text');
     inputsiteid.setAttribute('name', 'site_id');
     inputsiteid.setAttribute('value', '{site_id}');
     forums.appendChild(inputkeywords);
     forums.appendChild(inputXID);
     forums.appendChild(inputboardid);
     forums.appendChild(inputsiteid);
     document.body.appendChild(forums);
     forums.submit();        
    }  
    searchForum();
    </script>
    </body>
    </html>

    I’m basically trying to run the same type of search method used here on the EE forums website. Am I doing something wrong?

    Thank you,

    Mike

  • #3 / Jan 05, 2012 3:09pm

    Kevin Smith

    4784 posts

    Hey Mike,

    I’m not sure you’re doing anything wrong here, Mike. If your search in the forum returns no results, then EE just displays the usual error page (not a forum-specific error page) just like you’re experiencing. I suspect the template you found, no_search_result.html, is an artifact from a time when the forum used its own no results page. Let me check with one of the devs to see if that is indeed the case.

  • #4 / Jan 06, 2012 12:50pm

    glenndavisgroup

    436 posts

    Hi Kevin,

    Thanks for the reply. I’m glad you clarified that cause I was pulling my hair out trying to figure out why the no results page wasn’t displaying. I think the EE devs need to allow the user to setup their own templates/pages rather than having everything go through the one Error/Msg page. The problem is you can’t even do much with that page in terms of customization etc. besides what is already in there. It’s a very strange setup compared to how other CMS’s work. I wish they would consider making that change in a future release.

    Thank you,

    Mike

  • #5 / Jan 06, 2012 4:43pm

    Kevin Smith

    4784 posts

    Thanks for the feedback on that, Mike. Would you care to add that to the Feature Request forum so that our devs can see it?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases