It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
high rated
As some people may already know I've been working on a script to improve the search function on the forum. I've got it to a point where it should be useful to the majority of users, so here it is.

Current Version:1.0

Feature List:
You can:
- Search within posts for text
- Search for posts by usernames in a thread
- Search for multiple search terms (separate them with a ';' or a '&' see below for further details)
- Search within bolded text (mainly for use in the Mafia games, but I'm sure you can guys can find other uses :) )
- Filter for replies to your posts (shows replies to replies as well, currently redirects to My Recent Posts on forum page)
- Specify what pages of the thread to search within (the page numbers are inclusive, so 1 - 4 includes pages 1 & 4, currently limited to 300 pages to prevent crashes)
- Search within the forums for threads by username and thread title (currently doesn't search actual post content, only username or title)
- Search within the results of a previous search
- Highlight the search term within the results

Update Log:
0.3
- Search within the forums for threads by username and thread title
- Shows if no results have been found
0.3.14
- Set username and posts checkboxes to checked as default
- Fixed (hopefully) auto updating
0.3.15
- Fixed bug that meant already read threads weren't searched or returned when searching by thread title.
0.3.2
- Added Version Number beneath Go button
- Added shortcut to perform search if Enter is pressed while typing in any of the text boxes (Search, First Page, End Page)
0.3.21
- Minor cosmetic changes
0.3.3
- Can now filter for replies to you within a thread
0.4
- Added searching within bold text
- Fixed compatibility issue with Barefoot Essentials quick reply
- Changed versioning scheme to ensure proper updates
0.4.1
- Results now show the total number of returned threads / posts at the top along with the time taken.
0.4.2
- Added ability to search within search results (also works to search the current page only)
0.4.3
- Fixed incompatibility with new version of Barefoot Essentials (forum searching wouldn't work if you used the newly implemented feature to drop the hash code in the URL)
- Added ability to search for multiple terms
0.4.4
- Fixed error with version number
0.4.6
- Fixed error introduced in 0.4.3 that prevented thread searches from working in Firefox.
- Added some debug stuff in case of problems and errors in the future.
0.4.7
- AND searching implemented in addition to OR searching
1.0
- Added ability to highlight text within results (through an external JQuery plug in)

Planned features:
- Abort a search before finishing
- Search by date of posts
- Search by high or low rated posts (possibly)
- Paged browsing of search results (I know, not a popular subject right now, but I promise I will leave the option to show everything on one page)
- Search within posts on the forum (i.e. search by content of posts rather than title alone)
- And any suggestions are welcome too!

Installation Instructions:

Installing the userscript requires an extension like or [url=https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo]TamperMonkey, if you already use Barefoot Essentials you should have one of these already (and if you don't use it why not? It's excellent!)
The installation instructions for those can be found on the Barefoot Essentials thread, I can't say I can help much with that side of it...

Once you've got a userscript extension you can install the script by visiting this page and clicking the Raw button in the corner of the script box.

Using the Script

Once installed and active the search box appears at the top of every page in the forum, right now it doesn't work on the forums themselves, only in threads. Enter the search term in the box, and the pages to search between (leave them blank to search the whole of a thread, but be careful with bigger threads as this may take a while) and tick the check boxes of where you want to search (posts and usernames) and click Go to search.
The script will clear the current page of the thread you are on and repopulate it with posts that match your search criteria, this can take a while depending on how many pages you are searching and posts do not appear until each page has been filtered.

Multiple Search Terms
New to version 0.4.3
You can now search for more than one term at a time and results will return any post or thread that matches either (an OR clause rather than an AND, for those who care). To search for multiple terms they need to be separated by a semi-colon (;). Each term is trimmed for whitespace at either end (so 'term 1;term 2' and 'term 1 ; term 2' will return the same result).
New to version 0.4.7
You can now perform AND searches in addition to OR ones (so results will only be returned if all the search terms are included)
To do so separate the terms with an ampersand (&). Terms are trimmed for whitespace as before.
If both AND and OR separators are included then they would be split as follows:
- "A ; B & C" is A or (B and C)
- "A & B ; C" is (A and B) or C
- "A & B ; C & D" is (A and B) or (C and D)

And that's it, enjoy.

I'll try and update it when I can, to search on the forum itself is the next priority.
Let me know if there are any bugs or problems with it and I'll try and fix them.
Post edited August 09, 2015 by adaliabooks
Cheers, adaliabooks, favourite and +1.

With our discussion about having to enter 0 to include page 1 in mind, I'd like to ask if this also affects searches within a range of pages, say pages 4-12.
Right Imma seeing it.

The corners clash a bit with the rounded edges, but it looks good so far.

EDIT: It kind of doesn't work.

I put a search term, without specifying page numbers and it didn't return anything.

Any further searchs are ignored.

EDIT 2: Ok, it does search, it's simply that it takes a long time.
Post edited May 15, 2015 by j0ekerr
Installed with TamperMonkey, and it looks like it's working beautifully.

Give than man some bacon and a doughnut.
avatar
HypersomniacLive: Cheers, adaliabooks, favourite and +1.

With our discussion about having to enter 0 to include page 1 in mind, I'd like to ask if this also affects searches within a range of pages, say pages 4-12.
Sorry, forgot to mention. This one has been changed so the basic behavior works from page 1 (it should work with page 0 too, but you'll most likely get an error, although I don't think it will crash)

It's inclusive of the start and end page number basically.
avatar
j0ekerr: Right Imma seeing it.

The corners clash a bit with the rounded edges, but it looks good so far.

EDIT: It kind of doesn't work.

I put a search term, without specifying page numbers and it didn't return anything.

Any further searchs are ignored.

EDIT 2: Ok, it does search, it's simply that it takes a long time.
Yeah, still needs some formatting stuff probably, but that was largely a secondary concern.

It can take a while to return anything, and I just tried to use it to search the whole free for all thread and now I can't access the forum in Chrome... so I may have to limit the number of pages you search (200 seemed to work earlier and only take a short while)

Unfortunately there's not much I can do to make it faster unless GoG wants to make me a read only user of their underlying database, which is unlikely...
Post edited May 15, 2015 by adaliabooks
avatar
adaliabooks: Sorry, forgot to mention. This one has been changed so the basic behavior works from page 1 (it should work with page 0 too, but you'll most likely get an error, although I don't think it will crash)

It's inclusive of the start and end page number basically. Yeah, still needs some formatting stuff probably, but that was largely a secondary concern.

It can take a while to return anything, and I just tried to use it to search the whole free for all thread and now I can't access the forum in Chrome... so I may have to limit the number of pages you search (200 seemed to work earlier and only take a short while)

Unfortunately there's not much I can do to make it faster unless GoG wants to make me a read only user of their underlying database, which is unlikely...
Yep, the speed of returned queries is a major concern. It takes a bit too much at the moment. But from what you say, there's nothing you can really do about that.

It's also a resource hog. When I set it to search for a word on the convo thread without specifying page limits, Firefox memory footrpint jumped from 300 megs to over a gig in about a minute before I stopped it.

Edit: So after limiting the search to 10 or 20 pages it works like a charm.

But you really need to include a "no results found for your search" message.
Post edited May 15, 2015 by j0ekerr
avatar
adaliabooks: Sorry, forgot to mention. This one has been changed so the basic behavior works from page 1 (it should work with page 0 too, but you'll most likely get an error, although I don't think it will crash)

It's inclusive of the start and end page number basically. Yeah, still needs some formatting stuff probably, but that was largely a secondary concern.

[...]
Cheers. So, what happens if one has the mafia script already installed?
avatar
j0ekerr: Yep, the speed of returned queries is a major concern. It takes a bit too much at the moment. But from what you say, there's nothing you can really do about that.

It's also a resource hog. When I set it to search for a word on the convo thread without specifying page limits, Firefox memory footrpint jumped from 300 megs to over a gig in about a minute before I stopped it.
Yeah... don't use it in the convo thread unless you specify certain pages... XD

If anyone who knows more about Javascript can enlighten me of a way to make it quicker or less of a hog please feel free, I barely know what I'm doing...

I did originally have it return posts as the pages were filtered, but the problem was they were added in a pretty random order as pages with less hits returned before earlier pages with more hits, so I have it wait till all the posts are gathered and then display them.
avatar
adaliabooks: Sorry, forgot to mention. This one has been changed so the basic behavior works from page 1 (it should work with page 0 too, but you'll most likely get an error, although I don't think it will crash)

It's inclusive of the start and end page number basically. Yeah, still needs some formatting stuff probably, but that was largely a secondary concern.

[...]
avatar
HypersomniacLive: Cheers. So, what happens if one has the mafia script already installed?
They seem to over write each other, I did have both enabled earlier and didn't get two search bars, so I have no idea what functionality you get with both on (feel free to try if you want! XD). I'd recommend just switching the mafia one off, unless you specifically want it (the vote filtering is the only feature lacking from the new script) in which case turn the general one off.

Edit: Scratch that, they do both appear. But they mess up the formatting of the top of the forum by both being there (plus they use the same names for elements so the results of searching may be weird)
Post edited May 15, 2015 by adaliabooks
Bump

Forum seems to be flooded with necroposts (I wonder why...) so I thought I'd just give people a chance to see this.
Great work! Thank you, adalia!
bump
Great work. Really like so far. Thank you and +1!
that's just crazy.. so basically you download the whole forum on your computer each time you try a simple search?.. and what's the reason of searching anyway - i got notepad! whenever i see something important i write it down; or add a bookmark in firefox.
Brilliant work! Thank you, adaliabooks! You're a hero. +++++1! :)
Post edited May 16, 2015 by Pardinuz
avatar
ciomalau: that's just crazy.. so basically you download the whole forum on your computer each time you try a simple search?.. and what's the reason of searching anyway - i got notepad! whenever i see something important i write it down; or add a bookmark in firefox.
Yeah, it isn't the most efficient way but it's the best I could come up with.
That being said, you've given me an idea. I should be able to just run the search once a day over all the forums and archive the results in a database somewhere, and then search on that instead.. which should be a lot quicker and less resource intensive. I'll look into this.

avatar
Pardinuz: Brilliant work! Thank you, adaliabooks! You're a hero. +++++1! :)
No problem, glad you like it :)