phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

Searching with GET

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.1/Ascreaus followed by 3.2/Arsia.

Searching with GET

Postby naim » Mon Mar 19, 2012 11:10 pm

When searching something on a phpBB forum, you are currently sending a POST request.
Why not search with a GET request with the query in the url (ex. http://example.com/phpbb/search.php?q=hello%20world) - just like any search engine.
This way you will be able to make it easier for people to change their searches (sometimes i just modify the url directly instead of resubmitting...)
And people will be able to search your site directly from their browsers...

-> http://<domain>/phpbb/search.php?q={query}
User avatar
naim
Registered User
 
Posts: 44
Joined: Thu Oct 13, 2011 7:21 pm
Location: Isolation

Re: Searching with GET

Postby Dragosvr92 » Mon Mar 19, 2012 11:30 pm

Interesting idea, but you might want to take care of the SEO detail, as the bots will tend to cache the search page, with each get variable.
Sooo.. add a index no follow for the search page, maybe.
Previous username: TheKiller
Avatar on Memberlist 1.0.3
User avatar
Dragosvr92
Registered User
 
Posts: 358
Joined: Tue May 31, 2011 12:08 pm
Location: Romania

Re: Searching with GET

Postby /a3 » Mon Mar 19, 2012 11:34 pm

TheKiller wrote:Interesting idea, but you might want to take care of the SEO detail, as the bots will tend to cache the search page, with each get variable.

Use robots.txt.
/a3
Registered User
 
Posts: 97
Joined: Mon Sep 20, 2010 6:44 am

Re: Searching with GET

Postby A_Jelly_Doughnut » Tue Mar 20, 2012 12:15 am

Please be more specific. search.php processes get requests without any problems, and in fact the form at search.php already uses method=get
A_Jelly_Doughnut
User avatar
A_Jelly_Doughnut
MOD Team
MOD Team
 
Posts: 1751
Joined: Wed Jun 04, 2003 4:23 pm

Re: Searching with GET

Postby nickvergessen » Tue Mar 20, 2012 12:16 am

Only quick-search (Includes search on viewforum and viewtopic) use get
cheers nickvergessen :geek:
Member of phpBB Development-Team
No Support via PM — My MODs for phpBB 3.0.x
User avatar
nickvergessen
Development Team
Development Team
 
Posts: 350
Joined: Sun Oct 07, 2007 11:54 am
Location: Esslingen, Germany

Re: Searching with GET

Postby A_Jelly_Doughnut » Tue Mar 20, 2012 12:27 am

nickvergessen wrote:Only quick-search (Includes search on viewforum and viewtopic) use get


Not on this board... quoting from the source of search.php as generated on area51

Code: Select all
<h2 class="solo">Search</h2>

<form method="get" action="./search.php">

<div class="panel">
   <div class="inner"><span class="corners-top"><span></span></span>
   <h3>Search query</h3>
A_Jelly_Doughnut
User avatar
A_Jelly_Doughnut
MOD Team
MOD Team
 
Posts: 1751
Joined: Wed Jun 04, 2003 4:23 pm

Re: Searching with GET

Postby nickvergessen » Tue Mar 20, 2012 12:33 am

Well atleast the quick search is ;) sorry screwed the other one up
cheers nickvergessen :geek:
Member of phpBB Development-Team
No Support via PM — My MODs for phpBB 3.0.x
User avatar
nickvergessen
Development Team
Development Team
 
Posts: 350
Joined: Sun Oct 07, 2007 11:54 am
Location: Esslingen, Germany

Re: Searching with GET

Postby imkingdavid » Tue Mar 20, 2012 12:43 am

Click Advanced Search at the top (next to the Search box). Type in "test". See the URL:
Code: Select all
http://area51.phpbb.com/phpBB/search.php?keywords=test&terms=all&author=&sc=1&sf=all&sr=posts&sk=t&sd=d&st=0&ch=300&t=0&submit=Search

Really, afaik, only the search box at the top of this board does it via $_POST.
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.
User avatar
imkingdavid
Development Team
Development Team
 
Posts: 901
Joined: Thu Jul 30, 2009 12:06 pm

Re: Searching with GET

Postby Oleg » Tue Mar 20, 2012 12:57 am

We should be using GET on search forms everywhere it makes sense. There was http://tracker.phpbb.com/browse/PHPBB3-7057 which appears to had been fixed.
Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: Searching with GET

Postby MichaelC » Tue Mar 20, 2012 6:31 am

Also from some quick testing 'Search these results' uses POST.
Unknown Bliss
psoTFX wrote:I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"

No unsolicited PMs please except for quotes.
User avatar
MichaelC
Website Team
Website Team
 
Posts: 797
Joined: Thu Jan 28, 2010 6:29 pm

Next

Return to [3.x] Discussion

Who is online

Users browsing this forum: No registered users and 14 guests

cron