A plugin to help you to embed GovRight Corpus widgets such as list of discussions, articles, comments, etc, into your site.
- Download
GovRight Corpus Widgets
. - Upload the
'wp-corpus-widgets'
directory to your'/wp-content/plugins/'
directory, using your favorite method (ftp, sftp, scp, etc...) - Activate plugin from your Plugins page.
- Go to
"GovRight" > "Corpus Widgets"
in the wordpress admin panel and check plugin page. - Insert the shortcode where you want to see the app.
[corpus-discussion]
- widget provides information about discussion(law): title, description, statistics[corpus-discussions]
- widget shows all discussions(laws) that belongs to specific user[corpus-recent-comments]
- widget provides info about recent discussion(law) comments: discussion title, comment author, comment date, truncated comment text[corpus-articles]
- widget provides info about sorted by certain criteria articles.
locale
- locale code likeen
,ru
, etc, to set initial app localeslug
- obligatory parameter, discussion(law) slug
sort
- optional parameter, defines type of sorting. Default valuesort="top-commented"
. Available sorting parameters:sort="top-voted"
- most up voted articlessort="top-commented"
- most commented articlessort="votesDown DESC"
- most down voted articlessort="comments ASC"
- less commented articlessort="votes DESC"
- biggest total number of votes (up votes + down votes)
2.limit
- optional parameter, defines limit of displayed articles. Default value limit="10"
user
- obligatoy parameter, defines user id
[corpus-discussion slug="test-law-slug:default"]
[corpus-discussion locale="fr" slug="test-law-slug:default"]
[corpus-discussions locale="en" user="555a5028495918dc4500f77e"]
[corpus-recent-comments slug="test-law-slug:default"]
[corpus-articles slug="test-law-slug:default" sort="top-voted"]
[corpus-articles slug="test-law-slug:default" sort="votesDown DESC" limit="3"]
It is possible for you to customize the look and feel of the widgets by customizing their HTML and CSS. You can do this via the Wordpress Admin panel under the menu section titled "GovRight" > "Corpus Widgets"
where is listed available variables and displayed default templates for HTML nd CSS.
wp-corpus-widgets uses the MIT license. See LICENSE for more details.