Distorting forum layout, FireFox
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Feedback
- :
- Community Site Feedback
- :
- Distorting forum layout, FireFox
Distorting forum layout, FireFox
01-10-2007 5:00 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
For example the code block in this thread;
http://community.plus.net/forum/index.php/topic,1816.msg17807.html#msg17807
Chilly
Re: Distorting forum layout, FireFox
01-10-2007 5:28 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Re: Distorting forum layout, FireFox
01-10-2007 7:31 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
In Sources/Subs.php, line 1127
FIND:
'content' => '<div class="codeheader">' . $txt['smf238'] . ':</div><div class="code">' . ($context['browser']['is_gecko'] ? '<pre style="margin-top: 0; display: inline;">$1</pre>' : '$1') . '</div>',
REPLACE WITH:
'content' => '<div class="codeheader">' . $txt['smf238'] . ':</div><div' . ($context['browser']['is_firefox'] ? ' style="overflow: scroll;"' : '') . ' class="code">' . ($context['browser']['is_gecko'] ? '<pre style="margin-top: 0; display: inline;">$1</pre>' : '$1') . '</div>',
In Sources/Subs.php, line 1165
FIND:
'content' => '<div class="codeheader">' . $txt['smf238'] . ': ($2)</div><div class="code">' . ($context['browser']['is_gecko'] ? '<pre style="margin-top: 0; display: inline;">$1</pre>' : '$1') . '</div>',
REPLACE WITH:
'content' => '<div class="codeheader">' . $txt['smf238'] . ': ($2)</div><div' . ($context['browser']['is_firefox'] ? ' style="overflow: scroll;"' : '') . ' class="code">' . ($context['browser']['is_gecko'] ? '<pre style="margin-top: 0; display: inline;">$1</pre>' : '$1') . '</div>',
This will (100% sure) fix the problem. There IS a neater fix possible, but I can't release it without seeing the contents of PlusNets index.template.php.
EDIT: Edit to change my 99.99% to 100% Just tested it editing this page at runtime and it works perfectly.
Re: Distorting forum layout, FireFox
13-10-2007 1:28 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Re: Distorting forum layout, FireFox
13-10-2007 9:56 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Re: Distorting forum layout, FireFox
13-10-2007 10:13 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Re: Distorting forum layout, FireFox
13-10-2007 10:25 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
On the reply screen large code blocks are shown at the same length as the purple headers (with the remainder readable at the RHS of the screen in normal text).
I know it's wrong - but I actually prefer unbroken code blocks.
Obviously it depends on the aspect ratio of your screen as to the level of irritation (if any) caused.
"In The Beginning Was The Word, And The Word Was Aardvark."
Re: Distorting forum layout, FireFox
13-10-2007 10:31 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
How do you mean you prefer unbroken code blocks? Adding the overflow keeps the code all correctly tabbed and placed, it just makes sure the display isn't wrecked in Firefox. (IIRC, code gets messed up with the current settings in IE too, because it wraps when it shouldn't really for clarity of code blocks).
Re: Distorting forum layout, FireFox
13-10-2007 10:41 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
It's only really long code blocks that cause problems.
"In The Beginning Was The Word, And The Word Was Aardvark."
Re: Distorting forum layout, FireFox
13-10-2007 10:44 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
If you do that while you are viewing this thread, you'll see that this solution doesn't cause inproper wrapping, but rather it keeps the width 100% and adds a scrollbar to allow viewing of the extended code which can't be shown in the immediate view.
EDIT: Added screenshot to show the outcome of the change, in case there is any confusion.
Re: Distorting forum layout, FireFox
13-10-2007 11:06 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Since I appear to be in a minority of one, then a simple ( ) change to the css would provide a fix?
"In The Beginning Was The Word, And The Word Was Aardvark."
Re: Distorting forum layout, FireFox
13-10-2007 11:14 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Re: Distorting forum layout, FireFox
13-10-2007 11:21 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@axisofevil
I don't quite understand what you mean you prefer the current broken version? Any reason why?
To expand, basically my previous solution was a change to the SMF code so that the scrollbar would only be applied from within Firefox, as all other browsers display code blocks within a 100% width, not breaking the layout. Thinking about it, making it display scrollbars on every browser is a much nicer solution, as it means code will retain its structure when being viewed.
Re: Distorting forum layout, FireFox
13-10-2007 11:26 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
"In The Beginning Was The Word, And The Word Was Aardvark."
Re: Distorting forum layout, FireFox
15-02-2008 4:03 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
jelv (a.k.a Spoon Whittler) Why I have left Plusnet (warning: long post!) Broadband: Andrews & Arnold Home::1 (FTTC 80/20) Line rental: Pulse 8 Home Line Rental (£14.40/month) Mobile: iD mobile (£4/month) |
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page