[ C ] Custom BBCode
Board Address: Illuminati Society
Board Software: ZetaBoards
Description: A Custom BBCode
Our forum is primarily used as a Library and for gameplay on an online game called NationStates.
Recently I came cross another gameplay forum for NationStates that used two special BB tags.
Where you entered in either a players nation or a region from the Game, and it automatically
puts a link up, but hids all the URL to it. I have a picture of what I am talking about here:
Essentially, I would like to have these for my forum as well. Can they be created, and what would the coding be for it.
Any help would be greatly appreciated.
Board Software: ZetaBoards
Description: A Custom BBCode
Our forum is primarily used as a Library and for gameplay on an online game called NationStates.
Recently I came cross another gameplay forum for NationStates that used two special BB tags.
Where you entered in either a players nation or a region from the Game, and it automatically
puts a link up, but hids all the URL to it. I have a picture of what I am talking about here:
Essentially, I would like to have these for my forum as well. Can they be created, and what would the coding be for it.
Any help would be greatly appreciated.
Admin CP
Themes
Board Template
Below the Board
Themes
Board Template
Below the BoardCode: Select all
<script type="text/javascript">
$('#c_bbcode button:last').after(' <button type="submit" onclick="nation(); return false">Nation</button> <button type="submit" onclick="region(); return false">Region</button>');
function nation() {
var nationTag = prompt("Nation name:", "");
ZetaTag('nation', false, nationTag);
}
function region() {
var regionTag = prompt("Region name:", "");
ZetaTag('region', false, regionTag);
}
$('td.c_post, #topic_review td, div.search_results').each(function () {
$(this).html($(this).html().replace(/\[nation=(.+?)\]\[\/nation\]/gi, '<a href="http://www.nationstates.net/nation=$1" target="_blank">$1</a>').replace(/\[region=(.+?)\]\[\/region\]/gi, '<a href="http://www.nationstates.net/region=$1" target="_blank">$1</a>'));
});
</script>As you can see, its slightly different than what the other forum does, but close enough, Thank you.
Well, after simplifying that code, A Lot, this is what I have. But thank you very much for your contribution, it would not have been able to be done otherwise.
Code: Select all
<script type='text/javascript' src='http://z1.ifrm.com/0/2/0/p401849/bbtags31_xanik.js'></script><script>ubb_tag("Nation","nation","<a href='http://www.nationstates.net/nation=<% INNER %>'><% INNER %></a>",0,"Links to a nation on NationStates"); ubb_tag("Region","region","<a href='http://www.nationstates.net/region=<% INNER %>'><% INNER %></a>",0,"Links to a region on NationStates");</script>Completed!
Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.



