Extension talk:CommunityVoice

How to display top-rated titles in a category
Please give me some advice!My website need display top 10 titles in a category!

Used Where?
Hi there, on what WM wiki is this used? SJ
 * I asked this very question yesterday, see User_talk:Trevor_Parscal, being used on http://usability.wikimedia.org/ -- Dr DBW |  talk  03:02, 27 February 2009 (UTC)

MySQL error
I receive this error: Error returned by MySQL database is «1146: Table 'YOURWIKI.cv_ratings_votes' doesn't exist (localhost)».

But what does the following mean?

''Check your privileges, one of the possibles reasons it is the user have enough rights to create the tables required. Then try to run manually the Initialize.php through the shell. Go to the Mediawiki extensions folder and write the following code.''

Could you explain it in detail?

--dvL 09:58, 2 March 2009 (UTC)


 * When using CommunityVoice, certain database tables need to exist in your database. To create these tables, you need to run some code. The code you need to run is not a web page though, so you need to have access to the command line. If you are installing on your local computer you can just open up a command prompt or terminal (depending what your operating system calls it) and type "cd " for example, where  is the full file path to your wiki installation. from there you can type "cd extensions/CommunityVoice/CLI" to change to the directory which contains the command line interface scripts for the CommunityVoice extension. Finally you can run the line mentioned above: "php Initialize.php --confirm=yes" which invokes the php program, tells it to run the Initialize.php script and passes yes as the value for the confirm argument. The script will run and create the database tables for you. Please note you may have to have root access to perform these operations - in which case you might need to use the sudo command before invoking php like "sudo php Initialize.php --confirm=yes". All of this information is part of a very common process for preparing your wiki for use with certain extensions. I hope that is clear and helpful. 75.149.49.114 17:35, 3 March 2009 (UTC)


 * Thanks, this was very helpful..
 * --dvL 08:14, 4 March 2009 (UTC)


 * Edit: I entered this as admin..
 * C:\xampp\php>php C:\xampp\htdocs\wiki\extensions\CommunityVoice\CLI\Initialize.php --confirm=yes

db prefix is another cause for sql errors
All of my tables are prefixed with mw_ which is ok for all extensions but for some reason CommunityVoice.sql ignores that. Fixing this was easy with phpmyadmin I just renamed 'cv_ratings_votes' to 'mw_cv_ratings_votes'.

Strange behavior
Another question: The "strange behavior" problem (   message instead of the correct message 0 / 5 (0 votes cast)) that is mentioned on the main page seems to be resolved at the Wikimedia nomination site. What was changed?

--dvL 09:57, 4 March 2009 (UTC)

Yes, what was changed?? -- 15:15, 16 March 2009 (GMT)

Not working with IE and Opera
Only FF shows this extension corect..


 * This has been fixed in r48522. The cause was the use of null as a key in a JavaScript object.

Failing to register
Running MW 1.15aSVN and having set

in LocalSettings returns the following error:
 * 1) require_once( "$IP/extensions/ClientSide.php" );
 * 2) require_once( "$IP/extensions/CommunityVoice/CommunityVoice.php" );

Warning: call_user_func(CommunityVoice::registerModules) [function.call-user-func]: Unable to call CommunityVoice::registerModules in /chroots/dwadmin/home/dwadmin/htdocs/includes/Setup.php on line 310

Both files exist and are at their proper places :/

Was there a resolution to this?

 * I'm getting the same problem. Was there ever a resolution to this?
 * It seems I'm third to report this problem. I'm running mediawiki 1.13.2 and I require_once the correct php files, I know because in special:version both ClientSide and CommunityVoice appear but I get the same error above - Unable to call CommunityVoice::registerModules. --80.179.206.193 13:33, 9 December 2009 (UTC)
 * solved it, you have to go and edit extensions/CommunityVoice/CommunityVoice.php and instead of registering the php method as 'CommunityVoice::registerModules', register it as an array like so: array('CommunityVoice', 'registerModules'). Just as stated here: http://php.net/manual/en/function.call-user-func.php in the parameter 'function'.

Quickie review
Couple quick notes...


 * Some functions in ClientSide look like they duplicate code in Xml.php
 * handleScaleVoteCall looks like it will return old data from slave, so reported total after vote will not include the vote (which has only just been inserted to the master)

-- brion 18:37, 13 May 2009 (UTC)

Is it possible to install the DB without Commandline-Access (phpMyAdmin)?
Hi,

i have no commandline on my webspace/server, but i can access the DB through phpMyAdmin.

Could anyone tell how exactly the table has to be named/formed?

78.52.99.77 17:51, 12 October 2009 (UTC)

Yes, it is.
I found this interesting looking file CommunityVoice/CommunityVoice.sql - and adapted it to my needs, using my "absolute-non-existing-MySQL-Trial-and-Error-Know-How".

This is how it went: CREATE TABLE yourtableprefix_cv_ratings_votes (   -- Category of item being rated    vot_category VARBINARY(255) NOT NULL default ,    -- Title of item being rated    vot_title VARBINARY(255) NOT NULL default ,    -- User who made the rating, 0 for anons (however it shoudn't be allowed)    vot_user INTEGER NOT NULL default 0,    -- Value of rating    vot_rating INTEGER NOT NULL default 0,    --     INDEX vot_category_title ( vot_category, vot_title ),    INDEX vot_category_title_user ( vot_category, vot_title, vot_user ),    INDEX vot_category_title_rating ( vot_category, vot_title, vot_rating ) );
 * Login to your phpMyAdmin
 * Click on SQL which gives you a Window where you can copy&paste some SQL-Commands
 * Copied this code into the window and executed it by clicking on OK (adapt yourtableprefix accordingly):

Works ;)

78.52.99.77 18:15, 12 October 2009 (UTC)

Is it possible to call CommunityVoice-MediaWiki-Extension-Function from MonoBook.php?
Asked this Question in mwusers-Forum:
 * http://www.mwusers.com/forums/showthread.php?t=12451

Answers taken here or there.

85.177.88.207 15:52, 13 October 2009 (UTC)

Can't do multiple ratings on one page
They all clump up where the first rating is defined. I'm assuming this bug has to do with an html element referenced by id and not by class or something. Anyway, this officially killed my ability to use this extension. Also another thing is that the transparent png's are no good for ie6.

Just my 2 cents.

--80.179.206.193 15:23, 9 December 2009 (UTC)

special:ratings parser hook not being set, no errors
I've installed: from calling SVN checkout. Both of them show being installed. However, it is not registering the ratings:scale tag (it's not showing up on the Version page, like it does on usability.wikimedia.org, or parsing them when using). No httpd/log'd errors. Any suggestions? JonathanWilliford 03:23, 28 December 2009 (UTC)
 * ClientSide (Version 0.1.1) (r60437)
 * CommunityVoice (Version 0.1.0) (r60437)

Database: One voting, one entry?
Hi, i just tried to make two votes on my wiki and found that there's two entries. If my wiki, for example, has only 1000 pages, but there's 100,000 ratings, it means that i'm going to have 100,000 entries only for so small number of pages. Is it possible to make a change on it in the future?

vot_category 	vot_title 	vot_user 	vot_rating CATEGORY 	TITLE 	1 	4 CATEGORY 	TITLE 	2 	5

Allow anonymous users to vote
hi, i'm wondering if it's possible to allow unregistered users to vote? Thanks! --Dullmau 21:34, 9 June 2010 (UTC)

i would like to know this as well. --62.178.208.236 08:04, 6 September 2010 (UTC)

Nothing shows up after I've installed CommunityVoice - Help?
I've installed on my wiki on this page: http://www.theoxfordunderground.com/index.php/Test

The page currently simply consists of a stub sentence and a ratings bar. No rating bar shows up for me. I've gone through and made sure everything is installed correctly and the table exists properly etc. I've tried all sorts of different categories (existing) and names of pages (existing). I've tried non-existent categories and phrases. --Shanarosenberg 23:18, 12 June 2010 (UTC)

OK I solved this myself -- I put the require in LocalSettings.php at the end instead of at the beginning of the file. Hope this helps anyone else with the same trouble. --Shanarosenberg 22:39, 14 June 2010 (UTC)

Rating Start in Sidebar?
I want to use set Rating-Stars in left Sidebar. The goal is to have these stars on every page without have to change every page. So I modified Mediawiki:Sidebar and added the fallowing code. But no Rating Stars were visible.
 * Rating

Missing class: CsHtml
I am running CV 'out of the box', and I get the Apache error Class 'CsHtml' not found in [installdir]/extensions/CommunityVoice/Modules/Ratings.php on line 176

I am using MediaWiki 1.15.3 ClientSide 0.1.0 CommunityVoice 0.1.0

Thanks