Luke F
Well-known member
DBTech Adv. Post Thanks/Like import:
___________________________________________________________
Post Thank You Hack import:
For both queries you must import keeping source IDs and replace the bits in caps with the relevant values. Once done, run Recount Ratings in your Admin CP.
Alternative Post Thank You hack import for where your table does not contain content_userid:
___________________________________________________________
Delete all ratings made by a user:
(Then run recount ratings.)
___________________________________________________________
Delete all ratings received by a user (aka reset a user's rating scores):
(Then run recount ratings.)
___________________________________________________________
Delete all negative ratings made by a user:
(Then run recount ratings.)
___________________________________________________________
Delete all negative ratings received by a user:
(Then run recount ratings.)
___________________________________________________________
XenPorta 2 support:
___________________________________________________________
Convert like format: (not recommended)
http://xenforo.com/community/thread...the-next-level-paid.28475/page-23#post-344980
___________________________________________________________
Convert ratings to likes: (irreversible; for permanent uninstallations)
___________________________________________________________
Recounting ratings on extremely large databases (aka if 'recount ratings' in ACP times out):
No longer needed as of version 1.7.0
___________________________________________________________
Font Awesome rating icons (experimental, no support provided):
Update: An alternative user-provided solution is available here: https://xenforo.com/community/threa...he-next-level-paid.28475/page-130#post-926118
Add to EXTRA.css:
Add a new rating, leaving 'Icon' blank and set 'Title' to the raw unicode character for the desired Font Awesome icon. This can be copy+pasted via inspect element in your web browser:
Note that having an actual title along with the icon is not possible without template modifications. (You could put the name next to the unicode symbol, but it won't have the same rollover caption.)
___________________________________________________________
Anonymous ratings:
To make all ratings on your forum anonymous, simply deny the 'list ratings' permission, and edit the templates news_feed_item_postrating_rate and alert_postrating_rate, changing all instances of:
To something like:
Code:
insert ignore into XENFORO_DB_NAME.dark_postrating select null, contentid, userid, receiveduserid, if(varname = 'thanks', THANKS_RATING_ID, if(varname = 'dislike', DISLIKE_RATING_ID, 1)), dateline from VBULLETIN_DB_NAME.dbtech_thanks_entry
___________________________________________________________
Post Thank You Hack import:
Code:
insert ignore into XENFORO_DB_NAME.dark_postrating select null, postid, userid, content_userid, THANKS_RATING_ID, date from VBULLETIN_DB_NAME.post_thanks
For both queries you must import keeping source IDs and replace the bits in caps with the relevant values. Once done, run Recount Ratings in your Admin CP.
Alternative Post Thank You hack import for where your table does not contain content_userid:
Code:
insert ignore into XENFORO_DB_NAME.dark_postrating select null, postid, userid, null, THANKS_RATING_ID, date from VBULLETIN_DB_NAME.post_thanks
Code:
update dark_postrating r set r.rated_user_id = (select p.user_id from xf_post p where p.post_id = r.post_id) where r.rated_user_id is null
___________________________________________________________
Delete all ratings made by a user:
Code:
delete from dark_postrating where user_id = x
___________________________________________________________
Delete all ratings received by a user (aka reset a user's rating scores):
Code:
delete from dark_postrating where rated_user_id = x
___________________________________________________________
Delete all negative ratings made by a user:
Code:
delete pr
from dark_postrating pr
left join dark_postrating_ratings r on pr.rating = r.id
where pr.user_id = x and r.type = -1
___________________________________________________________
Delete all negative ratings received by a user:
Code:
delete pr
from dark_postrating pr
left join dark_postrating_ratings r on pr.rating = r.id
where pr.rated_user_id = x and r.type = -1
___________________________________________________________
XenPorta 2 support:
I got this working for xenporta2 now.
If anyone is interested you need to edit the template modification for xenporta and change it to
Code:Template: EWRporta2_Article_Post Find: <xen:set var="$messageAfterTemplate"> Replace: <xen:set var="$messageAfterTemplate"> <xen:hook name="dark_postrating_likes_bar_xenporta" params="{xen:array 'post={$post}','message_id={$messageId}'}" />
___________________________________________________________
Convert like format: (not recommended)
http://xenforo.com/community/thread...the-next-level-paid.28475/page-23#post-344980
___________________________________________________________
Convert ratings to likes: (irreversible; for permanent uninstallations)
- Select a rating you would like to convert to XF Likes in Options > Post Ratings > Like rating
- Run Recount Ratings
- Click cancel once it starts building the rating cache
- Repeat steps 1-3 for all ratings you would like to convert to likes
___________________________________________________________
Recounting ratings on extremely large databases (aka if 'recount ratings' in ACP times out):
- Follow instructions above to convert like format
- http://xenforo.com/community/thread...the-next-level-paid.28475/page-85#post-629004
No longer needed as of version 1.7.0
___________________________________________________________
Font Awesome rating icons (experimental, no support provided):
Update: An alternative user-provided solution is available here: https://xenforo.com/community/threa...he-next-level-paid.28475/page-130#post-926118
Add to EXTRA.css:
Code:
.dark_postrating_textonly { font-family: FontAwesome; font-size: 1.6em; vertical-align: bottom; }
Add a new rating, leaving 'Icon' blank and set 'Title' to the raw unicode character for the desired Font Awesome icon. This can be copy+pasted via inspect element in your web browser:
Note that having an actual title along with the icon is not possible without template modifications. (You could put the name next to the unicode symbol, but it won't have the same rollover caption.)
___________________________________________________________
Anonymous ratings:
To make all ratings on your forum anonymous, simply deny the 'list ratings' permission, and edit the templates news_feed_item_postrating_rate and alert_postrating_rate, changing all instances of:
Code:
'name={xen:helper username, $user, 'primaryText'}',
To something like:
Code:
'name=A user',
Last edited: