Changeset 1519
- Timestamp:
- 09/27/09 22:13:53 (14 years ago)
- Location:
- plugins/activityReport
- Files:
-
- 7 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/activityReport/_admin.php
r1457 r1519 21 21 $core->auth->check('admin',$core->blog->id) 22 22 ); 23 24 # Dashboarditems 25 if ($core->activityReport->getSetting('dashboardItem')) 26 { 27 $core->addBehavior( 28 'adminDashboardHeaders', 29 array('activityReportBehaviors','dashboardHeaders') 30 ); 31 $core->addBehavior( 32 'adminDashboardItems', 33 array('activityReportBehaviors','dashboardItems') 34 ); 35 } 36 37 class activityReportAdmin 38 { 39 # Add CSS to dashboardHeaders for items 40 public static function dashboardHeaders() 41 { 42 return 43 "\n<!-- CSS for activityReport --> \n". 44 "<style type=\"text/css\"> \n". 45 "#dashboard-items #report dt { font-weight: bold; margin: 0 0 0.4em 0; } \n". 46 "#dashboard-items #report dd { font-size: 0.9em; margin: 0 0 1em 0; } \n". 47 "#dashboard-items #report dd p { margin: 0.2em 0 0 0; } \n". 48 "</style> \n"; 49 } 50 51 # Add report to dashboardItems 52 public static function dashboardItems($core, $__dashboard_items) 53 { 54 $r = $core->activityReport->getSetting('requests'); 55 $g = $core->activityReport->getGroups(); 56 57 $p = array(); 58 $p['limit'] = 20; 59 $p['order'] = 'activity_dt DESC'; 60 $p['sql'] = $core->activityReport->requests2params($r); 61 62 $rs = $core->activityReport->getLogs($p); 63 if (!$rs->isEmpty()) 64 { 65 $res = ''; 66 while($rs->fetch()) 67 { 68 $group = $rs->activity_group; 69 70 $res .= 71 '<dd><p title="'.__($g[$group]['title']).'"><strong>'. 72 __($g[$group]['actions'][$rs->activity_action]['title']). 73 '</p></strong><em>'. 74 vsprintf( 75 __($g[$group]['actions'][$rs->activity_action]['msg']), 76 $core->activityReport->decode($rs->activity_logs) 77 ). 78 '</em></dd>'; 79 } 80 81 if (!empty($res)) 82 { 83 $__dashboard_items[1][] = 84 '<h3>'.__('Activity report').'</h3>'. 85 '<dl id="report">'.$res.'</dl>'; 86 } 87 } 88 } 89 } 23 90 ?> -
plugins/activityReport/_define.php
r1457 r1519 17 17 /* Description*/ "Recieve your blog activity by email", 18 18 /* Author */ "JC Denis", 19 /* Version */ '0.2', 20 /* Permissions */ 'admin' 19 /* Version */ '0.3', 20 /* Permissions */ 'admin', 21 /* Priority */ 100000 21 22 ); 22 /* date */ #200909 1523 /* date */ #20090927 23 24 ?> -
plugins/activityReport/_prepend.php
r1457 r1519 18 18 dirname(__FILE__).'/inc/class.activity.report.php'; 19 19 20 $__autoload['activityReportAdmin'] =21 dirname(__FILE__).'/inc/class.activity.report.php';22 23 20 try 24 21 { 25 22 $core->activityReport = new activityReport($core); 23 24 $core->url->register( 25 'activityReport', 26 'reports', 27 '^reports/(atom|rss2)$', 28 array('activityReportPublicUrl','feed') 29 ); 30 31 require_once dirname(__FILE__).'/inc/class.activity.report.behaviors.php'; 26 32 } 27 catch (Exception $e) 28 { 29 // 30 } 31 32 require_once dirname(__FILE__).'/inc/class.activity.report.behaviors.php'; 33 catch (Exception $e) {} 33 34 ?> -
plugins/activityReport/inc/class.activity.report.behaviors.php
r1459 r1519 201 201 class activityReportBehaviors 202 202 { 203 # Add CSS to dashboardHeaders for items204 public static function dashboardHeaders()205 {206 return207 "\n<!-- CSS for activityReport --> \n".208 "<style type=\"text/css\"> \n".209 "#dashboard-items #report dt { font-weight: bold; margin: 0 0 0.4em 0; } \n".210 "#dashboard-items #report dd { font-size: 0.9em; margin: 0 0 1em 0; } \n".211 "#dashboard-items #report dd p { margin: 0.2em 0 0 0; } \n".212 "</style> \n";213 }214 215 # Add report to dashboardItems216 public static function dashboardItems($core, $__dashboard_items)217 {218 $r = $core->activityReport->getSetting('requests');219 $g = $core->activityReport->getGroups();220 221 $p = array();222 $p['limit'] = 20;223 $p['order'] = 'activity_dt DESC';224 $p['sql'] = $core->activityReport->requests2params($r);225 226 $rs = $core->activityReport->getLogs($p);227 if (!$rs->isEmpty())228 {229 $res = '';230 while($rs->fetch())231 {232 $group = $rs->activity_group;233 234 $res .=235 '<dd><p title="'.__($g[$group]['title']).'"><strong>'.236 __($g[$group]['actions'][$rs->activity_action]['title']).237 '</p></strong><em>'.238 vsprintf(239 __($g[$group]['actions'][$rs->activity_action]['msg']),240 $core->activityReport->decode($rs->activity_logs)241 ).242 '</em></dd>';243 }244 245 if (!empty($res))246 {247 $__dashboard_items[1][] =248 '<h3>'.__('Activity report').'</h3>'.249 '<dl id="report">'.$res.'</dl>';250 }251 }252 }253 254 203 public static function blogUpdate($cur,$blog_id) 255 204 { -
plugins/activityReport/inc/class.activity.report.php
r1457 r1519 251 251 $r .= 'AND E.blog_id'.$this->con->in($p['blog_id']); 252 252 } 253 else if (!empty($p['blog_id']))253 else 254 254 { 255 255 $r .= "AND E.blog_id = '".$this->con->escape($p['blog_id'])."' "; … … 425 425 dt::str('%Y-%m-%d %H:%M:%S', 426 426 $from, 427 $ core->blog->settings->blog_timezone427 $this->core->blog->settings->blog_timezone 428 428 ), 429 429 dt::str( 430 430 '%Y-%m-%d %H:%M:%S', 431 431 $to, 432 $ core->blog->settings->blog_timezone432 $this->core->blog->settings->blog_timezone 433 433 ) 434 434 )."\n"; -
plugins/activityReport/inc/lib.activity.report.index.php
r1457 r1519 90 90 ?> 91 91 <div class="multi-part" id="<?php echo $t; ?>_settings" title="<?php echo $title; ?>"> 92 <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"> 94 <?php echo __('Rss2 feed for activity on this blog'); ?></a> 95 <br /> 96 <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"> 98 <?php echo __('Atom feed for activity on this blog'); ?></a></p> 92 99 <form method="post" action="plugin.php"> 93 100 -
plugins/activityReport/locales/fr/main.lang.php
r1457 r1519 1 1 <?php 2 2 // Language: français 3 // Module: activityReport - 0. 24 // Date: 2009-09- 14 23:00:373 // Module: activityReport - 0.3 4 // Date: 2009-09-27 20:10:03 5 5 // Author: , jcdenis@gdwd.com 6 // Translated with dcTranslater - 0.2. 46 // Translated with dcTranslater - 0.2.5 7 7 8 8 #index.php:37 … … 147 147 $GLOBALS['__l10n']['on new activity'] = 'lors d\'une nouvelle activité'; 148 148 149 #inc/lib.activity.report.index.php:93 150 $GLOBALS['__l10n']['RSS feed'] = 'Flux RSS'; 151 152 #inc/lib.activity.report.index.php:94 153 $GLOBALS['__l10n']['Rss2 feed for activity on this blog'] = 'Flux Rss2 pour l\'activité de ce blog'; 154 155 #inc/lib.activity.report.index.php:97 156 $GLOBALS['__l10n']['Atom feed'] = 'Flux Atom'; 157 158 #inc/lib.activity.report.index.php:98 159 $GLOBALS['__l10n']['Atom feed for activity on this blog'] = 'Flux Atom pour l\'activité de ce blog'; 160 149 161 #index.php:41 150 162 $GLOBALS['__l10n']['Settings'] = 'Paramètres'; 151 163 152 #inc/lib.activity.report.index.php:10 0164 #inc/lib.activity.report.index.php:107 153 165 $GLOBALS['__l10n']['Enable super administrator report'] = 'Autoriser le rapport de super administrateur'; 154 166 155 #inc/lib.activity.report.index.php:10 1167 #inc/lib.activity.report.index.php:108 156 168 $GLOBALS['__l10n']['Enable report on this blog'] = 'Autoriser le rapport sur ce blog'; 157 169 158 #inc/lib.activity.report.index.php:1 13170 #inc/lib.activity.report.index.php:120 159 171 $GLOBALS['__l10n']['Add activity report on dashboard items'] = 'Ajouter le rapport d\'activité au tableau de bord'; 160 172 161 #inc/lib.activity.report.index.php:12 0173 #inc/lib.activity.report.index.php:127 162 174 $GLOBALS['__l10n']['Send report:'] = 'Rapport envoyé :'; 163 175 164 #inc/lib.activity.report.index.php:1 24176 #inc/lib.activity.report.index.php:131 165 177 $GLOBALS['__l10n']['Recipients:'] = 'Destinataires :'; 166 178 167 #inc/lib.activity.report.index.php:1 27179 #inc/lib.activity.report.index.php:134 168 180 $GLOBALS['__l10n']['Separate multiple email addresses with a semicolon ";"'] = 'Séparer les adresses multiples par un point-virgule ";"'; 169 181 170 #inc/lib.activity.report.index.php:13 0182 #inc/lib.activity.report.index.php:137 171 183 $GLOBALS['__l10n']['Last report by email:'] = 'Dernier rapport par email :'; 172 184 173 #inc/lib.activity.report.index.php:13 1185 #inc/lib.activity.report.index.php:138 174 186 $GLOBALS['__l10n']['Next report by email:'] = 'Prochain rapport par email :'; 175 187 176 #inc/lib.activity.report.index.php:17 0188 #inc/lib.activity.report.index.php:177 177 189 $GLOBALS['__l10n']['Report'] = 'Rapport'; 178 190 179 #inc/lib.activity.report.index.php:21 1191 #inc/lib.activity.report.index.php:218 180 192 $GLOBALS['__l10n']['Send report by email now'] = 'Envoyer un rapport par email maintenant'; 181 193 182 #inc/lib.activity.report.index.php:2 17194 #inc/lib.activity.report.index.php:224 183 195 $GLOBALS['__l10n']['Delete all logs'] = 'Supprimer tous les enregistrements'; 184 196 185 #inc/lib.activity.report.index.php:2 54197 #inc/lib.activity.report.index.php:261 186 198 $GLOBALS['__l10n']['No log'] = 'Pas d\'enregistrement'; 187 199 188 #inc/lib.activity.report.index.php:2 64200 #inc/lib.activity.report.index.php:271 189 201 $GLOBALS['__l10n']['Message'] = 'Message'; 190 202 -
plugins/activityReport/locales/fr/main.po
r1457 r1519 1 1 # Language: français 2 # Module: activityReport - 0. 23 # Date: 2009-09- 14 23:00:372 # Module: activityReport - 0.3 3 # Date: 2009-09-27 20:10:03 4 4 # Author: , jcdenis@gdwd.com 5 # Translated with dcTranslater - 0.2. 45 # Translated with dcTranslater - 0.2.5 6 6 7 7 msgid "" … … 196 196 msgstr "lors d'une nouvelle activité" 197 197 198 #: inc/lib.activity.report.index.php:93 199 msgid "RSS feed" 200 msgstr "Flux RSS" 201 202 #: inc/lib.activity.report.index.php:94 203 msgid "Rss2 feed for activity on this blog" 204 msgstr "Flux Rss2 pour l'activité de ce blog" 205 206 #: inc/lib.activity.report.index.php:97 207 msgid "Atom feed" 208 msgstr "Flux Atom" 209 210 #: inc/lib.activity.report.index.php:98 211 msgid "Atom feed for activity on this blog" 212 msgstr "Flux Atom pour l'activité de ce blog" 213 198 214 #: index.php:41 199 215 msgid "Settings" 200 216 msgstr "Paramètres" 201 217 202 #: inc/lib.activity.report.index.php:10 0218 #: inc/lib.activity.report.index.php:107 203 219 msgid "Enable super administrator report" 204 220 msgstr "Autoriser le rapport de super administrateur" 205 221 206 #: inc/lib.activity.report.index.php:10 1222 #: inc/lib.activity.report.index.php:108 207 223 msgid "Enable report on this blog" 208 224 msgstr "Autoriser le rapport sur ce blog" 209 225 210 #: inc/lib.activity.report.index.php:1 13226 #: inc/lib.activity.report.index.php:120 211 227 msgid "Add activity report on dashboard items" 212 228 msgstr "Ajouter le rapport d'activité au tableau de bord" 213 229 214 #: inc/lib.activity.report.index.php:12 0230 #: inc/lib.activity.report.index.php:127 215 231 msgid "Send report:" 216 232 msgstr "Rapport envoyé :" 217 233 218 #: inc/lib.activity.report.index.php:1 24234 #: inc/lib.activity.report.index.php:131 219 235 msgid "Recipients:" 220 236 msgstr "Destinataires :" 221 237 222 #: inc/lib.activity.report.index.php:1 27238 #: inc/lib.activity.report.index.php:134 223 239 msgid "Separate multiple email addresses with a semicolon ";"" 224 240 msgstr "Séparer les adresses multiples par un point-virgule \";\"" 225 241 226 #: inc/lib.activity.report.index.php:13 0242 #: inc/lib.activity.report.index.php:137 227 243 msgid "Last report by email:" 228 244 msgstr "Dernier rapport par email :" 229 245 230 #: inc/lib.activity.report.index.php:13 1246 #: inc/lib.activity.report.index.php:138 231 247 msgid "Next report by email:" 232 248 msgstr "Prochain rapport par email :" 233 249 234 #: inc/lib.activity.report.index.php:17 0250 #: inc/lib.activity.report.index.php:177 235 251 msgid "Report" 236 252 msgstr "Rapport" 237 253 238 #: inc/lib.activity.report.index.php:21 1254 #: inc/lib.activity.report.index.php:218 239 255 msgid "Send report by email now" 240 256 msgstr "Envoyer un rapport par email maintenant" 241 257 242 #: inc/lib.activity.report.index.php:2 17258 #: inc/lib.activity.report.index.php:224 243 259 msgid "Delete all logs" 244 260 msgstr "Supprimer tous les enregistrements" 245 261 246 #: inc/lib.activity.report.index.php:2 54262 #: inc/lib.activity.report.index.php:261 247 263 msgid "No log" 248 264 msgstr "Pas d'enregistrement" 249 265 250 #: inc/lib.activity.report.index.php:2 64266 #: inc/lib.activity.report.index.php:271 251 267 msgid "Message" 252 268 msgstr "Message" -
plugins/activityReport/release.txt
r1457 r1519 1 0.3 20090927 2 * Added atom/rss2 feeds 3 * Moved some class 4 1 5 0.2 20090915 2 6 * First public release
Note: See TracChangeset
for help on using the changeset viewer.