Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Add Search/Sort/Order in thread view Details »»
Add Search/Sort/Order in thread view
Version: 1.00, by bad_madman bad_madman is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 06-16-2002 Last Update: Never Installs: 18
 
No support by the author.

Add sort, order, search, posts from user options at the end of the thread.

Latest version: 1.20 (6-27-2002)
- Bug fixed: at every search views counter is increased (link)

Features:
  • The following options are available:
    - Display posts from previous xx days
    - Sorted by Post date, User name, Subject, Attachement, Post length
    - Show the post of all/definite users (with number posts)
    - ascending/descending
    - Search in Thread
      » Show only posts in which the search string was found (v1.20)
      » Own replacement for highlighted words possible (v1.20)
      » String search in words
      » Also mark parts of words
  • Decide which options shall be shown (simple template change)!
  • Show message instead of a empty thread, if the sort result = 0 posts (v1.10)
  • This hack is compatible with:
    - TWTCommish's hack 'View All Attachments in Thread'
    - FireFly's beta hack 'Multiple Quotes'
  • Tested with vBulletin 2.0.3, 2.2.5, 2.2.6
  • It works with vBulletin 2.0.3 to 2.2.6 now.
  • Very simple installation:
    - 2 Templates must be made
    - 1 Template must be changed
    - 2 Files (showthread.php, admin/functions.php) must be changed
  • Look at the screenshot for more informations...
Updates 1.20 (6-24-2002):
- Show only posts in which the search string was found
- Own replacement for highlighted words possible
- String search in words
- Also mark parts of words
- Update instructions in download archive

Updates 1.10 (6-19-2002):
- Show message instead of a empty thread, if the sort result = 0 posts
- Now compatible with: FireFly's beta hack 'Multiple Quotes'
- Bug fixed: if you use the links 'Previous Thread' ... 'Next Thread' in thread...

Screenshots:
- Thread view

Installation:
- Read !readme.txt in ZIP-ARCHIV!

Download:

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 06-18-2002, 04:47 PM
Recluse's Avatar
Recluse Recluse is offline
 
Join Date: Feb 2002
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ill give your suggestion a try after work tonight, let you know the outcome in about 12 hours
Reply With Quote
  #33  
Old 06-18-2002, 11:53 PM
bad_madman's Avatar
bad_madman bad_madman is offline
 
Join Date: Oct 2001
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Recluse
ill give your suggestion a try after work tonight, let you know the outcome in about 12 hours
thx !

However, take the new version 1.10 of the hack for this.
Reply With Quote
  #34  
Old 06-18-2002, 11:58 PM
bad_madman's Avatar
bad_madman bad_madman is offline
 
Join Date: Oct 2001
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

New version out: 1.10

Features/Updates
- Show message instead of a empty thread, if the sort result = 0 posts
- Now compatible with: FireFly's beta hack 'Multiple Quotes'
- Bug fixed: if you use the links 'Previous Thread' ... 'Next Thread' in thread...

Screenshots:
Screenshots in the first post.

Download:
The latest version is in the first post of this thread.
Reply With Quote
  #35  
Old 06-19-2002, 07:35 AM
Recluse's Avatar
Recluse Recluse is offline
 
Join Date: Feb 2002
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok reinstalled to the new version for the multi quote hack, this is what i get when searching

Warning: Variable passed to reset() is not an array or object in /home/cra++++/public_html/forums/showthread.php on line 749

Warning: Variable passed to each() is not an array or object in /home/cra++++/public_html/forums/showthread.php on line 750


Code:
	//highlight words for search engine
	if (isset($highlight)) {
		if ((isset($postid) and $postid==$post[postid]) or !isset($postid)) {
 749 	reset($replacewords);
 750 	 while (list($key,$val)=each($replacewords)){
			$post['message']=preg_replace("/(^| |\n|\r|\t|\]|>|\")(".$val.")(([\.,]+[ $\n\r\t])|$|\"|<|\[| |\n|\r|\t)/si", "\\1<highlight>\\2</highlight>\\3", $post['message']);
			}
		}
	}
Reply With Quote
  #36  
Old 06-19-2002, 10:06 AM
bad_madman's Avatar
bad_madman bad_madman is offline
 
Join Date: Oct 2001
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Strange. Which version of vB do you use? It seems to be an old version.
Replace the complete highlight-part by this code.
PHP Code:
// words to highlight from the search engine
$replacewords = array();
if (isset(
$highlight) && $highlight != '') {
  
$highlight urldecode($highlight);
  
$highlightwords=explode(" ",str_replace("/","\/",quotemeta($highlight)));
  while (list(
$key,$val)=each($highlightwords)) {
    
$val strtolower($val);
    if (
$val=='or' OR $val=='and' OR $val=='not') {
      continue;
    }
    if (
$allowwildcards) {
      
$val str_replace("\*""[a-zA-z]+"$val);
    }
    
$replacewords[$key]="$val";
  }

edit:
code changed
Reply With Quote
  #37  
Old 06-19-2002, 10:13 AM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I already installed the old hack can some just post what i have to change in order to have it updated? That would help alot more thanks.
Reply With Quote
  #38  
Old 06-19-2002, 10:41 AM
bad_madman's Avatar
bad_madman bad_madman is offline
 
Join Date: Oct 2001
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by BigJohnson
I already installed the old hack can some just post what i have to change in order to have it updated? That would help alot more thanks.
Update from v1.00 to 1.10:
Note: Remove all blanks between { and }
for example: ="{ secondaltcolor}
-------------- ^

search in template 'showthread_adds' for:
Code:
<input type="hidden" name="threadid" value="$threadid">
and replace with:
Code:
<input type="hidden" name="threadid" value="$threadid"><input type="hidden" name="goto" value="$goto">
Add new template "showthread_adds_notfound" and copy & paste this in:
Code:
<table bgcolor="{ pagebgcolor}" width="{ tablewidth}" cellpadding="0" cellspacing="0" border="0"><tr><td width="10"><img width="10" height="1" src="{ imagesfolder}/space.gif" alt=""></td><td width="100%"><!-- spacer -->
<table cellpadding="{ tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{ tablebordercolor}" { tableouterextra} width="{ contenttablewidth}" align="center"><tr><td>
<table cellpadding="4" cellspacing="{ tableinnerborderwidth}" border="0" { tableinnerextra} width="100%">
<tr>
	<td bgcolor="{ secondaltcolor}" width="100%" nowrap><br><br><p align="center"><normalfont>No posts found</b><br>Please <a href="javascript:history.back()"><b>go back</b></a></normalfont></p><br></td>
</tr>
</table>
</td></tr></table>
<!-- spacer --></td><td width="10"><img width="10" height="1" src="{ imagesfolder}/space.gif" alt=""></td></tr></table>
Search in file "showthread.php" for:
Code:
$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage$threadnavi".iif(isset($highlight), "&highlight=$highlight", ""));
and replace with:
Code:
if ($totalposts<1) eval("\$postbits=\"".gettemplate("showthread_adds_notfound")."\";");
$pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage$threadnavi".iif(isset($highlight), "&highlight=$highlight", ""));
That's all!
Reply With Quote
  #39  
Old 06-19-2002, 04:20 PM
Recluse's Avatar
Recluse Recluse is offline
 
Join Date: Feb 2002
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

using 2.2.2 with a few updates for securty, ill give your codea go when i return from work
Reply With Quote
  #40  
Old 06-19-2002, 05:38 PM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bad_madman,

Maybe its me, but I had to remove this hack. It caused my showthread page queries to go from 23 to anywhere from 50-89 queries. Anyone else see this?
Reply With Quote
  #41  
Old 06-19-2002, 08:13 PM
bad_madman's Avatar
bad_madman bad_madman is offline
 
Join Date: Oct 2001
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is interesting. :surprised: I will have a look at this more exactly in my forum...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:10 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.14339 seconds
  • Memory Usage 2,325KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete