PDA

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


Mosh
07 Feb 2008, 23:05
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 (http://www.vbulletin.org/forum/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 (http://www.vbulletin.org/forum/member.php?u=17582)
wmlvb (http://www.vbulletin.org/forum/member.php?u=253415)

Boofo
07 Feb 2008, 23:12
Thank you, sir. ;)

Mosh
07 Feb 2008, 23:37
Thank you, sir. ;)
No worries mate :)

ChurchMedia
07 Feb 2008, 23:53
*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
08 Feb 2008, 00:01
*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
10 Feb 2008, 23:58
Can you let all usergroups use it be default by removing the zero?

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

Mosh
11 Feb 2008, 05:52
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
12 Feb 2008, 00:25
I can't tell you how helpful this mod is for me!! Great job!!

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

Paprika
04 Mar 2008, 17:56
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
05 Mar 2008, 00:07
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
05 Mar 2008, 07:49
niceone!

Pamela
13 Mar 2008, 22:06
*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
14 Mar 2008, 04:11
Thanks!!!

Mosh
14 Mar 2008, 05:31
*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
14 Mar 2008, 08:27
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
08 Apr 2008, 07:52
Don't work with vB 3.6.8 for example ?

Mosh
10 Apr 2008, 23:02
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
22 Apr 2008, 17:00
Is there a link we can use for custom headers or like a variable?

Mosh
22 Apr 2008, 21:50
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
06 May 2008, 16:07
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 http://www.vbulletin.org/forum/showthread.php?t=66768

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

Thank You for your time,

Brad

Mosh
07 May 2008, 02:50
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 http://www.vbulletin.org/forum/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
07 May 2008, 03:05
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
07 May 2008, 03:12
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
10 May 2008, 14:21
Update: v3.7.002


Version number change
AdminCP Options validation
Works with vBAdvanced

jilly
10 May 2008, 15:01
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
10 May 2008, 22:51
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
14 Jun 2008, 13:38
*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
18 Jun 2008, 02:13
Works great! Thank you!

Mosh
25 Jun 2008, 08:56
Update: v3.7.003


Added option to show to all usergroups

ShackMaster
16 Jul 2008, 15:32
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,126,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
16 Jul 2008, 23:03
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
16 Jul 2008, 23:15
Update: v3.7.004

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

ShackMaster
17 Jul 2008, 02:41
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
17 Jul 2008, 02:44
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
26 Jul 2008, 09:02
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
04 Aug 2008, 06:42
*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
04 Aug 2008, 12:39
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
12 Aug 2008, 12:55
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
12 Aug 2008, 13:03
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
12 Aug 2008, 13:14
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
12 Aug 2008, 13:18
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
12 Aug 2008, 13:24
oh yea that thing. I remember seeing that the other day. so much back there I forget what is what! Thanks

wmlvb
12 Aug 2008, 15:31
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
12 Aug 2008, 21:54
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
29 Aug 2008, 03:27
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
29 Aug 2008, 07:15
nice mod but u can u make it exclude soft deleted threads ?

Mosh
29 Aug 2008, 12:24
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
29 Aug 2008, 20:49
just installed, thanks :up:

masterweb
30 Aug 2008, 16:15
Installed, works fine and fast. Thanks :cool:

prabhgrewal
31 Aug 2008, 14:47
Great Hack thanks

Super Jinni
03 Sep 2008, 14:57
thanks for the updates

shot2bits
23 Sep 2008, 21:46
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
24 Sep 2008, 00:03
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
24 Sep 2008, 08:54
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
24 Sep 2008, 09:10
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
24 Sep 2008, 09:52
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
24 Sep 2008, 12:03
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
24 Sep 2008, 12:10
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
24 Sep 2008, 12:16
Thank you for the response. Very good hack but not for my :erm:

Mosh
25 Sep 2008, 07:00
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
08 Oct 2008, 07:22
I will make the product in Arabic if you allow

Mosh
08 Oct 2008, 08:04
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
08 Jan 2009, 20:53
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).