Wikipedia UBBC Code:
Global Footer:
<script type="text/javascript"><!--
//Wikipedia Links v1.0 [CB]
//Copyright 04-17-2006 ~Wonder
//May be reposted|modified anywhere as long as this header remains in tact
// Mimics Wikipedia syntax:
// Replaces [[Example]] with [url=http://en.wikipedia.org/wiki/Example]Example[/url]
// Replaces [[Example|This is an example.]] with [url=http://en.wikipedia.org/wiki/Example]This is an example.[/url]
//URL to Wikipedia UBBC Icon
wikiIcon="http://img20.imageshack.us/img20/3482/wikiicon6bb.gif";
if(document.postForm && document.postForm.color)
{
document.postForm.color.parentNode.innerHTML+="<a href=javascript:add(\"[[\",\"]]\")><img src=\""+wikiIcon+"\" alt=\"Wikipedia Link\" border=\"0\"></a>";
}
if(location.href.match(/action\=(display|pmview|recent|userrecentposts|gotopost|search|calendarview)/) || (!location.href.match(/action\=/) && document.postForm))
{
hrs=document.getElementsByTagName("hr");
for(i=0;i<hrs.length;i++)
{
if(typeof(hrs[i].nextSibling.innerHTML)=="string")
{
matches=hrs[i].nextSibling.innerHTML.match(/\[\[(.+?)\]\]/ig);
if(matches)
{
temp=hrs[i].nextSibling.innerHTML;
for(j=0;j<matches.length;j++)
{
if(matches[j].match(/(\[\[.+?)\|(.+?\]\])/))
{
split=[RegExp.$1,RegExp.$2];
temp=temp.replace(matches[j],"<a href=\"http://en.wikipedia.org/wiki/"+escape(split[0].replace(/^\[\[|\]\]$/g,"").replace(/ /g,"_")).replace(/%23/ig,"#")+"\" target=\"_blank\">"+split[1].replace(/^\[\[|\]\]$/g,"")+"</a>");
}
else
temp=temp.replace(matches[j],"<a href=\"http://en.wikipedia.org/wiki/"+escape(matches[j].replace(/^\[\[|\]\]$/g,"").replace(/ /g,"_")).replace(/%23/ig,"#")+"\" target=\"_blank\">"+matches[j].replace(/^\[\[|\]\]$/g,"")+"</a>");
}
hrs[i].nextSibling.innerHTML=temp;
}
}
}
}
//--></script>
//Wikipedia Links v1.0 [CB]
//Copyright 04-17-2006 ~Wonder
//May be reposted|modified anywhere as long as this header remains in tact
// Mimics Wikipedia syntax:
// Replaces [[Example]] with [url=http://en.wikipedia.org/wiki/Example]Example[/url]
// Replaces [[Example|This is an example.]] with [url=http://en.wikipedia.org/wiki/Example]This is an example.[/url]
//URL to Wikipedia UBBC Icon
wikiIcon="http://img20.imageshack.us/img20/3482/wikiicon6bb.gif";
if(document.postForm && document.postForm.color)
{
document.postForm.color.parentNode.innerHTML+="<a href=javascript:add(\"[[\",\"]]\")><img src=\""+wikiIcon+"\" alt=\"Wikipedia Link\" border=\"0\"></a>";
}
if(location.href.match(/action\=(display|pmview|recent|userrecentposts|gotopost|search|calendarview)/) || (!location.href.match(/action\=/) && document.postForm))
{
hrs=document.getElementsByTagName("hr");
for(i=0;i<hrs.length;i++)
{
if(typeof(hrs[i].nextSibling.innerHTML)=="string")
{
matches=hrs[i].nextSibling.innerHTML.match(/\[\[(.+?)\]\]/ig);
if(matches)
{
temp=hrs[i].nextSibling.innerHTML;
for(j=0;j<matches.length;j++)
{
if(matches[j].match(/(\[\[.+?)\|(.+?\]\])/))
{
split=[RegExp.$1,RegExp.$2];
temp=temp.replace(matches[j],"<a href=\"http://en.wikipedia.org/wiki/"+escape(split[0].replace(/^\[\[|\]\]$/g,"").replace(/ /g,"_")).replace(/%23/ig,"#")+"\" target=\"_blank\">"+split[1].replace(/^\[\[|\]\]$/g,"")+"</a>");
}
else
temp=temp.replace(matches[j],"<a href=\"http://en.wikipedia.org/wiki/"+escape(matches[j].replace(/^\[\[|\]\]$/g,"").replace(/ /g,"_")).replace(/%23/ig,"#")+"\" target=\"_blank\">"+matches[j].replace(/^\[\[|\]\]$/g,"")+"</a>");
}
hrs[i].nextSibling.innerHTML=temp;
}
}
}
}
//--></script>
Code Database:
If you have a Code Database (a forum that serves as a collection of scripts) on your message board, you may paste the following code into that forum to add it your own code list.
[b]Title:[/b] [url=http://proboards.gamingmedley.com/codes/wikipedia-ubbc.html]Wikipedia UBBC[/url]
[b]Creator:[/b] Wonder
[b]Cross-Browser:[/b] Yes
[b]Placement:[/b] Global Footer
[code]<script type="text/javascript"><!--
//Wikipedia Links v1.0 [CB]
//Copyright 04-17-2006 ~Wonder
//May be reposted|modified anywhere as long as this header remains in tact
// Mimics Wikipedia syntax:
// Replaces [[Example]] with [url=http://en.wikipedia.org/wiki/Example]Example[/url]
// Replaces [[Example|This is an example.]] with [url=http://en.wikipedia.org/wiki/Example]This is an example.[/url]
//URL to Wikipedia UBBC Icon
wikiIcon="http://img20.imageshack.us/img20/3482/wikiicon6bb.gif";
if(document.postForm && document.postForm.color)
{
document.postForm.color.parentNode.innerHTML+="<a href=javascript:add(\"[[\",\"]]\")><img src=\""+wikiIcon+"\" alt=\"Wikipedia Link\" border=\"0\"></a>";
}
if(location.href.match(/action\=(display|pmview|recent|userrecentposts|gotopost|search|calendarview)/) || (!location.href.match(/action\=/) && document.postForm))
{
hrs=document.getElementsByTagName("hr");
for(i=0;i<hrs.length;i++)
{
if(typeof(hrs[i].nextSibling.innerHTML)=="string")
{
matches=hrs[i].nextSibling.innerHTML.match(/\[\[(.+?)\]\]/ig);
if(matches)
{
temp=hrs[i].nextSibling.innerHTML;
for(j=0;j<matches.length;j++)
{
if(matches[j].match(/(\[\[.+?)\|(.+?\]\])/))
{
split=[RegExp.$1,RegExp.$2];
temp=temp.replace(matches[j],"<a href=\"http://en.wikipedia.org/wiki/"+escape(split[0].replace(/^\[\[|\]\]$/g,"").replace(/ /g,"_")).replace(/%23/ig,"#")+"\" target=\"_blank\">"+split[1].replace(/^\[\[|\]\]$/g,"")+"</a>");
}
else
temp=temp.replace(matches[j],"<a href=\"http://en.wikipedia.org/wiki/"+escape(matches[j].replace(/^\[\[|\]\]$/g,"").replace(/ /g,"_")).replace(/%23/ig,"#")+"\" target=\"_blank\">"+matches[j].replace(/^\[\[|\]\]$/g,"")+"</a>");
}
hrs[i].nextSibling.innerHTML=temp;
}
}
}
}
//--></script>[/code]
[b]Creator:[/b] Wonder
[b]Cross-Browser:[/b] Yes
[b]Placement:[/b] Global Footer
[code]<script type="text/javascript"><!--
//Wikipedia Links v1.0 [CB]
//Copyright 04-17-2006 ~Wonder
//May be reposted|modified anywhere as long as this header remains in tact
// Mimics Wikipedia syntax:
// Replaces [[Example]] with [url=http://en.wikipedia.org/wiki/Example]Example[/url]
// Replaces [[Example|This is an example.]] with [url=http://en.wikipedia.org/wiki/Example]This is an example.[/url]
//URL to Wikipedia UBBC Icon
wikiIcon="http://img20.imageshack.us/img20/3482/wikiicon6bb.gif";
if(document.postForm && document.postForm.color)
{
document.postForm.color.parentNode.innerHTML+="<a href=javascript:add(\"[[\",\"]]\")><img src=\""+wikiIcon+"\" alt=\"Wikipedia Link\" border=\"0\"></a>";
}
if(location.href.match(/action\=(display|pmview|recent|userrecentposts|gotopost|search|calendarview)/) || (!location.href.match(/action\=/) && document.postForm))
{
hrs=document.getElementsByTagName("hr");
for(i=0;i<hrs.length;i++)
{
if(typeof(hrs[i].nextSibling.innerHTML)=="string")
{
matches=hrs[i].nextSibling.innerHTML.match(/\[\[(.+?)\]\]/ig);
if(matches)
{
temp=hrs[i].nextSibling.innerHTML;
for(j=0;j<matches.length;j++)
{
if(matches[j].match(/(\[\[.+?)\|(.+?\]\])/))
{
split=[RegExp.$1,RegExp.$2];
temp=temp.replace(matches[j],"<a href=\"http://en.wikipedia.org/wiki/"+escape(split[0].replace(/^\[\[|\]\]$/g,"").replace(/ /g,"_")).replace(/%23/ig,"#")+"\" target=\"_blank\">"+split[1].replace(/^\[\[|\]\]$/g,"")+"</a>");
}
else
temp=temp.replace(matches[j],"<a href=\"http://en.wikipedia.org/wiki/"+escape(matches[j].replace(/^\[\[|\]\]$/g,"").replace(/ /g,"_")).replace(/%23/ig,"#")+"\" target=\"_blank\">"+matches[j].replace(/^\[\[|\]\]$/g,"")+"</a>");
}
hrs[i].nextSibling.innerHTML=temp;
}
}
}
}
//--></script>[/code]