PDA

View Full Version : BB Code Enhancements - iFrame BBcode


Strike-Force.ne
07-21-2009, 10:00 PM
This code is a result of looking for something similar a while back for my forum. I originally made this for vb 3.6.8 (https://vborg.vbsupport.ru/showthread.php?p=1439967#post1439967) but have confirmed it works for 3.8.2 and 3.8.3 as well.

This BB Code contains not only a button which allows the viewer to go to the site being displayed, but it also contains a "Back" and "Forward" button so the user can navigate the iFramed site without having to leave your site. This allows the user to decide whether the posted site is worth more of their time or not without forcing them to view it in order to go "back" or "forward".

To install this BB Code: AdminCP -> Custom BB Codes -> Add new BB Code

Title: iFrame

Tag: if

Replacement: <!-- Start iFrame by Strike-Force.net -->

<table border="0" bgcolor="#89723C" width="100%"> <tr>

<td> <br> <center> <head>

<script type="text/javascript">
function goBack()
{
window.history.back()
}
</script>

<input type="button" value="Back" onclick="goBack()">


<script type="text/javascript">
function newDoc()
{
window.location.assign("{param}");
}
</script>

<input type="button" value="Visit Site" onClick="window.open('{param}')" />

<script type="text/javascript">
function goforward()
{
window.history.forward()
}
</script>


<input type="button" value="Forward" onclick="history.go(1)"> </head> </center> <br> </td> </tr> </table>

<iframe src="{param}" width="100%" height="500"> </iframe>

<!-- End iFrame by Strike-Force.net -->

Example: http://www.google.com

Description: Places a site within a small framed window in a post.

Use {option}: No

Button Image: (button image is optional, and I don't use one personally)

I have also created a colored border around the buttons which can easily be changed to suit the color scheme of your site. This can be changed by changing the bgcolor value to whatever color you choose on this line:
<table border="0" bgcolor="#89723C" width="100%"> <tr>

The height and width of the iFrame can be adjusted by changing this line:
<iframe src="{param}" width="100%" height="500"> </iframe>

Here's an example of this on my vb 3.6.8 install but it looks the same on 3.8.3: http://www.strike-force.net/showthread.php?t=280


You will need to install the plugin Advanced BBCode Permissions if you want to restrict who can use this BBcode.

Andyrew
07-22-2009, 08:03 PM
That's great. :D:up:

sugresmax
07-23-2009, 04:00 AM
And I can put into this BB-code some bad page? With exploit ... or virus.

tirol07
07-23-2009, 06:42 AM
wonderful :)

trotskid
07-23-2009, 12:15 PM
Nice BBcode, thanks!

Frondy
07-23-2009, 01:20 PM
Nice work, thanks

Strike-Force.ne
07-23-2009, 02:38 PM
And I can put into this BB-code some bad page? With exploit ... or virus.

Potentially. That's why I recommend you install the Advanced BBCode Permissions plugin to limit who can use this BBcode. I would read the end of the thread for that plugin for updates on how to make it compatible for 3.8.X since it's for 3.6.X

sugresmax
07-23-2009, 05:53 PM
For what this BB code? :)
Create a group, and allow HTML ... I think it is more powerfull, but more dangerous.

ps. You can do with your board everything You want :)

gearspro
07-24-2009, 07:11 PM
works great thanks

Bill from Cleve
03-19-2010, 11:01 PM
What a fun toy.

As far as being used as "back door" to jerks wishing to crash your board, make sure you run a tight board. That's what Mods are for. Besides CYB's-permissions based on post count should work rather well?

hiker
03-24-2010, 07:49 PM
I've got a "competing" forum, that members will link to once in a while.

Instead of giving my members the iframe option, I would like to AUTOMATICALLY put certain url's into an iframe. There are only a couple of them.

So when either of these two urls are posted as a link, I'd like it to just post in the iframe automatically.

Is this possible by modifying this code?

Thanks.

Baghira
03-26-2011, 06:27 PM
Does not work for me.

In ACP/BBcodes I see the correct preview of google.com.

But posting it in a thread:

http://www.google.com

result is:
http://www.google.com')" />

Page not found

1971Coogs
05-11-2011, 11:49 PM
When I added this BB code, I get this error message

404 Not Found
The resource requested could not be found on this server! Powered By LiteSpeed Web Server
LiteSpeed Technologies is not responsible for administration and contents of this web site!

cstreater
10-09-2011, 09:58 PM
Does not work for me.

In ACP/BBcodes I see the correct preview of google.com.

But posting it in a thread:

http://www.google.com

result is:
http://www.google.com')" />

Page not found

Disable BB Code within this BB Code = Yes

Otherwise it will wrap the [url] tag around the link.