CC License BBCode

User submitted BBCodes
Let us see what You have
There is no support here! Only Read Access!
Forum rules
We dont add more BBCodes to our database, but feel free to share and support your own BBCodes here.
Remember that it is not allowed to use {TEXT} inside the html tags!!!
It causes a serious security risk to your board and users.
Like this: <div style="{TEXT}">{TEXT}</div>
Green = OK - Red = forbidden
Locked
KukY13
BBCoder III
BBCoder III
Posts: 96
Joined: 26 Jun 2010, 16:23
Contact:

CC License BBCode

Post by KukY13 »

This BB code allows for placing a CC License tag in a post.
It actually consists of 2 codes.
Demo, as well more info on this code can be found here: http://kuky.99k.org/forums/viewtopic.php?f=6&p=94

Code 1:
BBCode:

Code: Select all

[cc]{INTTEXT}[/cc]
HTML Replacement:

Code: Select all

<script type="text/javascript">
var data='{INTTEXT}'.toLowerCase().replace('cc ','').replace(' ','/')
document.writeln('<div style="padding:1px; margin:1px; text-align:center;"> <a href="http://creativecommons.org/licenses/'+data+'"> <img src="http://i.creativecommons.org/l/'+data+'/88x31.png"></a></div>')
</script>
Help Line:
Use to tag a post with a CC license: [cc]License name(BY 3.0, BY-SA 3.0, Zero 1.0, Sampling+ 1.0... )[/cc] Use [cc=!]License name[/cc] to use generic image instead of license default one.
Display on posting page: YES


Code 2:
BBCode:

Code: Select all

[cc=!]{INTTEXT}[/cc]
HTML Replacement:

Code: Select all

<script type="text/javascript">
var data='{INTTEXT}'.toLowerCase().replace('cc ','').replace(' ','/')
document.writeln('<div style="padding:0px; margin:2.5px; text-align:center;"> <a href="http://creativecommons.org/licenses/'+data+'"> <img src="http://mirrors.creativecommons.org/presskit/cc.primary.srr.gif"></a></div>')
</script>
Help Line: *none*
Display on posting page: NO
Image
Locked