Classic-Castle.com


The source for all your LEGO Castle needs!

Searching the forums

Rules, Regulations, Announcements, Technical Issues, Etc.

Searching the forums

Postby melonkernel » Mon May 19, 2008 7:43 am

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

Postby melonkernel » Mon May 19, 2008 7:46 am

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

Postby melonkernel » Mon May 19, 2008 7:54 am

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

Postby melonkernel » Mon May 19, 2008 8:16 am

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
melonkernel
Apprentice
 
Posts: 179
Joined: Fri Apr 18, 2008 6:27 am
Location: Finland

Postby E of Alshire » Mon May 19, 2008 12:53 pm

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.
Image
User avatar
E of Alshire
Merchant
 
Posts: 1289
Joined: Sun Aug 28, 2005 1:10 am
Location: Tulsa, OK

Re: Searching the forums

Postby Aliencat » Mon May 19, 2008 3:39 pm

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 MOCs

Image
User avatar
Aliencat
Josh's Minion
 
Posts: 2171
Joined: Wed Jun 20, 2007 3:21 pm
Location: Malé, Maldives

Postby wunztwice » Mon May 19, 2008 7:35 pm

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? My Bricklink

My Flickr!
My Brickshelf!(not updated...)
<><
User avatar
wunztwice
Knight Bannerett
 
Posts: 2656
Joined: Tue Nov 29, 2005 5:33 pm
Location: Eastern Oregon

Postby wobnam » Mon May 19, 2008 9:31 pm

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
wobnam
Master Liliputian
Master Liliputian
 
Posts: 566
Joined: Sat Mar 01, 2008 11:15 pm

Postby Bruce N H » Mon May 19, 2008 9:46 pm

Hey,

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

Bruce
User avatar
Bruce N H
Precentor of the Scriptorium
Precentor of the Scriptorium
 
Posts: 6692
Joined: Mon Sep 15, 2003 9:11 pm
Location: Middle Zealand

Postby FirebenderDude2 » Mon May 19, 2008 10:02 pm

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
FirebenderDude2
Journeyman
 
Posts: 425
Joined: Wed Feb 27, 2008 11:32 am
Location: In my head.

Postby architect » Tue May 20, 2008 2:03 am

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
User avatar
architect
Baron von Ellermann
Baron von Ellermann
 
Posts: 4732
Joined: Mon Sep 08, 2003 5:10 pm
Location: Saint Louis, MO USA


Return to Administrative

Who is online

Users browsing this forum: No registered users and 1 guest