Content Ratings

Content Ratings 2.7.6

No permission to buy ($35.00)
Q. How to style duotone font-awesome icons?
A. Duotone support primary/secondary colors which allows font-awesome icons to look at such;
screenshot-2021-09-11-at-14-19-49-png.257169


Add css classes to the "css icon" field and ensure the emoji/text and image url are empty;
1631413967574-png.257190


Each reaction has it's own unique class based on the reaction id observable in the url. This allows per-reaction styling, which should be added to extra.less or included into extra.less from a custom template, (ie rating_colors.less).

An example of styling;
Code:
/* Like */
.sv-rating-type-icon1{
    --fa-primary-color: #2e4164;
    --fa-secondary-color: #f4c430;
    --fa-secondary-opacity: 1.0;
    --fa-primary-opacity: 1.0;
}

/* Agree */
.sv-rating-type-icon2{
    --fa-primary-color: #ffffff;
    --fa-secondary-color: #548d58;
    --fa-secondary-opacity: 1.0;
    --fa-primary-opacity: 1.0;
}

See https://fontawesome.com/v5.15/how-to-use/on-the-web/styling/duotone-icons for more information on styling duotone font-awesome icons


Q. How do I make the default ratings bigger?
A. The default ratings using the XenForo Emoji One smilie sheet, which consists of 22 pixels by 22 pixel images. XenForo ships with 44x 44 pixel images, but each is as a separate image.

Set the Image replacement URL and 2 x Image replacement URL entries to the following, and disable "Sprite mode "
Like:
styles/default/xenforo/smilies/emojione/thumbsup.png
styles/default/xenforo/smilies/emojione/thumbsup_x2.png

Love:
styles/default/xenforo/smilies/emojione/inlove.png
styles/default/xenforo/smilies/emojione/inlove_x2.png

Haha:
styles/default/xenforo/smilies/emojione/laugh.png
styles/default/xenforo/smilies/emojione/laugh_x2.png

Wow:
styles/default/xenforo/smilies/emojione/eek.png
styles/default/xenforo/smilies/emojione/eek_x2.png

Sad:
styles/default/xenforo/smilies/emojione/cry.png
styles/default/xenforo/smilies/emojione/cry_x2.png

Angry:
styles/default/xenforo/smilies/emojione/mad.png
styles/default/xenforo/smilies/emojione/mad_x2.png


Q. How to use the Post Rating Importer
A. The sets for using the importer are:
  1. Before upgrading XenForo 1, leave Post Rating installed
  2. Upgrade to XenForo 2
  3. Install this add-on
  4. Navigate to Tools -> Import data
  5. Select Post Ratings from the list
  6. Select the type of data to import
    1. Rating type categories (ie negative/positive/neutral)
    2. Rating Types (note; Some may be imported with on title, recommend manually fixing up)
  7. Enter an a table name in the "importer log table name" field, this is required.
  8. Importing will start, this will slowly import & rebuild ratings as posts are processed.
  9. See the next question for legacy data.
Q. After importing from Post Rating legacy data is left, how can this be removed
A. To remove the tables:
SQL:
drop table if exists dark_postrating;
drop table if exists dark_postrating_count;
drop table if exists dark_postrating_post_cache;
drop table if exists dark_postrating_ratings;
drop table if exists <importer log table name>;
('<importer log table name>' is whatever table name you chose in the previous step)
Warning: The stock rating icons under /styles/dark/ratings are re-used and not copied or moved elsewhere. Deleting these will break your imported ratings!


Q. How can the ratings be left-aligned on the rating bar but the menu be right aligned?
A. Use the "Left-align current ratings in the rating bar" style property

Q. The Reactions Given page can be very slow
A. Add the index:
SQL:
alter table xf_reaction_content add index reaction_user_id_reaction_date (`reaction_user_id`,`reaction_date`);
Top Bottom