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: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

The [code] tag should not have its height limited

Post by Drag »

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: 8734
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

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

Post by rainwarrior »

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: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

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

Post by Drag »

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: 11432
Joined: Sun Apr 13, 2008 11:12 am

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

Post by lidnariq »

Is this even a bit that admins can change, or does it require that we get someone with shell access?
Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

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

Post by Drag »

I think it requires touching a file on the server, no matter what.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

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

Post by lidnariq »

So we need to get in contact with WhoaMan somehow to fix this?
User avatar
Memblers
Site Admin
Posts: 4044
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

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

Post by Memblers »

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: 3079
Joined: Fri May 08, 2015 7:17 pm

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

Post by dougeff »

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: 314
Joined: Tue Nov 13, 2018 4:58 am
Location: $4016
Contact:

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

Post by Controllerhead »

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: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

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

Post by Dwedit »

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!
Rahsennor
Posts: 479
Joined: Thu Aug 20, 2015 3:09 am

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

Post by Rahsennor »

Dwedit wrote: Sun Sep 06, 2020 5:04 pm Perhaps nesdev should switch to a host that's actually administrated by someone who isn't absentee?
Unsarcastically seconding this. I take a break from Nesdev because the update to phpBB 3 made the site unusuable, come back a year later and guess what's still above the edit box as I type this? "".

I'm out of polite things to say about this situation.
Post Reply