Author |
Topic |
|
rasure
Junior Member
289 Posts |
Posted - 09 December 2004 : 18:23:50
|
I need to be able to allow images for certain members, ie admins, mods, gold and silver members, I have this code so far but it also stops smilies from showing which I don't want to happen. All I want is to be able to allow images that are posted in the standard way.
if strIMGInPosts = "1" and Slev = 1 or Slev = 2 or mlev = 3 or mlev = 4 then
fString = ReplaceImageTags(fString)
elseif strIMGInPosts = "1" and Slev = 0 then
fString = ""
If I remove the piece in red then it does allow smilies but also shows the images tags and the url of the image that has been posted. Any help on this would be appreciated, thanks. |
Psychic & Spiritual Development Resources |
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 09 December 2004 : 18:52:19
|
your boolean logic is off, you need to add parenthesis ...
if strIMGInPosts = "1" and (Slev = 1 or Slev = 2 or mlev = 3 or mlev = 4) then
as to the part about your code in red. trying to accomplish what you want to do is not going to be that simple, however, no matter what you do, someone can still post a link to an image, there is really no way around that. if you just want to remove the [img][/img] tags you can do something like this:
if strIMGInPosts = "1" and (Slev = 1 or Slev = 2 or mlev = 3 or mlev = 4) then
fString = ReplaceImageTags(fString)
elseif strIMGInPosts = "1" and Slev = 0 then
fString = Replace(fstring, "[img]", "")
fString = Replace(fstring, "[/img]", "")
.
.
.
end if
this will still show the link to the image, but as I stated earlier, you're not going to be able to stop that from happening. Someone can easily just type the url to an image at any time. just like this:
http://forum.snitz.com/forum/logo_snitz_forums_2000.gif
|
|
Edited by - dayve on 09 December 2004 19:05:21 |
|
|
rasure
Junior Member
289 Posts |
Posted - 10 December 2004 : 07:22:46
|
thank you dayve for your time, I didn't realise that this...
(Slev = 1 or Slev = 2 or mlev = 3 or mlev = 4) was the correct way I've edited my forum quite a lot and not used the () when adding members privileges as above, but its still working ok? is this a problem?
I was also thinking of doing the same for url too, so only certain members could post urls, so could that possibly stop the image url problem? I'll do a bit of experimenting and see what I can do, once again thanks for your time |
Psychic & Spiritual Development Resources |
Edited by - rasure on 10 December 2004 07:39:47 |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 10 December 2004 : 10:47:31
|
you can turn off the linking of url's but it is almost impossible to completely prevent url's from being posted, and even if a clever function was created to do so, you'd end up with something like..
hey, check out this image at www dot someimage dot com
sure this is not a valid link, but anyone can figure out where to still go to check it out.
what is the big deal with allowing images from everyone anyway? |
|
|
|
rasure
Junior Member
289 Posts |
Posted - 10 December 2004 : 12:09:09
|
quote: Originally posted by dayve what is the big deal with allowing images from everyone anyway?
Well its not a big deal, its just we have a photo reading section on the forums (psychic readings from photos) and only gold/silver members are allowed to post photos from their gallery.
Like I said its not a big deal, but saves time on moderation that's all, even though is states that only gold and silver members can post for photos lol.
thanks for you help anyway
|
Psychic & Spiritual Development Resources |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 10 December 2004 : 14:18:17
|
restrict the section then to Allowed Members Only. |
|
|
|
rasure
Junior Member
289 Posts |
Posted - 10 December 2004 : 16:00:24
|
Yes I did think of that, but although gold/silver members can post images in that section all members will need to able to reply the topic. |
Psychic & Spiritual Development Resources |
|
|
daxl
Starting Member
16 Posts |
Posted - 11 December 2004 : 09:50:21
|
how do i limit the numbers of images (including smilies) in posts? |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 11 December 2004 : 11:17:02
|
quote: Originally posted by daxl
how do i limit the numbers of images (including smilies) in posts?
this should be a separate question, but conceptually you could do a Split on the value [img] in the post and then if the UBound value of that split is greater than a certain number, show a message. |
|
|
|
|
Topic |
|