Author |
Topic |
Freeman II
Junior Member
232 Posts |
Posted - 28 May 2001 : 02:32:53
|
dayve im confused now which one is the final code?
|
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 28 May 2001 : 13:26:13
|
quote:
dayve im confused now which one is the final code?
I just collected everything that was mentioned in this topic. this is everything you should need:
quote:
inc_functions.asp
>> find every instance of this..
elseif fField_Type = "message" then if strAllowHTML <> "1" then fString = HTMLEncode(fString) end if
and replace with this..
elseif fField_Type = "message" then if (strAllowHTML <> "1" and mLev <> 4) then fString = HTMLEncode(fString) end if
find and replace these lines too:
if (strIMGInPosts = "1" and strAllowHTML = "1") then fString = replace(fString, "<img src=""","[ img]", 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
and
if (strIMGInPosts = "1" and strAllowHTML = "1") then fString = doCode(fString, "[ img]","[/img]","<img src=""",""" border=0>") fString = doCode(fString, "[ img]","[/img]","<img src=""",""" border=0>") fString = doCode(fString, "[ img=right]","[/img=right]","<img align=right src=""",""" id=right border=0>") fString = doCode(fString, "[ img=right]","[/img=right]","<img align=right src=""",""" id=right border=0>") fString = doCode(fString, "[ img=left]","[/img=left]","<img align=left src=""",""" id=left border=0>") fString = doCode(fString, "[ img=left]","[/img=left]","<img align=left src=""",""" id=left border=0>") end if
post.asp
>> find and replace these lines
<% if (strAllowHTML = "1" or mLev = 4) then %> * HTML is ON<br> <% else %> * HTML is OFF<br> <% end if %>
Dayve |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 28 May 2001 : 14:27:10
|
hmmm, this is not perfected after all. how can I use the forum image tag OR the html image tag? I mean they both work as admin but if I try to edit the post while using the html image tag is does this:
[ img]http://www.nineinchnailz.com/images/ninzlogo.gif">
so I apologize and advise everyone to not use this section:
if (strIMGInPosts = "1" and strAllowHTML = "1") then fString = replace(fString, "<img src=""","[ img]", 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
and
if (strIMGInPosts = "1" and strAllowHTML = "1") then fString = doCode(fString, "[ img]","[/img]","<img src=""",""" border=0>") fString = doCode(fString, "[ img]","[/img]","<img src=""",""" border=0>") fString = doCode(fString, "[ img=right]","[/img=right]","<img align=right src=""",""" id=right border=0>") fString = doCode(fString, "[ img=right]","[/img=right]","<img align=right src=""",""" id=right border=0>") fString = doCode(fString, "[ img=left]","[/img=left]","<img align=left src=""",""" id=left border=0>") fString = doCode(fString, "[ img=left]","[/img=left]","<img align=left src=""",""" id=left border=0>")
Dayve
Edited by - dayve on 28 May 2001 14:27:31 |
|
|
Aznknight
Senior Member
USA
1373 Posts |
Posted - 04 June 2001 : 14:25:58
|
good little, simple mod. One of the features i needed. Never thought that it would be so easy to do
- Alan www.iamviet.com www.calvsa.net Snitz Resource |
|
|
Deleted
deleted
4116 Posts |
Posted - 04 June 2001 : 18:34:29
|
quote:
hmmm, this is not perfected after all. how can I use the forum image tag OR the html image tag? I mean they both work as admin but if I try to edit the post while using the html image tag is does this:
[ img]http://www.nineinchnailz.com/images/ninzlogo.gif">
so I apologize and advise everyone to not use this section:
if (strIMGInPosts = "1" and strAllowHTML = "1") then fString = replace(fString, "<img src=""","[ img]", 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
and
if (strIMGInPosts = "1" and strAllowHTML = "1") then fString = doCode(fString, "[ img]","[/img]","<img src=""",""" border=0>") fString = doCode(fString, "[ img]","[/img]","<img src=""",""" border=0>") fString = doCode(fString, "[ img=right]","[/img=right]","<img align=right src=""",""" id=right border=0>") fString = doCode(fString, "[ img=right]","[/img=right]","<img align=right src=""",""" id=right border=0>") fString = doCode(fString, "[ img=left]","[/img=left]","<img align=left src=""",""" id=left border=0>") fString = doCode(fString, "[ img=left]","[/img=left]","<img align=left src=""",""" id=left border=0>")
Dayve
Edited by - dayve on 28 May 2001 14:27:31
If I use the html version of IMG tag, for sure I give width, height and/or border. I overcame it by using:
<img width="300" src="../anasayfa/images/0548_01.jpg">
instead of
<img src="../anasayfa/images/0548_01.jpg" width="300" >
as the code searched for <img src=".
Not a nice solution but it works. Same can be applied for other tags.
Think Pink |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 06 June 2001 : 01:16:31
|
quote:
good little, simple mod. One of the features i needed. Never thought that it would be so easy to do
- Alan www.iamviet.com www.calvsa.net Snitz Resource
thanks! actually, it has been working out perfect for me. forum code was so limiting but I did not want everyone to have that ability. I got real tired of turning on html real quick, doing a post and then turning it back off...! talk about hokey!!
Dayve |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 18 June 2001 : 00:04:16
|
well I found out why I was having issues with using HTML and images
Forum Bug
Dayve |
|
|
Mike B
Starting Member
6 Posts |
Posted - 22 June 2001 : 18:15:17
|
This looks like an intersting mod. Is it in a pretty stable state? It looked like there was some bugs etc in looking over the posts here?
|
|
|
Topic |
|
|
|