The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
iFrame BBCode Details »» | |||||||||||||||||||||||||
I went looking for iFrame BB Coding and came across several, but none really suited my needs or the needs of my members. In addition to this I noticed a common requested add on feature for this code by those who added it to their site, but I have yet to find anyone who filled that request.
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". This is my first attempt at any type of BB Code (I'm new to HTML), so go easy on me. This works for 3.6.8 but I won't be able to offer support for this. To install this BB Code: AdminCP -> Custom BB Codes -> Add new BB Code Title: iFrame Tag: if Replacement: HTML Code:
<!-- 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 --> 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: HTML Code:
<table border="0" bgcolor="#89723C" width="100%"> <tr> The height and width of the iFrame can be adjusted by changing this line: HTML Code:
<iframe src="{param}" width="100%" height="500"> </iframe> You can check out a live version at this URL: http://www.strike-force.net/showthread.php?t=280 I highly advise that if you use this BB Code that you install: Advanced BBCode Permissions 3.0 to restrict which usergroups can use this BB Code. I have updated this thread with the updated iFrame code, you can download the old code via the zipped file below. Show Your Support
|
Comments |
#12
|
|||
|
|||
Unfortunately I only come by here every couple of months, so I didn't catch it till now.
|
#13
|
|||
|
|||
I have found that this change in code to allow the iFrame site to open to a new tab or window has caused the forward button to not work in IE8. Here is the fix for this:
Code:
<!-- Start iFrame by Strike-Force.net --> <table border="0" bgcolor="#89723C" width="100%"> <tr> <td> <center> <head> <script type="text/javascript"> function goBack() { window.history.back() } </script> </head> <body> <input type="button" value="Back" onclick="goBack()"> </body> <head> <script type="text/javascript"> function newDoc() { window.location.assign("{param}"); } </script> </head> <body> <input type="button" value="Visit Site" onClick="window.open('{param}')" /> </body> <head> <script type="text/javascript"> function goforward() { window.history.forward() } </script> </head> <body> <input type="button" value="Forward" onclick="history.go(1)"> </body> </center> </td> </tr> </table> <iframe src="{param}" width="100%" height="500"> </iframe> <!-- End iFrame by Strike-Force.net --> |
#14
|
||||
|
||||
i think there is conflict between this hack and html archive hack
|
#15
|
|||
|
|||
Quote:
Here is the updated code: Code:
<!-- 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 --> |
#16
|
||||
|
||||
Quote:
|
#17
|
||||
|
||||
Yes fixed in IE8 and works great in Firefox.
BTW I include a button on my editor for this BB code feature. Attached to this post is the icon I use for the button. |
#18
|
||||
|
||||
Using the most recent code the back/forward buttons do not work with Google Chrome, it does work with IE8 and Safari. Any idea on Google Chrome compatibility? It's my favorite browser at the moment.
edit- if I go to more then 2 pages it seems to work... |
#19
|
||||
|
||||
I'm trying to use this mod to display a flickr photo slideshow, but flickr says it doesn't allow slideshows in iFrame.
Is there any way to mask this iframe code so a flickr slideshow will embed in a post? I've tried creating a custom bbcode just for flickr slideshows but I'm having no luck. In fact with this code, it starts to display the slideshow for half a second and then the window below appears: |
#20
|
||||
|
||||
Quote:
|
#21
|
||||
|
||||
Quote:
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|