Stub | |
This page is a stub of information related to the not-very-well-documented simple wiki ratings feature. |
Enabling and Configuration | |
Set "Simple wiki ratings" under Admin Home, Wiki, Features (tiki-admin.php?page=wiki&cookietab=2) |
FAQ | |
|
From lib/prefs/wiki.php: | |
'wiki_simple_ratings' => array( 'name' => tra('Simple wiki ratings'), 'description' => tra('Enable users to rate articles based on a simple numeric scale.'), 'type' => 'flag', 'default' => 'n', ), 'wiki_simple_ratings_options' => array( 'name' => tra('Wiki rating options'), 'description' => tra('List of options available for the rating of wiki pages.'), 'type' => 'text', 'separator' => ',', 'filter' => 'int', 'default' => range(1, 5), ),
|
From tiki-admin.php: | |
"rating" => array( 'position' => '-300px -215px;', 'icon' => 'img/icons/large/rating.png', 'title' => tr('Rating'), 'help' => 'Advanced+Rating', 'disabled' => $prefs['wiki_simple_ratings'] !== 'y' && $prefs['rating_advanced'] !== 'y' && $prefs['article_user_rating'] !== 'y', ),
|
From lib/rating/ratinglib.php | |
References database table "tiki_user_votings". function get_options( $type ) { $pref = 'rating_default_options'; switch( $type ) { case 'wiki page': $pref = 'wiki_simple_ratings_options'; break; case 'article': $pref = 'article_user_rating_options'; break; } global $tikilib; return $tikilib->get_preference($pref, range(1, 5), true); }
|
From lib/test/rating/RegisterVoteTest.php | |
function testGetWikiPageRange() { global $prefs; $prefs['wiki_simple_ratings_options'] = range(2, 8); $lib = new RatingLib; $this->assertEquals(range(2, 8), $lib->get_options('wiki page')); }
|
From templates/tiki-show_page.tpl | |
$tiki_p_assign_perm_wiki_page appears to be a bug. Too strong. Should perhaps be $tiki_p_wiki_vote_ratings . {if $prefs.feature_wiki_ratings eq 'y'} {include file='poll.tpl'} {/if} {if $prefs.wiki_simple_ratings eq 'y' && $tiki_p_assign_perm_wiki_page eq 'y'}{/if}
|
From lib/core/Tracker/Field/Rating.php: | |
$votings = TikiDb::get()->table('tiki_user_votings'); |
From lib/polls/polllib_shared.php: | |
$query = "select user from `tiki_user_votings` where `optionId`=?";
|
From lib/rating/ratinglib.php: | |
$joins = array( '`tiki_user_votings` `uv`' );
|
From lib/surveys/surveylib.php: | |
$query = 'delete from `tiki_user_votings` where `id`=?'; |
lib/test/rating/AggregationTest.php: | |
TikiDb::get()->query('DELETE FROM `tiki_user_votings` WHERE `id` LIKE ?', array('test.%')); |
Fromlib/test/rating/RegisterVoteTest.php: | |
return TikiDb::get()->fetchAll('SELECT `user`, `id`, `optionId` FROM `tiki_user_votings` WHERE `id` LIKE ? ORDER BY `user`, `id`, `optionId`', array('test.%')); |
lib/tikilib.php: | |
$query = "select count(*) from `tiki_user_votings` where `user`=? and `id`=?";
|
lib/trackers/trackerlib.php: | |
$userVotings = $this->table('tiki_user_votings');
|
lib/userslib.php: | |
$this->query('update `tiki_user_votings` set `user`=? where `user`=?', array($to, $from)); |
lib/wiki-plugins/wikiplugin_votings.php: | |
$votings = TikiDb::get()->table('tiki_user_votings');
|
From other pages | |
{CODE(wrap="0")}$ grep -C5 -iR "wiki_simple_ratings" * | grep -v -e templates_c -e temp\/cache #redacted out the above templates/admin/include_rating.tpl- Plugin disabled Plugin preference cannot be executed. templates/admin/include_rating.tpl- templates/admin/include_rating.tpl-templates/admin/include_rating.tpl- templates/admin/include_rating.tpl- |