MyBB Community Forums

Full Version: Is there a way to get back the global.css from the backup?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone!

I was customizing some css on my forum and accidentaly i deleted the whole global.css and saved the part i wanted to add to it.

All forum customization is gone and i used a lot of customizations on my forum on dark 1.8 theme.

Thank God i had an old gobal.css saved from this theme a year ago, pasted it there and everything turned back to normal but some settings are missing and i need to do them again.

My question is "is there a way to recover back the global.css from the backup of the forum?" 

I have one month old back up of my forum, would it help?This could save me a lot of time if possibile.

Please help.

Thanks a lot.
If it's a database backup, you can find the global.css in the themestylesheets table (which will have your board prefix first, such as mybb_themestylesheets).

Look for a row where the name is global.css and the tid is the ID of your theme. Here is an example SQL query:
SELECT `stylesheet` FROM `mybb_themestylesheets` WHERE `name` = 'global.css` AND `tid` = 2;
I have saved the backup on my pc, how should i proceed?

Should i open that .txt file and search for what you suggested?

The backup was made as following:

[attachment=42221]
The easiest way would be to run something like XAMPP on your PC so that you can run MySQL and phpMyAdmin locally. Then you can import the backup and access it that way.
What i have did till now is ,opened the backup file by renaming it as .txt file and opened it with notepad++.

Then i went to the row suggested by you and copied the row to a normal text file.

After copying it there, 90% is back like before i just need to replace some strings manually as notepad won't read the original ones as they were saved in global.css

I will update this thread as soon i am finished.

Thankyou for your support.

Global.css restored thank Euan T.

Repped.

Regards.