Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Special Forum Code for Moderators
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

jimlord
New Member

USA
57 Posts

Posted - 18 March 2003 :  12:16:50  Show Profile
This is a simple mod (probably a good first mod to attempt).

Purpose: This would be used for moderators and administrators to easily distinguish their comments after editing or moving posts.

Action: The mod adds an icon viewable only to mods when posting or editing posts. It adds the forum tags "[mod][/mod]" around text and would be rendered as red, italiziced and bracketed text. This makes it easier for moderators and administrators to add editorial comments in posts.

Thanks to Steve D., RichardKinser, and Nikkol for the assistance with the code!


Instructions:
http://64.132.114.212/boards/mods/modforumcode/modforumcode.txt

Image
http://64.132.114.212/boards/mods/modforumcode/icon_editor_mod.gif

Zip file with instructions and image:
http://64.132.114.212/boards/mods/modforumcode/modforumcode.zip

"That button did what?"

Edited by - jimlord on 19 March 2003 00:22:04

Steve D.
Average Member

USA
640 Posts

Posted - 18 March 2003 :  15:51:44  Show Profile  Visit Steve D.'s Homepage  Send Steve D. a Yahoo! Message
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
Go to Top of Page

jimlord
New Member

USA
57 Posts

Posted - 18 March 2003 :  18:59:58  Show Profile
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?"
Go to Top of Page

Steve D.
Average Member

USA
640 Posts

Posted - 18 March 2003 :  19:26:04  Show Profile  Visit Steve D.'s Homepage  Send Steve D. a Yahoo! Message
Did you try my suggestion? I don't think they are exactly the same.

Swing Dancing Video Clips - It's All Swing! Forum
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 18 March 2003 :  20:07:57  Show Profile
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)
Go to Top of Page

jimlord
New Member

USA
57 Posts

Posted - 18 March 2003 :  21:42:34  Show Profile
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
Go to Top of Page

jimlord
New Member

USA
57 Posts

Posted - 18 March 2003 :  21:55:28  Show Profile
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
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 18 March 2003 :  22:03:24  Show Profile
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.
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 18 March 2003 :  22:48:19  Show Profile
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
Go to Top of Page

jimlord
New Member

USA
57 Posts

Posted - 18 March 2003 :  23:11:32  Show Profile
Works like a charm. I'll clean this up and make it a mod with code. Thanks for your help.

"That button did what?"
Go to Top of Page

Steve D.
Average Member

USA
640 Posts

Posted - 18 March 2003 :  23:13:27  Show Profile  Visit Steve D.'s Homepage  Send Steve D. a Yahoo! Message
glad it worked!

Swing Dancing Video Clips - It's All Swing! Forum
Go to Top of Page

jimlord
New Member

USA
57 Posts

Posted - 19 March 2003 :  00:08:13  Show Profile
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?"
Go to Top of Page

jimlord
New Member

USA
57 Posts

Posted - 19 March 2003 :  00:21:46  Show Profile
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?"
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 19 March 2003 :  01:21:37  Show Profile
cool. yeah, i was just making that up off the top of my head ...
didn't know the actual style for making italics

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

jimlord
New Member

USA
57 Posts

Posted - 19 March 2003 :  18:23:18  Show Profile
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
Go to Top of Page

Steve D.
Average Member

USA
640 Posts

Posted - 19 March 2003 :  23:14:30  Show Profile  Visit Steve D.'s Homepage  Send Steve D. a Yahoo! Message
I really like the sounds of this, I'll have to give it a whirl on my dev forum!

Swing Dancing Video Clips - It's All Swing! Forum
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.25 seconds. Powered By: Snitz Forums 2000 Version 3.4.07