MyBB Community Forums

Full Version: Create initial postings?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible for the Admin to create initial postings as if posted by users with arbitrary usernames? I'd like to preload my new MyBB with initial postings that contain actual words of users before any users register. I have already received their permission to do this.
This will require a custom plugin. The closest I've found so far is this thread. Unsure if it still works.
This looks too complicated. I'll take a look at the MySQL database and see if I can simply change the author name from me to the one I want. I'll report back here.
Well doing it via Database is another way, I just thought you may want to avoid that Toungue
(2018-07-14, 10:57 PM)DavidS111 Wrote: [ -> ]This looks too complicated. I'll take a look at the MySQL database and see if I can simply change the author name from me to the one I want. I'll report back here.

Why can't you create a new account with full admin access?

Like this:

Username: Board Admin
User Group: Administrators
Permissions: Copied straight from your original admin permissions.

That way you don't have to muck around with your account and mess something up by accident.
It looks easy to do with PHPMyAdmin. The table "mybb_posts" has a column "username" that I suppose can just be changed. None of the other tables have names that suggest any interaction.

Can anyone confirm this concept?

It didn't work. I made a posting then logged out. Then I changed the posts table so the uid and username columns were set correctly for a registered user.

But the entry appears to be cached, because I am still shown as the author of the post.

Please help.
I rebuilt the "forums" cache with no effect. My changes to the MySQL database do not make any difference to the display of the forum index, although they are reflected in the actual postings. Maybe there is a cache for the index? What would that be called?
(2018-07-16, 03:49 PM)DavidS111 Wrote: [ -> ]I rebuilt the "forums" cache with no effect. My changes to the MySQL database do not make any difference to the display of the forum index, although they are reflected in the actual postings. Maybe there is a cache for the index? What would that be called?

Didn't you read post #5?

I hope you don't mess up your database. Make backups if you haven't done so already.
It turns out to be very easy for an Admin to create postings as if by another user (of course, ask permission first). And there is little danger in messing up anyone's account.

Just use phpMyAdmin to edit the database directly (of course, always backup your database before editing it).

Lightbulb Steps:

1. Create a new posting containing the desired subject and content. If you want to be certain your username won't confuse anyone, lock your forum before these steps and unlock afterward (I'm not sure how this is done; should be easy). Don't forget to backup your DB.

2. Use phpMyAdmin on your MyBB database. The name of the DB and its location are those you originally specified.

3. Select Table "mybb_users". Browse for the "username" column that matches the user you wish to impersonate. Write down the username. Also, write down the number in this row's "uid" column.

4. Select Table "mybb_threads". Browse for the "subject" column to find the posting you just made (if it is the start of a thread). Edit this row. Edit the "uid" and "username" columns so they contain the information you wrote down in step 3, the user's uid and username.

5. Save your changes by clicking the Go button. This will update the username in the displayed index for your forum.

6. Select Table "mybb_posts". Browse for the "subject" column to find the posting you just made. Edit this row. Edit the "uid" and "username" columns so they contain the information you wrote down in step 3, the user's uid and username. This will update the username in the header of the displayed post.

That's it! If you have any problems, post here and I'll try to help. Don't forget to save a backup of your DB so you can always restore it.

David Toungue