StefanVJune 19, 2012 in Feature Suggestions
In 3.2.3 I was able to set minimum search word length to 0 and then access an URL like
to have all posts in reverse chronological order. This page has become the most popular page in my community because it offers an easy way to see what's happening on the forum (much more useful than the default "view new content" function that only shows content grouped by thread).
In 3.3.3 I can't have minimum search term smaller than 4 chars and I can't use that URL anymore. So I'm looking for another solution. Ideally, this would be an option in IPB itself and not a modification, but I doubt that IPS will include this in core if I'm the only one who's asking for it. So I'm asking here to see if there are other people who find this feature useful. And maybe we can also find an workaround for 3.3.3.
The suport team had pointed out that commenting some code in /admin/sources/classes/search/engines/sql.php may allow the old URL to work again. But I've done that and it still doesn't work (I think that the check for empty keywords is in another method). And they can't help me further with this kind of modifications using the support system. The code is
/* remove < min char words */
if ( substr_count( $search_term, '"' ) != 2 )
$_words = explode( ' ', $search_term );
$search_term = '';
foreach( $_words as $_w )
if ( IPSText::mbstrlen( $_w ) >= $this->settings['min_search_word'] )
$search_term .= $_w . ' ';
$removedTerms = $_w;
Although the support team is pointing me to /admin/sources/classes/search/engines/sql.php, I think that the behaviour is actually in /admin/applications/core/modules_public/search/search.php, but I'm not sure yet
I would be interested in this as well.
I wonder how many we need to be in order to have this in core...
doesn't sos33 recent topics and posts mod do this?
maybe I am misunderstanding.
I actually put this one as a bug..
@Dmacleo, it's not the same thing. Go to advanced search, enter some keywords, select 'display results as posts' and then click search to see how the result should be displayed. In 3.2.3 you could just leave the search field empty and the search engine was returning a full list of posts, but in 3.3.3 you always get no results if you don't specify a keyword to search for. The mod you're talking abut just displays a block, isn't it? It's not very usable... The search solution is much more flexible (you can also check Shigure's bug report too see that he's using the same function in a different way).
@Shigure, unfortunately IPS considers the old behaviour to be a bug and they fixed it in this new version. The bug report will probably be closed, but I'll be very glad if I'm wrong with this one... This feature is very important for me too and I would really want to see it back.
I see what you mean now, I was thinking wrong thing.
Finally, after digging in the source code I've found the modification and reactivated empty search queries (they do make sense, @Matt)
In /admin/applications/forums/extensions/search/engines/sql.php you need to search for
/* Search in titles */
/* Removed OR !($search_tags && $this->settings['tags_enabled']) ) as it was allowing a blank search if tags disabled which makes no sense - Matt */
and bellow replace
if ( $search_term )
if ( $search_term || $search_term == '')
I'm very disappointed by the way my request was handled by the IPS support team....
does not seem to work for me but I am using sphinx, so I am looking at that file right now.
It's that an if statment? If yes, you can try something like
if( ($search_tags && $this->settings['tags_enabled']) || $search_tags == '')
But please note that I don't know what side effects this may have.
I'll try to give that a try today and report back.
This topic is now archived and is closed to further replies.
Started November 22
Started October 26
Started 3 hours ago