We previously made the following changes with your help using Community Polls version 4.4.6. Hopefully you can help:

1. Add custom redirect:

modules/mod_randompoll/mod_randompoll.xml

line 90 add:
<field name="redirecturl" type="text" default="" label="Redirect URL"
description="Redirect URL to send the user to after voting." />

modules/mod_randompoll/tmpl/default.php

line 31 add:
$poll->redirect = $params->get('redirecturl');

line 212 add:
<input type="hidden" name="redirectUrl" id="redirectUrl" value="<?php echo $poll->redirect;?>">

modules/mod_randompoll/assets/scripts/randompoll.js

line97 add:
var poll_url = $('.' + container).find('#redirectUrl').val();

line 169 add:
window.location = poll_url;
underneath
$('.' + container).find('.rp-poll-form').hide('slow');
$('.' + container).find('.rp-results').show('slow');
$('.' + container).find('.rp-buttons-wrapper').hide('slow');
}

I am not sure where to add this functionality in the newest version of Community Polls Random Poll Module.

2. Hide number of votes from results in randompoll module:

Edit modules/mod_randompoll/tmpl/default.php and delete below line
<small class="muted">(<?php echo JText::plural('COM_COMMUNITYPOLLS_VOTE_PCT', $answer->votes);?>)</small>

I am not sure where to add this functionality in the newest version of Community Polls Random Poll Module.

3. Hide number of votes from results in all polls at the category level:

To keep only percentage, edit or override the layout file components/com_communitypolls/layouts/default(or bootstrap3)/poll/result.php

<i class="icon-asterisk"></i> <?php echo $title.' (<span class="votecount">'.$answer->votes.'</span> '. strtolower(JText::plural('COM_COMMUNITYPOLLS_VOTES', $answer->votes)).' / <span class="votepct">'.$answer->pct.'%</span>)';?>

Change it to

<i class="icon-asterisk"></i> <?php echo $title.' (<span class="votepct">'.$answer->pct.'%</span>)';?>

This I can do because the info is the same in this file.

In addition, the Local News Poll being displayed on the homepage is not the latest poll question. See poll-ordering-backend.jpg
http://www.sasknow.ca/news/local-news-polls displays polls in the correct order. On the homepage, Do you think the City Of Saskatoon...should be the question displayed since it is the latest article but it is not. See local-news-poll-home-page.jpg

Your help is greatly appreciated.

16017_1_poll-ordering-backend.jpg (You do not have access to download this file.)
16017_1_local-news-poll-home-page.jpg (You do not have access to download this file.)
Like it on Facebook, Tweet it or share this topic on other bookmarking websites.
You do not have permissions to reply to this topic.
Powered by CjForum