MyBB Community Forums

Full Version: Mybb refresh
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was wondering if there is a way I can set up my test board to do an auto refresh and revert changes automatically on the hour?

A feature like the 1.4 test board has at Mybbfans?

Reason being is, I finally got a bit of gumption and fixed a plugin on my own for a member. I want to learn PHP coding and do work on existing plugins that the author no longer bothers with or create my own plugins from scratch.

Having a refresh feature would be useful if I happen to mess up and screw up the board in the process of plugin coding.

I also know there was a guidelines to creating plugins for Mybb thread around here, but I don't know where it is. Would anyone mind directing me to it an addition to my original question?

Thank You.Smile
You could probably do something like:

1. Install MyBB
2. Make a copy of all database tables for MyBB to a different database prefix, like clean_mybb_ instead of mybb_.
3. Make a PHP script to DROP the tables with prefix mybb_ and then copy the tables from clean_mybb_ to mybb_ in the database.
4. Set the script to run on a CRON in your CPanel or web host control panel.

For step 3 you could use code like:

mysql_query("DROP TABLE IF EXISTS mybb_templates");
mysql_query("CREATE TABLE mybb_templates SELECT * FROM clean_mybb_templates");

Just do that for all the database tables to reset the forum from the backup tables.

Hope it helps,
BMR777
Can't you run tasks like that on the internal side of MyBB 1.4, now?
We're talking about 1.4, right?
Yes but administrators can disable tasks Toungue Something to consider if you're demoing the Admin CP
(2008-06-18, 02:37 AM)ahero4heor Wrote: [ -> ]Can't you run tasks like that on the internal side of MyBB 1.4, now?
We're talking about 1.4, right?

No, version 1.2 at least right now until 1.4 is released. I was just wondering how to do that refresh feature like the 1.4 beta board Mybb fans has implemented on their website on my test board.

Is BMR777's method the only way to go about it?
MiNT wrote that I think. You can ask him about it.
(2008-06-18, 11:31 PM)MrDoom Wrote: [ -> ]MiNT wrote that I think. You can ask him about it.

Actually I ended up writing it Toungue

Yes it basically reimports the database from a backup by a cron job Smile It's the easiest and most reliable way in my opinion.