PDA

View Full Version : Miscellaneous Hacks - Forum-wide Search For Unanswered Threads


Mosh
02-07-2008, 10:00 PM
Hack Support

This hack is now discontinued - this means that while it will remain available for download and use, there will be no further updates, nor will support be provided as the thread is no longer monitored. You can now check out the 3.8.x version of this hack, as it also works with v3.7.5, v3.6.12 (and maybe even earlier versions).

Please click Mark as Installed if you are using this hack.


vBulletin Version Compatibility

This hack can be used with v3.6.10 and v3.7.x. This has not been tested with earlier versions of v3.6.x, but should work.


What Does This Hack Do?

This is an hack adds an extra option to the Search drop down list on the nav bar which allows you to search for unanswered threads forum-wide, apart from the forums you choose to exclude from the search.

This hack was created as a result of a request from Boofo - see here (https://vborg.vbsupport.ru/showpost.php?p=1438354&postcount=3).

There are no file or template changes at all, and is fully phrased.

AdminCP settings for this hack available in vBulletin Options > Forum-wide Search For Unanswered Threads.
Settings that can be changed are:

Usergroup permissions - which groups will be able to see the Unanswered Threads link (no usergroups can use this by default)
Exclude Forums - list of forums to exclude from the search for unanswered threads
Turn off cached results - enable/disable


Installation Instructions

Import ms_search_all_unanswered.xml into vB using the AdminCP Product Manager. If upgrading then set Allow Overwrite to Yes.
Alter the settings in the Admin CP vBulletin Options to your liking.


Uninstall Instructions

Uninstall the product in vB using the AdminCP Product Manager.



Version History

v3.7.006 - Friday 29th August 2008
-- Final Release
-- Changed: Check boxes now for usergroup selection, instead of needing comma separated numbers
-- Changed: Screenshots
-- Added: New plugin, for processing usergroup permissions

v3.7.005 - Saturday 26th July 2008
-- Changed: Removed dependency, now works with v3.6.10

v3.7.004 - Thursday 17th July 2008
-- Changed: Total code rewrite
-- Changed: AdminCP exclude forums option to allow up to 254 characters on the line

v3.7.003 - Wednesday 25th June 2008
-- Added: AdminCP option to display to all usergroups

v3.7.002 - Sunday 11th May 2008
-- Changed: Version numbering
-- Added: AdminCP Options input validation
-- Added: vBAdvanced support

v1.0.0 - Friday 8th February 2008
-- Initial v3.7.x Release


Show Your Appreciation

Although not required, if you have enjoyed the benefits of this hack, and would like show your appreciation for my efforts, then please feel free to click on the Support Developer link and donate any amount you feel is appropriate.


Donations

I would like to thank the following people for their kind donations:

jilly (https://vborg.vbsupport.ru/member.php?u=17582)
wmlvb (https://vborg.vbsupport.ru/member.php?u=253415)

Boofo
02-07-2008, 10:12 PM
Thank you, sir. ;)

Mosh
02-07-2008, 10:37 PM
Thank you, sir. ;)
No worries mate :)

ChurchMedia
02-07-2008, 10:53 PM
*installed* Thanks for the cool hack! I have a custom navbar so I altered the code to make it work for me. I changed the plugin code to:

$fwsfut_groups = explode(',',$vbulletin->options['fwsfut_grps']);

if (is_member_of($vbulletin->userinfo,$fwsfut_groups))
{
$unanswered = '<a href="search.php?'.$session['sessionurl'].'do=process&replyless=1&replylimit=0&exclude='.$vbulletin->options['fwsfut_exclude_forums'].'&nocache='.$vbulletin->options['fwsfut_cache_enable'].'">'.$vbphrase['forum_wide_unanswered'].'</a>';
}

(let me know if you want me to delete this)

This way I could just insert the $unanswered variable where I needed the link to be.

Thanks again! :)

Mosh
02-07-2008, 11:01 PM
*installed* Thanks for the cool hack! I have a custom navbar so I altered the code to make it work for me. I changed the plugin code to:

$fwsfut_groups = explode(',',$vbulletin->options['fwsfut_grps']);

if (is_member_of($vbulletin->userinfo,$fwsfut_groups))
{
$unanswered = '<a href="search.php?'.$session['sessionurl'].'do=process&replyless=1&replylimit=0&exclude='.$vbulletin->options['fwsfut_exclude_forums'].'&nocache='.$vbulletin->options['fwsfut_cache_enable'].'">'.$vbphrase['forum_wide_unanswered'].'</a>';
}

(let me know if you want me to delete this)

This way I could just insert the $unanswered variable where I needed the link to be.

Thanks again! :)
No need to delete it, other people may have a custom navbar, they may want to use it.

Thanks for sharing :)

jilly
02-10-2008, 10:58 PM
Can you let all usergroups use it be default by removing the zero?

jilly
02-10-2008, 11:00 PM
if a user does not have permission to view a forum, will a zero response post still show up in their search?

Mosh
02-11-2008, 04:52 AM
Can you let all usergroups use it be default by removing the zero?
No, unfortunately not, having the zero basically blocks everyone. You will have to add every usergroup you want to see the link.

if a user does not have permission to view a forum, will a zero response post still show up in their search?
No, it will not, forum permissions still apply :)

If the user is in a usergroup that does not have permissions to see a forum, then unanswered threads from that forum will not show up for that user.

jilly
02-11-2008, 11:25 PM
I can't tell you how helpful this mod is for me!! Great job!!

Mosh
02-12-2008, 04:18 AM
I can't tell you how helpful this mod is for me!! Great job!!
You are more than welcome :)

Paprika
03-04-2008, 04:56 PM
My drop-down only appears under "Search this Forum" but not also under "Search" on the top nav bar.
Is this correct behavior of the mod?

Thanks

Mosh
03-04-2008, 11:07 PM
My drop-down only appears under "Search this Forum" but not also under "Search" on the top nav bar.
Is this correct behavior of the mod?

Thanks
That is because you are actually using my Search For Unanswered Threads By Forum hack, I can see that you have not downloaded this hack, and it is the correct behaviour for that hack.

Also this hack uses a template hook that is associated with the search drop down menu in the navbar, so it is impossible that this hack would show under Search this Forum (unless someone moved the template hook to that location and changed the plugin location), and in closing, that means that you are using my Search For Unanswered Threads By Forum hack and not this one.

Btw, click Mark as Installed in my Search For Unanswered Threads By Forum hack thread please.

KURTZ
03-05-2008, 06:49 AM
niceone!

Pamela
03-13-2008, 09:06 PM
*Clicks install*

Works perfectly! Thanks! :)

One question though...does anyone know how to make it NOT show stickies in the search results? Thanks!!!

faisaly.com
03-14-2008, 03:11 AM
Thanks!!!

Mosh
03-14-2008, 04:31 AM
*Clicks install*

Works perfectly! Thanks! :)

One question though...does anyone know how to make it NOT show stickies in the search results? Thanks!!!
That is a good point Pamela, a lot of stickied threads would not contain any replies and likely be closed as well. I will actually look at that :)

1
EDIT: I had a quick look at how the search.php works and it does not take into account either stickies or closed threads, so this will require extra plug ins, editing of the core files or if any query hooks are available in the correct places I may be able to extend a query or 2 to make it take that into account.

So, I may look into it at some point in the next few weeks and try to add it, but not right now.

Pamela
03-14-2008, 07:27 AM
That is a good point Pamela, a lot of stickied threads would not contain any replies and likely be closed as well. I will actually look at that :)

1
EDIT: I had a quick look at how the search.php works and it does not take into account either stickies or closed threads, so this will require extra plug ins, editing of the core files or if any query hooks are available in the correct places I may be able to extend a query or 2 to make it take that into account.

So, I may look into it at some point in the next few weeks and try to add it, but not right now.

Oh wonderful! I'm glad to hear that this may be an addition in the future. That would be SOOOO helpful! :D

Allan
04-08-2008, 06:52 AM
Don't work with vB 3.6.8 for example ?

Mosh
04-10-2008, 10:02 PM
Don't work with vB 3.6.8 for example ?
This hack can only be used with vBulletin v3.7.x.
No it does not, and if you read the first post you would notice that it says that already.

This hack uses template hooks which are not available in v3.6.x as far as I know.

geckofrog
04-22-2008, 04:00 PM
Is there a link we can use for custom headers or like a variable?

Mosh
04-22-2008, 08:50 PM
Is there a link we can use for custom headers or like a variable?
Check out post #4 of this thread. That should fix you up :)

odeezie
05-06-2008, 03:07 PM
First of all, excellent work and thank you! :D

Is there a way to include a few more searches? I had a user request View unanswered threads, threads you've started, and you're own posts, like the old hack in this thread https://vborg.vbsupport.ru/showthread.php?t=66768

Could those other searches be added to the search drop down menu too?

Thank You for your time,

Brad

Mosh
05-07-2008, 01:50 AM
First of all, excellent work and thank you! :D

Is there a way to include a few more searches? I had a user request View unanswered threads, threads you've started, and you're own posts, like the old hack in this thread https://vborg.vbsupport.ru/showthread.php?t=66768

Could those other searches be added to the search drop down menu too?

Thank You for your time,

Brad
That should not be too hard to do, but I would release it as a separate hack rather than change this one, as it is just for unanswered threads.

I should be able to knock it up in the next hour or so, so, keep an eye out for the release.

odeezie
05-07-2008, 02:05 AM
That should not be too hard to do, but I would release it as a separate hack rather than change this one, as it is just for unanswered threads.

I should be able to knock it up in the next hour or so, so, keep an eye out for the release.

Really!? In an hour!!

I will keep an eye out and I cannot thank you enough!! :up:
Will you be putting those right in the search drop-down menu too?

Thanks again!

Mosh
05-07-2008, 02:12 AM
Really!? In an hour!!

I will keep an eye out and I cannot thank you enough!! :up:
Will you be putting those right in the search drop-down menu too?

Thanks again!
Yep :)

All done :)

Check out the View Your Posts/Threads from Navbar Search hack.

Mosh
05-10-2008, 01:21 PM
Update: v3.7.002


Version number change
AdminCP Options validation
Works with vBAdvanced

jilly
05-10-2008, 02:01 PM
the xml in this thread is now called ms_view_own_posts_threads.xml - is this a mistake? cause the view own posts is a separate brand new one you just did, correct?

Mosh
05-10-2008, 09:51 PM
the xml in this thread is now called ms_view_own_posts_threads.xml - is this a mistake? cause the view own posts is a separate brand new one you just did, correct?
You are correct.......Doh!!!!!

Fixed up :rolleyes:

fukdawrld
06-14-2008, 12:38 PM
*installed* Thanks for the cool hack! I have a custom navbar so I altered the code to make it work for me. I changed the plugin code to:

$fwsfut_groups = explode(',',$vbulletin->options['fwsfut_grps']);

if (is_member_of($vbulletin->userinfo,$fwsfut_groups))
{
$unanswered = '<a href="search.php?'.$session['sessionurl'].'do=process&replyless=1&replylimit=0&exclude='.$vbulletin->options['fwsfut_exclude_forums'].'&nocache='.$vbulletin->options['fwsfut_cache_enable'].'">'.$vbphrase['forum_wide_unanswered'].'</a>';
}

(let me know if you want me to delete this)

This way I could just insert the $unanswered variable where I needed the link to be.

Thanks again! :)

how do i add this i have a custom navbar my self ..just open the xml and add or replace could someone give me step by step like i am 6

BigDog56
06-18-2008, 01:13 AM
Works great! Thank you!

Mosh
06-25-2008, 07:56 AM
Update: v3.7.003


Added option to show to all usergroups

ShackMaster
07-16-2008, 02:32 PM
In AdminCP/vBOptions:

Forums To Exclude From Search
Comma separated list of forumids to exclude from the search for unanswered threads. Use Zero (0) to not exclude any forums.
Example: 1,9,27,72

I entered:

1,4,5,6,19,20,22,24,26,31,39,40,45,76,96,111,114,1 26,128,152,153,158,159,177,178,179,181,182,183,184 ,185,186,190,193

I get the following:

Error:
You did not enter a valid value for this setting.

I can accept it anyway, but there is no reason to get the error that I can see.

Mosh
07-16-2008, 10:03 PM
In AdminCP/vBOptions:

Forums To Exclude From Search
Comma separated list of forumids to exclude from the search for unanswered threads. Use Zero (0) to not exclude any forums.
Example: 1,9,27,72

I entered:



I get the following:



I can accept it anyway, but there is no reason to get the error that I can see.

There are 2 reasons why it is displayed, both to do with input validation:

There is a space between 178 and the ,
The total length of the line with excluding forums is over 99


I can fix the second, you can fix the first :)

Mosh
07-16-2008, 10:15 PM
Update: v3.7.004

Changed: Total code rewrite
Changed: AdminCP exclude forums option to allow up to 254 characters on the line

ShackMaster
07-17-2008, 01:41 AM
Thanks! It is now fixed!

There was actually no space above... that was the text wrapping, but none the less, there are no more errors.

Again... many thanks! Great mod!

Mosh
07-17-2008, 01:44 AM
Thanks! It is now fixed!

There was actually no space above... that was the text wrapping, but none the less, there are no more errors.

Again... many thanks! Great mod!
You are most welcome :)

Mosh
07-26-2008, 08:02 AM
Update: v3.7.005 - Saturday 26th July 2008
-- Changed: Removed dependency, now works with v3.6.10

NOTE: If already installed on v3.7.x, then there is no need to update to this version, as there are no functional changes. This is only for new installations, it now caters for v3.6.10 as well as v3.7.x.

polgara_j
08-04-2008, 05:42 AM
*installed* Thanks for the cool hack! I have a custom navbar so I altered the code to make it work for me. I changed the plugin code to:

$fwsfut_groups = explode(',',$vbulletin->options['fwsfut_grps']);

if (is_member_of($vbulletin->userinfo,$fwsfut_groups))
{
$unanswered = '<a href="search.php?'.$session['sessionurl'].'do=process&replyless=1&replylimit=0&exclude='.$vbulletin->options['fwsfut_exclude_forums'].'&nocache='.$vbulletin->options['fwsfut_cache_enable'].'">'.$vbphrase['forum_wide_unanswered'].'</a>';
}

(let me know if you want me to delete this)

This way I could just insert the $unanswered variable where I needed the link to be.

Thanks again! :)

Where in the xml would you add this? I'm new to the whole coding thing ;)

Mosh
08-04-2008, 11:39 AM
Where in the xml would you add this? I'm new to the whole coding thing ;)
That will probably not work anymore, as I have totally re-wrote the hack a couple of weeks ago.

wmlvb
08-12-2008, 11:55 AM
I was wondering if I give permission for certain user groups to sue this will they see unanswered thread of board they are not allowed to see?

Mosh
08-12-2008, 12:03 PM
I was wondering if I give permission for certain user groups to sue this will they see unanswered thread of board they are not allowed to see?
No, they will not, forum permissions still apply :)

If the user is in a usergroup that does not have permissions to see a forum, then unanswered threads from that forum will not show up for that user.

wmlvb
08-12-2008, 12:14 PM
wow that was the quickest reply ever!! Thanks for the prompted answer. On question about installing . This will be my 1st attempt of installing a hack! ( wish me luck!) Do I put in the forum root folder?

Mosh
08-12-2008, 12:18 PM
wow that was the quickest reply ever!! Thanks for the prompted answer. On question about installing . This will be my 1st attempt of installing a hack! ( wish me luck!) Do I put in the forum root folder?
No, just follow the instructions below:


Import ms_search_all_unanswered.xml into vB using the AdminCP Product Manager.
Alter the settings in the Admin CP vBulletin Options to your liking.

wmlvb
08-12-2008, 12:24 PM
oh yea that thing. I remember seeing that the other day. so much back there I forget what is what! Thanks

wmlvb
08-12-2008, 02:31 PM
I have imported now but do not see in vb options. When I imported the only lines I filled out were the title and version and pretty much left everything blank!!

not sure if thats why I am not seeing but anyway. i must be missing something as
it is not showing up. in vb options! Thanks for the help

Mosh
08-12-2008, 08:54 PM
I have imported now but do not see in vb options. When I imported the only lines I filled out were the title and version and pretty much left everything blank!!

not sure if thats why I am not seeing but anyway. i must be missing something as
it is not showing up. in vb options! Thanks for the help
You need to import it, it sounds like you have created a new product.

You need to browse for the xml file, then click import after.

See screen shoot, for example:

Mosh
08-29-2008, 02:27 AM
Update: v3.7.006
-- Changed: Check boxes now for usergroup selection, instead of needing comma separated numbers
-- Changed: Screenshots
-- Added: New plugin, for processing usergroup permissions

Konstantinos
08-29-2008, 06:15 AM
nice mod but u can u make it exclude soft deleted threads ?

Mosh
08-29-2008, 11:24 AM
nice mod but u can u make it exclude soft deleted threads ?

I had a quick look at how the search.php works (which is what this hack calls to show the unanswered threads) and it does not seem to take into account excluding soft deleted threads, so this would probably require extra plug-ins, editing of the core files or if any query hooks are available in the correct places it may be possible to extend a query or 2 to make it take that into account.

But this is a fairly simple hack, so am probably not going look into it. I may change my mind in future if I feel the urge to look into it, but I doubt it.

yamahapaul
08-29-2008, 07:49 PM
just installed, thanks :up:

masterweb
08-30-2008, 03:15 PM
Installed, works fine and fast. Thanks :cool:

prabhgrewal
08-31-2008, 01:47 PM
Great Hack thanks

Super Jinni
09-03-2008, 01:57 PM
thanks for the updates

shot2bits
09-23-2008, 08:46 PM
Installed this and "view your own posts". No errors reported. However, when I try and use the functions from the navbar on my site it says "page not found" - the standard explorer style page not found.

Any ideas? :confused:

Mosh
09-23-2008, 11:03 PM
Installed this and "view your own posts". No errors reported. However, when I try and use the functions from the navbar on my site it says "page not found" - the standard explorer style page not found.

Any ideas? :confused:
Can you please elaborate, i.e. list the steps taken to produce the error and a screenshot of the error.

Does it happen when you use the standard vBulletin style?

Or is it only on custom styles?

I should hopefully be able to help then.

shot2bits
09-24-2008, 07:54 AM
Can you please elaborate, i.e. list the steps taken to produce the error and a screenshot of the error.

Does it happen when you use the standard vBulletin style?

Or is it only on custom styles?

I should hopefully be able to help then.

Basically, select "search" on the navbar, followed by "View all threads started by you" or "View all your posts". As soon as either are selected, explorer goes to HTTP 404 Not Found.. The standard "The webpage cannot be found" error.

I am using the standard template with the most up to date release of VBulletin.

Thanks, Rob.

Mosh
09-24-2008, 08:10 AM
Basically, select "search" on the navbar, followed by "View all threads started by you" or "View all your posts". As soon as either are selected, explorer goes to HTTP 404 Not Found.. The standard "The webpage cannot be found" error.

I am using the standard template with the most up to date release of VBulletin.

Thanks, Rob.
Please PM me the site url and test account details so I can have a quick look at this, as I can not just look at the site without logging in, as it is a members only function.

Mosh
09-24-2008, 08:52 AM
Installed this and "view your own posts". No errors reported. However, when I try and use the functions from the navbar on my site it says "page not found" - the standard explorer style page not found.

Any ideas? :confused:
For some reason your url is showing twice in the links.

Try this, in both the Forum-wide Search For Unanswered Threads (1) and View Your Posts/Threads from Navbar Search (1) plugins, find:

'.$vbulletin->options['bburl'].'

Delete it.

Let me know if that works.

jorgejgm
09-24-2008, 11:03 AM
My forum has news, opinions .... that do not need response But others yes (less)

In the options, ev time of excluded forums there is some way of changing the code for qeu it is included forums?

P.d: Excluding many forums it me does not work

Sorry my english

thanks

Mosh
09-24-2008, 11:10 AM
My forum has news, opinions .... that do not need response But others yes (less)

In the options, ev time of excluded forums there is some way of changing the code for qeu it is included forums?

P.d: Excluding many forums it me does not work

Sorry my english

thanks
search.php only has options to exclude forums, not include forums. You would need to either re-write search.php to do that or a hack is needed that would do the same thing. Both would be probably be pretty hard to do.

jorgejgm
09-24-2008, 11:16 AM
Thank you for the response. Very good hack but not for my :erm:

Mosh
09-25-2008, 06:00 AM
For some reason your url is showing twice in the links.

Try this, in both the Forum-wide Search For Unanswered Threads (1) and View Your Posts/Threads from Navbar Search (1) plugins, find:

'.$vbulletin->options['bburl'].'

Delete it.

Let me know if that works.
Well, after I looked at shot2bits's installation, deleting that did in fact fix it all up for him :)

So, another happy user of this hack :)

Silencer Groans
10-08-2008, 06:22 AM
I will make the product in Arabic if you allow

Mosh
10-08-2008, 07:04 AM
I will make the product in Arabic if you allow
I allow translations of all my hacks, so go right ahead and do an Arabic translation :)

You just need to attach your translation to a post in this thread only (you can not release it as your own release here or on any other site), and I will put a link to it in the first post :)

Mosh
01-08-2009, 07:53 PM
This hack is now discontinued - this means that while it will remain available for download and use, there will be no further updates, nor will support be provided as the thread is no longer monitored. You can now check out the 3.8.x version of this hack, as it also works with v3.7.5, v3.6.12 (and maybe even earlier versions).