Author |
Topic |
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 11 February 2004 : 14:48:37
|
I'm trying to find a way to add the iframe function to the forumcode. The only thing I cannot seem to find out is how to define the size of the frame (height/width)...
The general idea would be this: By using this code
[iframe:height-width-align]sourceaddress[/iframe] you would get this HTML content:
<iframe src="sourceaddress" style="border:1px tablebordercolor solid;" name="framed1" scrolling="auto" frameborder="yes" align="align" height = "heightpx" width = "widthpx"></iframe>
Maybe someone has done this already ? |
portfolio - linkshrinker - oxle - twitter |
Edited by - MarcelG on 11 February 2004 14:50:13 |
|
ajhvdb
Junior Member
Netherlands
392 Posts |
Posted - 11 February 2004 : 15:14:29
|
We added an new image tag for more control. The same as html .. we only replace the begin and end tag.
example: [ image ]"logo.gif" border="0" align="right" width="145" height="94"[ /image ] |
|
|
ajhvdb
Junior Member
Netherlands
392 Posts |
Posted - 11 February 2004 : 15:23:51
|
Oops, we didn't add the forum tag (it is standard), we changed the code. |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 11 February 2004 : 15:32:32
|
Ah, that's also an approach! Didn't think of that one! However, that requires some extra knowledge for the user on the syntax, and some extra tweaking of the HTML->Code functions, doesn't it ? |
portfolio - linkshrinker - oxle - twitter |
|
|
ajhvdb
Junior Member
Netherlands
392 Posts |
Posted - 11 February 2004 : 15:44:27
|
The code changes i can send you and if you use a compare tool installation is done in 2 min. You're right about the user off course. |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 12 February 2004 : 02:26:56
|
ajhvdb, thanks! You can send them to me at marcel@oxle.com. But, still, how would we need to approach it if we wanted it to work as I described in my first post ? Any guru willing to take up the challenge ? |
portfolio - linkshrinker - oxle - twitter |
|
|
DavidRhodes
Senior Member
United Kingdom
1222 Posts |
Posted - 12 February 2004 : 04:31:16
|
Have a look at the Flash forum code mod, that uses exactly the same idea |
The UK MkIVs Forum |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 13 February 2004 : 06:03:12
|
Mmmh... I've found this : inc_func_posting.asp
'---------- FLASH ICON
if strAllowFlash = "1" and mlev >= cInt(intAllowFlash) then
fString = replace(fString, "<embed width=""","[flash ", 1, -1, 1)
fString = replace(fString, """ height=""",":", 1, -1, 1)
fString = replace(fString, """ src=""","]", 1, -1, 1)
fString = replace(fString, """ hidden=""false"" autostart=""true"" loop=""false"" volume=""100""></embed>","[/flash]", 1, -1, 1)
end if
'---------- FLASH ICON inc_func_common.asp'---------- FLASH ICON
if strAllowFlash = "1" and mlev >= cInt(intAllowFlash) then
fString = doCode(fString, "[flash ",":","<embed width=""",""" height=""")
fString = doCode(fString, "]","[/flash]",""" src=""",""" hidden=""false"" autostart=""true"" loop=""false"" volume=""100""></embed>")
end if
'---------- FLASH ICON I'm not really sure that I understand how this function works... |
portfolio - linkshrinker - oxle - twitter |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 13 February 2004 : 08:05:18
|
Try adding the following lines to the extratags function in inc_func_common.asp:fString = doCode(fString, "[iframe", ":", "<iframe width=""", """ height=""")
fstring = doCode(fstring, "]", "[/iframe]", "src=""", """ iframe properties></iframe>") The forum code would then look like this:
[iframe:w:h]url[/iframe]
|
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.” |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 13 February 2004 : 10:19:30
|
Mmmm...not quite... This outputs this HTML code:"
<iframe width="" height="480:640src="<a href="url" target="_blank">url</a>" style="border:1px black solid;" name="framed1" scrolling="auto" frameborder="yes" align="left"></iframe> Added this exact code to the function: (in red)
function extratags(fString)
fString = doCode(fString, "", "", "<font color=""" & CColor & """>", "</font id=""" & CColor & """>")
fString = doCode(fString, "[iframe", ":", "<iframe width=""", """ height=""")
fstring = doCode(fstring, "]", "[/iframe]", "src=""", """ style=""border:1px black solid;"" name=""framed1"" scrolling=""auto"" frameborder=""yes"" align=""left""></iframe>")
extratags = fString
end function |
portfolio - linkshrinker - oxle - twitter |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 13 February 2004 : 11:21:50
|
Feck, of course it would; the URL is being caught by the edit_hrefs function in inc_func_common.asp. Only thing I can suggest at this hour of a Friday afternoon is removing that particualr fuunction. The problem with that is that any URLs that are posted without the [url] tag won't be clickable. I'm sure someone else will be able to come up with a better solution than that, though.
|
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.” |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 11 March 2004 : 05:10:33
|
I've done it ; I've placed the FLASH function with the IFRAME function. It's still a bit buggy, but it works for what I need.
In inc_func_common.asp (around line 730)
'---------- IFRAME
if strAllowFlash = "1" and mlev >= cInt(intAllowFlash) then
fString = doCode(fString, "[iframe ",":","<iframe width=""",""" height=""")
fString = doCode(fString, "]","[/iframe]",""" src=""", """ style=""border:1px black solid;"" name=""framed1"" scrolling=""auto"" frameborder=""yes"" align=""left""></iframe>")
end if
'---------- IFRAME
In inc_func_posting.asp (around line 140).
'---------- IFRAME
'if strAllowFlash = "1" and mlev >= cInt(intAllowFlash) then
fString = replace(fString, "<iframe width=""","[iframe ", 1, -1, 1)
fString = replace(fString, """ height=""",":", 1, -1, 1)
fString = replace(fString, """ src=""","]", 1, -1, 1)
fString = replace(fString, """ style=""border:1px black solid;"" name=""framed1"" scrolling=""auto"" frameborder=""yes"" align=""left""></iframe>","[/iframe]", 1, -1, 1)
'end if
'---------- IFRAME
In inc_func_pb2.asp Changed the function Flash:
function flash() {
var text = getText();
if (helpstat) {
alert("Iframe Tag adds an external webpage or Flash animation to the text.\n\nUSE: [iframe height:width]URL or Path to the page[/iframe]");
} else if (basic) {
AddTxt="[iframe width:height]" + text + "[/iframe]";
AddText(AddTxt);
} else {
if (text) {
txt=prompt("URL or Path to page or the Flash animation.",text);
} else {
txt=prompt("URL or Path to page or the Flash animation.","Text");
}
if (txt!=null) {
AddTxt="[iframe height:width]"+txt+"[/iframe]";
AddText(AddTxt);
}
}
}
|
portfolio - linkshrinker - oxle - twitter |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 11 March 2004 : 08:20:27
|
Looking good, Marcel; nice workaround. When you say it's a bit buggy, are there any specific issues you've encountered?
|
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.” |
|
|
ajhvdb
Junior Member
Netherlands
392 Posts |
Posted - 11 March 2004 : 10:41:07
|
On your site I posted a reply but it doesn't work in the reply?!?? Did i miss a letter, symbol. |
|
|
Topic |
|