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)
 allowing html "sometimes"
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Brendan
Starting Member

16 Posts

Posted - 13 January 2002 :  20:26:40  Show Profile
Hey all,
so far I've have snitz running with about 10 mods but I really want to be able to change the allow html bit so that either only the admin(and moderators perhaps) can enter html in the message posts, or just as useful would be the chance to have the html code/forum code settings for each forum and not the whole board.

I have seached for help but the only post I found regarding this mainly discussed how it hasn't been done or even really requested.

If someone could help point me to the right spot in the code I can try and edit the code myself, but I am hoping to be able to do it neatly and perhaps release it as a mod.

I use snitz as just forums on one site but I use it as the entire base for another site, with a hidden forum called Interface Pages where I create the posts that I use as pages. It is this foum that I would like to be able to use HTML in.

Thanks in advance
Brendan

PS. thanks to all the mod makers for the extras, great job people :)

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 13 January 2002 :  21:49:32  Show Profile  Visit Gremlin's Homepage
A bit of a kludge, but should work.

Look for this line in inc_top.asp

mLev = cint(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword")))


Immediately after that line, add the following


if (mLev = 3 or mLev = 4) then
strAllowHTML = 1
end if


This would give moderators and Admins HTML On in posts. To restrict to Admins only just remove the mLev = 3 part.

BTW What user level is mLev = 2 ??

HALO - an EverQuest and Camelot Guild
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 14 January 2002 :  11:50:33  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
i think i remember reading that mLev=2 is for like the authors of posts and stuff, but searching the files of the forum, it is never used by itself, it always used when checking to see if they are a member and it calls out every mlev

Brad
Web Hosting with SQL Server @ $24.95 per month
Snitz Mod Archive

Go to Top of Page

heptite
Average Member

USA
547 Posts

Posted - 14 January 2002 :  20:32:11  Show Profile  Visit heptite's Homepage  Send heptite an ICQ Message  Send heptite a Yahoo! Message
quote:

A bit of a kludge, but should work.

Look for this line in inc_top.asp

mLev = cint(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword")))


Immediately after that line, add the following


if (mLev = 3 or mLev = 4) then
strAllowHTML = 1
end if


This would give moderators and Admins HTML On in posts. To restrict to Admins only just remove the mLev = 3 part.



This works really well! Thanks.

Sue

Additional support files - http://www.snitz.info
Go to Top of Page

tcharles
Starting Member

USA
24 Posts

Posted - 15 January 2002 :  00:02:11  Show Profile
quote:
if (mLev = 3 or mLev = 4) then strAllowHTML = 1
end if

This would give moderators and Admins HTML On in posts. To restrict to Admins only just remove the mLev = 3 part.


This is great - a parenthetical question for syntax students - so for Admins only it would be

if mLev = 4 then strAllowHTML = 1
end if

or

if (mLev = 4) then strAllowHTML = 1
end if

Thanks

Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 15 January 2002 :  00:35:39  Show Profile  Visit Gremlin's Homepage
To Parenthesise or not to Parenthesise that is the question

I have a bad tendancy to use parenthesises even when not strictly required, i find it helpfull to be in the habit of using them particularly when you get into longer more complex conditional clasues using many compares along with OR 's and AND's etc

HALO - an EverQuest and Camelot Guild
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 18 January 2002 :  03:45:53  Show Profile  Visit dayve's Homepage
I've posted this before a long time ago and just as a side note, HTML and Forum Code do not mix well, especially with images... inc_functions gets confused on which way you want to post at times, especially if you are EDITING a post with images, etc... just an FYI...

____________
dayve@burningsouls.com


http://www.nineinchnailz.com - your source for everything nine inch nails !
Go to Top of Page

Intrepidone
Average Member

Canada
515 Posts

Posted - 27 January 2002 :  19:49:37  Show Profile
quote:

if (mLev = 3 or mLev = 4) then
strAllowHTML = 1
end if



This works when Admin posts a message, it will show in HTML, but it will not show the pop_preview in HTML, how can you do it so when you click on Preview, the preview will show
This is blue text 
and not
<font color=blue>This is blue text</font>


Intrepidone
Go to Top of Page

Intrepidone
Average Member

Canada
515 Posts

Posted - 27 January 2002 :  20:24:27  Show Profile
I figured it out, I just added
<%
mLev = cint(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword")))
if (mLev = 3 or mLev = 4) then
strAllowHTML = 1
end if
%>
below <!--#INCLUDE FILE="inc_top_short.asp"--> in my pop_preview_html.asp file

Intrepidone
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 27 January 2002 :  20:40:06  Show Profile
quote:

BTW What user level is mLev = 2 ??
- Gremlin


quote:

i think i remember reading that mLev=2 is for like the authors of posts and stuff, but searching the files of the forum, it is never used by itself, it always used when checking to see if they are a member and it calls out every mlev
- redbrad0





mlev = 1 = Author
mLev = 2 = Normal Member
mlev = 3 = Moderator
mLev = 4 = Admin


These values are returned when function



ChkUser (returns values 2,3 and 4
(returns values 0,2,3,4)



0 = Not Member or Not Logged in)
2 = Normal Member---- When M_LEVEL = 1
3 = Moderator ---- When M_LEVEL = 2
4 = Adminstrator ---- When M_LEVEL = 3


ChkUser2
(returns values 0,1,2,3,4)



0 = Not Member or Not Logged in)
1 = Author ---- When M_LEVEL <> 3 and Member is Author
2 = Normal Member---- When M_LEVEL = 1
3 = Moderator ---- When M_LEVEL = 2
4 = Adminstrator ---- When M_LEVEL = 3




www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 28 January 2002 :  02:14:18  Show Profile  Visit Gremlin's Homepage
Thanks GB, gonna cut and paste that into my inc_top.asp on my forums now for future reference

HALO - an EverQuest and Camelot Guild
Go to Top of Page

VodkaFish
Average Member

USA
654 Posts

Posted - 08 April 2002 :  14:06:48  Show Profile  Send VodkaFish an AOL message  Send VodkaFish an ICQ Message  Send VodkaFish a Yahoo! Message
I'm posting here because I feel this question is along the same lines.

I have images turned off on my forums, as I do not want someone to sign up and then spam the forums with something nasty.

However, I would like my moderators and myself to be able to post images. What would be the line for that?

Thanx

v ø d k â f ï § h
Go to Top of Page

VodkaFish
Average Member

USA
654 Posts

Posted - 08 April 2002 :  17:21:13  Show Profile  Send VodkaFish an AOL message  Send VodkaFish an ICQ Message  Send VodkaFish a Yahoo! Message
Actually, referencing Gremlin's first post above, I just have to change "strAllowHTML" to "strIMGInPosts". I did it and it works. If anyone can tell me why not to do this (why it's not good for the code), please do. Thanx, and for anyone else, enjoy.

v ø d k â f ï § h
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 08 April 2002 :  19:57:25  Show Profile  Visit Gremlin's Homepage
Theres only one real downfall doing it the way I've shown above that I can find.

The problem happens when you go into your admin settings to change any other features,you'll not be able to turn Images or HTML off again :(.

what I did was remove the check in the relevant admin page also so that the radio button wasn't pre selected based on the current strAllowHTML setting. More of a kludge really but it works fine for me.

www.daoc-halo.com
Go to Top of Page

VodkaFish
Average Member

USA
654 Posts

Posted - 09 April 2002 :  19:36:25  Show Profile  Send VodkaFish an AOL message  Send VodkaFish an ICQ Message  Send VodkaFish a Yahoo! Message
Good to know, I might not have noticed. I doubt I'll change anything, but I'll change a couple of things around so I don't activate something by accident. Thanx.

v ø d k â f ï § h
Go to Top of Page

Aaron S.
Average Member

USA
985 Posts

Posted - 09 April 2002 :  23:30:35  Show Profile  Visit Aaron S.'s Homepage
If you need to make this a permanent addition to your site, I would suggest the following:

Add a new variable to the CONFIG_NEW table (and load it into config.asp) called:

strAdminAllowHTML (or whatever)

Then you could add it to the Admin page. This would allow you to toggle the option on/off.

Wherever you added the mlev check, change strAllowHTML to the new string name (in this case strAdminAllowHTML).

--Aaron



MySubs Email MOD
MOD to Smile Mgr
HotKeys MOD

Edited by - Aaron S. on 09 April 2002 23:31:56
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 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.19 seconds. Powered By: Snitz Forums 2000 Version 3.4.07