Page 1 of 1

CC License BBCode

Posted: 11 Jul 2010, 21:15
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