Jump to content

Rebuild / Recount of all members reputations (pp_reputation_points)


L.K.

Recommended Posts

Posted

Hi,

I converted my vBulletin3.8.x Board to IPS. I used the vBSEO Like System, so i also converted them manually to IPS4 database table core_reputation_index while matching vb3->IPS4 postIDs and memberIDs.

Now in the topic view, the posts are showing the likes from members. Until here everything is fine.

But on profile page, the reputation points of members are not counted based on the given reputations. As far as I could see, the reputation points of members are counted in pp_reputation_points file of the members database table.

What i need to do is to recount all reputation points of all members.

I already took a look to a lot of .php code lines of the queue and tasks files, but i just find the task "RecountReputationIndex" which I also already start manually by adding the correct values in the core_queue table. I also cleaned up the cache through ACP->Support.

But it doesn't helped at all.

How can I let IPS4 recount all members reputation points? Could anybody give me some suggestions or a SQL Statement for that?

Thank you very much in advance.

Best

Posted

I solved by myself. Here are the mysql statements you need, if you have a bigboard:
 

1. Creating Temp Table:
CREATE TABLE a_reputation_points(member_id mediumint(8), points int(10))
CREATE UNIQUE INDEX memberid_index ON a_reputation_points (member_id)


2. Pushing Data to Temp Table:
INSERT INTO a_reputation_points (points, member_id)
SELECT COUNT( * ), member_received
FROM  core_reputation_index
GROUP BY  member_received


3. Updating core_members Table with Data from Temp Table:
UPDATE core_members
INNER JOIN a_reputation_points ON core_members.member_id = a_reputation_points.member_id
SET core_members.pp_reputation_points = a_reputation_points.points 
WHERE core_members.member_id IN ( SELECT member_id 
FROM  a_reputation_points )


4. Deleting Temp Table:
DROP TABLE a_reputation_points

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...