Changeset 14641

Show
Ignore:
Timestamp:
06/28/07 08:04:28 (1 year ago)
Author:
GamerZ
Message:

NEW: Uses WP-Stats Filter To Add Stats Into WP-Stats Page

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wp-polls/trunk/polls/polls.php

    r14411 r14641  
    11441144 
    11451145 
     1146### Function: Plug Into WP-Stats 
     1147if(strpos(get_option('stats_url'), $_SERVER['REQUEST_URI']) || strpos($_SERVER['REQUEST_URI'], 'stats-options.php')) { 
     1148      add_filter('wp_stats_page_admin_plugins', 'polls_page_admin_general_stats'); 
     1149      add_filter('wp_stats_page_plugins', 'polls_page_general_stats'); 
     1150} 
     1151 
     1152 
     1153### Function: Add WP-Polls General Stats To WP-Stats Page Options 
     1154function polls_page_admin_general_stats($content) { 
     1155      $stats_display = get_option('stats_display'); 
     1156      if($stats_display['polls'] == 1) { 
     1157            $content .= '<input type="checkbox" name="stats_display[]" value="polls" checked="checked" />&nbsp;&nbsp;'.__('WP-Polls', 'wp-polls').'<br />'."\n"; 
     1158      } else { 
     1159            $content .= '<input type="checkbox" name="stats_display[]" value="polls" />&nbsp;&nbsp;'.__('WP-Polls', 'wp-polls').'<br />'."\n"; 
     1160      } 
     1161      return $content; 
     1162} 
     1163 
     1164 
     1165### Function: Add WP-Polls General Stats To WP-Stats Page 
     1166function polls_page_general_stats($content) { 
     1167      $stats_display = get_option('stats_display'); 
     1168      if($stats_display['polls'] == 1) { 
     1169            $content .= '<p><strong>'.__('WP-Polls', 'wp-polls').'</strong></p>'."\n"; 
     1170            $content .= '<ul>'."\n"; 
     1171            $content .= '<li><strong>'.get_pollquestions(false).'</strong> '.__('Polls Were Created.', 'wp-polls').'</li>'."\n"; 
     1172            $content .= '<li><strong>'.get_pollanswers(false).'</strong> '.__('Polls\' Answers Were Given.', 'wp-polls').'</li>'."\n"; 
     1173            $content .= '<li><strong>'.get_pollvotes(false).'</strong> '.__('Votes Were Casted.', 'wp-polls').'</li>'."\n"; 
     1174            $content .= '</ul>'."\n"; 
     1175      } 
     1176      return $content; 
     1177} 
     1178 
     1179 
    11461180### Function: Create Poll Tables 
    11471181add_action('activate_polls/polls.php', 'create_poll_table'); 
  • wp-polls/trunk/polls/wp-polls.pot

    r14478 r14641  
    33"Project-Id-Version: WP-Polls 2.21\n" 
    44"POT-Creation-Date: \n" 
    5 "PO-Revision-Date: 2007-06-25 00:11+0800\n" 
     5"PO-Revision-Date: 2007-06-28 16:04+0800\n" 
    66"Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n" 
    77"Language-Team: Ravan <ravanhagen@gmail.com>\n" 
     
    556556#: polls-templates.php:116 
    557557#: polls-templates.php:119 
    558 #: polls.php:1212 
    559 #: polls.php:1215 
     558#: polls.php:1246 
     559#: polls.php:1249 
    560560msgid "Total Voters" 
    561561msgstr "" 
     
    793793#: polls-templates.php:110 
    794794#: polls-templates.php:113 
    795 #: polls.php:1209 
    796 #: polls.php:1210 
     795#: polls.php:1243 
     796#: polls.php:1244 
    797797msgid "Votes" 
    798798msgstr "" 
     
    982982#: polls-templates.php:104 
    983983#: polls-templates.php:119 
    984 #: polls.php:1203 
    985 #: polls.php:1216 
     984#: polls.php:1237 
     985#: polls.php:1250 
    986986msgid "Vote" 
    987987msgstr "" 
    988988 
    989989#: polls-templates.php:104 
    990 #: polls.php:1204 
     990#: polls.php:1238 
    991991msgid "View Results Of This Poll" 
    992992msgstr "" 
    993993 
    994994#: polls-templates.php:104 
    995 #: polls.php:1204 
     995#: polls.php:1238 
    996996msgid "View Results" 
    997997msgstr "" 
    998998 
    999999#: polls-templates.php:113 
    1000 #: polls.php:1210 
     1000#: polls.php:1244 
    10011001msgid "You Have Voted For This Choice" 
    10021002msgstr "" 
    10031003 
    10041004#: polls-templates.php:119 
    1005 #: polls.php:1216 
     1005#: polls.php:1250 
    10061006msgid "Vote For This Poll" 
    10071007msgstr "" 
     
    10091009#: polls-templates.php:122 
    10101010#: polls-usage.php:80 
    1011 #: polls.php:1243 
     1011#: polls.php:1277 
    10121012msgid "Polls Archive" 
    10131013msgstr "" 
     
    10221022 
    10231023#: polls-templates.php:131 
    1024 #: polls.php:1218 
     1024#: polls.php:1252 
    10251025msgid "Sorry, there are no polls available at the moment." 
    10261026msgstr "" 
    10271027 
    10281028#: polls-templates.php:134 
    1029 #: polls.php:1219 
     1029#: polls.php:1253 
    10301030msgid "An error has occurred when processing your poll." 
    10311031msgstr "" 
     
    15401540msgstr "" 
    15411541 
    1542 #: polls.php:1187 
     1542#: polls.php:1157 
     1543#: polls.php:1159 
     1544#: polls.php:1169 
     1545msgid "WP-Polls" 
     1546msgstr "" 
     1547 
     1548#: polls.php:1171 
     1549msgid "Polls Were Created." 
     1550msgstr "" 
     1551 
     1552#: polls.php:1172 
     1553msgid "Polls' Answers Were Given." 
     1554msgstr "" 
     1555 
     1556#: polls.php:1173 
     1557msgid "Votes Were Casted." 
     1558msgstr "" 
     1559 
     1560#: polls.php:1221 
    15431561msgid "How Is My Site?" 
    15441562msgstr "" 
    15451563 
    1546 #: polls.php:1190 
     1564#: polls.php:1224 
    15471565msgid "Good" 
    15481566msgstr "" 
    15491567 
    1550 #: polls.php:1191 
     1568#: polls.php:1225 
    15511569msgid "Excellent" 
    15521570msgstr "" 
    15531571 
    1554 #: polls.php:1192 
     1572#: polls.php:1226 
    15551573msgid "Bad" 
    15561574msgstr "" 
    15571575 
    1558 #: polls.php:1193 
     1576#: polls.php:1227 
    15591577msgid "Can Be Improved" 
    15601578msgstr "" 
    15611579 
    1562 #: polls.php:1194 
     1580#: polls.php:1228 
    15631581msgid "No Comments" 
    15641582msgstr "" 
  • wp-polls/trunk/readme.html

    r14411 r14641  
    295295                              <strong>Version 2.21 (01-10-2007)</strong> 
    296296                              <ul> 
     297                                    <li>NEW: Uses WP-Stats Filter To Add Stats Into WP-Stats Page</li> 
    297298                                    <li>FIXED: Some Text Not Translated In Polls Widget</li> 
    298299                                    <li>FIXED: 2 Wrong Options Name In Polls Uninstall</li>