Support Forum
I tried doing a search for this but I am wondering if there is a way to set users post counts?Either through the interface or through the database?
I ask because I already set up simple press and I have everything that I want set up but I noticed that your converter tool will only work with a fresh install (converting from ip.board). I believe I can import a list of users into wordpress which should work to get my users set up but my users would like their post counts to remain the same.
Thoughts?
No not exactly. Since my users will not have any posts I just want to set their post count to what it was on our old forums and have it continue on from there. So either I will have to set them manually or update whatever table that data is stored on. I guess I need to know what table that is and if there is a risk of corrupting anything by setting them manually.
Ah sorry - I misunderstood. It has been one of those days!
A users forum post count is maintained in the sfmembers table in the column simply named 'posts'. The table will require your set WP table prefix of course.
If you have a table with the data including user_id and post count then it could be updatred with a simple SQL query.
YELLOW
SWORDFISH
|
Ok one last question.
I know I can import users to the wp users table. Is there any reason that I can't import users into the WP_SFMEMBERS table? I would want to import to the display_name and posts field. Is there any reason that importing just these two fields to the WP_SFMEMBERS table would cause issues? Are all other fields that are required set to default values?
Not realistically possible I am afraid.
Firstly the forum's sfmembers table is intrinsically linked to the WP users and usermeta tables plus some of the columns in sfmembers do need code to fill them. There is a function that can be called to perform this task but it has to be called for each new sfmember row creation - most usually triggered by a new user creation in WP users.
YELLOW
SWORDFISH
|
hmmm ok well how well does your import tool work? I hate that I have to redo all the permissioning as that was a big pain for me. But if that gets my users in with their post counts intact then that's what I will have to do.
I can copy the additional css and the child theme folder to make it a bit less painful but wish I didn't have to go back to a fresh install to import the data.
I wouldn't want to do that either.
So this data came from a different forum. If you have the database still why not extract just the post count data and import that separately? Do you have tools to run queries on your database? And do you know the table and column where the users posts are stored?
YELLOW
SWORDFISH
|
Yellow Swordfish said
I wouldn't want to do that either.So this data came from a different forum. If you have the database still why not extract just the post count data and import that separately? Do you have tools to run queries on your database? And do you know the table and column where the users posts are stored?
yes I still have the database. The problem is that the the users do not exist in the database.
I went ahead and built a tool that will query the old database and the new wp_sfmembers table and then update the posts field to merge the two counts together. I will just have them check in with me as the log in and then I will run that tool and update them as they start to check in. I have 709 users right now so it is just going to be a bit of work but it won't all be at once.
sorry, late to the game, but if the users are not in the database, then they wont be associated with existing posts... so in addition to creating the user post count, do you need/want to associate them with their old posts?
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)