Changeset 36798

Show
Ignore:
Timestamp:
03/30/08 08:42:57 (3 months ago)
Author:
GamerZ
Message:

Added ShortCode? API

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wp-polls/trunk/polls-admin-js-packed.js

    r35511 r36798  
    1 eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('o 1=1x 1n(1d);o e=0;o u=0;o A=0;4 K(){2.3(\'8\').7.6="f";Y("S()",R)}4 S(){2.3("1j").W(2.3("w-"+e))}4 1a(a,b){E=k(b);9(E){e=a;1.l();1.5("n",1w);1.5("p",a);1.g=\'i\';1.j=\'8\';1.m=K;1.h()}}4 M(){2.3(\'8\').7.6="f";2.3("N").s=12}4 1h(a){r=k(a);9(r){9(2.3("t").J==I){1.l();1.5("n",19);1.5("t","H");1.g=\'i\';1.j=\'8\';1.m=M;1.h()}z{G(18)}}}4 F(){2.3(\'8\').7.6="f";2.3("N").s=12;2.3("17").7.6=\'y\';2.3("16").7.6=\'f\'}4 15(a,b){r=k(b);9(r){9(2.3("t").J==I){e=a;1.l();1.5("n",14);1.5("t","H");1.5("p",a);1.g=\'i\';1.j=\'8\';1.m=F;1.h()}z{G(13)}}}4 D(){2.3(\'8\').7.6="f";Y("C()",R);2.3(\'x\').s=(q(2.3(\'x\').s)-q(A));x=q(2.3(\'11\').B);10=q(2.3("1v-"+u).B);v=(x-10);9(v<0){v=0}2.3(\'11\').B=q(v)}4 C(){2.3("1t").W(2.3("w-1s-"+u))}4 1r(a,b,c,d){X=k(d);9(X){e=a;u=b;A=c;1.l();1.5("n",1q);1.5("p",a);1.5("1o",b);1.g=\'i\';1.j=\'8\';1.m=D;1.h()}}4 V(){2.3(\'8\').7.6="f";2.3("U").7.6="y";2.3("T").7.6="L"}4 1m(a,b){Q=k(b);9(Q){e=a;1.l();1.5("n",1l);1.5("p",a);1.g=\'i\';1.j=\'8\';1.m=V;1.h()}}4 P(){2.3(\'8\').7.6="f";2.3("U").7.6="L";2.3("T").7.6="y"}4 1k(a,b){O=k(b);9(O){e=a;1.l();1.5("n",1i);1.5("p",a);1.g=\'i\';1.j=\'8\';1.m=P;1.h()}}4 1p(a,b){o c=Z(1g);1f(1e(c)){c=Z(1u)}9(c>0){9(a==\'1c\'){1b(b,\'[w=\'+c+\']\')}z{1y\'[w=\'+c+\']\'}}}',62,97,'|polls_admin|document|getElementById|function|setVar|display|style|message|if|||||global_poll_id|block|method|runAJAX|POST|element|confirm|reset|onCompletion|do|var|pollq_id|parseInt|delete_poll_logs_confirm|innerHTML|delete_logs_yes|global_poll_aid|poll_total_votes_new|poll|poll_total_votes|none|else|global_poll_aid_votes|value|remove_poll_ans|delete_poll_ans_message|delete_poll_confirm|delete_this_poll_logs_message|alert|yes|true|checked|delete_poll_message|inline|delete_poll_logs_message|poll_logs|close_poll_confirm|closing_poll_message|open_poll_confirm|1000|remove_poll|close_poll|open_poll|opening_poll_message|removeChild|delete_poll_ans_confirm|setTimeout|prompt|poll_answer_vote|pollq_totalvotes|polls_admin_text_no_poll_logs|polls_admin_text_checkbox_delete_poll_logs|polls_admin_text_delete_poll_logs|delete_this_poll_logs|poll_logs_display_none|poll_logs_display|polls_admin_text_checkbox_delete_all_logs|polls_admin_text_delete_all_logs|delete_poll|edInsertContent|code|polls_admin_ajax_url|isNaN|while|polls_admin_text_enter_poll_id|delete_poll_logs|polls_admin_text_close_poll|manage_polls|closing_poll|polls_admin_text_open_poll|opening_poll|sack|polla_aid|insertPoll|polls_admin_text_delete_poll_ans|delete_poll_ans|answer|poll_answers|polls_admin_text_enter_poll_id_again|polla_votes|polls_admin_text_delete_poll|new|return'.split('|'),0,{})) 
     1eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('o 1=14 15(16);o e=0;o r=0;o y=0;4 C(){2.3(\'6\').7.8="f";D("E()",F)}4 E(){2.3("17").G(2.3("s-"+e))}4 18(a,b){H=g(b);9(H){e=a;1.h();1.5("i",19);1.5("p",a);1.j=\'k\';1.l=\'6\';1.m=C;1.n()}}4 I(){2.3(\'6\').7.8="f";2.3("J").t=K}4 1a(a){u=g(a);9(u){9(2.3("v").L==M){1.h();1.5("i",1b);1.5("v","N");1.j=\'k\';1.l=\'6\';1.m=I;1.n()}z{O(1c)}}}4 P(){2.3(\'6\').7.8="f";2.3("J").t=K;2.3("1d").7.8=\'A\';2.3("1e").7.8=\'f\'}4 1f(a,b){u=g(b);9(u){9(2.3("v").L==M){e=a;1.h();1.5("i",1g);1.5("v","N");1.5("p",a);1.j=\'k\';1.l=\'6\';1.m=P;1.n()}z{O(1h)}}}4 Q(){2.3(\'6\').7.8="f";D("R()",F);2.3(\'w\').t=(q(2.3(\'w\').t)-q(y));w=q(2.3(\'S\').B);T=q(2.3("1i-"+r).B);x=(w-T);9(x<0){x=0}2.3(\'S\').B=q(x)}4 R(){2.3("1j").G(2.3("s-1k-"+r))}4 1l(a,b,c,d){U=g(d);9(U){e=a;r=b;y=c;1.h();1.5("i",1m);1.5("p",a);1.5("1n",b);1.j=\'k\';1.l=\'6\';1.m=Q;1.n()}}4 V(){2.3(\'6\').7.8="f";2.3("W").7.8="A";2.3("X").7.8="Y"}4 1o(a,b){Z=g(b);9(Z){e=a;1.h();1.5("i",1p);1.5("p",a);1.j=\'k\';1.l=\'6\';1.m=V;1.n()}}4 10(){2.3(\'6\').7.8="f";2.3("W").7.8="Y";2.3("X").7.8="A"}4 1q(a,b){11=g(b);9(11){e=a;1.h();1.5("i",1r);1.5("p",a);1.j=\'k\';1.l=\'6\';1.m=10;1.n()}}4 1s(a,b){o c=12(1t);1u(1v(c)){c=12(1w)}9(c>0){9(a==\'1x\'){1y(b,\'[s 13="\'+c+\'"]\')}z{1z\'[s 13="\'+c+\'"]\'}}}',62,98,'|polls_admin|document|getElementById|function|setVar|message|style|display|if|||||global_poll_id|block|confirm|reset|do|method|POST|element|onCompletion|runAJAX|var|pollq_id|parseInt|global_poll_aid|poll|innerHTML|delete_poll_logs_confirm|delete_logs_yes|poll_total_votes|poll_total_votes_new|global_poll_aid_votes|else|none|value|delete_poll_message|setTimeout|remove_poll|1000|removeChild|delete_poll_confirm|delete_poll_logs_message|poll_logs|polls_admin_text_no_poll_logs|checked|true|yes|alert|delete_this_poll_logs_message|delete_poll_ans_message|remove_poll_ans|pollq_totalvotes|poll_answer_vote|delete_poll_ans_confirm|opening_poll_message|open_poll|close_poll|inline|open_poll_confirm|closing_poll_message|close_poll_confirm|prompt|id|new|sack|polls_admin_ajax_url|manage_polls|delete_poll|polls_admin_text_delete_poll|delete_poll_logs|polls_admin_text_delete_all_logs|polls_admin_text_checkbox_delete_all_logs|poll_logs_display|poll_logs_display_none|delete_this_poll_logs|polls_admin_text_delete_poll_logs|polls_admin_text_checkbox_delete_poll_logs|polla_votes|poll_answers|answer|delete_poll_ans|polls_admin_text_delete_poll_ans|polla_aid|opening_poll|polls_admin_text_open_poll|closing_poll|polls_admin_text_close_poll|insertPoll|polls_admin_text_enter_poll_id|while|isNaN|polls_admin_text_enter_poll_id_again|code|edInsertContent|return'.split('|'),0,{})) 
  • wp-polls/trunk/polls-admin-js.js

    r35511 r36798  
    189189      if (poll_id > 0) { 
    190190            if(where == 'code') { 
    191                   edInsertContent(myField, '[poll=' + poll_id + ']'); 
     191                  edInsertContent(myField, '[poll id="' + poll_id + '"]'); 
    192192            } else { 
    193                   return '[poll=' + poll_id + ']'; 
     193                  return '[poll id="' + poll_id + '"]'; 
    194194            } 
    195195      } 
  • wp-polls/trunk/polls-js-packed.js

    r31879 r36798  
    1 eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('f 3=1k 1c(13);f 6=0;f d="";f b=0;f 5=7;f o=(8.O&&8.9);f v=(!8.O&&8.9);f r=(1f.1b.19("17")>-1);f e=p;g 11(a){2(!e){e=w;6=a;N=8.9(\'1j\'+6);j=1i("N.W"+6);d="";2(8.9(\'S\'+6)){l=R(8.9(\'S\'+6).z)}4{l=0}s=0;2(j.H!=18){16(i=0;i<j.H;i++){2(j[i].15){2(l>0){d=j[i].z+","+d;s++}4{d=R(j[i].z)}}}}4{d=j.z}2(l>0){2(s>0&&s<=l){d=d.14(0,(d.H-1));q();x()}4 2(s==0){e=p;m(P)}4{e=p;m(12+" "+l+".")}}4{2(d>0){q();x()}4{e=p;m(P)}}}4{m(G)}}g Z(a){2(!e){e=w;6=a;q();F()}4{m(G)}}g Y(a){2(!e){e=w;6=a;q();E()}4{m(G)}}g n(){2(b==X){u()}2(b<7){b+=10;2(r){b=7;u()}4 2(o){2(h){8.9(\'3-\'+6+\'-c\').D.C.B=b}4{b=7;u()}}4 2(v){2(h){8.9(\'3-\'+6+\'-c\').k.A=(b/7)}4{b=7;u()}}y("n()",7)}4{b=7;e=p}}g q(){2(V){8.9(\'3-\'+6+\'-U\').k.T=\'1h\'}}g u(){2(V){8.9(\'3-\'+6+\'-U\').k.T=\'1g\'}}g x(){2(5>0){5-=10;2(r){5=0}4 2(o){2(h){8.9(\'3-\'+6+\'-c\').D.C.B=5}4{5=0}}4 2(v){2(h){8.9(\'3-\'+6+\'-c\').k.A=(5/7)}4{5=0}}y("x()",7)}4{5=0;3.L();3.t("1e",w);3.t("6",6);3.t("W"+6,d);3.M=\'1d\';3.J=\'3-\'+6+\'-c\';3.K=n;3.I();b=0;5=7}}g F(){2(5>0){5-=10;2(r){5=0}4 2(o){2(h){8.9(\'3-\'+6+\'-c\').D.C.B=5}4{5=0}}4 2(v){2(h){8.9(\'3-\'+6+\'-c\').k.A=(5/7)}4{5=0}}y("F()",7)}4{5=0;3.L();3.t("1a",6);3.M=\'Q\';3.J=\'3-\'+6+\'-c\';3.K=n;3.I();b=0;5=7}}g E(){2(5>0){5-=10;2(r){5=0}4 2(o){2(h){8.9(\'3-\'+6+\'-c\').D.C.B=5}4{5=0}}4 2(v){2(h){8.9(\'3-\'+6+\'-c\').k.A=(5/7)}4{5=0}}y("E()",7)}4{5=0;3.L();3.t("1l",6);3.M=\'Q\';3.J=\'3-\'+6+\'-c\';3.K=n;3.I();b=0;5=7}}',62,84,'||if|polls|else|poll_fadeout_opacity|poll_id|100|document|getElementById||poll_fadein_opacity|ans|poll_answer_id|is_being_voted|var|function|poll_show_fading||poll_answer|style|poll_multiple_ans|alert|poll_fadein_text|is_ie|false|poll_loading_text|is_opera|poll_multiple_ans_count|setVar|poll_unloading_text|is_moz|true|poll_process|setTimeout|value|MozOpacity|opacity|alpha|filters|poll_process_booth|poll_process_result|polls_text_wait|length|runAJAX|element|onCompletion|reset|method|poll_form|all|polls_text_valid|GET|parseInt|poll_multiple_ans_|display|loading|poll_show_loading|poll_|90|poll_booth|poll_result||poll_vote|polls_text_multiple|polls_ajax_url|substring|checked|for|Opera|null|indexOf|pollresult|userAgent|sack|POST|vote|navigator|none|block|eval|polls_form_|new|pollbooth'.split('|'),0,{})) 
     1eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('g 3=Z 11(12);g 6=0;g c="";g b=0;g 5=8;g n=(7.O&&7.9);g o=(!7.O&&7.9);g p=(13.14.15("16")>-1);g d=q;f 17(a){2(!d){d=r;6=a;s=7.9(\'P\'+6);j=18("s.Q"+6);c="";2(7.9(\'R\'+6)){k=S(7.9(\'R\'+6).y)}4{k=0}t=0;2(j.z!=19){T(i=0;i<j.z;i++){2(j[i].1a){2(k>0){c=j[i].y+","+c;t++}4{c=S(j[i].y)}}}}4{c=j.y}2(k>0){2(t>0&&t<=k){c=c.1b(0,(c.z-1));u();A()}4 2(t==0){d=q;l(U)}4{d=q;l(1c+" "+k+".")}}4{2(c>0){u();A()}4{d=q;l(U)}}}4{l(G)}}f 1d(a){2(!d){d=r;6=a;u();H()}4{l(G)}}f 1e(a){2(!d){d=r;6=a;u();I()}4{l(G)}}f v(){2(b==1f){w()}2(b<8){b+=10;2(p){b=8;w()}4 2(n){2(h){7.9(\'3-\'+6+\'-e\').B.C.D=b}4{b=8;w()}}4 2(o){2(h){7.9(\'3-\'+6+\'-e\').m.E=(b/8)}4{b=8;w()}}F("v()",8)}4{b=8;d=q}}f u(){2(V){7.9(\'3-\'+6+\'-W\').m.X=\'1g\'}}f w(){2(V){7.9(\'3-\'+6+\'-W\').m.X=\'1h\'}}f A(){2(5>0){5-=10;2(p){5=0}4 2(n){2(h){7.9(\'3-\'+6+\'-e\').B.C.D=5}4{5=0}}4 2(o){2(h){7.9(\'3-\'+6+\'-e\').m.E=(5/8)}4{5=0}}F("A()",8)}4{5=0;3.J();3.x("1i",r);3.x("6",6);3.x("Q"+6,c);3.K=\'1j\';3.L=\'3-\'+6+\'-e\';3.M=v;3.N();b=0;5=8}}f H(){2(5>0){5-=10;2(p){5=0}4 2(n){2(h){7.9(\'3-\'+6+\'-e\').B.C.D=5}4{5=0}}4 2(o){2(h){7.9(\'3-\'+6+\'-e\').m.E=(5/8)}4{5=0}}F("H()",8)}4{5=0;3.J();3.x("1k",6);3.K=\'Y\';3.L=\'3-\'+6+\'-e\';3.M=v;3.N();b=0;5=8}}f I(){2(5>0){5-=10;2(p){5=0}4 2(n){2(h){7.9(\'3-\'+6+\'-e\').B.C.D=5}4{5=0}}4 2(o){2(h){7.9(\'3-\'+6+\'-e\').m.E=(5/8)}4{5=0}}F("I()",8)}4{5=0;3.J();3.x("1l",6);3.K=\'Y\';3.L=\'3-\'+6+\'-e\';3.M=v;3.N();b=0;5=8}}f 1m(a){s=7.9(\'P\'+a);T(i=0;i<s.z;i++){s[i].1n=r}}',62,86,'||if|polls|else|poll_fadeout_opacity|poll_id|document|100|getElementById||poll_fadein_opacity|poll_answer_id|is_being_voted|ans|function|var|poll_show_fading||poll_answer|poll_multiple_ans|alert|style|is_ie|is_moz|is_opera|false|true|poll_form|poll_multiple_ans_count|poll_loading_text|poll_fadein_text|poll_unloading_text|setVar|value|length|poll_process|filters|alpha|opacity|MozOpacity|setTimeout|polls_text_wait|poll_process_result|poll_process_booth|reset|method|element|onCompletion|runAJAX|all|polls_form_|poll_|poll_multiple_ans_|parseInt|for|polls_text_valid|poll_show_loading|loading|display|GET|new||sack|polls_ajax_url|navigator|userAgent|indexOf|Opera|poll_vote|eval|null|checked|substring|polls_text_multiple|poll_result|poll_booth|90|block|none|vote|POST|pollresult|pollbooth|poll_disable_voting|disabled'.split('|'),0,{})) 
  • wp-polls/trunk/polls-js.js

    r35561 r36798  
    252252      } 
    253253} 
     254 
     255// Function: Disable Poll's Voting Booth 
     256function poll_disable_voting(current_poll_id){ 
     257      poll_form = document.getElementById('polls_form_' + current_poll_id); 
     258      for(i = 0; i < poll_form.length; i++){ 
     259            poll_form[i].disabled = true; 
     260      } 
     261} 
  • wp-polls/trunk/polls-options.php

    r35561 r36798  
    374374            <?php if(function_exists('dynamic_sidebar')) { ?> 
    375375            <tr> 
    376                   <th scope="row"valign="top"><?php _e('Note', 'wp-polls'); ?></em></th> 
     376                  <th scope="row"valign="top"><?php _e('Note', 'wp-polls'); ?></th> 
    377377                  <td><em><?php _e('If you chose \'Display Multiple Polls\' for the above option, you need to configure it in Presentation -> Widgets -> Poll.', 'wp-polls'); ?></em></td> 
    378378            </tr> 
     
    383383                        <select name="poll_close" size="1"> 
    384384                              <option value="1"<?php selected(1, get_option('poll_close')); ?>><?php _e('Display Poll\'s Results', 'wp-polls'); ?></option> 
    385                               <option value="2"<?php selected(2, get_option('poll_close')); ?>><?php _e('Do Not Display Poll In Post/Sidebar', 'wp-polls'); ?></option> 
     385                              <option value="3"<?php selected(3, get_option('poll_close')); ?>><?php _e('Display Disabled Poll\'s Voting Form', 'wp-polls'); ?></option> 
     386                              <option value="2"<?php selected(2, get_option('poll_close')); ?>><?php _e('Do Not Display Poll In Post/Sidebar', 'wp-polls'); ?></option>        
    386387                        </select> 
    387388                  </td> 
  • wp-polls/trunk/readme.html

    r35511 r36798  
    270270                        <script type="text/javascript"> 
    271271                              /* <![CDATA[*/ 
    272                               document.write(' <strong>gamerz84@hotmail.com</strong>.'); 
     272                              document.write(' <strong>lesterchan@gmail.com</strong>.'); 
    273273                              /* ]]> */ 
    274274                        </script> 
     
    281281                  <ul> 
    282282                        <li> 
    283                               <strong>Version 2.30 (01-04-2008)</strong> 
     283                              <strong>Version 2.30 (01-06-2008)</strong> 
    284284                              <ul> 
    285285                                    <li>NEW: Works For WordPress 2.5 Only</li> 
     286                                    <li>NEW: Uses Shortcode API</li> 
     287                                    <li>NEW: When Inserting Poll Into Post, It is Now [poll id="1"], Where 1 Is Your Poll ID</li> 
     288                                    <li>NEW: When User Does Not Have Permission To Vote, The Voting Form Is Now Disabled Instead Of Showing Poll's Result</li> 
     289                                    <li>NEW: Added A New Action Called "Display Disabled Poll's Voting Form" To Action Taken When A Poll Is Closed</li> 
    286290                                    <li>NEW: Updated WP-Polls TinyMCE Plugin To Work With TinyMCE 3.0</li> 
    287291                                    <li>NEW: Add Time Expiry For Cookie/Log</li> 
     
    565569                              </blockquote> 
    566570                              <p>To show specific poll, use &lt;?php get_poll(<strong>2</strong>);?&gt; where <strong>2</strong> is your poll id.</p> 
    567                               <p>To embed a specific poll in your post, use [poll=<strong>2</strong>] where <strong>2</strong> is your poll id.</p> 
     571                              <p>To embed a specific poll in your post, use [poll id="<strong>2</strong>"] where <strong>2</strong> is your poll id.</p> 
     572                              <p>To embed a specific poll's result in your post, use [poll id="<strong>2</strong>" type="result"] where <strong>2</strong> is your poll id.</p> 
    568573                        </li> 
    569574                        <li> 
  • wp-polls/trunk/wp-polls-widget.php

    r35579 r36798  
    1111 
    1212/*   
    13       Copyright 2008  Lester Chan  (email : gamerz84@hotmail.com) 
     13      Copyright 2008  Lester Chan  (email : lesterchan@gmail.com) 
    1414 
    1515    This program is free software; you can redistribute it and/or modify 
  • wp-polls/trunk/wp-polls.php

    r35579 r36798  
    1111 
    1212/*   
    13       Copyright 2008  Lester Chan  (email : gamerz84@hotmail.com) 
     13      Copyright 2008  Lester Chan  (email : lesterchan@gmail.com) 
    1414 
    1515    This program is free software; you can redistribute it and/or modify 
     
    131131                  $poll_close = 0; 
    132132            } 
    133             if($check_voted > 0 || ($poll_active == 0 && $poll_close == 1) || !check_allowtovote()) { 
     133            if($check_voted > 0 || ($poll_active == 0 && $poll_close == 1)) { 
    134134                  if($display) { 
    135135                        echo display_pollresult($poll_id, $check_voted); 
     
    138138                        return display_pollresult($poll_id, $check_voted); 
    139139                  } 
     140            } elseif(!check_allowtovote() || ($poll_active == 0 && $poll_close == 3)) { 
     141                  $disable_poll_js = '<script type="text/javascript">poll_disable_voting('.$poll_id.');</script>'; 
     142                  if($display) { 
     143                        echo display_pollvote($poll_id).$disable_poll_js; 
     144                        return; 
     145                  } else { 
     146                        return display_pollvote($poll_id).$disable_poll_js; 
     147                  }                  
    140148            } elseif($poll_active == 1) { 
    141149                  if($display) { 
     
    417425            if(!$without_poll_title) { 
    418426                  $temp_pollvote .= "<div id=\"polls-$poll_question_id\" class=\"wp-polls\">\n"; 
    419                   $temp_pollvote .= "\t<form id=\"polls_form_$poll_question_id\" class=\"wp-polls-form\" action=\"".htmlspecialchars($_SERVER['REQUEST_URI'])."\" method=\"post\">\n"; 
     427                  $temp_pollvote .= "\t<form id=\"polls_form_$poll_question_id\" class=\"wp-polls-form\" action=\"".htmlspecialchars($_SERVER['REQUEST_URI'])."\" method=\"post\" disabled=\"disabled\">\n"; 
    420428                  $temp_pollvote .= "\t\t<p style=\"display: none;\"><input type=\"hidden\" name=\"poll_id\" value=\"$poll_question_id\" /></p>\n"; 
    421429                  if($poll_multiple_ans > 0) { 
     
    659667 
    660668 
    661 ### Function: Place Polls Archive In Content 
    662 add_filter('the_content', 'place_pollsarchive', '7'); 
    663 function place_pollsarchive($content){ 
    664       $content = preg_replace("/\[page_polls\]/ise", "polls_archive()", $content);  
    665       return $content; 
    666 
    667  
    668  
    669 ### Function: Place Poll In Content (By: Robert Accettura Of http://robert.accettura.com/) 
    670 add_filter('the_content', 'place_poll', '7'); 
    671 add_filter('the_excerpt', 'place_poll', '7'); 
    672 function place_poll($content){ 
     669### Function: Short Code For Inserting Polls Archive Into Page 
     670add_shortcode('page_polls', 'poll_page_shortcode'); 
     671function poll_page_shortcode($atts) { 
     672      return polls_archive(); 
     673
     674 
     675 
     676### Function: Short Code For Inserting Polls Into Posts 
     677add_shortcode('poll', 'poll_shortcode'); 
     678function poll_shortcode($atts) { 
     679      extract(shortcode_atts(array('id' => 0, 'type' => 'vote'), $atts)); 
    673680      if(!is_feed()) { 
    674             $content = preg_replace("/\[poll=(\d+)\]/ise", "display_poll('\\1')", $content); 
    675       } else { 
    676             $content = preg_replace("/\[poll=(\d+)\]/i", __('Note: There is a poll embedded within this post, please visit the site to participate in this post\'s poll.', 'wp-polls'), $content); 
    677       } 
    678     return $content; 
    679 
    680  
    681  
    682 ### Function: Display The Poll In Content (By: Robert Accettura Of http://robert.accettura.com/) 
    683 function display_poll($poll_id){ 
    684       return get_poll($poll_id, false); 
     681            if($type == 'vote') { 
     682                  return get_poll($id, false); 
     683            } elseif($type == 'result') { 
     684                  return display_pollresult($id); 
     685            } 
     686      } else { 
     687            return __('Note: There is a poll embedded within this post, please visit the site to participate in this post\'s poll.', 'wp-polls'); 
     688      } 
    685689} 
    686690 
  • wp-polls/trunk/wp-polls.pot

    r35579 r36798  
    33"Project-Id-Version: WP-Polls 2.30\n" 
    44"POT-Creation-Date: \n" 
    5 "PO-Revision-Date: 2008-03-20 22:04+0800\n" 
     5"PO-Revision-Date: 2008-03-30 16:37+0800\n" 
    66"Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n" 
    7 "Language-Team: Lester Chan <gamerz84@hotmail.com>\n" 
     7"Language-Team: Lester Chan <lesterchan@gmail.com>\n" 
    88"MIME-Version: 1.0\n" 
    99"Content-Type: text/plain; charset=utf-8\n" 
     
    146146#: polls-admin-ajax.php:38 
    147147#: polls-manager.php:594 
    148 #: wp-polls.php:206 
     148#: wp-polls.php:214 
    149149msgid "Delete All Logs" 
    150150msgstr "" 
     
    160160#: polls-admin-ajax.php:49 
    161161#: polls-logs.php:373 
    162 #: wp-polls.php:208 
     162#: wp-polls.php:216 
    163163msgid "Delete Logs For This Poll Only" 
    164164msgstr "" 
     
    175175 
    176176#: polls-admin-ajax.php:62 
    177 #: wp-polls.php:210 
     177#: wp-polls.php:218 
    178178msgid "Delete Poll Answer" 
    179179msgstr "" 
     
    191191#: polls-admin-ajax.php:78 
    192192#: polls-manager.php:440 
    193 #: wp-polls.php:211 
     193#: wp-polls.php:219 
    194194msgid "Open Poll" 
    195195msgstr "" 
     
    207207#: polls-admin-ajax.php:89 
    208208#: polls-manager.php:439 
     209#: wp-polls.php:220 
     210msgid "Close Poll" 
     211msgstr "" 
     212 
     213#: polls-admin-ajax.php:94 
     214#, php-format 
     215msgid "Poll '%s' Is Now Closed" 
     216msgstr "" 
     217 
     218#: polls-admin-ajax.php:96 
     219#, php-format 
     220msgid "Error Closing Poll '%s'" 
     221msgstr "" 
     222 
     223#: polls-admin-ajax.php:100 
    209224#: wp-polls.php:212 
    210 msgid "Close Poll" 
    211 msgstr "" 
    212  
    213 #: polls-admin-ajax.php:94 
    214 #, php-format 
    215 msgid "Poll '%s' Is Now Closed" 
    216 msgstr "" 
    217  
    218 #: polls-admin-ajax.php:96 
    219 #, php-format 
    220 msgid "Error Closing Poll '%s'" 
    221 msgstr "" 
    222  
    223 #: polls-admin-ajax.php:100 
    224 #: wp-polls.php:204 
    225225msgid "Delete Poll" 
    226226msgstr "" 
     
    376376#: polls-manager.php:487 
    377377#: polls-manager.php:495 
    378 #: wp-polls.php:392 
    379 #: wp-polls.php:397 
    380 #: wp-polls.php:508 
    381 #: wp-polls.php:513 
    382 #: wp-polls.php:888 
     378#: wp-polls.php:400 
     379#: wp-polls.php:405 
     380#: wp-polls.php:516 
     381#: wp-polls.php:521 
    383382#: wp-polls.php:892 
     383#: wp-polls.php:896 
    384384#, php-format 
    385385msgid "%s @ %s" 
     
    535535#: polls-templates.php:116 
    536536#: polls-templates.php:119 
    537 #: wp-polls.php:1360 
    538 #: wp-polls.php:1363 
     537#: wp-polls.php:1364 
     538#: wp-polls.php:1367 
    539539msgid "Total Voters" 
    540540msgstr "" 
     
    549549 
    550550#: polls-manager.php:493 
    551 #: wp-polls.php:395 
    552 #: wp-polls.php:511 
    553 #: wp-polls.php:890 
     551#: wp-polls.php:403 
     552#: wp-polls.php:519 
     553#: wp-polls.php:894 
    554554msgid "No Expiry" 
    555555msgstr "" 
     
    619619 
    620620#: polls-manager.php:597 
    621 #: wp-polls.php:205 
     621#: wp-polls.php:213 
    622622msgid "No poll logs available." 
    623623msgstr "" 
     
    785785#: polls-templates.php:110 
    786786#: polls-templates.php:113 
    787 #: wp-polls.php:1357 
    788 #: wp-polls.php:1358 
     787#: wp-polls.php:1361 
     788#: wp-polls.php:1362 
    789789msgid "Votes" 
    790790msgstr "" 
     
    926926 
    927927#: polls-options.php:385 
     928msgid "Display Disabled Poll's Voting Form" 
     929msgstr "" 
     930 
     931#: polls-options.php:386 
    928932msgid "Do Not Display Poll In Post/Sidebar" 
    929933msgstr "" 
    930934 
    931 #: polls-options.php:393 
     935#: polls-options.php:394 
    932936msgid "Update Options &raquo;" 
    933937msgstr "" 
     
    987991#: polls-templates.php:104 
    988992#: polls-templates.php:119 
    989 #: wp-polls.php:1351 
    990 #: wp-polls.php:1364 
     993#: wp-polls.php:1355 
     994#: wp-polls.php:1368 
    991995msgid "Vote" 
    992996msgstr "" 
    993997 
    994998#: polls-templates.php:104 
    995 #: wp-polls.php:1352 
     999#: wp-polls.php:1356 
    9961000msgid "View Results Of This Poll" 
    9971001msgstr "" 
    9981002 
    9991003#: polls-templates.php:104 
    1000 #: wp-polls.php:1352 
     1004#: wp-polls.php:1356 
    10011005msgid "View Results" 
    10021006msgstr "" 
    10031007 
    10041008#: polls-templates.php:113 
    1005 #: wp-polls.php:1358 
     1009#: wp-polls.php:1362 
    10061010msgid "You Have Voted For This Choice" 
    10071011msgstr "" 
    10081012 
    10091013#: polls-templates.php:119 
    1010 #: wp-polls.php:1364 
     1014#: wp-polls.php:1368 
    10111015msgid "Vote For This Poll" 
    10121016msgstr "" 
    10131017 
    10141018#: polls-templates.php:122 
    1015 #: wp-polls.php:1391 
     1019#: wp-polls.php:1395 
    10161020msgid "Polls Archive" 
    10171021msgstr "" 
     
    10261030 
    10271031#: polls-templates.php:131 
    1028 #: wp-polls.php:1366 
     1032#: wp-polls.php:1370 
    10291033msgid "Sorry, there are no polls available at the moment." 
    10301034msgstr "" 
    10311035 
    10321036#: polls-templates.php:134 
    1033 #: wp-polls.php:1367 
     1037#: wp-polls.php:1371 
    10341038msgid "An error has occurred when processing your poll." 
    10351039msgstr "" 
     
    13541358msgstr "" 
    13551359 
    1356 #: wp-polls.php:162 
     1360#: wp-polls.php:170 
    13571361msgid "Your last request is still being processed. Please wait a while ..." 
    13581362msgstr "" 
    13591363 
    1360 #: wp-polls.php:163 
     1364#: wp-polls.php:171 
    13611365msgid "Please choose a valid poll answer." 
    13621366msgstr "" 
    13631367 
    1364 #: wp-polls.php:164 
     1368#: wp-polls.php:172 
    13651369msgid "Maximum number of choices allowed:" 
    13661370msgstr "" 
    13671371 
    1368 #: wp-polls.php:207 
     1372#: wp-polls.php:215 
    13691373msgid "Please check the \\'Yes\\' checkbox if you want to delete all logs." 
    13701374msgstr "" 
    13711375 
    1372 #: wp-polls.php:209 
     1376#: wp-polls.php:217 
    13731377msgid "Please check the \\'Yes\\' checkbox if you want to delete all logs for this poll ONLY." 
    13741378msgstr "" 
    13751379 
    1376 #: wp-polls.php:213 
     1380#: wp-polls.php:221 
    13771381msgid "Enter Poll ID" 
    13781382msgstr "" 
    13791383 
    1380 #: wp-polls.php:214 
     1384#: wp-polls.php:222 
    13811385msgid "Error: Poll ID must be numeric" 
    13821386msgstr "" 
    13831387 
    1384 #: wp-polls.php:214 
     1388#: wp-polls.php:222 
    13851389msgid "Please enter Poll ID again" 
    13861390msgstr "" 
    13871391 
    1388 #: wp-polls.php:230 
    1389 #: wp-polls.php:236 
     1392#: wp-polls.php:238 
     1393#: wp-polls.php:244 
    13901394msgid "Poll" 
    13911395msgstr "" 
    13921396 
    1393 #: wp-polls.php:237 
     1397#: wp-polls.php:245 
    13941398msgid "Insert Poll" 
    13951399msgstr "" 
    13961400 
    1397 #: wp-polls.php:473 
    1398 #: wp-polls.php:633 
     1401#: wp-polls.php:481 
     1402#: wp-polls.php:641 
    13991403msgid "Loading" 
    14001404msgstr "" 
    14011405 
    1402 #: wp-polls.php:676 
     1406#: wp-polls.php:687 
    14031407msgid "Note: There is a poll embedded within this post, please visit the site to participate in this post's poll." 
    14041408msgstr "" 
    14051409 
    1406 #: wp-polls.php:1017 
     1410#: wp-polls.php:1021 
    14071411msgid "Previous Page" 
    14081412msgstr "" 
    14091413 
    1410 #: wp-polls.php:1025 
     1414#: wp-polls.php:1029 
    14111415msgid "Next Page" 
    14121416msgstr "" 
    14131417 
    1414 #: wp-polls.php:1034 
     1418#: wp-polls.php:1038 
    14151419msgid "Pages" 
    14161420msgstr "" 
    14171421 
    1418 #: wp-polls.php:1036 
     1422#: wp-polls.php:1040 
    14191423msgid "Go to First Page" 
    14201424msgstr "" 
    14211425 
    1422 #: wp-polls.php:1036 
     1426#: wp-polls.php:1040 
    14231427msgid "First" 
    14241428msgstr "" 
    14251429 
    1426 #: wp-polls.php:1039 
    1427 #: wp-polls.php:1051 
     1430#: wp-polls.php:1043 
     1431#: wp-polls.php:1055 
    14281432msgid "Go to Page" 
    14291433msgstr "" 
    14301434 
    1431 #: wp-polls.php:1046 
     1435#: wp-polls.php:1050 
    14321436msgid "Page" 
    14331437msgstr "" 
    14341438 
    1435 #: wp-polls.php:1054 
     1439#: wp-polls.php:1058 
    14361440msgid "Go to Last Page" 
    14371441msgstr "" 
    14381442 
    1439 #: wp-polls.php:1054 
     1443#: wp-polls.php:1058 
    14401444msgid "Last" 
    14411445msgstr "" 
    14421446 
    1443 #: wp-polls.php:1231 
     1447#: wp-polls.php:1235 
    14441448#, php-format 
    14451449msgid "Unable To Update Poll Total Votes And Poll Total Voters. Poll ID #%s" 
    14461450msgstr "" 
    14471451 
    1448 #: wp-polls.php:1235 
     1452#: wp-polls.php:1239 
    14491453#, php-format 
    14501454msgid "You Had Already Voted For This Poll. Poll ID #%s" 
    14511455msgstr "" 
    14521456 
    1453 #: wp-polls.php:1239 
     1457#: wp-polls.php:1243 
    14541458#, php-format 
    14551459msgid "Invalid Poll ID. Poll ID #%s" 
    14561460msgstr "" 
    14571461 
    1458 #: wp-polls.php:1265 
    1459 #: wp-polls.php:1267 
    1460 #: wp-polls.php:1277 
     1462#: wp-polls.php:1269 
     1463#: wp-polls.php:1271 
     1464#: wp-polls.php:1281 
    14611465msgid "WP-Polls" 
    14621466msgstr "" 
    14631467 
    1464 #: wp-polls.php:1279 
     1468#: wp-polls.php:1283 
    14651469msgid "polls were created." 
    14661470msgstr "" 
    14671471 
    1468 #: wp-polls.php:1280 
     1472#: wp-polls.php:1284 
    14691473msgid "polls' answers were given." 
    14701474msgstr "" 
    14711475 
    1472 #: wp-polls.php:1281 
     1476#: wp-polls.php:1285 
    14731477msgid "votes were casted." 
    14741478msgstr "" 
    14751479 
    1476 #: wp-polls.php:1335 
     1480#: wp-polls.php:1339 
    14771481msgid "How Is My Site?" 
    14781482msgstr "" 
    14791483 
    1480 #: wp-polls.php:1338 
     1484#: wp-polls.php:1342 
    14811485msgid "Good" 
    14821486msgstr "" 
    14831487 
    1484 #: wp-polls.php:1339 
     1488#: wp-polls.php:1343 
    14851489msgid "Excellent" 
    14861490msgstr "" 
    14871491 
    1488 #: wp-polls.php:1340 
     1492#: wp-polls.php:1344 
    14891493msgid "Bad" 
    14901494msgstr "" 
    14911495 
    1492 #: wp-polls.php:1341 
     1496#: wp-polls.php:1345 
    14931497msgid "Can Be Improved" 
    14941498msgstr "" 
    14951499 
    1496 #: wp-polls.php:1342 
     1500#: wp-polls.php:1346 
    14971501msgid "No Comments" 
    14981502msgstr ""