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)

Boofo 12-23-2002 08:06 AM

Quote:

Originally posted by Squirre1
Hey FireFly, you might want to check me on this one...

I looked into this because I have not been able to see any searchs that I am performing



Are you searching with a regular user account?

Quote:

.. Based on the below quote from the MySQL manual:

If the search was performed by a guest which has an account value of "0", it tries to do the NOT IN which it can not compare to anything because that account does not exist in the user table...

I think this should be a correct query, I have tested here and it is working with no issues:

SELECT searchid,postids,dateline,querystring FROM search LEFT JOIN user USING (userid) WHERE querystring!="" AND (usergroupid NOT IN (5,6,7) OR search.userid = "0") ORDER BY searchid desc LIMIT 0,10
I guess I'm not sure why you would need to add the OR search.userid = "0" part. I'm not very good at mySQL, though. :)

Quote:

Also, as a note to some people, I had to upgrade my search.php in order the get the links created correctly so other users could access them. Otherwise, I got a user is not authorized message.

Enjoy this info folks.... !!
How did you upgrade? I am running 2.2.9 and it seems to work fine here.

Squirre1 12-23-2002 11:18 AM

When I say I had to upgrade... It was from the 2.2.6 Search.php to the 2.2.9 search.php... Also, the listings that did not get displayed were guest listing... Guests also have the option to search my forums and it was there searches that were not coming up in the last 10 searches list... BUT, registered users searches were...

Boofo 12-24-2002 11:37 PM

I see what you mean now. Their searches don't show on the listing, but they are still able to search. I like it the way it is now, though. I also allow them to search, but not be listed in the last 15 (I set it to that). Gives them more of an incentive to register. :)

Da`Nacho 12-25-2002 09:11 PM

Quote:

Originally posted by User_001
Nice hack, Thanks.

And i don't think you want to have Mods and admins searches shown...unless there is a way of checking user permissions in the search(if the user is an admin or mod then it shows All post by the admin or mod). IMO, a serious flaw in security.

Just so everyone knows, I think this was fixed in vBulletin 2.2.8 so that permissions are checked before sending the user the search results. I've checked on my forum and search results matching threads said user doesn't have access to no longer seem to show up. As a result I have removed the 'not in 5,6,7' part of the hack on my forums and things are working peachy.

mini2 03-02-2003 09:58 AM

Quote:

Originally posted by Da`Nacho


Just so everyone knows, I think this was fixed in vBulletin 2.2.8 so that permissions are checked before sending the user the search results. I've checked on my forum and search results matching threads said user doesn't have access to no longer seem to show up. As a result I have removed the 'not in 5,6,7' part of the hack on my forums and things are working peachy.

Just installed this hack, very cool. I'm addicted to vB hacking now!

www.mini2.com/forum/search.php

Is the above (regarding the 'bug fix') correct, is it safe to remove the 'not in 5,6,7' section of the query?

Brother 03-10-2003 07:24 AM

I use it in my version 2.3.0 and it works :)

monstergamer 03-10-2003 04:29 PM

great hack
love it
clicks install

Sweet Cheeks 03-21-2003 03:59 PM

Quote:

06-20-02 at 05:31 AM Kathy said this in Post #91
This is a great help to me. Thanks!

I'm wondering about making it possible for admin to see the users on this page? (Or have a page just for admin to see the searches?)

Yes I'd love this too, did anyone ever figure out how to do this? :D

Snapperhaed 03-22-2003 03:30 AM

Nice hack! Thanks! Works fine on v2.3.3

Brooke 03-24-2003 03:01 PM

Easily installed on 2.3 release 3. Thanks!!

Intex 03-31-2003 11:50 AM

Installed and works fine - just make sure you set the correct usergroup ID's dependent upon who you want to list search results for, whilst taking into consideration the security implications.

[high]* Intex clicks install :cool:.[/high]

0ptima 04-13-2003 02:37 AM

I installed it on 2.3.0

neocorteqz 04-14-2003 01:56 PM

Quote:

12-25-02 at 07:05 PM Da`Nacho said this in Post #124
Just so everyone knows, I think this was fixed in vBulletin 2.2.8 so that permissions are checked before sending the user the search results. I've checked on my forum and search results matching threads said user doesn't have access to no longer seem to show up. As a result I have removed the 'not in 5,6,7' part of the hack on my forums and things are working peachy.
Nice, thanks for letting us know that.

I'd also like to know if it's possible to list which user searched for what.. For admins only of course.

Doubledoom 04-30-2003 09:28 AM

installed on 2.3.0 and removed the NOT IN part and permissions are working fine.

Thanks.

:Judge: 05-02-2003 01:28 AM

I had trouble at first tryin to edit www/search.php

I figured out that I needed to edit www/forums/search.php so it is workin now like a charm.

I don't know if I missed something here but this does not look like the last 10 searchs here, mine is pretty big.

The last 10 takes up alot of space on the page, anyway to slim it down some?

Might help if I add a link
http://www.planetquintessa.com/forums/search.php?

OmaniMan 05-04-2003 12:25 AM

Great :cheeky: ,,
WellDone :bandit: ,,
Wish You The Best ...

S.Shady 05-04-2003 01:37 AM

get it working on 2.3.0 any one ?

OmaniMan 05-04-2003 01:40 AM

Yes S.Shady,,
It works with me easily ...

S.Shady 05-07-2003 08:47 PM

Quote:

04-22-02 at 06:59 AM 212rikanmofo said this in Post #64
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?


I have the same thing here and im on vB 2.3.0. Also on my board it says the date as 12-31-1969 at 07:00 PM

screen shot of my board is in attachment.

@ OmaniMan > can you pm me what you have in your search.php that you added ?


[edit] nvm i got it to work. How? i don't know lol but its working fine. Thanks for the great hack

mmmender 05-07-2003 11:40 PM

works great for me, thanks! 2.2.9

OmaniMan 05-07-2003 11:46 PM

Brother S.Shady ,,,

It shows up correctly brother ,,,

Boofo 05-08-2003 01:16 AM

Quote:

Today at 04:47 PM S.Shady said this in Post #139
I have the same thing here and im on vB 2.3.0. Also on my board it says the date as 12-31-1969 at 07:00 PM

screen shot of my board is in attachment.

@ OmaniMan > can you pm me what you have in your search.php that you added ?


[edit] nvm i got it to work. How? i don't know lol but its working fine. Thanks for the great hack


How did you fix the date problem? ;)

Oblivion Knight 05-08-2003 02:57 PM

Installed on 2.3.0 RC3 with similar modifications that Chen made..
http://www.umbrellaonline.co.uk/forums/search.php

All seems to be working well, great hack :)

S.Shady 05-20-2003 02:30 AM

Quote:

05-07-03 at 10:16 PM Boofo said this in Post #142
How did you fix the date problem? ;)

i dont know lol i was messing with chens fix for the admins not showing changing it back and forth and it worked for some reason

S.Shady 05-22-2003 12:33 AM

Lmao gues what i did. I reformated my hd and had to reupload my last backup of everything before i reformated right. so upload the files and all but then my problem goes back. :(

So i took out the mod supermod and admin part and got it working. Ill mess with it to see if i can get it working again :)

gmarik 05-24-2003 10:05 AM

A wish:

Make a DB, where the top 10 most searched names are stored of all the searches made. That would be really of some good, so admin would know, what they're users are after for.

Talisman 06-04-2003 03:49 AM

Mine's not working quite right. When I search for something that's already been searched for (logged in as a regular member; not an admin), it does not appear on the Last 10 listing...... if say, it was searched for 20 or 30 searches ago.

The "last 10" list only shows search strings that have NEVER been searched for before.

How do we dump old searches so people can find them again?

Talisman 06-06-2003 06:06 AM

Hello? Please help.

This is a great hack. But when we search for something that's already been searched for..... it won't show up on the "Last 10 Searches" list.

That's not how this function works here. So what's wrong with the code?

What do I do?

Thanks!!

Boofo 06-06-2003 06:11 AM

Jump on my site and check out my search page. Play with it a bit and see if it does what you want. If it does, let me know and I can give you the modified code that I use for the hack.

Talisman 06-07-2003 05:31 AM

Ohh, yes. That's a lovely arrangement, Boof..... except for your dreadful color scheme and that gawd-awful mouse flapping around all over the place. ;) (He's so much like our wild banana-man.)

:banana: :banana: :banana:

That would really help to see the code you're using. (Thanks!) Maybe then I could spot the problem with mine.... figure out why it won't let us list the same search twice.

I've made a few of the same changes you did at the top - mostly the way Chen set this up here. But then I gave up trying to get rid of the lines between rows. I know that's a very simple change to make..... just very annoying that I couldn't find what I was looking for.

As usual, you made some very nice changes to the basic hack. I really like what you've done with the central search section. On our search page (here), I also added the Google-Web Search hack at the bottom.

Boofo 06-07-2003 06:03 AM

You know, attacking my mascot (the mouse) is not nice, young lady. ;) And he's not "flapping", he's dancing. His twin brother is on the vBHome Lite page (www.bearfacts2.com).

The central search section is because I added the MySQL 4 Search hack (here at vb.org). If you are running MySQL version 4 on your host server, you can run this hack, too.

I can pm you the instructions for my search setup if you want them. The part for the code without the lines is in there, too. Jump on the site and pm me if you want it, and I will get it to you.

Talisman 06-07-2003 06:08 AM

Quote:

Today at 12:03 AM Boofo said this in Post #151
His twin brother is on the vBHome Lite page (www.bearfacts2.com).
Oh sure...... like having one freaked out rodent at the site's not weird enough, you've got to have two of them.

:p

(I'll be right over.)

Boofo 06-07-2003 06:24 AM

You need to turn on private messaging on the site or I can't send you anything. ;)

Talisman 06-07-2003 09:07 AM

(Hehe.... what an impatient fella, he is.)

Talisman 06-07-2003 07:22 PM

I really appreciate your help, Boof. I guess the problem is something to do with how my database tables are set up or the way my query is running..... maybe?

When I installed the hack, I moved the columns and variables around like they did at this site ..... (it's a nicer layout). Looks like you did the same thing in the code you sent me. Only you figured out how to also get rid of the lines (which I couldn't do).

Just to be sure, though, I threw out my formatting changes and overwrote that portion of my code with yours. (Thankfully, we didn't pick up any stray hairs from that jumping rat you hang out with.) :cheeky:

Even so.... the search list indexing still doesn't work the same way at my site as it does at your site. Even when this part of our php file and our template were the same for this hack. So I guess that leaves the database as the place to check, right? Or maybe there's some other instruction further up in the search.php file that has an affect on this? (I am using an older vB 2.2.6...... but then, this hack has been out for a while, too.)

You can see how the search list is displayed in the screenshot I attached here. I put a red mark by the ones I searched for a second time. See how the date was overwritten? And these two items stayed on the list in the same position. They didn't repeat and didn't move up to the top like yours does.

And when I searched again for a keyword that's already dropped off the list ..... it didn't show up at all.

Boofo 06-07-2003 08:34 PM

That's how it is supposed to work. That's how it works on my site. The only way it will add a new entry on the list for a word that is already on the list is if the amount of posts that has that word in it has changed. Go ahead and make a test message with one of the words on the list in it and then do another search for that word and you will see what I mean.

Talisman 06-07-2003 08:40 PM

No, it doesn't. That's what I checked there last night.

Go look at your search list now and you'll see the keyword search for "testing" is listed three different times..... and always in the order in which it was searched.

At my site, the previous instance gets overwritten. And it won't show at all if it's something that has been on the list previously.

Talisman 06-07-2003 08:45 PM

Hey..... I see now. Those "testing" searches did show up again because there were new posts in the result that weren't included in the earlier searches.

I just went there and picked a different keyword already on your list. No new posts have been made containing the word "mouse," (lol..... no wonder?) ..... so it didn't need a new entry. Just changed the date/time.

Boofo 06-07-2003 08:48 PM

I just looked at it and the amount of post matches is different for each instance of "testing". When I was testing it yesterday, the only thing that was changing for a word that was already in the list, was the time was being overwritten if I searched for a word that was already on the list, which is what it should do instead of having the same word listed over and over. ;)

Boofo 06-07-2003 08:51 PM

LOL We wrote at the same time. Is that how you wanted it to work?


All times are GMT. The time now is 11:56 PM.

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.01665 seconds
  • Memory Usage 1,832KB
  • 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
  • (11)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