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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Only allow Admin's to post images?
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 4

PackYakcouk
New Member

United Kingdom
59 Posts

Posted - 29 December 2008 :  20:05:34  Show Profile  Visit PackYakcouk's Homepage
Is it possible to allow only Admins to post images in posts ?

I know I can enable "Images in Posts" as an admin but I don't want members to be able to do this for obvious reasons.

i thought maby finding a way to enable HTMl post for admins only, or enabling images for admins only?

I am running Snitz Forums 2000 Version 3.4.06.

Any help would make me smile <

Edited by - PackYakcouk on 01 January 2009 08:30:55

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 29 December 2008 :  20:35:20  Show Profile  Visit MaD2ko0l's Homepage
yes, but not as standard

there has been a mod that does this but the website seems to be down or i have the wrong link.

might need somone to post up a downlaodable link to it somwhere.<

© 1999-2010 MaD2ko0l
Go to Top of Page

PackYakcouk
New Member

United Kingdom
59 Posts

Posted - 29 December 2008 :  20:40:30  Show Profile  Visit PackYakcouk's Homepage
Thanks MaD2ko0l,

I realy do hope someone does, i darnt open up HTML formatted posts to everyone but it would solve a lot of problems if i could use them.<
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 29 December 2008 :  22:44:51  Show Profile  Visit AnonJr's Homepage
There are a few alternate snippets floating around the archives here - just tick the appropriate check box on the search form.

However, all the solutions do have some minor drawbacks when someone tries to quote the Admin's HTML and some other oddities that escape my poor memory at the moment.<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 30 December 2008 :  04:20:03  Show Profile  Visit HuwR's Homepage
what html did you need to allow ? forumcode covers most things.<
Go to Top of Page

PackYakcouk
New Member

United Kingdom
59 Posts

Posted - 30 December 2008 :  05:33:47  Show Profile  Visit PackYakcouk's Homepage
AnonJr,
I have searched and searched and searched, every link to said snippets/mods are broken.


HuwR,
Well call me dumb lol but as yet I still cannot figure out how to post an image in a post, I know this would be easy via html. There are many other things I could accomplish with html too.

I know I can enable "Images in Posts" as an admin but I don't want members to be able to do this for obvious reasons.<

Edited by - PackYakcouk on 30 December 2008 05:36:34
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 30 December 2008 :  06:03:03  Show Profile  Visit HuwR's Homepage
you use the [img] tags to put images in posts, check out the FAQ (if you don't allow images in posts then you won't be able to as admin either)<
Go to Top of Page

PackYakcouk
New Member

United Kingdom
59 Posts

Posted - 30 December 2008 :  07:47:36  Show Profile  Visit PackYakcouk's Homepage
Then that brings us back to my origional question lol.<

Edited by - PackYakcouk on 01 January 2009 08:32:08
Go to Top of Page

Carefree
Advanced Member

Philippines
4217 Posts

Posted - 01 January 2009 :  11:42:09  Show Profile
Haven't tested this, but it may do the trick. In "inc_func_posting.asp", look for the following lines (appx 376-394):
		if strAllowForumCode = "1" then
			if strIMGInPosts = "1" then
				fString = replace(fString, "<img src=""","[ img ]", 1, -1, 1)

				'## left for compatibility with older versions of the forum
				fString = replace(fString, "<img align=right src=""","[ img=right]", 1, -1, 1)
				fString = replace(fString, "<img align=left src=""","[ img=left]", 1, -1, 1)
				fString = replace(fString, """ border=0>","[ /img ]", 1, -1, 1)
				fString = replace(fString, """ id=right border=0>","[ /img=right]", 1, -1, 1)
				fString = replace(fString, """ id=left border=0>","[ /img=left]", 1, -1, 1)
				'##

				fString = replace(fString, "<img align=""right"" src=""","[ img=right]", 1, -1, 1)
				fString = replace(fString, "<img align=""left"" src=""","[ img=left]", 1, -1, 1)
				fString = replace(fString, """ border=""0"">","[ /img ]", 1, -1, 1)
				fString = replace(fString, """ id=""right"" border=""0"">","[ /img=right]", 1, -1, 1)
				fString = replace(fString, """ id=""left"" border=""0"">","[ /img=left]", 1, -1, 1)
			end if
		end if

Change them to say:
		if strAllowForumCode = "1" then
			if mLev > 2 then
				if strIMGInPosts = "1" then
					fString = replace(fString, "<img src=""","[ img ]", 1, -1, 1)
					'## left for compatibility with older versions of the forum
					fString = replace(fString, "<img align=right src=""","[ img=right]", 1, -1, 1)
					fString = replace(fString, "<img align=left src=""","[ img=left]", 1, -1, 1)
					fString = replace(fString, """ border=0>","[ /img ]", 1, -1, 1)
					fString = replace(fString, """ id=right border=0>","[ /img=right]", 1, -1, 1)
					fString = replace(fString, """ id=left border=0>","[ /img=left]", 1, -1, 1)
					'##
					fString = replace(fString, "<img align=""right"" src=""","[ img=right]", 1, -1, 1)
					fString = replace(fString, "<img align=""left"" src=""","[ img=left]", 1, -1, 1)
					fString = replace(fString, """ border=""0"">","[ /img ]", 1, -1, 1)
					fString = replace(fString, """ id=""right"" border=""0"">","[ /img=right]", 1, -1, 1)
					fString = replace(fString, """ id=""left"" border=""0"">","[ /img=left]", 1, -1, 1)
				end if
			end if
		end if


Note: Where the font is red, delete the spaces before/after img.<

Edited by - Carefree on 01 January 2009 11:51:47
Go to Top of Page

PackYakcouk
New Member

United Kingdom
59 Posts

Posted - 01 January 2009 :  12:42:27  Show Profile  Visit PackYakcouk's Homepage
Thanks for the reply Carefree,

I have just made the changes and when a user or admin trys to make a new topic/post we get an evil "HTTP 500 Internal Server Error"

<
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 01 January 2009 :  12:56:19  Show Profile  Visit AnonJr's Homepage
Turn off friendly error messages. You'll get a more detailed error which will help figure out where the problem is.<
Go to Top of Page

PackYakcouk
New Member

United Kingdom
59 Posts

Posted - 01 January 2009 :  13:01:58  Show Profile  Visit PackYakcouk's Homepage
Ok ive turned off friendly error messages, heres what it says

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/forum/inc_func_posting.asp, line 394

end if fString = Replace(fString, "'", "'")
-------^


Heres my code from lines 376 to 397.

if strAllowForumCode = "1" then
			if mLev > 2 then
				if strIMGInPosts = "1" then
					fString = replace(fString, "<img src=""","", 1, -1, 1)
					fString = replace(fString, """ id=right border=0>","[/img=right]", 1, -1, 1)
					fString = replace(fString, """ id=left border=0>","[/img=left]", 1, -1, 1)
					'##
					fString = replace(fString, "<img align=""right"" src=""","[img=right]", 1, -1, 1)
					fString = replace(fString, "<img align=""left"" src=""","[img=left]", 1, -1, 1)
					fString = replace(fString, """ border=""0"">","", 1, -1, 1)
					fString = replace(fString, """ id=""right"" border=""0"">","[/img=right]", 1, -1, 1)
					fString = replace(fString, """ id=""left"" border=""0"">","[/img=left]", 1, -1, 1)
				end if
			end if
		end if	fString = Replace(fString, "'", "'")
	CleanCode = fString
end function
%>


Hope this helps.<

Edited by - PackYakcouk on 01 January 2009 13:03:00
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 01 January 2009 :  13:59:11  Show Profile  Visit AnonJr's Homepage
The "fString = Replace(fString, "'", "'")" should be on the next line, there shouldn't be anything after the "End If"<
Go to Top of Page

PackYakcouk
New Member

United Kingdom
59 Posts

Posted - 01 January 2009 :  14:06:07  Show Profile  Visit PackYakcouk's Homepage
New error,

Microsoft VBScript compilation error '800a03f4'

Expected 'If'

/forum/inc_func_posting.asp, line 397

end function
----^


Heres my code.

		if strAllowForumCode = "1" then
			if mLev > 2 then
				if strIMGInPosts = "1" then
					fString = replace(fString, "<img src=""","", 1, -1, 1)
					fString = replace(fString, """ id=right border=0>","[/img=right]", 1, -1, 1)
					fString = replace(fString, """ id=left border=0>","[/img=left]", 1, -1, 1)
					'##
					fString = replace(fString, "<img align=""right"" src=""","[img=right]", 1, -1, 1)
					fString = replace(fString, "<img align=""left"" src=""","[img=left]", 1, -1, 1)
					fString = replace(fString, """ border=""0"">","", 1, -1, 1)
					fString = replace(fString, """ id=""right"" border=""0"">","[/img=right]", 1, -1, 1)
					fString = replace(fString, """ id=""left"" border=""0"">","[/img=left]", 1, -1, 1)
				end if
			end if
		end if	
		fString = Replace(fString, "'", "'")
	CleanCode = fString
end function
%>


Sorry if im being dumb, im obvously a product of the Universe your sig talks of hee hee <

Edited by - PackYakcouk on 01 January 2009 14:14:54
Go to Top of Page

PackYakcouk
New Member

United Kingdom
59 Posts

Posted - 01 January 2009 :  14:17:52  Show Profile  Visit PackYakcouk's Homepage
Oh just a little thought, should i have "Enable Images In posts" enabled or not with this new code?

I asume not but i may be wrong?<
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 01 January 2009 :  14:30:50  Show Profile  Visit AnonJr's Homepage
At a glance, it looks like you will still have to turn on "Enable Images In Posts" - but only moderators and admins will actually be able to post images.<
Go to Top of Page
Page: of 4 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.25 seconds. Powered By: Snitz Forums 2000 Version 3.4.07