PDA

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


Mosh
01-07-2009, 10:00 PM
Please click Mark as Installed if you are using this hack.


What Does This Hack Do?hr
This is an update to my 3.7.x version of this hack, with the addition of navbar placement via AdminCP Options.

This is a hack adds an extra option to the Search drop down list on the navbar, or on the navbar itself (left hand side or ride hand side) which allows you to search for unanswered threads forum-wide, apart from the forums you choose to exclude from the search.

This hack was originally created as a result of a request from Boofo in 2008 - 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:

Exclude Forums - list of forums to exclude from the search for unanswered threads
Turn off cached results - enable/disable
Automatic Link Creation - location link will be added


vBulletin Version Compatibilityhr
This hack can be used with vBulletin versions 3.6.0 - 3.8.8.

For the v4.0.4 version of this hack - check here.


Hack Support/Feature Requestshr
IMPORTANT: This hack is no longer supported.


Install Instructionshr

Unzip ms_search_all_unanswered_38.zip
Upload bitfield_ms_search_all_unanswered.xml to your /includes/xml folder.If upgrading from an earlier version, then overwrite the previous copy.
Import the ms_search_all_unanswered_38.xml into vB using the AdminCP Product Manager. If upgrading from an earlier version, then set Allow Overwrite to Yes.
In the Usergroup Manager edit the usergroup(s) you want:

To see the Unanswered Threads link (disabled by default for all usergroups).



Uninstall Instructionshr

Delete the bitfield_ms_search_all_unanswered.xml file from your /includes/xml folder.
Uninstall the product in vB using the AdminCP Product Manager.


Screenshotshr
Shown in this order:

Link on Search Forums Menu
AdminCP Options
Usergroup Permissions
Link on navbar (left hand side)
Link on navbar (right hand side)


Version Historyhr
v3.8.002 - Tuesday 23rd June 2009
-- Final v3.8.x Release
-- Added: AdminCP Option to allow for Unanswered Threads link to be placed in different places on the navbar

v3.8.001 - Friday 9th January 2009
-- Initial v3.8.x Release


Thankshr
Thanks go out to Paul M who gave me permission to use some of his install code.


Show Your Appreciationhr
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.


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

adwade (https://vborg.vbsupport.ru/member.php?u=154797)

Sweeks
01-08-2009, 08:37 PM
Installed 3.7.4 PL1 :D
________
Xxx free (http://www.++++tube.com/)

RoughOcean
01-16-2009, 08:03 PM
Installed, but confused.
The description says "This is a 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."

It doesn't add it to the nav bar though, it adds the option to the Search this Forum drop down above each forum.

I'm upgrading from a previous version which I think did put it in the nav bar.
I would rather have it in the nav bar and search Unanswered Threads for my entire forum.

So....my confusion is; did I install the wrong version, or is the description off?

Mosh
01-17-2009, 03:56 AM
Installed, but confused.
The description says "This is a 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."

It doesn't add it to the nav bar though, it adds the option to the Search this Forum drop down above each forum.

I'm upgrading from a previous version which I think did put it in the nav bar.
I would rather have it in the nav bar and search Unanswered Threads for my entire forum.

So....my confusion is; did I install the wrong version, or is the description off?
You are probably confusing my Search For Unanswered Threads By Forum hack with this one, as that one does what you describe, and this one does the same, but in the Navbar and for all forums.

RoughOcean
01-17-2009, 12:46 PM
Thanks. It does appear I was getting the two mixed up. This is the one I wanted and it is working correctly. Thanks for a great mod!

cash7c3
01-17-2009, 04:27 PM
What is the direct link for the search call? We do not use the default search on our install, and so don't have the search option visible on forumhome - which means the link to search for unanswered posts doesn't show up either. I could bookmark it direct though if I knew the URL.

cash7c3
01-17-2009, 07:07 PM
Found it:

search.php?do=process&replyless=1&replylimit=0&exclude=

Mosh
01-17-2009, 07:08 PM
What is the direct link for the search call? We do not use the default search on our install, and so don't have the search option visible on forumhome - which means the link to search for unanswered posts doesn't show up either. I could bookmark it direct though if I knew the URL.
It would be something along the lines of:
http://YOUR-FORUM-URL/search.php?do=process&replyless=1&replylimit=0&nocache=1

tommac3
01-28-2009, 12:29 AM
Can I ignore some forums from the list of unanswered posts? I have 3 rss feeds on my site and I do not want to include them in my unanswered posts.

I installed:
http://www.vbulletin.com/forum/showthread.php?t=172811

for the new posts ... but I would like to install it for the unanswered posts

tommac3
01-28-2009, 09:33 PM
Can someone tell me if I can change a query somewhere to exclude certain forums so that they dont show up in the unanswered posts? It seems that most rss articles never get answered ... so these almost always show up. I think that this mod is better suited to list all of the new posts that havent been addressed ... Also you may have forums where one person is doing all of the posting those would also always show up.

ezak
01-29-2009, 02:30 PM
It would be something along the lines of:
http://YOUR-FORUM-URL/search.php?do=process&replyless=1&replylimit=0&nocache=1

that hack not work with me, but your code is working well with me
but I want to know , how to specific forum in the search
I tried &forumchoice=10 , &f=10 but no luck

PLZ told me what to add to make it search in exact forum ID

and thanks

member007
02-08-2009, 03:04 AM
installed but when I try click the search in the navigation bar it logged me off.

Mosh
02-18-2009, 06:50 PM
Can someone tell me if I can change a query somewhere to exclude certain forums so that they dont show up in the unanswered posts? It seems that most rss articles never get answered ... so these almost always show up. I think that this mod is better suited to list all of the new posts that havent been addressed ... Also you may have forums where one person is doing all of the posting those would also always show up.
AdminCP settings for this hack available in vBulletin Options > Forum-wide Search For Unanswered Threads.
Settings that can be changed are:

Exclude Forums - list of forums to exclude from the search for unanswered threads
Turn off cached results - enable/disable

Mosh
02-18-2009, 06:54 PM
installed but when I try click the search in the navigation bar it logged me off.
That has nothing to do with this hack, as nearly 200 sites use this and no one else has this problem (it would have been pointed out before now and fixed).

Alfa1
04-23-2009, 02:39 PM
Under the option 'Forums To Exclude From Search', the following error shows:
Error:You did not enter a valid value for this setting.


I think that this is causing this modification to not work.

My settings are:
125,142,152,156,164,165,166,174,176,190,192,196,20 9,211,212,213,214,215,216,217,218,219,220,221,223, 224,225,226,228,229,233,237,238,239,240,241,242,24 3,244,245,246,247,248,249,250,251,252,253,254,255, 256,257,258,259,260,261,262,263,264,265,266,267,26 8,269,270,271,272,273,277,278,279,180

Please advise.

Mosh
04-23-2009, 09:49 PM
Under the option 'Forums To Exclude From Search', the following error shows:

I think that this is causing this modification to not work.

My settings are:
125,142,152,156,164,165,166,174,176,190,192,196,20 9,211,212,213,214,215,216,217,218,219,220,221,223, 224,225,226,228,229,233,237,238,239,240,241,242,24 3,244,245,246,247,248,249,250,251,252,253,254,255, 256,257,258,259,260,261,262,263,264,265,266,267,26 8,269,270,271,272,273,277,278,279,180

Please advise.
It is because the length of the list of forums you have added is more than 254 characters long.

To fix it, edit ms_search_all_unanswered_38.xml, find:

<validationcode><![CDATA[return $data != NULL && preg_match('#^[0-9,]{0,254}$#', $data) && substr($data, -1) != ',' && substr($data, 0, 1) != ',';]]></validationcode>

Change to:

<validationcode><![CDATA[return $data != NULL && preg_match('#^[0-9,]{0,500}$#', $data) && substr($data, -1) != ',' && substr($data, 0, 1) != ',';]]></validationcode>

Then re-import the product and allow overwrite. Should hopefully work.

jilly
06-09-2009, 11:42 PM
Mosh, I have a request - on my forum, I would like to place this as its own separate link on the nav bar - so that when you are looking at the nav bar, you can see 'unanswered threads' as one of the options, along with all the standard items already in nav bar. This way, my mods and users could click directly on the link in the nav bar, and not have to use the drop down search menu.

Can you code this as an additional option to the mod, or if it would not be too hard, tell me how to get the link as a separate item into navbar myself?

I saw your notice about exams, good luck, and will check back for the answer after the end of June!

Mosh
06-23-2009, 12:45 AM
Mosh, I have a request - on my forum, I would like to place this as its own separate link on the nav bar - so that when you are looking at the nav bar, you can see 'unanswered threads' as one of the options, along with all the standard items already in nav bar. This way, my mods and users could click directly on the link in the nav bar, and not have to use the drop down search menu.

Can you code this as an additional option to the mod, or if it would not be too hard, tell me how to get the link as a separate item into navbar myself?!
Should not be too hard to add, so I will add an option for different locations. The updated hack will be released in the next couple of days.

I saw your notice about exams, good luck, and will check back for the answer after the end of June!
Why thank you kind lady :) All done now, finished my last exam about an hour and a half ago.

Mosh
06-23-2009, 07:54 AM
Update: v3.8.002 - Tuesday 23rd June 2009
-- Added: AdminCP Option to allow for Unanswered Threads link to be placed in different places on the navbar

jilly
07-02-2009, 08:34 PM
Thanks Mosh - I tried installing, and of course I have customized my navbar (LOL) - how can I add the link manually?

Mosh
07-02-2009, 09:57 PM
Thanks Mosh - I tried installing, and of course I have customized my navbar (LOL) - how can I add the link manually?
The best thing I can suggest is for you to look at the default/original vBulletin navbar template, locate $template_hook[navbar_buttons_left] or $template_hook[navbar_buttons_right] are normally located and put either of those hooks in the appropriate position in your customised navbar template and select the appropriate navbar placement option in this hack's vBulletin options for it to display. I can not be any more specific than that, because as you said, it is a customised template.

jilly
07-04-2009, 01:28 PM
The best thing I can suggest is for you to look at the default/original vBulletin navbar template, locate $template_hook[navbar_buttons_left] or $template_hook[navbar_buttons_right] are normally located and put either of those hooks in the appropriate position in your customised navbar template and select the appropriate navbar placement option in this hack's vBulletin options for it to display. I can not be any more specific than that, because as you said, it is a customised template.

well, I can put the code into the navbar myself, that's not an issue, just need to know what exactly to put in - like whatever the code is that makes the link.. for example my user cp link, the code is:

<td class="vbmenu_control"><a href="usercp.php">User CP</a></td>

so I can add in the link myself, if I now what to put between the two TD's - for example:

<td class="vbmenu_control"> Mosh's Unanswered Thread Info Goes Here</td>

Mosh
07-04-2009, 09:49 PM
well, I can put the code into the navbar myself, that's not an issue, just need to know what exactly to put in - like whatever the code is that makes the link.. for example my user cp link, the code is:

<td class="vbmenu_control"><a href="usercp.php">User CP</a></td>

so I can add in the link myself, if I now what to put between the two TD's - for example:

<td class="vbmenu_control"> Mosh's Unanswered Thread Info Goes Here</td>
Cool :)

Here you go, everything in the below HTML tags including the tds, just copy and paste where you need it:
REMOVED, DOES NOT WORK

jilly
07-06-2009, 12:32 PM
Okay, I tried to add it into my navbar template, and got this error message:

The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/jilly/public_html/forums/includes/adminfunctions_template.php(3938) : eval()'d code on line 162

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
and line 162 in my template is where I tried to put the code from above.

Mosh
07-06-2009, 12:42 PM
Okay, I tried to add it into my navbar template, and got this error message:

The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/jilly/public_html/forums/includes/adminfunctions_template.php(3938) : eval()'d code on line 162

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
and line 162 in my template is where I tried to put the code from above.
I know where I went wrong with this. Try this:
REMOVED, DOES NOT WORK

jilly
07-06-2009, 01:08 PM
tried the new one, but still got the same error.. D'oh!

Mosh
07-06-2009, 10:00 PM
tried the new one, but still got the same error.. D'oh!
OK, the below is tested and working, so for the last time, copy and paste the below :)

<!-- Forum-wide Search For Unanswered Threads (c) Mosh Shigdar 2008 --><td class="vbmenu_control"><a href="{$vbulletin->options['bburl']}/search.php?$session[sessionurl]do=process&amp;replyless=1&amp;replylimit=0&amp;exclude={$vbul letin->options['fwsfut_exclude_forums']}&amp;nocache={$vbulletin->options['fwsfut_cache_enable']}">$vbphrase[forum_wide_unanswered]</a></td><!-- end of Forum-wide Search For Unanswered Threads -->

jilly
07-08-2009, 01:34 AM
yay, it worked! Thanks Mosh, awesome!

Bubble #5
10-01-2009, 04:39 AM
How (or where) do we remove the title 'Unanswered Threads' from the search drop down. It looks redundant. We need it to look more like what is used on this site...

Thanks :)

Mosh
10-01-2009, 08:08 AM
How (or where) do we remove the title 'Unanswered Threads' from the search drop down. It looks redundant. We need it to look more like what is used on this site...

Thanks :)
This change is not supported, but should work.

Edit the Forum-wide Search For Unanswered Threads plugin, find:
$template_hook['navbar_search_menu'] .= '<!-- Forum-wide Search For Unanswered Threads (c) Mosh Shigdar 2008 - 2009 --><tr><td class="thead">'.$vbphrase['forum_wide_unanswered'].'</td></tr><tr><td class="vbmenu_option"><a href="'.$vbulletin->options['bburl'].'/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></td></tr><!-- end of Forum-wide Search For Unanswered Threads -->';

Change to:
$template_hook['navbar_search_menu'] .= '<!-- Forum-wide Search For Unanswered Threads (c) Mosh Shigdar 2008 - 2009 --><tr><td class="vbmenu_option"><a href="'.$vbulletin->options['bburl'].'/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></td></tr><!-- end of Forum-wide Search For Unanswered Threads -->';

bluej
11-05-2009, 07:06 AM
great mod, thank you :)

Mosh
01-02-2010, 01:14 AM
Hi all,

It is with regret that after over 4 years (and thousands of hours) spent providing free support for my free hacks released here, as of today I will no longer be able to provide support for free.

This is due to being unemployed for a while, being strapped for cash and unable to rely on the virtually non-existant donations from here to help to pay the bills or put food on the table for my family. I am now providing all support for my free hacks released here over at Wolfshead Solutions (http://www.wolfshead-solutions.com) via an annual support subscription (for a small fee).

It does not mean I will be no longer release free hacks, I will, but I will just no longer be supporting them for free.

My free hacks have and always will remain free to download and use. And so will updates/bug fixes.

I will be releasing more free hacks, but if you require any support at all for those free hacks, you will need to purchase an annual support subscription over at Wolfshead Solutions to receive support.

I am really sorry I have to do this, but revenue generated by my programming gigs are now my only source of income, and I can no longer afford the luxury of providing free support here, when that time can be spent creating new commerial products, doing paid work requests or providing paid support to pay the bills.

Thank you for the understanding.

Regards,

Mosh.

Mosh
01-18-2010, 08:36 PM
I will not be able to update this hack to v4.0.x until vBulletin have fixed the following bug - http://www.vbulletin.com/forum/project.php?issueid=34686.

Mosh
06-11-2010, 02:51 AM
UPDATE: I will not be able to update this hack to v4.0.x until vBulletin Solutions has released vBulletin 4.0.4 which, I can confirm, does fix the bug that will not allow this hack to work at then moment (Internet Brands have advised the release date for 4.0.4 should be before the end of June 2010, so this hack will be ported asap after the release). See this bug report for more information - http://tracker.vbulletin.com/browse/VBIV-3652.

Mosh
06-18-2010, 11:10 AM
UPDATE: I have now released the v4.0.4 version of this hack - check here.

Mosh
01-08-2011, 02:00 AM
Hi all,

Free support has now been moved back to vBulletin.org.

Please see the first post for more information (and also this thread (http://www.wolfshead-solutions.com/threads/444-Our-quot-vBulletin.org-Hacks-Support-quot-subscription-has-been-scrapped) at Wolfshead Solutions).

Enjoy :)

Regards,

Mosh Shigdar - Wolfshead Solutions.

adwade
08-04-2011, 10:52 PM
Ref:well, I can put the code into the navbar myself, that's not an issue, just need to know what exactly to put in - like whatever the code is that makes the link.. for example...

OK, the below is tested and working, so for the last time, copy and paste the below :)

<!-- Forum-wide Search For Unanswered Threads (c) Mosh Shigdar 2008 --><td class="vbmenu_control"><a href="{$vbulletin->options['bburl']}/search.php?$session[sessionurl]do=process&amp;replyless=1&amp;replylimit=0&amp;exclude={$vbul letin->options['fwsfut_exclude_forums']}&amp;nocache={$vbulletin->options['fwsfut_cache_enable']}">$vbphrase[forum_wide_unanswered]</a></td><!-- end of Forum-wide Search For Unanswered Threads -->

Bear with me, as I have a bit of a strange request. I have a NewsBot (i.e. user) that posts RRS feeds as threads throughout my forum, however I don't need/want the NewsBot's threads to be included in this UnAnswered Thread search. :o

So, is there any sort of CODE that could be added into that above somewhere that would 'skip' all of it's threads when performing the search? If so, that'd be just perfect for my purposes. :cool:

P.S. Install went perfectly and it's working great just as it's been created to.

rrr
04-17-2013, 03:36 PM
I was running this for years, but now I'm starting to get a fatal memory error when I click on the link:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 262144 bytes) in /storage/sitename/public_html/search.php on line 2531

Any idea what could be causing this?

xlguy
10-21-2013, 10:21 AM
That's a PHP memory issue, you need to report it to your host - they might be able to increase the allocated memory for you :)

Anyone using this on 3.8.x and having trouble getting the excluded forum feature to work? I have a short list: 8,21,12,10,4 but it still shows results from those areas - is it because I'm the admin or ?