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

0 users currently in Help/Suggestions/Bug Reports | 1 guest

Main - Help/Suggestions/Bug Reports - Issues with tables inside a post New thread | New reply


master higgins
Posted on 08-09-10 01:22 AM (rev. 3 of 08-09-10 02:10 AM) Link | Quote | ID: 134073


Red Goomba
Level: 17

Posts: 38/42
EXP: 21250
Next: 3493

Since: 08-22-07
From: Viña del Mar, Chile

Last post: 2233 days
Last view: 464 days
Hi, I've been editing this post trying to insert a table with values for some rom addresses for monster party (NES), but the forum inserts too many br's (new lines) before the table, making the post even longer.

What's the best way to insert a table so this doesn't happen?

Greets!

EDIT: Forget it, I figured it out. The forum doesn't like tables with new line characters between tags (table, tr, td, th and such). I'll have to make do with a one line table.



____________________
Known in other forums as megaman_exe (www.chilewarez.org, www.thegshi.org) and aioria1981

Trelior
Posted on 08-09-10 01:34 AM Link | Quote | ID: 134074


Level: 99

Posts: 1664/2602
EXP: 9758864
Next: 241136

Since: 07-12-09

Last post: 4501 days
Last view: 4488 days
Are you sure it's the post you linked? I ask because you linked to a post from three years ago that wasn't posted by you.

The reason why 'the board seems to be adding too many line breaks' is because it treats a hit of the enter key as a br. So you're either going to have to not use one or the other when making your table.

master higgins
Posted on 08-09-10 02:11 AM Link | Quote | ID: 134076


Red Goomba
Level: 17

Posts: 39/42
EXP: 21250
Next: 3493

Since: 08-22-07
From: Viña del Mar, Chile

Last post: 2233 days
Last view: 464 days
What the...? I've used the "Link" link in the post and copied the url...

Anyway, the post is the last in this thread at this date.

As you mentioned, the problem was with the new lines between tags inside the tables. I've put the table in just one line and now it works.

BTW, anyone knows how to replace new lines with a text editor (Context, notepad++, etc) with an empty string?. The only way that works for me is to replace the 0xd 0xa bytes with empty in an hex editor.

____________________
Known in other forums as megaman_exe (www.chilewarez.org, www.thegshi.org) and aioria1981

NightKev
Posted on 08-09-10 03:12 AM Link | Quote | ID: 134077


Cape Luigi
Level: 131

Posts: 4336/4792
EXP: 26237768
Next: 186852

Since: 03-15-07

Last post: 3738 days
Last view: 3650 days
In notepad++, in the find/replace dialog, click on the "Extended (\n, \r, \t, \0, \x...)" radio button, and then in "Find what :" you can enter "\n" and it will look for newlines
(or "\r\n" for Windows text files) and you can replace them with whatever you want.

____________________

Nikolaj
Posted on 08-09-10 12:07 PM (rev. 2 of 08-09-10 12:18 PM) Link | Quote | ID: 134090


Level: 43

Posts: 237/384
EXP: 546554
Next: 18492

Since: 11-19-09
From: Denmark

Last post: 4539 days
Last view: 3222 days
That's why the board should have a BBCode that makes stuff inside it not nl2br()'d.
Eidt:
I'm not sure if this will work (I didn't bother to test it), but it should:
function br2nl($str) {
$str = str_replace("<br />", "\n", $str);
return $str;
}

That'd go somewhere.
$s = preg_replace_callback("'\[nobreak\](.*?)\[/nobreak\]'si", "br2nl()", $s);
That'd go in the CleanUpPost() function in ABXD, Idk where it would go in AB2.0.
If there are any syntax errors in that, that's because I wrote it directly in the post and haven't noticed due to lack of syntax highlighting.

NightKev
Posted on 08-10-10 02:00 AM Link | Quote | ID: 134139


Cape Luigi
Level: 131

Posts: 4339/4792
EXP: 26237768
Next: 186852

Since: 03-15-07

Last post: 3738 days
Last view: 3650 days
You did the preg_replace_callback() wrong. It should be like this:
$s = preg_replace_callback("'\[nobreak\](.*)\[/nobreak\]'si", "br2nl()", $s);
I'm pretty sure that ? shouldn't be there.

____________________

Mega-Mario
Posted on 08-26-10 11:43 PM Link | Quote | ID: 134899

Spamming from alt accounts.
Level: 81

Posts: 1163/1610
EXP: 4881699
Next: 111150

Since: 09-10-08

Last post: 3593 days
Last view: 3013 days
Actually, the ?'s make the searching less greedy. If you have more than one [nobreak] tag, your current pattern might eat everything between the first opening and the last closing, while the pattern with the ? will return the smallest matches, which would be the expected behavior.

Also, the callback string shouldn't contain parentheses- only the name of the callback function. Only it.

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

NightKev
Posted on 08-27-10 05:24 AM Link | Quote | ID: 134921


Cape Luigi
Level: 131

Posts: 4364/4792
EXP: 26237768
Next: 186852

Since: 03-15-07

Last post: 3738 days
Last view: 3650 days
Ah, I see what you mean.

____________________

Main - Help/Suggestions/Bug Reports - Issues with tables inside a post New thread | New reply

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

Page rendered in 0.030 seconds. (323KB of memory used)
MySQL - queries: 58, rows: 74/76, time: 0.016 seconds.