[geeklog-hg] geeklog: Upgraded Poll Version to 2.1.6. Made Poll bar graph bas...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Wed Jan 21 21:48:55 EST 2015
changeset 9573:397381a2f84b
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/397381a2f84b
user: Tom
date: Wed Jan 21 21:48:57 2015 -0500
description:
Upgraded Poll Version to 2.1.6. Made Poll bar graph based on percentage so it will act responsive. Made poll tables HTML5 compliant.
diffstat:
plugins/polls/autoinstall.php | 2 +-
plugins/polls/functions.inc | 16 ++++++++++------
plugins/polls/templates/pollquestion.thtml | 2 +-
plugins/polls/templates/pollvotes_bar.thtml | 2 +-
public_html/polls/index.php | 2 +-
5 files changed, 14 insertions(+), 10 deletions(-)
diffs (102 lines):
diff -r 7a9476bf3690 -r 397381a2f84b plugins/polls/autoinstall.php
--- a/plugins/polls/autoinstall.php Tue Jan 20 15:44:57 2015 -0500
+++ b/plugins/polls/autoinstall.php Wed Jan 21 21:48:57 2015 -0500
@@ -51,7 +51,7 @@
$info = array(
'pi_name' => $pi_name,
'pi_display_name' => $pi_display_name,
- 'pi_version' => '2.1.5',
+ 'pi_version' => '2.1.6',
'pi_gl_version' => '2.1.0',
'pi_homepage' => 'http://www.geeklog.net/'
);
diff -r 7a9476bf3690 -r 397381a2f84b plugins/polls/functions.inc
--- a/plugins/polls/functions.inc Tue Jan 20 15:44:57 2015 -0500
+++ b/plugins/polls/functions.inc Wed Jan 21 21:48:57 2015 -0500
@@ -761,7 +761,7 @@
* @return string HTML Formated Poll Results
*
*/
-function POLLS_pollResults($pid, $scale=400, $order='', $mode='', $page = 1, $displaytype = 0)
+function POLLS_pollResults($pid, $scale=100, $order='', $mode='', $page = 1, $displaytype = 0)
{
global $_CONF, $_TABLES, $_USER, $_IMAGE_TYPE,
$_PO_CONF, $LANG01, $LANG_POLLS, $_COM_VERBOSE, $LANG25;
@@ -881,7 +881,7 @@
$poll->set_var('answer_num', COM_numberFormat($A['votes']));
$poll->set_var('answer_percent',
sprintf('%.2f', $percent * 100));
- if ($scale < 120) {
+ if ($scale < 50) {
$poll->parse('poll_votes', 'votes_num', true );
} else {
$width = (int)($percent * $scale);
@@ -916,7 +916,7 @@
$retval .= $poll->finish($poll->parse('output', 'result' ));
- if($scale > 399 && $P['commentcode'] >= 0 && $displaytype != 2) {
+ if($scale > 99 && $P['commentcode'] >= 0 && $displaytype != 2) {
$delete_option = (SEC_hasRights('polls.edit') &&
SEC_hasAccess($P['owner_id'], $P['group_id'],
$P['perm_owner'], $P['perm_group'], $P['perm_members'],
@@ -967,7 +967,7 @@
*/
function phpblock_polls()
{
- return POLLS_showPoll(60, '', false, 1);
+ return POLLS_showPoll(0, '', false, 1);
}
@@ -1281,8 +1281,12 @@
}
$current_version = '2.1.5';
- break;
-
+ break;
+
+ case '2.1.5':
+ $current_version = '2.1.6';
+ break;
+
default:
$done = true;
}
diff -r 7a9476bf3690 -r 397381a2f84b plugins/polls/templates/pollquestion.thtml
--- a/plugins/polls/templates/pollquestion.thtml Tue Jan 20 15:44:57 2015 -0500
+++ b/plugins/polls/templates/pollquestion.thtml Wed Jan 21 21:48:57 2015 -0500
@@ -2,7 +2,7 @@
<div class="poll-questions">
<p class="poll-question">{lang_question}{lang_question_number}{poll_question}</p>
- <table width="100%">
+ <table style="width:100%;">
{poll_votes}
</table>
</div>
diff -r 7a9476bf3690 -r 397381a2f84b plugins/polls/templates/pollvotes_bar.thtml
--- a/plugins/polls/templates/pollvotes_bar.thtml Tue Jan 20 15:44:57 2015 -0500
+++ b/plugins/polls/templates/pollvotes_bar.thtml Wed Jan 21 21:48:57 2015 -0500
@@ -3,7 +3,7 @@
<tr class="pluginRow{cssidb}">
<td class="poll_answer_text" style="width:20%">{answer_text}</td>
<td class="poll_answer_bar">
- <img src="{layout_url}/images/bar.gif" width="{bar_width}" height="10" style="align:bottom;" alt=""{xhtml}> {answer_num} ({answer_percent}%)
+ <img src="{layout_url}/images/bar.gif" style="align:bottom; height:10px; width:{bar_width}%;" alt=""{xhtml}> {answer_num} ({answer_percent}%)
</td>
</tr>
<tr class="pluginRow{cssida}">
diff -r 7a9476bf3690 -r 397381a2f84b public_html/polls/index.php
--- a/public_html/polls/index.php Tue Jan 20 15:44:57 2015 -0500
+++ b/public_html/polls/index.php Wed Jan 21 21:48:57 2015 -0500
@@ -203,7 +203,7 @@
) {
$display .= POLLS_pollVote($pid, true, 0, $order, $mode, $page);
} else {
- $display .= POLLS_pollResults($pid, 400, $order, $mode, $page);
+ $display .= POLLS_pollResults($pid, 100, $order, $mode, $page);
}
$display = COM_createHTMLDocument($display, array('pagetitle' => $polltopic, 'headercode' => $headercode));
}
More information about the geeklog-cvs
mailing list