1
risto
poll force view
  • 2004/3/31 7:24

  • risto

  • Not too shy to talk

  • Posts: 159

  • Since: 2003/4/16


Hi I would like to force viewing of polls whan a user has voted. IE not the form any more for that poll.

Has anyone seen this done in xoops?

2
KubaZ
Re: poll force view
  • 2004/3/31 8:43

  • KubaZ

  • Just popping in

  • Posts: 37

  • Since: 2002/10/9


Yes, I've hacked polls, but I'm using it in forum.

but I can make this hack for you... please be patient
(hack only polls module)

---------------

Link xoopspoll hacked

Ok I've made it!

here you are :
* hacked block (php + template)
* hacked index.php

I don't know if you want to see results also in poll's block but I've made it...
in block one thing is important, in poll result standard modifier for width of the bar is x2. But it doesn't look well, so I've changed it to x0.6

If you wanna another, please free to change code in file
blocks/xoopspoll.php at line:
59: $width = intval($percent)*0.6;

ps. for developers. maybe we can add this feature in main core of polls module. We can put a option to the admin panel (if we want to show hacked or original version)

Link :xoopspoll hacked

3
KubaZ
Re: poll force view
  • 2004/3/31 10:06

  • KubaZ

  • Just popping in

  • Posts: 37

  • Since: 2002/10/9


enjoy

hmm..when I've edited my post the time hasn't been changed..so I reply ...

4
kwerle
Re: poll force view
  • 2004/4/3 0:01

  • kwerle

  • Just popping in

  • Posts: 7

  • Since: 2004/3/25


I tried installing your hack 'in place', but it didn't work. Instead, the poll listed with textboxes that had number in them corresponding to the poll choice.

I certainly would like to see this functionality rolled into the core. If you can't vote again, why not show the results!?!

5
zer0fill
Re: poll force view
  • 2004/6/12 9:43

  • zer0fill

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/12/2


Doh! I wish I searched the forums before making my own poll hack (zip|tar). My hack doesn't use PHP in the block since I modified the assignResults() function to return the array than assign if the user is $in_block (viewing block). Like what KubaZ said, i too shrunk the width to fit in the column.

If you're still having trouble, remember to update the module AND make a backup copy of the original before implementing ours.

I would have placed it on the same line but it didn't look right when the numbers went to the next line.
Resized Image

6
jayjay
Xoopspoll hack: view results in block (Was: Re: poll force view)
  • 2004/7/27 8:27

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


Hi everybody!

I hacked Kubaz' hack of the xoopspoll module

Now you can show poll results in a block, so you can display them directly on your homepage.

Download the hacked xoopspoll file

An example can be seen here (only this week) or at the bottom of this post:
http://www.sint-niklaas.be

Starting from Kubaz' hack, I changed these files:

xoops_version.php:
- made new entries under "blocks"

blocks/xoopspoll.php:
- made new b_xoopspoll_results() function
- sprintf hack for better display percentages

language/english/modinfo.php:
- new entry for results block name

Resized Image

7
Basie
Odd glitch
  • 2004/7/28 23:40

  • Basie

  • Just popping in

  • Posts: 12

  • Since: 2004/7/3 2


I'm the same... with all of these hacks, I see text boxes instead of images.

My process to install:
1. Delete original xoopspoll directory (start fresh).
2. Upload new xoopspoll directory from hack archive.
3. Update the module from the admin interface.
4. Re-generate template (in one case: xoopspoll_block_results.html).
5. Clear templates_c.

Why on earth would text boxes appear? Something I'm missing here?

Resized Image

Edit: it seems to be using xoops_block_poll.html when it should be using xoops_block_results.html?

Edit2: the above shot was taken while the site had jayjay's version installed.

8
Basie
Re: Odd glitch
  • 2004/8/2 10:02

  • Basie

  • Just popping in

  • Posts: 12

  • Since: 2004/7/3 2


Bump...

Anybody got any clues on this one?

9
hmagoo
Re: Odd glitch
  • 2004/8/6 10:14

  • hmagoo

  • Just popping in

  • Posts: 15

  • Since: 2004/7/31


I originally had a problem getting the template for the new block to generate. I must not have done things in the proer order. So I uninstalled the module, deleted the directory, deleted templates_c, then uploaded again and installed, and generated and everything is working well. Thanks for the mod.


10
jayjay
Re: Xoopspoll hack: view results in block (Was: Re: poll force view)
  • 2004/11/5 7:52

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


Hi everybody!

Due to an update of my site to XOOPS version 2.0.7, some mod_rewrite tricks don't work anymore :-/ Hope the issue gets fixed soon...

In the meanwhile you can download my xoopspoll hack from this url:
http://www.sint-niklaas.be/modules/wfdownloads/singlefile.php?cid=18&lid=22

Login

Who's Online

326 user(s) are online (251 user(s) are browsing Support Forums)


Members: 0


Guests: 326


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