inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Jan 14, 2019 17:37:02 GMT -8
Is there a max line or byte length on layout templates?
For example, I have a Forum Wrapper template that is 1784 lines. When I copy + paste the HTML into the editor, click "Save Theme", and then refresh the editor, the code is cut off at line 1071.
The best answer I can come up with is that this is the maximum number of lines allowed on a layout template. But I'm hoping it's something else!
|
|
#e61919
Support Manager
154778
0
1
Nov 25, 2024 15:31:44 GMT -8
Michael
19,618
May 2010
wiseowl
|
Post by Michael on Jan 14, 2019 17:46:58 GMT -8
Hi elli,
The limit is the field in the database, so its more character count than line count (the real metric is file size). UTF8 characters take up more space (as they're larger in size) than standard alphanumeric, so I'd try to avoid those.
It's also important to remember that you won't be able to add any more even if there is space in the file if your theme is at the 10MB limit, so take that into consideration as well.
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Jan 14, 2019 17:53:53 GMT -8
I'd remembered the 10MB limit, so that's where I checked first; this theme is 900KB with 330KB of that being layout templates.
The character count is around 109k (chunky boi), a lot of that being white-space for indentation.
Do you know if this limit is larger on Forums.net, or if it's the same?
|
|
#e61919
Support Manager
154778
0
1
Nov 25, 2024 15:31:44 GMT -8
Michael
19,618
May 2010
wiseowl
|
Post by Michael on Jan 14, 2019 17:57:11 GMT -8
I'd remembered the 10MB limit, so that's where I checked first; this theme is 900KB with 330KB of that being layout templates. The character count is around 109k (chunky boi), a lot of that being white-space for indentation. Do you know if this limit is larger on Forums.net, or if it's the same? It is exactly the same I believe.
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Jan 14, 2019 18:03:38 GMT -8
Hmm hmm hmm ok, thank you!
There's a lot of inline CSS and some repetition in this template that could be cut out, so clearing that up will save some characters. Reducing indentation from 4 spaces to 2 will save about 25k.
|
|
#e61919
Support Manager
154778
0
1
Nov 25, 2024 15:31:44 GMT -8
Michael
19,618
May 2010
wiseowl
|
Post by Michael on Jan 14, 2019 18:06:57 GMT -8
Hmm hmm hmm ok, thank you! There's a lot of inline CSS and some repetition in this template that could be cut out, so clearing that up will save some characters. Reducing indentation from 4 spaces to 2 will save about 25k. Yeah I'd start cutting out unnecessary fluff. It might make it look less organized but it'll give you a lot more to work with. It's also worth mentioning we know the current limit is low and intend to correct this at some point in the future.
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Jan 14, 2019 18:11:16 GMT -8
That's great news, thank you!
|
|
inherit
97216
0
Nov 23, 2024 12:51:52 GMT -8
Bennett 🚀
Formerly iPokemon.
3,622
January 2007
catattack
iPokemon's Mini-Profile
|
Post by Bennett 🚀 on Jan 14, 2019 18:24:08 GMT -8
If you're looking for some kind of automation to prune some of your spaces: www.freeformatter.com/html-formatter.htmlI would go for their tab delimiter (which would be 1 less character than 2 spaces as you were suggesting).
|
|