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
Last 10 Searches Details »»
Last 10 Searches
Version: 1.00, by AntiOnline AntiOnline is offline
Developer Last Online: Jun 2004 Show Printable Version Email this Page

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

Greetings All:

Updated 3/11/2002: Hack now shows the date and time each search was made, plus the number of results. Also included is the security fix by firefly (thanks).

Updated 3/8/2002: It now also links those search words to the previous search results.

Here's just a little fun feature that I added for my users, and thought that I would share with everyone else. It works with versions 2.03 and up, requires no modifications to your database, and should take less than 2 minutes to install:

This hack displays the last 10 searches made by your users on your main site search page. It uses your censor options to make sure nothing naughty shows up (unless, that is, you want it to).

Demo at http://www.AntiOnline.com/search.php

Enjoy!

Yours In CyberSpace,
John Vranesevich
Founder, AntiOnline

Show Your Support

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

Comments
  #72  
Old 04-23-2002, 11:18 PM
Mathiau's Avatar
Mathiau Mathiau is offline
 
Join Date: Jan 2002
Location: Costa Rica and toronto
Posts: 227
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack m8, installed and working fine

http://66.207.199.6/forums/search.php?s=


P.S - no i did not copy the blue idea form here..lol i just noticed how alike they are.., well sort of but nto really (it was my works old color scheme.
Reply With Quote
  #73  
Old 05-06-2002, 10:21 AM
Webmasta XT's Avatar
Webmasta XT Webmasta XT is offline
 
Join Date: Mar 2002
Posts: 359
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok this hack is great but the results it shows at the corner are not right, I mean it always shows 1 even if a member found 100 results, any ideas??

*Edit* Never Mind, I fixed it..Thnx for the hack anywayz *Edit*
Reply With Quote
  #74  
Old 05-07-2002, 08:01 AM
patvdv's Avatar
patvdv patvdv is offline
 
Join Date: Oct 2001
Location: Belgium
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Crazy Mofo
how can you make it like here so it doesnt show the black lines?
Change the PHP code in search.php like this:

PHP Code:
// begin last search hack by JP
 
$colstart1="<td bgcolor='{ secondaltcolor }'><smallfont>";
 
$colstart2="<td align='center' bgcolor=' { firstaltcolor }' width=15%><smallfont>";
 
$colend="</smallfont></td>";
 
$lastsearches=$DB_site->query('SELECT searchid,postids,dateline,querystring FROM search LEFT JOIN user USING (userid) WHERE queryst
ring!="" AND usergroupid NOT IN (5,6,7) ORDER BY searchid desc LIMIT 0,10'
);
 while (
$lastsearchcount=$DB_site->fetch_array($lastsearches)):
 
$lastsearchdate=vbdate($dateformat,$lastsearchcount[dateline]);
 
$lastsearchtime=vbdate($timeformat,$lastsearchcount[dateline]);
 
$ourlastquery=$lastsearchcount[querystring];
 
$ourlastquery=bbcodeparse($ourlastquery);
 
$ourlastquery=censortext($ourlastquery);
 
$lastsearchresultscount="$lastsearchcount[postids]";
 
$lastsearchresultscount=explode(",",$lastsearchresultscount);
 
$lastsearchresultscount=sizeof($lastsearchresultscount);
 
$lastsearchmatches.="$lastsearchresultscount posts<br>";
 
$lastsearchkeywords.="<a href='search.php?s=&action=showresults&searchid=$lastsearchcount[searchid]&sortby=lastpost&sortorder=desce
nding'>
$ourlastquery</a><br>";
 
$lastsearchtimestamp.="$lastsearchdate at $lastsearchtime<br>";
 endwhile;
 
$lastsearch="<tr>".$colstart2.$lastsearchmatches.$colend.$colstart1.$lastsearchkeywords.$colend.$colstart2.$lastsearchtimestamp.$co
lend
."</tr>";
// end last search hack by JP 
It will also use alternating colours for the columns
Reply With Quote
  #75  
Old 05-30-2002, 03:15 PM
Mone' Mone' is offline
 
Join Date: May 2002
Location: Australia
Posts: 246
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hack work perfectly !


patvdv your code is giving me error can you check your code as i'd like to have your layout

Mone'


Quote:
Originally posted by patvdv


Change the PHP code in search.php like this:

PHP Code:
// begin last search hack by JP
 
$colstart1="<td bgcolor='{ secondaltcolor }'><smallfont>";
 
$colstart2="<td align='center' bgcolor=' { firstaltcolor }' width=15%><smallfont>";
 
$colend="</smallfont></td>";
 
$lastsearches=$DB_site->query('SELECT searchid,postids,dateline,querystring FROM search LEFT JOIN user USING (userid) WHERE queryst
ring!="" AND usergroupid NOT IN (5,6,7) ORDER BY searchid desc LIMIT 0,10'
);
 while (
$lastsearchcount=$DB_site->fetch_array($lastsearches)):
 
$lastsearchdate=vbdate($dateformat,$lastsearchcount[dateline]);
 
$lastsearchtime=vbdate($timeformat,$lastsearchcount[dateline]);
 
$ourlastquery=$lastsearchcount[querystring];
 
$ourlastquery=bbcodeparse($ourlastquery);
 
$ourlastquery=censortext($ourlastquery);
 
$lastsearchresultscount="$lastsearchcount[postids]";
 
$lastsearchresultscount=explode(",",$lastsearchresultscount);
 
$lastsearchresultscount=sizeof($lastsearchresultscount);
 
$lastsearchmatches.="$lastsearchresultscount posts<br>";
 
$lastsearchkeywords.="<a href='search.php?s=&action=showresults&searchid=$lastsearchcount[searchid]&sortby=lastpost&sortorder=desce
nding'>
$ourlastquery</a><br>";
 
$lastsearchtimestamp.="$lastsearchdate at $lastsearchtime<br>";
 endwhile;
 
$lastsearch="<tr>".$colstart2.$lastsearchmatches.$colend.$colstart1.$lastsearchkeywords.$colend.$colstart2.$lastsearchtimestamp.$co
lend
."</tr>";
// end last search hack by JP 
It will also use alternating colours for the columns
Reply With Quote
  #76  
Old 05-30-2002, 03:31 PM
Jean147's Avatar
Jean147 Jean147 is offline
 
Join Date: Apr 2002
Location: NRW, Germany
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed succesfully!

Great Hack :thumbsup
Reply With Quote
  #77  
Old 05-30-2002, 05:30 PM
patvdv's Avatar
patvdv patvdv is offline
 
Join Date: Oct 2001
Location: Belgium
Posts: 53
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Mone'
hack work perfectly !


patvdv your code is giving me error can you check your code as i'd like to have your layout

Mone'


Mone, it's working great for me. What erros are you getting?
Reply With Quote
  #78  
Old 06-01-2002, 07:18 PM
Carthriller Carthriller is offline
 
Join Date: May 2002
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

my searches are not getting listed, please help.
Do I have to do a minimum of 10 searches for the search words to appear?
Reply With Quote
  #79  
Old 06-01-2002, 09:04 PM
JZarate's Avatar
JZarate JZarate is offline
 
Join Date: Oct 2001
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack! thanks
Reply With Quote
  #80  
Old 06-02-2002, 02:00 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Carthriller: The admin/mod's searches do not appear.
Reply With Quote
  #81  
Old 06-04-2002, 05:09 PM
pseudocode pseudocode is offline
 
Join Date: May 2002
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!!
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 07:37 AM.


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.04932 seconds
  • Memory Usage 2,337KB
  • 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
  • (2)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