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

Reply
 
Thread Tools
vB3 15 Most Recent Searches Made By Our Members Details »»
vB3 15 Most Recent Searches Made By Our Members
Version: 1.00, by Boofo Boofo is offline
Developer Last Online: Jun 2012 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 02-10-2004 Last Update: Never Installs: 113
 
No support by the author.

vB3 15 Most Recent Searches Made By Our Members
Version 1.1
(By Boofo and EvilLS1)

What does this hack do?
This hack will display the last 15 searches made by your members on your main site search page at the top. The search words are then linked to those search results. It uses your censor options to make sure nothing bad shows up. The searchee will also be visible, but only to Admins. The search box will only show up when searches have been made. The Admin, Supermod and Mod searches will not show up in the listing. It is done this way so any searches made in your private forums are not shown to the regular members.

Credits:
A big thank you goes out to AntiOnline for his original "Last 10 Searches" hack for vB2, partly on which this hack is based.

Version Information:
Version 1.0 --Initial release
Version 1.1 --Re-did the template code to make it match the default style a little better and also added the ability to collaspe the table.

Installation overview:
Files to edit:
(1)
--search.php
Templates to edit: (1)
--search_forums

For those wanting the HTL file for this, thanks to Frank, you can get it from this post.

The first image is what the other members will see and the second image is what the Admin will see.

Show Your Support

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

Comments
  #102  
Old 07-26-2004, 05:15 PM
chapsrulez chapsrulez is offline
 
Join Date: Mar 2004
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
I don't use these tables in any of the queries. You might want to check the code again.

forosearch
forouser
"foro" is my table prefix.
Reply With Quote
  #103  
Old 07-31-2004, 02:56 PM
gcurrey gcurrey is offline
 
Join Date: Mar 2002
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Boofo - Great mod! Do you have some php code that can be run to view ALL searches done which the admin can install/hide somewhere separately from the VB output to keep track of all searches? Maybe this admin version could have a text box so you can specify the amount of entries to display.
Reply With Quote
  #104  
Old 08-12-2004, 11:28 PM
qxh qxh is offline
 
Join Date: Aug 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah tables with a prefix have problems with this hack.
Reply With Quote
  #105  
Old 08-18-2004, 10:38 PM
cybermomcafe cybermomcafe is offline
 
Join Date: Mar 2003
Location: Ohio
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't get it to work... i use vb3_ as my table prefix... any way to make it work?

Thanks!!

Here's the error I get...

Database error in vBulletin 3.0.3:
Code:
Database error in vBulletin 3.0.3:

Invalid SQL: SELECT search.searchid,search.orderedids,search.dateline,search.query,search.userid,user.username,user.userid,user.usergroupid FROM vb3_search,vb3_user WHERE query!='' AND user.userid = search.userid AND usergroupid NOT IN (5,6,7) ORDER BY searchid desc LIMIT 0,15
mysql error: Unknown table 'search' in field list

mysql error number: 1109
Reply With Quote
  #106  
Old 08-18-2004, 11:51 PM
cybermomcafe cybermomcafe is offline
 
Join Date: Mar 2003
Location: Ohio
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I got it to work...

I changed the SELECT query (line 14 of the part to be added to search.php) from:

Code:
$lastsearches=$DB_site->query("SELECT search.searchid,search.orderedids,search.dateline,search.query,search.userid,user.username,user.userid,user.usergroupid FROM " . TABLE_PREFIX . "search," . TABLE_PREFIX . "user WHERE query!='' AND user.userid = search.userid AND usergroupid NOT IN (5,6,7) ORDER BY searchid desc LIMIT 0,15");
to (the table prefix on my board is vb3_)...

Code:
$lastsearches=$DB_site->query("SELECT vb3_search.searchid,vb3_search.orderedids,vb3_search.dateline,vb3_search.query,vb3_search.userid,vb3_user.username,vb3_user.userid,vb3_user.usergroupid FROM " . TABLE_PREFIX . "search," . TABLE_PREFIX . "user WHERE query!='' AND vb3_user.userid = vb3_search.userid ORDER BY searchid desc LIMIT 0,15");
I removed the usergroups, because I wanted mod/admin searches to show.

I also wrapped the search_forums template edit with this conditional, because I wanted only Admin to see the recent searches.

Code:
<if condition="$bbuserinfo[usergroupid] == 6">

</if>
thanks Boofo!
Reply With Quote
  #107  
Old 08-19-2004, 01:13 AM
cybermomcafe cybermomcafe is offline
 
Join Date: Mar 2003
Location: Ohio
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One more question... Is there some sort of time limit that the most recent searches are cached for?

When I tested it around 8pm it listed like 4 searches, now it's a bit after 10 and they aren't listed any more?

Thanks!
Reply With Quote
  #108  
Old 08-20-2004, 05:00 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cybermomcafe
I can't get it to work... i use vb3_ as my table prefix... any way to make it work?

Thanks!!

Here's the error I get...

Database error in vBulletin 3.0.3:
Code:
Database error in vBulletin 3.0.3:
 
Invalid SQL: SELECT search.searchid,search.orderedids,search.dateline,search.query,search.userid,user.username,user.userid,user.usergroupid FROM vb3_search,vb3_user WHERE query!='' AND user.userid = search.userid AND usergroupid NOT IN (5,6,7) ORDER BY searchid desc LIMIT 0,15
mysql error: Unknown table 'search' in field list
 
mysql error number: 1109
Try this query:

PHP Code:
$lastsearches=$DB_site->query(
SELECT search.searchid,search.orderedids,search.dateline,search.query,search.userid,use    r.username,user.userid,user.usergroupid 
FROM " 
TABLE_PREFIX "search AS search," TABLE_PREFIX "user AS user 
WHERE query!='' 
AND user.userid = search.userid 
 AND usergroupid NOT IN (5,6,7) 
ORDER BY searchid desc LIMIT 0,15 
"
); 
Reply With Quote
  #109  
Old 08-23-2004, 12:34 PM
weirdpixels's Avatar
weirdpixels weirdpixels is offline
 
Join Date: Aug 2003
Location: England
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*clicks install
thats now 100 installs well done
Reply With Quote
  #110  
Old 09-11-2004, 02:14 PM
kenji4861's Avatar
kenji4861 kenji4861 is offline
 
Join Date: Jun 2003
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great on VB3.0.3 THANK YOU!
Reply With Quote
  #111  
Old 09-11-2004, 07:39 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kenji4861
Works great on VB3.0.3 THANK YOU!
Don't forget the install button.
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 12:14 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10306 seconds
  • Memory Usage 2,313KB
  • 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
  • (3)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