MyBB Community Forums

Full Version: Find 'forumdisplay_threadlist' in FTP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Yes I know this file can be edited via AdminCP, but I fudged up the code and saved it somehow. I can't revert to the original due to edits I had added. I need to find where the contents of 'forumdisplay_threadlist' are in a backup so I can copy them and re-add them to the site.
forumdisplay_threadlist is a template and an output of forumdisplay.php. The easiest thing to do is to copy the contents of threadlist to notepad and then revert the template. You can add your new elements back in then from the notepad copy.
(2014-05-23, 09:55 PM)Leefish Wrote: [ -> ]forumdisplay_threadlist is a template and an output of forumdisplay.php. The easiest thing to do is to copy the contents of threadlist to notepad and then revert the template. You can add your new elements back in then from the notepad copy.

That's the problem... I was an idiot and did a template edit without first copying the text or backing up my site. I have a backup from yesterday which I'm trying to grab the code from. That's what I'm trying to do at least.
So you would need to open the sql file from your backup in a text editor and find the threadlist template as you saved it. Find replace would be fastest to find it.
(2014-05-23, 10:12 PM)Leefish Wrote: [ -> ]So you would need to open the sql file from your backup in a text editor and find the threadlist template as you saved it. Find replace would be fastest to find it.

Thank you so much!
In your backup copy of the database, look or search for "mybb_templates" where mybb is the prefix you used for your installation of MyBB. It should be tid = 1, however I'm not sure if that's the default number or if that varies from install to install.

If you're using a database tool like Navicat 9 Lite, you can query for the template ID.
SELECT * FROM mybb_templates WHERE title='forumdisplay_threadlist';

Then, look for the tid when you find the section that inserts the data into the _templates table, the template output data should be the third column (or third comma/tab if text viewing) called "template". You can typically use a text editor (however the bigger the database file, the longer a basic text editor might take to read and output the contents of the file). A database tool like Navicat has a built in query editor and might process it faster than a basic editor.
If you get it to work please mark the thread as solved.
I managed to make another test sql database, upload the old sql, export the template table and overwrite the messed up one on my server! Thanks! As soon as I realized this was an SQL edit I felt like an idiot.