Previous Thread
Next Thread
Print Thread
Hop To
Joined: Oct 2007
Posts: 531
Likes: 13
Addict
Addict
Joined: Oct 2007
Posts: 531
Likes: 13
Problem Summary

Seven templates hide .left_col and .right_col via $(document).ready(). Because this fires after first paint, the browser initially renders the full three-column table, then collapses the side columns. The center column snaps leftward to fill the void, generating a layout shift.

Affected Files & Patterns

Unconditional hide (always runs):

templates/default/login.tpl
templates/default/boardrules.tpl
templates/default/newuser_checkage.tpl
templates/default/newuser_signup.tpl
templates/default/lost_password.tpl

Conditional hide (runs when $mystuffNONE is true):

templates/default/editbasic.tpl
templates/default/editdisplay.tpl
{if $mystuffNONE}
<script>$().ready(function(){ $('.right_col').hide(0);$('.left_col').hide(0); });</script>
{/if}

Fix for Unconditional Templates

Remove the script line entirely. These pages should respect the forum's configured columns like every other page.

Fix for Conditional Templates

(editbasic.tpl, editdisplay.tpl) Do not hide columns after paint. When $mystuffNONE is true and those pages genuinely should not have side columns, use one of these approaches instead*

Best:

Don't render the side column <td> cells in the table structure for those pages. Modify the layout wrapper (where {$tbopen} is generated) to conditionally omit empty side columns.

Acceptable:

Apply a CSS class before paint (e.g., on <body> or the table) that sets .left_col, .right_col { display: none; }. This must be in the HTML/CSS, not jQuery after ready().

Root Cause

Whether unconditional or conditional, modifying the table layout after the browser has painted forces a recalculation. The width:100% !important on .body_col amplifies the shift because the center column aggressively expands into the collapsed space*

Recommended Action

Remove post-paint jQuery hide from all seven templates.
For editbasic.tpl and editdisplay.tpl, evaluate what $mystuffNONE means. If those pages should not have side columns, suppress them in the markup or via pre-paint CSS — never after ready().

Clear compiled template cache after changes.*


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 8.0.0
Release 20240826
Server OS Linux
Server Load 0.11
Web Server Apache/2.4.37
PHP Version 8.3.11
MYSQL Version 8.0.39
Database Size 1.82 GB
Joined: Jun 2006
Posts: 16,532
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,532
Likes: 150
What AI source are you using to output all of these "errors"? UBB.threads uses tables to present data, looks like most of these are attempting to get one to go tableless which just can't happen without a total rewrite.

Please make one mass post of all of these suggestions, as the majority of the suggestions appear to just be fluff in an attempt to report changes to the user; several have a broader impact over the entire package and wouldn't just patch a single pages errors.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Oct 2007
Posts: 531
Likes: 13
Addict
Addict
Joined: Oct 2007
Posts: 531
Likes: 13
I'm using Cloudflare's AI, which is where I'm getting the CLS reports. I can report the following:

In this thread removing the value in Control Panel/General/Maximum Table Width For All Screens fixed the CLS problem reported in that post.

In this report adding table-layout: fixed to both t_outer and t_inner resolved the CLS shift.

Both of these have been tested and implemented on our forum and have resulted in improved performance.

In this report I"m providing information on how to fix a long running issue in the forums. I've reported this previously but not with the specificity of what was causing it. (And I don't think I reported it in bug reports.)

I thought i had reported that removing
Code
<script>$().ready(function(){ $('.right_col').hide(0);$('.left_col').hide(0); });</script>
fixed another CLS problem.

None of these are major, but the cumulative effect is. And I don't see anywhere that it was suggested that the tables be removed. If you don't want these bugs reported, I will stop, but I can assure you that the CLS problems with the forum are real and need to be fixed.


The Stovebolt Geek
https://www.stovebolt.com/ubbthreads/ubbthreads.php

Server Information
UBB.threads Version 8.0.0
Release 20240826
Server OS Linux
Server Load 0.11
Web Server Apache/2.4.37
PHP Version 8.3.11
MYSQL Version 8.0.39
Database Size 1.82 GB
Joined: Jun 2006
Posts: 16,532
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,532
Likes: 150
Well an issue with that is that you're running these on your forum with modifications and HTML errors; we can run a stock build with no alterations through an IDE (which their "AI" tool is) just like we did for the v8 release and glean details from that on our own.

Unless it's causing server errors in your web or MySQL server that we can walk through an actual log it's not really a report that we need as we could just read through suggestions from these tools on our own versus some of the fluff suggested (several of which are required resets for some browser compatibility).

Otherwise we're just having a coding disagreement with a bot that doesn't necessarily understand why code exists in the first place verses what is being produced in your environment (different PHP versions expect different coding standards and will work differently. ie php8 vs php7 and prior versions UBB.threads 8.0 is compatible with PHP 7.x, 8.0, 8.1, 8.2, 8.3).


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
8.0.1 Patch Changelog Discussion
by isaac - 11/26/2025 1:34 PM
Who's Online Now
2 members (Geoff, 1 invisible), 522 guests, and 131 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)