Advertisement:

Author Topic: How do I save posts to text for storage?  (Read 3443 times)

Offline amy1

  • Newbie
  • *
  • Posts: 3
How do I save posts to text for storage?
« 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

Offline Colin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,879
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: How do I save posts to text for storage?
« Reply #1 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.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,629
  • Gender: Male
    • Kindred-999 on GitHub
Re: How do I save posts to text for storage?
« Reply #2 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
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Bob Perry of Web Presence Consulting

  • Sophist Member
  • *****
  • Posts: 1,018
  • Gender: Male
  • (T)ogether (E)veryone (A)chieves (M)ore
    • Bobert921 on Facebook
    • https://www.linkedin.com/in/bperry921/ on LinkedIn
    • @bperry921 on Twitter
    • Web Presence Consulting
Re: How do I save posts to text for storage?
« Reply #3 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...
Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,211
  • Gender: Male
    • i30 Owners Club
Re: How do I save posts to text for storage?
« Reply #4 on: December 18, 2016, 04:56:28 PM »
Probably easiest to enable & use the "Print" function on a topic.

Offline amy1

  • Newbie
  • *
  • Posts: 3
Re: How do I save posts to text for storage?
« Reply #5 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

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,629
  • Gender: Male
    • Kindred-999 on GitHub
Re: How do I save posts to text for storage?
« Reply #6 on: December 20, 2016, 07:00:08 PM »
In short, no... there is no way to export the posts to a text file...
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline nend

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,755
  • 2 deep n2 the code
    • sicommnend on GitHub
    • SIComm.us
Re: How do I save posts to text for storage?
« Reply #7 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/

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,542
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk
Re: How do I save posts to text for storage?
« Reply #8 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.
The configuration of my Linux VPS (SMF 2.0 with 145 mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Offline Colin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,879
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: How do I save posts to text for storage?
« Reply #9 on: December 22, 2016, 02:53:23 PM »
^ Actually a pretty good solution. Thanks Aegersz.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,542
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk
Re: How do I save posts to text for storage?
« Reply #10 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.
The configuration of my Linux VPS (SMF 2.0 with 145 mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Offline devilkin

  • Semi-Newbie
  • *
  • Posts: 50
  • Gender: Male
    • k c o r e . o r g
Re: How do I save posts to text for storage?
« Reply #11 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
SMF 1.1.1, located at http://www.aelst.be/smf/

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,542
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk
Re: How do I save posts to text for storage?
« Reply #12 on: October 08, 2018, 03:41:54 AM »
nice nesting :)
The configuration of my Linux VPS (SMF 2.0 with 145 mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,676
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: How do I save posts to text for storage?
« Reply #13 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
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,483
Re: How do I save posts to text for storage?
« Reply #14 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.

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,187
  • Gender: Male
    • Macedonian electronics forum
Re: How do I save posts to text for storage?
« Reply #15 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.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: How do I save posts to text for storage?
« Reply #16 on: October 09, 2018, 02:59:44 AM »
Just before it says “here the fun starts...“, try:

$conn->set_charset('utf8');
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,187
  • Gender: Male
    • Macedonian electronics forum
Re: How do I save posts to text for storage?
« Reply #17 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.)
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: How do I save posts to text for storage?
« Reply #18 on: October 10, 2018, 02:02:29 AM »
Inside the <head> tag add <meta charset="UTF-8">
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,187
  • Gender: Male
    • Macedonian electronics forum
Re: How do I save posts to text for storage?
« Reply #19 on: October 10, 2018, 10:40:44 AM »
Hmmm... wonder if I could embed this into the script... I'll definitely try :).

Thanks :).
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."