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)

cheat-master30 06-22-2007 10:00 PM

Various Unusual BB Code (and Definition List)
 
This modification is not a modification in the sense it requires actual template modifications, but nor is it an add on product in that it uses what is already in vBulletin, as in the BB code manager. This is simply a collection of BB code for features not found online often, and that use standards compliant, semantic code to add curious codes that may come in handy sometimes.

Updates:

1.9- Thanks to a contributor, I added editor buttons for most BB codes.1.8- Added strike through BB code.
1.7- Added a new code (definition) which looks awesome.
1.6- Tried a new code (Internet Explorer only, see post 3.

1.5- Updated Definition List codes. New one allows infinite child items and is perfectly XHTML valid. Also has bold headings.

1.4- Added glossary link code and blink code (plus instructions on how to block blinking text in Firefox

1.3- Forgot to add css for overline in second post.

1.2- Added some other sites to the search link code

1.1- Added horizontal rule and Spoiler code

1.0- Release BB Code

Support:

None needed

Notes:

Works in any version with custom BB code as an option. Tested in vBulletin 3.6.4, 3.6.5, 3.6.6 and 3.6.7 PL1.

Definition List

This allows users to insert a definition list in their posts, and when used with the definition entry BB code, has a wide range of uses.

Code to use:

Code:

[Definition]
Replacement:
Code:

<dl>{param}</dl>
Example:

Code:

[Definition][Defineobject=PHP]A scripting language used for interactive features such as forums online[/Defineobject][/Definition]
Description:

Use this to insert the definition titles and actual definitions.

Definition Entry (only use with definition list)

Code to use:

Code:

Defineobject
Replacement:

Code:

<dt><b>{option}</b></dt>
<dd>{param}</dd>

Example:

Code:

[Defineobject=PHP]A scripting language used for interactive features such as forums online[/Defineobject]
Description:


Use this to add more definitions to a definition list.

Heading

Use this to add heading tags of types 1 to 6 in posts. Semantic titles without using bold formatting or italics and that show the level of heading to screen readers and the like.

Tag:

Code:

h
Replacement:

Code:

<h{option}>{param}</h{option}>
Example:

Code:

[h=1]This is a heading[/h]
Description:

Use this to insert a semantically correct heading into the document by modifying the text you want made into a bold, large heading. This is good semantics for headings in guides and FAQs.

Google Search:

Use this to link to Google for the specified term. I also attached a modified one which replaces Google with Ask Jeeves. Can also be used for any search engine online if you know how to edit the code.

Tag:

Google


Replacement:


Code:

<a href="http://www.google.com/search?hl=en&q={param}">{param}</a>
Example:

Code:

[google]Nintendo[/google]
To use with Ask Jeeves, use this replacement for the replacement part in BB code manager:

Code:

<a href="http://uk.ask.com/web?q={param}">{param}</a>
For Wikipedia, use this for the replacement:

Code:

<a href="http://en.wikipedia.org/wiki/{param}">{param}</a>
To use Lycos, use this for a replacement:

Code:

<a href="http://search.lycos.com/?query={param}&x=0&y=0">{param}</a>
To use Yahoo, use this as a replacement:

Code:

<a href="http://search.yahoo.com/search?p={param}&fr=yfp-t-501&toggle=1&cop=mss&ei=UTF-8&vc=&fp_ip=UK">{param}</a>
To use the Internet Archive, use this as a replacement:

Code:

<a href="http://web.archive.org/web/*/{param}">{param}</a>
You can use each one as a different code if you wish.

Right to left

Changes text direction.

Tag:

rtl

Replacement:

Code:

<bdo dir="rtl">{param}</bdo>
Example:

Code:

[rtl]This is weird[/rtl]
Description:

Turns the text from the right to left rather than left to right.

Sub Script

This is explanatory in the name.

Tag:

sub

Replacement:

Code:

<sub>{param}</sub>
Example:

Code:

[sub]test[/sub]
Description:

Make text that floats slightly below the main text.

Sup Script

Tag:

sup

Replacement:

Code:

<sup>{param}</sup>
Example:


Code:

3[sup]3[/sup]
Description:

This is for text floating slightly above, like how the 3 floated up and to the right of a number shows that it is cubed.

Horizontal Line


Tag:

hr

Replacement:

Code:

<hr /><p>{param}</p>
Example:
Code:

[hr]text[/hr]
Description:

Use this to insert a horizontal line into your post with your highlighted content below it.

Note: The text between goes in the p tags under the line.

Spoiler Tag

Tag:

spoiler

Replacement:
Code:

<span class="Spoiler">{param}</span>
In CSS, add:
Code:

.Spoiler {background: white; color: white; outline: 1px solid black;}

Example:


Code:

[spoiler]There is a Shroob Princess in the Cobalt Star in Mario and Luigi 2[/spoiler]
Description:

You can use this to hide spoilers in games, movies and from TV shows by turning the text the same colour as the background.

Blinking Text

Tag:

blink

Replacement:

Code:

<span style="text-decoration: blink">{param}</span>

Example:


Code:

[blink]text[/blink]
Description:

This allows you to have blinking text.

To disable blink in Firefox if favourite forums implements above code:

Type in about:config then set browser.blink_allowed so the value is false. No more blinking text.

Glossary Category Link:

Tag:

Glossary

Replacement:

Code:

<a href="glossary.php?do=listglossary&c=1&ltr={param}&pp=0">{param}</a>
Example:

Code:

[glossary]A[/glossary]
Description:

Use this to link to a glossary category.

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.

Strike Through

tag:

strike

Replacement:

Code:

<span class="linethrough">{param}</span>
in CSS:

Code:

.linethrough {text-decoration: line-through; }
Example:

Code:

[strike]Line is crossed out[/strike]
Description:

Use this to cross out words in a post. Or sentences. Or paragraphs.

cheat-master30 06-23-2007 04:07 PM

More BB Code


Overline


Just as there is strike through and underlined text, this allows for overlined text in posts.

Tag:

overline

Replacement:


Code:

<span class="overline">{param}</span>
In CSS add:

.overline {text-decoration: overline; }

Example:

Code:

[overline]This text is overlined[/overline]

Description:


Use this to overline text, whatever that is.

Lower Case Text


This turns all text within tags to lower case.

Tag:

lowercase

Replacement:

Code:

<span class="lower">{param}</span>
Put this in your CSS stylesheets:

Code:

.lower {text-transform: lowercase; }
Example:

Code:

[lowercase]THIS IS TEXT![/lowercase]
Make all text uppercase:

Makes all selected text fully upper case. Does not stay upper case when copied to Notepad or any other text editor.

Tag:

allcaps

Replacement:

Code:

<span class="Capital">{param}</span>
Put this in CSS:

Code:

.Capital {text-transform: uppercase; }

Example:


Code:

[allcaps]This is some capital text[/allcaps]
Description:

Use to capitalise all text selected.

Small Capital Letters


Tag:

smallcaps

Replacement:

Code:

<span class="smallcaps">{param}</span>
Add in CSS:
Code:

.smallcaps {font-variant: small-caps; }
Example:

Code:

[smallcaps]This is in small caps[/smallcaps]
Description:

This turns all lower case text between the tags into small upper case letters. Weird but cool.

cheat-master30 06-23-2007 04:17 PM

Miscellaneous BB Code (either non standard, non semantic or overdone codes)

No Follow Links

Tag:

nofollow

Replacement:

Code:

<a href="{option}" rel="nofollow">{param}</a>
Example:


Code:

[nofollow=http://google.com]Non indexable Google Link[/nofollow]
Description:

Use this when linking to not liked sites to stop them getting page rank from the links from forum pages! Such as Cheat Code Central!

Sample Code Output:

Tag:

samp

Replacement:

Code:

<samp>{param}</samp>
Example:
Code:

[samp]This is the sample output from a PHP String.[/samp]
Description:

Allows you to show sample output from a code or program.

Marquee


WARNING: This code is not W3C Compliant! If you use, this will invalidate the FAQ page as standards compliant just as most video codes do, so encourage members NOT to use it in signatures and the like! It also does not work in some Netscape browsers.

Tag:


move

Replacement:

Code:

<marquee>{param}</marquee>
Example:

Code:

[move]Moving text example[/move]
Description:


Allows for the creation of moving text. Note, please keep moving text to a minimum as not only is it very annoying after a short time, but also not correct XHTML 1.0 coding, which will cause various topic pages and the FAQ to fail validation. Try not to place in signatures.

Abbrieviations

Tag:

Abbrieviate

Replacement:


Code:

<abbr title="{option}">{param}</abbr>

Example:

Code:

[Abbrieviate=DS Ultimate]DSU[/Abbrieviate]
Description:

Use this for abbrieviations such as shortened forms of words and stuff.

Flip Vertical (theoretically works, not tested, only works in Internet Explorer)

Tag:

flipv

Replacement:

Code:

<span class="flipv">{param}</span>
In CSS:

Code:

.flipv {
filter: flipv;
}

Example:

Code:

[flipv]Text goes here[/flipv]
Description:

Use to post upside down text in posts.

Flip Horizontal


Tag:

fliph

Replacement:

Code:

<span class="fliph">{param}</span>
In CSS:

Code:

.fliph {
filter: fliph;
}

Description:

Use to flip text horizontally.

Notes: Best to use the 'Right to left BB code, that's standards compliant.

cheat-master30 06-23-2007 07:05 PM

Editor Buttons

Thanks to PapaSmurf, who is one of the members here, I now have editor buttons for most of the BB codes. Check this list for what buttons go with what:

rjmjr69 06-23-2007 11:49 PM

Nice never thought of something like this. It would be nice if the definitions code linked to the glossary hack

PoetJA-1975 06-24-2007 03:33 AM

Nice = Thanx ;)

Jacquii.

cheat-master30 06-24-2007 09:02 AM

Quote:

Originally Posted by rjmjr69 (Post 1274982)
Nice never thought of something like this. It would be nice if the definitions code linked to the glossary hack

Can you give an example of the glossary hack in action on someone's forum? Because if it uses, or can be equipped with anchors in any way, this would be extremely easy to do.

cheat-master30 06-24-2007 05:12 PM

This modification has been updated with two new BB codes, one is for spoilers, the other horizontal lines in posts.

G0F0RBR0KE 06-24-2007 07:05 PM

Can you take screenshots?

cheat-master30 06-24-2007 07:14 PM

Quote:

Originally Posted by EvilAkuma (Post 1275596)
Can you take screenshots?

Yes, very easily. I can probably take screenshots now.

rjmjr69 06-24-2007 07:24 PM

Quote:

Originally Posted by cheat-master30 (Post 1275535)
This modification has been updated with two new BB codes, one is for spoilers, the other horizontal lines in posts.


Certainly use my test forum www.isosdcftp.com username test pass test

cheat-master30 06-24-2007 07:28 PM

I am trying to attach images and the like, but it said:

'Jelsoft site not available'. If anyone needs an example, is rjmjr69's site using the codes? Oh, and if you hadn't obviously figured this out, anything I have made, codes, smilies, post icons is in use on my own site. Try the FAQ, and look for posts saying about 'BB code additions'.

Oh, and anyone want a modification I may be able to make where the search box is moved to the nav, vBulletin.org style (except without the fancy drop down)?

rjmjr69 06-24-2007 07:56 PM

Quote:

Originally Posted by cheat-master30 (Post 1275608)
I am trying to attach images and the like, but it said:

'Jelsoft site not available'. If anyone needs an example, is rjmjr69's site using the codes? Oh, and if you hadn't obviously figured this out, anything I have made, codes, smilies, post icons is in use on my own site. Try the FAQ, and look for posts saying about 'BB code additions'.

Oh, and anyone want a modification I may be able to make where the search box is moved to the nav, vBulletin.org style (except without the fancy drop down)?


I get that error trying to make attachments and posts here often. Its a busy site just keep trying. And I am going to install the dictionary bbcode for you right now. Sorry I should have thought of that.

cheat-master30 06-24-2007 08:15 PM

Oh, and to make it work with the glossary, there is a problem in that it would require the glossary to use anchors on the page. You could do a very limited one which went to pages for the terms starting with different letters, such as A, or B or whatever.

rjmjr69 06-24-2007 08:32 PM

Quote:

Originally Posted by cheat-master30 (Post 1275637)
Oh, and to make it work with the glossary, there is a problem in that it would require the glossary to use anchors on the page. You could do a very limited one which went to pages for the terms starting with different letters, such as A, or B or whatever.

That would be just fine as well. Anything that makes the users lives easier is always a hit

cheat-master30 06-24-2007 09:02 PM

Okay, I may be able to do this. See next post.

cheat-master30 06-24-2007 09:04 PM

Code:

<a href="glossary.php?do=listglossary&c=1&ltr={param}&pp=0">{param}</a>
Try that. Whatever letter they enter between the tags it links to the glossary section for.

cheat-master30 06-25-2007 02:57 PM

Updated Definition List code. Much easier to use. Perfectly valid. Also has bold headings.

cheat-master30 06-25-2007 06:40 PM

2 more BB codes added to third post.

cheat-master30 06-30-2007 07:43 PM

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.

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!

cheat-master30 07-14-2007 10:22 PM

I'll see later.

scudd 07-15-2007 12:08 AM

ok, good luck..

cheat-master30 07-15-2007 11:59 AM

Just added strike through BB code. Because someone requested it in 'Modification not Available' forum. I know, should have been in the mod in the first place...

Dismounted 07-15-2007 12:19 PM

Just a suggestion, you should use inline styles rather than creating classes. Saves the need for an extra step.

cheat-master30 07-15-2007 01:36 PM

Quote:

Originally Posted by Dismounted (Post 1291747)
Just a suggestion, you should use inline styles rather than creating classes. Saves the need for an extra step.

The only reason I do that is because I am a very much standards purist when it comes to separating presentation from content. And because I also use external CSS, it saves a few KB of bandwidth seeing as the presentation for custom BB codes is cached already rather than re-loaded with every page.

You can tell this from my site; every page outside the forum is generally under 10KB in size. And all images are micro managed to the KB.

cheat-master30 08-27-2007 10:21 AM

Added a ton of button images, provided by a contributor.

Majest 08-28-2007 10:45 PM

I wonder, is it possible to make a bbcode that allows columns? Like having two columns next to one another with text and/or images in them?

cheat-master30 08-28-2007 11:10 PM

That's a table. And there's already a mod for that here:

https://vborg.vbsupport.ru/showthrea...ighlight=table

I use it myself.

AllenSam 09-09-2007 11:31 PM

Here are some cool ones I put on my board:

Background Image
Code:

Tag: bgimg

Replacement:
<table border="0" style="background-image:url({option}); background-position:top; background-repeat:no-repeat;"><tr><td>{param}</td></tr></table>

Example: [bgimg=urltoimage]Message[/bgimg]

Puts an image in the background of the text.


Border
Code:

Tag: border

Replacement:
<table border="0" style="border-color:#7282A9; border-width:thick; border-style:{option}; padding:0;"><tr><td valign="middle">{param}</td></tr></table>

Example: [border=outset]Message[/border]

Puts a border around the message. Options: dotted, dashed, solid, double, groove, ridge, inset, outset

Hover
Code:

Tag: hover

Replacement:
<span onmouseover="this.innerHTML='{option}'" onmouseout="this.innerHTML='{param}'">{param}</span>

Example: [hover=Hovering]Hover[/hover]

Changes the text when you hover the mouse over it.

Click
Code:

Tag: click

Replacement:
<span onclick="this.innerHTML='{option}'" onmouseout="this.innerHTML='{param}'">{param}</span>

Example: [click=Clicked]Click[/click]

Changes the text when you click it.

Hold
Code:

Tag: hold

Replacement:
<span onmousedown="this.innerHTML='{option}'" onmouseup="this.innerHTML='{param}'">{param}</span>

Example: [hold=Holding]Hold[/hold]

Changes the text when you click and hold down on it.

Hide
Code:

Tag: hide

Replacement:
<!--{param}-->

Example: [hide]Hide[/hide]

Hides the text so it can only be seen when editing the post. (Good for leaving comments in posts that various admins/mods will be editing.)



Also, for Blink, you can just use
Code:

<blink>{param}</blink>
. It doesn't work on IE, but neither does your method.

cheat-master30 09-13-2007 03:07 PM

Nice code. Oh, and the blink code does not work because Internet Explorer has NEVER supported any variant of it, just like how Netscape browsers never supported Marquee as it was Internet Explorer only code.


All times are GMT. The time now is 05:52 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.01913 seconds
  • Memory Usage 1,973KB
  • 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
  • (73)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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