Searching the forums

Rules, Regulations, Announcements, Technical Issues, Etc.
Post Reply
User avatar
melonkernel
Apprentice
Posts: 179
Joined: Fri Apr 18, 2008 6:27 am
Location: Finland

Searching the forums

Post by melonkernel »

Hi. I have noticed that PHPbb2 forums have (like this one) have a rather uneffective search function (PHPbb3 is out, that might have a better search function). You find the thing you are interrested in much better if you use google and narrow the search to the specific site you are interested in.

You search like this in Google

Code: Select all

organizing lego site:classic-castle.com
Which means that Google will only show results that come from that specific site. And i find it more effective than using the buil in search function of the forum itself.

But it is of course difficult to leave the page, and go to google, and having to type in the extra site:classic-castle.com, therefore i made a little JavaScript snippet that you can save as a bookmark, and have it as a shortcut in your bookmark bar (if your browser has one)

I did this, copy pasted the code, created a new bookmark, added the whole thing as an URL.
When you click on the bookmark, a box opens where you can write your search term, then you are taken to google showing the search results for the site in question.

I made two version.
The first one searches for the term in classic-castles forum only.

Code: Select all

javascript:document.write("<script>var site='http://classic-castle.com/forum/'; var searchTerm = prompt('Search in Classic-Castle forums for:'); window.location = 'http://www.google.com/search?q=' + searchTerm + ' site%3A' + site;</script>");
The other version searches on the site you have currently open (but it can become confusing).

Code: Select all

javascript:document.write("<script>var site=window.location.hostname; var searchTerm = prompt('Search in '+site+' for:'); window.location = 'http://www.google.com/search?q=' + searchTerm + ' site%3A' + site;</script>");
Love
- Melonkernel
Last edited by melonkernel on Mon May 19, 2008 8:02 am, edited 2 times in total.
User avatar
melonkernel
Apprentice
Posts: 179
Joined: Fri Apr 18, 2008 6:27 am
Location: Finland

Post by melonkernel »

Oh, you can test them, If you want to see how it works by copy-pasting the code into your Address field as a normal address.

I have tested it on Safari and Firefox, but not in Internet Explorer, so please tell me if it works there as well.
Last edited by melonkernel on Mon May 19, 2008 8:03 am, edited 1 time in total.
User avatar
melonkernel
Apprentice
Posts: 179
Joined: Fri Apr 18, 2008 6:27 am
Location: Finland

Post by melonkernel »

However, new posts might not be found, because it takes a while for Google to index the pages. But, new posts are seen by all anyway when we eagerly following what happens in the forums and check new post as they come. So this is good for reading a week old or older threads.
User avatar
melonkernel
Apprentice
Posts: 179
Joined: Fri Apr 18, 2008 6:27 am
Location: Finland

This is what it looks like

Post by melonkernel »

I click on the bookmark ...
Image

... enter the search term
Image

... And voilá, Google finds it for me.
Image


p.s. this is my 50'th post here. Yay. :) This is the best forum ever.
User avatar
E of Alshire
Merchant
Posts: 1289
Joined: Sun Aug 28, 2005 1:10 am
Location: Tulsa, OK
Contact:

Post by E of Alshire »

This is really neat... I'll play around with it a bit in IE when I get a few minutes! I'm envious of anyone who can code even the most rudementary of scripts.
User avatar
Aliencat
Josh's Minion
Posts: 2177
Joined: Wed Jun 20, 2007 3:21 pm
Contact:

Re: Searching the forums

Post by Aliencat »

Nice summary melonkernel, I would like to add a few things:
melonkernel wrote:Hi. I have noticed that PHPbb2 forums have (like this one) have a rather uneffective search function (PHPbb3 is out, that might have a better search function). You find the thing you are interrested in much better if you use google and narrow the search to the specific site you are interested in.
PHPbb3's search function is about as broad as that of PHPbb2, so you still get a million threads that have the word you seek somewhere in it. It's not any better in the new version.
melonkernel wrote:Oh, you can test them, If you want to see how it works by copy-pasting the code into your Address field as a normal address.

I have tested it on Safari and Firefox, but not in Internet Explorer, so please tell me if it works there as well.
Just to confirm: it works the same in Internet Explorer.
Between plotting to kill you all and chasing balls of yarn, I also build [url=https://www.flickr.com/photos/30639040@N02/albums]MOCs[/url]

[img]http://stopthetrack.com/lego/embassy/alienambassadorpng.png[/img]
User avatar
wunztwice
Knight Bannerett
Posts: 2656
Joined: Tue Nov 29, 2005 5:33 pm
Location: Eastern Oregon
Contact:

Post by wunztwice »

Hey great, and as far a leaving the site to search, if you have firefox, (or the new versions of Explorer or Safari, I hear) you can simply open a new tab for google, and still have C-C and google in the same window.
in His grip, Chris

Feed my hobby? [url=http://www.bricklink.com/store.asp?p=wunztwice]My Bricklink[/url]

[url=http://www.flickr.com/photos/wunztwice]My Flickr![/url]
[url=http://www.brickshelf.com/gallery/wunztwice/]My Brickshelf![/url](not updated...)
<><
User avatar
wobnam
Master Liliputian
Master Liliputian
Posts: 566
Joined: Sat Mar 01, 2008 11:15 pm

Post by wobnam »

Well, even before tabbed browsing (IE 6 or lower, for instance) you could still just open another browser - the only difference would be where the tab ended up, in your browser or on your task bar ;)

But that's off topic. Nice work, melonkernel.
User avatar
Bruce N H
Precentor of the Scriptorium
Posts: 6311
Joined: Mon Sep 15, 2003 9:11 pm
Location: Middle Zealand
Contact:

Post by Bruce N H »

Hey,

This is really cool. I'm going to shift it to "Administrative", which would be a better fit for this topic.

Bruce
[url=http://comicbricks.blogspot.com/]ComicBricks[/url] [url=http://godbricks.blogspot.com/]GodBricks[/url] [url=http://microbricks.blogspot.com/]MicroBricks[/url] [url=http://minilandbricks.blogspot.com/]MinilandBricks[/url] [url=http://scibricks.blogspot.com/]SciBricks[/url] [url=http://vignettebricks.blogspot.com/]VignetteBricks[/url] [url=http://www.classic-castle.com/bricktales/]Brick Tales[/url]
User avatar
FirebenderDude2
Journeyman
Posts: 425
Joined: Wed Feb 27, 2008 11:32 am
Location: In my head.

Post by FirebenderDude2 »

I just looked it over, and I have one comment:

USE THE EDIT BUTTON! Four posts in a row is overdoing it.
Woe is me, woe is me, I used to have a hamster tree. Then it got eaten by a newt and now I have no cuddly fruit.
User avatar
architect
Baron von Ellermann
Posts: 3708
Joined: Mon Sep 08, 2003 5:10 pm
Location: Saint Louis, MO USA
Contact:

Post by architect »

FirebenderDude2 wrote:I just looked it over, and I have one comment:

USE THE EDIT BUTTON! Four posts in a row is overdoing it.
While you are correct that multiple posts in a row are in bad taste, a regular forum member should not enforce the Terms of Service. In the future, please pm an administrator or moderator to deal with any problem you have with another CC member.

Ben
CC Sets Admin
Post Reply