Changeset 1861
- Timestamp:
- 11/08/09 07:07:56 (13 years ago)
- Location:
- plugins/activityReport
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/activityReport/_define.php
r1744 r1861 17 17 /* Description*/ "Receive your blog activity by email", 18 18 /* Author */ "JC Denis", 19 /* Version */ '0. 5',19 /* Version */ '0.6', 20 20 /* Permissions */ 'admin', 21 /* Priority */ -1000000 00 //???21 /* Priority */ -1000000 22 22 ); 23 /* date */ #20091 02623 /* date */ #20091108 24 24 ?> -
plugins/activityReport/_prepend.php
r1744 r1861 25 25 'activityReport', 26 26 'reports', 27 '^reports/( atom|rss2)$',27 '^reports/((atom|rss2)/(.+))$', 28 28 array('activityReportPublicUrl','feed') 29 29 ); -
plugins/activityReport/_public.php
r1593 r1861 28 28 global $core, $_ctx; 29 29 30 if (!preg_match(' #^(atom|rss2)$#',$args,$m))30 if (!preg_match('/^(atom|rss2)\/(.+)$/',$args,$m)) 31 31 { 32 32 self::p404(); … … 43 43 } 44 44 $mime = $m[1] == 'atom' ? 'application/atom+xml' : 'application/xml'; 45 46 if (false === $core->activityReport->checkUserCode($m[2])) { 47 self::p404(); 48 return; 49 } 45 50 46 51 $_ctx->nb_entry_per_page = $core->blog->settings->nb_post_per_feed; -
plugins/activityReport/inc/class.activity.report.php
r1593 r1861 598 598 ); 599 599 600 $subject = mail::B64Header(__('Blog activity report')); 600 $subject = $this->_global ? 601 mail::B64Header(__('Blog activity report')) : 602 mail::B64Header('['.$this->core->blog->name.'] '.__('Blog activity report')); 601 603 602 604 $msg = … … 618 620 } 619 621 } 622 623 public function getUserCode() 624 { 625 $code = 626 pack('a32',$this->core->auth->userID()). 627 pack('H*',crypt::hmac(DC_MASTER_KEY,$this->core->auth->getInfo('user_pwd'))); 628 return bin2hex($code); 629 } 630 631 public function checkUserCode($code) 632 { 633 $code = pack('H*',$code); 634 635 $user_id = trim(@pack('a32',substr($code,0,32))); 636 $pwd = @unpack('H40hex',substr($code,32,40)); 637 638 if ($user_id === false || $pwd === false) { 639 return false; 640 } 641 642 $pwd = $pwd['hex']; 643 644 $strReq = 'SELECT user_id, user_pwd '. 645 'FROM '.$this->core->prefix.'user '. 646 "WHERE user_id = '".$this->core->con->escape($user_id)."' "; 647 648 $rs = $this->core->con->select($strReq); 649 650 if ($rs->isEmpty()) { 651 return false; 652 } 653 654 if (crypt::hmac(DC_MASTER_KEY,$rs->user_pwd) != $pwd) { 655 return false; 656 } 657 658 return $rs->user_id; 659 } 620 660 621 661 public static function encode($a) -
plugins/activityReport/inc/lib.activity.report.index.php
r1593 r1861 81 81 82 82 $bl = $O->getSetting('lastreport'); 83 $blog_last = !$bl ? __('never') : dt::str( '%Y-%m-%d %H:%M:%S',$bl,$core->blog->settings->blog_timezone);83 $blog_last = !$bl ? __('never') : dt::str($core->blog->settings->date_format.', '.$core->blog->settings->time_format,$bl,$core->auth->getInfo('user_tz')); 84 84 85 85 $bi = $O->getSetting('interval'); 86 $blog_next = !$bl ? __('on new activity') : dt::str( '%Y-%m-%d %H:%M:%S',$bl+$bi,$core->blog->settings->blog_timezone);86 $blog_next = !$bl ? __('on new activity') : dt::str($core->blog->settings->date_format.', '.$core->blog->settings->time_format,$bl+$bi,$core->auth->getInfo('user_tz')); 87 87 88 88 $emails = implode(';',$O->getSetting('mailinglist')); … … 90 90 ?> 91 91 <div class="multi-part" id="<?php echo $t; ?>_settings" title="<?php echo $title; ?>"> 92 93 <?php if (!$global) { ?> 94 92 95 <p><img alt=="<?php echo __('RSS feed'); ?>" src="index.php?pf=activityReport/inc/img/feed.png" /> 93 <a title="<?php echo __('RSS feed'); ?>" href="<?php echo $core->blog->url.$core->url->getBase('activityReport') ; ?>/rss2">96 <a title="<?php echo __('RSS feed'); ?>" href="<?php echo $core->blog->url.$core->url->getBase('activityReport').'/rss2/'.$O->getUserCode(); ?>"> 94 97 <?php echo __('Rss2 feed for activity on this blog'); ?></a> 95 98 <br /> 96 99 <img alt=="<?php echo __('Atom feed'); ?>" src="index.php?pf=activityReport/inc/img/feed.png" /> 97 <a title="<?php echo __('Atom feed'); ?>" href="<?php echo $core->blog->url.$core->url->getBase('activityReport') ; ?>/atom">100 <a title="<?php echo __('Atom feed'); ?>" href="<?php echo $core->blog->url.$core->url->getBase('activityReport').'/atom/'.$O->getUserCode(); ?>"> 98 101 <?php echo __('Atom feed for activity on this blog'); ?></a></p> 102 103 <?php } ?> 104 99 105 <form method="post" action="plugin.php"> 100 106 … … 284 290 ' offline' : ''; 285 291 $date = dt::str( 286 '%Y-%m-%d %H:%M:%S',292 $core->blog->settings->date_format.', '.$core->blog->settings->time_format, 287 293 strtotime($logs->activity_dt), 288 $core-> blog->settings->blog_timezone294 $core->auth->getInfo('user_tz') 289 295 ); 290 296 $action = $O->getGroups($logs->activity_group,$logs->activity_action); -
plugins/activityReport/locales/fr/main.lang.php
r1747 r1861 1 1 <?php 2 2 // Language: français 3 // Module: activityReport - 0. 54 // Date: 2009-1 0-26 05:41:323 // Module: activityReport - 0.6 4 // Date: 2009-11-08 06:03:10 5 5 // Translated with dcTranslater - 1.3 6 6 … … 66 66 67 67 #inc/class.activity.report.behaviors.php:133 68 $GLOBALS['__l10n']['A new trackback to "%" at "%s" was created on post "%s" at %s'] = 'Un nouveau rétrolien vers "%s" a été cré esur le billet "%s" à l\'adresse "%s"';68 $GLOBALS['__l10n']['A new trackback to "%" at "%s" was created on post "%s" at %s'] = 'Un nouveau rétrolien vers "%s" a été créé sur le billet "%s" à l\'adresse "%s"'; 69 69 70 70 #inc/class.activity.report.behaviors.php:141 … … 75 75 76 76 #inc/class.activity.report.behaviors.php:148 77 $GLOBALS['__l10n']['A new category called "%s" was created by "%s" at %s'] = 'Un nouvelle catégorie nommée "%s" a été cré epar "%s" à l\'adresse "%s"';77 $GLOBALS['__l10n']['A new category called "%s" was created by "%s" at %s'] = 'Un nouvelle catégorie nommée "%s" a été créé par "%s" à l\'adresse "%s"'; 78 78 79 79 #inc/class.activity.report.behaviors.php:157 … … 109 109 #inc/class.activity.report.php:413 110 110 #inc/class.activity.report.php:424 111 $GLOBALS['__l10n']['Period: from %s to %s'] = 'Période : du %s au %s';111 $GLOBALS['__l10n']['Period: from %s to %s'] = 'Période : Du %s au %s'; 112 112 113 113 #inc/class.activity.report.php:421 … … 120 120 $GLOBALS['__l10n']['Activity report module'] = 'Module de rapport d\'activité'; 121 121 122 #inc/class.activity.report.php:600 122 #inc/class.activity.report.php:601 123 #inc/class.activity.report.php:602 123 124 $GLOBALS['__l10n']['Blog activity report'] = 'Rapport d\'activité du blog'; 124 125 125 #inc/class.activity.report.php:60 3126 #inc/class.activity.report.php:605 126 127 $GLOBALS['__l10n']['You received a message from your blog\'s activity report module.'] = 'Vous recevez un message du module de rapport d\'activité de votre blog.'; 127 128 128 #inc/class.activity.report.php:61 5129 #inc/class.activity.report.php:617 129 130 $GLOBALS['__l10n']['Failed to send email notification'] = 'Impossible d\'envoyer le courrier électronique'; 130 131 … … 153 154 $GLOBALS['__l10n']['on new activity'] = 'lors d\'une nouvelle activité'; 154 155 155 #inc/lib.activity.report.index.php:9 2156 #inc/lib.activity.report.index.php:9 3156 #inc/lib.activity.report.index.php:95 157 #inc/lib.activity.report.index.php:96 157 158 $GLOBALS['__l10n']['RSS feed'] = 'Flux RSS'; 158 159 159 #inc/lib.activity.report.index.php:9 4160 #inc/lib.activity.report.index.php:97 160 161 $GLOBALS['__l10n']['Rss2 feed for activity on this blog'] = 'Flux Rss2 pour l\'activité de ce blog'; 161 162 162 #inc/lib.activity.report.index.php:9 6163 #inc/lib.activity.report.index.php: 97163 #inc/lib.activity.report.index.php:99 164 #inc/lib.activity.report.index.php:100 164 165 $GLOBALS['__l10n']['Atom feed'] = 'Flux Atom'; 165 166 166 #inc/lib.activity.report.index.php: 98167 #inc/lib.activity.report.index.php:101 167 168 $GLOBALS['__l10n']['Atom feed for activity on this blog'] = 'Flux Atom pour l\'activité de ce blog'; 168 169 169 #inc/lib.activity.report.index.php:10 1170 #inc/lib.activity.report.index.php:107 170 171 #index.php:41 171 172 $GLOBALS['__l10n']['Settings'] = 'Paramètres'; 172 173 173 #inc/lib.activity.report.index.php:1 07174 #inc/lib.activity.report.index.php:113 174 175 $GLOBALS['__l10n']['Enable super administrator report'] = 'Autoriser le rapport de super administrateur'; 175 176 176 #inc/lib.activity.report.index.php:1 08177 #inc/lib.activity.report.index.php:114 177 178 $GLOBALS['__l10n']['Enable report on this blog'] = 'Autoriser le rapport sur ce blog'; 178 179 179 #inc/lib.activity.report.index.php:12 0180 #inc/lib.activity.report.index.php:126 180 181 $GLOBALS['__l10n']['Add activity report on dashboard items'] = 'Ajouter le rapport d\'activité au tableau de bord'; 181 182 182 #inc/lib.activity.report.index.php:1 27183 #inc/lib.activity.report.index.php:133 183 184 $GLOBALS['__l10n']['Send report:'] = 'Rapport envoyé :'; 184 185 185 #inc/lib.activity.report.index.php:13 1186 #inc/lib.activity.report.index.php:137 186 187 $GLOBALS['__l10n']['Recipients:'] = 'Destinataires :'; 187 188 188 #inc/lib.activity.report.index.php:1 34189 $GLOBALS['__l10n']['Separate multiple email addresses with a semicolon ";"'] = 'S eparer les adresses email par un point-virgule ";"';190 191 #inc/lib.activity.report.index.php:1 37189 #inc/lib.activity.report.index.php:140 190 $GLOBALS['__l10n']['Separate multiple email addresses with a semicolon ";"'] = 'Séparer les adresses email par un point-virgule ";"'; 191 192 #inc/lib.activity.report.index.php:143 192 193 $GLOBALS['__l10n']['Last report by email:'] = 'Dernier rapport par email :'; 193 194 194 #inc/lib.activity.report.index.php:1 38195 #inc/lib.activity.report.index.php:144 195 196 $GLOBALS['__l10n']['Next report by email:'] = 'Prochain rapport par email :'; 196 197 197 #inc/lib.activity.report.index.php:1 77198 #inc/lib.activity.report.index.php:183 198 199 $GLOBALS['__l10n']['Report'] = 'Rapport'; 199 200 200 #inc/lib.activity.report.index.php:2 18201 #inc/lib.activity.report.index.php:224 201 202 $GLOBALS['__l10n']['Send report by email now'] = 'Envoyer un rapport par email maintenant'; 202 203 203 #inc/lib.activity.report.index.php:2 24204 #inc/lib.activity.report.index.php:230 204 205 $GLOBALS['__l10n']['Delete all logs'] = 'Supprimer tous les enregistrements'; 205 206 206 #inc/lib.activity.report.index.php:26 1207 #inc/lib.activity.report.index.php:267 207 208 $GLOBALS['__l10n']['No log'] = 'Pas d\'enregistrement'; 208 209 209 #inc/lib.activity.report.index.php:27 1210 #inc/lib.activity.report.index.php:277 210 211 $GLOBALS['__l10n']['Message'] = 'Message'; 211 212 -
plugins/activityReport/locales/fr/main.po
r1747 r1861 1 1 # Language: français 2 # Module: activityReport - 0. 53 # Date: 2009-1 0-26 05:41:322 # Module: activityReport - 0.6 3 # Date: 2009-11-08 06:03:11 4 4 # Translated with translater 1.3 5 5 … … 7 7 msgstr "" 8 8 "Content-Type: text/plain; charset=UTF-8\n" 9 "Project-Id-Version: activityReport 0. 5\n"9 "Project-Id-Version: activityReport 0.6\n" 10 10 "POT-Creation-Date: \n" 11 "PO-Revision-Date: 2009-1 0-26T05:41:32+00:00\n"11 "PO-Revision-Date: 2009-11-08T06:03:11+00:00\n" 12 12 "Last-Translator: JC Denis\n" 13 13 "Language-Team: \n" … … 96 96 #: inc/class.activity.report.behaviors.php:133 97 97 msgid "A new trackback to \"%\" at \"%s\" was created on post \"%s\" at %s" 98 msgstr "Un nouveau rétrolien vers \"%s\" a été cré esur le billet \"%s\" à l'adresse \"%s\""98 msgstr "Un nouveau rétrolien vers \"%s\" a été créé sur le billet \"%s\" à l'adresse \"%s\"" 99 99 100 100 #: inc/class.activity.report.behaviors.php:141 … … 108 108 #: inc/class.activity.report.behaviors.php:148 109 109 msgid "A new category called \"%s\" was created by \"%s\" at %s" 110 msgstr "Un nouvelle catégorie nommée \"%s\" a été cré epar \"%s\" à l'adresse \"%s\""110 msgstr "Un nouvelle catégorie nommée \"%s\" a été créé par \"%s\" à l'adresse \"%s\"" 111 111 112 112 #: inc/class.activity.report.behaviors.php:157 … … 153 153 #: inc/class.activity.report.php:424 154 154 msgid "Period: from %s to %s" 155 msgstr "Période : du %s au %s"155 msgstr "Période : Du %s au %s" 156 156 157 157 #: inc/class.activity.report.php:421 … … 167 167 msgstr "Module de rapport d'activité" 168 168 169 #: inc/class.activity.report.php:600 169 #: inc/class.activity.report.php:601 170 #: inc/class.activity.report.php:602 170 171 msgid "Blog activity report" 171 172 msgstr "Rapport d'activité du blog" 172 173 173 #: inc/class.activity.report.php:60 3174 #: inc/class.activity.report.php:605 174 175 msgid "You received a message from your blog's activity report module." 175 176 msgstr "Vous recevez un message du module de rapport d'activité de votre blog." 176 177 177 #: inc/class.activity.report.php:61 5178 #: inc/class.activity.report.php:617 178 179 msgid "Failed to send email notification" 179 180 msgstr "Impossible d'envoyer le courrier électronique" … … 211 212 msgstr "lors d'une nouvelle activité" 212 213 213 #: inc/lib.activity.report.index.php:9 2214 #: inc/lib.activity.report.index.php:9 3214 #: inc/lib.activity.report.index.php:95 215 #: inc/lib.activity.report.index.php:96 215 216 msgid "RSS feed" 216 217 msgstr "Flux RSS" 217 218 218 #: inc/lib.activity.report.index.php:9 4219 #: inc/lib.activity.report.index.php:97 219 220 msgid "Rss2 feed for activity on this blog" 220 221 msgstr "Flux Rss2 pour l'activité de ce blog" 221 222 222 #: inc/lib.activity.report.index.php:9 6223 #: inc/lib.activity.report.index.php: 97223 #: inc/lib.activity.report.index.php:99 224 #: inc/lib.activity.report.index.php:100 224 225 msgid "Atom feed" 225 226 msgstr "Flux Atom" 226 227 227 #: inc/lib.activity.report.index.php: 98228 #: inc/lib.activity.report.index.php:101 228 229 msgid "Atom feed for activity on this blog" 229 230 msgstr "Flux Atom pour l'activité de ce blog" 230 231 231 #: inc/lib.activity.report.index.php:10 1232 #: inc/lib.activity.report.index.php:107 232 233 #: index.php:41 233 234 msgid "Settings" 234 235 msgstr "Paramètres" 235 236 236 #: inc/lib.activity.report.index.php:1 07237 #: inc/lib.activity.report.index.php:113 237 238 msgid "Enable super administrator report" 238 239 msgstr "Autoriser le rapport de super administrateur" 239 240 240 #: inc/lib.activity.report.index.php:1 08241 #: inc/lib.activity.report.index.php:114 241 242 msgid "Enable report on this blog" 242 243 msgstr "Autoriser le rapport sur ce blog" 243 244 244 #: inc/lib.activity.report.index.php:12 0245 #: inc/lib.activity.report.index.php:126 245 246 msgid "Add activity report on dashboard items" 246 247 msgstr "Ajouter le rapport d'activité au tableau de bord" 247 248 248 #: inc/lib.activity.report.index.php:1 27249 #: inc/lib.activity.report.index.php:133 249 250 msgid "Send report:" 250 251 msgstr "Rapport envoyé :" 251 252 252 #: inc/lib.activity.report.index.php:13 1253 #: inc/lib.activity.report.index.php:137 253 254 msgid "Recipients:" 254 255 msgstr "Destinataires :" 255 256 256 #: inc/lib.activity.report.index.php:1 34257 #: inc/lib.activity.report.index.php:140 257 258 msgid "Separate multiple email addresses with a semicolon \";\"" 258 msgstr "S eparer les adresses email par un point-virgule \";\""259 260 #: inc/lib.activity.report.index.php:1 37259 msgstr "Séparer les adresses email par un point-virgule \";\"" 260 261 #: inc/lib.activity.report.index.php:143 261 262 msgid "Last report by email:" 262 263 msgstr "Dernier rapport par email :" 263 264 264 #: inc/lib.activity.report.index.php:1 38265 #: inc/lib.activity.report.index.php:144 265 266 msgid "Next report by email:" 266 267 msgstr "Prochain rapport par email :" 267 268 268 #: inc/lib.activity.report.index.php:1 77269 #: inc/lib.activity.report.index.php:183 269 270 msgid "Report" 270 271 msgstr "Rapport" 271 272 272 #: inc/lib.activity.report.index.php:2 18273 #: inc/lib.activity.report.index.php:224 273 274 msgid "Send report by email now" 274 275 msgstr "Envoyer un rapport par email maintenant" 275 276 276 #: inc/lib.activity.report.index.php:2 24277 #: inc/lib.activity.report.index.php:230 277 278 msgid "Delete all logs" 278 279 msgstr "Supprimer tous les enregistrements" 279 280 280 #: inc/lib.activity.report.index.php:26 1281 #: inc/lib.activity.report.index.php:267 281 282 msgid "No log" 282 283 msgstr "Pas d'enregistrement" 283 284 284 #: inc/lib.activity.report.index.php:27 1285 #: inc/lib.activity.report.index.php:277 285 286 msgid "Message" 286 287 msgstr "Message" -
plugins/activityReport/release.txt
r1744 r1861 1 0.6 20091108 2 * Fixed date display (closes #340) 3 * Fixed RSS 'protection' (closes #339) 4 * Added blog name to mail subject 5 1 6 0.5 20091026 2 7 * Changed priority to -1000000 in order to work ?!
Note: See TracChangeset
for help on using the changeset viewer.