Export Personal Messages to XML

Started by live627, July 16, 2007, 01:37:31 PM

Previous topic - Next topic

mark7144

So for the typical user, they will have no idea what to do with their downloaded XML files.

SleePy

Well for a typical user it will just have the data of their pms saved nicely.
Really though its made for storing it so you can remove them off the server ;)
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

mark7144

I know but maybe there should be a (?) link that tells the user what to do with the data when they have it on their computer. Because like me, most of them will open it up and go WTF and simply then have no use for it?

SleePy

I plan on adding a xslt style sheet sometime in the future. I just don't have the time at the moment to make it.
Then comes the mater of how to implant it, Right now I am thinking of having it attempt to use the one off the site and if it can't try to find one in the local folder it is in (meaning the style sheet is downloadable).
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

mark7144

SleePY, I will have to uninstall your mod because the vast majority of my users won't understand what to do with the data.

Is there any chance you could make a similar mod to the already existing HTML export mod? At the moment that mod only downloads the current box (in/out) you're viewing. I'd like to have it similar to yours where there is a link to download the inbox or everything.

SleePy

Since there is an existing mod just like it I can't, but you can ask the mod author to expand on the features of their mod.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Snow Wolf

I am getting an error message:

Export Inbox:
QuoteFatal error: exportmessages(): Failed opening required '/home/content/D/e/n/DenKain/html/forum/Sources/ExPortMessages.php' (include_path='.:/usr/local/lib/php') in /home/content/D/e/n/DenKain/html/forum/Sources/PersonalMessage.php on line 2270

Export ALL PMs:
QuoteFatal error: exportmessages(): Failed opening required '/home/content/D/e/n/DenKain/html/forum/Sources/ExPortMessages.php' (include_path='.:/usr/local/lib/php') in /home/content/D/e/n/DenKain/html/forum/Sources/PersonalMessage.php on line 2270
www.MythicSoftware.com

Software for the Pagan community

SleePy

The .php file didn't get uploaded correctly.
Decompress the .tar.gz file and upload the ExPortMessages.php to your Sources directory.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Snow Wolf

www.MythicSoftware.com

Software for the Pagan community

BigMike

YES!! This is AWESOME!

I have 1167 PMs and it will be SA-WEEEEEEEEEEET to FINALLY clear them out without deleting them!!

Thank you very much for your work, I am downloading this mod right now!

BigMike

Ok, got it installed using the Package Manager (only my 2nd time installing a mod this way) and everything went smooth except for the modification to the "Modifications.english.php" file. It added the changes after the "?>" php end command instead of before it.

Also, what is the best way to view an XML file like this? It loads in MS Excel (won't load in OpenOffice Calc  :'( :'( :'( :'() but it is still pretty hard to read it.

I understand the primary cause for this mod is most likely just to have some sort of backup, which is does accomplish, but if it has the ability to make a formatted XML file, then why not just make a formatted HTML file so I can see all the line breaks and font styles?

Thanks
BigMike

BigMike

Found a problem: Now I am getting "Undefined index: exportpms_inbox" in my error log......

Volcom Today at 08:48:32 AM
http://board.marlincrawler.com/index.php?action=pm
8: Undefined index: exportpms_inbox
File: /(my root source)/Sources/PersonalMessage.php
Line: 254

Volcom Today at 08:48:32 AM
http://board.marlincrawler.com/index.php?action=pm
8: Undefined index: exportpms_all
File: /(my root source)/Sources/PersonalMessage.php
Line: 244

Brandon Today at 08:48:13 AM
http://board.marlincrawler.com/index.php?action=pm
8: Undefined index: exportpms_inbox
File: /(my root source)/Sources/PersonalMessage.php
Line: 254

Brandon Today at 08:48:13 AM
http://board.marlincrawler.com/index.php?action=pm
8: Undefined index: exportpms_all
File: /(my root source)/Sources/PersonalMessage.php
Line: 244

not a toy Today at 08:47:53 AM
http://board.marlincrawler.com/index.php?action=pm;f=inbox;l=-1
8: Undefined index: exportpms_this
File: /(my root source)/Sources/PersonalMessage.php
Line: 251

not a toy Today at 08:47:53 AM
http://board.marlincrawler.com/index.php?action=pm;f=inbox;l=-1
8: Undefined index: exportpms_all
File: /(my root source)/Sources/PersonalMessage.php
Line: 244


I don't have any time to check this out right now, but I should later tonight.

Regards,
BigMike

SleePy

In my mods I have put a xslt stylesheet in them. So opening it in your browser should yield a nice visual layout of the mod.
The errors you are getting is saying the language string is not defined. Did you remove them from the Modifications.english.php? Do you have other languages?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

BigMike

Quote from: SleePy on February 04, 2008, 05:32:32 PM
In my mods I have put a xslt stylesheet in them. So opening it in your browser should yield a nice visual layout of the mod.

I saw the files in the compressed package file that were not needed for the modification, but even when I place those files in the same dir as my PM XML export, in FireFox I get the following message:

        This XML file does not appear to have any style information associated with it. The document tree is shown below.


Sorry, I don't know much about stylesheets relating to xml files.

QuoteThe errors you are getting is saying the language string is not defined. Did you remove them from the Modifications.english.php? Do you have other languages?

Well, actually in reply #30 above I mentioned that the additions to the Modifications.english.php file were placed below the "?>" line, which wrote all kinds of text at the top of every since page of my forum. I was quickly able to find the mistake in the package manager installation, and I moved the "?>" to below the added lines in the file.]

Other than that, I did not change any thing else in that file.

I suppose this is why I NEVER use the package manager and ALWAYS do manual installs. Only as of very recent (last week) have I begun using the package manager for installs. I've been manually installing mods for a good 5 years and have just now begun experimenting with the automatic package manager. It is EXTREMELY nice when it works, but I still have my doubts :D

SleePy

Are you on windows? I never did try to see if the xml files work on windows machines. I guess I should try that out.
You can also run the files through Daniels Package parser, which I keep a copy of at my site: http://sleepycode.com/PackageParser/index.php

Just select your SMF version and upload your file. The Package Parser handles the rest and gives a nice output for manual installs.

As I said that error is saying this string is not defined:
$txt['exportpms_inbox']  = 'Export Inbox';

Do you have any other language files? The language strings need to be added to all the language files.

Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

BigMike

Quote from: SleePy on February 04, 2008, 06:54:11 PM
Are you on windows?
Affirmative.

QuoteDo you have any other language files?
Negative. 1 Language 1 Theme.


Here is the end of my Modifications.english.php:

// Export Personal Messages
$txt['exportpms_inbox']  = 'Export Inbox';
$txt['exportpms_this']  = 'Export This Folder';
$txt['exportpms_all'] = 'Export ALL PMs';
$txt['exportpms_none'] = 'You have No Personal Messages to export.';

?>

SleePy

Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

BigMike

Actually,

I am at home and am about to go to sleep. I just checked my error log, and I have not had an error since 8:48 am, which are the same errors as above on reply #31.

Also I made my reply at 9:48 am which, looking at the logs, was 1 hour after the errors were made.

Furthermore, the errors were made all within 1 minute----

-----So in actuality, the errors were most likely made during the split second -- or whatever -- that it took for the mod to be installed and setup.

Maybe to avoid this error, adding the text to the modification language file should have been the first step in the modification process so that once the system got fired up, even if someone just happened (in this case) to be viewing their PMs, at least a couple residual errors would not have been thrown.

Anyways, it is clearly not a bug on the modification's part, as far as its functionality is concerned, and for this I am sorry to have bothered you regarding it!!

Good night,
BigMike

mark7144

#38
Quote from: SleePy on February 04, 2008, 05:32:32 PM
In my mods I have put a xslt stylesheet in them.
Is this something you have added since our last conversation on this thread? I was the guy complaining that my users couldn't read the XML data properly because they are not competent enough in that area.

SleePy

the xslt stylesheets is only in the mod for manual mod installs, Daniel15 made those and I used them in my mods for hopefully easier manual installs without the need for package parser.

It may be possible that if there is enough pms that the memory gets to full and not all data is sent out. Do you know how many pms he had?

BigMike,
I am thinking the error then happened during the text being at the top as it wasn't working properly. The text at the top usually happens when search position of end is used and there is a return or space after the ?> in the file. This causes the package manager to think its just a plain text file instead of a php file and adds it to the true end.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Advertisement: