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

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
  #82  
Old 06-01-2004, 12:11 AM
Imprezer Imprezer is offline
 
Join Date: Dec 2002
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack!
Works great!
Thanks!

- Alex
Reply With Quote
  #83  
Old 06-05-2004, 06:34 PM
FWF FWF is offline
 
Join Date: Feb 2003
Location: Indianapolis, IN
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice hack
Reply With Quote
  #84  
Old 06-05-2004, 11:18 PM
Onkel_Tom's Avatar
Onkel_Tom Onkel_Tom is offline
 
Join Date: Mar 2002
Location: Stuttgart- Germany
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Boofo, my old friend, very nice Hack !
clicked install

thank your
Reply With Quote
  #85  
Old 07-17-2004, 05:51 AM
cteselle cteselle is offline
 
Join Date: Jan 2002
Location: SoCal
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vb is also only showing the last hour of searches for me. This was on a fresh 3.0.3 install on my test board. So I did some investigating. I figured I would start at the scheduled tasks, so I took a look at the "Hourly Cleanup" entries. In the file ./includes/cron/cleanup.php I found:

PHP Code:
//searches expire after one hour
$DB_site->query("
    ### Remove stale searches ###
    DELETE FROM " 
TABLE_PREFIX "search
    WHERE dateline < " 
. (TIMENOW 3600)
); 
I have not tested this yet, but I don't know why it wouldn't work. You could change the 3600 to whatever you want to get the desired result. 86400 for 1 day, 604800 or 1 week, etc.

If I have problems I will report back.
Reply With Quote
  #86  
Old 07-17-2004, 08:19 AM
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 cteselle
vb is also only showing the last hour of searches for me. This was on a fresh 3.0.3 install on my test board. So I did some investigating. I figured I would start at the scheduled tasks, so I took a look at the "Hourly Cleanup" entries. In the file ./includes/cron/cleanup.php I found:

PHP Code:
//searches expire after one hour
$DB_site->query("
    ### Remove stale searches ###
    DELETE FROM " 
TABLE_PREFIX "search
    WHERE dateline < " 
. (TIMENOW 3600)
); 
I have not tested this yet, but I don't know why it wouldn't work. You could change the 3600 to whatever you want to get the desired result. 86400 for 1 day, 604800 or 1 week, etc.

If I have problems I will report back.
Mine have always only showed for 24 hours with vB3. Please keep me posted on what you find out with this.
Reply With Quote
  #87  
Old 07-17-2004, 10:17 AM
j_86 j_86 is offline
 
Join Date: May 2003
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am getting this error;

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

Date: Saturday 17th of July 2004 12:16:03 PM
Script: http://forum.ugamer.net/search.php?
Referer: 
Username: S------
IP Address: -----------
Any ideas why?

My table prefix is vb3_

I'm running 3.0.3
Reply With Quote
  #88  
Old 07-17-2004, 04:54 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

JimpsEd,

Change to following queries. They will add the table prefix for you.

Change:

PHP Code:
$querycount=$DB_site->query_first("SELECT COUNT(*) AS orderedids FROM " TABLE_PREFIX "search LEFT JOIN " TABLE_PREFIX "user USING (userid) WHERE query!='' AND usergroupid NOT IN (5,6,7)"); 
to:

PHP Code:
$querycount=$DB_site->query_first("
SELECT COUNT(*) AS orderedids FROM " 
TABLE_PREFIX "search AS search
LEFT JOIN " 
TABLE_PREFIX "user AS user USING (userid)
WHERE query!=''
AND usergroupid NOT IN (5,6,7)
"
); 
Change:

PHP 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:

PHP 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 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
"
); 
That should fix it for you.

Make sure to click install.
Reply With Quote
  #89  
Old 07-17-2004, 11:29 PM
j_86 j_86 is offline
 
Join Date: May 2003
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the tips

But, unfortunatly nothing is showing at all - just nothing.

Even from a clean install of your mod with your changes (and yes, template stuff correct);

http://forum.ugamer.net/search.php?



Not even an error message. ( I have also testing searching as regular user, and also turning off User Group *not** 7,6,5
Reply With Quote
  #90  
Old 07-18-2004, 09:18 AM
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 JimpsEd
Thanks for the tips

But, unfortunatly nothing is showing at all - just nothing.

Even from a clean install of your mod with your changes (and yes, template stuff correct);

http://forum.ugamer.net/search.php?



Not even an error message. ( I have also testing searching as regular user, and also turning off User Group *not** 7,6,5
You had to miss something somewhere. Re-check the hack and make sure you didn't miss anything. And also remember, the search listing will not show up until there is at least one successful search made.
Reply With Quote
  #91  
Old 07-18-2004, 10:28 AM
j_86 j_86 is offline
 
Join Date: May 2003
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still definetly not working :surprised:

I cannot understand, i've resinstalled the hack, even installed it on a blank forum install.

Attatched is my Search.php and Template file if you can see anything wrong. The Search Template is a reverted one, with the hack added. The same goes for the search.php file, only with your above query modifications.

I have tried rebuilding search indexes etc.
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 10:18 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.05051 seconds
  • Memory Usage 2,329KB
  • 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
  • (1)bbcode_code
  • (6)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