vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   BB Code Enhancements - Various Unusual BB Code (and Definition List) (https://vborg.vbsupport.ru/showthread.php?t=150454)

rjmjr69 06-30-2007 08:43 PM

Quote:

Originally Posted by cheat-master30 (Post 1280086)
Sorry to bump this, but added an amazing new definition code partly in response to someone asking for it in Modifications forum and me already having and using it at my own forum.


Where did you put it?

cheat-master30 06-30-2007 09:12 PM

Quote:

Originally Posted by rjmjr69 (Post 1280122)
Where did you put it?


Definition

Tag:

def

Replacement:

Code:
<dfn title="{option}">{param}</dfn>
Add in CSS:

Code:
dfn {font-weight: bold; background: gold; cursor: help; }
Example:

Code:
[def=A popular games company]Nintendo[/def]
Description:

Use to post definitions, without a list, in your posts or signatures.

HeLLCiTo 07-03-2007 02:03 PM

someone has icons for those bbcodes??

cheat-master30 07-03-2007 02:55 PM

Not at this moment. The reasons why are:

1- I seriously cannot design non themed, generic buttons for forums, even less for 20 odd vB codes. But if someone else wants to share their designs for buttons which would insert these, go ahead.

2- I never thought of it because I wasn't about to make 65 buttons for all the BB code on my forum. But if no one makes any, I could try to make some that would mimmick the default buttons.

scudd 07-14-2007 12:23 AM

Heres something slightly unusual, this one is based on TVants, for anyone not into the world of p2ptv? its a popular p2p streaming application that shows all sorts of things from films to live football from all over the world.

Your visitors wanting to view a stream must have TVants installed, Ive added a download link to the code!

Works with:
Windows
Only IE and Firefox when embedded into a page


Code:

Title:
TVAnts

Tag:
tvants

Code:
<object classid="clsid:4C833081-D026-4FF8-968F-7EAB660D2FBA" id="TvantsX" CODEBASE=" http://download.tvants.com/pub/tvant...rsion=1,0,0,58 " width="420" height="380" >
<param name="Title" value="Live Stream">
<param name="URL" value="{param}">
</object>
<br />
If you don't see anything get the latest version of tvants from here: <a href="http://download2.tvants.com/pub/tvants/tvants1/win32/bin/TvantsSetup.EXE">Click Here</a>


Example (ESPN):
[tvants]tvants://www.tvants.com/tvants/?k=b3d4e2448970cd7f[/tvants]

You can find all the urls and schedules here: http://www.tvants.com (in chinese)

Theres loads more of these applications and pretty much all of them can be embedded into your forums with some custom vbcode, if you want any more give me a shout at FSi

cheat-master30 07-14-2007 12:58 PM

Nice. I was trying to find a way personally to embed AOL videos with the object tag simply because it has videos from like 20 different sources which can be embedded with a single code.

scudd 07-14-2007 07:52 PM

I've never used AOL video so I can't really comment, I've just taken a quick look and it seems to be fed from you tube?? have you tried calling it from an asx file?

something along the lines of:

<embed src="{param}" quality="high" width="425" height="350" type="application/x-shockwave-flash"></embed>

Example:
[aolvideo]http://your-url/stream1.asx[/aolvideo]

Where stream1.asx has this:

<REPEAT>
<ENTRY>
<ref href="url/stream_name1" />
<ref href="url/stream_name2" />
<ref href="url/stream_name3" />
<ref href="url/and_so_on" />
</ENTRY>
</REPEAT>

That should tell the video to move on once the stream contains no more data..

I have no idea if that will work.. :lol:

cheat-master30 07-14-2007 08:16 PM

The problem I have is that while I can use embed, I am stuck trying to use the object tags so it validates as valid XHTML 1.0 Transitional. And the object tag is a lot more complicated...

scudd 07-14-2007 09:56 PM

ahh.. I have a .js around somewhere that gets around that!!

I've used it recently so It'll be around somewhere.. I'll see if I can find it and get back to you!


Quick edit, bookmarks are great!! it used this principal: http://blog.deconcept.com/swfobject/

I'll hunt down the site I used it on...

scudd 07-14-2007 10:16 PM

The .js consists of this:

Code:

if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) {
        if (!document.getElementById) { return; }
        this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
        this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
        this.params = new Object();
        this.variables = new Object();
        this.attributes = new Array();
        if(swf) { this.setAttribute('swf', swf); }
        if(id) { this.setAttribute('id', id); }
        if(w) { this.setAttribute('width', w); }
        if(h) { this.setAttribute('height', h); }
        if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
        this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
        if (!window.opera && document.all && this.installedVer.major > 7) {
                // only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
                deconcept.SWFObject.doPrepUnload = true;
        }
        if(c) { this.addParam('bgcolor', c); }
        var q = quality ? quality : 'high';
        this.addParam('quality', q);
        this.setAttribute('useExpressInstall', false);
        this.setAttribute('doExpressInstall', false);
        var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
        this.setAttribute('xiRedirectUrl', xir);
        this.setAttribute('redirectUrl', '');
        if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
        useExpressInstall: function(path) {
                this.xiSWFPath = !path ? "expressinstall.swf" : path;
                this.setAttribute('useExpressInstall', true);
        },
        setAttribute: function(name, value){
                this.attributes[name] = value;
        },
        getAttribute: function(name){
                return this.attributes[name];
        },
        addParam: function(name, value){
                this.params[name] = value;
        },
        getParams: function(){
                return this.params;
        },
        addVariable: function(name, value){
                this.variables[name] = value;
        },
        getVariable: function(name){
                return this.variables[name];
        },
        getVariables: function(){
                return this.variables;
        },
        getVariablePairs: function(){
                var variablePairs = new Array();
                var key;
                var variables = this.getVariables();
                for(key in variables){
                        variablePairs[variablePairs.length] = key +"="+ variables[key];
                }
                return variablePairs;
        },
        getSWFHTML: function() {
                var swfNode = "";
                if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
                        if (this.getAttribute("doExpressInstall")) {
                                this.addVariable("MMplayerType", "PlugIn");
                                this.setAttribute('swf', this.xiSWFPath);
                        }
                        swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'"';
                        swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
                        var params = this.getParams();
                        for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
                        var pairs = this.getVariablePairs().join("&");
                        if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
                        swfNode += '/>';
                } else { // PC IE
                        if (this.getAttribute("doExpressInstall")) {
                                this.addVariable("MMplayerType", "ActiveX");
                                this.setAttribute('swf', this.xiSWFPath);
                        }
                        swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ this.getAttribute('style') +'">';
                        swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
                        var params = this.getParams();
                        for(var key in params) {
                        swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
                        }
                        var pairs = this.getVariablePairs().join("&");
                        if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
                        swfNode += "</object>";
                }
                return swfNode;
        },
        write: function(elementId){
                if(this.getAttribute('useExpressInstall')) {
                        // check to see if we need to do an express install
                        var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
                        if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
                                this.setAttribute('doExpressInstall', true);
                                this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
                                document.title = document.title.slice(0, 47) + " - Flash Player Installation";
                                this.addVariable("MMdoctitle", document.title);
                        }
                }
                if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
                        var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
                        n.innerHTML = this.getSWFHTML();
                        return true;
                }else{
                        if(this.getAttribute('redirectUrl') != "") {
                                document.location.replace(this.getAttribute('redirectUrl'));
                        }
                }
                return false;
        }
}

/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(){
        var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
        if(navigator.plugins && navigator.mimeTypes.length){
                var x = navigator.plugins["Shockwave Flash"];
                if(x && x.description) {
                        PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
                }
        }else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0){ // if Windows CE
                var axo = 1;
                var counter = 3;
                while(axo) {
                        try {
                                counter++;
                                axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter);
//                                document.write("player v: "+ counter);
                                PlayerVersion = new deconcept.PlayerVersion([counter,0,0]);
                        } catch (e) {
                                axo = null;
                        }
                }
        } else { // Win IE (non mobile)
                // do minor version lookup in IE, but avoid fp6 crashing issues
                // see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
                try{
                        var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
                }catch(e){
                        try {
                                var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
                                PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
                                axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
                        } catch(e) {
                                if (PlayerVersion.major == 6) {
                                        return PlayerVersion;
                                }
                        }
                        try {
                                axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
                        } catch(e) {}
                }
                if (axo != null) {
                        PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
                }
        }
        return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
        this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
        this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
        this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
}
deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
        if(this.major < fv.major) return false;
        if(this.major > fv.major) return true;
        if(this.minor < fv.minor) return false;
        if(this.minor > fv.minor) return true;
        if(this.rev < fv.rev) return false;
        return true;
}
/* ---- get value of query string param ---- */
deconcept.util = {
        getRequestParameter: function(param) {
                var q = document.location.search || document.location.hash;
                if (param == null) { return q; }
                if(q) {
                        var pairs = q.substring(1).split("&");
                        for (var i=0; i < pairs.length; i++) {
                                if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
                                        return pairs[i].substring((pairs[i].indexOf("=")+1));
                                }
                        }
                }
                return "";
        }
}
/* fix for video streaming bug */
deconcept.SWFObjectUtil.cleanupSWFs = function() {
        var objects = document.getElementsByTagName("OBJECT");
        for (var i = objects.length - 1; i >= 0; i--) {
                objects[i].style.display = 'none';
                for (var x in objects[i]) {
                        if (typeof objects[i][x] == 'function') {
                                objects[i][x] = function(){};
                        }
                }
        }
}
// fixes bug in some fp9 versions see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
if (deconcept.SWFObject.doPrepUnload) {
        if (!deconcept.unloadSet) {
                deconcept.SWFObjectUtil.prepUnload = function() {
                        __flash_unloadHandler = function(){};
                        __flash_savedUnloadHandler = function(){};
                        window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs);
                }
                window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
                deconcept.unloadSet = true;
        }
}
/* add document.getElementById if needed (mobile IE < 5) */
if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }}

/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;


This goes in the head

Code:

<script language="VBScript" type="text/vbscript">
<!-- // Visual basic helper required to detect Flash Player ActiveX control version information
Function VBGetSwfVer(i)
  on error resume next
  Dim swControl, swVersion
  swVersion = 0
 
  set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))
  if (IsObject(swControl)) then
    swVersion = swControl.GetVariable("$version")
  end if
  VBGetSwfVer = swVersion
End Function
// -->
    </script>


the embed is this:

Code:

<script language="JavaScript" type="text/javascript">
<!--
var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
if(hasRightVersion) {  // if we've detected an acceptable version
    var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
    + 'width="200" height="200"'
    + 'codebase="THE CODEBASE">'
    + '<param name="movie" value="THE PARAM" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="WMode" value="transparent">'
    + '<embed src="THE PARAM AGAIN" quality="high" bgcolor="#ffffff" '
    + 'width="200" height="200" name="NAME IT" align="middle"'
    + 'quality="high"'
    + 'allowScriptAccess="sameDomain"'
    + 'type="application/x-shockwave-flash"'
    + 'pluginspage="http://www.macromedia.com/go/getflashplayer">'
    + '<\/embed>'
    + '<\/object>';
    document.write(oeTags);  // embed the flash movie
  } else {  // flash is too old or we can't detect the plugin
    var alternateContent = '<img src="images/flashbackground.jpg" border="0" />';
    document.write(alternateContent);  // insert non-flash content
  }
// -->
</script>

Yet again, I dont know if this will work with what you have in mind... there will probably be a few edits required!


All times are GMT. The time now is 03:22 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01364 seconds
  • Memory Usage 1,822KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete