Improving the autolinking of set numbers

paul_mertonpaul_merton UKMember Posts: 2,951
Would it be possible to augment the autolinking of set numbers so that you can hover over the set number to see the name of the set?

Example: #8038
(hover your mouse cursor over the number)
princedravenCCCMorkMan

Comments

  • princedravenprincedraven Essex, UKMember Posts: 3,768
    ^ I have often thought that would be a great idea, never got around to suggesting it though.
    No idea if it is possible but would be a really nice addition.
  • JosephJoseph Member Posts: 651
    ^^ An excellent idea. I believe @brickmatic was the creator of the code so I'd suggest asking him about that.
  • LegobrandonCPLegobrandonCP CanadaMember Posts: 1,909
    I see it has already been implemented!
  • MatthewMatthew Cheshire, UKAdministrator Posts: 3,734
    edited December 2012
    ^ No! That was an example that Paul created by manually putting in a link!
  • brickmaticbrickmatic Member Posts: 1,071
    Ah yes, having the name of the set without leaving the page would be nice. So right now the script is simply altering an existing link using information on the page. In order to get the set name, the script would have to pull that information from the set page. One thing that might be a problem is that the set page and the discussion page are on different domains. I'll look into it and see if I can come up with something or not.
  • paul_mertonpaul_merton UKMember Posts: 2,951
    Thinking about it the other way round: Rather than the forum fetching the information from brickset.com, brickset could generate a script which maps all the valid set numbers to names. If that's uploaded to the forum each day (is that possible? - I don't know) then the forum could handle all the linking itself without requiring any realtime cross-domain requests. It could be a large script, but it would only need to be invoked when someone actually posts. As an added bonus, invalid set numbers wouldn't be linked.
  • brickmaticbrickmatic Member Posts: 1,071
    Since the forums are a third party hosted solution, there isn't that much ability to change things. That's why javascript was used. Processing is all client side.
  • paul_mertonpaul_merton UKMember Posts: 2,951
    Surely this could be done client-side, too?
  • sidersddsidersdd USAMember Posts: 2,432
    I've built something related which could accomplish this. The downsides are that it requires a browser "plug-in" (which may or may not work outside of IE), and that you have to highlight the text first (vs. a simple mouse-over). The upside is that it can include an image of the set, links to reviews, etc., and it works on any web page you are browsing (not just Brickset Forums).
    http://www.bricksetforum.com/discussion/4016/browser-accelerators-for-set-numbers

    If nothing else it would be a good complement to this. I just need to get the details sent to @Huw, like I keep promising to do. I have next week off for vacation so I shall try and accomplish it then.
  • paul_mertonpaul_merton UKMember Posts: 2,951
    Can't the javascript be generated by, and be kept up to date, directly on brickset.com, and be included on the forum in the same way as all of the other externally sourced scripts?
  • legomasonlegomason Member Posts: 190
    This would be so helpful.
  • MorkManMorkMan Phoenix, Arizona, USAMember Posts: 857
    Agreed. I've taken to having a printout of the 10xxx numbers posted on my wall.
Sign In or Register to comment.
Recent discussions Categories Privacy Policy