Dotclear

Changeset 3237


Ignore:
Timestamp:
10/24/13 00:09:14 (10 years ago)
Author:
Moe
Message:

Popularity Contest 1.6-dead: remove this plugin

Location:
plugins/popularityContest
Files:
3 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • plugins/popularityContest

    • Property svn:externals deleted
  • plugins/popularityContest/_admin.php

    r2295 r3237  
    2929     preg_match('/plugin.php\?p=popularityContest(&.*)?$/',$_SERVER['REQUEST_URI']), 
    3030     $core->auth->check('admin',$core->blog->id)); 
    31  
    32 require_once(dirname(__FILE__).'/inc/lib.popularityContest.php'); 
    33  
    34 # if the last report is "old" 
    35 if (($_SERVER['REQUEST_TIME'] - $core->blog->settings->popularityContest_last_report) > 
    36      $core->blog->settings->popularityContest_time_interval) 
    37 { 
    38      popularityContest::send(); 
    39 } 
    40  
    41 ?> 
  • plugins/popularityContest/_define.php

    r2401 r3237  
    2929     /* Description */        "Dotclear Popularity Contest (http://popcon.gniark.net/)", 
    3030     /* Author      */        "Moe (http://gniark.net/)", 
    31      /* Version     */        "1.5", 
     31     /* Version     */        "1.6-dead", 
    3232     /* Permissions */        null 
    3333); 
    34 ?> 
  • plugins/popularityContest/index.php

    r2401 r3237  
    2727l10n::set(dirname(__FILE__).'/locales/'.$_lang.'/admin'); 
    2828 
    29 $settings =& $core->blog->settings; 
    30  
    31 $msg = ''; 
    32 $tab = 'popularityContest'; 
    33  
    34 $time_interval_last_try = 
    35      $_SERVER['REQUEST_TIME'] - $settings->popularityContest_last_try; 
    36 $can_send_report = ($time_interval_last_try >= (30*60)); 
    37  
    38 $hidden_plugins = array(); 
    39 if (strlen($settings->popularityContest_hidden_plugins) > 0) 
    40 { 
    41      $hidden_plugins = unserialize(base64_decode($settings->popularityContest_hidden_plugins)); 
    42 } 
    43 if (!is_array($hidden_plugins)) {$hidden_plugins = array();} 
    44  
    45 require_once(dirname(__FILE__).'/php-xhtml-table/class.table.php'); 
    46 require_once(dirname(__FILE__).'/inc/lib.popularityContest.php'); 
    47  
    48 $popularityContest_time_interval =  
    49      (is_int($settings->popularityContest_time_interval)) ?  
    50           $settings->popularityContest_time_interval : (24*3600); 
    51 $popularityContest_sent = false; 
    52  
    53 # actions 
    54 if (!empty($_POST['saveconfig'])) 
    55 { 
    56      try 
    57      { 
    58           $settings->setNameSpace('popularitycontest'); 
    59           # Time interval in seconds between sends to Popularity Contest 
    60           $popularityContest_time_interval = 
    61                (empty($_POST['popularityContest_time_interval'])) 
    62                ? 604800:abs($_POST['popularityContest_time_interval']); 
    63           $settings->put('popularityContest_time_interval', 
    64                $popularityContest_time_interval,'integer', 
    65                'Time interval in seconds between submissions to Popularity Contest', 
    66                true,true); 
    67           # Hide plugins 
    68           $popularityContest_hidden_plugins = 
    69                (!empty($_POST['hidden_plugins']))  
    70                ? base64_encode(serialize($_POST['hidden_plugins'])) 
    71                : base64_encode(serialize(array(''))); 
    72           $settings->put('popularityContest_hidden_plugins', 
    73                $popularityContest_hidden_plugins,'text','Hidden plugins', 
    74                true,true); 
    75           $hidden_plugins = $_POST['hidden_plugins']; 
    76  
    77           http::redirect($p_url.'&saveconfig=1'); 
    78      } 
    79      catch (Exception $e) 
    80      { 
    81           $core->error->add($e->getMessage()); 
    82      } 
    83 } 
    84 elseif (isset($_POST['send_report'])) 
    85 { 
    86      if (!$can_send_report) 
    87      { 
    88           http::redirect($p_url.'&wait=1'); 
    89      } 
    90      elseif (popularityContest::send() === true) 
    91      { 
    92           http::redirect($p_url.'&report_sent=1'); 
    93      } 
    94      else 
    95      { 
    96           http::redirect($p_url.'&wait=1'); 
    97      } 
    98 } 
    99  
    100 if (isset($_GET['saveconfig'])) 
    101 { 
    102      $msg = __('Configuration successfully updated.'); 
    103      $tab = 'settings'; 
    104 } 
    105 elseif (isset($_GET['report_sent'])) 
    106 { 
    107      $msg = __('Report successfully sent.'); 
    108 } 
    109 elseif (isset($_GET['wait'])) 
    110 { 
    111      $core->error->add(sprintf( 
    112           __('please wait %s before sending a report'), 
    113           popularityContest::getDiff((30*60)- $time_interval_last_try))); 
    114 } 
    11529?> 
    11630<html> 
    11731<head> 
    11832  <title><?php echo __('Popularity Contest'); ?></title> 
    119   <?php  
    120           echo(dcPage::jsPageTabs($tab). 
    121           dcPage::jsLoad('js/_posts_list.js'). 
    122           dcPage::jsLoad('js/filter-controls.js')); 
    123   ?> 
    124   <style type="text/css"> 
    125      /*tr:hover {background:#eee none;}*/ 
    126           .icon {text-align:center;} 
    127           .default {background:transparent url(/images/template/default.png) repeat;} 
    128           .popularityContest {background:transparent url(/images/template/popularityContest.png) repeat;} 
    129   </style> 
    13033</head> 
    13134<body> 
    13235 
    133 <h2><?php echo __('Popularity Contest'); ?></h2> 
    134  
    135 <?php  
    136      if (!empty($msg)) {echo '<p class="message">'.$msg.'</p>';} 
     36     <h2><?php echo __('Popularity Contest'); ?></h2> 
    13737      
    138      if (is_int($settings->popularityContest_last_report)) 
    139      { 
    140           printf('<h3>'.__('Last successful report: %s ago').'</h3>', 
    141                popularityContest::getDiff( 
    142                $_SERVER['REQUEST_TIME']-$settings->popularityContest_last_report)); 
    143      } 
    144      if (is_int($settings->popularityContest_last_try)) 
    145      { 
    146           printf('<h3>'.__('Last try: %s ago').'</h3>', 
    147                popularityContest::getDiff( 
    148                $_SERVER['REQUEST_TIME']-$settings->popularityContest_last_try)); 
    149      } 
    150 ?> 
    151  
    152 <div class="multi-part" id="popularityContest" 
    153      title="<?php echo __('Popularity Contest'); ?>"> 
    154      <p><?php echo(__('This plugin only send the following informations to Dotclear Popularity Contest:')); ?></p> 
    155      <ul> 
    156           <?php  
    157           $infos = array( 
    158                __('the names of installed and activated plugins'), 
    159                sprintf(__('a random key (%s) identify the Dotclear installation with an unique and anonym hash'), 
    160                     '<strong>'.$settings->popularityContest_key.'</strong>'), 
    161                sprintf(__('the Dotclear version (%s)'), 
    162                     '<strong>'.DC_VERSION.'</strong>') 
    163           ); 
    164           foreach ($infos as $k) 
    165           { 
    166                echo('<li>'.$k.'</li>'); 
    167           } 
    168           ?> 
    169      </ul> 
    170  
    171      <p><?php echo(__('In the settings, you can hide some plugins and they will be ignored by Dotclear Popularity Contest.')); ?></p> 
    172      <form method="post" action="<?php echo(http::getSelfURI()); ?>"> 
    173           <p><input type="submit" name="send_report"value="<?php echo 
    174                __('Send a report to Dotclear Popularity Contest'); ?>" /></p> 
    175           <p><?php echo $core->formNonce(); ?></p> 
    176      </form> 
    177      <h3><?php echo(__('Installed plugins:')); ?></h3> 
    178      <?php echo(popularityContest::getPluginsTable()); ?> 
    179 </div> 
    180  
    181 <div class="multi-part" id="settings" title="<?php echo __('settings'); ?>"> 
    182      <form method="post" action="<?php echo(http::getSelfURI()); ?>"> 
    183           <fieldset> 
    184                <legend><?php echo(__('Popularity Contest')); ?></legend> 
    185                <p> 
    186                     <label for="popularityContest_time_interval"> 
    187                          <?php echo(__('Send a report:')); ?> 
    188                     <?php echo(form::combo('popularityContest_time_interval', 
    189                      popularityContest::getComboOptions(), 
    190                      $popularityContest_time_interval)); ?> 
    191                     </label> 
    192                </p> 
    193           </fieldset> 
    194  
    195           <h2><?php echo(__('Hide plugins:')); ?></h2> 
    196           <?php echo(popularityContest::getPluginsTable(true)); ?> 
    197           <p class="col checkboxes-helpers"></p> 
    198           <p><?php echo $core->formNonce(); ?></p> 
    199           <p><input type="submit" name="saveconfig" value="<?php echo __('Save configuration'); ?>" /></p> 
    200      </form> 
    201 </div> 
    202  
    203 <div class="multi-part" id="results" title="<?php echo __('results'); ?>"> 
    204      <p><a href="http://popcon.gniark.net/"><?php echo(__('Click here to see results.')); ?></a></p> 
    205      <h3><?php echo(__('Plugins:')); ?></h3> 
    206      <?php echo(popularityContest::getResultsTable()); ?> 
    207 </div> 
     38     <p class="warning"><?php echo(__('The developement of this plugin is stopped.'). 
     39          ' '. 
     40          __('Please remove this plugin.')) ?></p> 
    20841 
    20942</body> 
  • plugins/popularityContest/locales/fr/admin.po

    r2401 r3237  
    1111"Content-Transfer-Encoding: 8bit\n" 
    1212 
    13 msgid "weekly" 
    14 msgstr "chaque semaine" 
     13msgid "The developement of this plugin is stopped." 
     14msgstr "Le développement de cette extension est arrêté." 
    1515 
    16 msgid "every 3 days" 
    17 msgstr "tous les 3 jours" 
    18  
    19 msgid "daily" 
    20 msgstr "quotidiennement" 
    21  
    22 msgid "Installed plugins:" 
    23 msgstr "Extensions installées&nbsp;:" 
    24  
    25 msgid "Hide" 
    26 msgstr "Cacher" 
    27  
    28 msgid "Icon" 
    29 msgstr "Icône" 
    30  
    31 msgid "Name" 
    32 msgstr "Nom" 
    33  
    34 msgid "Popularity" 
    35 msgstr "Popularité" 
    36  
    37 msgid "second" 
    38 msgstr "seconde" 
    39  
    40 msgid "year" 
    41 msgstr "année" 
    42  
    43 msgid "years" 
    44 msgstr "années" 
    45  
    46 msgid "month" 
    47 msgstr "mois" 
    48  
    49 msgid "months" 
    50 msgstr "mois" 
    51  
    52 msgid "day" 
    53 msgstr "jour" 
    54  
    55 msgid "days" 
    56 msgstr "jours" 
    57  
    58 msgid "hour" 
    59 msgstr "heure" 
    60  
    61 msgid "hours" 
    62 msgstr "heures" 
    63  
    64 msgid "minute" 
    65 msgstr "minute" 
    66  
    67 msgid "minutes" 
    68 msgstr "minutes" 
    69  
    70 msgid "seconds" 
    71 msgstr "secondes" 
    72  
    73 msgid "and" 
    74 msgstr "et" 
    75  
    76 msgid "Plugins:" 
    77 msgstr "Extensions&nbsp;:" 
    78  
    79 msgid "Installed" 
    80 msgstr "Installé" 
    81  
    82 msgid "Configuration successfully updated." 
    83 msgstr "Configuration mise à jour avec succès." 
    84  
    85 msgid "Report successfully sent." 
    86 msgstr "Rapport envoyé avec succès." 
    87  
    88 msgid "please wait %s before sending a report" 
    89 msgstr "veuillez patienter %s avant d'envoyer un rapport" 
    90  
    91 msgid "Last successful report: %s ago" 
    92 msgstr "Dernier rapport réussi&nbsp;: il y a %s" 
    93  
    94 msgid "Last try: %s ago" 
    95 msgstr "Dernier essai&nbsp;: il y a %s" 
    96  
    97 msgid "This plugin only send the following informations to Dotclear Popularity Contest:" 
    98 msgstr "Cette extension envoie seulement les informations suivantes à Dotclear Popularity Contest&nbsp;:" 
    99  
    100 msgid "the names of installed and activated plugins" 
    101 msgstr "les noms des extensions installées et activées" 
    102  
    103 msgid "a random key (%s) identify the Dotclear installation with an unique and anonym hash" 
    104 msgstr "une clé aléatoire (%s) identifie l'installation de Dotclear avec un hash unique et anonyme" 
    105  
    106 msgid "the Dotclear version (%s)" 
    107 msgstr "la version de Dotclear (%s)" 
    108  
    109 msgid "In the settings, you can hide some plugins and they will be ignored by Dotclear Popularity Contest." 
    110 msgstr "Dans les paramètres, vous pouvez cacher des extensions et elles seront ignorées par Dotclear Popularity Contest." 
    111  
    112 msgid "Send a report to Dotclear Popularity Contest" 
    113 msgstr "Envoyer un rapport à Dotclear Popularity Contest" 
    114  
    115 msgid "settings" 
    116 msgstr "paramètres" 
    117  
    118 msgid "Send a report:" 
    119 msgstr "Envoyer un rapport&nbsp;:" 
    120  
    121 msgid "Hide plugins:" 
    122 msgstr "Cacher les extensions&nbsp;:" 
    123  
    124 msgid "Save configuration" 
    125 msgstr "Enregistrer la configuration" 
    126  
    127 msgid "results" 
    128 msgstr "résultats" 
    129  
    130 msgid "Click here to see results." 
    131 msgstr "Cliquez ici pour voir les résultats." 
    132  
     16msgid "Please remove this plugin." 
     17msgstr "Veuillez désintaller cette extension." 
Note: See TracChangeset for help on using the changeset viewer.

Sites map