View Single Post
  #14  
Old 03-24-2010, 12:37 AM
TimberFloorAu's Avatar
TimberFloorAu TimberFloorAu is offline
 
Join Date: May 2008
Location: Brisbane
Posts: 2,264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

See if this works now.

I have coded this now ( slightly differently on our forum ) But feel free to use this code change for adding dynamic videos using Modal.

This is a follow up to our Nag Screen.

Here is another example: FOR FRESH USERS ( you still need to upload content and colorbox folders !!!!! )

This MODALS a youtube link video dynamically on your Page

Open forumhome template

add this above </head>
Code:
<!--jquery modal-->
<link type="text/css" media="screen" rel="stylesheet" href="colorbox/colorbox.css" />
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
        <script type="text/javascript" src="colorbox/jquery.colorbox.js"></script>
<script type="text/javascript">
            $(document).ready(function(){
                //Examples of how to assign the ColorBox event to elements
                $("a[rel='example1']").colorbox();
                $("a[rel='example2']").colorbox({transition:"fade"});
                $("a[rel='example3']").colorbox({transition:"none", width:"75%", height:"75%"});
                $("a[rel='example4']").colorbox({slideshow:true});
                $(".example5").colorbox();
                $(".example6").colorbox({iframe:true, innerWidth:425, innerHeight:344});
                $(".example7").colorbox({width:"80%", height:"80%", iframe:true});
                $(".example8").colorbox({width:"50%", inline:true, href:"#inline_example1"});
                $(".example9").colorbox({
                    onOpen:function(){ alert('onOpen: colorbox is about to open'); },
                    onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
                    onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
                    onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
                    onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
                });
                
                //Example of preserving a JavaScript event for inline calls.
                $("#click").click(function(){
                    $('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
                    return false;
                });
            });
        </script>
<!--jquery modal-->
Add this at bottom of footer
Code:
<!--Modal Box-->
<p><a class='example6' href="http://www.youtube.com/v/8k__7q3jRw8" title="vBulletin 4 - How to make a fixed style">vBulletin Tutorial</a></p>        
<!--Modal Box End-->
Click Vbulletin tuorial link bottom left

This link could be anywhere , navbar etc etc
Could be coded to add ajax inline , rather than iframe.

Whatever, but you cannot knock the fact this makes good sense, and looks wicked.

Anyhoo.. I cant spark peoples imaginations, I suppose they need to do that themselves.

---------- Post added at 06:58 AM ----- British Expats Australia----- Previous post was at 06:50 AM ----------

We will be adopting this system for tutorials and other link screens in main menu over the coming weeks. Currently link just below header, for weather widget
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01308 seconds
  • Memory Usage 1,780KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete