CC License Hack

Penned 17 years ago. It will take about 0:55 to read.


I really don't consider this a breaking of my no-blogging vow since this is the way that I release hacks for Wordpress.


By popular demand I am releasing the hack I wrote to copyright your Wordpress powered blog with a Creative Commons License.  Download the .zip file over here.


Now there will be directions in the zip file, but per usual I will list here the funtion that you need to include in your my-hacks.php file:

function the_copyright() { global $tableoptions, $tablecopyright; $query = ("SELECT option_value FROM $tableoptions WHERE option_name = 'copyright_option'"); $result = mysql_query($query); while ($data = mysql_fetch_row($result)) { $copyvalue = stripslashes("$data[0]\n
"); } $query2 = ("SELECT copyright FROM wp_copyright WHERE option_value = '$copyvalue'"); $result2 = mysql_query($query2); while ($data2 = mysql_fetch_row($result2)) { echo stripslashes("$data2[0]
\n"); } }


That is it for that hack.  Oh and one thing that I left out was that you need to have a .gif file named somerights.gif in the root level of your site. You can use the one I have here, or you can use one of your own making.

Further Reading

When in Doubt, Buff it Out.

Thanks for checking out the site, be sure to come back for more.