vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Last 10 Searches (https://vborg.vbsupport.ru/showthread.php?t=35840)

Mathiau 04-23-2002 11:18 PM

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.

Webmasta XT 05-06-2002 10:21 AM

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*

patvdv 05-07-2002 08:01 AM

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

Mone' 05-30-2002 03:15 PM

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


Jean147 05-30-2002 03:31 PM

Installed succesfully!

Great Hack :thumbsup

patvdv 05-30-2002 05:30 PM

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?

Carthriller 06-01-2002 07:18 PM

my searches are not getting listed, please help.
Do I have to do a minimum of 10 searches for the search words to appear?

JZarate 06-01-2002 09:04 PM

great hack! thanks

Admin 06-02-2002 02:00 PM

Carthriller: The admin/mod's searches do not appear.

pseudocode 06-04-2002 05:09 PM

Thanks!!


All times are GMT. The time now is 10:06 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.01578 seconds
  • Memory Usage 1,765KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete