Customizing SMF > Modifications and Packages

Export Personal Messages to XML

(1/11) > >>

SleePy:
Link to Mod

This Mod allows you to export your Personal Messages in a XML format.

Version 1.0
! Fixed Namespace issue
! Release

cybergurk:
Moin,

I have found "BUG" ?

hxxp:parser.smfportal.de/variables.htm [nonactive]/PersonalMessage.php
require_once($sourcedir . '/ExportMessages.php');

change to (Remove "/" )

require_once($sourcedir . 'ExportMessages.php');


SleePy:
Actually the / is needed.

$sourcedir should contain the path to your sources directory without the trailing /
So the / Is needed :)

cybergurk:
hi,
ok :)

JOSHSKORN:
I actually had the exact same problem and I've managed to fix it.  Basically when I click on Export All PMs, I receive the following error:


--- Code: ---Fatal error: exportmessages(): Failed opening required '/ExPortMessages.php' (include_path='.:/usr/local/lib/php:/usr/local/share/pear') in /hsphere/local/home/threei/3iclan.net/thesite/Sources/PersonalMessage.php on line 2269

--- End code ---

You'd think the error is in line 2269, but actually it's in line 2266.  You need to add the $sourcedir to the list of variables.  So,


--- Code: ---function ExportMessages()
{
global $db_prefix, $ID_MEMBER, $scripturl, $user_info, $context, $txt;

// Sadly to make this work for package manager the easy way was to just include a file.
require_once($sourcedir . '/ExPortMessages.php');
ExportMessagesXML();
}

--- End code ---

now looks like:


--- Code: ---function ExportMessages()
{
global $db_prefix, $sourcedir, $ID_MEMBER, $scripturl, $user_info, $context, $txt;

// Sadly to make this work for package manager the easy way was to just include a file.
require_once($sourcedir . '/ExPortMessages.php');
ExportMessagesXML();
}

--- End code ---

Well that's what I did to make it work for me.

Navigation

[0] Message Index

[#] Next page

Go to full version