Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 [Request] Show Unanswered Threads
RR2 Offline
Junior Member
**
Posts: 20
Joined: Jan 2008
Post: #1
[Request] Show Unanswered Threads
I believe Zaher had a mod for this at one time.

If possible (well, I know it is!) could someone make a mod that would search (something like the View New Posts link in the welcome block) that would say Show Unanswered threads? It would search and find the threads with 0 replies.

Thanks, if anyone can do it. Smile

~ RR2
03-18-2008 11:34 PM
Visit this user's website Find all posts by this user
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: [Request] Show Unanswered Threads
You can use this trick:
In inc/functions_search.php
Find and delete:

PHP Code:
	if(!$keywords && !$search['author'])
	{
		error($lang->error_nosearchterms);
	}


This will allow you to perform searches without specifying any keywords or authors.
So now you can just specify a search, saying to return threads/posts with at most, 0 replies.


My Blog
03-19-2008 09:25 AM
Find all posts by this user
RR2 Offline
Junior Member
**
Posts: 20
Joined: Jan 2008
Post: #3
RE: [Request] Show Unanswered Threads
Neat! But can I put a link in the welcome block called View Unanswered Threads using this?

~ RR2
03-19-2008 10:40 AM
Visit this user's website Find all posts by this user
dvb Offline
Junior Member
**
Posts: 11
Joined: Feb 2008
Post: #4
RE: [Request] Show Unanswered Threads
ZiNgA BuRgA Wrote:You can use this trick:
In inc/functions_search.php
Find and delete:

PHP Code:
	if(!$keywords && !$search['author'])
	{
		error($lang->error_nosearchterms);
	}


This will allow you to perform searches without specifying any keywords or authors.
So now you can just specify a search, saying to return threads/posts with at most, 0 replies.

I think a better solution will be to add another condition to the if statement so the if will check that at least one of the three fields (keywords, author, replies) filled.
if you just delete that section I think it'll be problematic, no?
RR2 Wrote:Neat! But can I put a link in the welcome block called View Unanswered Threads using this?
yes you just need to pass the variables

Cocktail Be a fountain, not a drain.
Rex Hudler
User Creativity is a drug I cannot live without.
Cecil B. DeMille
03-19-2008 10:54 AM
Visit this user's website Find all posts by this user
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #5
RE: [Request] Show Unanswered Threads
dvb Wrote:I think a better solution will be to add another condition to the if statement so the if will check that at least one of the three fields (keywords, author, replies) filled.
if you just delete that section I think it'll be problematic, no?
Nope, if you don't supply anything, it'll just return all threads.
I personally think that requiring the user to enter a search term or username there is a little unnecessary...

RR2 Wrote:Neat! But can I put a link in the welcome block called View Unanswered Threads using this?
In search.php find:

PHP Code:
elseif($mybb->input['action'] == "do_search" && $mybb->request_method == "post")

Replace with:

PHP Code:
elseif($mybb->input['action'] == "do_search")


Then you can basically use a link like:

Code:
http://example.com/search.php?action=do_search&findthreadst=2&numreplies=0


My Blog
03-19-2008 11:36 AM
Find all posts by this user

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: