Allegro.cc - Online Community

Allegro.cc Forums » Allegro.cc Comments » auto quote source

This thread is locked; no one can reply to it. rss feed Print
 1   2 
auto quote source
Matthew Leverton
Supreme Loser
January 1999
avatar

If you leave the src parameter off of the quote tag, a few squirrels will try to find the source of the quote from within the same thread. If a match is found, then the post will automatically be linked. This only happens after the post is saved (i.e., not on previews). Since they are just squirrels, there may be false positives and (more likely) false negatives.

Also, clicking on source links will no longer force a reload if the target post is on the same page.

Thomas Fjellstrom
Member #476
June 2000
avatar

Also, clicking on source links will no longer force a reload if the target post is on the same page.

Cool

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Vanneto
Member #8,643
May 2007

If you leave the src

Testing squirrels.

EDIT:

Nice!

In capitalist America bank robs you.

LennyLen
Member #5,313
December 2004
avatar

Quote:

Just testing the Squirrels.

Meh @ Vanetto! You ruined my test to see if it would include your quote tags inside mine if I quoted your text that didn't appear elsewhere in the thread!

MiquelFire
Member #3,110
January 2003
avatar

Meh @ Vanetto! You ruined my test to see if it would include

Holy! It finds the name too!

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red | +Me
Windows 8 is a toned, stylish, polished professional athlete. But it’s wearing clown makeup, and that creates a serious image problem. ~PCWorld Article

LennyLen
Member #5,313
December 2004
avatar

Now I can try my test again...

Just testing the Squirrels.

edit:

and another test...

LennyLen said:

Meh @ Vanetto! You ruined my test to see if it would include

edit 2:

Nested quotes (without supplying names):

Meh @ Vanetto! You ruined my test to see if it would include

Holy! It finds the name too!

edit 3: Awesome! Great work Matthew.

BAF
Member #2,981
December 2002
avatar

Heh, nice. Kinda ruins the JS I just wrote up, but I'll post it anyway (the JS is still kinda neat). It lets you mark multiple posts, and generates filtered quote tags for them (filters out stuff like embedded media, quotes, etc).

Darizel
Member #10,585
January 2009
avatar

esting squirr

let's try quoting only partial words...

EDIT: AWESOME
:o:o

EDIT again: why'd the last 2 smilies not work?

----------
struthersgames.com - fun games for free download ;)
I am not an idiot.*
*in my opinion.

BAF
Member #2,981
December 2002
avatar

Heh, nice. Kinda ruins the JS I just wrote up, but I'll post it anyway (the JS is still kinda neat). It lets you mark multiple posts, and generates filtered quote tags for them (filters out stuff like embedded media, quotes, etc).

test

LennyLen
Member #5,313
December 2004
avatar

EDIT again: why'd the last 2 smilies not work?

They don't appear to have spaces between them.

Darizel
Member #10,585
January 2009
avatar

EDIT again: why'd the last 2 smilies not work?

They don't appear to have spaces between them.

The first four didn't either.
Testing again...

EDIT: very odd. seems like a one-time glitch.

----------
struthersgames.com - fun games for free download ;)
I am not an idiot.*
*in my opinion.

Jeff Bernard
Member #6,698
December 2005
avatar

edit 2:

Nested quotes (without supplying names):

Ahhh... but what if the nested quotes are not someone quoting someone else (ie- arbitrarily [for no reason] nested quotes):

The first four didn't either.

They don't appear to have spaces between them.

Those quotes don't have anything to do with each other... and it seems to break what Matthew was trying to do... do I win?

--
I thought I was wrong once, but I was mistaken.

StevenVI
Member #562
July 2000
avatar

I want to know who said "test" first...

Edit: (Still getting used to the < and > characters...)

What about the first to say Test?

__________________________________________________
Skoobalon Software
[ Lander! v2.5 ] [ Zonic the Hog v1.1 ] [ Raid 2 v1.0 ]

Jeff Bernard
Member #6,698
December 2005
avatar

I almost think that's a false positive on picking out Vanneto on saying "Test" since he actually said "Testing"...

--
I thought I was wrong once, but I was mistaken.

Neil Black
Member #7,867
October 2006
avatar

I think it's already been shown to pick up on partial words. A test:

EDIT:

Test successful! I guess it just takes the string you put between the quote tags and looks for the exact same string, regardless of whitespace and such. So be careful when you type it out, or you'll screw up the system.

That makes me wonder if it does close matches. A test:

Quote:

I almost think that's a fasle positive on picking out Vanneto on saying "Test" since he actaully said "Testing"...

I changed the order of two letters in two words to see if it worked.

EDIT2:

Nope. Maybe I used too long of a quote or changed it too much, but I think it only matches exact quotes. Now, does it match a quote from the post that I'm editing?

Quote:

I changed the order of two letters in two words to see if it worked.

EDIT3:

No, it doesn't match quotes from the post I'm editing. That would have been awesome, too.

Ib Quezada
Member #7,779
September 2006
avatar

This was like opening pandora's box

test

Edit: mmm... couldn't make it work... probably tomorrow, now I'm sleepy...

Neil Walker
Member #210
April 2000
avatar

Nice.

Neil.
MAME Cabinet Blog / AXL LIBRARY (a games framework) / AXL Documentation and Tutorial

wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie

Martin Kalbfuß
Member #9,131
October 2007
avatar

This site is awesome.

http://remote-lisp.spdns.de -- my server side lisp interpreter
http://www.nongnu.org/gm2/ -- Modula-2 alias Pascal++

weapon_S
Member #7,859
October 2006
avatar

bamccaig
Member #7,536
July 2006
avatar

Kinda ruins the JS I just wrote up,...

Not really. Your JS is capable of quoting automatically whereas Matthew's feature merely attempts to grab the source information. It's a neat feature, but it still requires the user to quote people manually and that includes markup. Assuming your JS does what you promise, it will be far superior, as long as it doesn't take too long to process the document. I plan to use it.[1]

Is it going to work between threads? I know you had mentioned that it would allow you to mark them and then edit and have them appended to the edit? So I assume you're using the userdata contents, which might allow you to even quote across threads.

I guess it just takes the string you put between the quote tags and looks for the exact same string, regardless of whitespace and such.

It's not an exact string match because my use of an ellipsis in BAF's quote worked fine![2] Still though, the chore of having to make sure it quoted correctly turns me off of it (assuming BAF's JS is 100% accurate).

** EDIT **

Very smooth, Matthew.

References

  1. I tried all last night to say so on the other thread, but for some reason I'm unable to post to it (from home and now at j0rb...). It seems to just sit there loading forever (I've tried clearing cache, refreshing, etc.). Maybe I was locked out of it?
  2. Unless your such included grammar symbols.
BAF
Member #2,981
December 2002
avatar

Processing should be instant (no noticeable processing time to the user), unless using a browser with some super slow JS implementation. It does work between threads. I still have to detect edit pages to have it append in those cases though. I'm not using userdata (I thought that was readonly?), I'm just using cookies (so it won't work across browsers/computers/etc).

[edit]
ML: I'm getting JS errors in general.js now when I load thread pages. Sometimes it yells about $break, sometimes it yells about userSettings being undefined.

bamccaig
Member #7,536
July 2006
avatar

BAF said:

I'm not using userdata (I thought that was readonly?),...

I'm not entirely sure, but I thought the whole point of it was the ability to store data in there? I'm not sure what the size restrictions are though.

BAF
Member #2,981
December 2002
avatar

I don't think you can write to it... I think it is just for storing settings, so you could still for example configure the script I wrote while having it reside on my server.

bamccaig
Member #7,536
July 2006
avatar

BAF said:

I don't think you can write to it... I think it is just for storing settings, so you could still for example configure the script I wrote while having it reside on my server.

Searching the forums for the release/explanation is coming up mostly empty, but I did find CGamesPlay's "Site Tour"...

Now the script is nice and simple. It uses the new User Data feature of Allegro.cc, so it doesn't require any weird hacks.

IIRC, his tour kept track of where you were between pages so it knew where you left off and whether to run at all. I can't seem to find how to use the userdata field though...

Matthew Leverton
Supreme Loser
January 1999
avatar

I made a few tweaks:

  • If name is specified and src is left out, then the name must be an exact match for an automatic link.


  • If a short quote matches multiple posts, then no link is created.


  • Successive quotes from the source post will only be linked the first time.

 1   2 


Go to: