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)

inetd 03-08-2002 06:51 PM

In my opinion "Date and Time" column owe be broader...

Robert9 03-08-2002 07:15 PM

@FireFly

can you plz post the code 4 this modifications, they are very usefull 4 me, THX, if you'll do that!

cYa!

Admin 03-08-2002 07:18 PM

I'll let AntiOnline do that, after all it is his hack. :)

AntiOnline 03-08-2002 07:28 PM

Greetings All:

Geeze, thanks firefly =P

I'll work on it tonight and post the updates.

wooolF[RM] 03-08-2002 10:30 PM

]YaY :D

Jawelin 03-09-2002 08:12 AM

Just a performance question: when the last 10 searches are exposed this way, I can easly assume most of users will try one or another ...
Question: are these searches cached ? How long they last on the search table in db ?

Thanks

Admin 03-09-2002 08:18 AM

Yes, all searches are cached in the database for 7 days IIRC (not sure about the time).
When the user clicks the link, only the results are shows and the search is not ran again.

BTW there is a security issue with this hack that I will post a fix to later...

Admin 03-09-2002 08:25 AM

Ok, if a user can find a searchid of a search that was done by an admin / mod, and goes to that search, he will see all posts inlcuding these in private forums he shouldn't see.
Of course, this hack makes it even easier to find these searches as they are just one click away.

To solve the problem the hack created, replace the query:
Code:

$lastsearches=$DB_site->query('SELECT searchid,querystring FROM search WHERE querystring!="" ORDER BY searchid desc LIMIT 0,10');
with this:
Code:

$lastsearches=$DB_site->query('SELECT searchid,querystring FROM search LEFT JOIN user USING (userid) WHERE querystring!="" AND usergroupid NOT IN (5,6,7) ORDER BY searchid desc LIMIT 0,10');
This will make sure no searches submitted by admins, mods and super mods will show up on the list.

Robert9 03-09-2002 08:33 AM

thx!

Jawelin 03-09-2002 09:10 AM

Quote:

Originally posted by FireFly
Yes, all searches are cached in the database for 7 days IIRC (not sure about the time).
When the user clicks the link, only the results are shows and the search is not ran again.

BTW there is a security issue with this hack that I will post a fix to later...

Thanks a lot for info and the fix... ;)

O-T: have you noticed the small bug in search query_string when someone put the star BEFORE the word instead after ?
:surprised
This should be a bug due to some special char in regexp search. Submitted to vb.com, anyway...

Bye and thanks again.


All times are GMT. The time now is 08:41 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.01395 seconds
  • Memory Usage 1,734KB
  • 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_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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