1
phillipd
How can I put some polls left and some right?
  • 2004/5/10 18:36

  • phillipd

  • Quite a regular

  • Posts: 219

  • Since: 2004/4/20


I would like to split my numerous polls on both sides of the browser. How can this be accomplished?

Thanks

Doug P

2
Stewdio
Re: How can I put some polls left and some right?
  • 2004/5/10 18:44

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


The current release of XOOPS only allows the Poll Block to be either left, right or center.

3
xgoof
Re: How can I put some polls left and some right?
  • 2004/5/12 6:52

  • xgoof

  • Just popping in

  • Posts: 28

  • Since: 2004/4/28


Would it be possible to clone the pollmodule? - and then have one left and the other right?

4
Mithrandir
Re: How can I put some polls left and some right?

Just clone the block and rewrite them to take a certain poll each (perhaps selected in block edit?)

5
fredski
Re: How can I put some polls left and some right?
  • 2004/5/12 7:26

  • fredski

  • Quite a regular

  • Posts: 265

  • Since: 2004/1/26


I've always thought the polls module could do with a rotating/random polls block so you didn't have to have a long block of all your polls.

6
phillipd
Re: How can I put some polls left and some right?
  • 2004/5/13 16:42

  • phillipd

  • Quite a regular

  • Posts: 219

  • Since: 2004/4/20


Oh great one, how would one go about "Cloning" a block? Could you be a little more verbose in your explanations for the intermediate that I am.

Thanks

Doug P

7
ajaxbr
Re: How can I put some polls left and some right?
  • 2004/6/5 22:47

  • ajaxbr

  • Quite a regular

  • Posts: 276

  • Since: 2003/10/25


Edit: Erm... clone a block. I'll give it a try.

Ok, just as Mithrandir said...

Open /modules/xoopspoll/xoops_version.php and find
//Blocks
$modversion['blocks'][1]['file'] = "xoopspoll.php";
$modversion['blocks'][1]['name'] = _MI_POLLS_BNAME1;
$modversion['blocks'][1]['description'] = "Shows unlimited number of polls/surveys";
$modversion['blocks'][1]['show_func'] = "b_xoopspoll_show";
$modversion['blocks'][1]['template'] = 'xoopspoll_block_poll.html';


Below that paste
$modversion['blocks'][2]['file'] = "xoopspoll.php";
$modversion['blocks'][2]['name'] = _MI_POLLS_BNAME1."1";
$modversion['blocks'][2]['description'] = "Shows one poll/survey";
$modversion['blocks'][2]['show_func'] = "b_xoopspoll_show";
$modversion['blocks'][2]['template'] = 'xoopspoll_block_poll_1.html';

$modversion['blocks'][3]['file'] = "xoopspoll.php";
$modversion['blocks'][3]['name'] = _MI_POLLS_BNAME1."2";
$modversion['blocks'][3]['description'] = "Shows one poll/survey";
$modversion['blocks'][3]['show_func'] = "b_xoopspoll_show";
$modversion['blocks'][3]['template'] = 'xoopspoll_block_poll_2.html';


Now go to /modules/xoopspoll/templates/blocks/ and copy xoopspoll_block_poll.html as xoopspoll_block_poll_1.html and xoopspoll_block_poll_2.html

Open xoopspoll_block_poll_1.html and find
<{foreach item=poll from=$block.polls}>
<
form style="margin-top: 1px;"
and add
<{if $poll.id is odd}> so that it becomes
<{foreach item=poll from=$block.polls}>
<{if 
$poll.id is odd}>
<
form style="margin-top: 1px;"


At the end of the file, locate
form>
<{/foreach}>
and add <{/if}>:
form>
<{/if}> 
<{/foreach}>


That's it, a block that'll display odd polls. Do the same to xoopspoll_block_poll_2.html, but using <{if $poll.id is even}> and this should work fine

8
fredski
Random Poll Block
  • 2004/6/7 7:24

  • fredski

  • Quite a regular

  • Posts: 265

  • Since: 2004/1/26


Has anyone worked out how to display a block that will bring up one of your polls at random, possibly with the addition that if the member has voted in that poll already then it will not display that one, If they have voted in them all the block could display results or just that there are no more unvoted polls.

9
phillipd
Re: How can I put some polls left and some right?
  • 2004/6/7 18:37

  • phillipd

  • Quite a regular

  • Posts: 219

  • Since: 2004/4/20


Thanks! I'll give it a try...

Doug P

Login

Who's Online

477 user(s) are online (360 user(s) are browsing Support Forums)


Members: 0


Guests: 477


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits