vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Virgin topics "hackette" (https://vborg.vbsupport.ru/showthread.php?t=34155)

elin 01-15-2002 10:00 PM

01-16-02: Updated description and hack. There's no need to fix it if you've already installed it, but I realized that I had placed a couple of mySQL queries in the wrong order which might or mightn't have influence over search performance.

I've been searching through the forum but I haven't found any released version of this hack so far so I thought I'd give it a shot.

What this hack does is that it searches for posts that haven't been answered yet, something which may be very useful for those who run help forums. I've reused quite a lot of code from other vB search features, so you can maintain flood control and prevent forums being displayed to users who have no right to view them. Another pro is the fact that you get the results displayed with the same templates as the other, custom, searches.

Just download the attached file and follow the instructions and you'll have it running in notime.

If you feel like it you can change the $days variable. I have it set to thirty days by default because it felt good. Decrease it if you have busy forums and increase it if only the cat pops in for a visit every now and then.

Fully functional (so far so good) version can be found here. I'll try to provide as much support as my schedule allows, but please don't count on it since I forget easily.

Good luck! (Oh, and if you've installed please give me a thumbs down/thumbs up so that I can know if it works or not. Someday I'd like to release it in the "real" hack forum, you know. :))

Bane 01-16-2002 12:40 AM

Rather good idea, I will use this :)

AntiOnline 01-16-2002 02:54 AM

Greetings:

Is there a way to edit this so that it only searches certain forums, instead of them all? Or, so that it excludes certain forums from the search?

Specifically, for those of us that have the usenet news hack installed, it would be nice to be able to exclude those forums from the unanswered page.

elin 01-16-2002 10:49 AM

OK, updated topic.

Bane:

keep me posted, I'd like to know if it works. :)

AntiOnline:

right now the hack uses regular vB search features which means that the forums searched are the ones that are available to the user and its usergroup. I have no idea how the usenet hack works and how I could take that into account, and knowing myself and my view on time I'll probably not have the opportunity to investigate it either. I guess you could set the $forumsql variable to contain only the forums you specify, but I'm not quite sure what it'd look like (delimiter-wise) to be honest. I'll investigate. :p

itstd 01-16-2002 12:46 PM

Big thumbs up! Been working on this myself but couldn't quite figure out how to keep everyone from seeing private forums. Works like a champ.

Arathorn 01-17-2002 11:10 AM

:up: Works well on my board. It'll really help me hunt out those help threads. :)

Feature suggestion: allow user to specify $day.

p.s. Interesting name for a hack...

Arathorn 01-17-2002 05:24 PM

Does anyone know how I can display the $day variable on the search page? I've included the link there, and I'd like to tell users how many days back they're searching. I could hard code it, but if I change the variable I'll probably forget to go back and alter the hard code.

Admin 01-18-2002 01:14 PM

What about threads that have been bumped by the original poster? Why not consider them virgins as well? :)

Change this line in the hack:
Code:

  $replysql =" AND thread.replycount=0";
to:
Code:

  $replysql =" AND ((thread.replycount=0) OR (thread.replycount=1 AND thread.lastposter=thread.postusername))";
not tested, but should work.

As you can see, this addition will also give you threads with 1 reply, which is a bump by the user.

Arathorn 01-20-2002 08:18 AM

Quote:

Originally posted by Arathorn
Does anyone know how I can display the $day variable on the search page?
Anyone? I've included the variable in the searchintro template, but nothing shows.

Joshua Clinard 03-08-2002 03:23 AM

Nice Work!

Tim Wheatley 03-09-2002 06:04 PM

You can disable searching of a forum for all usergroups in the forum permissions area of the admin cp - incase anyone needs to because of usenet. :)

shadow_old 03-27-2002 09:36 AM

any way to exclude usenet forums for just this search?

something like:

where forumid !=

how would i go about putting it in this query?

edit: that was stupid make this your query to exclude a forum:

$replysql =" AND ((thread.replycount=0) OR (thread.replycount=1 AND thread.lastposter=thread.postusername)) AND forumid !=#";

where # is the number of your usenetforum

akaler 04-16-2002 11:11 AM

Thanks for this hack!!! This should be made a full release. It's awesome!!

Say... This seems like a good hack to add in mysql indexes in to speed it up.

I'm no expert, though.

Anyone know how to go about it?

It seems like one should be added for replycount under thread.

And, for chen's addition, indexes should be added for lastposter and postuser name, both also under thread.

The -only- thing I know about indexes, though, is going to into 'thread' in my vb database with phpmyadmin, then clicking 'index' for each replycount, lastposter, and posterusername. Would that be correct? Or would I do something else?

Thomas P 06-04-2002 08:51 AM

Hi,
this is a great hack, I really was on the search for something like this...
Thanks a bunch,
-Tom

JulianD 06-04-2002 10:46 AM

Well, Thanks Thomas, I saw your post on vB.com... I was looking for this one a few weeks ago. But I'm lazy so I didn't search the forums...

thanks to elin too for this little hack :p

Thomas P 06-04-2002 03:52 PM

You're welcome :)

Kuddos to eline for this hack, I suggest to move this thread to the Full Releases.

cu,
-Tom

Joshua Clinard 08-08-2002 05:45 PM

Is there a way that I can exclude certain forums from this hack, such as forums that do not allow replies?

Schorsch 08-09-2002 04:28 AM

thanks!! works great :)
good work elin https://vborg.vbsupport.ru/external/2011/01/19.gif

Kriek 05-30-2003 10:29 PM

Quote:

08-08-02 at 02:45 PM Joshua Clinard said this in Post #17
Is there a way that I can exclude certain forums from this hack
Open search.php and find
PHP Code:

$wheresql="1=1".$forumsql.$replysql.$datesql;
 
$wheresql.=" AND thread.open<>10"

Then add the following below it
PHP Code:

$wheresql.=" AND forumid!=91"

Where forumid equals 91 threads will be excluded.

Simple comparison operator ;)

KeithMcL 11-14-2003 10:20 PM

What about excluding multiple forums? Also, how easy would it be to have this as index.php?action=unaswered instead of search.php?action=unaswered

Reverend 11-16-2003 04:27 PM

Working fine on 2.3.3.

Thanks elin.

Thomas P 02-29-2004 06:00 PM

Quote:

Originally Posted by Reverend
Working fine on 2.3.3.

Thanks elin.

Great stuff, anyone has this on a large forum and can tell me something about the load this hackette generates?

Thanks a bunch,
-Tom


All times are GMT. The time now is 04:49 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01194 seconds
  • Memory Usage 1,765KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (22)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete