Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by bira bira is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 11-25-2001 Last Update: Never Installs: 18
 
No support by the author.

ok, real quicky one: find all threads (note: threads, not posts!) started by X.

Open search.php and find:

Code:
// ###################### Start posts by user x #######################
Above it insert:

Code:
// ###################### Start threads by user x #######################
if ($action=="userthreads") {
  // get allowable forums:
  $forumsql=getallforumsql();

  // get user:
  $usersql=" AND thread.postuserid='$userid'";

  $wheresql="1=1".$forumsql.$usersql;

  if ($getsearch=$DB_site->query_first("SELECT searchid FROM search WHERE query='".addslashes($wheresql)."'")) {
    $searchid=$getsearch[searchid];
  } else {
    // get last search for this user and check floodcheck
    if ($prevsearch=$DB_site->query_first("SELECT searchid,dateline FROM search WHERE ".iif($bbuserinfo[userid]==0,"ipaddress='$ipaddress'","userid=$bbuserinfo[userid]")." ORDER BY dateline DESC LIMIT 1")) {
      if (time()-$prevsearch[dateline]<$searchfloodcheck and $searchfloodcheck!=0) { // and !ismoderator()) {
                                eval("standarderror(\"".gettemplate("error_searchfloodcheck")."\");");
                                exit;
      }
    }
                // insert query into db
                $DB_site->query("INSERT INTO search (searchid,query,dateline,querystring,showposts,userid,ipaddress) VALUES (NULL,'".addslashes($wheresql)."',".time().",'".addslashes($query)."',0,$bbuserinfo[userid],'".addslashes($ipaddress)."')");
                $searchid=$DB_site->insert_id();
  }


  eval("standardredirect(\"".gettemplate("redirect_search")."\",\"search.php?s=$session[sessionhash]&action=showresults&searchid=$searchid\");");
}
That's it, essentially. Now you just need to decide where you want to place the link to this.

For example, If you want it to appear in a user's profile, then place the following link in the getinfo template:

Code:
<a href="search.php?s=$session[sessionhash]&action=userthreads&userid=$userinfo[userid]">Find threads started by $userinfo[username]</a>

Show Your Support

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

Comments
  #12  
Old 12-18-2001, 06:57 PM
Tommy Boy Tommy Boy is offline
 
Join Date: Nov 2001
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Neat one, bira! Can the result show preview of the post, like the regular posts search?
Reply With Quote
  #13  
Old 12-18-2001, 07:28 PM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Parker - your title preview addon is fan-bloody-tastic. I love it and my users reacted very happily to it (I think it's the latest add-on they most like). No slow-downs or anything on my site. Thanks

Tommy - it uses the normal search script. If you search for threads (latest threads or in threadsubject only), you don't get a preview post. And, since this is a search for threads user X started, this post snippet is redundent, really.
Reply With Quote
  #14  
Old 12-19-2001, 12:07 PM
Sadie Frost's Avatar
Sadie Frost Sadie Frost is offline
 
Join Date: Dec 2001
Location: Pittsburgh
Posts: 307
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I love this

The other thing that would be better is if it was added to the actual search page functions.

Another great hack bira
Reply With Quote
  #15  
Old 02-20-2002, 07:57 PM
LanciaStratos's Avatar
LanciaStratos LanciaStratos is offline
 
Join Date: Oct 2001
Location: somewhere you're not
Posts: 221
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow, just what I was looking for, bira! Thanks, great work! Now, I just need a hack that will show the last 10 threads a user made in their profile...
Reply With Quote
  #16  
Old 03-14-2002, 07:46 AM
wolfe wolfe is offline
 
Join Date: Jan 2002
Posts: 900
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cant you make it like the posts on Vbbb.org

where it shows the number and it is a link to search how do i do that in Post bit temp
Reply With Quote
  #17  
Old 06-19-2002, 05:07 AM
kippesp kippesp is offline
 
Join Date: Jan 2002
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just getting ready to install it.

Found one bug. If a thread has been moved, it shows up as a poll in the search results. This will fix.

after this
Code:
$wheresql="1=1".$forumsql.$usersql;
add this
Code:
$wheresql.=" AND thread.open<>10";
Reply With Quote
  #18  
Old 06-19-2002, 07:54 PM
inetd inetd is offline
 
Join Date: Nov 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good hack!
I install this
Reply With Quote
  #19  
Old 06-20-2002, 03:06 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this hack, working on 2.2.6!
Reply With Quote
  #20  
Old 09-04-2002, 07:43 AM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works with 2.2.7.
Reply With Quote
  #21  
Old 10-10-2002, 06:53 AM
X-Fan's Avatar
X-Fan X-Fan is offline
 
Join Date: Jan 2002
Location: Adelaide, Australia
Posts: 496
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just trying to install this on a clean copy of 2.2.8, but I'm not finding this code in showthread.php:

PHP Code:
$post[postcount] = ++$postcount
Help!

Reply With Quote
Reply

Thread Tools

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 10:57 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.04410 seconds
  • Memory Usage 2,303KB
  • 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
  • (5)bbcode_code
  • (1)bbcode_php
  • (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
  • (2)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