T O P I C R E V I E W |
cbsarge |
Posted - 13 February 2007 : 13:02:22 I'm trying to figure out how to enable an indent function. I'm willing to just have the key insert 4 blank spaces to have it look like it's indented. Maybe have [indent1, 2 or 3] each being more indented than the last. I got something like that to work by using the [code] tag as an example but, if I use it none of the other tags will work in that post.
Any help would be greatly appreciated!< |
7 L A T E S T R E P L I E S (Newest First) |
AnonJr |
Posted - 19 February 2007 : 09:56:26 I'd go ahead and post it since you never know what somebody may be looking for.
Have fun, and watch that cut/past... < |
cbsarge |
Posted - 16 February 2007 : 09:29:47 ROFL
Thanks AnonJr - plain old laziness on my part! "I'll just cut and paste this rather than having to type in 3 whole closing tags" - yikes.
I see your point on the right use of tags - I'm using a wrench to bang in some nails I guess. This is only going to be internal for our engineering group so it should be o.k. but, I'll mess around with some <div> tags to see about changing it to that method.
Is this worth posting when I get it to work? Do you think other users may be interested in having this function? Also, is there a more formal way of posting something like this or is this format o.k.?
Thanks for the input!< |
AnonJr |
Posted - 14 February 2007 : 15:27:37 Glad you got the code in the right place. I'm going to have to second MarcelG's advice on using the proper tag for the proper purpose. The <dd> and related tags were not meant for the sole purpose of indentation. Because of this, screen readers, site validators, and other assistive technologies may have problems with your site. Also, different browsers treat that set of tags a little differently so you will most likely not get a consistent look.
You really ought to take Marcel's suggestion and use a <div> or a <span> and some CSS to get what you want as that is more semantically correct than your option.
If you're hell-bent on using those tags, you might want to at least nest them properly and close them in the reverse order they were opened in... < |
cbsarge |
Posted - 14 February 2007 : 15:03:10 As MarcelG said, the place I originally put the new code caused the html to be displayed (not converted back to forum code) when editing a previous post that had the new tag in it. I move the code to line number 393 in in_func_comon.asp in the extratags area and it now works correctly. When you go to edit a post that the new tag was used in, it correctly changes it back to forum code when retrieving it from the database.
So if you want to add this tag, go to around line 392 and below this:
fString = doCode(fString, "", "", "<font color=""" & CColor & """>", "</font id=""" & CColor & """>")
put this:
fString = doCode(fString, "[t]", "[/t]", "<dl><dt><dd>", "</dd></dt></dl>") < |
MarcelG |
Posted - 14 February 2007 : 10:42:19 I'm not sure if this the way the definition tag was meant to be used. The fact that it shows correctly does not mean it's using the correct standard. I think it would be better to use a div for that, and do something like this, with inline style definition:
fString = doCode(fString, "[t]", "[/t]", "<div style="padding-left:30px;width:100%;overflow:hidden>", "</div>") By the way ; if I'm not mistaking, the place you put this code in, transforms the forumcode into HTML prior to the database insert. If you edit an existing topic/reply which contains the [t][/t] tags, you'll see the HTML...unless you edit inc_func_posting.asp.
Therefore I advice you to put it in the extratags function instead.< |
cbsarge |
Posted - 13 February 2007 : 14:31:13 We're using forum code.
I got it to work by adding this code to the inc_func_common.asp file at around line 634:
fString = doCode(fString, "[t]", "[/t]", "<dl><dt><dd>", "</dl></dt></dd>")
I put this in at after the following code:
fString = doCode(fString, "", "", "<i>", "</i>")
The nice thing about this is it carries to the next line so if you hit a carriage return while entering your message the next line stays indented the same as the line above until you use the closing tag [/t]
You can also nest this so that you can indent a line and then indent the next line down with another [t] even more.< |
MaD2ko0l |
Posted - 13 February 2007 : 13:48:02 to indent somthing cant u just use the <ul> and </ul>...that should make a block of text indented< |
|
|