Sentiment Bar Module

The modified rating modules were made by JochoiJochoi for the Chinese branch, and were adapted to the INT branch by JochoiJochoi.

Special thanks to the following people:
Boyu12Boyu12 for method to avoid displaying error message in sentiment bar when total page vote is 0
W AsrielW Asriel for suggestion to integrate sentiment bar into rating module

Note: The modified modules with sentiment bar integrated requires refreshing of the page to update the rating ratio.

    • _

    Sentiment bar body

    Within [[include…]], you may delete or use arguments according to your needs.

    [[include :scp-int:ratemod:sentimentbar-arguments uper=0.55 | nper=0 | dper=0.45 | width=300px | theme=ytp-like]]

    In action:

    0 Votes. Become the first!

    uper: Optional. Desired portion of upvotes in terms of decimals or fraction not exceeding 1, default is number of upvotes divided by total number of votes of the current page.

    dper: Optional. Desired portion of downvotes in terms of decimals or fraction not exceeding 1, default is number of downvotes divided by total number of votes of the current page.

    nper: Optional. Desired portion of novotes in terms of decimals or fraction not exceeding 1, default is 0.

    width: Optional. Width of the sentiment bar, default is 200px.

    theme: Optional. Color theme for the sentiment bar. Default is "greengreyred". Predefined themes are as following:

    User-defined themes can be achieved through the following css code:

    Rating module with sentiment bar:

    Add the following code at the start of the page to replace rating module and [[>]]. Within [[include…]] you may delete or use arguments according to your needs.
    When the cursor is hovering above the rating module, the sentiment bar will appear. On mobile display clicking on anywhere of the rating module acts as hovering on it.

    [[include :scp-int:ratemod:sentimentbar theme=ytp-like]]

    In action:

    0 Votes. Become the first!

    rating: 0+x

    theme: Same as the description above.

    Credit module with sentiment bar:

    Add the following code at the start of the page to replace rating module and [[>]]. Within [[include…]] you may delete or use arguments according to your needs.
    When the cursor is hovering above the credit module, the sentiment bar will appear. On mobile display clicking on anywhere of the credit module acts as hovering on it.

    [[include :scp-int:ratemod:sentimentbar-credit:start theme=ytp-like]]
    Information
    [[include :scp-int:otherwise]]
    More information
    [[include :scp-int:credit:end]]

    In action:

    0 Votes. Become the first!

    rating: 0+x
    blank.png

    theme: Same as the description above.


%%content%%