Forums

RS-Linkify Thread is sticky

Quick find code: 261-262-33-65181208

Lafaborn
Dec Member 2008

Lafaborn

Posts: 1,648 Mithril Posts by user Forum Profile RuneMetrics Profile
Original message details are unavailable.

@Wakko C R, for now the best solution I can think of is use clan or friends list and add the names you want to ignore. Then set the background colour to the font colour that's used in forums. It's not the best solution but it works.

I'll edit this post with the font colour in just a sec.
Edit: here's the hex for the colour: #CCCCCC

Great tip, thank you, Indy . ^_^

03-Sep-2013 19:42:48

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
@Huge Charlie, wow very nice editing skills. Thanks for that, I don't think I'd have even attempted it tbh.

Oldduffer: [qfc id=259-260-166-64977831 page=10180][/qfc]
http://www.indecentcode.com/rslinkify_images/10180.png


@Zeus, Titles on forums are glitched even when they appear to work properly. Hmmmm just a sec, I didn't know they appeared on the preview page. Looking now...

Okay Zeus, that's not a glitch, that's actually the place the web designer has chosen to display titles when previewing. Why on earth they move them around so much is beyond me.

If you knew how many hours I've put into titles. So many hours sorting out the glitches and believe me they are one of the most glitched things on this site. I don't mean the suffix/prefix thing, the problems go way deeper than that. Actually playing with titles (fixing them) has impacted on just about every single feature of RS-Linkify, and the bloody titles still don't display consistently.

Anyway, I am glad you pointed that out, I knew there are number of differences on the preview page (displaying custom avatar on preview is slightly different for example), but I didn't know about the titles. As you might have guessed, I feel my time is better spent elsewhere. For now (and for the foreseeable future) they are staying as they are and I'm not touching them :)

03-Sep-2013 21:47:41

Was Zeus

Was Zeus

Posts: 22,388 Opal Posts by user Forum Profile RuneMetrics Profile
Yeah, I didn't actually want you to waste you time on something as small as that, just wanted to point it out :p ZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZEUSZE

03-Sep-2013 21:52:47

Hevilmystic
Feb Member 2022

Hevilmystic

Posts: 60,012 Emerald Posts by user Forum Profile RuneMetrics Profile
Original message details are unavailable.
Yeah, I didn't actually want you to waste you time on something as small as that, just wanted to point it out :p


Test v2

Edit: Ok found a problem.

If I highlight something another person says (or managing to misclick somewhere on the page and highlight), whether it be by accident or on purpose, then click 'quote' on somebody elses post, it says the post is from whoever's quote button I hit, but the quote contents will be the thing I highlighted. Any way to rectify this?

The main issue I have been having is managing to highlight someone's name (above their avatar) and then clicking somebody's quote, so even if you can't do it for multiple posts, it would be nice for you to limit it just for posts, rather than anything on the page.

Thanks as always :D

beep beep boop
Unslain Bosses - Clan

03-Sep-2013 23:37:34 - Last edited on 03-Sep-2013 23:41:50 by Hevilmystic

Indecent Act

Indecent Act

Posts: 7,456 Rune Posts by user Forum Profile RuneMetrics Profile
@Rowley, I was hoping no one would would stumble upon that. I guess it was just a matter of time :)

Okay it's actually not as straightforward as it might seem to fix. But here's what I'll do.

First thing I'll do is check to make sure selected text is within a post. Then I'll break the selection up into single words, and make sure every single world exists in the post, if everything matches 100% then the quote will go ahead. If it doesn't match that means the quote button that has been pressed doesn't belong to the selection, so selected text will be ignored and the post will be quoted as normal.

I can't match entire sentences or entire posts when cross referencing because they will never actually match since what RS-Linkify sees contains HTML and BB tags. Thus I need to break it into words.

This won't be 100% infallible. For example your post contains the word 'Thanks" and so does one of my posts on this page. I can still select 'Thanks' from my post and click quote on your post and it'll show quoted by you. However in 99.9% of cases this won't occur, and selecting text outside of posts can no longer be quoted.

I'm testing this out atm, and once sure it has no adverse effects I'll do an update later today :)

04-Sep-2013 02:29:05

Blasty
Feb Member 2017

Blasty

Posts: 9,319 Rune Posts by user Forum Profile RuneMetrics Profile
@Indy

Would it be more reliable if it got the parent of the selection (googled this) and looped parents till BubbleFooter then got the BubbleLinks links and checked that the quote button there matches the quote button pressed?

http://stackoverflow.com/questions/10560155/getting-the-parent-node-for-selected-text-with-rangy-library

var sel = window.getSelection();
if (sel.rangeCount > 0) {
var range = sel.getRangeAt(0);
var parentElement = range.commonAncestorContainer;
if (parentElement.nodeType == 3||parentElement.nodeType == 1) {
parentElement = parentElement.parentNode;
}
}
Blasty
// @BlastytheBlue // Blasty#5167
| Co-owner of Mine Nation

04-Sep-2013 03:56:49 - Last edited on 04-Sep-2013 04:07:28 by Blasty

Quick find code: 261-262-33-65181208 Back to Top