Author |
Topic |
|
jimlord
New Member
USA
57 Posts |
|
Steve D.
Average Member
USA
640 Posts |
Posted - 18 March 2003 : 15:51:44
|
I think you need to add this replace code function chkString in inc_func_common.asp.
The inc_func_posting.asp replace code was left for editing older posts. Or at least that is what I gathered from the comments in the code
|
Swing Dancing Video Clips - It's All Swing! Forum |
|
|
jimlord
New Member
USA
57 Posts |
Posted - 18 March 2003 : 18:59:58
|
Thanks, Steve. That will probably work, but the other "should" also. After all, that's how the current forum code gets converted to html and I'd like to keep it there. |
"That button did what?" |
|
|
Steve D.
Average Member
USA
640 Posts |
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 18 March 2003 : 20:07:57
|
jimlord, like Steve D. is saying, you haven't included the necessary code to convert the [mod] [/mod] tags to <font color="red"><i>[ ]</i></font>
This should be added to the ChkString function in the inc_func_common.asp file:
fString = doCode(fString, "[mod]", "[/mod]", "<font color=""red""><i>[", "]</i></font>")
the code you use in inc_func_posting.asp would look like this:
fString = replace(fString, "<font color=""red""><i>[","[mod]", 1, -1, 1)
fString = replace(fString, "]</i></font>","[/mod]", 1, -1, 1) |
|
|
jimlord
New Member
USA
57 Posts |
Posted - 18 March 2003 : 21:42:34
|
OK, I'm a little loopy. I got my replace syntax out of order and thought I was replacing the "mod" tags with the html. The inc_func_posting.asp returns them to the forum code, doesn't it?
I'll give it a shot. I'm sure it will work. Thanks Steve and Richard! |
"That button did what?" |
Edited by - jimlord on 18 March 2003 21:45:12 |
|
|
jimlord
New Member
USA
57 Posts |
Posted - 18 March 2003 : 21:55:28
|
OK, there's this in the inc_func_common.asp. Is this used somewhere? It looks like the perfect place to put something like this.
function extratags(fString)
fString = doCode(fString, "[ spoiler]", "[ /spoiler]", "<font color=""" & CColor & """>", "</font id=""" & CColor & """>")
extratags = fString
end function
|
"That button did what?" |
Edited by - jimlord on 18 March 2003 21:59:28 |
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 18 March 2003 : 22:03:24
|
yes, it is used for the [spoiler] tag, tags in this function are only converted when the post is displayed, so you don't have to convert back and forth when editing a post. (i.e. the tags are saved in the message as a tag, not as html)
example of [spoiler] tag:
this text is hidden by the spoiler tag you have to highlight it with your mouse to read it. |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 18 March 2003 : 22:48:19
|
something to consider ... depending on the order of your code, a red italic formatting may be interpretted as mod formatting. I'd suggest using an id attribute on a span element to specify this formatting.
fString = doCode(fString, "[mod]", "[/mod]", "<span id=""mod"" style=""color:red;text-decoration:italics;"">[", "]</span id=""mod"">")
fString = replace(fString, "<span id=""mod"" style=""color:red;text-decoration:italics;"">[","[mod]", 1, -1, 1)
fString = replace(fString, "]</span id=""mod"">","[/mod]", 1, -1, 1)
|
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
Edited by - Nikkol on 18 March 2003 22:54:58 |
|
|
jimlord
New Member
USA
57 Posts |
Posted - 18 March 2003 : 23:11:32
|
Works like a charm. I'll clean this up and make it a mod with code. Thanks for your help. |
"That button did what?" |
|
|
Steve D.
Average Member
USA
640 Posts |
|
jimlord
New Member
USA
57 Posts |
Posted - 19 March 2003 : 00:08:13
|
There. Updated the corrections, and edited the original post. Wouldn't mind a double check of the updated code before moving to MOD Add-On Forum (W/ Code)? |
"That button did what?" |
|
|
jimlord
New Member
USA
57 Posts |
Posted - 19 March 2003 : 00:21:46
|
Nikkol, good point, and I missed it when I had posted before. I tried it, and it didn't give the italics, so I changed the style to "color:red;font-style:oblique"
Instructions and zip updated. |
"That button did what?" |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
|
jimlord
New Member
USA
57 Posts |
Posted - 19 March 2003 : 18:23:18
|
Just a note, I've added another button with this code that inserts a "[board rules]" into a post and then converts it to a link to our board rules for posting. It's a nice touch for our moderators, who have quick access to post this link with the button instead of having to find it every time they need to point someone to our board rules. We'll probably be adding a little pulldown for the mods where we can add posts that we commonly refer people to and have it insert the link, but that's later. Just an update for those that can use something like that. We've had a HUGE positive response from our moderators. |
"That button did what?" |
Edited by - jimlord on 19 March 2003 18:23:42 |
|
|
Steve D.
Average Member
USA
640 Posts |
|
|
Topic |
|