The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
With my other post on how to only allow moderators and admins to use the reply with quote function, I was wondering if I could do the same with images. The reply with quote alteration was pretty simple, would it be just as simple with the images?
I'd like to only allow moderators and admins to be able to post images. However, I can't find where this code is. It doesn't seem to appear in the topic.asp file. Where would I look?
Would it be as simple as adding the parts below in green around the correct section of code?
If mlev >= 3 then Section of code here
End If
Thanks.
< Moved to MOD Add-On Forum (W/O Code) by Shaggy /><
I'd like to only allow moderators and admins to be able to post images. However, I can't find where this code is. It doesn't seem to appear in the topic.asp file. Where would I look?
Would it be as simple as adding the parts below in green around the correct section of code?
If mlev >= 3 then Section of code here
End If
Thanks.
< Moved to MOD Add-On Forum (W/O Code) by Shaggy /><
Sist redigert av
Postet den
I am assuming the ability to use
hmm if so I'll see if I can look through the files and see what I can come up with.<
Code:
[ img] [/img ]
Sist redigert av
Postet den
Which file contains the code to be able to post images? I've looked in post.asp but it isn't in there.<
Postet den
I've tried just inserting the [ img] [/img ] tag around the URL of the picture, but it will not work unless pictures are enable for the site. Is it at all possible to not allow normal users to post but allow mods and admins?<
Postet den
I know I know where to put the check, but I've been having some "memory issues" of the sort that an extra stick of RAM can't help.... Lemme dig through the code and see what I can come up with.<
Postet den
Around line 1165 in inc_func_common.asp is a function called 'ReplaceImageTags(fString)'. If I'm reading this right, this is the function that replaces [img] with the image.
You could probably add an If mLev > 3 Then .. to the end so that if they can post images, it returns the properly formatted string, and if not it returns the original string.
Its a start...<
You could probably add an If mLev > 3 Then .. to the end so that if they can post images, it returns the properly formatted string, and if not it returns the original string.
Its a start...<
Postet den
That wouldn't work as ReplaceImageTags() is called by the FormatStr() function which a post is passed through when it is pulled from the database, not inserted. Using the above method would mean that only moderators and admins would see images posted by any member of your forums.
<
Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
<
Search is your friend
“I was having a mildly paranoid day, mostly due to thefact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Postet den
Ah. Where would it go then?<
Postet den
It'd be tricky, you'd have to pass the member level of the poster down through FormatStr() to ReplaceImageTags().
<
Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
<
Search is your friend
“I was having a mildly paranoid day, mostly due to thefact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Postet den
Hmm... I'll look at it as I wait for the class to finish ...<
Postet den
Actually, you'd only need to pass it through to FormatStr and then use it to check whether or not to call ReplaceImageTags. Problem is, FormatStr is used elsewhere besides topic.asp.
<
Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
<
Search is your friend
“I was having a mildly paranoid day, mostly due to thefact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Email Member
Message Member
Post Moderation
Filopplasting
If you're having problems uploading, try choosing a smaller image.
Forhåndsvis post
Send Topic
Loading...