<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>:: TechBlog :: &#187; cc</title>
	<atom:link href="http://techblog.touchbasic.com/html/tag/cc/feed/" rel="self" type="application/rss+xml" />
	<link>http://techblog.touchbasic.com/html</link>
	<description>Techblog is collection of articles covering a wide variety of tech related topics including: Linux, Microsoft, Google, web development, web design, open source, wordpress, security, and more.</description>
	<lastBuildDate>Thu, 04 Mar 2010 15:51:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WP 2.3 Plugin &#8211; Per Post Creative Commons License</title>
		<link>http://techblog.touchbasic.com/html/wp-23-plugin-per-post-creative-commons-license/</link>
		<comments>http://techblog.touchbasic.com/html/wp-23-plugin-per-post-creative-commons-license/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 22:33:31 +0000</pubDate>
		<dc:creator>elran</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Copyright]]></category>
		<category><![CDATA[Everything]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[cc]]></category>
		<category><![CDATA[creative commons]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[licensing]]></category>
		<category><![CDATA[wordpress plugins]]></category>

		<guid isPermaLink="false">http://techblog.touchbasic.com/html/wp-23-plugin-per-post-creative-commons-license/</guid>
		<description><![CDATA[This plugin will add the ability to choose different Creative Commons licensing structures for different posts that you publish to your WordPress blog.
As far as i could tell, there are currently 2 other CC plugins for WordPress &#8211; wpLicense and cc-configurator &#8211; however both of them only let you set your license on a global [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin will add the ability to choose different Creative Commons licensing structures for different posts that you publish to your WordPress blog.</p>
<p>As far as i could tell, there are currently 2 other CC plugins for WordPress &#8211; <a href="http://wiki.creativecommons.org/WpLicense">wpLicense</a> and <a href="http://www.g-loaded.eu/2006/01/14/creative-commons-configurator-wordpress-plugin/">cc-configurator</a> &#8211; however both of them only let you set your license on a global level. That is, they let you pick one license for all your posts and pages throughout your entire site. I thought it might be useful if each WP user/author could choose between different CC licenses and be able to set them on a post-by-post basis. So, i modified the wpLicense plugin to do just that. </p>
<blockquote><p><strong>&#8220;The main purpose of this plugin is to give WP admins who run sites with multiple users/authors the option let these users/authors set specific CC licensing terms on a post by post basis.&#8221;</strong></p></blockquote>
<p><strong>How it works:</strong><br />
It uses the <a href="http://api.creativecommons.org/docs/readme_15.html#details-license-uri-uri">CC api</a> and the <a href="http://wiki.creativecommons.org/JsWidget">JsWidget</a> to add a new section to the write/edit post page and then displays a small CC graphic/button and text on your published posts for all to see. The widget lets you choose the appropriate licensing structure and then your choice is automatically saved to a custom field the next time you click &#8220;Save and Continue Editing&#8221;, &#8220;Save&#8221;, or &#8220;Publish&#8221;. Then, it uses the CC api (details-license-uri-uri) to call some javascript that displays a small graphic/button and some text linking back to the definitions for the license you have chosen. Jquery was used to insert the new CC license section to the write/edit post pages as well as to open/close the new section. I also had to use Jquery to fix the tooltips for the JsWidget. Lastly, this plugin is optimized so that it will add only 1 DB query (the cc_js_result_uri) to each post that has set a CC license and stores it to a custom field for that given post &#8211; whereas the wpLicense plugin seemed to use 3 seperate db queries to set the global licencing for the site.</p>
<p><strong>Screenshots:</strong><br />
Check out the plugin in action.<br />
<a href='http://techblog.touchbasic.com/html/wp-23-plugin-per-post-creative-commons-license/cc-edit-post-view/' rel='attachment wp-att-202' title='cc edit post view'><img style="float:left;margin:15px;padding:2px;border:1px solid #bbb;" src='http://techblog.touchbasic.com/html/wp-content/uploads/2008/02/cc-edit-post.thumbnail.jpg' alt='cc edit post view' /></a><a href='http://techblog.touchbasic.com/html/wp-23-plugin-per-post-creative-commons-license/cc-view-post-license/' rel='attachment wp-att-203' title='cc view post license'><img style="float:left;margin:15px;padding:2px;border:1px solid #bbb;" src='http://techblog.touchbasic.com/html/wp-content/uploads/2008/02/cc-view-post.thumbnail.jpg' alt='cc view post license' /></a></p>
<div style="clear:both;"></div>
<p><span id="more-201"></span></p>
<p><strong>Download:</strong><br />
Click on the following link to download the plugin: <a href="http://touchbasic.googlepages.com/per-post-license_v0.2.zip">per-post-license_v.02.zip</a></p>
<p><strong>Requirements:</strong><br />
1. This plugin has been testing and works on WP 2.3.x using the default theme (but it is still a work in progess / comments and suggestions are welcome).<br />
2. Your web server needs either curl (most have it installed and it&#8217;s the default setting used in this plugin) or URL file-access enabled (to be able to run file_get_contents() instead of curl).</p>
<p><strong>Install:</strong><br />
1. Unzip and Copy the per-post-license folder to your plugins directiory and activate it.<br />
2. Add the template function (see next paragraph) to where you&#8217;d like the CC image/button and text to appear on your post (this might be the single.php or footer.php template file).<br />
3. Go to the Write post page or Edit an existing post.<br />
4. Look for the new section marked &#8220;CC License&#8221; and click the small &#8220;plus&#8221; sign to open the section.<br />
5. Select &#8220;A Creative Commons license&#8221; and choose the appropriate licensing structure.<br />
6. Save the post and You&#8217;re Done!</p>
<p><strong>WP Template Function:</strong><br />
Add the following function to the WP template file (like single.php, or footer.php) to get the CC license to appear on your post.<br />
<code lang="php">
<div id="cc_code">< ?php if(function_exists('cc_insert_html')) { cc_insert_html($display=true); } /* get cc code */ ?></div>
<p></code></p>
<p><strong>Template Options:</strong><br />
Right now, there are only 2 options that you can use with the cc_insert_html() template function.<br />
1. The first is the $display variable. [$display=true ---> will show the CC license , $display=false will not]<br />
2. The second is the $use_curl variable [default is set to --> $use_curl=true , if you explicitly set $use_curl=false the plugin will revert to the php function file_get_contents() which is not always enabled on all web servers]</p>
<p><strong>CSS styles:</strong><br />
Here is a sample style you can use to center, add padding and margins, as well as a horizontal dashed separator (you can ofcourse use any style you like). You would add this code to your style.css file in your template directory.<br />
<code lang="css">#cc_code { text-align:center; font-size:11px; width:450px; margin-top:25px; padding-top:25px; border-top:1px dashed #ccc; }</code><br />
You could also just use inline css and replace the < div id="cc_code" > and add these styles directly &#8211; something like < div style="text-align:center; font-size:11px;" >.</p>
<p><strong>To Do:</strong><br />
- get rss/atom feeds showing CC license<br />
- possibly add CC to header (if appropriate)<br />
- option to set per author licensing (for all an author&#8217;s posts)<br />
- option to set global default license for entire site<br />
- option to turn off graphic/button and just show text<br />
- option to choose/add an existing licensing structure (other than CC) by providing a URL<br />
- create another template function to gather and list all posts with CC licensing (by title)</p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.touchbasic.com/html/wp-23-plugin-per-post-creative-commons-license/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
