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)

David Bott 03-18-2002 06:32 PM

Must say....Very nice and installed. I love hacks that add features like this that take just minutes to install.

Thank you!

David Bott
AVS Forum
http://www.avsforum.com

David Bott 03-18-2002 06:46 PM

ok...I do have a question....

The top ten with the the table lines between each seach that was done makes the table quite large. I like it like it is on this site without the gridlines. I know it is in this $lastsearch line of the serach.php...but what do I remove? (At least I think it is.)


Thank you again.

David Bott
AVS Forum Admin
http://www.avsforum.com

LouChipher 03-19-2002 02:14 PM

Nice Hack, but...

Date - Query - Results
today at 16:20 - rich - 20

But when i klick on this... -> Sorry - no matches found. Please try some different terms.

Or some user find more things with their search as the admin...

The security issu is not fixed! You must go through the searchids and look for jumps! If you found a jump, go directly to the cached search and you will see what the mod/admin found...

Can somebody fix it?

Greets,
Lou

David Bott 03-19-2002 03:22 PM

Please note it also seems to take some time to pull the last 10 serach from where it is getting it. On a large site, it takes like 5-8 seconds to pull up the serach screen now. Now it is only 10 lookups, but it seems to hurt us.

Any thoughts?

LamBras 03-21-2002 10:20 AM

Installed on 2.2.4 and working, thanks, brilliant idea!

freakyshiat 03-21-2002 01:15 PM

There seems to be a problem with this hack..it doesnt show last 10 searches all the time, it skips certain users....I am talkin about regular users not admins/mods.

And sometimes, it says this:

"Warning: Compilation failed: nothing to repeat at offset 19 in functions.php on line 268"

ZiRu$ 03-21-2002 04:41 PM

very nice i will install it and let you know my results

Jawelin 03-23-2002 01:17 PM

Excuse me: what's the exact meaning of 'results' number ?
Even here on vb.org, if I click on a search with for example +1200 matches, I found many many less actual results.
Ok, here I'm not a staff member, so I couldn't have access to every post...
But on my forum where I am the Admin ???

I have numbers like +2000 results and the actual new search finds only
Quote:

Displaying Topics 1 to 25 of 462
????

Thanks

Admin 03-23-2002 04:49 PM

The result number is the number of posts the search returns.

Jawelin 03-23-2002 09:03 PM

I guessed.
But what do you think about the strange phenomenon I reported ?
You are admin here... Please, check if the reported number matches - and doesn't overcome - the actual search result clicking on the query link in list.

Thanks

Admin 03-24-2002 11:31 AM

The result number is the number of posts + clicking the link searches for threads = your explanation. :)

Tim Wheatley 03-24-2002 11:33 AM

If you are worried about private forums etc, and are in the same situation as me where the only forums which need the ability to search are the public ones, simply disable searching for admin and mods of the private forums, that way no private posts can be found in any hole in the scripts, because no private posts will ever be searched.

I'm personally not too bothered, the private game editing forums on my forums are all search disabled and hidden too, normal users can get NO access. But even if they could it's no biggie.

TheCaver 04-06-2002 01:45 AM

Has the performance issue with this hack been resolved?

TIA!

JC

99SIVTEC 04-08-2002 12:58 AM

Hmm any idea why it isn't showing anything on my site? I'm using 2.2.4 http://www.sportcompactracing.com/vbulletin/search.php

Xanthine 04-11-2002 12:31 AM

It isnt showing for me either, Using 2.2.5. I have the table there just the posts arent appearing. Anyone know whats going on?

Xanthine 04-11-2002 12:36 AM

Nevermind I just noticed it does not display mods/admins searches, thanks for the hack :D

akaler 04-14-2002 12:04 PM

Thanks for the great hack.

I had some problems, too. I just installed this on my vb 2.2.5 board, and nothing was showing for me. I tried logging out, logging in as a normal user, using the vb as a guest, etc. Nothing. Then I read through all the messages carefully, and found the original $lastsearch= code. I changed

$lastsearches=$DB_site->query('SELECT searchid,postids,dateline,querystring FROM search LEFT JOIN user USING (userid) WHERE querystring!="" AND usergroupid NOT IN (5,6,7) ORDER BY searchid desc LIMIT 0,10');

to the original

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

Then EVERYTHING appeared.

I then reverted it back to the new code... and bam... it continued working.

As I see a lot of the people here had the original code, then updated it to the security corrected code... I think there might be some issues for brand new installs. Something overlooked.

Also, searches by guests don't show with the security corrected code. Only ones made by normal users. Is that normal?

nuno 04-14-2002 12:36 PM

heh thx akaler that one was a huge tip man :-)
nice hack AntiOnline

Legacy 04-14-2002 06:52 PM

GJ..installed on 2.2.5 not to many problems as long as you read all these threads carefully

GJ...thx

Crazy Mofo 04-15-2002 12:47 AM

how can you make it like here so it doesnt show the black lines?

Crazy Mofo 04-15-2002 12:47 AM

nm

Crazy Mofo 04-15-2002 03:01 AM

actully how do you get it so theres no spaces between eace line?

e.g

https://vborg.vbsupport.ru/search.php?s=

Twig Deez 04-16-2002 09:00 AM

working fine for me. great hack! :D

212rikanmofo 04-22-2002 09:59 AM

this hack doesnt show up anything for me when i use

$lastsearches=$DB_site->query('SELECT searchid,postids,dateline,querystring FROM search LEFT JOIN user USING (userid) WHERE querystring!="" AND usergroupid NOT IN (5,6,7) ORDER BY searchid desc LIMIT 0,10');

but it shows up when i use:

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

what gives??? and how come it doesnt display the user who ran the search like on here?

212rikanmofo 04-22-2002 10:08 AM

i found out why it wasn't displaying... it was filtering out the usergroup id's and unfortunately everyone doesnt have the same userids for there usergroups...

Code:

$lastsearches=$DB_site->query('SELECT searchid,postids,dateline,querystring FROM search LEFT JOIN user USING (userid) WHERE querystring!="" AND usergroupid NOT IN (5,6,7) ORDER BY searchid desc LIMIT 0,10');
see where it says 5,6,7? i changed it to 1 and it shows up...

how do you findout what ID each of your usergroups are?

inetd 04-22-2002 04:37 PM

FireFly, please post version of hack in used this board. :)

akaler 04-22-2002 09:29 PM

That'd be cool if firefly did that! Except that, for me, I'd want to remove the bit of code that displays someone's name. If I left it in, I'd feel like one of those nasty kids who pulled down other kid's pants in school. ;)

BTW... I continue to have some issues with this hack myself (as you can read above, i couldn't even get it going without taking out security modified queries, toying around, then placing the security modified queries back in) .

Even though usergroups 5, 6 and 7 are blocked exclusively, the hack still doesn't show searches by guests/not logged in folks (group 1), even though they can certainly perform searches.

And something else I just noticed is that people in group 3 -- awaiting email moderation -- their searches DO show up... but when I click on them in the last 10 list, nothing comes up! For one, it says "101 posts" next to the search, yet when I click on it and vB respond back saying "Sorry, no matches". (I've tried it logged on as both an admin and a normal registered user)

If I then do the *exact* same search again as as a normal user (group 2), then the search works, and it's entry on the last 10 list works, too... for everyone, in all groups. (as far as I can tell, anyway)

Kinda funky.

My usergroups are default.
Group 1 are Unregistered/not logged in.
Group 2 are normal Registered Users.
Group 3 are Users Awaiting Email Confirmation.
Group 4 are COPPA Users Awaiting Moderation.
Group 5 are Super Moderators.
Group 6 are Administrators.
Group 7 are Moderators.

Since my vB is so new, a lot of other things are default, too, and the code itself is relatively unhacked.

Any tips anyone?

212rikanmofo, in your vB control panel, on the left side of the screen, look for "User Groups". Under that, select "Modify". Hover your mouse over "Edit" link for each group, and in the url displayed on the status line of your browser.. at the very end, you'll something like &usergroup=7. That's the method I use to tell which usergroup is assigned to each number.

TheComputerGuy 04-23-2002 12:52 AM

Great hack, clicked installed.

www.gunandgame.com/forums/search.php :)

Thanks so much!

Entourage 04-23-2002 10:57 AM

cool one mate! tnx

akaler 04-23-2002 02:10 PM

Man, this seems to be working for sooo many people without problems. Makes those of us with 'issues' wonder 'what's wrong with meeeee????' like we're infected with the 'stupid' virus or something :D

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 04:18 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.01384 seconds
  • Memory Usage 1,848KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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