The code tag

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

I hate this thing! I'm sure its useful in some of the coding areas but when code is forced to be wider than the page width, and the whole thread has this huge horiztonal scroll bar, so you have to scroll back and forth to read any of the other replys, and it's really hard to find the "submit" button on the post reply form, and it's all just annoying.

I wonder if there's anything to do about this... maybe decrease the font size in there? That could help a little bit... Or maybe people could just use an alternative when quoting code in a thread that's mostly paragraphs?

Sigh... or maybe I'll just have to live with it Roll eyes

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

If people remember to break their code, it's not so bad.

Problem is I think it uses

.

Smiling Suzanne

Busy's picture

He has: 6,151 posts

Joined: May 2001

or you could use NS, the reply buttons are at the left Smiling

mjames's picture

They have: 2,064 posts

Joined: Dec 1999

I agree, it's annoying! But this is a standard feature in vB and it rarely causes a problem. I'd leave it. Smiling

He has: 424 posts

Joined: Mar 1999

Actually, a resolution to this problem has been on my to-do list for a couple weeks now when I first noticed it and it annoyed me Smiling

What will happen is when a post has the code tag in it, it will be ignored for the standard table tags... Only the post that has the code tag in it will break the page limits... All other posts will look as normal. I've seen this done on a couple forums and I just have to study how they made it happen.

disaster-master's picture

She has: 2,154 posts

Joined: May 2001

I saw Megans post this morning on this so I went back to one that I had posted code on last night and just broke it up a bit so that it would go way out to the right field.

(that is when i discovered that i posted to a thread that was started in 1999....opps) Laughing out loud

Anyway, breaking it up will work fine for me. not a problem. Just have to remember to do it.

They have: 61 posts

Joined: Nov 2001

If they are using

 tags, the reason for that is so the code appears as it was intended to be.  Otherwise, the code will be in html and all the formatting will disappear.

The only way to do this (as far as I know) is by using 
 tags.  I have an article database where I use 
 tags so the tabs and breaks appear properly.  But these articles (.txt) are submitted by other visitors to the site and if they do not format it properly the lines extend wide.  If I don't use the 
 tags the everything will appear in one paragraph and makes no sense.  I have been looking for a solution for this problem myself and haven't found another way to do it.

If it is possible to retain the formatting and at the same time make sure the lines do not extend after a ceartin specified width, then let me know.

thanks

PS - don't mention any formatting within tables as it does not make a difference once 
 tags are used, even inside the tables. 

They have: 601 posts

Joined: Nov 2001

Chad

Yes, that is done on a couple of forums. The way to do that is to break each message up into individual tables, instead of multiple TRs of the same table. Easily done, and looks good.

The other, very very ugly way to do it would to have the templates makrup CODE information in < TEXTAREA > fields. Ugh!

- wil

mairving's picture

They have: 2,256 posts

Joined: Feb 2001

The [ php ] tag apparently also causes the same problem so it should be fixed also.

He has: 424 posts

Joined: Mar 1999

A way long piece of text that is so long that it extends this table but shouldn't extend other posts .... I am just trying to make a really really really really really really really really long sentence and I think I have.... '

He has: 424 posts

Joined: Mar 1999

This annoyance should now be taken care of. And posts with code in them will extend as far as they need to while the rest of the posts will remain within the normal screen parameters. You will have to scroll to see the code if it is longer than the screen allows but at least the whole thread is not screwed up.

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

Excelent!

(submit reply & etc. buttons are now centered wayy wayy over there now)

They have: 601 posts

Joined: Nov 2001

Good job, Chad!

Ugh - the submit reply, preview buttons should be left-aligned to make sure they appear the same place. Or create a seperate table for them underneath the message.

- wil

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

Thank you! Much better.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.