Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications

Reply
 
Thread Tools
iFrame BBCode Details »»
iFrame BBCode
Version: 1.1, by Strike-Force.ne Strike-Force.ne is offline
Developer Last Online: Apr 2010 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 3.6.8 Rating:
Released: 02-09-2008 Last Update: 07-07-2009 Installs: 24
Re-useable Code Translations  
No support by the author.

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 -->
Example: [if]http://www.google.com[/if]

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 02-10-2008, 12:00 PM
S7rik3R's Avatar
S7rik3R S7rik3R is offline
 
Join Date: Mar 2007
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks like something I've been hunting for my website long time
Reply With Quote
  #3  
Old 02-11-2008, 05:18 AM
PoetJA-1975's Avatar
PoetJA-1975 PoetJA-1975 is offline
 
Join Date: Sep 2006
Location: Meh...
Posts: 1,218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice! Thanx for sharing!

Jacquii.
Reply With Quote
  #4  
Old 02-14-2008, 05:56 AM
CLF's Avatar
CLF CLF is offline
 
Join Date: Jun 2007
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any way to avoid "http://" part?
Thank you.
Reply With Quote
  #5  
Old 02-23-2008, 01:11 PM
Strike-Force.ne Strike-Force.ne is offline
 
Join Date: Aug 2007
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CLF View Post
Is there any way to avoid "http://" part?
Thank you.
Replace this:
HTML Code:
<iframe width="100%" height="400" src="{param}"><a href="{param}" target="_blank">{param}</a></iframe> 

with this:
HTML Code:
<iframe src="http://{param}" width="100%" height="400"> </iframe>

Afterwards you will be able to iFrame the link by typing it as (examples ---->)www.Strike-Force.net or Strike-Force.net
Reply With Quote
  #6  
Old 03-16-2009, 05:36 PM
yotsume's Avatar
yotsume yotsume is offline
 
Join Date: Dec 2006
Posts: 844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If there a way to use this BB code to show powerpoint slides in the post?

Also, the visit site button I need the target to be a new tab or new window. How do I alter the BB Code for that?

Thanks!
Reply With Quote
  #7  
Old 04-11-2009, 11:46 PM
nectons nectons is offline
 
Join Date: Nov 2007
Location: GREECE
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

SORRY PLEASE DELETE THIS MESSAGE.

thanks
Reply With Quote
  #8  
Old 05-20-2009, 08:43 AM
lm3a.net's Avatar
lm3a.net lm3a.net is offline
 
Join Date: May 2009
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank u
Reply With Quote
  #9  
Old 06-14-2009, 02:44 PM
Strike-Force.ne Strike-Force.ne is offline
 
Join Date: Aug 2007
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by yotsume View Post
If there a way to use this BB code to show powerpoint slides in the post?

Also, the visit site button I need the target to be a new tab or new window. How do I alter the BB Code for that?

Thanks!

I'm not familar with powerpoint slides, so I'm can't help you out. However I can help you with having this open in a new tab or window.

Replace the code for the Visit Site from this:
Code:
<input type="button" value="Visit Site" onClick="newDoc()" />
to this:
Code:
<input type="button" value="Visit Site" onClick="window.open('{param}')" />
Specifically you are changing the onClick coding.
Reply With Quote
  #10  
Old 06-14-2009, 02:54 PM
yotsume's Avatar
yotsume yotsume is offline
 
Join Date: Dec 2006
Posts: 844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the code for a new window target.... better late than never.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:32 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04493 seconds
  • Memory Usage 2,303KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (5)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete