The [code] tag should not have its height limited

Found an issue with the phpBB system here at NESdev? Use this forum to report problems.

Moderator: Moderators

Post Reply
Drag
Posts: 1324
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

The [code] tag should not have its height limited

Post by Drag » Fri Sep 04, 2020 2:34 pm

Please, I'm begging you. In content.css, for .codebox code, please eliminate or override the property max-height. I have no idea why the default behavior of the code box is to restrict how many lines you can see at once, was there ever a use case which required this? It's especially painful for assembly code.

Either that, or cram a second stylesheet to override max-hight to initial.

Code: Select all

; Start-up / Reset code
; A, X, Y are all 0 at the end of this routine
vct_reset ;bs
 sei			; Inhibit interrupts
 cld			; Disable decimal mode
 ldx #$FF
 txs			; Initialize stack pointer to bottom of stack
 inx			; Set X to 0
 lda #$40
 sta $4017		; Inhibit APU IRQ
 txa			; Set A to 0 (from X)
 sta $2001		; Disable all screen rendering
 sta $2000		; Turn off vblank NMI
 sta $4010		; Disable DMC IRQ
vct_reset_ram_init_loop
 sta $00,x		; I saved a single byte. Go me!
 sta $0100,x	; Clear deck ram with $00s
 sta $0200,x
 sta $0300,x
 sta $0400,x
 sta $0500,x
 sta $0600,x
 sta $0700,x
 inx
 bne vct_reset_ram_init_loop
 ldy #$03		; Wait for 3 vblanks, for the PPU to ready itself
vct_reset_ppu_stabilize
 bit $2002
 bpl vct_reset_ppu_stabilize
 dey
 bne vct_reset_ppu_stabilize
 jmp game_init
;be

User avatar
rainwarrior
Posts: 7842
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: The [code] tag should not have its height limited

Post by rainwarrior » Fri Sep 04, 2020 2:45 pm

I completely agree. In a previous thread where this was discussed I left a snippet of CSS override you can use with the Stylus plugin to remove the limit:
viewtopic.php?p=245873#p245873

Drag
Posts: 1324
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: The [code] tag should not have its height limited

Post by Drag » Fri Sep 04, 2020 2:49 pm

Oh snap, I didn't see that there were already two threads on the matter. :P

Well, here's thread #3 I suppose.

lidnariq
Posts: 9692
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: The [code] tag should not have its height limited

Post by lidnariq » Fri Sep 04, 2020 2:55 pm

Is this even a bit that admins can change, or does it require that we get someone with shell access?

Drag
Posts: 1324
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: The [code] tag should not have its height limited

Post by Drag » Fri Sep 04, 2020 9:21 pm

I think it requires touching a file on the server, no matter what.

lidnariq
Posts: 9692
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: The [code] tag should not have its height limited

Post by lidnariq » Fri Sep 04, 2020 9:41 pm

So we need to get in contact with WhoaMan somehow to fix this?

User avatar
Memblers
Site Admin
Posts: 3883
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: The [code] tag should not have its height limited

Post by Memblers » Sun Sep 06, 2020 2:56 am

lidnariq wrote:
Fri Sep 04, 2020 9:41 pm
So we need to get in contact with WhoaMan somehow to fix this?
Yes, that's the only way now. Previous version of phpBB used to allow editing through the admin control panel, but it only saved to a cached copy. Next time someone hits the "flush cache" button (or whatever else could cause that), the changes would be lost. I guess that caused enough problems for people that they took the feature out entirely.

User avatar
dougeff
Posts: 2745
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: The [code] tag should not have its height limited

Post by dougeff » Sun Sep 06, 2020 7:23 am

However, if someone wants to post very long code, I suggest you either post a text file as an attachment, or use a repository for clips of code like Gist.

I would define very long code as more than 100 lines.

And when you reply to very long code, don't quote the entire post, or we get multiple duplicates of the code.
nesdoug.com -- blog/tutorial on programming for the NES

User avatar
Controllerhead
Posts: 151
Joined: Tue Nov 13, 2018 4:58 am
Location: $4016
Contact:

Re: The [code] tag should not have its height limited

Post by Controllerhead » Sun Sep 06, 2020 9:41 am

dougeff wrote:
Sun Sep 06, 2020 7:23 am
And when you reply to very long code, don't quote the entire post, or we get multiple duplicates of the code.
Good point. "Fixing" this code limit would cause some very sloppy looking hard to read threads.

Threads and posts like this one would look terrible:
viewtopic.php?f=2&t=20580#p253874

I propose doubling it (or so) from it's current 13 line limit to around 25 / 30 lines. 30 seems appropriate.
Image

User avatar
Dwedit
Posts: 4354
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: The [code] tag should not have its height limited

Post by Dwedit » Sun Sep 06, 2020 5:04 pm

Perhaps nesdev should switch to a host that's actually administrated by someone who isn't absentee?
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

Post Reply