From be609809b4c8acd6de0458a89c188601a3c7818a Mon Sep 17 00:00:00 2001 From: root <root@rivolta.investici.org> Date: Wed, 1 Dec 2010 00:41:27 +0000 Subject: [PATCH] Adding plugin wp-license-reloaded --- .../wp-license-reloaded/images/cc_admin.png | Bin 0 -> 464 bytes .../wp-license-reloaded/images/cclogo.gif | Bin 0 -> 4538 bytes .../plugins/wp-license-reloaded/readme.txt | 44 +++ .../wplicense-reloaded.php | 195 ++++++++++++++ .../plugins/wp-license-reloaded/wplicense.css | 253 ++++++++++++++++++ 5 files changed, 492 insertions(+) create mode 100644 wp-content/plugins/wp-license-reloaded/images/cc_admin.png create mode 100644 wp-content/plugins/wp-license-reloaded/images/cclogo.gif create mode 100644 wp-content/plugins/wp-license-reloaded/readme.txt create mode 100644 wp-content/plugins/wp-license-reloaded/wplicense-reloaded.php create mode 100644 wp-content/plugins/wp-license-reloaded/wplicense.css diff --git a/wp-content/plugins/wp-license-reloaded/images/cc_admin.png b/wp-content/plugins/wp-license-reloaded/images/cc_admin.png new file mode 100644 index 0000000000000000000000000000000000000000..21bab188c30d16bb3b86be00247002a772c99449 GIT binary patch literal 464 zcmeAS@N?(olHy`uVBq!ia0y~yVBiN~4mJh`2J356y%-o6Sc;uILpV4%IBGajIv5xj zBuiW)N`mv#O3D+9QW?t2%k?tzvWt@w3sUv+i_&Mmvyoz8U`+CKaSW-L(|dWp_q9L~ zwh!kkS1y%uI<;`cTBi1nEKaVTHl9bKT?z-=4v4K>_OJ0;Q`@Z~BY_~1rCS^W%ug#W z3>97^@9{v$Df%wk`DpWv^6@)r9^UzEV{_i}d~Z<KukH?Qi~h$JEvY(5yQUa@iZ0f4 z721-_bl<T3_lv`}XC6r}+wfjpt+Dz8=ljBSrIGS;4o0s@tml<G=DsDDbqz<^(%$E~ zyM0Asen@XnvY0ETcQE<P^P_xs4)VNP)R<>;Sb#6(J`bCeMPs<-{<u5GoMny#_9O|- zFVy)R_uOpFV>ctegbkA_MB@c#FZrIhw^6l3<*~^*Hy2~2d5>hbEw)#Zb2+m0jdj!1 zT+N3eV)GN!^Pa8~FOa<cQFZSj&pj)b-~Dqwv-}oEkpF6frqC__nRiHQR|K}FtnY1E z`_Gec*9XPr|FjcBUD_`nVv>89_AfrIc1@Ug^qy5}de8pxKQ|K#epPYzH*?ZUsq5YA TCS71)U|{fc^>bP0l+XkK#B;>) literal 0 HcmV?d00001 diff --git a/wp-content/plugins/wp-license-reloaded/images/cclogo.gif b/wp-content/plugins/wp-license-reloaded/images/cclogo.gif new file mode 100644 index 0000000000000000000000000000000000000000..e1213bafd7f9bf913d427ac6bb790e20c8aabf3f GIT binary patch literal 4538 zcmZ?wbhEHb+`^#3@STC-(c3e#4|@Fk{bkN!v!*Q!w_ol)ac6neYK@-V469C+AG+0Z z`RS%tpKo1xx~6U;!<0Sdhi^|RT){APulu=2i%&hA_4U`sD^GWBJXf~nOiJubhQI&* zB+g{G^ZL-5Gg&V`UCms`(7ui7!?(vzKU_+g#klEW@`M8nTP_yux>hrFpK8w@rs;b^ z|NQ%vIFF%av+&kS8M#Xt_FkXz?(3t@oeV8o7&e^G-F2n=-s=-ze!iW1Fk<o1sJitG zGY)AKEMZuDEcxi|xnYwSI<_-R+$&SHj$zxymh^cH3y%ezeYmo04a38?M`NZj6fI}i zcDcHI6+`AchK5ZH-CLbkpN((ZqF1w)yI?s(#cHP9MGPG~85-9b-F&(2$=i#OQy324 zZrgXWx_XV!@4w%J`xv^mSl6s$C|kkw>Bq~4b(%Y`w6tzAY1$~;yN4li5<}K}hLUAW zMa!9L*UEnS_Ofyf!^a;_7ah%L+s?53v`@hzhSUWN&FlET{Cx5L>(i9kOx=4JmYodg z-DzCBiedht<gT5vMN4Ihmohc16Z7q1=-H{=u!$*e5ku(;hU539bnjwbdD^#lDNpN0 zo3a%Qy}MM(R`4u1>YTNNp?(9y@>6l2e!gwl#?ZAzqhp(7#Tth5k2asYH+TK{*iGl# zljkw)yi(M(iQ)B^hilG-RIXua+s4qpTjcr28*N*7dbXQv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dw#9q)7N6Z)e130nkltd!y~Q_rYsBoWQM<Rs+}>&y&Gds|TVga*Qa68E^|p-J z+p>0VOU&MudU{(j_qHVOZTZ~W%c{4R?%q~%ds|`k_Nv$0(`Rqb+P%Hld)to({2jA* jbnV{Jb9+bM?;R7QcTTe2IVF1MwCbHRe(zvpWUvMR;<)xX literal 0 HcmV?d00001 diff --git a/wp-content/plugins/wp-license-reloaded/readme.txt b/wp-content/plugins/wp-license-reloaded/readme.txt new file mode 100644 index 000000000..b19b67d92 --- /dev/null +++ b/wp-content/plugins/wp-license-reloaded/readme.txt @@ -0,0 +1,44 @@ +=== WP License reloaded === +Contributors: estebanglas +Tags: Creative Commons, Licensing, content +Requires at least: 2.7 +Tested up to: 2.8.1 +Stable tag: /0.1.1/ + +Per post Creative Commons Licensing (Ideal for multiple authours / licenses blogs) + +== Description == + +Based on the amazing Job by <a title="Nathan's Homepage" href="http://yergler.net/">Nathan R. Yergler</a> and his <a href="http://wiki.creativecommons.org/WpLicense">WP-Licencse Plugin</a>. This plugin Alows users to assign a Creative Commons license to content on a per post basis (or no license at all) + +This plugin was made possible thanks to <a href="http://www.socialbrite.org">SocialBrite</a> + +The license chunk on the posts is wrapped in a DIV with class: wp_license + +== Installation == + +1. Upload the plugin folder (named wp-license-reloaded) in to the `/wp-content/plugins/` directory +2. Activate WP License reloaded through the 'Plugins' menu in WordPress +3. In the post screen you'll now have a CC license area where you can assign + +== Frequently Asked Questions == + += What can be expected in future releases of the plugin = + +* Global settings +* Mass post licensing + += What about foo bar? = + +Answer to foo bar dilemma. + +== Screenshots == + + +== Changelog == + += 0.1 = +* Initial release + += 0.1.1 = +*Minor Bug Fixes (Thanks MAC13 & WikiChaves) \ No newline at end of file diff --git a/wp-content/plugins/wp-license-reloaded/wplicense-reloaded.php b/wp-content/plugins/wp-license-reloaded/wplicense-reloaded.php new file mode 100644 index 000000000..63ffb7844 --- /dev/null +++ b/wp-content/plugins/wp-license-reloaded/wplicense-reloaded.php @@ -0,0 +1,195 @@ +<?php +/* +Plugin Name: wpLicense-reloaded +Plugin URI: http://estebanglas.com/2009/07/creative-commons-plugin/ +Description: Based on <a href="http://wiki.creativecommons.org/WpLicense">wpLicense</a> Allows selection of a <a href="http://creativecommons.org">Creative Commons</a> license for blog content on a per-post basis. Work done originally for <a href="http://www.socialbrite.org">SocialBrite</a> +Version: 0.1.1 +Author: Esteban Panzeri Glas (based on the work by Nathan R. Yergler>) +Author URI: http://estebanglas.com +*/ + +/* Copyright 2009, + Esteban A. Panzeri Glas (email : esteban.glas@gmail.com) + Creative Commons (email : software@creativecommons.org), + Nathan R. Yergler (email : nathan@creativecommons.org) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +/* Template Functions */ + +function licenseHtml($content) { + + global $post; + $license_uri = get_post_meta($post->ID, 'cc_content_license_uri',true); + $license_img = get_post_meta($post->ID, 'cc_content_license_img',true); + $license_name = get_post_meta($post->ID, 'cc_content_license',true); + $CC_logo = get_bloginfo("wpurl") . "/wp-content/plugins/wp-license-reloaded/images/cclogo.gif"; + + if (($license_uri) && $license_uri != ""){ + $image = <<< END_OF_STMT +<img src="${license_img}" alt="${license_name}" class="alignleft" style="margin-top:4px;" /> + +END_OF_STMT; + + + + $result = <<< END_OF_STMT + +<div class="wp_license"> +<p><a rel="license" href="${license_uri}">$image</a>This work ${attrib} is licensed under a <a rel="license" href="${license_uri}">${license_name}</a>.</p> +</div> +END_OF_STMT; + +$content = $content . $result; + +} + +return $content; + +} // licenseHtml + + +/* Admin functions */ + +function license_options() { + + global $post; + + +$slart = $_GET['post']; + +$defaults = array("license_name" => get_post_meta($slart, 'cc_content_license',true), + "license_uri" => get_post_meta($slart, 'cc_content_license_uri',true), + ); +$wp_url = get_bloginfo('wpurl'); +$license_url = get_post_meta($slart, 'cc_content_license_uri',true); + +if ($license_url == '') { $jswidget_extra = "want_a_license=no_license_by_default"; } +else { $jswidget_extra = ""; } + + + +echo <<< END_OF_ADMIN +<div class="wrap"> +<p>This page allows you to choose a +<a href="http://creativecommons.org">Creative Commons</a> license +for your content. </p> + + + +<script type="text/javascript" src="http://api.creativecommons.org/jswidget/tags/0.92/complete.js?${jswidget_extra}"> +</script> + +<input id="cc_js_seed_uri" type="hidden" value="${license_url}" /> +<input name="blog_url" id="blog_url" type="hidden" value="${wp_url}" /> +<input name="remove_license" type="hidden" value="false" /> +<input name="submitted" type="hidden" value="wplicense" /> + + +<br/> + + +</div> +</div> + +END_OF_ADMIN; + +} // license_options + + + +// Include the necessary java-script libraries +function wplicense_header() { + $css_url = get_bloginfo("wpurl") . "/wp-content/plugins/wp-license-reloaded/wplicense.css"; + + echo "<link rel=\"stylesheet\" href=\"${css_url}\" />"; + add_meta_box('cc_license_control', 'Creative Commons Licensing', 'license_options', 'post', 'normal', 'high'); +} // wplicense_header + + +// Initialize the WordPress content variables +function init_content_license($fullreset=false, $just_license_reset=false) { + +global $post; + + + + // if reset is True, destructively reset the values + if ($fullreset == true) { + update_post_meta($_POST['post_ID'],'cc_content_license', ''); + update_post_meta($_POST['post_ID'],'cc_content_license_uri', ''); + update_post_meta($_POST['post_ID'],'cc_content_license_img', ''); + + } // if resetting + + if ($just_license_reset) { + update_post_meta($_POST['post_ID'],'cc_content_license', ''); + update_post_meta($_POST['post_ID'],'cc_content_license_uri', ''); + update_post_meta($_POST['post_ID'],'cc_content_license_img', ''); + } // if just resetting license details but not other prefs + + +} // init_content_license + +function post_form() { + global $post_msg; + global $post; + + + //update_post_meta($slart,'cc_content_license_img', $_POST['cc_js_result_img']); + + // check for standard return (using web services + if ( (isset($_POST['submitted'])) && ($_POST['submitted'] == 'wplicense')) { + // check if the license should be removed + if ($_POST['remove_license'] == '__remove' || + ($_POST['cc_js_result_uri'] == '' && get_post_meta($_POST['post_ID'],'cc_content_license_uri') != '')) { + init_content_license(false, true); + + $post_msg = "<h3>License information removed.</h3>"; + return; + } // remove license + + // check if the license was changed + if ($_POST['cc_js_result_uri'] != get_post_meta($_POST['post_ID'],'cc_content_license_uri')) { + // store the new license information + + update_post_meta($_POST['post_ID'],'cc_content_license', $_POST['cc_js_result_name']); + update_post_meta($_POST['post_ID'],'cc_content_license_uri', $_POST['cc_js_result_uri']); + update_post_meta($_POST['post_ID'],'cc_content_license_img', $_POST['cc_js_result_img']); + } + + // store the settings + + $post_msg = "<h3>License information updated.</h3>"; + } // standard web services post + +} // post_form + +/* admin interface action registration */ + + +add_action('admin_head', 'wplicense_header'); + +/* content action/filter registration */ + + +add_action('save_post', 'post_form'); +add_action('edit_post', 'post_form'); +add_action('publish_post', 'post_form'); +add_action('admin_head', 'post_form'); +add_filter('the_content','licenseHtml'); + +?> diff --git a/wp-content/plugins/wp-license-reloaded/wplicense.css b/wp-content/plugins/wp-license-reloaded/wplicense.css new file mode 100644 index 000000000..38136e51d --- /dev/null +++ b/wp-content/plugins/wp-license-reloaded/wplicense.css @@ -0,0 +1,253 @@ +/** + * This was written by CC as a demonstration of how to interoperate + * with the Creative Commons JsWidget. No rights reserved. + * + * See README for a little more detail. + */ + +/** Edit me to fit your particular look **/ +#cc_js_lic-menu +{ + margin: 0 auto; + /*border: 1px solid #ddd;*/ +} + + +.cc_js_body { + background-color: #fff; + color: #343434; + font: 60% "Lucida Grande", verdana, sans-serif; + padding: 0; + margin: 0; + text-align: center; +} + +#cc_js_header-main { + width: 93%; + min-width: 700px; + margin: 0 3%; + padding: 10px 0 2px 1%; + text-align: left; + font-size: 11px !important; +} + +/* -- elements */ + +a.cs_js_a, a:link.cs_js_a { + text-decoration: none; + color: #00b; +} + +a:hover.cs_js_a { + text-decoration: underline; +} + +/** + * This was written by CC as a demonstration of how to interoperate + * with the Creative Commons JsWidget. No rights reserved. + * + * See README for a little more detail. + */ + +#cc_js_license_selected +{ + border: 1px solid #c2e0cf; + text-align: center; + padding: 3%; + margin-bottom: 2.7%; + +} + +#cc_js_jurisdiction_box +{ + /* border: 1px solid black; */ + padding: 0.5% 2% 1% 2%; + margin-bottom: 1%; +} + +#cc_js_lic-menu h2 +{ + /* text-decoration: underline; */ + /* border-bottom: 1px solid black; */ + padding: 3% 0 1% 0; + border: none; +} + +#cc_js_lic-result +{ + padding: 0; + margin: 0; +} + +select#cc_js_jurisdiction +{ + margin-bottom: 2%; +} + +textarea#cc_js_result +{ + width: 9%; + border: 1px solid #ccc; + color: gray; + margin-top: 1%; +} + +a.cc_js_a img +{ + border: none; + text-decoration: none; +} + +#cc_js_more_info +{ + border: 1px solid #eee; + padding: 0.5% 2% 1% 2%; + margin-bottom: 1%; + margin-top: 1%; + width: 87%; +} +#cc_js_more_info table +{ + width: 65%; +} + +#cc_js_more_info .header +{ + width: 35%; +} + +#cc_js_more_info input +{ + width: 100%; + border: 1px solid #ccc; +} + +#cc_js_required +{ + + border-top: 1px solid #ccc; + border-bottom: 1px solid #ccc; + padding: 4% 2%; + margin-bottom: 1%; + margin-top: 2px; + /* background: #efefef; + background: #eef6e6;*/ + +} + +#cc_js_work_title +{ + font-style: italic; +} + + +#cc_js_optional +{ + border: 1px solid #eee; + padding: 0.5% 2% 1% 2%; + margin-bottom: 1%; + margin-top: 1%; + width: 87%; +} + + +.cc_js_cc-button +{ + padding-bottom: 1%; +} + +.cc_js_info +{ + vertical-align: middle; +} + +img.cc_js_info { + float: right; +} + +#cc_js_jurisdiction_box { + clear: left; + +} + +#cc_js_lic-menu p{ + padding: 3px 0 5px 0; + margin: 0 0 5px 0; +} + +.cc_js_tooltip +{ + background: white; + border: 2px solid gray; + padding: 3px 10px 3px 10px; + width: 300px; + text-align: left; +} + +.cc_js_tooltip .cc_js_icon +{ + float: left; + padding-right: 4%; + padding-bottom: 20%; +} + +.cc_js_tooltipimage +{ + border: 2px solid gray; +} + +.cc_js_infobox +{ + cursor: help; +} + +.cc_js_question +{ + cursor: help; + /*color: #00b;*/ + border-bottom: 1px dashed #66b; +} + +.cc_js_hidden { + display: none; +} + +#cc_js_required .cc_js_question { border: none; } + + + +#cc_js_want_cc_license_at_all { + background-color: #eef6e6; + padding: 1em; + padding-left: 0; +} + +#cc_js_want_cc_license_at_all span { + margin-right: 10px; + margin-left: 10px; + padding: 0.5em; +} +#cc_js_want_cc_license_at_all span span { + margin: 0; + padding: 0; +} + +#cc_js_required p { padding-bottom: 50px; } + +#cc_js_remix-label span { + background: url('http://creativecommons.org/images/deed/remix.png') no-repeat top left; + padding-left: 60px; + padding-bottom: 60px; +} + +#cc_js_nc-label span { + background: url('http://creativecommons.org/images/deed/nc.png') no-repeat top left; + padding-left: 60px; + padding-bottom: 60px; +} + +#cc_js_sa-label span { + background: url('http://creativecommons.org/images/deed/sa.png') no-repeat top left; + padding-left: 60px; + padding-bottom: 60px; +} -- GitLab