Commit 51f327f0 authored by lucha's avatar lucha

removed obsolete plugins: wordpress-popular-post and french-creative-commons-license-widget

parent e6bdcad0
<?php
/****************************************************************************
Plugin Name: french creative commons license widget
Plugin URI: www.flext.net/fcclw
Author: Florent Gallaire <fgallaire@gmail.com> (french translation)
Author URI: fgallaire.flext.net
Contributors: lcflores, Gyo (italian translation - http://gyo.ilbello.com), Sergi Barros (catalan translation)
Tags: license, creative commons, licence, french, français
Requires at least: 2.0.2
Tested up to: 2.9.2
Stable tag: 0.2
Version: 0.2
Creation time: 25/02/2010
Last updated: 25/02/2010
Description: Adds a sidebar widget to display creative commons license (supports all 3.0 licenses), with french translation.
****************************************************************************/
// This gets called at the plugins_loaded action
function widget_ccLicense_init() {
// check for sidebar existance
if ( !function_exists('register_sidebar_widget') || !function_exists('register_widget_control') )
return;
// This saves options and prints the widget's config form.
function widget_ccLicense_control() {
$options = $newoptions = get_option('widget_ccLicense');
if ( $_POST['ccLicense-submit'] ) {
$newoptions['title'] = strip_tags(stripslashes($_POST['ccLicense-title']));
$newoptions['language'] = strip_tags(stripslashes($_POST['ccLicense-language']));
$newoptions['type'] = strip_tags(stripslashes($_POST['ccLicense-type']));
$newoptions['image'] = strip_tags(stripslashes($_POST['ccLicense-image']));
}
if ( $options != $newoptions ) {
$options = $newoptions;
update_option('widget_ccLicense', $options);
}
?>
<p style="text-align:left;">
<label for="ccLicense-title" style="line-height:25px;display:block;"><?php _e('Title:', 'widgets'); ?>
<input type="text" id="ccLicense-title" name="ccLicense-title" value="<?php echo wp_specialchars($options['title'], true); ?>" />
</label>
<label for="ccLicense-language" style="line-height:25px;display:block;"><?php _e('Language:', 'widgets'); ?>
<select id="ccLicense-language" name="ccLicense-language">
<option value="English" <?php if ($options['language']=='English') {echo "selected=\"selected\""; }?> >English</option>
<option value="Spanish" <?php if ($options['language']=='Spanish') {echo "selected=\"selected\""; }?> >Spanish</option>
<option value="Français" <?php if ($options['language']=='Français') {echo "selected=\"selected\""; }?> >Français</option>
<option value="Italian" <?php if ($options['language']=='Italian') {echo "selected=\"selected\""; }?> >Italian</option>
<option value="Catalan" <?php if ($options['language']=='Catalan') {echo "selected=\"selected\""; }?> >Catalan</option>
</select>
</label>
<label for="ccLicense-type" style="line-height:25px;display:block;"><?php _e('License:', 'widgets'); ?>
<select id="ccLicense-type" name="ccLicense-type">
<option value="Attribution" <?php if ($options['type']=='Attribution') {echo "selected=\"selected\""; }?> >Attribution</option>
<option value="Attribution-NoDerivs" <?php if ($options['type']=='Attribution-NoDerivs') {echo "selected=\"selected\""; }?> >Attribution-NoDerivs</option>
<option value="Attribution-NonCommercial-NoDerivs" <?php if ($options['type']=='Attribution-NonCommercial-NoDerivs') {echo "selected=\"selected\""; }?> >Attribution-NonCommercial-NoDerivs</option>
<option value="Attribution-NonCommercial" <?php if ($options['type']=="Attribution-NonCommercial") {echo "selected=\"selected\""; }?> >Attribution-NonCommercial</option>
<option value="Attribution-NonCommercial-ShareAlike" <?php if ($options['type']=='Attribution-NonCommercial-ShareAlike') {echo "selected=\"selected\""; }?> >Attribution-NonCommercial-ShareAlike</option>
<option value="Attribution-ShareAlike" <?php if ($options['type']=='Attribution-ShareAlike') {echo "selected=\"selected\""; }?> >Attribution-ShareAlike</option>
</select>
</label>
<label for="ccLicense-image" style="line-height:25px;display:block;"><?php _e('Image:', 'widgets'); ?>
<select id="ccLicense-image" name="ccLicense-image">
<option value="somerights20" <?php if ($options['image']=='somerights20') {echo "selected=\"selected\""; }?> >somerights20</option>
<option value="80x15" <?php if ($options['image']=='80x15') {echo "selected=\"selected\""; }?> >80x15</option>
<option value="88x31" <?php if ($options['image']=='88x31') {echo "selected=\"selected\""; }?> >88x31</option>
</select>
</label>
<input type="hidden" name="ccLicense-submit" id="ccLicense-submit" value="1" />
</p>
<?php
}
// This prints the widget
function widget_ccLicense($args) {
extract($args);
$options = get_option('widget_ccLicense');
$title = $options['title'];
$language = $options['language'];
$type = $options['type'];
$image = $options['image'];
// Creates widget configuration
$text = '';
$licenseText = '';
$imageUrl = '';
$licenseUrl = '';
$url = '';
$licenseText = 'Creative Commons ' . $type . ' 3.0 License';
switch ($language) {
case 'Spanish':
$text = 'Blog bajo licencia';
$licenseUrl = 'deed.es_CL';
break;
case 'Italian':
$text = 'Blog sotto licenza';
$licenseUrl = 'deed.it';
break;
case 'English':
$text = 'Blog under the';
$licenseUrl = '';
break;
case 'Catalan':
$text = 'Blog sota llic�ncia';
$licenseUrl = 'deed.ca';
break;
case 'Français':
$text = 'Site sous licence';
$licenseUrl = 'deed.fr';
break;
default:
$text = 'Blog under the';
$licenseUrl = '';
break;
}
switch ($type) {
case 'Attribution':
$url = 'by';
break;
case 'Attribution-NoDerivs':
$url = 'by-nd';
break;
case 'Attribution-NonCommercial-NoDerivs':
$url = 'by-nc-nd';
break;
case 'Attribution-NonCommercial':
$url = 'by-nc';
break;
case 'Attribution-NonCommercial-ShareAlike':
$url = 'by-nc-sa';
break;
case 'Attribution-ShareAlike':
$url = 'by-sa';
break;
default:
$url = 'by';
break;
}
$licenseUrl = 'http://creativecommons.org/licenses/' . $url . '/3.0/' . $licenseUrl;
switch ($image) {
case 'somerights20':
$imageUrl = 'http://creativecommons.org/images/public/somerights20.png';
break;
case '80x15':
$imageUrl = 'http://i.creativecommons.org/l/' . $url . '/3.0/80x15.png';
break;
case '88x31':
$imageUrl = 'http://i.creativecommons.org/l/' . $url . '/3.0/88x31.png';
break;
default:
$imageUrl = 'http://creativecommons.org/images/public/somerights20.png';
break;
}
// prints the widget.
echo $before_widget . $before_title . $title . $after_title;
?>
<!--Creative Commons License-->
<div style="text-align: center; font-size: xx-small;">
<?php echo $text; ?>
<a rel="license" target="_blank" href="<?php echo $licenseUrl; ?>"> <?php echo $licenseText; ?><br/>
<img alt="Creative Commons License" border="0" src="<?php echo $imageUrl; ?>"/></a>
</div>
<!--/Creative Commons License-->
<?php
echo $after_widget;
}
// Tell Dynamic Sidebar about our new widget and its control
register_sidebar_widget(array('creativecommons License', 'widgets'), 'widget_ccLicense');
register_widget_control(array('creativecommons License', 'widgets'), 'widget_ccLicense_control');
}
// Delay plugin execution to ensure Dynamic Sidebar has a chance to load first
add_action('widgets_init', 'widget_ccLicense_init');
?>
=== french creative commons license widget ===
Plugin Name: french creative commons license widget
Contributors: Florent Gallaire <fgallaire@gmail.com> (french translation), lcflores, Gyo (italian translation), Sergi Barros (catalan translation)
Tags: license, creative commons, french, français, licence
Requires at least: 2.0.2
Tested up to: 2.9.2
Stable tag: 0.2
Version: 0.2
Creation time: 25/02/2010
Last updated: 25/02/2010
Adds a sidebar widget to display creative commons license (supports all 3.0 licenses), with french translation.
== Description ==
Adds a sidebar widget to display creative commons license:
Five languages:
* French
* English
* Spanish
* Italian
* Catalan
All creative commons licenses:
* Attribution
* Attribution-NoDerivs
* Attribution-NonCommercial-NoDerivs
* Attribution-NonCommercial
* Attribution-NonCommercial-ShareAlike
* Attribution-ShareAlike
Three images types
* somerights20
* 80x15
* 88x31
== Screenshots ==
1. Widget configuration
2. Example
== Installation ==
This diff is collapsed.
<?php
// Silence is golden.
?>
\ No newline at end of file
This diff is collapsed.
<?php
if (basename($_SERVER['SCRIPT_NAME']) == basename(__FILE__)) exit('Please do not load this page directly');
?>
<style>
#wpp-wrapper {width:100%}
#wpp-wrapper h2 {margin:0 0 15px 0; color:#666; font-weight:100; font-family:Georgia, "Times New Roman", Times, serif; font-size:24px; font-style:italic}
#wpp-wrapper h3 {color:#666; font-weight:100; font-family:Georgia, "Times New Roman", Times, serif; font-size:16px}
#wpp-wrapper h4 {margin:0 0 4px 0; color:#666; font-weight:100; font-family:Georgia, "Times New Roman", Times, serif; font-size:13px}
#wpp-wrapper h4 a {text-decoration:none}
#wpp-wrapper h4 a:hover {text-decoration:underline}
#wpp-stats-tabs {
padding:2px 0;
}
#wpp-stats-canvas {
overflow:hidden;
padding:2px 0;
width:570px;
}
.wpp-stats {
display:none;
width:544px;
padding:10px;
font-size:8px;
background:#fff;
border:#999 3px solid;
}
.wpp-stats-active {
display:block;
}
.wpp-stats ol li {
margin:0 0 10px 0;
padding:0 0 2px 0;
font-size:12px;
line-height:12px;
color:#999;
border-bottom:#eee 1px solid;
}
.wpp-post-title {
display:block;
font-weight:bold;
}
.post-stats {
display:block;
font-size:9px!important;
text-align:right;
color:#999;
}
.wpp-stats-unique-item, .wpp-stats-last-item {
margin:0!important;
padding:0!important;
border:none!important;
}
</style>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("#wpp-stats-tabs a").click(function(){
var activeTab = jQuery(this).attr("rel");
jQuery(this).removeClass("button-secondary").addClass("button-primary").siblings().removeClass("button-primary").addClass("button-secondary");
jQuery(".wpp-stats:visible").fadeOut("fast", function(){
jQuery("#"+activeTab).slideDown("fast");
});
return false;
});
jQuery(".wpp-stats").each(function(){
if (jQuery("li", this).length == 1) {
jQuery("li", this).addClass("wpp-stats-last-item");
} else {
jQuery("li:last", this).addClass("wpp-stats-last-item");
}
});
});
</script>
<div class="wrap">
<div id="icon-index" class="icon32"><br /></div>
<h2 id="wmpp-title">Wordpress Popular Posts Stats</h2>
<p><?php _e("Click on each tab to see what are the most popular entries on your blog today, this week, last 30 days or all time since Wordpress Popular Posts was installed.", "wordpress-popular-posts"); ?></p>
<div id="wpp-stats-tabs">
<!--<a href="#" class="button-secondary" rel="wpp-yesterday"><?php _e("Yesterday", "wordpress-popular-posts"); ?></a>-->
<a href="#" class="button-primary" rel="wpp-daily"><?php _e("Today", "wordpress-popular-posts"); ?></a>
<a href="#" class="button-secondary" rel="wpp-weekly"><?php _e("Weekly", "wordpress-popular-posts"); ?></a>
<a href="#" class="button-secondary" rel="wpp-monthly"><?php _e("Monthly", "wordpress-popular-posts"); ?></a>
<a href="#" class="button-secondary" rel="wpp-all"><?php _e("All-time", "wordpress-popular-posts"); ?></a>
</div>
<div id="wpp-stats-canvas">
<!--
<div class="wpp-stats" id="wpp-yesterday">
<?php //echo do_shortcode('[wpp range=yesterday stats_views=1 order_by=views wpp_start=<ol> wpp_end=</ol>]'); ?>
</div>
-->
<div class="wpp-stats wpp-stats-active" id="wpp-daily">
<?php echo do_shortcode('[wpp range=today stats_views=1 order_by=views wpp_start=<ol> wpp_end=</ol>]'); ?>
</div>
<div class="wpp-stats" id="wpp-weekly">
<?php echo do_shortcode('[wpp range=weekly stats_views=1 order_by=views wpp_start=<ol> wpp_end=</ol>]'); ?>
</div>
<div class="wpp-stats" id="wpp-monthly">
<?php echo do_shortcode('[wpp range=monthly stats_views=1 order_by=views wpp_start=<ol> wpp_end=</ol>]'); ?>
</div>
<div class="wpp-stats" id="wpp-all">
<?php echo do_shortcode('[wpp range=all stats_views=1 order_by=views wpp_start=<ol> wpp_end=</ol>]'); ?>
</div>
</div>
<?php
?>
</div>
\ No newline at end of file
/*
Wordpress Popular Posts plugin stylesheet
Developed by Hector Cabrera
Use the following classes to style your popular posts list as you like.
*/
/* title styles */
.wpp-post-title {
}
/* thumbnail styles */
img.wpp-thumbnail {
border:none;
}
/* excerpt styles */
.wpp-excerpt {
}
/* Stats tag styles */
.post-stats {
font-size:9px;
font-weight:bold;
}
.wpp-comments {
}
.wpp-views {
}
.wpp-author {
font-style:italic;
}
.wpp-date {
}
/* WP-PostRatings styles */
.wpp-rating {
}
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment