Discussion Utilisateur:Serenity/poll.php

Un article de Wikipédia, l'encyclopédie libre.

Sommaire

[modifier] error with mediawiki 1.6.5, php 4.3.9, mysqk 5.0.20

[client 191.254.42.78] PHP Parse error:  parse error, unexpected $ in /export/home/frtdevrep/www/mediawiki/extensions/poll.php on line 147, referer: http://frontools/wiki/index.php?title=Main_Page

any idea ? Thx

Try the last version of poll.php, I've just uploaded it... --Serenityping 31 mai 2006 à 01:40 (CEST)

I have tested with your last release, upgraded to php 5.1.4 and have already the same error.

PS: J'ai tout installé sauf les images et ca ne fonctionne pas , je ne pense pas que ce soit ça ?

Je ne sais pas ce que j'ai fait, mais cela fonctionne maintenant.

[modifier] Quelques demandes de nouvelles fonctionnalitées

  1. Est il possible d'ajouter facilement une interdiction de vote pour les personnes non identifiées ?
  2. Est il possible d'ajouter qq chose pour qu'un personne annule sont choix sur un sondage ?
  3. Enfin plus dure a mon avis, est il possible d'avoir des choix multi-critères ?
Je pense que pour les autres fonctionnalités, ça dépend des besoins de site web. Pour WikiPoll, je compte faire un système pour afficher la liste des sondages auxquels on n'a pas répondu, mais ça sera probablement inutile pour d'autres wikis... --Serenityping 31 mai 2006 à 22:07 (CEST)
Je réponds qd meme à tes question : 1) tres facile, 2) c'est deja automatique s'il veut changer son choix il clique ailleurs 3) plus dur, avec quelle présentation des résultats ? --Serenityping 31 mai 2006 à 22:16 (CEST)

[modifier] modif

pour le 1 j'ai fait un hack mais en dur, d'une manièrer générale il faudrait avoir une premiere ligne d'option permettant de preciser les options: "STATS | NOCOMMENTS | REQUIRE_AUTH | ....) je vais regarder Merci

[modifier] Signez vos messages SVP

sinon je comprends pas combien de personnes me parlent --Serenityping 31 mai 2006 à 22:04 (CEST)

Désolé pour l'anonymat, tous les messages de la discussion viennent de ma part jusqu'a maintenant. Christophe.

[modifier] Preventing users not logged in from participating in the polls...

hey.. great app , is there any way i can prevent users who arent logged in from contributing to the poll??

thanks, AJ

hi, you just have to add a "if" line just before the voting process :
if ($wgUser->mName != "")
if ($_POST['poll_ID'] == $ID) // PROCESS THE VOTE
...
--Serenityping 14 juin 2006 à 13:54 (CEST)
Awesome, works like a charm.. thanks a ton.

[modifier] Kudos!

This is truly a great extension, I just installed it on my Wiki www.OpenTutorial.com and everything worked perfectly. Thanks for developing such an aweson extension! -Hapa

[modifier] Disable comments?

I just installed poll.php on my wiki. However, it does not look as good as the poll on the WikiPoll site. How can I make my polls look the same?

Also, I do not want my polls to have comments. Is it possible to disable the comments?

I think by deleting the last <FORM> in the 'Building HTML' section of Poll.php
- Vic
I think this should work. --Serenityping 28 juillet 2006 à 14:23 (CEST)

[modifier] ip2dns.php

Can you put also the ip2dns script on this site. I'm very interested. THNX - Vic

Done :) --Serenityping 28 juillet 2006 à 14:32 (CEST)

[modifier] Some comments

  • WikiPoll is seriously broken :( doesn't make this look very good. Can it be fixed? I really want to see it in action! (I created a test poll at http://www.opentutorial.com/User:Pfctdayelise but I want to see people actually using them too)
Seems to be working now (august 1 23:20) http://wikipoll.free.fr/mediawiki-1.6.5/index.php?title=Fun
  • The syntax should be poll not Poll, lowercase is pretty standard
They both work, the TAG seems case insesitive
  • What exactly is the "message" thing at the bottom of the poll? I really can't figure out what it is for...
You can leave a comment about the poll, this will be saved and others can view it
Just type Enter to register a message. This is a quick discuss page ersatz. --Serenityping 3 août 2006 à 04:16 (CEST)
  • The buttons look odd. It would look more standard with radio buttons and a separate "vote" button that you need to press to register the vote.
I disagree. I prefer one click to two clicks. It's simpler. --Serenityping 3 août 2006 à 04:16 (CEST)

I imagine it wouldn't be a huge stretch to expand this to make some kind of "rate it" extension, where you can very simply give each page (or even section!) a 5 point or 5 star rating, for example. Or even 10 point a la "Hot or not" :) The major difference is showing the average result rather than the separate vote tallies.

This would be nice indeed!
Why not. I usually use the "This poll isn't interesting" answer into polls to find out what people are interested in. --Serenityping 3 août 2006 à 04:16 (CEST)

Suggestion: make the modification I made to v1.4. I added a line near the top of function renderPoll():

  $imagePath = $wgScriptPath . "/images/";

and then made the .gif src references something like this:

  src="'.$imagePath.'/button.gif"

I am running this on a WIMP platform from an aliased directory, the true "root" isn't accessible from the webserver.

Anyway this is quite cool, I hope you keep working on it! cheers, m:User:pfctdayelise 1 août 2006 à 14:21 (CEST)

Thanks. Actually, I'm currently working on another project (Wikipainting). I will keep maintenance for WikiPoll, but it's no longer my first priority.--Serenityping 3 août 2006 à 04:16 (CEST)