paulrobinson

Forum plugin to auto link set numbers

7 posts in this topic

It's very common to refer to sets by there number. This is great for accuracy and it's concise, but most people don't know all the sets by number. What I normally do is google for the set to see which it is; but this is a hassle.

Does anyone know if it would it be possible to create a plugin for this forum that detected set numbers in posts and converted the set numbers to links to the set. Maybe to rebrickable, for example?

Paul.

Share this post


Link to post
Share on other sites

I can't answer about whether a plugin would detect the numbers automatically, but it might run into problems with numbers in links etc. You can always use the Set Index; It isn't complete, but most sets are in there, I think.

[sdex]<set number>[/sdex]

Like this:

8448

I'll move this to Website & Forums.

Share this post


Link to post
Share on other sites

That looks handy. The only problem is that it relies on the poster to use it.

You might be safe by only replacing a sequence of 4 or 5 digits surrounded by white space or punctuation.

Share this post


Link to post
Share on other sites

Sounds like a good idea to me. The aviation forum I frequent uses something similar to label airport codes. If I place my cursor over the airport code, like LAX, then the name of the airport will appear above the airport code, which in this case, would be Los Angeles International Airport. It's a nice feature, especially when somebody is using the airport code for some obscure airport that I've never heard of.

Something like that for LEGO set numbers would be pretty handy, IMHO.

Share this post


Link to post
Share on other sites

This has been discussed before, and as Rufus mentioned one of the concerns raised was how the software can tell when a number is a LEGO set number, and not something else (part ID, price, number of pieces, etc). I see no easy way to automate this feature without poster input (a special code to identify authentic set numbers). :look:

Share this post


Link to post
Share on other sites

While waiting for Eurobricks to implement something like this, I developed my own little 'bookmarklet' that I use. It searches for numbers within posts, and add the set thumbnail image, as well as links to a larger image, Brickset, Bricklink, and Peeron. I do have to activate it on each page that I visit, but I tend to find that there are only certain posts that tend to have lost of set numbers mentioned. This could also be turned into a GreaseMonkey script so that it runs automatically.

The Javascript can be found here:

Info about 'bookmarklets' can be found here:

Info about GreaseMonkey can be found here:

Is it perfect? No.

Does it incorrectly match prices, piece counts, and years? Yes.

Are there other 'false positives'? Yes.

But... it works well enough for me. :sweet:

Edit: This forum didn't like the code that I tried to include. Go to the JSFiddle Page to see the code.

Edited by Splat

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.