Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: amy1 on December 18, 2016, 01:31:11 PM

Title: How do I save posts to text for storage?
Post by: amy1 on December 18, 2016, 01:31:11 PM
Hello,

The owner of a Simple Machines board (2.0.2) has passed away and I am looking for a way to export his board posts to a text document. I am doing this because the board still has useful information and linked to.

But the SM software is old and there is no desire to keep the software up to date. I am looking to preserve the posts in any other way possible. Ideally, it would be exported to text so it can be easily searched with keywords.

Can anyone advise on how I can export the posts? I know the board has a lot of data there, but we have room on a local drive for storage.

Any advice or suggestions will be appreciated!

Amy
Title: Re: How do I save posts to text for storage?
Post by: Colin on December 18, 2016, 03:16:55 PM
The easiest way would probably just be to create a instance running so you can use the search functionality of SMF, but if you insist on getting the data out you can use a tool like PHPMYADMIN (http://wiki.simplemachines.org/smf/PhpMyAdmin) to export a SQL dump. Let us know if you have any other questions.
Title: Re: How do I save posts to text for storage?
Post by: Kindred on December 18, 2016, 04:49:49 PM
In short, no... there is no way to export the posts to a text file...

What I did, when I shut down one of my systems, was take a backup of the database and install it on a wampp server running on my Local machine
Title: Re: How do I save posts to text for storage?
Post by: Bob Perry of Web Presence Consulting on December 18, 2016, 04:55:24 PM
In short, no... there is no way to export the posts to a text file...

What I did, when I shut down of my systems, was are a backup of the database and install it on a wampp server running on my Local machine

Yep, what he said, but it sounds like this fellow does not have access to the database, not sure...
Title: Re: How do I save posts to text for storage?
Post by: Shambles on December 18, 2016, 04:56:28 PM
Probably easiest to enable & use the "Print" function on a topic.
Title: Re: How do I save posts to text for storage?
Post by: amy1 on December 20, 2016, 01:41:30 PM
Hi all, thanks for your input!

I actually do have access to the database itself at Dreamhost. So, I am going to look into this. Thanks, Colin, for the suggestion.

Printing each topic isn't feasible - there are hundreds of them.

I have no desire to keep the forum running - the key person who kept it running and vibrant has passed away - so it's back to my first option - if at all possible, to export the data into text, so I can save it as a PDF file, upload it to some website, and provide a public link to it so folks can download their own copy and search the posts with keywords.

Thanks, again.
Amy
Title: Re: How do I save posts to text for storage?
Post by: Kindred on December 20, 2016, 07:00:08 PM
In short, no... there is no way to export the posts to a text file...
Title: Re: How do I save posts to text for storage?
Post by: nend on December 21, 2016, 02:24:01 AM
If the site is semi-popular then it may be archived at archive.org

https://archive.org/web/
Title: Re: How do I save posts to text for storage?
Post by: aegersz on December 22, 2016, 01:41:34 PM
i wrote a batch php program to do this. command line access is required ... i'm just hopeless at php so this is all i could come up with.

it's a bit primitive but it allows admins help their members to get the data that want if they wish to unload their posts.

http://www.simplemachines.org/community/index.php?topic=548761

a last resort but it works.
Title: Re: How do I save posts to text for storage?
Post by: Colin on December 22, 2016, 02:53:23 PM
^ Actually a pretty good solution. Thanks Aegersz.
Title: Re: How do I save posts to text for storage?
Post by: aegersz on December 22, 2016, 02:59:48 PM
you are too kind !

the idea is that if the forum should fold for some reason then users can request that their body of work be saved.
Title: Re: How do I save posts to text for storage?
Post by: devilkin on October 08, 2018, 01:48:30 AM
I've created a script that dumps the entire forum to html files. You can find it here: https://github.com/jdeluyck/scripts/tree/master/smf_forums
Title: Re: How do I save posts to text for storage?
Post by: aegersz on October 08, 2018, 03:41:54 AM
nice nesting :)
Title: Re: How do I save posts to text for storage?
Post by: vbgamer45 on October 08, 2018, 09:36:02 AM
In my GDPR helper I have the option for members to export their posts and data https://custom.simplemachines.org/mods/index.php?mod=4183
Title: Re: How do I save posts to text for storage?
Post by: Sir Osis of Liver on October 08, 2018, 12:43:49 PM
If you're going to maintain a website for other purposes, why not install the forum as an archive (i.e., read only).  A couple of my regulars have done this, it preserves the forum in it's original format, makes it easy to access content.
Title: Re: How do I save posts to text for storage?
Post by: GigaWatt on October 08, 2018, 07:13:31 PM
Yes, but then you'd have to keep everything up to date and running... (PHP, SQL, etc.).

I've just tried the script, it worked but it doesn't support UTF-8 posts :S.
Title: Re: How do I save posts to text for storage?
Post by: Arantor on October 09, 2018, 02:59:44 AM
Just before it says “here the fun starts...“, try:

$conn->set_charset('utf8');
Title: Re: How do I save posts to text for storage?
Post by: GigaWatt on October 09, 2018, 07:03:14 PM
Ummm... it kinda works :P.

The filenames are screwed up (expected) since the board names are also in Cyrillic, so I thought it worked before I downloaded the files, but... no dice, the post text is also screwed up... they're Cyrillic, just not in the correct code page :S.

Wait a minute. Just tried changing the character encoding to Unicode, it works :D.

The names of the files... meeeh, that part doesn't really matter ;). As I said, I though this might happen since it has to code the Cyrillic characters to conform to URL standards, so I kinda figured that out myself, LOL :D

Is there a way to force the character encoding to always be set as Unicode within the html file? (Open the html file, page encoding changes to Unicode/UTF-8.)
Title: Re: How do I save posts to text for storage?
Post by: Arantor on October 10, 2018, 02:02:29 AM
Inside the <head> tag add <meta charset="UTF-8">
Title: Re: How do I save posts to text for storage?
Post by: GigaWatt on October 10, 2018, 10:40:44 AM
Hmmm... wonder if I could embed this into the script... I'll definitely try :).

Thanks :).