-
Notifications
You must be signed in to change notification settings - Fork 3
/
readme.txt
162 lines (113 loc) · 5.49 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
=== bbPress Votes ===
Contributors:grosbouff
Donate link:http://bit.ly/gbreant
Tags: bbPress, vote, votes, rate, rating, ratings, reputation,BuddyPress
Requires at least: 4.1.1
Tested up to: 5.3.2
Stable tag: trunk
License: GPL2+
Allows logged users to vote up or down to topics and replies inside bbPress, just like you can on StackOverflow for example.
== Description ==
Allows logged users to vote up or down to topics and replies inside bbPress, just like you can on StackOverflow for example.
* Ajaxed
* BuddyPress integration
* Votes log with users icons
* Options page
* Allow to filter a query to sort posts by votes, see FAQ.
* Hooks and filters to extend the plugin
* Templates functions to use in your themes (see the file **bbpvotes-template.php**); eg. *bbpvotes_get_author_score()* to get an author's score (karma)
= Demo =
We don't have a running demo anymore. If you use this plugin and would like to be featured here, please [contact us](https://github.com/gordielachance/bbpress-votes/issues/5)
= Donate =
Donations are needed to help maintain this plugin. Please consider [supporting us](http://bit.ly/gbreant).
This would be very appreciated — Thanks !
= Contributors =
Contributors [are listed here](https://github.com/gordielachance/bbpress-votes/contributors)
= Bugs/Development =
For feature request and bug reports, please use the [Github Issues Tracker](https://github.com/gordielachance/bbpress-votes/issues).
If you are a plugin developer, [we would like to hear from you](https://github.com/gordielachance/bbpress-votes). Any contribution would be very welcome.
== Installation ==
Upload the plugin to your blog and Activate it.
== Frequently Asked Questions ==
= I can’t see the vote links =
Users cannot vote for themselves. If you are the author of a topic or reply, the vote links won’t be available; the score only will be shown.
= Can I filter the query to sort posts by votes ? =
Yes, you can sort the posts by score or votes count, using the query variable 'bbpvote_sort'.
Allowed values are 'score_desc', 'score_asc', 'count_desc', 'count_asc'.
Example of a [query](https://codex.wordpress.org/Class_Reference/WP_Query) that will fetch the 5 last topics, ordered by score (desc) :
`<?php
$best_rated_topics_args = array(
'post_type' => bbp_topic_post_type(), //or 'topic'
'posts_per_page' => 5,
'bbpvote_sort' => 'score_desc' //plugin
);
$best_rated_topics = new WP_Query( $best_rated_topics_args );
?>`
See function sort_by_votes() for more details.
= How can I customize the look of the vote links ? =
The best way to customize the links is to setup some CSS rules in your theme.
Check [this example on CodePen](http://codepen.io/anon/pen/KpwrMp) to see how to have images displayed instead of text.
If you need more complex customization, you can filter the links using those hooks :
* bbpvotes_get_vote_up_link
* bbpvotes_get_vote_down_link
* bbpvotes_get_vote_score_link
== Screenshots ==
1. A single reply with score, vote up and vote down links (top) and vote log (after reply content)
2. Plugin's options page
== Changelog ==
= 1.2.4 =
* karma transient fix
= 1.2.3 =
* new BuddyPress profile submenu : forum>karma, where replies are sorted by score
= 1.2.2 =
* Fixed sort topics by votes
= 1.2.1 =
* Fixed bug when displaying topic score
* Fixed typo in settings
* Rebuild scores option
= 1.2 =
* Migrate options page
* Option to choose the 'score' unit (pts, kudos, ...)
* Option to choose which post types are enabled for voting (topics/replies)
* Use Dashicons instead of fontAwesome in some places
* Use a transient to cache author's karma
= 1.1.0 =
* supports unvoting (by reclicking the link)
* "sort by votes" link before topics loop
* Added option to hide voters identity in the vote log
* Added option to disable downvoting
* Added options page (under Settings > Forums)
* Display the score of an topic next to its author when showing a topics list
* Display the "reputation" score of an author next to its name when displaying a reply
= 1.0.9 =
* SCSS files
* CSS bug fix (https://wordpress.org/support/topic/avatars-not-in-a-row)
= 1.0.8 =
* Removed the function 'author_link_karma' hooked on the filter 'bbp_get_reply_author_link' as it shows up everywhere.
It's easier to edit the bbPress templates and to call bbpvotes_get_author_score().
= 1.0.7 =
* New template functions to get votes count by user : bbpvotes_get_votes_down_by_user_count(), bbpvotes_get_votes_up_by_user_count(), bbpvotes_get_votes_total_by_user_count()
* New template functions to get an author's score : bbpvotes_get_author_score()
* Embeds author's karma (score) under its name, when showing a reply
* Russian translation by VovaZ
= 1.0.6 =
* Added two meta keys : 'bbpvotes_vote_score' (total score) and 'bbpvotes_vote_count' (total votes).
* Filter query to sort items by score or votes count.
= 1.0.5 =
* Fixed crash when BuddyPress is not installed
= 1.0.4 =
* Append votes log with ajax when user has voted
* French translation
* Added pot files for translations
= 1.0.3 =
* Replaced ajaxurl with bbpvotesL10n.ajaxurl in bbpvotes.js
= 1.0.2 =
* Fixed $user_vote_link link in bbpvotes_get_post_votes_log()
* Fixed ‘bbpvotes-post-no-score’ class in bbpvotes_get_score_link()
= 1.0.1 =
* Minor fixes
= 1.0 =
* First release
== Upgrade Notice ==
== Localization ==
If it hasn't been done already, you can translate the plugin and send me the translation. I recommand [Loco Translate](https://fr.wordpress.org/plugins/loco-translate/) to work on your translations within Wordpress.