Log in

View Full Version : Usefull Custom BB Codes



Moh
30-01-2008, 05:28 PM
Here are some usefull Custom BB Codes:

These are the replacements, you will have to do the rest, which arn't had to do.

YouTube Video

<table class="tborder" style="margin: 10px 0pt;" border="0" cellpadding="6" cellspacing="1" width="400" id="table1">
<thead>
<tr>
<td class="tcat" colspan="2" style="text-align: center;">
<a title="View this video at YouTube in a new window or tab" target="_blank" href="http://www.youtube.com/watch?v={param}">
YouTube Video</a>
</td>
</tr>
</thead>
<tr>
<td class="panelsurround" align="center">
<object type="application/x-shockwave-flash" data="http://www.youtube.com/v/{param}" height="340" width="425">
<param name="movie" value="http://www.youtube.com/v/{param}">
<param name="wmode" value="transparent">
<em><strong>ERROR:</strong> If you can see this, then <a href="http://www.youtube.com/">YouTube</a> is down or you don't have Flash installed.</em>
</object>
</td>
</tr>
</table>Google Video

<table class="tborder" style="margin: 10px 0pt;" border="0" cellpadding="6" cellspacing="1" width="400" id="table1">
<thead>
<tr>
<td class="tcat" colspan="2" style="text-align: center;">
<a title="View this video at Google Video in a new window or tab" target="_blank" href="http://video.google.com/videoplay?docid={param}">
Google Video</a>
</td>
</tr>
</thead>
<tr>
<td class="panelsurround" align="center">
<object type="application/x-shockwave-flash" data="http://video.google.com/googleplayer.swf?docId={param}" height="326" width="400">
<param name="movie" value="http://video.google.com/googleplayer.swf?docId={param}">
<param name="allowScriptAccess" value="sameDomain">
<param name="quality" value="best">
<param name="scale" value="noScale">
<param name="wmode" value="transparent">
<param name="salign" value="TL">
<param name="FlashVars" value="playerMode=embedded">
<em><strong>ERROR:</strong> If you can see this, then <a href="http://video.google.com/">Google Video</a> is down or you don't have Flash installed.</em>
</object>
</td>
</tr>
</table>MySpace Video

<table class="tborder" style="margin: 10px 0pt;" border="0" cellpadding="6" cellspacing="1" width="400" id="table1">
<thead>
<tr>
<td class="tcat" colspan="2" style="text-align: center;">
<a title="View this video at MySpace Video in a new window or tab" target="_blank" href="http://www.myspace.com/index.cfm?fuseaction=vids.individual&videoid={param}">
MySpace Video</a>
</td>
</tr>
</thead>
<tr>
<td class="panelsurround" align="center">
<object type="application/x-shockwave-flash" data="http://lads.myspace.com/videos/vplayer.swf?m={param}&v=2&type=video" height="326" width="400">
<param name="movie" value="http://lads.myspace.com/videos/vplayer.swf?m={param}&v=2&type=video">
<param name="allowScriptAccess" value="sameDomain">
<param name="quality" value="best">
<param name="scale" value="noScale">
<param name="wmode" value="transparent">
<param name="salign" value="TL">
<param name="FlashVars" value="playerMode=embedded">
<em><strong>ERROR:</strong> If you can see this, then <a href="http://www.myspace.com/index.cfm?fuseaction=vids/">MySpace Video</a> is down or you don't have Flash installed.</em>
</object>
</td>
</tr>
</table>Spoiler

<script language='JavaScript' type='text/javascript'>
<!--
function spoiler(obj)
{
for (var i = 0; i < obj.childNodes.length; i++)
{
if (obj.childNodes[i].id == 'idTitle')
titleRow = obj.childNodes[i];
if (obj.childNodes[i].id == 'idSpoiler')
{
if (obj.childNodes[i].style.display != 'none')
{
obj.childNodes[i].style.display = 'none';
titleRow.innerHTML = '&nbsp;<b>Click to show spoiler</b>';
}
else
{
obj.childNodes[i].style.display = 'block';
titleRow.innerHTML = '&nbsp;<b>Click to hide spoiler</b>';
}
}
}
}
//-->
</script>
<div width="100%" class="alt1" onclick="spoiler(this);" style="border-collapse: collapse; border: solid thin black;"><div id="idTitle" class="alt2" style="border-collapse: collapse; border: solid thin black; width: 100%;">
<b>Click to show spoiler</b></div><div id="idSpoiler" style="display: none;">
<font size="1">{param}</font></div></div>Moderator Notice

<b><font color="#ff0000">Moderator Notice:</font></b><br>
<table style="border: thin dotted rgb(102, 102, 102);" align="center" border="0" cellpadding="6" cellspacing="0" width="100%" id="table1">
<tr>
<td valign="top" class="alt1">
<table cellpadding="0" cellspacing="0" width="100%" height="29" id="table2">
<!-- MSTableType="nolayout" -->
<tr>
<td height="29" width="30">
<img border="0" src="http://habbcrazyforum.net/images/misc/modnotice.gif"></td>
<td height="29" width="1168"><b><font color="#FF0000">&nbsp;{param}</font></font></td>
</tr>
</table>
</td>
</tr>
</table>

Rainbow Text

<HEAD>
<script LANGUAGE="JavaScript">
function createHexArray(n) {
this.length = n;
for (var i = 1; i <= n; i++)
this[i] = i - 1;

this[11] = "A";
this[12] = "B";
this[13] = "C";
this[14] = "D";
this[15] = "E";
this[16] = "F";
return this;
}
hx = new createHexArray(16);

function convertToHex(x) {
if (x < 17) x = 16;
var high = x / 16;
var s = high+"";
s = s.substring(0, 2);
high = parseInt(s, 10);
var left = hx[high + 1];
var low = x - high * 16;
if (low < 1) low = 1;
s = low + "";
s = s.substring(0, 2);
low = parseInt(s, 10);
var right = hx[low + 1];
var string = left + "" + right;
return string;
}

function makeRainbow(text) {
text = text.substring(0, text.length);
color_d1 = 255;
mul = color_d1 / text.length;
for(var i = 0; i < text.length; i++) {
color_d1 = 255*Math.sin(i / (text.length / 3));
color_h1 = convertToHex(color_d1);
color_d2 = mul * i;
color_h2 = convertToHex(color_d2);

k = text.length;
j = k - i;
if (j < 0) j = 0;
color_d3 = mul * j;
color_h3 = convertToHex(color_d3);

document.write("<FONT COLOR=\"#" + color_h3 + color_h1 + color_h2 + "\">" + text.substring(i, i + 1) + "</FONT>");
}
}
</script>
</HEAD>

<BODY>


<font size=3>
<script>
makeRainbow("{param}");
</script>
</font>

GoldenMerc
30-01-2008, 05:29 PM
Do you know rainbow BB code?
Its a actually BB code but i dont know the code i got told by vBulletin.com its a real code but they dont know it. :(

Moh
30-01-2008, 05:38 PM
Do you know rainbow BB code?
Its a actually BB code but i dont know the code i got told by vBulletin.com its a real code but they dont know it. :(
added.

GoldenMerc
30-01-2008, 05:47 PM
Rainbow text doesnt work:
http://www.hhgs.net/showthread.php?p=44828#post44828
Here is what my BB code Manager says:
BB code:
test
HTML:
<HEAD> <script LANGUAGE="JavaScript"> function createHexArray(n) { this.length = n; for (var i = 1; i <= n; i++) this[i] = i - 1; this[11] = "A"; this[12] = "B"; this[13] = "C"; this[14] = "D"; this[15] = "E"; this[16] = "F"; return this; } hx = new createHexArray(16); function convertToHex(x) { if (x < 17) x = 16; var high = x / 16; var s = high+""; s = s.substring(0, 2); high = parseInt(s, 10); var left = hx[high + 1]; var low = x - high * 16; if (low < 1) low = 1; s = low + ""; s = s.substring(0, 2); low = parseInt(s, 10); var right = hx[low + 1]; var string = left + "" + right; return string; } function makeRainbow(text) { text = text.substring(0, text.length); color_d1 = 255; mul = color_d1 / text.length; for(var i = 0; i < text.length; i++) { color_d1 = 255*Math.sin(i / (text.length / 3)); color_h1 = convertToHex(color_d1); color_d2 = mul * i; color_h2 = convertToHex(color_d2); k = text.length; j = k - i; if (j < 0) j = 0; color_d3 = mul * j; color_h3 = convertToHex(color_d3); do***ent.write("<FONT COLOR=\"#" + color_h3 + color_h1 + color_h2 + "\">" + text.substring(i, i + 1) + "</FONT>"); } } </script> </HEAD> <BODY> <font size=3> <script> makeRainbow(" test "); </script> </font>

Doesnt seem to work :(

Moh
30-01-2008, 06:23 PM
Rainbow text doesnt work:
http://www.hhgs.net/showthread.php?p=44828#post44828
Here is what my BB code Manager says:
BB code:
HTML:

Doesnt seem to work :(
The word "com" is been replaced as com so docoment isnt working.

Replace the o with u :p

GoldenMerc
30-01-2008, 06:39 PM
document.write("<FONT COLOR=\"#" + color_h3 + color_h1 + color_h2 + "\">" + text.substring(i, i + 1) + "</FONT>");
Still not working

GoldenMerc
31-01-2008, 06:03 PM
+rep if someone can help me fix this problem

Robbie
31-01-2008, 06:18 PM
Don't know Merc sorry. But this is a nice thread, Jack. +REP.

tazzy
01-02-2008, 08:50 AM
look just copy this what im about to say and it should work (take away the "" though)


first off is the title of the BBcode : Put this as "Rainbow Text"
next off is the tag put this as "rain" for now
now the actual code (replacement) for it copy this into it :
<HEAD>
<script LANGUAGE="JavaScript">
function createHexArray(n) {
this.length = n;
for (var i = 1; i <= n; i++)
this[i] = i - 1;

this[11] = "A";
this[12] = "B";
this[13] = "C";
this[14] = "D";
this[15] = "E";
this[16] = "F";
return this;
}
hx = new createHexArray(16);

function convertToHex(x) {
if (x < 17) x = 16;
var high = x / 16;
var s = high+"";
s = s.substring(0, 2);
high = parseInt(s, 10);
var left = hx[high + 1];
var low = x - high * 16;
if (low < 1) low = 1;
s = low + "";
s = s.substring(0, 2);
low = parseInt(s, 10);
var right = hx[low + 1];
var string = left + "" + right;
return string;
}

function makeRainbow(text) {
text = text.substring(0, text.length);
color_d1 = 255;
mul = color_d1 / text.length;
for(var i = 0; i < text.length; i++) {
color_d1 = 255*Math.sin(i / (text.length / 3));
color_h1 = convertToHex(color_d1);
color_d2 = mul * i;
color_h2 = convertToHex(color_d2);

k = text.length;
j = k - i;
if (j < 0) j = 0;
color_d3 = mul * j;
color_h3 = convertToHex(color_d3);

document.write("<FONT COLOR=\"#" + color_h3 + color_h1 + color_h2 + "\">" + text.substring(i, i + 1) + "</FONT>");
}
}
</script>
</HEAD>

<BODY>


<font size=3>
<script>
makeRainbow("{param}");
</script>
</font>

for the example( for now just to test it) use this : "HHGS.net



save the code and now make a new post and paste the following into it.
Testing HHGS.net new feature :D

There ya go.

Want to hide these adverts? Register an account for free!