Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,499,618
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-29-24 06:13 AM
Guest: Register | Login

0 users currently in Help/Suggestions/Bug Reports | 2 guests

Main - Help/Suggestions/Bug Reports - That Javascript filter New thread | New reply


Mega-Mario
Posted on 09-14-10 08:56 PM Link | Quote | ID: 135702

Spamming from alt accounts.
Level: 81

Posts: 1233/1610
EXP: 4881321
Next: 111528

Since: 09-10-08

Last post: 3592 days
Last view: 3012 days
I guess we need a more clever way to filter on* events. The current way tends to fuck up layouts when you use CSS selectors that rely on a certain element hierarchy, for example, tricks to remove HR's from quoteboxes and such.

For example, see this post of mine. Look at the quote. I set up CSS with selectors as to remove the top and bottom HR's from quotes. Normally, it works, but with that very post (and others for sure), the last HR is still here, because the Javascript filter added one <z> into the quote and that unclosed <z> is screwing up the element hierarchy inside the quotebox, hence the selector fails.

I also first used a selector-based trick on my layout to remove the sigsep from it, it also fucked up on some posts due to the <z> the Javascript filter added. Hence I had to do that negative margins hack instead.

Not to mention, the filter isn't fully efficient. This image witnesses it.


Acmlmboard 1.A2 uses more intelligent filtering for on* stuff. I have tested those filters and they work in every case, all without screwing up the HTML.

____________________
Kafuka -- ROM hacking
Kuribo64 -- we hack shit

blackhole89
Posted on 09-14-10 09:37 PM Link | Quote | ID: 135706


The Guardian
Moloch whose eyes are a thousand blind windows!
Level: 124

Posts: 3304/4196
EXP: 21537752
Next: 298849

Since: 02-19-07
From: Ithaca, NY, US

Last post: 474 days
Last view: 87 days



Exchanged the on* filter for 1.A2's.

____________________



Mega-Mario
Posted on 09-14-10 09:40 PM (rev. 7 of 09-15-10 07:04 PM) Link | Quote | ID: 135707

Spamming from alt accounts.
Level: 81

Posts: 1235/1610
EXP: 4881321
Next: 111528

Since: 09-10-08

Last post: 3592 days
Last view: 3012 days
Thank you man!

Edit- looks like the 1.A2 code isn't quite fully efficient either, it misses some when you post many. That must be because it's looking for an < before on* stuff... here are edited versions of these filters that do not look for an < and therefore don't miss stutf.
  $msg=preg_replace('/(\bon\w+\s*)=(\s*".+")/Uis', "$1&#x3D;$2", $msg);
$msg=preg_replace("/(\bon\w+\s*)=(\s*'.+')/Uis", "$1&#x3D;$2", $msg);
$msg=preg_replace('/(\bon\w+\s*)=(\s*[^\s>]+)/Uis', "$1&#x3D;$2", $msg);


Sorry for the inconvenience.
(Edit- had to double backslashes. Copy paste code from the post rather than from the raw markup.)

____________________
Kafuka -- ROM hacking
Kuribo64 -- we hack shit

dressale
(post deleted) ID: 139375

Main - Help/Suggestions/Bug Reports - That Javascript filter New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.018 seconds. (323KB of memory used)
MySQL - queries: 33, rows: 45/46, time: 0.014 seconds.