Customizing SMF > Tips and Tricks

Code Block Scrollbars

<< < (2/2)

1979Z28:
Fneh.

I see that the browser automatically adds a scrollbar when somebody posts something huge, like I just did.

What I MEAN, is ON THAT POST, to add a scrollbar. If you check my forum (http://www.ufba.org/forum/index.php), you'll see that in cases of an avatar that is slightly too big, it will have a scrollbar added to it. It keeps the post, and other posts resized the same, and it also allows people to view the whole avatar, if they wish.

Was just thinking that this might be transferred over to the message body, such as in cases of huge-ass code listings.

1979Z28:
...

Ugh, I'm an idiot, heh.

Sorry Unkown and AMA :P Didn't notice that the default theme already had this enabled. Since I'm using the old YaBB SE theme, I didn't think of checking the other one... :-X

This 'idea' has already been added with the default template shipped out.. :-X

Any chances of adding it here, like to the default YaBB SE Theme? ;)

Sorry :-X Go ahead and lock this if need be, a suggestion/idea that's already implimented..

A.M.A:
in Display.template.php look for

--- Code: --- // Show the post itself, finally!
echo '
</td>
</tr></table>
<hr width="100%" size="1" class="hrcolor" />
', $message['body'], '

--- End code ---
and replace it with

--- Code: --- // Show the post itself, finally!
echo '
</td>
</tr></table>
<hr width="100%" size="1" class="hrcolor" />
<div style="overflow: auto; width: 100%;">', $message['body'], '</div>
--- End code ---

1979Z28:
Hrm. Is there any other bit of code that would do that? Just added it to somebody's Blue theme (that's somewhere in the graphics board), and it still doesn't work :-X

[Unknown]:
You also need to modify the code class in style.css...

-[Unknown]

Navigation

[0] Message Index

[*] Previous page

Go to full version