Commit graph

10 commits

Author SHA1 Message Date
Jack Phoenix 4d4bc6c15a Fix API calls in MW 1.26 so that voting works again
Kudos to legoktm for the fix!

Change-Id: Id3bffb6f8088699ac931bcadf4dfb5cac4e80ade
2016-08-31 12:05:34 +03:00
Jack Phoenix 1e23ff6a07 Version 2.8: extension registration support, replace AJAX stuff with an API module
Also some related cleanup (removal of wfProfile* stuff, etc.).

Change-Id: Id8a993e71ddca7bfbf3452725300167698ce3135
2016-08-09 05:14:02 +03:00
Jack Phoenix 8762715a91 Allow star rating to be used outside of the page which has the <vote type=1 /> tag
This ability was removed in version 2.4 (r108076) in favor of using the
wgArticleId JS global, but doing so essentially broke things like the
ImageRating extension, which rely on knowing a "remote" page's ID since
wgArticleId is obviously 0 for special: pages.

Change-Id: I644cbd57c11114758f229ca052c51328513e59a1
2015-05-14 03:59:17 +03:00
Jack Phoenix 33f5015197 Version 2.7: various JS fixes and stuff
* CSS and JS are now separate RL modules
* JS rewritten to use jQuery instead of sajax
* Fixed a scoping bug from the previous patchset
* Fixed other scoping bugs so that you can revoke your vote w/o reloading the page, no matter what
* JS module is not loaded for users w/o the 'voteny' user right
* JS is not loaded on Special:TopRatings anymore, it was only loaded there ever back when this extension had inline JS to prevent over 9000 JS errors, plus it wouldn't have worked because wgArticleId is 0 for special pages
* Special page alias file added

Change-Id: I6668238a0ab6272b0a7b3b167832ebb2d3abe2c2
2015-05-14 00:00:34 +03:00
Daniel A. R. Werner 1dcdc71935 Fix reverting a vote without reload
Before it would not work to vote up and immediately vote down again
without reloading the page inbetween. Also added some TODO for cleanin
up the JavaScript into a more reusable widget.
Refactored the code a little to use a constructor for CodeNY and moving
towards a widget architecture.

Change-Id: Ia45adec001f32daf42e076381e933a9ec2cffabf
2015-05-13 19:09:44 +03:00
Jack Phoenix 727c6d790b Use wgExtensionAssetsPath + mw.config.get() in the JS file
Change-Id: Ibeaa774ebd569e2883ba9e50c6a8140aadf82c4c
2014-09-21 20:03:50 +03:00
saper 5daeba21b7 PostgreSQL support for VoteNY
Use integer value for votes to count averages.

Initial contributor: Sebastian Fiedler <basti@unix-solution.de>

Bug: 51441

Change-Id: I9c09b84d3652449d3328586332c636a7a676273a
2013-12-01 00:27:55 +01:00
Jack Phoenix 87054b4f3c change message key as per TWN's request (https://translatewiki.net/wiki/Thread:Support/New_stuff_to_check) + bump version number 2012-08-29 19:05:53 +03:00
Jack Phoenix a3c82a518b VoteNY: actually make this work under 1.18+, not just in ResourceLoader's debug mode.
Changelist:
*removed backwards-compatibility code
*used HTML5 data attributes to store various information that we access in the JS file
*incremented the extension's version number
*removed ancient vote key stuff (the "vote key" was being passed to the AJAX function but it wasn't used in any of the functions)
*updated Linker class, that class is now static
*killd $wgTitle

Some things are now a bit slower, i.e. if you click on the green voting box, then click again when the unvote link appears, it doesn't seem to change back to "vote" again...but at least it should work now.
2012-01-04 19:51:44 +00:00
Jack Phoenix ae507a6ca3 phase II social tools: VoteNY. Tested and built against MW 1.16.0. Can be used without the core social tools package (SocialProfile extension). 2011-09-14 15:26:09 +00:00