Extension talk:VoteNY/Archive

How to add a tag on every page?
Add this in your LocalSettings.php file:

maxRating should be configureable
I think the maximum rating value should be configurable in LocalSettings.php because different sites have different needs. On my website e.g. I need a maximum rating of 10. --87.176.46.19 18:04, 16 March 2013 (UTC)

Agreed
I would like to see a configurable max rating as well. --2600:1011:B054:9195:F14F:6A93:7A6F:71B5 08:07, 6 July 2019 (UTC)

"You gave this..." overlaps following elements
"You gave this..." overlaps following elements, e.g. a horizontal line. See this screenshot: http://img854.imageshack.us/img854/1986/voteoverlap.png --87.176.46.19 18:18, 16 March 2013 (UTC)

Anonymous users seem to be able to vote
When using type=1 anonymous users (not logged in) seem to be able to vote when hovering the stars with the mouse. When a star is clicked the vote element disappears from the site. --87.176.46.19 18:23, 16 March 2013 (UTC)

don't work in 1.170
don't work in 1.170 —The preceding unsigned comment was added by 221.129.245.100 (talk • contribs). Please sign your posts with ~ !

Don't work here too
Can't vote

Looks like that everything is ok, but I can't select and vote.

Any ideas? —The preceding unsigned comment was added by 189.38.206.71 (talk • contribs). Please sign your posts with ~ !


 * Here too... MW 1.17.0 --Singlespeedfahrer 03:35, 5 November 2011 (UTC)
 * Get this JS-Error:

VoteNY is not defined onmouseoutonmouseout (Zeile 3) event = mouseout clientX=276, clientY=247 [Bei diesem Fehler anhalten] VoteNY.startClearRating("", "0.00", 0);
 * --Singlespeedfahrer 03:37, 5 November 2011 (UTC)


 * I totally forgot how much 1.17 and its ResourceLoader sucks. I'd suggest upgrading to 1.18.0 once it's out (beta 1 was released a few days ago). --Jack Phoenix (Contact) 22:17, 12 November 2011 (UTC)
 * Thank you for your response. MediaWiki 1.18.0 Beta1 doesn't fix it for me. Same JavaScript error as above (the solution you posted on the next section doesn't work too). Singlespeedfahrer 22:32, 15 November 2011 (UTC)

javascript load problem fix (running 1.17.0)
i added Vote.js to \skins\common and then included that file in LocalSettings:

$wgExtensionFunctions[] = 'efAddJquery'; function efAddJquery { global $wgOut; $wgOut->includeJQuery;

$wgOut->addScriptFile( 'Vote.js' );

}

works like a charm! --Baranyad 21:45, 14 November 2011 (UTC)


 * It might work, but it's a bad solution in pretty much every imaginable way. You'll find the correct solution on the jQuery page, under the Before ResourceLoader header &mdash; it's the solution which doesn't require changing anything else than your wiki's LocalSettings.php. --Jack Phoenix (Contact) 15:31, 15 November 2011 (UTC)

How to allow Anonymous users to vote?
how can I allow anonymous users to vote? Ektip (talk) 05:55, 4 April 2013 (UTC)


 * looks like the extension adds another "right" object which is by default not granted to anonymous users. you probably have to set that.

Hello,

In your LocalSettings.php, add the following line :

$wgGroupPermissions['*']['vote'] = true;

Works for me.

-- 16 June 2014

I think that for making it work with Anonymous users it should be:

$wgGroupPermissions['*']['voteny'] = true;

--Marenostrum2014 (talk) 22:52, 13 April 2015 (UTC)

I'm can't seem to get anonymous users voting rites. I have the following permissions set up, but an anonymous user still can not vote.

$wgGroupPermissions['*']['createaccount'] = true; $wgGroupPermissions['*']['voteny'] = true; $wgGroupPermissions['*']['vote'] = true; $wgGroupPermissions['*']['edit'] = false; $wgGroupPermissions['user']['edit'] = true; $wgGroupPermissions['sysop']['edit'] = true;

Example page: http://dsme.info/index.php?title=Baby_Bok_Choy_Stir-Fry

-- 4 May 2016

Working Example?
Anyone have a working example that they can link so I can check it out in action?
 * +1 Leucosticte (talk) 06:00, 21 October 2013 (UTC)
 * +1 I can't find an example either!

Refresh Page
None of the elements work after voting, removing a vote, etc. A page refresh is required to make anything work again. I've tried adding a location.reload(true) into the .js but this breaks the script even further. (new to js, bear with me) Even this would be a sub-par fix. Anyone else run into this problem/have any ideas?

Order
Hi, thanks for this great extension! I have one feature request though: I think it would be cooler if the order of the pages in Special:TopRatings is not alphabetical but based on the score. Cheers, --Till Kraemer (talk) 15:59, 7 October 2013 (UTC)

Refresh issue - add a message
Hi, I was trying to add a message to the display to encourage users to log in and vote: "Was this article helpful? Log in and rate it!". I was able to get the text to display, but when I click on the stars to vote, the text is not removed when the display refreshes. This results in two lines of text being displayed.

I also noticed that if I vote, I can't remove my vote until I reload the page. I also cannot change my vote until I reload the page. Reloading the page clears my duplicate message and allows me to change my vote.

Any help in addressing these concerns would be greatly appreciated. Thanks! Becky

Displaying Overall/Average votes?
Is there a way to display Overall/Average votes on a page?

VoteNY.php naming inconsistency
Just wanted to share an observation: After installing VoteNY for MW 1.21, I received a php error while running the update.php script. The problem was that the installation line in LocalSettings.php referenced a file in /extensions/VoteNY called VoteNY.php. However, the actual name of the file in the v1.21 is Vote.php. To fix, I changed the installation line to: require_once "$IP/extensions/VoteNY/Vote.php";

Easy enough to discover and fix but could confuse new users.

Anonymous and refresh issues
Hi, just wanted to let you know that I've got the same problems with this extension. Even with the line provided here (set group permissions for vote on true), it still won't work for anonymous voters. Whenever I go to my wiki anonymously, the rating bar just disappears when I click it. And then there's the refresh page thing. Every time I vote I have to refresh the page before I can do anything else regarding the vote bar. I hope there's a solution somewhere out there, especially for the anonymous rating thing.

Magic word to get current vote
Would it be possible to add another magic word to get the current rating (average vote) for the page? Similar to but returning the average vote instead of the number of people who have voted? I am marking up my pages with HTML microdata and I'd like to be able to include the page's rating in that. Thanks! -- Malvineous (talk) 10:05, 16 May 2015 (UTC)


 * I couldn't agree with this more, and looking through the php the extension uses, it doesn't seem like a large change (though just out of my lowly reach I'm afraid to ad myself!). This is particularly useful to get passed along to any semantic data stored on the site as well; meanwhile, I can't find as much use for the number of votes alone. Joshkking (talk) 03:36, 28 November 2015 (UTC)


 * This would also be very useful for me too. On my wiki a bunch of pages have votes, and when we use Semantic MediaWiki to list all those pages, it's not possible to show their rating (only the number of votes they received.)  This means visitors cannot sort of the list of pages such that the highest or lowest rated pages are first.  Special:TopRatings won't work in this case because it doesn't display all the other columns in the existing table.  What would be perfect is  and  to be duplicated as  and  so that we can put  in the listing template to display the rating for each page in the existing table we have. -- Malvineous (talk) 11:59, 14 December 2017 (UTC)

Changed to Unstable
I went ahead and marked this as unstable. I verified much of the behavior of the extension not working on my own wiki, and notes of these bugs have gone unresponded here for some time now. The last development release is noted as over a year ago.


 * And I've reverted that edit.


 * What behavior is/isn't working? Can you provide URLs to problematic pages? Screenshots/videos?
 * Stable code doesn't need much maintenance. VoteNY is relatively stable and feature-complete at this point.
 * Also, the last release &mdash; version 2.7 &mdash; was released in March 2015, which you would've found out by checking the commit log. People, myself included, sometimes for various reasons forget to edit the on-wiki documentation accordingly, so you should always treat it with a grain of salt. --Jack Phoenix (Contact) 01:58, 17 November 2015 (UTC)


 * Jack, forgive my lack of prudence and haste then. Browsing through the commit log, I believe much of the errors I experienced (and noted here on the talk page) were due to using the old version. I thought I had checked that but, for whatever reason, I was woefully wrong. My apologies. I'll try the extension back out when I get the chance. If I do and get the hang of it, maybe I can try and help clean some of the unmaintained documentation here as it does make things have a wear and want for attention in appearance after all. But grain of salt taken. :)

Regular vote box hides page content
Heads up that the regular vote box created by the plain "vote" tag (without the stars) seems to hide the rest of the page content as far as I can tell. Seems like most of us here are using the stars type voting, but I'm sure some would like the regular type if it needs be fixed as I suspect. Joshkking (talk) 03:39, 28 November 2015 (UTC)

"You gave this" detached from main container
Another heads up that the "You gave this" notifier currently seems to float towards the right on the page away from the actual voting container itself. For instance, if you have something like

The "You gave this" text will render on the same line as "Please rate this" but floated all the way to the right. Probably want to change that css as it looks quite tacky when it happens. --68.119.83.109 02:38, 13 December 2015 (UTC)


 * I was able to make this look a little prettier on mine using:

This puts everything on one line. The position and right attributes are really only used to cancel the previous attributes (I did this in my stylesheet rather than editing the hard code). I think the main reason for the weirdness is the order of the html elements themselves though. --68.119.83.109 23:54, 18 December 2015 (UTC)

Add the tag in all articles
Hi, is it possible to add the tag by default in all articles or when someone creates a new article ?

Thanks

update failure
hey there, VoteNY doesn't work on my wiki. when I try to save a page with a tag, a database error occurs. I tried to update the database via the /mw-config web-updater but there happend this:

MediaWiki internal error.

Original exception: [78bc6a5e] /mw-config/?page=ExistingWiki Exception from line 341 of/homepages/0/htdocs/mywiki/includes/MagicWord.php: Error: invalid magic word 'NUMBEROFVOTESPAGE' Backtrace:
 * 1) 0 /homepages/0/htdocs/mywiki/includes/MagicWord.php(264): MagicWord->load(string)
 * 2) 1 /homepages/0/htdocs/mywiki/includes/parser/Parser.php(5159): MagicWord::get(string)
 * 3) 2 /homepages/0/htdocs/mywiki/extensions/VoteNY/VoteHooks.php(200): Parser->setFunctionHook(string, string, integer)
 * 4) 3 [internal function]: VoteHooks::setupNumberOfVotesPageParser(Parser)
 * 5) 4 /homepages/0/htdocs/mywiki/includes/Hooks.php(206): call_user_func_array(string, array)
 * 6) 5 /homepages/0/htdocs/mywiki/includes/GlobalFunctions.php(3995): Hooks::run(string, array, NULL)
 * 7) 6 /homepages/0/htdocs/mywiki/includes/parser/Parser.php(279): wfRunHooks(string, array)
 * 8) 7 /homepages/0/htdocs/mywiki/includes/parser/Parser.php(291): Parser->firstCallInit
 * 9) 8 /homepages/0/htdocs/mywiki/includes/parser/Parser.php(5000): Parser->clearState
 * 10) 9 /homepages/0/htdocs/mywiki/includes/parser/Parser.php(377): Parser->startParse(Title, ParserOptions, integer, boolean)
 * 11) 10 /homepages/0/htdocs/mywiki/includes/installer/Installer.php(631): Parser->parse(string, Title, ParserOptions, boolean)
 * 12) 11 /homepages/0/htdocs/mywiki/includes/installer/WebInstaller.php(676): Installer->parse(string, boolean)
 * 13) 12 /homepages/0/htdocs/mywiki/includes/installer/WebInstallerPage.php(392): WebInstaller->getInfoBox(string)
 * 14) 13 /homepages/0/htdocs/mywiki/includes/installer/WebInstallerPage.php(380): WebInstallerExistingWiki->showKeyForm
 * 15) 14 /homepages/0/htdocs/mywiki/includes/installer/WebInstaller.php(280): WebInstallerExistingWiki->execute
 * 16) 15 /homepages/0/htdocs/mywiki/mw-config/index.php(79): WebInstaller->execute(array)
 * 17) 16 /homepages/0/htdocs/mywiki/mw-config/index.php(38): wfInstallerMain
 * 18) 17 {main}

Exception caught inside exception handler: [bfe851b4] /mw-config/?page=ExistingWiki Exception from line 341 of /homepages/0/htdocs/mywiki/includes/MagicWord.php: Error: invalid magic word 'NUMBEROFVOTES' Backtrace:
 * 1) 0 /homepages/0/htdocs/mywiki/includes/MagicWord.php(264): MagicWord->load(string)
 * 2) 1 /homepages/0/htdocs/mywiki/includes/MagicWord.php(764): MagicWord::get(string)
 * 3) 2 /homepages/0/htdocs/mywiki/includes/MagicWord.php(933): MagicWordArray->getHash
 * 4) 3 /homepages/0/htdocs/mywiki/includes/parser/Parser.php(3429): MagicWordArray->matchStartToEnd(string)
 * 5) 4 /homepages/0/htdocs/mywiki/includes/parser/Preprocessor_DOM.php(1179): Parser->braceSubstitution(array, PPFrame_DOM)
 * 6) 5 /homepages/0/htdocs/mywiki/includes/parser/Parser.php(3281): PPFrame_DOM->expand(PPNode_DOM, integer)
 * 7) 6 /homepages/0/htdocs/mywiki/includes/parser/Parser.php(637): Parser->replaceVariables(string, boolean)
 * 8) 7 /homepages/0/htdocs/mywiki/includes/parser/Parser.php(5027): Parser->preprocess(string, NULL, ParserOptions)
 * 9) 8 /homepages/0/htdocs/mywiki/includes/cache/MessageCache.php(1010): Parser->transformMsg(string, ParserOptions, NULL)
 * 10) 9 /homepages/0/htdocs/mywiki/includes/Message.php(1023): MessageCache->transform(string, boolean, Language, NULL)
 * 11) 10 /homepages/0/htdocs/mywiki/includes/Message.php(703): Message->transformText(string)
 * 12) 11 /homepages/0/htdocs/mywiki/includes/Message.php(766): Message->toString
 * 13) 12 /homepages/0/htdocs/mywiki/includes/exception/MWException.php(120): Message->text
 * 14) 13 /homepages/0/htdocs/mywiki/includes/exception/MWException.php(202): MWException->msg(string, string, string)
 * 15) 14 /homepages/0/htdocs/mywiki/includes/exception/MWException.php(238): MWException->reportHTML
 * 16) 15 /homepages/0/htdocs/mywiki/includes/exception/MWExceptionHandler.php(45): MWException->report
 * 17) 16 /homepages/0/htdocs/mywiki/includes/exception/MWExceptionHandler.php(141): MWExceptionHandler::report(MWException)
 * 18) 17 [internal function]: MWExceptionHandler::handle(MWException)
 * 19) 18 {main}

Rate several different pages on the same page?
Hi, I was wondering if it would be possible to edit the current code so that one can rate several different pages from one page? (eg. rate the "home page", "contact page", and the "register page" all from the "review page?" If so, how would I go about this? Or any other method that would get a similar result would be very welcome. It seems like at the moment you can only rate the page you are on itself; any more options for what is being rated would be very useful. Thanks for any replies.

Installation/MediaWiki 1.28.0
Hi, thanks for this cool extension! Everything works fine, but I noticed that adding  to LocalSettings.php doesn't work anymore, since there is no VoteNY.php file in the current extension folder (neither is the file Vote.php). works though. Cheers, --Till Kraemer (talk) 17:28, 29 November 2016 (UTC)
 * Indeed the docu was wrong here. I amended the docu today. Thanks a lot for noting. --&#91;&#91;kgh&#93;&#93; (talk) 16:59, 17 November 2017 (UTC)

How to add more than one quiestion or subject to vote?
Hi there. I would like to know if there is a chance to have more than one vote item per page. Thankyou. Lucasmask (talk)

About the to-do list
Is the list still current? If yes it will probably be better to move this as a task to phabricator instead of keeping this on the documentation page, yes? Cheers --&#91;&#91;kgh&#93;&#93; (talk) 16:58, 17 November 2017 (UTC)


 * Answering self. Just found . I will remove this from he docu page. Cheers --&#91;&#91;kgh&#93;&#93; (talk) 16:52, 20 November 2017 (UTC)
 * Hi, sorry for not answering earlier! Thanks for editing the documentation, I appreciate it :) SamanthaNguyen (talk) 22:14, 20 November 2017 (UTC)

Regarding integration of Extension:VoteNY and Flow
I am working on a MediaWiki project. I want to integrate this 'Extension:VoteNY' with 'Extension:StructuredDiscussions' a.k.a 'Flow' so that a vote counter appears with each user-reply. I want to know if this is possible..? and can somebody please guide me?

--Falcopragati (talk) 06:13, 21 June 2019 (UTC)Pragati Sharma