Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by claypots (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 04-11-2001 Last Update: Never Installs: 0
 
No support by the author.

I've been looking for a hack like this for a long time and saw it here (lists the last ten searches):

http://www.sitepointforums.com/search.php

Did this get distributed here? Anyone know where I can get it?

Show Your Support

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

Comments
  #2  
Old 04-11-2001, 08:26 PM
Freddie Bingham's Avatar
Freddie Bingham Freddie Bingham is offline
 
Join Date: Oct 2001
Posts: 506
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The searches are stored in the search table and you can quite easily duplicate what Wayne has done.
Reply With Quote
  #3  
Old 04-11-2001, 09:41 PM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In search.php look for:
PHP Code:
  $searchforumbits=getsearchforums(); 
Under it add:
PHP Code:
  //WL 26-MAR-2001
  //Show Last Ten Searches.
  
$latestsearches $DB_site->query("SELECT searchid, querystring, username, dateline FROM search LEFT JOIN user on (search.userid=user.userid) WHERE querystring <> '' ORDER BY dateline DESC LIMIT 10");
  
$toggle "#DEDEDE";
  while (
$latestsearch=$DB_site->fetch_array($latestsearches)) {
    
$latestsearch['date']=vbdate($dateformat,$latestsearch['dateline']);
    
$latestsearch['time']=vbdate($timeformat,$latestsearch['dateline']);
    if (
$toggle%2==0) {
      
$backcolor="#DEDEDE";
    } else {
      
$backcolor="#EFEFEF";
    }
    eval(
"\$searchbits .= \"".gettemplate("search_latestbit")."\";");
    
$toggle++;
  }
  
//End Latest Searches. 
Create a template called search_latestbit:
Code:
<tr color="$backcolor">
  <td><normalfont><a href="search.php?s=$session[sessionhash]&action=showresults&searchid=$latestsearch[searchid]">$latestsearch[querystring]</a></normalfont></td>
  <td>$latestsearch[date]&nbsp;$latestsearch[time]</td>
</tr>
Modify your searchintro template to include:
Code:
<table bgcolor="#FFFFFF" border=0 cellpadding=4 cellspacing=1 width="100%">
<tr bgcolor="#6c6081"><TD COLSPAN=2>
  <normalfont color="#afa3c5" class=thtcolor><B>Last Ten Searches</B></normalfont></td></tr>
<tr>
<tr bgcolor="#6c6081">
  <td width="65%"><normalfont color="#f5d300">Search Text</normalfont></td>
  <td width="35%"><normalfont color="#f5d300">Performed At:</normalfont></td>
</tr>
$searchbits
</table>
Reply With Quote
  #4  
Old 04-12-2001, 12:32 AM
claypots
Guest
 
Posts: n/a
Default

Wow, thanks. I'll try this!
Reply With Quote
  #5  
Old 04-12-2001, 12:55 AM
MrLister's Avatar
MrLister MrLister is offline
 
Join Date: Oct 2001
Posts: 434
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!!!!!! YOU DA MAN!
Reply With Quote
  #6  
Old 04-12-2001, 04:48 AM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No problem. I will share any code that doesn't jeopardize the competitiveness or financial stability of my communities.
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:56 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.04876 seconds
  • Memory Usage 2,255KB
  • Queries Executed 21 (?)
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_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (4)postbit_onlinestatus
  • (6)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_postinfo_query
  • fetch_postinfo
  • 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
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_imicons
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete